1
- Following along https://interpreterbook.com and making changes/simplification/cleanups
1
+ # GROL
2
+ <img src =" http://grol.io/grol_logo.png " height =100 width =100 align =right />
3
+
4
+ ## History
5
+
6
+ Initially created by following along https://interpreterbook.com and making changes/simplification/cleanups
7
+
8
+ ## Install
2
9
3
10
Install/run it:
4
11
``` shell
5
- CGO_ENABLED=0 go install -trimpath -ldflags=" -w -s" -tags no_net,no_json github.com/ldemailly/gorepl @latest
12
+ CGO_ENABLED=0 go install -trimpath -ldflags=" -w -s" -tags no_net,no_json grol.io/grol @latest
6
13
```
7
14
15
+ ## What it does
8
16
Sample:
9
- ``` shell
17
+ ``` go
10
18
gorepl -parse
11
19
$ fact = func (n) {if (n<=1 ) {return 1 } n*fact (n-1 )}
12
20
$ n=fact (6 )
@@ -20,24 +28,32 @@ $ m/n
20
28
== Eval ==> 7
21
29
```
22
30
31
+ ## Language features
32
+
33
+ Functional int, float, string and boolean expressions
34
+
35
+ Functions, lambdas, closures
36
+
37
+ Arrays, maps,
38
+
39
+ print, log
40
+
41
+ macros and more all the time
42
+
23
43
See also [ sample.gr] ( sample.gr ) that you can run with
24
44
```
25
45
gorepl *.gr
26
46
```
27
47
28
- Dev mode:
48
+ ## Dev mode:
29
49
``` shell
30
50
go install golang.org/x/tools/cmd/stringer@latest
31
51
make # for stripped down executable including build tags etc to make it minimal
32
52
```
33
53
34
- Status: All done: ie functional int, string and boolean expressions, functions, lambdas, arrays, maps,
35
- print, log, macros and more
36
-
37
-
38
54
### Reading notes
39
55
40
- See [ Open Issues] ( https://github.com/ldemailly/gorepl /issues ) for what's left to do
56
+ See [ Open Issues] ( https://grol.io/grol /issues ) for what's left to do
41
57
42
58
- See the commit history for improvements/changes (e.g redundant state in lexer etc)
43
59
@@ -101,7 +117,7 @@ See [Open Issues](https://github.com/ldemailly/gorepl/issues) for what's left to
101
117
102
118
- [x] switched to non pointer receivers in Object and (base/integer) Ast so equality checks in maps work without special hashing (big win)
103
119
104
- ### Usage
120
+ ### CLI Usage
105
121
106
122
```
107
123
gorepl 0.15.0 usage:
0 commit comments