MyWiki:Reference desk/Archives/Computing/2016 August 10
From Wikipedia, the free encyclopedia
Jump to navigation
Jump to search
This template must be substituted. Replace {{Archive header with {{subst:Archive header.
{| width = "100%"
|- ! colspan="3" align="center" | Computing desk |- ! width="20%" align="left" | < August 9 ! width="25%" align="center"|<< Jul | August | Sep >> ! width="20%" align="right" |Current desk > |}
| Welcome to the Wikipedia Computing Reference Desk Archives |
|---|
| The page you are currently viewing is a transcluded archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages. |
August 10
[edit source]Succinct LISP implementation?
[edit source]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)