Wikipedia:Reference desk/Archives/Computing/2016 August 10

= August 10 =

Succinct LISP implementation?
Is it true that LISP can be implemented or defined in two pages? If yes, where can I find these two pages?Hofhof (talk) 00:08, 10 August 2016 (UTC)
 * You can implement a tiny dialect with enough features to write nontrivial programs: here's one in a couple of pages of Python. You can't implement or define a standard dialect (Common Lisp or Scheme) in that space, except with very tiny type or maybe with a meta-circular evaluator that delegates most functionality to another implementation. -- BenRG (talk) 03:57, 10 August 2016 (UTC)


 * Little Schemer had a toy meta-circular evaluator. Actually, every lisp book discusses one, and this is what the "one or two pages" refers to. Lisp is very homoiconic, that is, a lisp program is just another sexp. A lisp evaluator just reads in lists, looks up atoms and applies functions (the car of the list) to arguments (the rest.) This doesn't mean a serious implementation, especially in something like C, can't be hundreds of thousands of lines of code. Whatsmore, due to stuff like reader macros where the program can actually re-program the reader itself, lisp is not context-free and only a full lisp implementation can parse arbitrary lisp. Asmrulz (talk) 05:24, 10 August 2016 (UTC)


 * Here is John McCarth's LISP translated into Common Lisp by Paul Grahm.172.56.34.174 (talk) 02:34, 15 August 2016 (UTC)