1
1
mirror of https://github.com/kanaka/mal.git synced 2024-09-21 02:27:10 +03:00
Commit Graph

42 Commits

Author SHA1 Message Date
Nicolas Boulenguez
fc7f8a4b00 Move test of eval builtin to step6. Fix nim implementation.
The test makes more sense in step6.
Thanks to kanaka for the read-string suggestion.

Introduction of tail call optimization in step5 was making let* affect
the parent environment. This was partially fixed in later steps.

Introduction of macros in step8 was breaking the evaluation of an
empty list. This was fixed by step 9 but never backported.
2019-02-03 15:31:00 +01:00
Joel Martin
4aa0ebdf47 Error on unterminated strings.
Add a step1 test to make sure that implementations are properly
throwing an error on unclosed strings.

Fix 47 implementations and update the guide to note the correct
behavior.
2019-01-25 16:16:06 -06:00
Joel Martin
dd7a4f55f3 Test uncaught throw, catchless try* . Fix 46 impls.
Fixes made to: ada, c, chuck, clojure, coffee, common-lisp, cpp,
crystal, d, dart, elm, erlang, es6, factor, fsharp, gnu-smalltalk,
groovy, guile, haxe, hy, js, livescript, matlab, miniMAL, nasm, nim,
objc, objpascal, ocaml, perl, perl6, php, plsql, ps, python, r,
rpython, ruby, scheme, swift3, tcl, ts, vb, vimscript, wasm, yorick.

Catchless try* test is an optional test. Not all implementations
support catchless try* but a number were fixed so they at least don't
crash on catchless try*.
2018-12-12 14:18:26 -06:00
Dov Murik
c1709fad0b d, nim: Add number?, fn?, macro? 2017-10-16 21:56:21 +00:00
Joel Martin
42aecee642 Fix unescaping in cs, hy, nim, objpascal, ps, rpython, vb 2017-09-28 07:40:47 -05:00
Dennis Felsing
4603f2a931 Update to Nim 0.17.0 2017-05-23 19:07:34 +02:00
Joel Martin
2c0c033bfc Go, Kotlin, Nim, ObjC, RPython: update Dockerfiles.
- Fix Nim IOError handling issue introduced by update.
2017-02-11 00:12:37 -06:00
Dennis Felsing
4dab2092b0 Update Nim to 0.15.2, clean up compiler warnings 2016-10-28 12:02:21 +02:00
Joel Martin
20e8dea043 Refactor to use run scripts, remove *_RUNSTEP
- Add */run script for every implementation.

- Refactor Clojure build to allow individual jar files for each step.

- Update FFI version for es6 and miniMAL to work with newer node
  versions.

The run scripts for the following could use some additional
refactoring:
- java: build individual step jar, use java -jar instead of mvn to run
- plpgsql: maybe combine plpgsql/run and plpgsql/wrap.sh
- vhdl: combine vhdl/run and vhdl/run_vhdl.sh
- vimscript: combine vimscript/run and vimscript/run_vimscript.sh
2016-05-18 22:29:18 -07:00
Joel Martin
efa2daef57 Fix empty list eval in step2 for most languages.
I think the only remaining ones are ada, elisp, factor, and rust.
2016-04-02 18:40:49 -05:00
Dov Murik
920963d69f nim: Fix crash on literal empty list
Issue #190
2016-03-30 09:18:31 -04:00
Joel Martin
dca6b58578 Tests: move step5 non-TCO tests to per impl.
- Remove most of the step5 excludes in the Makefile except for ones
  which don't have TCO capability at all (or the implementation is too
  slow): bash, make, mal, matlab.

- Make perf_EXCLUDES consistent with other excludes.

- Add a print-FOO target which prints the resolved value of Makefile
  variable FOO. For example, `make print-IMPLS` to print the list of
  implementations.
