Search
Items tagged with: Uxntal
git.sr.ht/~rabbits/heol
I was thinking about @binarygolf #BGGP6, I figured, okay, the shortest ambigram program(a program that evaluates both ways) that prints "6", is 7 bytes.
Is there anything else? Well, if you run this next ambigram at exactly 54 minutes and 18 seconds, any hour of the day, it will also print "6".
80 c5 36 17 36 c5 80
I've been continuing work on ubal, and I'm trying to write the code in a way that helps maintain a connection to my mental model, as well as making better use of the conventions of lexing and parsing.
Ideally, I'll end up with a codebase that I (or someone else) can easily modify for use in other cultures with other time formats or numeral conventions. Even if it falls short of that, it's improving readability.
I'm fairly proud of the way I've written the lexing rules: directly in a state-machine specification. It's nested linked lists of blocks of code. You can see them here:
git.sr.ht/~fluffysoft/ubal/tre…
I've also written a method to print out all of the state transitions and the character codes on which they happen. You can find that on line 86. It makes use of nesting continuation loops, which I think makes it easier to read.
#uxntal #uxn #theWorkshop
Hi everyone, I made a repo for my various #Uxntal libraries: argument handling, string handling, formatted printing, signed arithmetic and comparison, call stack support,...
It is not very well documented but I hope it can be of some use. Please ask me anything about it!
codeberg.org/wimvanderbauwhede…
uxntal-libs
Various libraries for Uxntal: argument handling, string handling, signed arithmetic and comparison, call stack support,...Codeberg.org
A question that keeps coming back is how to apply a struct to a database in #uxntal.
Here's the little example I will be using in the upcoming docs 😀