Discuss Scratch
- Discussion Forums
- » Advanced Topics
- » M30W - Code Scratch with Scratchblocks!
- roijac
-
100+ posts
M30W - Code Scratch with Scratchblocks!
Our Sourceforge page!
Where can I get it?
What are the dependencies? (Source code users)
Can I also help?
Who are current developers?
What is your current status?
Are you using any sort of bugtrackers? Where?
Where can I get it?
Linux (recommended):sudo apt-get install python-pip python-wxgtk2.8
pip install M30W
Run using “M30W” from terminal or Alt+F2.
Windows:
We have windows installers here. However, there's a bug with python x64 installers that requires you to manually modify your registry. (instructions)
Mac:
install pip, then follow the linux instructions.
If you're not sure, you can get the code from our SF svn repo atsvn checkout https://svn.code.sf.net/p/m30w/svn/
You can run it using python M30W.py
If you have some trouble installing M30W, here is an excellent guide by Gravitation.
What are the dependencies? (Source code users)
M30W needs:
- python 2.7 (3.x support is NOT planned, nor 2.6 compatibility)
- kurt
- PIL
- wxPython version 2.8 or higher (Version 2.9 no more regularly tested)
Can I also help?
Yes, of course! Just post your sourceforge name, grab the code, and start working!
You can also help by reporting bugs on this page
Who are current developers?
- roijac
- davidkt
What is your current status?
We currently only support .sb files (old 1.x format)
We are aware of this problem, but our current focus is on the execution of scripts (And we're doing well)
Are you using any sort of bugtrackers? Where?
We use the sourceforge ticketing system at our sourceforge page.
Last edited by roijac (June 9, 2013 18:03:36)
- scimonster
-
1000+ posts
M30W - Code Scratch with Scratchblocks!
Doesn't work on Fedora. I can't find the python-wxgtk2.8 package, even with RPMFusion. Also, the command is python-pip install M30W, but it's obviously missing a dependency.
- roijac
-
100+ posts
M30W - Code Scratch with Scratchblocks!
Sorry, I thought anyone that decided to use linux AND took the risk of using a non-debian based distro should Doesn't work on Fedora. I can't find the python-wxgtk2.8 package, even with RPMFusion. Also, the command is python-pip install M30W, but it's obviously missing a dependency.actually know what he's doing. Never have I been so wrong

What's the dependency missing? Full output please?
Anyway, try this:
sudo yum install wxPython
- davidkt
-
1000+ posts
M30W - Code Scratch with Scratchblocks!
Who are current developers?Really? What happened to Magnie, slinger and aion5?
- roijac
- davidkt
- roijac
-
100+ posts
M30W - Code Scratch with Scratchblocks!
They don't really… develop the program, you know? They're pretty much just interested in the project. Not offending or something, but they didn't write a single line of code (nor did you, but in you I still have faithWho are current developers?Really? What happened to Magnie, slinger and aion5?
- roijac
- davidkt

- davidkt
-
1000+ posts
M30W - Code Scratch with Scratchblocks!
Good. I had to reinstall Windows a few days ago(because I accidentally deleted a windows theme file) so I'll have to reinstall m30w.
P.S. I don't want to make the cmd-line version- I'm horrible with command-line stuff.
P.S. I don't want to make the cmd-line version- I'm horrible with command-line stuff.
- roijac
-
100+ posts
M30W - Code Scratch with Scratchblocks!
its not gonna be a cmdline version, you simlly need to handle things lke `M30W file.sb` a debug flag, the –help flag etc. it all stays pure python - look at argparse. other than that you can just imlement blocks (just make sure to tell me what exactly you implement so i wonf do that paralleled) Good. I had to reinstall Windows a few days ago(because I accidentally deleted a windows theme file) so I'll have to reinstall m30w.
P.S. I don't want to make the cmd-line version- I'm horrible with command-line stuff.
- davidkt
-
1000+ posts
M30W - Code Scratch with Scratchblocks!
I can't save/load sb files- it raises a NoKurt, which I renamed to NoKurtError- it makes more sense. (And don't ask me to rename it to NoKurtException- this is Python, not Java or C++ or C# or any other languages that use that convention.) I looked further, importing kurt from the shell, and it looks like Kurt needs something called Construct. Why didn't you include that in the installer?
Last edited by davidkt (June 9, 2013 23:07:46)
- davidkt
-
1000+ posts
M30W - Code Scratch with Scratchblocks!
I see. So should I update the wiki page?They don't really… develop the program, you know? They're pretty much just interested in the project. Not offending or something, but they didn't write a single line of code (nor did you, but in you I still have faithWho are current developers?Really? What happened to Magnie, slinger and aion5?
- roijac
- davidkt
)
- Magnie
-
100+ posts
M30W - Code Scratch with Scratchblocks!
Yeah, at most I've helped test it and make a couple of images.They don't really… develop the program, you know? They're pretty much just interested in the project. Not offending or something, but they didn't write a single line of code (nor did you, but in you I still have faithWho are current developers?Really? What happened to Magnie, slinger and aion5?
- roijac
- davidkt
)

- davidkt
-
1000+ posts
M30W - Code Scratch with Scratchblocks!
I know what I could do! I could modify Kurt for the M30W standards! And one of the first things I could do is remove that annoying “v” from the end of lists. I could give M30W a completely different syntax altogether…

- blob8108
-
1000+ posts
M30W - Code Scratch with Scratchblocks!
Well, if you really want… I could do is remove that annoying “v” from the end of lists.
#blockspecs.py block_plugin_inserts = dict((insert, fmt.replace(" v", "")) for (insert, fmt) in block_plugin_inserts.items())
Last edited by blob8108 (June 10, 2013 20:48:20)
- roijac
-
100+ posts
M30W - Code Scratch with Scratchblocks!
Go for it I see. So should I update the wiki page?

