simple-stackless-lisp
A small but powerful Clojure-like Lisp.
Has first class continuations and macros.
Data oriented and super polymorphic.
This is a Work In Progress, and there is more to come!
NOTE: Docs might not always be up to date, since the language is in heavy development.
Example
;; examples/fact.sclj
(def fact
(fn [n]
(if (< n 2)
1
(* n (fact (- n 1))))))
(println "(fact 50000) =>")
(println (fact 50000))
More code examples are available.
There's also a User Manual.
Usage
Download
You can find pre-compiled executables here.
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 contains more info on building and running the interpreter.
Thanks
Lisperator's technique 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.