Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/divs1210/simple-stackless-lisp
A small but powerful Clojure-like Lisp with first class continuations and macros
https://github.com/divs1210/simple-stackless-lisp
clojure interpreter lisp repl
Last synced: about 5 hours ago
JSON representation
A small but powerful Clojure-like Lisp with first class continuations and macros
- Host: GitHub
- URL: https://github.com/divs1210/simple-stackless-lisp
- Owner: divs1210
- License: epl-2.0
- Created: 2022-07-28T11:19:04.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-01-12T22:47:58.000Z (almost 2 years ago)
- Last Synced: 2023-05-12T03:05:16.553Z (over 1 year ago)
- Topics: clojure, interpreter, lisp, repl
- Language: Clojure
- Homepage:
- Size: 96.7 KB
- Stars: 13
- Watchers: 1
- Forks: 0
- Open Issues: 18
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# simple-stackless-lisp
A small but powerful Clojure-like Lisp.
Has first class continuations and macros.
Data oriented and [super polymorphic](examples/polymorphism.sclj).
This is a **Work In Progress**, and there is [more to come](docs/vision.md)!
**NOTE:** Docs might not always be up to date, since the language is in heavy development.
## Example
```clojure
;; examples/fact.sclj
(def fact
(fn [n]
(if (< n 2)
1
(* n (fact (- n 1))))))(println "(fact 50000) =>")
(println (fact 50000))
```More [code examples](examples/) are available.
There's also a [User Manual](docs/manual.md).
## Usage
### Download
You can find pre-compiled executables [here](https://github.com/divs1210/simple-stackless-lisp/releases/latest).
### Start a REPL
```
$ ./sclj
```Use `rlwrap` for a more pleasant REPL experience:
```
$ rlwrap ./sclj
```### Run a file
```
$ ./sclj code.sclj
```## Build from source
[The manual](docs/manual.md) contains more info on building and running the interpreter.
## Thanks
[Lisperator's technique](https://lisperator.net/pltut/cps-evaluator/) for building a stackless interpreter led me down this rabbit hole.
## License
Copyright © 2022 Divyansh Prakash
This program and the accompanying materials are made available under the
terms of the Eclipse Public License 2.0 which is available at
http://www.eclipse.org/legal/epl-2.0.This Source Code may also be made available under the following Secondary
Licenses when the conditions for such availability set forth in the Eclipse
Public License, v. 2.0 are satisfied: GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or (at your
option) any later version, with the GNU Classpath Exception which is available
at https://www.gnu.org/software/classpath/license.html.