From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 Date: Wed, 23 Feb 2011 11:39:48 +0100 Message-ID: From: hugo rivera To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: text/plain; charset=UTF-8 Subject: [9fans] acme Local command on p9p Topicbox-Message-UUID: b37238a4-ead6-11e9-9d60-3106f5b1d025 Hello, the man page for acme on p9p reads Local In the Plan 9 acme, this prefix causes a command to be run in acme'sown file name space and environment variable group. On Unix this is impossible... is there any other way to define environment variables for acme while it's running? On plan9, Local var=val sets var and then all other commands I execute with a middle click see $var. On some ocasions this is very useful. -- Hugo From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: References: Date: Wed, 23 Feb 2011 12:21:32 +0100 Message-ID: From: Gabriel Diaz To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: multipart/alternative; boundary=000e0cd30af68bf734049cf14c1d Subject: Re: [9fans] acme Local command on p9p Topicbox-Message-UUID: b3792862-ead6-11e9-9d60-3106f5b1d025 --000e0cd30af68bf734049cf14c1d Content-Type: text/plain; charset=ISO-8859-1 hello probably there are a better ways, like rc maintainng a `namespace`/env fs, so it reads that fs creating the environment correspondant to that namespace when started or simmiliar, but in lunix way (and with other shells) you can use one script to launch acme that executes the arguments of the Local script after the acme launch :-? start_acme.sh #/bin/bash acme & while a=read(named_pipe_or_simmilar); do $a done; And Local #!/bin/bash echo $* > named_pipe_or_simmilar So Local export var=var could make var available Also not sure if plumber would help you instead of using pipes. My corporate pc barely allows me to reply emails, so this is not tested ;) gabi On Wed, Feb 23, 2011 at 11:39 AM, hugo rivera wrote: > Hello, > the man page for acme on p9p reads > > Local In the Plan 9 acme, this prefix causes a command to be run in > acme'sown file name space and environment variable group. On > Unix this is impossible... > > is there any other way to define environment variables for acme while > it's running? > On plan9, Local var=val sets var and then all other commands I execute > with a middle click see $var. On some ocasions this is very useful. > > -- > Hugo > > --000e0cd30af68bf734049cf14c1d Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
hello

probably there are a better ways, l= ike rc maintainng a `namespace`/env fs, so it reads that fs creating the en= vironment correspondant to that namespace when started or simmiliar, but in= lunix way (and with other shells) you can use one script to launch acme th= at executes the arguments of the Local script after the acme launch :-?

start_acme.sh
#/bin/bash

=
acme &
while a=3Dread(named_pipe_or_simmilar); do
<= div>=A0 =A0$a
done;


And L= ocal
#!/bin/bash
echo $* > named_pipe_or_simmilar
So Local export var=3Dvar could make var available
<= br>
Also not sure if plumber would help you instead of using pipe= s.

My corporate pc barely allows me to reply emails, so th= is is not tested ;)

gabi


<= div class=3D"gmail_quote">On Wed, Feb 23, 2011 at 11:39 AM, hugo rivera <uair00@gmail.com= > wrote:
Hello,
the man page for acme on p9p reads

Local In the Plan 9 acme, this prefix causes a command to be run in
acme'sown file name space and environment variable group. On
Unix this is impossible...

is there any other way to define environment variables for acme while
it's running?
On plan9, Local var=3Dval sets var and then all other commands I execute with a middle click see $var. On some ocasions this is very useful.

--
Hugo


