Lisp-style language that compiles to JavaScript
Note: I apologise for the lack of updates. I've been preparing 0.4.0, which is a complete rewrite of the compiler with a bunch of breaking changes. It revises some parts of the language, dropping dead end ideas and focusing on the core features. Unfortunately I'm busy with some other projects right now.
Jisp is the modern JavaScript for the modern developer. Its macro system lets you treat code as data and write functions that write code for you. Reuse code without runtime limitations, make your code more abstract and shorter, reprogram the language itself.
Jisp's extremely simple syntax protects against common JS pitfalls, and it builds some common coding patterns right into the language, helping keep your code short.
See the interactive online documentation. You can contribute to the documentation by sending pull requests to the gh-pages branch of this repo.
Get Node.js. This will give you the local
noderuntime and the
npmpackage manager. Install jisp with
npm:
$ npm install -g jisp
Alternatively, download the source, run
npm installto get the dependencies, and use
./bin/jispand
./jisp/jisp.jsas entry points.
Require in Node, registering the file extension:
require('jisp/register');
This allows you to
requirejisp scripts directly from your code, like so:
require('./app.jisp');
Launch an interactive REPL:
$ jisp jisp>
Compile a file or directory:
$ jisp -c
Stream-compile with gulp-jisp.
While not recommended for production, jisp can be directly used in the browser. Include the
browser/jisp.jsfile with your webpage. It registers the
text/jispscript type to automatically compile and run jisp scripts loaded with
srcor included in script tags. It also exposes a global object with the
compileand
evalmethods for jisp code. This is how the documentation is implemented.
When hacking at the compiler, use the following commands in the project dir:
npm test -- recompiles dev from src twice, using the dev compiler npm run reset -- disaster recovery: recompiles dev with lib (stable) npm run build -- recompiles lib with dev (prepublish)
Super basic Sublime Text build system (OS X): *
sudo npm install -g jisp*
Tools > Build System > New Build System* put lines:
{ "cmd": ["jisp", "$file"], "path": "/usr/local/bin/" }
~/Library/Application Support/Sublime Text 3/Packages/User