[9fans] python csp

2009-03-11 Thread roger peppe
apologies for the off topic email, but i find myself in the situation of having to run up a web frontend using python - does if anyone here know of a decent plan9-style CSP module for python? (i found pycsp, but i'm not sure i trust the code; moreover i can't alt on output, or even on a channel wh

Re: [9fans] python csp

2009-03-12 Thread roger peppe
2009/3/11 : > www.stackless.com not viable. it doesn't even support alt, as far as i can see. coming up: another port of the 9 code. maybe i'm hidebound, but i hate to do concurrent programming without channels!

Re: [9fans] python csp

2009-03-12 Thread roger peppe
2009/3/12 John Barham : > How about using queues (http://docs.python.org/library/queue.html)? no alt.

Re: [9fans] python csp

2009-03-12 Thread roger peppe
2009/3/12 John Barham : >>> How about using queues (http://docs.python.org/library/queue.html)? >> >> no alt. > > Couldn't you implement it approximately using > http://docs.python.org/library/queue.html#Queue.Queue.qsize? no. "approximately" in this case would mean "wrong". for the time being, a

Re: [9fans] Strange rc bug for the 9fans bug-squashing squad

2009-03-18 Thread roger peppe
2009/3/17 erik quanstrom : > it is unreasonable to expect to be able to generate tokens > that are bigger than 8k. i'm not sure i agree. they're not just tokens, they're strings, and there are lots of reasons why one might wish to have a string longer than 8k read from a file. i've certainly done

Re: [9fans] Strange rc bug for the 9fans bug-squashing squad

2009-03-18 Thread roger peppe
2009/3/18 erik quanstrom : > -                               ewd = wd+l+100-1; one small comment, based on a totally superficial scan of that diff: might it not be better to grow the buffer by some multiplicative factor, to avoid linear behaviour when reading large files? i often (for no particula

Re: [9fans] Strange rc bug for the 9fans bug-squashing squad

2009-03-18 Thread roger peppe
2009/3/18 erik quanstrom : > the total cost is O(maximum token length) for the > whole input.  how could this be a problem? well, if there's only one token (e.g. when ifs=''), it's actually O(n^2), assuming that realloc copies every time. but your first argument is sufficient. i acquiesce.

Re: [9fans] Raw Input Driver

2009-03-20 Thread roger peppe
2009/3/20 Charles Forsyth : > the ordering problem is misleading: you need timely response for > interactive applications; it's a reasonably straightforward application > of real-time programming.  (by the way, if you're passing low-level > things like that across lossy wireless networks, you're po

Re: [9fans] Raw Input Driver

2009-03-20 Thread roger peppe
2009/3/20 Charles Forsyth : > in the slow-network situation the thing you're responding to on the display > might not be accurate (eg, feedback delayed) which low-level input merging > won't address. true, but that's something that's relatively easy for the user to adjust to - most actions have an

Re: [9fans] Raw Input Driver

2009-03-20 Thread roger peppe
2009/3/20 : > On Fri, Mar 20, 2009 at 01:03:12PM +0000, roger peppe wrote: > For my own stuff, having to rewrite the 2 dimensions user interface, I > have created a library running on the terminal that keeps the > definitions of the graphical elements drawn with an identifier (3 >

Re: [9fans] Raw Input Driver

2009-03-20 Thread roger peppe
2009/3/20 Francisco J Ballesteros : > El 20/03/2009, a las 14:07, rogpe...@gmail.com escribió: >> so you end up with a smart client or split application, >> which lack the same easy composability that you get >> from plan 9's remote devices. perhaps i should have written "generality and easy compo

Re: [9fans] Raw Input Driver

2009-03-20 Thread roger peppe
2009/3/20 Francisco J Ballesteros : > Yes, you split the application. UI > elements are kept at the terminal and > the application at the CPU server. The  input event generator knows what's > the input, but it runs at the terminal. > The only problem is to come up with a > widget abstract and gener

[9fans] grist for the "synchronous vs. asynchronous" mill

2009-03-24 Thread roger peppe
http://www.classhat.com/tymaPaulMultithread.pdf

Re: [9fans] typed sh (was: what features would you like in a shell?)

2009-04-02 Thread roger peppe
2009/4/2 : > On Thu, Apr 2, 2009 at 8:41 PM, John Stalker wrote: >> What I most often miss in shell programming is a proper type system. > You should have a look at alphabet. It is cool. > http://www.vitanuova.com/inferno/man/1/sh-alphabet.html i certainly enjoyed creating it. unfortunately it's

Re: [9fans] typed sh (was: what features would you like in a shell?)

2009-04-16 Thread roger peppe
2009/4/6 Bakul Shah : > On Thu, 02 Apr 2009 20:28:57 BST roger peppe  wrote: >> a pipeline is an amazingly powerful thing considering >> that it's not a turing-complete abstraction. > > "f | g" is basically function composition, where f and g are > stream fu

Re: [9fans] Plan9 - the next 20 years

2009-04-21 Thread roger peppe
2009/4/20 andrey mirtchovski : >> with 9p, this takes a number of walks... > > shouldn't that be just one walk? > > % ramfs -D > ... > % mkdir -p /tmp/one/two/three/four/five/six > ... > % cd /tmp/one/two/three/four/five/six > ramfs 640160:<-Twalk tag 18 fid 1110 newfid 548 nwname 6 0:one 1:two > 2

Re: [9fans] Plan9 - the next 20 years

2009-04-21 Thread roger peppe
2009/4/21 maht : > Tag 3 could conceivably arrive at the server before Tag 2 that's not true, otherwise the flush semantics wouldn't work correctly. 9p *does* require in-order delivery.

Re: [9fans] Plan9 - the next 20 years

2009-04-21 Thread roger peppe
i wrote: > the currently rather complex definition of Twalk could > be replaced by clone and walk1 instead, as > in the original 9p: {Tclone, Twalk, Twalk, ...} i've just realised that the replacement would be somewhat less efficient as the current Twalk, as the cloned fid would still have to be c

Re: [9fans] Plan9 - the next 20 years

2009-04-21 Thread roger peppe
2009/4/21 erik quanstrom : > what is the important use case of flush and why is this > so important that it drives the design? actually the in-order delivery is most important for Rmessages, but it's important for Tmessages too. consider this exchange (C=client, S=server), where the Tflush is sent

Re: [9fans] Plan9 - the next 20 years

2009-04-21 Thread roger peppe
2009/4/21 erik quanstrom : > isn't the tag space per fid? no, otherwise every reply message (and Tflush) would include a fid too; moreover Tversion doesn't use a fid (although it probably doesn't actually need a tag) > a variation on the tagged queuing flush > cache would be to force the client t

Re: [9fans] Plan9 - the next 20 years

2009-04-21 Thread roger peppe
2009/4/21 Bakul Shah : > In the pipelined case, from a server's perspective, client's > requests just get to it faster (and may already be waiting!). > It doesn't have to do anything special.  What am I missing? you're missing the fact that without the sequence operator, the second request can arr

Re: [9fans] Plan9 - the next 20 years

2009-04-21 Thread roger peppe
2009/4/21 David Leimbach : > Roger... this sounds pretty promising. i dunno, there are always hidden dragons in this area, and forsyth, rsc and others are better at seeing them than i. >  10p?  I'd hate to call it 9p++. 9p2010, based on how soon it would be likely to be implemented...

Re: [9fans] Plan9 - the next 20 years

2009-04-21 Thread roger peppe
2009/4/21 erik quanstrom : >> plan 9 and inferno rely quite heavily on having flush, >> and it's sometimes notable when servers don't implement it. >> for instance, inferno's file2chan provides no facility >> for flush notification, and wm/sh uses file2chan; thus if you >> kill a process that's rea

Re: [9fans] Plan9 - the next 20 years

2009-04-21 Thread roger peppe
2009/4/21 erik quanstrom : > bundling is equivalent to running the original sequence on > the remote machine and shipping only the result back.  some > rtt latency is eliminated but i think things will still be largely > in-order because walks will act like fences.  i think the lots- > of-small-fil

Re: [9fans] Plan9 - the next 20 years

2009-04-21 Thread roger peppe
2009/4/21 erik quanstrom : >> i was trying to point out that if you try to >> ignore the issue by removing flush from the >> protocol, you'll get a system that doesn't work so smoothly. > > your failure cases seem to rely on poorly chosen tags. > i wasn't suggesting that flush be eliminated.  i was

Re: [9fans] missing ed's line numbering in sam -d

2009-04-23 Thread roger peppe
2009/4/23 erik quanstrom : > you can do this in sam with an external program ... except the line numbers won't be accurate unless you're printing lines from the beginning.

Re: [9fans] missing ed's line numbering in sam -d

2009-04-23 Thread roger peppe
2009/4/23 erik quanstrom : > left as an excercize to the reader. not possible, i think, as the external program can't know where the sam selection is coming from. easier in acme.

Re: [9fans] 9p2010

2009-04-23 Thread roger peppe
2009/4/23 erik quanstrom : > it occurred to me yesterday morning that the problem with > a bundle of 9p requests is that 9p then no longer maps directly > to system calls. > > with 9p2000, if you want to do a Tread, it's pretty clear that > one needs to read(2); traditiona syscalls map directly to

Re: [9fans] 9p2010

2009-04-23 Thread roger peppe
2009/4/23 Fco. J. Ballesteros : > But if you do that (send sequences from userl-level) > you must interpret your namespace yourself. When I tried to > detect how to bundle calls for plan b, a problem I had was > namec. For me it's still not clear how to detect cleanly > `what to batch', even if you

Re: [9fans] 9p2010

2009-04-27 Thread roger peppe
2009/4/26 Roman V. Shaposhnik : > On Thu, 2009-04-23 at 18:53 +0100, roger peppe wrote: >> i wonder how many things would break if plan 9 moved to >> a strictly name-based mapping for its mount table... > > What exactly do you mean by *strictly* ? i mean using pathnames r

Re: [9fans] just in case anyone has written this

2009-04-28 Thread roger peppe
2009/4/28 ron minnich : > On the inbound side, I need it to merge lines so that, e.g., a line from > 11.1.1.1 and 11.1.1.2 if same, gets printed as > 1-2: Mon may 8 2011 if you do this, then presumably you can't print a line from any source until you've got a line from all of them. is that what yo

Re: [9fans] just in case anyone has written this

2009-04-28 Thread roger peppe
2009/4/28 ron minnich : > On Tue, Apr 28, 2009 at 2:05 AM, roger peppe wrote: >> 2009/4/28 ron minnich : >>> On the inbound side, I need it to merge lines so that, e.g., a line from >>> 11.1.1.1 and 11.1.1.2 if same, gets printed as >>> 1-2: Mon may 8 2011 &

Re: [9fans] problems with redirection in rc

2009-05-05 Thread roger peppe
where did you put the redirection? i'd have thought that this would work ok (note the added braces): {for (i in *_r) @{cd $i; echo -n $i^' '; grep total otdit | grep -v na}} > res 2009/5/5 Rudolf Sykora : > Hello everyone! > > To get some useful information from a file I write: > > ; for (i in

Re: [9fans] problems with redirection in rc

2009-05-05 Thread roger peppe
2009/5/5 Rudolf Sykora : > So if I understand right, this is/was a plan9port related feature, right? yes. it gets around the fact that linux doesn't have per-process namespaces (well if it does, plan9port doesn't use them), so there's no easy way to have a different /dev/label for each 9term.

Re: [9fans] problems with redirection in rc

2009-05-05 Thread roger peppe
in that case, surely it'd be trivial to make a root-suid executable that allows namespace manipulation in a non-sensitive area (e.g. /mnt)? maybe it could be distributed as part of p9p meaning hacks like $NAMESPACE could go away under linux. maybe it already has been, and i'm as ignorant as usual.

Re: [9fans] command output on acme

2009-05-08 Thread roger peppe
2009/5/8 hugo rivera : > Hello, > sometimes, when I execute a few times some external commands on a > directory with multiple files on it (an external command like tail +0f > on different files that are constantly appended), it is nice to have > the output of each command on its own window, and not

Re: [9fans] simple question: multiple rename

2009-06-16 Thread roger peppe
2009/6/8 Russ Cox > On Mon, Jun 8, 2009 at 12:50 AM, Rudolf Sykora wrote: > > Hello, > > Still wonder, what's the right way to make the following work: > > The right way is > > s=`{echo $i | sed 's/(.+)_g/\1/'}. note that this won't work if the filenames contain white space. (i still regret the

Re: [9fans] Sam commands in acme

2009-06-26 Thread roger peppe
you need (.|\n) instead of . sam originally used @ as a "match everything" character but it was removed, presumably because it was rarely used. to match C comments, you need something like this: x/\/\*([^*]|\*[^\/]|[^*\/]|\n)*\*\// 2009/6/26 hugo rivera : > Hi, > I am trying to select all c com

Re: [9fans] Another acme question

2009-06-26 Thread roger peppe
2009/6/26 hugo rivera : > Hello, > I have another problem with acme. > Lets say I want to check the spelling in all the comments in a c file, > so I execute: > Edit ,x/\/\*.*\*\// > spell   (nevermind this doesn't work for more > than one line comments) > and nothing happens. this seems to be a bu

Re: [9fans] Sam commands in acme

2009-06-29 Thread roger peppe
2009/6/27 Rob Pike : > Deletion is the greatest tool of software design. yes, i always get great pleasure from deleting code. unfortunately the overall line count almost always seems to trend upwards regardless of the amount of code deleted.

Re: [9fans] Guide to using Acme effectively?

2009-07-01 Thread roger peppe
2009/7/1 Aaron W. Hsu : > I'm missing > small things, like how to select and move all the text in one window to > another in a fast manner if the amount of text in the window is relatively small, then just selecting all the text by dragging from start to end and chord cut/paste is usually fastest.

Re: [9fans] v9fs question

2009-07-14 Thread roger peppe
this is at a bit of a tangent from the previous discussion, but something i've always wondered: why does the linux 9p mount syscall bother with IP addresses at all? isn't it sufficient just to provide a facility for mounting a file descriptor (like the plan 9 syscall) and have an auxiliary command

Re: [9fans] v9fs question

2009-07-14 Thread roger peppe
2009/7/14 Tim Newsham : > The v9fs driver lets you mount from a file descriptor. > Is this what you're asking for? i was aware it allowed a mount of a file descriptor. in the interests of minimalism, i was wondering why it did anything else.

Re: [9fans] i/o on a hangup channel asymmetry

2009-07-23 Thread roger peppe
one example of this behaviour that i use all the time is: tar t < foo.tar | sed 10q just to get some idea of the contents of foo.tar. often the tar file is huge, and i won't get a command prompt back until all the elements of the pipeline have completed - whereas i want it to finish quickly. i

[9fans] vmware installation problems

2009-07-27 Thread roger peppe
i'm trying to install plan 9 under vmware (2.0.5 this time, having failed with 1.0), and it all worked fine (fossil + venti installation, 8GB disk, all defaults, rebooted fine, waited for venti to calm down, fshalt), except that when i came to reboot, i got i/o errors as it was booting - here are s

Re: [9fans] vmware installation problems

2009-07-29 Thread roger peppe
> This problem is only with plan9? yup. although it is plan9-inside-vmware, which could make a significant difference.

Re: [9fans] vmware installation problems

2009-07-29 Thread roger peppe
it's the latest version of VMWare Fusion AFAIK... 2009/7/29 Tim Newsham : >>> This problem is only with plan9? >> >> yup. >> although it is plan9-inside-vmware, which could make >> a significant difference. > > And you said VMWare 2.x, which is exceedingly old... > > Tim Newsham > http://www.thene

[9fans] ape strtod crash

2009-07-30 Thread roger peppe
this ape program gives a floating point exception error: #include void main(){ strtod("421567849e316", 0); } this made awk crash when i was running dumpvacroots. it dies at /sys/src/ape/lib/ap/stdio/strtod.c:473 but it looks a bit involved for me to dive into right now, i'm afraid.

[9fans] vmware snarf problem

2009-07-30 Thread roger peppe
continuing my litany of vmware woes: my vmware snarf buffer doesn't seem to read correctly. e.g. term% echo hello > snarf term% cat snarf term% pwd /mnt/vmware term% the data is correctly copied into the system (mac os) snarf buffer, but nothing ever comes back the other way. unfortunately the

Re: [9fans] vmware snarf problem

2009-07-30 Thread roger peppe
actually, i lied when i said that nothing ever comes out of the snarf buffer. if i copy some text externally (inside mac os), then i get it, just once, inside plan 9/vmware. reading it seems to clear it. e.g. term% cat /dev/snarf hello world term% cat /dev/snarf term% 2009/7/30 roger peppe

Re: [9fans] ape strtod crash

2009-07-30 Thread roger peppe
2009/7/30 erik quanstrom : > fixed, > > http://9fans.net/archive/2009/01/234 ok, thanks, i had a very vague memory of this, but obviously my googling was inadequate. did you submit a patch? i can't see one. i will if not - it's an annoying error. (and, as you say, why not just use the usual strt

Re: [9fans] 9p fids and references

2009-07-30 Thread roger peppe
2009/7/30 hugo rivera : > [...] there's no way two different files point to the > same data structure (but maybe two different fids do?) so reference > counting is unnecessary, am I right? no, because a file can be opened several times. when you open a file you get a new fid. so if you've got res

[9fans] detecting drawterm

2009-07-31 Thread roger peppe
i'm probably being stupid here, but what's a good robust way of detecting in $home/lib/profile that the remote connection is from drawterm, so that i can start rio etc? currently the best i've got is to check /mnt/term/sysname, but that falls down the moment i connect from a different host...

Re: [9fans] detecting drawterm

2009-07-31 Thread roger peppe
2009/7/31 Steve Simon : > Drawterm connects with service=cpu > > In the cpu clause I do this: > >        if (! test -e /mnt/term/mnt/wsys) {     # dt2k >                # cpu call from drawterm >                if (test -e /mnt/term/dev/secstore){ >                        auth/factotum -n >        

Re: [9fans] ceph

2009-08-03 Thread roger peppe
2009/8/4 ron minnich : >>  2. do we have anybody successfully managing that much storage that is >>     also spread across the nodes? And if so, what's the best practices >>     out there to make the client not worry about where does the storage >>     actually come from (IOW, any kind of proxying

[9fans] more time amusement under vmware

2009-08-03 Thread roger peppe
the time problem i was having before (fast clock) had seemed to be irreproducible. however just now, i noticed the following odd behaviour: fiddle% date -u Thu Jan 1 00:00:00 GMT 1970 fiddle% cat /dev/time 0 0 0 1 fiddle% fiddle% # wait a few

Re: [9fans] ceph

2009-08-04 Thread roger peppe
2009/8/4 erik quanstrom : >> > >> > Google? >> >> the exception that proves the rule? they emphatically >> don't go for posix semantics... > > why would purveryers of 9p give a rip about posix sematics? from ron: > 10,000 machines, working on a single app, must have access to a common > file store

Re: [9fans] ceph

2009-08-04 Thread roger peppe
2009/8/4 C H Forsyth : >>they emphatically don't go for posix semantics... > > what are "posix semantics"? perhaps wrongly, i'd assumed that the posix standard implied some semantics in defining its file API, and ron was referring to those. perhaps it defines less than i assume - i've not studied

Re: [9fans] more time amusement under vmware

2009-08-04 Thread roger peppe
2009/8/4 erik quanstrom : >> fiddle% cat /dev/time >>           0                     0                     0 >>      1 fiddle% > what's especially wrong about this is that /bin/time is supposed > to have 4 fields: it does - it just that the line wrapped. the value of the last field is 1.

Re: [9fans] more time amusement under vmware

2009-08-04 Thread roger peppe
2009/8/4 erik quanstrom : > do you have something funny bound on /dev? having said what i said - yes, i realise that a mistaken bind -b means that i was using drawterm's /dev/time, not the host system's. and, oddly, drawterm implements the time file, but doesn't bother to actually get the correct

Re: [9fans] Acme Configuration

2009-08-07 Thread roger peppe
2009/8/7 Noah Evans : > The dump doesn't preserve indent state personally, i think it should. and some other stuff as well.

Re: [9fans] Acme Configuration

2009-08-07 Thread roger peppe
't want the old dump file to be erased with a dud new one. most of this should be fairly straightforward, i've just not made space in my life to do it yet. and i doubt it would be accepted as a patch anyway. 2009/8/7 Noah Evans : > What other stuff are you thinking of? > > On

[9fans] bio from string

2009-08-12 Thread roger peppe
just to check i'm not missing something, is there a reasonable way of getting bio(2) to read from a string rather than an fd? i can think of various ways, but none are very savoury.

Re: [9fans] Thrift RPC

2009-08-13 Thread roger peppe
2009/8/13 Roman Shaposhnik : > Am I totally missing something or hasn't been the binary RPC > of that style been dead ever since SUNRPC? Hasn't the eulogy > been delivered by CORBA? Haven't folks realized that S-exprs > are really quite good for data serialization in the heterogeneous > environment

Re: [9fans] Using proportional fonts in Acme for Programming

2009-08-13 Thread roger peppe
2009/8/13 Aaron W. Hsu : > Firstly, how many of you using Acme for programming on a daily basis remap > your fonts so that the fixed width font is the main one that you use? i use proportional fonts in acme for programming. > Secondly, if you do use proportional width fonts, why, and what trouble

Re: [9fans] Thrift RPC

2009-08-13 Thread roger peppe
2009/8/13 David Leimbach : > On 8/13/09, erik quanstrom wrote: >>> we don't use te*xt for 9p, do we? >> >> the difference being, 9p is the transport not >> the representation of the data and 9p has >> a fixed set of messages. > Also 9p aims at file systems pretty obviously where Thirft is a > gene

[9fans] drawterm hangups

2009-08-18 Thread roger peppe
every so often using drawterm (mac os version) i've been getting a hangup. it's not a sudden thing - rio continues running, but first i lose keyboard input, then mouse input. it seems to be to do with one window, which was probably in rawon mode. if i get access to the rio session via another rou

Re: [9fans] drawterm hangups

2009-08-18 Thread roger peppe
2009/8/18 erik quanstrom : > wireless connection to the server? nope. the server is VMware on the same machine. the connection itself is fine (i see text appear in the rio windows when writing to their cons files, for example) i've been getting this happening once a week or so.

Re: [9fans] sed oddity

2009-08-18 Thread roger peppe
2009/8/18 Uriel : > Interesting, this reminds me of a question I had: is there any command > that would read from stdin, and write to stdout, but if there was an > error when writing to stdout it would ignore it and continue reading > stdin? It is trivial to do it in C, but don't want to require an

Re: [9fans] porting help please (gcc void pointer handling)

2009-09-09 Thread roger peppe
2009/9/9 erik quanstrom : >> gcc happily compiles a definition like >> #define CT_v249       ((void*)startLabel+464) > > no it doesn't. yes it does: % cat > x.c void *f(void *v){return v + 23;} % gcc -Wall -c x.c %

Re: [9fans] awk help; not plan9 matter

2009-09-17 Thread roger peppe
another approach, build up a regexp and use that: fn changefield { n = $1 repl = $2 s=')([^ ]+)(.*)' for(i in `{seq 1 `{echo $n 1 -p | dc}}){ s='[^ ]+[ ]+'^$s } s='('^$s sed 's/'^$s^'/\1'^$repl^'\3/' } (N.B. if

Re: [9fans] awk help; not plan9 matter

2009-09-17 Thread roger peppe
2009/9/17 erik quanstrom : > i don't know why this can't be done with sed.  if the > task is to just change the second field without messing > with whitespace, why doesn't this work indeed. i did the same thing (see previous post, except i've just noticed that i forgot the ^ at the start of the re

Re: [9fans] awk help; not plan9 matter

2009-09-17 Thread roger peppe
2009/9/17 Rudolf Sykora : > Yes, I now see yours and Roger Peppe's idea to build a regexps and then use > it. > That's true. > Only as I look at your code, not sure if it can stand possible spaces > at the beginning of a line, like >     1 2     3 just change the regexp as required.

Re: [9fans] 9vx (is this the right list)? import issue

2009-09-22 Thread roger peppe
2009/9/22 ron minnich : > So, basically, the way I see it is, grep proc gets an interrupt, > kernel will try to flush RPCs which we initiated, we drop the (we > think) flushed rpc struct onto the rpcfree list, but the reply from > the server is still in flight. We reuse the rpc from rpcfree list, w

Re: [9fans] 9vx (is this the right list)? import issue

2009-09-22 Thread roger peppe
2009/9/22 ron minnich : > On Tue, Sep 22, 2009 at 11:35 AM, roger peppe wrote: > >> surely the correct way to go about this (caveat: i haven't looked at the >> code) >> is to drop the rpc struct onto the rpcfree list only when the Rflush is >> received? > &g

Re: [9fans] 9vx (is this the right list)? import issue

2009-09-22 Thread roger peppe
2009/9/22 erik quanstrom : >> if it's ambiguous, then the tag should indeed be put on hold, >> because there's no way to get it right. > > how do we prevent all tags from being on hold? > there's no way to get that right, either. well, it's legal to send several flushes for the same tag, and it's

Re: [9fans] handling output

2009-10-01 Thread roger peppe
2009/10/1 hugo rivera : > I've been wondering for a while if there's some way to multiplex (if > this is the correct term) stdout for a given program: that's what tee does. e.g. ls | tee >{grep regexp1 > file1} >{grep regexp2 > file2}

Re: [9fans] inferno from hg does not build out of the box

2009-10-02 Thread roger peppe
2009/10/2 Sam Watkins : > could be removed if anyone fixes hg. from the way the mercurial guys go on about it, it sounds like the fix might not be trivial. it does seem like a ridiculous thing, but it seems to be something of a religious issue with them. hg doesn't do permissions (other than exec

Re: [9fans] mishandling empty lists - let's fix it

2009-10-05 Thread roger peppe
2009/10/5 John Stalker : > But you can use regular expressions instead of goofy shell > matching.  Find and ls give you lists of file names and grep > prunes them for you.  Shell command substitution then puts > them in the right place in the command, or use xargs when > appropriate.  I don't claim

Re: [9fans] iwp9: getting from Atlanta to Athens

2009-10-06 Thread roger peppe
i'm arriving Atlanta 19:10 on the 20th, leaving 21:45 on the 25th in case anyone has similar times and wishes to share. i'd be up for driving, assuming my UK driving license is sufficient. cheers, rog. 2009/10/6 Iruata Souza : > On Tue, Oct 6, 2009 at 12:19 PM, erik quanstrom wrote: >>> >>

Re: [9fans] mishandling empty lists - let's fix it

2009-10-07 Thread roger peppe
2009/10/7 John Stalker : > Rm is, I think, an example of someone who simply wasn't thinking > properly.  In > >        rm `{ complicated pipeline } > > I almost certainly want the exit status to reflect whether all the > selected files were deleted, even if there weren't any, so I want > rm without

Re: [9fans] Barrelfish

2009-10-15 Thread roger peppe
BTW it seems the gates quote is false: http://en.wikiquote.org/wiki/Bill_Gates

Re: [9fans] fmt(1) standard behaviour

2009-10-19 Thread roger peppe
the reason is that the algorithm is simpler if fmt reads all the words and then formats them. if you could modify the source in a simple way to make it incremental (for instance by flushing the words at the end of each paragraph) i imagine the patch might be accepted. 2009/10/18 Rudolf Sykora : >

Re: [9fans] utf-8 text files from httpd

2009-10-19 Thread roger peppe
there's another problem with file -m that i've been bitten by before: it ignores any stuff after the first 6000 bytes. so if you've got a mostly-ascii file with some utf-8 characters 8K in, then it won't be picked up. i think file -m should read the whole file, but that's just IMHO.

Re: [9fans] utf-8 text files from httpd

2009-10-19 Thread roger peppe
2009/10/19 erik quanstrom : > why try that hard?  just call it utf-8.  i can't think of > any browsers that would have a problem with that today. the instance of the problem that i had was when adding an attachment to a upas mail. file -m is useful when the attachment might be binary.

Re: [9fans] So quiet!

2009-10-24 Thread roger peppe
2009/10/23 W B Hacker : > We can't 'ave two 9'ers actually *agree* on sumat! i found it interesting that face to face there seemed to be much more agreement than disagreement. very constructive. i've had a brilliant time.

[9fans] env size limit

2009-10-27 Thread roger peppe
the environment variable size limit is set to 16300 bytes which seems rather small; for instance it can break mkfiles for large projects. might a patch specifying a larger size limit (e.g. 128K) be accepted?

Re: [9fans] env size limit

2009-10-27 Thread roger peppe
yes. for instance when there are a few thousand source files and one wants to link them all. 2009/10/27 erik quanstrom : > On Tue Oct 27 12:52:52 EDT 2009, rogpe...@gmail.com wrote: >> the environment variable size limit is set to 16300 bytes which >> seems rather small; for instance it can break

Re: [9fans] Pictures from IWP9?

2009-11-02 Thread roger peppe
2009/11/2 Jonas A : > Does anyone have pictures from the workshop? > I brought my camera but it seams that I did not > make so many photos anyhow. here are some photos i took during "extra-curricular activities" at iwp9. i realise that there are probably some photos that some might consider deeply

Re: [9fans] Announcing ninefs for win32

2009-11-05 Thread roger peppe
cool. this is potentially a big deal if it works ok... 2009/11/5 Tim Newsham : > I'd like to announce ninefs for win32.  This is a Dokan > based 9p filesystem driver for win32 systems built with > npfs.  This is an early release intended for the bolder > user.  I've set up a mailing list for the p

Re: [9fans] Go

2009-11-11 Thread roger peppe
the thing i think i'd miss most moving from limbo is discriminated unions. what would a go-friendly way of describing, say, a 9p message look like? i suppose you could just type-switch, but then you still lose the nice statically declared aspect of an algebraic type.

Re: [9fans] environment variables

2009-11-24 Thread roger peppe
2009/11/23 Rudolf Sykora : > Hello, > > If I have an rc script and I don't specify any rfork in it, then the > namespace and the environment should be shared. > So, having an 'a' script > > #!/bin/rc > a = hello > cd c   #later on... > > and a 'b' script: > > #!/bin/rc > a > echo $a > > and running

Re: [9fans] environment variables

2009-11-25 Thread roger peppe
generally, the correct answer is: don't do that. it's better to treat subshells as if they exist in a different scope, even if the environment group isn't forked. if you want to get values back from a script, send them in its stdout. 2009/11/24 Rudolf Sykora : >> the easy (and correct) answer is

[9fans] rc bug?

2009-11-26 Thread roger peppe
this seems to be a good day for me to be finding old bugs. i don't think these two bits of rc should behave any differently: % rc -c 'echo hello > /fd/4' <>[4] /dev/cons hello % {echo hello > /fd/4} <>[4] /dev/cons /fd/4: rc: can't open: '/fd/4' inappropriate use of fd % as it happens, the actua

Re: [9fans] grëp (rhymes with creep) and cptmp

2009-11-30 Thread roger peppe
now just some handling of combining characters to do :-)

Re: [9fans] grëp (rhymes with creep) and cptmp

2009-11-30 Thread roger peppe
2009/11/30 erik quanstrom : > i used unfold (/n/sources/contrib/quanstro/runetype/unfold.c. % 8c -I ../grepfold unfold.c unfold.c:5 8c: 'utfunfold.h' file does not exist: utfunfold.h % du -a /n/sources/contrib/quanstro | grep utfunfold.h % forgive me for not reading the source code, but what does

Re: [9fans] grëp (rhymes with creep) and cptmp

2009-11-30 Thread roger peppe
2009/11/30 erik quanstrom : > utfunfold is generated from the utf tables.  copy the > whole directory and mk. i would if i could. % pwd /n/sources/contrib/quanstro/runetype % cat mkfile cat: can't open mkfile: 'mkfile' permission denied % ls -l | grep -- - --rw--- M 5961 quanstro sys 14

Re: [9fans] ideas for helpful system io functions

2009-12-07 Thread roger peppe
2009/12/5 Bakul Shah : >       int newfd = fdfork(oldfd); i'm not sure that there needs to be a new syscall to enable this. a driver would be adequate. here's one possibility: the driver implements "buffered streams" - i.e. reads are lazy, but previous reads can be re-read. bind '#β4.8192' /mnt

Re: [9fans] ideas for helpful system io functions

2009-12-07 Thread roger peppe
2009/12/7 Mechiel Lukkien : > i've attached devbuf.c and devjoin.c, as example (for inferno). [saw this just after i'd posted] that's funny - you even chose the same device character for devbuf! to be honest, your devbuf.c is almost synomous with a pipe. for buffer sizes of <64K, writes on a pipe

Re: [9fans] ideas for helpful system io functions

2009-12-07 Thread roger peppe
2009/12/7 Sam Watkins : > I meant for example if a process is reading from its stdin a open file 'A' and > writing to stdout the input of a pipe 'B', rather than looping and forwarding > data it may simply "join" these two fds, and exit.  The OS will then do what > is > necessary to make sure the

  1   2   3   >