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

122 Commits

Author SHA1 Message Date
Nicolas Boulenguez
422a09aabf process: remove references to Racket from generic .txt files 2021-12-12 13:54:17 -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
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
Nathan Kramer
e2707fd91a
Fix typo in guide.md step 6 2021-10-23 16:45:46 +11:00
Robus Gauli
2a0af17d4d
Update guide.md
Fix typo from `to` to `do`
2021-10-17 07:41:03 +05:45
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
Vasilij Schneidermann
f0863c2cc7 Mention impls/quux instead of quux when needed
Closes #536
2021-04-19 16:47:11 -05:00
Michal Srb
aeab3def57 Fix with-meta and meta description in guide 2021-04-17 19:27:19 -05:00
Fabian
8dbc548487 fix typo in guide.md step 7 2021-04-17 17:59:23 -05:00
Denis Fuenzalida
4b89af04fb
Fix formatting of note about throw when defining cond at the end of Step 8
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.
2021-03-26 00:16:14 -07:00
Sasha Pourcelot
a0bcd1a9b9
Fix typo in guide.md
You mal -> Your mal
2020-12-27 23:35:39 +01:00
Pritham Marupaka
9cfea9225d Fix 2 additional typos 2020-09-08 19:27:45 -04:00
Pritham Marupaka
6f4fae85c2 Fix typo in step 7. 2020-09-07 15:14:29 -04:00
Nicolas Boulenguez
fbfe6784d2 Change quasiquote algorithm
- 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
2020-08-11 01:01:56 +02:00
Joel Martin
15a11c067f Remove "conj" from step9_try image.
It was already removed from the gliffy source but the export hadn't
been updated.
2020-06-03 12:49:39 -05:00
mANIApHOBIC
8c0163f8ca Correct a trivial typographical error in the guide
I corrected "you implementation" to "your implementation".
2020-03-28 20:01:46 -07:00
Gavin Lewis
66b7ea46ab Clarify "rest" builtin in guide.md 2019-11-16 09:22:38 -08:00
Gavin Lewis
6af9688743 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.
2019-10-12 16:23:36 -07:00
Nicolas Boulenguez
dd5c00a958 guide: make explicit that the example code can be adapted. 2019-08-20 23:31:19 +02:00
Nicolas Boulenguez
e6d41de4d5 load-file: accept empty file or final comment, return nil
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.
2019-07-28 13:08:05 +02:00
Nicolas Boulenguez
28b63c0ca6 mal: implement macro without metadata
Support for metadata becomes optional.
Support for fn? becomes optional again, reverting 5e5d4892.
2019-07-09 14:16:27 +02:00
Nicolas Boulenguez
26ced15b31 Remove gensym, inc and or from step files.
* 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).
2019-07-09 14:05:29 +02:00
Joel Martin
976e03b912
Merge pull request #378 from asarhaddon/test-macro-not-changing-function
Test that defining a macro does not mutate an existing function.
2019-05-15 08:17:59 -07:00
Nicolas Boulenguez
c714889a98 Move test that macro do not mutate functions as optional in stepA 2019-05-15 06:19:02 +02:00
Ben Harris
21af40e489 guide, step A: Note that stub functions are replaced with real ones. 2019-05-14 22:32:55 +01:00
Ben Harris
e7d1bb12c7 guide, step A: Document that 'string?' etc need to be defined.
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.
2019-05-14 22:19:34 +01:00
Nicolas Boulenguez
14ab099cea gensym: hide the counter in an environment, define inc in stepA.
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
2019-05-11 16:37:26 +02:00
Simon Tatham
da39e01bf3 guide.md: fix a few trivial typos. 2019-05-10 08:36:12 +01:00
Ben Harris
ea0660cbba guide.md: Move description of 'sequential?' to a more logical place.
It's still a deferrable part of step 9, but now it's listed with the
other vector-related functions rather than after the hash-map-related
ones.
2019-05-06 12:45:53 +01:00
Ben Harris
96065d55ef Guide: when introducing read_atom, don't mention complex types.
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).
2019-04-20 19:00:08 +01:00
Ben Harris
1432efa236 guide.md: In step 1, correctly state how long strings can be deferred. 2019-04-10 23:29:30 +01:00
Ben Harris
3117109879 guide.md: Properly escape a '<'. 2019-04-10 23:20:28 +01:00
Ben Harris
8e796aa46c guide.md: Don't use vectors in step 4 when they're still deferrable.
Vectors are deferrable until step A, so the manual tests in step 4
shouldn't use them.  Replacing them with lists works.
2019-04-08 21:11:11 +01:00
Joel Martin
b284f4b844 guide.md: fix cheatsheet and language rank links. 2019-04-01 09:27:24 -05:00
Juan de Bruin
c5dd7ecba0
Fix typo 2019-02-07 12:04:54 +02:00
Joel Martin
4aa0ebdf47 Error on unterminated strings.
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.
2019-01-25 16:16:06 -06:00
Windfarer
f88802514c fix function name "tokenize" 2019-01-21 17:08:05 +08:00
Tim Morgan
5d52baf1ac
Fix link to FAQ document 2018-07-16 18:41:12 -05:00
Jonas Lundberg
bebce74bf5 Update guide with note on reader macro with-meta
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.
2017-12-30 19:18:20 +01:00
Dov Murik
59436f1a12 Add number?, fn?, macro? in stepA - tests and process guide
Ref #298
2017-10-09 20:23:39 +00:00
Hrvoje Šimić
cc52842b87 fix typo in guide 2017-09-30 13:14:06 +02:00
Joel Martin
dd4020b944 Guide: fix TODOs. Add next steps section.
Also move a few general TODOs to docs/TODO.
2017-09-21 17:35:38 -05:00
Sebastian Rasmussen
0198b7a230 Fix a number of typos in documentation/comments. 2017-09-15 20:00:15 +02:00
Joel Martin
e17aef048e Misc fixes and TODO updates.
- Truncate ruby and python stacktraces since they can get very long
  in certain cases causing problems.
- Fix Clojure West example with proper escaping.
2017-09-15 00:00:23 -05:00
boyned//Kampfkarren
185052f14d Fix guide's explanation of Regex
it didn't incude the parantheses
2017-04-12 08:22:19 -07:00
Jonas Lundberg
e1b080b401 Update README with hint on test permission failing
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
2017-02-03 09:27:42 +01:00