Not writing a Lispos, honest
Tue, 15 Dec 2020 23:16:40 +0000
When I last stopped doing NixWRT it was after I had decided (perhaps inadvisedly) to write a process/service monitor in Lua , and was getting slightly fed up of debugging it on a (admittedly virtual) read-only system that required a reboot to test anything.
I am not sure that rewriting the Lua in Fennel is going to make this better, but I have converted the files using Antifennel and will note so far that
- it has found a couple of bugs where I had inadvertantly introduced a global
- fennel code is marginally less verbose (the line count is lower)
- I haven't found a nice way to iterate through an array and return
the first element that matches a predicate (as far as I can tell, an
early return from an
eachis not possible) but I'm sure there must be one
My hope is that the rather nicer syntax in Fennel will make it a bit easier for a swarm service to "publish" the expected shape (schema, loosely speaking) of its value, and this will make it easier to validate that the services that depend on it are reading properties that are actually likely to exist. Whether this is how it actually works out remains to be seen.