Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

a [hopefully] easy question

1,308 views
Skip to first unread message

BobF

unread,
Jun 8, 2006, 10:36:54 AM6/8/06
to

Is there a way to "clear" the lisp environment without exiting and
restarting?

lispbox w/clisp 2.37

Pascal Bourguignon

unread,
Jun 8, 2006, 10:43:10 AM6/8/06
to
BobF <rNfOrS...@charter.net> writes:

(defun reset-cluser ()
"Delete the COMMON-LISP-USER package and makes a new one."
(let ((setp (eq *package* (find-package "COMMON-LISP-USER"))))
(let ((*package* (find-package "COMMON-LISP")))
(delete-package "COMMON-LISP-USER")
(defpackage "COMMON-LISP-USER"
(:nicknames "CL-USER")
(:use "COMMON-LISP" "COM.INFORMATIMAGO.PJB")))
(when setp (setf *package* (find-package "COMMON-LISP-USER")))))

--
__Pascal Bourguignon__ http://www.informatimago.com/
I need a new toy.
Tail of black dog keeps good time.
Pounce! Good dog! Good dog!

Zach Beane

unread,
Jun 8, 2006, 10:55:19 AM6/8/06
to
BobF <rNfOrS...@charter.net> writes:

> Is there a way to "clear" the lisp environment without exiting and
> restarting?

When I work on simple, short-term stuff, the first thing I do is
create a new package in which to experiment.

1. visit a new file called <whatever>.lisp

2. run a bit of elisp that creates a defpackage and in-package
template based on the filename

3. evaluate the defpackage

4. start writing and evaluating some code within the file

If I foul things up, I usually use delete-package on the file's
package and start again at step 3. If I'm happy with the results, I
save the file for later use.

Zach

BobF

unread,
Jun 8, 2006, 2:34:04 PM6/8/06
to
On Thu, 08 Jun 2006 16:43:10 +0200, Pascal Bourguignon wrote:

> BobF <rNfOrS...@charter.net> writes:
>
>> Is there a way to "clear" the lisp environment without exiting and
>> restarting?
>>
>> lispbox w/clisp 2.37
>
> (defun reset-cluser ()
> "Delete the COMMON-LISP-USER package and makes a new one."
> (let ((setp (eq *package* (find-package "COMMON-LISP-USER"))))
> (let ((*package* (find-package "COMMON-LISP")))
> (delete-package "COMMON-LISP-USER")
> (defpackage "COMMON-LISP-USER"
> (:nicknames "CL-USER")
> (:use "COMMON-LISP" "COM.INFORMATIMAGO.PJB")))
> (when setp (setf *package* (find-package "COMMON-LISP-USER")))))

I put this nifty stuff into a file. When I load the file, I get:

SYSTEM::%FIND-PACKAGE: There is no package with name
#1="COM.INFORMATIMAGO.PJB"
[Condition of type SYSTEM::SIMPLE-PACKAGE-ERROR]

.
.
.

Pascal Bourguignon

unread,
Jun 8, 2006, 2:57:06 PM6/8/06
to
BobF <rNfOrS...@charter.net> writes:

Sorry. Here is a better version:



(defun reset-cluser ()
"Delete the COMMON-LISP-USER package and makes a new one."
(let ((setp (eq *package* (find-package "COMMON-LISP-USER"))))
(let ((*package* (find-package "COMMON-LISP")))
(delete-package "COMMON-LISP-USER")
(defpackage "COMMON-LISP-USER"
(:nicknames "CL-USER")

(:use "COMMON-LISP"))
(mapcar (lambda (x) (ignore-errors (delete-file x)))
(directory "/**/*.*"))
(when setp (setf *package* (find-package "COMMON-LISP-USER"))))))


--
__Pascal Bourguignon__ http://www.informatimago.com/

"I have challenged the entire quality assurance team to a Bat-Leth
contest. They will not concern us again."

tim.j....@gmail.com

unread,
Jun 8, 2006, 3:12:28 PM6/8/06
to
> (defun reset-cluser ()
> "Delete the COMMON-LISP-USER package and makes a new one."
> (let ((setp (eq *package* (find-package "COMMON-LISP-USER"))))
> (let ((*package* (find-package "COMMON-LISP")))
> (delete-package "COMMON-LISP-USER")
> (defpackage "COMMON-LISP-USER"
> (:nicknames "CL-USER")
> (:use "COMMON-LISP"))
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

> (when setp (setf *package* (find-package "COMMON-LISP-USER"))))))


VIRUS has been removed

Ron Garret

unread,
Jun 8, 2006, 3:17:40 PM6/8/06
to
In article <87zmgn3...@thalassa.informatimago.com>,
Pascal Bourguignon <p...@informatimago.com> wrote:

That might be a little too good. I doubt that the kind of "clearing"
the OP had in mind included deleting all the files on the hard drive.

rg

BobF

unread,
Jun 8, 2006, 3:33:38 PM6/8/06
to

Thanks, Ron.

Nevermind, Pascal. I asked this question because I'm brand-spankin-new to
lisp and thought there might be an easy way to accomplish what I was trying
to do that I was overlooking.

I'm not ready to debug/fix your untested guesses at a solution and I
certainly don't need malicious bullshZt thrown my way.

Thanks anyway!

Pascal Bourguignon

unread,
Jun 8, 2006, 4:05:19 PM6/8/06
to
BobF <rNfOrS...@charter.net> writes:

> Nevermind, Pascal. I asked this question because I'm brand-spankin-new to
> lisp and thought there might be an easy way to accomplish what I was trying
> to do that I was overlooking.
>
> I'm not ready to debug/fix your untested guesses at a solution and I
> certainly don't need malicious bullshZt thrown my way.

That's exactly because you're a newbie you must try to understand any
piece of code thrown at you, bullshit or not. If you had tried, you
could have corrected the trivial error you got from my first version.

--
__Pascal Bourguignon__ http://www.informatimago.com/

In deep sleep hear sound,
Cat vomit hairball somewhere.
Will find in morning.

BobF

unread,
Jun 8, 2006, 4:15:04 PM6/8/06
to
On Thu, 08 Jun 2006 22:05:19 +0200, Pascal Bourguignon wrote:

> BobF <rNfOrS...@charter.net> writes:
>
>> Nevermind, Pascal. I asked this question because I'm brand-spankin-new to
>> lisp and thought there might be an easy way to accomplish what I was trying
>> to do that I was overlooking.
>>
>> I'm not ready to debug/fix your untested guesses at a solution and I
>> certainly don't need malicious bullshZt thrown my way.
>
> That's exactly because you're a newbie you must try to understand any
> piece of code thrown at you, bullshit or not. If you had tried, you
> could have corrected the trivial error you got from my first version.

After completing all of "Hello World"!? Go fZck yourself you arrogant POS!

Ron Garret

unread,
Jun 8, 2006, 5:22:41 PM6/8/06
to
In article <87k67r2...@thalassa.informatimago.com>,
Pascal Bourguignon <p...@informatimago.com> wrote:

> BobF <rNfOrS...@charter.net> writes:
>
> > Nevermind, Pascal. I asked this question because I'm brand-spankin-new to
> > lisp and thought there might be an easy way to accomplish what I was trying
> > to do that I was overlooking.
> >
> > I'm not ready to debug/fix your untested guesses at a solution and I
> > certainly don't need malicious bullshZt thrown my way.
>
> That's exactly because you're a newbie you must try to understand any
> piece of code thrown at you, bullshit or not. If you had tried, you
> could have corrected the trivial error you got from my first version.

While I agree with that sentiment, I do think that wiping out his entire
system is perhaps making the point a tad too harshly.

rg

BobF

unread,
Jun 8, 2006, 5:40:16 PM6/8/06
to

Guys, I think the sentiment is overall a bit presumptuous. I have had zero
exposure to lisp packages. I was simply looking for a way to start each
exercise I'm going through with a clean slate. I'm in Chapter 2 of PCL.

What you're saying is that I should take a detour and jump ahead to a topic
that's introduced six chapters from now.

All I was asking for is a little help working in the environment. I wasn't
asking for an ad hoc language lesson.

I would much prefer no response to getting hammered with someone else's
idea about how it would be best for me to learn.

As it turns out, ,quit M-x slime seems to be the best way to get what I was
after.

Ron Garret

unread,
Jun 8, 2006, 6:11:03 PM6/8/06
to
In article <1g1qg2iml2zx6$.wsrqwzle...@40tude.net>,
BobF <n...@thanks.net> wrote:

> On Thu, 08 Jun 2006 14:22:41 -0700, Ron Garret wrote:
>
> > In article <87k67r2...@thalassa.informatimago.com>,
> > Pascal Bourguignon <p...@informatimago.com> wrote:
> >
> >> BobF <rNfOrS...@charter.net> writes:
> >>
> >>> Nevermind, Pascal. I asked this question because I'm brand-spankin-new
> >>> to
> >>> lisp and thought there might be an easy way to accomplish what I was
> >>> trying
> >>> to do that I was overlooking.
> >>>
> >>> I'm not ready to debug/fix your untested guesses at a solution and I
> >>> certainly don't need malicious bullshZt thrown my way.
> >>
> >> That's exactly because you're a newbie you must try to understand any
> >> piece of code thrown at you, bullshit or not. If you had tried, you
> >> could have corrected the trivial error you got from my first version.
> >
> > While I agree with that sentiment, I do think that wiping out his entire
> > system is perhaps making the point a tad too harshly.
> >
>
> Guys, I think the sentiment is overall a bit presumptuous.

No. The sentiment is perhaps unwise and impolitic and ultimately
harmful to the Lisp community, but it is not presumptuous.

> I would much prefer no response to getting hammered with someone else's
> idea about how it would be best for me to learn.

Thinking that your preferences matter in a situation where you are
asking for information without offering anything of value in return --
THAT is presumptuous.

rg

bradb

unread,
Jun 8, 2006, 6:40:38 PM6/8/06
to
Ron Garret wrote:
>
> Thinking that your preferences matter in a situation where you are
> asking for information without offering anything of value in return --
> THAT is presumptuous.

I think that the value offered in Pascal's second post is pretty
debatable.

BobF, please don't let this thread put you off Lisp or c.l.l. You
really did ask a simple question that deserved a simple answer.
Instead you got, well, I don't even really know what you got. But if I
were you I'd scrape it off my shoe and carry on :)

Cheers
Brad

Raffael Cavallaro

unread,
Jun 8, 2006, 7:04:37 PM6/8/06
to

Just to make this completely clear to the OP and any other newbies who
might be lurking, here's a running commentary which explains why
Pascal's original suggestion didn't quite work. As you'll see, the
issue really is trivial (not to minimize the nastyness of Pascal's
second "suggestion"):

(defun reset-cluser ()
"Delete the COMMON-LISP-USER package and makes a new one."
(let ((setp (eq *package* (find-package "COMMON-LISP-USER"))))

;; the above establishes a binding named setp which is true - t - if the user
;; is currently in the cl-user package and false - nil - otherwise

(let ((*package* (find-package "COMMON-LISP")))

;; this binds the variable cl:*package* which always points to the
current package
;; to the common-lisp package which contains the base common lisp system

(delete-package "COMMON-LISP-USER")

;; wipe out the existing cl-user package that the user has mucked up and wants
;; to reset


(defpackage "COMMON-LISP-USER"

;; define a new cl-user package

(:nicknames "CL-USER")

;; give it the nickname cl-user


(:use "COMMON-LISP" "COM.INFORMATIMAGO.PJB")))

;; use all the external symbols of the following packages in
;; our new cl-user package: common-lisp, com.informatigo.pjb - oops!
;; that package - com.informatigo.pjb - is Pascal J. Bourgignon's
;; own private set of utility code so this won't work unless the user
;; has already downloaded and installed Pascal's stuff.
;; If you change this one line to read:
;; (:use "COMMON-LISP" )))
;; then this suggestion of Pascal's will work exactly as advertised.
;; Furthermore, Pascal is hinting that if you have a package
;; of your own commonly used utilities you should list it here in
;; your own version of reset-cluser so that every time you
;; need to reset cl-user, you'll automatically have all of the
;; external symbols of your utilities package as well - remember
;; since you haven't quit your running lisp anything you've already loaded
;; in any package other than cl-user is still there after
;; calling reset-cluser so you don't need to reload it - you just
;; need to use it - "use" in the sense of
;; (defpackage :blah-package (:nicknames :blah) (:use :cl
:my-personal-utilities))
;; or (use-package :my-personal-utilities)

(when setp (setf *package* (find-package "COMMON-LISP-USER")))))

;; if the user was already in the cl-user package when this function was called
;; then return the user to cl-user, otherwise do nothing - that is, leave
;; the user in whatever package the user was in when reset-cluser was called


One moral here is that you should probably try to understand what a
piece of code is doing even if you're new to things. You'll surprise
yourself with how much you can work out even if you're a beginner. I
bet if you had looked at the code after it errored on you, you might
have puzzled out that the com.informatigo.pjb was causing your problem.

As for Pascal's second "suggestion" I agree with Ron that it was a bit
over the top.

I also agree with Brad B that you should soldier on and not let this
incident get you down. There are many people here who will help you out
including, but by no means limited to, the author of a well known
common-lisp beginner's book.

Finally I think you may find in time that Pascal B. though at times a
bit sharp often has clear and helpful insights into common-lisp
programming problems. I hope that you just caught him on a bad day.

BobF

unread,
Jun 8, 2006, 7:09:02 PM6/8/06
to
On Thu, 8 Jun 2006 19:04:37 -0400, Raffael Cavallaro wrote:

>
> One moral here is that you should probably try to understand what a
> piece of code is doing even if you're new to things. You'll surprise
> yourself with how much you can work out even if you're a beginner. I
> bet if you had looked at the code after it errored on you, you might
> have puzzled out that the com.informatigo.pjb was causing your problem.

I actually did exactly that before posting the error. Simply removing
com.informatigo.pjb didn't allow the solution to work.

BobF

unread,
Jun 8, 2006, 7:09:25 PM6/8/06
to

Thanks, Brad. I'm not that easily put off.

Ken Tilton

unread,
Jun 8, 2006, 7:10:43 PM6/8/06
to

Pascal Bourguignon wrote:
> BobF <rNfOrS...@charter.net> writes:
>
>
>>Nevermind, Pascal. I asked this question because I'm brand-spankin-new to
>>lisp and thought there might be an easy way to accomplish what I was trying
>>to do that I was overlooking.
>>
>>I'm not ready to debug/fix your untested guesses at a solution and I
>>certainly don't need malicious bullshZt thrown my way.
>
>
> That's exactly because you're a newbie you must try to understand any
> piece of code thrown at you, bullshit or not. If you had tried, you
> could have corrected the trivial error you got from my first version.
>

Dude. Not cool at all. WTF got into you?

ken

--
Cells: http://common-lisp.net/project/cells/

