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

2009-03-17 Thread Russ Cox
On Tue, Mar 17, 2009 at 5:26 PM, Uriel wrote: > Unfortunately that doesn't work in this case, my input is HTTP post > data, which is a single line of URL-encoded text which I have to > decode into multiple parameters of arbitrary length. writing a shell script doesn't mean you have to write every

Re: [9fans] I can not remember if I sent this or not: MIPS-64 (sort of) notebook

2009-03-20 Thread Russ Cox
ron is suggesting is that with minimal effort the plan 9 kernel could be made to compile using gcc instead of the standard plan 9 compilers. he's right. erik's point is that once you have a kernel up, you still need to give it executables to run. this either requires porting the standard compilers

Re: [9fans] kernel tag bug?

2009-03-24 Thread Russ Cox
On Tue, Mar 24, 2009 at 10:59 AM, erik quanstrom wrote: > it looks like devcons is suffering from some sort of tag collision. > a Rwrite is coming back for a Tread. > > Sat Jan 24 09:43:47: mnt: proc rc 10946: mismatch from /mnt/temp/data > /dev/cons rep 0xf63661a8 tag 1 fid 1170 T116 R119 rp 1 >

Re: [9fans] drawterm font

2009-03-24 Thread Russ Cox
On Tue, Mar 24, 2009 at 12:35 PM, Benjamin Huntsman wrote: > Not a big issue, but is it possible to change the default font in drawterm? no; the bitmaps for the ascii characters are embedded in the drawterm binary. you could perhaps arrange to build a different binary but it is easier to use rio

Re: [9fans] kernel tag bug?

2009-03-24 Thread Russ Cox
> doesn't the kernel get credit either way?  either > it's the source (devmnt) or the server (devcons). > am i missing something? if devmnt is involved, devcons is not. it is some 9P server mounted on /dev/cons, not the kernel's devcons. russ

Re: [9fans] rc output redirection

2009-04-02 Thread Russ Cox
> But when you do something like > cmd1 | cmd2 |[2] cmd3 > you get cmd1's stdout piped to cmd2's stdin; but my confusion begins > here: is it cmd1's or cmd2's stderr that gets redirected to cmd3's > stdin? maybe both? my guess is that ... why guess? % {echo cmd1 >[1=2]} | {echo cmd2 >[1=2]} | sed

Re: [9fans] self inflicted gunshot wound

2009-04-07 Thread Russ Cox
> abort()+0x0 /sys/src/libc/9sys/abort.c:6 > plumbpackattr(attr=0x28b00)+0x126 /sys/src/libplumb/mesg.c:125 >n=0x93 >a=0x3e990 >s=0x3a430 >t=0x3a497 t is unlikely to be correct here; it would have been saved at the last call to strlen but since then got +='ed with t

Re: [9fans] self inflicted gunshot wound

2009-04-07 Thread Russ Cox
> acid: *(*plumbpackattr:s\s) > filetype=mail sender=x...@.xxx length=8749 mailtype=delete > date='Sun Mar4de7153cecd4a9b45aead1clfs > digest=aff98fb56526d94ab768adbc93d12d989a11ed53 > several were waiting on something else to happen; they were > sleeping waiting for an exclusive-open file.  t

Re: [9fans] exportfs security question

2009-04-11 Thread Russ Cox
>    /* exchange random numbers */ >    srand(truerand()); >    for(i = 0; i < 4; i++) >      key[i+12] = rand(); if one really cared, the right thing to do would be fastrand() calls. truerand is only for things that absolutely must be random (not pseudo-random) or for seeding random number gener

Re: [9fans] noweb and literal programming

2009-04-11 Thread Russ Cox
Noweb has a nice simple interface (if literate programming is what you want) and runs on Plan 9. It's somewhere: I'm sure if you dig around you can find it. Maybe it's in /n/sources/extra. I used it quite a bit with latex. I don't remember whether I ever used it with troff. Russ

Re: [9fans] extensions of "interest"

2009-04-11 Thread Russ Cox
> I still can't figure what "typestr" does in the C compiler! right on schedule! http://9fans.net/archive/2001/05/482 (may 31 2001) http://9fans.net/archive/2005/05/69 (may 7 2005) russ

Re: [9fans] sources browser script?

