• Stars
    star
    121
  • Rank 293,924 (Top 6 %)
  • Language
    JavaScript
  • License
    Other
  • Created about 16 years ago
  • Updated over 13 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A Lisp->JavaScript compiler
EdgeLisp is a Lisp for JavaScript.

There's no formal definition of the language at the moment, so your
best bet is to look at the Lisp files in the lisp/ and client/
directories.  EdgeLisp should feel familiar to Common Lisp programmers.

A REPL is online at:

   http://manuel.github.com/edgelisp/repl.html

This REPL runs a stable version of EdgeLisp that lags behind the
master branch.  For a REPL with the newest code see INSTALL.

Features
--------

* Class-based object system (DEFCLASS)
  (currently only single inheritance)

* Multiple-dispatching generic functions (DEFGENERIC, DEFMETHOD)
  (using Cecil-style symmetric method lookup)

* Separate function and variable namespaces (Lisp-2)
  DEFPARAMETER, DEFVAR, DEFUN, LET, LET*, FUNCALL, APPLY
  (FLET and LABELS currently missing)

* &OPTIONAL, &KEY, &REST, &AUX parameters
  as well as &ALL-KEYS receiving keyword args as dictionary

* Runtime type-checked function parameters and results (using same
  syntax as DEFMETHOD for parameters and -> arrow syntax for result)

* Basic control flow (IF, PROGN, LOOP, COND, CASE, ECASE),
  Nonlocal exits (BLOCK/RETURN-FROM, CATCH/THROW), UNWIND-PROTECT

* Condition system with restarts
  HANDLER-BIND, RESTART-BIND, SIGNAL, INVOKE-RESTART

* Numerical tower: real, rational, integer
  (small integers are represented as Number)

* Hygienic DEFMACRO (based on SRFI 72) with basic destructuring;
  #` and #' for hygienic code quotation, analogous to ` and '

* Slot access through (overridable) generic functions;
  slots may be defined outside classes, with DEFSLOT.

* (Slightly) Generalized references
  SETF (appends "-setter")

* Inline JavaScript, with escaping back into Lisp, (and back into JS...)
  using #{ ... JavaScript code ... #} reader syntax.

* Dynamically-scoped (fluid-bound, actually) variables
  DEFDYNAMIC, DYNAMIC, DYNAMIC-BIND

Features TBD
------------

* Multiple inheritance
* FLET, LABELS, TAGBODY, DESTRUCTURING-BIND, MACROLET
* CALL-NEXT-METHOD; before-, after-, around-methods
* Sequence protocol based on D's ranges
* Package system

Plan
----

* Implement missing features
* Documentation and better test suite
* Make faster, smaller

Compatibility
-------------

EdgeLisp is intended to compile to EMCAScript, 3rd Edition (JavaScript
1.5), but currently uses the nonstandard extensions __proto__ (for
inheritance) and function.caller (for debugging).

EdgeLisp is tested on Chrome 11, Firefox 4, and Opera 11.10.

Files
-----

The major files are runtime.js, compiler.js, and lisp/boot.lisp.

runtime.js (together with reader.js) provides basic support such as
object model, forms, multiple dispatch engine, and many built-in
functions.

compiler.js translates Lisp to JavaScript, and also evaluates Lisp
expressions at compile-time (DEFMACRO and EVAL-WHEN-COMPILE).

lisp/boot.lisp builds up the language from the special forms and
built-in functions.

License
-------

If you modify EdgeLisp, you must make the modified version available
to your users under the AGPL.  See file COPYING.

(Using EdgeLisp for your programs does not place them under the AGPL.
You are free to choose any license for your Lisp code.)

Thanks
------

* Chris Double for parsing expression grammar
  https://github.com/doublec/jsparse
* Douglas Crockford for JSON parser
  https://github.com/douglascrockford/JSON-js
* Danny Yoo for numerical tower
  https://github.com/dyoo/js-numbers

More Repositories

1

wat-js

Concurrency and Metaprogramming for JS
JavaScript
252
star
2

taf

A Lisp with row polymorphism, delimited continuations, and hygienic macros. [vaporware]
JavaScript
56
star
3

ell

A Lisp->C compiler, using the dynamic linking loader
C
30
star
4

schampignon

Lisp interpreter with fexprs and delimited control written in JavaScript
JavaScript
23
star
5

8ttpd

libevent + V8 web app server
C++
17
star
6

virtua

Lisp interpreter with fexprs written in JavaScript
JavaScript
10
star
7

pool

simple memory pool
C
9
star
8

based

prototype of a lowlevel, log-structured database in C
C
9
star
9

bucky-rdp

A trivial implementation of Reactive Demand Programming
JavaScript
8
star
10

hyperiad

A content-addressed, indexed graph database
6
star
11

ftumbler

Extensible Lists for Filesystems
JavaScript
4
star
12

lolstorage-dev

content-addressed tree synchronization algorithm
JavaScript
4
star
13

gonzoreader

a web-based feed reader that shows the actual page designs
3
star
14

buckybase-py

The code for Buckybase, a social web database with bidirectional hyperlinks; see http://buckybase.blogspot.com/2008/06/introducing-buckybase.html
Python
3
star
15

fully-isolated-web-workers

HTML
3
star
16

buckybase-old

the most interesting application in the world
JavaScript
2
star
17

jsonsortkeys

Natural sorting for JSON objects in systems that only support lexicographic sorting
Java
2
star
18

electron-lisp-test

Proof of concept of a self-contained macOS Electron app containing a Common Lisp server
JavaScript
2
star
19

cv

Manuel Johannes Simoni's CV
2
star
20

avro-cpp

Modifications to Apache Avro serialization format C++ library that provide information about number of bytes encoded/decoded
C++
2
star
21

parenscript

Fork of Parenscript with support for documentation strings
Common Lisp
1
star
22

manuel.github.com-old

HTML
1
star