Discuss Scratch
- Discussion Forums
- » Advanced Topics
- » Has anyone made a text-based scratch code compiler?
- fezzinate
- Scratcher
100+ posts
Has anyone made a text-based scratch code compiler?
I saw a few scratch projects acting as their own interpreters, but has anyone made a compiler that can take a text document and spits out a .sb2 file?
- gtoal
- Scratcher
1000+ posts
Has anyone made a text-based scratch code compiler?
I saw a few scratch projects acting as their own interpreters, but has anyone made a compiler that can take a text document and spits out a .sb2 file?
Look for “Kurt” by blob8108 which lets you edit using scratchblocks syntax. And there are others, mostly under development or incomplete.
- IronBit_Studios
- Scratcher
1000+ posts
Has anyone made a text-based scratch code compiler?
I was originally thinking of ApuC, but that also works.I saw a few scratch projects acting as their own interpreters, but has anyone made a compiler that can take a text document and spits out a .sb2 file?
Look for “Kurt” by blob8108 which lets you edit using scratchblocks syntax. And there are others, mostly under development or incomplete.
- fezzinate
- Scratcher
100+ posts
Has anyone made a text-based scratch code compiler?
it seems like kurt 2.0 doesn't have support for compiling like 1.4 did - but that seems exactly like what I'd be looking for.
- blob8108
- Scratcher
1000+ posts
Has anyone made a text-based scratch code compiler?
I'm working on tosh, and will hopefully have something to show soon.
Previously I wrote kurt, which had a text module which could compile a similar language. The text module is included in kurt v2. You use it like this:
Unfortunately kurt's text module just isn't very good. In theory it implements nearly the same language as tosh does, but in practice the kurt version has lots of bugs and edge cases which it doesn't handle well. (So there are lots of things you should be able to write, but can't.) tosh fixes those
So that's why I never got around to re-implementing the file compiler in kurt v2.
Previously I wrote kurt, which had a text module which could compile a similar language. The text module is included in kurt v2. You use it like this:
p = kurt.Project()
s = kurt.Sprite(p, "cat")
s.variables["foo"] = kurt.Variable(0)
s.lists["animals"] = kurt.List(["cow", "sheep", "horse"])
s.parse("""
when flag clicked
say foo
set foo to 1
repeat 3
say item foo of animals
change foo by 1
end
""")
p.save('example.sb2')
Unfortunately kurt's text module just isn't very good. In theory it implements nearly the same language as tosh does, but in practice the kurt version has lots of bugs and edge cases which it doesn't handle well. (So there are lots of things you should be able to write, but can't.) tosh fixes those
So that's why I never got around to re-implementing the file compiler in kurt v2.
Last edited by blob8108 (Aug. 18, 2015 14:44:55)
- fezzinate
- Scratcher
100+ posts
Has anyone made a text-based scratch code compiler?
Tosh looks great, blob! I'm really loving your design goals and your decision to use strict “as it's read” syntax. When do you think you'll open it up publically?
- __init__
- Scratcher
1000+ posts
Has anyone made a text-based scratch code compiler?
I worked on M30W before it was abandoned
- bobbybee
- Scratcher
1000+ posts
Has anyone made a text-based scratch code compiler?
I've written an LLVM IR backend targeting Scratch, if that counts…
- gtoal
- Scratcher
1000+ posts
Has anyone made a text-based scratch code compiler?
I've written an LLVM IR backend targeting Scratch, if that counts…
How's that going? Any progress with either of those two demos I gave you?
- gtoal
- Scratcher
1000+ posts
Has anyone made a text-based scratch code compiler?
Tosh looks great, blob! I'm really loving your design goals and your decision to use strict “as it's read” syntax. When do you think you'll open it up publically?
these are all good systems but what's really needed is just a button in scratch that toggles between blocks representation and text representation. You still want the convenience of GUI sprite editing etc etc. If any of these suggested systems could be embedded seamlessly in the Scratch GUI I'd be all over them.
G
- blob8108
- Scratcher
1000+ posts
Has anyone made a text-based scratch code compiler?
Thank you, that's encouraging! Tosh looks great, blob! I'm really loving your design goals and your decision to use strict “as it's read” syntax. When do you think you'll open it up publically?
When it's ready I'm nearly there, but it's not quite usable as a real product yet. Maybe a few more weeks…
What do you mean by “GUI sprite editing”? what's really needed is just a button in scratch that toggles between blocks representation and text representation. You still want the convenience of GUI sprite editing etc etc.
How would that be better?
- liam48D
- Scratcher
1000+ posts
Has anyone made a text-based scratch code compiler?
Paint editor?Thank you, that's encouraging! Tosh looks great, blob! I'm really loving your design goals and your decision to use strict “as it's read” syntax. When do you think you'll open it up publically?
When it's ready I'm nearly there, but it's not quite usable as a real product yet. Maybe a few more weeks…What do you mean by “GUI sprite editing”? what's really needed is just a button in scratch that toggles between blocks representation and text representation. You still want the convenience of GUI sprite editing etc etc.
How would that be better?
- TheLogFather
- Scratcher
1000+ posts
Has anyone made a text-based scratch code compiler?
these are all good systems but what's really needed is just a button in scratch that toggles between blocks representation and text representation.Yes!
(I've often wished I had time to really get going on such a mod as I describe in that comment reply to blob8108 - but I decided to concentrate instead on the matching block highlighting system for now, since I thought it'd be more widely appreciated…)
Last edited by TheLogFather (Aug. 19, 2015 21:34:22)
- gtoal
- Scratcher
1000+ posts
Has anyone made a text-based scratch code compiler?
What do you mean by “GUI sprite editing”? what's really needed is just a button in scratch that toggles between blocks representation and text representation. You still want the convenience of GUI sprite editing etc etc.
How would that be better?
you know, the whole scratch sprite/costume thing. you don't really want to fall back on editing const char arrays by hand for images, do you? :-)
- blob8108
- Scratcher
1000+ posts
Has anyone made a text-based scratch code compiler?
I was planning to add costume/sound support to tosh, eventually. So you'll be able to drag images in and use them as costumes, for example. I won't do a built-in paint editor, but then I always use an external image editor anyway! you know, the whole scratch sprite/costume thing. you don't really want to fall back on editing const char arrays by hand for images, do you? :-)
- fezzinate
- Scratcher
100+ posts
Has anyone made a text-based scratch code compiler?
any updates on Tosh, Blob?
- liam48D
- Scratcher
1000+ posts
Has anyone made a text-based scratch code compiler?
any updates on Tosh, Blob?
- Discussion Forums
- » Advanced Topics
- » Has anyone made a text-based scratch code compiler?