Re: [9fans] Vacfs/9pfuse problems?

2008-09-10 Thread sqweek
On Wed, Sep 10, 2008 at 10:41 PM, Russ Cox <[EMAIL PROTECTED]> wrote:
> There may be two bugs here.  One happens when you start 9pfuse in
> one terminal and then interrupt a program in that same terminal.

 This looks fine, I can start 9pfuse and then in the same terminal
ctrl-c to my heart's content without killing 9pfuse.

> The second is what happens when any I/O to the 9pfuse server
> gets interrupted, in any terminal.  That one:
>
> I think I fixed this on July 24.
> http://hg.pdos.csail.mit.edu/hg/plan9/rev/18d28bd28f4b

 Yep, seems to be fixed after updating to tip. Thanks!
-sqweek



Re: [9fans] test command

2008-09-10 Thread Russ Cox
> there are certainly better ways to do this, but this works:

as does /bin/mtime.



Re: [9fans] test command

2008-09-10 Thread erik quanstrom
> > But then there is = and != for strings (for example), so this argument
> > is thin :-).
> 
> if we can easily get modified time of a file in the format of UNIX time,
> where "easily" means "in the set of plan 9 commands".

there are certainly better ways to do this, but this works:

- erik

#!/bin/rc
rfork e

p='
$1 == "mtime:" {
gsub("[()]", "", $8)
print $8
}'

for(i){
syscall -s fstat 0 buf 1024<$i>[2=1] | 
awk $p
}



Re: [9fans] test command

2008-09-10 Thread Kenji Arisawa

Hello,

On 2008/09/11, at 1:15, Gorka Guardiola wrote:

yes, but !older is the same as younger or equal.


yes.


But then there is = and != for strings (for example), so this argument
is thin :-).


if we can easily get modified time of a file in the format of UNIX time,
where "easily" means "in the set of plan 9 commands".

Kenji Arisawa




Re: [9fans] Acme questions

2008-09-10 Thread roger peppe
On Wed, Sep 10, 2008 at 7:48 PM, Pietro Gagliardi <[EMAIL PROTECTED]> wrote:
> I think double-clicking on the box to the left of the column information
> line thingy should do it.

erm. you really could have tried this first.
it doesn't take much, you know.

for the record, i once had a go at implementing a "hide" command within acme,
but i never got it stable enough to make available. it would be nice if more of
the invariants in the acme code were documented.

what i was really aiming towards was a way to allow acme to take
up multiple rio windows - the idea would be to allow dragging of acme
windows (or columns) between the acme rio windows. that way i could
edit a load of related files in a single rio window but avoid cluttering things
up when i want to digress into another project for a while (but also avoid
the risk of simul-editing a file that you get when starting two acmes at the
same time).

it could also make the X command more useful than it currently is.
in sam, the X command is great because you can edit many
related files at the same time without necessarily cluttering
the screen with them, but in acme it's a bit of a pain to do a global
edit across (say) 100 source files. it's for this sort of thing i end
up firing up sam -d, but it's so easy to waste time with files that i'm
already editing, etc.

at the acme data structure level, i reckoned it shouldn't be too hard - there
are multiple Windows per Column, multiple Columns per Row, but there's
only one Row. if there were multiple rio windows, each would be represented by
a Row, but so far i've always got bogged down in the implementation details,
time restrictions and my own brain limitations...



Re: [9fans] Acme questions

2008-09-10 Thread Pietro Gagliardi

On Sep 10, 2008, at 10:04 AM, hugo rivera wrote:


1. Is it possible to hide an entire column? I think it is not and I
have not read anything mentioning something similar. I think this
would be great, since it would allow me (and maybe other share this
opinion with me) to organize my work more easily.


I think double-clicking on the box to the left of the column  
information line thingy should do it.





Re: [9fans] [plan9mod] Re: /mnt/acme empty

2008-09-10 Thread roger peppe
On Wed, Sep 10, 2008 at 1:15 PM, erik quanstrom <[EMAIL PROTECTED]> wrote:
> alternatively from acme,
>
>Edit s:^:   :g
> or
>Edit s:^::g
>
> - erik

indeed, although i like the one-word nature of |a+ and |a-

that way i can have something else (e.g. a search phrase or
another Edit command) highlighted in the tag, and still single-click
on |a+ to indent without losing it. tag space is at a premium too.



Re: [9fans] Where to find plan9

2008-09-10 Thread Riza Dindir
Thank you all for your helpull messages. Looks like, when I tried to
access the plan9 site (bell labs) it was offline, today it came back.

rd


  



Re: [9fans] test command

2008-09-10 Thread Gorka Guardiola
On Wed, Sep 10, 2008 at 5:27 PM, Juan Céspedes <[EMAIL PROTECTED]> wrote:
> Maybe I'm confused, but what Kenji said is that:
>
>> "test" command of plan 9 has a operator "older", the usage is:
>>test f -older t
>> where f is a file and t is a time.
>
> If f is a file ant t is a *time*, you can't do test t -older f
>

yes, but !older is the same as younger or equal.
!(test f -older t)
would be the same (equality notwithstanding)
as
test f -younger t

