Re: [9fans] 9p2010

2009-04-27 Thread roger peppe
2009/4/26 Roman V. Shaposhnik r...@sun.com:
 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 rather
than using qids. strictly because a hybrid
approach may be possible.

doing this would mean that, for instance,

  bind -a /foo/bar /tmp/a
  mv /tmp/a /tmp/b
  ls -l /tmp/b

would not list the contents of /foo/bar.

what else might break?



Re: [9fans] web server

2009-04-27 Thread Uriel
On Sun, Apr 26, 2009 at 11:59 PM, Roman V. Shaposhnik r...@sun.com wrote:
 On Fri, 2009-04-17 at 12:54 +0100, maht wrote:
  How difficult would it be to use rails or merb in plan9? Is it feasible?
 Not Rails or merb or anything non Plan 9 but a few of us are building an
 rc shell based system that works anywhere CGI and Plan 9 / plan9port is
 available.

 http://werc.cat-v.org/

 I was not aware of werc. Is there a good doc for it?

Besides http://werc.cat-v.org/docs/ the included README and the source
should be helpful (there is not much code there, and should be mostly
self-documenting).


 Thanks,
 Roman.

 P.S. So far it seems that werc wouldn't be able to manage
 highly dynamic and volatile URI hierarchies as long as it

Actually it does, for example all the URLs in http://man.cat-v.org are
'synthetically' generated on the fly.

 is run under anything  but Plan9. Ironically it doesn't
 seem to run there.

It does run under any CGI environment, there are various ways to
provide a CGI environment in Plan 9.

uriel



Re: [9fans] Borderless rio

