项目作者: danprince

项目描述 :
Lisp in your language.
高级语言: JavaScript
项目地址: git://github.com/danprince/ljsp.git
创建时间: 2015-09-05T12:09:37Z
项目社区:https://github.com/danprince/ljsp

开源协议:

下载


ljsp

A toy Lisp implemented using arrays and functions in Javascript. If you’re wondering why such an abomination exists, then go check out the blog post that is responsible for its inception.

Examples

  1. ["print", "Hello, World!"]
  2. ["defn", "greeting", ["name"],
  3. ["print", "Hello", "name"]]
  4. ["greeting", "Dan"]
  5. ["=", 5, 5]
  6. ["+", 10, 20]
  7. ["and", true, true]
  8. ["or", true, false]

For more involved examples, take a look in the examples/ directory. To run an example, use bin/run-example example-name.json.

REPL

To use the REPL, clone the repository and run npm install. This will install the dependencies needed for running the REPL (chalk and readline).

Then running ./bin/repl will start it up. See how it is used in the Asciicast below.

asciicast