* js* renamed to js-eval and is no longer a special form (just a normal
function in core.js)
* . is no longer a special form (just a normal function in core.js)
* fixed object/method parsing of first argument to .
* added tests for .
* updated mal.html: "Mal at a glance" shows all Mal functions
All tests pass, but readline support (via Linenoise module) is commented
out in step0_repl.pl as it is not a core module. Should maybe change it
when docker support is added.
Ran into the same problem with macroexpand that prevented TCO in
step5. Apparently objects as parameters cannot be re-assigning (or
copied and re-assigned even) in a loop. When trying to do so, the
server process crashes with a memory error.
Move away from try to allocate and pass full structures around.
Instead pass integer references into a memory pool of the objects
(nested table of mal objects) and then pass this memory pool around by
reference. Passing the memory pool around all over the place is ugly,
but it allows TCO and macroexpand to work at all and seems to have
better performance anyways.
- Add */run script for every implementation.
- Refactor Clojure build to allow individual jar files for each step.
- Update FFI version for es6 and miniMAL to work with newer node
versions.
The run scripts for the following could use some additional
refactoring:
- java: build individual step jar, use java -jar instead of mvn to run
- plpgsql: maybe combine plpgsql/run and plpgsql/wrap.sh
- vhdl: combine vhdl/run and vhdl/run_vhdl.sh
- vimscript: combine vimscript/run and vimscript/run_vimscript.sh
The Scala build will create a mal.jar file with all the steps' classes
in it. A `run` wrapper script will run that jar with a specific step
main class according to the `$STEP` environment variable. Now the jar
file is created only once (when testing step0) and then re-used for
testing the next steps, which should speed up the build.
Moreover, sbt now prepends shell script header to the jar file, so no
need to implement this in Makefile (for the `dist` target).
Add --no-print-directory to make implementation execution so it only
prints the actual output from a Mal script.
Alos, since the make implementation can't handle spaces in a
command-line argument, we skip this test.
The `io/run` script will run the io interpreter on a step file given in
the `$STEP` environment variable. It'll swallow the first 25 bytes
printed by the interpreter because they are a startup message about the
Io Regex module (and can't be suppressed in a normal way).