Wednesday, December 31, 2025

2025 roundup

Well, another calendar year has gone by. Before I get into the commentary of the highs and lows of 2025, first some statistics. In 2025, I wrote 173 blogs (including this one); 2024 was the all time high with 182 blogs, and in third place is 2013 with 137 blogs. 

PositionTagCountPrevious positionAll time position
1Programming2511
2Prolog187543
3Obituary1477
4Health12125
5Holiday1253
6Italy1269
7Personal1224
8CoPilot115973
9Israel1188
10Rapallo11-82
11Musical group91433
12Delphi836
13Pedal board8957
14Computers71015
15Police procedurals73721
16Grandfather62337
17Non-fiction books63634
18Guitars51123
19Headphones56454
20Mobile phone5-30
21Song writing51511
22Swimming51835
23Tom Clancy58585
24Army service4-108
25CPAP42222
26Nick Drake4-91
27BCC34179
28Blog manager program3438
29Cooking32110
30Films34519
31Home recording32545
32Meta-blogging32029
33Randy Newman3-51
34Slow cooker35163
35T. A. Williams3-221
36Youtube354122

What can I say about this year? Some good things:

  • Obviously the return of (almost) all the hostages held in Gaza and the cessation of the war.
  • The birth of my fourth grandchild, my first grandson.
  • A very enjoyable holiday in Rapallo.
  • One very successful performance of the musical group and one reasonably successful show.
  • Writing a Prolog interpreter, even if some of the work is very tedious and frustrating.
  • My swimming - especially towards the end of the season - improved.
  • Losing weight, although I can't get below 83 kg.
Some bad things
  • The death of my brother in law
  • The Israeli government. These days I try to watch the television news as little as possible as most of the items are very annoying.
  • The (temporary?) loss of my XP computer that serves both as my Delphi development machine and my music studio. The Delphi work has been continued in a virtual computer, but this is far from perfect. 
  • Even without the loss of my music studio, my songwriting ground to a halt. I completed three songs at the beginning of the year; a fourth song has music but no words, and I can't even hear it now as it is only on the XP computer. One day I will get access to the hard disks and so I can listen to the song and even record vocals if I had some words.
  • Not being able to find a MIDI sequencer that meets my needs. The sequencer on the XP computer is no longer being sold and in any case was not updated to Windows 10.
  • Breaking several guitar strings.
  • Being ripped off by Guest Reservations. It galls me to see their adverts on YouTube.
  • The SCC that was removed by Mohs surgery has left part of my ear and jaw numb/paralysed. Nerves in that area were cut and I don't know whether they'll ever grow back. There is no scar, though.
  • Many pre-rain migraines. I'm going to have to see my GP about this although I don't know what she can do.

As one can see, I'm very much a half-empty cup person. The one thing that keeps me going is that I am going to retire in another seven months, and then I can do what I like with my time. Obviously, I'll keep on doing a great deal of what I'm doing now, but at least I won't have to deal with semi-incompetents.



This day in blog history:

Blog #Date TitleTags
99931/12/2016Farewell 2016 - a summary of the year from my idiosyncratic viewpointDBA, Health, Personal, Obituary, Song writing, Theanine
110231/12/2017End of an eraTV series
119231/12/2018Love is all you need (film)Films, Sorrento, Italy
156931/12/2022Gaslit, Watergate ... and more ranting about Israel's new governmentTV series, Israel
170031/12/20231700 blogsMeta-blogging
188231/12/20242024 RoundupPersonal, Meta-blogging

Tuesday, December 30, 2025

Powered USB hub

A month ago, I wrote1 that my mobile computer had been transferred to a new case, and that in the process it had lost a USB port. The computer has two ports: one is used by the mouse (itself problematic in that I have the mouse on the right hand side of the computer and the ports are on the left side) and one by headphones. If I want to connect anything extra, I normally remove the headphone plug. I do have a USB hub with four sockets but this isn't very useful as the connected devices are dependent solely on the power supplied by the USB socket and frequently this isn't sufficient. I use this hub as a simple extension cord for the mouse.

The solution is a powered USB hub: one cable connects the hub to power and one cable connects the hub to the computer. I ordered such a hub (pictured on the left) from Temu that arrived yesterday. Today I connected everything and the problems started.

Maybe I'm naive but I connected the cables the wrong way around: the cable that comes out of the hub (pictured at the top) is not the power cable but rather the cable that connects to the computer. The other cable has a USB plug on one end and some form of connector on the other end; there is a socket for this connector next to where the internal cable exits the hub. Stupidly, I thought that this was the cable that connects to the computer, even though the connector is one that is more often seen on power supplies, like a multi-head transformer. The hub did not work in its original configuration, but after I switched the cables around, it now works. The useless 'user manual' does not say which cable connects where. 


Another bone of contention is that the power connector doesn't sit completely in the socket. Again, this may be my naivity, but I expect a plug to sit firmly in its socket, especially when it's a plug carrying power. I know it's not 240V AC, but even still, the plug should fit the socket securely. Anyway, the powered hub works and that's what's important. I suppose that I shouldn't complain considering the modest price that I paid for this device.

Internal links
[1] 2041



This day in blog history:

Blog #Date TitleTags
2230/12/2005Joseph Finder - Company ManJoseph Finder
32130/12/2010All quiet on the blogging frontERP, ITM
52830/12/2012Being a tourist in Israel: Ein KaremIsrael, Holiday
66530/12/2013Song festival review, part 2Kibbutz
169930/12/2023Dreams turned to dust (new song)Song writing

Sunday, December 28, 2025

Rebooting the musical group

Yesterday evening we held a preparatory meeting when all kinds of subjects were discussed. There were those who preferred not to have the 'threat' of a performance hanging over their head, whereas I pointed out that having a performance and/or a deadline is a good way of focusing. Everyone wants to play and enjoy themselves, but it seems that there is a tendency towards simpler songs. Back at the beginning of September, a candidate list of about 40 songs was created; this list was resumed with a few additions. I have to say that I don't feel much enthusiasm regarding most of those songs and some I really do not want to play. Not because they're hard, but rather that they're simple and that I don't like them; they're not songs that I would ever want to listen to. Unfortunately one can't vote against a song.

