From 8247af3e0e8467cd0c234f8bb703bb9108068dd0 Mon Sep 17 00:00:00 2001 From: Nicolas Janin <30365898+NJdevPro@users.noreply.github.com> Date: Fri, 8 Nov 2024 17:25:04 +0100 Subject: [PATCH] Update README.md --- README.md | 35 +++++++++++++++-------------------- 1 file changed, 15 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 14de649..5c8a721 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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)