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 1 - 25 of 45 - Collapse all   Newer >
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
Zach Beane  
View profile
(19 users)  More options Sep 27 2006, 5:12 pm
Newsgroups: comp.lang.lisp
From: Zach Beane <x...@xach.com>
Date: 27 Sep 2006 17:12:44 -0400
Local: Wed, Sep 27 2006 5:12 pm
Subject: Aha! moments
Here are a few things that triggered major Aha! moments for me, in no
particular order.

   - reading the source of cl-ppcre, which illustrated

     - run-time compilation (to chains of closures) without using
       COMPILE or COMPILE-FILE

     - parsing regular expression strings, with nice error-reporting
       via conditions

     - that Lisp solutions to practical problems can be concise,
       comprehensible, and *fast*

   - reading Keene's CLOS book

   - finding an application of continuable errors; it replaced a
     convoluted scheme of checking return values at multiple levels
     with a simple handler-bind wrapper.

   - realizing that file formats and communication protocols are just
     bits on disk or on a wire or sometimes even in memory, and Lisp
     is pretty good at generating the right bits and octets; inspired
     by (among other stuff):

     - learning that CLX is a Lisp program, not a binding to the C xlib

     - learning that Marc's CL-PDF is a Lisp program

     - learning about Frode's binary-types

     - reading Peter's chapters on parsing binary files

   - reading Will Hartung's "Guerilla Lisp Opus"

   - realizing that most Common Lisp implementations are mostly
     written in Common Lisp

A few themes:

   - Despite conceptually understanding how tools like CLOS and
     closures and conditions work, it took a tricky problem solved
     neatly by the tool to really make an Aha! moment

   - Aha! moments have made complicated tasks simpler and
     unapproachable tasks approachable (given the right amount of time
     and effort). They take the magic out of things. (Philip Greenspun
     used to say that his course would teach undergrads how to build
     Amazon in a semester; despite the hyperbole, it really did take
     the mystery out of how useful web applications can be
     constructed.)

Advice:

   - Be actively curious about how interesting things work ("how can
     cl-ppcre be faster than Perl?")

   - Be broadly aware of the tools available, and don't worry about
     immediate application

   - Don't settle for tedium (it's hard to have a breakthrough if you
     have resigned yourself to something that feels substandard)

   - People who write one interesting thing usually keep it up; find
     and watch interesting people (trickle-down Aha! effect?)

Minor delights:

   - format tricks (~v and ~{~^~} specifically)

   - inspecting a GF object in slime

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?

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.
Zach Beane  
View profile
(2 users)  More options Sep 27 2006, 5:14 pm
Newsgroups: comp.lang.lisp
From: Zach Beane <x...@xach.com>
Date: 27 Sep 2006 17:14:47 -0400
Local: Wed, Sep 27 2006 5:14 pm
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.

Oops, I forgot one:

   - seeing the output of DISASSEMBLE for the first time (it was on a
     native-compiling Lisp), and the realization that the
     functionality is part of standard CL

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.
Jack Unrue  
View profile
(1 user)  More options Sep 27 2006, 5:35 pm
Newsgroups: comp.lang.lisp
From: Jack Unrue <no.s...@example.tld>
Date: Wed, 27 Sep 2006 21:35:03 GMT
Local: Wed, Sep 27 2006 5:35 pm
Subject: Re: Aha! moments
On 27 Sep 2006 17:12:44 -0400, Zach Beane <x...@xach.com> wrote:

> [snip]

>    - inspecting a GF object in slime

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

- macros of course, in particular, writing a DSL for defining
  GUI menu hierarchies

- learning what generic functions are and what you can do
  with them in CLOS (e.g. the different kinds of specializers)

- the MOP (and every MOP-related thread in this newsgroup is
  making me aware that I'm still hanging onto preconceived
  notions about OOP)

- incremental programming with SLIME

--
Jack Unrue


    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.
K.S.Sreeram  
View profile
(2 users)  More options Sep 27 2006, 9:04 pm
Newsgroups: comp.lang.lisp
From: "K.S.Sreeram" <kssree...@gmail.com>
Date: 27 Sep 2006 18:04:22 -0700
Local: Wed, Sep 27 2006 9:04 pm
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?

I guess "code is data" is the most basic lisp aha! But its implications
continue to be sources for many more such aha moments.

For instance, in most other programming languages, new abstractions are
built by writing code on /top/ of existing abstractions. But in lisp,
its possible to build new abstractions by writing code *beneath*
existing code.

Here's an example (in scheme):

(define (square x) (* x x))
(define (power x n)
  (cond ((= n 0) 1)
        ((odd? n) (* x (power x (- n 1))))
        (else (square (power x (/ n 2))))))

This is a simple function which raises x to the integer power n, with a
minimum number of multiplications. (let ((x 5)) (power x 3)) returns
125.
Now its possible to make the same piece of code return optimized
symbolic output by just writing a new implementation of '*' !

