1
1
mirror of https://github.com/kanaka/mal.git synced 2024-11-09 18:06:35 +03:00
mal/impls/lib
2024-08-09 17:40:29 -05:00
..
alias-hacks.mal Move implementations into impls/ dir 2020-02-10 23:50:16 -06:00
benchmark.mal [java-truffle] benchmarking and write-up 2021-05-31 10:28:04 -05:00
equality.mal Move implementations into impls/ dir 2020-02-10 23:50:16 -06:00
load-file-once.mal Move implementations into impls/ dir 2020-02-10 23:50:16 -06:00
memoize.mal Move implementations into impls/ dir 2020-02-10 23:50:16 -06:00
perf.mal Move implementations into impls/ dir 2020-02-10 23:50:16 -06:00
pprint.mal pprint properly prints hash-maps 2024-08-09 17:40:29 -05:00
protocols.mal Move implementations into impls/ dir 2020-02-10 23:50:16 -06:00
README.md Move implementations into impls/ dir 2020-02-10 23:50:16 -06:00
reducers.mal Move implementations into impls/ dir 2020-02-10 23:50:16 -06:00
test_cascade.mal Move implementations into impls/ dir 2020-02-10 23:50:16 -06:00
threading.mal Move implementations into impls/ dir 2020-02-10 23:50:16 -06:00
trivial.mal Move implementations into impls/ dir 2020-02-10 23:50:16 -06:00

This directory contains general-purpose reusable code that does not fit in the process.

The split in small files is motivated by implementations too limited to load a single big file, but MAL has no proper module management.

However, here are some guidelines.

  • Begin with an one-line ;; short description

  • Describe the restrictions on each parameter in comments.

  • Define private symbols in hidden environments when possible. If this is not possible, for example for macros, give them a name starting with an underscore.

If a module provides tests, you may run against an implementation IMPL with these commands.

make IMPL^stepA
cd tests
python ../runtest.py lib/MODULE.mal ../IMPL/run

Users and implementors should use the following syntax in order to ensure that the same file is only loaded once.

(load-file      "../lib/load-file-once.mal")
(load-file-once "../lib/foo.mal")
(load-file-once "../lib/bar.mal")