Discuss Scratch

MCAnimator2D
Scratcher
2 posts

Letters in Cloud Variables

I found a way to set cloud variables to strings externally with any character in it… Has anyone else done it?

Here's a demo project: https://scratch.mit.edu/projects/178935784/

Last edited by MCAnimator2D (Oct. 10, 2017 15:04:23)

Wettining
Scratcher
500+ posts

Letters in Cloud Variables

MCAnimator2D wrote:

So I'm not going to make a project on this because it seems like I shouldn't do it, but I found a way to set cloud variables to strings with any character in it… Has anyone else done it?
Is it with hexadecimal?
DatOneLefty
Scratcher
1000+ posts

Letters in Cloud Variables

there are some simple scripts you can add to your backpack from https://scratch.mit.edu/projects/111672783/ to convert to hex and back, those can help you encode normal strings into stuff able to be in cloud variables (make sure the cloud var starts with “0x” so it will allow hex though)


Scratch data available at ScratchDB (Status)

Posts: bf97b44a7fbd33db070f6ade2b7dc549 (btw i use arch)
Scratch-Minion
Scratcher
1000+ posts

Letters in Cloud Variables

This is covered in the Scratch Wiki https://wiki.scratch.mit.edu/wiki/Cloud which has links to two example projects.

Type Cloud Engine into the Scratch Search Box to see many projects that do this.
MCAnimator3D
Scratcher
500+ posts

Letters in Cloud Variables

Wettining wrote:

MCAnimator2D wrote:

So I'm not going to make a project on this because it seems like I shouldn't do it, but I found a way to set cloud variables to strings with any character in it… Has anyone else done it?
Is it with hexadecimal?

DatOneLefty wrote:

there are some simple scripts you can add to your backpack from https://scratch.mit.edu/projects/111672783/ to convert to hex and back, those can help you encode normal strings into stuff able to be in cloud variables (make sure the cloud var starts with “0x” so it will allow hex though)

Scratch-Minion wrote:

This is covered in the Scratch Wiki https://wiki.scratch.mit.edu/wiki/Cloud which has links to two example projects.

Type Cloud Engine into the Scratch Search Box to see many projects that do this.

Yeah yeah hex is cool but there are ACTUAL LETTERS in the variable:

The variable isn't being set in Scratch.

Here's a project demonstrating this: https://scratch.mit.edu/projects/178935784/

Last edited by MCAnimator3D (Oct. 10, 2017 05:03:33)



scratch
MCAnimator3D
Scratcher
500+ posts

Letters in Cloud Variables

And these are interpreted as string values too so like if you did
<(☁ cloud_var) = [hello]>
It would output true

Last edited by MCAnimator3D (Oct. 10, 2017 05:08:25)



scratch
Scratch-Minion
Scratcher
1000+ posts

Letters in Cloud Variables

MCAnimator3D wrote:

Scratch-Minion wrote:

This is covered in the Scratch Wiki https://wiki.scratch.mit.edu/wiki/Cloud which has links to two example projects.

Type Cloud Engine into the Scratch Search Box to see many projects that do this.

Yeah yeah hex is cool but there are ACTUAL LETTERS in the variable

The example projects that you access from the Scratch Wiki https://wiki.scratch.mit.edu/wiki/Cloud convert letters.
Same for many projects when you type Cloud Engine into the Scratch Search Box
Wettining
Scratcher
500+ posts

Letters in Cloud Variables

But are you doing this through your own servers?
MCAnimator3D
Scratcher
500+ posts

Letters in Cloud Variables

Wettining wrote:

But are you doing this through your own servers?
No it's on the Scratch servers


scratch
DatOneLefty
Scratcher
1000+ posts

Letters in Cloud Variables

if you modify the scripts in the project link i sent to be custom blocks, it provides a very simple way to convert almost anything to hex and back for cloud variables. I'm currently using it for my new project which uses my home server as a node.js backend to be a mini internet on scratch


Scratch data available at ScratchDB (Status)

Posts: bf97b44a7fbd33db070f6ade2b7dc549 (btw i use arch)
Abhigyaan
Scratcher
20 posts

Letters in Cloud Variables

[scratchblocks]
convert
[/scratchblocks]

Last edited by Abhigyaan (Dec. 23, 2017 02:58:27)

Abhigyaan
Scratcher
20 posts

Letters in Cloud Variables

Abhigyaan wrote:

[scratchblocks]
convert
[/scratchblocks]
TheGamer-
Scratcher
100+ posts

Letters in Cloud Variables

DatOneLefty wrote:

if you modify the scripts in the project link i sent to be custom blocks, it provides a very simple way to convert almost anything to hex and back for cloud variables. I'm currently using it for my new project which uses my home server as a node.js backend to be a mini internet on scratch


But he's not asking for a way to convert strings into hex, it seems he's actually found a way to store string in the cloud. I though it was just saved locally at first, but it shows up in the cloud log.

232323.XFTQ.2011 | XqzkBEpogUjTtMDjTEyI
novice27b
Scratcher
1000+ posts

Letters in Cloud Variables

Did you make API requests directly? This didn't used to work, but I guess they changed that.

i use arch btw
TheUltimatum
Scratcher
1000+ posts

Letters in Cloud Variables

novice27b wrote:

Did you make API requests directly? This didn't used to work, but I guess they changed that.
Well technically he has to connect to a websocket server and send some blob data must have been reverted when they upgraded the infrastructure.
SonicMasterSystem
Scratcher
1000+ posts

Letters in Cloud Variables

Woah…. This actually seems pretty cool.

bobbybee
Scratcher
1000+ posts

Letters in Cloud Variables

novice27b wrote:

Did you make API requests directly? This didn't used to work, but I guess they changed that.