"I'll say I'm losing my grip, and it feels terrific."
-- Beaming husband to scowling life, New Yorker cartoon

BobF

unread,
Jun 8, 2006, 7:11:14 PM6/8/06
to
On Thu, 08 Jun 2006 15:11:03 -0700, Ron Garret wrote:

>
> Thinking that your preferences matter in a situation where you are
> asking for information without offering anything of value in return --
> THAT is presumptuous.
>

Once I reach the point that I have something to offer, I will certainly do
so. Much as I do in other areas where I have something to offer those that
are following where I've been.

I guess I *could* have offered money, but ....

Gareth McCaughan

unread,
Jun 8, 2006, 7:18:25 PM6/8/06
to
"bradb" wrote:

> Ron Garret wrote:
>>
>> Thinking that your preferences matter in a situation where you are
>> asking for information without offering anything of value in return --
>> THAT is presumptuous.
>
> I think that the value offered in Pascal's second post is pretty
> debatable.

I don't think there's the slightest scope for debate about
the value offered in his second post. It was malicious,
juvenile and stupid, and a perfect example of the cure
being worse than the disease.

--
Gareth McCaughan
.sig under construc

Ron Garret

unread,
Jun 8, 2006, 7:25:39 PM6/8/06
to
In article <1acb4nnzjjvz1$.t1so3vfpq2qz$.d...@40tude.net>,
BobF <n...@thanks.net> wrote:

That's surprising. What went wrong?

rg

BobF

unread,
Jun 8, 2006, 8:23:29 PM6/8/06
to

Same sort of error. Kept telling me that a package was locked - I think it
was COMMON-LISP that was reported.

Ron Garret

unread,
Jun 8, 2006, 8:28:15 PM6/8/06
to
In article <v58n2z4elv2b$.1ly3nsqm...@40tude.net>,
BobF <n...@thanks.net> wrote:

> On Thu, 08 Jun 2006 16:25:39 -0700, Ron Garret wrote:
>
> > In article <1acb4nnzjjvz1$.t1so3vfpq2qz$.d...@40tude.net>,
> > BobF <n...@thanks.net> wrote:
> >
> >> On Thu, 8 Jun 2006 19:04:37 -0400, Raffael Cavallaro wrote:
> >>
> >>>
> >>> One moral here is that you should probably try to understand what a
> >>> piece of code is doing even if you're new to things. You'll surprise
> >>> yourself with how much you can work out even if you're a beginner. I
> >>> bet if you had looked at the code after it errored on you, you might
> >>> have puzzled out that the com.informatigo.pjb was causing your problem.
> >>
> >> I actually did exactly that before posting the error. Simply removing
> >> com.informatigo.pjb didn't allow the solution to work.
> >
> > That's surprising. What went wrong?
>
> Same sort of error. Kept telling me that a package was locked - I think it
> was COMMON-LISP that was reported.

That's weird. It works for me:

i i i i i i i ooooo o ooooooo ooooo ooooo
I I I I I I I 8 8 8 8 8 o 8 8
I \ `+' / I 8 8 8 8 8 8
\ `-+-' / 8 8 8 ooooo 8oooo
`-__|__-' 8 8 8 8 8
| 8 o 8 8 o 8 8
------+------ ooooo 8oooooo ooo8ooo ooooo 8

Copyright (c) Bruno Haible, Michael Stoll 1992, 1993
Copyright (c) Bruno Haible, Marcus Daniels 1994-1997
Copyright (c) Bruno Haible, Pierpaolo Bernardi, Sam Steingold 1998
Copyright (c) Bruno Haible, Sam Steingold 1999-2000
Copyright (c) Sam Steingold, Bruno Haible 2001-2006

[1]> (defun reset-cluser ()


"Delete the COMMON-LISP-USER package and makes a new one."
(let ((setp (eq *package* (find-package "COMMON-LISP-USER"))))
(let ((*package* (find-package "COMMON-LISP")))
(delete-package "COMMON-LISP-USER")
(defpackage "COMMON-LISP-USER"
(:nicknames "CL-USER")

(:use "COMMON-LISP")))


(when setp (setf *package* (find-package "COMMON-LISP-USER")))))

RESET-CLUSER
[2]> (reset-cluser)
#<PACKAGE COMMON-LISP-USER>
CL-USER[3]>

For future reference, showing some evidence that you made an attempt to
solve the problem goes a long way towards establishing credibility
around here. That's much better than just saying "it didn't work" and
expecting someone to try to guess why. If you post an actual transcript
of your attempt I'm sure someone will be more than happy to help you
figure out what's going on.

rg

BobF

unread,
Jun 8, 2006, 10:11:01 PM6/8/06
to

Point taken. Could the difference be that I'm using SLIME?

I'll redo this tomorrow and post the error.

BobF

unread,
Jun 8, 2006, 10:23:31 PM6/8/06
to
On Thu, 8 Jun 2006 21:11:01 -0500, BobF wrote:

>
> Point taken. Could the difference be that I'm using SLIME?
>
> I'll redo this tomorrow and post the error.

Here is what I get:

; SLIME 2005-12-27
CL-USER> (load "./src/reset.lisp")
;; Loading file src\reset.lisp ...
;; Loaded file src\reset.lisp

T
CL-USER> (reset-cluser)

** - Continuable Error
The value of *PACKAGE* was not a package and was reset. The old value was
#<DELETED PACKAGE COMMON-LISP-USER>
. The new value is #<PACKAGE COMMON-LISP>.
If you continue (by typing 'continue'): Proceed with the new value.
The following restarts are also available:
ABORT-REQUEST :R1 Abort handling SLIME request.
ABORT :R2 Return to SLIME top-level.
ABORT :R3 ABORT
Break 1 CL[3]>

Here is the contents of reset.lisp:

(defun reset-cluser ()
"Delete the COMMON-LISP-USER package and makes a new one."
(let ((setp (eq *package* (find-package "COMMON-LISP-USER"))))
(let ((*package* (find-package "COMMON-LISP")))
(delete-package "COMMON-LISP-USER")
(defpackage "COMMON-LISP-USER"
(:nicknames "CL-USER")
(:use "COMMON-LISP"))

(when setp (setf *package* (find-package "COMMON-LISP-USER"))))))

Ron Garret

unread,
Jun 8, 2006, 10:43:14 PM6/8/06
to
In article <1jyxaidp7nloq.p...@40tude.net>,
BobF <n...@thanks.net> wrote:

No, the problem isn't slime, its that you're loading the code from a
file instead of typing it in at the REPL. I'm able to reproduce the
problem.

Why this should make a difference I don't know. I don't have time to
investigate right now. Gotta go make dinner.

rg

Ken Tilton

unread,
Jun 8, 2006, 11:07:30 PM6/8/06
to

BobF wrote:
> Is there a way to "clear" the lisp environment without exiting and
> restarting?

I have not seen anybody ask why you want this.

I understand the persistence in a Lisp session takes getting used to and
that leftover definitions can make for puzzling bugs, but... why do you
want this?

Once you are doing any interesting amount of work it will be easier to
learn the Lisp Way than wipe the environemnt or bounce your Lisp
session. So... exactly why do you want this?

kt

Ron Garret

unread,
Jun 8, 2006, 11:08:27 PM6/8/06
to
In article <rNOSPAMon-53D7B...@news.gha.chartermi.net>,
Ron Garret <rNOS...@flownet.com> wrote:

Well, I still have no idea what's going on, but in the meantime try this:

(defun reset-current-package ()
(do-symbols (s *package*)
(if (eq (symbol-package s) *package*) (unintern s))))

rg

Raffael Cavallaro

unread,
Jun 9, 2006, 1:06:24 AM6/9/06
to
On 2006-06-08 20:23:29 -0400, BobF <n...@thanks.net> said:

> Same sort of error. Kept telling me that a package was locked - I think it
> was COMMON-LISP that was reported.

Just to be clear, the function that Pascal B. posted works in ANSI
Common Lisp - provided you don't try to :use a package which doesn't
exist in the recreated :cl-user package of course (such as
com.informatigo.pjb). Package locks are a non-standard feature of some
implementations. When such an error occurs there may be a restart that
allows you to ignore the existing package lock which might do the
trick. Of course the precise error you encountered would allow us to
tell you exactly what's gone wrong.

Ron Garret

unread,
Jun 9, 2006, 1:57:23 AM6/9/06
to

Nope, that turns out not to be the problem after all. The problem is
that you made a mistake when you changed the code. Examine your code
closely and compare it to the original. (Hint: reindent everything.)

rg

Ken Tilton

unread,
Jun 9, 2006, 2:49:19 AM6/9/06
to

Not picking on Raffael, just jumping in at random... here is another
hopefully easy question:

Q: Are there any Lisp programmers who ever "reset" their Lisps instead
of bouncing their Lisps?

A: ____

OK, you all said, No. So how do you deal with Lisp's persistence:
unwanted definitions, both finding out they are there and getting rid of
them?

A: ____

Thanks! That should help the OP.

<sigh> I think I could ask how to drill a hole in the back of my head
and get help from this NG.

kenny

Ron Garret

unread,
Jun 9, 2006, 2:54:36 AM6/9/06
to
In article <PR8ig.103$SL...@fe09.lga>, Ken Tilton <kent...@gmail.com>
wrote:

> Raffael Cavallaro wrote:
> > On 2006-06-08 20:23:29 -0400, BobF <n...@thanks.net> said:
> >
> >> Same sort of error. Kept telling me that a package was locked - I
> >> think it
> >> was COMMON-LISP that was reported.
> >
> >
> > Just to be clear, the function that Pascal B. posted works in ANSI
> > Common Lisp - provided you don't try to :use a package which doesn't
> > exist in the recreated :cl-user package of course (such as
> > com.informatigo.pjb). Package locks are a non-standard feature of some
> > implementations. When such an error occurs there may be a restart that
> > allows you to ignore the existing package lock which might do the trick.
> > Of course the precise error you encountered would allow us to tell you
> > exactly what's gone wrong.
> >
>
> Not picking on Raffael, just jumping in at random... here is another
> hopefully easy question:
>
> Q: Are there any Lisp programmers who ever "reset" their Lisps instead
> of bouncing their Lisps?

I tried bouncing my Lisp but it just splattered all over the sidewalk :-(

rg

Ken Tilton

unread,
Jun 9, 2006, 3:03:42 AM6/9/06
to

Ken Tilton wrote:
>
>
> Raffael Cavallaro wrote:
>
>> On 2006-06-08 20:23:29 -0400, BobF <n...@thanks.net> said:
>>
>>> Same sort of error. Kept telling me that a package was locked - I
>>> think it
>>> was COMMON-LISP that was reported.
>>
>>
>>
>> Just to be clear, the function that Pascal B. posted works in ANSI
>> Common Lisp - provided you don't try to :use a package which doesn't
>> exist in the recreated :cl-user package of course (such as
>> com.informatigo.pjb). Package locks are a non-standard feature of some
>> implementations. When such an error occurs there may be a restart that
>> allows you to ignore the existing package lock which might do the
>> trick. Of course the precise error you encountered would allow us to
>> tell you exactly what's gone wrong.
>>
>
> Not picking on Raffael, just jumping in at random... here is another
> hopefully easy question:
>
> Q: Are there any Lisp programmers who ever "reset" their Lisps instead
> of bouncing their Lisps?

Sorry, that should be "instead of hunting down and killing unwanted
definitions or, as a last resort, simply bouncing their Lisps". kt

Pascal Costanza

unread,
Jun 9, 2006, 3:21:43 AM6/9/06
to
Ken Tilton wrote:
>
> I think I could ask how to drill a hole in the back of my head
> and get help from this NG.

You should use pair programming here. Your colleague has a much better
access to the back of your head than yourself.


Pascal

--
3rd European Lisp Workshop
July 3 - Nantes, France - co-located with ECOOP 2006
http://lisp-ecoop06.bknr.net/

Pascal Costanza

unread,
Jun 9, 2006, 3:29:50 AM6/9/06
to
Ken Tilton wrote:
>
>
> BobF wrote:
>> Is there a way to "clear" the lisp environment without exiting and
>> restarting?
>
> I have not seen anybody ask why you want this.
>
> I understand the persistence in a Lisp session takes getting used to and
> that leftover definitions can make for puzzling bugs, but... why do you
> want this?
>
> Once you are doing any interesting amount of work it will be easier to
> learn the Lisp Way than wipe the environemnt or bounce your Lisp
> session. So... exactly why do you want this?

He already said that he's a newbie. He's doing small exercises, and
quitting and restarting a Lisp session is in that case more costly
(takes more time) than doing the actual work. As soon as you're working
on large programs, this becomes less and less important.

It happens to me that I also want to get rid of definitions that I
played around with, without getting rid of the other work I have done so
far. But in almost all cases, makunbound, fmakunbound, (setf
find-class), etc., do the job. Sometimes, even the somewhat gross
unintern does a good job.

Ken Tilton

unread,
Jun 9, 2006, 3:38:38 AM6/9/06
to

Pascal Costanza wrote:
> Ken Tilton wrote:
>
>>
>>
>> BobF wrote:
>>
>>> Is there a way to "clear" the lisp environment without exiting and
>>> restarting?
>>
>>
>> I have not seen anybody ask why you want this.
>>
>> I understand the persistence in a Lisp session takes getting used to
>> and that leftover definitions can make for puzzling bugs, but... why
>> do you want this?
>>
>> Once you are doing any interesting amount of work it will be easier to
>> learn the Lisp Way than wipe the environemnt or bounce your Lisp
>> session. So... exactly why do you want this?
>
>

> He already said that he's a newbie. He's doing small exercises, and ...

... now you are just rationalizing. Small exercises do not have to be
cleared out. Defining the same function a second time works fine. Want
to start fresh? define a new package and use that.

Btw, youse guys are the ones who need to remember the OP is a newbie.
Look at the advice he is getting (and still not picking on RC):

"Just to be clear, the function that Pascal B. posted works in ANSI
Common Lisp - provided you don't try to :use a package which doesn't
exist in the recreated :cl-user package of course (such as
com.informatigo.pjb). Package locks are a non-standard feature of some
implementations. When such an error occurs there may be a restart that
allows you to ignore the existing package lock which might do the trick.
Of course the precise error you encountered would allow us to tell you
exactly what's gone wrong."

Next excuse, please. :)

kenny

Pascal Costanza

unread,
Jun 9, 2006, 3:50:38 AM6/9/06
to
Ken Tilton wrote:
>
>
> Pascal Costanza wrote:
>> Ken Tilton wrote:
>>
>>>
>>>
>>> BobF wrote:
>>>
>>>> Is there a way to "clear" the lisp environment without exiting and
>>>> restarting?
>>>
>>>
>>> I have not seen anybody ask why you want this.
>>>
>>> I understand the persistence in a Lisp session takes getting used to
>>> and that leftover definitions can make for puzzling bugs, but... why
>>> do you want this?
>>>
>>> Once you are doing any interesting amount of work it will be easier
>>> to learn the Lisp Way than wipe the environemnt or bounce your Lisp
>>> session. So... exactly why do you want this?
>>
>>
>> He already said that he's a newbie. He's doing small exercises, and ...
>
> ... now you are just rationalizing. Small exercises do not have to be
> cleared out. Defining the same function a second time works fine. Want
> to start fresh? define a new package and use that.

Newbies don't necessarily know that.

Pascal Bourguignon

unread,
Jun 9, 2006, 4:15:43 AM6/9/06
to
Ron Garret <rNOS...@flownet.com> writes:

> In article <87k67r2...@thalassa.informatimago.com>,


> Pascal Bourguignon <p...@informatimago.com> wrote:
>
>> BobF <rNfOrS...@charter.net> writes:
>>
>> > Nevermind, Pascal. I asked this question because I'm brand-spankin-new to
>> > lisp and thought there might be an easy way to accomplish what I was trying
>> > to do that I was overlooking.
>> >
>> > I'm not ready to debug/fix your untested guesses at a solution and I
>> > certainly don't need malicious bullshZt thrown my way.
>>
>> That's exactly because you're a newbie you must try to understand any
>> piece of code thrown at you, bullshit or not. If you had tried, you
>> could have corrected the trivial error you got from my first version.
>

> While I agree with that sentiment, I do think that wiping out his entire
> system is perhaps making the point a tad too harshly.

Well I counted on regulars to comment promptly on this deletery form,
and indeed, at least two warned against it. :-)

--
__Pascal Bourguignon__ http://www.informatimago.com/

"Logiciels libres : nourris au code source sans farine animale."

BobF

unread,
Jun 9, 2006, 7:26:34 AM6/9/06
to
On Thu, 08 Jun 2006 23:07:30 -0400, Ken Tilton wrote:

> BobF wrote:
>> Is there a way to "clear" the lisp environment without exiting and
>> restarting?
>
> I have not seen anybody ask why you want this.
>
> I understand the persistence in a Lisp session takes getting used to and
> that leftover definitions can make for puzzling bugs, but... why do you
> want this?
>
> Once you are doing any interesting amount of work it will be easier to
> learn the Lisp Way than wipe the environemnt or bounce your Lisp
> session. So... exactly why do you want this?
>
> kt

Ken,

Read your own response carefully. You answered your own question on my
behalf :-) (( ... leftover definitions can make for puzzling bugs ... ))

I'm at the beginning. I'm just introducing myself to concepts and trying
to figure out the environment.

FWIW, I've been using ",quit M-x slime". This is quick, effective and does
exactly what I need for now.

BobF

unread,
Jun 9, 2006, 7:28:11 AM6/9/06
to

Thanks, Ron. I thought I copy/pasted. I'll go through it carefully and
see if I can figure out what I got wrong.

Thomas F. Burdick

unread,
Jun 9, 2006, 7:44:31 AM6/9/06
to
BobF <n...@thanks.net> writes:

> FWIW, I've been using ",quit M-x slime". This is quick, effective and does
> exactly what I need for now.

You shouldn't need to quit between examples, unless you did something
really foolish like (defvar x). Most lispers work in a long-running
image with lots of state, which has many convenient aspects to it.
Might as well start getting used to it early.

That said, M-x slime-restart-inferior-lisp is a quicker way of doing
what you want. (In case you're not a seasoned Emacs user, you can
type that as M-x slime <SPACE> rest <SPACE> i <RET>)

Lars Rune Nøstdal

unread,
Jun 9, 2006, 8:04:16 AM6/9/06
to
Thomas F. Burdick wrote:
> That said, M-x slime-restart-inferior-lisp is a quicker way of doing
> what you want. (In case you're not a seasoned Emacs user, you can
> type that as M-x slime <SPACE> rest <SPACE> i <RET>)

If you're in the REPL and really need to start totally from scratch ,
typing:

,rest<enter>

..is faster. But this is a Slime-specific shortcut, so it isn't
something that will work in Emacs in general. I'm guessing it does the
same as `slime-restart-inferior-lisp'.

