Discuss Scratch
- Maximouse
-
1000+ posts
TB3: text-based Scratch 3 (beta)
That's a good idea – currently, importing a project with these blocks removes them, which isn't ideal. Thanks for the suggestion! I have a suggestion! There are a few hidden blocks in the scratch editor, that don't show up in the menu. You can gain them by modifying an SB3 file you use for your project! You should add them into your text editor! Here, I have uploaded a project containing all of the known hidden blocks.
https://scratch.mit.edu/projects/1174055272/
(Use “See inside” to view the code, and take the blocks.)
- blob8108
-
1000+ posts
TB3: text-based Scratch 3 (beta)
Nice, thanks!I miss being able to hit cmd+return to trigger the green flag, for even faster feedback when developing :-)Added!
My current solution is to simply store the text-based code in the project as an additional JSON property for each spriteIf you store the tosh code inside the scratch project — how will you handle importing existing Scratch projects?
tosh automatically renames things in imported projects to fix conflictsI don't remember doing this at all!

I do remember one of the design goals I had for tosh was to be perfectly inter-compatible with Scratch, in both directions. This led to things like spending far too long writing code to measure the height of Scratch scripts, so they would be perfectly “cleaned up” when you opened the project, rather than all on top of one another.
I do like the idea of allowing you to edit scripts while they're running, that's one of the key limitations tosh has compared to the ethos behind Scratch itself!
- Maximouse
-
1000+ posts
TB3: text-based Scratch 3 (beta)
When a project is loaded, the editor generates the code for any sprites that don't have it yet. I used the code generator from tosh, with the necessary changes to work with Scratch 3 and a few bug fixes. If you store the tosh code inside the scratch project — how will you handle importing existing Scratch projects?
Another advantage of Scratch is how many languages it's translated into – I think it would be really nice if it was possible to write code using a tosh-like syntax in languages other than English. A lot of the work for each language will probably have to be done by hand (parts of the grammar, the list of reserved variable names), but I think adding at least a few additional languages could be a long-term goal for TB3. I do like the idea of allowing you to edit scripts while they're running, that's one of the key limitations tosh has compared to the ethos behind Scratch itself!
- Jonathan50
-
1000+ posts
TB3: text-based Scratch 3 (beta)
TB3 TB3 TB3 TB3 TB3 TB3 TB3 TB3 TB3
Ehh chances are no one's gonna get the joke. (Unless blob reads this, hi blob) This is pretty hype though
Ehh chances are no one's gonna get the joke. (Unless blob reads this, hi blob) This is pretty hype though

- Maximouse
-
1000+ posts
TB3: text-based Scratch 3 (beta)
I've just pushed some fixes:
- Changing the UI language no longer breaks the code editor.
- The “when _ > _” and “when video motion > _” blocks now have autocomplete.
- CST1229
-
1000+ posts
TB3: text-based Scratch 3 (beta)
(#44)i think i also get it.. it's the “tosh tosh tosh tosh” thing, isn't it
TB3 TB3 TB3 TB3 TB3 TB3 TB3 TB3 TB3
Ehh chances are no one's gonna get the joke. (Unless blob reads this, hi blob) This is pretty hype though
Last edited by CST1229 (May 16, 2025 13:30:18)
- Jonathan50
-
1000+ posts
TB3: text-based Scratch 3 (beta)
I did not think some of us taking a joke too far and annoying blob up to the release would ever classify as the sort of history ever likely to be rediscovered by later ATers i think i also get it.. it's the “tosh tosh tosh tosh” thing, isn't it
Last edited by Jonathan50 (May 17, 2025 11:37:51)
- blob8108
-
1000+ posts
TB3: text-based Scratch 3 (beta)
It’s okay, I wrote a chances are no one's gonna get the joke.whole explainer

Yes! I really wanted to do this, but never got around to it. adding at least a few additional languages could be a long-term goal for TB3.
I think it should be possible to automate the trickier parts of the grammar. I think the main thing that has special handling in tosh is the math, I don’t think there’s too much else I had to special-case?
edit: okay wow this thing has more hardcoded than I remembered (and is somewhat inscrutable, a decade on!). Still should be possible to generalise it some more though!
edit edit: oh right yeah there’s also a page with the entire grammar on it (which, fun fact, loads the entire editor? Including the warning, if you’re in Safari, that saving might not work right

Last edited by blob8108 (May 19, 2025 23:09:16)
- Maximouse
-
1000+ posts
TB3: text-based Scratch 3 (beta)
If you mean Scratch extensions: Pen, Music, Video Sensing, Text to Speech, Translate, and Makey Makey are supported. The rest are experimental (see is there extenoson support yethere) – if you have any of the devices that can be connected to Scratch, please test it and tell me if it works.
Last edited by Maximouse (July 3, 2025 05:43:08)
- makksi
-
1 post
TB3: text-based Scratch 3 (beta)
Could you think to add the possibility to test partial code execution, fo example only one sprite or partial code (for example “selected code”)?
Many compliments for the project!
Many compliments for the project!
Last edited by makksi (Sept. 20, 2025 06:13:47)
- Maximouse
-
1000+ posts
TB3: text-based Scratch 3 (beta)
That's a very good suggestion – thanks! Could you think to add the possibility to test partial code execution, fo example only one sprite or partial code (for example “selected code”)?
- B-Jay
-
10 posts
TB3: text-based Scratch 3 (beta)
It would be nice if there was a professional domain
- redspacecat
-
500+ posts
TB3: text-based Scratch 3 (beta)
I could host it on tb3.quuq.dev or something. It would be nice if there was a professional domain
- Spy-One
-
8 posts
TB3: text-based Scratch 3 (beta)
By the way; this is very cool but I noticed documentation is little, there's some but it's outdated it seems and unreliable.
- Maximouse
-
1000+ posts
TB3: text-based Scratch 3 (beta)
It's the default behavior. If you want the block to run without screen refresh, as they do by default in goboscript, you can use the define-atomic keyword instead of define. Is there nowarp for custom blocks?
The docs linked in the original post are from tosh, an older project by blob8108 that TB3's compiler is based on, but they should be mostly accurate. I'll probably make an updated version when the project is more complete. By the way; this is very cool but I noticed documentation is little, there's some but it's outdated it seems and unreliable.
- Maximouse
-
1000+ posts
TB3: text-based Scratch 3 (beta)
Ubdate: fixed broadcast blocks with a reporter input not being compiled correctly. The following now works, for example:
when flag clicked
set my variable to 1
broadcast join "message" (my variable)
when I receive "message1"
say "message received!"
- FurryR
-
14 posts
TB3: text-based Scratch 3 (beta)
Tosh is not appliable for most projects (yup i mean Turbowarp). Consider using another language that supports better decompilation.
- Maximouse
-
1000+ posts
TB3: text-based Scratch 3 (beta)
I don't understand – what does TurboWarp have to do with tosh or TB3? Tosh is not appliable for most projects (yup i mean Turbowarp). Consider using another language that supports better decompilation.