From: Brad Anderson
Subject: Multi-User Lisp Environments
Date: 
Message-ID: <d560rr$8nh$1@newsdbm05.news.prodigy.com>
Hi all,

A newbie question ... Google wasn't my friend this time.

Is it possible to bring up a Lisp environment (say SBCL on Gentoo Linux)
as 'root' (or an appropriate user) and have multiple other users gain
access to the environment at the same time?

We have a user who, when at home, would like to SSH from his Windows box
to the Linux box running SBCL.  I may also be logged in from my laptop
to the Linux box.  Will we have different instances of Emacs/SLIME/SBCL
and then have a third instance that would pull the code from our
source-code-control-system (Subversion), or is there a way for us to
work in the same environment?  If we're both working on a function,
seems like the last one to compile/load it "wins".

Should I be seeking this solution or should I keep the environments
separate and have the one instance that merges our changes from
Subversion?  I would tend to separate them in the long run, but we're
both learning, and it would be cool to work in the same environment at
least for a little while.

Cheers,
Brad

From: Pascal Bourguignon
Subject: Re: Multi-User Lisp Environments
Date: 
Message-ID: <871x8pcp7u.fsf@thalassa.informatimago.com>
Brad Anderson <····@dsource.dot.org> writes:

> Hi all,
>
> A newbie question ... Google wasn't my friend this time.
>
> Is it possible to bring up a Lisp environment (say SBCL on Gentoo Linux)
> as 'root' (or an appropriate user) and have multiple other users gain
> access to the environment at the same time?
>
> We have a user who, when at home, would like to SSH from his Windows box
> to the Linux box running SBCL.  I may also be logged in from my laptop
> to the Linux box.  Will we have different instances of Emacs/SLIME/SBCL
> and then have a third instance that would pull the code from our
> source-code-control-system (Subversion), or is there a way for us to
> work in the same environment?  If we're both working on a function,
> seems like the last one to compile/load it "wins".

I don't see a reason why yo would want to do that.  Of course, it's
possible.  But I don't see the point.  

For example, with emacs it's possible to open two frames each on a
different X display with a different keyboard, allowing two or more
user to edit the same file at the same time.  

Try it:

     M-x make-frame-on-display RET workstation1:0.0 RET
     M-x make-frame-on-display RET workstation2:0.0 RET

it's funny.  But useless.

What people do is to fetch a copy of the source files each in his own
sandbox, edit independently preferably different files, or different
parts of the same files, then MERGE the divergent works into one
common version  This is done easily and pratical with the help of
version control programs such as CVS or Subversion.

You don't need to be two to edit a byte, while it may be useful to be
two to edit two classes, just work each one on one's class.


Now with a Common Lisp implementation that has threads, it's really
easy to open several listener and have several users edit the image at
the same time.  But as you have noted if two user enter a defun for
the same function, the last one wins.   At least, CVS checks that the
two commits are in conflict and as the second to merge the
differences.  But there's no CVS included in the REPL.

Read: https://www.cvshome.org/docs/
      http://svnbook.red-bean.com/

> Should I be seeking this solution or should I keep the environments
> separate and have the one instance that merges our changes from
> Subversion?  

Yes.


> I would tend to separate them in the long run, but we're
> both learning, and it would be cool to work in the same environment at
> least for a little while.

