diff --git a/.vscode/launch.json b/.vscode/launch.json index 2af255e..c69b8fe 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -13,7 +13,7 @@ "stopAtEntry": false, "cwd": "${workspaceFolder}", "environment": [], - "console": "externalTerminal", + "externalConsole": false, "MIMode": "lldb" }, { diff --git a/Readme.md b/Readme.md index 59c1133..825c5a1 100644 --- a/Readme.md +++ b/Readme.md @@ -5,9 +5,11 @@ ### TODO - documentation - add url of source/inspiration to clib/*.cpp -- add stdtest - to test every functionality +- add stdtest - to test every functionality +- add -l option (no linenoise) - rename ivaluize - add instrumentation (time, nr of evals, num of atoms, debug info, debug environment etc) + - add -p (profile/performance option) - add debug support function call could keep call stack - add better print (coloring output) - multiline editting (kilo editor) @@ -26,13 +28,13 @@ - date support - decode-universal-time - env functions - - get env - - set env + - get-env, set-env; set-env cannot be implemented in stdlib.lsp, because popen is in fact subshell - format (sprintf) - setq - mapcar (funcall, apply) - syntax highlighting do VS Code - add hash datatype +- create pastebin like web using ml #### Performance - push_back - repeatedly without reserving size @@ -48,7 +50,9 @@ cp stdlib/*.lsp /usr/local/var/mlisp/ #### Compile ``` -gcc -o ml -I/usr/local/opt/openssl/include -Iclib -L/usr/local/lib -L/usr/local/opt/openssl/lib -lm -lstdc++ -lcrypto -lssl -Wl,-stack_size -Wl,0x1000000 --std=c++17 ml.cpp ml_io.cpp ml_date.cpp ml_string.cpp ml_util.cpp clib/json11.cpp clib/csvparser.cpp clib/sslclient.cpp clib/printf.cpp clib/linenoise.c +gcc -std=c99 -c -O2 -o linenoise.o clib/linenoise.c +c++ -c -O2 -I/usr/local/opt/openssl/include -Iclib --std=c++17 ml.cpp ml_io.cpp ml_date.cpp ml_string.cpp ml_util.cpp clib/json11.cpp clib/csvparser.cpp clib/sslclient.cpp clib/printf.cpp +c++ -o ml -O2 -L/usr/local/lib -L/usr/local/opt/openssl/lib -lm -lstdc++ -lcrypto -lssl -Wl,-stack_size -Wl,0x1000000 *.o ``` or cmake @@ -60,6 +64,7 @@ time ./build/ml -c '(include "../example.lisp") (print (fact 1000))' ``` ### Links +https://markdowntohtml.com/ https://hyperpolyglot.org/lisp https://www.tutorialspoint.com/lisp/index.htm https://github.com/adam-mcdaniel/wisp diff --git a/tests/test.lsp b/tests/test.lsp index bd770e0..19837f0 100644 --- a/tests/test.lsp +++ b/tests/test.lsp @@ -183,4 +183,7 @@ (term-yellow (sprintf "%.2f" (list 1.11))) " " )) +(print (get-env "HOME")) + + (print "Test ends") \ No newline at end of file