Discuss Scratch
- Discussion Forums
- » Suggestions
- » allow users to PR features and bugfixes into a new beta version of scratch
- EngineerRunner
-
1000+ posts
allow users to PR features and bugfixes into a new beta version of scratch
scratch almost never gets new features. yeah, i know, "development is hard, “that isn't high on our priority list”, and so on. but the fact is, scratch-gui alone currently has 30 vulnerabilites. they aren't just low severity either. 2 are critical severity, and the other 28 are high severity. features that should take about 20 minutes for 1 dude to implement, were suggested 10 years ago and have support from multiple ST members like the exponent block still haven't been added.
to fix this, i suggest that ST allow people to PR in new features and bugfixes into a new branch that gets hosted as a beta version of the scratch editor. if they work fine, then they get added.
yeah thats my suggestion, im crap at ending suggestions
to fix this, i suggest that ST allow people to PR in new features and bugfixes into a new branch that gets hosted as a beta version of the scratch editor. if they work fine, then they get added.
yeah thats my suggestion, im crap at ending suggestions
- ajskateboarder
-
1000+ posts
allow users to PR features and bugfixes into a new beta version of scratch
30 vulnerabilites. they aren't just low severity either. 2 are critical severity, and the other 28 are high severity.npm moment xD scratch-gui alone currently has
I agree, the current contribution policy Scratch has looks like a pretty giant excuse for a variety of things: not wanting to review user code, not wanting to be fully open source, etc.. I haven't seen any other open-sourced org be so closed about new contributions than Scratch. If a PR doesn't align with their design goals, they can simply reject the PR lol
- unmissable
-
1000+ posts
allow users to PR features and bugfixes into a new beta version of scratch
what is “PR”?
- EngineerRunner
-
1000+ posts
allow users to PR features and bugfixes into a new beta version of scratch
pull request what is “PR”?
- EngineerRunner
-
1000+ posts
allow users to PR features and bugfixes into a new beta version of scratch
bump so people could potentially help fix these outages
- josueart
-
500+ posts
allow users to PR features and bugfixes into a new beta version of scratch
30 vulnerabilites. they aren't just low severity either. 2 are critical severity, and the other 28 are high severity.Note that most of them are from packages and the standalone code doesn't have any vulnerabilities . But yeah, they're using outdated packages that are deprecated, outdated, slow, and insecure, as shown when you npm run build. but the fact is, scratch-gui alone currently has
https://dpaste.org/3RxDL
Last edited by josueart (Jan. 5, 2024 15:00:54)
- EngineerRunner
-
1000+ posts
allow users to PR features and bugfixes into a new beta version of scratch
bump
- qwertyy_the_artist
-
100+ posts
allow users to PR features and bugfixes into a new beta version of scratch
this would be an interesting experiment, i support
- josueart
-
500+ posts
allow users to PR features and bugfixes into a new beta version of scratch
Update on this:
Anyways. This would be really interesting, so support.
No, I'm going to respond that there's a lot of reasons why stick with “out of date packages”. Mainly because it takes a lot of time (engineering oversight and QA work) to make sure changes to underlying packages don't introduce instability/bugs.source
Anyways. This would be really interesting, so support.
- ajskateboarder
-
1000+ posts
allow users to PR features and bugfixes into a new beta version of scratch
Yeah, I suspected that. It's very common to stick to specific versions of packages to prevent any breaking changes introduced by newer versions. Not going to pretend I know everything though, since it could be for other reasons. Although, there are still areas outside of package management that can be improved Update on this:No, I'm going to respond that there's a lot of reasons why stick with “out of date packages”. Mainly because it takes a lot of time (engineering oversight and QA work) to make sure changes to underlying packages don't introduce instability/bugs.source
Anyways. This would be really interesting, so support.

