mirror of
https://github.com/kanaka/mal.git
synced 2024-10-03 17:07:39 +03:00
Fix a number of typos in documentation/comments.
This commit is contained in:
parent
47bcc4c0fa
commit
0198b7a230
2
LICENSE
2
LICENSE
@ -4,7 +4,7 @@ Mal (make-a-lisp) is licensed under the MPL 2.0 (Mozilla Public
|
||||
License 2.0). The text of the MPL 2.0 license is included below and
|
||||
can be found at https://www.mozilla.org/MPL/2.0/
|
||||
|
||||
Many of the implemenations run or compile using a line editing
|
||||
Many of the implementations run or compile using a line editing
|
||||
library. In some cases, the implementations provide an option in the
|
||||
code to switch between the GNU GPL licensed GNU readline library and
|
||||
the BSD licensed editline (libedit) library.
|
||||
|
@ -36,7 +36,7 @@ Calling arguments/temporaries:
|
||||
A : common call argument (especially EVAL, EVAL_AST)
|
||||
A$ : common call argument (READLINE, reader, string temp, key value)
|
||||
B : common call argument
|
||||
B$ : STRING arg (HASHMAP_GET temp), PR_STR_SEQ seperator
|
||||
B$ : STRING arg (HASHMAP_GET temp), PR_STR_SEQ separator
|
||||
: INIT_CORE_SET_FUNCTION, ENV_SET_S, ASSOC1_S
|
||||
C : common call argument, DO_TCO_FUNCTION temp in DO_APPLY
|
||||
E : environment (EVAL, EVAL_AST)
|
||||
|
@ -1,7 +1,7 @@
|
||||
# Step 1
|
||||
|
||||
- What if I don't have an OOP language?
|
||||
- types.qx could be more promently mentioned...
|
||||
- types.qx could be more prominently mentioned...
|
||||
- A table with all types and suggested object names would be hugely
|
||||
useful
|
||||
- Same for a list of all errors and their messages
|
||||
@ -146,7 +146,7 @@
|
||||
this even related?
|
||||
- It would be worth to mention that `with-meta` shall clone its
|
||||
argument to avoid one of the more sneaky test failure reasons
|
||||
- "The value of this entry should be a mal string containing thename
|
||||
- "The value of this entry should be a mal string containing the name
|
||||
of the current implementation."
|
||||
- "When the REPL starts up (as opposed to when it is called with a
|
||||
script and/or arguments), call the rep function with this string to
|
||||
|
@ -30,7 +30,7 @@ can be used to make and run this implementation.
|
||||
|
||||
./docker make
|
||||
|
||||
* run one of the implemenations:
|
||||
* run one of the implementations:
|
||||
|
||||
./docker run ./stepA_mal
|
||||
|
||||
|
@ -101,7 +101,7 @@ functionality goes into which step:
|
||||
a scientific fact that many small rewards are more motivating than
|
||||
a single large reward (citation intentionally omitted, get a small
|
||||
reward by googling it yourself). Each step in mal adds new
|
||||
functionality that can actually be exercised by the implementor and,
|
||||
functionality that can actually be exercised by the implementer and,
|
||||
just as importantly, easily tested.
|
||||
|
||||
Also, the step structure of mal/make-a-lisp is not perfect. It never
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Mal/Make-a-Lisp Implmentation Hints
|
||||
# Mal/Make-a-Lisp Implementation Hints
|
||||
|
||||
<a name="milliseconds"></a>
|
||||
|
||||
@ -81,7 +81,7 @@ it is considered legitimate for upstream inclusion.
|
||||
### How do I read the command-line arguments if my language runtime doesn't support access to them?
|
||||
|
||||
Most languages give access to the command-line arguments that were passed to
|
||||
the program, either as an arguement to the `main` function (like `argc` and
|
||||
the program, either as an argument to the `main` function (like `argc` and
|
||||
`argv` in C) or as a global variable (like `sys.argv` in Python). If your
|
||||
target language doesn't have such mechanisms, consider adding a wrapper script
|
||||
that will read the command-line arguments that were passed to the script and
|
||||
|
@ -80,7 +80,7 @@ Make:
|
||||
- allow '_' in make variable names
|
||||
- hash-map with space in key string
|
||||
- errors should propagate up from within load-file
|
||||
- GC: expore using "undefined" directive in Make 3.82
|
||||
- GC: explore using "undefined" directive in Make 3.82
|
||||
|
||||
Mal:
|
||||
- line numbers in errors
|
||||
|
@ -379,7 +379,7 @@ Step Notes:
|
||||
- Now self-hosting!
|
||||
|
||||
|
||||
- Extra defintions needed for self-hosting
|
||||
- Extra definitions needed for self-hosting
|
||||
- core module:
|
||||
- symbol?, sequential? (if not already)
|
||||
- vector, vector?
|
||||
|
@ -84,7 +84,7 @@
|
||||
"- performance"
|
||||
"- namespaces"
|
||||
"- keywords"
|
||||
"- GC (in bash, make, C implmentations)"
|
||||
"- GC (in bash, make, C implementations)"
|
||||
"- lots of other things")
|
||||
(list
|
||||
(title "why?")
|
||||
|
@ -1,13 +1,13 @@
|
||||
;;
|
||||
;; memoize.mal
|
||||
;;
|
||||
;; Impelement `memoize` using an atom (`mem`) which holds the memoized results
|
||||
;; Implement `memoize` using an atom (`mem`) which holds the memoized results
|
||||
;; (hash-map from the arguments to the result). When the function is called,
|
||||
;; the hash-map is checked to see if the result for the given argument was already
|
||||
;; calculated and stored. If this is the case, it is returned immediately;
|
||||
;; otherwise, it is calculated and stored in `mem`.
|
||||
;;
|
||||
;; Adapated from http://clojure.org/atoms
|
||||
;; Adapted from http://clojure.org/atoms
|
||||
;;
|
||||
|
||||
;; Memoize any function
|
||||
|
@ -83,7 +83,7 @@
|
||||
(title "things it does not have")
|
||||
"- performance"
|
||||
"- namespaces"
|
||||
"- GC (in bash, make, C implmentations)"
|
||||
"- GC (in bash, make, C implementations)"
|
||||
"- protocols :-("
|
||||
"- lots of other things")
|
||||
(list
|
||||
|
@ -523,7 +523,7 @@ repl_env = {'+': lambda a,b: a+b,
|
||||
`eval_ast` switches on the type of `ast` as follows:
|
||||
|
||||
* symbol: lookup the symbol in the environment structure and return
|
||||
the value or raise an error no value is found
|
||||
the value or raise an error if no value is found
|
||||
* list: return a new list that is the result of calling `EVAL` on
|
||||
each of the members of the list
|
||||
* otherwise just return the original `ast` value
|
||||
@ -1518,7 +1518,7 @@ diff -urp ../process/step9_try.txt ../process/stepA_mal.txt
|
||||
|
||||
* Add a new "\*host-language\*" (symbol) entry to your REPL
|
||||
environment. The value of this entry should be a mal string
|
||||
containing thename of the current implementation.
|
||||
containing the name of the current implementation.
|
||||
|
||||
* When the REPL starts up (as opposed to when it is called with
|
||||
a script and/or arguments), call the `rep` function with this string
|
||||
|
Loading…
Reference in New Issue
Block a user