From: Chris Gehlker
Subject: What's up with #'?
Date: 
Message-ID: <B9FBC75C.23574%gehlker@fastq.com>
Let me ask, with all due humility as a very newbie, if anyone else thinks #'
is a  code smell? If it is a code smell, is it *supposed* to be in the sense
that C++ has things in it that stink by design?



-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----==  Over 80,000 Newsgroups - 16 Different Servers! =-----

From: Christopher C. Stacy
Subject: Re: What's up with #'?
Date: 
Message-ID: <uadk930qx.fsf@dtpq.com>
>>>>> On Sat, 16 Nov 2002 09:58:52 -0700, Chris Gehlker ("Chris") writes:
 Chris> Let me ask, with all due humility as a very newbie, if anyone
 Chris> else thinks #' is a code smell? If it is a code smell, is it
 Chris> *supposed* to be in the sense that C++ has things in it that
 Chris> stink by design?

#' is a built-in reader macro.
What is a "code smell"?
From: Kenny Tilton
Subject: Re: What's up with #'?
Date: 
Message-ID: <3DD67B79.3040007@nyc.rr.com>
Christopher C. Stacy wrote:
>>>>>>On Sat, 16 Nov 2002 09:58:52 -0700, Chris Gehlker ("Chris") writes:
>>>>>
>  Chris> Let me ask, with all due humility as a very newbie, if anyone
>  Chris> else thinks #' is a code smell? If it is a code smell, is it
>  Chris> *supposed* to be in the sense that C++ has things in it that
>  Chris> stink by design?
> 
> #' is a built-in reader macro.
> What is a "code smell"?


    http://c2.com/cgi/wiki?CodeSmell

So I do not think it is a c/s, it's just an optional shorthand for (I 
think) symbol-function.

-- 

  kenny tilton
  clinisys, inc
  ---------------------------------------------------------------
""Well, I've wrestled with reality for thirty-five years, Doctor,
   and I'm happy to state I finally won out over it.""
                                                   Elwood P. Dowd
From: Henrik Motakef
Subject: Re: What's up with #'?
Date: 
Message-ID: <87wundbej8.fsf@pokey.henrik-motakef.de>
Kenny Tilton <·······@nyc.rr.com> writes:

> So I do not think it is a c/s, it's just an optional shorthand for (I
> think) symbol-function.

function, actually. (Sidenote: Is it possible to look up such
Sharpsign macros with ILisps hyperspec-lookup?)

I don't smell anything either. What is wrong with that?

Regards
Henrik
From: Nils Goesche
Subject: Re: What's up with #'?
Date: 
Message-ID: <87k7jd74z5.fsf@darkstar.cartan>
Kenny Tilton <·······@nyc.rr.com> writes:

> Christopher C. Stacy wrote:
> >>>>>>On Sat, 16 Nov 2002 09:58:52 -0700, Chris Gehlker ("Chris") writes:
> >>>>>
> >  Chris> Let me ask, with all due humility as a very newbie, if anyone
> >  Chris> else thinks #' is a code smell? If it is a code smell, is it
> >  Chris> *supposed* to be in the sense that C++ has things in it that
> >  Chris> stink by design?
> > #' is a built-in reader macro.
> > What is a "code smell"?
> 
> 
>     http://c2.com/cgi/wiki?CodeSmell
> 
> So I do not think it is a c/s, it's just an optional shorthand for (I
> think) symbol-function.

No, it is an optional shorthand for FUNCTION:

CL-USER 23 > (defun blark (x)
               (+ x 42))
BLARK