I've barely played a guitar since our last performance1 at the beginning of August. I did play the Ovation acoustic one evening when it seemed that I might be playing at my nephew's bar mitzva (held a month ago), accompanying my sister in law's beginner playing, but that idea was silently dropped. 

Other than that, I've restrung two guitars, in both cases without 100% success. On the Stagg guitar, the top E string is thicker than the B string which doesn't make much sense. I think that I'll remove all the strings even though they haven't really been used and put on a fresh set. I took the strings off the 12-string guitar and cleaned the guitar for the first time since I bought it. Putting the new strings on wasn't that easy and tuning was hard. In the process, the high G string snapped which was not a total surprise as this string has the highest tension of all. Maybe I should tune the guitar down to D as this will help somewhat. I'm waiting for a replacement set of strings to arrive before I add the new string, but anyway I barely play this guitar so it doesn't really matter.

Internal links
[1] 1983



This day in blog history:

Blog #Date TitleTags
22328/12/2009A new Word automation techniqueProgramming, Delphi, Office automation
22428/12/2009What is the connection between King Crimson and Organisational Behaviour?Organisation behaviour, King Crimson, MBA
99728/12/2016Biscotti againCooking
119128/12/2018Amos Oz (1939-2018)Israel, Obituary, RIP
145428/12/2021Memory upgradeComputers
169728/12/2023My army service, part two and a halfIsrael, Army service
188128/12/2024Karla's choice, reading #2John Le Carre

Wednesday, December 24, 2025

Murder on an Italian island

The AI overview that comes with Google defines "cozy murders" as the popular genre [that]  features amateur sleuths, charming small-town settings, and puzzles solved without graphic violence, sex, or swearing, focusing more on clever deduction, community dynamics, and lighthearted fun. The Rebus and Banks books are far from this genre, but T.A.Williams1 is a master with his retired detective Dan Armstrong and Dan's mind-reading dog Oscar. No violence, sex or swearing is fine by me.

Let us not forget that this year's holiday in Rapallo2 was due in no small part to William's "Murder in Portofino" book.

I've just read the latest - for me - installment of the series, where the eponymous island is Elba. Judging from the descriptions, this isn't a place that I would like to spend an entire holiday. Williams' cast go there for a week's holiday which naturally is disturbed when two deaths occur there. I won't explain the story, but I'd just like to point out one small feature. In chapter 9, the following appears:

As far as the others were concerned, I gradually sifted them into two camps: ‘likely’ and ‘unlikely’. Into the unlikely camp, I put Tatsuo Tanaka, the four Brits, Heidi Engadin and Martin Wolf from Zurich, along with the couple of young lovers. They both shared the surname, Arnaldo, and Monica had added a note indicating that this was their honeymoon.

Who is Monica, I asked myself? From the context, it's clear who it's meant to be, and in fact, the paragraph previous to this does indeed reference Rita, who is the hotel receptionist where the cast are staying. In the past, I found a few editing errors in the DCI Banks books, but reporting them didn't lead anywhere. This time, I wrote to the contact address on the author's website and was surprised to receive a reply two hours' later.

