about summary refs log tree commit diff stats
path: root/readme.txt
blob: 523b92c7dc1fa9e64811ac4ad60ccbb43dec7ad7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
lam(n.) -- where you go when a scheme goes bad
by C. Duckworth

about lam
---------

lam is my little toy lisp evaluator.  written in lua!
(no, it isn't fennel.)

at least in these beginning stages, i'm basing lam heavily
on Norvig's lispy interpreters.  the guy knows his lisp!
these are well-written articles.

https://norvig.com/lispy.html

this is /very much/ a work in progress.
lam uses lua 5.1 or luajit.
it might work elsewhere, but i've not tested it on those.

using lam
---------

you can set up a repl of lam to test it out:

> make repl

all of lua's math.* functions are available, as well as

- +, *, /, -
- =, <, >, <=, >=
- null?
- number?
- symbol?
- apply
- begin
- map
- car
- cdr
- list

and special forms

- quote
- define
- lambda

plus, some special lam functions:

- luatype (the lua types of a value)
- type (the lam type of the value)

lam limitations
---------------

- lam just has numbers and operations on them
- uh, and symbols. and lists. and lambdas and environments.

todo
----

- move schemestr from repl into pp and expand (lua/lam pp, etc)
- add more datatypes (strings, anyone?!)
- numeric tower (oof) (at least exact/inexact numbers)
- ....

---------------------------
contributions/help WELCOME!