Jason (jcreed) wrote,
Jason
jcreed

So I pretty much had already lost respect for Perl, but now I hardly even trust it for writing hilariously bad code that computes its answer in a very large amount of time. For when I try to write merely hilariously bad code, I get tragically bad code that doesn't even compute the right value, in a very large amount of time.

The semantics of the boundary where integer arithmetic overflows into floating point apparently changed between versions 5.8.7 and 5.8.8. Code that happily computed 32-bit modular addition and multiplication in the former does not in the latter. I can write code that "works" for both, except that I'm not sure it really works, and it uses floating point mod. Ugh ugh ugh. And "use integer" is not to be trusted, since on a 64-bit machine, it does 64-bit modular arithmetic. "If it [the compiler]", and I am quoting the perlop manpage, "feels like it".
Tags: perl, programming, sux0rz
Subscribe

  • (no subject)

    Some further progress cleaning up the https://xkcd.com/1360/ -esque augean stables that is my hard drive. Tomato chicken I made a couple days ago…

  • (no subject)

    Did some personal archaeology. Helped a little with laundry. Threw some chicken, onions, tomato, stock, peppers in the slow cooker and hopefully…

  • (no subject)

    Dinner with akiva and dannel at nuevo portal in carroll gardens. Ate a pile of chicken stew and rice and beans and maduros, good times. I do miss…

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 16 comments

  • (no subject)

    Some further progress cleaning up the https://xkcd.com/1360/ -esque augean stables that is my hard drive. Tomato chicken I made a couple days ago…

  • (no subject)

    Did some personal archaeology. Helped a little with laundry. Threw some chicken, onions, tomato, stock, peppers in the slow cooker and hopefully…

  • (no subject)

    Dinner with akiva and dannel at nuevo portal in carroll gardens. Ate a pile of chicken stew and rice and beans and maduros, good times. I do miss…