Show HN: Goboscript, text-based programming language, compiles to Scratch

96 aspizu 26 5/19/2025, 5:51:02 AM github.com ↗
goboscript is a text-based programming language which compiles to Scratch. It allows you to write Scratch projects in text, and compile it into a .sb3 file - which can be opened in the Scratch editor, TurboWarp or be uploaded to the Scratch website.

goboscript allows you to create advanced Scratch projects with ease, you can use any text editor, use a version control system such as git. You can refactor your code using search and replace. Text code can be copy pasted, which allows you to easily reuse code or share it with others. goboscript syntax is concise and easy to read.

goboscript allows you to integrate external tooling and workflows, such as using a script to generate costumes for a text rendering engine. Or loading in images into lists.

goboscript has a powerful macro system - similar to Rust's macro system. This allows you to write macros to generate code.

goboscript is more than just an 1:1 mapping of Scratch blocks to text, it also has additional features like local variables for procedures (custom blocks).

goboscript also performs optimizations, detects problems and unused code.

Comments (26)

AlexanderDhoore · 3h ago
I love teaching Scratch to kids. Some years ago, I used to do "CoderDojo", which is like a hobby club where kids can learn programming. Some kids go to soccer, others to art academy — and these kids learn programming. Super cool to teach.

However, most kids get stuck after they master Scratch. Especially kids around the age of 8–10. They learn Scratch. It's awesome. They make some advanced games and really get the hang of it.

Then they ask to do something more — some “real programming.” And that's where the hurdles start to pop up. First problem: my kids don't speak English, so most documentation and tutorials are out of reach. Second problem: suddenly they need to learn everything about computers — source files, graphics, networking... This is too big a hurdle for them to take. Third problem: text-based programming. Most of them literally can't type on a keyboard properly. Text is also much less fun than visual programming.

What I've always wondered — and this project reminds me of it — is: can we make the transition smoother? Stay within the Scratch ecosystem, which they know, but start introducing extra concepts step by step, without the big jump.

GoboScript introduces "text-based programming" as a first step, while staying within the Scratch world. I would have liked it more if we could teach the kids a real-world programming language, like Python or JavaScript — because then they’re moving toward "real programming" step by step.

The next step would be: introduce other computer concepts like file systems or networking.

I would love to build this myself. Alas, no time. Maybe one day.

sebstefan · 35m ago
As a kid who didn't speak english I used the AutoIT language - not related to AutoHotKey

It's a got a fully localized offline documentation embedded in a plug-and-play IDE designed to always compile & run your code with a single F5 press, no configuration needed

The language itself is fully fledged but mostly revolves around things that kids already know.

The tutorial makes you leave the CLI stage by chapter 5, because when kids want to make software they want to make UIs, they've never used CLIs to do fun things before.

It's also centered around automating desktop tasks. Moving the mouse, typing keystrokes, downloading or opening web pages, parsing the source, identifying windows on screen, moving them around, reading pixels, playing sounds...

https://www.autoitscript.com/site/autoit/

notpushkin · 10m ago
I loved AutoIT as a kid! And it was also fun playing around with stuff like https://www.perfectautomation.com/ (nice to see that it’s now freeware, and the newer replacement project is completely free / open source!).

But it was about the same time as I started digging around in Delphi 7, then discovered a RAD package pretty much exactly like Delphi, but with PHP instead (wild times), and as I was going down the webmaster route in parallel it was the thing I spent most of my days in. (That, and making bootleg Windows XP builds just for fun, of course.)

PullJosh · 36m ago
The solution I built for this is Leopard. It is a Scratch → JavaScript converter. You can take an existing Scratch project and convert it to JavaScript code and then keep working, or use the Leopard library to create a new project from (ahem) scratch, following all the same conventions as a Scratch project.

Check it out! https://leopardjs.com/

femto · 3h ago
It sounds like you want the ability to instantiate a scratch block that contains a text box, which in turn contains the function body for the block? It would then be possible to incrementally write as little or as much as desired in text.

Getting fancy, that block could use a backend interpreter/compiler of choice, so the language could be Squeak, Python, C, an LLM generator, ...

liotier · 1h ago
> It sounds like you want the ability to instantiate a scratch block that contains a text box, which in turn contains the function body for the block ?

