Discuss Scratch
- blob8108
- Scratcher
1000+ posts
Scratch project corpus
Many thanks to PullJosh for collecting projects for this!
Github repo: https://github.com/tjvr/scratch-corpus
Studio: https://scratch.mit.edu/studios/1869756/
Hi ATers!
I want to make sure tosh works with large (preferably all!) existing Scratch projects. I'm considering using automated testing to verify this. So I need a large sample of Scratch projects. Does someone happen to have such a corpus? The more diverse, the better: it'd be ideal if the projects are a variety of ages (older Scratch projects use more obscure features in the format) and complexity (more advanced projects tend to be more unusual, such as using stranger variable names).
Does anyone have anything like this, or should I roll my own?
Thanks!
Last edited by blob8108 (Dec. 12, 2016 14:35:05)
- Hardmath123
- Scratcher
1000+ posts
Scratch project corpus
Doesn't randomized shotgun testing against /projects/<N> work fine? What are the traits you're looking for in a “project corpus” that make it better than, y'know, all projects ever shared?
Why? Presumably “Advanced” Scratchers are less likely to make a variable named “x position”.
(more advanced projects tend to be more unusual, such as using stranger variable names)
Why? Presumably “Advanced” Scratchers are less likely to make a variable named “x position”.
- blob8108
- Scratcher
1000+ posts
Scratch project corpus
From my experience so far, this is not the case. For example, I've seen a couple of “advanced” projects using “size” as an argument name. It's a completely reasonable thing to do, in Scratch… Presumably “Advanced” Scratchers are less likely to make a variable named “x position”.
I guess I was hoping that someone would already have a bunch downloaded, so I wouldn't have to hit the Scratch site repeatedly?
- procd
- Scratcher
100+ posts
Scratch project corpus
I did have a load but think I cleared lots out a while back. I'll check when I'm next on that computer. Best thing I found was to find the projects that interested you and try them. Soon found lots of different styles and ways of doing things and laziness….etc Random pickings also throws up some gems too as even some very simple beginner projects contain oddities.
- kvackkvack
- Scratcher
500+ posts
Scratch project corpus
How are you planning / how did you solve that issue? Did you do something like with scratch blocks, like size :: var or does it just guess itself?From my experience so far, this is not the case. For example, I've seen a couple of “advanced” projects using “size” as an argument name. It's a completely reasonable thing to do, in Scratch… Presumably “Advanced” Scratchers are less likely to make a variable named “x position”.
I guess I was hoping that someone would already have a bunch downloaded, so I wouldn't have to hit the Scratch site repeatedly?
- procd
- Scratcher
100+ posts
Scratch project corpus
Just looked and I'm afraid I've been even more brutal than I expected, so have lost many great test cases.
Here's an early one I remember https://scratch.mit.edu/projects/10052691 see if you can spot what caused a problem. (Just to clarify,the game is great and works in Scratch)
Here's an early one I remember https://scratch.mit.edu/projects/10052691 see if you can spot what caused a problem. (Just to clarify,the game is great and works in Scratch)
- Jonathan50
- Scratcher
1000+ posts
Scratch project corpus
That's impossible in tosh! For example, I've seen a couple of “advanced” projects using “size” as an argument name. It's a completely reasonable thing to do, in Scratch…
Not yet a Knight of the Mu Calculus.
- blob8108
- Scratcher
1000+ posts
Scratch project corpus
You can only name variables certain things. When you import a Scratch project, if there are names that tosh doesn't like, it renames them so that the project can be imported. how did you solve that issue?
- gtoal
- Scratcher
1000+ posts
Scratch project corpus
You can only name variables certain things. When you import a Scratch project, if there are names that tosh doesn't like, it renames them so that the project can be imported. how did you solve that issue?
PL/SQL allows any string as a variable name if enclosed in double-quotes. (text strings are single quotes). Super ugly but unambiguous.
G
- Ethan_1
- Scratcher
100+ posts
Scratch project corpus
This is a great question. I was thinking of this a few weeks ago. I think we of the ATers should make a studio or other place to make a “Scratch compatibility test”, a group of projects that we can run against to test compatibility with Scratch, for the projects that try to be compatible with Scratch. We could even select projects that are existing (of course).
- Hardmath123
- Scratcher
1000+ posts
Scratch project corpus
Or enclose longer names in {braces}.You can only name variables certain things. When you import a Scratch project, if there are names that tosh doesn't like, it renames them so that the project can be imported. how did you solve that issue?
PL/SQL allows any string as a variable name if enclosed in double-quotes. (text strings are single quotes). Super ugly but unambiguous.
G
- scratchisthebest
- Scratcher
1000+ posts
Scratch project corpus
Do you render the projects yourself (like phosphorus), or do you let Scratch's engine do it?
If you do it yourself, I remember this project used to break in Phosphorus because it uses really crazy hacky negative pen sizes https://scratch.mit.edu/projects/78262318/
I also have some very old Scratch projects, dating back to 1.3 if you're interested. Sadly they're not all that complex, so not really the best for testing features, but I guess you can see if they import right. I'll try not to touch them for fear of them converting to the 2.0 format (is that how that works?) I USED TO THINK THEY WERE SO COOL
If you do it yourself, I remember this project used to break in Phosphorus because it uses really crazy hacky negative pen sizes https://scratch.mit.edu/projects/78262318/
I also have some very old Scratch projects, dating back to 1.3 if you're interested. Sadly they're not all that complex, so not really the best for testing features, but I guess you can see if they import right. I'll try not to touch them for fear of them converting to the 2.0 format (is that how that works?) I USED TO THINK THEY WERE SO COOL
Last edited by scratchisthebest (Feb. 12, 2016 15:33:03)
I am a Lava Expert
- blob8108
- Scratcher
1000+ posts
Scratch project corpus
I am using phosphorus to play projects, in fact Do you render the projects yourself (like phosphorus)
dating back to 1.3 if you're interested […] I'll try not to touch them for fear of them converting to the 2.0 format (is that how that works?)Yeah, if you “See Inside” on an old project the editor will convert it to 2.0.
Sadly tosh is only going to support 2.0 projects, but thank you for offering!
- Jonathan50
- Scratcher
1000+ posts
Scratch project corpus
Wait
I have two custom blocks:
Now I call either of these blocks:
foo bar baz
Am I calling the first foo with one argument (bar baz) or the second foo with two arguments (bar, baz)?
I have two custom blocks:
define foo (x)I have three variables, one called ‘bar’, one called baz, and one called ‘bar baz’.
...
define foo (x) (y)
...
Now I call either of these blocks:
foo bar baz
Am I calling the first foo with one argument (bar baz) or the second foo with two arguments (bar, baz)?
Not yet a Knight of the Mu Calculus.
- Dylan5797
- Scratcher
1000+ posts
Scratch project corpus
Use scratchapi (python) or scratch-api to download the json and test it.
Do assets matter?
Do assets matter?
- gtoal
- Scratcher
1000+ posts
Scratch project corpus
Wait
I have two custom blocks:define foo (x)I have three variables, one called ‘bar’, one called baz, and one called ‘bar baz’.
...
define foo (x) (y)
...
Now I call either of these blocks:
foo bar baz
Am I calling the first foo with one argument (bar baz) or the second foo with two arguments (bar, baz)?
Not having tried his system, but I would expect the syntax to be:
foo (bar baz)
foo (bar) (baz)
However you're on the right track - without some explicit quoting somewhere there are undoubtedly ambiguities to be found. (As have been in the past with other projects
G
- BookOwl
- Scratcher
1000+ posts
Scratch project corpus
The tosh code for that:Wait
I have two custom blocks:define foo (x)I have three variables, one called ‘bar’, one called baz, and one called ‘bar baz’.
...
define foo (x) (y)
...
Now I call either of these blocks:
foo bar baz
Am I calling the first foo with one argument (bar baz) or the second foo with two arguments (bar, baz)?
Not having tried his system, but I would expect the syntax to be:
foo (bar baz)
foo (bar) (baz)
However you're on the right track - without some explicit quoting somewhere there are undoubtedly ambiguities to be found. (As have been in the past with other projects
G
define foo (x arg) (y arg)
define foo (x arg)
when flag clicked
foo (bar) (baz)
foo (bar baz)
http://i.cubeupload.com/5tBfmb.png
Yes, I'm a tosh beta-tester…
Last edited by BookOwl (Feb. 13, 2016 23:23:21)
who needs signatures
- Jonathan50
- Scratcher
1000+ posts
Scratch project corpus
Oh, thanks.The tosh code for that:Wait
I have two custom blocks:
-snip-
I have three variables, one called ‘bar’, one called baz, and one called ‘bar baz’.
Now I call either of these blocks:
foo bar baz
Am I calling the first foo with one argument (bar baz) or the second foo with two arguments (bar, baz)?
Not having tried his system, but I would expect the syntax to be:
foo (bar baz)
foo (bar) (baz)
However you're on the right track - without some explicit quoting somewhere there are undoubtedly ambiguities to be found. (As have been in the past with other projects
GHere's a screenshot:define foo (x arg) (y arg)
define foo (x arg)
when flag clicked
foo (bar) (baz)
foo (bar baz)
http://i.cubeupload.com/5tBfmb.png
Yes, I'm a tosh beta-tester…
You can just do [url]http://url[/url] instead of [url=http://url]http://url[/url]
Last edited by Jonathan50 (Feb. 13, 2016 23:26:30)
Not yet a Knight of the Mu Calculus.
- BookOwl
- Scratcher
1000+ posts
Scratch project corpus
Thanks! I didn't know that. …
You can just do [url]http://url[/url] instead of [url=http://url]http://url[/url]
who needs signatures