But then there is = and != for strings (for example), so this argument
is thin :-).
-- 
- curiosity sKilled the cat



Re: [9fans] Acme questions

2008-09-10 Thread hugo rivera
2008/9/10 erik quanstrom <[EMAIL PROTECTED]>:
> no.  and you're right, it would be a great feature but it would take
> quite a bit of rethinking.

Sorry to hear that.

> not in the same way.  you want to b3 ":-/text/" (no quotes)
> in the tag.  i'm sure there are other ways to do this.

Great, thanks.



Re: [9fans] Acme questions

2008-09-10 Thread erik quanstrom
On Wed Sep 10 11:15:35 EDT 2008, [EMAIL PROTECTED] wrote:
> 2. Is it possible to view images inside Acme's windows? IMHO, this
> would certainly be a neat feature for Acme. I really don't know if it
> is to hard to implement this feature or if even is something that at
> least some people would like to see.

no.  and you're right, it would be a great feature but it would take
quite a bit of rethinking.

> 3. When you click on a given word on a file being edited, using your
> 3th button, you can search for occurrences of this word in this file.
> Is there anyway to do the same backwards?

not in the same way.  you want to b3 ":-/text/" (no quotes)
in the tag.  i'm sure there are other ways to do this.

- erik



Re: [9fans] test command

2008-09-10 Thread Juan Céspedes
Maybe I'm confused, but what Kenji said is that:

> "test" command of plan 9 has a operator "older", the usage is:
>test f -older t
> where f is a file and t is a time.

If f is a file ant t is a *time*, you can't do test t -older f

Juan



Re: [9fans] test command

2008-09-10 Thread David Leimbach
On Wed, Sep 10, 2008 at 6:38 AM, ron minnich <[EMAIL PROTECTED]> wrote:

> On Wed, Sep 10, 2008 at 3:19 AM, Kenji Arisawa <[EMAIL PROTECTED]>
> wrote:
> > Hello,
> >
> > "test" command of plan 9 has a operator "older", the usage is:
> >test f -older t
> > where f is a file and t is a time.
> > however the command does not have "newer" operator.
> > why?
> >
>
> If a < b, and you want to know if b > a, can't you just do a < b?
>
> ron
>
>
Yeah with < and ! you can build anything you want :-)

Hence why many C++ STL comparisons just require you to make a functor for
less.

Dave


Re: [9fans] test command

2008-09-10 Thread Rodolfo kix García

a < b = !(a > b) + (a = b)

> On Wed, Sep 10, 2008 at 3:19 AM, Kenji Arisawa <[EMAIL PROTECTED]>
> wrote:
>> Hello,
>>
>> "test" command of plan 9 has a operator "older", the usage is:
>>test f -older t
>> where f is a file and t is a time.
>> however the command does not have "newer" operator.
>> why?
>>
>
> If a < b, and you want to know if b > a, can't you just do a < b?
>
> ron
>
>


-- 
Rodolfo García AKA kix
http://www.kix.es/
EA4ERH (@IN80ER)




Re: [9fans] Vacfs/9pfuse problems?

2008-09-10 Thread Russ Cox
There may be two bugs here.  One happens when you start 9pfuse in
one terminal and then interrupt a program in that same terminal.
Perhaps the shell sends the interrupt to the backgrounded 9pfuse
or 9p server too.  If so, there is an rfork(RFNOTEG) missing somewhere.

The second is what happens when any I/O to the 9pfuse server
gets interrupted, in any terminal.  That one:

>  I see the same 9pfuse behaviour mounting ircfs or u9fs at work. If I
> interrupt some I/O, I lose the mount.
>  Haven't seen the find problem, 9pfuse -D might be instructive there.

I think I fixed this on July 24.
http://hg.pdos.csail.mit.edu/hg/plan9/rev/18d28bd28f4b

Russ



Re: [9fans] Where to find plan9

2008-09-10 Thread Eris Discordia

You many want to give Anant Narayanan's mirror a try:

http://www.kix.in/plan9/plan9.iso.bz2

I used this mirror:

http://www.tip9ug.jp/mirror/plan9.iso.bz2

It was fast back then.

--On Tuesday, September 09, 2008 8:57 AM -0700 Riza Dindir 
<[EMAIL PROTECTED]> wrote:



Hi there,

Where can we find the plan9 distro?

Regards,
rd












[9fans] Acme questions

2008-09-10 Thread hugo rivera
Hi:
I've been using Acme for a while and I really like it. I am using it
on a daily basis and now it is my official text editor and user
interface on linux and freebsd.
There are three issues that I want to discuss (really meaning suggest):

1. Is it possible to hide an entire column? I think it is not and I
have not read anything mentioning something similar. I think this
would be great, since it would allow me (and maybe other share this
opinion with me) to organize my work more easily. For example, lets
imagine that I am doing some C programming and testing using two
columns (which hold the C source and some window running rc). Then I
need to start writing a presentation or whatever using latex, so I
have to edit my latex files and compile them again and again, probably
using another window with rc on it. IMHO if you could temporary hide
the two previous columns (related to my C work), like you can do with
single windows, would help a lot.

