3 ms·
Interesting, looks almost like how you'd write Go using S-expressions. Seems like you have access to the stdlib from the examples. I wonder if you could use oth
by howeyc 11y ago
Interesting, looks almost like how you'd write Go using S-expressions. Seems like you have access to the stdlib from the examples. I wonder if you could use other Go libraries. I also wonder if you can use co-routines or channels.
This[1] allows you to write something resembling Scheme R5RS but with some Go extras like channels/co-routines, but no access to Go's stdlib.
[1] https://github.com/kedebug/LispEx https://github.com/kedebug/LispEx
- eatonphil 11y agoYou should be able to reach any Go library, in fact. Aside from the Prelude, the Gsp Stdlib[0] is in fact just bindings to the Go stdlib that casts every value from interface{} into the required type. You can make bindings to any other library in this manner. I do not know why Go-routines would not work, though I have not tried yet. Another difference from the lisp you brought up (and the one I'm more familiar with, glisp[1]) is that Gsp is compiled as opposed to interpreted. This would ostensibly have speed features. I am interested to test how this fares compared to these other Go Lisps and Clojure. [0] https://github.com/gsp-lang/stdlib https://github.com/gsp-lang/stdlib [1] https://github.com/zhemao/glisp https://github.com/zhemao/glisp