1
1
mirror of https://github.com/kanaka/mal.git synced 2024-08-16 17:20:23 +03:00
Commit Graph

3801 Commits

Author SHA1 Message Date
Nicolas Boulenguez
8ae10b10f3 nim: allow keyword argument for keyword core function 2021-12-11 09:52:02 -06:00
Nicolas Boulenguez
5047a2cee3 nasm: allow keyword argument for keyword core function 2021-12-11 09:52:02 -06:00
Nicolas Boulenguez
b402dbced7 picolisp: prevent defmacro from mutating functions 2021-12-11 09:52:02 -06:00
Nicolas Boulenguez
b74ca280ff objpascal: prevent defmacro from mutating functions 2021-12-11 09:52:02 -06:00
Nicolas Boulenguez
28ba74b73e ps: pass NOSAFER option to ghostscript in order to allow slurp
Some ghostscript versions default to SAFER.
2021-12-11 09:52:02 -06:00
Nicolas Boulenguez
cd09dfbac5 ps: prevent defmacro! from mutating functions 2021-12-11 09:52:02 -06:00
Nicolas Boulenguez
1bbf5a027d ps: allow keyword argument for keyword core function 2021-12-11 09:52:02 -06:00
Nicolas Boulenguez
f47ef5eddd gnu-smalltalk: prevent defmacro from mutating functions 2021-12-11 09:52:02 -06:00
Nicolas Boulenguez
085e35144f awk: prevent defmacro from mutating functions 2021-12-11 09:52:02 -06:00
Nicolas Boulenguez
e3c98eeb3a ada: allow keyword argument for keyword core function 2021-12-11 09:52:02 -06:00
Nicolas Boulenguez
de68c38029 ada: prevent defmacro from mutating functions 2021-12-11 09:52:02 -06:00
Nicolas Boulenguez
b204bb1f02 ada: let macros use a closure instead of current env 2021-12-11 09:52:02 -06:00
Nicolas Boulenguez
022e4f0b51 ocaml: allow keyword argument for keyword core function 2021-12-11 09:52:02 -06:00
Nicolas Boulenguez
e1b778481c java: prevent defmacro from mutating functions 2021-12-11 09:52:02 -06:00
Nicolas Boulenguez
d4abb633b5 elisp: prevent defmacro from mutating functions
Also remove unused parameters from function constructor.
2021-12-11 09:52:02 -06:00
Nicolas Boulenguez
7955817510 bash: prevent defmacro from mutating functions 2021-12-11 09:52:02 -06:00
Nicolas Boulenguez
03b6cfd45c Stop evaluating map keys
Neither keywords nor strings are modified by evaluation, so evaluating
map keys is a no-op.  Document this in the guide.
2021-12-11 09:46:35 -06:00
Nicolas Boulenguez
6d58903539 mal impl: spare an environment in implementation of do 2021-12-11 09:38:47 -06:00
Nicolas Boulenguez
e4109e6795 mal impl: (style) replace (list) with () 2021-12-11 09:38:47 -06:00
Nicolas Boulenguez
85153c6f68 env.mal: add comments 2021-12-11 09:38:47 -06:00
Dov Murik
7e01e2e1f4
Merge pull request #597 from moshimarlo/typofix
Fix typo in guide.md 'Reference Code'
2021-12-08 15:06:57 +02:00
Mikko
bc83c29690
Fix typo in guide.md 'Reference Code'
'An' is used before vowel sounds, so "a existing" reads unnaturally.
2021-12-05 09:07:29 +11:00
Bezděk Miroslav
f20d62fb35
Update guide.md
Corrected one spelling error.
2021-11-22 21:51:47 +01:00
Dov Murik
d638181537
Merge pull request #595 from nathanKramer/patch-1
Fix typo in guide.md step 6
2021-10-23 17:51:46 +03:00
Nathan Kramer
e2707fd91a
Fix typo in guide.md step 6 2021-10-23 16:45:46 +11:00
Dov Murik
347471c125
Merge pull request #594 from RobusGauli/patch-1
FIx typo in guide
2021-10-19 13:38:20 +03:00
Robus Gauli
2a0af17d4d
Update guide.md
Fix typo from `to` to `do`
2021-10-17 07:41:03 +05:45
Garklein
1c76e857f8 additional test 2021-08-04 12:58:52 -05:00
Vasilij Schneidermann
c7d43f663b
Merge pull request #576 from Garklein/master
fixed mal implementation debugging comments
2021-07-16 20:03:47 +02:00
Garklein
af78ff6e50 fixed mal implementation debugging comments 2021-07-16 13:16:44 -04:00
Joel Martin
36f758df05 julia: increase non-TCO step5 test.
The stack size on systems with higher ulimits (Github Actions) allows
this to complete and thus fail the test. Try with larger loop size to
try and trigger the problem even on those systems.
2021-07-12 17:53:01 -05:00
Joel Martin
1279811bbe [ts] update to node-12, ts-4.3.5, ffi-napi-4.0.4
Current versions were breaking during package dep install.
2021-07-11 19:08:14 -05:00
Joel Martin
9b5e56e93c ci.sh: include MAL_IMPL in log prefix if set. 2021-07-11 19:08:14 -05:00
mmcgill
8d875b00b0 [java-truffle] don't exclude graal-sdk dependency
I added the exclusion as a hack to work around classpath
issues after importing the project into Eclipse, but this
isn't the right thing to do.

