Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^3: One to one file output idiom

by soonix (Canon)
on Jan 16, 2020 at 10:04 UTC ( #11111475=note: print w/replies, xml ) Need Help??


in reply to Re^2: One to one file output idiom
in thread One to one file output idiom

Well, since "slurp" is reading a file in, it makes sense to use the opposite of "slurp" for writing. So, for me, "spew" looks completely intuitive ,-)

you seem to see it from the view of the file. Hmmm, yes, from an OO view the opposite might make sense…

Replies are listed 'Best First'.
Re^4: One to one file output idiom
by Eily (Monsignor) on Jan 16, 2020 at 10:08 UTC

    Oh I guess you're right. Although slurp isn't so much more explicit IMHO, I'm just used to it because it's commonly used with perl, but I don't think I've ever seen it used for any other language.

Re^4: One to one file output idiom
by LanX (Cardinal) on Jan 16, 2020 at 21:19 UTC
    I'm not a native speaker, but for me to "spit" seems as a more natural opposite to "slurp".

    To "spew" in contrast also means to vomit.

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

      As a native speaker, I can tell you that "spew" here is completely natural. It's not a synonym of "vomit" and does not carry the negative overtones of that word. It's also not the same as "spit", for the same reason, as well as implying a different (greater) volume of matter being ejected. :-)

        Not super common but it is a euphemism for vomit. There is a rather amusing pun about it in Egil’s Saga—Egil drinks till he’s sick and stands to nearly smother his excessively loquacious, one might say logorrheic :P, dinner host in vomit. When the dinner party responds in angry shock he says, paraphrased: He was spewing all night, so you can’t be mad at me for doing the same. It’s worth noting that vomit probably has 100, easy, synonyms/euphemisms/idioms in American English.

        https://www.merriam-webster.com/dictionary/spew

        spew verb spewed; spewing; spews Definition of spew (Entry 1 of 2) intransitive verb 1 : vomit 2 : to come forth in a flood or gush 3 : to ooze out as if under pressure : exude transitive verb 1 : vomit 2 : to send or cast forth with vigor or violence or in great quantity +a volcano spewing out ash —often used with out spew noun Definition of spew (Entry 2 of 2) 1 : matter that is vomited : vomit 2 : material that exudes or is extruded

        the cognate in German "speien" has mostly the same meanings

        Cheers Rolf
        (addicted to the Perl Programming Language :)
        Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

        After second thought ...

        It's "slurp" - eating noisily - which is the misnomer.

        To gulp would be a more accurate description for devouring a whole file.

        Spew would fit then.

        Cheers Rolf
        (addicted to the Perl Programming Language :)
        Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (3)
As of 2020-12-02 07:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How often do you use taint mode?





    Results (35 votes). Check out past polls.

    Notices?