9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Re: [9fans] read/write offset hack
@ 2008-05-30 15:35 erik quanstrom
  2008-05-30 16:12 ` Stefan Hajnoczi
  0 siblings, 1 reply; 19+ messages in thread
From: erik quanstrom @ 2008-05-30 15:35 UTC (permalink / raw)
  To: 9fans

> On Fri, May 30, 2008 at 4:15 PM, erik quanstrom <quanstro@coraid.com> wrote:
> > why not put the timing information inband?  this would allow the timed
> > sound to be saved to a file also without 1.7mb of zeros.
>
> because then you'd need to quote the audio data in case it
> contained something that looked like a timing command?

if the size of the chunks is not obvious, say due to compression,
run-length encoding would solve that problem.

- erik



^ permalink raw reply	[flat|nested] 19+ messages in thread
* Re: [9fans] read/write offset hack
@ 2008-05-30 15:15 erik quanstrom
  2008-05-30 15:27 ` roger peppe
  2008-05-30 16:09 ` Russ Cox
  0 siblings, 2 replies; 19+ messages in thread
From: erik quanstrom @ 2008-05-30 15:15 UTC (permalink / raw)
  To: 9fans

> P. P. S.  The usb audio use of offsets is not as bad as it first sounds.
> The device consumes written data at a constant rate (say, 176,400
> bytes per second for CD audio).  You can make a noise ten seconds
> from now by writing 1.7MB bytes of zeros (silence) followed by your
> sound data.  Being able to seek ahead 1.7MB instead just avoids the
> need to write the zeros.  The file offset is still bytes, not nanoseconds.
>

why not put the timing information inband?  this would allow the timed
sound to be saved to a file also without 1.7mb of zeros.

- erik



^ permalink raw reply	[flat|nested] 19+ messages in thread
* [9fans] read/write offset hack
@ 2008-05-30  8:43 Nyang A. Phra
  2008-05-30  9:27 ` Charles Forsyth
                   ` (4 more replies)
  0 siblings, 5 replies; 19+ messages in thread
From: Nyang A. Phra @ 2008-05-30  8:43 UTC (permalink / raw)
  To: 9fans

Poking around Plan 9 and 9P, I was wondering whether it would be a
neat hack or some sort of abuse to read and write dynamically served
files at different offsets to get different semantics, instead of
reading and writing different files (ctl, clone, etc.) to do that.

Given that the system encourages to perceive files as having arbitrary
semantics (as opposed to having regular sequential file semantics) it
would make sense (to me) to have reads and writes at arbitrary offsets
to have arbitrary semantics as well -- that's, after all, what offset
(kind of) does on a regular file, too, although in a rather trivial
way.

...but my spider-sense is telling me this would probably be either
rather pointless, or troublesome, or prohibited. Please set me
straight.

Nyang



^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2008-06-02  8:53 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-30 15:35 [9fans] read/write offset hack erik quanstrom
2008-05-30 16:12 ` Stefan Hajnoczi
  -- strict thread matches above, loose matches on Subject: below --
2008-05-30 15:15 erik quanstrom
2008-05-30 15:27 ` roger peppe
2008-05-30 16:09 ` Russ Cox
2008-05-30  8:43 Nyang A. Phra
2008-05-30  9:27 ` Charles Forsyth
2008-05-30  9:32   ` Nick LaForge
2008-05-30  9:45   ` Charles Forsyth
2008-05-30 10:10     ` Nick LaForge
2008-05-30 11:09     ` Nyang A. Phra
2008-05-30 11:28       ` Nick LaForge
2008-05-30 10:53 ` roger peppe
2008-05-30 15:01 ` Russ Cox
2008-05-30 16:50   ` Robert William Fuller
2008-05-30 19:04   ` a
2008-05-30 19:22     ` Roman Shaposhnik
2008-05-30 16:20 ` ron minnich
2008-06-02  8:53 ` Nyang A. Phra

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).