It prevents compilation on JDKs other than Graal, which was
not my intent.
2021-07-11 17:52:32 -06:00
mmcgill
13bb041072 [java-truffle] mention native images in README 2021-07-11 17:52:32 -06:00
mmcgill
20b6677551 [java-truffle] tweaks for native image compilation
GraalVM native image compilation wasn't working due to
some missing @TruffleBoundary annotations, and calls
from partially evaluated code into methods that are
black-listed for runtime compilation.

With these changes, a GraalVM native image should be
producable from every Mal step.
2021-07-11 17:52:32 -06:00
mmcgill
593290d601 [java-truffle] update to GraalVM 21.1.0 2021-07-11 17:52:32 -06:00
Nicolas Boulenguez
4807c1b65f Print a stack trace for uncaught exceptions in self-hosting
An uncaught exception in the self-hosting implementation causes the
interpreter to display the EVALed ast for each EVAL level until the
exception, something similare to a stack trace.  This does not cost
much and may help a lot debugging the self-hosting step.

On the other hand, remove try* from step0 where it serves no useful
purpose.

Because of indentation level, this diff is better viewed with the git
-b command line option.
2021-07-11 17:48:13 -06:00
Nicolas Boulenguez
931971e047 Move step9 test of map as exceptions from deferrable to optional
Self-hosting is not requiring this anymore.
2021-07-11 17:40:43 -06:00
Nicolas Boulenguez
7a45dc5851 Add intermediate test for env/fn interaction
It should pass on existing implementations because it is a
prerequisite for an existing test, but small independent tests are
easyer to debug on new implementations.
2021-07-11 17:38:14 -06:00
Nicolas Boulenguez
894b24d892 haskell: fix and optional-test order of assignments in let* 2021-07-11 17:38:14 -06:00
Nicolas Boulenguez
c9c504ac20 haskell: make grammar readable as reference, misc
Split user functions and macros, merge user functions and core functions.

Add a flag triggering debugging info in EVAL.

Reserve mutable environments for REPL and let*.
Move env type declaration from Types to Env.
Check let* arguments only once.

Share more code between map constructions and key type checks.

Stop copying metadata when evaluating collections.

The strict variant of Data.Map.Strict is recommended for general use.

simplify printer.
2021-07-11 17:38:14 -06:00
Nicolas Boulenguez
003947b30f haskell: clarify reader
The grammar is not fully equivalent to the one in the process, but it
passes all tests.

I suggest that it becomes a formal/testable reference (are tabs
allowed as spaces? is "a~" valid? is "' a" valid?...).

As it is formuled here, it can directly be translated either to
another language with high-level parsers, or to a low-level language
as each production only switches after a look at the next input
character.

Another suggestion to simplify step1 is to make '{' a reader macro,
parsing "{a1 a2..}" into (hash-map a1 a2..).

The step1 tests should then accept both "(hash-map ..)" and "{a1..}",
but the process should in my opinion suggest the former as it moves
the complexity related to maps (language-dependent constructor,
argument count and type checking, reporting of such errors) form
reader.qx/step1 to core.qx/hash-map, where it has to be done later
anyway.
2021-07-11 17:38:14 -06:00
Rom DuPlain
cede778bd2 Fix reference to Makefile.impls in guide. 2021-07-10 12:20:37 -06:00
Søren Sjørup
00b3ce5fb4 Update guide.md 2021-07-10 12:16:37 -06:00
Søren Sjørup
9757259e92 Update guide.md 2021-07-05 13:01:04 -06:00
Nicolas Boulenguez
2bbec8ac43 Guide: formaly introduce map and vector literals
This addresses issue 452.
2021-05-31 10:52:42 -05:00
minor-change
b89a93ab57 fix small typos 2021-05-31 10:51:29 -05:00
Joel Martin
2684d33e95 README: count java-truffle as new implementation.
The java-truffle implementation is unique enough from the Java
implementation to be considered a unique implementation and not just
a new runtime mode.
2021-05-31 10:30:13 -05:00
Matt McGill
578df288f4 [java-truffle] add to main README.md 2021-05-31 10:28:04 -05:00