(power 'x 3)  ->  (* x (* x x))

See the original article by Darius Bacon for the details:
http://cybertiggyr.com/gene/peval/peval.cgi

[sreeram;]


    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.
mal...@gmail.com  
View profile
(2 users)  More options Sep 27 2006, 11:15 pm
Newsgroups: comp.lang.lisp
From: mal...@gmail.com
Date: 27 Sep 2006 20:15:47 -0700
Local: Wed, Sep 27 2006 11:15 pm
Subject: Re: Aha! moments

Zach Beane wrote:
> Zach Beane <x...@xach.com> writes:

> > Here are a few things that triggered major Aha! moments for me, in no
> > particular order.

> Oops, I forgot one:

>    - seeing the output of DISASSEMBLE for the first time (it was on a
>      native-compiling Lisp), and the realization that the
>      functionality is part of standard CL

> Zach

That got me into lisp actually... few months ago. Downloaded the
allegro trial, got a book from a colleague (The Winston & Horn one),
put some samples, and one of the first things I did was ... compile,
then optimizations, and that bought me. Too bad my daily job is C/C++
coding (game development).

    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.
Adam  
View profile
(1 user)  More options Sep 28 2006, 5:16 am
Newsgroups: comp.lang.lisp
From: Adam <nos...@example.com>
Date: Thu, 28 Sep 2006 21:16:34 +1200
Local: Thurs, Sep 28 2006 5:16 am
Subject: Re: Aha! moments

Jack Unrue wrote:
> [ . . . ]

> - incremental programming with SLIME

I don't quite follow, Jack.  Would you care to expand a little, or point me
to a URL ?

    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.
Rob Warnock  
View profile
(2 users)  More options Sep 28 2006, 7:18 am
Newsgroups: comp.lang.lisp
From: r...@rpw3.org (Rob Warnock)
Date: Thu, 28 Sep 2006 06:18:28 -0500
Local: Thurs, Sep 28 2006 7:18 am
Subject: Re: Aha! moments
Zach Beane  <x...@xach.com> wrote:
+---------------
| - learning that CLX is a Lisp program, not a binding to the C xlib
+---------------

Learning that Eric Marsden's "PG" talks the PostgreSQL socket
protocol directly, and is not a binding to "libpq.so".

-Rob

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


    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.
GP lisper  
View profile
 More options Sep 28 2006, 7:53 am
Newsgroups: comp.lang.lisp
From: GP lisper <spamb...@CloudDancer.com>
Date: Thu, 28 Sep 2006 04:53:57 -0700
Local: Thurs, Sep 28 2006 7:53 am
Subject: Re: Aha! moments
On 27 Sep 2006 17:12:44 -0400, <x...@xach.com> wrote:

> Here are a few things that triggered major Aha! moments for me, in no
> particular order.

>    - reading Keene's CLOS book

For 20 years, I've successfully avoided OOP, halfway thru Keene, I
lusted for CLOS.  The next program is the CLOS teaching tool.

>    - realizing that file formats and communication protocols are just
>      bits on disk or on a wire or sometimes even in memory, and Lisp
>      is pretty good at generating the right bits and octets; inspired

STREAMS!  It's all streams, and lisp rocks at that.  In-line filters
and transforms of the 'data-stream', branching and colalescing,
sources and sinks.

>    - Aha! moments have made complicated tasks simpler and
>      unapproachable tasks approachable (given the right amount of time
>      and effort). They take the magic out of things. (Philip Greenspun

s/magic/fear/
s/things/improbables/

>    - Be broadly aware of the tools available, and don't worry about
>      immediate application

The tough one.  It's too easy to code up a solution to a problem, you
don't think about distributing the answer, since other lispers can
code as solution just as fast.

> What advice would you give people who want to have more Aha!
> moments?

Write more lisp!

--
Reply-To email is ignored.

--
Posted via a free Usenet account from http://www.teranews.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.
GP lisper  
View profile
(2 users)  More options Sep 28 2006, 7:56 am
Newsgroups: comp.lang.lisp
From: GP lisper <spamb...@CloudDancer.com>
Date: Thu, 28 Sep 2006 04:56:26 -0700
Local: Thurs, Sep 28 2006 7:56 am
Subject: Re: Aha! moments

On Thu, 28 Sep 2006 21:16:34 +1200, <nos...@example.com> wrote:
> Jack Unrue wrote:

>> [ . . . ]

>> - incremental programming with SLIME

> I don't quite follow, Jack.  Would you care to expand a little, or point me
> to a URL ?

Then you've never used slime, it's pretty self-evident.
<goes back to ignoring trolls>

--
Reply-To email is ignored.

--
Posted via a free Usenet account from http://www.teranews.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.
Adam  
View profile
 More options Sep 28 2006, 8:53 am
Newsgroups: comp.lang.lisp
From: Adam <nos...@example.com>
Date: Fri, 29 Sep 2006 00:53:17 +1200
Local: Thurs, Sep 28 2006 8:53 am
Subject: Re: Aha! moments

Well, :Slime 2005-04-27 is there in my usual Emacs setup - I just don't
actively or consciously use it. C-h m shows reports no mode specifics. C-h
a slime lists very many slime commands. What Swank is I have no idea.

GP lisper wrote:
> Then you've never used slime, it's pretty self-evident.
> <goes back to ignoring trolls>

Your logic doesn't quite follow.

Slime is a superior interaction mode, yet it doesn't show up as a mode.
How Slime helps with "incremental programming" thus remains a mystery.

No Aha! moment for me then.


    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.
Petter Gustad  
View profile
(2 users)  More options Sep 28 2006, 11:15 am
Newsgroups: comp.lang.lisp
From: Petter Gustad <newsmailco...@gustad.com>
Date: 28 Sep 2006 17:15:48 +0200
Local: Thurs, Sep 28 2006 11:15 am
Subject: Re: Aha! moments

Adam <nos...@example.com> writes:
> Slime is a superior interaction mode, yet it doesn't show up as a mode.
> How Slime helps with "incremental programming" thus remains a mystery.

Start your Lisp and then

(asdf:operate 'asdf:load-op :swank)
(swank:create-swank-server 4005)

Then do M-x slime-connect from emacs. Open up a source file. Modify a
function and type C-c C-c and the new version is compiled into your
enviroment.

Petter

--
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?


    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.