http://qs321.pair.com?node_id=11111475


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 (Saint) 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