9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: rog@vitanuova.com
To: 9fans@cse.psu.edu
Subject: Re: [9fans] hget
Date: Mon, 29 Mar 2004 22:12:03 +0100	[thread overview]
Message-ID: <1b6fb567a0c2dae27065d1be1ac861c5@vitanuova.com> (raw)
In-Reply-To: <40688A19.3000602@swtch.com>

[-- Attachment #1: Type: text/plain, Size: 847 bytes --]

> whereas hget -o file will not replace the file if the server
> or some broken intermediate cache thinks things are up-to-date

that's why i thought it might be reasonable to divorce the "look at
modification time of file" semantics of -o from the "can seek on
output" semantics of same.

i've never used -o as it currently is because i don't trust
computers to keep or record time properly, either here or out there
(i've the same problem with my thinkpad time speeding up as everyone
else).

i'd expect

	hget | wc

to produce the same results as

	hget > file
	wc < file

>  then how about hget -1 meaning "one shot at writing data"

i think the option should the other way around,
e.g. hget -m meaning "multiple shots at writing data.

then the above correspondence still holds.
(and -o still does the same thing)

[-- Attachment #2: Type: message/rfc822, Size: 2891 bytes --]

From: Russ Cox <rsc@swtch.com>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] hget
Date: Mon, 29 Mar 2004 15:42:01 -0500
Message-ID: <40688A19.3000602@swtch.com>


>however we're already admitting a qualititive difference in types of
>file by using the -o option as it is.  (oh no, danger!  danger!  file
>seek thread trying to re-establish; apologies!)
>
>at least when you're creating a file, you're reasonably sure you can
>seek on it ok (although of course that's not the case for >{}).
>
>i think the default case should be not to seek, because that
>will produce less surprises.
>  
>

right enough.   then how about hget -1 meaning "one shot at writing data"
(or if that doesn't describe it, "what rog thinks it should do"  ;-) )
my point is mainly that i'd rather see an option than some magic
guessing that will confuse people once they see the difference.
i do hget >file all the time, when i want to make sure i get a new
copy (whereas hget -o file will not replace the file if the server
or some broken intermediate cache thinks things are up-to-date).

  reply	other threads:[~2004-03-29 21:12 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-27  0:58 [9fans] rio and acme scrolling Micah Stetson
2004-03-27  1:51 ` Russ Cox
2004-03-27  5:07   ` Micah Stetson
2004-03-27 15:01     ` David Presotto
2004-03-27 15:07       ` Sape Mullender
2004-03-27 15:12         ` David Presotto
2004-03-27 20:58           ` Derek Fawcus
2004-03-27 15:22       ` Richard Miller
2004-03-27 15:36         ` Sape Mullender
2004-03-27 15:38         ` David Presotto
2004-03-27 15:38         ` Russ Cox
2004-03-27 17:03           ` Richard Miller
2004-03-27 16:07         ` andrey mirtchovski
2004-03-27 20:11         ` Micah Stetson
2004-03-27 20:45           ` thinkpads (was Re: [9fans] rio and acme scrolling) Axel Belinfante
2004-03-28 11:07           ` [9fans] rio and acme scrolling matt
2004-03-29 15:18             ` splite
2004-03-27 20:27       ` Micah Stetson
2004-03-27 23:57         ` Micah Stetson
2004-03-27  3:14 ` jmk
2004-03-27 10:21   ` a
2004-03-27 10:50     ` Dave Lukes
2004-03-29 13:41 ` blstuart
2004-03-29 14:33   ` Russ Cox
2004-03-29 14:36   ` matt
2004-03-29 15:57     ` Axel Belinfante
2004-03-29 17:31       ` Axel Belinfante
2004-03-29 18:42         ` [9fans] hget rog
2004-03-29 19:50           ` Russ Cox
2004-03-29 20:12             ` rog
2004-03-29 20:16               ` Russ Cox
2004-03-29 20:40                 ` rog
2004-03-29 20:42                   ` Russ Cox
2004-03-29 21:12                     ` rog [this message]
2004-03-29 22:23                       ` Charles Forsyth
2004-03-29 21:36                         ` rog
2004-03-29 23:39                           ` Charles Forsyth
2004-03-29 22:48                             ` rog
2004-03-29 21:46                               ` boyd, rounin
2004-03-29 23:01                                 ` rog
2004-03-29 22:17                                   ` boyd, rounin
2004-03-29 23:34                                     ` rog
2004-03-29 22:49                                       ` boyd, rounin
2004-03-30 10:19                                         ` Steve Simon
2004-03-30  0:02                                   ` Charles Forsyth
2004-03-29 23:22                                     ` rog
2004-03-29 19:58           ` David Tolpin
2004-03-29 20:08           ` David Tolpin
2004-03-29 20:18             ` rog

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1b6fb567a0c2dae27065d1be1ac861c5@vitanuova.com \
    --to=rog@vitanuova.com \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).