Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^5: Determining the minimum representable increment/decrement possible? (Perl's scanf broken?)

by syphilis (Archbishop)
on Jun 17, 2016 at 15:22 UTC ( [id://1165987]=note: print w/replies, xml ) Need Help??


in reply to Re^4: Determining the minimum representable increment/decrement possible? (Perl's scanf broken?)
in thread Determining the minimum representable increment/decrement possible?

Why not use the underlying CRTs sscanf() or strtod()?

I don't know.
I speculate that in earlier times those functions were not so reliable and it was decided that perl should do its own implementation.
I further speculate that it has now got to the stage that unwinding that perl implementation is not a trivial task.

Cheers,
Rob
  • Comment on Re^5: Determining the minimum representable increment/decrement possible? (Perl's scanf broken?)

Replies are listed 'Best First'.
Re^6: Determining the minimum representable increment/decrement possible? (Perl's scanf broken?)
by BrowserUk (Patriarch) on Jun 17, 2016 at 16:04 UTC

    Grr. I had a notion to try and work out what code Perl was actually using to parse doubles and 'forgot' my rule of the last few years: don't go looking in the recent perl sources; it will only piss you off.

    It pissed me off. It used to be that you could compile Perl to use stdio, and I thought I might do that for 5.22; but apparently that is not longer possible!

    Perl is still my go-to language for getting stuff done in a hurry; and in many cases even when the program has ultimately to be written in some compiled language, whether for speed or to satisfy some other requirement, I still use Perl to prototype and only convert to C or C++ or D or whatever once I have the code working.

    But for the last few years, the P5 development has become introspective, even introverted; titivating instead of innovating; throwing any weird idea that comes up into the code base only to remove it a build or two later. I've lost track of the number of "experimental" additions that have come and inevitably gone.

    It's just a shame that PerlIO isn't so easily back out and discarded! :(


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority". I knew I was on the right track :)
    In the absence of evidence, opinion is indistinguishable from prejudice. Not understood.
      I hadn't thought of building perl without USE_PERLIO.
      That would have been interesting - and I agree that it's a pity that the option has been taken away.

      Cheers,
      Rob
        I hadn't thought of building perl without USE_PERLIO

        BTW, in a recent email I suggested to Jarkko Hietaniemi that building without USE_PERLIO might be helpful re perl's problems with text-to-float.

        He said "I don't think the float conversions have anything to do with perlio as such. Look at numeric.c."

        Cheers,
        Rob

      Only two experimental features were removed:

      • Passing a reference to key/values/each

        I don't know why that was released in the first place given it was known to be broken before it was even coded.

      • my $_;

        It was causing code like apply { s/foo/bar/ } @a to break in a manner that was confusing for too many.

      Smart-matching and given/when have been experimental for a while, but they are not dead. The subject came up again this week. There are strong intentions to fix it.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1165987]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2024-04-19 22:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found