mirror of
https://github.com/samsonjs/elisp.js.git
synced 2026-04-27 15:07:47 +00:00
Cleaned up README a bit, added na-cl to TODO
This commit is contained in:
parent
e58c7181c8
commit
19ac65cb2b
2 changed files with 24 additions and 18 deletions
38
README
38
README
|
|
@ -35,10 +35,16 @@ Getting Started
|
||||||
Command line
|
Command line
|
||||||
------------
|
------------
|
||||||
|
|
||||||
If you have rlwrap and js then just run el.sh. If not install rlwrap
|
If you have rlwrap and js then just run el.sh. If not install a
|
||||||
and a JavaScript shell of your choice. Edit el.sh to reflect whether
|
JavaScript shell of your choice, and I recommend you install rlwrap
|
||||||
or not you use rlwrap and your shell's name or path. Then run
|
(readline wrap). Edit el.sh to reflect whether or not you use rlwrap
|
||||||
el.sh. I've only run this under SpiderMonkey.
|
and your shell's name or path. Then run el.sh. I've only run this
|
||||||
|
under SpiderMonkey so I have no idea if it works under any other
|
||||||
|
implementations. Glad to accept info and/or patches.
|
||||||
|
|
||||||
|
Type a 'Q' or 'q' to quit the repl. Or anything that starts with Q,
|
||||||
|
like 'quickly quit lisp!'. (If lisp freaks out because you entered ^D
|
||||||
|
or something ^C or ^Z should still get you out.)
|
||||||
|
|
||||||
|
|
||||||
Emacs
|
Emacs
|
||||||
|
|
@ -46,23 +52,21 @@ Emacs
|
||||||
|
|
||||||
I use Emacs and js-comint.el[3] with inferior-js set to
|
I use Emacs and js-comint.el[3] with inferior-js set to
|
||||||
/opt/local/bin/js, which is SpiderMonkey[4] from MacPorts[5] on Snow
|
/opt/local/bin/js, which is SpiderMonkey[4] from MacPorts[5] on Snow
|
||||||
Leopard. C-c b sends the buffer to the JS repl and then I use the
|
Leopard.
|
||||||
EL.rep (read-eval-print), EL.repl, EL.parse, EL.eval, and EL.print
|
|
||||||
functions defined in the section titled Lisp Support near the end of
|
|
||||||
el.js.
|
|
||||||
|
|
||||||
[3] http://js-comint-el.sourceforge.net/
|
[3] http://js-comint-el.sourceforge.net/
|
||||||
[4] http://www.mozilla.org/js/spidermonkey/
|
[4] http://www.mozilla.org/js/spidermonkey/
|
||||||
[5] http://www.macports.org/
|
[5] http://www.macports.org/
|
||||||
|
|
||||||
Running js under rlwrap and then using load('el.js') works just as
|
For loading code C-c b sends the buffer to the JS repl. I also use
|
||||||
well if you don't use Emacs but still want readline. Type EL.repl()
|
the EL.rep (read-eval-print), EL.parse, EL.eval, and EL.print
|
||||||
to start the REPL or evaluate one thing with EL.rep,
|
functions defined in el/repl.js
|
||||||
e.g. EL.rep("(* 4 3)")
|
|
||||||
|
|
||||||
or a longer example:
|
Here's an example:
|
||||||
|
|
||||||
js> EL.repl()
|
% cd Projects/elisp.js
|
||||||
|
% rlwrap js
|
||||||
|
js> load('el.js')
|
||||||
elisp>
|
elisp>
|
||||||
(defvar *directory* "/Users/sjs" "My home directory")
|
(defvar *directory* "/Users/sjs" "My home directory")
|
||||||
elisp>
|
elisp>
|
||||||
|
|
@ -101,10 +105,10 @@ What's here?
|
||||||
Not much compared to the real thing but it's a decent start for < 1000
|
Not much compared to the real thing but it's a decent start for < 1000
|
||||||
lines.
|
lines.
|
||||||
|
|
||||||
* parser
|
* parser/reader. there's no lexing to tokens we go straight to tagged
|
||||||
(ints, floats, strings, symbols, lists, quoted expressions)
|
data. (ints, floats, strings, symbols, lists, quoted expressions)
|
||||||
|
|
||||||
* symbol table
|
* symbol table, but needs to be replaced ASAP.
|
||||||
(functions & variables separate)
|
(functions & variables separate)
|
||||||
|
|
||||||
* (broken) lexical scoping
|
* (broken) lexical scoping
|
||||||
|
|
|
||||||
2
TODO
2
TODO
|
|
@ -3,6 +3,8 @@ TODO
|
||||||
|
|
||||||
* TESTS
|
* TESTS
|
||||||
|
|
||||||
|
* look into na-cl for better performance
|
||||||
|
|
||||||
* implement all Emacs Lisp types/objects
|
* implement all Emacs Lisp types/objects
|
||||||
|
|
||||||
* relational operators: < > <= >= = not
|
* relational operators: < > <= >= = not
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue