Re: [9fans] 9vx patch to read environment var PLAN9

2010-04-16 Thread erik quanstrom
> > Plan 9 is not trying to be compatible to linux. > > What does this have to do with the present discussion? We are > discussing something which has to run on linux, and on *BSD and other > things: 9vx. sorry for adding to this thread. i think the original point is valid. while 9vx does l

Re: [9fans] 9vx patch to read environment var PLAN9

2010-04-16 Thread hiro
Your point is valid. Back to work... On 4/16/10, Ethan Grammatikidis wrote: > > On 15 Apr 2010, at 15:29, Balwinder S Dheeman wrote: >> >> Please don't compare apples with oranges. >> >> I'm sure you have not read, "Program design in the UNIX® environment" >> (http://werc.homelinux.net/links/ref

Re: [9fans] 9vx patch to read environment var PLAN9

2010-04-16 Thread Ethan Grammatikidis
On 15 Apr 2010, at 15:29, Balwinder S Dheeman wrote: Please don't compare apples with oranges. I'm sure you have not read, "Program design in the UNIX® environment" (http://werc.homelinux.net/links/reference_material/unix_prog_design.pdf ); these notes are still valid today and are applicab

Re: [9fans] 9vx patch to read environment var PLAN9

2010-04-16 Thread Ethan Grammatikidis
On 15 Apr 2010, at 16:38, hiro wrote: Plan 9 is not trying to be compatible to linux. What does this have to do with the present discussion? We are discussing something which has to run on linux, and on *BSD and other things: 9vx. -- Simplicity does not precede complexity, but follows i

Re: [9fans] 9vx patch to read environment var PLAN9

2010-04-15 Thread erik quanstrom
On Thu Apr 15 12:53:57 EDT 2010, yand...@mit.edu wrote: > Clearly, this calls for an XML-based configuration file, setting the > environment of each program at startup by patching gnulibc. > > I didn't have the energy to make a forced acronym for `bloat', so let's just > assume I did and that I

Re: [9fans] 9vx patch to read environment var PLAN9

2010-04-15 Thread Chad Brown
Clearly, this calls for an XML-based configuration file, setting the environment of each program at startup by patching gnulibc. I didn't have the energy to make a forced acronym for `bloat', so let's just assume I did and that I suggested the configuration files live in /etc/bloat, ok? *Chad

Re: [9fans] 9vx patch to read environment var PLAN9

2010-04-15 Thread hiro
Plan 9 is not trying to be compatible to linux. While some people make life on earth as exciting as possible, others are trying to fly to Mars. On 4/15/10, Balwinder S Dheeman wrote: > On 04/15/2010 03:46 PM, Ethan Grammatikidis wrote: >> >> On 15 Apr 2010, at 09:44, Balwinder S Dheeman wrote: >

Re: [9fans] 9vx patch to read environment var PLAN9

2010-04-15 Thread Balwinder S Dheeman
On 04/15/2010 03:46 PM, Ethan Grammatikidis wrote: > > On 15 Apr 2010, at 09:44, Balwinder S Dheeman wrote: > >> On 04/14/2010 09:55 PM, Ethan Grammatikidis wrote: >>> >>> I don't usually like to say "why bother", but given 9vx could be >>> launched with the appropriate parameter from a 2 line sh

Re: [9fans] 9vx patch to read environment var PLAN9

2010-04-15 Thread Devon H. O'Dell
2010/4/15 EBo : > >> Define reasonable. For me, that’s just 1 single spot. But it seems >> the Linux people are very insistent on Freedom meaning do what you >> want, even if it's against the build suggestions. >> I say stick to one hardcoded path, and make everyone else stop doing >> it their own

Re: [9fans] 9vx patch to read environment var PLAN9

2010-04-15 Thread EBo
> But the world isn't Linux. > http://www.freebsd.org/cgi/man.cgi?query=hier&sektion=7 I never said it was, but if you look at FeeBSD's /usr/local you will also see they are in agreement. EBo --

Re: [9fans] 9vx patch to read environment var PLAN9

2010-04-15 Thread EBo
> > Just to add more complications ;) > > Did you choose the word "complications" because in watchmaking it > denotes extra (and often near-pointless) features? :D Those watches are amazing! Speaking for simplicity, the first time I saw the Salisbury cathedral clock

Re: [9fans] 9vx patch to read environment var PLAN9

2010-04-15 Thread Ethan Grammatikidis
On 15 Apr 2010, at 09:44, Balwinder S Dheeman wrote: On 04/14/2010 09:55 PM, Ethan Grammatikidis wrote: On 13 Apr 2010, at 06:20, EBo wrote: Skip Tavakkolian <9...@9netics.com> said: but both of the hard-coded paths in 9vx main.c are obviously in RSC's home directories it's not hardcode

Re: [9fans] 9vx patch to read environment var PLAN9

2010-04-15 Thread Ethan Grammatikidis
On 15 Apr 2010, at 08:39, EBo wrote: Define reasonable. For me, that’s just 1 single spot. But it seems the Linux people are very insistent on Freedom meaning do what you want, even if it's against the build suggestions. I say stick to one hardcoded path, and make everyone else stop doing it

Re: [9fans] 9vx patch to read environment var PLAN9

2010-04-15 Thread Balwinder S Dheeman
On 04/14/2010 09:55 PM, Ethan Grammatikidis wrote: > > On 13 Apr 2010, at 06:20, EBo wrote: > >> Skip Tavakkolian <9...@9netics.com> said: >> but both of the hard-coded paths in 9vx main.c are obviously in RSC's home directories >>> >>> it's not hardcoded; >> >> What? The findroot

Re: [9fans] 9vx patch to read environment var PLAN9

2010-04-15 Thread Ethan Grammatikidis
On 15 Apr 2010, at 07:48, EBo wrote: what I had meant is simply that when a user tries to run a program which has been installed system wide it should simply work. A good goal, but I'm not sure an environment variable is a good way to achieve it. At the very least it means, in a typical Li

Re: [9fans] 9vx patch to read environment var PLAN9

2010-04-15 Thread EBo
> Define reasonable. For me, that’s just 1 single spot. But it seems > the Linux people are very insistent on Freedom meaning do what you > want, even if it's against the build suggestions. > I say stick to one hardcoded path, and make everyone else stop doing > it their own way, and stick to

Re: [9fans] 9vx patch to read environment var PLAN9

2010-04-14 Thread EBo
> I don't mind adding more directories to the list in findroot, > and something like /usr/local/9vx is certainly a better entry > in that list than /home/rsc/plan9/4e (sorry). no apologies necessary. I actually liked Ethan Grammatikidis' last comments regarding adding standard the standard locat

Re: [9fans] 9vx patch to read environment var PLAN9

2010-04-14 Thread Russ Cox
I don't mind adding more directories to the list in findroot, and something like /usr/local/9vx is certainly a better entry in that list than /home/rsc/plan9/4e (sorry). What I didn't understand was the rationale behind putting in a new environment variable when there is already a command-line opt

Re: [9fans] 9vx patch to read environment var PLAN9

2010-04-14 Thread Patrick Kelly
> I'm not so sure about /usr/lib or /usr/share. I'd tolerate both (I've stopped > caring about the unix filesystem hierarchy), but speaking as > a long-time Linux user they don't feel right, especially not /usr/share. > If you do put them in they probably won't draw any trouble as just hard-coded

Re: [9fans] 9vx patch to read environment var PLAN9

2010-04-14 Thread Ethan Grammatikidis
On 14 Apr 2010, at 19:38, EBo wrote: hardcode your own path and let the next sucker repeat the story fair enough, and now for the heart of the question that I have been dancing around all along (actually I thought it was obvious) -- what is the best way to fix this section of code so th

Re: [9fans] 9vx patch to read environment var PLAN9

2010-04-14 Thread EBo
> the point is that any default is bound to be wrong. my guess is that > '/home/rsc/...' default was introduced early in the development and > before '-r' was added. it might be more useful to lobby for a default > location like '/usr/lib/9vx'. > > secondly writing > > $ NINEROOT=/usr/ebo/9vxr

Re: [9fans] 9vx patch to read environment var PLAN9

2010-04-14 Thread EBo
> relax. it is unfortunte that there's too much resistance > to improving on the initial cut. Don't worry I'm relaxed, just seriously amazed and trying to figure this out. The issue that will eventually stress me out however is the fact that these discussions have hamstrung my productivity to p

Re: [9fans] 9vx patch to read environment var PLAN9

2010-04-14 Thread Skip Tavakkolian
>> I don't usually like to say "why bother", but given 9vx could be >> launched with the appropriate parameter from a 2 line shell script >> (including the #!), why are you even debating this? > > wow... I can understand people not liking checking the environmental > variables as it does incr

Re: [9fans] 9vx patch to read environment var PLAN9

2010-04-14 Thread EBo
> hardcode your own path and let the next sucker repeat the story fair enough, and now for the heart of the question that I have been dancing around all along (actually I thought it was obvious) -- what is the best way to fix this section of code so that we can be done with it once and for all?

Re: [9fans] 9vx patch to read environment var PLAN9

2010-04-14 Thread erik quanstrom
> > I don't usually like to say "why bother", but given 9vx could be > > launched with the appropriate parameter from a 2 line shell script > > (including the #!), why are you even debating this? > > wow... I can understand people not liking checking the environmental > variables as it does i

Re: [9fans] 9vx patch to read environment var PLAN9

2010-04-14 Thread lucio
> hardcode your own path and let the next sucker repeat the story I dunno, it would seem to me that the sequence: -r option? yes: use argument no: $NINEROOT set? yes: use value no: use $HOME/9vx (or somesuch) would be pretty much acceptable. I gue

Re: [9fans] 9vx patch to read environment var PLAN9

2010-04-14 Thread Federico G. Benavento
hardcode your own path and let the next sucker repeat the story On Wed, Apr 14, 2010 at 3:10 PM, EBo wrote: > >> I don't usually like to say "why bother", but given 9vx could be >> launched with the appropriate parameter from a 2 line shell script >> (including the #!), why are you even debating

Re: [9fans] 9vx patch to read environment var PLAN9

2010-04-14 Thread EBo
> I don't usually like to say "why bother", but given 9vx could be > launched with the appropriate parameter from a 2 line shell script > (including the #!), why are you even debating this? wow... I can understand people not liking checking the environmental variables as it does increase the

Re: [9fans] 9vx patch to read environment var PLAN9

2010-04-14 Thread Ethan Grammatikidis
On 13 Apr 2010, at 06:20, EBo wrote: Skip Tavakkolian <9...@9netics.com> said: but both of the hard-coded paths in 9vx main.c are obviously in RSC's home directories it's not hardcoded; What? The findroot code reads: static char* findroot(void) { static char cwd[1024];

Re: [9fans] 9vx patch to read environment var PLAN9

2010-04-12 Thread EBo
> >> > What? The findroot code reads: > >> > >> read the code again; findroot doesn't come into play. > > > > it most certainly does! > > the whole point was that given -r, findroot doesn't come into play. > > if NINEROOT is not set, what does your version of 9vx do (without -r)? In short i

Re: [9fans] 9vx patch to read environment var PLAN9

2010-04-12 Thread Skip Tavakkolian
>> > What? The findroot code reads: >> >> read the code again; findroot doesn't come into play. > > it most certainly does! the whole point was that given -r, findroot doesn't come into play. if NINEROOT is not set, what does your version of 9vx do (without -r)?

Re: [9fans] 9vx patch to read environment var PLAN9

2010-04-12 Thread EBo
Skip Tavakkolian <9...@9netics.com> said: > > What? The findroot code reads: > > read the code again; findroot doesn't come into play. it most certainly does! in main... if(!bootboot){ if(localroot == nil && (localroot = findroot()) == nil) pani

Re: [9fans] 9vx patch to read environment var PLAN9

2010-04-12 Thread Skip Tavakkolian
> What? The findroot code reads: read the code again; findroot doesn't come into play.

Re: [9fans] 9vx patch to read environment var PLAN9

2010-04-12 Thread EBo
Skip Tavakkolian <9...@9netics.com> said: > > but both > > of the hard-coded paths in 9vx main.c are obviously in RSC's home > > directories > > it's not hardcoded; What? The findroot code reads: static char* findroot(void) { static char cwd[1024]; int i; char buf[102

Re: [9fans] 9vx patch to read environment var PLAN9

2010-04-12 Thread Skip Tavakkolian
> but both > of the hard-coded paths in 9vx main.c are obviously in RSC's home directories it's not hardcoded; you can use -r as Russ said. the difference is: "use default unless -r is given" vs. "use default unless getenv(NINEROOT) is given". -r makes it very obvious what the root is and proba

Re: [9fans] 9vx patch to read environment var PLAN9

2010-04-12 Thread erik quanstrom
> That is what I did for the first prototype. I thought this would be a beeter > solution. > > Out of curiosity, have I hit a nerve or something. Have I somehow offended? > I'm just a bit confused by some of the responses. no. i don't think anyone's offended. and i personally think the env v

Re: [9fans] 9vx patch to read environment var PLAN9

2010-04-12 Thread EBo
Francisco J Ballesteros said: > you could also use a script to call 9vx as you please. That is what I did for the first prototype. I thought this would be a beeter solution. Out of curiosity, have I hit a nerve or something. Have I somehow offended? I'm just a bit confused by some of the res

Re: [9fans] 9vx patch to read environment var PLAN9

2010-04-12 Thread Francisco J Ballesteros
you could also use a script to call 9vx as you please. On Mon, Apr 12, 2010 at 5:22 AM, EBo wrote: > >> Why isn't 9vx -r yourdir good enough? > > it is if you want to force all users to specify the root directory every > single time they run 9vx, or if you want to use an alternative root.  If I

Re: [9fans] 9vx patch to read environment var PLAN9

2010-04-11 Thread EBo
> Why isn't 9vx -r yourdir good enough? it is if you want to force all users to specify the root directory every single time they run 9vx, or if you want to use an alternative root. If I use a standard install locations then we can either change "/Users/rsc/9vx" and "/home/rsc/plan9/4e" or I can

Re: [9fans] 9vx patch to read environment var PLAN9

2010-04-11 Thread Russ Cox
Why isn't 9vx -r yourdir good enough? Russ

Re: [9fans] 9vx patch to read environment var PLAN9

2010-04-11 Thread EBo
> I was going to suggest that, but you can't start env. var. names with > numbers in many shells. That's why I named it vx9root (not to screem). ;-) > > and there's no reason to shout.  :-)

Re: [9fans] 9vx patch to read environment var PLAN9

2010-04-11 Thread erik quanstrom
> I was going to suggest that, but you can't start env. var. names with > numbers in many shells. i'd forgotten about that. unix really has gotten crunchy. - erik

Re: [9fans] 9vx patch to read environment var PLAN9

2010-04-11 Thread Devon H. O'Dell
2010/4/11 erik quanstrom : >> Agreed. PLAN9ROOT seems good. > > suggest 9vxroot instead.  there are enough plan9y > things floating around that it makes sense to me > to specify which plan9y root you're talking about. I was going to suggest that, but you can't start env. var. names with numbers in

Re: [9fans] 9vx patch to read environment var PLAN9

2010-04-11 Thread EBo
Got it! Changed. I'll also change it along the lines of Erik's suggestion. As a note, I thought that 9vx ran on top of the p9p stuff. Thanks again, EBo -- "Devon H. O'Dell" said: > 2010/4/11 EBo : > > I thought p9p uses it for the root of the Plan 9 tree?  At least that is > > what >

Re: [9fans] 9vx patch to read environment var PLAN9

2010-04-11 Thread Devon H. O'Dell
2010/4/11 EBo : > I thought p9p uses it for the root of the Plan 9 tree?  At least that is what > the ebuilds imply.  Maybe I am using the wrong term for what PLAN9 points to. That's true, but in the case of 9vx, the tree it points to contains actual plan 9 binaries, whereas p9p binaries are compi

Re: [9fans] 9vx patch to read environment var PLAN9

2010-04-11 Thread erik quanstrom
> Agreed. PLAN9ROOT seems good. suggest 9vxroot instead. there are enough plan9y things floating around that it makes sense to me to specify which plan9y root you're talking about. and there's no reason to shout. :-) - erik

Re: [9fans] 9vx patch to read environment var PLAN9

2010-04-11 Thread EBo
I thought p9p uses it for the root of the Plan 9 tree? At least that is what the ebuilds imply. Maybe I am using the wrong term for what PLAN9 points to. EBo -- erik quanstrom said: > recommend using a different environment variable > other than PLAN9, since that is taken by p9p to mean >

Re: [9fans] 9vx patch to read environment var PLAN9

2010-04-11 Thread Devon H. O'Dell
2010/4/11 erik quanstrom : > recommend using a different environment variable > other than PLAN9, since that is taken by p9p to mean > something else. Agreed. PLAN9ROOT seems good. --dho > - erik > >

Re: [9fans] 9vx patch to read environment var PLAN9

2010-04-11 Thread erik quanstrom
recommend using a different environment variable other than PLAN9, since that is taken by p9p to mean something else. - erik

[9fans] 9vx patch to read environment var PLAN9

2010-04-11 Thread EBo
The following is a little patch to 9vx which uses getenv to read the environmental variable PLAN9 to set "plan 9 root" on startup if it has not been overloaded on the command line or in the CWD. I would enjoy any feedback. Best regards, EBo --