CL-USER 24 > (flet ((blark (x)
                      (+ x 2)))
               (values (funcall (function blark) 40)
                       (funcall (symbol-function 'blark)
                                0)))
42
42

Regards,
-- 
Nils G�sche
Ask not for whom the <CONTROL-G> tolls.

PGP key ID #xD26EF2A0
From: Kenny Tilton
Subject: Re: What's up with #'?
Date: 
Message-ID: <3DD69B7F.2030708@nyc.rr.com>
Nils Goesche wrote:
> Kenny Tilton <·······@nyc.rr.com> writes:
> 
> 
>>So I do not think it is a c/s, it's just an optional shorthand for (I
>>think) symbol-function.
> 
> 
> No, it is an optional shorthand for FUNCTION:
> 
> CL-USER 23 > (defun blark (x)
>                (+ x 42))
> BLARK
> 
> CL-USER 24 > (flet ((blark (x)
>                       (+ x 2)))
>                (values (funcall (function blark) 40)
>                        (funcall (symbol-function 'blark)
>                                 0)))
> 42
> 42
> 
> Regards,

Yeah, i always get that wrong. But this nice, succinct example finally 
will get me over the hump, I think. Thanks.

-- 

  kenny tilton
  clinisys, inc
  ---------------------------------------------------------------
""Well, I've wrestled with reality for thirty-five years, Doctor,
   and I'm happy to state I finally won out over it.""
                                                   Elwood P. Dowd
From: Thomas F. Burdick
Subject: Re: What's up with #'?
Date: 
Message-ID: <xcvlm3tgedj.fsf@apocalypse.OCF.Berkeley.EDU>
Kenny Tilton <·······@nyc.rr.com> writes:

> Nils Goesche wrote:
> > Kenny Tilton <·······@nyc.rr.com> writes:
> > 
> > 
> >>So I do not think it is a c/s, it's just an optional shorthand for (I
> >>think) symbol-function.
> > 
> > 
> > No, it is an optional shorthand for FUNCTION:
> > 
> > CL-USER 23 > (defun blark (x)
> >                (+ x 42))
> > BLARK
> > 
> > CL-USER 24 > (flet ((blark (x)
> >                       (+ x 2)))
> >                (values (funcall (function blark) 40)
> >                        (funcall (symbol-function 'blark)
> >                                 0)))
> > 42
> > 42
> > 
> > Regards,
> 
> Yeah, i always get that wrong. But this nice, succinct example finally 
> will get me over the hump, I think. Thanks.

Heh, I'd think an even more succinct example would be:

  * #'(lambda () nil)
  #<Interpreted Function (LAMBDA () NIL) {80083F41}>
  * (symbol-function '(lambda () nil))
  
  Type-error in KERNEL::OBJECT-NOT-SYMBOL-ERROR-HANDLER:
     (LAMBDA () NIL) is not of type SYMBOL
  
  Restarts:
    0: [ABORT] Return to Top-Level.
  
  Debug  (type H for help)
  
  (SYMBOL-FUNCTION 1 (LAMBDA () NIL))[:EXTERNAL]
  0] 

-- 
           /|_     .-----------------------.                        
         ,'  .\  / | No to Imperialist war |                        
     ,--'    _,'   | Wage class war!       |                        
    /       /      `-----------------------'                        
   (   -.  |                               
   |     ) |                               
  (`-.  '--.)                              
   `. )----'                               
From: Michael Hudson
Subject: Re: What's up with #'?
Date: 
Message-ID: <7h3isytvj21.fsf@pc150.maths.bris.ac.uk>
···@apocalypse.OCF.Berkeley.EDU (Thomas F. Burdick) writes:

[#' is a reader macro for...]
 
> Heh, I'd think an even more succinct example would be:

Or:

* (car '#'sin)

FUNCTION

Cheers,
M.

-- 
  I'm sorry, was my bias showing again? :-)
                                      -- William Tanksley, 13 May 2000
From: Donald Fisk
Subject: Re: What's up with #'?
Date: 
Message-ID: <3DD9ADC4.BA4F37BC@enterprise.net>
Kenny Tilton wrote:
> 
> Christopher C. Stacy wrote:
> >>>>>>On Sat, 16 Nov 2002 09:58:52 -0700, Chris Gehlker ("Chris") writes:
> >>>>>
> >  Chris> Let me ask, with all due humility as a very newbie, if anyone
> >  Chris> else thinks #' is a code smell? If it is a code smell, is it
> >  Chris> *supposed* to be in the sense that C++ has things in it that
> >  Chris> stink by design?
> >
> > #' is a built-in reader macro.
> > What is a "code smell"?
> 
>     http://c2.com/cgi/wiki?CodeSmell
> 
> So I do not think it is a c/s, it's just an optional shorthand for (I
> think) symbol-function.

Function, as others have pointed out.   It works like this:

[1]> (mapcar #'sqrt '(1 2 3))
(1 1.4142135 1.7320508)
[2]> (mapcar (function sqrt) '(1 2 3))
(1 1.4142135 1.7320508)
[3]> (mapcar sqrt '(1 2 3))
 
*** - EVAL: variable SQRT has no value
1. Break [4]>
[5]> (mapcar #'(lambda (x) (* x 2)) '(1 2 3))
(2 4 6)
[6]> (mapcar (function (lambda (x) (* x 2))) '(1 2 3))
(2 4 6)
[7]> (mapcar (lambda (x) (* x 2)) '(1 2 3))
(2 4 6)
[8]>  (mapcar (symbol-function 'sqrt) '(1 2 3))
(1 1.4142135 1.7320508)
[9]>  

As you can see, #' is a read macro for function, which
is a macro rather than a function [2].
You can omit it from lambda expressions [7], but not from
named functions [3], because Common Lisp has separate
namespaces for functions and values.

>   kenny tilton

Le Hibou
-- 
Dalinian: Lisp. Java. Which one sounds sexier?
RevAaron: Definitely Lisp. Lisp conjures up images of hippy coders,
drugs,
sex, and rock & roll. Late nights at Berkeley, coding in Lisp fueled by
LSD.
Java evokes a vision of a stereotypical nerd, with no life or social
skills.
From: Kenny Tilton
Subject: Re: What's up with #'?
Date: 
Message-ID: <3DD9B497.20401@nyc.rr.com>
Donald Fisk wrote:
> As you can see, #' is a read macro for function, which
> is a macro rather than a function [2].
> You can omit it from lambda expressions [7], but not from
> named functions [3], because Common Lisp has separate
> namespaces for functions and values.
> 

Thx for the detailed breakdown.

-- 

  kenny tilton
  clinisys, inc
  ---------------------------------------------------------------
""Well, I've wrestled with reality for thirty-five years, Doctor,
   and I'm happy to state I finally won out over it.""
                                                   Elwood P. Dowd
From: Henrik Motakef
Subject: Re: What's up with #'?
Date: 
Message-ID: <871y5lctnb.fsf@pokey.henrik-motakef.de>
······@dtpq.com (Christopher C. Stacy) writes:

> >>>>> On Sat, 16 Nov 2002 09:58:52 -0700, Chris Gehlker ("Chris") writes:
>> Let me ask, with all due humility as a very newbie, if anyone
>> else thinks #' is a code smell? If it is a code smell, is it
>> *supposed* to be in the sense that C++ has things in it that
>> stink by design?
> 
> #' is a built-in reader macro.
> What is a "code smell"?

"A code smell is a hint that something has gone wrong somewhere in
your code."
<http://c2.com/cgi/wiki?CodeSmell>
From: Kenny Tilton
Subject: Re: What's up with #'?
Date: 
Message-ID: <3DD67D16.2010608@nyc.rr.com>
Chris Gehlker wrote:
> Let me ask, with all due humility as a very newbie, if anyone else thinks #'
> is a  code smell? If it is a code smell, is it *supposed* to be in the sense
> that C++ has things in it that stink by design?

Do you mean #' indicates there is something wrong with CL? It's just 
shorthand. What don't you like about it? I'll tell you what I do not 
like: if i doubleclick #'this, my editor only selects this, not #'this. 
but that is not enough to make me code this: (symbol-function 'this)

---


-- 

  kenny tilton
  clinisys, inc
  ---------------------------------------------------------------
""Well, I've wrestled with reality for thirty-five years, Doctor,
   and I'm happy to state I finally won out over it.""
                                                   Elwood P. Dowd
From: Erik Naggum
Subject: Re: What's up with #'?
Date: 
Message-ID: <3246460716197851@naggum.no>
* Kenny Tilton
| Do you mean #' indicates there is something wrong with CL?  It's just
| shorthand.  What don't you like about it?  I'll tell you what I do not
| like: if i doubleclick #'this, my editor only selects this, not #'this.
| but that is not enough to make me code this: (symbol-function 'this)

  But would you write (function this), which it actually means?

  I think hips that have just been shot from have a distinct smell.

-- 
Erik Naggum, Oslo, Norway

Act from reason, and failure makes you rethink and study harder.
Act from faith, and failure makes you blame someone and push harder.
From: Kenny Tilton
Subject: Re: What's up with #'?
Date: 
Message-ID: <3DD6EB96.5070504@nyc.rr.com>
Erik Naggum wrote:
> * Kenny Tilton
> | Do you mean #' indicates there is something wrong with CL?  It's just
> | shorthand.  What don't you like about it?  I'll tell you what I do not
> | like: if i doubleclick #'this, my editor only selects this, not #'this.
> | but that is not enough to make me code this: (symbol-function 'this)
> 
>   But would you write (function this), which it actually means?
> 
>   I think hips that have just been shot from have a distinct smell.
> 

Your aim is wide. I gave that mistake careful thought and consulted the 
hyperpsec for both function and symbol-function before posting.

Of course you did not know that when you characterized my effort, so if 
that smell over there is not from the cll newbies buried under your 
floorboards, you might want to check your smoking hips.

-- 

  kenny tilton
  clinisys, inc
  ---------------------------------------------------------------
Good manners sometimes means simply putting up with other people's bad 
manners. -- H. Jackson Browne
From: Thomas Stegen
Subject: Re: What's up with #'?
Date: 
Message-ID: <3dd6f7ea$1@nntphost.cis.strath.ac.uk>
Kenny Tilton wrote:

> Your aim is wide. I gave that mistake careful thought and consulted the 
> hyperpsec for both function and symbol-function before posting.

Why didn't you just look up #' ? Took about 5 seconds to find...

-- 
Thomas.
From: Kenny Tilton
Subject: Re: What's up with #'?
Date: 
Message-ID: <3DD732FB.3020406@nyc.rr.com>
Thomas Stegen wrote:
> Kenny Tilton wrote:
> 
>> Your aim is wide. I gave that mistake careful thought and consulted 
>> the hyperpsec for both function and symbol-function before posting.
> 
> 
> Why didn't you just look up #' ? Took about 5 seconds to find...
> 

OK, so now you want to argue about my library skills? A little rigor, 
please. The question at hand was whether i had shot from the hip, not 
whether I got something wrong or was not able to find a non-alpha 
character in an index that ran from a to z.

Because I /did/ look up #'. (You presumed wrong, kind of a habit around 
here.) I just did not find it. The index went from A to Z. I am used to 
finding stuff like that in front of the alpha entries, since that is how 
the char-code works out. And I was not aware Lispers call the pound sign 
a sharpsign (tho that makes sense, too).

-- 

  kenny tilton
  clinisys, inc
  ---------------------------------------------------------------
""Well, I've wrestled with reality for thirty-five years, Doctor,
   and I'm happy to state I finally won out over it.""
                                                   Elwood P. Dowd
From: Chris Gehlker
Subject: Re: What's up with #'?
Date: 
Message-ID: <B9FC8E0F.235E5%gehlker@fastq.com>
On 11/16/02 11:07 PM, in article ················@nyc.rr.com, "Kenny Tilton"
<·······@nyc.rr.com> wrote:

> Because I /did/ look up #'.

You probably did exactly what I did, tried to find it in the symbol index.
It's not there because it's not a "symbol".

I guess we have to trust that it will all make sense when it all makes
sense.



-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----==  Over 80,000 Newsgroups - 16 Different Servers! =-----
From: Kenny Tilton
Subject: Re: What's up with #'?
Date: 
Message-ID: <3DD74A2B.4070001@nyc.rr.com>
Chris Gehlker wrote:
> On 11/16/02 11:07 PM, in article ················@nyc.rr.com, "Kenny Tilton"
> <·······@nyc.rr.com> wrote:
> 
> 
>>Because I /did/ look up #'.
> 
> 
> You probably did exactly what I did, tried to find it in the symbol index.
> It's not there because it's not a "symbol".

No, I went to A hoping the non-alpha stuff had been lumped in there 
ahead of the A stuff.


-- 

  kenny tilton
  clinisys, inc
  ---------------------------------------------------------------
""Well, I've wrestled with reality for thirty-five years, Doctor,
   and I'm happy to state I finally won out over it.""
                                                   Elwood P. Dowd
From: Adam Warner
Subject: Re: What's up with #'?
Date: 
Message-ID: <pan.2002.11.17.07.58.16.98732@consulting.net.nz>
Hi Kenny Tilton,

>>>Because I /did/ look up #'.
>> 
>> 
>> You probably did exactly what I did, tried to find it in the symbol
>> index. It's not there because it's not a "symbol".
> 
> No, I went to A hoping the non-alpha stuff had been lumped in there
> ahead of the A stuff.

http://www.lispworks.com/reference/HyperSpec/Front/X_Master.htm

You might have more chance finding the "non-alpha stuff" in the section
entitled "Non-Alphabetic" ;-)

Regards,
Adam
From: Kenny Tilton
Subject: Re: What's up with #'?
Date: 
Message-ID: <3DD7C4CD.6080009@nyc.rr.com>
Adam Warner wrote:
>>No, I went to A hoping the non-alpha stuff had been lumped in there
>>ahead of the A stuff.
> 
> 
> http://www.lispworks.com/reference/HyperSpec/Front/X_Master.htm
> 
> You might have more chance finding the "non-alpha stuff" in the section
> entitled "Non-Alphabetic" ;-)

Doh! To make it worse, i have a version ACL includes on my HD and 
NON-ALPHABETIC is in all caps, looks like a friggin billboard.

This makes me think I may never find that set of keys that has been at 
large over here for going on two days now.

:)

-- 

  kenny tilton
  clinisys, inc
  ---------------------------------------------------------------
""Well, I've wrestled with reality for thirty-five years, Doctor,
   and I'm happy to state I finally won out over it.""
                                                   Elwood P. Dowd
From: Coby Beck
Subject: Re: What's up with #'?
Date: 
Message-ID: <ar7jtq$2ev8$1@otis.netspace.net.au>
"Kenny Tilton" <·······@nyc.rr.com> wrote in message
·····················@nyc.rr.com...
> the char-code works out. And I was not aware Lispers call the pound sign
> a sharpsign (tho that makes sense, too).

Well, this subject came up a couple of years ago with some amusing results:
http://groups.google.com/groups?selm=39C8006A.E35E30E1%40nyc.rr.com

And...while we're beating up Kenny for his unconsionable
function/symbol-function error I will point out the link above is an article
by him so he cannot deny having read the thread!  So what's this "i didn't
know" crap?  Eh, Kenny?  ;o)

--
Coby Beck
(remove #\Space "coby 101 @ bigpond . com")
(hoping one smiley will suffice!)
From: Kenny Tilton
Subject: Re: What's up with #'?
Date: 
Message-ID: <3DD7C6A2.20703@nyc.rr.com>
Coby Beck wrote:
> "Kenny Tilton" <·······@nyc.rr.com> wrote in message
> ·····················@nyc.rr.com...
> 
>>the char-code works out. And I was not aware Lispers call the pound sign
>>a sharpsign (tho that makes sense, too).
> 
> 
> Well, this subject came up a couple of years ago with some amusing results:
> http://groups.google.com/groups?selm=39C8006A.E35E30E1%40nyc.rr.com

Great find! Now let's see what kind of damage control i can do over this 
paper trail...

> 
> And...while we're beating up Kenny for his unconsionable
> function/symbol-function error I will point out the link above is an article
> by him so he cannot deny having read the thread!  So what's this "i didn't
> know" crap?  Eh, Kenny?  ;o)

...ok, this is what the PR team came up with, after rejecting "Like most 
NG regulars I do not actually read the articles to which I am responding.":

That article demonstrates # has no /one/ name so why should I have 
remembered one out of twenty?

:)

-- 

  kenny tilton
  clinisys, inc
  ---------------------------------------------------------------
""Well, I've wrestled with reality for thirty-five years, Doctor,
   and I'm happy to state I finally won out over it.""
                                                   Elwood P. Dowd
From: Your sizzling, scorching daily Sun
Subject: Scandal! (was Re: What's up with #'?)
Date: 
Message-ID: <ey3zns8p1q2.fsf_-_@cley.com>
* Kenny Tilton wrote:

> That article demonstrates # has no /one/ name so why should I have
> remembered one out of twenty?

No, sorry, the electorate will not put up with this kind of
dissembling.  The Sun (do they have tabloids in the US?  What are they
called? - ed) Demands that you resign your position as minister for
Cells!  This Farce CAN NOT CONTINUE!  Vote for Ilias!
From: Kenny Tilton
Subject: Re: Scandal! (was Re: What's up with #'?)
Date: 
Message-ID: <3DD7D9B5.7070000@nyc.rr.com>
(Your sizzling, scorching daily Sun) wrote:
> * Kenny Tilton wrote:
> 
> 
>>That article demonstrates # has no /one/ name so why should I have
>>remembered one out of twenty?
> 
> 
> No, sorry, the electorate will not put up with this kind of
> dissembling.  The Sun (do they have tabloids in the US?  What are they
> called? - ed) Demands that you resign your position as minister for
> Cells!  This Farce CAN NOT CONTINUE!  Vote for Ilias!

Mistakes were made. What if I check myself into the Betty Ford clinic 
for a month, then go on Oprah to sing the National Anthem?

-- 

  kenny tilton
  clinisys, inc
  ---------------------------------------------------------------
""Well, I've wrestled with reality for thirty-five years, Doctor,
   and I'm happy to state I finally won out over it.""
                                                   Elwood P. Dowd
From: Will Deakin
Subject: Re: Scandal! (was Re: What's up with #'?)
Date: 
Message-ID: <ar8ofk$evu$1@sparta.btinternet.com>
Kenny Tilton wrote:

> Mistakes were made. What if I check myself into the Betty Ford clinic
> for a month, then go on Oprah to sing the National Anthem?

I don't think you have fully considered the enormous financial benefits 
that could be accrued.

If I were your PR consultant I would suggest that you claim you were 
abducted by aliens, resulting in a traumatic gender crisis that required 
you to enter holy orders as a nun. This could keep you going on 
international daytime TV for years. (At the end of this you could then 
then sell your tales of sordid nun-on-nun action to the National 
Enquirer...)

;)w
From: Joe Marshall
Subject: Re: Scandal! (was Re: What's up with #'?)
Date: 
Message-ID: <r8dipzfe.fsf@ccs.neu.edu>
<···@cley.com> (Your sizzling, scorching daily Sun) writes:

> No, sorry, the electorate will not put up with this kind of
> dissembling.  The Sun (do they have tabloids in the US?  What are they
> called? - ed) Demands that you resign your position as minister for
> Cells!  This Farce CAN NOT CONTINUE!  Vote for Ilias!

The two with the most circulation are

    The National Enquirer
    http://www.nationalenquirer.com/

    The Star
    http://www.starmagazine.com/

But aficionados of the form prefer

    The Weekly World News
    http://www.weeklyworldnews.com/
From: Donald Fisk
Subject: Re: What's up with #'?
Date: 
Message-ID: <3DD9B060.F8E98009@enterprise.net>
Kenny Tilton wrote:
> 
> And I was not aware Lispers call the pound sign
> a sharpsign (tho that makes sense, too).

Some of us Rightpondians are a bit tardy in converting to Euros,
so not only do we have pounds (GBP), but we have pound signs (£)
on our keyboards.   I assume you know what the currency pound
sign looks like.

The confusion is presumably because the pound sign on a UKoGBaNI
keyboard is in exactly the same place as the sharp sign is on
an American keyboard, which you might not know.

>   kenny tilton

Le Hibou
-- 
Dalinian: Lisp. Java. Which one sounds sexier?
RevAaron: Definitely Lisp. Lisp conjures up images of hippy coders,
drugs,
sex, and rock & roll. Late nights at Berkeley, coding in Lisp fueled by
LSD.
Java evokes a vision of a stereotypical nerd, with no life or social
skills.
From: Erik Naggum
Subject: Re: What's up with #'?
Date: 
Message-ID: <3246668267166605@naggum.no>
* Donald Fisk
| Some of us Rightpondians are a bit tardy in converting to Euros, so not
| only do we have pounds (GBP), but we have pound signs (�) on our
| keyboards.  I assume you know what the currency pound sign looks like.

  It appears that many British English users do not know that #5 is
  pronounced "number 5" and 5# is pronounced "5 pounds", as in lbs, and to
  American English users, # is therefore equally "number sign" and "pound
  sign".  Oxford Reference Online does not even sport "number sign" despite
  the 100 reference works they span.  Neither does The New Oxford American
  Dictionary, but all real American references list both meanings of "pound
  sign" and have a "number sign", too.

-- 
Erik Naggum, Oslo, Norway

Act from reason, and failure makes you rethink and study harder.
Act from faith, and failure makes you blame someone and push harder.
From: Marco Antoniotti
Subject: Re: What's up with #'?
Date: 
Message-ID: <y6c1y5hhd12.fsf@octagon.valis.nyu.edu>
Erik Naggum <····@naggum.no> writes:

> * Donald Fisk
> | Some of us Rightpondians are a bit tardy in converting to Euros, so not
> | only do we have pounds (GBP), but we have pound signs (�) on our
> | keyboards.  I assume you know what the currency pound sign looks like.
> 
>   It appears that many British English users do not know that #5 is
>   pronounced "number 5" and 5# is pronounced "5 pounds", as in lbs, and to
>   American English users, # is therefore equally "number sign" and "pound
>   sign".  Oxford Reference Online does not even sport "number sign" despite
>   the 100 reference works they span.  Neither does The New Oxford American
>   Dictionary, but all real American references list both meanings of "pound
>   sign" and have a "number sign", too.

The ASCII keyboards have always played fun tricks with non English
speakers.  The #\# character in particular has accumulated a largish
set of names among Italian speakers, some of which kind of hilarious
because of their dialectal flair.  I believe the first name assined
to the #\# character in Italian was `diesis' (as in `Fa diesis'): a
name of musical origin.  However, it really does not sound all that
Italian and the masses have opted for `cancelletto' (`little gate' or
`grate').  From there the jump to the very Tusca/Roman sounding
`gratella' ('little cute grate') is very small :)

