Day 281, FOPAL, money

Monday, 9/9/2019

Went for a run first. Then to FOPAL where I found eight boxes of books for the computer section. It took just over two hours to do the culling and pricing. The monthly sale is this weekend so it was time to tidy up. I had an email asking section managers to do a pre-sale count. This makes good sense, to be able to report how many books sell from each section, but I’d not done it before.

After grabbing a bit of lunch at the grocery next door, I headed over to the financial advisors’ office. We worked out how much of the house money to keep as liquid reserve, and how to allocate the rest between the different brokers, and began the process of creating accounts and disbursing things.

Back home I spent some time on Lisp. I’ve finally gotten to the syntax for iteration and it is… well, the kindest thing is to say it is extremely general. To put it in my terms, a loop is encoded as

(do ( iterators ) ( test finals ) ( actions ) )

Doesn’t look so bad except that an iterator is a three-element list,

( var initial_value ( increment_expression ) )

and there may be more than one. test is a parenthesized expression which when it yields T (true) ends the loop, and finals is a series of parenthesized expressions to be executed at the end of the loop and determine the value of the loop. actions is the sequence of parenthesized expressions in the body of the loop. So, a simple loop to count 0..9, printing each one and returning NIL, comes to,

 (do ( (i 0 (+ i 1) ) )
     ( (> i 9) NIL)
     (format t "~A~%" i)
)

That’s the right number of parens, I just ran that and it runs.

 

Leave a comment