Porting projects to making use of lambdas, the ability to nest them is really nice.
In screenshot, left is button handling with lambdas, right is without where each state has to have a unique label.
Top-level
Porting projects to making use of lambdas, the ability to nest them is really nice. In screenshot, left is button handling with lambdas, right is without where each state has to have a unique label. 10 comments
@a13cui Haha, thanks. I'm glad you think they're pretty. I think because varvara enforces a kind of grid, it gives everything a certain look @tbsp I've tried writing a bit of documentation here: https://wiki.xxiivv.com/site/uxntal_lambdas.html Do you think it's understandable? @neauoire I see you've expanded it a bit since I read it last. There are still bits that go over my head, but it's clearer now. @tbsp The way it works behind the scene is interpreting a single { as a JSI looking for a closing label called "lambdaXX". You can use runes with it like any other label, it's dynamically looking for its closing bracket. So you could do ={ }, -{ }, !{ }, etc.. C: https://git.sr.ht/~rabbits/uxn/tree/main/item/src/uxnasm.c#L195 |
@neauoire I have no clue how you manage to make Uxn look so pretty, but you're definitely the best ambassador I know