9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] plan9port: recent changes
@ 2005-02-14  0:41 Russ Cox
  2005-02-14 19:09 ` [9fans] " Russ Cox
  0 siblings, 1 reply; 9+ messages in thread
From: Russ Cox @ 2005-02-14  0:41 UTC (permalink / raw)
  To: 9fans

Lots of little changes in the past week or so: autoindent for sam,
better label handling in awd et al., new diff flags -c and -a,
various stack overflow fixes (*cough* X11 *cough*), programs
should work better with SIGTSTP, SIGTTIN, and SIGTTOU,
lots of little bug fixes.

The big new additions are factotum and various supporting
libraries and programs.

Thanks to Lucho, plan9port now has a working factotum
that can be used with 9p to access files on protected servers:

	ibook=; factotum
	ibook=; sources='tcp!sources.cs.bell-labs.com!9fs'
	ibook=; 9p -a $sources read plan9/adm/users

	!adding key: role=client proto=p9sk1 dom=outside.plan9.bell-labs.com
	user[rsc]: bozo
	password:
	!
	-1:adm:adm:bootes
	0:none:adm:
	1:tor:tor:
	2:glenda:glenda:
	9999:noworld::
	10000:sys::
	10001:upas:upas:
	10002:bootes:bootes:
	ibook=; 9p -a $sources read plan9/NOTICE
	Copyright © 2002 Lucent Technologies Inc.
	All Rights Reserved
	ibook=; 

Over the weekend I added DSA and RSA signature support
to factotum and used them to implement an ssh-agent front
end for factotum:

	l=; factotum
	secstore password: 
	l=; eval `{9 ssh-agent}
	l=; ssh tux
	tux=; ^D
	l=; 

It's hard to see, but ssh used factotum via the ssh-agent
interface to authenticate to tux.  Also hard to see is the fact
that this is using SSH version 2 keys (SSH1 is also supported),
so this setup is ahead of Plan 9.

(Sadly, it's not too easy to move the DSA and RSA support back
into Plan 9, firstly due to the lack of an SSH2 client.  Also the 
factotum is completely different--simpler--inside.)

Enjoy.
Russ


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [9fans] Re: plan9port: recent changes
  2005-02-14  0:41 [9fans] plan9port: recent changes Russ Cox
@ 2005-02-14 19:09 ` Russ Cox
  2005-02-14 20:31   ` Bruce Ellis
  0 siblings, 1 reply; 9+ messages in thread
From: Russ Cox @ 2005-02-14 19:09 UTC (permalink / raw)
  To: 9fans

A few people have reported that running acme and exiting
leaves behind a 9pserve process with the effect that you can't
run acme a second time.  I believe I just checked in a fix to this bug,
which I introduced trying to work around the pthread nonsense
we were discussing last week.  After updating from CVS, you'll
have to rebuild libthread and then 9pserve (or just use
cd $PLAN9; ./INSTALL -- it's still much faster than compiling the
Linux kernel).

It's worth noting for everyone that you can't run two acmes in
the same "name space" since they'll both want to post as the Unix
socket `namespace`/acme.  If you want to start a new "name space"
you can set $NAMESPACE manually, as in

    mkdir /tmp/ns; NAMESPACE=/tmp/ns; export NAMESPACE

and then you'll have a separate acme that is isolated from the
first (and from the plumber that the first acme is using).

Intro(4) has details.

Setting $NAMESPACE also lets you run file servers before you
start X and share them with your X session.  For example, in my
.profile I have the following:

# Logging in on tty1 sets up factotum and then runs X automatically
if [ "`/bin/ls -l /proc/self/fd/0 2>/dev/null | awk '{print $NF}'`" =
'/dev/tty1' ]
then
	NAMESPACE=/tmp/ns.`hostname`
	export NAMESPACE
	rm -rf $NAMESPACE; mkdir $NAMESPACE
	9 factotum
	eval `9 ssh-agent -e`
	startx
fi

I have to start factotum and ssh-agent before X because I run
stats to remote machines (via ssh) in my .xinitrc, and so that
the $SSH_AUTH_SOCK variable is set in all my X windows.

