Discuss Scratch
- Discussion Forums
- » Advanced Topics
- » Scratch compiler beta test
- mactro
- Scratcher
28 posts
Scratch compiler beta test
Could you please show the source code, or tell how do you extract blocks from sb2 file? I would like to write my compiler that would produce a program for a microcontroller.
- procd
- Scratcher
100+ posts
Scratch compiler beta test
Could you please show the source code, or tell how do you extract blocks from sb2 file? I would like to write my compiler that would produce a program for a microcontroller. This should help?.
That was what I used. Feel free to ask any questions, but it's a very good reference.
- LDDestroier
- Scratcher
14 posts
Scratch compiler beta test
Hey, I'd like you to compile this thing I made, quickly. It's called Bolt Chopper, and you are a chopper that fires bolts at an enemy. I made it. Thanks!
http://scratch.mit.edu/projects/21507243/
http://scratch.mit.edu/projects/21507243/
- CodeLegend
- Scratcher
500+ posts
Scratch compiler beta test
I don't think it's available to the public yet. (I wish it was.) Hey, I'd like you to compile this thing I made, quickly. It's called Bolt Chopper, and you are a chopper that fires bolts at an enemy. I made it. Thanks!
http://scratch.mit.edu/projects/21507243/
- procd
- Scratcher
100+ posts
Scratch compiler beta test
Hey, I'd like you to compile this thing I made, quickly. It's called Bolt Chopper, and you are a chopper that fires bolts at an enemy. I made it. Thanks!
http://scratch.mit.edu/projects/21507243/
If you check out the beta test project then you'll see that I'm in the middle of some changes at the moment trying to get the graphics effects converted to hlsl (high level shader language). Hopefully be out the woods fairly soon then I'll compile your project for you.
- procd
- Scratcher
100+ posts
Scratch compiler beta test
I don't think it's available to the public yet. (I wish it was.) Hey, I'd like you to compile this thing I made, quickly. It's called Bolt Chopper, and you are a chopper that fires bolts at an enemy. I made it. Thanks!
http://scratch.mit.edu/projects/21507243/
I'll try and compile any of your projects if you request it. Now is not such a good time if you read the previous comment though!
- CodeLegend
- Scratcher
500+ posts
Scratch compiler beta test
I'll tell you if I want any! I just liking having it myself, so that I can compile, make changes, compile again, etcetera.I don't think it's available to the public yet. (I wish it was.) Hey, I'd like you to compile this thing I made, quickly. It's called Bolt Chopper, and you are a chopper that fires bolts at an enemy. I made it. Thanks!
http://scratch.mit.edu/projects/21507243/
I'll try and compile any of your projects if you request it. Now is not such a good time if you read the previous comment though!
- Beminfire
- Scratcher
22 posts
Scratch compiler beta test
Can I have a download link on GitHub or something?
- Sonickyle
- Scratcher
1000+ posts
Scratch compiler beta test
There can be private betas. I'm in the What if I need to sell my project if it's converted to EXE with this one?Distance private beta. It's upto the creator/publisher/etc. if they want their project to be public or not.
And it's not a true beta test because a beta test is like a public test, not a private test.
No I don't make projects anymore. I left some time ago.
I only check the forums every now and then, but other than that consider me retired.
I only check the forums every now and then, but other than that consider me retired.
- gtoal
- Scratcher
1000+ posts
Scratch compiler beta test
What kind of files does this use? .sb or .sb2? If it's .sb, I would like to see your parser. (Possibly you could put it's source on GitHub? Dropbox is blocked at my school )
I know you asked this quite a long time ago, but if you're still interested in seeing (roughly) how a scratch parser works, I just put up my prototype scratch to C code at http://www.gtoal.com/scratch/sb2c/
It's not a working system but there's enough there to learn how to unparse the json file. (Which in computer science terms is effectively an AST: Abstract Syntax Tree, although to be more precise it's more of a concrete syntax tree than an abstract one…)
Graham
- procd
- Scratcher
100+ posts
Scratch compiler beta test
Welcome to the rabbit hole!What kind of files does this use? .sb or .sb2? If it's .sb, I would like to see your parser. (Possibly you could put it's source on GitHub? Dropbox is blocked at my school )
I know you asked this quite a long time ago, but if you're still interested in seeing (roughly) how a scratch parser works, I just put up my prototype scratch to C code at http://www.gtoal.com/scratch/sb2c/
It's not a working system but there's enough there to learn how to unparse the json file. (Which in computer science terms is effectively an AST: Abstract Syntax Tree, although to be more precise it's more of a concrete syntax tree than an abstract one…)
Graham
- botcrusher
- Scratcher
500+ posts
Scratch compiler beta test
Technical question, what is the performance compared to good ol' JIT compiled scratch?
As in, does the compiler respect the delay inserted in the broadcast and loop blocks, or does it plow right through it and runs at full speed with no stepping?
(either way, you could add that as a setting)
As in, does the compiler respect the delay inserted in the broadcast and loop blocks, or does it plow right through it and runs at full speed with no stepping?
(either way, you could add that as a setting)
Pondering what to work on.
- procd
- Scratcher
100+ posts
Scratch compiler beta test
The compiler runs as much like scratch as possible so respects loops, however like scratch can also be run in turbo mode to ignore those conditions.
Performance wise it's quicker in pretty much all areas bar one and that is the touching blocks. I have a studio with some of the compiled projects so you can try them out and compare.
Being .NET it's JIT too!
Performance wise it's quicker in pretty much all areas bar one and that is the touching blocks. I have a studio with some of the compiled projects so you can try them out and compare.
Being .NET it's JIT too!
Last edited by procd (Oct. 11, 2014 22:52:21)
- Discussion Forums
- » Advanced Topics
- » Scratch compiler beta test