1
1
mirror of https://github.com/kanaka/mal.git synced 2024-09-19 09:38:28 +03:00
Commit Graph

47 Commits

Author SHA1 Message Date
Nicolas Boulenguez
14ab099cea gensym: hide the counter in an environment, define inc in stepA.
tests: check that `inc` is present in stepA.
nasm: split lines in mal_startup_string for readability.
objpascal: remove obsolete .orig file
swift: remove an unneeded line in template
swift4: remove duplicate definition of `or` macro
2019-05-11 16:37:26 +02:00
Joel Martin
c4269f9bf5 Convert to loccount based stats calculation. 2019-03-20 23:34:21 -05: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
Joel Martin
970935dac9 awk, bash, c, coffee, js: fix errors. 2018-11-30 14:57:45 -06:00
Vasilij Schneidermann
d76bd06b50 c: Make use of pkg-config for libffi flags 2017-11-04 12:07:17 +01:00
Joel Martin
2df92e0655 c, rpython, vhdl: add number?, fn?, and macro? 2017-10-11 21:18:50 -04:00
Joel Martin
a821cd7204 Fix unescaping in c, coffee, crystal, haxe, plpgsql and r. 2017-09-28 07:40:47 -05:00
Joel Martin
fba3aeb2fb Ada, C: fix step3 error handling.
New step3 tests were added during basic implementation that broke Ada
and C.
2016-11-01 10:44:49 -05: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
Dov Murik
6b3ecaa769 c: Add Boehm garbage collector
By default, garbage collection is enabled.  You can run:

    make USE_GC=

to build the C implementation without garbage collection.
2016-04-08 09:24:21 -04:00
Dov Murik
9685275d8f c: Fix segfault on literal empty list
Issue #190
2016-03-27 22:21:46 -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
b6dc3e37aa awk-es6, Makefile: dist ruiles 2016-02-24 00:33:20 -06:00
Joel Martin
4c14a8b835 bash, c, clojure, coffee, es6, js: add seq/string?
Issue #166.
2016-02-11 09:18:46 -06:00
Dov Murik
8b99c2685a c, julia: Fix (first nil) and (rest nil) 2016-02-03 21:23:47 -05: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
0d629719f9 bash, c, go, lua, racket: fix macro result evaluation
Issue #142
2016-01-22 14:00:11 -05:00
Joel Martin
a0b63ee477 hash-map equality: bash, c, coffee, cs, es6, ...
- hash-map equality support for bash, c, coffee, cs, es6, java, js,
  julia, make, php.
- also, add another test to catch another hash-map in-equality: same
  keys, different values
2015-11-16 23:28:58 -06: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
6479984c9b Travis: add C, C#, Go, Perl, PHP, and Ruby. 2015-10-06 00:56:02 -05:00
Joel Martin
e152d48827 travis: add bash, c, make to test matrix. 2015-10-05 18:55:00 -05:00
Joel Martin
41135b945c C: fix history function with libedit-2 2015-07-23 14:01:34 -05:00
Mitsuru Kariya
04b3bce630 fix history function of C
When the editline was used instead of the readline, the history function of C didn't work as intended.

It was caused like below.

- segmentation fault if a history is empty.
- incorrect line was added to a history file.
2015-07-21 16:08:19 +09:00
Joel Martin
bf2cb97aaa C: remove extraneous glib includes. 2015-03-20 08:35:53 -05:00
Liu Bin
b81b2a7e8e C: fix compilation errors and warnings for the official toolchain of OSX. 2015-03-20 17:38:22 +08:00
Joel Martin
dbac60df00 All: move metadata, atoms, readline, conj to stepA.
- Move some of the more optional things (conj, readline) to stepA. All
  implementations pass step9 tests now.
- Move metadata and atoms to stepA.
- Update step9 and stepA diagrams.
2015-03-14 17:17:14 -05:00
Joel Martin
c9de2e82ed Tests: add testing Dockerfile. Impl fixes.
- tests/docker/Dockerfile: specifies full docker image containing all
  tools/languages (except matlab).
- tests/docker-build.sh: build above image.
- tests/docker-run.sh: launch above image.
    Example: ./tests/docker-run.sh make test^js^step2
- Various fixes across multiple languages:
    - Unicode fixes for bash and R on Ubuntu Utopic
    - readline history fixes for when ~/.mal-history is not available
      or readable/writable. No fatal errors.
    - fixes to work with perl 5.20 (and still perl 5.18)
2015-03-11 22:22:35 -05:00
Joel Martin
90f618cbe7 All: rename stepA_interop to stepA_mal
Also, add missed postscript interop tests.
2015-02-28 11:09:54 -06:00
Joel Martin
b8ee29b22f All: add keywords.
Also, fix nth and count to match cloure.
2015-01-09 16:16:50 -06:00
Joel Martin
01c9731649 All: swap step9,A. Fixes for bash, C, perl.
step9_interop -> stepA_interop
stepA_more -> step9_try

C: fix glib headers
bash: behavior change of declare -A and pattern replacement.
perl: squelch new 5.18 warnings related to switch/given statement.

Also, include some in-progress interop related files.
2015-01-06 21:57:24 -06:00
Joel Martin
ba782e2c5c docs/step_notes.txt: add step0_repl details. 2014-10-04 18:34:49 -05:00
Joel Martin
6301e0b637 All: TCO let* and quasiquote. 2014-04-23 21:59:50 -05:00
Joel Martin
86b689f3d7 All: *ARGV* and *host-language*. Misc syncing/fixes. 2014-04-19 13:04:09 -05:00
Joel Martin
db4c329aff All: perf test, Makefile refactor, add *host-language*
Other:
- bash,make,postscript: quasiquote of vectors
- Fix Java slurp
- add time function to core.mal
    - switches on *host-language* for make time-secs vs time-ms
- Ignore */experiments directories
2014-04-17 21:49:07 -05:00
Joel Martin
8cb5cda46c All: move some fns to core. Major cleanup.
- Don't import/require core until step4.
- Define cond/or macros from step8
2014-04-16 23:57:50 -05:00
Joel Martin
7e9a2883fe All: fix get. All pass stepA tests. 2014-04-15 01:24:43 -05:00
Joel Martin
712af9efbe Add stats-lisp target (only env, core, stepA) 2014-04-10 19:27:42 -05:00
Joel Martin
b2ff794a97 C: fix step1 EOF handling. 2014-04-06 19:28:11 -05:00
Joel Martin
b079f51028 C,PHP,Python: stepA fixup. All tests/impls pass! 2014-04-06 16:24:27 -05:00
Joel Martin
ea81a8087b All: split types into types, env, printer, core.
- types: low-level mapping to the implementation language.
- core: functions on types that are exposed directly to mal.
- printer: implementation called by pr-str, str, prn, println.
- env: the environment implementation

- Also, unindent all TCO while loops so that the diff of step4 and
  step5 are minimized.
2014-04-02 22:23:37 -05:00
Joel Martin
1617910ad3 All: remove slurp-do, use str around slurp instead. 2014-04-01 23:12:33 -05:00
Joel Martin
9528bb1451 All: pass stepA tests, in particular with correct conj behavior. 2014-04-01 22:50:55 -05:00
Joel Martin
3169070063 Current state of mal for Clojure West lighting talk. 2014-03-24 16:32:24 -05:00