Email or username:

Password:

Forgot your password?
Top-level
Devine 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.

7 comments
Devine 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?

Devine 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

Devine 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.

Go Up