News for hackers. Stuff that matters.
Re:SetBigTimeout by BillyTheKing on Friday October 18, 2024 @12:21PM (#41880864)
this is the thing with JS and TS - the types and stuff, it's all good until you realise that all integers are basically int 52 (represented as float 64, with 52 bits for the fraction).

Yes, it's nice and flexible - but also introduces some dangerous subtle bugs.

Re:SetBigTimeout by 8n4vidtmkvmk on Friday October 18, 2024 @12:35PM (#41881020)
2^53-1 I thought.

And no, they're not all that. There's a bunch that are 2^32 such as this timeout, apparently, plus all the bit shift operations.

Re:SetBigTimeout by vhcr on Friday October 18, 2024 @12:38PM (#41881048)
Not ALL integers are 52 bit, BigInts were added on ECMAScript 2020.