

Danke! Auch wenn es keine Malware ist, dieser Angriff auf einen Blog ist schon schlimm.


Danke! Auch wenn es keine Malware ist, dieser Angriff auf einen Blog ist schon schlimm.


Ich habe diese Entwicklung verpasst. Welcher von mehreren Gründen wurde dafür ausgewählt?
JS just implicitly does what you, typed language developer, would have to do explicitly
Well, you tried to appeal to a common logic, and I appealed to even more common logic. If you arrange 3 apples on a table in an array, and ask anyone to take the 0th apple, they will be confused.
0-based is just a convention, not a law of the universe. Only using integer-type numbers to address array elements is too merely a convention of some programming languages. And note that no one suggests using non-integer numbers here, only numbers of non-integer type.
Obviously, opinions vary here as well
Types are good
Opinions vary on this topic, apparently. There’s a proliferation of untyped languages.
Try interacting with anything that uses u64 and you’ll be a lot less happy!
I’m sorry you had to experience this, but in all my years of development I hadn’t.
…not actually quite as bad… While it’s UB for C, and it can return garbage. … the value it returns is 0x8000
0x8000 is garbage. Insane.
What does it mean to access the 0th element of an array?
Well, I think I’m happy to never have to choose a number type in JS. I also think that insanity is how C and Intel handle NaN conversions.
So by insanity you mean having just one number type?
I don’t think I’ll dive deeper than quoting Wikipedia:
Most fixed-size integer formats cannot explicitly indicate invalid data. In such a case, when converting NaN to an integer type, the IEEE 754 standard requires that the invalid-operation exception be signaled.
For example in Java, such operations throw instances of java.lang.ArithmeticException.
In C, they lead to undefined behavior, but if annex F is supported, the operation yields an “invalid” floating-point exception (as required by the IEEE standard) and an unspecified value.
In the R language, the minimal signed value (i.e. 0x80000000) of integers is reserved for NA (Not available).[citation needed] Conversions from NaN (or double NA) to integers then yield a NA integer.
Perl’s Math::BigInt package uses “NaN” for the result of strings that do not represent valid integers.
Could you recommend a language with a sane handling of 64b-NaN-to-32b-int conversion?


I had a different purpose for my notes, so I made a webpage with a filter by rating. It’s decoupled from video files, but I only keep a few video files anyway.
I wonder how it is with nan etc in other languages
Stylish addon with a simple CSS :is(html, body) { background-color: #c3f1c5; } or Tranquility Reader
Not only in IDE, but on webpages as well


I think it has a narrower scope, a standardized way to access data for applications which are simply delivered over Internet. As an example: “I want to have a diary editor, but I don’t want to download and install a local app, and neither do I want some external server to access my diary text”. Then you get the running code as a PWA, but the data never leaves your computer (or other trusted storage).


So haben wir das Betteridges Gesetz der Überschriften widerlegt
I wonder what airspace authorities think about their “layered security”