Other interesting `fluff' stories regard the names of #\& and ··@. #\&
was known into Italian (I remember it on the household Olivetti
Lettera mechanical typewriter) as `commercial "and"' (I believe it
must have been an import as well, since the congiunction `and' is a
simple `e' in Italian). ··@ did not have a name until it started to
appear in the 80's on Italian keyboards.  The name it got is the
widespread `chioccioletta' ('little cute snail').  A name that is
warm, fuzzy, and ... cute.

Cheers

PS. One of the greatest jokes I heard about Windows XP in Italy is the
    following: "WXP was made by Clementoni".  "Clementoni" being the
    houshold name for "Fisher Prize".  Is the future of computing
    "warm, fuzzy and childlike"?

-- 
Marco Antoniotti ========================================================
NYU Courant Bioinformatics Group        tel. +1 - 212 - 998 3488
715 Broadway 10th Floor                 fax  +1 - 212 - 995 4122
New York, NY 10003, USA                 http://bioinformatics.cat.nyu.edu
                    "Hello New York! We'll do what we can!"
                           Bill Murray in `Ghostbusters'.
From: Joe Marshall
Subject: Re: What's up with #'?
Date: 
Message-ID: <1y5hpbc7.fsf@ccs.neu.edu>
Marco Antoniotti <·······@cs.nyu.edu> writes:

> I believe the first name assined
> to the #\# character in Italian was `diesis' (as in `Fa diesis'): a
> name of musical origin.  However, it really does not sound all that
> Italian and the masses have opted for `cancelletto' (`little gate' or
> `grate').  From there the jump to the very Tusca/Roman sounding
> `gratella' ('little cute grate') is very small :)

The INTERCAL convention is to call the '#' character `mesh'
From: Marco Antoniotti
Subject: Re: What's up with #'?
Date: 
Message-ID: <y6csmxxgslz.fsf@octagon.valis.nyu.edu>
Joe Marshall <···@ccs.neu.edu> writes:

> Marco Antoniotti <·······@cs.nyu.edu> writes:
> 
> > I believe the first name assined
> > to the #\# character in Italian was `diesis' (as in `Fa diesis'): a
> > name of musical origin.  However, it really does not sound all that
> > Italian and the masses have opted for `cancelletto' (`little gate' or
> > `grate').  From there the jump to the very Tusca/Roman sounding
> > `gratella' ('little cute grate') is very small :)
> 
> The INTERCAL convention is to call the '#' character `mesh'

Of course :)

Cheers

-- 
Marco Antoniotti ========================================================
NYU Courant Bioinformatics Group        tel. +1 - 212 - 998 3488
715 Broadway 10th Floor                 fax  +1 - 212 - 995 4122
New York, NY 10003, USA                 http://bioinformatics.cat.nyu.edu
                    "Hello New York! We'll do what we can!"
                           Bill Murray in `Ghostbusters'.
From: Tim Daly, Jr.
Subject: Re: What's up with #'?
Date: 
Message-ID: <wkel9hm37i.fsf@tenkan.org>
Joe Marshall <···@ccs.neu.edu> writes:

> Marco Antoniotti <·······@cs.nyu.edu> writes:
> 
> > I believe the first name assined
> > to the #\# character in Italian was `diesis' (as in `Fa diesis'): a
> > name of musical origin.  However, it really does not sound all that
> > Italian and the masses have opted for `cancelletto' (`little gate' or
> > `grate').  From there the jump to the very Tusca/Roman sounding
> > `gratella' ('little cute grate') is very small :)
> 
> The INTERCAL convention is to call the '#' character `mesh'

My favorite has always been 'octothorp'.  It describes the glyph, but
doesn't imply a meaning.  'Mesh' sounds similar, but I don't know if I
want to adopt any INTERCAL conventions today...

-Tim
From: Jens Kilian
Subject: Re: What's up with #'?
Date: 
Message-ID: <sf1y5g4g08.fsf@bstde026.germany.agilent.com>
Marco Antoniotti <·······@cs.nyu.edu> writes:
> Other interesting `fluff' stories regard the names of #\& and ··@. #\&
> was known into Italian (I remember it on the household Olivetti
> Lettera mechanical typewriter) as `commercial "and"' (I believe it
> must have been an import as well, since the congiunction `and' is a
> simple `e' in Italian).

I'd almost bet that the ampersand character was *invented* in Italy.
It's just a squiggly way of writing the Latin 'et'; in some italic (ha!)
typefaces the ampersand clearly looks like a ligature 'Et'.
-- 
··········@acm.org                 phone:+49-7031-464-7698 (TELNET 778-7698)
  http://www.bawue.de/~jjk/          fax:+49-7031-464-7351
PGP:       06 04 1C 35 7B DC 1F 26 As the air to a bird, or the sea to a fish,
0x555DA8B5 BB A2 F0 66 77 75 E1 08 so is contempt to the contemptible. [Blake]
From: Erik Naggum
Subject: Re: What's up with #'?
Date: 
Message-ID: <3246487545212342@naggum.no>
* Kenny Tilton
| Your aim is wide. I gave that mistake careful thought and consulted the
| hyperpsec for both function and symbol-function before posting.

  That #'foo means (function foo) is written in plain text in the standard.
  See 2.4.8.2 Sharpsign Single-Quote.

| Of course you did not know that when you characterized my effort, so if
| that smell over there is not from the cll newbies buried under your
| floorboards, you might want to check your smoking hips.

  What is your major malfunction, numbnut?

-- 
Erik Naggum, Oslo, Norway

Act from reason, and failure makes you rethink and study harder.
Act from faith, and failure makes you blame someone and push harder.
From: Tim Bradshaw
Subject: Re: What's up with #'?
Date: 
Message-ID: <ey31y5ls8hv.fsf@cley.com>
* Chris Gehlker wrote:
> Let me ask, with all due humility as a very newbie, if anyone else thinks #'
> is a  code smell? If it is a code smell, is it *supposed* to be in the sense
> that C++ has things in it that stink by design?

No.  It might be if you think that single-namespace Lisps are
inherently superior, but CL people don't think that.

--tim
From: Erik Naggum
Subject: Re: What's up with #'?
Date: 
Message-ID: <3246460578644840@naggum.no>
* Chris Gehlker
| Let me ask, with all due humility as a very newbie, if anyone else thinks #'
| is a  code smell? If it is a code smell, is it *supposed* to be in the sense
| that C++ has things in it that stink by design?

  If you prefer to write (function foo) over #'foo, nobody will notice, as
  the latter means exactly and only the former.  If you prefer to write
  (quote foo) over 'foo, however, many will notice, since ' is so common.

  FYI: /real/ humility looks quite different.

-- 
Erik Naggum, Oslo, Norway

Act from reason, and failure makes you rethink and study harder.
Act from faith, and failure makes you blame someone and push harder.
From: Chris Gehlker
Subject: Re: What's up with #'?
Date: 
Message-ID: <B9FBEA11.2358C%gehlker@fastq.com>
On 11/16/02 11:36 AM, in article ················@naggum.no, "Erik Naggum"
<····@naggum.no> wrote:

> FYI: /real/ humility looks quite different.

Believe me, the humility is very genuine. I know that I *don't know* this
stuff. I also know that CltL2 is supposed to be online but it was hosed when
I tried to look this up.



-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----==  Over 80,000 Newsgroups - 16 Different Servers! =-----
From: Erik Naggum
Subject: Re: What's up with #'?
Date: 
Message-ID: <3246464400010621@naggum.no>
* Chris Gehlker
| Believe me, the humility is very genuine.  I know that I *don't know*
| this stuff.  I also know that CltL2 is supposed to be online but it was
| hosed when I tried to look this up.

  The part of the article you ignored explained it.  How come you still do
  not know?  What is more important to you, to prove that your humility is
  real or to learn something?  I think everybody else cares more about the
  latter than the former.

-- 
Erik Naggum, Oslo, Norway

Act from reason, and failure makes you rethink and study harder.
Act from faith, and failure makes you blame someone and push harder.
From: Kenny Tilton
Subject: Re: What's up with #'?
Date: 
Message-ID: <3DD6A2A0.8030908@nyc.rr.com>
Chris Gehlker wrote:
> On 11/16/02 11:36 AM, in article ················@naggum.no, "Erik Naggum"
> <····@naggum.no> wrote:
> 
> 
>>FYI: /real/ humility looks quite different.
> 
> 
> Believe me, the humility is very genuine. 

I thought your question and followups were fine.

there /is/ a dissonance between "humility" and the "this smells" 
conclusion implicit in "does anyone else think...", but I do the same 
thing (if, that is, my guess at your intent is accurate): put my 
questions in the form of judgmental statements (because it is more fun 
to use strong words), with a blanket disclaimer that I don't know what I 
am talking about hence am open to and eager for correction.

-- 

  kenny tilton
  clinisys, inc
  ---------------------------------------------------------------
""Well, I've wrestled with reality for thirty-five years, Doctor,
   and I'm happy to state I finally won out over it.""
                                                   Elwood P. Dowd
From: Chris Gehlker
Subject: Re: What's up with #'?
Date: 
Message-ID: <B9FBFADE.2359C%gehlker@fastq.com>
On 11/16/02 12:51 PM, in article ················@nyc.rr.com, "Kenny Tilton"
<·······@nyc.rr.com> wrote:

> 
> 
> Chris Gehlker wrote:
>> On 11/16/02 11:36 AM, in article ················@naggum.no, "Erik Naggum"
>> <····@naggum.no> wrote:
>> 
>> 
>>> FYI: /real/ humility looks quite different.
>> 
>> 
>> Believe me, the humility is very genuine.
> 
> I thought your question and followups were fine.

Thanks!
> 
> there /is/ a dissonance between "humility" and the "this smells"
> conclusion implicit in "does anyone else think...", but I do the same
> thing (if, that is, my guess at your intent is accurate): put my
> questions in the form of judgmental statements (because it is more fun
> to use strong words), with a blanket disclaimer that I don't know what I
> am talking about hence am open to and eager for correction.

I do like to use strong statements with a invitation to others to correct
them. For me it's faster to test my tentative understanding on the community
than to just ask questions.

But I also just made a bad assumption. On comp.lang.ruby to say that
something "smells" just means that it confuses you. I should have said "Does
anyone else find this confusing?"

To say that something is "surprising", on the other hand, means that it
sucks, as in "Java is full of surprises." My God, I just insulted the
Javaphiles here.

Different list, different culture. I should have anticipated that.

Thanks again for the kind words.



-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----==  Over 80,000 Newsgroups - 16 Different Servers! =-----
From: Erik Naggum
Subject: Re: What's up with #'?
Date: 
Message-ID: <3246469356264116@naggum.no>
* Chris Gehlker
| I do like to use strong statements with a invitation to others to correct
| them.

  Then just do it, do not defend yourself when others do not like it.  Stick
  to the point.  People who stick to the point learn a lot here, and fast.

  You should perhaps realize that humility and strong statements are not
  typically regarded as internally consistent.  That you chose to respond
  /only/ to the rejection of your purported humility also suggests otherwise.

| But I also just made a bad assumption. On comp.lang.ruby to say that
| something "smells" just means that it confuses you.

  Thanks for the information.  I doubt that I shall find occasion to use it.

-- 
Erik Naggum, Oslo, Norway

Act from reason, and failure makes you rethink and study harder.
Act from faith, and failure makes you blame someone and push harder.
From: Marc Spitzer
Subject: Re: What's up with #'?
Date: 
Message-ID: <86fzu187q7.fsf@bogomips.optonline.net>
Chris Gehlker <·······@fastq.com> writes:
> 
> I do like to use strong statements with a invitation to others to correct
> them. For me it's faster to test my tentative understanding on the community
> than to just ask questions.

Don't take this the wrong way, but when you do this you /apear/ to be
an arogant ass.  Please note I did not say you were one, just that you
looked like one.  Also if you are unwilling to do the work nessary to
have a real understanding why should people continue to help you get
there?  Remember it may be faster for you is not the main issue.  What
is the main issue is "is this worth going to the well for a bucket of
help?".  By going to the well too often it may dry up or people might
decide that their time would be better spent with you somewhere else
and encourage you to leave.  

> 
> But I also just made a bad assumption. On comp.lang.ruby to say that
> something "smells" just means that it confuses you. I should have said "Does
> anyone else find this confusing?"
> 

Well I see something smells, I think "like 2 day old fish in the
summer sun" or ripe garbage.  

marc
From: Chris Gehlker
Subject: Re: What's up with #'?
Date: 
Message-ID: <B9FC5949.235CB%gehlker@fastq.com>
On 11/16/02 3:28 PM, in article ··············@bogomips.optonline.net, "Marc
Spitzer" <········@optonline.net> wrote:

>> 
>> But I also just made a bad assumption. On comp.lang.ruby to say that
>> something "smells" just means that it confuses you. I should have said "Does
>> anyone else find this confusing?"
>> 
> 
> Well I see something smells, I think "like 2 day old fish in the
> summer sun" or ripe garbage.

Ah. It's supposed to be an analogy to the way your sense of smell conveys
information that's hard to articulate and sort of seeps in at an unconscious
level. I just read in Graham about being able to tell whether a building is
made of wood or stone by its general shape when you are too far away to
actually see the construction material. It's that same idea.



-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----==  Over 80,000 Newsgroups - 16 Different Servers! =-----
From: Marc Spitzer
Subject: Re: What's up with #'?
Date: 
Message-ID: <86vg2wg2p8.fsf@bogomips.optonline.net>
Chris Gehlker <·······@fastq.com> writes:

> On 11/16/02 3:28 PM, in article ··············@bogomips.optonline.net, "Marc
> Spitzer" <········@optonline.net> wrote:
> 
> >> 
> >> But I also just made a bad assumption. On comp.lang.ruby to say that
> >> something "smells" just means that it confuses you. I should have said "Does
> >> anyone else find this confusing?"
> >> 
> > 
> > Well I see something smells, I think "like 2 day old fish in the
> > summer sun" or ripe garbage.
> 
> Ah. It's supposed to be an analogy to the way your sense of smell conveys
> information that's hard to articulate and sort of seeps in at an unconscious
> level. I just read in Graham about being able to tell whether a building is
> made of wood or stone by its general shape when you are too far away to
> actually see the construction material. It's that same idea.

ok, but when you say it smells, you are implying that you are
qualified to make the judgment.  

marc

> 
> 
> 
> -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
> http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
> -----==  Over 80,000 Newsgroups - 16 Different Servers! =-----
From: Chris Gehlker
Subject: Re: What's up with #'?
Date: 
Message-ID: <B9FC8B7F.235E0%gehlker@fastq.com>
On 11/16/02 10:50 PM, in article ··············@bogomips.optonline.net,
"Marc Spitzer" <········@optonline.net> wrote:

> Chris Gehlker <·······@fastq.com> writes:
> 
>> On 11/16/02 3:28 PM, in article ··············@bogomips.optonline.net, "Marc
>> Spitzer" <········@optonline.net> wrote:
>> 
>>>> 
>>>> But I also just made a bad assumption. On comp.lang.ruby to say that
>>>> something "smells" just means that it confuses you. I should have said
>>>> "Does
>>>> anyone else find this confusing?"
>>>> 
>>> 
>>> Well I see something smells, I think "like 2 day old fish in the
>>> summer sun" or ripe garbage.
>> 
>> Ah. It's supposed to be an analogy to the way your sense of smell conveys
>> information that's hard to articulate and sort of seeps in at an unconscious
>> level. I just read in Graham about being able to tell whether a building is
>> made of wood or stone by its general shape when you are too far away to
>> actually see the construction material. It's that same idea.
> 
> ok, but when you say it smells, you are implying that you are
> qualified to make the judgment.

The important part of my question was "does it smell by design?" I'm just
new enough to the language to be uncertain as to whether it smelled at all
[1]. I had just read a page in Graham where he mentions that COMPILE is
generally a poor idea except in very limited circumstances and I couldn't
help but notice that it had a different functional form than all the other
functions that dealt with functions. I was curious as to whether I should
connect the dots. [2]

'Smell by design' is a feature of some languages [3] and it doesn't strike
me as illegitimate to ask if it was a feature of Common Lisp. It's not
something I could find out by reading the spec.

I don't care whether COMPILE smells or not since I will probably never use
it but I do care if certain functional forms are supposed to be a red flag
and I'm not aware of that.

[1] It doesn't.
[2] I clearly shouldn't have.
[3] C++ cast operators, for example.



-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----==  Over 80,000 Newsgroups - 16 Different Servers! =-----
From: Kenny Tilton
Subject: Re: What's up with #'?
Date: 
Message-ID: <3DD6E094.5090004@nyc.rr.com>
Marc Spitzer wrote:
> Don't take this the wrong way, but when you do this you /apear/ to be
> an arogant ass.  Please note I did not say you were one, just that you
> looked like one.

Distinction without a difference? I'll try "you only look like an ass" 
on the first bouncer I see headed up Broadway tonight. Wish me luck. :)

 >  What
 > is the main issue is "is this worth going to the well for a bucket of
 > help?".

Right. Early on with a new language, when I know my questions are dumb, 
I feel free to toss a question out on an NG, knowing that the folks will 
likely be able to answer effortlessly (or they will say, whoa, slow 
down, get a book). I am not asking for a bucket, just a drop.

To me, taking specific questions to the experts on an NG /is/ a 
respectable form of research, and it is no imposition because (a) again, 
the questions are no-brainers and (b) hey, only the folks that want to 
answer do so.


-- 

  kenny tilton
  clinisys, inc
  ---------------------------------------------------------------
""Well, I've wrestled with reality for thirty-five years, Doctor,
   and I'm happy to state I finally won out over it.""
                                                   Elwood P. Dowd
From: Marc Spitzer
Subject: Re: What's up with #'?
Date: 
Message-ID: <861y5lgc38.fsf@bogomips.optonline.net>
Kenny Tilton <·······@nyc.rr.com> writes:

> Marc Spitzer wrote:
> > Don't take this the wrong way, but when you do this you /apear/ to be
> > an arogant ass.  Please note I did not say you were one, just that you
> > looked like one.
> 
> Distinction without a difference? I'll try "you only look like an ass"
> on the first bouncer I see headed up Broadway tonight. Wish me luck. :)

That is remarkably insulting to everyone.  You are saying that the
people here are as smart as your average NYC bouncer, particularly
Chris Gehlker.  

> 
> 
>  >  What
>  > is the main issue is "is this worth going to the well for a bucket of
>  > help?".
> 
> Right. Early on with a new language, when I know my questions are
> dumb, I feel free to toss a question out on an NG, knowing that the
> folks will likely be able to answer effortlessly (or they will say,
> whoa, slow down, get a book). I am not asking for a bucket, just a
> drop.
> 

In a previous post, not on google yet, his method was to get some
vague idea and ask if it is right.  This is not a good way to act if
you want help from many of the experts here, over the long haul.  
  
> 
> To me, taking specific questions to the experts on an NG /is/ a
> respectable form of research, and it is no imposition because (a)
> again, the questions are no-brainers and (b) hey, only the folks that
> want to answer do so.

Searching for your simple and easy question in google is good, not
trying to find the answer yourself and just asking a question you could
probably answer your self is bad.  And people who want to help may
change their minds if they are bothered too much or get the feeling
that the asker is not doing any real work.

marc
From: Donald Fisk
Subject: Re: What's up with #'?
Date: 
Message-ID: <3DD9B343.CD8446F7@enterprise.net>
Chris Gehlker wrote:

> But I also just made a bad assumption. On comp.lang.ruby to say that
> something "smells" just means that it confuses you. I should have said "Does
> anyone else find this confusing?"

It doesn't mean that on the c2.com wiki, where I learned the term.

> To say that something is "surprising", on the other hand, means that it
> sucks, as in "Java is full of surprises." My God, I just insulted the
> Javaphiles here.

There either the empty set, or surprisingly tolerant for Javaphiles.
No one's taken offence to my .sig yet.

I'm not quite sure what Java surprises you have in mind anyway -- the
language was designed to be comfortable for the average programmer,
so surprises have been kept to a minimum.

OTOH Lisp has lots of surprises -- but most certainly doesn't suck.

Le Hibou
-- 
Dalinian: Lisp. Java. Which one sounds sexier?
RevAaron: Definitely Lisp. Lisp conjures up images of hippy coders,
drugs,
sex, and rock & roll. Late nights at Berkeley, coding in Lisp fueled by
LSD.
Java evokes a vision of a stereotypical nerd, with no life or social
skills.
From: Chris Gehlker
Subject: Re: What's up with #'?
Date: 
Message-ID: <B9FF137D.23692%gehlker@fastq.com>
On 11/18/02 8:42 PM, in article ·················@enterprise.net, "Donald
Fisk" <················@enterprise.net> wrote:

> Chris Gehlker wrote:
> 
>> But I also just made a bad assumption. On comp.lang.ruby to say that
>> something "smells" just means that it confuses you. I should have said "Does
>> anyone else find this confusing?"
> 
> It doesn't mean that on the c2.com wiki, where I learned the term.

I've seen this and I think it's a very good description of what the author
meant. The term does get used more loosely though, I the sense of "its
confusing."

> 
>> To say that something is "surprising", on the other hand, means that it
>> sucks, as in "Java is full of surprises." My God, I just insulted the
>> Javaphiles here.
> 
> There either the empty set, or surprisingly tolerant for Javaphiles.
> No one's taken offence to my .sig yet.

There probably aren't many here.

> I'm not quite sure what Java surprises you have in mind anyway -- the
> language was designed to be comfortable for the average programmer,
> so surprises have been kept to a minimum.

I think that's a large part of the problem for the many people who, like me,
find using java to be about as comfortable as as a lower GI. It looks like
other languages which are very popular but it acts like Java. One is always
stubbing one's toe on the fact that some built-in/standard library types are
first class objects and others aren't, that you have to remember to cast an
object back to what it is just because you took it out of a container, an
other small annoyances. That and the fact that the GC would notoriously
break just about when your project was getting up to real size are the big
issues.

I could go on about what's wrong with Java but it's all been said before.

> OTOH Lisp has lots of surprises -- but most certainly doesn't suck.

AFAICT, Lisp doesn't have *any* surprises in the sense that I mean. By no
surprises I simply mean that it is possible to develop an intuition for how
the language works and then think through the language to the problem domain
rather than thinking about the language. I'm pretty confident that I can do
that with Lisp.

Fortran may be a clunky languages but it does embody a consistent vision of
what a program is and the user can start thinking in Fortran instead of
thinking about what she is trying to do and having to translate her ideas
into Fortran. For me, anyway, the same applies to C++, Ruby, Smalltalk, C,
ObjC and FORTH. But I never got there in Pascal or Java even though I have
written a fair amount of both. I try to think through the language to what I
am trying to do but the mechanics of the language start intruding.

This may be a very idiosyncratic thing. I know some folks are very
comfortable in Java. I hope it made some kind of sense.



-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----==  Over 80,000 Newsgroups - 16 Different Servers! =-----
From: Kenny Tilton
Subject: Re: What's up with #'?
Date: 
Message-ID: <3DD9DB05.8060500@nyc.rr.com>
Chris Gehlker wrote:
> AFAICT, Lisp doesn't have *any* surprises in the sense that I mean. 

At pain of repeating what I just said elsewhere, that was a striking 
feature of Lisp early on, and I think it may well have been something I 
saw in a famous quotation about Lisp, something to the effect that when 
I looked up some function wondering how it treated its parameters, it 
somehow always turned out that the function worked just as I hoped.

This happened so often that I came to trust the designers of Lisp, and 
when a function did /not/ work the way I expected, I questioned my 
expectations.

-- 

  kenny tilton
  clinisys, inc
  ---------------------------------------------------------------
""Well, I've wrestled with reality for thirty-five years, Doctor,
   and I'm happy to state I finally won out over it.""
                                                   Elwood P. Dowd
From: Erik Naggum
Subject: Re: What's up with #'?
Date: 
Message-ID: <3246668432064986@naggum.no>
* Donald Fisk
| No one's taken offence to my .sig yet.

  That could be because it is so horribly formatted as to be better ignored
  than read.  With line breaks like that, people need a lot of goodwill up
  front even to bother with the text.  For your benefit, it has been quoted
  as it appears to everyone else, verbatim:

| -- 
| Dalinian: Lisp. Java. Which one sounds sexier?
| RevAaron: Definitely Lisp. Lisp conjures up images of hippy coders,
| drugs,
| sex, and rock & roll. Late nights at Berkeley, coding in Lisp fueled by
| LSD.
| Java evokes a vision of a stereotypical nerd, with no life or social
| skills.
| 

-- 
Erik Naggum, Oslo, Norway

Act from reason, and failure makes you rethink and study harder.
Act from faith, and failure makes you blame someone and push harder.
From: Donald Fisk
Subject: Re: What's up with #'?
Date: 
Message-ID: <3DDA927F.9D41F93A@enterprise.net>
Erik Naggum wrote:
> 
> * Donald Fisk
> | No one's taken offence to my .sig yet.
> 
>   That could be because it is so horribly formatted as to be better ignored
>   than read.

Netscape does that.

> Erik Naggum, Oslo, Norway

Fixed, I think.   Now someone will complain it's too long.

Le Hibou
-- 
Dalinian: Lisp. Java. Which one sounds sexier?
RevAaron: Definitely Lisp. Lisp conjures up images of hippy coders,
drugs, sex, and rock & roll. Late nights at Berkeley, coding in
Lisp fueled by LSD.   Java evokes a vision of a stereotypical nerd,
with no life or social skills.
From: Nils Goesche
Subject: Re: What's up with #'?
Date: 
Message-ID: <87of8p75vy.fsf@darkstar.cartan>
Chris Gehlker <·······@fastq.com> writes:

> Let me ask, with all due humility as a very newbie, if anyone
> else thinks #' is a code smell? If it is a code smell, is it
> *supposed* to be in the sense that C++ has things in it that
> stink by design?

#' is needed because of a quite deliberate decision to use
different namespaces for functions and variables, not an
accident.  Once you understand that you'll immediately see that
it doesn't ``stink�� at all.

Regards,
-- 
Nils G�sche
Ask not for whom the <CONTROL-G> tolls.

PGP key ID #xD26EF2A0
From: Chris Gehlker
Subject: Re: What's up with #'?
Date: 
Message-ID: <B9FBE40F.23583%gehlker@fastq.com>
On 11/16/02 10:59 AM, in article ··············@darkstar.cartan, "Nils
Goesche" <···@cartan.de> wrote:

> Chris Gehlker <·······@fastq.com> writes:
> 
>> Let me ask, with all due humility as a very newbie, if anyone
>> else thinks #' is a code smell? If it is a code smell, is it
>> *supposed* to be in the sense that C++ has things in it that
>> stink by design?
> 
> #' is needed because of a quite deliberate decision to use
> different namespaces for functions and variables, not an
> accident.  Once you understand that you'll immediately see that
> it doesn't ``stink�� at all.
> 
> Regards,


Thanks Nils and everyone else who responded. Given that functions are in a
separate namespace, #' does make sense. Now what still has a whiff about it,
for me is compile. Here's why:

[1]> (setq test 8)
8
[2]> test
8
[3]> (defun test (x)
       (+ x 8))
TEST
[4]> test    ; Really are separate namespaces
8
[5]> (test 3)
11
[6]> #'test
#<CLOSURE TEST (X) (DECLARE (SYSTEM::IN-DEFUN TEST))
        (BLOCK TEST (+ X 8))> ;cool
[7]> (compiled-function-p #'test)
NIL
[8]> (compiled-function-p 'test)
NIL
[9]> (compiled-function-p test)
NIL
[10]> (compile #'test) ;; Huh!? Why didn't this work?

*** - Name of function to be compiled must be a symbol, not #<CLOSURE TEST
(X) (DECLARE (SYSTEM::IN-DEFUN TEST)) (BLOCK TEST (+ X 8))>

1. Break [11]> (compile 'test) ; And why *did* this work? 'test is just 4
letters

TEST ;             
NIL ;              
NIL
1. Break [11]> (compiled-function-p #'test)
T

So, is compile the only function that "works" this way?



-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----==  Over 80,000 Newsgroups - 16 Different Servers! =-----
From: Oleg
Subject: Re: What's up with #'?
Date: 
Message-ID: <ar66m4$fkf$1@newsmaster.cc.columbia.edu>
Chris Gehlker wrote:

> On 11/16/02 10:59 AM, in article ··············@darkstar.cartan, "Nils
> Goesche" <···@cartan.de> wrote:
> 
>> Chris Gehlker <·······@fastq.com> writes:
>> 
>>> Let me ask, with all due humility as a very newbie, if anyone
>>> else thinks #' is a code smell? If it is a code smell, is it
>>> *supposed* to be in the sense that C++ has things in it that
>>> stink by design?
>> 
>> #' is needed because of a quite deliberate decision to use
>> different namespaces for functions and variables, not an
>> accident.  Once you understand that you'll immediately see that
>> it doesn't ``stink�� at all.
>> 
>> Regards,
> 
> 
> Thanks Nils and everyone else who responded. Given that functions are in a
> separate namespace, #' does make sense. Now what still has a whiff about
> it, for me is compile. Here's why:
> 
> [1]> (setq test 8)
> 8
> [2]> test
> 8
> [3]> (defun test (x)
>        (+ x 8))
> TEST
> [4]> test    ; Really are separate namespaces
> 8
> [5]> (test 3)
> 11
> [6]> #'test
> #<CLOSURE TEST (X) (DECLARE (SYSTEM::IN-DEFUN TEST))
>         (BLOCK TEST (+ X 8))> ;cool
> [7]> (compiled-function-p #'test)
> NIL
> [8]> (compiled-function-p 'test)
> NIL
> [9]> (compiled-function-p test)
> NIL
> [10]> (compile #'test) ;; Huh!? Why didn't this work?
> 
> *** - Name of function to be compiled must be a symbol, not #<CLOSURE TEST
> (X) (DECLARE (SYSTEM::IN-DEFUN TEST)) (BLOCK TEST (+ X 8))>
> 
> 1. Break [11]> (compile 'test) ; And why *did* this work? 'test is just 4
> letters
> 
> TEST ;
> NIL ;
> NIL
> 1. Break [11]> (compiled-function-p #'test)
> T
> 
> So, is compile the only function that "works" this way?
> 

Do (inspect 'test) do get an idea of what Lisp creators meant by all this.

So 'test is a symbol that has a value (binding) as a regular value (sic), 
and a value as a function:

'test - neither 8, nor your function
test - value 8
#'test - the function you defined

I agree with you that it's a bit confusing, and I suspect that the reason 
for all this confusion is that people who created Lisp entertained ideas 
that one day people would write programs in Lisp that would write even 
smarter programs in Lisp that would write even smarter programs in Lisp ... 
That's why they went into all this trouble ;-)

Oleg
From: Chris Gehlker
Subject: Re: What's up with #'?
Date: 
Message-ID: <B9FBFE7D.235A0%gehlker@fastq.com>
On 11/16/02 12:35 PM, in article ············@newsmaster.cc.columbia.edu,
"Oleg" <············@myrealbox.com> wrote:

> Do (inspect 'test) do get an idea of what Lisp creators meant by all this.

That's way cool! I even understood most of the output, dimly, except for the
array reference at the end.
> 
> So 'test is a symbol that has a value (binding) as a regular value (sic),
> and a value as a function:
> 
> 'test - neither 8, nor your function
> test - value 8
> #'test - the function you defined
> 
> I agree with you that it's a bit confusing, and I suspect that the reason
> for all this confusion is that people who created Lisp entertained ideas
> that one day people would write programs in Lisp that would write even
> smarter programs in Lisp that would write even smarter programs in Lisp ...
> That's why they went into all this trouble ;-)

I believe you. However it already seems to me that one of the best kept
secrets about Lisp is that it's just kick-ass fun. I expected a lot of
things but not that.



-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----==  Over 80,000 Newsgroups - 16 Different Servers! =-----
From: Kenny Tilton
Subject: Re: What's up with #'?
Date: 
Message-ID: <3DD6C17B.5020505@nyc.rr.com>
Chris Gehlker wrote:
> I believe you. However it already seems to me that one of the best kept
> secrets about Lisp is that it's just kick-ass fun. I expected a lot of
> things but not that.

Years ago after I bought MCLs for my little team seated in separate 
areas, we spent the first week taking turns running into each others' 
space yelling "Have you seen this?!!" and then typing some form into 
each others' listeners. Heady days I'll never forget.

Then I did grab On Lisp (just out I think). The preface was
the best part, since I knew anyway i would be creating
my own embedded language, and he goes into that

-- 

  kenny tilton
  clinisys, inc
  ---------------------------------------------------------------
""Well, I've wrestled with reality for thirty-five years, Doctor,
   and I'm happy to state I finally won out over it.""
                                                   Elwood P. Dowd
From: Henrik Motakef
Subject: Re: What's up with #'?
Date: 
Message-ID: <87ptt5b3xg.fsf@pokey.henrik-motakef.de>
Chris Gehlker <·······@fastq.com> writes:

> On 11/16/02 12:35 PM, in article ············@newsmaster.cc.columbia.edu,
> "Oleg" <············@myrealbox.com> wrote:
> 
>> Do (inspect 'test) do get an idea of what Lisp creators meant by all this.
> 
> That's way cool! I even understood most of the output, dimly, except for the
> array reference at the end.

If you like this, you might also want to try DESCRIBE, DOCUMENTATION
and APROPOS. 

> I believe you. However it already seems to me that one of the best kept
> secrets about Lisp is that it's just kick-ass fun. I expected a lot of
> things but not that.

:-) So true...

Regards
Henrik
From: Chris Gehlker
Subject: Re: What's up with #'?
Date: 
Message-ID: <B9FC5472.235C7%gehlker@fastq.com>
On 11/16/02 2:27 PM, in article ··············@pokey.henrik-motakef.de,
"Henrik Motakef" <··············@web.de> wrote:

> Chris Gehlker <·······@fastq.com> writes:
> 
>> On 11/16/02 12:35 PM, in article ············@newsmaster.cc.columbia.edu,
>> "Oleg" <············@myrealbox.com> wrote:
>> 
>>> Do (inspect 'test) do get an idea of what Lisp creators meant by all this.
>> 
>> That's way cool! I even understood most of the output, dimly, except for the
>> array reference at the end.
> 
> If you like this, you might also want to try DESCRIBE, DOCUMENTATION
> and APROPOS.

These are so useful that I wonder why the little file called "Lisp-Tutorial"
that comes with CLISP didn't mention them. I'll post a note on the CLISP
site suggesting an addition to the file.



-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----==  Over 80,000 Newsgroups - 16 Different Servers! =-----
From: Daniel Barlow
Subject: Re: What's up with #'?
Date: 
Message-ID: <877kfdi004.fsf@noetbook.telent.net>
Henrik Motakef <··············@web.de> writes:

> Chris Gehlker <·······@fastq.com> writes:
>> That's way cool! I even understood most of the output, dimly, except for the
>> array reference at the end.
>
> If you like this, you might also want to try DESCRIBE, DOCUMENTATION
> and APROPOS. 

And DISASSEMBLE

Unless you're called Johnny 5, anyway


-dan

-- 

  http://ww.telent.net/cliki/ - Link farm for free CL-on-Unix resources 
From: Christopher C. Stacy
Subject: Re: What's up with #'?
Date: 
Message-ID: <ufzu18g8w.fsf@dtpq.com>
COMPILE takes as its argument the name of a function.
COMPILE does not take a function object.

FUNCTION takes as its argument the name of a function,
and returns the function object.
From: Nils Goesche
Subject: Re: What's up with #'?
Date: 
Message-ID: <871y5l71if.fsf@darkstar.cartan>
Chris Gehlker <·······@fastq.com> writes:

> Now what still has a whiff about it, for me is compile. Here's
> why:
> 
> [6]> #'test
> #<CLOSURE TEST (X) (DECLARE (SYSTEM::IN-DEFUN TEST))
>         (BLOCK TEST (+ X 8))> ;cool
> [7]> (compiled-function-p #'test)
> NIL
> [8]> (compiled-function-p 'test)
> NIL
> [9]> (compiled-function-p test)
> NIL
> [10]> (compile #'test) ;; Huh!? Why didn't this work?
> 
> *** - Name of function to be compiled must be a symbol, not
> #<CLOSURE TEST (X) (DECLARE (SYSTEM::IN-DEFUN TEST)) (BLOCK
> TEST (+ X 8))>
> 
> 1. Break [11]> (compile 'test) ; And why *did* this work? 'test
> is just 4 letters

No, TEST is a symbol.  Whenever you have a question like this you
can easily find the answer by looking it up in the HyperSpec.  In
this case:

http://www.lispworks.com/reference/HyperSpec/Body/f_cmp.htm

Look what COMPILE expects as argument.  Same with
COMPILED-FUNCTION-P, which is described at

http://www.lispworks.com/reference/HyperSpec/Body/f_cmpd_f.htm

> So, is compile the only function that "works" this way?

I am not sure what you mean.

Regards,
-- 
Nils G�sche
Ask not for whom the <CONTROL-G> tolls.

PGP key ID #xD26EF2A0
From: Chris Gehlker
Subject: Re: What's up with #'?
Date: 
Message-ID: <B9FBF3BE.23594%gehlker@fastq.com>
On 11/16/02 12:33 PM, in article ··············@darkstar.cartan, "Nils
Goesche" <···@cartan.de> wrote:

I wrote the >> stuff.

>> 1. Break [11]> (compile 'test) ; And why *did* this work? 'test
>> is just 4 letters
> 
> No, TEST is a symbol.

Help. Don't you mean "'TEST" is a symbol? What do you call "TEST"?

> Whenever you have a question like this you
> can easily find the answer by looking it up in the HyperSpec.  In
> this case:
> 
> http://www.lispworks.com/reference/HyperSpec/Body/f_cmp.htm

This is great! Thanks.
> 
> Look what COMPILE expects as argument.  Same with
> COMPILED-FUNCTION-P, which is described at
> 
> http://www.lispworks.com/reference/HyperSpec/Body/f_cmpd_f.htm
> 
>> So, is compile the only function that "works" this way?
> 
> I am not sure what you mean.

Now that you've shown me this great reference, I can formulate the question
in a more meaningful way. I can see by the hyperspeck that the argument to
COMPILE is a function name and the argument to COMPILED-FUNCTION-P is an
object. I assume that there is some underlying rationale for choosing the
argument types for functions and that an experienced Lisp programmer will
know, or at least be able to guess most of the time, what argument is
appropriate for any given function. How does one develop such intuition?



-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----==  Over 80,000 Newsgroups - 16 Different Servers! =-----
From: Kenny Tilton
Subject: Re: What's up with #'?
Date: 
Message-ID: <3DD6AA3E.90004@nyc.rr.com>
Chris Gehlker wrote:
> On 11/16/02 12:33 PM, in article ··············@darkstar.cartan, "Nils
> Goesche" <···@cartan.de> wrote:
> 
> I wrote the >> stuff.
> 
> 
>>>1. Break [11]> (compile 'test) ; And why *did* this work? 'test
>>>is just 4 letters
>>
>>No, TEST is a symbol.
> 
> 
> Help. Don't you mean "'TEST" is a symbol? What do you call "TEST"?

That's a string. You /really/ need to slow down a little. :) In Lisp we 
usually work with symbols (and they're great).

> Now that you've shown me this great reference, I can formulate the question
> in a more meaningful way. I can see by the hyperspeck that the argument to
> COMPILE is a function name and the argument to COMPILED-FUNCTION-P is an
> object. I assume that there is some underlying rationale for choosing the
> argument types for functions and that an experienced Lisp programmer will
> know, or at least be able to guess most of the time, what argument is
> appropriate for any given function. How does one develop such intuition?

I wouldn't worry about it until I knew the language better, the issue 
might just go away for you. Bu it is a problem sometimes. make-instance 
will accept the name of a class or the class itself:

   (make-instance 'my-class) or (make-instance (find-class 'my-class))

That's just being friendly. But many other functions taking a class as 
an argument won't let you slide with just the symbolic name, you have 
to: (class-whatever (find-class 'my-class)). Those functions are more 
internal-y, so you usually do have the class instance itself at hand, so 
no one bothered to toss in a friendly alternative.


-- 

  kenny tilton
  clinisys, inc
  ---------------------------------------------------------------
""Well, I've wrestled with reality for thirty-five years, Doctor,
   and I'm happy to state I finally won out over it.""
                                                   Elwood P. Dowd
From: Chris Gehlker
Subject: Re: What's up with #'?
Date: 
Message-ID: <B9FC0452.235A2%gehlker@fastq.com>
On 11/16/02 1:24 PM, in article ··············@nyc.rr.com, "Kenny Tilton"
<·······@nyc.rr.com> wrote:

> 
> That's a string. You /really/ need to slow down a little. :)

Point taken.
>In Lisp we 
> usually work with symbols (and they're great).
> 
>> Now that you've shown me this great reference, I can formulate the question
>> in a more meaningful way. I can see by the hyperspeck that the argument to
>> COMPILE is a function name and the argument to COMPILED-FUNCTION-P is an
>> object. I assume that there is some underlying rationale for choosing the
>> argument types for functions and that an experienced Lisp programmer will
>> know, or at least be able to guess most of the time, what argument is
>> appropriate for any given function. How does one develop such intuition?
> 
> I wouldn't worry about it until I knew the language better, the issue
> might just go away for you. Bu it is a problem sometimes. make-instance
> will accept the name of a class or the class itself:
> 
>  (make-instance 'my-class) or (make-instance (find-class 'my-class))
> 
> That's just being friendly. But many other functions taking a class as
> an argument won't let you slide with just the symbolic name, you have
> to: (class-whatever (find-class 'my-class)). Those functions are more
> internal-y, so you usually do have the class instance itself at hand, so
> no one bothered to toss in a friendly alternative.
> 

I will try to be patient. A kind fellow suggested that the way to learn this
language was to read "On Lisp" by Paul Graham. It does provide a good
overview but he glosses over some points or presents them without
motivation. It's as if he expected that this would be everyone's *second*
Lisp book. So I get frustrated at my lack of understanding and run here for
help. Everyone gives it too, which is great.



-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----==  Over 80,000 Newsgroups - 16 Different Servers! =-----
From: Thomas F. Burdick
Subject: Re: What's up with #'?
Date: 
Message-ID: <xcvisyxgds7.fsf@apocalypse.OCF.Berkeley.EDU>
Chris Gehlker <·······@fastq.com> writes:

> I will try to be patient. A kind fellow suggested that the way to learn this
> language was to read "On Lisp" by Paul Graham. It does provide a good
> overview but he glosses over some points or presents them without
> motivation. It's as if he expected that this would be everyone's *second*
> Lisp book. So I get frustrated at my lack of understanding and run here for
> help. Everyone gives it too, which is great.

I think it's best for people coming to CL from Scheme, but it's a
pretty good Lisp book generally.  However, if you'd read the preface,
you'd see that it *is* intended as a second book :)

-- 
           /|_     .-----------------------.                        
         ,'  .\  / | No to Imperialist war |                        
     ,--'    _,'   | Wage class war!       |                        
    /       /      `-----------------------'                        
   (   -.  |                               
   |     ) |                               
  (`-.  '--.)                              
   `. )----'                               