2016-03-14 23:39:21 -05:00
Joel Martin
9044b1fdb1 Merge branch 'master' into issue_166_string_ops 2016-02-24 12:00:08 -06:00
Joel Martin
5245b079e1 Add dist targets to most implementations.
TODO: factor groovy guile julia matlab miniMAL swift
2016-02-24 00:33:20 -06:00
Joel Martin
08c894f761 nim: add seq and string?
Issue #166.
2016-02-15 23:58:07 -06:00
Joel Martin
c32565152d bash, nim: fix self-hosted string handling 2016-02-05 16:28:07 -06:00
Joel Martin
411abc90f4 Merge pull request #146 from dubek/fix-macro-eval
Fix macro eval in 24 impls
2016-01-26 14:16:55 -06:00
Dov Murik
166da203fa Add gensym and clean or macro to stepA of 13 implementations (part 2)
* bash
* c
* clojure
* coffee
* crystal
* d
* elixir
* erlang
* forth
* lua
* make
* nim
* perl
2016-01-23 00:31:55 -05:00
Dov Murik
6c94cd3e40 d, nim, ps, tcl, vimscript: fix macro result evaluation
Issue #142
2016-01-22 13:48:07 -05:00
Dov Murik
539427f0db nim: fix tokenizer endless loop (and out-of-memory) on bad input
The input string `(prn "abc` caused the nim implementaion (from step1
onwards) to enter an endless loop in tokenize (which eventually caused
out-of-memory).

The fix verfies that indeed the regex matches a non-empty substring
before adding that substring as a token.
2015-12-04 15:35:39 -05:00
Joel Martin
2dd535e719 nim: update Dockerfile to use version 0.12 2015-11-23 15:48:56 -05:00
def
3c3e03c777 Nim: Fix hash map behaviour when key is not in it 2015-11-23 15:41:23 +01:00
def
b2548ecf41 Nim: Add sequtils import for map proc 2015-11-23 15:40:56 +01:00
Joel Martin
8d78bc26bf All: fix read/print of \\, and \n 2015-10-30 22:05:49 -05:00
Joel Martin
f15b4021db All: show comments with stats target.
- Put guile into correct alphabetical order.
2015-10-26 22:33:49 -05:00
Joel Martin
9b63e9c377 Travis: add mal and nim. 2015-10-06 17:32:29 -05:00
def
3faa513e83 Make Nim implementation a bit nicer
- Use re from standard library instead of nre
- Allow make -j4
- Rebuild binaries after source changed
2015-04-09 19:09:55 +02:00
def
3f429bf49f Adapt to new Nim devel compiler 2015-03-29 03:07:10 +02:00
def
2800f31881 Fix and clean up Nim implementation 2015-03-04 15:43:18 +01:00
Joel Martin
2c47ac541e Nim: rename stepA_interop to stepA_mal 2015-03-03 23:14:53 -06:00
def
a2cd0a3ada Add instructions and makefile for Nim 2015-03-04 04:39:43 +01:00
def
4ce9e165ba Nim: stepA 2015-03-02 16:08:54 +01:00
def
8de9f3085c Nim: step9 2015-03-01 21:37:07 +01:00
def
f5cf5237ee Nim: step8 2015-03-01 06:11:49 +01:00
def
dc7f0b6afd Nim: step7 2015-03-01 04:57:38 +01:00
def
3603af9666 Nim: step6 2015-03-01 04:38:43 +01:00
def
5dfcbb6b4d Nim: step5 2015-03-01 03:55:05 +01:00
def
819bd786cb Nim: step4 2015-02-28 19:52:01 +01:00
def
7af2994e50 Nim: step3 2015-02-28 16:08:36 +01:00
def
c9d2371f7f Nim: step2 2015-02-28 15:20:37 +01:00
def
b94acce656 Nim: step1 2015-02-28 14:23:19 +01:00
def
937f0cdc66 Nim: step0 2015-02-28 05:15:38 +01:00