dao of lisp
TRANSCRIPT
The Artificial Intelligence people were endeavouring to write programs that no one knew how to write. The idea that you could sit down and say: 'Well, here is my problem, here are the requirements, let me come up with a specification and now code that up' (was) completely crazy as far as the AI people were concerned' The only way to write AI programs, then (as it still is now) was by taking an exploratory approach to development. The only way to do it was to experiment. 'Let me try this, let me add that. Let me try to add this fuzzy concept, let me try to add a scheduler, let me add agendas, let me add resources, let me have resource-limitations' ... you're not constructing it like making a ton of source code and compiling it periodically, you're constructing it the way you construct a city: build some of it, it's running all the time, so it's kind of like a live programming language.
— R. Gabriel
Two schools of thinking
System paradigmLanguage paradigm
infoq.com/presentations/Mixin-based-Inheritance realworldclojure.com/the-system-paradigm
The system paradigm
1. Nibble at the problem from different directions
2. Compose partial solutions into the final solution
“Composition is about decomposing.”
— E. Normand
Live programming with the REPL
code = datahomoiconicity:
code
code
data
“This is possibly Clojure’s most important property: the syntax expresses the code’s semantic layers. An experienced reader of Clojure can skip over most of the code and have a lossless understanding of its high-level intent.”
— Z. Tellman, Elements of Clojure
code
data =AST
Macrosdata = code
Macroexpand time
run timevs.
Problem languagemacroexpand-1macroexpand-2
macroexpand-n...
implementation language
Simple first, then Easy
It is better to have 100 functions operate on one data structure than 10 functions on 10 data structures.
— A. Perils
You can write lisp in any language
norvig.com/spell-correct.html
The next 70 years
linkedin.com/pulse/how-write-your-first-quantum-program-view-supply-christoph