How do you get Snap blocks on the forums?

[scratchblocks]
A hat and a (hat and a (hat and a (hat and a :: grey hat):: grey hat) :: grey hat) :: grey hat
Cap and a (hat and a (hat and a (hat and one last (hat :: grey hat) :: grey hat) :: grey hat) :: grey hat) :: cap
[/scratchblocks]

[scratchblocks]
when ({ring clicked :: events} :: grey ring) :: custom hat
forever if <(RINGS RULE :: control stack) :: grey ring> {
scream [I LOVE RIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIINGS] :: looks
play sound [RINGS ARE DA BEST v]
} else {
scream [WHYYYYYYYYYYYY] with a grimm face :: looks
} :: control cap
[/scratchblocks]

???

[scratchblocks]
define BOOOOOM
forever
launch({BOOOOOM}::grey ring)::control
run(JSF()[alert("Yo Lo Lo Lo Lo")]::operators)::control
end
BOOOOOM
end
while<>{
}
end
forever{
}//Misterious
[/scratchblocks]

I’m pretty sure I was, too; certainly for the first version of scratchblocks, the one that was almost entirely CSS. (Nowadays the renderer’s all written in SVG.)

It’s a weird project, because I keep coming back to it every few years, each time rewriting it all in a much better way; which is an interesting way to see how far you’ve grown as a programmer :sweat_smile:

Guilty. :stuck_out_tongue:

Maybe one of these days I’ll add an alias…

(Oops, I shouldn’t be replying to a closed topic. Hopefully Brian will forgive me :sweat_smile:)

closed unofficially

Hey, if you're into programming in picture formats, I have a more important application than scratchblocks: When someone clicks "script pic" or "result pic," the resulting picture file should include the (serialized) script itself as metadata. This is for the benefit of our project (any time now, mostly written, by @djdolphin) to translate help screens automatically to whatever (human) language Snap! is using. We can do the text, but not the pictures.

Brian, I’ve been lurking here less than a day! You can’t already be trying to nerdsnipe me. :stuck_out_tongue:

like helicoptur(and everyone else, but that's 1% of the time) does.

Hadda look that up, although now that I'm reminded of it, I did read that xkcd at the time. But I don't think this counts; you weren't doing something unrelated. It was you who brought up programming in SVG. :~)

there is XKCD for everything

kinda is...

It isn't, but [spacer told me to censor this] is. It's just a webcomic

don't mention that website on a PG-13 forum.

Well, whether or not it counts; I’m currently reading the PNG spec so I guess you win. :stuck_out_tongue:

Looks like we could fairly easily embed arbitrary text into a PNG image as metadata; you’d just have to come up with an appropriate key (Snap! Source or whatever).

It doesn’t look like JS supports reading or writing the metadata, but one could fairly easily write a minimal PNG parser that just supported (1) adding the text chunk to a PNG exported from canvas (or however you generate script pics) and (2) reading out the text chunk. Would that do you?

edit: Actually I think you want a “private ancillary chunk” rather than a “text” chunk, since this isn’t human-readable data. But same idea.

PNG? Isn’t this about scratch blocks