Ring Break (A more concise way to evaluate inner portions of rings)

Hello! I know that I've posted a lot recently (bug reports, custom types, suggestions, etc.), but I just wanted to throw this out there. I assume that a similar idea has already been suggested, but I couldn't find any forum topic about it. I understand that the Snap! backlog is extensive, so I am not demanding that this be added or even considered. Thank you in advance!

Rings allow us to store blocks as first-class data. Sometimes, one would like some parts of the ringed script to be evaluated. The easiest (yet not easy) way is to use (join ((foo ())::ring) (. . .) @delInput@verticalEllipsis@addInput). This can complicate scripts that would otherwise look simple. A ring break (or disring, irring, antiring, or a name to that effect) could reduce the number of block morphs that need to be displayed. I am not sure how they'd appear, though. Maybe it could look like ((()::ring)) or have a unique border.

To store a ring break in a variable, you could nest a ringed ring break within another ring break.

 (((((()::ring))@addInput::ring)::ring))

Now I'm thinking that the ring break should go in the Control category. There's too much gray, and it looks like a pull/ring tab :cold_sweat:. Wait a second...Ring tab? That's ironic.

Thank you again! Merry Christmas (or Happy Chanukkah)!

I think you could probably do this with continuations.

How would you do it?

no idea. (but maybe look in the iteration; composition library and play with the catch/throw/blocks.)

Pretty sure you could write it in Snap! yourself, with a procedure that splits a script and then rejoins each of its commands separately.

I'll try that. I didn't attempt this in the first place because we can't edit the definition of rings.

I'm failing to see the irony.

It's an example of situational irony. Earlier in the post, I gave some example names for the ring break, and my later visual representation of the break did not convey its meaning. In both cases, I struggled to provide any analogy. At the end of the post, I complained about my proposed representation and said that it looked like a "ring tab," which was contrary to my expectations about such representation.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.