blob: a7e48bef5fc9b794581baeda1e03449cdcb62c9d (
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
|
# neb
### an attempt at a language
## ideas
- **Lisp-y**: I hope you like parentheses!
- **Strongly typed**: types are Good, and could enable future compilation
- **We <3 Linux**: strong support for pipelines and shell-ing out
- **Immutable variables**: mutability is scary and makes for strange bugs
- **Pure functions**: side effects are also scary
## things that (hopefully) work
### housekeeping
- `(debug-on) => :bool ; turn on debugging (default)`
- `(debug-off) => :bool ; turn off debugging`
- `(exit [[status :int]]) => :bool`
### io
- `(print [out :string]) => :bool ; print to stdout`
### math
- `(+ [left :number] [right :number]) => :number`
- `(- [left :number] [right :number]) => :number`
- `(* [left :number] [right :number]) => :number`
### string
- `(concat [arg1 :string] [arg2 :string]) => :string`
### flow control
- `(if [cond :bool] [t-branch :expr] [f-branch :expr]) => :any`
### other
- pretty much nothing else
## TODO (this section may be incomplete)
### math
- [ ] division (float)
- [ ] division (int)
- [ ] mod (int)
- [ ] exponent
### strings
- [x] concat
- [ ] substring
- [ ] lower/uppercase
### flow control
- [x] if
- [ ] if with empty else
- [ ] branch
### lists
- [ ] lex
- [ ] parse
- [ ] evaluate
### symbols
- [ ] define
- [ ] access
|