4 Matching Annotations
  1. May 2020
    1. “Just think of ‘let’ as initiating a computational process, with forces defined by the lisp language and interacting via the lisp engine with the outside world. Then letting computers be like cars makes more sense. Do you recall that a lisp program is just a list?” Abu nodded, but interjected. “It’s really a list missing its outermost parentheses, right?” Til’s glint was piercing. “Ah, but there’s an implied pair of outermost parentheses!” Ila fairly stumbled over her tongue trying to blurt out. “And a ‘let nil’ form!” Now it was Abu’s turn to be puzzled. He said, “Wait, why nil?” Ila rushed on, “It just means that your program can be self-contained, with nil extra environment needed to run. Just let it go, let it run!”

      Extended reference to 'let', from lisp

    2. “Would you please explain ‘let’ more?” said Ila. She was getting past her reluctance to ask questions, and it felt great! “Think cars,” said Til. “A car has a body built on a frame, just like a let has a body built on a frame. But without an engine and a driver, a car just sits there taking up space. The lisp interpreter is like the engine, and you, the programmer, are the driver.”

      Reference to lisp

    3. ABO After some good practice constructing truth tables, the time is ripe for exercising some code in a truth-table generator context:

      ABO is all implemented in lisp

    4. ABJ Let it be. Let it go. Let it go so. Let it be so. Make it so. Let p be prime. In lisp, something like p is called a symbol, and you can treat a symbol essentially like a variable, although it is much more than that. Let something be something is a very mathy way of speaking. So lisp allows somethings to be other somethings by way of the keyword let. Like God, who said let there be light, and there was light, the programmer commands and is obeyed. The keyword let binds symbols to values, fairly commanding them to stand in for values. Values evaluate to themselves. Symbols evaluate to the values they are bound to. An unbound symbol cannot be evaluated. If you try it, an error results. Before doing some exercises, let’s look at let syntactically and abstractly: [copy] (let <frame> <body>) The <frame> piece is a model in the form of a list of bindings. Just as we modeled truth-value assignments as, e.g., p is true and q is false, in list-of-bindings form this would be ((p true) (q false)). A binding is a two-element list (<var> <val>). Variables can be left unbound, so for example, (let ((a 1) (b 2) c) ...) is perfectly acceptable. It assumes c will get a value later, in the <body>. The <body> is a list of forms to be evaluated — forms that use the bindings established in the frame model. The frame list can be empty, as in: [copy] (let () 1 2 3)

      This section references lisp extensively