Post #1004231
2026-04-07 20:33 UTC
I implemented @neauoire@merveilles.town 's Rejoice, in Perl for some reason :)
This was attempt like 3? I vaguely remember reading a Moore quote about "writing, rewriting, and rewriting again". I follow that advice religiously
I absolutely hate writing parsers, and yet invariably end up having to write a parser. This is probably the best one I've done but its still a bit of a mess!
The only difference I can spot between my implementation and the UXN one is that mine can't differentiate between [x x x] and x^3 (it always uses the latter). This means that things like [ .x .x .x ] will only print a single x (I'm not sure what the intended behaviour is for that case anyway tbh?)
https://patpatpat.xyz/data/rejoice.pl/
Replies (1)
-
@pat@patpatpat.xyz 2026-04-07 23:01
hehehe, a text-based adventure game is theoretically possible. I added a naive "?" command to get a line of input (its then split into words, and those words are put into the bag) I think user input will be fiddly though, because its essentially giving the user a REPL with unlimited access to the program. Perhaps limiting the input to a specific subset of words would work, like ?[look take quit]