[9fans] acme automatic dump

2013-06-12 Thread roger peppe
My laptop has been a bit flaky recently which has brought this issue to the fore for me (nothing like a few hours' lost work to prompt some action!) If my computer crashes, it would be great if I didn't lose all my unsaved work in acme. I'm thinking of adding some way to automatically executing a

Re: [9fans] reverse search direction in p9p acme

2011-09-20 Thread roger peppe
On 19 September 2011 19:17, Rob Pike wrote: > i don't think either does anything. indeed, but it's a useful nothing - they cancel an impending b3 action, useful if you're sweeping with b3 and started in the wrong place.

Re: [9fans] reverse search direction in p9p acme

2011-09-19 Thread roger peppe
On 19 September 2011 15:50, Rob Pike wrote: > Maybe a chorded 3-1 click (not 1-3). +1 3-2 and 3-1 both do the same thing currently AFAIK, so one could go.

Re: [9fans] dirty windows in Acme

2011-09-19 Thread roger peppe
On 19 September 2011 13:55, dexen deVries wrote: > there's a slightly annoying bug in Acme regarding the per-window `dirty bit'. > > expected behavior: > cut + paste leaves the window in `clean' state > > current behavior if a file is opened: > cut + paste of file content leaves the window in `cle

Re: [9fans] reverse search direction in p9p acme

2011-09-19 Thread roger peppe
On 19 September 2011 09:55, dexen deVries wrote: > On Monday 19 of September 2011 10:37:54 roger peppe wrote: >> i'm not sure about adding more invisible state to acme >> windows. > > if `hidden' is the keyword, then let's have some new files in acme's c

Re: [9fans] reverse search direction in p9p acme

2011-09-19 Thread roger peppe
i'm not sure about adding more invisible state to acme windows. i've sometimes imagined a version of acme where shift-right-click would reverse the search. no way of implementing it under plan 9 itself though. On 19 September 2011 09:19, Mathieu Lonjaret wrote: > I haven't tried, but I don't see

Re: [9fans] shell for wins in p9p acme

2011-08-11 Thread roger peppe
why do you want to source lib/profile every time you open a new win? it's conventional to source it only once, and then rely on inherited environment variables. anyway, if you really wanted to do that, you could just make a script, say rc-l, #!/bin/rc exec rc -l $* and set SHELL=rc-l On 11 Aug

Re: [9fans] pic

2011-05-24 Thread roger peppe
On 24 May 2011 03:53, Russ Cox wrote: >> I would like to try to get something  running which >> would allow me to draw pic documents in a WYSIWYG style >> I have a load of rather complex drawings to do. > > If you will never have to edit them, whiteboard + digital camera. > > Otherwise, I've found

Re: [9fans] a pair nec bugs

2011-05-20 Thread roger peppe
Or one file containing the two numbers. But perhaps they change... On 20 May 2011 11:45, "ron minnich" wrote: > I think the growing complexity of nsec() shows that the file model > doesn't work in all cases ... the thing starts to look a bit overly > complex to me. The fact that it fails due to th

Re: [9fans] how to continue running mk target body after command failure?

2011-05-05 Thread roger peppe
doesn't the E attribute work for you? On 5 May 2011 15:01, EBo wrote: > I am setting up some regression testing where I expect the command to fail > (actually that is what I am testing).  How do you force mk to ignore the > return status of a command it is running and continue running the target

Re: [9fans] Additional compilers under 9vx.OSX

2011-04-08 Thread roger peppe
i'm not keen on disks within disks because you either have to waste lots of space or risk running out of it. On 7 April 2011 16:45, Paul Lalonde wrote: > Fortunately you can build a case-insensitive file system on a mac, within a > file.  Disk Utility lets you make a filesystem in a file, and you

Re: [9fans] Making read(1) an rc(1) builtin?

2011-04-06 Thread roger peppe
On 6 April 2011 17:32, Bakul Shah wrote: > On Tue, 05 Apr 2011 15:53:43 MDT andrey mirtchovski   > wrote: >> so, an optimized /sys/src/cmd/read.c that doesn't read char-by-char >> should give us an improvement, right? right: >> 9grid% newaread >> 1.52u 22.56s 15.66r    newaread >> >> and that's j

Re: [9fans] Making read(1) an rc(1) builtin?

2011-04-05 Thread roger peppe
On 4 April 2011 22:35, wrote: > roger peppe writes: > >> when i've needed a "-n safe" version of echo in >> the past, i've used something like this: >> >> fn myecho {echo -n $"* ^ ' >> '} > > That doesn't work r

Re: [9fans] Making read(1) an rc(1) builtin?

2011-04-04 Thread roger peppe
On 4 April 2011 03:53, erik quanstrom wrote: > i think this is what you want > >        for(line in `{ifs=$nl cat}){...} no, because that only sets ifs for the cat command, not for the `{} construct. ifs=$nl for (line in `{cat}) { ... } is perhaps what you meant to say. > but i have no idea wh

Re: [9fans] how can I set path

2011-03-25 Thread roger peppe
On 25 March 2011 13:53, roger peppe wrote: > i always set $path to (/bin .) > it can be much faster, apart from anything else. % 9fs sources % cd /n/sources % echo $path /bin . % time rc -c '{for(i in `{seq 1 100}){echo $i}}' > /dev/null 0.01u 0.09s 0.27rrc -c {f

Re: [9fans] how can I set path

2011-03-25 Thread roger peppe
On 25 March 2011 12:27, erik quanstrom wrote: >> I read that as allowing the shell to run programs that the kernel would >> reject.  I eventually understood it to mean that you can hide programs >> where only the shell will find them.  Is the current directory one of >> those places, I wonder?  I'

Re: [9fans] acme Local command on p9p

2011-02-25 Thread roger peppe
mac os for one On 25 February 2011 15:44, dexen deVries wrote: > On Friday 25 of February 2011 16:32:27 you wrote: >> > How about reading /proc/$pid/environ (where $pid is the shell spawned for >> > command execution) before the $pid exits and transfering all the >> > environment variables back t

Re: [9fans] streams

2011-02-22 Thread roger peppe
On 22 February 2011 13:25, erik quanstrom wrote: >> i've also been experimenting with a 9p modification that >> suggested some while ago, allowing multiple outstanding >> requests to be queued in sequence. it works, but the code >> still needs quite a bit of polishing. > > queued or sent? sent, t

Re: [9fans] streams

2011-02-22 Thread roger peppe
On 21 February 2011 18:53, Nemo wrote: > i reply myself; i think they use sst to mix multimedia streams, and > in that case a lost packet in one stream (say text) would > delay other streams (say audio) that do not need to be delayed if > you use sst. > > But otherwise I still think that muxing a

Re: [9fans] RESOLVED: recoving important header file rudely

2011-02-03 Thread roger peppe
On 3 February 2011 14:17, erik quanstrom wrote: > On Thu Feb  3 09:17:27 EST 2011, rogpe...@gmail.com wrote: >> i've found it very useful quite a few times. >> usually with oversized log files. >> >> On 3 February 2011 13:59, erik quanstrom wrote: >> > On Thu Feb  3 08:41:23 EST 2011, rogpe...@gm

Re: [9fans] RESOLVED: recoving important header file rudely

2011-02-03 Thread roger peppe
i've found it very useful quite a few times. usually with oversized log files. On 3 February 2011 13:59, erik quanstrom wrote: > On Thu Feb  3 08:41:23 EST 2011, rogpe...@gmail.com wrote: >> On 3 February 2011 13:01, erik quanstrom wrote: >> > i think you're better off with char*s and realloc. >

Re: [9fans] files vs. directories

2011-02-03 Thread roger peppe
On 3 February 2011 13:44, dexen deVries wrote: > On Thursday, February 03, 2011 02:36:40 pm roger peppe wrote: >> On 3 February 2011 11:45, dexen deVries wrote: >> > read(open("/foo")) returns byte stream under entry `foo' in the root >> > object. &g

Re: [9fans] RESOLVED: recoving important header file rudely

2011-02-03 Thread roger peppe
On 3 February 2011 13:01, erik quanstrom wrote: > i think you're better off with char*s and realloc. > it's worth looking at the heavy machinery in sam > and acme, though, and comparing against ed. i'd hesitate before trying to edit 500MB files in ed... nor does ed cope with arbitrary length lin

Re: [9fans] files vs. directories

2011-02-03 Thread roger peppe
On 3 February 2011 11:45, dexen deVries wrote: > read(open("/foo")) returns byte stream under entry `foo' in the root object. > > readdir("/foo") returns `bar' (and possibly others) -- entries in hierarchical > section of object `/foo'. there's no distinction between readdir and read in plan 9.

Re: [9fans] HELP: recoving important header file rudely clobbered

2011-02-03 Thread roger peppe
On 3 February 2011 10:23, Richard Miller <9f...@hamnavoe.com> wrote: > On the other hand, can anyone explain this? > term% mk -f foo.mk x.y z.w > echo making x.y > making x.y > echo making z.w > making z.w > echo making command line arguments > making command line arguments > term% yes, it's becau

Re: [9fans] 9p vs http

2010-11-16 Thread roger peppe
On 16 November 2010 16:32, Charles Forsyth wrote: >>unfortunately, there's just not enough bits to easily export >>(an export)+. > > i think that works: it checks for clashes. only when a file is actually walked to. of course, that's fine in practise - the only thing that actually cares about qi

Re: [9fans] 9p vs http

2010-11-16 Thread roger peppe
On 16 November 2010 01:18, erik quanstrom wrote: >> > i claim that a fs with this behavior would be broken.  intro(5) >> > seems to agree with this claim, unless i'm misreading. >> >> you're right - fossil is broken in this respect, as is exportfs >> {cd /mnt/term/dev; ls -lq | sort} for a quick d

Re: [9fans] 9p vs http

2010-11-15 Thread roger peppe
On 15 November 2010 19:29, erik quanstrom wrote: >> if you mount onto one, you'll see the mounted files >> on the other. >> >> gorka was talking about identifying files from their qid. >> the version number doesn't help in identifying the file - >> someone could have modified the file 35 times bet

Re: [9fans] 9p vs http

2010-11-15 Thread roger peppe
On 15 November 2010 16:48, erik quanstrom wrote: >> > the qid values are actually different >> >> true, but qid.version doesn't help much. > > what!?  i'd hate to see a file server that didn't > much care which qid.version it had.  those directories > you listed are different. if you mount onto o

Re: [9fans] 9p vs http

2010-11-15 Thread roger peppe
2010/11/15 C H Forsyth : >>% ls -lqd /n/dump/2006/0707/usr/rog >>(0003d540 1122 80) d-rwxr-xr-x M 42850 rog rog 0 Jun  7  2005 >>/n/dump/2005/0707/usr/rog >>% ls -lqd /n/dump/2006/0707/usr/rog >>(0003d540 1157 80) d-rwxr-xr-x M 42850 rog rog 0 Jun 12  2006 >>/n/dump/2006/0707/usr/ro

Re: [9fans] 9p vs http

2010-11-15 Thread roger peppe
On 15 November 2010 14:15, Gorka Guardiola wrote: > By namespaces I mean qid's , the notion that a file is the same if the > name isn't. mind you, that's problematic in 9p. the qid can be the same even if the file is different: % ls -lqd /n/dump/2006/0707/usr/rog (0003d540 1122 80) d-rwx

Re: [9fans] Plan9 development

2010-11-08 Thread roger peppe
On 5 November 2010 19:06, erik quanstrom wrote: >> > ('&', '&&', '||', if, '|', 'and '`{}') with something general >> > enough to replace mk, you'd be on to something. >> >> i did a mash-inspired version of mk as an inferno shell module once. >> it required no new syntax (although it could be conf

Re: [9fans] Plan9 development

2010-11-05 Thread roger peppe
On 5 November 2010 18:14, erik quanstrom wrote: >> > -- and then traversing it in a sensible order. How's that for daily use >> > shell? >> > >> > >> Why is a shell that can generate acyclic digraphs of dependencies bad? >>  Someone clearly found a use for it at some point or it wouldn't have been

Re: [9fans] Passing a file descriptor between processes

2010-11-05 Thread roger peppe
see srv(3) http://plan9.bell-labs.com/magic/man2html/3/srv On 5 November 2010 10:29, Kirill A. Shutemov wrote: > One of the ugliest interface in Unix is passing a file descriptor between > processes [1]. Does Plan9 provide any mechanism for it? > > [1] > http://book.chinaunix.net/special/ebook/a

Re: [9fans] A little more ado about async Tclunk

2010-10-31 Thread roger peppe
an isbn number would be more useful. On 31 Oct 2010 09:04, "Bruce Ellis" wrote: oh shut up. learn. you want Morgan's phone number? brucee On Sun, Oct 31, 2010 at 7:52 PM, roger peppe wrote: > if you hate misinformati...

Re: [9fans] A little more ado about async Tclunk

2010-10-31 Thread roger peppe
if you hate misinformation, why not provide some correct information to counter it? i'd hazard a guess that nobody other than you in this thread knows what you mean by "deadly embrace". On 31 Oct 2010 05:47, "Bruce Ellis" wrote: good call. i just hate misinformation. if there is any more mislead

Re: [9fans] A little more ado about async Tclunk

2010-10-29 Thread roger peppe
the only book by hoare i've got (CSP) doesn't mention a deadly embrace. On 29 October 2010 23:43, Bruce Ellis wrote: > grab a book by hoare or morgan. > > brucee > > On Sat, Oct 30, 2010 at 9:39 AM, roger peppe wrote: >> On 29 October 2010 21:44, Bruce Ellis wrot

Re: [9fans] A little more ado about async Tclunk

2010-10-29 Thread roger peppe
On 29 October 2010 21:44, Bruce Ellis wrote: > that definition is wrong! so point us to the right one then.

Re: [9fans] A little more ado about async Tclunk

2010-10-29 Thread roger peppe
On 29 October 2010 18:47, Bruce Ellis wrote: > who said deadlock. it's an easily reproducible situation. rattle the > cage is not a solution. sorry then, i misunderstood you. what else did you mean by "deadly embrace"?

Re: [9fans] A little more ado about async Tclunk

2010-10-29 Thread roger peppe
On 29 October 2010 17:17, Bruce Ellis wrote: > gee i thought i was the first to say deadly-embrace on this thread. > it's not only problematic it's wrong. just reiterating what little > shaun said circa 1999. if deadlock is the issue, isn't it solved just as well by asynchronously receiving the R

Re: [9fans] A little more ado about async Tclunk

2010-10-29 Thread roger peppe
On 29 October 2010 17:01, Charles Forsyth wrote: >>Do you do completely asynch clunks or just the wait for the response?. > > it uses `completely' async clunks, which is why it can be broken. > > having the original process send the Tclunk and not wait > for the Rclunk is different. for some reas

Re: [9fans] A little more ado about async Tclunk

2010-10-29 Thread roger peppe
On 29 October 2010 15:14, Eric Van Hensbergen wrote: > Just to make sure I understand things correctly, where does this mess > things up with standard (as opposed to synthetic) file systems? i think that part of the problem is that plan 9 makes no distinction between "standard" and "synthetic" fi

Re: [9fans] A little more ado about async Tclunk

2010-10-29 Thread roger peppe
On 28 October 2010 21:18, Charles Forsyth wrote: > the race is that there's nothing to say that the clunk completes before the > process continues on to do something more, including some action that depends > on the clunk completing, > such as simply repeating the open. that open can fail if the

Re: [9fans] iwp9 video?

2010-10-18 Thread roger peppe
Mon, Oct 18, 2010 at 10:34 PM, roger peppe wrote: >> yeah, youtube (or better, vimeo) would be great. >> livestream is very glitchy from here too. >> (although it was fun when it did work live...) >> >> On 18 October 2010 01:40, Jeff Sickel wrote: >>> >>&

Re: [9fans] iwp9 video?

2010-10-18 Thread roger peppe
yeah, youtube (or better, vimeo) would be great. livestream is very glitchy from here too. (although it was fun when it did work live...) On 18 October 2010 01:40, Jeff Sickel wrote: > > On Sep 29, 2010, at 9:31 AM, Eric Van Hensbergen wrote: > >> Check http://www.livestream.com/iwp9 during the w

Re: [9fans] πp

2010-10-13 Thread roger peppe
2010/10/13 David Leimbach : > I guess I do not understand how 9p doesn't support pipelining.   All > requests are tagged and can be dealt with between client and server in > any order right? two issues (at least): 1) concurrently sent requests can be reordered (they're serviced in separate thread

Re: [9fans] alt and chanfree

2010-09-15 Thread roger peppe
On 15 September 2010 09:15, Mathieu Lonjaret wrote: > I haven't tried chanclose() yet, but setting to nil the freed chan in the > alt entry is not really what I wanted since it will make alt() return -1 > (better than crashing but not ideal). it wouldn't return -1 (assuming there are at least som

Re: [9fans] alt and chanfree

2010-09-14 Thread roger peppe
On 14 September 2010 09:57, Mathieu Lonjaret wrote: >        for(;;){ >                n = alt(a); >                if(n < 0) >                        error("with alt"); > >                if (m[0] == 0){ >                        // a caller has terminated >                        dosomestuff() s

Re: [9fans] P9p on Fedora 12

2010-09-08 Thread roger peppe
On 3 September 2010 15:25, Russ Cox wrote: > [...] but you can't use the mouse to edit in an > interactive python session.  win some, lose some. to get around this, i start up python with a script, py: #!/bin/rc PYTHONSTARTUP=$HOME/lib/pythonstartup cat | python -i $* where $HOME/lib/pythonstar

Re: [9fans] how to print a program

2010-09-08 Thread roger peppe
i've always used an ancient version of a2ps for this, ported to plan 9 by fors...@terzerima.net. this does almost everything i want (in particular two-column landscape mode) with the exception that it doesn't grok utf-8. i'm sure charles will send you a copy if you wish. the current gnu version is

Re: [9fans] strange problem

2010-07-19 Thread roger peppe
that's because the cd function calls awd which prints some terminal control codes to change the window's idea of the current working directory. IMHO it should write to stderr, but it doesn't. {for(i in 0.*) @{builtin cd $i; echo $i; grep total otdit| grep -v number}} >data should work. On 19 J

Re: [9fans] xml

2010-07-02 Thread roger peppe
On 1 July 2010 20:34, Jorden M wrote: > Lack of polymorphism in the interfaces seems to limit > the extent to which they can be compared to Haskell type classes, but > it seems safe to say that they are definitely a subset. it's not as safe as you think - that's not true. in some ways, go's inter

Re: [9fans] hoc output format

2010-05-13 Thread roger peppe
On 13 May 2010 17:06, erik quanstrom wrote: > On Thu May 13 12:05:13 EDT 2010, rogpe...@gmail.com wrote: >> sorry, misunderstanding, i meant that (64-bit) floating point is >> ok for integer ops if you stick to 32 bit and don't do divisions. >> > > ah!  ok.  i was wondering about that. > > ideally

Re: [9fans] hoc output format

2010-05-13 Thread roger peppe
On 13 May 2010 16:54, Ethan Grammatikidis wrote: > what do you mean by "its output isn't suitable for use as input"? i'm just > curious, have never used it that way. hum... having asked that question i > tried some operations producing very lare numbers and they started to be > printed with backsl

Re: [9fans] hoc output format

2010-05-13 Thread roger peppe
sorry, misunderstanding, i meant that (64-bit) floating point is ok for integer ops if you stick to 32 bit and don't do divisions. On 13 May 2010 16:31, erik quanstrom wrote: > On Thu May 13 11:28:29 EDT 2010, rogpe...@gmail.com wrote: >> On 13 May 2010 15:23, erik quanstrom wrote: >> > i typica

Re: [9fans] hoc output format

2010-05-13 Thread roger peppe
On 13 May 2010 15:23, erik quanstrom wrote: > i typically do programming calculations and floating point > just isn't the right way to do that. it's ok if you stick to 32 bit and don't do divisions. personally for off-the-cuff command-line calculations i've been using my own "fc" for years and y

Re: [9fans] Binary File split

2010-05-10 Thread roger peppe
On 10 May 2010 12:40, erik quanstrom wrote: > this isn't awk's fault.  awk gets the right result.  you've illustrated > the dismalness of seq. good point. i should have worked that out! it's not the first time i've been caught out by %g - perhaps the default precision of %g should be 12 or more.

Re: [9fans] Binary File split

2010-05-10 Thread roger peppe
On 8 May 2010 18:35, Russ Cox wrote: > bs=1474560 > cat $file | for(i in `{seq 0 `{ls -l $file | awk '{print > int($6)/'$bs'}'}}) { dd -bs $bs -count 1 -of $file.$i } that looks very plausible, but it doesn't actually work, as awk doesn't coelesce short reads (it gets short reads from the pipe)

Re: [9fans] A simple experiment

2010-04-29 Thread roger peppe
On 28 April 2010 19:42, ron minnich wrote: > We did a simple experiment recently: added a new 9p type called > Tstream, because this issue of streams vs. transactions has been > bugging me for years. The semantics are simple: it's a lot like Tread > (almost same packet) but a single Tstream result

Re: [9fans] sam language question

2010-04-22 Thread roger peppe
another way (and how i would usually do it): ,x g/0\.00/i/\n/ On 22 April 2010 18:32, Rudolf Sykora wrote: > Hello, > > I have a file in which I wanted to insert an empty line just before > any line on which a string, say '0.00' is present. > > My attempts to do it this way: > ,x/0.00/+-i/\n/ >

Re: [9fans] +- in acme

2010-04-19 Thread roger peppe
this seems like a bug to me - it doesn't follow the description in the manual page. the end of the empty selection at the start of a line is surely within that line. i had a look at the code, and was surprised by the fact that the logic appears to implemented in two places; middle clicking "Edit +

Re: [9fans] Creating new mail users; mail -c

2010-03-22 Thread roger peppe
On 22 March 2010 13:37, erik quanstrom wrote: >> So... how is the mail -c call in newuser supposed to work for normal >> (ie: not in group sys) users? > > this is how the permissions were set up in 2005 on my machine: > > ; ls -ld /mail/box > d-rwxrwxrwx M 456741 upas upas 0 Jul 15  2009 /mail/box

Re: [9fans] rc strings

2010-03-11 Thread roger peppe
what about this? ifs=' ' n=`{echo 'ab'} or ifs='' n=`{echo 'ab'} if you don't mind the newline character being in the string. On 11 March 2010 11:43, hugo rivera wrote: > Hi, > > % n=`{echo 'a           b'} > > sets n to a list containing two elements, 'a' and 'b'. How can I set n > to

Re: [9fans] acme(4) and addr=dot

2010-03-06 Thread roger peppe
On 6 March 2010 15:13, David Leimbach wrote: > I think you want to create some kind of redirected handle to the ctl file > first, then start a new block in rc.  I believe this is how network > programming in rc can be accomplished in Inferno as well.  Is this not > allowed in p9p?  I've honestly n

Re: [9fans] acme(4) and addr=dot

2010-03-06 Thread roger peppe
the address is lost as soon as the ctl file is closed (personally, i think this is not ideal behaviour). under p9p i use the attached code to retrieve the current value of acme's dot for a particular window. i couldn't figure out a way to do it reliably in a shell script. acmedot.c Description:

Re: [9fans] sed Q

2010-03-05 Thread roger peppe
i don't quite see what you're trying to do here. it's doing what you're asking - but that's a no-op, because N includes an embedded newline. you can do: sed -e '/]/N' -e 's/\n//' if you want to join the lines. or something like this: sed ':x /]$/{ N s/\n/ /

Re: [9fans] RFC: 9p file system with queue semantics (as in message queues)

2010-02-26 Thread roger peppe
you might want to take a look at the Owen system under inferno, which addresses some of your issues here are some pointers: http://inferno-owen.googlecode.com/hg/doc/owen/intro.pdf http://www.vitanuova.com/papers/ugrid.pdf http://code.google.com/p/inferno-owen/source/browse/man?r=d640591ab8c2faf30

Re: [9fans] pineview atom

2010-02-18 Thread roger peppe
On 18 February 2010 22:38, erik quanstrom wrote: > indirection?  executable code being turned into illegal > instructions?  it's not 100% efficiency but it will translate > flipped bits into crashes. i'm interested - does anyone know what a typical relative percentage of pointer- vs. non-pointer-

Re: [9fans] Speed of 9pfuse on Linux

2010-02-12 Thread roger peppe
this is not surprising if you consider what's happening underneath: native plan 9 to read a directory: Twalk to directory Topen directory Tread directory Tclunk linux via fuse: Twalk to directory Topen directory Tread directory [ Twalk to directory item Tstat item Tclunk item ] * n-items in direc

Re: [9fans] mount acme on plan9port

2010-01-28 Thread roger peppe
2010/1/28 Russ Cox : > if you ran ls -l /mnt/acme/* in plan 9 you'd get the > same behavior.  the difference is that 9p has > optimized the star-free case in a way that unix > cannot take advantage of. ls -ld /mnt/acme/* would be a better illustration, i think.

Re: [9fans] mount acme on plan9port

2010-01-27 Thread roger peppe
fuse is probably just doing a stat of each file, as is conventional and necessary in unix. the 9p fuse converter can't legitimately cache the qids from the directory read, so there's probably no other way. 2010/1/27 erik quanstrom : > On Wed Jan 27 08:42:31 EST 2010, rogpe...@gmail.com wrote: >>

Re: [9fans] mount acme on plan9port

2010-01-27 Thread roger peppe
i guess that's because it's walking into mnt/acme/new, which creates a new window. i've thought in the past that perhaps the first write to a file in mnt/acme/new should create the window, rather than just walking to it. it always seems odd to me that du -a /mnt has side effects. 2010/1/27 Lore

Re: [9fans] partial cp

2010-01-26 Thread roger peppe
modify the source of fc to specify an offset is probably your easiest solution if you want to carry on copying at the same speed. 2010/1/25 maht : > On 25/01/2010 01:45, Akshat Kumar wrote: >> >> what are some suggested ways to copy just >> the rest of the file, without starting all over? >> > >

Re: [9fans] dataflow programming from shell interpreter

2010-01-21 Thread roger peppe
i had some ideas along these sorts of lines which i put into a tool in inferno that i called "alphabet". it works (with a few rough edges). http://www.vitanuova.com/inferno/man/1/sh-alphabet.html for an example of something it can do that's not possible with a conventional shell pipeline, see http

Re: [9fans] breadth first walking

2010-01-04 Thread roger peppe
2010/1/4 Tim Newsham : > someone mentioned in the thread that it would be nice to be able > to walk directory trees in breadth-first manner: >  http://www.thenewsh.com/~newsham/x/9/walk.c that's potentially useful, thanks. BTW, any robust file tree walker in plan 9 should cope with cycles in the

Re: [9fans] breadth first walking

2010-01-04 Thread roger peppe
what's a scape tree? 2010/1/4 Bruce Ellis : > yep, use a scape tree. ozi is full of them. no hash tables here, > except for my coffee table. > > brucee > > On 1/4/10, Tim Newsham wrote: >> someone mentioned in the thread that it would be nice to be able >> to walk directory trees in breadth-first

Re: [9fans] du and find

2010-01-02 Thread roger peppe
2010/1/2 erik quanstrom : >> and /sys/src isn't by any means the largest tree i like to grep >> (for instance, searching for lost files with a name i longer remember, >> i've been known to search through all the files in my home directory, >> ~425000 files at last count) >> >> sometimes i think it

Re: [9fans] du and find

2010-01-01 Thread roger peppe
2010/1/2 erik quanstrom : > using xargs does work around the problem.  but then why not > go all the way and remove ` from rc?  after all, ` only works some > of the time? because the limit is big enough that cases that break the limit almost never happen except in this case? > i'm not sure i und

Re: [9fans] du and find

2010-01-01 Thread roger peppe
2009/12/29 erik quanstrom : > what seems more important to me is a way to unlimit the size > of argv.  otherwise we'll need to go down the hideous xargs path. > (apoligizes to hideous functions everywhere for the slur.) i don't really see why xargs (the idea, not the usual unix implementations) is

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

2009-12-07 Thread roger peppe
2009/12/7 Nathaniel W Filardo : >> fd1 := open("/foo1", ORDWR); >> fd2 := open("/foo2", ORDWR); >> fd3 := fdjoin(fd1, fd2); >> >> what is going to happen? >> something has got to initiate the requests to actually >> shift the data, and it's not clear which direction the >> data will flow. > > "file

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

2009-12-07 Thread roger peppe
2009/12/7 Francisco J Ballesteros : > I think he wants copyfile + a kproc. yup, i was thinking of inferno's sys->stream(). but neither is in a position to do the kind of redundancy optimisation that sam was talking about, AFAICS. at least it can avoid copying by calling bread and bwrite.

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

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/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] 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] 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
now just some handling of combining characters to do :-)

[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] 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

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] 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] 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] 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] 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

[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] 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.

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] 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] 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] Barrelfish

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

  1   2   3   >