Snap! v7.3.0 Release

Folks, we've just released v7.3.0 - please make sure to do a "hard" reload or to flush your browser cache when you reload Snap, otherwise you might see strange glitches. In case of success you should see the slightly changed, now variadic plus and multiply reporters in the operators category:



Release notes

also yay finally

cool thanks

It is great, but is there a way for us users to define similar variadic reporters?

why so many updates!!!1

You can always make your own variadic reporters, can't you? We had them in a library until now.

You can mute these types of posts so you don't get them.

I can define

untitled script pic (47)

but that's not the same thing. No '+' characters between each input

The tab title changed, removing " - Build Your Own Blocks".

AWESOME! Went into the editor to see what this actually was and, I'm not sure what I expected. It is very cool though knowing that I don't have to stack and stack and stack operators on top of each other now.

Not all syntactic tweaks are exposed to users, but the semantics are all there. At some point I might be persuaded to add user editable options that are already supported internally, such as infix delimiters, min / max / default number of inputs, optional collapse labels, optional permanent labels etc. pp. I'm generally very reluctant about offering a user interface reminiscent of an A380 cockpit, because some poor students will end up having to deal with it (not the ones in this forum, but the ones we don't see here).

That's great! Now I'm updating Block Codification to support variadic reporters in that blocks:

I agree but also like the idea that there should be a way for a user to define built-in blocks when feasible.


We had a huge discussion about this. As soon as Jens proposed this feature, I wanted to generalize it! Make the notation available to users, and also make it possible to reduce the number of inputs to one (identity function) or zero (identity element). And for - (especially) and / make it possible to reduce the number of inputs to one (inverse operation), all as in Lisp. Jens talked me out of all of that except for monadic -, which I still want. (I was hoping to get that in this release, but I guess not.) All the other cases are just generalization to show that it's possible and meaningful, but monadic - is something users would use every day.

(Well, actually, there's a use case for niladic + and ×, namely, when writing COMBINE and dealing with an empty input list. But the primitive COMBINE knows the identity elements for the arithmetic associative operators.)

why is mine still 7.2.5?
Screen Shot 2022-03-07 at 4.52.12 PM

You need to clear your cache. You might be able to shift+click the reload button. If that does nothing, check the browser settings. There should be an option to clear cache.

What I find strange is that what you ask for (that it work like Lisp with 0 or 1 input) is there if things were defined using

untitled script pic (47)

It is only the infix notation that is missing.

that's because the new variadic block is really only syntactic sugar for combine using +, which in turn is a special case because Brian insisted on this LISPy behavior for + / * / min / max.