Last edited by ajskateboarder (Jan. 6, 2024 15:58:18)
- EngineerRunner
-
1000+ posts
allow users to PR features and bugfixes into a new beta version of scratch
bump
- RobotChickens
-
500+ posts
allow users to PR features and bugfixes into a new beta version of scratch
Support! It would be awesome if other devs could help with the development of Scratch! It would take some load off the ST, especially with the recent layoffs. There would definitely need to be a bug-reporting system like there is with Scratch Labs.
- ToastRoastBoast
-
500+ posts
allow users to PR features and bugfixes into a new beta version of scratch
- RobotChickens
-
500+ posts
allow users to PR features and bugfixes into a new beta version of scratch
- EngineerRunner
-
1000+ posts
allow users to PR features and bugfixes into a new beta version of scratch
bump
- EDawg2011
-
1000+ posts
allow users to PR features and bugfixes into a new beta version of scratch
exponent block still haven't been added.An exponent block would be convenient for some people, and I'd be fine if they brought the servers down for only 20 minutes to add the block. features that should take about 20 minutes for 1 dude to implement, were suggested 10 years ago and have support from multiple ST members like the
- completeness
-
100+ posts
allow users to PR features and bugfixes into a new beta version of scratch
Scratch wouldn't even have to go down to add this block.exponent block still haven't been added.An exponent block would be convenient for some people, and I'd be fine if they brought the servers down for only 20 minutes to add the block. features that should take about 20 minutes for 1 dude to implement, were suggested 10 years ago and have support from multiple ST members like the
In fact, I can't understate how easy it would be for Scratch to add this highly requested block. Yes, this is kind of cynical and sardonic, but here's a step by step tutorial on how to do it. Note that this is not a userscript or anything to paste in the console - in fact, if you have the technical knowledge to know how to do what I'm saying, I doubt you can't tell it's not malicious. So here goes:
Step 1: Go to scratch-vm/src/blocks/scratch3_operators.js and add this at line 23:
operator_exponent: this.exponent,
exponent (args) { return Cast.toNumber(args.NUM1) ** Cast.toNumber(args.NUM2); }
'<block type="operator_exponent" id="operator_exponent">' + '<value name="NUM1">' + '<shadow type="math_number">' + '<field name="NUM"></field>' + '</shadow>' + '</value>' +
Blockly.Blocks['operator_exponent'] = { /** * Block for raising one number to the power of another. * @this Blockly.Block */ init: function() { this.jsonInit({ "message0": Blockly.Msg.OPERATORS_EXPONENT, "args0": [ { "type": "input_value", "name": "NUM1" }, { "type": "input_value", "name": "NUM2" } ], "category": Blockly.Categories.operators, "extensions": ["colours_operators", "output_number"] }); } };
Blockly.Msg.OPERATORS_EXPONENT = '%1 ^ %2';
<block type="operator_exponent"> <value name="NUM1"> <shadow type="math_number"> <field name="NUM"/> </shadow> </value> <value name="NUM2"> <shadow type="math_number"> <field name="NUM"/> </shadow> </value> </block>
Ok, we're done! BUT WAIT. Scratch is a big big organization with millions of users, and to supply these millions of users with this perfect service we must put every JavaScript function through grueling tests!
Step 1: Go to scratch-vm/test/unit/blocks_operators.js and add this at line 35:
test('exponent', t => { t.strictEqual(blocks.exponent({NUM1: '2', NUM2: '3'}), 8); t.strictEqual(blocks.exponent({NUM1: 'foo', NUM2: 'bar'}), 1); t.end(); });
test('exponent: exponentiation with Infinity', t => { t.strictEqual( blocks.exponent({NUM1: 'Infinity', NUM2: 111}), Infinity, '"Infinity" ^ 111 = Infinity' ); t.strictEqual( blocks.exponent({NUM1: 'INFINITY', NUM2: 222}), 0, '"INFINITY" ^ 222 = 0' ); t.strictEqual( blocks.exponent({NUM1: Infinity, NUM2: 333}), Infinity, 'Infinity ^ 333 = Infinity' ); t.strictEqual( blocks.exponent({NUM1: 111, NUM2: 'Infinity'}), Infinity, '111 ^ "Infinity" = Infinity' ); t.strictEqual( blocks.exponent({NUM1: 222, NUM2: 'INFINITY'}), 1, '222 ^ "INFINITY" = 1' ); t.strictEqual( blocks.exponent({NUM1: 333, NUM2: Infinity}), Infinity, '333 ^ Infinity = Infinity' ); t.strictEqual( blocks.exponent({NUM1: '-Infinity', NUM2: 111}), -Infinity, '"-Infinity" ^ 111 = -Infinity' ); t.strictEqual( blocks.exponent({NUM1: '-INFINITY', NUM2: 222}), 0, '"-INFINITY" ^ 222 = 0' ); t.strictEqual( blocks.exponent({NUM1: -Infinity, NUM2: 333}), -Infinity, '-Infinity ^ 333 = -Infinity' ); t.strictEqual( blocks.exponent({NUM1: 111, NUM2: '-Infinity'}), 0, '111 ^ "-Infinity" = 0' ); t.strictEqual( blocks.exponent({NUM1: 222, NUM2: '-INFINITY'}), 1, '222 ^ "-INFINITY" = 1' ); t.strictEqual( blocks.exponent({NUM1: 333, NUM2: -Infinity}), 0, '333 ^ -Infinity = 0' ); t.end(); });
<block type="operator_exponent"> <value name="NUM1"> <shadow type="math_number"> <field name="NUM"></field> </shadow> </value> <value name="NUM2"> <shadow type="math_number"> <field name="NUM"></field> </shadow> </value> </block>
So what was the purpose of that exercise? It certainly wasn't to flex my JavaScript skills. This is a heavily requested feature that poses only benefit and no harm, but if I were to send a PR to scratch right now it would go ignored for years. Fun fact: the last time any sort of change was made to the Scratch language (not the website/UI) was the release of 3.0 at the beginning of 2019. More than 5 years ago, when most Scratchers weren't even alive

Last edited by completeness (Feb. 21, 2024 04:15:47)
- completeness
-
100+ posts
allow users to PR features and bugfixes into a new beta version of scratch
nvm
Last edited by completeness (Feb. 22, 2024 19:38:45)
- CST1229
-
1000+ posts
allow users to PR features and bugfixes into a new beta version of scratch
(#17)Also, somewhat related is capitalizing Account settings. This is a trivial single-letter string fix (or two since there's 2.0 and 3.0 pages), which the developers don't seem to want to do, due to being minor. Someone else submitted a pull request to fix it in scratch-www, and it got closed because… the developers don't want to do it? Don't contributions exist so anyone can submit fixes/changes that the main developers haven't found/can't/don't want to do?
(snip)
And about the suggestion itself, not even features just bugfixes please. Scratch has so, so many bugs that still haven't been fixed since 3.0's release in 2019, that have been fixed by mods like TurboWarp or browser extensions (capitalizing Account settings being one of them) or existing user contributions.
Last edited by CST1229 (Feb. 24, 2024 18:31:37)
- completeness
-
100+ posts
allow users to PR features and bugfixes into a new beta version of scratch
Bump
- Discussion Forums
- » Suggestions
-
» allow users to PR features and bugfixes into a new beta version of scratch