Zuo: A tiny Racket for scripting
docs.racket-lang.org
docs.racket-lang.org
Zuo: A Tiny Racket for Scripting - https://news.ycombinator.com/item?id=31017057 - April 2022 (31 comments)
If I'm working on one project for some time I'll write a throwaway bb.edn with tasks for things I need to do often, for example to monitor a kubernetes pod, log it, and hit certain API endpoints. Then when I'm in the project directory I can just run `bb tsj` (e.g. test sign job).
Are you saying that you prefer babashka to zuo? Have you actually used zuo? Or did you only want to pontificate on another project with a potentially related goal, but without actually connecting those dots for readers of your comment?
My issue (not quite the right word, but close enough) with this kind of comment is it's kind of rude, in my opinion? Like, imagine if you were standing around with some people, and somebody said "I just learned about Zuo! It's this neat Racket alternative that's very small. It's a super cool project, and I've really enjoyed it!" And you reply with "When I want a small Lisp, I use babashka." And you don't connect it to the conversation at hand, and it's up to the other people to figure out what your point is. It's like... it's almost a non sequitur, in some sense. And comments like these seem super common here for some reason. It just kinda rubs me the wrong way, though I guess judging by their prevalence they are not seen this way by most people here, so perhaps my perception is in the wrong.
Hmm maybe I should try to read them that way and I'd be less bothered. Still, I wish they would actually explicitly say as much. It's only a few words, but (in my opinion) it feels like it completely shifts the tone from "the tool this article is about is useless, use this other tool instead" to an educational/helpful thing, which is much nicer.
As another person said of themselves, I like the fact that people on HN point to other tools they use in a way that is related to the one being discussed in the comments. That makes HN a good place to find out about tools you hadn't heard of.
I didn't think the original comment was intended to be dismissive of zuo, but they were just pointing out their preference for a tool in that vein (which made sense to me since both are lisp-ish languages made for shell scripting).
If the parent commenter had said, e.g., "Zuo seems to have chosen to do X to address issue Foo, but this other tool took approach Y instead, and I like that better" — well that seems a lot more constructive, and on-topic. But just saying "I use <other tool>" is like... it doesn't belong. It's off-topic, in a way? Not strictly speaking, but enough so that it makes me a bit uncomfortable. It gives me vibes of, like... questioning the subject tool's "right to exist", so to speak, because "why would I use <tool the article is about> when I already know <other tool>!" without actually showing any effort to understand the differences.
I dunno if I'm explaining my thoughts here well. It's not a huge deal, and I definitely have also found some of these comments to be useful in the past, but their general tone rubs me the wrong way just slightly and I thought maybe it was worth commenting on.
Compile "zuo.c" from the Zuo sources with a C compiler. No additional are files
needed for compilation, other than system and C-library headers. No compiler
flags should be needed, although flags like -o zuo or -O2 are a good idea.The last release was 2006 however, and though some folks have ported it to work 64bit, I've completely lost track of how to set that up.
Wondering how Zuo and Gerbil stack up to scsh or if anyone here has any opinions to share.
If you're willing to dynamically link, guile seems like a good choice. Almost 30 years old at this point, and seems to be getting a bit of a revival with guix.
The docs mention you can embed Zuo almost as an afterthought, but surely that's the main point of it?
A lot more robust than a shell script and just as portable, if not moreso.
It’s nothing like Bash; it’s a Lisp dialect.
The obvious comparison is Lua, which is generally the standard embedded language people use when a scripting language needs to be tiny. I compared its size; Zuo is 55% the size of Lua, so apples to apples, Zuo is only a little over half the size of Lua. On the other hand, Lua uses a Pascal like syntax which is a good deal more Bash like than Zuo.
Going back to the Bash comparison, Bash is huge but the subset ash is pretty small, somewhat smaller than Zuo. Busybox’s AWK is, as I recall, about half the size of Zuo. We can have a POSIX compliant scripting setup (ash + AWK) using around the same amount of space Zuo takes up.
> You should use Racket to write scripts.
> But for the case where you need something much smaller than
> Racket for some reason, or the case you’re trying to script
> the build of Racket itself, Zuo is a tiny Racket with
> primitives for dealing with files and running processes.