I’ve been reluctant to talk about this, because I start lots of projects and most of them never get finished.
So, here goes: I’m working on a text-based editor for Scratch projects. It’s called tosh. (Don’t criticise! I like this name: it reminds me of a programming language like “bash” while also being slightly whimsical. Imagine a period actor saying “That’s a load of tosh!” in a posh British accent.)
I think it’s trendy to be pedantic about how people capitalise your project’s name, so I’d like to ask you write tosh lower-case, always, if you please. In a monospace font, if you can.
I’d like to make this clear: tosh is not scratchblocks.
At first glance, tosh and scratchblocks might sound similar: they both involve a text syntax, and have something to do with Scratch.
…which probably makes tosh a really bad choice of project! I already have enough trouble explaining the difference between kurt and scratchblocks in job interviews… clearly I should stop doing Scratch-related projects! (Unless I want to go to the MIT Media Lab and work on Scratch, I guess.)
Let me clarify the difference. The scratchblocks syntax is:
Designed for display. The text you write directly corresponds with how the result will look.
This means the grammar accepts nonsensical things like
say (when flag
clicked). It also has features like ` :: category shape` which allow you
to specify the colour and shape of a block, which would have to be ignored
when compiling to a Scratch project.
I didn’t come up with the syntax: I stole it from JSO’s plugin, which I entirely re-wrote.
Awkward to write. You have to put brackets around every input, even
inside arithmetic expressions. You even have to format menu options like
v] to get them to look like menus. This is why tools were created to
automate writing scratchblocks
So the syntax can’t be changed without upsetting lots of people.
tosh has an entirely different set of principles. tosh is:
The other reason for keeping it secret was so I could avoid design-by-committee: if I’d told people about it, they might make suggestions or feature requests. Working in secret lets you decide every detail by yourself, to produce a coherent, consistent design.
This is a risk, of course. I’ve had very valuable contributions from my friends-from-the-internet (read: cool people from Scratch) in the past. Nathan-from-the-internet continues to make me insanely jealous of his coding skills. Kartik-from-the-internet and Connor-from-the-internet are pretty cool, too—go check out their blogs. These people and others gave invaluable advice when I was redesigning scratchblocks, for instance.
But this time, I found making the design decisions myself was fun. It’s going pretty well. And I’ve learnt a lot doing this project.
And it meant I could ask my non-Scratch friends about it to get a fresh perspective. In particular my friend Dan provided lots of advice, especially when I was being stupid.
Now I’m planning to write a series of articles about what I learnt, and the design choices I made. It’s gonna be fun to share with you!