blobby tables

Sniff vs. tosh

May 18 2015 • Filed under tosh

Someone asked me how my project tosh relates to Sniff. I’m not associated with the Sniff developers in any way, but the projects are superficially similar. (To be clear, I was aware of Sniff when starting tosh.)

Sniff is a Scratch-like programming environment designed to ease the transition from Scratch to more conventional languages.

Sniff has a similar motivation as my motivation for tosh. Here’s a quote (emphasis mine):

…why do we need Sniff? …at some point you need to move beyond Scratch. …Clicking and dragging blocks is a tedious and slow way to build large programs. It could be you need something that feels “more grown up”…

In fact, go read the entire Why We Need Sniff article: most of the points there also justify tosh very nicely! They expand on my argument that beginners should learn a new input method (ie. text-based coding) while using a familiar language/paradigm (ie. Scratch, or at least something similar). They hypothesise that trying to learn both at once is what puts people off “real” programming.

So we agree on motivation. And Sniff and tosh both have the goal of being “Scratch, but written down”. The two projects diverge on how far we take that idea.

Sniff isn’t exactly the same as Scratch — in addition to being text based, its compiled. It’s also more strongly typed than Scratch. Both of these changes make it practical to run programs written in Sniff on the Arduino.

So Sniff lets you program robots using a Scratch-like text-based language, which is actually quite different to Scratch!

tosh is a Scratch editor, nothing more or less: any Scratch project is a valid tosh project, and vice versa. It’s just a nice syntax for writing Scratch programs.

Sniff takes inspiration from Scratch, but has a different use case, ie. robots.

Finally, Sniff’s syntax is a little odd. In particular, they use dots . for indentation. I can see why—it avoids the tabs/space confusion—but it looks a bit weird. They recognise that auto-indenting IDEs would be an alternative solution, and that’s what I’m planning to use for tosh.

make x number

when start
.set x to 1
..say [ x ]
..change x by 1
..wait 1 secs

Sniff is different to tosh, but it’s still a cool idea. If you have an Arduino or other supported device, go try it!