Shen for Common Lisp
This codebase currently supports the following implementations:
This port acts as the standard implementation of the Shen language. It is also the fastest known port, running the standard test suite in 4-8 seconds on SBCL, depending on hardware.
Bug reports, fixes and enhancements are welcome. If you intend to port Shen to another variety of Common Lisp, consider doing so as a pull request to this repo.
shen-cl supports calling underlying Common Lisp functions by prefixing them with
(lisp.sin 6.28) -0.0031853017931379904
Common Lisp code can also be injected inline using the
(lisp. "COMMON LISP SYNTAX") syntax. The
lisp. form takes a single string as its argument. Also keep in mind that shen-cl puts Common Lisp into case-sensitive mode where CL functions and symbols are upper-case so they don't conflict with symbols defined for Shen.
(lisp. "(SIN 6.28)") -0.0031853017931379904 (lisp. "(sin 6.28)") The function COMMON-LISP-USER::sin is undefined.
shen-cl.exit is included, which takes a single integer argument, terminates the process, returning the argument as the exit code.
See PREREQUISITES.md for information on what tools you will need installed to build and work on
Makefile automates all build and test operations.
||Download and extract Shen sources.|
||Run test suite.|
||Build and run test suite.|
||Start Shen REPL.|
||Creates archive of compiled binaries.|
X can be
sbcl or it can be
all, which will run the command for all of the preceding.
An executable is generated for each platform in its platform-specific output directory under
bin/sbcl/shen.exe). Per typical naming conventions, it is named
shen.exe on Windows systems and just
shen on Unix-based systems.
Startup scripts can be specified on the command line by preceding them with a
-l flag. If any startup scripts are specified this way, they will be loaded in order and then
(shen-cl.exit 0) will be called. If none are, the Shen REPL will start as usual. Either way, all command line arguments will be accessible with
When starting Shen via
make, command line arguments can be passed through like this:
make run-sbcl Args="-l bootstrap.shen -flag".
Archives of pre-built binaries are created using the
make release command. They will appear under
release/, named with the operating system and current git tag or short commit hash.
Currently, only the license file and the SBCL build are included (named
Each tagged release on the project downloads page should have a set of pre-built archives. Be sure to archive the build of that specific commit, like this:
make pure git checkout v1.2.3 make fetch make sbcl make release