First-class hat blocks

But, Jens, my point is that we're not delivering on the promise implied by "rule." What comes under the hat block is still an imperative script. I think that'll only confuse users who, mostly, don't have any idea what declarative programming is.

Hmm... maybe, but you might be forgetting about or under-appreciating that Snap! is a parallel system!

Here's the paragraph-formatting spec we've been discussing in Alan's group. Somebody up to giving it a try?

LWordWrap 12.15.09.pdf (2.6 MB)

Upvars on custom hats are not accessible by the attached script.
https://snap.berkeley.edu/versions/dev/snap.html#present:Username=snapenilk&ProjectName=new%20hats

Ah yes, that's still under construction...

I am only an egg, but I don't see what parallelism has to do with declarative programming. Or rather, I can see how a declarative programming system, like any functional discipline, lends itself to parallelism, but I don't see a connection in the opposite direction, which is the relevant one in this conversation. Our parallel threads are still imperative.

Upvars in custom hats should now work.

:+1:

I put a hat other than when slot _ signals _ in the definition of another hat (see my new hats project linked in a previous reply)

lol, nice, I did that yesterday by editing the xml, is that what you did?
also, in the project, I would recommend changing the when on edge block and when queue is empty to event hats instead of rule infinity hats.
also, the first 5 blocks hat doesnt work because splitting hatted scripts by blocks for some reason ignores the script and only splits the hat.

no; unringify

touch a corner, or touch another edge before leaving the first one;
keep running until the queue is empty

that's not mine

omg omg
image

ik that is fake, i see 2 darkened options when there should be one

No, it's real

You just have to be in the dev version

Also, the 2 darkened options is just a result of pressing shift to take a screenshot (on windows the shortcut is win+shift+s). You have no idea how many times I take a screenshot of a menu when I want 1 option grey.

whoops, confused the dev version with real.

what happens if i do this
cursed

try it...

in general, i just press PrtSc to open a screenshot tool (Flameshot on Linux because i use it; on Windows i don't remember, maybe Clipper or something idk)