Skip to content
A Lisp-to-Javascript compiler bootstrapped from Common Lisp
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.
logo Add JSCL logo (#274) Apr 30, 2017
repl-node stream.lisp uses def!struct Apr 19, 2018
repl-web
src
tests Turn of Dec 22, 2018
.gitignore ok Oct 15, 2018
.mailmap Add an extra author mapping Jan 26, 2017
.travis.yml Require sudo May 19, 2015
CHANGELOG.md Update CHANGELOG.md with multi-byte character encoding fix Jan 12, 2019
COPYING Move source code under src/ Apr 25, 2013
HACKING.org Document implementation of multiple values in the compiler Nov 19, 2017
README.md Remove note about missing CLOS from the README.md Nov 27, 2018
jqconsole.min.js Update jqconsole Jun 14, 2014
jquery.js Some dependencies for the REPL Jan 4, 2013
jscl-worker.html Fix SW and Web worker scopes Apr 19, 2018
jscl-worker.js Store an input buffer for each different tab Apr 22, 2018
jscl.html Add support for web workers and write a repl with them Apr 19, 2018
jscl.lisp read-whole-file: Trim array to character count Jan 12, 2019
make.sh Make build reproducible by implementing SOURCE_DATE_EPOCH env variable May 2, 2018
package.json 0.7.0 Nov 27, 2018
run-tests.sh Fix execution of tests, regardless the cwd Aug 7, 2016
service-worker.js Store an input buffer for each different tab Apr 22, 2018
style.css Include forgotten CSS file Feb 19, 2014
tests-report.lisp
tests.html Fix web tests Jan 14, 2016
tests.lisp

README.md

JSCL

Build Status

JSCL is a Common Lisp to Javascript compiler, which is bootstrapped from Common Lisp and executed from the browser.

JSCL

Getting Started

You can try a demo online here, or you can install the JSCL npm package:

npm install -g jscl

to run jscl-repl in NodeJS.

Build

If you want to hack JSCL, you will have to download the repository

git clone https://github.com/jscl-project/jscl.git

load jscl.lisp in your Lisp, and call the bootstrap function to compile the implementation itself:

(jscl:bootstrap)

It will generate a jscl.js file in the top of the source tree. Now you can open jscl.html in your browser and use it.

Status

JSCL is and will be a subset of Common Lisp. Of course it is far from complete, but it supports partially most common special operators, functions and macros. In particular:

  • Multiple values

  • Explicit control tranfers tagbody and go

  • Static and dynamic non local exit catch, throw; block, return-from.

  • Lexical and special variables. However, declare expressions are missing, but you can proclaim special variables.

  • Optional and keyword arguments

  • SETF places

  • Packages

  • The LOOP macro

  • CLOS

  • Others

The compiler is very verbose, some simple optimizations or minification could help to deal with it.

Most of the above features are incomplete. The major features that are still missing are:

  • The format function

Feel free to hack it yourself

You can’t perform that action at this time.