1
1
mirror of https://github.com/kanaka/mal.git synced 2024-11-23 12:14:45 +03:00

Move implementations into impls/ dir

- 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.
This commit is contained in:
Joel Martin 2020-02-10 23:50:16 -06:00
parent 88869410d7
commit 8a19f60386
2143 changed files with 395 additions and 370 deletions

133
.gitignore vendored
View File

@ -4,6 +4,7 @@
.cargo
.config
.mal-history
.mal_history
.crystal
.lein
.m2
@ -12,138 +13,10 @@
.npm
.node-gyp
package-lock.json
.elm
*/experiments
*/node_modules
*.o
*.pyc
*/step0_repl
*/step1_read_print
*/step2_eval
*/step3_env
*/step4_if_fn_do
*/step5_tco
*/step6_file
*/step7_quote
*/step8_macros
*/step9_try
*/stepA_mal
*/mal
node_modules
*/notes
logs
old
ada/obj/
awk/mal.awk
bash/mal.sh
clojure/mal.jar
clojure/target
clojure/.lein-repl-history
coffee/mal.coffee
cs/*.exe
cs/*.dll
cs/*.mdb
d/*.o
elixir/_build
elixir/deps
elixir/erl_crash.dump
elixir/*.ez
erlang/ebin
erlang/.rebar
erlang/src/*.beam
es6/mal.js
es6/.esm-cache
factor/mal.factor
fantom/lib
forth/mal.fs
fsharp/*.exe
fsharp/*.dll
fsharp/*.mdb
go/step*
groovy/*.class
groovy/mal.jar
haskell/*.hi
haskell/*.o
haxe/*.n
haxe/*.py
haxe/cpp/
haxe/*.js
java/mal.jar
java/target/
java/dependency-reduced-pom.xml
.npm/
.node-gyp/
js/mal.js
js/web/mal.js
kotlin/*.jar
kotlin/.idea
kotlin/*.iml
lua/lib
lua/linenoise.so
lua/mal.lua
make/mal.mk
mal/mal.mal
matlab/octave-workspace
miniMAL/mal.json
nim/nimcache*
objc/*.d
ocaml/*.cmi
ocaml/*.cmo
ocaml/*.swp
ocaml/*.cmx
ocaml/*.o
ocaml/mal_lib.*
objpascal/*.o
objpascal/*.ppu
objpascal/pas-readline
objpascal/regexpr/Source/RegExpr.ppu
perl/mal.pl
perl6/.precomp/
php/mal.php
php/mal-web.php
ps/mal.ps
python/mal.pyz
r/mal.r
ruby/mal.rb
.cargo/
rust/target/
rust/Cargo.lock
rust/.cargo
r/lib
scala/mal.jar
scala/target
scala/project
skew/*.js
tcl/mal.tcl
vb/*.exe
vb/*.dll
vimscript/mal.vim
clisp/*.fas
clisp/*.lib
basic/step0_repl.bas
basic/step1_read_print.bas
basic/step2_eval.bas
basic/step3_env.bas
basic/step4_if_fn_do.bas
basic/step5_tco.bas
basic/step6_file.bas
basic/step7_quote.bas
basic/step8_macros.bas
basic/step9_try.bas
basic/stepA_mal.bas
basic/*.prg
common-lisp/*.fasl
common-lisp/*.lib
common-lisp/images/*
common-lisp/hist/*
livescript/*.js
!livescript/node_readline.js
livescript/node_modules
elm/node_modules
elm/elm-stuff
elm/*.js
!elm/node_readline.js
!elm/bootstrap.js
wasm/*.wat
wasm/*.wasm
tmp/

View File

@ -7,7 +7,7 @@ IMPL=${2}
# Environment variable configuration
BUILD_IMPL=${BUILD_IMPL:-${IMPL}}
TEST_OPTS="${TEST_OPTS} --debug-file ../${ACTION}.err"
TEST_OPTS="${TEST_OPTS} --debug-file ../../${ACTION}.err"
if [ "${DO_SELF_HOST}" ]; then
MAL_IMPL=${IMPL}
@ -55,9 +55,9 @@ build)
# rpython often fails on step9 in compute_vars_longevity
# so build step9, then continue with the full build
if [ "${BUILD_IMPL}" = "rpython" ]; then
${MAKE} -C "${BUILD_IMPL}" step9_try || true
${MAKE} -C "impls/${BUILD_IMPL}" step9_try || true
fi
${MAKE} -C ${BUILD_IMPL}
${MAKE} -C "impls/${BUILD_IMPL}"
;;
test|perf)
[ "${ACTION}" = "perf" ] && STEP=

229
Makefile
View File

@ -163,110 +163,110 @@ endif
# Implementation specific utility functions
#
basic_STEP_TO_PROG_cbm = basic/$($(1)).bas
basic_STEP_TO_PROG_qbasic = basic/$($(1))
basic_STEP_TO_PROG_cbm = impls/basic/$($(1)).bas
basic_STEP_TO_PROG_qbasic = impls/basic/$($(1))
clojure_STEP_TO_PROG_clj = clojure/target/$($(1)).jar
clojure_STEP_TO_PROG_cljs = clojure/src/mal/$($(1)).cljc
clojure_STEP_TO_PROG_clj = impls/clojure/target/$($(1)).jar
clojure_STEP_TO_PROG_cljs = impls/clojure/src/mal/$($(1)).cljc
haxe_STEP_TO_PROG_neko = haxe/$($(1)).n
haxe_STEP_TO_PROG_python = haxe/$($(1)).py
haxe_STEP_TO_PROG_cpp = haxe/cpp/$($(1))
haxe_STEP_TO_PROG_js = haxe/$($(1)).js
haxe_STEP_TO_PROG_neko = impls/haxe/$($(1)).n
haxe_STEP_TO_PROG_python = impls/haxe/$($(1)).py
haxe_STEP_TO_PROG_cpp = impls/haxe/cpp/$($(1))
haxe_STEP_TO_PROG_js = impls/haxe/$($(1)).js
scheme_STEP_TO_PROG_chibi = scheme/$($(1)).scm
scheme_STEP_TO_PROG_kawa = scheme/out/$($(1)).class
scheme_STEP_TO_PROG_gauche = scheme/$($(1)).scm
scheme_STEP_TO_PROG_chicken = scheme/$($(1))
scheme_STEP_TO_PROG_sagittarius = scheme/$($(1)).scm
scheme_STEP_TO_PROG_cyclone = scheme/$($(1))
scheme_STEP_TO_PROG_foment = scheme/$($(1)).scm
scheme_STEP_TO_PROG_chibi = impls/scheme/$($(1)).scm
scheme_STEP_TO_PROG_kawa = impls/scheme/out/$($(1)).class
scheme_STEP_TO_PROG_gauche = impls/scheme/$($(1)).scm
scheme_STEP_TO_PROG_chicken = impls/scheme/$($(1))
scheme_STEP_TO_PROG_sagittarius = impls/scheme/$($(1)).scm
scheme_STEP_TO_PROG_cyclone = impls/scheme/$($(1))
scheme_STEP_TO_PROG_foment = impls/scheme/$($(1)).scm
# Map of step (e.g. "step8") to executable file for that step
ada_STEP_TO_PROG = ada/$($(1))
ada.2_STEP_TO_PROG = ada.2/$($(1))
awk_STEP_TO_PROG = awk/$($(1)).awk
bash_STEP_TO_PROG = bash/$($(1)).sh
basic_STEP_TO_PROG = $(basic_STEP_TO_PROG_$(basic_MODE))
bbc-basic_STEP_TO_PROG = bbc-basic/$($(1)).bas
c_STEP_TO_PROG = c/$($(1))
chuck_STEP_TO_PROG = chuck/$($(1)).ck
clojure_STEP_TO_PROG = $(clojure_STEP_TO_PROG_$(clojure_MODE))
coffee_STEP_TO_PROG = coffee/$($(1)).coffee
common-lisp_STEP_TO_PROG = common-lisp/$($(1))
cpp_STEP_TO_PROG = cpp/$($(1))
crystal_STEP_TO_PROG = crystal/$($(1))
cs_STEP_TO_PROG = cs/$($(1)).exe
d_STEP_TO_PROG = d/$($(1))
dart_STEP_TO_PROG = dart/$($(1)).dart
elisp_STEP_TO_PROG = elisp/$($(1)).el
elixir_STEP_TO_PROG = elixir/lib/mix/tasks/$($(1)).ex
elm_STEP_TO_PROG = elm/$($(1)).js
erlang_STEP_TO_PROG = erlang/$($(1))
es6_STEP_TO_PROG = es6/$($(1)).mjs
factor_STEP_TO_PROG = factor/$($(1))/$($(1)).factor
fantom_STEP_TO_PROG = fantom/lib/fan/$($(1)).pod
forth_STEP_TO_PROG = forth/$($(1)).fs
fsharp_STEP_TO_PROG = fsharp/$($(1)).exe
go_STEP_TO_PROG = go/$($(1))
groovy_STEP_TO_PROG = groovy/$($(1)).groovy
gnu-smalltalk_STEP_TO_PROG = gnu-smalltalk/$($(1)).st
guile_STEP_TO_PROG = guile/$($(1)).scm
haskell_STEP_TO_PROG = haskell/$($(1))
haxe_STEP_TO_PROG = $(haxe_STEP_TO_PROG_$(haxe_MODE))
hy_STEP_TO_PROG = hy/$($(1)).hy
io_STEP_TO_PROG = io/$($(1)).io
java_STEP_TO_PROG = java/target/classes/mal/$($(1)).class
js_STEP_TO_PROG = js/$($(1)).js
jq_STEP_PROG = jq/$($(1)).jq
julia_STEP_TO_PROG = julia/$($(1)).jl
kotlin_STEP_TO_PROG = kotlin/$($(1)).jar
livescript_STEP_TO_PROG = livescript/$($(1)).js
logo_STEP_TO_PROG = logo/$($(1)).lg
lua_STEP_TO_PROG = lua/$($(1)).lua
make_STEP_TO_PROG = make/$($(1)).mk
mal_STEP_TO_PROG = mal/$($(1)).mal
matlab_STEP_TO_PROG = matlab/$($(1)).m
miniMAL_STEP_TO_PROG = miniMAL/$($(1)).json
nasm_STEP_TO_PROG = nasm/$($(1))
nim_STEP_TO_PROG = nim/$($(1))
objc_STEP_TO_PROG = objc/$($(1))
objpascal_STEP_TO_PROG = objpascal/$($(1))
ocaml_STEP_TO_PROG = ocaml/$($(1))
perl_STEP_TO_PROG = perl/$($(1)).pl
perl6_STEP_TO_PROG = perl6/$($(1)).pl
php_STEP_TO_PROG = php/$($(1)).php
picolisp_STEP_TO_PROG = picolisp/$($(1)).l
pike_STEP_TO_PROG = pike/$($(1)).pike
plpgsql_STEP_TO_PROG = plpgsql/$($(1)).sql
plsql_STEP_TO_PROG = plsql/$($(1)).sql
powershell_STEP_TO_PROG = powershell/$($(1)).ps1
ps_STEP_TO_PROG = ps/$($(1)).ps
python_STEP_TO_PROG = python/$($(1)).py
python.2_STEP_TO_PROG = python.2/$($(1)).py
r_STEP_TO_PROG = r/$($(1)).r
racket_STEP_TO_PROG = racket/$($(1)).rkt
rexx_STEP_TO_PROG = rexx/$($(1)).rexxpp
rpython_STEP_TO_PROG = rpython/$($(1))
ruby_STEP_TO_PROG = ruby/$($(1)).rb
rust_STEP_TO_PROG = rust/$($(1))
scala_STEP_TO_PROG = scala/target/scala-2.11/classes/$($(1)).class
scheme_STEP_TO_PROG = $(scheme_STEP_TO_PROG_$(scheme_MODE))
skew_STEP_TO_PROG = skew/$($(1)).js
swift_STEP_TO_PROG = swift/$($(1))
swift3_STEP_TO_PROG = swift3/$($(1))
swift4_STEP_TO_PROG = swift4/$($(1))
swift5_STEP_TO_PROG = swift5/$($(1))
tcl_STEP_TO_PROG = tcl/$($(1)).tcl
ts_STEP_TO_PROG = ts/$($(1)).js
vala_STEP_TO_PROG = vala/$($(1))
vb_STEP_TO_PROG = vb/$($(1)).exe
vhdl_STEP_TO_PROG = vhdl/$($(1))
vimscript_STEP_TO_PROG = vimscript/$($(1)).vim
wasm_STEP_TO_PROG = wasm/$($(1)).$(if $(filter lucet,$(wasm_MODE)),so,wasm)
wren_STEP_TO_PROG = wren/$($(1)).wren
yorick_STEP_TO_PROG = yorick/$($(1)).i
zig_STEP_TO_PROG = zig/$($(1))
ada_STEP_TO_PROG = impls/ada/$($(1))
ada.2_STEP_TO_PROG = impls/ada.2/$($(1))
awk_STEP_TO_PROG = impls/awk/$($(1)).awk
bash_STEP_TO_PROG = impls/bash/$($(1)).sh
basic_STEP_TO_PROG = $(basic_STEP_TO_PROG_$(basic_MODE))
bbc-basic_STEP_TO_PROG = impls/bbc-basic/$($(1)).bas
c_STEP_TO_PROG = impls/c/$($(1))
chuck_STEP_TO_PROG = impls/chuck/$($(1)).ck
clojure_STEP_TO_PROG = $(clojure_STEP_TO_PROG_$(clojure_MODE))
coffee_STEP_TO_PROG = impls/coffee/$($(1)).coffee
common-lisp_STEP_TO_PROG = impls/common-lisp/$($(1))
cpp_STEP_TO_PROG = impls/cpp/$($(1))
crystal_STEP_TO_PROG = impls/crystal/$($(1))
cs_STEP_TO_PROG = impls/cs/$($(1)).exe
d_STEP_TO_PROG = impls/d/$($(1))
dart_STEP_TO_PROG = impls/dart/$($(1)).dart
elisp_STEP_TO_PROG = impls/elisp/$($(1)).el
elixir_STEP_TO_PROG = impls/elixir/lib/mix/tasks/$($(1)).ex
elm_STEP_TO_PROG = impls/elm/$($(1)).js
erlang_STEP_TO_PROG = impls/erlang/$($(1))
es6_STEP_TO_PROG = impls/es6/$($(1)).mjs
factor_STEP_TO_PROG = impls/factor/$($(1))/$($(1)).factor
fantom_STEP_TO_PROG = impls/fantom/lib/fan/$($(1)).pod
forth_STEP_TO_PROG = impls/forth/$($(1)).fs
fsharp_STEP_TO_PROG = impls/fsharp/$($(1)).exe
go_STEP_TO_PROG = impls/go/$($(1))
groovy_STEP_TO_PROG = impls/groovy/$($(1)).groovy
gnu-smalltalk_STEP_TO_PROG = impls/gnu-smalltalk/$($(1)).st
guile_STEP_TO_PROG = impls/guile/$($(1)).scm
haskell_STEP_TO_PROG = impls/haskell/$($(1))
haxe_STEP_TO_PROG = $(haxe_STEP_TO_PROG_$(haxe_MODE))
hy_STEP_TO_PROG = impls/hy/$($(1)).hy
io_STEP_TO_PROG = impls/io/$($(1)).io
java_STEP_TO_PROG = impls/java/target/classes/mal/$($(1)).class
js_STEP_TO_PROG = impls/js/$($(1)).js
jq_STEP_PROG = impls/jq/$($(1)).jq
julia_STEP_TO_PROG = impls/julia/$($(1)).jl
kotlin_STEP_TO_PROG = impls/kotlin/$($(1)).jar
livescript_STEP_TO_PROG = impls/livescript/$($(1)).js
logo_STEP_TO_PROG = impls/logo/$($(1)).lg
lua_STEP_TO_PROG = impls/lua/$($(1)).lua
make_STEP_TO_PROG = impls/make/$($(1)).mk
mal_STEP_TO_PROG = impls/mal/$($(1)).mal
matlab_STEP_TO_PROG = impls/matlab/$($(1)).m
miniMAL_STEP_TO_PROG = impls/miniMAL/$($(1)).json
nasm_STEP_TO_PROG = impls/nasm/$($(1))
nim_STEP_TO_PROG = impls/nim/$($(1))
objc_STEP_TO_PROG = impls/objc/$($(1))
objpascal_STEP_TO_PROG = impls/objpascal/$($(1))
ocaml_STEP_TO_PROG = impls/ocaml/$($(1))
perl_STEP_TO_PROG = impls/perl/$($(1)).pl
perl6_STEP_TO_PROG = impls/perl6/$($(1)).pl
php_STEP_TO_PROG = impls/php/$($(1)).php
picolisp_STEP_TO_PROG = impls/picolisp/$($(1)).l
pike_STEP_TO_PROG = impls/pike/$($(1)).pike
plpgsql_STEP_TO_PROG = impls/plpgsql/$($(1)).sql
plsql_STEP_TO_PROG = impls/plsql/$($(1)).sql
powershell_STEP_TO_PROG = impls/powershell/$($(1)).ps1
ps_STEP_TO_PROG = impls/ps/$($(1)).ps
python_STEP_TO_PROG = impls/python/$($(1)).py
python.2_STEP_TO_PROG = impls/python.2/$($(1)).py
r_STEP_TO_PROG = impls/r/$($(1)).r
racket_STEP_TO_PROG = impls/racket/$($(1)).rkt
rexx_STEP_TO_PROG = impls/rexx/$($(1)).rexxpp
rpython_STEP_TO_PROG = impls/rpython/$($(1))
ruby_STEP_TO_PROG = impls/ruby/$($(1)).rb
rust_STEP_TO_PROG = impls/rust/$($(1))
scala_STEP_TO_PROG = impls/scala/target/scala-2.11/classes/$($(1)).class
scheme_STEP_TO_PROG = $(scheme_STEP_TO_PROG_$(scheme_MODE))
skew_STEP_TO_PROG = impls/skew/$($(1)).js
swift_STEP_TO_PROG = impls/swift/$($(1))
swift3_STEP_TO_PROG = impls/swift3/$($(1))
swift4_STEP_TO_PROG = impls/swift4/$($(1))
swift5_STEP_TO_PROG = impls/swift5/$($(1))
tcl_STEP_TO_PROG = impls/tcl/$($(1)).tcl
ts_STEP_TO_PROG = impls/ts/$($(1)).js
vala_STEP_TO_PROG = impls/vala/$($(1))
vb_STEP_TO_PROG = impls/vb/$($(1)).exe
vhdl_STEP_TO_PROG = impls/vhdl/$($(1))
vimscript_STEP_TO_PROG = impls/vimscript/$($(1)).vim
wasm_STEP_TO_PROG = impls/wasm/$($(1)).$(if $(filter lucet,$(wasm_MODE)),so,wasm)
wren_STEP_TO_PROG = impls/wren/$($(1)).wren
yorick_STEP_TO_PROG = impls/yorick/$($(1)).i
zig_STEP_TO_PROG = impls/zig/$($(1))
#
# General settings and utility functions
@ -290,7 +290,7 @@ STEP_TEST_FILES = $(strip $(wildcard \
$(filter-out $(if $(filter $(1),$(step5_EXCLUDES)),step5,),\
$(regress_$(2)))\
,$(2)),\
$(1)/tests/$($(s))$(EXTENSION) tests/$($(s))$(EXTENSION))))
impls/$(1)/tests/$($(s))$(EXTENSION) impls/tests/$($(s))$(EXTENSION))))
# DOCKERIZE utility functions
lc = $(subst A,a,$(subst B,b,$(subst C,c,$(subst D,d,$(subst E,e,$(subst F,f,$(subst G,g,$(subst H,h,$(subst I,i,$(subst J,j,$(subst K,k,$(subst L,l,$(subst M,m,$(subst N,n,$(subst O,o,$(subst P,p,$(subst Q,q,$(subst R,r,$(subst S,s,$(subst T,t,$(subst U,u,$(subst V,v,$(subst W,w,$(subst X,x,$(subst Y,y,$(subst Z,z,$1))))))))))))))))))))))))))
@ -307,13 +307,13 @@ get_build_command = $(strip $(foreach mode,$(1)_MODE, \
docker run \
-it --rm -u $(shell id -u) \
-v $(dir $(abspath $(lastword $(MAKEFILE_LIST)))):/mal \
-w /mal/$(1) \
-w /mal/impls/$(1) \
$(if $(strip $($(mode))),-e $(mode)=$($(mode)),) \
$(if $(filter factor,$(1)),-e FACTOR_ROOTS=$(FACTOR_ROOTS),) \
$(call impl_to_image,$(1)) \
$(MAKE) $(if $(strip $($(mode))),$(mode)=$($(mode)),) \
,\
$(MAKE) $(if $(strip $($(mode))),$(mode)=$($(mode)),) -C $(impl))))
$(MAKE) $(if $(strip $($(mode))),$(mode)=$($(mode)),) -C impls/$(impl))))
# Takes impl and step args. Optional env vars and dockerize args
# Returns a command prefix (docker command and environment variables)
@ -323,7 +323,7 @@ get_run_prefix = $(strip $(foreach mode,$(call actual_impl,$(1))_MODE, \
docker run -e STEP=$($2) -e MAL_IMPL=$(MAL_IMPL) \
-it --rm -u $(shell id -u) \
-v $(dir $(abspath $(lastword $(MAKEFILE_LIST)))):/mal \
-w /mal/$(call actual_impl,$(1)) \
-w /mal/impls/$(call actual_impl,$(1)) \
$(if $(strip $($(mode))),-e $(mode)=$($(mode)),) \
$(if $(filter factor,$(1)),-e FACTOR_ROOTS=$(FACTOR_ROOTS),) \
$(foreach env,$(3),-e $(env)) \
@ -337,11 +337,11 @@ get_run_prefix = $(strip $(foreach mode,$(call actual_impl,$(1))_MODE, \
# Takes impl and step
# Returns the runtest command prefix (with runtest options) for testing the given step
get_runtest_cmd = $(call get_run_prefix,$(1),$(2),$(if $(filter cs fsharp mal tcl vb,$(1)),RAW=1,)) \
../runtest.py $(opt_HARD) $(opt_DEFERRABLE) $(opt_OPTIONAL) $(call $(1)_TEST_OPTS) $(TEST_OPTS)
../../runtest.py $(opt_HARD) $(opt_DEFERRABLE) $(opt_OPTIONAL) $(call $(1)_TEST_OPTS) $(TEST_OPTS)
# Takes impl and step
# Returns the runtest command prefix (with runtest options) for testing the given step
get_argvtest_cmd = $(call get_run_prefix,$(1),$(2)) ../run_argv_test.sh
get_argvtest_cmd = $(call get_run_prefix,$(1),$(2)) ../tests/run_argv_test.sh
# Derived lists
STEPS = $(sort $(filter-out %_EXCLUDES,$(filter step%,$(.VARIABLES))))
@ -382,10 +382,10 @@ ALL_REPL = $(strip $(sort \
# encoded in the implementation Makefile not here
.PHONY: $(foreach i,$(DO_IMPLS),$(foreach s,$(STEPS),$(call $(i)_STEP_TO_PROG,$(s))))
$(foreach i,$(DO_IMPLS),$(foreach s,$(STEPS),$(call $(i)_STEP_TO_PROG,$(s)))):
$(foreach impl,$(word 1,$(subst /, ,$(@))),\
$(foreach impl,$(word 2,$(subst /, ,$(@))),\
$(if $(DOCKERIZE), \
$(call get_build_command,$(impl)) $(patsubst $(impl)/%,%,$(@)), \
$(call get_build_command,$(impl)) $(subst $(impl)/,,$(@))))
$(call get_build_command,$(impl)) $(patsubst impls/$(impl)/%,%,$(@)), \
$(call get_build_command,$(impl)) $(subst impls/$(impl)/,,$(@))))
# Allow IMPL, build^IMPL, IMPL^STEP, and build^IMPL^STEP
$(DO_IMPLS): $$(foreach s,$$(STEPS),$$(call $$(@)_STEP_TO_PROG,$$(s)))
@ -405,8 +405,9 @@ $(foreach i,$(DO_IMPLS),$(foreach s,$(STEPS),build^$(i)^$(s))): $$(call $$(word
$(ALL_TESTS): $$(call $$(word 2,$$(subst ^, ,$$(@)))_STEP_TO_PROG,$$(word 3,$$(subst ^, ,$$(@))))
@$(foreach impl,$(word 2,$(subst ^, ,$(@))),\
$(foreach step,$(word 3,$(subst ^, ,$(@))),\
cd $(call actual_impl,$(impl)) && \
$(foreach test,$(call STEP_TEST_FILES,$(impl),$(step)),\
echo "(call STEP_TEST_FILES,$(impl),$(step)): $(call STEP_TEST_FILES,$(impl),$(step))" && \
cd impls/$(call actual_impl,$(impl)) && \
$(foreach test,$(patsubst impls/%,%,$(call STEP_TEST_FILES,$(impl),$(step))),\
echo '----------------------------------------------' && \
echo 'Testing $@; step file: $+, test file: $(test)' && \
echo 'Running: $(call get_runtest_cmd,$(impl),$(step)) ../$(test) -- ../$(impl)/run' && \
@ -438,7 +439,7 @@ $(DOCKER_BUILD):
@echo "----------------------------------------------"; \
$(foreach impl,$(word 2,$(subst ^, ,$(@))),\
echo "Running: docker build -t $(call impl_to_image,$(impl)) .:"; \
cd $(impl) && docker build -t $(call impl_to_image,$(impl)) .)
cd impls/$(impl) && docker build -t $(call impl_to_image,$(impl)) .)
#
# Docker shell rules
@ -460,7 +461,7 @@ perf: $(IMPL_PERF)
$(IMPL_PERF):
@echo "----------------------------------------------"; \
$(foreach impl,$(word 2,$(subst ^, ,$(@))),\
cd $(call actual_impl,$(impl)); \
cd impls/$(call actual_impl,$(impl)); \
echo "Performance test for $(impl):"; \
echo 'Running: $(call get_run_prefix,$(impl),stepA) ../$(impl)/run ../tests/perf1.mal'; \
$(call get_run_prefix,$(impl),stepA) ../$(impl)/run ../tests/perf1.mal; \
@ -477,7 +478,7 @@ $(IMPL_PERF):
$(ALL_REPL): $$(call $$(word 2,$$(subst ^, ,$$(@)))_STEP_TO_PROG,$$(word 3,$$(subst ^, ,$$(@))))
@$(foreach impl,$(word 2,$(subst ^, ,$(@))),\
$(foreach step,$(word 3,$(subst ^, ,$(@))),\
cd $(call actual_impl,$(impl)); \
cd impls/$(call actual_impl,$(impl)); \
echo 'REPL implementation $(impl), step file: $+'; \
echo 'Running: $(call get_run_prefix,$(impl),$(step)) ../$(impl)/run $(RUN_ARGS)'; \
$(call get_run_prefix,$(impl),$(step)) ../$(impl)/run $(RUN_ARGS);))
@ -496,7 +497,7 @@ stats: $(IMPL_STATS)
$(IMPL_STATS):
@$(foreach impl,$(word 2,$(subst ^, ,$(@))),\
echo "Stats for $(impl):"; \
$(LOCCOUNT) -x "[sS]tep[0-9]_.*|[.]md$$|tests|examples|Makefile|package.json|tsconfig.json|Cargo.toml|project.clj|node_modules|getline.cs|terminal.cs|elm-stuff|objpascal/regexpr|rdyncall|swift/templates" $(impl))
$(LOCCOUNT) -x "[sS]tep[0-9]_.*|[.]md$$|tests|examples|Makefile|package.json|tsconfig.json|Cargo.toml|project.clj|node_modules|getline.cs|terminal.cs|elm-stuff|objpascal/regexpr|rdyncall|swift/templates" impls/$(impl))
#
# Utility functions

240
README.md
View File

@ -6,7 +6,42 @@
**1. Mal is a Clojure inspired Lisp interpreter**
**2. Mal is implemented in 81 languages (84 different implementations and 104 runtime modes)**
**2. Mal is a learning tool**
Each implementation of mal is separated into
11 incremental, self-contained (and testable) steps that demonstrate
core concepts of Lisp. The last step is capable of self-hosting
(running the mal implementation of mal). See the [make-a-lisp process
guide](process/guide.md).
The make-a-lisp steps are:
* [step0_repl](process/guide.md#step0)
* [step1_read_print](process/guide.md#step1)
* [step2_eval](process/guide.md#step2)
* [step3_env](process/guide.md#step3)
* [step4_if_fn_do](process/guide.md#step4)
* [step5_tco](process/guide.md#step5)
* [step6_file](process/guide.md#step6)
* [step7_quote](process/guide.md#step7)
* [step8_macros](process/guide.md#step8)
* [step9_try](process/guide.md#step9)
* [stepA_mal](process/guide.md#stepA)
Each make-a-lisp step has an associated architectural diagram. That elements
that are new for that step are highlighted in red.
Here is the final diagram for [step A](process/guide.md#stepA):
![stepA_mal architecture](process/stepA_mal.png)
If you are interested in creating a mal implementation (or just
interested in using mal for something), please drop by the #mal
channel on freenode. In addition to the [make-a-lisp process
guide](process/guide.md) there is also a [mal/make-a-lisp
FAQ](docs/FAQ.md) where I attempt to answer some common questions.
**3. Mal is implemented in 81 languages (84 different implementations and 104 runtime modes)**
| Language | Creator |
| -------- | ------- |
@ -96,41 +131,6 @@
| [Zig](#zig) | [Josh Tobin](https://github.com/rjtobin) |
**3. Mal is a learning tool**
Each implementation of mal is separated into
11 incremental, self-contained (and testable) steps that demonstrate
core concepts of Lisp. The last step is capable of self-hosting
(running the mal implementation of mal). See the [make-a-lisp process
guide](process/guide.md).
The make-a-lisp steps are:
* [step0_repl](process/guide.md#step0)
* [step1_read_print](process/guide.md#step1)
* [step2_eval](process/guide.md#step2)
* [step3_env](process/guide.md#step3)
* [step4_if_fn_do](process/guide.md#step4)
* [step5_tco](process/guide.md#step5)
* [step6_file](process/guide.md#step6)
* [step7_quote](process/guide.md#step7)
* [step8_macros](process/guide.md#step8)
* [step9_try](process/guide.md#step9)
* [stepA_mal](process/guide.md#stepA)
Each make-a-lisp step has an associated architectural diagram. That elements
that are new for that step are highlighted in red.
Here is the final diagram for [step A](process/guide.md#stepA):
![stepA_mal architecture](process/stepA_mal.png)
If you are interested in creating a mal implementation (or just
interested in using mal for something), please drop by the #mal
channel on freenode. In addition to the [make-a-lisp process
guide](process/guide.md) there is also a [mal/make-a-lisp
FAQ](docs/FAQ.md) where I attempt to answer some common questions.
## Presentations
Mal was presented publicly for the first time in a lightning talk at
@ -197,7 +197,7 @@ GNAT and (optionally) make. There are no external dependencies
(readline not implemented).
```
cd ada
cd impls/ada
make
./stepX_YYY
```
@ -208,7 +208,7 @@ The second Ada implementation was developed with GNAT 8 and links with
the GNU readline library.
```
cd ada
cd impls/ada
make
./stepX_YYY
```
@ -218,14 +218,14 @@ make
The GNU awk implementation of mal has been tested with GNU awk 4.1.1.
```
cd gawk
cd impls/gawk
gawk -O -f stepX_YYY.awk
```
### Bash 4
```
cd bash
cd impls/bash
bash stepX_YYY.sh
```
@ -241,7 +241,7 @@ has been tested with [qb64](http://www.qb64.net/).
Generate C64 code and run it using cbmbasic:
```
cd basic
cd impls/basic
make stepX_YYY.bas
STEP=stepX_YYY ./run
```
@ -249,7 +249,7 @@ STEP=stepX_YYY ./run
Generate QBasic code and load it into qb64:
```
cd basic
cd impls/basic
make MODE=qbasic stepX_YYY.bas
./qb64 stepX_YYY.bas
```
@ -262,7 +262,7 @@ inspiration for this implementation.
The BBC BASIC V implementation can run in the Brandy interpreter:
```
cd bbc-basic
cd impls/bbc-basic
brandy -quit stepX_YYY.bbc
```
@ -281,7 +281,7 @@ header packages): glib, libffi6, libgc, and either the libedit or GNU readline
library.
```
cd c
cd impls/c
make
./stepX_YYY
```
@ -293,7 +293,7 @@ a readline compatible library to build. See the `cpp/README.md` for
more details:
```
cd cpp
cd impls/cpp
make
# OR
make CXX=clang++-3.5
@ -308,7 +308,7 @@ C# compiler (mcs) and the Mono runtime (version 2.10.8.1). Both are
required to build and run the C# implementation.
```
cd cs
cd impls/cs
make
mono ./stepX_YYY.exe
```
@ -318,7 +318,7 @@ mono ./stepX_YYY.exe
The ChucK implementation has been tested with ChucK 1.3.5.2.
```
cd chuck
cd impls/chuck
./run
```
@ -328,7 +328,7 @@ For the most part the Clojure implementation requires Clojure 1.5,
however, to pass all tests, Clojure 1.8.0-RC4 is required.
```
cd clojure
cd impls/clojure
lein with-profile +stepX trampoline run
```
@ -336,7 +336,7 @@ lein with-profile +stepX trampoline run
```
sudo npm install -g coffee-script
cd coffee
cd impls/coffee
coffee ./stepX_YYY
```
@ -348,7 +348,7 @@ the [README](common-lisp/README.org) for more details. Provided you have the
dependencies mentioned installed, do the following to run the implementation
```
cd common-lisp
cd impls/common-lisp
make
./run
```
@ -358,7 +358,7 @@ make
The Crystal implementation of mal has been tested with Crystal 0.26.1.
```
cd crystal
cd impls/crystal
crystal run ./stepX_YYY.cr
# OR
make # needed to run tests
@ -371,7 +371,7 @@ The D implementation of mal was tested with GDC 4.8. It requires the GNU
readline library.
```
cd d
cd impls/d
make
./stepX_YYY
```
@ -381,7 +381,7 @@ make
The Dart implementation has been tested with Dart 1.20.
```
cd dart
cd impls/dart
dart ./stepX_YYY
```
@ -393,7 +393,7 @@ and `C-d` work, `C-c` cancels the process), it is recommended to use
`rlwrap`.
```
cd elisp
cd impls/elisp
emacs -Q --batch --load stepX_YYY.el
# with full readline support
rlwrap emacs -Q --batch --load stepX_YYY.el
@ -404,7 +404,7 @@ rlwrap emacs -Q --batch --load stepX_YYY.el
The Elixir implementation of mal has been tested with Elixir 1.0.5.
```
cd elixir
cd impls/elixir
mix stepX_YYY
# Or with readline/line editing functionality:
iex -S mix stepX_YYY
@ -415,7 +415,7 @@ iex -S mix stepX_YYY
The Elm implementation of mal has been tested with Elm 0.18.0
```
cd elm
cd impls/elm
make stepX_YYY.js
STEP=stepX_YYY ./run
```
@ -426,7 +426,7 @@ The Erlang implementation of mal requires [Erlang/OTP R17](http://www.erlang.org
and [rebar](https://github.com/rebar/rebar) to build.
```
cd erlang
cd impls/erlang
make
# OR
MAL_STEP=stepX_YYY rebar compile escriptize # build individual step
@ -440,7 +440,7 @@ The ES6 / ECMAScript 2015 implementation uses the
JavaScript. The generated code has been tested with Node 0.12.4.
```
cd es6
cd impls/es6
make
node build/stepX_YYY.js
```
@ -454,7 +454,7 @@ compiler (mcs) is also necessary to compile the readline dependency. All are
required to build and run the F# implementation.
```
cd fsharp
cd impls/fsharp
make
mono ./stepX_YYY.exe
```
@ -465,7 +465,7 @@ The Factor implementation of mal has been tested with Factor 0.97
([factorcode.org](http://factorcode.org)).
```
cd factor
cd impls/factor
FACTOR_ROOTS=. factor -run=stepX_YYY
```
@ -474,7 +474,7 @@ FACTOR_ROOTS=. factor -run=stepX_YYY
The Fantom implementation of mal has been tested with Fantom 1.0.70.
```
cd fantom
cd impls/fantom
make lib/fan/stepX_YYY.pod
STEP=stepX_YYY ./run
```
@ -482,14 +482,14 @@ STEP=stepX_YYY ./run
### Forth
```
cd forth
cd impls/forth
gforth stepX_YYY.fs
```
### GNU Guile 2.1+
```
cd guile
cd impls/guile
guile -L ./ stepX_YYY.scm
```
@ -498,7 +498,7 @@ guile -L ./ stepX_YYY.scm
The Smalltalk implementation of mal has been tested with GNU Smalltalk 3.2.91.
```
cd gnu-smalltalk
cd impls/gnu-smalltalk
./run
```
@ -508,7 +508,7 @@ The Go implementation of mal requires that go is installed on on the
path. The implementation has been tested with Go 1.3.1.
```
cd go
cd impls/go
make
./stepX_YYY
```
@ -520,7 +520,7 @@ The Groovy implementation of mal requires Groovy to run and has been
tested with Groovy 1.8.6.
```
cd groovy
cd impls/groovy
make
groovy ./stepX_YYY.groovy
```
@ -531,7 +531,7 @@ The Haskell implementation requires the ghc compiler version 7.10.1 or
later and also the Haskell parsec and readline (or editline) packages.
```
cd haskell
cd impls/haskell
make
./stepX_YYY
```
@ -543,7 +543,7 @@ Four different Haxe targets are supported: Neko, Python, C++, and
JavaScript.
```
cd haxe
cd impls/haxe
# Neko
make all-neko
neko ./stepX_YYY.n
@ -563,7 +563,7 @@ node ./stepX_YYY.js
The Hy implementation of mal has been tested with Hy 0.13.0.
```
cd hy
cd impls/hy
./stepX_YYY.hy
```
@ -572,7 +572,7 @@ cd hy
The Io implementation of mal has been tested with Io version 20110905.
```
cd io
cd impls/io
io ./stepX_YYY.io
```
@ -581,7 +581,7 @@ io ./stepX_YYY.io
The Java implementation of mal requires maven2 to build.
```
cd java
cd impls/java
mvn compile
mvn -quiet exec:java -Dexec.mainClass=mal.stepX_YYY
# OR
@ -591,7 +591,7 @@ mvn -quiet exec:java -Dexec.mainClass=mal.stepX_YYY -Dexec.args="CMDLINE_ARGS"
### JavaScript/Node
```
cd js
cd impls/js
npm install
node stepX_YYY.js
```
@ -601,7 +601,7 @@ node stepX_YYY.js
The Julia implementation of mal requires Julia 0.4.
```
cd julia
cd impls/julia
julia stepX_YYY.jl
```
@ -610,7 +610,7 @@ julia stepX_YYY.jl
Tested against version 1.6, with a lot of cheating in the IO department
```
cd jq
cd impls/jq
STEP=stepA_YYY ./run
# with Debug
DEBUG=true STEP=stepA_YYY ./run
@ -621,7 +621,7 @@ DEBUG=true STEP=stepA_YYY ./run
The Kotlin implementation of mal has been tested with Kotlin 1.0.
```
cd kotlin
cd impls/kotlin
make
java -jar stepX_YYY.jar
```
@ -631,7 +631,7 @@ java -jar stepX_YYY.jar
The LiveScript implementation of mal has been tested with LiveScript 1.5.
```
cd livescript
cd impls/livescript
make
node_modules/.bin/lsc stepX_YYY.ls
```
@ -641,7 +641,7 @@ node_modules/.bin/lsc stepX_YYY.ls
The Logo implementation of mal has been tested with UCBLogo 6.0.
```
cd logo
cd impls/logo
logo stepX_YYY.lg
```
@ -652,7 +652,7 @@ implementation requires that luarocks and the lua-rex-pcre library
are installed.
```
cd lua
cd impls/lua
make # to build and link linenoise.so
./stepX_YYY.lua
```
@ -664,7 +664,7 @@ the other implementations and passing the mal step to run as a command
line argument.
```
cd IMPL
cd impls/IMPL
IMPL_STEPA_CMD ../mal/stepX_YYY.mal
```
@ -672,7 +672,7 @@ IMPL_STEPA_CMD ../mal/stepX_YYY.mal
### GNU Make 3.81
```
cd make
cd impls/make
make -f stepX_YYY.mk
```
@ -682,7 +682,7 @@ The NASM implementation of mal is written for x86-64 Linux, and has been tested
with Linux 3.16.0-4-amd64 and NASM version 2.11.05.
```
cd nasm
cd impls/nasm
make
./stepX_YYY
```
@ -692,7 +692,7 @@ make
The Nim implementation of mal has been tested with Nim 1.0.4.
```
cd nim
cd impls/nim
make
# OR
nimble build
@ -705,7 +705,7 @@ The Object Pascal implementation of mal has been built and tested on
Linux using the Free Pascal compiler version 2.6.2 and 2.6.4.
```
cd objpascal
cd impls/objpascal
make
./stepX_YYY
```
@ -717,7 +717,7 @@ Linux using clang/LLVM 3.6. It has also been built and tested on OS
X using XCode 7.
```
cd objc
cd impls/objc
make
./stepX_YYY
```
@ -725,7 +725,7 @@ make
### OCaml 4.01.0
```
cd ocaml
cd impls/ocaml
make
./stepX_YYY
```
@ -737,7 +737,7 @@ It has also been tested with MATLAB version R2014a on Linux. Note that
MATLAB is a commercial product.
```
cd matlab
cd impls/matlab
./stepX_YYY
octave -q --no-gui --no-history --eval "stepX_YYY();quit;"
matlab -nodisplay -nosplash -nodesktop -nojvm -r "stepX_YYY();quit;"
@ -753,7 +753,7 @@ implemented in less than 1024 bytes of JavaScript. To run the miniMAL
implementation of mal you need to download/install the miniMAL
interpreter (which requires Node.js).
```
cd miniMAL
cd impls/miniMAL
# Download miniMAL and dependencies
npm install
export PATH=`pwd`/node_modules/minimal-lisp/:$PATH
@ -769,7 +769,7 @@ For readline line editing support, install Term::ReadLine::Perl or
Term::ReadLine::Gnu from CPAN.
```
cd perl
cd impls/perl
perl stepX_YYY.pl
```
@ -778,7 +778,7 @@ perl stepX_YYY.pl
The Perl 6 implementation was tested on Rakudo Perl 6 2016.04.
```
cd perl6
cd impls/perl6
perl6 stepX_YYY.pl
```
@ -788,7 +788,7 @@ The PHP implementation of mal requires the php command line interface
to run.
```
cd php
cd impls/php
php stepX_YYY.php
```
@ -798,7 +798,7 @@ The Picolisp implementation requires libreadline and Picolisp 3.1.11
or later.
```
cd picolisp
cd impls/picolisp
./run
```
@ -807,7 +807,7 @@ cd picolisp
The Pike implementation was tested on Pike 8.0.
```
cd pike
cd impls/pike
pike stepX_YYY.pike
```
@ -824,7 +824,7 @@ using the PGPASSWORD environment variable. The implementation has been
tested with PostgreSQL 9.4.
```
cd plpgsql
cd impls/plpgsql
./wrap.sh stepX_YYY.sql
# OR
PSQL_USER=myuser PGPASSWORD=mypass ./wrap.sh stepX_YYY.sql
@ -844,7 +844,7 @@ warnings (user password expiration, etc) will interfere with the
ability of the wrapper script to communicate with the DB.
```
cd plsql
cd impls/plsql
./wrap.sh stepX_YYY.sql
# OR
ORACLE_LOGON=myuser/mypass@ORCL ./wrap.sh stepX_YYY.sql
@ -856,7 +856,7 @@ The PostScript implementation of mal requires Ghostscript to run. It
has been tested with Ghostscript 9.10.
```
cd ps
cd impls/ps
gs -q -dNODISPLAY -I./ stepX_YYY.ps
```
@ -866,14 +866,14 @@ The PowerShell implementation of mal requires the PowerShell script
language. It has been tested with PowerShell 6.0.0 Alpha 9 on Linux.
```
cd powershell
cd impls/powershell
powershell ./stepX_YYY.ps1
```
### Python (2.X and 3.X)
```
cd python
cd impls/python
python stepX_YYY.py
```
@ -893,7 +893,7 @@ You must have [rpython](https://rpython.readthedocs.org/) on your path
(included with [pypy](https://bitbucket.org/pypy/pypy/)).
```
cd rpython
cd impls/rpython
make # this takes a very long time
./stepX_YYY
```
@ -903,7 +903,7 @@ make # this takes a very long time
The R implementation of mal requires R (r-base-core) to run.
```
cd r
cd impls/r
make libs # to download and build rdyncall
Rscript stepX_YYY.r
```
@ -914,7 +914,7 @@ The Racket implementation of mal requires the Racket
compiler/interpreter to run.
```
cd racket
cd impls/racket
./stepX_YYY.rkt
```
@ -923,7 +923,7 @@ cd racket
The Rexx implementation of mal has been tested with Regina Rexx 3.6.
```
cd rexx
cd impls/rexx
make
rexx -a ./stepX_YYY.rexxpp
```
@ -931,7 +931,7 @@ rexx -a ./stepX_YYY.rexxpp
### Ruby (1.9+)
```
cd ruby
cd impls/ruby
ruby stepX_YYY.rb
```
@ -941,7 +941,7 @@ The rust implementation of mal requires the rust compiler and build
tool (cargo) to build.
```
cd rust
cd impls/rust
cargo run --release --bin stepX_YYY
```
@ -950,7 +950,7 @@ cargo run --release --bin stepX_YYY
Install scala and sbt (http://www.scala-sbt.org/0.13/tutorial/Installing-sbt-on-Linux.html):
```
cd scala
cd impls/scala
sbt 'run-main stepX_YYY'
# OR
sbt compile
@ -967,7 +967,7 @@ after figuring out how libraries are loaded and adjusting the
`Makefile` and `run` script accordingly.
```
cd scheme
cd impls/scheme
make symlinks
# chibi
scheme_MODE=chibi ./run
@ -993,7 +993,7 @@ scheme_MODE=foment ./run
The Skew implementation of mal has been tested with Skew 0.7.42.
```
cd skew
cd impls/skew
make
node stepX_YYY.js
```
@ -1006,7 +1006,7 @@ The Swift implementation of mal requires the Swift 2.0 compiler (XCode
language and standard library.
```
cd swift
cd impls/swift
make
./stepX_YYY
```
@ -1017,7 +1017,7 @@ The Swift 3 implementation of mal requires the Swift 3.0 compiler. It
has been tested with Swift 3 Preview 3.
```
cd swift3
cd impls/swift3
make
./stepX_YYY
```
@ -1028,7 +1028,7 @@ The Swift 4 implementation of mal requires the Swift 4.0 compiler. It
has been tested with Swift 4.2.3 release.
```
cd swift4
cd impls/swift4
make
./stepX_YYY
```
@ -1039,7 +1039,7 @@ The Swift 5 implementation of mal requires the Swift 5.0 compiler. It
has been tested with Swift 5.1.1 release.
```
cd swift5
cd impls/swift5
swift run stepX_YYY
```
@ -1049,7 +1049,7 @@ The Tcl implementation of mal requires Tcl 8.6 to run. For readline line
editing support, install tclreadline.
```
cd tcl
cd impls/tcl
tclsh ./stepX_YYY.tcl
```
@ -1059,7 +1059,7 @@ The TypeScript implementation of mal requires the TypeScript 2.2 compiler.
It has been tested with Node.js v6.
```
cd ts
cd impls/ts
make
node ./stepX_YYY.js
```
@ -1071,7 +1071,7 @@ compiler. You will need to install `valac` and `libreadline-dev` or
equivalent.
```
cd vala
cd impls/vala
make
./stepX_YYY
```
@ -1081,7 +1081,7 @@ make
The VHDL implementation of mal has been tested with GHDL 0.29.
```
cd vhdl
cd impls/vhdl
make
./run_vhdl.sh ./stepX_YYY
```
@ -1091,7 +1091,7 @@ make
The Vimscript implementation of mal requires Vim 8.0 to run.
```
cd vimscript
cd impls/vimscript
./run_vimscript.sh ./stepX_YYY.vim
```
@ -1102,7 +1102,7 @@ VB compiler (vbnc) and the Mono runtime (version 2.10.8.1). Both are
required to build and run the VB.NET implementation.
```
cd vb
cd impls/vb
make
mono ./stepX_YYY.exe
```
@ -1121,7 +1121,7 @@ runs under several different non-web embeddings (runtimes):
[warpy](https://github.com/kanaka/warpy).
```
cd wasm
cd impls/wasm
# node
make wasm_MODE=node
./run.js ./stepX_YYY.wasm
@ -1150,7 +1150,7 @@ warpy --argv --memory-pages 256 ./stepX_YYY.wasm
The Wren implementation of mal was tested on Wren 0.2.0.
```
cd wren
cd impls/wren
wren ./stepX_YYY.wren
```
@ -1159,7 +1159,7 @@ wren ./stepX_YYY.wren
The Yorick implementation of mal was tested on Yorick 2.2.04.
```
cd yorick
cd impls/yorick
yorick -batch ./stepX_YYY.i
```
@ -1168,7 +1168,7 @@ yorick -batch ./stepX_YYY.i
The Zig implementation of mal was tested on Zig 0.5.
```
cd zig
cd impls/zig
zig build stepX_YYY
```

149
impls/.gitignore vendored Normal file
View File

@ -0,0 +1,149 @@
.DS_Store
.bash_history
.cache
.cargo
.config
.mal-history
.crystal
.lein
.m2
.ivy2
.sbt
.npm
.node-gyp
package-lock.json
.elm
*/experiments
*/node_modules
*.o
*.pyc
*/step0_repl
*/step1_read_print
*/step2_eval
*/step3_env
*/step4_if_fn_do
*/step5_tco
*/step6_file
*/step7_quote
*/step8_macros
*/step9_try
*/stepA_mal
*/mal
*/notes
logs
old
ada/obj/
awk/mal.awk
bash/mal.sh
clojure/mal.jar
clojure/target
clojure/.lein-repl-history
coffee/mal.coffee
cs/*.exe
cs/*.dll
cs/*.mdb
d/*.o
elixir/_build
elixir/deps
elixir/erl_crash.dump
elixir/*.ez
erlang/ebin
erlang/.rebar
erlang/src/*.beam
es6/mal.js
es6/.esm-cache
factor/mal.factor
fantom/lib
forth/mal.fs
fsharp/*.exe
fsharp/*.dll
fsharp/*.mdb
go/step*
groovy/*.class
groovy/mal.jar
haskell/*.hi
haskell/*.o
haxe/*.n
haxe/*.py
haxe/cpp/
haxe/*.js
java/mal.jar
java/target/
java/dependency-reduced-pom.xml
.npm/
.node-gyp/
js/mal.js
js/web/mal.js
kotlin/*.jar
kotlin/.idea
kotlin/*.iml
lua/lib
lua/linenoise.so
lua/mal.lua
make/mal.mk
mal/mal.mal
matlab/octave-workspace
miniMAL/mal.json
nim/nimcache*
objc/*.d
ocaml/*.cmi
ocaml/*.cmo
ocaml/*.swp
ocaml/*.cmx
ocaml/*.o
ocaml/mal_lib.*
objpascal/*.o
objpascal/*.ppu
objpascal/pas-readline
objpascal/regexpr/Source/RegExpr.ppu
perl/mal.pl
perl6/.precomp/
php/mal.php
php/mal-web.php
ps/mal.ps
python/mal.pyz
r/mal.r
ruby/mal.rb
.cargo/
rust/target/
rust/Cargo.lock
rust/.cargo
r/lib
scala/mal.jar
scala/target
scala/project
skew/*.js
tcl/mal.tcl
vb/*.exe
vb/*.dll
vimscript/mal.vim
clisp/*.fas
clisp/*.lib
basic/step0_repl.bas
basic/step1_read_print.bas
basic/step2_eval.bas
basic/step3_env.bas
basic/step4_if_fn_do.bas
basic/step5_tco.bas
basic/step6_file.bas
basic/step7_quote.bas
basic/step8_macros.bas
basic/step9_try.bas
basic/stepA_mal.bas
basic/*.prg
common-lisp/*.fasl
common-lisp/*.lib
common-lisp/images/*
common-lisp/hist/*
livescript/*.js
!livescript/node_readline.js
livescript/node_modules
elm/node_modules
elm/elm-stuff
elm/*.js
!elm/node_readline.js
!elm/bootstrap.js
wasm/*.wat
wasm/*.wasm

Some files were not shown because too many files have changed in this diff Show More