https://github.com/carloslfu/lisp-js
Lisp interpreter written for the Web
https://github.com/carloslfu/lisp-js
javascript lisp lisp-compiler lisp-dialect lisp-interpreter typescript webassembly
Last synced: 2 months ago
JSON representation
Lisp interpreter written for the Web
- Host: GitHub
- URL: https://github.com/carloslfu/lisp-js
- Owner: carloslfu
- Created: 2017-10-17T08:04:17.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-01-14T06:54:55.000Z (almost 8 years ago)
- Last Synced: 2025-08-02T18:28:52.290Z (4 months ago)
- Topics: javascript, lisp, lisp-compiler, lisp-dialect, lisp-interpreter, typescript, webassembly
- Language: TypeScript
- Homepage:
- Size: 54.7 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Lisp-JS
This library is an extendable interpreter / compiler for Lisp intended for use in any JS environment as a secure sandboxed execution runtime.
Example code:
```javascript
const { run } = require('./index')
const code = `
(process
(def
[sqrtIter x guess]
(if
[= (Math .abs (- x (* guess guess))) 0]
guess
(sqrtIter x (/ (+ guess (/ x guess)) 2))
)
)
(def
[sqrt x]
(sqrtIter x 1)
)
(sqrt 9)
)
`
let result = run({})(code)
console.log(result)
```
## Roadmap
- Port pausable interpreter to TypeScript
- Implement a pausable interpreter
- Improve README and docs
- Support for comments (`;`) as a special form
- Implement code generation
- Implement a code generator for WebAssembly
- Allow concurrent execution
- Allow multi-threaded execution
## Goals
- Build a language for Fractal over JS
- Be simple and performant
## Docs
- Language is described in LANGUAGE.md
## TODOs
- Tests lambdas to capture values