--000e0cd30af68bf734049cf14c1d-- From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: References: Date: Wed, 23 Feb 2011 14:13:03 +0100 Message-ID: From: hugo rivera To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [9fans] acme Local command on p9p Topicbox-Message-UUID: b382eaa0-ead6-11e9-9d60-3106f5b1d025 That doesn't work. I think it's because the environment variables that acme sees are those that already existed when it was called, and not those created afterwards. 2011/2/23 Gabriel Diaz : > hello > > probably there are a better ways, like rc maintainng a `namespace`/env fs= , > so it reads that fs creating the environment correspondant to that namesp= ace > when started or simmiliar, but in lunix way (and with other shells) you c= an > use one script to launch acme that executes the arguments of the Local > script after the acme launch :-? > start_acme.sh > #/bin/bash > acme & > while a=3Dread(named_pipe_or_simmilar); do > =C2=A0 =C2=A0$a > done; > > And Local > #!/bin/bash > echo $* > named_pipe_or_simmilar > So Local export var=3Dvar could make var available > Also not sure if plumber would help you instead of using pipes. > My corporate pc barely allows me to reply emails, so this is not tested ;= ) > gabi > > On Wed, Feb 23, 2011 at 11:39 AM, hugo rivera wrote: >> >> Hello, >> the man page for acme on p9p reads >> >> Local In the Plan 9 acme, this prefix causes a command to be run in >> acme'sown file name space and environment variable group. On >> Unix this is impossible... >> >> is there any other way to define environment variables for acme while >> it's running? >> On plan9, Local var=3Dval sets var and then all other commands I execute >> with a middle click see $var. On some ocasions this is very useful. >> >> -- >> Hugo >> > > --=20 Hugo From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: References: Date: Wed, 23 Feb 2011 08:32:11 -0500 Message-ID: Subject: Re: [9fans] acme Local command on p9p From: Russ Cox To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Cc: hugo rivera Content-Type: text/plain; charset=UTF-8 Topicbox-Message-UUID: b38afc90-ead6-11e9-9d60-3106f5b1d025 > Local In the Plan 9 acme, this prefix causes a command to be run in > acme'sown file name space and environment variable group. On > Unix this is impossible... > > is there any other way to define environment variables for acme while > it's running? > On plan9, Local var=val sets var and then all other commands I execute > with a middle click see $var. On some ocasions this is very useful. It might be a good idea to change the implementation of Local to look for the two forms name=value... cd directory and implement only those. Please file an issue. Russ From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: References: Date: Wed, 23 Feb 2011 15:34:43 +0100 Message-ID: From: Gabriel Diaz To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: multipart/alternative; boundary=000e0cd598ba7738eb049cf3ff59 Subject: Re: [9fans] acme Local command on p9p Topicbox-Message-UUID: b39267d2-ead6-11e9-9d60-3106f5b1d025 --000e0cd598ba7738eb049cf3ff59 Content-Type: text/plain; charset=ISO-8859-1 yes you will need something like Local echo $var to get the value back i guess, which indeed will make the whole thing less convenient at least. gabi On Wed, Feb 23, 2011 at 2:13 PM, hugo rivera wrote: > That doesn't work. I think it's because the environment variables that > acme sees are those that already existed when it was called, and not > those created afterwards. > > 2011/2/23 Gabriel Diaz : > > hello > > > > probably there are a better ways, like rc maintainng a `namespace`/env > fs, > > so it reads that fs creating the environment correspondant to that > namespace > > when started or simmiliar, but in lunix way (and with other shells) you > can > > use one script to launch acme that executes the arguments of the Local > > script after the acme launch :-? > > start_acme.sh > > #/bin/bash > > acme & > > while a=read(named_pipe_or_simmilar); do > > $a > > done; > > > > And Local > > #!/bin/bash > > echo $* > named_pipe_or_simmilar > > So Local export var=var could make var available > > Also not sure if plumber would help you instead of using pipes. > > My corporate pc barely allows me to reply emails, so this is not tested > ;) > > gabi > > > > On Wed, Feb 23, 2011 at 11:39 AM, hugo rivera wrote: > >> > >> Hello, > >> the man page for acme on p9p reads > >> > >> Local In the Plan 9 acme, this prefix causes a command to be run in > >> acme'sown file name space and environment variable group. On > >> Unix this is impossible... > >> > >> is there any other way to define environment variables for acme while > >> it's running? > >> On plan9, Local var=val sets var and then all other commands I execute > >> with a middle click see $var. On some ocasions this is very useful. > >> > >> -- > >> Hugo > >> > > > > > > > > -- > Hugo > > --000e0cd598ba7738eb049cf3ff59 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
yes you will need something like Local echo $var to get the value back= i guess, which indeed will make the whole thing less convenient at least.<= br>

gabi


On Wed, Feb 23, 2011 at 2:13 PM, hugo rivera <uair00@gmail.com> wrote:
That doesn't work. I think it's because the environment variables t= hat
acme sees are those that already existed when it was called, and not
those created afterwards.

