Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/raymyers/roc-lisp
Simple Lisp interpretor in Roc
https://github.com/raymyers/roc-lisp
Last synced: about 2 months ago
JSON representation
Simple Lisp interpretor in Roc
- Host: GitHub
- URL: https://github.com/raymyers/roc-lisp
- Owner: raymyers
- License: mit
- Created: 2024-07-27T20:04:33.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-07-29T21:57:39.000Z (6 months ago)
- Last Synced: 2024-08-03T11:01:35.029Z (5 months ago)
- Language: Roc
- Size: 35.2 KB
- Stars: 7
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- roc-awesome - raymyers/roc-lisp
README
# Roc Lisp
Simple Lisp interpretor in [Roc](https://www.roc-lang.org) based on Peter Norvig's [Python implementation](https://norvig.com/lispy.html).
This is meant as an educational example, for a full-featured Lisp implementation try Racket or SBCL.
## Requirements
* [Roc](https://www.roc-lang.org) (tested with nightly 070d14a5d60)## Test
```
roc test
```## Run
Run an interactive REPL:
```
roc dev
```
Exit with Ctrl-D (EOF).## Examples
```
(list 1 2 3)
(quote a)
(define n 5)
(set! n 6)
``````
(define max (lambda (a b) (if (< a b) b a)))(max 3 4)
```
=> 4## Features
Values supported:* Integers (Represented by Roc's I32)
* Lists
* t (true)
* nil (false / empty list)
* lambda (anonymous functions)
* symbols (e.g. `(quote mysym)`)## Next steps?
These are missing but should be easy to implement.
* Floats
* Quote notation (`'(a b)` expands to `(quote (a b)`)
* Comments