Hyperpolyglot: Lisp
hyperpolyglot.org
hyperpolyglot.org
- "command line program" is empty, but should contain
sbcl --eval '(+ 1 1)'
- "identifier" says "case insensitive, cannot start with digit", but identifiers can start with digits just fine. 1+ is a built-in function that proves it. It just can't look like a number.- "identifier" also says some characters are "reserved for user macros", but that's not actually a thing. ?![]{} is a valid identifier, you just shouldn't use it.
There's probably much more. There are also plenty of things that are inaccurate, but would need more explanation than there is room for.
|this-will-be-read-with-case-preserved|But one can for example configure the READER in Common Lisp to use different modes - for example fully case preserving. The built-in CL symbols will stay in uppercase - because that's how they are defined.
CL-USER 32 > (setf (readtable-case *readtable*) :preserve)
:PRESERVE
CL-USER 33 > (DEFUN This-Is-A-Symbol (VarIable)
(SIN VarIable))
This-Is-A-Symbol
CL-USER 34 > (This-Is-A-Symbol 7.4)
0.89870817
CL-USER 35 > (THIS-IS-A-SYMBOL 7.4)
Error: Undefined operator THIS-IS-A-SYMBOL in form (THIS-IS-A-SYMBOL 7.4).
As you can see, we can then program with case preserved syntax and use the uppercase built-in symbols like DEFUN or SIN. CL-USER 26 > (defun ?![]{} (123456789?![]{})
(+ 123456789?![]{} #xd))
?![]{}
CL-USER 27 > (?![]{} #x1d)
42Towards understanding, I recommend reading SICP and "On Lisp"
What's with the shebangs? They all have more than 1 argument. Where would that work? Not Linux. I think FreeBSD used to have support for that, but removed it to follow convention. Seems like stuff wasn't tested before publishing.
[0] https://www.in-ulm.de/~mascheck/various/shebang/ (See table near bottom)
This page seems not to have been updated in years. The newest SBCL version is 1.4.10; version 1.2.0 was released in 2014.