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

2315 Commits

Author SHA1 Message Date
Joel Martin
349faa83e3 wasm: use LET macro and br_if. 2018-12-08 17:02:12 -06:00
Joel Martin
50eea9ad9c wasm: String refactor. Release macro memory
Also split platform out.
2018-12-08 17:02:12 -06:00
Joel Martin
456d0a21be wasm: improve debug output using padding. 2018-12-08 17:02:12 -06:00
Joel Martin
3ea0988652 wasm: Steps 4-A, hashmaps, metadata.
- Use more concise param and local syntax.
- Separate out string.wam.
- Add pr_str_seq functionality and add in print_readably
  functionality.
- Add REPLACE3 function.
- Remove use of putchar and simplify util.wam
- Move string functions from util.wam to string.wam including some
  renames to be more consistent with C library names.
- Add temporary content to 256 character buffers so that they are
  de-duplicated/combined.
- Use AND/OR macros.
- Improve Makefile deps and use more general wasm target.
- Properly cleanup memory in try* and use TCO as part of try*.
2018-12-08 17:02:12 -06:00
Joel Martin
33309c6a62 wasm: Convert to wam syntax using wamp.
- Convert sources to much more concise wam syntax supported by wamp.
- Rename sources from *.wast to *.wam and generate *.wast files by
  translating via wamp.
2018-12-08 17:02:09 -06:00
Joel Martin
b16fe73ec1 wasm: Steps 0-3 ported from basic. Preprocessor.
Needs wace from https://github.com/kanaka/wac to run.

wastpp.py processes the listed modules and outputs a single combined
module. It finds inline strings and hoists them to the top into a data
section and creates pointer variables into that memory and replaces
the inline strings with pointer lookups.
2018-12-08 17:01:04 -06:00
Joel Martin
2492836307 plpgsql, racket, tcl, yorick: fix errors. 2018-11-30 14:57:46 -06:00
Joel Martin
ae6e2220b3 guile, hy, java, make, matlab, miniMAL: fix errors 2018-11-30 14:57:46 -06:00
Joel Martin
5f80c83f9d lua, nasm, perl, rexx, vimscript: fix errors. 2018-11-30 14:57:46 -06:00
Joel Martin
2adfa11c98 ada, d, elixir, es6, factor, haxe: fix errors. 2018-11-30 14:57:45 -06:00
Joel Martin
970935dac9 awk, bash, c, coffee, js: fix errors. 2018-11-30 14:57:45 -06:00
Joel Martin & Chouser
9e2a4ab0f9 forth: fix errors/reporting in steps 1-8. 2018-11-30 14:57:45 -06:00
Joel Martin
f6f5d4f2a3 runtest.py: process output/errors as regex match.
Update output test data to be regex compatible.
2018-11-30 14:57:45 -06:00
Joel Martin
96c09dcd40 runtest.py: more generic prompt matching. 2018-11-28 22:19:54 -06:00
Joel Martin
b5ec219b49 awk: fix ignored escaped 'u' warning. 2018-11-28 21:34:52 -06:00
Joel Martin
16e0a5e6f2 mal: update Dockerfile to Ubuntu 18.04 and node 10 2018-11-28 21:33:35 -06:00
Joel Martin
784ad0354a
Merge pull request #331 from vi/patch-1
Add link to my Rust implementation
2018-11-28 20:49:25 -06:00
Joel Martin
e10ceff503 Update JS impls: use ffi-napi and Ubuntu 18.04 2018-11-28 17:12:17 -06:00
Vitaly Shukela
9bd2b1ef86
Add link to my Rust implementation
I assume this README serves as a wiki for collecting impls.
2018-11-10 00:24:56 +03:00
Joel Martin
7a41da1075
Merge pull request #330 from omarroth/update-crystal
Update Crystal implementation
2018-10-29 19:27:05 -05:00
Omar Roth
5185c56e92 Update Crystal implementation 2018-10-29 18:20:02 -05:00
Joel Martin
9581ba403e Add link to Rust implementation by Tim Morgan. 2018-08-25 17:30:33 -05:00
Joel Martin
a520ffd9a1 Travis: re-active perf for erlang.
Local testing shows that the test completes and doesn't hit OOM.
2018-07-16 19:11:26 -05:00
Joel Martin
3b2c6780cf
Merge pull request #326 from seven1m/patch-1
Fix link to FAQ document
2018-07-16 17:04:26 -07:00
Tim Morgan
5d52baf1ac
Fix link to FAQ document 2018-07-16 18:41:12 -05:00
Joel Martin
53c3bccc43 Travis: enable mal impl for perf test. 2018-07-16 18:15:19 -05:00
Joel Martin
17d2773245 Travis: trigger build after github push error.
git push gave this error and the commit was successfully pushed but it
didn't result in Travis starting a build:

remote: Resolving deltas: 100% (2/2), completed with 2 local objects.
remote: Unexpected system error after push was received.
remote: These changes may not be reflected on github.com!
remote: Your unique error code: 1d9d84300a34930b94914e59e9c3b381
To git@github.com:kanaka/mal.git
   5ffa331..1332215  master -> master
