Google Groups Home
Help | Sign in
Aha! moments
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  Messages 26 - 45 of 45 - Collapse all < Older 
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Pascal Costanza  
View profile
 More options Sep 28 2006, 7:23 pm
Newsgroups: comp.lang.lisp
From: Pascal Costanza <p...@p-cos.net>
Date: Fri, 29 Sep 2006 01:23:57 +0200
Local: Thurs, Sep 28 2006 7:23 pm
Subject: Re: Aha! moments

Bill Atkins wrote:
> "Javier" <javu...@gmail.com> writes:

>> And another question too: how to redefine generic functions in a living
>> environment to change, for example, the number of arguments, supposing
>> that you have already defined methods to that generic function?

> (fmakunbound 'generic-function-name)

A simple defgeneric will actually also do. However, when you change the
lambda list, you will also lose the methods defined on the generic function.

Pascal

--
My website: http://p-cos.net
Common Lisp Document Repository: http://cdr.eurolisp.org
Closer to MOP & ContextL: http://common-lisp.net/project/closer/


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Zach Beane  
View profile
 More options Sep 28 2006, 8:34 pm
Newsgroups: comp.lang.lisp
From: Zach Beane <x...@xach.com>
Date: 28 Sep 2006 20:34:59 -0400
Local: Thurs, Sep 28 2006 8:34 pm
Subject: Re: Aha! moments

Pascal Costanza <p...@p-cos.net> writes:
> Bill Atkins wrote:
> > "Javier" <javu...@gmail.com> writes:

> >> And another question too: how to redefine generic functions in a living
> >> environment to change, for example, the number of arguments, supposing
> >> that you have already defined methods to that generic function?
> > (fmakunbound 'generic-function-name)

> A simple defgeneric will actually also do. However, when you change
> the lambda list, you will also lose the methods defined on the generic
> function.

This will signal an error if the methods with incongruent lambda lists
were defined with DEFMETHOD rather than by the previous DEFGENERIC.

Zach


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Juho Snellman  
View profile
(1 user)  More options Sep 28 2006, 8:44 pm
Newsgroups: comp.lang.lisp
From: Juho Snellman <jsn...@iki.fi>
Date: 29 Sep 2006 00:44:15 GMT
Local: Thurs, Sep 28 2006 8:44 pm
Subject: Re: Aha! moments

Pascal Costanza <p...@p-cos.net> wrote:
> Bill Atkins wrote:
>> "Javier" <javu...@gmail.com> writes:

>>> And another question too: how to redefine generic functions in a living
>>> environment to change, for example, the number of arguments, supposing
>>> that you have already defined methods to that generic function?

>> (fmakunbound 'generic-function-name)

> A simple defgeneric will actually also do.

No it won't, except in the special case of all methods on the generic
function having been defined using :METHOD in a previous DEFGENERIC.

: If a defgeneric form is evaluated and some methods for that generic
: function have lambda lists that are not congruent with that given in
: the defgeneric form, an error is signaled.

--
Juho Snellman


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tim X  
View profile
 More options Sep 28 2006, 10:52 pm
Newsgroups: comp.lang.lisp
From: Tim X <t...@nospam.dev.null>
Date: Fri, 29 Sep 2006 12:52:52 +1000
Local: Thurs, Sep 28 2006 10:52 pm
Subject: Re: Aha! moments

Try typing M-x slime

that will give you an aha moment!

Tim

--
tcross (at) rapttech dot com dot au


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
jshra...@gmail.com  
View profile
(3 users)  More options Sep 29 2006, 3:50 am
Newsgroups: comp.lang.lisp
From: JShra...@gmail.com
Date: 29 Sep 2006 00:50:22 -0700
Local: Fri, Sep 29 2006 3:50 am
Subject: Re: Aha! moments
My over 30 years with Lisp have been one continuous Aha insight. Each
new function a finely tuned concept. And macros -- Ah sweet mystery of
abstraction! - capture the infinitely more sensuous discovery of
entire new ways of thought! Even debugging often leads me to deeper
understanding; facets reflect facets reflect facets -- a recursive maze
of perfectly ground mirrors that when set aright prismatically undress
the deep nature of the problem domain, and of Lisp itself, before the
mind's eye.

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Frank Goenninger DG1SBG  
View profile
 More options Sep 29 2006, 4:22 am
Newsgroups: comp.lang.lisp
From: Frank Goenninger DG1SBG <dont-email...@nomail.org>
Date: Fri, 29 Sep 2006 10:22:08 +0200
Local: Fri, Sep 29 2006 4:22 am
Subject: Re: Aha! moments

JShra...@gmail.com writes:
> My over 30 years with Lisp have been one continuous Aha insight. Each
> new function a finely tuned concept. And macros -- Ah sweet mystery of
> abstraction! - capture the infinitely more sensuous discovery of
> entire new ways of thought! Even debugging often leads me to deeper
> understanding; facets reflect facets reflect facets -- a recursive maze
> of perfectly ground mirrors that when set aright prismatically undress
> the deep nature of the problem domain, and of Lisp itself, before the
> mind's eye.

Nicely put. Who's writing the next book about/on/for Lisp? I vote for
this paragraph to be part of the Preface or some chapter heading.

Congrats!

Frank


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
John Lawrence Aspden  
View profile
 More options Sep 29 2006, 5:55 am
Newsgroups: comp.lang.lisp
From: John Lawrence Aspden <n...@surname.com>
Date: Fri, 29 Sep 2006 09:55:57 GMT
Local: Fri, Sep 29 2006 5:55 am
Subject: Re: Aha! moments

Zach Beane wrote:
> What are some of the things that triggered your own Aha! moments? What
> sort of stuff delighted you when you discovered it?

Well, I am only a newbie, so these are beginner aha!s on the lispy
foothills, but for the record:

(i) Doing symbolic differentiation and hence Newton's method in SICP.

(ii) Realising that I understood call/cc well enough to write python-style
generator functions was pretty cool. When I realized that I could use
macros to replace all that code with nice defgenerator and yield statements
I think I might have had one of those moments. Oooh, power!

(iii) The recent s-expressions/sweet-expressions spat was one, because I
realised that I actually *prefer*

(defun factorial (n)
   (if (<= n 1)
       1
       (* n (factorial (- n 1)))))

to

defun factorial (n)
   if (n <= 1)
       1
       n * factorial(n - 1)

A month ago it would have been the other way round.

(iv) A conversation in the pub the other day with a Ruby-speaking friend:

I speak Python and he speaks Ruby. After a long debate we'd pretty much
agreed that Python and Ruby are just different syntaxes for the same
things, and so I got on to evangelising Scheme, and he already knew what
call/cc did, because Ruby has it, and we wondered if maybe that makes it
better than Python for web stuff? And of course a bit of a web search
reveals many brave efforts to add call/cc to Python.

And so now I have independent evidence for the often repeated assertion that
the widely-used languages are converging back to lisp.
c->c++->java->python->ruby->........->lisp?

John.

--
Contractor in Cambridge UK -- http://www.aspden.com


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Pascal Costanza  
View profile
 More options Sep 29 2006, 6:58 am
Newsgroups: comp.lang.lisp
From: Pascal Costanza <p...@p-cos.net>
Date: Fri, 29 Sep 2006 12:58:59 +0200
Local: Fri, Sep 29 2006 6:58 am
Subject: Re: Aha! moments

Ah right. I just confused this with the fact that in most
implementations, this is a correctable error.

Thanks for the correction.

Pascal

--
My website: http://p-cos.net
Common Lisp Document Repository: http://cdr.eurolisp.org
Closer to MOP & ContextL: http://common-lisp.net/project/closer/


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ties Stuij  
View profile
(2 users)  More options Sep 29 2006, 9:36 am
Newsgroups: comp.lang.lisp
From: "Ties Stuij" <cjst...@gmail.com>
Date: 29 Sep 2006 06:36:36 -0700
Local: Fri, Sep 29 2006 9:36 am
Subject: Re: Aha! moments

Zach Beane wrote:
> What are some of the things that triggered your own Aha! moments? What
> sort of stuff delighted you when you discovered it? What advice would
> you give people who want to have more Aha! moments?

My initial encounter with lisp was through a capital/article in
hofstadters metamagical themas, after which i promptly started writing
an email to a friend of mine, in which i tried to cramp as many
parenthesis as possible. I didn't program at the time and was mainly
fascinated with those parens which neatly closed off one meaning from
the other.

A few years back i started dabbling in a few sub-par programming
languages, searching for one that stuck. I came across some emacs code.
I tried to make sense out of it, but to no avail. It was the first time
that i was absolutely sure that i could finally scratch a programming
language off my to learn list. Ridiculous language.

Then, a year and a few months ago, i stumbled upon lisp again, and i
got an aha moment, which was at the same time an aha erlebnis. Those
sweet parens soothed the mind and burned it at the same time. No or {
or = or . or -> or * or order of evaluation that snoops the mind from
processor power and focus. I'm a simple person,with simple needs. I
like my programming language straight and smooth, like Beyonce likes
her hair. Later of course you learn about all these wicked toys like
macros and clos. It blows your mind and all, but underneath it all it's
that kind of weird satisfying calmness that comes over me when i
securely lock up yet another statement in a closing paren. For my
atheist mind it's the closest i ever came to what i guess should be a
mystic experience. (hmm... one gets into some assumption problems in
that last sentence.)


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Pascal Bourguignon  
View profile
 More options Sep 29 2006, 10:18 am
Newsgroups: comp.lang.lisp
From: Pascal Bourguignon <p...@informatimago.com>
Date: Fri, 29 Sep 2006 16:18:17 +0200
Local: Fri, Sep 29 2006 10:18 am
Subject: Re: Aha! moments
"Ties  Stuij" <cjst...@gmail.com> writes:

> Then, a year and a few months ago, i stumbled upon lisp again, and i
> got an aha moment, which was at the same time an aha erlebnis. Those
> sweet parens soothed the mind and burned it at the same time. No or {
> or = or . or -> or * or order of evaluation that snoops the mind from
> processor power and focus. I'm a simple person,with simple needs. I
> like my programming language straight and smooth, like Beyonce likes
> her hair. Later of course you learn about all these wicked toys like
> macros and clos. It blows your mind and all, but underneath it all it's
> that kind of weird satisfying calmness that comes over me when i
> securely lock up yet another statement in a closing paren. For my
> atheist mind it's the closest i ever came to what i guess should be a
> mystic experience. (hmm... one gets into some assumption problems in
> that last sentence.)

http://infogroep.be/GodWroteInLisp

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

Pour moi, la grande question n'a jamais été: «Qui suis-je? Où vais-je?»
comme l'a formulé si adroitement notre ami Pascal, mais plutôt:
«Comment vais-je m'en tirer?» -- Jean Yanne


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mark Triggs  
View profile
 More options Sep 30 2006, 3:03 am
Newsgroups: comp.lang.lisp
From: Mark Triggs <m...@dishevelled.net>
Date: Sat, 30 Sep 2006 17:03:19 +1000
Local: Sat, Sep 30 2006 3:03 am
Subject: Re: Aha! moments

Zach Beane <x...@xach.com> writes:
> Here are a few things that triggered major Aha! moments for me, in no
> particular order.

[...]

> What are some of the things that triggered your own Aha! moments? What
> sort of stuff delighted you when you discovered it? What advice would
> you give people who want to have more Aha! moments?

One for me was Peter Seibel's compiler for a simple machine shown here:
http://groups.google.com/group/comp.lang.lisp/msg/2108939e399c5c4e.

In particular, realising that you could write a handful of primitives
and then use regular CL macros to bootstrap the rest of the language off
those was a big "Aha!" for me.

Cheers,

Mark

--
Mark Triggs
<m...@dishevelled.net>


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ties Stuij  
View profile
 More options Oct 2 2006, 1:45 pm
Newsgroups: comp.lang.lisp
From: "Ties Stuij" <cjst...@gmail.com>
Date: 2 Oct 2006 10:45:22 -0700
Local: Mon, Oct 2 2006 1:45 pm
Subject: Re: Aha! moments