How does vardradic “if else if” work with list inputs?

What do you mean “seems?”
Didn’t you make it or am I misunderstanding ._.

Personally I’m more interested in the catch and throw’s weird cousins
untitled script pic 59
untitled script pic 58
The whole new continuation system kind of makes me slightly frustrated as I just figured out how the current one works

i think?

It works like an “all below” function sort of?
What the block does is that it gets everything past the c area, then when it gets the tag input in the “throw” it runs whats below, what I don’t quite understand is how it’s stopping the original script

My proposal is for a library entry extending untitled script pic - 2023-05-26T161249.647; judging from the version 9.0-dev.'s contents untitled script pic - 2023-05-26T161249.647 is not going to be replaced.

Oh I thought it was something that would be a workaround to the new block
If this does happen I’d love to have
untitled script pic 63
So that you don’t have to drag the block twice into the 2 sides
It basically just intercepts the value if the function is true

Could you explain what your proposed block is supposed to do?

If the value in the first slot run with inputs in the predicate in the second spot is true, then it reports the thing in the “else” position
Otherwise it just calls the procedure in the first slot and outputs that
So that you don’t need to copy the procedure in the “if” slot on the original block into one of the “else” slots


basically like
untitled script pic

Kind of? Basically each of the vardradic cases links to that same case inside of the block
So case 1 would run the fist “C”
Case 2 would run the second ect.

Why are they more weird than the command version? Because the THROW reports a value to the CATCH? It has to, because the CATCH is a reporter and has to report something to its caller.

Continuations are a hidden part of every programming language. When they talk about "the stack" on reddit or wherever, they're talking about a continuation. What's special about Scheme is that it makes continuations first class -- they're data in the language.

Your definition of "continuation" isn't quite right. The continuation of some block is everything that remains to be done in the toplevel script after this block finishes, not just the part that's visible in the definition of the block that uses that one.

THROW replaces the current continuation with the saved one.

Scripts don't run; processes run. A continuation is a kind of procedure, and when you call it, it replaces the current continuation of the current process with itself. It doesn't create a new process the way LAUNCH does. So when it's called, instead of returning to its caller it returns to the saved continuation.

Most programming languages have a way to get out of a loop early, In C-like languages it's called BREAK. THROW is like BREAK but smarter, because if you have a loop inside a loop inside a loop (which sounds silly, but think about a game program that has a "do you want to play again?" loop, and inside that there's a sort of clock loop that repeats one step of the game, and inside that there's a FOR EACH ITEM loop that does something or other), in those other languages you can only BREAK out of the innermost loop, but with CATCH and THROW you can put a CATCH around every loop, and then you can THROW to the one for the loop you want to get out of.

The part that's a little weird is that you can THROW to a catchtag from outside of the CATCH. In those toy languages they don't let you jump into the middle of a loop, because their continuations remember only the place in the code to which the current procedure has to return, so if you jump to one from outside the loop, all the local variables inside the loop don't have meaningful values, or maybe don't exist at all. But Scheme continuations (and we are a Scheme) remember not only the place in the code to return to but also the values and scopes of all variables at the time when the continuation is created. Jumping into the middle of a loop is only occasionally useful, but if it's useful in your program, you can do it.

What ment by “weird” was less used and less known. They also don’t have their own help message and instead use the one for the normal blocks

Also that’s a very good explanation of continuations
Now I sort of get how they work

Oh oops! I'll fix that. Thanks for reporting it.

You really shouldn't think of command ones as normal and reporter ones as weird. They make sense together, just like RUN and CALL.

I suppose they do make sense
When I called them weird I didn’t mean it as in unusual, I just ment it as a filler word

"Reporter CATCH/THROW." :~)

The throw block’s cousin (we should really make better names for these) isn’t a reporter, it runs with inputs

So “catch and report” and “throw with input” would probably be the appropriate names

It's true that THROW is always a command, but my point is that CATCH and THROW are partners, as you pointed out in the first place by grouping them the way you did, and that pair of blocks provides nonlocal exit for reporters. The name reflects the purpose rather than the exact syntax.

Very wise words

Personally as I said before I think of the catch and throw blocks as “all below” blocks

I now fully understand what continuations are thanks to this


And with that knowledge
9.0 test plz don’t kill my saves script pic
Here’s the rewritten definition

That'll work, but it's more complicated than necessary. You can just say SET TAG TO (THIS CONTINUATION). :~)