2009-04-16 Thread Russ Cox
On Fri, Apr 17, 2009 at 4:12 AM, Skip Tavakkolian <9...@9netics.com> wrote: > i think it's a different thing. yes > there's an old thread where ehg > mentions it a filtering fs based on exportfs. that's yet another different thing. the sources pages are internally rewritten into /magic/somethin

Re: [9fans] security questions

2009-04-16 Thread Russ Cox
> That said, I don't disagree. Perhaps Plan 9's environment hasn't been > assumed to contain malicious users. Which brings up the question: Can > Plan 9 be safely run in a potentially malicious environment?  Based on > this argument, no, it cannot. Since I want to run Plan 9 in this sort > of envir

Re: [9fans] automatic page sharing

2009-04-28 Thread Russ Cox
> Assuming statically linked-in libraries are properly aligned, > we'll have lots of equal pages in the system, so the kernel could > find and automatically map them together. This is not true. When static libraries are linked into a target binary, only the necessary objects are taken, and all th

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

2009-04-28 Thread Russ Cox
On Fri, Apr 24, 2009 at 1:03 AM, Rudolf Sykora wrote: > when using 'sam -d' to remotely edit files I really miss the option to > print line numbers along with lines, like ed's e.g. '1,10n'. > > Is there anything like that? Why not? no. because for remotely editing files, you're supposed to use s

Re: [9fans] wrarenas

2009-04-28 Thread Russ Cox
rdarenas reads directly from disk. wrarenas writes to venti, which means all of the network and seek overhead. 36 hours is too long, but it definitely isn't going to run at disk speeds. it sounds like your bloom filter wasn't doing anything useful. russ

Re: [9fans] Borderless rio