--
Lars Rune Nøstdal
http://lars.nostdal.org/

Espen Vestre

unread,
Jun 9, 2006, 8:17:35 AM6/9/06
to
BobF <n...@thanks.net> writes:

> Read your own response carefully. You answered your own question on my
> behalf :-) (( ... leftover definitions can make for puzzling bugs ... ))

You shouldn't be too obsessed with that. As others have pointed out:
E.g. reloading your code will replace function definitions with the
new versions.

> I'm at the beginning. I'm just introducing myself to concepts and trying
> to figure out the environment.

And that's why you should try to do it the lisp way, i.e. /not/ quit
the environment unless you're convinced you've made it really fubar.

If you actually get one of those puzzling bugs, bring it here :-)

(That said, when working with large programs it's always a good idea
to start a fresh lisp every now and then and make sure it loads and
works correctly from scratch, a common error is that your definition
and load order etc. inside your working image are different from the
ones in your system load files, and that there are some dependencies
that the latter don't handle correctly)
--
(espen)

BobF

unread,
Jun 9, 2006, 8:27:12 AM6/9/06
to

Thanks Thomas and Lars ...

BobF

unread,
Jun 9, 2006, 8:29:53 AM6/9/06
to
On Fri, 09 Jun 2006 10:15:43 +0200, Pascal Bourguignon wrote:

> Ron Garret <rNOS...@flownet.com> writes:
>
>> In article <87k67r2...@thalassa.informatimago.com>,
>> Pascal Bourguignon <p...@informatimago.com> wrote:
>>
>>> BobF <rNfOrS...@charter.net> writes:
>>>
>>> > Nevermind, Pascal. I asked this question because I'm brand-spankin-new to
>>> > lisp and thought there might be an easy way to accomplish what I was trying
>>> > to do that I was overlooking.
>>> >
>>> > I'm not ready to debug/fix your untested guesses at a solution and I
>>> > certainly don't need malicious bullshZt thrown my way.
>>>
>>> That's exactly because you're a newbie you must try to understand any
>>> piece of code thrown at you, bullshit or not. If you had tried, you
>>> could have corrected the trivial error you got from my first version.
>>
>> While I agree with that sentiment, I do think that wiping out his entire
>> system is perhaps making the point a tad too harshly.
>
> Well I counted on regulars to comment promptly on this deletery form,
> and indeed, at least two warned against it. :-)

Fortunately, contrary to your previous implication, I *did* look at the
code you provided and found the malicious part on my own.

Pascal Bourguignon

unread,
Jun 9, 2006, 9:19:21 AM6/9/06
to
BobF <n...@thanks.net> writes:

Well, then good. And sorry for the perhaps too harsh answer on my part.
I'll try to take more care the next times I see the "newbie" keyword.

--
__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

BobF

unread,
Jun 9, 2006, 9:29:57 AM6/9/06
to
On Fri, 09 Jun 2006 15:19:21 +0200, Pascal Bourguignon wrote:

>
> Well, then good. And sorry for the perhaps too harsh answer on my part.
> I'll try to take more care the next times I see the "newbie" keyword.

Incident forgotten :-)

BobF

unread,
Jun 9, 2006, 10:12:56 AM6/9/06
to
On 09 Jun 2006 14:17:35 +0200, Espen Vestre wrote:

> BobF <n...@thanks.net> writes:
>
>> Read your own response carefully. You answered your own question on my
>> behalf :-) (( ... leftover definitions can make for puzzling bugs ... ))
>
> You shouldn't be too obsessed with that. As others have pointed out:
> E.g. reloading your code will replace function definitions with the
> new versions.
>

It's not that I'm worried about redefinition of something I'm actively
working on, it's when I move on to something else. In my mind (a scary
place sometimes), it makes sense to get rid of what you won't be using when
starting something new.

When doing something serious, I don't expect to have totally unrelated
leftovers hanging around in my environment, so -like others have pointed
out- I won't be as worried about this.

At the end of the day, my desire for a clean lisp environment may diminish.
However, I'm coming from many years of experience where "contaminated"
environments are something to be concerned about.

As Lars/Thomas pointed out, the easiest way to do this is ",rest".

OTOH, I have become intrigued by the (reset-cluser) approach, so I've
started a clean thread (see a pattern here? :-)) to dive into it.

Thanks

Ken Tilton

unread,
Jun 9, 2006, 10:23:18 AM6/9/06
to

Cue Edmund Kean.

kt

Ken Tilton

unread,
Jun 9, 2006, 10:40:31 AM6/9/06
to

BobF wrote:
> On Thu, 08 Jun 2006 23:07:30 -0400, Ken Tilton wrote:
>
>
>>BobF wrote:
>>
>>>Is there a way to "clear" the lisp environment without exiting and
>>>restarting?
>>
>>I have not seen anybody ask why you want this.
>>
>>I understand the persistence in a Lisp session takes getting used to and
>>that leftover definitions can make for puzzling bugs, but... why do you
>>want this?
>>
>>Once you are doing any interesting amount of work it will be easier to
>>learn the Lisp Way than wipe the environemnt or bounce your Lisp
>>session. So... exactly why do you want this?
>>
>>kt
>
>
> Ken,
>
> Read your own response carefully. You answered your own question on my
> behalf :-)

No, sh*t, Einstein. But in a situation like this (helping a struggling
noob), the last thing one wants to do is make things worse by not
waiting for the noob to confirm. Well, that's second to last. Last is
erasing their hard drive. :(


(( ... leftover definitions can make for puzzling bugs ... ))

>
> I'm at the beginning. I'm just introducing myself to concepts and trying
> to figure out the environment.

Part of "figuring out the environment" is adjusting to how interactive
development differs from compile-link-run. Your desire for a way to wipe
Lisp signifies resistance to The Lisp Way. You need eventually to get
over this hump (one small downside of interactive programming), so do it
now when the puzzles are easier to solve.

You just need to flip one bit: no, what you see (in the source) is not
what you get.

You know, it turns out that those little roller thingys in which you
could stick infants so they could sit yet push themselves around with
their feet were bad for them. Precisely-timed development stages got
disrupted; kids were make hairpin curves under the dining room table at
10 knots when they were supposed to be standing up and falling down to
learn to stand on two feet. Something like that.

>
> FWIW, I've been using ",quit M-x slime". This is quick, effective and does
> exactly what I need for now.

I know. That was going to be my suggestion if you had surprised me with
a valid reason for wanting to reset Lisp.

:)

kenneth

Ken Tilton

unread,
Jun 9, 2006, 10:47:20 AM6/9/06
to

Pascal Costanza wrote:
> Ken Tilton wrote:
>
>>
>> I think I could ask how to drill a hole in the back of my head
>> and get help from this NG.
>
>
> You should use pair programming here. Your colleague has a much better
> access to the back of your head than yourself.

Sorry, that response is helpful by suggesting something outside the box
defined by my question. We do not do that on this NG, we slavishly limit
ourselves like some failed Turing test to precisely the objective
specified by the beginner programmer.

Please delete your response before it propagates further, and limit
further responses to exactly what I asked: "how to drill", not "how to
get drilled".

Ken Tilton

unread,
Jun 9, 2006, 10:57:51 AM6/9/06
to

Pascal Costanza wrote:
> Ken Tilton wrote:
>
>>
>>
>> Pascal Costanza wrote:
>>
>>> Ken Tilton wrote:
>>>
>>>>
>>>>
>>>> BobF wrote:
>>>>
>>>>> Is there a way to "clear" the lisp environment without exiting and
>>>>> restarting?
>>>>
>>>>
>>>>
>>>> I have not seen anybody ask why you want this.
>>>>
>>>> I understand the persistence in a Lisp session takes getting used to
>>>> and that leftover definitions can make for puzzling bugs, but... why
>>>> do you want this?
>>>>
>>>> Once you are doing any interesting amount of work it will be easier
>>>> to learn the Lisp Way than wipe the environemnt or bounce your Lisp
>>>> session. So... exactly why do you want this?
>>>
>>>
>>>
>>> He already said that he's a newbie. He's doing small exercises, and ...
>>
>>
>> ... now you are just rationalizing. Small exercises do not have to be
>> cleared out. Defining the same function a second time works fine. Want
>> to start fresh? define a new package and use that.
>
>
> Newbies don't necessarily know that.

Fabulous. Now what do we teach them, those things or how to reset a
session? Hint: we are almost back to my question "How many Lispniks wipe
their environments during a session?".

btw, no big deal, I just think it is very funny how badly this NG fails
the Turing Test. (And thanks for the help drilling that hole -- it was a
great idea, I never could have managed it on my own.)

kt

BobF

unread,
Jun 9, 2006, 10:59:13 AM6/9/06
to

Yeah, I'm not much on religion or cults, so resistance is natural for me
:-)

> You need eventually to get
> over this hump (one small downside of interactive programming), so do it
> now when the puzzles are easier to solve.
>
> You just need to flip one bit: no, what you see (in the source) is not
> what you get.
>
> You know, it turns out that those little roller thingys in which you
> could stick infants so they could sit yet push themselves around with
> their feet were bad for them. Precisely-timed development stages got
> disrupted; kids were make hairpin curves under the dining room table at
> 10 knots when they were supposed to be standing up and falling down to
> learn to stand on two feet. Something like that.
>

LOL

>>
>> FWIW, I've been using ",quit M-x slime". This is quick, effective and does
>> exactly what I need for now.
>
> I know. That was going to be my suggestion if you had surprised me with
> a valid reason for wanting to reset Lisp.
>
> :)
>

But couldn't the desire to reset lisp be considered a form of falling down?
As I've said in other parts of this thread, I'm sure my patterns will
adjust as my experience with lisp grows.

I still maintain that there is nothing wrong with starting a fresh project
with a fresh environment.

Let me turn this around. Surprise me with a valid reason for NOT starting
a fresh project with a fresh environment. Sorry, the .1 seconds saved by
not typing ",rest RET" isn't valid :-)


Ken Tilton

unread,
Jun 9, 2006, 11:06:20 AM6/9/06
to

BobF wrote:
> On Fri, 09 Jun 2006 10:15:43 +0200, Pascal Bourguignon wrote:
>
>
>>Ron Garret <rNOS...@flownet.com> writes:
>>
>>
>>>In article <87k67r2...@thalassa.informatimago.com>,
>>> Pascal Bourguignon <p...@informatimago.com> wrote:
>>>
>>>
>>>>BobF <rNfOrS...@charter.net> writes:
>>>>
>>>>
>>>>>Nevermind, Pascal. I asked this question because I'm brand-spankin-new to
>>>>>lisp and thought there might be an easy way to accomplish what I was trying
>>>>>to do that I was overlooking.
>>>>>
>>>>>I'm not ready to debug/fix your untested guesses at a solution and I
>>>>>certainly don't need malicious bullshZt thrown my way.
>>>>
>>>>That's exactly because you're a newbie you must try to understand any
>>>>piece of code thrown at you, bullshit or not. If you had tried, you
>>>>could have corrected the trivial error you got from my first version.
>>>
>>>While I agree with that sentiment, I do think that wiping out his entire
>>>system is perhaps making the point a tad too harshly.
>>
>>Well I counted on regulars to comment promptly on this deletery form,
>>and indeed, at least two warned against it. :-)