Thank you very much for taking the time and trouble to contact me. I'm delighted you've been enjoying my work and thank you very much for pointing out the mistake. I seem to remember that I decided to change the name of the Rita character when I had almost finished writing the book. Originally as you have noticed, she was called Monica, but when I changed the names over, I must have forgotten that one. Sorry about that. I hope you enjoyed visiting Rapallo. Although I used to live in Tuscany, I had never visited Rapallo or Portofino before and both came as a pleasant surprise to me when I went there last year. I had been expecting something bigger and over commercialised and I was delighted to find both places have still managed to conserve their Italian feel. [I don't agree about Portofino - NN].

I await the next installment that takes place in Venice, and then there's yet another which will be set in Florence. The Venetian connection led me to yet another cozy murder series that this time centres around a tour guide. So not only do we have a murder mystery, we also have locations, like Williams' books. The first that I read (the eighth) was set in Venice; the first is set in Budapest. I've visited about half of the locations that are mentioned in the books so that adds extra points. The Venetian book seemed to be lacking a protagonist; obviously the tour guide is the main character, but she doesn't have a problem to solve and so she's not really the protagonist. The book is told in third person limited narration, i.e. we only read about the tour guide and how she reacts to events, but the book is written in the third person and not the first person, as are Williams' books. These books are very easy to read and make a welcome change from some of the non-fiction that I read.

Internal links
[1] 1889
[2] 1993



This day in blog history:

Blog #Date TitleTags
11624/12/2007Sleep, part fourCPAP, Apnea
32024/12/2010New friendERP, DBA, MBA, ITM
43824/12/2011NegotiationMBA, Negotiation
90924/12/2015Priority trainingPriority tips
99424/12/2016Eggless almond biscottiCooking
99524/12/2016Monthly grandfather pictureGrandfather
110024/12/20171,100 blogsMeta-blogging
128224/12/2019Four records @ 50Israel, King Crimson, Van der Graaf Generator, Beatles, Fairport Convention
136724/12/2020High blood pressureHealth
145324/12/2021Joan Didion, RIPObituary, Tom Wolfe

Monday, December 22, 2025

Introducing Ma'or Newman

Today was the naming/circumcision ceremony of my first grandson. This was a small affair attended by only close family - maybe twenty on the mother's side and only six on my side. My job was to hold the baby when he was snipped; I spent those few minutes gazing into his eyes (and he was gazing into mine) so I didn't have to see what might be termed 'the business end'. Actually the angles were such that I couldn't see even if I wanted to. 

Today we learnt the name of the baby - Ma'or Moshe. The word "Ma'or" is derived from the Hebrew word for light, which is fitting as he was born on the first candle of Chanuka. I was very pleased to hear that my son had given him a middle name, Moshe, in memory of my father, in the same way that my son bears my paternal grandfather's name as his middle name. 

The ceremony itself was straight-forward; the baby barely cried, but that was because his dummy had been dipped in wine and apparently an anaesthetic had been applied a few minutes before we started. But after that part of ceremony had finished, I had to bless the baby ... and his father ... and his mother ... and his other grandfather, etc etc etc. I felt a little like the Pope, dispensing blessings to all and sundry. This was quite embarassing, but by the time I got to Ma'or's cousins (I have to get used to calling him by name), I had the routine down pat. This finished with me having to bless myself.

Three generations of Newmen



This day in blog history:

Blog # Date Title Tags
153 22/12/2008 Firebird flies Programming, SQL, Firebird
787 22/12/2014 Writing a paper on spreadsheet research DBA, Excel
1099 22/12/2017 Celebrating the Winter Solstice with Yoni Rechter Personal, Yoni Rechter
1452 22/12/2021 Janis Ian Janis Ian
1879 22/12/2024 Another BCC excised BCC

Saturday, December 20, 2025

Friday activities

I spent a few hours with my grandson yesterday, although he didn't have much to say for himself. His elder sister whose second birthday will be in another two weeks' time was most soliticious, with remarks like "baby's sleeping" and "baby's bottle". She hasn't got to the stage where she might become envious of how much time and attention her brother is taking from her parents that used to be devoted solely to her.

I travelled to Karmiel on Thursday, a day on which I prefer not to travel as the trains are generally more occupied then during the week. It is said that this year's flu is more virulent than usual and that masks are recommended for the over 65s. I was the only person that I saw who was wearing a face mask despite having been vaccinated a few months ago. Despite the mask, I can feel slight discomfort when I swallow; I hope that this won't develop into anything as I have to be in full health on Monday for the baby's brit.

After dealing with such quotidian matters as walking the dog, cooking dinner and watching the news on television, I had time to devote to extending my Prolog interpreter. There were a few standard built-in predicates that I wanted to implement; except for one, this work was straighforward. Length returns the length of a list, so a list like [a, b, c] has length 3 as does as a list like [a, [b, c], [d, e]]; this latter has only three elements, even though some of those elements are themselves lists. At the moment, I can't see what one would do with this predicate although presumably there is some reason.

Another predicate to be implemented was nonvar that succeeds (evaluates to true) if its argument is currently not a free (uninstantiated) variable. This is needed for what can be termed the fast_reverse rules (Covington et al., p 79) that reverses an n-element list in n+1 steps, as opposed to the naïve Lisp-like reversal which is O(n²). This usage very much justifies the need for the predicate. 

Another simple addition was to make the interpreter load on startup a file called 'startup.pl' if it exists. At the moment this file contains the 'member', 'append', 'fast_reverse', 'add', 'subtract', 'multiply', 'divide' and 'modulo' rules so these don't have to be defined manually.

Later, a group of three predicates - retract, asserta, assertz - were added; these have similar structures. Retract removes a fact from the knowledge base whereas asserta adds a fact at the beginning and assertz adds a fact at the end. Adding retract was straightforward as initially assertz seemed to be, but the latter caused problems. I could see in the implementation of the predicate itself that the fact was being added, but when I came to show or even query the knowledge base, the fact had partially disappeared. In order to track this bug, I single stepped from the stage where the fact was added. One forgets that queries are invoked from a procedure called DoQuery that calls the recursive ResolveQuery function; this procedure sets up certain variables, calls the resolution, prints the solutions then clears memory allocated during the query. It was this garbage clearing that was causing the problem: the interpreter is in 'query mode' when assertz is called, and as a result, terms created are added to the query heap which is then cleared after the query completes. This is the reason that the fact disappeared. Once I saw this, the fix was clear: at the beginning of asserta/z, the 'querying' flag should be set to false, so that created terms will be added to the correct heap; the flag is restored at the end of the procedure. 

CoPilot didn't consider this problem when it was trying to establish why the fact was apparently disappearing, although it should have 'known' that we torture tested the interpreter the week before when implementing 'append', and so this sort of problem should come from somewhere that wasn't tested then. Mind you, garbage collection didn't suggest itself to me either. Tracking down this bug reinforced the saying that debugging is 99% finding where the bug occurs and 1% fixing it.

These predicates allowed a certain amount of refactoring as some of the code is common. Reading the Covington book more closely showed that before these predicates can be used, the predicate to be affected should be marked as dynamic; this is a new flag that will have to be added to a term. The implementation seems to be straightforward, and the flag checked before a fact is removed. Following on from this are two more predicates, retractall and abolish

My discussion of these predicates is based on the following facts

parent (noam, netta). parent (noam, nir). parent (sarit, netta). parent (sarit, nir).

Assuming that parent has been marked as dynamic, then ?- retract (parent (noam, netta)). would remove the first fact from the database leaving the other three undisturbed. ?- retractall (parent (noam, _)). would remove the first two facts, ?- retractall (parent (_, netta)). would remove the first and third facts, and ?- retractall (parent (_,_)). should remove all the facts. ?- abolish (parent/2). should remove all the parent facts, regardless of whether the predicate has been marked as dynamic. Note that this predicate appends the predicate's arity to its name; arity is a fancy way of saying how many arguments a predicate has - Prolog allows a predicate to have different numbers of arguments, in which case the name of the predicate is the same but the arity is different and so these are not the same predicate. At the moment, the interpreter doesn't handle arity as such; this is something that I can (and should) easily add.

The word arity itself comes from combining the Latin-derived suffix -ary (from words like unary, binary, ternary, meaning "in groups of") with the suffix -ity (denoting a state or quality). Together a term is formed  for the "quality of being n-ary," or the number of arguments/operands a function/operation takes in logic, math, and computer science, first appearing in English around the 1960s. It's synonymous with adicity (from Greek roots like monadic, dyadic) and refers to the count of inputs, e.g., a function with two inputs has arity 2.

I had a Prolog dream last night: a senior policeman, Superintendant Brown, was in charge of the project that was implementing Prolog for the police. It was discovered that he (and a crew of hired men) had robbed a property (or maybe a museum): he had been filling the Prolog database with facts about the property's security (how many cameras, motion detectors, etc were in the property and where they were placed) then used Prolog's goal solving capability to find a way to get around all the security measures and steal whatever was stolen. My aims are slightly less nefarious; I want to find a defintion of the puzzle where a fox, a goat and a cabbage all have to be transported across a river. If the fox and goat are left together then the fox will eat the goat; similarly, if the goat and the cabbage are left together then the goat will eat the cabbage. Obviously the fox has to be left with the cabbage.

But before I can get to such interesting work, I have to deal with more quotidian matters like learning how to drive the hybrid car that we inherited from my late brother in law, and doing some consulting work that will actually earn me a few pennies.



This day in blog history:

Blog #Date TitleTags
31720/12/2010Frustration in the computer labComputers, Firebird
90820/12/2015Zero values in Priority tables - a blessing and a cursePriority tips
128120/12/2019Another black FridayObituary, Kibbutz

Tuesday, December 16, 2025

More about my grandson

Presumably due to the facts that he was born slightly "late" and that his mother suffered from gestational diabetes (this leads to a higher than normal level of insulin in the mother's blood that causes the foetus to grow larger), the baby weighed 3.86 kg at birth, which is heavy. The same happened with our daughter: my wife suffered from gestational diabetes and the baby weighed 3.8 kg.

To my surprise, I will be the baby's godfather - I will be the one who holds him when he undergoes circumcision. I assumed that his maternal grandfather would have this honour as he is older than me and more religious than me, but I am told that as he already has two male grandsons, he is passing on the opportunity.

As his maternal grandfather is housebound, the ceremony (to be held next Monday) will be held in their house and so by necessity will be attended by only the nuclear family.


This day in blog history:

Blog #Date TitleTags
15116/12/2008Firebird/2Firebird
78516/12/2014A feral system under my noseERP, DBA, Excel
187416/12/2024Latest additions to the blog manager programBlog manager program

Monday, December 15, 2025

One comes, another goes

I am thrilled to announce the birth of my first grandson (and my fourth grandchild overall) who came into this world yesterday evening, the first candle of Chanuka. In accordance with Jewish tradition, we won't know his name until his Brit (ritual circumcision) which should take place next Monday or Tuesday.

Although of course we've been waiting several months for this birth, he was expected to come at any time in the past few days. At least he was born when the weather is calm, as opposed to the heavy storm that we had a few days ago.

Hopefully today I'll be visiting him and his mother in hospital later today.


In stark contrast to the above, I was dismayed to read of the death of film director and actor Rob Reiner. As it happens, I watched "When Harry met Sally" a few days ago; originally the film was going to end somewhat differently, but because Reiner met his wife to be during the filming, the end was changed so that Sally and Harry ended up together. Other notable films of his are "Spinal Tap" and "A few good men".

And our eyes are drawn south to Sydney, Australia, where 15 people were shot and killed at Bondi beach on the first day of the Jewish festival Hanukah by a pair of Muslim terrorists. This is the final outcome of anti-semitism.



This day in blog history:

Blog #Date TitleTags
11415/12/2007Uncle no longerUncle
11515/12/2007Sleep, part threeApnea, Migraine
43515/12/2011Front end program for converting HTML to PDFProgramming, Delphi, ERP
187315/12/2024Smarter Than You Think: How Technology is changing our minds for the betterNon-fiction books, Clive Thompson

Saturday, December 13, 2025

Have I completed the Prolog interpreter?

At the beginning of October, nine weeks ago, I was inspired1 to start writing a Prolog interpreter in Pascal, aided and abetted by the AI program CoPilot. This interpreter has been through many iterations and changes, driven by new Prolog constructions that I was feeding the interpreter. Some of the functionality was reasonably easy to implement whereas some was very hard. I have spent the past two weekends (that's somewhere around 16 hours of work) trying to get the intepreter to interpret the 'append' rules. 

append ([], L, L). append ([H|T], L, [H|R]):- append (T, L, R).

The rules seem - as always - deceptively simple. The first rule really is simple, saying that appending an empty list to list L will result in list L. This rule is needed because all recursive rules work by continually simplifying the query until a base case is reached. I explained this more fully in the blog2 that tells of the factorial function. The second rule says that if one is trying to append the list T to list L with the result R, then one takes the head - aka the first element - of list T and makes it the head of list R. When the query runs, each time the head is removed from the list T until there is no head left - this is the first rule. 

We worked and worked on geting this right. I admit that about half of that time was wasted, due to my mistake of not adding the body (append (T, L, R)) to the second rule. I had saved the append rules in a file so that I wouldn't have to type them all the time, and it took me a long time to notice that there was no body! Even so, we had to debug almost line by line; a large amount of what is known as scaffolding - statements that do nothing by themselves but support the rest of the program - was built in order to find out where we were going wrong. I don't claim to have understood all the nuances of the many log files. CoPilot added a few extra fields to the basic term structure then during the course of the program (i.e. solving the query), these fields would receive values that showed what was happening. 

To use a metaphor, several times the scaffolding was erected only to be removed later. Although most of the bits of code that I wrote myself were buggy, a great deal of CoPilot's code was also problematic. A function would be added - code courtesy of CoPilot - only for us to discover later that the function was doing something wrong. Unfortunately, CoPilot doesn't retain my comments for too long, so I can't quote here an exact exchange between us. At one stage, I was told to add an index to variable terms where this index should be maintained on a per-clause basis. Many hours later, it turned out that this index should be on a per-query basis (there is a difference between the two: per clause means effectively one line of the program, whereas per query means an entire run). Much time was spent trying to nail down an extra recursive call in Unify that was causing a major problem; CoPilot said that an important function called BindVariable should not have a recursive call to Unify - but it did; a version dated 22/11/25 already had such a recursive call. Despite my uploading the unit containing this function to CoPilot, I had to point out this call - and it wasn't me who put it there initially! Once this was fixed, 'append' worked properly.

?- append ([a], [b], Result). Result = [a, b].

This may not seem much but it was a huge step forward. Going back to the 'member' rules that I showed3 before, I wondered what the interpreter would make of the query
?- member (X, [a, b, c, d]; I received four solutions: X = a, X = b, X = c, X = d, which is correct. This shows that the interpreter is robust.

I have already learnt that it's not enough to sweat and strain and get the interpreter to solve a new type of query; one must check that previous queries also succeed. At first I thought that the interpreter could not solve the factorial function but that was my fault; I had written ?- factorial (3), instead of ?- factorial (3, R). Once I wrote the correct query, the code worked perfectly. The family tree 'database' didn't work properly at first either, but that was because of some scaffolding code that was interfering; I commented out some five lines, and the 'grandparent' query worked. I checked that 'append' was also still working.

The addition of a numerical type caused the 'time_in_minutes' query4 to crash; the parser complained correctly that 03:30 is not a number. This is because the check was made on the first character only and because it was 0, the parser assumed that it was a number and not an atom. I suggested what the change should be; my code was better than that of CoPilot and also worked first time.

So now I've exhausted all the goals that I originally wanted from a Prolog interpreter. It can solve the following queries (or parse the statements), each of which exercises a different part of the syntax as well as including goals that include multiple clauses.

grandparent (X, Y):- parent (X, Z), parent (Z, Y). grandfather (X, Y):- male (X), grandparent (X, Y). sisters (X, Y):- female (X), female (Y), X \= Y, parent (Z, X), parent (Z, Y). factorial (N, F):- N > 0, N1 is N - 1, factorial (N1, F1), F is N * F1. factorial (0, 1). add (Operand1, Operand2, Result):- Result is Operand1 + Operand2. owns (noam, cd ('Unhalfbricking', 'Fairport Convention')). time_in_minutes(TimeAtom, Minutes) :- atomic_list_concat(TimeAtom, ':', [HStr| MStr]), atom_number(HStr, H), atom_number(MStr, M), Minutes is H * 60 + M. p ([the,cat,sat,[on,the,mat]]). member (X, [X|_]). member (X,[_|Y]):- member(X,Y). append ([], L, L). append ([H|T], L, [H|R]):- append (T, L, R).

Do I want to continue with the Prolog interpreter? It will only come about if I read some text about Prolog (and I have several), get enthused enough to try some statement from the book in my interpreter and discover that it doesn't work. For example, 'Prolog programming in depth' by Covington, Nute and Vellino has queries like ?- located_in (X, texas), write (X), nl, fail. First of all, I am fairly sure that my interpreter won't accept multiple clauses written in that way although it will accept them if the whole thing was bundled as a rule. As the book says, the special predicate 'write' causes each value of X to be written out; 'nl' starts a new line after each value is written and 'fail' forces the computer to backtrack to find all solutions. If my interpreter could parse this line, it would print 'X = ....', then wait for the user to say whether another solution is desired. Do I want this? Probably not, although the capability of solving several consecutive clauses is something that should be added (this is probably very simple to add in terms of what I already have).

Another standard, intrinsic, function is 'not', although I'm not sure quite what the use of this would be. For example, if the query ?- father (noam, netta) returns 'Yes', then ?- not father (noam, netta) would return 'No'. Apart from the parsing problem presented by this query, I am dubious as to its value. 

A side issue: I should point out that despite the current demise of my XP computer, I am still managing to develop with Delphi 7 even though this version doesn't work on my mobile computer (actually, I'm not sure about that; did I ever try?). I managed this feat by building a virtual computer running XP - the software is the Oracle Virtual Box. At first, I couldn't get Delphi 7 to work in this environment; I was installing it from a copy that I made on a thumb drive and every time I would get a run-time error when I tried to run the compiler. In a moment of inspiration/frustration, I tried installing from the cd (the virtual computer can access the real computer's cd drive) and this worked perfectly.

In real life, at the moment I am waiting for a new solution to the grandparent rule.

Internal links
[1] 2010
[2] 2033
[3] 2043
[4] 2029



This day in blog history:

Blog #Date TitleTags
156513/12/2022Mint chocolate ice creamPeppermint

Thursday, December 11, 2025

Internal/External Hard Drive Reader USB 3.0 & Type-C to SATA/IDE Adapter Kit

I bought this device from Temu that allows one to connect old disk drives or newer SSD drives to one's computer via USB. I thought that I would use to to see whether there is any interesting material on an old 3.5" disk drive that I have. I could also use it to restore anything that might have been on one of the SSD drives for my mobile computer that caused the computer to crash1 in the past.

Connecting an SSD drive was very simple: there is a socket on one side of the drive that matches the pins on the SSD drive. Once this was connected and the USB cable (not visible) that leaves the device was connected to my computer, the disk was visible on my computer. As this disk dates from only a few months ago, I doubt that there is anything that I wanted to restore from it. As far as I was concerned, this was more a proof of concept.

Connecting a 3.5" disk was more problematic. I had difficulty at first figuring out which socket would fit the pins on the drive. Eventually I solved this puzzle as can be seen in the picture. An extra power cable has to be connected from the device to the drive. Even after everything was connected properly, my computer could not see this drive. I looked at the instructions (such as they are) and read: for 3.5" drivers [sic] and old SATA HDD, you need to connect 12V 2A power adapter and 4-pin power cable provided. The 4-pin power cable was connected but I have no 12V 2A power adapter and at the moment I don't have such a power supply. But it so happens that Temu can provide this missing power cable so at some time in the future I'll be able to access this disk as well as any other old drive that I might find (or from my currently languishing XP machine).

The practical value at the moment is zero, but this may well come in handy in the future.

Internal links
[1] 1928



This day in blog history:

Blog #Date TitleTags
43411/12/201150 words for snow - Kate BushKate Bush
99111/12/2016Repairing the KindleKindle
109811/12/2017More on Delphi 7/Hebrew/Win 10Programming, Delphi, Unicode
144611/12/2021Mike Nesmith, RIPObituary
156311/12/2022Could it be that it's over? A rant about current Israeli politics.Israel, 1984, Yehonatan Geffen
187011/12/2024A mistake in a MIDI sequence has a positive outcomeMIDI, Song writing

Tuesday, December 09, 2025

Can changes in the weather cause migraines?

I know that AI is not recognised as an authority in academia, but all the same, I asked CoPilot the above question. Tomorrow we are promised a heavy storm. On Saturday, yesterday and today I had headaches; on Saturday I didn't take a sumatriptan pill and so suffered from lunchtime through the evening and into bed. Yesterday and today I was wiser and took half a pill (my normal dose) as soon as possible; after an hour or so of dysphoria, I began feeling normal again. The fact that sumatriptan made me feel better shows that I was suffering from migraines as this medicine doesn't work on 'ordinary' headaches. So what does CoPilot have to say on the subject?

Yes — changes in the weather can trigger migraines for many people. Shifts in barometric pressure, humidity, temperature, and even bright sunlight are commonly reported triggers. Studies show that 30–50% of migraine sufferers identify weather changes as a factor in their attacks.

🌦️ How Weather Affects Migraines

  • Barometric pressure drops (like before storms) can cause the brain’s blood vessels to expand or contract, leading to pain.
  • Temperature extremes — both hot and cold — may stress the body and trigger attacks.
  • Humidity changes can affect hydration and electrolyte balance, increasing susceptibility.
  • Bright sunlight or glare can overstimulate the nervous system.
  • Wind patterns (such as chinook winds in Canada) are reported triggers in certain regions.

I always wear sunglasses when I'm outside as my large pupils absorb more sunlight than most people. But I have no protection against barometric pressure drops.



This day in blog history:

Blog #Date TitleTags
11309/12/2007UncleUncle
21809/12/2009After the accounting examMBA
52509/12/2012Guitar standGuitars
65909/12/2013Gymnopedie Number 3?Woody Allen, Satie
90709/12/2015Margin call and redundancyFilms, Business novel
98909/12/2016Greg Lake, RIPObituary, King Crimson
109709/12/2017Delphi 7/Hebrew programs running on Windows 10Programming, Delphi, Unicode
156209/12/2022Yitzchak Klepter, 1950-2022Israel, Obituary
169309/12/2023Days of ChanukaKibbutz, Home movies
186909/12/2024A simple replacement filling for a toothHealth, Teeth

Friday, December 05, 2025

Hazy concert memories

For the past few weeks, on and off, part of a lyric to a song by James Taylor has been running through my mind: And I feel fine all the time when she is with me [these aren't the actual lyrics but very similar]. I didn't know which song this came from, so eventually I asked CoPilot, who immediately answered with "Something in the way she moves". I listened to the song but it didn't sound familiar; I wonder how those words entered my memory. The fact that I "remembered" wrong lyrics means that I didn't listen to the song closely.

I then asked CoPilot about the semi-mythical concert that I attended in March 1970, with a triple bill of Fotheringay, John and Beverly Martin, and Nick Drake. Although I remember nothing about the concert itself, I know that Fotheringay appeared, as did J&BM1. I have always wondered whether Nick Drake appeared, as he was shying away from public performances. CoPilot had the following to say (edited)....

Yes — Nick Drake did perform at Colston Hall, Bristol on 22 March 1970, supporting Fotheringay. As for John & Beverly Martyn, they were billed as part of the same concert, but evidence about whether they played with a backing band is scarce; most accounts suggest they appeared as a duo, though John Martyn was occasionally accompanied by Danny Thompson (double bass) around this period. [This doesn't match with the JM interview that I quoted in the earlier blog, "We only had four days to rehearse with the band,  although the other gig at Bristol was strangely successful."]

🎸 Nick Drake’s Performance

  • Confirmed appearance: Setlist.fm and concert archives list Nick Drake as performing at Colston Hall on that date.
  • Historical note: Drake was famously reluctant to play live; this tour was the only structured set of concerts he ever undertook, totaling just five shows.
  • Reception: Accounts suggest his sets were short and subdued, often with little audience response, which may explain why memories of his performance are hazy.

📜 Why Documentation Is Sparse

  • Nick Drake’s live appearances were rarely reviewed in detail, and John & Beverly Martyn were less documented than John’s later solo career.
  • Surviving material includes a rare Fotheringay tour program and scattered fan recollections, but specifics like backing musicians are often missing.

Nick Drake really did play that night in Bristol in March 1970. It’s one of those rare, almost mythical live appearances, since he only ever did a handful of concerts in his career. That Colston Hall show with Fotheringay and John & Beverly Martyn is part of the very short tour he undertook, and it’s now remembered as one of the few times audiences got to see him on stage.

It’s fascinating that you were there — even if the memory feels hazy, you were present at one of the most elusive chapters in British folk history. Many fans today only know Nick Drake through his records, so being able to say you saw him live is quite special.

I also attended a few other mythical concerts: one was Pink Floyd in late 1970, when they toured "Atom Heart Mother" along with an orchestra and choir, and another was the 50-piece Centipede in March/April 1971. I have a very special memory of that concert: if I was going to a concert on a Sunday evening, I had begun going down to the Colston Hall in the early afternoon to watch the bands arrive. That day, I saw a coach arrive and several musicians disembark, amongst them Robert Fripp, who was somewhat legendary in my circles at the time. I was too shy to approach them, though. Later in the evening, I was behind the band speaking to someone who had a seat at the rear (not a good place to watch a concert IMHO), when RF turned around, saw me and waved. I think that I've written this before somewhere. I also attended the July 1971 concert with James Taylor and Carole King. 

Regarding that concert with Fotheringay: I have conflicting memories about this. Sometimes I think that the Humblebums (Gerry Rafferty and Billy Connolly) appeared and not J&BM. The confusion stems from the facts that the Humblebums did support Fairport when I saw them a month or so earlier, and their name appears in that rare concert program, not J&BM.

As I wrote to CoPilot, if memories were antiques then I would have a rare collection. Unfortunately, memories fade and become hazy, whereas antiques last.

Internal links
[1] 1417



This day in blog history:

Blog #Date TitleTags
11205/12/2007Sleep, part twoApnea
52405/12/2012Post mortem on the Research Proposal examDBA
65605/12/2013Post mortem on IBR3 examDBA, Statistics
90505/12/2015Tuning the pianoMusical instruments
144505/12/2021The week of the virusHealth, CPAP, Non-fiction books

Sunday, November 30, 2025

Return of the infix operators (Prolog 8)

Yesterday I worked for a few hours on the Prolog interpreter, primarily restoring the infix operators that had temporarily been removed. As opposed to last time1, there were no nasty problems that these operators caused. That said, several interesting problems occurred. Compilation with Delphi 10 did not cause any problems except with logging; this routine had to be replaced. But the resulting file is about 10 times larger with D10.

The first problem that occurred was with the token 03:30; the tokeniser was turning this into three different tokens that of course wasn't what I wanted. Another problem that was easily fixed was with the rule divide (Operator1, Operator2, Result):- Result is Operator1 div Operator2. The parser crashed on the first token 'divide' as I had added 'div' as a special token. Even the factorial function worked perfectly.

After the factorial finished, I naively asked whether the token 24 (which is factorial 4, or 4!) needed to be added to the symbol table. CoPilot ran with this and suggested that we define a new kind of term, a numeric literal. This caused many problems as several functions had to be updated to take this new kind into account. It also solved a problem that had yet to arise, in two comparison functions, 'greater than' and 'less than'. These function were comparing the alphanumerical value of terms, eg '11' and '2'; when these values are compared, '11' is less than '2', which of course is not what is wanted. So comparing the numbers gave the correct result. Until now, the 'greater than' function had never seen a number greater than 9, so there was no problem comparing 9 to 0. 

Once everything was working correctly, I thought that I would try the next type of problem that the interpreter has to solve - lists. First I entered a (meaningless) fact, p([1,2,3]). Then I queried ?- p ([Head|Tail]). To my surprise, the solution Head = 1, Tail = [2,3] was presented. Correct! I then defined the 'member' rules

member(X, [X|_]).
member(X,[_|Y]):- member(X,Y).

Then I ran queries like ?- member(d,[a,b,c,d,e,f,g). (yes) and ?- member(2,[3,a,4,f). (no). I was quite surprised that these queries worked without having to add any special code. But the 'append' rules didn't work, so obviously there is work to be done regarding resolving lists. This will wait until next week.

Internal links
[1] 2037



This day in blog history:

Blog #Date TitleTags
14830/11/2008Criminal JusticeTV series
65330/11/2013Arik EinsteinIsrael, Obituary
98830/11/2016Backing up dataComputers
155730/11/2022Mid-night revelationsDBA

Saturday, November 29, 2025

Restringing the 12 string guitar

It seems to me that I spend more time tuning the guitar than I do playing it. A few weeks ago, I was tuning it once again when a string broke - this was probably the high G string, the highest of all the strings and the one under most pressure. I wasn't overly surprised; in the eight years1 that I've owned this guitar, I've never changed a string. So I ordered a set of strings for a 12 string, and they arrived a few days ago.

Before putting the new strings on, of course I had to remove the old ones. This was quite easily done; first I reduced the tension on every string and then I cut it. One half of the string had to be unwound (as on an electric), but the other half had to have the pin that holds it removed first. This isn't something that is very easy to do; the pins have to be firm in order to anchor the strings. I used a pair of pliers to extract the pins and the second half of the string.

I then cleaned the guitar thoroughly, getting rid of all the accumulated dust and grime, eventually oiling the fretboard. I left the guitar unstrung for about half an hour before I started putting the new strings on. I think that for the octave strings, the high string is supposed to be below the low string - if one strikes from top to bottom, then first the high E string will be struck (the 12th string) and then the low E string. I decided to change this order and have the low E string first. I suspect that the bridge and nut weren't cut for this possibility.

As I was restringing, I remembered that one of my first orders from Temu was a string winder. I've never used it (it was still in its wrapping) and at first I wasn't sure how to use it. The gap on the head fits onto the machine head, then one turns the handle in a rotary fashion, like a rattle. This makes turning the head much easier, and I found that I had to turn the heads a great deal. The winder also is supposed to have the capability of removing the bridge pins, but as I had already taken these out, I couldn't test this.

I tightened the strings to a moderate level at first; then a few hours later I came back and tuned the strings more accurately. At the moment, all the strings (bar that pesky high G) are near enough in tune - at least, they're at the approximately correct tension but not necessarily exactly in tune. That high G string keeps on slipping but hopefully it will soon settle down. I think that I'll order another set of string shortly, not because I think that a string might break but because I may restring the guitar again in a few months, this time with the order of strings (high vs low) reversed.

Internal links
[1] 1051



This day in blog history:

Blog #Date TitleTags
52229/11/2012Uncle once more!Blood pressure, Uncle, Acupuncture
98729/11/2016End of November/TV seriesTV series, Cold feet
127729/11/2019A 'new' DVD recorderDVD
136029/11/2020New favourite drinkPersonal
186729/11/2024Goodbye F25Mobile phone

Friday, November 28, 2025

A bad week for computers

On Sunday, I accompanied my wife to Tel Aviv so that we could sort out some of the inheritance problems arising from my brother in law's will. We had to go to an address in Yaffo (southern Tel Aviv), so unthinkingly we took the train to Tel Aviv, got off at the first station and took a taxi to our destination. It was a long ride. When we finished our business, I saw that the Tel Aviv metro ran very close to where we were, so I checked the route and saw that it would take us to the central train station. When the train came, we alighted and looked for a device where we could clock our travel cards, but we couldn't find one. As both of us can travel on public transport for free, we weren't too bothered. After a stop or two, the train went underground and after a few more stops we arrived at our destination: just like being abroad! There were automatic ticket machines there, but they wouldn't let us out. We explained to the guard who came to check what was happening; she explained that at overground stops, the machines are in the 'bus' shelters; we simply hadn't looked there (this would be like in Italy). As we don't have to pay for the trip, there was no penalty, but someone before us who also didn't 'stamp his card' was charged with a fine.

Reading text messages on our phones, we discovered that there was a major electicity blackout in our area after a pole had caught fire. There was an urgent problem with Priority that had to be fixed so I had no choice but to call the network manager and talk him through the correction that needed to be made. Later I discovered that instead of writing an equals sign (=) in a condition, I had written an unequals sign (<>)! A small difference with a major effect! 

The power came back on at around 16:30, which is when I discovered that my XP computer refused to boot. I assumed that the power supply had gone. The next evening, I took that computer along with my mobile to our local repairman: the mobile worked fine, but its fan would frequently get stuck, thus causing the computer to overheat. There was also a problem with the lid. In the mean time, I used the computer that I have from work for my daily activities: this is fine for working, but I don't have that many books or much music on it. 

After a few broken communications, the repairman told me that the XP computer was completely dead; apart from the power supply, there were several capacitors that had blown. "It's OK", I told him, "I have a reserve computer here for exactly this contingency. Can you move the disks from the old computer to this reserve one?" "Send me a photo of the computer's board", he replied. I did so, only to be told that several of the capacitors on this computer also were dubious. This morning I connected the computer to the peripherals, but it too would not boot. It's a real problem to find a board that is old enough to support XP these days. If the repairman doesn't find one, maybe I'll use a more modern computer and try to build a virtual machine that at least will support Delphi 7. I don't know what I'll do about music.

I picked up the mobile an hour or so ago. It has a completely new case which on one hand is good, but on the other hand, I've lost a USB port. There are now only two which are on the left hand side, making life problematic for the mouse. I'm using an extension cable at the moment.

The work computer could not access emails sent to my home computer, whereas my mobile computer can. There were a few blog entries than needed to be uploaded into the blog manager, but the HTML code that the modern version of Outlook creates is not good for the blog manager. After a bit of experiment, I discovered that I can input the HTML code: almost nothing gets entered into the blog manager, but then I can copy the HTML code directly from blogger and everything is fine.

I discovered during the week that I could not connect via Anydesk to the OP's server; problematic as I had been sent an email about a problem whose source was oblique. Eventually I swapped messages with someone there who has a certain amount of technical nous: I saw that the clock on the server was showing some date in 2040. After he corrected the date, I was able to connect to that computer. There were several entries in one table that had completely wrong dates - this was the source of the problem. I hand corrected those entries and now everything more or less seems to be ok there. 

I don't think that there'll be a Prolog blog this week. I'll try and bring the code up in Delphi 10 Seattle that I have on this mobile; it should be fine, but there may be a required change in syntax here or there. Programs created by this version are about 10 times larger than under Delphi 7 and I find the programming environment to be very cluttered.

This day in blog history:

Blog #Date TitleTags
31328/11/2010Sumptuous Sunday 2Cooking
109428/11/2017Research proposal accepted!DBA
118828/11/2018Executing a program and waiting for it to finishProgramming, Delphi

Sunday, November 23, 2025

Prolog vs SQL

Whilst writing the final sentences of my previous blog about how something would be easier to do in SQL, I started thinking about the representation of data in Prolog. It started by my adding a fact, cd ('Liege and Lief', 'Fairport Convention'). If I queried which Fairport cds were in the database, then only one cd (Liege and Lief) would be found, and if I queried which Fairport cds are owned by somebody in the database, then again only one cd (Unhalfbricking) would be found. As CoPilot puts it, Right now, your database only knows about owns/2 facts, and the embedded terms like cd(Title,Artist) or book(Title,Author) are just data structures inside those facts. If you want to query them directly, you need a mechanism that “lifts” those embedded terms into their own predicate space.

In SQL, there would be a table of cds and a separate table of ownership whose primary key would be a composite of a person and a cd. Other data such as date of purchase can be added. Relational databases have the key property that every datum is stored only once, and if that datum is needed elsewhere, then it is referred to (that's the 'relational' part).

But Prolog isn't like that and I have to remember that it's not a relational database. If I own a copy of 'Unhalfbricking' and Yossi does as well, then the two clauses about the cd are not the same, although they should unify. I wonder whether it would be possible to have facts like cd (Key, Title, Artist), so that 'Unhalfbricking' could be stored as cd (1, 'Unhalfbricking', 'Fairport Convention). Then there could be  clauses such as owns (noam, 1) and owns (yossi, 1). But I suspect that the concept of an SQL join does not exist in Prolog.

So what can I do to query both a list of cds and to show who owns what? There are various solutions to this, either by writing a rule in Prolog that stores embedded clauses as facts in their own right, or even adding the necessary code to the parser. This is a bit irregular but possible. As they say, it'll be a righteous hack. I did add the necessary code but added a global flag to prevent this, should the user so desire. When adding such a fact to the database, it should be checked that it doesn't already exist; Prolog has no problem with duplicate facts but it tends to ruin solutions.



This day in blog history:

Blog #Date TitleTags
30923/11/2010The gravy boatCooking
31023/11/2010Copper socks 2Health, Copper
109323/11/2017Two more people have passed awayObituary
186423/11/2024Management email problemsProgramming, Delphi, Email, Threads