2009-04-28 Thread Russ Cox
> I also have a question. I'm running this script to open rio with workspaces : > %vx ; cat bin/rc/riows > #!/bin/rc > > labels=$* > if(test $#labels -lt 1) >        labels=(1 2 3 4) > > rio.b -I -i'\ >        for(label in $labels) >                window -miny 40 ''rio -i label ''$label'''

Re: [9fans] 9vx

2009-04-30 Thread Russ Cox
the current 9vx tree builds and runs fine using ubuntu on x86-64: c2=; cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=8.10 DISTRIB_CODENAME=intrepid DISTRIB_DESCRIPTION="Ubuntu 8.10" c2=; uname -a Linux c2 2.6.27-9-generic #1 SMP Thu Nov 20 22:15:32 UTC 2008 x86_64 GNU/Linux c2=; the tree

Re: [9fans] ssh v2, using a remote linux server

2009-05-03 Thread Russ Cox
> 2) > More generally: > I use a powerful linux machine for doing some havier calculations. I > have no possibility of changing anything serious on that computer > (like that it could serve ssh v1), I am just an ordinary user. So far > I usually do the programming on my 'local' linux computer using

Re: [9fans] problems with redirection in rc

2009-05-05 Thread Russ Cox
On Tue, May 5, 2009 at 6:29 AM, Rudolf Sykora wrote: > Hello everyone! > > To get some useful information from a file I write: > > ; for (i in *_r) @{cd $i; echo -n $i^'  '; grep total otdit | grep -v na} > > to get lines from the 'otdit' files in *_r subdirectories with the > word 'total' on them

Re: [9fans] problems with redirection in rc

2009-05-05 Thread Russ Cox
On Tue, May 5, 2009 at 8:44 AM, roger peppe wrote: > 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 li

Re: [9fans] command output on acme

2009-05-08 Thread Russ Cox
win takes a command to run as an argument. win tail -f yourfile would be almost exactly what you want. You'd just delete the window when you're done watching. The only problem is that on Plan 9, Del in the new window doesn't send a "hangup" note to tail, but it should. % diff -c /n/sources/plan

Re: [9fans] auto reconnect for cpu servers

2009-05-12 Thread Russ Cox
On Tue, May 12, 2009 at 11:43 AM, Steve Simon wrote: > Is there a technique or program that can be used on a diskless > cpu server to make it auto-reconnect when the file server reboots? > > I remember reading about the Challange file servers at the labs, > in which (I believe) the cyclone driver

Re: [9fans] P9P on Lemote Yeeloong

2009-05-13 Thread Russ Cox
I don't know that p9p has ever been built on a MIPS machine, so you might run into more problems after this one. You are almost certainly running Linux 2.6 so you shouldn't need to edit u.h -- it should be using pthreads already. You probably need to edit src/libthread/sysofiles.sh to add a case

Re: [9fans] Permission Problem with p9p vnfs

2009-05-14 Thread Russ Cox
On Thu, May 14, 2009 at 3:06 AM, Matthias Teege wrote: > Moin, > > I run "vnfs -L -i -b16k -c1k venti.score" on linux and mount it with > "vmount 127.0.0.1 /dump". If I try to access a private file as root I've > got "permission denied". You need to edit src/libdiskfs/*.c to change the access rou

Re: [9fans] aux/acidleak pool pathology

2009-05-21 Thread Russ Cox
> obviously the Brdline loop in main is reallocating data and block > so they don't fit in their previous buckets and pool sbrk's more > memory.  it would seem that pool is missing the fact that It's probably a combination of data and block growing together along with the occasional estrdup that i

Re: [9fans] aux/acidleak pool pathology

2009-05-21 Thread Russ Cox
On Thu, May 21, 2009 at 9:54 AM, erik quanstrom wrote: > On Thu May 21 12:39:00 EDT 2009, r...@swtch.com wrote: >> > obviously the Brdline loop in main is reallocating data and block >> > so they don't fit in their previous buckets and pool sbrk's more >> > memory.  it would seem that pool is miss

Re: [9fans] aux/acidleak pool pathology

2009-05-21 Thread Russ Cox
> even after changing to a power-of-two allocation and starting > with 8k items, aux/acidleak still takes 400mb on a 40mb proc > with only 155278 bytes actually allocated (in the target process). > > is the a chance that pool is not packing the small > allocations together well? i wouldn't judge p

Re: [9fans] acme --- undo/redo in a win window

2009-05-28 Thread Russ Cox
On Thu, May 28, 2009 at 12:37 PM, Rudolf Sykora wrote: > it is somehow unclear to me, what happens in a 'win' window when I > 2-click 'Undo' or 'Redo' (I write it somewhere manually). Are some > commands processed again? (I happened to delete some text from the > window and thus had the idea to wr

Re: [9fans] eqn and unicode

2009-05-28 Thread Russ Cox
On Thu, May 28, 2009 at 4:08 AM, Gregory Pavelcak wrote: > If you write the eqn-word for a greek letter, "GAMMA" for > example; eqn passes the unicode character (the output of > Alt-*G) to troff. If, on the other hand, you type Alt-*G in eqn, > it passes `"\f2Γ\fP' to troff, thus producing, by my

Re: [9fans] acme: dirty state after 1-2, 1-3 click in a tag line

2009-05-29 Thread Russ Cox
The behavior is useful if the command is mk instead of win. You can run mk and it says mk in the top left until mk finishes and then it goes away. If you don't like seeing the win win win in the top corner, you can always edit the text yourself. Russ

Re: [9fans] plan 9 regexp

2009-06-03 Thread Russ Cox
? is useful when it's not at the end of the pattern. grep 'utf-?8' is shorter than grep 'utf8|utf-8'. russ

Re: [9fans] Drawterm /mnt/term permissions issue

2009-06-04 Thread Russ Cox
On Thu, Jun 4, 2009 at 4:58 PM, Ethan Grammatikidis wrote: > I run a plan 9 cpu server in Qemu and use drawterm to connect from the Linux > host. > I thought the /mnt/term mechanism would be very convenient for exchanging > files > between host & guest, but the guest sees all user/group names as

Re: [9fans] plan 9 regexp

2009-06-07 Thread Russ Cox
> I'm sure.  This is something that I would be interested in revisiting; > do you have any pointers to particularly relevant information?  I > wonder how nicely these tree automata could be packaged into an > awk-like form. In addition to what others have suggested, look up [tree regular expressio

Re: [9fans] simple question: multiple rename

2009-06-08 Thread 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/'}. > s = `{sam -d <[2] /dev/null >        1s/(.+)_g/\1 >        p >        EOF >       } If you must use sam, the righ

Re: [9fans] acme: send dot to the stdin of a more complicated command

2009-06-08 Thread Russ Cox
> well, though an inspiring idea, it doesn't sound to be much practical: > 1) I usually have a special window in which I have many commands. I > then select the one needed and chord it to the appropriate window > (i.e. I don't use the whole contents of a window). > 2) sometimes I have more such win

Re: [9fans] plan9port acme can't load dump file with shell output of "9p read plumb/rules"?

2009-06-08 Thread Russ Cox
Fixed. http://hg.pdos.csail.mit.edu/hg/plan9/rev/fb3ce7f4b2d1 Russ

Re: [9fans] plan9port acme can't load dump file with shell output of "9p read plumb/rules"?

2009-06-08 Thread Russ Cox
On Mon, Jun 8, 2009 at 8:19 PM, Jason Catena wrote: > Applied fix locally, works like a champ.  Thanks!  Now I should > probably set up hg to get updates without patching it myself. If you downloaded the archive and extracted it, you can always use "cvs up -dAP" instead of hg. I keep the two in sy

Re: [9fans] plan9port acme can't load dump file with shell output of "9p read plumb/rules"?

2009-06-08 Thread Russ Cox
> Thanks, but already cloned with hg, compiled, and verified it doesn't fail. > > Actually prefer a more advanced VC tool.  I'm a big SCM geek, used > ClearCase for past 15 years. Out of curiosity, why Mercurial over Git? >  Don't know either well enough to judge. A few years ago, when I made the

Re: [9fans] critique of sockets API

2009-06-09 Thread Russ Cox
> * performance overhead: app requesting data from a socket typically needs to > perform 2 system calls (select/read or alt/read) * lack of an "kernel > up-call API": which allows the kernel to inform an app each time network > data is available there is a mechanism. user programs call read(2). wh

Re: [9fans] acme: 2-1chord on Edit in a 'win window' tag doesn't work

2009-06-10 Thread Russ Cox
> In some acme window I have a command, e.g simply s/f/g/, I select it > with a mouse and 2-1 chord it on the Edit command in a tag line of a > window in which there is win running and also some text (for us e.g. > abcdefgh) is selected. Nothing happens. Only when the s/f/g/ is copied > in the tag

Re: [9fans] interface for per process gdt manipulation

2009-06-15 Thread Russ Cox
i haven't looked at your code, but a text interface is better than binary. if you make the first field the table index number, then you don't need to bother with seeking to fixed offsets. design a text format that is convenient to use instead of forcing the binary interface on everyone. also i wo

Re: [9fans] interface for per process gdt manipulation

2009-06-15 Thread Russ Cox
On Mon, Jun 15, 2009 at 10:37 PM, wrote: >> i haven't looked at your code, >> but a text interface is better than binary. >> if you make the first field the table index number, >> then you don't need to bother with seeking >> to fixed offsets.  design a text format that is >> convenient to use ins

Re: [9fans] simple question: multiple rename

2009-06-16 Thread Russ Cox
the easiest thing to do is not use spaces in your file names, even if others do in theirs. most people take that approach, even on unix, and it works fine. if you are worried about names with spaces and want to make a script more robust, then the simplest option is to set ifs=' ' while you are man

Re: [9fans] error while building p9p

2009-06-16 Thread Russ Cox
On Tue, Jun 16, 2009 at 6:53 AM, Jeff Sickel wrote: > vcat.c and one other file haven't had the venti API updates applied. fixed, sorry for the delay. russ

[9fans] plan9port OS X window labels

2009-06-16 Thread Russ Cox
I fixed a bug in plan9port's OS X window label handling the other day, so that 9term windows will update their labels properly in response to awd. Unfortunately it seems that the label update must be done inside the application event loop, but it originates outside the event loop. For now I have m

Re: [9fans] plan9port OS X window labels

2009-06-17 Thread Russ Cox
> label has changed.  However, I could not get this > to work.  Perhaps there are Carbon experts here > who will have better luck. > > http://hg.pdos.csail.mit.edu/hg/plan9/rev/12502ec69b95 Fixed, thanks to André Günther. Russ

Re: [9fans] acme programming questions

2009-06-18 Thread Russ Cox
In plan9port there is a libacme and which makes some of this easier. It is basically a wrapping of the routines from acme Mail. Using libacme, your event waiter can do something like this to send the events back: while(winreadevent(w, e) > 0) { switch(e->c1){

Re: [9fans] fossil/venti falling down?

2009-06-25 Thread Russ Cox
On Wed, Jun 24, 2009 at 5:59 PM, erik quanstrom wrote: >> /boot/fossil: cacheLocalData: addr=155039 type got 0 exp 0: tag got >> 19383bf exp 11383bf >> /boot/fossil: cacheLocalData: addr=155167 type got 0 exp 0: tag got >> 19383bf exp 11383bf > > am i wrong in thinking that it would be an error to

Re: [9fans] fossil/venti falling down?

2009-06-25 Thread Russ Cox
> it's even neater to use a raid level that doesn't require venti > intervention. agreed. > does venti even keep scores on the bloom filter blocks and the icache? no, but those are soft data and can be reconstructed. russ

Re: [9fans] fossil/venti falling down?

2009-06-25 Thread Russ Cox
On Thu, Jun 25, 2009 at 9:24 AM, erik quanstrom wrote: >> > does venti even keep scores on the bloom filter blocks and the icache? >> >> no, but those are soft data and can be reconstructed. > > being the paranoid type, i worry about this.  does the > rebuild rate on a large (say, 1tb) venti make t

Re: [9fans] p9p acme: incredibly slow typing in tag line for file.

2009-06-29 Thread Russ Cox
The file tags tend to get redrawn in full after every change rather than incrementally like the body does. It has to do with the tag resize calculations, which I haven't gotten quite right. That said, you should be able to redraw the tag more than once per second. Is this with a remote X or some

Re: [9fans] when to use vac -q -d old.vac instead of simply vac -d old.vac

2009-06-29 Thread Russ Cox
On Sun, Jun 28, 2009 at 6:13 PM, Fernan Bolando wrote: > man vac > "-q    Increase the performance of the -a or -d options by detecting > unchanged files based on a >        match of the files name and other meta data, rather than > examining the contents of the files" > > Why is -q not a default?

Re: [9fans] confusing astro output

2009-06-29 Thread Russ Cox
On Mon, Jun 15, 2009 at 11:33 AM, erik quanstrom wrote: > i ran astro -k a 3 times, a few minutes apart > on the same machine.  the results are suprising > > The sun sets at 20:47:50 EDT > The sun sets at 20:47:49 EDT > The sun sets at 20:47:43 EDT > > Comet rises at 23:02:57 EDT > Comet rises at 2

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

2009-07-01 Thread Russ Cox
Arguing about mouse vs keyboard misses the point. I'm very happy with acme's use of the mouse, but acme's power comes from the rest of its design. Russ

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

2009-07-01 Thread Russ Cox
[Revised to correct filename in cat command, sorry] On a Mac: mkdir -p $HOME/Library/KeyBindings cat >$HOME/Library/KeyBindings/DefaultKeyBinding.dict <

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

2009-07-01 Thread Russ Cox
> Anyway, hope people finds it useful, and please send me any extra info > on how to implement/configure/restore the standard Unix behavior in > any other environments and apps. On a Mac: mkdir -p $HOME/Library/KeyBindings cat >$HOME/Library/KeyBindings < P.S.: I even recently wrote a Google Chro

Re: [9fans] Joining multicolumn files

2009-07-02 Thread Russ Cox
#!/bin/rc awk 'BEGIN{ for(;;){ $0=""; ok=getline

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

2009-07-02 Thread Russ Cox
> Neat.  If you could make the tab key actually generate > a tab character, that would be fantastic. I'm apparently not the only one. Firefox extension: https://addons.mozilla.org/en-US/firefox/addon/3955 Russ

Re: [9fans] troff and ps related

2009-07-08 Thread Russ Cox
On Wed, Jul 8, 2009 at 4:49 AM, Rudolf Sykora wrote: > can anybody tell me why whatever .ps about troff/eqn I print has > misplaced lines? > E.g. quite generally, lines that make up tables either don't touch, or > stick out somewhere... this is because tbl is using characters to draw lines. it's n

Re: [9fans] troff and ps related

2009-07-08 Thread Russ Cox
I assume you have a non-Plan 9 machine to play with. It's worth trying Heirloom troff there to see if the boxes are done better. They probably are. It would be a big integration effort to fit the Heirloom troff changes into the Plan 9 troff changes. Maybe it is worth it; maybe not. I like Heirl

Re: [9fans] Fonts

2009-07-08 Thread Russ Cox
This conversation reminded me that I have been meaning to clean up a program I wrote a while back and integrate it into plan9port. It generates Plan 9 bitmap fonts on demand using the native window system fonts. Right now it only works on OS X. I would gladly accept X11 support and OS X bug fixes

Re: [9fans] Announcing: iosrv for persistent rc sessions and 9gridchan.org

2009-07-10 Thread Russ Cox
iosrv sounds neat. if you want a challenge, i would like to see the gui version, something along the lines of inferno's drawmux, which would be more work but also more broadly applicable. http://www.vitanuova.com/inferno/man/2/drawmux.html russ

Re: [9fans] what does #pragma fpround do?

2009-07-12 Thread Russ Cox
> generates the same output and same assembly > for both casts.  can anyone explain what this pragma > is supposed to do? it changes the rounding mode from the standard truncate to integer (expensive on a 387) to round to nearest (incorrect but cheap). #pragma fpround on pri

Re: [9fans] building plan9port: arch spec, arm vs armv5tel

2009-07-13 Thread Russ Cox
+plan9port-dev bcc: 9fans I have just created a mailing list for these questions. It is not documented anywhere yet - yours is the first. I would have called the mailing list plan9port-help but apparently -help is not a valid mailing list suffix. plan9port-...@googlegroups.com There is also an is

Re: [9fans] C compiler question

2009-07-13 Thread Russ Cox
> Yes, but in my example - sorry - "NeverDefined" doesn't mean "declared and > defined elsewhere (or not)" but "not declared .and. not defined". no and yes. union U { struct { struct NeverDefined nf; // Unknown, definition not #included } S1 }; declares a struct name

Re: [9fans] C compiler question

2009-07-14 Thread Russ Cox
enough. there was a bug, plain and simple. struct T { struct S s; }; is not valid. never was, never will be. fix the compiler already. russ

[9fans] Fwd: p9p acme: incredibly slow typing in tag line for file.

2009-07-14 Thread Russ Cox
cme?  I don't actually know the source code base that well, but it seems like it would help narrow things down if writes to the tag file showed up faster than input from the display. Jason Catena -- From: Russ Cox Date: Mon, Jun 29, 2009 at 8:46 AM To: Fans of the OS Plan 9 from Bell L

Re: [9fans] building plan9port: arch spec, arm vs armv5tel

2009-07-14 Thread Russ Cox
> Should we put patches here, too? Yes. I'd like plan9port-dev to have all the discussion of plan9port development and problems. There's a different story for patches that is still not quite complete, but it's a start. Look for upload.py in http://groups.google.com/group/plan9port-dev/t/a1b7f012

Re: [9fans] naive acid debugging

2009-07-15 Thread Russ Cox
>>               print("f->mb=", f->mb\X,"       =?      mb=",mb\X,"\n"); >>               f=f->next; Always use . (never ->) in acid. If f is a pointer, then the acid expression f.mb is like the C expression (*f).mb aka f->mb. The acid expression f->mb is like the C expression (**f).mb. By using

Re: [9fans] Fonts

2009-07-15 Thread Russ Cox
On Wed, Jul 15, 2009 at 2:01 PM, David Leimbach wrote: > Just tried this from the mercurial snapshot from last night. > fontsrv appears to work but complains about fuse not being set up properly. > Does this mean acme is not going to work? > Should I be asking this on the plan9port mailing list? N

Re: [9fans] git on plan9

2009-07-15 Thread Russ Cox
On Wed, Jul 15, 2009 at 3:38 PM, wrote: > Thats good to hear HG is working well, I am really hoping for git > as it is hosting my current repo of works.  If git does not exist > and there is no plan to do it in the future I can migrate over my > stuff (i'd prefer to do actual new work than porting

Re: [9fans] git on plan9

2009-07-15 Thread Russ Cox
> does the git extension *require* bookmarks? yes. and it wouldn't surprise me if the extension uses API functions new since 1.0.2. if you're going to bother bringing in a new version, you might as well pull in 1.3. but 1.2 would have worked. russ

Re: [9fans] git on plan9

2009-07-17 Thread Russ Cox
You don't need mmap to implement this mmap. If it's just trying to map files into memory read-only, you could implement it by open, stat to find length, malloc, readn, and return the pointer. This is what the original linuxemu did (and still does?). Russ

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

2009-07-20 Thread Russ Cox
The programs that know about the signal are not the programs that need to be worried about. I'm much more worried about making sure that commands like grep pattern /n/dump/slow/slow/sys/log/mail | sed 5q stop as early as possible. The note is nice precisely because it doesn't involve editing the

Re: [9fans] arenas00: indexing 1455 clumps...

2009-07-21 Thread Russ Cox
On Tue, Jul 21, 2009 at 7:20 PM, Corey wrote: > I was booted into my cpu/auth server's terminal; then pressed ctrl-p by > accident in a rio window; which caused the machine to immediately reboot - > and now it gets to particular point and (seemingly) hangs at: > > sync...2009/0722 02:04:58 arenas00

Re: [9fans] p9p threadpin() / threadunpin() ?

2009-07-24 Thread Russ Cox
On Wed, Jul 22, 2009 at 9:04 PM, Venkatesh Srinivas wrote: > I noticed that p9p has threadpin() and threadunpin() in its thread > library... they claim to make the current thread the only one runnable > in this proc. I'm failing to see the purpose of these... a thread is > not subject to preemptive

Re: [9fans] fun proto bug

2009-07-25 Thread Russ Cox
On Sat, Jul 25, 2009 at 9:29 AM, erik quanstrom wrote: > i apologize for not hunting this down, but i don't want to > get diverted from hunting other bugs right now. > > ; cat /tmp/allproto > + > ; disk/mk9660 -9cj -b bootdisk.img -p /tmp/allproto /tmp/9atom2.iso > warning: proto lists rc/bin/kill

Re: [9fans] p9p vac troubles, possible fix and questions?

2009-07-26 Thread Russ Cox
Fixed in http://code.swtch.com/plan9port/changeset/c9f799b3ad09/ Thanks.

Re: [9fans] how to fix: 'arena arenas00 creation time after last write time'

2009-07-27 Thread Russ Cox
On Sun, Jul 26, 2009 at 6:03 PM, Corey wrote: > The following is being printed to the console non-stop: > err 2: arena arenas00 creation time after last write time > arena arenas00: header is out-of-date > Apparently my clock/date was set a day ahead when I installed the terminal. > > How do I corr

Re: [9fans] Using Acme as an external Editor

2009-07-27 Thread Russ Cox
On Mon, Jul 27, 2009 at 11:06 AM, Tim Newsham wrote: >> Is there some idiom or method for using Acme as an external editor to some >> other program? Say I want to use it as the editor that is spawned when I do >> a CVS commit to a system; how would I do this, or can this even be done? I'm >> using

Re: [9fans] how to fix: 'arena arenas00 creation time after last write time'

2009-07-28 Thread Russ Cox
I don't think we need to debate the exact semantics of time on Plan 9 in order to figure this out. It's easy to believe that the installer and the main distribution end up with different time settings, no matter what the exact details are. The right fix is probably to comment out the print in ven

Re: [9fans] how to fix: 'arena arenas00 creation time after last write time'

2009-07-28 Thread Russ Cox
On Tue, Jul 28, 2009 at 3:16 PM, erik quanstrom wrote: > ignoring little bugs is the path to ruin. That's why the print should just go away entirely. The code assumes that the time from one boot to the next only ever increases, which has been demonstrated not to be true. Maybe during one boot you

Re: [9fans] how to fix: 'arena arenas00 creation time after last write time'

2009-07-29 Thread Russ Cox
> The problem isn't confined to unnecessary warning messages > being printed. > > What about the 'arena arenas00: header is out-of-date' error, > and the subsequent re-indexing (on every reboot) which occurs > as a result of the condition? Despite the mention of "date" in the message, the logic be

Re: [9fans] 9p question

2009-07-30 Thread Russ Cox
On Thu, Jul 30, 2009 at 8:28 AM, Venkatesh Srinivas wrote: > How come you can't TWalk along an open Fid? In the original 9P protocol, that didn't make sense, because walk always updated the fid it was starting from. If you open a fid and then walk it elsewhere, is it still open? Is that an implic

Re: [9fans] 9p question

2009-07-30 Thread Russ Cox
> it would surely make it easier for unix implementations. i have had > plenty of issues with that in o9fs. > > but as yourself pointed out, what would that walk mean? as i also pointed out, there's no problem if the walk is creating a new fid. it would be unopened. russ

Re: [9fans] Kernel crash bug

2009-08-01 Thread Russ Cox
calling vmemchr assumes that the memory isn't being changed by some other proc mapping the same page. if you find the NUL in one pass and then call strcpy or strlen on the pointer later, the other proc might have pulled the NUL in the interim. there is a function in the kernel called validnamedup

Re: [9fans] Kernel crash bug

2009-08-01 Thread Russ Cox
validname0 looks like it is trying to be too clever. A better version of the first if statement would be: if((ulong)name < KZERO) { validaddr((ulong)name, 1, 0); if(!dup) print("warning: validname called from %lux with user pointer",

[9fans] Plan 9 from Outer Space, August 20

2009-08-01 Thread Russ Cox
http://www.ncm.com/Fathom/Comedy/RiffTrax.aspx Russ

Re: [9fans] vmware snarf problem

2009-08-03 Thread Russ Cox
There is a protocol writeup at http://chitchat.at.infoseek.co.jp/vmware/backdoor.html Russ

Re: [9fans] p9p acme freezes when ctrl-f inside its mounted directory

2009-08-04 Thread Russ Cox
On Tue, Aug 4, 2009 at 10:33 AM, Rudolf Sykora wrote: > I noticed that when running acme in plan9port and having its > directories mounted say on /mnt/acme, then if I try from within a win > window in the acme to auto-complete a directory name---I am in /mnt, I > type 'a' and hit the 'insert' key o

Re: [9fans] renaming to an existing file

2009-08-04 Thread Russ Cox
> How can I achieve the same result with 9P? You can't. (Redefine 9P.) Russ

Re: [9fans] A note on using E

2009-08-04 Thread Russ Cox
> #!/bin/sh > if 9p stat plumb > /dev/null 2>&1 > then >        exit > else >        plumber > fi > > to ensure that the plumber is running.  This works nicely for me, as I > can exit and restart acme, and the plumber continues running.  When I > log out of this linux system, however, it appears th

Re: [9fans] searchfs

2009-08-06 Thread Russ Cox
> you need to read and write the same file descriptor.  (i'm > not sure why i would use this instead of grep, even for http > queries.)  <>[fd] is rc syntax for opening a file for r/w. > here's an example of opening fd 3 rw, then sending the > query into that fd and reading the results back: for i

Re: [9fans] 9base-3

2009-08-08 Thread Russ Cox
On Fri, Aug 7, 2009 at 6:13 PM, Uriel wrote: > Always get p9p from hg, the tarballs have been partially broken for > ages and Excuse me? Instead of keeping that to yourself why not tell me so I can fix it? I know many people who install from the tar file, though, so I expect you're just whining in

Re: [9fans] 9base-3

2009-08-08 Thread Russ Cox
Thanks, but I'm happy with the current tar files. They are a working CVS checkout, so that people who use them can then use the recipes in cvs(1) [9 man cvs] to update their trees. The one you linked to is not a working anything checkout. I haven't touched the tar file generation in over a year so

Re: [9fans] Unexpected 8c warning message

2009-08-09 Thread Russ Cox
you are smarter than 8c. just put sd = nil above your loop. 8c isn't smart enough to know that the body of for(i=0; i<2; i++) because it does not make two copies of the i<2 test, so it cannot determine that the very first one is guaranteed to succeed. russ

Re: [9fans] Unexpected 8c warning message

2009-08-10 Thread Russ Cox
This problem is uncomputable, so trying to handle every case that comes up is problematic. There has to be a line somewhere. Saying that the compiler could figure out does not imply that it must. I think it's perfectly reasonable that a compiler, when presented with a program like int x;

Re: [9fans] bind vs. 9660srv

2009-08-10 Thread Russ Cox
This is a kernel bug. sysfile.c:/^read says dir = c->qid.type&QTDIR; if(dir && mountrockread(c, p, n, &nn)){ /* do nothing: mountrockread filled buffer */ }else{ if(dir && c->umh) nn = unionread(c, p, n);

Re: [9fans] bind vs. 9660srv

2009-08-10 Thread Russ Cox
On Mon, Aug 10, 2009 at 11:27 AM, erik quanstrom wrote: >> but should say (untested) > > s/un(tested)/\1 > >> No one noticed before because most 9P2000 servers >> assume they are being used correctly and implement >> a simpler check: if offset == 0, seek to beginning, >> otherwise continue where th

  1   2   3   4   5   6   7   8   9   >