From: Kenny Tilton
Subject: Re: What's up with #'?
Date: 
Message-ID: <3DD6BFE4.9050501@nyc.rr.com>
Chris Gehlker wrote:
>  It's as if he expected that this would be everyone's *second*
> Lisp book.

Oh yeah. I googled "lisp tutorial", found this:

  http://grimpeur.tamu.edu/~colin/lp/

Don't know if it's any good, tho. there's also http://www.alu.org as a 
jumping-off point for other resources.

And if you are near New York City, drop by the first meeting of ILUG-NY 
next week.

-- 

  kenny tilton
  clinisys, inc
  ---------------------------------------------------------------
""Well, I've wrestled with reality for thirty-five years, Doctor,
   and I'm happy to state I finally won out over it.""
                                                   Elwood P. Dowd
From: Chris Gehlker
Subject: Re: What's up with #'?
Date: 
Message-ID: <B9FC5607.235C9%gehlker@fastq.com>
On 11/16/02 2:56 PM, in article ················@nyc.rr.com, "Kenny Tilton"
<·······@nyc.rr.com> wrote:

> 
> 
> Chris Gehlker wrote:
>>  It's as if he expected that this would be everyone's *second*
>> Lisp book.
> 
> Oh yeah. I googled "lisp tutorial", found this:
> 
> http://grimpeur.tamu.edu/~colin/lp/