I REALLY hate the scratchblocks syntax and how it's so messy and badly defined, but I also want to keep the nice feature of copy-paste into the forums. I should probably talk to ST, or whoever does it in S2.0. I know what I could do! I could modify Kurt for the M30W standards! And one of the first things I could do is remove that annoying “v” from the end of lists. I could give M30W a completely different syntax altogether…
@blob, is your thing at github to be official, is JSO updating his version or nXIII doing it?
- blob8108
-
1000+ posts
M30W - Code Scratch with Scratchblocks!
Lightnin asked me to add I REALLY hate the scratchblocks syntax and how it's so messy and badly defined, but I also want to keep the nice feature of copy-paste into the forums. I should probably talk to ST, or whoever does it in S2.0.scratchblocks2 to the forums — I just haven't managed to set up a local test server for the forums yet.
As for the syntax: what don't you like about it? It's easy to learn, and it has a pretty direct correspondence with the graphical blocks in Scratch: as text conversions go, I'd say it's pretty good. And it can be formally defined.
How would you design the syntax?
- nXIII
-
1000+ posts
M30W - Code Scratch with Scratchblocks!
How would you design the syntax?I made a parser a while ago that was a lot more logo-esque, i.e., it rarely used parentheses/brackets for grouping and relied on block information to parse code. For example:
move item n + 1 of amounts steps
set player 2 score to 1 + 3 / 2
move (item ((n) + (1)) of [amounts v]) steps
set [player 2 score v] to ((1) + ((3) / (2)))
- blob8108
-
1000+ posts
M30W - Code Scratch with Scratchblocks!
Ah yes, you said. And then you refused to show me the code.How would you design the syntax?I made a parser a while ago that was a lot more logo-esque, i.e., it rarely used parentheses/brackets for grouping and relied on block information to parse code.

I definitely agree with you there: if one can do it, then your parser has a much better syntax. I still can't quite figure out how to combine TDOP with mixfix blocks. Did you use TDOP or recursive decent or a parser generator or some other custom homemade algorithm?
Maybe I should even rewrite scratchblocks2's parser in the same way… though the existing block plugins both render exactly what you type, and don't actually validate the code in any way, so it would be a slight change in philosophy.
- nXIII
-
1000+ posts
M30W - Code Scratch with Scratchblocks!
Oops! Here: http://dl.dropboxusercontent.com/u/10715865/tb/index.php (I apologize for the slightly messy coded quality. It also still doesn't parse a lot of stuff [e.g., my demo] correctly yet)Ah yes, you said. And then you refused to show me the code.How would you design the syntax?I made a parser a while ago that was a lot more logo-esque, i.e., it rarely used parentheses/brackets for grouping and relied on block information to parse code.
I definitely agree with you there: if one can do it, then your parser has a much better syntax. I still can't quite figure out how to combine TDOP with mixfix blocks. Did you use TDOP or recursive decent or a parser generator or some other custom homemade algorithm?It's a recursive descent parser for the operators with a lot of homemade stuff for parsing the blocks.
Maybe I should even rewrite scratchblocks2's parser in the same way… though the existing block plugins both render exactly what you type, and don't actually validate the code in any way, so it would be a slight change in philosophy.I think the current scratchblocks is good the way it is—you get exactly what you write, it's fast, and it's simple. I wrote my parser both as a test and and for large personal projects so I could write them quickly in a real text editor; I think it's less suited to everyday use for small scripts in the forums.
- Hardmath123
-
1000+ posts
M30W - Code Scratch with Scratchblocks!
That's a raw PHP file…Oops! Here: http://dl.dropboxusercontent.com/u/10715865/tb/index.php (I apologize for the slightly messy coded quality. It also still doesn't parse a lot of stuff [e.g., my demo] correctly yet)Ah yes, you said. And then you refused to show me the code.How would you design the syntax?I made a parser a while ago that was a lot more logo-esque, i.e., it rarely used parentheses/brackets for grouping and relied on block information to parse code.
I've been messing with PEG.js, and I think it's powerful enough to work. If you want to be fancy, try Jison.I definitely agree with you there: if one can do it, then your parser has a much better syntax. I still can't quite figure out how to combine TDOP with mixfix blocks. Did you use TDOP or recursive decent or a parser generator or some other custom homemade algorithm?It's a recursive descent parser for the operators with a lot of homemade stuff for parsing the blocks.Maybe I should even rewrite scratchblocks2's parser in the same way… though the existing block plugins both render exactly what you type, and don't actually validate the code in any way, so it would be a slight change in philosophy.I think the current scratchblocks is good the way it is—you get exactly what you write, it's fast, and it's simple. I wrote my parser both as a test and and for large personal projects so I could write them quickly in a real text editor; I think it's less suited to everyday use for small scripts in the forums.

- blob8108
-
1000+ posts
M30W - Code Scratch with Scratchblocks!
Yay, I'll have a good read! Here:
Maybe I should even rewrite scratchblocks2's parser in the same way…I think the current scratchblocks is good the way it is—you get exactly what you write, it's fast, and it's simple. I wrote my parser both as a test and and for large personal projects so I could write them quickly in a real text editor; I think it's less suited to everyday use for small scripts in the forums.
That's true. The only downside, as roijac points out, is you can't paste your scripts into forum posts.
- Discussion Forums
- » Advanced Topics
-
» M30W - Code Scratch with Scratchblocks!