5 ms·
Lisp probably was invented in the age of the typewriter. If you look at mathematical notation, written with quill pens and paper…it’s even more concise. Functi
by hasmanean 5y ago
Lisp probably was invented in the age of the typewriter.
If you look at mathematical notation, written with quill pens and paper…it’s even more concise. Functions are like lisp, f(x). Vectors are laid out on the page in an array and surrounded by two strokes. Matrices are a 2d array surrounded by two straight lines.
This whole approach seems as archaic as Roman numerals is for representing numbers (they were based on lines and slashes like a tally system).
Maybe there is an even better notation for representing code which will be as much a leap forward as the positional number system (which represents every number as a power series with base 10) was to numbers.
- AnimalMuppet 5y agoRoman numerals were based on lines and slashes? I mean, for one, five, and ten, sure. Fifty? Maybe. Beyond that? Not so much.
- jazzyjackson 5y agoI have a wonderful book in front of me called “From One to Zero: a universal history of numbers” by georges ifrah. chapter 9, roman numerals: a vestige of primitive origins? starts like this: —————————— I V X L C D M They are obviously letters of the roman alphabet, but this does not mean they have an alphabetic origin. The signs L, C, D, and M are not the original forms of the numerals 50, 100, 500, and 1000; they are altered forms of much older numerals. known instances of the use of L, D, and M as numerals do not go back much farther the the first century AD […] ————————— The chapter goes on to illustrate the resemblence with etruscan numerals and the tally marks of ancient shepards counting sheep, see the “tally marks” section of the wikipedia page, or borrow the book from archive.org, page 131 to 146 or so. https://en.m.wikipedia.org/wiki/Etruscan_numerals#Tally%20Marks https://en.m.wikipedia.org/wiki/Etruscan_numerals#Tally%20Ma... https://archive.org/details/lish00geor https://archive.org/details/lish00geor
- kazinator 5y ago> If you look at mathematical notation, written with quill pens and paper…it’s even more concise. Yes, but now mathematics publishing predominantly uses a typewriter-era language for achieving it: \documentclass{article} \usepackage{amsmath} \begin{document} \[ M= \begin{bmatrix} 1 & 2 & 3 & 4 & 5 \\ 3 & 4 & 5 & 6 & 7 \end{bmatrix} \] \end{document} Most programming takes place with what is more or less typewriting.
- kazinator 5y agoNow imagine having that as: (documentclass article) (usepackage amsmath) (begin document) ;; [...] read syntax for displayed math [(= M (bmat (1 2 3 4 5) ;; case-sensitive treatment: M (3 4 5 6 7))] (end document)
- formerly_proven 5y agoShouldn't the structure of the expression tree correspond to the structure of the document macros? i.e. (begin document ...)
- kazinator 5y agoMaybe, maybe not. Lisp files can have top-level structure (relationship between top-level forms). Like defining a class here, function there. This is the topic of a StackOverflow question: https://stackoverflow.com/questions/25720046/why-is-a-lisp-file-not-a-list-of-statements https://stackoverflow.com/questions/25720046/why-is-a-lisp-f... One advantage would be that the stuff between (begin document) and (end document) consists of multiple forms which are separately read, expanded and processed, which can be quite important in some situations. Also there is the possibility that some form in the document could load another file. (begin document) (load "boilerplate") ...
- johan_felisaz 5y agoSeeing this really makes me want to do a LateX code generator in Lisp
- TeMPOraL 5y agoI disagree. I think a way to summarize this article is that the popular languages (Algol/C family) are like Roman numerals, and Lisp is like Arabic: it composes better. It's a powerful, qualitative difference.
- kazinator 5y agoJohn McCarthy, History of Lisp: The advantage [of the prefix notation for algebraic expressions in LISP] is like that of binary computers over decimal - but larger.
- agumonkey 5y agoIt's funny because I consider other languages like roman numerals, unhomogeneous bunch of constructs that don't work well with themselves, meanwhile lisp is an infinite tower. Now maybe there are better notations though. I'm all ears.
- anthk 5y agoLips dates back to Lambda calculus and the Church notation. Far from a typewriter.