That is the escape hatch from all visual development environments. Having seen Talend and W4 in action, I know the end state of the process: a single block with everything in it - I'm barely caricaturing here.

Maybe the specific needs of early learners will keep the system from degenerating too fast but, the moment code goes in that is not visually represented in the environment's visual paradigm, coherence goes downhill fast and one starts longing for properly managed scripts.

brobdingnagians · 2h ago
I know this is probably a bit more advanced, but this suggestion reminds me of Blueprints w/ magic nodes in Unreal Engine. There is a plugin for Magic Nodes (https://forums.unrealengine.com/t/magic-nodes/121220) where you can enter C++ into a blueprint node that integrates into the blueprint system. Similar kind of UI could work well
geokon · 36m ago
This is done rather well in TouchDesigner
gibolt · 2h ago
This is how I learned a long time ago with Game Maker. Everything was Gui based, but you could also add code blocks to do more powerful things.

Eventually, most things I built were nothing but code blocks.

paavope · 2h ago
I had pretty much the exact same experience with Game Maker too. In retrospect, feels like a very powerful pedagogical tool. Even when I wasn't really trying to "learn coding" but rather I just wanted to make some games, I ended up learning to code

The fact that _most_ things could be done with drag-and-drop, but for some features you had to drop down to scripting, served as a really nice and gentle stepping stone to writing code.

_glass · 1h ago
I teach programming to designers and architects at the local university. We're using Processing quite successfully, because it skips a lot of steps. My daughters are too young and are still doing Scratch (with the great micro:bit). But I think next would be Processing, or Arduino with Micropython. But yes, typing is a problem. My older daughter inputs almost all her text via voice input. At work we're doing a lot of low code for new architectures. I think agentic low code tools for kids would be nice.
felixr · 2h ago
For a textual teaching language check out https://hedy.org It is multilingual (not just English) and introduces syntax gradually
byearthithatius · 2h ago
I loved learning and then mentoring at CoderDojos. Incredible meetups where they really let kids learn in their own way with guidance of more experienced coders. Very fun and I never had a bad experience. The ones I went to were at University of Minnesota.
shakna · 3h ago
Would something like Blockly [0] or MakeCode [1] fill that gap?

[0] https://developers.google.com/blockly/

[1] https://makecode.microbit.org/

chrka · 58m ago
latexr · 2h ago
Maybe something like Hedy will work better for you, instead of Scratch.

https://hedy.org/

https://youtube.com/watch?v=ztdxlkmxpIQ

tc4v · 1h ago
You use case is exactly what hedy tackles, your experience is really similar to what the author of Hedy tells in conference and interviews.
japanuspus · 3h ago
Thank you for making this!

My initial take was to share this with my son who used to built all kinds of things in Scratch, but I know that the lack of simple install instructions will be a deal-breaker for him.

Given that (part of) your audience will be persons like my son graduating out of graphical programming in Scratch, it might be worth spending a little time on non-dev install instructions. Even more so as you can leverage the rust toolchain and just suggest something along `cargo install --git ...` [0], without even publishing as a crate.

Apologies if this comes across as entitled: I just want to communicate that a single README-sentence on top of the work you already put into this would make it significantly more accessible.

[0]: https://doc.rust-lang.org/cargo/commands/cargo-install.html

nis251413 · 1h ago
Next step: create a visual programming language that compiles to goboscript.
ferriswil · 2h ago
Looks fantastic! Now it simply needs a non-Scratch runtime and a Scratch-like frontend, and we'll finally be able to teach bootstrapping to the 5-10 year old demographic.
sriram_malhar · 3h ago
I love it! It has features that I'd have liked Scratch to have, like return values from functions, local vars, structs etc.
arnavsurve · 4h ago
This is hilarious yet awe inspiring at the same time. Great work
arjvik · 4h ago
This is beautiful, and brings back so much nostalgia!
web3aj · 4h ago
This is hilarious because it defeats the purpose of scratch.
sriram_malhar · 3h ago
On the contrary. I think it is an excellent bridge between visual and text-oriented programming. It also introduces concepts we take for granted elsewhere: return values from functions, text-based macro substitution, local variables, structs and enums.
bvrmn · 1h ago
Tell me more about scratch's purpose, please. I believe it's to teach programming. GoboScript seems a natural extension of already conventional environment to more "real" textual programming tasks.