2018-07-16 17:45:55 -05:00
Joel Martin
1332215754 perf: more accurate iter count (last-iters).
We should return the iter count prior to then final iteration because
the final one was incomplete when the 10 seconds expired.
2018-07-16 12:33:36 -05:00
Joel Martin
5ffa3314f9 perf: simplify perf3 iter calc. Enable perf^mal.
Since the iter count increases by 1 each time through the "loop", when
we hit more than 10 seconds elapsed time we can just return the
previous iter count rather than doing a percentage calculation. This
fixes results for basic modes which couldn't do the percent
calculation because itermediate values were greater than 32,768 which
is the limit for basic MODES.

Also, the mal implementation now runs and returns legit results so
re-enable perf^impl.
2018-07-16 12:24:05 -05:00
Joel Martin
6da59ec2f4 perf: fix perf3 to show total iters instead of / 3
The run-fn-for function was originally name run-fn and was hard-coded
to run for 3 seconds. I forgot to replace the 3 with the max-secs
variable. However, given that some implementations have less than
1 iteration per second, I'm just going to drop that division and
report the iterations per max-seconds so that for the slowest
implementations we have some relative comparison instead of all of
them just reporting 0.

Thanks to Tim Morgan for discovering this bug:
699f0ad23a
2018-07-16 09:34:37 -05:00
Joel Martin
cd30e52b31 rust: fix Dockerfile to include WORKDIR=/mal 2018-07-14 19:27:11 -05:00
Joel Martin
0777a9a762 [travis] disable foment. Still hangs in perf. 2018-07-14 13:32:35 -05:00
Joel Martin
56d9fa6036 scheme: enable foment to test if hangs are fixed 2018-07-13 17:21:00 -05:00
Joel Martin
4ef4b17cd0 rust: Update rust and update/refactor implementation
This rewrites the rust implementation to use many new features of the
current version of rust.

The refactor is much more concise (only 2/3rds the size) and switches
to using a lot of the more functional features (iterators, closures,
etc) that have been added or improved in rust.

Unfortunately, the implementation is a fair bit slower (about 30% on
perf3). It's not clear why this is the case but concision and being
more idiomatic wins over performance.
2018-07-13 17:21:00 -05:00
Joel Martin
9a66ffcd2e rust: remove rustyline ANSI CSI codes from output 2018-07-13 17:20:44 -05:00
Joel Martin
3c7d7c0df3
Merge pull request #323 from jig/master
Go: Fix panic on call to function with wrong number of arguments
2018-07-12 22:55:20 -07:00
Joel Martin
ba36c146bd
Merge pull request #325 from chr15m/php-interop-language-constructs
PHP: Wrap some native "language constructs".
2018-07-12 16:15:29 -07:00
Joel Martin
b26c8329c8
Merge pull request #324 from seven1m/add-not-test-for-nil
Test that (not nil) returns true
2018-07-12 15:44:10 -07:00
Joel Martin
bbd62dc97c tests/stepA: allow time-ms result to be signed.
In Java the time-ms value was negative. This actually still works fine
because arithmetic comparison is still correct. So allow signed
time-ms results.
2018-07-12 14:24:14 -05:00
Joel Martin
e44c0be968 TypeScript: fix HOME bug and node symlink.
Update the Dockerfile to fix a symlink loop.
Update node_readline.ts to fix a failure with usage of
process.env.HOME which started failing for some reason.
2018-07-12 14:21:55 -05:00
Joel Martin
6e59c4f26d scala: fix w/ xenial, sbt 0.14.6, update build.
Build had become out of date so update docker image to xenial and sbt
to 0.14.6 and update Scala build files to go with new sbt version.
2018-07-12 13:51:02 -05:00
Joel Martin
63462732fa java: fix by updating to xenial, java 8, maven 3
The vivid build with java 7 and maven 2 was no longer able to retrieve
upstream deps and was failing.
2018-07-12 09:27:21 -05:00
Chris McCormick
634ca5e98b PHP: Wrap some native "language constructs".
Common ones which can't be called otherwise.
Can now be reached via php/exit, php/print, php/require.

Fixes chr15m/frock#7
2018-07-12 20:25:32 +08:00
Tim Morgan
e2352e739b Test that (not nil) returns true 2018-07-08 22:21:01 -05:00
Jordi Íñigo
1e8fc91409 Go: Minor 2018-07-08 11:22:49 +02:00
Jordi Íñigo
a536db2105 Go: added file back accidentally removed 2018-07-08 11:20:46 +02:00
Jordi Íñigo
3932a29be3 Go: modified error messages 2018-07-08 01:44:28 +02:00
Jordi Íñigo
ed1819f423 Go: added argument count checks to functions 2018-07-08 01:23:00 +02:00
Jordi Íñigo
9bc61630d2 Go: removed some redundant tests 2018-07-07 22:04:52 +02:00
Jordi Íñigo
07bd1c1ff1 Go: Fix panic on call to function with wrong number of arguments 2018-07-06 13:18:48 +02:00