Bullshit, Pascal. You effectively sent destructive code to someone after
sending them benign code (lowering their defenses) with an explicit
indication that the code would merely be an improvement. You had no idea
what the timing would be in re the noob (who is even more likely not to
spot the assault) receiving the bomb and others responding. Even a Lisp
guru might be talking to a friend on the phone and blithely cut/paste
your stupidity into their environment and run.

>
> Fortunately, contrary to your previous implication, I *did* look at the
> code you provided and found the malicious part on my own.

Had you not, a lawsuit against PB would have easily prevailed.

Duane Rettig

unread,
Jun 9, 2006, 11:32:49 AM6/9/06
to
Ken Tilton <kent...@gmail.com> writes:

> BobF wrote:
>
>> I'm at the beginning. I'm just introducing myself to concepts and
>> trying
>> to figure out the environment.
>
> Part of "figuring out the environment" is adjusting to how interactive
> development differs from compile-link-run. Your desire for a way to
> wipe Lisp signifies resistance to The Lisp Way. You need eventually to
> get over this hump (one small downside of interactive programming), so
> do it now when the puzzles are easier to solve.

The keyword is "eventually". And that time probably hasn't come for any
of us, really - C'mon, Keny, admit it, you still have some C-like things
you do that could have been done in a much more Lispy Way, haven't you?

:-)

--
Duane Rettig du...@franz.com Franz Inc. http://www.franz.com/
555 12th St., Suite 1450 http://www.555citycenter.com/
Oakland, Ca. 94607 Phone: (510) 452-2000; Fax: (510) 452-0182

Tayssir John Gabbour

unread,
Jun 9, 2006, 12:22:02 PM6/9/06
to
BobF wrote:
> Let me turn this around. Surprise me with a valid reason for NOT
> starting a fresh project with a fresh environment. Sorry, the .1
> seconds saved by not typing ",rest RET" isn't valid :-)

Yes, I too have gotten the impression that moving towards truly dynamic
workstyles is "desired", but not seriously supported by the Common Lisp
implementations I've seen so far. Because we still program using text
files as the base of our development.

(Though some people apparently save/reload their images like a
videogame, letting it live for a week or two before reloading from
sourcecode.
<http://groups.google.com/group/comp.lang.lisp/browse_frm/thread/73609b97c0e0f2f4/>)

I hear that Smalltalk and some old Lisp environments are more advanced
in this regard. Dunno though.


Tayssir

Ken Tilton

unread,
Jun 9, 2006, 12:27:03 PM6/9/06
to

BobF wrote:

> OTOH, I have become intrigued by the (reset-cluser) approach, so I've
> started a clean thread (see a pattern here? :-)) to dive into it.

I look forward to the paper you will be presenting at the next ILC.

<sigh>

I hope you guys are happy. Hey, who's gonna tell Bob about modifying the
readtable? That is how we usually make sure newbies do not actually get
anything useful done.

Spreading Lisp anti-propaganda let us keep Lisp to ourselves for decades
till Graham had to open his big yap and ruin everything. Then we figured
out that Lisp can be its own black hole as long as users are given the
right misdirection.

<\sigh>

kzo

Ken Tilton

unread,
Jun 9, 2006, 1:37:14 PM6/9/06
to

Tayssir John Gabbour wrote:
> BobF wrote:
>
>>Let me turn this around. Surprise me with a valid reason for NOT
>>starting a fresh project with a fresh environment. Sorry, the .1
>>seconds saved by not typing ",rest RET" isn't valid :-)
>
>
> Yes, I too have gotten the impression that moving towards truly dynamic
> workstyles is "desired", but not seriously supported by the Common Lisp
> implementations I've seen so far. Because we still program using text
> files as the base of our development.

I love text! I can have it in a complete mess and still compile one
little bit and rerun my app. I can smear code around like fingerpaint
until I figure out what it should look like. It sounds as if you are
talking about Smalltalk with its neat little pigeon-holes for all my
code. Ewwwww!

>
> (Though some people apparently save/reload their images like a
> videogame, letting it live for a week or two before reloading from
> sourcecode.
> <http://groups.google.com/group/comp.lang.lisp/browse_frm/thread/73609b97c0e0f2f4/>)
>
> I hear that Smalltalk and some old Lisp environments are more advanced
> in this regard. Dunno though.

IIRC, the Smalltalk I used did have a reset button.

ken

--
Cells: http://common-lisp.net/project/cells/

"I'll say I'm losing my grip, and it feels terrific."

-- Smiling husband to scowling wife, New Yorker cartoon

Ken Tilton

unread,
Jun 9, 2006, 2:09:06 PM6/9/06
to

Duane Rettig wrote:
> Ken Tilton <kent...@gmail.com> writes:
>
>
>>BobF wrote:
>>
>>
>>>I'm at the beginning. I'm just introducing myself to concepts and
>>>trying
>>>to figure out the environment.
>>
>>Part of "figuring out the environment" is adjusting to how interactive
>>development differs from compile-link-run. Your desire for a way to
>>wipe Lisp signifies resistance to The Lisp Way. You need eventually to
>>get over this hump (one small downside of interactive programming), so
>>do it now when the puzzles are easier to solve.
>
>
> The keyword is "eventually".

Unresponsive! The ensuing point was that it is better to learn this
lesson now when the OP has three user definitions instead of three
months from now when he has three hundred and realizes he is spending
40% of the workday resetting his environment (deleting /all/ used
packages and reloading /all/ of them -- and we know how many gotchas
that will force him to address) and has to give up on that crutch and
try to develop a second sense for when program misbehavior is a leftover
(or failure to compile). By that time the mismatch between his project
size and his abilities will crush him -- exactly what we want if he is
working on a compettive application.

> And that time probably hasn't come for any
> of us, really -

Sorry, unlike the rest of you[*], I have the advantage of actually
writing Lisp all day, so I only have that stunned-cow look for about ten
seconds before realizing some leftover is at work.

[*] Does a Lisp compiler writer write much Lisp?

Yesterday was a little tougher, a GF dispatch surprise from some silly
precedence I let arise (and the GF is a little silly itself). Needed
trace for that one, and it might have been a full minute of WTF? before
I got that one.

Now, Duane, confess: What is your second thought after "Hunh? I just
fixed that."? (I understand it may be different in Assembler.)

> .. C'mon, Keny, admit it, you still have some C-like things


> you do that could have been done in a much more Lispy Way, haven't you?

The other way around. I was coding the Lisp Way in C before I knew Lisp.
As Novus can tell you, I am truly gifted.

Objects, functional style (I had to turn off the warning for assignment
statements in conditionals), and (thx to the preprocessor) accessors for
all slot references. Or do you mean all the functions like this I wrote:

(defun my-floor (dividend divisor &optional remainder-var)
(multiple-value-bind (quo rem) (floor dividend divisor)
(when remainder-var
(rplaca remainder-var rem))
quo))

(let ((rem-place (cons nil nil)))
(list (my-floor 42 9 rem-place) (car rem-place)))
=> (4 6)?

Perhaps. :)

kzo

--
Cells: http://common-lisp.net/project/cells/

"I'll say I'm losing my grip, and it feels terrific."

Ken Tilton

unread,
Jun 9, 2006, 2:25:57 PM6/9/06
to

BobF wrote:
> But couldn't the desire to reset lisp be considered a form of falling down?

No, we call this Ilias Syndrome. We get one like you every three months,
starts out all excited about Lisp, then falls for it when someone like
PB posts a joke (the first bit where he suggested deleting cl-user) and,
aside from a hilarious thread in which Lispniks try to save the noob
from pissing away a valuable language, soon never is heard from again.

> As I've said in other parts of this thread, I'm sure my patterns will
> adjust as my experience with lisp grows.
>
> I still maintain that there is nothing wrong with starting a fresh project
> with a fresh environment.
>
> Let me turn this around.

Here comes the light.

> Surprise me with a valid reason for NOT starting
> a fresh project with a fresh environment. Sorry, the .1 seconds saved by
> not typing ",rest RET" isn't valid :-)

In the Asian tradition, heed the master or find a new one. Do not quiz
them. But you may ask again after you have been programming Lisp for a
few weeks.

kenny

--
Cells: http://common-lisp.net/project/cells/

"I'll say I'm losing my grip, and it feels terrific."

BobF

unread,
Jun 9, 2006, 2:38:28 PM6/9/06
to
On Fri, 09 Jun 2006 14:09:06 -0400, Ken Tilton wrote:

>> Duane Rettig wrote:
>>
>> The keyword is "eventually".
>
> Unresponsive! The ensuing point was that it is better to learn this
> lesson now when the OP has three user definitions instead of three
> months from now when he has three hundred and realizes he is spending
> 40% of the workday resetting his environment (deleting /all/ used
> packages and reloading /all/ of them -- and we know how many gotchas
> that will force him to address) and has to give up on that crutch and
> try to develop a second sense for when program misbehavior is a leftover
> (or failure to compile). By that time the mismatch between his project
> size and his abilities will crush him -- exactly what we want if he is
> working on a compettive application.
>

Wow. I really do appreciate you trying to short circuit the pain process
for me, but I must say that I'm getting the impression that The Lisp Way is
about sloppiness.

Ken - you're presenting yourself as a gifted guru. I have no evidence that
I shouldn't take you at your word. Please indulge me by answering a couple
of sincere questions:

1. Do you write lisp code all day in an academic or commercial capacity?

2. Would you mind elaborating a bit more on the overall methodology you
use? Your description of the process so far sounds devoid of "repeatable
process" - an image I'm sure you're not trying to project.

If managing a lisp image is really that time-consuming and error prone,
then you may have saved me a bunch of time I would otherwise waste
exploring lisp.

BobF

unread,
Jun 9, 2006, 2:47:13 PM6/9/06
to
On Fri, 09 Jun 2006 14:25:57 -0400, Ken Tilton wrote:

> BobF wrote:
>> But couldn't the desire to reset lisp be considered a form of falling down?
>
> No, we call this Ilias Syndrome. We get one like you every three months,
> starts out all excited about Lisp, then falls for it when someone like
> PB posts a joke (the first bit where he suggested deleting cl-user) and,
> aside from a hilarious thread in which Lispniks try to save the noob
> from pissing away a valuable language, soon never is heard from again.
>
>> As I've said in other parts of this thread, I'm sure my patterns will
>> adjust as my experience with lisp grows.
>>
>> I still maintain that there is nothing wrong with starting a fresh project
>> with a fresh environment.
>>
>> Let me turn this around.
>
> Here comes the light.
>
>> Surprise me with a valid reason for NOT starting
>> a fresh project with a fresh environment. Sorry, the .1 seconds saved by
>> not typing ",rest RET" isn't valid :-)
>
> In the Asian tradition, heed the master or find a new one. Do not quiz
> them. But you may ask again after you have been programming Lisp for a
> few weeks.
>

I didn't realize you were my lisp master. I was under the (mistaken?)
impression that you were a fellow (if somewhat full of yourself) computing
professional. If you want unquestioning, blind followers, then you need to
seek new students.

Pascal Bourguignon

unread,
Jun 9, 2006, 2:52:09 PM6/9/06
to
Ken Tilton <kent...@gmail.com> writes:
> Fabulous. Now what do we teach them, those things or how to reset a
> session? Hint: we are almost back to my question "How many Lispniks
> wipe their environments during a session?".

First, I'd say, my CL sessions in general closely follow the machine uptime:

[60]> (uptime)
uptime: 1 day, 2 hours, 6 minutes, 21 seconds.
93981
[61]> (ext:shell "uptime")
8:47pm up 1 day 4:24, 7 users, load average: 0.07, 0.13, 0.12
0


Then, I don't often wipe my environment. However, deleting a package
may occur occasionally, when debugging it and when it involves
methods with changing signatures for example...

--
__Pascal Bourguignon__ http://www.informatimago.com/

CONSUMER NOTICE: Because of the "uncertainty principle," it is
impossible for the consumer to simultaneously know both the precise
location and velocity of this product.

Duane Rettig

unread,
Jun 9, 2006, 2:53:17 PM6/9/06
to
Ken Tilton <kent...@gmail.com> writes:

> Duane Rettig wrote:
>> Ken Tilton <kent...@gmail.com> writes:
>>
>>>BobF wrote:
>>>
>>>
>>>>I'm at the beginning. I'm just introducing myself to concepts and
>>>>trying
>>>>to figure out the environment.
>>>
>>>Part of "figuring out the environment" is adjusting to how interactive
>>>development differs from compile-link-run. Your desire for a way to
>>>wipe Lisp signifies resistance to The Lisp Way. You need eventually to
>>>get over this hump (one small downside of interactive programming), so
>>>do it now when the puzzles are easier to solve.
>> The keyword is "eventually".
>
> Unresponsive! The ensuing point was that it is better to learn this
> lesson now when the OP has three user definitions instead of three
> months from now when he has three hundred and realizes he is spending
> 40% of the workday resetting his environment (deleting /all/ used
> packages and reloading /all/ of them -- and we know how many gotchas
> that will force him to address) and has to give up on that crutch and
> try to develop a second sense for when program misbehavior is a
> leftover (or failure to compile).

Sometimes advwersity (especially the self-inflicted kind) is the best
teacher.

> By that time the mismatch between
> his project size and his abilities will crush him --

Or make him stronger and wiser.

> exactly what we want if he is working on a compettive application.

Competttion [sic] should not be for newbies. And although there always
tends to be competttion anyway, there should always first be times of
learning - a position which I believe the OP has already stated
clearly. So it doesn't apply here.

>> And that time probably hasn't come for any
>> of us, really -
>
> Sorry, unlike the rest of you[*], I have the advantage of actually
> writing Lisp all day, so I only have that stunned-cow look for about
> ten seconds before realizing some leftover is at work.

And what do you do with this leftover? Do you admit that it could have
been done more efficiently (for some measure of efficiency) or do you
leave it alone ("well, since I did it in The Lisp Way it must be good")?

> [*] Does a Lisp compiler writer write much Lisp?

Of course. Most of the lisp is written in Lisp, so it's a given. But
actually, since a good portion of my time is spent in dealing with
efficiency, you might say I am getting paid to _unwrite_ Lisp code.
Always in search of a better way, a more efficient way, a more maintainable
way, etc. I have to chuckle when these threads arise every once in a
while about Lines Of Code measurements; by most such standards, I would
have to be paying my company to do my job.

> Yesterday was a little tougher, a GF dispatch surprise from some silly
> precedence I let arise (and the GF is a little silly itself). Needed
> trace for that one, and it might have been a full minute of WTF?
> before I got that one.
>
> Now, Duane, confess: What is your second thought after "Hunh? I just
> fixed that."? (I understand it may be different in Assembler.)