Cool, but useless for real work (unless you're in this "extreme
programming" stuff).  Have fun with emacs multi-frame, it'd be better
than having several listeners to a lisp image, because the one would
not see directly what the other does in his REPL.

http://www.extremeprogramming.org/rules/pair.html

-- 
__Pascal Bourguignon__                     http://www.informatimago.com/
Until real software engineering is developed, the next best practice
is to develop with a dynamic system that has extreme late binding in
all aspects. The first system to really do this in an important way
is Lisp. -- Alan Kay
From: Brad Anderson
Subject: Re: Multi-User Lisp Environments
Date: 
Message-ID: <d565g3$921$1@newsdbm05.news.prodigy.com>
Pascal Bourguignon wrote:
>>I would tend to separate them in the long run, but we're
>>both learning, and it would be cool to work in the same environment at
>>least for a little while.
> 
> 
> Cool, but useless for real work (unless you're in this "extreme
> programming" stuff).  Have fun with emacs multi-frame, it'd be better
> than having several listeners to a lisp image, because the one would
> not see directly what the other does in his REPL.
> 
> http://www.extremeprogramming.org/rules/pair.html
> 

Well, this is no XP shop here.  I'm curious about it, but would only
adopt a few of the disciplines, not all.

It was more a question of how different it is to program in a Lisp
environment vs. Java.  While it's interesting that you can swap code in
a running environment and have restarts, and examine the running
instance, the procedures used in programming Lisp vs. Java don't differ
that much.  I.e. like you said, we should play in our own sandboxes and
let the sccs (Subversion) take care of merging.

Thanks
BA
From: Pascal Bourguignon
Subject: Re: Multi-User Lisp Environments
Date: 
Message-ID: <87fyx5b9go.fsf@thalassa.informatimago.com>
Brad Anderson <····@dsource.dot.org> writes:
> It was more a question of how different it is to program in a Lisp
> environment vs. Java.  While it's interesting that you can swap code in
> a running environment and have restarts, 
> and examine the running instance, 

Well this remains a rather theorical possibility, since the standard
doesn't mandate the implementations to keep the DOCUMENTATION strings,
or FUNCTION-LAMBDA-EXPRESSION to return anything else than NIL...

In practice you may have luck and an implementation that is usable for
this, or you'll have to look the source instead of the lisp image.

Or, you can implement your own REPL with your own book keeping of
definitions and documentations.


> the procedures used in programming Lisp vs. Java don't differ
> that much.  I.e. like you said, we should play in our own sandboxes and
> let the sccs (Subversion) take care of merging.

-- 
__Pascal Bourguignon__                     http://www.informatimago.com/
Until real software engineering is developed, the next best practice
is to develop with a dynamic system that has extreme late binding in
all aspects. The first system to really do this in an important way
is Lisp. -- Alan Kay
From: Jock Cooper
Subject: Re: Multi-User Lisp Environments
Date: 
Message-ID: <m3ekcodxoe.fsf@jcooper02.sagepub.com>
Pascal Bourguignon <···@informatimago.com> writes:

> Brad Anderson <····@dsource.dot.org> writes:
> Try it:
> 
>      M-x make-frame-on-display RET workstation1:0.0 RET
>      M-x make-frame-on-display RET workstation2:0.0 RET
> 
> it's funny.  But useless.
> 

Just a comment about this.  Some of us have two (or more) workstations
running X on our desk.. in which case the above can be very useful.


--
www.fractal-recursions.com
From: Frode Vatvedt Fjeld
Subject: Re: Multi-User Lisp Environments
Date: 
Message-ID: <2his202kvd.fsf@vserver.cs.uit.no>
Jock Cooper <·····@mail.com> writes:

> Just a comment about this.  Some of us have two (or more)
> workstations running X on our desk.. in which case the above can be
> very useful.

Before there was VNC, I used to run one emacs frame at work and one
frame at home. Worked very well.

-- 
Frode Vatvedt Fjeld
From: Raymond Wiker
Subject: Re: Multi-User Lisp Environments
Date: 
Message-ID: <86br7ra5aw.fsf@raw.grenland.fast.no>
Frode Vatvedt Fjeld <······@cs.uit.no> writes:

> Jock Cooper <·····@mail.com> writes:
>
>> Just a comment about this.  Some of us have two (or more)
>> workstations running X on our desk.. in which case the above can be
>> very useful.
>
> Before there was VNC, I used to run one emacs frame at work and one
> frame at home. Worked very well.

        I still do; I use gnuclient to set up a new frame in an
xterm on (one of) my home machines and use that to access my work
machine.

        VNC and X across ADSL/ssh is too cumbersome, but with the help
of NX (http://www.nomachine.com) it became much snappier.

-- 
Raymond Wiker                        Mail:  ·············@fast.no
Senior Software Engineer             Web:   http://www.fast.no/
Fast Search & Transfer ASA           Phone: +47 23 01 11 60
P.O. Box 1677 Vika                   Fax:   +47 35 54 87 99
NO-0120 Oslo, NORWAY                 Mob:   +47 48 01 11 60
From: Alan Crowe
Subject: Re: Multi-User Lisp Environments
Date: 
Message-ID: <86psw45paq.fsf@cawtech.freeserve.co.uk>
Pascal Bourguignon wrote:
> For example, with emacs it's possible to open two frames
> each on a different X display with a different keyboard,
> allowing two or more user to edit the same file at the
> same time.
>
> Try it:
>
>     M-x make-frame-on-display RET workstation1:0.0 RET
>     M-x make-frame-on-display RET workstation2:0.0 RET
>
> it's funny.  But useless.

On Monday I tried showing a friend Lisp, and used this with
Emac's *inferior-lisp* window to make a "dual control" REPL.
My friend is a musician, not a programmer, and on a very
brief visit so we ended up not spending any time on this.

I still find it an attractive idea for one to one teaching,
and hope to try it again.

Alan Crowe
Edinburgh
Scotland