2. Is it possible to view images inside Acme's windows? IMHO, this
would certainly be a neat feature for Acme. I really don't know if it
is to hard to implement this feature or if even is something that at
least some people would like to see.

3. When you click on a given word on a file being edited, using your
3th button, you can search for occurrences of this word in this file.
Is there anyway to do the same backwards?

Please be aware that I am just expressing my personal views and by no
means I intend to start a flame on this.

-- 
Saludos

Hugo



Re: [9fans] test command

2008-09-10 Thread ron minnich
On Wed, Sep 10, 2008 at 3:19 AM, Kenji Arisawa <[EMAIL PROTECTED]> wrote:
> Hello,
>
> "test" command of plan 9 has a operator "older", the usage is:
>test f -older t
> where f is a file and t is a time.
> however the command does not have "newer" operator.
> why?
>

If a < b, and you want to know if b > a, can't you just do a < b?

ron



[9fans] pata pio mode vs. flash

2008-09-10 Thread erik quanstrom
it appears that for pio reads and writes, sdata.c (the plan 9 ata driver)
omits waiting for Drdy.  normally drives assert Drdy very quickly, but its
in the spec and i've tripped on a few slow parts that are not ready when
we send them data:

Sep  8 13:00:49 EDT 2008 sdata.c 54744 [quanstro]
sdata.c:1421 c /n/dump/2008/0909/sys/src/9/pc/sdata.c:1421
<   if(ataready(cmdport, ctlport, drive->dev, Bsy|Drq, Drdy, 101*1000) < 0)
---
>   if(ataready(cmdport, ctlport, drive->dev, Bsy|Drq, 0, 101*1000) < 0)

i'm pretty sure that the same test needs to be in atapktio as well.
(could this be the disagreement with vmware?)

it is interesting that it's been that way for a long time.

- erik




Re: [9fans] [plan9mod] Re: /mnt/acme empty

2008-09-10 Thread erik quanstrom
> is there a reason you can't just execute "|tab -n4" ?
> (perhaps i've misunderstood the script - i haven't tried it)
> 
> slight digression: i have two scripts, called a+ and a-, that
> do indentation and un-indentation, as follows:
> 
> % cat /bin/a+
> #!/bin/rc
> if(~ $#* 0){
>   * = '   '# tab
> }
> sed 's☺^☺'^$1^☺
> % cat /bin/a-
> #!/bin/rc
> if(~ $#* 0){
>   * = '   '
> }
> sed 's☺^'^$1^'☺☺'

alternatively from acme,

Edit s:^:   :g
or
Edit s:^::g

- erik




[9fans] test command

2008-09-10 Thread Kenji Arisawa

Hello,

"test" command of plan 9 has a operator "older", the usage is:
test f -older t
where f is a file and t is a time.
however the command does not have "newer" operator.
why?

Kenji Arisawa




Re: [9fans] [plan9mod] Re: /mnt/acme empty

2008-09-10 Thread roger peppe
> I wrote a small script to tabify/untabify in acme using Russ's tab.c

in general, pipe (|) is your friend. it's rare to have to interact with acme's
special files directly.

is there a reason you can't just execute "|tab -n4" ?
(perhaps i've misunderstood the script - i haven't tried it)

slight digression: i have two scripts, called a+ and a-, that
do indentation and un-indentation, as follows:

% cat /bin/a+
#!/bin/rc
if(~ $#* 0){
  * = ' '# tab
}
sed 's☺^☺'^$1^☺
% cat /bin/a-
#!/bin/rc
if(~ $#* 0){
  * = ' '
}
sed 's☺^'^$1^'☺☺'

the short names are so that they take very little space
in an acme tag. then i have |a+ in the tag of a window,
so i can indent text simply by middle clicking it, two key strokes
and it can be changed to unindent. give it an argument and it can be
used to comment/uncomment blocks of code.

the smiley faces are to avoid doing a proper quoting job
(which i should really do in case i want to indent by '&' or something,
but i've not had the need so far)

i didn't need to mention that, but i have found them
very convenient over the years, so i did. so there.

  rog.


[9fans] [plan9mod] Re: /mnt/acme empty

2008-09-10 Thread prem
On Sep 9, 12:03 pm, [EMAIL PROTECTED] (erik quanstrom) wrote:
> > Hi All,
> > I was trying to write some acme scripts, but eventually found out /mnt/
> > acme is empty.
> > do I need to do anything to get entries under /mnt/acme
> > P.S: /mnt/acme is empty in both 9vx and VMWare'ed Plan9
>
> were you checking from an acme window?  /mnt/acme is not
> part of your login namespace so other windows won't see it.
>
> - erik

Sorry, my mistake I realized soon after posting,
I wrote a small script to tabify/untabify in acme using Russ's tab.c
#!/bin/rc
fn addrdot { echo 'addr=dot' > /mnt/acme/$winid/ctl }
fn tabify {
{ cat /mnt/acme/$winid/xdata && addrdot } | /bin/tab -n4
}
addrdot && tabify > /mnt/acme/$winid/data

Though it does what it supposed to do, is there a better way of doing
it (I am sure there is :))
Thanks
/Prem