38

When you watch presentations about Plan 9 and its acme editor you might notice that the name for copy is snarf (I wasn't able to find any meaningful explanation unfortunately).

Why is it so?

Is there a reason for that? Was it done to create a unique name for this functionality as copy might not be the best name?


References:

  • Wikipedia (link):

    Snarf, a term used for the "copy" operation in the Blit and Plan 9 windowing systems.

  • cat-v.org (link):

    There's another menu available with a mid-click; Cut and Paste are pretty self-explanatory, and Snarf is just the Plan 9 word for Copy.

  • 9fans mailing list (link):

    Using either/both acme under Plan 9 and/or Mac OS X via plan9port, is there a "file" that can be opened in acme that displays the current contents of the acme snarf buffer?

    /dev/snarf
    

    So it looks like that there is something like a snarf buffer and a file (obviously there must be a file for that buffer) called /dev/snarf.

  • 9term manual page (link):

    Characters typed on the keyboard replace the selected text; if this text is not empty, it is placed in a snarf buffer common to all windows but distinct from that of sam(1).

    (...)

    Editing operations are selected from a menu on button 2. The cut operation deletes the selected text from the screen and puts it in the snarf buffer; snarf copies the selected text to the buffer without deleting it; paste replaces the selected text with the contents of the buffer; and send copies the snarf buffer to just after the output point, adding a final newline if missing. Paste will sometimes and send will always place text after the output point; the text so placed will behave exactly as described above. Therefore when pasting text containing newlines after the output point, it may be prudent to turn on hold mode first.

  • Exploring Acme tutorial (link):

    'Snarf': called copy in most other editors

  • dictionary.com definitions of snarf (link):

    • (informal) to eat or drink greedily

    • (contemporary) to grab something in greed, esp. without permission

    • (Unix) To fetch a file or set of files across a network. See also blast.

  • Inferno Part 2: Let's Make a Cluster! (link):

    The clipboard is called by the unfortunate name “snarf buffer” in Inferno and Plan 9.

6
  • 2
    I asked about the reason of putting the question on hold on meta: meta.unix.stackexchange.com/questions/4163/… Sep 9, 2016 at 20:18
  • 1
    I would guess it's a "verbalization", same as when people say "google it" , so "snarf" was just a way to say "put text into snarf buffer". Sep 10, 2016 at 10:47
  • 1
    @Serg But why "snarf buffer", not "copy buffer"? Sep 10, 2016 at 13:01
  • @Serg You mean verbification, not verbalization -- to verbalize is to say aloud.
    – cat
    Sep 11, 2016 at 14:12
  • If I were to guess it may be similar to clojure's design. In clojure you use slurp and spit for file IO, snarf is not far off. (But clojure is much younger than Plan9)
    – grochmal
    Sep 11, 2016 at 16:25

1 Answer 1

31

I stumbled upon a quite reasonable explanation today. The Jargon File (link) explains snarf like this:

snarf: /snarf/, vt.

  1. [in the Unix community] To fetch a file or set of files across a network. See also blast. This term was mainstream in the late 1960s, meaning ‘to eat piggishly’. It may still have this connotation in context. “He's in the snarfing phase of hacking — FTPing megs of stuff a day.

It seems like the designers of Plan 9 perceived copy not as an atomic action. Copying is in fact:

  • obtaining the content you want to copy (snarfing)
  • inserting the content where you want it to be (pasting)

(Cutting on the other hand is snarfing and deleting the original content at the same time.)


Rob Pike's answer

I've asked this question on the 9fans mailing list. You can see the thread here (link)1.

Here's the answer1 I've received from Rob Pike:

The operation is not to copy but to snarf. It's called snarf because snarf is what it does. There is no design document.


1: As Stéphane Chazelas pointed out in a comment, you can use http://marc.info/?t=147367568900005&r=1&w=2 to avoid having to create an account to see the list archives.

1
  • 3
    Now the phrase "bluesnarfing" makes sense
    – cutrightjm
    Sep 12, 2016 at 18:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .