Check the whole code with flake8, pylint and mypy.
Report all possible errors with extensive context.
Demonstrate iterators, decorators, functional tools, chain maps,
dataclasses, match statements, assignments expressions.
Implement environments with python chain maps.
Rewrite the reader without external dependencies (but inspired by the
ptk library). The motivation was that no external library is fully
type-checked for now.
Avoid name clashes when possible (print, read, readline, types).
Write the readline history file at exit, not after each prompt.
Replace printer.pr_str as methods of MAL objects. This is idiomatic
python, and improves the error reporting.
Change some representations so that the python equality matches the
MAL equality. The recursion is now implicit.
Remove -O from ./run. It took me a while to understand that run-time
assertions were disabled! MAL is about development, not performance.
Dispatch the special forms from a dict, for readability (pylint
rightfully complains that there are too many return statements in
eval_()).
Copy the recursion overflow fix, the python interaction from the first
python implementation.
Add tests detecting that nil false 0 () [] "" are distinct, and that 0
() are not False when tested (in python False == 0 and an empty
container is tested ).
Add tests checking that metadata does not affect equality (they do
with a naive python dataclass).
This incorporates various updates to the diagrams.
* The largest change is the incorporation of the new process where
eval_ast is integrated into eval and the macroexpand function and has
been incorporated directly into the eval TCO loop and no longer
requires a separate function or special form. For the most part, this
change was discussed in https://github.com/kanaka/mal/issues/587 and
implemented in https://github.com/kanaka/mal/pull/592. Instead of
a special form, there is now a "apply macro" box in the eval block.
The "apply macro" box has a TCO line (but not env creation line unlike
the "apply" box.
* Change the "eval_ast" sub-block to "evaluate" and convert the list of
evaluated items to individual blocks. Add a "list" block and connect
this to the "apply" block (rather than connecting eval_ast to eval).
* Change the "symbol lookup" arrow to point to the "symbol" box in the
"evaluate" block instead of pointing to the "evaluate" block.
* Update the "create env" arrows to point to the child env box instead
of the root/REPL env box.
* Add try/catch TCO line.
* Remove the `or` macro and `gensym` function from stepA since this has
been dropped for a while.
The java-truffle implementation is unique enough from the Java
implementation to be considered a unique implementation and not just
a new runtime mode.
The Q compiler from Kx Systems requires a click through agreement that
prevents the compiler from being Dockerized and integrated into CI so
for now it remains outside the tree.
- Reorder README to have implementation list after "learning tool"
bullet.
- This also moves tests/ and libs/ into impls. It would be preferrable
to have these directories at the top level. However, this causes
difficulties with the wasm implementations which need pre-open
directories and have trouble with paths starting with "../../". So
in lieu of that, symlink those directories to the top-level.
- Move the run_argv_test.sh script into the tests directory for
general hygiene.