Skip to content
A simple lisp interpreter with clojure-like syntax.
C++ Clojure
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
libs
scripts
src
.gitignore
LICENSE.txt
README.md
Sconstruct

README.md

JediScript

What?

A simple lisp interpreter with clojure-like syntax.

Why?

xkcd

Ok, show me the code!

(defn say-hello-to [name]
  (print "Hello " name))

(say-hello-to "Obi-Wan Kenobi") ;; this should print "Hello Obi-Wan Kenobi" without the quotes

Check the file scripts/examples.cljs for more examples

Awesome! How do I use it?

Requirements

  • A C++ compiler with C++11 support ( I tested it with g++ 5.3.1 )
  • Scons ( a better construction tool that use python scripts )

Compile the source

$ scons

Setting the JEDIPATH environment variable

The interpreter needs this environment variable to search for libs ( at the moment just the core lib ).

Navigate to the project folder:

$ cd jediscript-master/
$ export JEDIPATH=$PWD/libs

Executing the examples

$ cd jediscript-master/
$ ./bin/jediscript ./scripts/examples.cljs

Missing features ( that maybe some day I'll implement )

  • Hash type
  • namespaces
  • Multi-arity functions
  • varadic functions
  • FFI
  • a lot of nice clojure features...

FAQ

It will work on Windows or Mac?

Probably, but since I don't use Windows nor Mac, I can't tell you for sure. If you want to test it in those platforms and/or make adjustment to make it work, you are welcome to open a pull request :)

How fast is it?

Well, is an AST interpreter with no special care for performance, so slow.

You can’t perform that action at this time.