LIPS: Scheme based powerful lisp interpreter in JavaScript for browsers and Node. Maintained by @jcubic Aspiring R7RS Scheme.
Check Scheme Bookmark REPL.
Have a real case of Heisenbug in unit test for my #JavaScript#OpenSource project @LIPS_scheme.
One assertion fails, but only if there are an exact number of assertions in two tests. If I add a log or remove any of the assertions (not the one that fails), the test passes.
SRFI 267: Raw String Syntax example implementation inspired the creation of the LIPS Scheme macro to define new hash syntax. Which are a poor man's syntax extensions.
It works out of the box with the current beta version of LIPS.
Link to SRFI in the comments 👇
#Scheme#lisp
It looks like @nodejs broke how ** operator works in @LIPS_scheme.
My code was testing:
(expt 0.5 -1/2) which executes 0.5 ** -0.5
It use to return 1.414213562373095 now it returns 1.4142135623730951
I'm not sure how to fix the tests, so they work in all version of Node.
Just written a new article about internals of syntax extensions in @LIPS_scheme, my #Scheme implementation in #JavaScript.
Syntax extensions are a way to add new syntax to the language.
Link in the comment 👇
Do you know that Lisp is the second oldest programming language that is still in use?
Learning lisp can make you a better developer even if you don't use it
I recommend starting with Scheme. This is the language that inspired JavaScript. And the reason you have closures
It took few days, but I finally found the root cause of breakage of this code in @LIPS_scheme
The continuations were not working properly even after implementing for-each in Scheme. The problem was apply function that was part of the for-each code.
#lisp#scheme
Just when I've though that continuations in @LISP_scheme are all working, fund another bigger example, and then I was able to create this minimal one.
The code should exit after the first call, but it continues to loop through the list.
#lisp#scheme
Huge achievement today 🎉
While writing a comment on @GitHub why new interpreter in @LIPS_scheme is async. Got an idea about replacing async..await with generators (yield).
All it takes was this function, the inspiration came from Babel.
#JavaScript