2009-04-27 Thread erik quanstrom
 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
   # give time to set all the labels
   sleep 0.5
   window -dy 39 ''winwatch -e ^(winwatch|stats|faces)'''
 
 My question is: what is the better way to avoid that lot of quotes? I
 can think of variables or functions, but I wonder what is the idiom
 for nested quotes.

you could use here documents, but i don't really think that would be
better.

it's interesting that duff's shell does fall into the same quoting pit as
bourne's, just in more esoteric situations.

- erik



[9fans] Acme column layout box and buttons

2009-04-27 Thread Balwinder S Dheeman
Hello,

Acme likes to place new windows itself. If you prefer to change the
layout of a window, you only need to drag the /layout box/ at the left
of the tag line and drop it somewhere else. The point where you drop it
selects the column where the window is to be placed now, as well as the
line where the window should start. You can also click the layout box to
enlarge its window a small amount (button 1), as much as possible
without obscuring other tag lines in the column (button 2), and to fill
the whole column vertically (button 3). You can get your other windows
back by clicking either button-1 or button-2 on the window layout box.

That's a lot of good actions attached to all the three buttons for
handling vertical layouts. How about adding similar actions to all the
three buttons for managing horizontal layouts to a column /layout box/.

-- 
Balwinder S bdheeman DheemanRegistered Linux User: #229709
Anu'z li...@home (Unix Shoppe)Machines: #168573, 170593, 259192
Chandigarh, UT, 160062, India Plan9, T2, Arch/Debian/FreeBSD/XP
Home: http://cto.homelinux.net/~bsd/  Visit: http://counter.li.org/



Re: [9fans] Acme column layout box and buttons

2009-04-27 Thread erik quanstrom
 That's a lot of good actions attached to all the three buttons for
 handling vertical layouts. How about adding similar actions to all the
 three buttons for managing horizontal layouts to a column /layout box/.

good idea.

- erik



Re: [9fans] web server

2009-04-27 Thread erik quanstrom
 On Sun, 2009-04-19 at 00:13 +0200, Uriel wrote:
  My criticism was directed at how they are actually used in pretty much
  every web 'framework' under the sun: with some hideously messy ORM
  layer, they plug round Objects down the square db tables, and all of
  it to write applications which really are representing files (accessed
  over HTTP).
 
 I'd say that the biggest reason for DB overuse by Web folks is the
 fact that this is how they get persistence for their data while
 still being able to build distributed applications.
 
 In general, there are only two ways of having persistent data:
* DBs
* FSs
 (well, ok, there's third these days)
 
 FSs (under most OSes) have been way to clunky in the presence
 of any kind of distribution. Hence the DBs.

i agree that this is the general line of thinking, but i think option #3
is missing.  there's lots of ephemerial data that doesn't make sense
to keep in a database even if you have one.  if you do cc processing, some of 
it may
be unwise to let the cgi see or illegal to store in a database (example:
the verification code from the back of a credit card).  so i always thought
it made sense to have a session server to deal with these problems.
we kept the connection information fit to keep in the filesystem.  that
was pretty easy.

- erik



Re: [9fans] Acme column layout box and buttons

2009-04-27 Thread yy
2009/4/27 Balwinder S Dheeman bsd.sans...@cto.homelinux.net:
 That's a lot of good actions attached to all the three buttons for
 handling vertical layouts. How about adding similar actions to all the
 three buttons for managing horizontal layouts to a column /layout box/.


I had a patched version of acme to do this. It is not such a trivial
thing as it looks like, but it is not difficult. However, it doesn't
work so good in practice as in theory. I found disturbing that after
pressing the right button the column was moved to the first place, and
doing it without moving the column was a mess because of the mouse
events (at the end I think I just moved the column to the first place
and then back to its previous position). Other problem I had was that
I didn't have very clear what to do with the middle button (taking the
maximum space and having small columns is not a practical thing). On
the other hands, growing columns with the left button is an easier
thing (once you decide all your heuristics).
Anyway, it was my first look into acme code and there probably are
better ways to do it.
What did you have in mind?


-- 
- yiyus || JGL .



Re: [9fans] Acme column layout box and buttons

2009-04-27 Thread hiro
Seems logical, but I personally never felt a need for this.
To prevent line breaks I normally end up moving the windows to an
other, bigger column...

On Mon, Apr 27, 2009 at 1:51 PM, Balwinder S Dheeman
bsd.sans...@cto.homelinux.net wrote:
 Hello,

 Acme likes to place new windows itself. If you prefer to change the
 layout of a window, you only need to drag the /layout box/ at the left
 of the tag line and drop it somewhere else. The point where you drop it
 selects the column where the window is to be placed now, as well as the
 line where the window should start. You can also click the layout box to
 enlarge its window a small amount (button 1), as much as possible
 without obscuring other tag lines in the column (button 2), and to fill
 the whole column vertically (button 3). You can get your other windows
 back by clicking either button-1 or button-2 on the window layout box.

 That's a lot of good actions attached to all the three buttons for
 handling vertical layouts. How about adding similar actions to all the
 three buttons for managing horizontal layouts to a column /layout box/.

 --
 Balwinder S bdheeman Dheeman        Registered Linux User: #229709
 Anu'z li...@home (Unix Shoppe)        Machines: #168573, 170593, 259192
 Chandigarh, UT, 160062, India         Plan9, T2, Arch/Debian/FreeBSD/XP
 Home: http://cto.homelinux.net/~bsd/  Visit: http://counter.li.org/





Re: [9fans] IWP9 this year?

2009-04-27 Thread erik quanstrom
 And as an added bonus... Erik will be in his time zone.  So
 if anyone wants to work out ride-share or car rental details
 with him he won't (most likely) show up a day before.

have faith!  i could also get the switch back to dst wrong.

- erik



Re: [9fans] web server

2009-04-27 Thread maht




P.S. So far it seems that werc wouldn't be able to manage
highly dynamic and volatile URI hierarchies as long as it
is run under anything  but Plan9. Ironically it doesn't
seem to run there.

  

I use ~ patterns for URI matching on my site

http://ten.steponnopets.net/

it's a bit of a work in progress to exercise the various elements I'm 
working with for a bigger project


http://ten.steponnopets.net/Source_code_for_this





Re: [9fans] web server

2009-04-27 Thread erik quanstrom
 I use ~ patterns for URI matching on my site

what are ~ patterns?

- erik



Re: [9fans] (no subject)

2009-04-27 Thread Steve Simon
 Give or take that all the executables fail, I have enough MINGW
 binutils from the NetBSD package to convince me that MINGW can be
 built and no doubt some debugging will soon take care of the stumbling
 blocks.
 
 It is true that debugging is going to be hard without symbol
 information (one more good reason to go the ELF route for my GCC
 model, in my opinion) and that I need a real implementation of the
 SEEK syscall before I start on the debugging, but these are
 surmountable obstacles.  I guess you need to keep holding thumbs.
 

Sorry, this went completely over my head. It sounds like you
have achieved somthing impressive but I'am afraid I don't understand.

-Steve



[9fans] rio in rio and ghost windows.

2009-04-27 Thread cinap_lenrek
Test case:

draw a window... run rio

inside that thing draw another window and hide it.

now rezise the rio window.

now, the region where the window was seems to eat
mouse events, but the window is hidden.

Fix:

in rio.c:^resized, change this:
...
if(ishidden)
im = allocimage(display, r, screen-chan, 0, DWhite);
else
im = allocwindow(wscreen, r, Refbackup, DWhite);

to this:

if(ishidden){
im = allocimage(display, r, screen-chan, 0, DWhite);
r = ZR;
}else
im = allocwindow(wscreen, r, Refbackup, DWhite);


can anyone confirm this and may make a patch?

--
cinap




Re: [9fans] rio in rio and ghost windows.

2009-04-27 Thread erik quanstrom
 can anyone confirm this 

yes.  your patch properly resizes the hidden window
as well as fixing the bug.

 and may make a patch?

i'll leave that up to you.

- erik



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

2009-04-27 Thread andrey mirtchovski
the p9p version of xcpu used to do something similar, but the old svn
repository is gone now so i can't verify. i see an old version of rx.c
in 9grid:/usr/andrey/src/xcpu/rx.c which does something similar to
what you want with threads, channels and procs but doesn't combine the
input.

it doesn't look finished, so it may be useless. it creates a proc for
each remote host :(

it does something like this (from a perfunctory look, it's been a while):

---
# shared between all procs
create input chan
create output chan

for each node create a proc that:
connects to node and set up a session
creates proc for stdout
creates proc for stderr
waits on input chan for commands to send to the node

stdout and stderr procs do:
read from remote host
write to output chan
---

the aggregator part you want can be inserted between read the output
chan and whatever you need to output to, but that logic doesn't exist
in rx.c, i think :)



[9fans] just in case anyone has written this

2009-04-27 Thread ron minnich
before I write it.

I need a command that concentrates one socket to many (outbound) and
many to one (inbound)

But it needs to do a bit more.

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

and if we have
11.1.1.1 and 11.1.1.2 and 11.1.1.4 and 11.1.1.5 you get
1-2,4-5: blah blah


I have a sort of command like this, which I can adapt to Plan 9. If,
however, someone already has this for Plan 9, it would save me time.
For now I only need 64 hosts but at some point need 1024 (which my
current command does)
and eventually 262144.

thanks

ron



[9fans] New to the list and looking for an old plan9 book/cd

2009-04-27 Thread kyle
Hi all, Im new to the list. My interest in plan9 is to get it up and
running on some of my NeXT boxes(stations, non-turbo). Things are a
bit confusing for me when it comes to the current distro, but I do see
a howto for an older plan9 release. I also found this post in the
archives:


http://9fans.net/archive/1999/03/28


So, I am looking for that kit(ISBN 003-017143-1), unless that release
is available(freely and legally) online already(then I just need a
link). But I wouldn't mind having the actual book.

Thanks in advance for any help, and I hope I can get plan9 working on
these slabs :)



Re: [9fans] New to the list and looking for an old plan9 book/cd

2009-04-27 Thread Anthony Sorace
all that information is for the second edition. the third edition
involved a pretty substantial set of internal changes. things were
improved in almost every way, but one casualty was much of the
platform support in the cpu/terminal kernel. in particular, we don't
run on the NeXT boxes any more. we still have the relevant compiler,
but i'm afraid getting the kernel working there would involve some
pretty substantial kernel programming.

the fourth (current) edition is updated regularly and is available for
download from the web site. Vita Nuova sells CDs and printed manuals.



[9fans] The Olde 2e 'worthies' ... ?

2009-04-27 Thread Lyndon Nerenberg
'kyle000' provokes an interesting question: what is the status of the 2e 
registered licensees list I fuzzily remember?


I used to have the hard copy license from the back of the bubble envelope, 
but it now lives in a galaxy far far away.


--lyndon



Re: [9fans] The Olde 2e 'worthies' ... ?

2009-04-27 Thread Lawrence E. Bakst
I happen to have the license in front of me, what do you want to know?

At 8:28 PM -0700 4/27/09, Lyndon Nerenberg wrote:
'kyle000' provokes an interesting question: what is the status of the 2e 
registered licensees list I fuzzily remember?

I used to have the hard copy license from the back of the bubble envelope, but 
it now lives in a galaxy far far away.

--lyndon





Re: [9fans] (no subject)

2009-04-27 Thread lucio
  1) build mingw for plan9
 
 Give or take that all the executables fail, I have enough MINGW
 binutils from the NetBSD package to convince me that MINGW can be
 built and no doubt some debugging will soon take care of the stumbling
 blocks.

My apologies, this was meant to be private mail to Steve Simon.

++L




Re: [9fans] 9vx

2009-04-27 Thread ron minnich
On Fri, Jun 27, 2008 at 8:17 AM, Russ Cox r...@swtch.com wrote:

 if you make clean
 and then edit the top-level src/Makefrag file to add -m32
 to the HOST_CFLAGS and then make 9vx/9vx
 you are likely to get a working binary.

I'm just trying this now. I was missing stubs-32.h on FC9.
I had to do this:

sudo yum install compat-gcc-34 compat-gcc-34-c++

It's a very important file; it has stuff like this in it :-)

#ifdef _LIBC
 #error Applications may not define the macro _LIBC
#endif

#define __stub___kernel_cosl
#define __stub___kernel_sinl
#define __stub___kernel_tanl
#define __stub_chflags
#define __stub_fattach
#define __stub_fchflags
#define __stub_fdetach
#define __stub_gtty
#define __stub_lchmod
#define __stub_revoke
#define __stub_setlogin
#define __stub_sigreturn
#define __stub_sstk
#define __stub_stty

Pretty!

I also had to do this:
diff -r a18e9872164b src/9vx/Makefrag
--- a/src/9vx/Makefrag  Wed Dec 10 03:29:15 2008 -0800
+++ b/src/9vx/Makefrag  Mon Apr 27 22:02:37 2009 -0700
@@ -124,7 +124,8 @@
x11-kernel.o \
x11-keysym2rune.o \
)
-PLAN9_x11_LIBS = -L/usr/X11R6/lib -L/usr/local/lib -lX11
+#PLAN9_x11_LIBS = -L/usr/X11R6/lib -L/usr/local/lib -L/usr/lib -lX11
+PLAN9_x11_LIBS =  /usr/lib/libX11.so.6

 PLAN9_osx_OBJS =\
$(addprefix 9vx/osx/, \
@@ -148,7 +149,7 @@
libvx32/libvx32.a \

 9vx/9vx: $(PLAN9_DEPS)
-   $(HOST_CC) -o $@ $(PLAN9_DEPS) $(PLAN9_GUI_LIBS) -lpthread
+   $(HOST_CC) $(HOST_LDFLAGS) -o $@ $(PLAN9_DEPS) $(PLAN9_GUI_LIBS) 
-lpthread

 9vx/a/%.o: 9vx/a/%.c
$(HOST_CC) $(HOST_CFLAGS) -I. -I9vx -I9vx/a -Wall
-Wno-missing-braces -c -o $@ $
diff -r a18e9872164b src/Makefrag
--- a/src/Makefrag  Wed Dec 10 03:29:15 2008 -0800
+++ b/src/Makefrag  Mon Apr 27 22:02:37 2009 -0700
@@ -1,9 +1,9 @@
 # Main top-level makefile fragment for the vx32 virtual machine.

 # Compiler flags common to both host and VX32 environment files.
-COMMON_CFLAGS = -g -O3 -MD -std=gnu99 -I. $(CFLAGS)
+COMMON_CFLAGS = -g -O3 -MD -std=gnu99 -I. $(CFLAGS) -m32
 #COMMON_CFLAGS = -g -MD -std=gnu99 -I. $(CFLAGS)
-COMMON_LDFLAGS = -g -L. $(LDFLAGS)
+COMMON_LDFLAGS = -g -L. $(LDFLAGS) -m32

 # Host environment compiler options
 HOST_CC:= $(CC)

Comments:
1. No, it can't find -lX11 even with a little hand-holding -L/usr/lib
to help it. Don't know, don't care...
2. It really seems to need HOST_LDFLAGS to work correctly on the
9vx/9vx link step.
3. It didn't work well for me unless I put -m32 on the COMMON_CFLAGS
4. I think what I'm doing with LDFLAGS is wrong wrong wrong

And, well, it builds. But it dies.

 9vx panic: user fault: signo=11 addr=0 [useraddr=28054000] read=1
eip=80c222a esp=d724cd5c
aborting, to dump core.

which is:
0x080c2228 vxrun+24:  mov%eax,%es
0x080c222a vxrun+26:  mov%eax,%ss

which makes sense I guess.

Anyway, I figure I'll go back and look some more. Probably reset my
changes first.

ron



Re: [9fans] The Olde 2e 'worthies' ... ?

2009-04-27 Thread Lyndon Nerenberg

I happen to have the license in front of me, what do you want to know?


I recall there was a registry of 2e license holders. For those of us 
wanting to swap code restricted by the old Labs 2e license, it was the way 
to determine if the proposed recipient was a valid license holder.


Again, this is all a rather fuzzy memory ...