Discuss Scratch

The_Insane_Creator
Scratcher
500+ posts

is scratch prepared for 2,147,483,648

if a user id or project id reaches 2,147,483,648, what will happen?
LukasDoesCode
Scratcher
59 posts

is scratch prepared for 2,147,483,648

Most software at this point is 64 bit, so I'm pretty sure scratch would be fine if something hit a 32-bit limit.
The_Insane_Creator
Scratcher
500+ posts

is scratch prepared for 2,147,483,648

LukasDoesCode wrote:

Most software at this point is 64 bit, so I'm pretty sure scratch would be fine if something hit a 32-bit limit.
javascript is 32 bit
CST1229
Scratcher
1000+ posts

is scratch prepared for 2,147,483,648

The_Insane_Creator wrote:

(#3)
javascript is 32 bit
no. javascript numbers are 64-bit floating-point numbers, which can reliably handle integers up to 9007199254740991 (and bigints can handle any integer)
and i'm pretty sure most integer types in databases should be 64-bit as well

Last edited by CST1229 (Nov. 12, 2024 20:13:38)

The_Insane_Creator
Scratcher
500+ posts

is scratch prepared for 2,147,483,648

CST1229 wrote:

The_Insane_Creator wrote:

(#3)
javascript is 32 bit
no. javascript numbers are 64-bit floating-point numbers, which can reliably handle integers up to 9007199254740991 (and bigints can handle any integer)
and i'm pretty sure most integer types in databases should be 64-bit as well
so what happens when a user id or project id reaches 900719925474099 (that will never happen lol)
han614698
Scratcher
1000+ posts

is scratch prepared for 2,147,483,648

The_Insane_Creator wrote:

CST1229 wrote:

The_Insane_Creator wrote:

(#3)
javascript is 32 bit
no. javascript numbers are 64-bit floating-point numbers, which can reliably handle integers up to 9007199254740991 (and bigints can handle any integer)
and i'm pretty sure most integer types in databases should be 64-bit as well
so what happens when a user id or project id reaches 900719925474099 (that will never happen lol)
probably nothing honestly
CST1229
Scratcher
1000+ posts

is scratch prepared for 2,147,483,648

The_Insane_Creator wrote:

(#5)
so what happens when a user id or project id reaches 900719925474099 (that will never happen lol)
floating-point numbers round to even numbers after 9007199254740991, so i'd assume parts of the website would just start breaking because every odd project id would round to the previous (even) project id in some places.
like, you create a project, the server gives it the id 9007199254740993, but then the editor tries grabbing it from id 9007199254740992 (which is not the project you just created).
(this is all speculation though)

Last edited by CST1229 (Nov. 12, 2024 20:45:42)

The_Insane_Creator
Scratcher
500+ posts

is scratch prepared for 2,147,483,648

CST1229 wrote:

The_Insane_Creator wrote:

(#5)
so what happens when a user id or project id reaches 900719925474099 (that will never happen lol)
floating-point numbers round to even numbers after 9007199254740991, so i'd assume parts of the website would just start breaking because every odd project id would round to the previous (even) project id in some places.
like, you create a project, the server gives it the id 9007199254740993, but then the editor tries grabbing it from id 9007199254740992 (which is not the project you just created).
(this is all speculation though)
lets talk about different thingy

what happens when unix time reach 2^31, will scratchy scratch scratch time systems brek?
blubby4
Scratcher
100+ posts

is scratch prepared for 2,147,483,648

The_Insane_Creator wrote:

CST1229 wrote:

The_Insane_Creator wrote:

(#5)
so what happens when a user id or project id reaches 900719925474099 (that will never happen lol)
floating-point numbers round to even numbers after 9007199254740991, so i'd assume parts of the website would just start breaking because every odd project id would round to the previous (even) project id in some places.
like, you create a project, the server gives it the id 9007199254740993, but then the editor tries grabbing it from id 9007199254740992 (which is not the project you just created).
(this is all speculation though)
lets talk about different thingy

what happens when unix time reach 2^31, will scratchy scratch scratch time systems brek?

LukasDoesCode wrote:

Most software at this point is 64 bit, so I'm pretty sure scratch would be fine if something hit a 32-bit limit.
Probably nothing

Powered by DjangoBB