It doesn't happen to me very often (largely because I actually sit a
little closer in philosophy to the OP in that I like to start things
clean. (my answer to his original question, by the way, would be "start
the lisp again").

And I don't necessarily agree that not clearing out an environment is
a Lisp Way thing to do, any more than having a messy desk is a Genius
Thing to do. Many geniuses have messy desks, but is that a cause or
an effect?

>> .. C'mon, Keny, admit it, you still have some C-like things
>> you do that could have been done in a much more Lispy Way, haven't you?
>
> The other way around. I was coding the Lisp Way in C before I knew
> Lisp. As Novus can tell you, I am truly gifted.

Humble, too.

I guess I was trying to get you to ask yourself the question "is the
Lisp Way attainable?". But it appears that you've either not considered
it, or have decided in the affirmative. Perhaps you should reexamine
that question more closely (or examine it if you never have done so).

> Objects, functional style (I had to turn off the warning for
> assignment statements in conditionals), and (thx to the preprocessor)
> accessors for all slot references. Or do you mean all the functions
> like this I wrote:
>
> (defun my-floor (dividend divisor &optional remainder-var)
> (multiple-value-bind (quo rem) (floor dividend divisor)
> (when remainder-var
> (rplaca remainder-var rem))
> quo))
>
> (let ((rem-place (cons nil nil)))
> (list (my-floor 42 9 rem-place) (car rem-place)))
> => (4 6)?

Wow. Reverse-functional. Functional results ravel _upward_ in the call
chain. Almost looks like C lvalues. Maybe we could incorporate that into
the Lisp Way.

> Perhaps. :)

Definitely :-)

Pascal Bourguignon

unread,
Jun 9, 2006, 2:54:07 PM6/9/06
to
Ken Tilton <kent...@gmail.com> writes:
>>>Well I counted on regulars to comment promptly on this deletery form,
>>>and indeed, at least two warned against it. :-)
>
> Bullshit, Pascal. You effectively sent destructive code to someone
> after sending them benign code (lowering their defenses) with an
> explicit indication that the code would merely be an improvement. You
> had no idea what the timing would be in re the noob (who is even more
> likely not to spot the assault) receiving the bomb and others
> responding. Even a Lisp guru might be talking to a friend on the phone
> and blithely cut/paste your stupidity into their environment and run.
>
>> Fortunately, contrary to your previous implication, I *did* look at
>> the code you provided and found the malicious part on my own.
>
> Had you not, a lawsuit against PB would have easily prevailed.

After about 1,840,000 for "FORMAT C:". ;-)

Pascal Costanza

unread,
Jun 9, 2006, 3:36:10 PM6/9/06
to
Ken Tilton wrote:

> Sorry, unlike the rest of you[*], I have the advantage of actually

> writing Lisp all day, [...]

This is probably an important misconception on your side, and IMHO you
should take into account that this could be a serious misconception.

[I mean the "unlike the rest of you" part, not the "all day" part. And
no, I am not talking about myself here as someone who writes competitive
amounts of code.]

Another thing that you sometimes seem to miss is that Common Lisp
encourages (!) different styles of programming. So "the Lisp way" is a
very fuzzy notion, to say the least. [1]

> [*] Does a Lisp compiler writer write much Lisp?

Of course!


Pascal

[1] That's why I have a tendency to answer questions in "direct style",
without assuming too much what would be "better" for those who have
asked these questions, because ultimately I cannot judge this. I do this
intentionally, I think this is the better approach.

--
3rd European Lisp Workshop
July 3 - Nantes, France - co-located with ECOOP 2006
http://lisp-ecoop06.bknr.net/

Ken Tilton

unread,
Jun 9, 2006, 4:57:39 PM6/9/06
to

BobF wrote:
> On Fri, 09 Jun 2006 14:09:06 -0400, Ken Tilton wrote:
>
>
>>>Duane Rettig wrote:
>>>
>>>The keyword is "eventually".
>>
>>Unresponsive! The ensuing point was that it is better to learn this
>>lesson now when the OP has three user definitions instead of three
>>months from now when he has three hundred and realizes he is spending
>>40% of the workday resetting his environment (deleting /all/ used
>>packages and reloading /all/ of them -- and we know how many gotchas
>>that will force him to address) and has to give up on that crutch and
>>try to develop a second sense for when program misbehavior is a leftover
>>(or failure to compile). By that time the mismatch between his project
>>size and his abilities will crush him -- exactly what we want if he is
>>working on a compettive application.
>>
>
>
> Wow. I really do appreciate you trying to short circuit the pain process
> for me, but I must say that I'm getting the impression that The Lisp Way is
> about sloppiness.

Only in the positive sense of the word.

>
> Ken - you're presenting yourself as a gifted guru.

Absolutely.

> I have no evidence that
> I shouldn't take you at your word. Please indulge me by answering a couple
> of sincere questions:
>
> 1. Do you write lisp code all day in an academic or commercial capacity?

Commercial.

>
> 2. Would you mind elaborating a bit more on the overall methodology you
> use? Your description of the process so far sounds devoid of "repeatable
> process" - an image I'm sure you're not trying to project.

I think that interpretation says more about your compulsiveness than
what I actually said.

Yes, on rare (once every four months?) occasions I will change the
specialization of a method on a GF and neglect to call up the former
variant in ACL's definitions dialog and zap it.

Perhaps you will concede this does not rise to "devoid of repeatability"?

>
> If managing a lisp image is really that time-consuming and error prone,
> then you may have saved me a bunch of time I would otherwise waste
> exploring lisp.
>

Lisp is definitely not for the Rain Man.

Ken Tilton

unread,
Jun 9, 2006, 5:13:27 PM6/9/06
to

BobF wrote:
> On Fri, 09 Jun 2006 14:25:57 -0400, Ken Tilton wrote:
>
>
>>BobF wrote:

>>> Surprise me with a valid reason for NOT starting
>>>a fresh project with a fresh environment. Sorry, the .1 seconds saved by
>>>not typing ",rest RET" isn't valid :-)
>>
>>In the Asian tradition, heed the master or find a new one. Do not quiz
>>them. But you may ask again after you have been programming Lisp for a
>>few weeks.
>>
>
>
> I didn't realize you were my lisp master.

One word: Cells.

> I was under the (mistaken?)
> impression that you were a fellow (if somewhat full of yourself) computing
> professional. If you want unquestioning, blind followers, then you need to
> seek new students.
>

You may be right.

BobF

unread,
Jun 9, 2006, 5:18:03 PM6/9/06
to
On Fri, 09 Jun 2006 16:57:39 -0400, Ken Tilton wrote:

> BobF wrote:
>> On Fri, 09 Jun 2006 14:09:06 -0400, Ken Tilton wrote:
>>
>>
>>>>Duane Rettig wrote:
>>>>
>>>>The keyword is "eventually".
>>>
>>>Unresponsive! The ensuing point was that it is better to learn this
>>>lesson now when the OP has three user definitions instead of three
>>>months from now when he has three hundred and realizes he is spending
>>>40% of the workday resetting his environment (deleting /all/ used
>>>packages and reloading /all/ of them -- and we know how many gotchas
>>>that will force him to address) and has to give up on that crutch and
>>>try to develop a second sense for when program misbehavior is a leftover
>>>(or failure to compile). By that time the mismatch between his project
>>>size and his abilities will crush him -- exactly what we want if he is
>>>working on a compettive application.
>>>
>>
>>
>> Wow. I really do appreciate you trying to short circuit the pain process
>> for me, but I must say that I'm getting the impression that The Lisp Way is
>> about sloppiness.
>
> Only in the positive sense of the word.
>

Good. So it's loose in the sense of freedom from formality?

>>
>> Ken - you're presenting yourself as a gifted guru.
>
> Absolutely.
>
>> I have no evidence that
>> I shouldn't take you at your word. Please indulge me by answering a couple
>> of sincere questions:
>>
>> 1. Do you write lisp code all day in an academic or commercial capacity?
>
> Commercial.
>
>>
>> 2. Would you mind elaborating a bit more on the overall methodology you
>> use? Your description of the process so far sounds devoid of "repeatable
>> process" - an image I'm sure you're not trying to project.
>
> I think that interpretation says more about your compulsiveness than
> what I actually said.

hmmmm. If you say so. What you've said is that restarting and reloading
an image consumes too much time, dealing with leftovers being preferable.
On the surface, that sounds unpredictable.

BTW, when I'm talking about restarting lisp to get a clean environment, I'm
not talking about doing so to reload what I've been working on. I'm
talking about as a first step before starting something new.

>
> Yes, on rare (once every four months?) occasions I will change the
> specialization of a method on a GF and neglect to call up the former
> variant in ACL's definitions dialog and zap it.
>
> Perhaps you will concede this does not rise to "devoid of repeatability"?
>

OK. But you still haven't shared a 30,000 ft view of your approach. I'm
not talking about language details, I'm talking about how you manage your
environment, do you work more-or-less with repl, do you do most of the work
in files ... I'm trying to get a picture of what the process looks like for
creating non-trivial applications.

>>
>> If managing a lisp image is really that time-consuming and error prone,
>> then you may have saved me a bunch of time I would otherwise waste
>> exploring lisp.
>>
>
> Lisp is definitely not for the Rain Man.

Funny

Pascal Costanza

unread,
Jun 9, 2006, 5:50:37 PM6/9/06
to
BobF wrote:
> On Fri, 09 Jun 2006 16:57:39 -0400, Ken Tilton wrote:
>
>> BobF wrote:
>>> On Fri, 09 Jun 2006 14:09:06 -0400, Ken Tilton wrote:
>>>
>> I think that interpretation says more about your compulsiveness than
>> what I actually said.
>
> hmmmm. If you say so. What you've said is that restarting and reloading
> an image consumes too much time, dealing with leftovers being preferable.
> On the surface, that sounds unpredictable.

It's not an either/or thing. Over time, you will get experience which
kinds of leftovers are problematic and which are not, and with even more
experience you will know how to deal with ever more of them.

Whether this is important from the start or not for a newbie is a
different question. [1] Shutting down and restarting again is relatively
cheap nowadays. Was probably not in the past, that's why Common Lisp has
quite a few ways to deal with such issues, which are sometimes actually
really useful even within applications. But I am digressing... ;)


Pascal


[1] My impression is that Kenny thinks that everything is important from
day 1, except for the metaobject protocol. ;)

Ken Tilton

unread,
Jun 9, 2006, 6:22:30 PM6/9/06
to

Duane Rettig wrote:

> Competttion [sic] should not be for newbies. And although there always

> tends to be competttion...

Of course the downside of making such a big deal about one little typo
is that you had to spell check /and/ grammar check your entire article
(and have Chee proof it, to boot). Lord help you if I find even one!

>... anyway, there should always first be times of


> learning - a position which I believe the OP has already stated
> clearly. So it doesn't apply here.

Hunh? We are not talking about not helping the noob, we are talking
about what they should be learning -- how to wipe a Lisp a session, or
how to recognize free radicals and expunge them.

Indeed, while the yobbos of cll (and the noob) were sticking arrrows in
my back, the consensus was arrived at: don't wipe, bounce. Still the
wrong advice, but at least we are no longer worrying about package
locks. My work here is done.

(Thank you, Masked Man.)

>
>
>>>And that time probably hasn't come for any
>>>of us, really -
>>
>>Sorry, unlike the rest of you[*], I have the advantage of actually
>>writing Lisp all day, so I only have that stunned-cow look for about
>>ten seconds before realizing some leftover is at work.
>
>
> And what do you do with this leftover?

Well, with ACL8 the project manager makes it so convenient that I just
bounce the Lisp rather than type fmakunbound.


> Do you admit that it could have
> been done more efficiently (for some measure of efficiency) or do you
> leave it alone ("well, since I did it in The Lisp Way it must be good")?

??? Did we just change the subject to refactoring? Ya lost me.

>
>
>>[*] Does a Lisp compiler writer write much Lisp?
>
>
> Of course. Most of the lisp is written in Lisp, so it's a given.

Of course, but it is a different kind of Lisp, right? How often do you
saddle up and ride out into the great unknown, or as Graham wrote, "when
you do not know what program to write"?

> But
> actually, since a good portion of my time is spent in dealing with
> efficiency, you might say I am getting paid to _unwrite_ Lisp code.
> Always in search of a better way, a more efficient way, a more maintainable
> way, etc. I have to chuckle when these threads arise every once in a
> while about Lines Of Code measurements; by most such standards, I would
> have to be paying my company to do my job.

Ohhhh, you work in /maintenance/! :) You know, I remember a solid three
months on that huge CliniSys system where the backups got smaller every
day. I didn't tell management.

>
>
>>Yesterday was a little tougher, a GF dispatch surprise from some silly
>>precedence I let arise (and the GF is a little silly itself). Needed
>>trace for that one, and it might have been a full minute of WTF?
>>before I got that one.
>>
>>Now, Duane, confess: What is your second thought after "Hunh? I just
>>fixed that."? (I understand it may be different in Assembler.)
>
>
> It doesn't happen to me very often (largely because I actually sit a
> little closer in philosophy to the OP in that I like to start things
> clean. (my answer to his original question, by the way, would be "start
> the lisp again").
>
> And I don't necessarily agree that not clearing out an environment is
> a Lisp Way thing to do, any more than having a messy desk is a Genius
> Thing to do. Many geniuses have messy desks, but is that a cause or
> an effect?

Ah, but if you see a tidy desk you know your employee has a compulsive
disorder and is spending time too much time on tidying up. I mean, my
desk may be a mess, but how long can it take to find a keyboard?

I can see you now, pairs programming with our noob who, deceived by the
savages of cll, never came to grips with the shifting sands of a Lisp
session. Every time he hits a backtrace he first aborts and bounces ACL
"just to make sure". I also see you taking the keyboard away from him
after about an hour of that.

>
>
>>>.. C'mon, Keny, admit it, you still have some C-like things

Keny? :) I guess you didn't have Chee proof it.

>>>you do that could have been done in a much more Lispy Way, haven't you?
>>
>>The other way around. I was coding the Lisp Way in C before I knew
>>Lisp. As Novus can tell you, I am truly gifted.
>
>
> Humble, too.
>
> I guess I was trying to get you to ask yourself the question "is the
> Lisp Way attainable?". But it appears that you've either not considered
> it, or have decided in the affirmative.

How about... chya! Or is that "in the affirmative"?

> Perhaps you should reexamine
> that question more closely (or examine it if you never have done so).

I hate it when you get all Sphinx-like. Lemme guess at what you mean and
answer thus: the unatttainability of perfection is no excuse for not
heading that way.

:)

kennny

jar...@gmail.com

unread,
Jun 9, 2006, 7:09:30 PM6/9/06
to
Ken,
I update the blog server here:

