Merge pull request #326 from seven1m/patch-1
[jackhill/mal.git] / process / guide.md
index 53c9a54..3e58b36 100644 (file)
@@ -11,13 +11,30 @@ will be able to run a mal interpreter written in mal itself.
 
 So jump right in (er ... start the climb)!
 
+- [Pick a language](#pick-a-language)
+- [Getting started](#getting-started)
+- [General hints](#general-hints)
+- [The Make-A-Lisp Process](#the-make-a-lisp-process-1)
+  - [Step 0: The REPL](#step-0-the-repl)
+  - [Step 1: Read and Print](#step-1-read-and-print)
+  - [Step 2: Eval](#step-2-eval)
+  - [Step 3: Environments](#step-3-environments)
+  - [Step 4: If Fn Do](#step-4-if-fn-do)
+  - [Step 5: Tail call optimization](#step-5-tail-call-optimization)
+  - [Step 6: Files, Mutation, and Evil](#step-6-files-mutation-and-evil)
+  - [Step 7: Quoting](#step-7-quoting)
+  - [Step 8: Macros](#step-8-macros)
+  - [Step 9: Try](#step-9-try)
+  - [Step A: Metadata, Self-hosting and Interop](#step-a-metadata-self-hosting-and-interop)
+
+
 ## Pick a language
 
 You might already have a language in mind that you want to use.
 Technically speaking, mal can be implemented in any sufficiently
-complete programming language (i.e. Turing complete), however, there are a few
-language features that can make the task MUCH easier. Here are some of
-them in rough order of importance:
+complete programming language (i.e. Turing complete), however, there
+are a few language features that can make the task MUCH easier. Here
+are some of them in rough order of importance:
 
 * A sequential compound data structure (e.g. arrays, lists,
   vectors, etc)
@@ -88,8 +105,24 @@ mkdir quux
 IMPLS = ... quux ...
 ...
 quux_STEP_TO_PROG = mylang/$($(1)).qx
-...
-quux_RUNSTEP =  ../$(2) $(3)
+```
+
+* Add a "run" script to you implementation directory that listens to
+  the "STEP" environment variable for the implementation step to run
+  and defaults to "stepA_mal". Make sure the run script has the
+  executable file permission set (or else the test runner might fail with a
+  permission denied error message). The following are examples of "run"
+  scripts for a compiled language and an interpreted language (where
+  the interpreter is named "quux"):
+
+```
+#!/bin/bash
+exec $(dirname $0)/${STEP:-stepA_mal} "${@}"
+```
+
+```
+#!/bin/bash
+exec quux $(dirname $0)/${STEP:-stepA_mal}.qx "${@}"
 ```
 
 This allows you to run tests against your implementation like this:
@@ -97,6 +130,15 @@ This allows you to run tests against your implementation like this:
 make "test^quux^stepX"
 ```
 
+If your implementation language is a compiled language, then you
+should also add a Makefile at the top level of your implementation
+directory. This Makefile will define how to build the files pointed to
+by the quux_STEP_TO_PROG macro. The top-level Makefile will attempt to
+build those targets before running tests. If it is a scripting
+language/uncompiled, then no Makefile is necessary because
+quux_STEP_TO_PROG will point to a source file that already exists and
+does not need to be compiled/built.
+
 
 ## General hints
 
@@ -136,11 +178,16 @@ a bunch of tests associated with it and there is an easy script to run
 all the tests for a specific step in the process. Pick a failing test,
 fix it, repeat until all the tests for that step pass.
 
+## Reference Code
+
 The `process` directory contains abbreviated pseudocode and
-architecture images for each step of the make-a-lisp process. Use
+architecture diagrams for each step of the make-a-lisp process. Use
 a textual diff/comparison tool to compare the previous pseudocode step
-with the one you are working on. The architecture images have changes
-from the previous step highlighted in red.
+with the one you are working on. The architecture diagram images have
+changes from the previous step highlighted in red. There is also
+a concise
+[cheatsheet](http://kanaka.github.io/mal/process/cheatsheet.html) that
+summarizes the key changes at each step.
 
 If you get completely stuck and are feeling like giving up, then you
 should "cheat" by referring to the same step or functionality in
@@ -282,11 +329,11 @@ expression support.
   * `~@`: Captures the special two-characters `~@` (tokenized).
 
   * ```[\[\]{}()'`~^@]```: Captures any special single character, one of
-    ```[]{}'`~^@``` (tokenized).
+    ```[]{}()'`~^@``` (tokenized).
 
   * `"(?:\\.|[^\\"])*"`: Starts capturing at a double-quote and stops at the
     next double-quote unless it was proceeded by a backslash in which case it
-    includes it until the next double-quote (tockenized).
+    includes it until the next double-quote (tokenized).
 
   * `;.*`: Captures any sequence of characters starting with `;` (tokenized).
 
@@ -304,7 +351,7 @@ expression support.
   subclass type. For example, if your language is object oriented,
   then you can define a top level MalType (in `types.qx`) that all
   your mal data types inherit from. The MalList type (which also
-  inherits from MalType) will contains a list/array of other MalTypes.
+  inherits from MalType) will contain a list/array of other MalTypes.
   If your language is dynamically typed then you can likely just
   return a plain list/array of other mal types.
 
@@ -315,13 +362,13 @@ expression support.
   your language does not have a sequential data type that can hold mal
   type values you may need to implement one (in `types.qx`).  Note
   that `read_list` repeatedly calls `read_form` rather than
-  `read_atom`. This mutually recursive defintion between `read_list`
+  `read_atom`. This mutually recursive definition between `read_list`
   and `read_form` is what allows lists to contain lists.
 
 * Add the function `read_atom` to `reader.qx`. This function will
   look at the contents of the token and return the appropriate scalar
   (simple/single) data type value. Initially, you can just implement
-  numbers (integers) and symbols . This will allow you to proceed
+  numbers (integers) and symbols. This will allow you to proceed
   through the next couple of steps before you will need to implement
   the other fundamental mal types: nil, true, false, and string. The
   remaining mal types: keyword, vector, hash-map, and atom do not
@@ -377,12 +424,6 @@ and each step will give progressively more bang for the buck.
 #### Deferrable:
 
 
-* Add error checking to your reader functions to make sure parens
-  are properly matched. Catch and print these errors in your main
-  loop. If your language does not have try/catch style bubble up
-  exception handling, then you will need to add explicit error
-  handling to your code to catch and pass on errors without crashing.
-
 * Add support for the other basic data type to your reader and printer
   functions: string, nil, true, and false. These become mandatory at
   step 4. When a string is read, the following transformations are
@@ -397,8 +438,18 @@ and each step will give progressively more bang for the buck.
   `PRINT` function in the main program should call `pr_str` with
   print_readably set to true.
 
-* Add support for the other mal types: keyword, vector, hash-map, and
-  atom.
+* Add error checking to your reader functions to make sure parens
+  are properly matched. Catch and print these errors in your main
+  loop. If your language does not have try/catch style bubble up
+  exception handling, then you will need to add explicit error
+  handling to your code to catch and pass on errors without crashing.
+
+* Add support for reader macros which are forms that are
+  transformed into other forms during the read phase. Refer to
+  `tests/step1_read_print.mal` for the form that these macros should
+  take (they are just simple transformations of the token stream).
+
+* Add support for the other mal types: keyword, vector, hash-map.
   * keyword: a keyword is a token that begins with a colon. A keyword
     can just be stored as a string with special unicode prefix like
     0x29E (or char 0xff/127 if the target language does not have good
@@ -425,11 +476,6 @@ and each step will give progressively more bang for the buck.
     tokens are then used for keys with the corresponding even tokens
     as the values.
 
-* Add support for reader macros which are forms that are
-  transformed into other forms during the read phase. Refer to
-  `tests/step1_read_print.mal` for the form that these macros should
-  take (they are just simple transformations of the token stream).
-
 * Add comment support to your reader. The tokenizer should ignore
   tokens that start with ";". Your `read_str` function will need to
   properly handle when the tokenizer returns no values. The simplest
@@ -477,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
@@ -485,6 +531,7 @@ repl_env = {'+': lambda a,b: a+b,
 * Modify `EVAL` to check if the first parameter `ast` is a list.
   * `ast` is not a list: then return the result of calling `eval_ast`
     on it.
+  * `ast` is a empty list: return ast unchanged.
   * `ast` is a list: call `eval_ast` to get a new evaluated list. Take
     the first item of the evaluated list and call it as function using
     the rest of the evaluated list as its arguments.
@@ -513,6 +560,16 @@ make "test^quux^step2"
 
 You now have a simple prefix notation calculator!
 
+#### Deferrable:
+
+* `eval_ast` should evaluate elements of vectors and hash-maps.  Add the
+  following cases in `eval_ast`:
+  * If `ast` is a vector: return a new vector that is the result of calling
+    `EVAL` on each of the members of the vector.
+  * If `ast` is a hash-map: return a new hash-map which consists of key-value
+    pairs where the key is a key from the hash-map and the value is the result
+    of calling `EVAL` on the corresponding value.
+
 
 <a name="step3"></a>
 
@@ -593,7 +650,7 @@ rest of the list elements (arguments) may be evaluated differently (or
 not at all) unlike the default apply case where all elements of the
 list are evaluated before the first element is invoked. Lists which
 contain a "special" as the first element are known as "special forms".
-The are special because the follow special evaluation rules.
+They are special because they follow special evaluation rules.
 
 Try some simple environment tests:
 
@@ -718,6 +775,9 @@ Try out the basic functionality you have implemented:
   REPL environment (`repl_env`).
 
 * Add the following functions to `core.ns`:
+  * `prn`: call `pr_str` on the first parameter with `print_readably`
+    set to true, prints the result to the screen and then return
+    `nil`. Note that the full version of `prn` is a deferrable below.
   * `list`: take the parameters and return them as a list.
   * `list?`: return true if the first parameter is a list, false
     otherwise.
@@ -756,7 +816,7 @@ from a neat toy to a full featured language.
   after the "&" is bound to the rest of the `exprs` list that has not
   been bound yet.
 
-* Defines a `not` function using mal itself. In `step4_if_fn_do.qx`
+* Define a `not` function using mal itself. In `step4_if_fn_do.qx`
   call the `rep` function with this string:
   "(def! not (fn* (a) (if a false true)))".
 
@@ -795,10 +855,11 @@ calling back into `EVAL`. For those forms that call `EVAL` as the last
 thing that they do before returning (tail call) you will just loop back
 to the beginning of eval rather than calling it again. The advantage
 of this approach is that it avoids adding more frames to the call
-stack. This is especially important in Lisp languages because they do
-not tend to have iteration control structures preferring recursion
-instead. However, with tail call optimization, recursion can be made
-as stack efficient as iteration.
+stack. This is especially important in Lisp languages because they tend
+to prefer using recursion instead of iteration for control structures.
+(Though some Lisps, such as Common Lisp, have iteration.) However, with
+tail call optimization, recursion can be made as stack efficient as
+iteration.
 
 Compare the pseudocode for step 4 and step 5 to get a basic idea of
 the changes that will be made during this step:
@@ -837,7 +898,9 @@ diff -urp ../process/step4_if_fn_do.txt ../process/step5_tco.txt
   * `env`: the current value of the `env` parameter of `EVAL`.
   * `fn`: the original function value (i.e. what was return by `fn*`
     in step 4). Note that this is deferrable until step 9 when it is
-    needed for the `map` and `apply` core functions).
+    required for the `map` and `apply` core functions). You will also
+    need it in step 6 if you choose to not to defer atoms/`swap!` from
+    that step.
 
 * The default "apply"/invoke case of `EVAL` must now be changed to
   account for the new object/structure returned by the `fn*` form.
@@ -876,7 +939,7 @@ that most mainstream languages lack.
 
 <a name="step6"></a>
 
-### Step 6: Files and Evil
+### Step 6: Files, Mutation, and Evil
 
 ![step6_file architecture](step6_file.png)
 
@@ -944,7 +1007,7 @@ a reference to a single Mal value of any type; it supports reading that Mal valu
 and *modifying* the reference to point to another Mal value.  Note that this is
 the only Mal data type that is mutable (but the Mal values it refers to are
 still immutable; immutability is explained in greater detail in step 7).
-You'll need to add 5 functions to the core namesapce to support atoms:
+You'll need to add 5 functions to the core namespace to support atoms:
 
   * `atom`: Takes a Mal value and returns a new atom which points to that Mal value.
   * `atom?`: Takes an argument and returns `true` if the argument is an atom.
@@ -952,7 +1015,7 @@ You'll need to add 5 functions to the core namesapce to support atoms:
   * `reset!`: Takes an atom and a Mal value; the atom is modified to refer to
     the given Mal value. The Mal value is returned.
   * `swap!`: Takes an atom, a function, and zero or more function arguments. The
-    atom's value is modified to result of applying the function with the atom's
+    atom's value is modified to the result of applying the function with the atom's
     value as the first argument and the optionally given function arguments as
     the rest of the arguments. The new atom's value is returned. (Side note: Mal is
     single-threaded, but in concurrent languages like Clojure, `swap!` promises
@@ -982,7 +1045,7 @@ as a normal mal program. However, it is important to note that the
 `eval` function is not just for running external programs. Because mal
 programs are regular mal data structures, you can dynamically generate
 or manipulate those data structures before calling `eval` on them.
-This isomorphisism (same shape) between data and programs is known as
+This isomorphism (same shape) between data and programs is known as
 "homoiconicity". Lisp languages are homoiconic and this property
 distinguishes them from most other programming languages.
 
@@ -1003,7 +1066,7 @@ support quoting (step 7) and macros (step 8).
 
 * Add the rest of the command line arguments to your REPL environment
   so that programs that are run with `load-file` have access to their
-  calling environmnet. Add a new "\*ARGV\*" (symbol) entry to your REPL
+  calling environment. Add a new "\*ARGV\*" (symbol) entry to your REPL
   environment. The value of this entry should be the rest of the
   command line arguments as a mal list value.
 
@@ -1054,7 +1117,7 @@ result of evaluation is put in place into the quasiquoted list. The
 `splice-unquote` also turns evaluation back on for its argument, but
 the evaluated value must be a list which is then "spliced" into the
 quasiquoted list. The true power of the quasiquote form will be
-manifest when it used together with macros (in the next step).
+manifest when it is used together with macros (in the next step).
 
 Compare the pseudocode for step 6 and step 7 to get a basic idea of
 the changes that will be made during this step:
@@ -1095,7 +1158,7 @@ Mal borrows most of its syntax and feature-set).
      a symbol named "quote" and `ast`.
   2. else if the first element of `ast` is a symbol named "unquote":
      return the second element of `ast`.
-  3. if `is_pair` of first element of `ast` is true and the first
+  3. if `is_pair` of the first element of `ast` is true and the first
      element of first element of `ast` (`ast[0][0]`) is a symbol named
      "splice-unquote": return a new list containing: a symbol named
      "concat", the second element of first element of `ast`
@@ -1103,7 +1166,7 @@ Mal borrows most of its syntax and feature-set).
      second through last element of `ast`.
   4. otherwise: return a new list containing: a symbol named "cons", the
      result of calling `quasiquote` on first element of `ast`
-     (`ast[0]`), and result of calling `quasiquote` with the second
+     (`ast[0]`), and the result of calling `quasiquote` with the second
      through last element of `ast`.
 
 
@@ -1153,7 +1216,7 @@ macros.
 
 ![step8_macros architecture](step8_macros.png)
 
-Your mal implementation is now ready for one of the most Lispy and
+Your mal implementation is now ready for one of the most lispy and
 exciting of all programming concepts: macros. In the previous step,
 quoting enabled some simple manipulation data structures and therefore
 manipulation of mal code (because the `eval` function from step
@@ -1239,10 +1302,10 @@ Congratulations! You now have a Lisp interpreter with a super power
 that most non-Lisp languages can only dream of (I have it on good
 authority that languages dream when you are not using them). If you
 are not already familiar with Lisp macros, I suggest the following
-excercise: write a recursive macro that handles postfixed mal code
+exercise: write a recursive macro that handles postfixed mal code
 (with the function as the last parameter instead of the first). Or
 not. I have not actually done so myself, but I have heard it is an
-interesting excercise.
+interesting exercise.
 
 In the next step you will add try/catch style exception handling to
 your implementation in addition to some new core functions. After
@@ -1250,7 +1313,7 @@ step9 you will be very close to having a fully self-hosting mal
 implementation. Let us continue!
 
 
-### Deferrable
+#### Deferrable
 
 * Add the following new core functions which are frequently used in
   macro functions:
@@ -1267,6 +1330,10 @@ implementation. Let us continue!
   control structures macros. Here are the string arguments for `rep`
   to define these macros:
   * `cond`: "(defmacro! cond (fn* (& xs) (if (> (count xs) 0) (list 'if (first xs) (if (> (count xs) 1) (nth xs 1) (throw \"odd number of forms to cond\")) (cons 'cond (rest (rest xs)))))))"
+    * Note that `cond` calls the `throw` function when `cond` is
+      called with an odd number of args. The `throw` function is
+      implemented in the next step, but it will still serve it's
+      purpose here by causing an undefined symbol error.
   * `or`: "(defmacro! or (fn* (& xs) (if (empty? xs) nil (if (= 1 (count xs)) (first xs) `(let* (or_FIXME ~(first xs)) (if or_FIXME or_FIXME (or ~@(rest xs))))))))"
 
 
@@ -1293,21 +1360,21 @@ diff -urp ../process/step8_macros.txt ../process/step9_try.txt
 * Add the `try*/catch*` special form to the EVAL function. The
   try catch form looks like this: `(try* A (catch* B C))`. The form
   `A` is evaluated, if it throws an exception, then form `C` is
-  evaluated with a new environment that binds the symbol B to the
+  evaluated with a new environment that binds the symbol `B` to the
   value of the exception that was thrown.
   * If your target language has built-in try/catch style exception
     handling then you are already 90% of the way done. Add a
-    (native language) try/catch block that calls evaluates `A` within
+    (native language) try/catch block that evaluates `A` within
     the try block and catches all exceptions. If an exception is
     caught, then translate it to a mal type/value. For native
     exceptions this is either the message string or a mal hash-map
     that contains the message string and other attributes of the
-    exception. When a regular mal types/values is used as an
+    exception. When a regular mal type/value is used as an
     exception, you will probably need to store it within a native
     exception type in order to be able to convey/transport it using
     the native try/catch mechanism. Then you will extract the mal
     type/value from the native exception. Create a new mal environment
-    that binds B to the value of the exception. Finally, evaluate `C`
+    that binds `B` to the value of the exception. Finally, evaluate `C`
     using that new environment.
   * If your target language does not have built-in try/catch style
     exception handling then you have some extra work to do. One of the
@@ -1334,7 +1401,7 @@ diff -urp ../process/step8_macros.txt ../process/step9_try.txt
   `fn*`, the you will need to do so now.
   * `apply`: takes at least two arguments. The first argument is
     a function and the last argument is list (or vector). The
-    arguments between the function and the last arguemnt (if there are
+    arguments between the function and the last argument (if there are
     any) are concatenated with the final argument to create the
     arguments that are used to call the function. The apply
     function allows a function to be called with arguments that are
@@ -1366,7 +1433,7 @@ interpreter. But if you stop now you will miss one of the most
 satisfying and enlightening aspects of creating a mal implementation:
 self-hosting.
 
-### Deferrable
+#### Deferrable
 
 * Add the following new core functions:
   * `symbol`: takes a string and returns a new symbol with the string
@@ -1417,7 +1484,7 @@ self-hosting.
 
 <a name="stepA"></a>
 
-### Step A: Mutation, Self-hosting and Interop
+### Step A: Metadata, Self-hosting and Interop
 
 ![stepA_mal architecture](stepA_mal.png)
 
@@ -1444,10 +1511,36 @@ diff -urp ../process/step9_try.txt ../process/stepA_mal.txt
 
 * Copy `step9_try.qx` to `stepA_mal.qx`.
 
-* Add meta-data support to mal functions. TODO. Should be separate
-  from the function macro flag.
-
-* Add the `readline` core function. TODO
+* Add the `readline` core function. This functions takes a
+  string that is used to prompt the user for input. The line of text
+  entered by the user is returned as a string. If the user sends an
+  end-of-file (usually Ctrl-D), then nil is returned.
+
+* Add meta-data support to mal functions by adding a new metadata
+  attribute on mal functions that refers to another mal value/type
+  (nil by default). Add the following metadata related core functions:
+  * `meta`: this takes a single mal function argument and returns the
+    value of the metadata attribute.
+  * `with-meta`: this function takes two arguments. The first argument
+    is a mal function and the second argument is another mal
+    value/type to set as metadata. A copy of the mal function is
+    returned that has its `meta` attribute set to the second argument.
+    Note that it is important that the environment and macro attribute
+    of mal function are retained when it is copied.
+  * Add a reader-macro that expands the token "^" to
+    return a new list that contains the symbol "with-meta" and the
+    result of reading the next next form (2nd argument) (`read_form`) and the
+    next form (1st argument) in that order
+    (metadata comes first with the ^ macro and the function second).
+
+* Add a new "\*host-language\*" (symbol) entry to your REPL
+  environment. 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 print a startup header:
+  "(println (str \"Mal [\" \*host-language\* \"]\"))".
 
 
 Now go to the top level, run the step A tests:
@@ -1501,7 +1594,7 @@ implementation to run a mal implementation which itself runs the mal
 implementation.
 
 
-### Optional: gensym
+#### Optional: gensym
 
 The `or` macro we introduced at step 8 has a bug. It defines a
 variable called `or_FIXME`, which "shadows" such a binding from the
@@ -1528,17 +1621,17 @@ For extra information read [Peter Seibel's thorough discussion about
 `gensym` and leaking macros in Common Lisp](http://www.gigamonkeys.com/book/macros-defining-your-own.html#plugging-the-leaks).
 
 
-### Optional additions
+#### Optional additions
 
-* Add metadata support to composite data types, symbols and native
-  functions. TODO
+* Add metadata support to other composite data types (lists, vectors
+  and hash-maps), and to native functions.
 * Add the following new core functions:
   * `time-ms`: takes no arguments and returns the number of
-    milliseconds since epoch (00:00:00 UTC Janurary 1, 1970), or, if
+    milliseconds since epoch (00:00:00 UTC January 1, 1970), or, if
     not possible, since another point in time (`time-ms` is usually
     used relatively to measure time durations).  After `time-ms` is
-    implemented, you can run the mal implementation performance
-    benchmarks by running `make perf^quux`.
+    implemented, you can run the performance micro-benchmarks by
+    running `make perf^quux`.
   * `conj`: takes a collection and one or more elements as arguments
     and returns a new collection which includes the original
     collection and the new elements.  If the collection is a list, a
@@ -1546,12 +1639,57 @@ For extra information read [Peter Seibel's thorough discussion about
     the given list in opposite order; if the collection is a vector, a
     new vector is returned with the elements added to the end of the
     given vector.
-
-
-## TODO:
-
-* simplify: "X argument (list element Y)" -> ast[Y]
-* list of types with metadata: list, vector, hash-map, mal functions
-* more clarity about when to peek and poke in read_list and read_form
-* tokenizer: use first group rather than whole match (to eliminate
-  whitespace/commas)
+  * `string?`: returns true if the parameter is a string.
+  * `number?`: returns true if the parameter is a number.
+  * `fn?`: returns true if the parameter is a function (internal or
+    user-defined).
+  * `macro?`: returns true if the parameter is a macro.
+  * `seq`: takes a list, vector, string, or nil. If an empty list,
+    empty vector, or empty string ("") is passed in then nil is
+    returned. Otherwise, a list is returned unchanged, a vector is
+    converted into a list, and a string is converted to a list that
+    containing the original string split into single character
+    strings.
+* For interop with the target language, add this core function:
+  * `quux-eval`: takes a string, evaluates it in the target language,
+    and returns the result converted to the relevant Mal type. You
+    may also add other interop functions as you see fit; Clojure, for
+    example, has a function called `.` which allows calling Java
+    methods. If the target language is a static language, consider
+    using FFI or some language-specific reflection mechanism, if
+    available. The tests for `quux-eval` and any other interop
+    function should be added in `quux/tests/stepA_mal.mal` (see the
+    [tests for `lua-eval`](../lua/tests/stepA_mal.mal) as an example).
+
+### Next Steps
+
+* Join the #mal IRC channel. It's fairly quiet but there are bursts of
+  interesting conversation related to mal, Lisps, esoteric programming
+  languages, etc.
+* If you have created an implementation for a new target language (or
+  a unique and interesting variant of an existing implementation),
+  consider sending a pull request to add it into the main mal
+  repository. The [FAQ](../docs/FAQ.md#will-you-add-my-new-implementation)
+  describes general requirements for getting an implementation merged
+  into the main repository.
+* Take your interpreter implementation and have it emit source code in
+  the target language rather than immediately evaluating it. In other
+  words, create a compiler.
+* Pick a new target language and implement mal in it. Pick a language
+  that is very different from any that you already know.
+* Use your mal implementation to implement a real world project. Many
+  of these will force you to address interop. Some ideas:
+  * Web server (with mal as CGI language for extra points)
+  * An IRC/Slack chat bot
+  * An editor (GUI or curses) with mal as a scripting/extension
+    language.
+  * An AI player for a game like Chess or Go.
+* Implement a feature in your mal implementation that is not covered
+  by this guide. Some ideas:
+  * Namespaces
+  * Multi-threading support
+  * Errors with line numbers and/or stack traces.
+  * Lazy sequences
+  * Clojure-style protocols
+  * Full call/cc (call-with-current-continuation) support
+  * Explicit TCO (i.e. `recur`) with tail-position error checking