Discuss Scratch

0bitasy0
Scratcher
77 posts

Exactly how big can a cloud variable get...?

I am working with getting cloud variables to save data by joining numbers ect and these variables tend to get huge. When I say this, I mean way past googol (10^100) digits long. This is because I am not counting by one number per variable, rather, I am adding numbers onto each other to create this massive list of digits. For example, using SJRCS_011's Cloud Array API, my simple username is 00,490,099,010,601,170,098,011,601,220,049 (Approximately 490 Octillion, or 4.9x10^29) And I was thinking about linking together hundreds of these.

So the question posed is, how big do you think cloud variables can get without breaking… something? And is my idea even REMOTELY possible?
SJRCS_011
Scratcher
55 posts

Exactly how big can a cloud variable get...?

0bitasy0 wrote:

I am working with getting cloud variables to save data by joining numbers ect and these variables tend to get huge. When I say this, I mean way past googol (10^100) digits long. This is because I am not counting by one number per variable, rather, I am adding numbers onto each other to create this massive list of digits. For example, using SJRCS_011's Cloud Array API, my simple username is 00,490,099,010,601,170,098,011,601,220,049 (Approximately 490 Octillion, or 4.9x10^29) And I was thinking about linking together hundreds of these.

So the question posed is, how big do you think cloud variables can get without breaking… something? And is my idea even REMOTELY possible?
now that you bring that up, I might actually try to lower the impact of each character xD
But yeah, I'd like to see what the limit is for the contents of one cloud variable
0bitasy0
Scratcher
77 posts

Exactly how big can a cloud variable get...?

SJRCS_011 wrote:

0bitasy0 wrote:

I am working with getting cloud variables to save data by joining numbers ect and these variables tend to get huge. When I say this, I mean way past googol (10^100) digits long. This is because I am not counting by one number per variable, rather, I am adding numbers onto each other to create this massive list of digits. For example, using SJRCS_011's Cloud Array API, my simple username is 00,490,099,010,601,170,098,011,601,220,049 (Approximately 490 Octillion, or 4.9x10^29) And I was thinking about linking together hundreds of these.

So the question posed is, how big do you think cloud variables can get without breaking… something? And is my idea even REMOTELY possible?
now that you bring that up, I might actually try to lower the impact of each character xD
But yeah, I'd like to see what the limit is for the contents of one cloud variable

I was thinking about this, and it actually isn't too bad because from a server standpoint, numbers are stored individually. In my 490 octillion example, each successive digit (right to left) has a value 10x more than the previous. The server is actually holding about 29 digits.

Thing is, I'm not actually sure if my logic is even correct…
SJRCS_011
Scratcher
55 posts

Exactly how big can a cloud variable get...?

0bitasy0 wrote:

SJRCS_011 wrote:

0bitasy0 wrote:

I am working with getting cloud variables to save data by joining numbers ect and these variables tend to get huge. When I say this, I mean way past googol (10^100) digits long. This is because I am not counting by one number per variable, rather, I am adding numbers onto each other to create this massive list of digits. For example, using SJRCS_011's Cloud Array API, my simple username is 00,490,099,010,601,170,098,011,601,220,049 (Approximately 490 Octillion, or 4.9x10^29) And I was thinking about linking together hundreds of these.

So the question posed is, how big do you think cloud variables can get without breaking… something? And is my idea even REMOTELY possible?
now that you bring that up, I might actually try to lower the impact of each character xD
But yeah, I'd like to see what the limit is for the contents of one cloud variable

I was thinking about this, and it actually isn't too bad because from a server standpoint, numbers are stored individually. In my 490 octillion example, each successive digit (right to left) has a value 10x more than the previous. The server is actually holding about 29 digits.

Thing is, I'm not actually sure if my logic is even correct…
That's kinda true, but with the way my project is written right now, each regular character before encoding = 4 numbers after encoding
so by adding on say, 10 more characters would mean 40 more characters that have to be stored. So yeah, if this question could be answered by someone in the ST that'd be great, cause it has a pretty big impact on the usability of my project.
0bitasy0
Scratcher
77 posts

Exactly how big can a cloud variable get...?

About that, you don't even need the first 30 or so because they are shortcuts for early-tech days programs that relied on them when using ascii… (they are not part of strings) so you can remove them and hopefully drop under 100 so you only need 3 characters. Also, why do you need the 0 before all the numbers anyways?
cobraguy
Scratcher
1000+ posts

Exactly how big can a cloud variable get...?

I'm not sure about cloud variables, but I remembers in 1.4 that variables turned into Infinity after a certain number.
SJRCS_011
Scratcher
55 posts

Exactly how big can a cloud variable get...?

0bitasy0 wrote:

About that, you don't even need the first 30 or so because they are shortcuts for early-tech days programs that relied on them when using ascii… (they are not part of strings) so you can remove them and hopefully drop under 100 so you only need 3 characters. Also, why do you need the 0 before all the numbers anyways?
idk, just felt like it xD
SJRCS_011
Scratcher
55 posts

Exactly how big can a cloud variable get...?

bump
Harakou
Scratcher
1000+ posts

Exactly how big can a cloud variable get...?

Well, I wasn't involved in the development of Scratch so I wouldn't know specifics, but I do have some experience with data types in computers. My best guess is that Scratch uses doubles to store numbers, which store data in format very similar to scientific notation. (In short, it's represented as 1.x * 2^y, where x and y are the two values stored by the data type.) This means that you can represent very large numbers with a relatively small number of bytes. In fact, you can store numbers as large as 2*10^308 (!) However, there is a caveat to this: though you can store numbers that large, you have a limited number of significant figures, so you can't store every digit, which would make this pretty impractical for your purposes.

That all assumes that Scratch uses doubles to store numbers, though. I wouldn't be surprised if Scratch varied the data type based on what is stored, or maybe even did something like storing everything as a string and casting to other types as needed. If that's the case, your system may or may not be workable, if impractical. Quite honestly, I don't know how Scratch handles different data types, since they're hidden from the programmer. We'd need a member of the dev team to really know for sure. (Or, maybe some experimentation could work it out! If you can figure out where things start rounding off for different numbers, you could get a good idea of what data types are used.)
iCodeBananas
Scratcher
17 posts

Exactly how big can a cloud variable get...?

If you can calculate the amount of MB 1 digit gets. Divide 50 by that. Then times that by 1048576 and you've got your answer!
GlassGalaxy
Scratcher
500+ posts

Exactly how big can a cloud variable get...?

iCodeBananas wrote:

If you can calculate the amount of MB 1 digit gets. Divide 50 by that. Then times that by 1048576 and you've got your answer!
You do know this topic is 3 years old…? When you post on an old topic, it is called necroposting and should be avoided. Please check the date before posting. It makes the forums less cluttered when you don't bump up old topics. Thanks! ^^

Powered by DjangoBB