Day 257, drawers, lisp

Friday, 8/16/2019

Started again with an early run. Then I went out in the car to the hardware store. I wanted supplies for two projects.

The first is cleaning my carpet. I had a little coffee disaster Thursday morning: set a fresh cup down without looking, and it caught the edge of the table and tilted onto the floor. I wiped and sponged it up with many paper towels but it left a pale brown mark in the carpet.

This is not a major issue because I move out in two weeks, and when I come back in January, the floor in the living room will be wood-grain vinyl laminate, not carpet (and the carpet in the bedroom will be new). It’s a minor issue because I’ve got visitors coming Sunday and would like to not be embarrassed by a coffee stain on my carpet.

Thursday is cleaning day and Wanda, my housekeeper, worked on it and improved it some. But today I wanted to get some stain-removing carpet product and do some more cleaning. The reason I took the car is that I didn’t think the hardware store would have that, and wanted the option of going on to another store. In fact they had a spray that promises to remove “…coffee…” and many other stains. On return I applied it and it had some effect. I’ll do some more tomorrow.

The other project is the drawer project. I bought some 220 sandpaper, a couple of cheap sponge brushes, and a can of clear satin finish Varathane. I took two drawers, one shallow and one deep, down to the residents’ workshop. I dug around and found a nice little orbital sander and it took half an hour to sand the insides of the two drawers and vacuum up the sawdust neatly. Then I applied one coat of Varathane to the insides. This was the first time I’ve used the type of disposable brush that is basically a gray sponge on a stick. It works pretty well. It holds and releases paint differently from a hair brush but it did the job.

Later in the day I went back and brought the two drawers up. The varnish is hard to the touch but a little soft to a fingernail, so I don’t dare put anything in the drawer until it has dried further. But they look better and smell better than before for sure.

In the afternoon I spent two hours working through a couple of chapters of the Lisp tutorial. The basics of Lisp are radically simple; it is famous for having brutally simple syntax. But there are many subtle surprises and the tutorial I’m using (as I said, the least bad of the ones I’ve sampled) does nothing to help the beginner. It’s quite annoying, to a person who has written tutorials, to be the victim of these pedagogical oversights. They’ll drop in some item that they haven’t defined and don’t explain, and I’m saying, “Wait, what? Where did that come from?” and then I go and google around and check the couple of other references I have open in browser tabs, and work out what is going on. And say, “Why did you drop that on me now, and why didn’t you explain it when you did?” OK, example. Lisp syntax is simple and regular. Everything is expressed as open-paren, function, arguments, close-paren. Add: (+ 3 5) evaluates to 8. Compare: (> 9 1) evaluates to T. Divide: (/ 5.5 2) evaluates to 2.75.  There is no expression syntax like in other languages — I thought. Then I meet this in the section on comparisons, where they tell me to try

(= 3/1 6/2)

Wait, what? What the hell is that? Lisp doesn’t do expressions with infix operators! It took me 45 minutes of searching different sources to work out that an “atom” of the form two integers with a slash (no spaces) is a special class of number called a “ratio”. It makes excellent sense once you understand it; it allows Lisp to retain values like 10/3 with full accuracy, where in other languages it would be evaluated to a floating point 3.33333… with the inevitable loss of accuracy that entails.

But the tutorial just started using these ratio numbers without introducing them, with no discussion or explanation. They had talked about “basic data types” early on and never even hinted there was anything beyond numbers, strings, and lists of those. Just terrible pedagogy.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s