I did work through that one before attempting the Graham book. I found it
very helpful as far as it went. From internal evidence though, I think the
authors either intended to add more or are adding more as time permits.

It did give me a real sense of how much fun CL is so I would recommend it to
other newbies. It just stopped before I really learned enough to attempt a
serious program.



-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----==  Over 80,000 Newsgroups - 16 Different Servers! =-----
From: Nils Goesche
Subject: Re: What's up with #'?
Date: 
Message-ID: <87k7jd5hsk.fsf@darkstar.cartan>
Chris Gehlker <·······@fastq.com> writes:

> I will try to be patient. A kind fellow suggested that the way
> to learn this language was to read "On Lisp" by Paul Graham. It
> does provide a good overview but he glosses over some points or
> presents them without motivation. It's as if he expected that
> this would be everyone's *second* Lisp book.

Well, it's subtitled ``Advanced techniques for Common Lisp�� for
a reason :-)  He also wrote a ``first�� book:

  http://makeashorterlink.com/?U2D012972

> So I get frustrated at my lack of understanding and run here
> for help.

Just be patient.  Nobody got it all at once.

Regards,
-- 
Nils G�sche
Ask not for whom the <CONTROL-G> tolls.

PGP key ID #xD26EF2A0
From: Chris Gehlker
Subject: Re: What's up with #'?
Date: 
Message-ID: <B9FC4FD4.235C5%gehlker@fastq.com>
On 11/16/02 2:24 PM, in article ··············@darkstar.cartan, "Nils
Goesche" <···@cartan.de> wrote:

> Well, it's subtitled ``Advanced techniques for Common Lisp�� for
> a reason :-)  He also wrote a ``first�� book:
> 
> http://makeashorterlink.com/?U2D012972

Great. I ordered it.
> 
>> So I get frustrated at my lack of understanding and run here
>> for help.
> 
> Just be patient.  Nobody got it all at once.



-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----==  Over 80,000 Newsgroups - 16 Different Servers! =-----
From: Nils Goesche
Subject: Re: What's up with #'?
Date: 
Message-ID: <873cq06f0o.fsf@darkstar.cartan>
Chris Gehlker <·······@fastq.com> writes:

> On 11/16/02 2:24 PM, in article ··············@darkstar.cartan, "Nils
> Goesche" <···@cartan.de> wrote:
> 
> > Well, it's subtitled ``Advanced techniques for Common Lisp��
> > for a reason :-) He also wrote a ``first�� book:
> > 
> > http://makeashorterlink.com/?U2D012972
> 
> Great. I ordered it.

Oops, I only mentioned that for completeness, not as a
recommendation.  But the book certainly isn't bad.  It was /my/
first Lisp book, BTW (apart from a book on Emacs Lisp).  If you,
like me, don't mind simply buying a whole lot of books at once,
you should also get Stephen Slade's

http://www.amazon.com/exec/obidos/tg/detail/-/0136059406/qid=1037503675/sr=1-3/ref=sr_1_3/002-1754982-1253644?v=glance&s=books

Despite its strange title, it is just an ordinary introduction to
Common Lisp.  People have called it boring here before, myself
included; however I think now that this is not fair: Its /prose/,
for one thing, isn't boring at all -- it is very entertaining
(and its quotations are real jewels).  Check out ``1.2 The
Religion of Lisp�� and you'll immediately better understand the
behavior of many people in this newsgroup (yours truly included).
Only its confusing title creates a wrong expectation among people
who already know Lisp -- they look for things they don't know
already and are disappointed if what they find is just -- an
introduction to Common Lisp.  That doesn't mean, however, that it
must be a boring introduction for beginners.  I like the way he
explains everything with lots of examples at the top-level.
Maybe you'll like it, too.

Regards,
-- 
Nils G�sche
Ask not for whom the <CONTROL-G> tolls.

PGP key ID #xD26EF2A0
From: Chris Gehlker
Subject: Re: What's up with #'?
Date: 
Message-ID: <B9FC71BA.235D6%gehlker@fastq.com>
On 11/16/02 8:39 PM, in article ··············@darkstar.cartan, "Nils
Goesche" <···@cartan.de> wrote:

> Chris Gehlker <·······@fastq.com> writes:
> 
>> On 11/16/02 2:24 PM, in article ··············@darkstar.cartan, "Nils
>> Goesche" <···@cartan.de> wrote:
>> 
>>> Well, it's subtitled ``Advanced techniques for Common Lisp��
>>> for a reason :-) He also wrote a ``first�� book:
>>> 
>>> http://makeashorterlink.com/?U2D012972
>> 
>> Great. I ordered it.
> 
> Oops, I only mentioned that for completeness, not as a
> recommendation.
It's good to have some kind or recommendation. Besides, the reviews were
very positive and my wife was turning in an order anyway. The tutorial file
that comes with CLISP only mentions CLtL2 but that seems to be a reference
rather than an introduction. I mentioned before that the site is down but it
turns out the French mirror is up. It really does look like a reference, not
a tutorial.


> But the book certainly isn't bad.  It was /my/
> first Lisp book, BTW (apart from a book on Emacs Lisp).  If you,
> like me, don't mind simply buying a whole lot of books at once,
> you should also get Stephen Slade's
> 
> http://www.amazon.com/exec/obidos/tg/detail/-/0136059406/qid=1037503675/sr=1-3
> /ref=sr_1_3/002-1754982-1253644?v=glance&s=books

I was able to add that to the order since it hadn't shipped yet.

Thanks again.



-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----==  Over 80,000 Newsgroups - 16 Different Servers! =-----
From: Thomas A. Russ
Subject: Re: What's up with #'?
Date: 
Message-ID: <ymibs4la1k2.fsf@sevak.isi.edu>
Chris Gehlker wrote:

> Now that you've shown me this great reference, I can formulate the question
> in a more meaningful way. I can see by the hyperspeck that the argument to
> COMPILE is a function name and the argument to COMPILED-FUNCTION-P is an
> object. I assume that there is some underlying rationale for choosing the
> argument types for functions and that an experienced Lisp programmer will
> know, or at least be able to guess most of the time, what argument is
> appropriate for any given function. How does one develop such intuition?

Some of this is just exposure to the language.  You learn what arguments
make sense for which functions.