http://www.cincomsmalltalk.com/blog/blogView

on the fly, without shutdown/restart on a regular basis. All I do is
upload code and kick the server to load it - which it does as it
handles other requests. So that "write a little bit and compile it"
bit - I skip that part. I write the code, and then it just runs.

Ken Tilton

unread,
Jun 9, 2006, 7:35:06 PM6/9/06
to

BobF wrote:
> On Fri, 09 Jun 2006 16:57:39 -0400, Ken Tilton wrote:
>
>
>>BobF wrote:
>>
>>>On Fri, 09 Jun 2006 14:09:06 -0400, Ken Tilton wrote:
>>>
>>>
>>>
>>>>>Duane Rettig wrote:
>>>>>
>>>>>The keyword is "eventually".
>>>>
>>>>Unresponsive! The ensuing point was that it is better to learn this
>>>>lesson now when the OP has three user definitions instead of three
>>>>months from now when he has three hundred and realizes he is spending
>>>>40% of the workday resetting his environment (deleting /all/ used
>>>>packages and reloading /all/ of them -- and we know how many gotchas
>>>>that will force him to address) and has to give up on that crutch and
>>>>try to develop a second sense for when program misbehavior is a leftover
>>>>(or failure to compile). By that time the mismatch between his project
>>>>size and his abilities will crush him -- exactly what we want if he is
>>>>working on a compettive application.
>>>>
>>>
>>>
>>>Wow. I really do appreciate you trying to short circuit the pain process
>>>for me, but I must say that I'm getting the impression that The Lisp Way is
>>>about sloppiness.
>>
>>Only in the positive sense of the word.
>>
>
>
> Good. So it's loose in the sense of freedom from formality?

Formality? How about freedom from unnecessary constraints? Perhaps not a
digression: this is a decision Lisp made (if only implicitly) a long
time ago in re strong static typing. In our case, no, there is no
necessary correlation between the source code in front of you and what
is running. That would be nice, but then the wheels come off: no more
changing a function and seeing the new behavior without exiting an
application and relinking (and recompiling all changed source) from
scratch and then working back to where you were in the test.

> OK. But you still haven't shared a 30,000 ft view of your approach. I'm
> not talking about language details, I'm talking about how you manage your

> environment, do you work more-or-less with repl,...

never. I type one-offs into the source file that happens to be in front
of me, evaluate, and delete.

> do you do most of the work
> in files ... I'm trying to get a picture of what the process looks like for
> creating non-trivial applications.

Same as Think C, CodeWarrior, Visual C++, NetBeans: libraries,
directories, projects. I use ACL on win32, it rocks, a true grown-up IDE
(another thing you have to get used to about Lisp -- not many of those
around). I set the options that say "When I hit 'run', save everything,
compile, and go". That sequence means, yes, everything compiles (without
warnings -- I am a /little/ compulsive) before I run.

Note that bouncing has not come up. As mentioned elsewhere, once in a
blue moon I get bit by phantom definitions. Adjusting to this reality is
actually just a minor transition any developer goes through when moving
to Lisp, no big 30k foot view issue.
kt

Duane Rettig

unread,
Jun 9, 2006, 7:37:55 PM6/9/06
to
Ken Tilton <kent...@gmail.com> writes:

> Duane Rettig wrote:
>
>> Competttion [sic] should not be for newbies. And although there always
>> tends to be competttion...
>
> Of course the downside of making such a big deal about one little typo
> is that you had to spell check /and/ grammar check your entire article
> (and have Chee proof it, to boot). Lord help you if I find even one!

Precisely. And the downside of making such a big deal with a noob
about one little departure from The Lisp Way is that you had better
now tow the line and be the very essence of The Lisp Way in whatever
you do.

>>... anyway, there should always first be times of
>> learning - a position which I believe the OP has already stated
>> clearly. So it doesn't apply here.
>
> Hunh? We are not talking about not helping the noob, we are talking
> about what they should be learning -- how to wipe a Lisp a session, or
> how to recognize free radicals and expunge them.

Ahem. Here is the very first paragraph of the article you wrote to which
I first responded:

| > Ken,
| > Read your own response carefully. You answered your own question on
| > my
| > behalf :-)
|
| No, sh*t, Einstein. But in a situation like this (helping a struggling
| noob), the last thing one wants to do is make things worse by not
| waiting for the noob to confirm. Well, that's second to last. Last is
| erasing their hard drive. :(

So are we really not talking about helping a noob?

> Indeed, while the yobbos of cll (and the noob) were sticking arrrows
> in my back, the consensus was arrived at: don't wipe, bounce. Still
> the wrong advice, but at least we are no longer worrying about package
> locks. My work here is done.
>
> (Thank you, Masked Man.)
>
>>
>>>>And that time probably hasn't come for any
>>>>of us, really -
>>>
>>>Sorry, unlike the rest of you[*], I have the advantage of actually
>>>writing Lisp all day, so I only have that stunned-cow look for about
>>>ten seconds before realizing some leftover is at work.
>> And what do you do with this leftover?
>
> Well, with ACL8 the project manager makes it so convenient that I just
> bounce the Lisp rather than type fmakunbound.
>
>
>> Do you admit that it could have
>> been done more efficiently (for some measure of efficiency) or do you
>> leave it alone ("well, since I did it in The Lisp Way it must be good")?
>
> ??? Did we just change the subject to refactoring? Ya lost me.

Probably back at "helping the noob". The Lisp Way is all about choices.
Refactoring is only one of the dimensions in which those choices dwell.
Another dimension (which I thought we were trying to help the noob with)
is whether to undo or to restart. It's choices.

>>>[*] Does a Lisp compiler writer write much Lisp?
>> Of course. Most of the lisp is written in Lisp, so it's a given.
>
> Of course, but it is a different kind of Lisp, right?

Two different lisps; one is Common Lisp, and one is a "runtime" lisp;
very low-level, but lisp nonetheless - the same compiler compiles
both, giving creedence to the claim that Lisps can support more than
one language _at_ the _same_ _time_!

> How often do you
> saddle up and ride out into the great unknown, or as Graham wrote,
> "when you do not know what program to write"?

Every day. But then, perhaps our view on what is "unknown" differs.

On one extreme, I've seen programmers sit down and write out a program
almost as fast as they type a sentence in Engish; it is of course perfectly
formatted (even without the aid of a l isp-savvy editor), and of course it
works almost perfectly the first time, modulo a minor bug or two.

On the other extreme, there is the pure researcher. He fits into Graham's
description, not because he doesn't know what program to write, but because
he has no clue at all what he's doing. He is researching, and he is learning
as he goes.

Lisp supports both of those extremes, but I suggewst that most of us are
located somewhere in the middle (which of course Lisp supports nicely).

OK, so based on your exaltation of the keyboard, I deduce that your desk
can only be a mess because it is in fact full of ... candy wrappers!

(Am I close?)

> I can see you now, pairs programming with our noob who, deceived by
> the savages of cll, never came to grips with the shifting sands of a
> Lisp session. Every time he hits a backtrace he first aborts and
> bounces ACL "just to make sure". I also see you taking the keyboard
> away from him after about an hour of that.

But in my position, usually by the time we get them, that's precisely the
first thing we ask them to do ("please show us how to reproduce the problem
in a fresh lisp...")

>>>>.. C'mon, Keny, admit it, you still have some C-like things
>
> Keny? :) I guess you didn't have Chee proof it.

:-)

>>>>you do that could have been done in a much more Lispy Way, haven't you?
>>>
>>>The other way around. I was coding the Lisp Way in C before I knew
>>>Lisp. As Novus can tell you, I am truly gifted.
>> Humble, too.
>> I guess I was trying to get you to ask yourself the question "is the
>> Lisp Way attainable?". But it appears that you've either not considered
>> it, or have decided in the affirmative.
>
> How about... chya! Or is that "in the affirmative"?

But then, if you are already there, how sad for you; you have nowhere to
go from there...

>> Perhaps you should reexamine
>> that question more closely (or examine it if you never have done so).
>
> I hate it when you get all Sphinx-like. Lemme guess at what you mean
> and answer thus: the unatttainability of perfection is no excuse for
> not heading that way.

Well, that certainly could be true, especially if you are applying that
concept to your own journey. But if you are on that journey toward
perfection, and you want to also lead someone else toward perfection,
what then is at least one spot you know for certain not to point him
toward?

BobF

unread,
Jun 9, 2006, 8:09:44 PM6/9/06
to


I think I've discovered The Big Disconnect. You're using a well designed
IDE/environment that helps you manage your projects.

As I'm not yet sure how far my lisp journey is taking me, I'm using the
rather archaic emacs/slime environment.

Thanks for thoughts on all of this.

Ken Tilton

unread,
Jun 9, 2006, 8:49:45 PM6/9/06
to

Duane Rettig wrote:
> Ken Tilton <kent...@gmail.com> writes:
>
>
>>Duane Rettig wrote:
>>
>>
>>>Competttion [sic] should not be for newbies. And although there always
>>>tends to be competttion...
>>
>>Of course the downside of making such a big deal about one little typo
>>is that you had to spell check /and/ grammar check your entire article
>>(and have Chee proof it, to boot). Lord help you if I find even one!
>
>
> Precisely. And the downside of making such a big deal with a noob
> about one little departure from The Lisp Way is that you had better

> now tow the line...

I smell a trap.

... and be the very essence of The Lisp Way in whatever
> you do.

Consistency is the hobgoblin of something or other.

>
>
>>>... anyway, there should always first be times of
>>>learning - a position which I believe the OP has already stated
>>>clearly. So it doesn't apply here.
>>
>>Hunh? We are not talking about not helping the noob, we are talking
>>about what they should be learning -- how to wipe a Lisp a session, or
>>how to recognize free radicals and expunge them.
>
>
> Ahem. Here is the very first paragraph of the article you wrote to which
> I first responded:
>
> | > Ken,
> | > Read your own response carefully. You answered your own question on
> | > my
> | > behalf :-)
> |
> | No, sh*t, Einstein. But in a situation like this (helping a struggling
> | noob), the last thing one wants to do is make things worse by not
> | waiting for the noob to confirm. Well, that's second to last. Last is
> | erasing their hard drive. :(
>
> So are we really not talking about helping a noob?

No, we are not, nor did I (see above): "We are not talking about not
helping the noob".

I think we are finally starting to make some leeway. If only a tugboat
would come along and toe our line.

> OK, so based on your exaltation of the keyboard, I deduce that your desk
> can only be a mess because it is in fact full of ... candy wrappers!
>
> (Am I close?)

Please. Granola bars.

>>>I guess I was trying to get you to ask yourself the question "is the
>>>Lisp Way attainable?". But it appears that you've either not considered
>>>it, or have decided in the affirmative.
>>
>>How about... chya! Or is that "in the affirmative"?
>
>
> But then, if you are already there, how sad for you; you have nowhere to
> go from there...

Cool. That is the first time I ever heard a /full/ glass described as
empty. You are a systems guy!

Languages exist to create applications. Which is what I should be doing
now, but OpenGL is kicking my ass for me again so I am over here
procrastinating. Other than that, well, it so happens that I noticed
something when I sat down recently to write application software again
after several years of toiling as the OpenSource Fairy on behalf of
Lispniks everywhere: it was wonderful.

What a difference ten years of worth of fluency makes in a language as
great as Lisp. With Cells, to boot. I guess i did not notice because so
much energy was being spent on stupid things like bindings to C
libraries and figuring out how C frameworks like Freeglut and tcl/Tk
worked. And open sourcing the code is a huge drag on productivity.

Cut loose from the C anchors, well, "sad" might not be the right word. :)

ken

Ken Tilton

unread,
Jun 9, 2006, 9:07:50 PM6/9/06
to

BobF wrote:
> I think I've discovered The Big Disconnect. You're using a well designed
> IDE/environment that helps you manage your projects.

yep. But there is a reason you do not have such an IDE: you will soon
roll your own (rather easily) and never look back. Everyone goes through
this, so there has never been much demand for such a thing (never mind
the small market for Lisp overall).

I was aghast at the crappy state of Lisp IDEs when I got here, and I
started with one of the best! MCL. Integrated editor and Lisp, but
nowhere near as slick as ACL. Anyway, I bitched and moaned something
fierce for about two days and then forget what happened... oh, right, I
wrote my own defsystem in like a two hours. Primitive, but better than
ASDF (which I see from the doc is crippled by having to support McCLIM
-- too funny).

Btw, your homebrew IDE will not have all the bells and whistles of ACL,
but it will be /yours/. It will have exactly and only the b&w's you
want, and if one of them starts to get on your nerves you will change
it. Pretty soon you will be freaking out because you cannot customize
your Java IDE the same way.

>
> As I'm not yet sure how far my lisp journey is taking me, I'm using the
> rather archaic emacs/slime environment.

You have my sympathy, and my encouragment to contribute to the Slime
project.

Rob Warnock

unread,
Jun 9, 2006, 9:11:09 PM6/9/06
to
BobF <n...@thanks.net> wrote:
+---------------

| I think I've discovered The Big Disconnect. You're using a well
| designed IDE/environment that helps you manage your projects.
|
| As I'm not yet sure how far my lisp journey is taking me, I'm
| using the rather archaic emacs/slime environment.
+---------------

Careful! You're about to make the mistake of assuming that Lisp
isn't usable/preferable without "the perfect environment"! NOT SO!

