Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
NJdevPro authored Nov 8, 2024
1 parent cd14903 commit 8247af3
Showing 1 changed file with 15 additions and 20 deletions.
35 changes: 15 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,30 @@ to the original program, while trying to keep the goal of simplicity and concise
The whole program compiles to less than 100 kb without debugging symbols and should be
able to run on low powered devices.

The whole program compiles to less than 100 kb and should be able to run on low powered devices.
The added primitives:
* strings
* strings and conversion
* predicates >, >=, <=, or, and, not,

* functions length, reverse, progn, load.
* functions atom, length, reverse, progn, load.

This has the side effect of being much faster as well, since all these primitives are
compiled instead of being interpreted.

Among the bells and whistles, I've added a REPL based on Justine Tunney (jart)'s bestline.
Among the bells and whistles, I've added a Read-Eval-Print-Loop (REPL) based on Justine Tunney (jart)'s bestline.

In this version, instead of passing a file using pipes, you simply pass the files as command parameters :
./minilisp f1 f2 etc

The files all share the same environment, so all the symbols, functions and macros defined
in f1 can be reused in the following files.
in f1 can be reused in the following files. The REPL is summonned after execution, unless we pass the option
-r to the command line, in which case the interpreted quits immediately at the end.

You can also pass a simple Lisp command as parameter:
./minilisp -x "(+ 1 1)"

## Shortcuts
The Lisp command will be evaluated and then the REPL is summonned.
However we can quit immediately after execution with -r (or --no-repl).

## REPL Shortcuts

```
CTRL-Enter CONTINUE ON NEXT LINE
Expand Down Expand Up @@ -78,27 +83,17 @@ CTRL-Z SUSPEND PROCESS
```

The REPL also saves the history of commands in the file history.txt
<<<<<<< HEAD
=======

Known bugs:
* Operators "and" and "or" do not work like their typical Lisp counterpart
because they evaluate all their operands at the same time instead of one
by one.


Original README
=======
>>>>>>> 0822c20 (Update README)
This file is loaded at startup, so one can recall previous commands.

Future improvements:
- floating point numbers
- data files
- system calls

Known bugs:
* the paste function does not work very well.
* recall of multiline commands does not work as expected.
* recall of multiline commands does not work as expected.
* this doesn't have tail call optimization, so expect crashes with sometimes surprisingly short lists.


Original README (completed)
Expand Down

0 comments on commit 8247af3

Please sign in to comment.