2011/2/23 Gabriel Diaz <gdiaz@9grid.es= >:
> hello
>
> probably there are a better ways, like rc maintainng a `namespace`/env= fs,
> so it reads that fs creating the environment correspondant to that nam= espace
> when started or simmiliar, but in lunix way (and with other shells) yo= u can
> use one script to launch acme that executes the arguments of the Local=
> script after the acme launch :-?
> start_acme.sh
> #/bin/bash
> acme &
> while a=3Dread(named_pipe_or_simmilar); do
> =A0 =A0$a
> done;
>
> And Local
> #!/bin/bash
> echo $* > named_pipe_or_simmilar
> So Local export var=3Dvar could make var available
> Also not sure if plumber would help you instead of using pipes.
> My corporate pc barely allows me to reply emails, so this is not teste= d ;)
> gabi
>
> On Wed, Feb 23, 2011 at 11:39 AM, hugo rivera <uair00@gmail.com> wrote:
>>
>> Hello,
>> the man page for acme on p9p reads
>>
>> Local In the Plan 9 acme, this prefix causes a command to be run i= n
>> acme'sown file name space and environment variable group. On >> Unix this is impossible...
>>
>> is there any other way to define environment variables for acme wh= ile
>> it's running?
>> On plan9, Local var=3Dval sets var and then all other commands I e= xecute
>> with a middle click see $var. On some ocasions this is very useful= .
>>
>> --
>> Hugo
>>
>
>



--
Hugo


