mirror of
https://github.com/kanaka/mal.git
synced 2024-09-11 13:55:55 +03:00
Add instructions and makefile for Nim
This commit is contained in:
parent
4ce9e165ba
commit
a2cd0a3ada
5
Makefile
5
Makefile
@ -36,7 +36,7 @@ EXCLUDE_TESTS += test^php^step5 # test completes, even at 100,000
|
||||
EXCLUDE_TESTS += test^ruby^step5 # test completes, even at 100,000
|
||||
EXCLUDE_TESTS += test^rust^step5 # no catching stack overflows
|
||||
EXCLUDE_TESTS += test^ocaml^step5 # test completes, even at 1,000,000
|
||||
#EXCLUDE_TESTS += test^nim^step5 # test completes, even at 100,000
|
||||
EXCLUDE_TESTS += test^nim^step5 # test completes, even at 100,000
|
||||
|
||||
# interop tests now implemented yet
|
||||
EXCLUDE_TESTS += test^cs^stepA test^java^stepA test^mal^stepA \
|
||||
@ -111,8 +111,7 @@ ruby_RUNSTEP = ruby ../$(2) $(3)
|
||||
rust_RUNSTEP = ../$(2) $(3)
|
||||
scala_RUNSTEP = sbt 'run-main $($(1))$(if $(3), $(3),)'
|
||||
vb_RUNSTEP = mono ../$(2) --raw $(3)
|
||||
#nim_RUNSTEP = ../$(2) $(3)
|
||||
nim_RUNSTEP = nim -d:release --deadcodeelim:off c -r ../$(2) $(3)
|
||||
nim_RUNSTEP = ../$(2) $(3)
|
||||
|
||||
# Extra options to pass to runtest.py
|
||||
cs_TEST_OPTS = --redirect
|
||||
|
16
README.md
16
README.md
@ -4,7 +4,7 @@
|
||||
|
||||
Mal is an Clojure inspired Lisp interpreter.
|
||||
|
||||
Mal is implemented in 26 different languages:
|
||||
Mal is implemented in 27 different languages:
|
||||
|
||||
* Bash shell
|
||||
* C
|
||||
@ -21,6 +21,7 @@ Mal is implemented in 26 different languages:
|
||||
* mal itself
|
||||
* MATLAB
|
||||
* [miniMAL](https://github.com/kanaka/miniMAL)
|
||||
* Nim
|
||||
* OCaml
|
||||
* Perl
|
||||
* PHP
|
||||
@ -190,6 +191,19 @@ cd make
|
||||
make -f stepX_YYY.mk
|
||||
```
|
||||
|
||||
### Nim 0.10.3
|
||||
|
||||
Running the Nim implementation of mal requires Nim's current devel branch
|
||||
(0.10.3) or later, and the nre library installed.
|
||||
|
||||
```
|
||||
cd nim
|
||||
make
|
||||
# OR
|
||||
nimble build
|
||||
./stepX_YYY
|
||||
```
|
||||
|
||||
### OCaml 4.01.0
|
||||
|
||||
```
|
||||
|
33
nim/Makefile
Normal file
33
nim/Makefile
Normal file
@ -0,0 +1,33 @@
|
||||
#####################
|
||||
|
||||
SOURCES_BASE = types.nim reader.nim printer.nim
|
||||
SOURCES_LISP = env.nim core.nim stepA_interop.nim
|
||||
SOURCES = $(SOURCES_BASE) $(SOURCES_LISP)
|
||||
|
||||
#####################
|
||||
|
||||
SRCS = step0_repl.nim step1_read_print.nim step2_eval.nim step3_env.nim \
|
||||
step4_if_fn_do.nim step5_tco.nim step6_file.nim step7_quote.nim \
|
||||
step8_macros.nim step9_try.nim stepA_interop.nim
|
||||
BINS = $(SRCS:%.nim=%)
|
||||
|
||||
#####################
|
||||
|
||||
all: $(BINS) mal
|
||||
|
||||
mal: $(word $(words $(BINS)),$(BINS))
|
||||
cp $< $@
|
||||
|
||||
$(BINS):
|
||||
nim -d:release c $@
|
||||
|
||||
clean:
|
||||
rm -rf nimcache/ $(BINS)
|
||||
rm -f mal
|
||||
|
||||
.PHONY: stats stats-lisp
|
||||
|
||||
stats: $(SOURCES)
|
||||
@wc $^
|
||||
stats-lisp: $(SOURCES_LISP)
|
||||
@wc $^
|
@ -8,4 +8,4 @@ license = "MIT"
|
||||
bin = "step0_repl, step1_read_print, step2_eval, step3_env, step4_if_fn_do, step5_tco, step6_file, step7_quote, step8_macros, step9_try, stepA_interop"
|
||||
|
||||
[Deps]
|
||||
Requires = "nim >= 0.10.0, nre >= 0.6.0"
|
||||
Requires = "nim >= 0.10.3, nre >= 0.6.0"
|
||||
|
Loading…
Reference in New Issue
Block a user