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

Re^7: Storable- long integer size

by syphilis (Archbishop)
on Oct 22, 2015 at 10:47 UTC ( [id://1145630]=note: print w/replies, xml ) Need Help??


in reply to Re^6: Storable- long integer size
in thread Storable- long integer size

I really didn't expect that Storable would be so fragile over a cross-platform network.

I can now clearly see that the posts advising the OP to "do it another way" are well founded.
(Of course, at no stage did I think those posts would prove to be otherwise ;-)

Cheers,
Rob

Replies are listed 'Best First'.
Re^8: Storable- long integer size
by BrowserUk (Patriarch) on Oct 22, 2015 at 11:17 UTC

    Whilst it wouldn't be too hard to fix this particular problem; in general it's probably not worth the effort.

    Storable, as the name suggests, is a fast, memory dump&retrieve format, not a data interchange format.

    As such, whilst it would be possible to fix-up this problem; and that could be extended to deal with mismatching byte-orders and 32/64-bit mismatches; that would inevitably make the module slower for its intended purpose.

    In the end that would be another case of feature creep ruining yet another module, by compromising its core function.

    Perhaps the module's biggest mistake is in not making clear its intended purpose and its unsuitability as an interchange format.


    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.
      I've got the feeling that the particular type of problem demonstrated by my example should be fixable without impacting significantly on performance.
      But perhaps I haven't grasped the importance of the longsize check, and a "feeling" isn't a very convincing argument ...

      All of your points are good ones.

      Cheers,
      Rob
        I've got the feeling that the particular type of problem demonstrated by my example should be fixable without impacting significantly on performance.

        It would; but to what end?

        It would very slightly relax the conditions under which Storable could successfully be used as a file interchange format: if both source and destination are: 64-bit; and little-endian; and use the same floating point format; and are using ASCII or utf-8 (eg. not Win-1252) as the internal format for strings; and ...) then you might get away with using binary Storable files as an interchange format.

        But would that slight "improvement" as an interchange format be a good thing?


        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.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (7)
As of 2024-04-23 08:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found