--000e0cd598ba7738eb049cf3ff59-- From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: References: From: Rob Pike Date: Wed, 23 Feb 2011 08:57:00 -0800 Message-ID: Subject: Re: [9fans] acme Local command on p9p To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Cc: Russ Cox Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Topicbox-Message-UUID: b39a7f44-ead6-11e9-9d60-3106f5b1d025 On Wed, Feb 23, 2011 at 5:32 AM, Russ Cox wrote: >> Local In the Plan 9 acme, this prefix causes a command to be run in >> acme'sown file name space and environment variable group. On >> Unix this is impossible... >> >> is there any other way to define environment variables for acme while >> it's running? >> On plan9, Local var=3Dval sets var and then all other commands I execute >> with a middle click see $var. On some ocasions this is very useful. > > It might be a good idea to change the implementation of Local > to look for the two forms > > =A0 =A0name=3Dvalue... > =A0 =A0cd directory > > and implement only those. =A0Please file an issue. > > Russ I'm unsure if this conversation is about Plan 9 or plan9port, but in any case I've used Local for lots of other things on Plan 9, particularly name space manipulations. There, I don't understand why it needs restrictions. Or are you just saying that on plan9port you need to do magic so you might as well catalog the tricks? In that case, I understand. -rob From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: References: Date: Wed, 23 Feb 2011 12:09:42 -0500 Message-ID: Subject: Re: [9fans] acme Local command on p9p From: Russ Cox To: Rob Pike Cc: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Topicbox-Message-UUID: b3a882c4-ead6-11e9-9d60-3106f5b1d025 > I'm unsure if this conversation is about Plan 9 or plan9port, but in > any case I've used Local for lots of other things on Plan 9, > particularly name space manipulations. =C2=A0There, I don't understand wh= y > it needs restrictions. > > Or are you just saying that on plan9port you need to do magic so you > might as well catalog the tricks? =C2=A0In that case, I understand. Yes, the idea is that on plan9port you might change the implementation of Local to pick off var=3Dvalue and cd path and run those internally. It could still shell out for other commands like Local echo $foo. Russ From mboxrd@z Thu Jan 1 00:00:00 1970 From: dexen deVries To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Date: Wed, 23 Feb 2011 18:35:41 +0100 User-Agent: KMail/1.13.5 (Linux/2.6.38-rc5-19+; KDE/4.5.5; x86_64; ; ) References: In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <201102231835.41505.dexen.devries@gmail.com> Subject: Re: [9fans] acme Local command on p9p Topicbox-Message-UUID: b3b66d76-ead6-11e9-9d60-3106f5b1d025 On Wednesday 23 of February 2011 18:09:42 Russ Cox wrote: > > I'm unsure if this conversation is about Plan 9 or plan9port, but in > > any case I've used Local for lots of other things on Plan 9, > > particularly name space manipulations. There, I don't understand why > > it needs restrictions. > >=20 > > Or are you just saying that on plan9port you need to do magic so you > > might as well catalog the tricks? In that case, I understand. >=20 > Yes, the idea is that on plan9port you might change > the implementation of Local to pick off var=3Dvalue > and cd path and run those internally. It could still > shell out for other commands like Local echo $foo. How about reading /proc/$pid/environ (where $pid is the shell spawned for=20 command execution) before the $pid exits and transfering all the environmen= t=20 variables back to the Acme's own environment? I'm not sure, but I think that /proc/$pid/environ should be accessible for= =20 Acme after exit() by the $pid, but before Acme's waitpid($pid, ...) complet= es. =2D-=20 dexen deVries [[[=E2=86=93][=E2=86=92]]] > how does a C compiler get to be that big? what is all that code doing? iterators, string objects, and a full set of C macros that ensure boundary conditions and improve interfaces. ron minnich, in response to Charles Forsyth http://9fans.net/archive/2011/02/90 From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: <201102231835.41505.dexen.devries@gmail.com> References: <201102231835.41505.dexen.devries@gmail.com> Date: Fri, 25 Feb 2011 10:32:27 -0500 Message-ID: Subject: Re: [9fans] acme Local command on p9p From: Russ Cox To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Cc: dexen deVries Content-Type: text/plain; charset=UTF-8 Topicbox-Message-UUID: b4d66dbe-ead6-11e9-9d60-3106f5b1d025 > 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 to the Acme's own environment? plan9port runs in more places than linux. From mboxrd@z Thu Jan 1 00:00:00 1970 From: dexen deVries To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Date: Fri, 25 Feb 2011 16:44:49 +0100 User-Agent: KMail/1.13.5 (Linux/2.6.38-rc5-19+; KDE/4.5.5; x86_64; ; ) References: <201102231835.41505.dexen.devries@gmail.com> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <201102251644.49564.dexen.devries@gmail.com> Subject: Re: [9fans] acme Local command on p9p Topicbox-Message-UUID: b4ddcf50-ead6-11e9-9d60-3106f5b1d025 On Friday 25 of February 2011 16:32:27 you wrote: > > How about reading /proc/$pid/environ (where $pid is the shell spawned f= or > > command execution) before the $pid exits and transfering all the > > environment variables back to the Acme's own environment? >=20 > plan9port runs in more places than linux. and which ones don't provide /proc/$pid/environ? =2D-=20 dexen deVries [[[=E2=86=93][=E2=86=92]]] > how does a C compiler get to be that big? what is all that code doing? iterators, string objects, and a full set of C macros that ensure boundary conditions and improve interfaces. ron minnich, in response to Charles Forsyth http://9fans.net/archive/2011/02/90 From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: <201102251644.49564.dexen.devries@gmail.com> References: <201102231835.41505.dexen.devries@gmail.com> <201102251644.49564.dexen.devries@gmail.com> Date: Fri, 25 Feb 2011 15:51:05 +0000 Message-ID: From: roger peppe To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [9fans] acme Local command on p9p Topicbox-Message-UUID: b4eb2718-ead6-11e9-9d60-3106f5b1d025 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 to the Acme's own environment? >> >> plan9port runs in more places than linux. > > and which ones don't provide /proc/$pid/environ? > > -- > dexen deVries > > [[[=E2=86=93][=E2=86=92]]] > >> how does a C compiler get to be that big? what is all that code doing? > > iterators, string objects, and a full set of C macros that ensure > boundary conditions and improve interfaces. > > ron minnich, in response to Charles Forsyth > > http://9fans.net/archive/2011/02/90 > > From mboxrd@z Thu Jan 1 00:00:00 1970 References: <201102231835.41505.dexen.devries@gmail.com> <201102251644.49564.dexen.devries@gmail.com> In-Reply-To: <201102251644.49564.dexen.devries@gmail.com> Mime-Version: 1.0 (iPhone Mail 8C148) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Message-Id: <60C81DF0-8A39-4918-817D-B8142E0FC421@gmail.com> Cc: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> From: David Leimbach Date: Fri, 25 Feb 2011 11:01:03 -0800 To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Subject: Re: [9fans] acme Local command on p9p Topicbox-Message-UUID: b50369cc-ead6-11e9-9d60-3106f5b1d025 Sent from my iPhone On Feb 25, 2011, at 7:44 AM, 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 fo= r >>> command execution) before the $pid exits and transfering all the >>> environment variables back to the Acme's own environment? >>=20 >> plan9port runs in more places than linux. >=20 > and which ones don't provide /proc/$pid/environ? Mac >=20 > --=20 > dexen deVries >=20 > [[[=E2=86=93][=E2=86=92]]] >=20 >> how does a C compiler get to be that big? what is all that code doing? >=20 > iterators, string objects, and a full set of C macros that ensure > boundary conditions and improve interfaces. >=20 > ron minnich, in response to Charles Forsyth >=20 > http://9fans.net/archive/2011/02/90 >=20