Joel Martin [Mon, 2 Dec 2019 14:41:59 +0000 (09:41 -0500)]
Merge pull request #473 from chr15m/fix-bash-interop-asterisk-quoting
Fix bash interop asterisk quoting
Chris McCormick [Mon, 2 Dec 2019 10:08:24 +0000 (18:08 +0800)]
Replace __STAR__ in sh* eval and quote result.
This supercedes #470 and includes #471.
This fixes some edge cases when passing an asterisk to an sh* interop call.
Before this fix mal would pass the string with any wildcard character converted to __STAR__ when passing to the subcommand.
For example `(sh* "ls *")` would become `ls __STAR__` when executed.
See the tests for examples of where this would fail to do what the user expects.
See also: https://github.com/chr15m/flk/issues/1
Chris McCormick [Sun, 1 Dec 2019 06:24:19 +0000 (14:24 +0800)]
Bash: tests for multiline outputs from sh*.
Chris McCormick [Sun, 1 Dec 2019 06:23:08 +0000 (14:23 +0800)]
Bash: sh* also captures output not ending with \n.
Chris McCormick [Sun, 1 Dec 2019 06:21:36 +0000 (14:21 +0800)]
Bash: fix \n stripping from sh* output.
Chris McCormick [Sat, 30 Nov 2019 07:47:02 +0000 (15:47 +0800)]
Fix Bash implementation interop carriage returns.
Before this fix the 'sh*' function was joining the lines of the output of whatever command was run in a way that resulted in '\n' instead of a literal carriage return.
Oleg Montak [Wed, 20 Nov 2019 08:19:21 +0000 (11:19 +0300)]
swift5: update run script to guarantee no unnecessary builds happens
Joel Martin [Tue, 19 Nov 2019 19:31:51 +0000 (13:31 -0600)]
Merge pull request #468 from epylar/patch-3
Clarify "rest" builtin in guide.md
Gavin Lewis [Sat, 16 Nov 2019 17:14:55 +0000 (09:14 -0800)]
Clarify "rest" builtin in guide.md
Oleg Montak [Fri, 8 Nov 2019 17:29:42 +0000 (20:29 +0300)]
swift5: refactor a bit
Oleg Montak [Fri, 8 Nov 2019 16:57:33 +0000 (19:57 +0300)]
swift5: dockerfile
Oleg Montak [Thu, 7 Nov 2019 17:22:41 +0000 (20:22 +0300)]
swift5: stepA_mal
Oleg Montak [Wed, 6 Nov 2019 17:01:08 +0000 (20:01 +0300)]
swift5: step9_try
Oleg Montak [Tue, 5 Nov 2019 17:32:08 +0000 (20:32 +0300)]
swift5: step8_macros
Oleg Montak [Mon, 4 Nov 2019 20:53:09 +0000 (23:53 +0300)]
swift5: step7_quote
Oleg Montak [Mon, 4 Nov 2019 12:59:19 +0000 (15:59 +0300)]
swift5: step6_file
Oleg Montak [Sun, 3 Nov 2019 13:14:05 +0000 (16:14 +0300)]
swift5: step5_tco
Oleg Montak [Thu, 31 Oct 2019 20:05:00 +0000 (23:05 +0300)]
swift5: step4_if_fn_do
Oleg Montak [Mon, 28 Oct 2019 17:00:02 +0000 (20:00 +0300)]
swift5: step3_env
Oleg Montak [Wed, 23 Oct 2019 07:56:23 +0000 (10:56 +0300)]
swift5: step2_eval
Oleg Montak [Thu, 10 Oct 2019 21:56:00 +0000 (00:56 +0300)]
swift5: step1_read_print - parser combinators
Oleg Montak [Wed, 9 Oct 2019 20:14:30 +0000 (23:14 +0300)]
swift5: step0_repl
Joel Martin [Sun, 3 Nov 2019 00:41:07 +0000 (19:41 -0500)]
Merge pull request #466 from epylar/patch-2
Update Rust version information in README.md
Gavin Lewis [Sat, 2 Nov 2019 23:43:24 +0000 (16:43 -0700)]
Update Rust version information in README.md
Joel Martin [Sat, 2 Nov 2019 20:49:25 +0000 (15:49 -0500)]
Merge pull request #465 from dubek/wren-impl
Wren implementation
Dov Murik [Sat, 2 Nov 2019 20:42:51 +0000 (22:42 +0200)]
wren: Add `dist` target to Makefile
Dov Murik [Sat, 2 Nov 2019 20:28:34 +0000 (22:28 +0200)]
wren: Add dummy Makefile
Dov Murik [Thu, 31 Oct 2019 13:28:26 +0000 (15:28 +0200)]
Travis: add wren to matrix
Dov Murik [Thu, 31 Oct 2019 13:27:46 +0000 (15:27 +0200)]
README: add Wren implementation
Dov Murik [Wed, 18 Sep 2019 18:04:02 +0000 (21:04 +0300)]
Add Wren implementation
Joel Martin [Thu, 31 Oct 2019 00:15:50 +0000 (19:15 -0500)]
Merge pull request #464 from dubek/tests-nth-with-nil-element
tests: step8: Verify nth doesn't throw on nil elements
Dov Murik [Wed, 30 Oct 2019 23:06:46 +0000 (01:06 +0200)]
tests: step8: Verify nth doesn't throw on nil elements
Joel Martin [Fri, 25 Oct 2019 04:42:56 +0000 (23:42 -0500)]
Merge pull request #463 from epylar/rust-2018
Update Rust implementation to Rust 2018
Gavin Lewis [Fri, 25 Oct 2019 00:41:28 +0000 (17:41 -0700)]
Update rust dependencies to latest versions
Rustyline now includes the newline when we read lines, so readline
in core.rs is modified to remove trailing \r\n or \n.
Gavin Lewis [Thu, 24 Oct 2019 22:57:28 +0000 (15:57 -0700)]
Update rust dependency lazy_static to 1.4.0
1.4.0 is the latest version of lazy_static. The previous version,
1.0.1, resulted in some compiler warnings when building the rust
implementation with rust 1.38.0.
Gavin Lewis [Thu, 24 Oct 2019 14:44:36 +0000 (07:44 -0700)]
Update Rust implementation to Rust 2018
- Use 'cargo fix --edition' to perform upgrade
- Update Dockerfile to use latest Rust stable: 1.38.0
Joel Martin [Tue, 22 Oct 2019 13:39:03 +0000 (08:39 -0500)]
Merge pull request #461 from epylar/patch-1
Add missing python.2 author (myself) to README.md
Gavin Lewis [Tue, 22 Oct 2019 04:01:33 +0000 (21:01 -0700)]
Add missing python.2 author (myself) to README.md
I missed the authors table when originally submitting the `python.2` implementation.
Joel Martin [Sat, 19 Oct 2019 17:08:05 +0000 (12:08 -0500)]
Merge pull request #460 from epylar/perf-python.2
Improve python.2 performance on perf3 benchmark by 77%
Gavin Lewis [Sat, 19 Oct 2019 00:15:09 +0000 (17:15 -0700)]
Improve python.2 performance on perf3 benchmark
Performance is improved about 77% on my system
Optimizations:
- remove use of ABC/abstractmethod
- start new environments with copy of outer; no need to find(key)
- run with asserts off
Joel Martin [Thu, 17 Oct 2019 20:23:57 +0000 (15:23 -0500)]
Merge pull request #459 from epylar/fix-travis-script-bash-5
Fix Travis test script to work with Bash 5
Joel Martin [Thu, 17 Oct 2019 16:59:58 +0000 (11:59 -0500)]
Merge pull request #458 from epylar/standardize-python.2-Dockerfile
Standardize python.2 dockerfile
Gavin Lewis [Thu, 17 Oct 2019 14:27:17 +0000 (07:27 -0700)]
Fix Travis test script to work with Bash 5
Bash 5 doesn't like periods in variable names so this commit
performs a substitution to double underscores to avoid them.
Gavin Lewis [Thu, 17 Oct 2019 14:22:32 +0000 (07:22 -0700)]
Standardize python.2 Dockerfile
Match other Dockerfiles to re-use layers.
Joel Martin [Tue, 15 Oct 2019 20:59:51 +0000 (15:59 -0500)]
Merge pull request #455 from epylar/python.2
Add python.2 implementation
GL [Tue, 15 Oct 2019 20:55:29 +0000 (13:55 -0700)]
Update README.md for python.2
Gavin Lewis [Tue, 15 Oct 2019 00:11:10 +0000 (17:11 -0700)]
Fix Travis build for python.2
* Change python.2/run to always call python3
* Add no-op python.2/Makefile
Gavin Lewis [Mon, 14 Oct 2019 22:48:56 +0000 (15:48 -0700)]
Enable Travis testing for python.2
Gavin Lewis [Sun, 18 Aug 2019 17:05:48 +0000 (10:05 -0700)]
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.
Joel Martin [Sat, 12 Oct 2019 23:28:36 +0000 (18:28 -0500)]
Merge pull request #454 from epylar/clarify-step5-tco
Clarify Step 5 of the implementation guide
Gavin Lewis [Sat, 12 Oct 2019 23:20:37 +0000 (16:20 -0700)]
Clarify Step 5 of the implementation guide
This commit rewords the description of how to change the
apply/invoke case of EVAL for Step 5 (TCO). The new description
is clearer about how to set the exrps argument of the new
environment being created.
Joel Martin [Fri, 4 Oct 2019 16:06:55 +0000 (12:06 -0400)]
Merge pull request #451 from seven1m/malcc-link
Link to malcc on GitHub
Tim Morgan [Fri, 4 Oct 2019 04:51:13 +0000 (23:51 -0500)]
Link to malcc on GitHub
Joel Martin [Wed, 18 Sep 2019 17:42:25 +0000 (12:42 -0500)]
Merge pull request #448 from rofrol/rust-rustfmt
rust: rustfmt
Joel Martin [Wed, 18 Sep 2019 15:09:32 +0000 (10:09 -0500)]
Merge pull request #449 from dubek/pike-impl
Pike implementation
Dov Murik [Wed, 18 Sep 2019 05:55:53 +0000 (08:55 +0300)]
travis: Add pike to the test matrix
Dov Murik [Wed, 18 Sep 2019 05:53:48 +0000 (08:53 +0300)]
README: add Pike implementation
Dov Murik [Wed, 18 Sep 2019 05:49:33 +0000 (08:49 +0300)]
Add Pike implementation
Joel Martin [Tue, 17 Sep 2019 19:01:42 +0000 (14:01 -0500)]
Merge pull request #447 from rofrol/rust-remove-readline.rs
rust: remove readline.rs
Roman Frołow [Tue, 17 Sep 2019 18:55:49 +0000 (20:55 +0200)]
rust: rustfmt
Roman Frołow [Tue, 17 Sep 2019 18:31:15 +0000 (20:31 +0200)]
rust: remove readline.rs
Joel Martin [Tue, 27 Aug 2019 14:36:27 +0000 (09:36 -0500)]
Merge pull request #444 from bjh21/bjh21-bare-newline
step 6: Test reading strings containing bare newlines.
Joel Martin [Tue, 27 Aug 2019 05:28:43 +0000 (00:28 -0500)]
tcl, yorick: fix read-string of raw newline.
Joel Martin [Thu, 22 Aug 2019 02:44:42 +0000 (21:44 -0500)]
awk, bash: fix read-string of raw newline.
Also, cleanup up bash tokenizer a bit.
Joel Martin [Wed, 21 Aug 2019 21:47:39 +0000 (16:47 -0500)]
Merge pull request #445 from bjh21/bjh21-bbc-basic
bbc-basic: Permit bare newlines in strings.
Ben Harris [Wed, 21 Aug 2019 20:03:59 +0000 (21:03 +0100)]
bbc-basic: Permit bare newlines in strings.
The official regexp allows them.
Ben Harris [Wed, 21 Aug 2019 19:50:48 +0000 (20:50 +0100)]
step 6: Test reading strings containing bare newlines.
The official regexps permit bare newlines in strings, and the mal
implementation currently contains one.
Joel Martin [Wed, 21 Aug 2019 17:58:08 +0000 (12:58 -0500)]
Merge pull request #442 from asarhaddon/mal-macro-env
Mal: cosmetic improvements for envs and macros
Nicolas Boulenguez [Wed, 21 Aug 2019 08:23:24 +0000 (10:23 +0200)]
mal: during environment lookup, convert the key to string only once.
Nicolas Boulenguez [Sun, 18 Aug 2019 08:15:34 +0000 (10:15 +0200)]
mal: improve efficiency of macro expansion
Spare 4 environment creations during macro expansion.
Nicolas Boulenguez [Sat, 17 Aug 2019 09:37:48 +0000 (11:37 +0200)]
mal: when looking up a macro in the env stack, only traverse the stack once
Nicolas Boulenguez [Sat, 17 Aug 2019 09:28:02 +0000 (11:28 +0200)]
mal: improve consistency of indentation
Nicolas Boulenguez [Tue, 20 Aug 2019 21:31:19 +0000 (23:31 +0200)]
guide: make explicit that the example code can be adapted.
Joel Martin [Mon, 12 Aug 2019 06:09:55 +0000 (01:09 -0500)]
README update wasm MODE info.
Also, update test count to be closer to 800.
Joel Martin [Sat, 10 Aug 2019 22:30:56 +0000 (17:30 -0500)]
wasm: add wasmer, lucet modes. Update wasmtime.
Joel Martin [Thu, 8 Aug 2019 18:43:42 +0000 (13:43 -0500)]
es6, ts: address security alerts.
ts was not actually using the yarn.lock file so remove it. Update the
esm dep in es6.
Joel Martin [Tue, 11 Jun 2019 14:57:25 +0000 (09:57 -0500)]
docs/graph: js-yaml vulnerability fix.
Not a big issue since the source of the yaml is a local data file and
this is triggered manually to generate the impl graph.
https://github.com/kanaka/mal/network/alert/docs/graph/package.json/js-yaml/open
Joel Martin [Wed, 7 Aug 2019 16:47:02 +0000 (11:47 -0500)]
Merge pull request #440 from aasimk2000/add-nil-if-test
step 4: Test (if nil 1) returns nil
Aasim Kandrikar [Wed, 7 Aug 2019 07:25:44 +0000 (12:55 +0530)]
step 4: Test (if nil 1) returns nil
Certain implementations like the one I wrote can get this wrong.
Joel Martin [Sun, 4 Aug 2019 19:27:15 +0000 (14:27 -0500)]
Merge pull request #439 from bjh21/bjh21-perl
Final (?) perl improvements
Ben Harris [Sun, 4 Aug 2019 16:23:26 +0000 (17:23 +0100)]
perl: Add a README file containing some facts.
Ben Harris [Sun, 4 Aug 2019 15:50:09 +0000 (16:50 +0100)]
Update version requirement for perl.
I don't think it's worked on perl 5.8 for a long time.
Ben Harris [Sat, 3 Aug 2019 21:53:36 +0000 (22:53 +0100)]
perl: Rework 'do' to not use 'splice' and 'rest' methods.
I feel that it's more perly to directly use Perl's array manipulation
functions. It's certainly more consistent with the other special forms.
Ben Harris [Tue, 30 Jul 2019 20:40:31 +0000 (21:40 +0100)]
perl: Replace $a1, $a2, and $a3 in EVAL with usefully-named veriables.
This means that most of the special forms have an assignment at the top
giving names to the members of @$ast. I think this makes the code a
little more readable.
Ben Harris [Tue, 30 Jul 2019 19:41:13 +0000 (20:41 +0100)]
perl: Use a proper Mal::Keyword type.
Representing a keyword as a Mal::String with a magic first character was
beginning to annoy me, so instead create a proper Mal::Keyword class.
To support using both Mal::String and Mal::Keyword as hash keys,
overload stringification on all Mal::Scalar subclasses.
This means that now instead of a Mal::String stringifying to something
like "Mal::String=SCALAR(0x5744ea58)", it will stringify to something
more like "Mal::String abc", which is readable, has the correct
properties for a hash-map key, and is easy to convert back into a
Mal::String.
This turns out to work perfectly well, and entirely accidentally
arranges that 'keyword' now works properly when fed a keyword as input.
Joel Martin [Fri, 2 Aug 2019 17:44:22 +0000 (12:44 -0500)]
make: revert/correct fix for plain undef symbol.
The return value from _error was causing some breakage in other error
handling. Instead, return a value from the spot where the undefined
symbol error is set. This achieves the desired fix without breaking
other unclosed sequence errors.
Joel Martin [Fri, 2 Aug 2019 16:39:18 +0000 (11:39 -0500)]
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.
Joel Martin [Fri, 2 Aug 2019 15:44:48 +0000 (10:44 -0500)]
Merge pull request #438 from bjh21/bjh21-bbc-basic
bbc-basic: Switch to filenames ending ".bas".
Ben Harris [Thu, 1 Aug 2019 22:24:40 +0000 (23:24 +0100)]
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.
Ben Harris [Thu, 1 Aug 2019 22:22:53 +0000 (23:22 +0100)]
bbc-basic: Rename all files of BASIC code to *.bas.
This should help things to recognise what they are. Consequential
amendments in the next commit.
This also removes toktest, which is unnecessary now.
Joel Martin [Wed, 31 Jul 2019 18:58:31 +0000 (13:58 -0500)]
graph: BASICs are statically typed.
Joel Martin [Wed, 31 Jul 2019 17:11:53 +0000 (12:11 -0500)]
docs/graph: add bbc-basic, vala. General updates.
Incorporates fixed LOC stats that correctly ignores steps 0-9 and
ignores generated files and external downloaded dependencies.
Joel Martin [Wed, 31 Jul 2019 05:10:27 +0000 (00:10 -0500)]
stats: exclude steps 0-9 & generated/extern files
Joel Martin [Wed, 31 Jul 2019 05:06:37 +0000 (00:06 -0500)]
make: fix catch of undefined plain symbol
The _error function was returning an empty string which meant that in
the try*/catch* implementation, the lack of result was preventing
foreach from being used as a "let" form and because of that it was
skipping the catch* handling path.
Joel Martin [Wed, 31 Jul 2019 14:24:08 +0000 (09:24 -0500)]
Merge pull request #359 from bjh21/bjh21-unterminated-strings
New test for reading an unterminated string that nonetheless ends with a quotation mark
Joel Martin [Wed, 31 Jul 2019 14:22:23 +0000 (09:22 -0500)]
Merge pull request #436 from dubek/vhdl-fix-unterminated-strings
vhdl: Fix reading of unterminated strings that happen to end with '"'.
Dov Murik [Wed, 31 Jul 2019 12:11:34 +0000 (15:11 +0300)]
vhdl: Fix reading of unterminated strings that happen to end with '"'.
Issue #359
Joel Martin [Wed, 31 Jul 2019 04:58:48 +0000 (23:58 -0500)]
factor: detect unclosed strings.
Detect strings that are not properly terminated.
Joel Martin [Wed, 31 Jul 2019 04:46:36 +0000 (23:46 -0500)]
perl6, r, skew: detect unclosed strings.
Detect strings that are not properly terminated.
Joel Martin [Wed, 31 Jul 2019 03:36:40 +0000 (22:36 -0500)]
swift: detect unclosed strings.
Detect strings that are not properly terminated.