’Twas the night before Grav-Mass, and deep in the heart of Cambridge, six joyful members of the Scratch Team sat around a round table next to a hand constructed tree and a LEGO cat. In the centre were pots and pans filled with delectable vegetarian meals, each with their contents scooped onto the attendee’s plates. Together they ate and they chat and they laughed, each welcoming the winter break after a long year of coding.

All but one member of the team in town was there. They were hours into the meal when there was a pounding at the door. Tap, tap. Tap, tap. A gruff voice yelled from the other side, his words interspersed by wheezes and gasps. “I’m here gasp I’m here! It’s me gasp open up!”

Puzzled, Dr. Resnick sat up from his chair at the table and scurried over to the door. He opened it with a gush of frigid Massachusetts air blown into his face. He was blinded from the sunlight reflected by the sun, so he covered his field of vision with his hand on his forehead. Alas, he could see his good friend and colleague, who he greeted with cheer. “Andrew! You made it! We thought you couldn’t come, but come in, come in, the food’s still warm.”

Andrew entered shivering, his cheeks as white as the landscape, but smiling nonetheless. “Glad I’m not too late.”

Closing the door behind him, Dr. Resnick ran to grab Andrew a warm blanket, which the guest accepted with gratitude, wrapping himself cozily within it and taking a place at the table with the professor and his colleagues. He served himself some mashed-up potatoes and a cookie shaped like Gobo, devouring his meal in a cinch. Barely a minute went by before only crumbs were left by. “I haven’t eaten since breakfast,” he confessed weakly. “No time!”

One of the women at the table asked, “Where were you?”

“Back at the Media Lab,” he replied. “I just did a major server upgrade. The site’s a lot faster, but it took me much longer than I expected to iron out all the bugs. But hey, the site’s out of maintenance mode now, and everything is working normally, just in time for the party. No more work until next year – I’m ready for a vacation!”

The woman laughed. “We all are, I think! Another cookie?”

“Thanks, Christan,” he smiled as she placed a sugar-filled Nano onto his plate, careful only to touch it with clean tongs rather than her hands.

Another man at the table asked, “Which parts of the site did you upgrade? I know we have a lot of code stuck on staging still, but I never read the details of what was being pushed today. Should we be worried about any future down time?”

Andrew shrugged. “I don’t think so. I upgraded a bunch of systems – the content delivery networks, the 3.0 API, cloud data – but it was mostly performance improvements. The code has been thoroughly tested, and none of our regression tests fail. Don’t worry; I did my homework – Christan and I ran the entire test suite of thousands projects, and everything still works. I’m really happy with how it all turned out, actually.”

Christan smiled and gave a curt nod. “We’re going to publish a white paper on our testing methodology soon, as a matter of fact. No kid’s project is going to break over the holidays; we made sure of that. And all the critical services are tested for security holes too; no kid is going to have their account compromised either while we’re away.”

After following the conversation with pride, Dr. Resnick stepped in. “While I’m glad you’re enthusiastic and deeply care about Scratch, it sounds like you really did cover your bases.”

Andrew blushed ever so slightly. “Thanks. Well, that’s enough about work – let’s eat!” Perhaps more for himself than anyone else, he exclaimed this, immediately digging his fork into the lambda lasagna.

Their daytime woes set aside, the team enjoyed delicious food until they each had a tummy ache from overeating, to the regret of absolutely nobody, given their similar eating habits at last year’s party. And just like the year before, there were plenty of left-overs for everyone to take home and enjoy the next day, long after their relaxed get-together was over. Andrew’s late arrival was no hindrance; the party went on for hours before they each had to head home to sleep and be with their primary families. When they did finally have to part, they each left with a smile on their face. It was a Grav-Mass miracle.



Meanwhile…

Thousands of miles away from MIT, a young teenage coder lay on the ground with their laptop in front of them, typing away on the Scratch forums in the least ergonomic position imaginable. Now on school break, they had plenty of time to poke around their favourite programming language and its new APIs. They experimented with Python and REST and JSON and learned so much playing with the system.

Click clack. Click clack. “Huh, that’s odd. Server’s down for maintenance. I wonder who would be crazy enough to upgrade systems on Christmas eve?”

Click clack. Click clack. The day goes by, but once night hits, the coder is back on Scratch. This time, they start to play with the cloud data section of the API.

“Huh, that’s odd. I guess I can set strings now. I wonder how that happened.”

Click clack. It would be another few weeks until the team was back in the office and checked the Advanced Topics section of the forums, where they found a post asking:

Hey, look, it turns out you can set cloud variable to strings with the new API. I don’t want to share code in case the Scratch Team is mad at me, though. But it’s still really cool? I don’t know why it works, though, or why they rolled out the new feature without an announcement. thisandagain pls explain?

This is a work of fiction. No offense intended. <3 you Scratch Team. Please don't sue me.

Last edited by bobbybee (Dec. 28, 2017 02:34:59)


“Ooo, can I call you Señorita Bee?” ~Chibi-Matoran
WooHooBoy
Scratcher
1000+ posts

Letters in Cloud Variables

bobbybee wrote:

snip

This is the most beautiful thing I have ever read in my entire life. Nothing posted on this website even comes close to reaching the quality of this post, and it is likely nothing ever will. Consider this my resignation from posting on the forums, as there is no way I can possibly do anything to one-up this. btw syntax highlighting is for children

considered harmful
MCAnimator3D
Scratcher
500+ posts

Letters in Cloud Variables

bobbybee wrote:

snip
Wow. I love everything about this huge story, thank you for this.


scratch
Rumanti
Scratcher
1000+ posts

Letters in Cloud Variables

bobbybee wrote:

snip
<3

:wq

Powered by DjangoBB