1
1
mirror of https://github.com/kanaka/mal.git synced 2024-09-11 13:55:55 +03:00
Commit Graph

249 Commits

Author SHA1 Message Date
Joel Martin
021d107db7 Refactor Github Actions/Travis CI
- Dynamically generate a strategy matrix based on the list of changed
  files in this push/pull_request. If the changed files are restricted
  to implementations then only generate a matrix with those
  implementations. If the changes are to tests or other
  non-documentation files (runtest.py, IMPLS.yml, .github/*, etc) then
  run the full set. The matrix generation is done in get-ci-matrix.py.
- Split the implementation list for Github Actions out into a separate
  yaml file IMPLS.yml
- Reduce the travis file to just the OS X / XCode related builds that
  aren't supported on Github Actions.
- Rename the .travis_test.sh script to ci.sh since it is the general
  CI script used for both Travis CI and Github Actions.
2021-04-21 13:36:54 -05:00
Nicolas Boulenguez
0ee1a51777 New SWI-prolog implementation
with, in stepA_mal.mal, a new way to pass all test and break
self-hosting nevertheless.
2021-04-19 09:53:22 -05:00
AnotherTest
4c50b6736b add 'xpath-eval', and fix most running issues
- step7 still has the replEnv-values-are-not-captured issue
2020-05-24 02:27:17 +04:30
AnotherTest
e914bc2d59 oops. 2020-05-24 02:27:17 +04:30
AnotherTest
342a5b36c3 impl step4, fix string parsing 2020-05-24 02:27:16 +04:30
AnotherTest
bfae91ccdc starting xslt impl 2020-05-24 02:27:16 +04:30
Joel Martin
8a19f60386 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.
2020-02-10 23:50:16 -06:00
AnotherTest
0b25243bbc order alphabetically 2020-01-12 15:11:47 +03:30
AnotherTest
d250ed673d properly implement tco and add step7:quote 2020-01-08 00:07:07 +03:30
AnotherTest
387caf0b77 basic...? impl 2020-01-08 00:05:32 +03:30
Josh Tobin
4bf6523f1d Makefile and Dockerfile for zig 2019-12-13 01:39:20 -05:00
Josh Tobin
14b163d217 Adds zig implementation 2019-12-13 01:39:20 -05:00
Oleg Montak
447a09bdfb swift5: step0_repl 2019-11-08 21:46:18 +03:00
Dov Murik
5755c330fb Add Wren implementation 2019-11-02 21:23:56 +02:00
Gavin Lewis
270f1f7272 Add python.2 implementation
This commit adds a new Python 3 implementation of MAL. This
implementation passes all non-optional tests, with the exception
that the travis test script doesn't like the period in the
directory name. During development, this was called "py3" and
it passed Travis tests.

This implementation is different from the main python implementation.
First, it heavily uses type annotations making for a code style
more similar to Java. Second, it uses the Arpeggio parser library
to parse MAL syntax.

This commit also includes unit tests that show roughly the order
of things that were interactively tested and debugged during
development.
2019-10-13 19:11:29 -07:00
Dov Murik
a04e7a78d8 Add Pike implementation 2019-09-18 08:49:33 +03:00
Joel Martin
9a7485aa1f README update wasm MODE info.
Also, update test count to be closer to 800.
2019-08-12 01:10:14 -05:00
Joel Martin
1e9eb423e8 wasm: add wasmer, lucet modes. Update wasmtime. 2019-08-10 17:30:56 -05:00
Joel Martin
72eb6c9e5b graph: update bbc-basic. Exclude more from LOC.
Pull in bbc-basic update that allows loccount to properly count the
files.
Exclude more documentation and configuration files from LOC counts.
2019-08-02 11:39:18 -05:00
Ben Harris
6605d0963c bbc-basic: Changes consequent upon file renaming.
To allow the same BASIC source (and in particular, LIBRARY statements)
to work on both Unix and RISC OS (the latter of which doesn't allow '.'
in file names), create symlinks to all the libraries from their
unadorned names.
2019-08-01 23:24:40 +01:00
Joel Martin
75eea821a2 stats: exclude steps 0-9 & generated/extern files 2019-07-31 12:17:42 -05:00
Joel Martin
ff4e5f1600 Fix second-order self-hosting.
The `_map?` function was introduced when transitioning the macro
property being stored in metadata to uinsg a regular map with
a special key. The `_map?` function causes issues in a few places but
the biggest issue is that it breaks the `_macro?` function for the
second order self-hosted mal instance. The `_macro?` function contains
a `(map? x)` call that returns false resulting in the `_macro?` call
returning false.  I'll push something later that fixes this and also
that activates second order self-hosted tests so we can catch this
sort of issue in the future.
2019-07-29 17:58:11 -05:00
Joel Martin
77fd710cab Regress test of deferrables. Fix dart, factor.
Add a regression run to Travis that enables hard deferrables but
omits optionals so that we can test to make sure that all the
requirements are met for self-hosting in stepA.

Cleanup up some of the soft/deferrable/optional markings.
Deferrables are what will be needed eventually to self host but aren't
needed for the immediate next steps. Optional aren't even needed for
self-hosting but are nice things to have.

Also:
- Sync dart step9 and stepA with step8. Do not eval macroexpanded
  forms in macroexpand form.
- Fix stepA of factor which was missing some fixes from step9.
- Increase test timeouts in top-level Makefile for guile and io.
2019-07-24 23:48:29 -05:00
Joel Martin
a003046c8d Travis: combine build into .travis_test.sh 2019-05-29 22:41:35 -05:00
Joel Martin
6c4cc8adb2 Various small self-host mode fixes.
- clojure (cljs): self-host arity fix. Apparently ClojureScript
  functions that have metadata attached only support arity of 20. This
  is problem during self-host because the main EVAL cond macro is 22
  items so it blows up when applied in macroexpand. So we preserve the
  origin unadorned function through to macroexpand and use it there
  instead of the adorned function/macro.
- basic: fix build when in self-host qbasic mode.
- coffee, cs, dart, elisp, hy, rexx, vb: fix self-host reader errs. Preserve
  or extract the correct error message in try*/catch* loops so that it
  works for self-host error message printing as well.
- mal: pathing issue in ./run script that affected the wasm
  implementation path permissions
- miniMAL: remove extraneous command line printing of "nil".
- ps: inc function was not actually defined.
- rust: write warning about missing .mal-history to stderr to fix
  self-host failure in step6.
- wasm: the map function was stopping on nil values; fix the list end
  check. Double the macroexpand stack so that sumdown test in stepA
  tests passes without mac stack overflow.
- yorick: read from /dev/stdin in readline builtin function.
2019-05-29 21:18:52 -05:00
Joel Martin
7864f19b1b Travis: detect special self-host-test branch.
- If the branch name is "self-host-test" then do self-hosted test.
- Fix pass through of *_MODE values during self-hosting.
- Add capability to skip of build/test/perf during self-host.
- Skip self-host for basic, io, logo, make.
- Reformat travis.yml list for better alignment
2019-05-29 21:15:00 -05:00
Ben Harris
694636037b bbc-basic: Slightly increase test timeout.
40 seconds wasn't enough if I was running Firefox at the time.
2019-05-18 05:48:32 +01:00
Ben Harris
b6897bd992 bbc-basic: Increase test timeout to 40 seconds.
The default of 20 seconds was slightly too short for the step 5 tests.
2019-05-18 05:48:32 +01:00
Ben Harris
04061e521e Minimal structure for BBC BASIC implementation. 2019-05-18 05:48:32 +01:00
Joel Martin
c424b18de1 d: support ldc2 and dmd modes from top-level.
Symlink dmd to /usr/bin in the dockerfile so that no PATH modification
is necessary.

Also, add a runtime modes count to the README.
2019-05-10 14:05:53 -05:00
Simon Tatham
213a328875 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.
2019-05-10 09:41:11 +01:00
Joel Martin
dad306ed73 wasm: Support/add wasmtime runtime. WASI platform. 2019-04-15 22:08:07 -05:00
Joel Martin
8bd40aedc5
Merge pull request #345 from asarhaddon/ada.2
Ada.2 distinct Ada implementation
2019-03-27 11:14:41 -05:00
Joel Martin
c4269f9bf5 Convert to loccount based stats calculation. 2019-03-20 23:34:21 -05:00
Nicolas Boulenguez
e3b1335caa ada2: rename to ada.2 2019-03-10 01:25:07 +01:00
Nicolas Boulenguez
cbbb51b465 Another Ada implementation. 2019-03-10 01:23:08 +01:00
陆遥
573f6d0f7e Update Makefile 2019-03-05 18:27:26 +08:00
Joel Martin
195977ceee Ignore step5 excludes during REGRESS too. 2019-02-26 17:42:20 -06:00
Joel Martin
e47a5ec437 Makefile: mention TEST_OPTS in help. 2019-01-30 11:56:01 -06:00
Joel Martin
76adfab958 wasm: split js mode platform code out.
Simplify the interface to remove imports that aren't used (stdout and
add_history) and simplify (rename fputs to printline).
2018-12-10 00:36:39 -06:00
Joel Martin
8914943790 wasm: enable execution with Node
Add node mode to travis alongside wace_libc.
2018-12-09 22:55:49 -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
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
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
Vasilij Schneidermann
8ea36c892f Rename gst and pil to gnu-smalltalk and picolisp 2018-06-17 19:54:54 +02:00
Dov Murik
92708e3488 Add Fantom implementation 2018-06-03 20:08:19 +00:00
Ben Dudson
0ad505e829 Step0 (input/output) passes tests
* String handling simplified, will not handle very long strings
* Memory allocation missing, always using the same buffer currently
2017-10-09 00:10:03 +01:00
Joel Martin
a11a023558 ES6: Use ES6 modules. Update node. 2017-09-28 08:35:05 -05:00
Joel Martin
a9f6469163 Makefile: alphabetize implementations. 2017-09-25 15:25:47 -05:00
Dov Murik
21986733a1 Yorick implementation 2017-09-22 21:16:55 +00:00