Discuss Scratch
- i_eat_coffee
-
Scratcher
1000+ posts
Re-making scratch-www in scratch
Using cloud variables and an external server - we can remake scratch-www in scratch, I mean making an engine to render pages (like homepage, profile pages, project pages, etc.) by receiving the scratch API data through cloud variables from an external server (the server would fetch the data and write the cloud variables)
- INSERT-USER_NAME
-
Scratcher
1000+ posts
Re-making scratch-www in scratch
The 256-character limit on cloud variables is sure going to like this one!
- i_eat_coffee
-
Scratcher
1000+ posts
Re-making scratch-www in scratch
The 256-character limit on cloud variables is sure going to like this one!What 256 characters?
The scratch user would set the cloud variable to an encoded username (the username of the user page in the project), and the server will parse the data to be written to cloud variables.
- INSERT-USER_NAME
-
Scratcher
1000+ posts
Re-making scratch-www in scratch
I'm saying that cloud variables can only store up to 256 number places.The 256-character limit on cloud variables is sure going to like this one!What 256 characters?
The scratch user would set the cloud variable to an encoded username (the username of the user page in the project), and the server will parse the data to be written to cloud variables.
- i_eat_coffee
-
Scratcher
1000+ posts
Re-making scratch-www in scratch
Yep, I know. And I'm saying we do not need even 1/6th of it.I'm saying that cloud variables can only store up to 256 number places.The 256-character limit on cloud variables is sure going to like this one!What 256 characters?
The scratch user would set the cloud variable to an encoded username (the username of the user page in the project), and the server will parse the data to be written to cloud variables.
Last edited by i_eat_coffee (April 21, 2023 15:26:18)
- applejuiceproduc
-
Scratcher
1000+ posts
Re-making scratch-www in scratch
You do… What about the data the server gives back, like all the comments and the about me etc.Yep, I know. And I'm saying we do not need even 1/6th of it.I'm saying that cloud variables can only store up to 256 number places.The 256-character limit on cloud variables is sure going to like this one!What 256 characters?
The scratch user would set the cloud variable to an encoded username (the username of the user page in the project), and the server will parse the data to be written to cloud variables.
And rendering that stuff is a massive pain.
- i_eat_coffee
-
Scratcher
1000+ posts
Re-making scratch-www in scratch
Multiple cloud variables for different fields - one for the latest 3 comments, one for the about me, etc.You do… What about the data the server gives back, like all the comments and the about me etc.Yep, I know. And I'm saying we do not need even 1/6th of it.I'm saying that cloud variables can only store up to 256 number places.The 256-character limit on cloud variables is sure going to like this one!What 256 characters?
The scratch user would set the cloud variable to an encoded username (the username of the user page in the project), and the server will parse the data to be written to cloud variables.
And rendering that stuff is a massive pain.
- applejuiceproduc
-
Scratcher
1000+ posts
Re-making scratch-www in scratch
just don't do it.Multiple cloud variables for different fields - one for the latest 3 comments, one for the about me, etc.You do… What about the data the server gives back, like all the comments and the about me etc.Yep, I know. And I'm saying we do not need even 1/6th of it.I'm saying that cloud variables can only store up to 256 number places.The 256-character limit on cloud variables is sure going to like this one!What 256 characters?
The scratch user would set the cloud variable to an encoded username (the username of the user page in the project), and the server will parse the data to be written to cloud variables.
And rendering that stuff is a massive pain.
Also comments can be up to 500 characters, and the about me even more so…
- INSERT-USER_NAME
-
Scratcher
1000+ posts
Re-making scratch-www in scratch
The “About Me” section has a character limit of 200, comments have a limit of 500.just don't do it.Multiple cloud variables for different fields - one for the latest 3 comments, one for the about me, etc.You do… What about the data the server gives back, like all the comments and the about me etc.Yep, I know. And I'm saying we do not need even 1/6th of it.I'm saying that cloud variables can only store up to 256 number places.The 256-character limit on cloud variables is sure going to like this one!What 256 characters?
The scratch user would set the cloud variable to an encoded username (the username of the user page in the project), and the server will parse the data to be written to cloud variables.
And rendering that stuff is a massive pain.
Also comments can be up to 500 characters, and the about me even more so…
- SuperSonicmario
-
Scratcher
100+ posts
Re-making scratch-www in scratch
Yep, I know. And I'm saying we do not need even 1/6th of it.Who wuold ever need more than 640 KiB of RAM?
- alwayspaytaxes
-
Scratcher
500+ posts
Re-making scratch-www in scratch
Almost forgot that everyone uses MS-DOSYep, I know. And I'm saying we do not need even 1/6th of it.Who wuold ever need more than 640 KiB of RAM?
You have to encode every text into a number and use seperators to make sure it can be decoded correctly. It adds upI'm saying that cloud variables can only store up to 256 number places.Yep, I know. And I'm saying we do not need even 1/6th of it.
- i_eat_coffee
-
Scratcher
1000+ posts
Re-making scratch-www in scratch
“hello” encoded: 0805121215Almost forgot that everyone uses MS-DOSYep, I know. And I'm saying we do not need even 1/6th of it.Who wuold ever need more than 640 KiB of RAM?You have to encode every text into a number and use seperators to make sure it can be decoded correctly. It adds upI'm saying that cloud variables can only store up to 256 number places.Yep, I know. And I'm saying we do not need even 1/6th of it.
- bigspeedfpv
-
Scratcher
500+ posts
Re-making scratch-www in scratch
“hello” encoded: 0805121215yeah except this system breaks for any special characters outside the english alphabet
just use ascii?
- mybearworld
-
Scratcher
1000+ posts
Re-making scratch-www in scratch
(#13)yeah except this system breaks for any special characters outside the english alphabet“hello” encoded: 0805121215yeah except this system breaks for any special characters outside the english alphabet
just use ascii?
- ScratchCatHELLO
-
Scratcher
1000+ posts
Re-making scratch-www in scratch
you’ve obviously not going to have all of utf-8 (unless you want one letter per ten digits and to make over a million symbols), so you’re going to have to pick and choose. about 100 symbols (two digits/char) should be enough for basic latin and cryllic. 1000 (three digits/char) is enough for a few simpler scripts or the more common emojis. you definitely won’t be including chinese, japanese, and the like if you want to be efficient about encoding.
Last edited by ScratchCatHELLO (April 21, 2023 19:36:15)
- davidtheplatform
-
Scratcher
500+ posts
Re-making scratch-www in scratch
You could probably fit hiragana + katakana with 1000 characters but defiantly not kanji, theres like 40,000 of them
Also doesn't utf use 7 bits/byte for actual data, and the other bit is for whether the next byte is for the same character? that way ascii (which is what most text is) only takes 1 byte/character but you can have more
Also you can change cloud variables 10x/second so each variable can transfer about 1kBps
Also doesn't utf use 7 bits/byte for actual data, and the other bit is for whether the next byte is for the same character? that way ascii (which is what most text is) only takes 1 byte/character but you can have more
Also you can change cloud variables 10x/second so each variable can transfer about 1kBps
- Redstone1080
-
Scratcher
1000+ posts
Re-making scratch-www in scratch
you’ve obviously not going to have all of utf-8 (unless you want one letter per ten digits and to make over a million symbols), so you’re going to have to pick and choose. about 100 symbols (two digits/char) should be enough for basic latin and cryllic. 1000 (three digits/char) is enough for a few simpler scripts or the more common emojis. you definitely won’t be including chinese, japanese, and the like if you want to be efficient about encoding.You could have a system where there's a “Logographic Language Encoding Number” (LLEN) and anything between that and the next LLEN is encoded differently, to save space.
- Chiroyce
-
Scratcher
1000+ posts
Re-making scratch-www in scratch
What 256 characters?You've got to be joking. This is the Scratch homepage load stats

“hello” encoded: 0805121215encoding doubles the length of input text and adding a separator takes up 2 extra characters as well
You have 128 decoded characters per cloud variable, multiplied by 10 variables is 1280 characters. There is a 0.1 second delay between each update, so the fastest to transfer 1280 characters is 10 * 0.1 => 1 second. Anywhere near the 530kB to be transferred would take more than 8 minutes. Not to mention that rendering isn't even being handled yet.
Last edited by Chiroyce (April 22, 2023 04:58:58)
- i_eat_coffee
-
Scratcher
1000+ posts
Re-making scratch-www in scratch
It doesn't“hello” encoded: 0805121215yeah except this system breaks for any special characters outside the english alphabet
just use ascii?
It's from 1 to 99, 1-26 being the alphabet, and the rest are other characters, maybe even splitting the uppercase or lowercase characters
1. Without separator, no need for separator.What 256 characters?You've got to be joking. This is the Scratch homepage load stats
-snip-“hello” encoded: 0805121215encoding doubles the length of input text and adding a separator takes up 2 extra characters as well
You have 128 decoded characters per cloud variable, multiplied by 10 variables is 1280 characters. There is a 0.1 second delay between each update, so the fastest to transfer 1280 characters is 10 * 0.1 => 1 second. Anywhere near the 530kB to be transferred would take more than 8 minutes. Not to mention that rendering isn't even being handled yet.
2. There is going to be a “load” button on each field











