1
1
mirror of https://github.com/kanaka/mal.git synced 2024-11-09 18:06:35 +03:00
mal/impls/wren
Nicolas Boulenguez fbfe6784d2 Change quasiquote algorithm
- Add a `vec` built-in function in step7 so that `quasiquote` does not
  require `apply` from step9.
- Introduce quasiquoteexpand special in order to help debugging step7.
  This may also prepare newcomers to understand step8.
- Add soft tests.
- Do not quote numbers, strings and so on.

Should ideally have been in separate commits:
- elisp: simplify and fix (keyword :k)
- factor: fix copy/paste error in let*/step7, simplify eval-ast.
- guile: improve list/vector types
- haskell: revert evaluation during quasiquote
- logo, make: cosmetic issues
2020-08-11 01:01:56 +02:00
..
tests Move implementations into impls/ dir 2020-02-10 23:50:16 -06:00
core.wren Change quasiquote algorithm 2020-08-11 01:01:56 +02:00
Dockerfile Move implementations into impls/ dir 2020-02-10 23:50:16 -06:00
env.wren Move implementations into impls/ dir 2020-02-10 23:50:16 -06:00
interop.wren Move implementations into impls/ dir 2020-02-10 23:50:16 -06:00
Makefile Move implementations into impls/ dir 2020-02-10 23:50:16 -06:00
printer.wren Move implementations into impls/ dir 2020-02-10 23:50:16 -06:00
reader.wren Move implementations into impls/ dir 2020-02-10 23:50:16 -06:00
readline.wren 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
run Move implementations into impls/ dir 2020-02-10 23:50:16 -06:00
step0_repl.wren Move implementations into impls/ dir 2020-02-10 23:50:16 -06:00
step1_read_print.wren Move implementations into impls/ dir 2020-02-10 23:50:16 -06:00
step2_eval.wren Move implementations into impls/ dir 2020-02-10 23:50:16 -06:00
step3_env.wren Move implementations into impls/ dir 2020-02-10 23:50:16 -06:00
step4_if_fn_do.wren Move implementations into impls/ dir 2020-02-10 23:50:16 -06:00
step5_tco.wren Move implementations into impls/ dir 2020-02-10 23:50:16 -06:00
step6_file.wren Move implementations into impls/ dir 2020-02-10 23:50:16 -06:00
step7_quote.wren Change quasiquote algorithm 2020-08-11 01:01:56 +02:00
step8_macros.wren Change quasiquote algorithm 2020-08-11 01:01:56 +02:00
step9_try.wren Change quasiquote algorithm 2020-08-11 01:01:56 +02:00
stepA_mal.wren Change quasiquote algorithm 2020-08-11 01:01:56 +02:00
types.wren Move implementations into impls/ dir 2020-02-10 23:50:16 -06:00
wren-add-gettimeofday.patch Move implementations into impls/ dir 2020-02-10 23:50:16 -06:00

Wren implementation

Adding a time function

Since Wren doesn't have a time function, we add a System.gettimeofday function which returns a float with the number of seconds since epoch (with fractions of seconds).

This is done by applying the patch in wren-add-gettimeofday.path to Wren's source code before compiling it (see Dockerfile).

Wren interop

See examples in tests/stepA_mal.mal for usage of wren-eval to evaluate Wren expressions inside a Mal program.