Email or username:

Password:

Forgot your password?
Devil Lu Linvega

After nearly two weeks of trying to fit a prism inside of a circle, I've managed to find a comfy balance for the uxntal arity checker. I can now get on with my life.

The validator is able to validate its own source code, which is as convoluted as I can stomach in regards to its own complexity.

Most of uxntal wasn't designed per say, it's more that programming patterns emerged from toying around with the primitives. ie: There never was a notion of "loop".

git.sr.ht/~rabbits/uxnbal

12 comments
Devil Lu Linvega

Due to the absolute lack of planning in terms of programming language design, if you can even call Uxntal a programming language, means that there was never a census of Uxntal's capabilities.

Before putting this together, I don't think I had a good understanding of the actual hidden complexity of the thing.

Type inference was a game of whack a mole, until things started to come together in these past couple of days.

Devil Lu Linvega

But really, honestly, I hope to never have to do something like this ever again. Type-checking assembly is totally cursed computing.

Jencel Panic

@neauoire interesting, I want to know more, what were the difficulties? Would you use it fo all uxn code?

Devil Lu Linvega

@abuseofnotation I wasted a ton of time trying to figure out how to handle recursion, but in the end that was a non problem. I think the hard part is a ux challenge, I didn't want for this to get in the way. Finding that right balance was tricky.

From now on, I will validate all the code that I write. It will force me to make code that is more explicit, and since a lot of it is being copy/pasted into other project, it'll be good. But I wouldn't encourage everyone to use it.

Dekkzz

@neauoire

Reading the repo is this all some cosmic pennance, did you destroy a universe in a previous life? ;)

WimⓂ️

@neauoire I sympathise because i had to do most of what you did for my Uxntal-to-C compiler. The generated C code must be correctly typed so I had to infer the types of the Uxntal functions. The main difference is that I did some normalising transformations first to have far fewer function types.

@dekkzz76

Devil Lu Linvega

@wim_v12e @dekkzz76 the types that tripped me the most were routines that passed items through the return stack, and the ones that don't return.

I had this one super weird routine in drifblim that could BRK in a special case, which I had to refactor because it was just too hard to validate: git.sr.ht/~rabbits/drifblim/co

For anything that does a jump to a dynamic value(LDA2 JSR2), I had to flag as unsafe.

William D. Jones

@neauoire Uxnbal is to Uxntal as Old Gateau is to Old Chateau :).

Devil Lu Linvega

@cr1901 Accurate, uxn is spelled like a sneeze. Uxnbal is trying to say uxntal with a runny nose.

charlie

@neauoire This is a *monumental* achievement for a language with so few constraints

Devil Lu Linvega

@bellinitte Once you're done with the 3d engine, I'll try and validate it :)

Go Up