Russ


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [9fans] Re: plan9port: recent changes
  2005-02-14 19:09 ` [9fans] " Russ Cox
@ 2005-02-14 20:31   ` Bruce Ellis
  2005-02-14 20:49     ` Russ Cox
  0 siblings, 1 reply; 9+ messages in thread
From: Bruce Ellis @ 2005-02-14 20:31 UTC (permalink / raw)
  To: Russ Cox, Fans of the OS Plan 9 from Bell Labs

i don't like autoindent ... it always seems to do what i don't
want it to do, the tab key is big, and i don't write deeply
nested code.  but if you do - fine ... make it an option (i hate
thousands of options too).

good to see a prolifertion of factota - the ozinferno one is even
simpler than the original, but loads modules on demand to do
the good stuff.

brucee

On Mon, 14 Feb 2005 14:09:34 -0500, Russ Cox <russcox@gmail.com> wrote:
> A few people have reported that running acme and exiting
> leaves behind a 9pserve process with the effect that you can't
> run acme a second time.  I believe I just checked in a fix to this bug,
> which I introduced trying to work around the pthread nonsense
> we were discussing last week.  After updating from CVS, you'll
> have to rebuild libthread and then 9pserve (or just use
> cd $PLAN9; ./INSTALL -- it's still much faster than compiling the
> Linux kernel).
>
> It's worth noting for everyone that you can't run two acmes in
> the same "name space" since they'll both want to post as the Unix
> socket `namespace`/acme.  If you want to start a new "name space"
> you can set $NAMESPACE manually, as in
>
>    mkdir /tmp/ns; NAMESPACE=/tmp/ns; export NAMESPACE
>
> and then you'll have a separate acme that is isolated from the
> first (and from the plumber that the first acme is using).
>
> Intro(4) has details.
>
> Setting $NAMESPACE also lets you run file servers before you
> start X and share them with your X session.  For example, in my
> .profile I have the following:
>
> # Logging in on tty1 sets up factotum and then runs X automatically
> if [ "`/bin/ls -l /proc/self/fd/0 2>/dev/null | awk '{print $NF}'`" =
> '/dev/tty1' ]
> then
>        NAMESPACE=/tmp/ns.`hostname`
>        export NAMESPACE
>        rm -rf $NAMESPACE; mkdir $NAMESPACE
>        9 factotum
>        eval `9 ssh-agent -e`
>        startx
> fi
>
> I have to start factotum and ssh-agent before X because I run
> stats to remote machines (via ssh) in my .xinitrc, and so that
> the $SSH_AUTH_SOCK variable is set in all my X windows.
>
> Russ
>


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [9fans] Re: plan9port: recent changes
  2005-02-14 20:31   ` Bruce Ellis
@ 2005-02-14 20:49     ` Russ Cox
  2005-02-14 21:03       ` Skip Tavakkolian
                         ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Russ Cox @ 2005-02-14 20:49 UTC (permalink / raw)
  To: 9fans

> i don't like autoindent ... it always seems to do what i don't
> want it to do, the tab key is big, and i don't write deeply
> nested code.  but if you do - fine ... make it an option (i hate
> thousands of options too).

it's not the usual "guess where my cursor should be" autoindent.
when you type newline, it initializes the new line by copying the
leading white space from the previous line.  it's more of a
persistent indent than autoindent.  in any case, it's the first one
i've ever used that felt natural.

russ


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [9fans] Re: plan9port: recent changes
  2005-02-14 20:49     ` Russ Cox
@ 2005-02-14 21:03       ` Skip Tavakkolian
  2005-02-15  3:28         ` Andrew Simmons
  2005-02-15  7:20       ` Tiit Lankots
  2005-02-15  9:51       ` David Tolpin
  2 siblings, 1 reply; 9+ messages in thread
From: Skip Tavakkolian @ 2005-02-14 21:03 UTC (permalink / raw)
  To: 9fans

Is anyone working on a win32 port?  9pm is showing
its age (but still better than cmd or cygwin).

>> i don't like autoindent ... it always seems to do what i don't
>> want it to do, the tab key is big, and i don't write deeply
>> nested code.  but if you do - fine ... make it an option (i hate
>> thousands of options too).
>
> it's not the usual "guess where my cursor should be" autoindent.
> when you type newline, it initializes the new line by copying the
> leading white space from the previous line.  it's more of a
> persistent indent than autoindent.  in any case, it's the first one
> i've ever used that felt natural.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [9fans] Re: plan9port: recent changes
  2005-02-14 21:03       ` Skip Tavakkolian
