This change removes one level of indentation on the note about using `throw` (which is not yet defined) when defining the `cond` macro at the end of Step 8. The Markdown engine on Github cannot start an indented list following a block of code, so it treats the bullet as 4-space indented code, causing the bullet point to be formatted as ugly pre-formatted text.
- Add a `vec` built-in function in step7 so that `quasiquote` does not
require `apply` from step9.
- Introduce quasiquoteexpand special in order to help debugging step7.
This may also prepare newcomers to understand step8.
- Add soft tests.
- Do not quote numbers, strings and so on.
Should ideally have been in separate commits:
- elisp: simplify and fix (keyword :k)
- factor: fix copy/paste error in let*/step7, simplify eval-ast.
- guile: improve list/vector types
- haskell: revert evaluation during quasiquote
- logo, make: cosmetic issues
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.
Let `load-file` append a new line in case last line contains a
comment.
Also append `nil` so that the return value is predictible. Remove the
existing explicit `nil` from existing sources.
Adapt documentation and tests.
* Move `gensym` and `inc` from step files to `lib/trivial.mal`.
* Move `or` from step files to `lib/test_cascade.mal`.
Shorten it because `(first ())` returns `nil`
* Update process and tests accordingly (not the figures yet).
The functions 'time-ms', 'string?', 'number?', 'seq', an 'conj' don't
need to work for self-hosting, but they do need to be defined, since
mal/core.mal unconditionally references them when the interpreter
starts up.
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
Vectors, hash-maps, and atoms wouldn't be read by read_atom anyway.
Atoms don't even have a read syntax. While I'm there, also correct
which step keywords turn up in (step A, not step 9).
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.
Guide was missing the deferrable step of having
a reader macro for ^ (which is included in the
tests for step A) which caused some confusion
as to what it was.
It's included in the tests/step1_read_print.mal
but not mentioned in the docs.
- Truncate ruby and python stacktraces since they can get very long
in certain cases causing problems.
- Fix Clojure West example with proper escaping.
Ran into some problems with the <language>/run file
not having the executable flag set.
Setting +x on the run file helps this.
The error-message the python runner throws is:
Traceback (most recent call last):
File "../runtest.py", line 227, in <module>
r = Runner(args.mal_cmd, no_pty=args.no_pty)
File "../runtest.py", line 105, in __init__
env=env)
File "/usr/lib/python3.6/subprocess.py", line 707, in __init__
restore_signals, start_new_session)
File "/usr/lib/python3.6/subprocess.py", line 1326, in _execute_child
raise child_exception_type(errno_num, err_msg)
PermissionError: [Errno 13] Permission denied
make: *** [Makefile:310: test^mymal^step0] Error 1