Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

documentation: ideas for exploration, possible primitives, evaluation…

… strategy
  • Loading branch information...
commit c36aa7cc61c88d956023d9f9c98eac45ed378b79 1 parent 4f06794
@mattfenwick authored
Showing with 152 additions and 1 deletion.
  1. +65 −1 README.md
  2. +36 −0 eval.md
  3. +51 −0 primitives.md
View
66 README.md
@@ -7,7 +7,7 @@ A simple, experimental language for teaching and learning
-Goals
+Language goals
-----------------------------
- bare bones: minimalist core
@@ -22,3 +22,67 @@ Goals
- as much as possible defined in libraries
+
+
+
+Areas of exploration
+--------------
+
+ - parsing
+
+ - lexing/tokenizing
+
+ - AST construction
+
+ - comments
+
+ - static checking
+
+ - types
+
+ - evaluation
+
+ - macros
+
+ - numbers/symbols/strings
+
+ - closures
+
+ - environments
+
+ - imports
+
+ - modules
+
+ - security/sandboxing
+
+ - compilation
+
+
+
+
+Target platforms
+------
+
+ - javascript
+
+ - python
+
+ - others? C?
+
+
+
+
+Usage
+------
+
+ - browser-based REPL
+
+ - prompt
+
+ - history
+
+ - graphical view of current environment: bindings
+
+ - graphical viewer of s-expressions for interactive inspection
+
View
36 eval.md
@@ -0,0 +1,36 @@
+Problem
+-----
+
+When should tokens in the AST be turned into primitive values (such as symbols, strings, numbers, functions)?
+
+
+
+Possible solutions
+-----
+
+ a. total separation
+
+ 1. traverse the s-expression first, turning all tokens into primitives
+
+ - the resulting s-expression has the exact same "shape" as the original
+
+ 2. traverse the new s-expression, evaluating it
+
+ - implications:
+
+ - three stages to parsing:
+
+ 1. tokens -> primitives. Is this similar to "reader macros" or FEXPRs?
+
+ 2. "special" evaluation: forms such as 'define', 'cond', 'lambda', 'let' ...
+
+ 3. "normal" evaluation: evaluate first element of list to function, apply to rest ...
+
+ - drawbacks:
+
+ 1. ???
+
+
+ b. mixing
+
+ 1.
View
51 primitives.md
@@ -0,0 +1,51 @@
+Primitives
+---------
+
+ - eval
+
+ - apply
+
+ - define
+
+ - cons
+
+ - car
+
+ - cdr
+
+ - lambda
+
+ - if
+
+
+Questionable
+-----------
+
+ - parse
+
+ - read
+
+ - write
+
+ - quote
+
+ - equal
+
+ - not
+
+ - or
+
+ - and
+
+ - list
+
+ - atom?
+
+ - list?
+
+
+
+Non-primitives
+----------
+
+ - let
Please sign in to comment.
Something went wrong with that request. Please try again.