In the morning I spritzed some more stain remover on the carpet. It will pass. My guests probably won’t be in the room very long anyway.
Speaking of the guests, I texted Joanne about 10 to check in. They’ll arrive sometime around noon. I told them not to stress about making it here in time to eat in the dining room; we can have lunch anywhere outside.
Then I left for the museum to lead a tour. Afterward I chilled in the room for a couple of hours before going out to Suzanne and Chuck’s place, where they hosted a recital by one of Chuck’s piano students. Hanna is just out of high school and will be going to UC Berkeley to study computer science this fall. She performed pieces by Chopin, Liszt, and the first movement of a Brahms concerto for piano and orchestra. Chuck played the orchestral part on a second piano (they have three grand pianos in their music room) and Hanna played the solo parts. It was rather awesome to hear these very complex pieces played with power and accuracy by a slip of a girl, but she did it.
I noshed on cheese and crackers afterward while talking with Suzanne and with Hanna’s parents. That was almost enough food so it didn’t matter that I wasn’t back in time for supper here. I had a PBJ in my room.
While watching some old Naked and Afraids with one eye, I spent a little time on Lisp. Strange language. Old, as I’ve said, and it kind of has the same relation to computer science that Latin had to the Catholic Church. And the 1989 standard for Common Lisp was presumably thought through and argued out by big brains. So, how did they manage to leave blatant inconsistencies in the design?
Case in point, the whole damn language revolves around lists; the list is a basic data type and there’s a bunch of operators for manipulating lists. Dandy. But there is a set of related standard functions, floor, truncate, ceiling etc., all of which can return two values. For example, (floor 25 4) evaluates to two numbers, 6 and 1, respectively the quotient and remainder of dividing 25 by 4. This is very useful. The comparable function in Python is called divmod, and divmod(25, 4) returns a tuple, (6, 1), a tuple being a standard data type in Python.
Does the Lisp function (floor 25 4) return a list of two items, (25 4)? It bloody well does not! At this point all I know is the documentation says it returns the “multiple values” of 25 and 4. You can’t access the second of the values (the remainder) in any normal way. The only way to get at it — and of course finding this out involved an internet search leading to an answer on Stack Overflow; it was of course not to be found in the index of any damn tutorial — is to use the multiple-value-bind function. This special function has the magic to trap the multiple values returned by floor and related functions and assign them to names you supply. So this old well-thought-out language, used in much AI and other cutting-edge research, ignores its own basic data types and has a magic special extension to handle the special magic values returned by several fundamental arithmetic functions. Great.