Email or username:

Password:

Forgot your password?
13 comments
charlie

The `$label` syntax is not a thing, BUT it could be!! I managed to hack it together for uxnasm in a couple of lines of code

paste.sr.ht/~bellinitte/54fd46

charlie

This stuff is sorta possible with the current syntax using a bunch of macros like these:
```
%Vector/size$ { $4 }
%Player/size$ { $9 }

@player-1 Player/size$
```
but this approach requires adjusting all paddings by hand in case any size changes.

Devine Lu Linvega

@bellinitte OOoooh! you think padding should support labels?

charlie

@neauoire if all the machinery is already in place and it's not a huge pain in the butt to implement in drifblim and friends, then yea, I think it would be cool :) I use this approach all over the place in this program i'm writing

btw, got this idea from you talking about enums in this list lists.sr.ht/~rabbits/uxn/%3CCA

Devine Lu Linvega

@bellinitte ..it's genius. I can think of so many places where I'd use that.

charlie

@neauoire I love uxntal, let me tell you. You want to assign a name to an address in memory? Labels! Maybe assign some names to devices and their ports? Labels! Need enums? Use labels! Structs? yeah you can just use labels!

Devine Lu Linvega

@bellinitte it's nice that we keep on finding new things to do with so few moving parts

Kira, feral fox 🦊 🏳️‍⚧️

@bellinitte really easy to write some nice lil accessor macros too:

%Player/position@ { .Player/position ADD LDZ2 }

charlie

@tty ooh, yeah! you're absolutely right

Go Up