Add an implementation written in Vala.
authorSimon Tatham <anakin@pobox.com>
Fri, 10 May 2019 08:34:20 +0000 (09:34 +0100)
committerSimon Tatham <anakin@pobox.com>
Fri, 10 May 2019 08:41:11 +0000 (09:41 +0100)
commit213a3288757985d29a11dc4849f4f9d228b71867
tree9eaa01090dc831350bc2af01bf84bc3d4de85364
parentda39e01bf336b2b4e6fdcd5bc4272c132647a57a
Add an implementation written in Vala.

I needed to learn Vala in order to work on an existing program written
in it, and since Ben Harris had been enthusing about mal to me
recently, I thought this would be a good way to learn the language.

In other words, this is my first Vala project, so I can't promise it's
perfectly idiomatic by the standards of experienced Vala programmers!

Also, the style isn't all that consistent. For example, sometimes I
implement a function for every value type by adding a method to the
Mal.Val base class, and sometimes instead I do it by having a function
(e.g. pr_str) dynamically test all the possible subtypes in a chain of
else-ifs.

Those decisions were partly because of the source file structure
required by this project (pr_str is supposed to live in its own file);
partly because for my own learning goals I wanted to try both
strategies and find out how easy they both were; and mostly just
because of indecision and bad planning.
23 files changed:
Makefile
README.md
vala/.gitignore [new file with mode: 0644]
vala/Dockerfile [new file with mode: 0644]
vala/Makefile [new file with mode: 0644]
vala/README.md [new file with mode: 0644]
vala/core.vala [new file with mode: 0644]
vala/env.vala [new file with mode: 0644]
vala/printer.vala [new file with mode: 0644]
vala/reader.vala [new file with mode: 0644]
vala/run [new file with mode: 0755]
vala/step0_repl.vala [new file with mode: 0644]
vala/step1_read_print.vala [new file with mode: 0644]
vala/step2_eval.vala [new file with mode: 0644]
vala/step3_env.vala [new file with mode: 0644]
vala/step4_if_fn_do.vala [new file with mode: 0644]
vala/step5_tco.vala [new file with mode: 0644]
vala/step6_file.vala [new file with mode: 0644]
vala/step7_quote.vala [new file with mode: 0644]
vala/step8_macros.vala [new file with mode: 0644]
vala/step9_try.vala [new file with mode: 0644]
vala/stepA_mal.vala [new file with mode: 0644]
vala/types.vala [new file with mode: 0644]