For the case of COMPILE, the reason it wants the name of the function as
its first argument rather than the function object has to do with
providing a convenient service for the user.  If you just hand COMPILE
the function object associated with a name, then the COMPILE function
can't replace the uncompiled function with its compiled version.  That
is because the function object exists independently of the name.  This
latter point is something that is not common in other programming
languages.  [Yes, they often have pointers to functions, but
manipulation of function objects is much more of an esoteric thing to do
in those languages, while it isn't all that uncommon in lisp.]

There is (as Duane Rettig points out in another post) an optional second
argument to COMPILE which is a function object.  In that case the result
of compilation is fbound to the first argument (unless that first
argument is NIL, in which case the compiled function is returned).

What does this mean operationally?  Well it means that if you were
to do something like

(defun foo (x) (* x x))

you could get similar results from either of the following forms:

(compile 'foo)
(setf (symbol-function 'foo) (compile nil #'foo))

You could also do an end run around DEFUN entirely and do

(setf (symbol-function 'foo) (compile nil #'(lambda (x) (* x x))))

or more simply

(compile 'foo #'(lambda (x) (* x x)))

;;;

Now, this is all a bit esoteric for most new users, since generally one
doesn't call COMPILE all that much.  Normally one would write the
functions in a file using a text editor and then compile the file (using
COMPILE-FILE) and load the result (using LOAD).  For convenience, the
COMPILE-FILE function returns the name of the compiled file, so you can
just do

	(load (compile-file "my-lisp-file.lisp"))

and have the compiled coded loaded.

-- 
Thomas A. Russ,  USC/Information Sciences Institute          ···@isi.edu    
From: Erik Naggum
Subject: Re: What's up with #'?
Date: 
Message-ID: <3246470223792143@naggum.no>
* Chris Gehlker
| How does one develop such intuition?

  By actually being humble and showing real humility before the great task
  of learning, which in practice means a higher affinity for listening than
  for pronouncing opinions.  Ask questions to learn something specific and
  be open to surprises and all kinds of answers.  Stay focused on learning.
  The stronger you feel a need to make pronouncements, the longer it takes.
  The more you are willing to accept that other people know more about it
  than you do, the shorter it generally takes to learn it.  You did well to
  notice that we do not use "smell" in this newsgroup and backed off, which
  tells me that you easily accept corrections to your assumptions, it just
  needs to be applied a little more widely.  As long as you want to learn
  and make comments that exhibit your willingness to respect the very long
  history of the language and see ways to solve your problems rather than
  ways to create problems.  This actually applies to all programming, but
  for some reason, programming attracts people who have strong opinions on
  just about everything.  The key is to make them have strong opinions on
  things that matter, which is sometimes hard when they are busy having
  strong opinions on things that do not matter.

-- 
Erik Naggum, Oslo, Norway

Act from reason, and failure makes you rethink and study harder.
Act from faith, and failure makes you blame someone and push harder.
From: Nils Goesche
Subject: Re: What's up with #'?
Date: 
Message-ID: <87smy15jtr.fsf@darkstar.cartan>
Chris Gehlker <·······@fastq.com> writes:

> On 11/16/02 12:33 PM, in article ··············@darkstar.cartan, "Nils
> Goesche" <···@cartan.de> wrote:
> 
> I wrote the >> stuff.
> 
> >> 1. Break [11]> (compile 'test) ; And why *did* this work? 'test
> >> is just 4 letters
> > 
> > No, TEST is a symbol.
> 
> Help. Don't you mean "'TEST" is a symbol? What do you call
> "TEST"?

"TEST" would be a string :-)  I am calling the symbol by its
name, as it is printed:

CL-USER 28 > (print 'test)

TEST 
TEST

Lisp's builtin parser, the so-called `reader�, also recognizes it
by that name:

CL-USER 31 > (read-from-string "TEST")
TEST
4

CL-USER 32 > (format t "~&Got ~S" (read))
TEST     ; <- I typed this in at the terminal
Got TEST
NIL

Now look what it gets if you pass it 'test instead:

CL-USER 33 > (format t "~&Got ~S" (read))
'test
Got (QUOTE TEST)
NIL

' is actually a read macro -- it transforms ``'test�� into
(QUOTE TEST) already while parsing (``at read time��).  You only
have to quote TEST if you want to prevent it from being
evaluated.  (foo test) will evaluate TEST and look for the value
of the variable named by TEST.  If you don't want that you quote
it as in (foo (quote test)).  (foo 'test) is just a handy
abbreviation for this.  We also have

CL-USER 34 > (symbol-name 'test)
"TEST"

which returns TEST's name as a string.

> > http://www.lispworks.com/reference/HyperSpec/Body/f_cmp.htm
> 
> This is great! Thanks.

You can also download the whole thing at

  http://www.lispworks.com/reference/HyperSpec/

> >> So, is compile the only function that "works" this way?
> > 
> > I am not sure what you mean.
> 
> Now that you've shown me this great reference, I can formulate
> the question in a more meaningful way. I can see by the
> hyperspeck that the argument to COMPILE is a function name and
> the argument to COMPILED-FUNCTION-P is an object. I assume that
> there is some underlying rationale for choosing the argument
> types for functions and that an experienced Lisp programmer
> will know, or at least be able to guess most of the time, what
> argument is appropriate for any given function. How does one
> develop such intuition?

I don't know; I think it is quite intuitive as it is.  Stuff like
COMPILED-FUNCTION-P, like, say, CONSP or SYMBOLP all get an
arbitrary object (and check its type).  If COMPILE accepted an
arbitrary function, it would have to be able to retrieve its
definition somehow just from the function itself; that would be
somewhat strange; so it gets the /name/ of a function instead.

Regards,
-- 
Nils G�sche
Ask not for whom the <CONTROL-G> tolls.

PGP key ID #xD26EF2A0
From: Duane Rettig
Subject: Re: What's up with #'?
Date: 
Message-ID: <44rah6l2q.fsf@beta.franz.com>
Nils Goesche <···@cartan.de> writes:

>          If COMPILE accepted an
> arbitrary function, it would have to be able to retrieve its
> definition somehow just from the function itself; that would be
> somewhat strange; so it gets the /name/ of a function instead.

Huh?  Sending a function object to compile is perfectly acceptable
(and intuitive, to me):

CL-USER(1): (defun test (x)
       (+ x 8))
TEST
CL-USER(2): (test 10)
18
CL-USER(3): (compiled-function-p #'test)
NIL
CL-USER(4): (compile nil #'test)
#<Function (:ANONYMOUS-LAMBDA 0) @ #x716180fa>
NIL
NIL
CL-USER(5): (funcall * 10)
18
CL-USER(6): (compiled-function-p **)
T
CL-USER(7): (compiled-function-p #'test)
NIL
CL-USER(8): 

-- 
Duane Rettig    ·····@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   
From: Nils Goesche
Subject: Re: What's up with #'?
Date: 
Message-ID: <877kfc6fsx.fsf@darkstar.cartan>
Duane Rettig <·····@franz.com> writes:

> Nils Goesche <···@cartan.de> writes:
> 
> > If COMPILE accepted an arbitrary function, it would have to
> > be able to retrieve its definition somehow just from the
> > function itself; that would be somewhat strange; so it gets
> > the /name/ of a function instead.
> 
> Huh?  Sending a function object to compile is perfectly acceptable
> (and intuitive, to me):

> CL-USER(4): (compile nil #'test)

Ok.  Call my ``intuition�� old-fashioned, then ;-)

Regards,
-- 
Nils G�sche
Ask not for whom the <CONTROL-G> tolls.

PGP key ID #xD26EF2A0
From: Tim Bradshaw
Subject: Re: What's up with #'?
Date: 
Message-ID: <ey3isywqw8v.fsf@cley.com>
* Duane Rettig wrote:

> Huh?  Sending a function object to compile is perfectly acceptable
> (and intuitive, to me):

Well, one thing that occurred to me is what passing a function object
should do.  If COMPILE took functions (other than in the two-argument
case), then what should this do?

    (defun foo (x)
      x)

    (compile (symbol-function 'foo))

    (compiled-function-p (symbol-function 'foo))

In order for this to `work' - for the call to COMPILED-FUNCTION-P to
return T, then either the function object needs to point back at the
symbol(s) whose SYMBOL-FUNCTION it is, or COMPILE needs to
destructively alter the function object (changing its type), rather
than making a new one.  Those seem to me to be unreasonable
requirements.  So to make this work, you give COMPILE the *name* of
the function, which allows a far simpler implementation - it just
needs to compile the function object, and then store it back into the
symbol's function definition.

--tim
From: Coby Beck
Subject: Re: What's up with #'?
Date: 
Message-ID: <ar7i5v$2enc$1@otis.netspace.net.au>
"Chris Gehlker" <·······@fastq.com> wrote in message
···························@fastq.com...

> in a more meaningful way. I can see by the hyperspeck that
                                             ^^^^^^^^^^
I don't know why, but this struck me as one of the most amusing typos I have
seen in a long while!  (no offense Chris ;)

--
Coby Beck
(remove #\Space "coby 101 @ bigpond . com")
From: Gareth McCaughan
Subject: Re: What's up with #'?
Date: 
Message-ID: <slrnate86l.hlo.Gareth.McCaughan@g.local>
Chris Gehlker wrote:

>  Thanks Nils and everyone else who responded. Given that functions are in a
>  separate namespace, #' does make sense. Now what still has a whiff about it,
>  for me is compile. Here's why:
[SNIP: COMPILE gets passed the name of a function, not the function object]

There are two different things you might want COMPILE to do.

1. Accept a function and return a compiled version of it.
2. Make a particular symbol name a compiled version of whatever
   it currently names.

If COMPILE wanted just a function object and not a name,
#1 would work fine but #2 wouldn't. (You need to give it
the name somehow.)

If COMPILE were defined as a macro -- like, say, INCF --
so that you didn't have to notice that you were feeding it
a name, then #2 would work quite nicely: you'd say (COMPILE FOO),
like you say (INCF X) or (TRACE FOO). But #1 wouldn't work.

To get the best of both worlds, the designers of CL made
it work like this. COMPILE takes *two* arguments: a name
and a function object. It compiles the function object,
and associates it with the name. But (1) if the name is
NIL then it doesn't do the "associates it with the name"
bit, and (2) the function object is an optional argument,
and if you omit it then the name's current function value
is used instead.

Thus, you say (COMPILE NIL (LAMBDA .....)) to make a new
compiled function. (Note: normally you don't need to do this.)
And you say (COMPILE FOO) to make sure that FOO names a
compiled function.

Now, the fact that almost all uses of COMPILE fall into
two categories, each of which declines to use one of
COMPILE's two arguments, is itself a (very slight)
"code smell". Perhaps it would have been better for
COMPILE to take just one argument, either a symbol
(to get effect #2) or a function object (to get effect #1).
It's not clear to me whether this would be an improvement.

-- 
Gareth McCaughan  ················@pobox.com
.sig under construc
From: Chris Gehlker
Subject: Re: What's up with #'?
Date: 
Message-ID: <B9FC7AE4.235DB%gehlker@fastq.com>
On 11/16/02 9:53 PM, in article ·······························@g.local,
"Gareth McCaughan" <················@pobox.com> wrote:

> Chris Gehlker wrote:
> 
>>  Thanks Nils and everyone else who responded. Given that functions are in a
>>  separate namespace, #' does make sense. Now what still has a whiff about it,
>>  for me is compile. Here's why:
> [SNIP: COMPILE gets passed the name of a function, not the function object]
> 
> There are two different things you might want COMPILE to do.
> 
> 1. Accept a function and return a compiled version of it.
> 2. Make a particular symbol name a compiled version of whatever
>  it currently names.

[snip good explanation of why COMPILE works as it does]

Thanks Gareth. I probably should have mentioned that, since the kind people
on this list pointed me at the HyperSpec, I noticed the optional argument to
COMPILE and a lot became clearer. In particular, compile works just as I
would have expected if you pass it nil, #'FunctionName.

> Now, the fact that almost all uses of COMPILE fall into
> two categories, each of which declines to use one of
> COMPILE's two arguments, is itself a (very slight)
> "code smell".

Agreed, in the sense that you have to look it up to understand it.

> Perhaps it would have been better for
> COMPILE to take just one argument, either a symbol
> (to get effect #2) or a function object (to get effect #1).
> It's not clear to me whether this would be an improvement.

I honestly don't see how it could be improved much. Having separate
COMPILE-FROM-OBJECT and COMPILE-FROM-NAME functions seems like overkill. If
you go down that road, *every* function with optional arguments would have
to somehow reveal that the options are there.



-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----==  Over 80,000 Newsgroups - 16 Different Servers! =-----