3 ms·
Zygomys: Embedded Scripting Language for Go
- Zambyte 3y agoVery interesting! I'll have to play around with it. It seems like this wants to be to Go what Hy is to Python. Another related language that is embedded in Go is golisp by SteelSeries: https://github.com/SteelSeries/golisp https://github.com/SteelSeries/golisp
- canadianfella 3y ago[dead]
- seanw444 3y agoI wonder what SteelSeries of all companies would not only use that for, but put resources into developing.
- ilyt 3y agoUsed it to do some operations on incoming mqtt things on my custom i3 bar thingy, quite nice if you like Lisp
- schemescape 3y agoOut of curiosity, what kinds of things?
- ilyt 3y agoMy phone's power level. Got task sent via tasker to some code that turns that into mqtt messages. Then they go to the metrics gatherer on my NAS (it also has gps position and few other things), and my computer. I had more but mpower pro I was using (power strip with 6 sockets, power measuring and control) died on me ;/
- erik_seaberg 3y agoIs anyone working on generating compiler-ready boilerplate from macros, rather than running interpretively?
- thefounder 3y agoYes, I did that extensively and ended up using reflection only. The code generation/generated is just hard to maintain and the tools that generate the code (and read the code) are hard to maintain as well. Currently I'm using code "reading" only to extract documentation so no more code generation.
- kubb 3y agoThis is one Go's blind spots. It's there, it's solvable most effectively at the language level, it's ignored.
- liampulles 3y agoI worked on a side project to try and generate mapping code with Go (like mapstruct) but abandoned it: https://github.com/liampulles/juryrig https://github.com/liampulles/juryrig I do wish there was a nice library to aid in parsing Go, there may be one I'm not aware of - I used the standard AST library but it is very verbose. Actually generating the code is very easy and go format helps a lot. Custom kubernetes operators in Go use code generation via comments extensively, perhaps worth looking at.
- Solvency 3y agoSeems like a missed opportunity to make it Gua.
- myzie 3y agoNice. Somehow this is the first time I'm seeing Zygomys. If you're not in love with the lisp syntax, you might want to take a look at Risor as well. https://github.com/risor-io/risor#quick-example https://github.com/risor-io/risor#quick-example array := ["gophers", "are", "burrowing", "rodents"] sentence := array | strings.join(" ") | strings.to_upper print(sentence)
- jaten 3y agoZygo does have infix available in addition to traditional lisp parentheses. Just put the math (or whatever) inside curly braces. I much prefer math in infix, so I put in a Pratt parser for that.
- BiteCode_dev 3y agoI was wondering was was this for Rust. Then I realized with maturin, that was Python :)