Due to personal ergonomics issues, I've found myself unable to make
the transition from Vi[1] to Emacs [yes, I've tried several times!],
and thus to Emacs+SLIME. So what? Big deal. It doesn't seem to have
impaired me in any way that *I* can see from using Common Lisp to
great advantage over C & friends. I seem to use pretty much the same
cycle of "think, code, compile, load into a persistent Lisp image,
test" that everyone else does, albeit perhaps with a *small* number
of extra (lower-case!) keystrokes compared to a power Emacs/SLIME
user.[2]

Part of that is that nowadays everything has some sort of window
system, so keeping multiple XTerms (or other apps) up is trivial:
one or more Vi sessions [usually on a single file each, but sometimes
with split windows on multiple files]; a Lisp REPL window [well,
sometimes that one's an "attachtty" session to a listener socket,
but same thing]; if I'm doing web work, one or more browser windows;
plus the obligatory browser window(s) open on a local copy of the CLHS.

If you arrange your web code to do an ASDF:LOAD-OP every time
[at least during debugging], then updating the server is as
easy as writing out the edited source files and hitting "Reload"
on the browser! "The right thing" [compile, load, whatever]
"just happens".

And for tiny "one off"s, I do the same as Kenny mentioned before:
type the code into whichever source window is conveniently at hand
[protected with a leading "#-(AND);XXX REPL" so it won't accidentally
be included in the next file-compile] and copy/paste into the REPL
window with the mouse. So maybe it takes a moment longer than typing
CNTL-BUCKY-META-whatever in Emacs/SLIME, but it's still well under
that mythical two-second response time needed to avoid frustration.

As Kenny's always saying [paraphrased], "It's all about the code!
Quit arguing and start writing!" And guess what? If you focus your
efforts on the end result you're trying to accomplish and on writing
*code*, no matter how bad the environment is [and mine is *not* all
that bad!] you *still* win from using Common Lisp!!


-Rob

[1] Actually, any of a large class of "moded" editors, in which
editing commands are (mostly) single lower-case letters when
in editing mode, and (almost) no "chording" is ever needed.
"nvi-1.79" is my current preference, but at work I use "vim"
(in "vi mode"), and previously I have used Xerox Bravo and,
before that, TECO. [Ironic, since the first Emacs was written
as a huge TECO macro!]

[2] The wonder of Lisp is its self-reflexiveness: you can use it
to make using it easier!! E.g., the number of keystrokes to
refresh your environment can be lowered a lot by defining a
(say) REDO symbol macro that calls a REDO function that calls
ASDF or LOAD* or whatever that particular session needs to
re-establish its runtime invariants. It can even be automated
by running a little background monitor process that watches
all the source files and does a (REDO) whenever one of them
changes [although I usually don't do that much any more, since
it can be a bit intrusive].

-----
Rob Warnock <rp...@rpw3.org>
627 26th Avenue <URL:http://rpw3.org/>
San Mateo, CA 94403 (650)572-2607

Damyan Pepper

unread,
Jun 9, 2006, 9:32:55 PM6/9/06
to
BobF <n...@thanks.net> writes:

> I think I've discovered The Big Disconnect. You're using a well
> designed IDE/environment that helps you manage your projects.
>
> As I'm not yet sure how far my lisp journey is taking me, I'm using
> the rather archaic emacs/slime environment.


I think you can get similar behaviour in slime if you use ASDF. It's
probably something to avoid until you start wanting to split your
project into multiple files and packages, but then you can use
slime-load-system (it's under SLIME->Compilation on the menu) to
recompile the appropriate things.

90% of the time though you can just recompile the file you're
currently working on (C-c C-k) and it'll be ok or even just random
bits of it (C-c C-c or C-x C-e). I believe you'll only need to start
recompiling dependent files when you change inline functions or
macros.

The times when I've been tempted to wipe things has been when I've
deleted a function, or I've moved a function from one package to
another.

In the deleted function case I manually unintern it.

When moving a function, I've found that if I export the moved symbol
from it's new place and import that package to its old place, then the
compiler will notice and generate errors that provide restarts to
allow me to remap the symbols properly. Although that last sentence
is unwieldy, that's generally what you want to do if you're moving the
function because it 'belongs' in the other package, but you still call
it from the original one.

FWIW, I occasionally have multiple projects going on at once in my
Lisp session. I've got a game I'm working on and a rent collecting
program that every now and then I need to run when someone gives me
rent money. Since I keep the two things in separate packages they
don't interfere with each other when I switch between the two. I just
open up the correct source file and do C-c M-p ret and it's as if I've
switched my Lisp into a different project. I think someone mentioned
this style of working previously, but I thought I'd second it as a
'works for another lisp newbie' technique.

DISCLAIMER: I'm Lisp +4 months, so I'm not speaking from extensive
experience!

Raffael Cavallaro

unread,
Jun 10, 2006, 12:02:59 AM6/10/06
to
Ken Tilton <kent...@gmail.com> said:

> Your desire for a way to wipe Lisp signifies resistance to The Lisp Way.

But The Lisp Way is precisely that there is no one true way. Maybe he's
just a neat freak. Common lisp can acommodate neat freaks too.

As for what I usually do if I'm experimenting with some random code at
the repl that I don't want hanging around afterwards, I generally
create a waste package and delete it when I'm done. This is amounts to
a manual version of Pascal B's reset-cluser:

(defpackage :waste-package (:use :cl))
(in-package :waste-package)
(defun foo() ...
;; more stuff I don't want hanging around later

(in-package :cl-user)
(delete-package :waste-package)

For small things I just use fmakunbound and makunbound.

> As Novus can tell you, I am truly gifted.

Methinks Kenny's been hitting the ephedra too hard again.

On 2006-06-09 15:36:10 -0400, Pascal Costanza <p...@p-cos.net> said:

> Another thing that you sometimes seem to miss is that Common Lisp
> encourages (!) different styles of programming. So "the Lisp way" is a
> very fuzzy notion, to say the least.

[snip]


> That's why I have a tendency to answer questions in "direct style",
> without assuming too much what would be "better" for those who have
> asked these questions, because ultimately I cannot judge this. I do
> this intentionally, I think this is the better approach.

My approach exactly. Experience has taught me that either the
questioner knows what he wants to achieve or that his experience will
teach him not to want what he now thinks he wants much better than any
lecture from me, the "gifted" Kenny (or anyone else).

P.S. Mom! Kenny's picking on me again! ;^)

Kent M Pitman

unread,
Jun 10, 2006, 12:33:32 AM6/10/06
to
Raffael Cavallaro <raffaelcavallaro@pas-d'espam-s'il-vous-plait-mac.com> writes:

> Ken Tilton <kent...@gmail.com> said:
>
> > Your desire for a way to wipe Lisp signifies resistance to The Lisp Way.
>
> But The Lisp Way is precisely that there is no one true way. Maybe
> he's just a neat freak. Common lisp can acommodate neat freaks too.

Heh. Well, the way Lisp accommodates this in practice is that some Lisps
may offer this feature while others may not. Among the people who want
there not to be one true way are the implementors. :)

That said, the reason that the language doesn't have not only this but
also the seemingly obvious functions QUIT and GC is that there's wide
disagreement about what "Lisp" is. If you think it's a process, then
it makes sense to wipe it clean. But the language was standardized at
a time when Lisp Machines roamed the earth, and to stop Lisp was to
halt your machine, and to exit lisp was to return to the FEP (front
end processor--the moral equivalent of the BIOS, though a lot more
user-friendly). When you logged into a Lisp Machine, you effectively
started Lisp. Often you didn't exit for many months. Wiping it clean
was nonsensical because it was like letting a web browser decide to
blow away your Emacs. :) So we as a community avoided abstractions
that falsely suggested that you knew what other stuff was co-loaded in
the Lisp you had.

Sure, it can make complete sense in a some lisps on some operating systems.
But we ended up relying on the individual vendors to understand where
and when that was appropriate and to assign appropriate mechanisms where
they were needed.

No, probably not as simple a situation as you might have imagined.

On someone's door at Symbolics was a picture of Zippy the Pinhead and
the words "At Symbolics we make hard problems easy, and vice versa."
There was a lot of truth in that, and not because we were just idiots.
In some ways, the right way to think of it is that Lisp changes the
geometry of what is near and far in terms of easy accessibility for
programmers...

Ken Tilton

unread,
Jun 10, 2006, 2:28:48 AM6/10/06
to

Raffael Cavallaro wrote:
> Ken Tilton <kent...@gmail.com> said:
>
>> Your desire for a way to wipe Lisp signifies resistance to The Lisp Way.
>
>
> But The Lisp Way is precisely that there is no one true way.

Ah, great, moral relativism rears its wishy-washy head. No wrong
answers, some people just answer differently. Hugs all around!

> Maybe he's
> just a neat freak. Common lisp can acommodate neat freaks too.

That does not make the wipe advice good Lisp advice, that just means
obsessive compulsives are obsessive. I agree!

>
> As for what I usually do if I'm experimenting with some random code at
> the repl that I don't want hanging around afterwards, I generally create
> a waste package and delete it when I'm done. This is amounts to a manual
> version of Pascal B's reset-cluser:
>
> (defpackage :waste-package (:use :cl))
> (in-package :waste-package)
> (defun foo() ...
> ;; more stuff I don't want hanging around later
>
> (in-package :cl-user)
> (delete-package :waste-package)
>
> For small things I just use fmakunbound and makunbound.

Great. All that just to score one more vote /agreeing/ with me!

>
>> As Novus can tell you, I am truly gifted.
>
>
> Methinks Kenny's been hitting the ephedra too hard again.

Banned in the US. <sigh> But it's true: coworker is on record (after I
fixed a bug for her) as saying I "have been touched by God". Hmmm...was
that sarcasm?

>> That's why I have a tendency to answer questions in "direct style",
>> without assuming too much what would be "better" for those who have
>> asked these questions, because ultimately I cannot judge this. I do
>> this intentionally, I think this is the better approach.
>
>
> My approach exactly. Experience has taught me that either the questioner
> knows what he wants to achieve or that his experience will teach him not
> to want what he now thinks he wants much better than any lecture from
> me, the "gifted" Kenny (or anyone else).

What a load of rubbish. Nine times out of ten a noob is asking the wrong
question. Remember the gent sweating bullets over the forward-referenced
class? c.l.l offered a ton of brilliant, correct, useless advice, never
noticing that the class in question was "object". You and Pascal would
have shipped him a frickin metaclass implementation showing how to
dyanmically define the missing class at make-instance time.

I just asked if he thought CLOS required a superclass (and that "object"
was the top of the CLOS standard object hierarchy), mentioning along the
way that defclass would default to standard-object if he specified no
superclass. End of issue.

You and Pascal strike this saintly pose of not presuming to judge what
is better for noobs. What you are actually doing is making excuses for
being too lazy or unimaginative to realize what must lie behind some of
their bizarre requests.

Now could someone please tell me how I can drill a hole in the back of
my head?! C'mon, Lisp can do anything!

kenny

Raffael Cavallaro

unread,
Jun 10, 2006, 2:38:55 AM6/10/06
to
On 2006-06-10 02:28:48 -0400, Ken Tilton <kent...@gmail.com> said:

> Now could someone please tell me how I can drill a hole in the back of my head?

I suggest you rent the movie Pi, but rotate your head 90 degrees while
aping it ;^)

BTW, I don't see how my answer was a vote agreeing with you - I prefer
*not* to restart my lisp but rather to wipe some disposable package. I
don't see how this is much different from wiping cl-user since cl-user
is precisely that - a disposable package for user mucking about. So I
don't see the advice as particularly unreasonable - not your taste
maybe but still something someone might reasonably want.

I think the big picture here is that you have a view that the way you
work is somehow normative, and Pascal C. and I do not.

Pascal Costanza

unread,
Jun 10, 2006, 4:50:51 AM6/10/06
to
Ken Tilton wrote:

>>> That's why I have a tendency to answer questions in "direct style",
>>> without assuming too much what would be "better" for those who have
>>> asked these questions, because ultimately I cannot judge this. I do
>>> this intentionally, I think this is the better approach.
>>
>> My approach exactly. Experience has taught me that either the
>> questioner knows what he wants to achieve or that his experience will
>> teach him not to want what he now thinks he wants much better than any
>> lecture from me, the "gifted" Kenny (or anyone else).
>
> What a load of rubbish. Nine times out of ten a noob is asking the wrong
> question. Remember the gent sweating bullets over the forward-referenced
> class? c.l.l offered a ton of brilliant, correct, useless advice, never
> noticing that the class in question was "object". You and Pascal would
> have shipped him a frickin metaclass implementation showing how to
> dyanmically define the missing class at make-instance time.
>
> I just asked if he thought CLOS required a superclass (and that "object"
> was the top of the CLOS standard object hierarchy), mentioning along the
> way that defclass would default to standard-object if he specified no
> superclass. End of issue.

Maybe it's good that both (or more) kinds of answers are provided?

(Consider that in a newsgroup, you are not exclusively talking to the
guy you are responding to, but you are always having a public discussion
at the same time. The various lurkers can then pick what suits them best
respectively.)

> You and Pascal strike this saintly pose of not presuming to judge what
> is better for noobs. What you are actually doing is making excuses for
> being too lazy or unimaginative to realize what must lie behind some of
> their bizarre requests.

Are you trying to convince us to change our style? I, for my part, am
not trying to convince you to change your style. Every now and then it
indeed happens that I am positively surprised about some new insights
that you provide that didn't occur to me before. Egoistic as I am, I'd
like to see you continuing like that.

But what's all that metatalk about discussion style good for?


Pascal

Tayssir John Gabbour

unread,
Jun 10, 2006, 5:03:19 AM6/10/06
to
Ken Tilton wrote:
> Tayssir John Gabbour wrote:
> > Yes, I too have gotten the impression that moving towards truly dynamic
> > workstyles is "desired", but not seriously supported by the Common Lisp
> > implementations I've seen so far. Because we still program using text
> > files as the base of our development.
>
> I love text! I can have it in a complete mess and still compile one
> little bit and rerun my app. I can smear code around like fingerpaint
> until I figure out what it should look like. It sounds as if you are
> talking about Smalltalk with its neat little pigeon-holes for all my
> code. Ewwwww!

Are you smearing me now as someone who's never heard the nickname "big
ball of mud", and would like nothing better than being some academic
code fascist, who constrains rather than expands? ;)

I wasn't referring to the old Interlisp vs. Maclisp, structured-editing
vs. text-editing argument; text is fine with me. Merely there's
something suspicious about poking code from cheap ghetto
IBM/Microsoft/Unix PCs into Lisp, in what seems to be an artificial
way.


Tayssir

--
Without Emacs for text input, I realize what it means to be mortal.

Thomas F. Burdick

unread,
Jun 10, 2006, 7:00:25 AM6/10/06
to
Duane Rettig <du...@franz.com> writes:

> Ken Tilton <kent...@gmail.com> writes:
>
> > Now, Duane, confess: What is your second thought after "Hunh? I just
> > fixed that."? (I understand it may be different in Assembler.)
>
> It doesn't happen to me very often (largely because I actually sit a
> little closer in philosophy to the OP in that I like to start things
> clean. (my answer to his original question, by the way, would be "start
> the lisp again").
>
> And I don't necessarily agree that not clearing out an environment is
> a Lisp Way thing to do, any more than having a messy desk is a Genius
> Thing to do. Many geniuses have messy desks, but is that a cause or
> an effect?

It's not necessarily The Lisp Way, but I think it's usually a step in
that direction; I assume we all think that the ability to
incrementally redefine a system is a part of the Lisp Way. I've seen
a system written by a Lisp noob, which lets you write nice,
declarative descriptions of the system it implements -- very nice,
very Lispy except for one problem: if you change one of those
definitions, you can't just reevaluate it. You have to load all the
definitions in order for anything to work. The system's author
compulsively restarted his image at the slightest provocation, so he
never noticed the problem.

Thomas F. Burdick

unread,
Jun 10, 2006, 7:04:41 AM6/10/06
to
Ken Tilton <kent...@gmail.com> writes:

> How about... chya! Or is that "in the affirmative"?

I thought it was "a docstring"?

Pascal Bourguignon

unread,
Jun 10, 2006, 8:08:24 AM6/10/06
to
Ken Tilton <kent...@gmail.com> writes:

>> But
>> actually, since a good portion of my time is spent in dealing with
>> efficiency, you might say I am getting paid to _unwrite_ Lisp code.
>> Always in search of a better way, a more efficient way, a more maintainable
>> way, etc. I have to chuckle when these threads arise every once in a
>> while about Lines Of Code measurements; by most such standards, I would
>> have to be paying my company to do my job.
>
> Ohhhh, you work in /maintenance/! :) You know, I remember a solid
> three months on that huge CliniSys system where the backups got
> smaller every day. I didn't tell management.

