@@ -10,25 +10,30 @@ to the original program, while trying to keep the goal of simplicity and concise
1010The whole program compiles to less than 100 kb without debugging symbols and should be
1111able to run on low powered devices.
1212
13- The whole program compiles to less than 100 kb and should be able to run on low powered devices.
1413The added primitives:
15- * strings
14+ * strings and conversion
1615* predicates >, >=, <=, or, and, not,
17-
18- * functions length, reverse, progn, load.
16+ * functions atom, length, reverse, progn, load.
1917
2018This has the side effect of being much faster as well, since all these primitives are
2119compiled instead of being interpreted.
2220
23- Among the bells and whistles, I've added a REPL based on Justine Tunney (jart)'s bestline.
21+ Among the bells and whistles, I've added a Read-Eval-Print-Loop ( REPL) based on Justine Tunney (jart)'s bestline.
2422
2523In this version, instead of passing a file using pipes, you simply pass the files as command parameters :
2624./minilisp f1 f2 etc
2725
2826The files all share the same environment, so all the symbols, functions and macros defined
29- in f1 can be reused in the following files.
27+ in f1 can be reused in the following files. The REPL is summonned after execution, unless we pass the option
28+ -r to the command line, in which case the interpreted quits immediately at the end.
29+
30+ You can also pass a simple Lisp command as parameter:
31+ ./minilisp -x "(+ 1 1)"
3032
31- ## Shortcuts
33+ The Lisp command will be evaluated and then the REPL is summonned.
34+ However we can quit immediately after execution with -r (or --no-repl).
35+
36+ ## REPL Shortcuts
3237
3338```
3439CTRL-Enter CONTINUE ON NEXT LINE
@@ -78,27 +83,17 @@ CTRL-Z SUSPEND PROCESS
7883```
7984
8085The REPL also saves the history of commands in the file history.txt
81- <<<<<<< HEAD
82- =======
83-
84- Known bugs:
85- * Operators "and" and "or" do not work like their typical Lisp counterpart
86- because they evaluate all their operands at the same time instead of one
87- by one.
88-
89-
90- Original README
91- =======
92- >>>>>>> 0822c20 (Update README)
9386This file is loaded at startup, so one can recall previous commands.
9487
9588Future improvements:
9689- floating point numbers
9790- data files
91+ - system calls
9892
9993Known bugs:
10094* the paste function does not work very well.
101- * recall of multiline commands does not work as expected.
95+ * recall of multiline commands does not work as expected.
96+ * this doesn't have tail call optimization, so expect crashes with sometimes surprisingly short lists.
10297
10398
10499Original README (completed)
0 commit comments