@ 2005-02-15  3:28         ` Andrew Simmons
  2005-02-15  3:39           ` Russ Cox
  0 siblings, 1 reply; 9+ messages in thread
From: Andrew Simmons @ 2005-02-15  3:28 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

I occasionally have a look at it. The likes of libfmt/libutf/libregexp
build pretty much straight out of the box, but I can't get over the hurdle
of libdraw, which I'm too lazy/ignorant/stupid/busy to make much headway
on. Would the drawterm implementation provide any pointers as to how to
proceed? The X version in drawterm seems at first sight quite different
from the plan9port version.

>Is anyone working on a win32 port?  9pm is showing
>its age (but still better than cmd or cygwin).




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [9fans] Re: plan9port: recent changes
  2005-02-15  3:28         ` Andrew Simmons
@ 2005-02-15  3:39           ` Russ Cox
  0 siblings, 0 replies; 9+ messages in thread
From: Russ Cox @ 2005-02-15  3:39 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

> I occasionally have a look at it. The likes of libfmt/libutf/libregexp
> build pretty much straight out of the box, but I can't get over the hurdle
> of libdraw, which I'm too lazy/ignorant/stupid/busy to make much headway
> on. Would the drawterm implementation provide any pointers as to how to
> proceed? The X version in drawterm seems at first sight quite different
> from the plan9port version.

They're very similar.  You may need to look past initdraw.

Russ


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [9fans] Re: plan9port: recent changes
  2005-02-14 20:49     ` Russ Cox
  2005-02-14 21:03       ` Skip Tavakkolian
@ 2005-02-15  7:20       ` Tiit Lankots
  2005-02-15  9:51       ` David Tolpin
  2 siblings, 0 replies; 9+ messages in thread
From: Tiit Lankots @ 2005-02-15  7:20 UTC (permalink / raw)
  To: Russ Cox, Fans of the OS Plan 9 from Bell Labs

> it's not the usual "guess where my cursor should be" autoindent.
> when you type newline, it initializes the new line by copying the
> leading white space from the previous line.  it's more of a
> persistent indent than autoindent.  in any case, it's the first one
> i've ever used that felt natural.

It's the only kind any right-minded editor would sport.




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [9fans] Re: plan9port: recent changes
  2005-02-14 20:49     ` Russ Cox
  2005-02-14 21:03       ` Skip Tavakkolian
  2005-02-15  7:20       ` Tiit Lankots
@ 2005-02-15  9:51       ` David Tolpin
  2 siblings, 0 replies; 9+ messages in thread
From: David Tolpin @ 2005-02-15  9:51 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs, Russ Cox


On 15.02.2005, at 0:49, Russ Cox wrote:

>> i don't like autoindent ... it always seems to do what i don't
>> want it to do, the tab key is big, and i don't write deeply
>> nested code.  but if you do - fine ... make it an option (i hate
>> thousands of options too).
>
> it's not the usual "guess where my cursor should be" autoindent.
> when you type newline, it initializes the new line by copying the
> leading white space from the previous line.  it's more of a
> persistent indent than autoindent.  in any case, it's the first one
> i've ever used that felt natural.

Yes, it's a good edition to Sam. I had implemented it over a year ago
(and was beaten for that on 9fans), and using Sam for programming is
much easier with it. I still use the old unix port of Sam, which runs
without plan9port, and the two useful editions are the handling of
tabstop environment variable and the autoindent.

David



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2005-02-15  9:51 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-14  0:41 [9fans] plan9port: recent changes Russ Cox
2005-02-14 19:09 ` [9fans] " Russ Cox
2005-02-14 20:31   ` Bruce Ellis
2005-02-14 20:49     ` Russ Cox
2005-02-14 21:03       ` Skip Tavakkolian
2005-02-15  3:28         ` Andrew Simmons
2005-02-15  3:39           ` Russ Cox
2005-02-15  7:20       ` Tiit Lankots
2005-02-15  9:51       ` David Tolpin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).