I just realized something..

I come from making games with algols where queuing animations used this awkward kind of setup:

.then(() => {}).then(() => {})

Even back then it felt shitty to work that way but it was all I ever known, and over time I'd read about continuations, or stringing along an env variable, fussing with callbacks, it was just all bad, but you learn to live with it.

In catlangs, animation is absolutely seamless:

this then that

It is a valid way of sequencing animation functions because the atoms of a catlang can be concatenated. It's the ultimate scheme for doing gamedev animation in my opinion.

Anyhow, You wouldn't NAME a VARIABLE.

@neauoire you're clearly cooking here, this is looking sooooo good :D
@neauoire a while ago I made a little toy language for HTML interfaces in a forth like, and it was surprisingly intuitive.
@arcade @neauoire can i get a link to it? this sounds awesome!
@neauoire I love your monochrome art. And yes, that braces notation is terrible. It becomes progressively worse as the chain becomes longer. And they say lisp has too many braces.
@neauoire A timeline editor with keyframes and curves or hang me now.

@neauoire any language with coroutines becomes very natural for this too. Eg our dialogue system has single scripts which wait for responses (no function boundaries) and this was extremely writer friendly.

I wonder about the similarities and differences vs catlangs

You can't concatenate them in most languages but you can just call them one after the other (or wrap them in a function which does that)

@maxc as long as they're not a special form, they'll feel something like in a catlang, if APL have continuations, I'm guess the tacit nature of the language will make them feel quite similar to catlangs; otherwise, it's context switching and noisy syntax just like in JS. In scheme, which I find quite beautiful, continuations are super slow and look like a stain.

@neauoire in lua it's cooperative multithreading basically. coroutine.yield and you can manage the calling yourself. Since it's just a function call it can be put wherever to build something that doesn't have to deal with the nuts and bolts when you're being creative.

So in Arco, dialogue:line("tizo", "yo") makes the character tizo say yo, and waits for player input before continuing the script. Extra nice that prompts can just return whatever was picked. It can take as many frames as it needs and the rest of the game can keep in trucking.

Not as elegant perhaps when you drill down inside I guess, but it's explicit, so you get to say when interruptions can happen, and once you're in a coroutine anything using that functionality is just a normal function call.

@neauoire can I see a snippet of code on how this works ? I’m curious !

@mario_afk Sure! For example, here's the event that triggers when the last card on play is picked up.

the code: https://paste.sr.ht/~rabbits/11a769a87150e38a3936f592bc340f37d563ace6

down-animation.start() plays the pulldown animation
hand.new() draws a new hand while the cards are offscreen
back-animation.start() brings them back

The important bit is that there is no special syntax for async code even tho the program moves between a button event, to a screen animation, and back.

in context: https://git.sr.ht/~rabbits/donsol-hd/tree/master/item/src/donsol.tal#L346

@neauoire it looks great! Thanks :)

@neauoire Some years ago, a friend of mine made a JavaScript based version of a language that had Orc's parallelization operations included. Your example reminds me of that a little.

Of course, the focus was different, but the UX nonetheless was better.

Imagine a block in which things get done in parallel, until the first one finishes. The others get cancelled. E.g.

firstOf {
Get(first_url);
Get(second_url);
Get(third_url);
}

The "then"...

@neauoire ... part is just what follows the block, and so is just as intuitive as if I/O was blocking.

My TL;DR is at any rate that there are a lot improvements to language UX that we need to experiment more with.

@jens Your friend would have liked Occam on the Transputer : )