Skip Navigation

InitialsDiceBearhttps://github.com/dicebear/dicebearhttps://creativecommons.org/publicdomain/zero/1.0/„Initials” (https://github.com/dicebear/dicebear) by „DiceBear”, licensed under „CC0 1.0” (https://creativecommons.org/publicdomain/zero/1.0/)A
Posts
5
Comments
162
Joined
2 yr. ago

  • Ich habe diese Entwicklung verpasst. Welcher von mehreren Gründen wurde dafür ausgewählt?

  • Deleted

    Permanently Deleted

    Jump
  • JS just implicitly does what you, typed language developer, would have to do explicitly

  • Deleted

    Permanently Deleted

    Jump
  • 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.

  • Deleted

    Permanently Deleted

    Jump
  • Obviously, opinions vary here as well

  • Deleted

    Permanently Deleted

    Jump
  • Types are good

    Opinions vary on this topic, apparently. There’s a proliferation of untyped languages.

  • Deleted

    Permanently Deleted

    Jump
  • 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.

  • Deleted

    Permanently Deleted

    Jump
  • What does it mean to access the 0th element of an array?

  • Deleted

    Permanently Deleted

    Jump
  • 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.

  • Deleted

    Permanently Deleted

    Jump
  • So by insanity you mean having just one number type?

  • Deleted

    Permanently Deleted

    Jump
  • 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.

  • Deleted

    Permanently Deleted

    Jump
  • 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.

  • Deleted

    Permanently Deleted

    Jump
  • I wonder how it is with nan etc in other languages

  • 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

  • Tree-shaking works on per function basis