When you reshape an empty list to an empty set of of numbers, it doesn’t return anything. (And I don’t mean just an empty string).
![]()
The value it returns in general is very problematic. If you try to use it in a script, Snap! will freeze the script.
yeah, I actually reported a similar bug (twice) with the clone block. I don’t remember what the topic was called, but i’m pretty sure the devs said that it takes time for snap to look for these strange behaviors so it’s way faster to just… not.
but, um, considering snap could get crashed, I don’t know if they’re right.
Can’t reproduce this.
I see the problem.
This value is literally just null in js, which doesn’t show a value. Using it in scripts does in fact cause
to freeze up. Basically the equivalent of this:
call(Javascript function \(@verticalEllipsis@addInput \) \{[]\})@verticalEllipsis@addInput
Well, here is the same problem:
well, I can’t reproduce any “crashing” as long as you can manually and even programmatically stop a process and don’t loose your work it might be inconvenient for you, but not “crashing” anything. It’s a programming language, folks, you’re allowed to write nonsense such as this expression. Just don’t expect Snap! to be smarter than you are ![]()
isn’t it undefined?

If
it’s not that extraordinary to expect that reshape, for empty list, does not cause an infinite loop ![]()
oh yeah. sometimes i get the two mixed up
This is how it was for a long time. Jens changed it in I think 10.x.x and many of my projects broke, in addition to the EXPAND block in the metaprogramming library. But idk what the right thing to do is, and going back to fix everything in my old projects again would be kinda annoying.
Zero is just a number for computer scientists, and a religion for mathematicians ![]()
Zero inside a Snap! dimension list indicates variable size:
which is really helpful when you’re using it in multi-dimensional settings. Suppose you want to reshape data into a table of a particular number of columns, here’s how you can do that really nicely:
How 'bout -1?
or just empty?
We have the “pick random” block, in which number inputs are treated like strings, so basically a “” doesn’t have to be converted to a “0”.