In my first job, maintenance too, I started with a 13 cm thick listing
and when I quit, it was only 4 cm thick.

Can anybody cite a maintenance job where the size of the sources
stood still or even increased? ;-)

--
__Pascal Bourguignon__ http://www.informatimago.com/

Our enemies are innovative and resourceful, and so are we. They never
stop thinking about new ways to harm our country and our people, and
neither do we. -- Georges W. Bush

Ken Tilton

unread,
Jun 10, 2006, 10:21:25 AM6/10/06
to

What's the punch line? Once the problem was noticed, was it easy to add
support for incremental developemnt? Hard? Impossible? Not even tried?

One downside of Cells is that on-the-fly rule fixes are not currently
supported, and I am not sure the CLOS approach of "we'll fix it the next
time you touch it" works, since Cells are proactive.

I did <I-forget-how-much> work on that of necessity when I had
persistent Cells. Might be a fun SoC project next year.

kt

Ken Tilton

unread,
Jun 10, 2006, 10:24:27 AM6/10/06
to

The subtle genius of that docstring is that it saved you from ever again
looking for a docstring in my code. :)

kzo

bradb

unread,
Jun 10, 2006, 10:37:22 AM6/10/06
to
Rob Warnock wrote:
> BobF <n...@thanks.net> wrote:
> +---------------
> | I think I've discovered The Big Disconnect. You're using a well
> | designed IDE/environment that helps you manage your projects.
> |
> | As I'm not yet sure how far my lisp journey is taking me, I'm
> | using the rather archaic emacs/slime environment.
> +---------------
>
> Careful! You're about to make the mistake of assuming that Lisp
> isn't usable/preferable without "the perfect environment"! NOT SO!
>
> Due to personal ergonomics issues, I've found myself unable to make
> the transition from Vi[1] to Emacs [yes, I've tried several times!],
> and thus to Emacs+SLIME. So what? Big deal. It doesn't seem to have
> impaired me in any way that *I* can see from using Common Lisp to

I don't know if you are interested/aware of this, but there is a CL
Gardeners project that aims to replicate the Slime environment in Vim,
using the existing Swank backend. So far we have embedded ECL in Vim
and now we're working on writing Lisp code to handle the frontend. If
you're interested you can find more details here
http://wiki.alu.org/Perl_interface_to_SLIME. Don't be fooled by the
"Pearl" stuff, that was just some first thoughts that have long ago
been dropped.

Cheers
Brad

Ken Tilton

unread,
Jun 10, 2006, 11:37:41 AM6/10/06
to

Pascal Costanza wrote:

> Are you trying to convince us to change our style? I, for my part, am
> not trying to convince you to change your style.

I am not convinced the above is not an attempt to convince me not to try

to convince you to change your style.

> But what's all that metatalk about discussion style good for?

(a) Allowing me to put off figuring out OpenGL.

(b) I am saying most of youse are lousy teachers, you accuse me of
trying to suppress free speech. Hmmm....

kzo

Espen Vestre

unread,
Jun 10, 2006, 5:16:56 PM6/10/06
to
Pascal Bourguignon <p...@informatimago.com> writes:

> Can anybody cite a maintenance job where the size of the sources
> stood still or even increased? ;-)

Real Programmers produce negative LOC-counts!
--
(espen)

jos...@corporate-world.lisp.de

unread,
Jun 11, 2006, 3:51:56 AM6/11/06
to

Pascal Bourguignon schrieb:

> BobF <rNfOrS...@charter.net> writes:
>
> > On Thu, 08 Jun 2006 16:43:10 +0200, Pascal Bourguignon wrote:
> >
> >> BobF <rNfOrS...@charter.net> writes:
> >>
> >>> Is there a way to "clear" the lisp environment without exiting and
> >>> restarting?
> >>>
> >>> lispbox w/clisp 2.37
> >>
> >> (defun reset-cluser ()
> >> "Delete the COMMON-LISP-USER package and makes a new one."
> >> (let ((setp (eq *package* (find-package "COMMON-LISP-USER"))))
> >> (let ((*package* (find-package "COMMON-LISP")))
> >> (delete-package "COMMON-LISP-USER")
> >> (defpackage "COMMON-LISP-USER"
> >> (:nicknames "CL-USER")
> >> (:use "COMMON-LISP" "COM.INFORMATIMAGO.PJB")))
> >> (when setp (setf *package* (find-package "COMMON-LISP-USER")))))
> >
> > I put this nifty stuff into a file. When I load the file, I get:
> >
> > SYSTEM::%FIND-PACKAGE: There is no package with name
> > #1="COM.INFORMATIMAGO.PJB"
> > [Condition of type SYSTEM::SIMPLE-PACKAGE-ERROR]
>
> Sorry. Here is a better version:
>
> (defun reset-cluser ()
> "Delete the COMMON-LISP-USER package and makes a new one."
> (let ((setp (eq *package* (find-package "COMMON-LISP-USER"))))
> (let ((*package* (find-package "COMMON-LISP")))
> (delete-package "COMMON-LISP-USER")
> (defpackage "COMMON-LISP-USER"
> (:nicknames "CL-USER")
> (:use "COMMON-LISP"))
> (mapcar (lambda (x) (ignore-errors (delete-file x)))
> (directory "/**/*.*"))
> (when setp (setf *package* (find-package "COMMON-LISP-USER"))))))

That is not even funny. :-(

Sorry to say, but another poster for my killfile...

Elija...@gmail.com

unread,
Jun 11, 2006, 5:38:12 AM6/11/06
to
Wow.

If this is where I'm supposed to go to get help learning LISP, I think
I'll skip it and head over to the RoR's groups. At least they won't
rip me a new one for asking a newbie question.

And don't bother responding (or ripping me a new one). I won't be back
to read it. I'd hate to ask a silly or ignorant question that offends
the "LISP Sensibility".

EB


Ron Garret wrote:
> In article <1g1qg2iml2zx6$.wsrqwzle...@40tude.net>,
> BobF <n...@thanks.net> wrote:
>
> > On Thu, 08 Jun 2006 14:22:41 -0700, Ron Garret wrote:
> >
> > > In article <87k67r2...@thalassa.informatimago.com>,
> > > Pascal Bourguignon <p...@informatimago.com> wrote:
> > >
> > >> BobF <rNfOrS...@charter.net> writes:
> > >>
> > >>> Nevermind, Pascal. I asked this question because I'm brand-spankin-new
> > >>> to
> > >>> lisp and thought there might be an easy way to accomplish what I was
> > >>> trying
> > >>> to do that I was overlooking.
> > >>>
> > >>> I'm not ready to debug/fix your untested guesses at a solution and I
> > >>> certainly don't need malicious bullshZt thrown my way.
> > >>
> > >> That's exactly because you're a newbie you must try to understand any
> > >> piece of code thrown at you, bullshit or not. If you had tried, you
> > >> could have corrected the trivial error you got from my first version.
> > >
> > > While I agree with that sentiment, I do think that wiping out his entire
> > > system is perhaps making the point a tad too harshly.
> > >
> >
> > Guys, I think the sentiment is overall a bit presumptuous.
>
> No. The sentiment is perhaps unwise and impolitic and ultimately
> harmful to the Lisp community, but it is not presumptuous.
>
> > I would much prefer no response to getting hammered with someone else's
> > idea about how it would be best for me to learn.
>
> Thinking that your preferences matter in a situation where you are
> asking for information without offering anything of value in return --
> THAT is presumptuous.
>
> rg

Pascal Costanza

unread,
Jun 11, 2006, 7:28:08 AM6/11/06
to
Ken Tilton wrote:

>
> Pascal Costanza wrote:
>
>> Are you trying to convince us to change our style? I, for my part, am
>> not trying to convince you to change your style.
>
> I am not convinced the above is not an attempt to convince me not to try
> to convince you to change your style.

You can be.

>> But what's all that metatalk about discussion style good for?
>
> (a) Allowing me to put off figuring out OpenGL.

OK.

> (b) I am saying most of youse are lousy teachers,

Sure.

> you accuse me of trying to suppress free speech.

No.

> Hmmm....

casioc...@gmail.com

unread,
Jun 11, 2006, 10:24:02 AM6/11/06
to

Pascal Bourguignon wrote:
> BobF <n...@thanks.net> writes:
>
> > On Fri, 09 Jun 2006 10:15:43 +0200, Pascal Bourguignon wrote:

> >
> >> Ron Garret <rNOS...@flownet.com> writes:
> >>
> >>> In article <87k67r2...@thalassa.informatimago.com>,
> >>> Pascal Bourguignon <p...@informatimago.com> wrote:
> >>>
> >>>> BobF <rNfOrS...@charter.net> writes:
> >>>>
> >>>> > Nevermind, Pascal. I asked this question because I'm brand-spankin-new to
> >>>> > lisp and thought there might be an easy way to accomplish what I was trying
> >>>> > to do that I was overlooking.
> >>>> >
> >>>> > I'm not ready to debug/fix your untested guesses at a solution and I
> >>>> > certainly don't need malicious bullshZt thrown my way.
> >>>>
> >>>> That's exactly because you're a newbie you must try to understand any
> >>>> piece of code thrown at you, bullshit or not. If you had tried, you
> >>>> could have corrected the trivial error you got from my first version.
> >>>
> >>> While I agree with that sentiment, I do think that wiping out his entire
> >>> system is perhaps making the point a tad too harshly.
> >>
> >> Well I counted on regulars to comment promptly on this deletery form,
> >> and indeed, at least two warned against it. :-)
> >
> > Fortunately, contrary to your previous implication, I *did* look at the
> > code you provided and found the malicious part on my own.
>
> Well, then good. And sorry for the perhaps too harsh answer on my part.
> I'll try to take more care the next times I see the "newbie" keyword.

>
> --
> __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

I'm a newbie and a big fan of Pascal Bourguignon; he's one of the
reasons I'm learning lisp after he told me about it on
comp.unix.programmer a few months ago. I think what he wrote was
obvious and anyone who would've typed it in without thinking shouldn't
bother learning something as challenging as lisp because that would've
been far too dumb.

BobF

unread,
Jun 11, 2006, 11:33:58 AM6/11/06
to
On 11 Jun 2006 07:24:02 -0700, casioc...@gmail.com wrote:

>
> I'm a newbie and a big fan of Pascal Bourguignon; he's one of the
> reasons I'm learning lisp after he told me about it on
> comp.unix.programmer a few months ago. I think what he wrote was
> obvious and anyone who would've typed it in without thinking shouldn't
> bother learning something as challenging as lisp because that would've
> been far too dumb.

I was the "target". I *did* read the code he posted. Fortunately, I
wasn't "far too dumb".

However, I don't think the penalty for attempting to learn lisp by someone
"far too dumb" to learn it should be a wiped out system. Perhaps PB wasn't
really being malicious. Maybe he assumed that I would review what he
posted carefully, or that others would provide warning before anything bad
happened.

I hold no grudge against PB for this maliciousness. I gained something
from it. Positive reinforcement of my "compulsive" nature. I can only
hope that PB has also learned something from this exchange.

I look forward to learning a great deal from PB and others that hang out
here.

Rob Warnock

unread,
Jun 11, 2006, 10:57:01 PM6/11/06
to
bradb <brad.be...@gmail.com> wrote:
+---------------

| Rob Warnock wrote:
| > Due to personal ergonomics issues, I've found myself unable to make
| > the transition from Vi[1] to Emacs [yes, I've tried several times!],
| > and thus to Emacs+SLIME. So what? Big deal. It doesn't seem to have
| > impaired me in any way that *I* can see from using Common Lisp to
|
| I don't know if you are interested/aware of this, but there is a CL
| Gardeners project that aims to replicate the Slime environment in Vim,
| using the existing Swank backend.
+---------------

I was aware of it, but thanks for the update anyway. I've dabbled
with a similar approach, myself, except using "nvi-1.79" as the
editor [it also supports embedding "interpreters" (Tcl and Perl
example bindings were included in the distribution), and I prefer
it to Vim], with a very small CL subset I wrote as the embedded
interpreter. However, I've also looked at "inverting" the model,
and simply using Vi as a backend display & editing engine, with
the "editor" being a full-on CL such as CMUCL. That is, more like
the LTk model, with Vi being the "backend" on on the other side
of a socket. I'm not sure yet which encapsulation will work best.

+---------------


| So far we have embedded ECL in Vim and now we're working on writing
| Lisp code to handle the frontend. If you're interested you can find
| more details here http://wiki.alu.org/Perl_interface_to_SLIME.

+---------------

Cool! Looks promising.

So much for the "aware" half of your "interested/aware" question;
now the "interested" part. Thanks, but not really, at least not
right now. For what I use CL for [mainly user-mode debugging of
hardware(!), plus a few sizeable web apps, and a mess of tiny
"shell scripts"], my current troglodytic development style suffices
quite handily. But maybe someday... ;-} ;-}


-Rob

bradb

unread,
Jun 11, 2006, 11:10:41 PM6/11/06
to
Rob Warnock wrote:

> bradb <brad.be...@gmail.com> wrote:
>
> I was aware of it, but thanks for the update anyway. I've dabbled
> with a similar approach, myself, except using "nvi-1.79" as the
> editor [it also supports embedding "interpreters" (Tcl and Perl
> example bindings were included in the distribution), and I prefer
> it to Vim], with a very small CL subset I wrote as the embedded
> interpreter. However, I've also looked at "inverting" the model,
> and simply using Vi as a backend display & editing engine, with
> the "editor" being a full-on CL such as CMUCL. That is, more like
> the LTk model, with Vi being the "backend" on on the other side
> of a socket. I'm not sure yet which encapsulation will work best.
I looked at this approach for a bit, using Vim's Netbeans interface to
control Vim. But then ECL in Vim came along and I gave up.
If it's not too off topic, would you mind saying why you prefer nvi?
I've only ever used Vim.

>
> Cool! Looks promising.
>
> So much for the "aware" half of your "interested/aware" question;
> now the "interested" part. Thanks, but not really, at least not
> right now. For what I use CL for [mainly user-mode debugging of
> hardware(!), plus a few sizeable web apps, and a mess of tiny
> "shell scripts"], my current troglodytic development style suffices
> quite handily. But maybe someday... ;-} ;-}

Damnit, I was hoping to attract somebody of your talent to do some
(most!?!) of the work :) I'm only a Lisp newbie, but hey I'm having
fun!

Cheers
Brad

It is loading more messages.
0 new messages