Threads for adfernandes

  1. 9

    To anyone reading this thread: after years and years of experience with attempting ASN.1 interop, STAY AWAY from ASN.1!

    Run, hide, lie, do whatever is necessary to avoid this design-by-committee monstrosity.

    Yes, it looks just fine on paper, but in actual implementation you will enter a never-ending hell of “why isn’t that working?” followed by the most persnickety language-lawyering from everyone involved.

    Read Peter Gutmann’s tirade about X.509 with the mindset of “How would I interoperate with this?” and you might begin to understand.

      1. 5

        Confirmed. It’s one of the things I know I can look up when I suspect I need it.

        1. 2

          The problem is not knowing that there is even something that needs to be looked up.

          Even basic things like “no, not all base-10 numbers have exact (finite) base-2 representations”, to “yes, signed zero is a thing, for very good reasons” to “please don’t forget that Inf, -Inf, and NaN are valid (and useful) values”.

        2. 4

          One of the design aims of IEEE floating-point was to reduce the likelihood of developers, who did not know much about floating-point, producing incorrect results.

          The survey asks a load of detailed questions that only a few people who have studied the subject in detail will be able to answer. Surprise! The results were little better than random.

          I’m sure I could come up with a survey to find out whether developers understood integer arithmetic, and get essentially random results.

          1. 2

            Darn. You beat me to posting exactly the same thing.

          1. 4

            Is it better to be slowly correct all the time, or quickly incorrect some of the time?

            Really, I would suggest not giving advice like “turn on -ffast-math and friends” unless you really understand what those flags are doing to your code.

            There is an awful lot of numerical analysis that depends on the surprisingly complex behavior of floating-point complex arithmetic. That complex-multiplication function is written that way for a reason. Many reasons, actually.

            Perhaps that warrants a little more investigation beyond “LOL the standard library authors are just a bunch of pedants”…?