Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Why learn Lisp
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  Messages 76 - 100 of 118 - Collapse all  -  Translate all to Translated (View all originals) < Older  Newer >
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Hannah Schroeter  
View profile  
 More options Aug 27 2002, 8:25 am
Newsgroups: comp.lang.lisp
From: han...@schlund.de (Hannah Schroeter)
Date: 27 Aug 2002 12:03:31 GMT
Local: Tues, Aug 27 2002 8:03 am
Subject: Re: Why learn Lisp
Hello!

Tim Bradshaw  <t...@cley.com> wrote:

>* Alain Picard wrote:
>> Such information _is_ kept; it is in the symbol's name.
>No, it isn't.  What he wants is something like:
>(symbol-original-name 'Foo) -> "Foo"

(setf (readtable-case *readtable*) :preserve)

or

(setf (readtable-case *readtable*) :invert)

The latter is useful if you don't want to CRY OUT THE STANDARD
SYMBOL NAMES:

* (symbol-name 'foo)

"FOO"
* (symbol-name 'FOO)

"foo"
* (symbol-name 'Foo)

"Foo"

What would you refer to as original name in the case:

(mapcar #'symbol-original-name (list 'foo 'Foo 'FOO))

in your example, if you wanted to map 'foo, 'Foo and 'FOO to the
same symbol objects?

Kind regards,

Hannah.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ziv Caspi  
View profile  
 More options Aug 27 2002, 8:37 am
Newsgroups: comp.lang.lisp
From: zi...@netvision.net.il (Ziv Caspi)
Date: Tue, 27 Aug 2002 13:36:35 GMT
Local: Tues, Aug 27 2002 9:36 am
Subject: Re: Why learn Lisp
On Tue, 27 Aug 2002 07:02:32 +0000 (UTC), Kaz Kylheku
<k...@ashi.footprints.net> wrote:

[...]

>Cruft like semicolons and commas is largely replaced by whitespace.

Yes, that's the point. Commas, semicolons, parens, braces in C provide
a larger diversity than parens and whitespace alone. This makes it
more difficult to parse, much more difficult (if not impossible) to do
the type of things people use LISP macros for, etc. But it also makes
it easier on the human eye to read.

>> for ( i=0; i<10; i++ )
>>   for ( j=0; i<10; j++ )
>>     if (i==j)
>>       printf( "i=j\n" );
>>     else
>>       printf( "i not j\n" );

>In Lisp I can make a do-nested-times macro that will express the nested looping
>idiom concisely:

>  (do-nested-times ((i 10) (j 10))
>    ...)

>This would certainly be worth it if I had lots of such nested
>loops in the code.

I completely agree (here and elsewhere) that many C constructs can be
written much more concisely and cleanly in LISP. This is not the point
of the argument I'm making.

[...]

I don't understand your point. My example was meant to show that the
scope introduced when a variable is declared can be "hidden" in C/C++,
which makes it easier to read. The fact that sometimes you want to
terminate that scope early -- and so you must make it explicit --
doesn't go against my point.

>> In LISP, you either have to group all these declarations in a single
>> let-like expression (assuming the semantics of your algorithm allow

>In Lisp, you don't ``have to'' anything.

Of course. I made a bad choice of words. Your examples on the type of
syntax transformations one can do in LISP, however, don't contradict
my point, as far as I can see.

[...]


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Adam Warner  
View profile  
 More options Aug 27 2002, 9:36 am
Newsgroups: comp.lang.lisp
From: Adam Warner <use...@consulting.net.nz>
Date: Wed, 28 Aug 2002 01:35:59 +1200
Local: Tues, Aug 27 2002 9:35 am
Subject: Re: Why learn Lisp

I can assure you Hannah that Tim and I understand this. The :invert mode
still breaks code that contains non lowercase characters (you "shout" or
capitalise a function name anywhere and the code is broken). Moreover it
does exactly what I was proposing to avoid (the breaking of a lot of
legacy code).

I have no idea whether Tim thought the idea had any merit. I'm just glad
he and you got the point.

> What would you refer to as original name in the case:

> (mapcar #'symbol-original-name (list 'foo 'Foo 'FOO))

> in your example, if you wanted to map 'foo, 'Foo and 'FOO to the same
> symbol objects?

Ah. Thank you for exposing this nice mapping problem. You're a good
teacher. Perhaps the idea is already broken beyond repair. I would define
the original name as the last case information read by the reader for any
particular symbol at the time the expression is evaluated (but how would
this work for compiled code?)

The answer to your example would be ("FOO" "FOO" "FOO"). (list 'foo 'Foo
'FOO) is first evaluated. "foo" is first associated with the symbol FOO.
Then this is replaced with "Foo". Finally "FOO" is associated with the
symbol FOO. Mapping symbol-original-name onto a list of the same symbols
would lead to the same string being returned each time.

This would break all kinds of identity as (list (symbol-original-name
'foo) (symbol-original-name 'Foo) (symbol-original-name 'FOO)) would
return ("foo" "Foo" "FOO") compared to the mapcar example.

Another problem is that since case sensitive modes generate different
symbols then your example would generate ("foo" "Foo" "FOO") whenever a
case sensitive mode was in use.

Regards,
Adam


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Adam Warner  
View profile  
 More options Aug 27 2002, 10:06 am
Newsgroups: comp.lang.lisp
From: Adam Warner <use...@consulting.net.nz>
Date: Wed, 28 Aug 2002 02:06:26 +1200
Local: Tues, Aug 27 2002 10:06 am
Subject: Re: Why learn Lisp

Scratch that. A large and more satisfying simplification would be the
original text being associated with any individual symbol name the first
time it is met by the reader (perhaps until the associated text is
explicitly destroyed).

So (mapcar #'symbol-original-name (list 'foo 'Foo 'FOO)) would generate
("foo" "foo" "foo") because "foo" was first associated with the symbol
name FOO.

(list (symbol-original-name 'foo) (symbol-original-name 'Foo)
(symbol-original-name 'FOO)) would also generate ("foo" "foo" "foo")
because "foo" was associated with the symbol FOO the first time it was
read by the Lisp Reader.

There would still be a difference with case senstive reader modes--but
there is always a difference when symbols have a different case in case
sensitive reader modes.

The idea would seem to require the string information for each unique
symbol to be retained forever (unless explicitly destroyed).

Regards,
Adam


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Adam Warner  
View profile  
 More options Aug 27 2002, 10:10 am
Newsgroups: comp.lang.lisp
From: Adam Warner <use...@consulting.net.nz>
Date: Wed, 28 Aug 2002 02:10:15 +1200
Local: Tues, Aug 27 2002 10:10 am
Subject: Re: Why learn Lisp

Scratch that. A large and more satisfying simplification would be the
original text being associated with any individual symbol name the first
time it is met by the reader (perhaps until the associated text is
explicitly destroyed).

So (mapcar #'symbol-original-name (list 'foo 'Foo 'FOO)) would generate
("foo" "foo" "foo") because "foo" was first associated with the symbol
name FOO.

(list (symbol-original-name 'foo) (symbol-original-name 'Foo)
(symbol-original-name 'FOO)) would also generate ("foo" "foo" "foo")
because "foo" was associated with the symbol FOO the first time it was
read by the Lisp Reader.

There would still be a difference with case sensitive reader modes--but
there is always a difference in such modes when symbols differ by case.
Plus the functionality would be pointless.

The idea would seem to require the string information for each unique
symbol to be retained forever (unless explicitly destroyed).

Regards,
Adam


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "Recognizing accomplishment (was Re: Why learn Lisp)" by Paolo Amoroso
Paolo Amoroso  
View profile  
 More options Aug 27 2002, 11:48 am
Newsgroups: comp.lang.lisp
From: Paolo Amoroso <amor...@mclink.it>
Date: Tue, 27 Aug 2002 17:33:33 +0200
Local: Tues, Aug 27 2002 11:33 am
Subject: Re: Recognizing accomplishment (was Re: Why learn Lisp)
On 26 Aug 2002 17:02:34 -0700, Fred Gilham <gil...@snapdragon.csl.sri.com>
wrote:

> I've been thinking recently that Mike McDonald deserves kudos, and
> perhaps apotheosis, for his work on Free CLIM (aka McCLIM).  I know
> it's not finished yet, but IMHO it is usable by the adventurous.

> (This is not to minimize the contributions of others who worked on
> Free CLIM.  The whole thing is amazing to me.)

I second that. The flow of CVS commit logs is a refreshing breeze. Kudos to
the McCLIM team.

Paolo
--
EncyCMUCLopedia * Extensive collection of CMU Common Lisp documentation
http://www.paoloamoroso.it/ency/README


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "Why learn Lisp" by Kaz Kylheku
Kaz Kylheku  
View profile  
 More options Aug 27 2002, 12:27 pm
Newsgroups: comp.lang.lisp
From: k...@ashi.footprints.net (Kaz Kylheku)
Date: 27 Aug 2002 09:27:20 -0700
Local: Tues, Aug 27 2002 12:27 pm
Subject: Re: Why learn Lisp

zi...@netvision.net.il (Ziv Caspi) wrote in message <news:3d6aaf99.215956258@newsvr>...
> I both wrote LISP apps and read LISP apps
> for quite some time.

Was it Common Lisp? When was this? It must have been back in the
dark ages when the name of the language was still spelled in all
capitals.

> Your experience (and everybody else's on this newsgroup, apparently)
> might certainly be different. But for me, LISP was not the "last
> language" (to quote someone on this newsgroup) -- I switched to C++
> and later to C#.

You are on a path which will soon encounter Visual BASIC, COBOL and
Intercal, probably in that order. ;)

Anyway, it's clear that you didn't grok Lisp, if you still think
that Lisp sticks you with one way of expressing yourself that
you ``have to'' follow.

In the end, everyone deserves the tool they end up with.

> For me, LISP always had almost everything I wanted in
> a programming language (real macros, CG, edit-and-continue-debugging,

If you know what real macros are, why do you make stupid claims
about Lisp having a fixed syntax which forces you do to things one
way, such as to keep nesting deeper and deeper if you want to
introduce a series of lexical variables which refer to earlier
lexical variables, and have code interspersed in between?

It looks like you are cutting and pasting Lisp trivia from some
document to make it seem as if you actually know the language,
so that you could write more subtle trolls.

I can do the same; I know next to nothing about, say, Eiffel, but I
can cut and paste trivia from FAQ's, web pages other sources. Then
go to comp.lang.eiffel and claim that I spent years using
Eiffel, and have always wanted a language with these features.
Oh, but I couldn't stand some little detail, so I switched
to Perl and life was perfect after that! :)

> natural reflection and serialization, multi-dispatch). What it doesn't
> have, unfortunately, is a syntax I can live with.

It can support any syntax you want. For example one well-known,
portable Common Lisp module you can find on the net lets you
write expressions like

  f(a[++i], b + c/d)

which might translate to

  (f (aref a (incf i)) b (/ c d))

Maybe the Lisp that you used didn't have reader macros, or you
didn't know about them?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Thomas F. Burdick  
View profile  
 More options Aug 27 2002, 2:42 pm
Newsgroups: comp.lang.lisp
From: t...@hurricane.OCF.Berkeley.EDU (Thomas F. Burdick)
Date: 27 Aug 2002 11:42:03 -0700
Local: Tues, Aug 27 2002 2:42 pm
Subject: Re: Why learn Lisp

Adam Warner <use...@consulting.net.nz> writes:
> Scratch that. A large and more satisfying simplification would be the
> original text being associated with any individual symbol name the first
> time it is met by the reader (perhaps until the associated text is
> explicitly destroyed).

> So (mapcar #'symbol-original-name (list 'foo 'Foo 'FOO)) would generate
> ("foo" "foo" "foo") because "foo" was first associated with the symbol
> name FOO.

So basically you want a case-insensitive but case-preserving reader.
FWIW, that does sound like a nice thing.  I've had a new-to-me Mac for
a couple weeks now, and that's one thing I'm loving about its
filesystem.  If I "touch Foo", the file's called "Foo", and if I
"cat foO", "cat FOO", and "cat foo", I get the contents of the file
"Foo".  I think that's about as close as the machine can get to doing
what I mean in this situation.

> The idea would seem to require the string information for each unique
> symbol to be retained forever (unless explicitly destroyed).

Well, it already is.  The only way the Lisp system is allowed to
forget a symbol's name is if you unintern it and lose all references
to it.

--
           /|_     .-----------------------.                        
         ,'  .\  / | No to Imperialist war |                        
     ,--'    _,'   | Wage class war!       |                        
    /       /      `-----------------------'                        
   (   -.  |                              
   |     ) |                              
  (`-.  '--.)                              
   `. )----'                              


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Erik Naggum  
View profile  
 More options Aug 27 2002, 4:09 pm
Newsgroups: comp.lang.lisp
From: Erik Naggum <e...@naggum.no>
Date: 27 Aug 2002 20:09:38 +0000
Local: Tues, Aug 27 2002 4:09 pm
Subject: Re: Why learn Lisp
* Adam Warner
| Scratch that. A large and more satisfying simplification would be the
| original text being associated with any individual symbol name the first
| time it is met by the reader (perhaps until the associated text is
| explicitly destroyed).

  What would happen to (defstruct foo ...)?  Would you have MAKE-foo or
  make-foo?

  I have spent many hours working on various ways to make a case-preserving,
  lower-case Common Lisp work according to the standard, but I find myself
  stumped by macros that generate symbols by "concatenating" input symbols
  with symbols of its own making.  I have come to believe that this should be
  avoided at all cost, including writing out the symbols created by defstruct
  in full.  You see, what I want is for `intern´ and `symbol-name´ to use
  lower-case symbol names when I throw a switch, but if I also want a case-
  preserving reader, what comes out of defstruct is probably MAKE-foo.  To
  make this work, macros that call intern need to capture the state of the
  flag that modifies how `intern´ and friends work so that they would do the
  right thing as the macro writer intended when it was compiled.  This is
  pretty messy, so I have not taken then idea any further.

| The idea would seem to require the string information for each unique
| symbol to be retained forever (unless explicitly destroyed).

  Why do you think this is not how things work today?

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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "Recognizing accomplishment (was Re: Why learn Lisp)" by Marco Antoniotti
Marco Antoniotti  
View profile  
 More options Aug 27 2002, 4:27 pm
Newsgroups: comp.lang.lisp
From: Marco Antoniotti <marc...@cs.nyu.edu>
Date: 27 Aug 2002 16:28:15 -0400
Local: Tues, Aug 27 2002 4:28 pm
Subject: Re: Recognizing accomplishment (was Re: Why learn Lisp)

Paolo Amoroso <amor...@mclink.it> writes:
> On 26 Aug 2002 17:02:34 -0700, Fred Gilham <gil...@snapdragon.csl.sri.com>
> wrote:

> > I've been thinking recently that Mike McDonald deserves kudos, and
> > perhaps apotheosis, for his work on Free CLIM (aka McCLIM).  I know
> > it's not finished yet, but IMHO it is usable by the adventurous.

> > (This is not to minimize the contributions of others who worked on
> > Free CLIM.  The whole thing is amazing to me.)

> I second that. The flow of CVS commit logs is a refreshing breeze. Kudos to
> the McCLIM team.

Have not followed that recently.  What is the status of presentation
types under McCLIM?

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'.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "Why learn Lisp" by Kaz Kylheku
Kaz Kylheku  
View profile  
 More options Aug 27 2002, 4:29 pm
Newsgroups: comp.lang.lisp
From: k...@ashi.footprints.net (Kaz Kylheku)
Date: 27 Aug 2002 13:29:54 -0700
Local: Tues, Aug 27 2002 4:29 pm
Subject: Re: Why learn Lisp

zi...@netvision.net.il (Ziv Caspi) wrote in message <news:3d6b57e0.259035583@newsvr>...
> On Tue, 27 Aug 2002 07:02:32 +0000 (UTC), Kaz Kylheku
> <k...@ashi.footprints.net> wrote:
> [...]
> >Cruft like semicolons and commas is largely replaced by whitespace.

> Yes, that's the point. Commas, semicolons, parens, braces in C provide
> a larger diversity than parens and whitespace alone. This makes it
> more difficult to parse, much more difficult (if not impossible) to do
> the type of things people use LISP macros for, etc. But it also makes
> it easier on the human eye to read.

Can you cite any studies which confirm this? When I was a C newbie,
the code resembled modem line noise to me. Maybe you have forgotten
your first encounters with C.

What is harder to parse for the computer is harder for the human.
There are no algorithmic shortcuts for parsing that are available
to the human brain. Sorting out associativity and precedence in
a an expression takes work, whether you are man or machine.

Note that neither Lisp nor C is easy to read for a human without
indentation. We actually read indentation as the major clue to the
program's structure. Formatting is a big deal. There is no consistent
way to format all of the constructs of C.

I cringe every time I have to split a long for(;;) across multiple
lines. Or a long expression.

In Lisp we can write nice things like:

(or (and (and (condition1 ...)
              (or (condition2 ...)
                  (not (condition3 ...))))
         (not (or condition4 condition5)))
    (and condition6 condition7 condition8))

Now what do we do in C to format it sanely? Okay, the major
constituent
is or, but in infix, that will land in the middle of the long
expression
somewhere. Instead the expression begins with the leftmost node.

((condition1(...) && (condition2(...) || !condition3(...))
&& !(condition4 || condition5)) || condition6 && condition7 &&
condition8

How can we break that in a sane way? In the formatted Lisp version,
I can visually check the balance of the parentheses thanks to the
canonical formatting. I'd like it to be obvious that the expression
has two major constituents coupled by ||.

In Lisp, the frustration is gone. You just follow a simple algorithm
that an idiot can learn in five minutes, and your expression is
formatted sanely.

I don't follow your claim that a wider diversity (C has a 90 member
character set which uses nearly all of the symbols in the ASCII
character set for some kind of punctuation, with the exception of
@ and $) leads to improved readability. More symbols just means more
memorizing. There has to be some optimal alphabet size for human
readability; 90 characters is probably too much, whereas two symbols
(binary code) is too little.

I fail to see how flattening everything and hiding information
makes it easy to read. The reader now has to compute the scope from
semantic information, with no visual clues. If you had a lot of these
objects, it would become quite hard to sort out where the scopes
begin.
The writer might be tempted to use indentation to cache the scope
information in a simple visual clue:

    File reader (...)

        File writer (...)

> terminate that scope early -- and so you must make it explicit --
> doesn't go against my point.

The point is that the C++ paradigm breaks with an innocuous little
change.

> >> In LISP, you either have to group all these declarations in a single
> >> let-like expression (assuming the semantics of your algorithm allow

> >In Lisp, you don't ``have to'' anything.

> Of course. I made a bad choice of words. Your examples on the type of

So correct it; what would have been the *right* choice of words?

> syntax transformations one can do in LISP, however, don't contradict
> my point, as far as I can see.

Sure they do, because even if you don't like the syntax, the point is
that you can reduce it to fit your abstractions. And that's what
ultimately
makes the code readable and maintainable.

What is the C equivalent of, say, (score c d e f g a b (high c)) to
render a musical staff containing the ascending major scale? What
would it look like, if you could design the nicest possible C library
interface for it? Let me guess, an ad-hoc interpreter that parses
notation embedded in a string.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "Recognizing accomplishment (was Re: Why learn Lisp)" by Tim Moore
Tim Moore  
View profile  
 More options Aug 27 2002, 5:19 pm
Newsgroups: comp.lang.lisp
From: tmo...@sea-tmoore-l.dotcast.com (Tim Moore)
Date: 27 Aug 2002 21:18:59 GMT
Local: Tues, Aug 27 2002 5:18 pm
Subject: Re: Recognizing accomplishment (was Re: Why learn Lisp)
On 27 Aug 2002 16:28:15 -0400, Marco Antoniotti <marc...@cs.nyu.edu> wrote:

The implementation of presentation types is pretty complete.  We
haven't written some accept methods yet, don't have presentation
histories (really as much an input editor issue as a presentation type
issue) and don't implement the non-rectangle sensitivity testing and
highlighting described in the spec, but otherwise not much is
missing.

Tim


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "Why learn Lisp" by Erik Naggum
Erik Naggum  
View profile  
 More options Aug 27 2002, 5:41 pm
Newsgroups: comp.lang.lisp
From: Erik Naggum <e...@naggum.no>
Date: 27 Aug 2002 21:41:12 +0000
Local: Tues, Aug 27 2002 5:41 pm
Subject: Re: Why learn Lisp
* zi...@netvision.net.il (Ziv Caspi)
| Yes, that's the point. Commas, semicolons, parens, braces in C provide
| a larger diversity than parens and whitespace alone. This makes it
| more difficult to parse, much more difficult (if not impossible) to do
| the type of things people use LISP macros for, etc. But it also makes
| it easier on the human eye to read.

  This, is, a, (curious), position, to, hold.  The, amount, of, [punctuation],
  in, (normal, writing), is, pretty, low, and, { ensures; }, that, punctuation,
  has, meaning; [distinct] from the normal { flow; } of the language.  In, C,
  the, [punctuation], is, so, { heavy }, that, the, reader, [must], pay, acute,
  { attention; }, to, it, even, though, it, is, (largely), meaningless.  This,
  is, not, [easier], to, read, as, this, paragraph, should, be, have, [shown],
  you.  When, an, { assortment; }, of, punctuation, is, made, into, background,
  { noise; }, the, result: is, that; people, become, [hypersensitized], to();
  changes, in, the, punctuation, they, have, to, (read && would), reject, any,
  languages, with, a, simpler, syntax && other, punctuation, to, ignore.

  If you have become used to C, the empirical evidence is that you have a very
  hard time reading languages with other syntaxes.  This is prima facie
  evidence that the C syntax family requires an expensive learning process and
  constant refreshes.  I found myself frustrated when I tried to write a
  couple hundred lines of C recently to exercise some Linux features and make
  them available to Common Lisp (particularly the dnotify facility) and all
  the keyboarding was just /painful/ compared to the swift typing that I
  usually achieve with Common Lisp and English.

| My example was meant to show that the scope introduced when a variable is
| declared can be "hidden" in C/C++, which makes it easier to read.

  Where /did/ you get the notion that "easier to read" is universalizable and
  one-dimensional to boot?  Sheesh, you prove that you have no clue what you
  talk about when you treat "easier to read" as a metric that is unrelated to
  experience.

| Your examples on the type of syntax transformations one can do in LISP,
| however, don't contradict my point, as far as I can see.

  What /would/ contradict your point?  It seems to be remarkably resilient,
  but mainly in your own view.

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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Adam Warner  
View profile  
 More options Aug 27 2002, 6:25 pm
Newsgroups: comp.lang.lisp
From: Adam Warner <use...@consulting.net.nz>
Date: Wed, 28 Aug 2002 10:25:43 +1200
Local: Tues, Aug 27 2002 6:25 pm
Subject: Re: Why learn Lisp

Thomas F. Burdick wrote:
> So basically you want a case-insensitive but case-preserving reader.
> FWIW, that does sound like a nice thing.  I've had a new-to-me Mac for a
> couple weeks now, and that's one thing I'm loving about its filesystem.
> If I "touch Foo", the file's called "Foo", and if I "cat foO", "cat
> FOO", and "cat foo", I get the contents of the file "Foo".  I think
> that's about as close as the machine can get to doing what I mean in
> this situation.

You'd like Windows filesystems as well Thomas. They also have
case-preserving but case-insensitive filesystems.

>> The idea would seem to require the string information for each unique
>> symbol to be retained forever (unless explicitly destroyed).

> Well, it already is.  The only way the Lisp system is allowed to forget
> a symbol's name is if you unintern it and lose all references to it.

Well storing a few extra bytes equal to the length of the symbol name
wouldn't seem to be a problem then.

Regards,
Adam


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Thomas Stegen CES2000  
View profile  
 More options Aug 27 2002, 6:26 pm
Newsgroups: comp.lang.lisp
From: "Thomas Stegen CES2000" <tho_ste...@hotmail.com>
Date: Tue, 27 Aug 2002 23:18:09 +0200
Local: Tues, Aug 27 2002 5:18 pm
Subject: Re: Why learn Lisp

"Kaz Kylheku" <k...@ashi.footprints.net> wrote in message:

[snip]

I would just like to say that I find neither C nor Lisp
hard to read when properly formatted. I didn't find
Pascal hard to read when I first started to learn programming.

I find Lisp code harder to read though, but the reason for that
is not that I find it hard to see the structure of the program,
but rather that the idioms and solutions used are different from
what I am used to. One "problem" is that recursion is often
used and I do not have that much training in reading recursive
functions. But my guess is that this is a trivial problem which
will disappear with time :)

So, I speculate that this might be Zivs problem. Not that the
structure of the program is hard to read, but the use of
unfamiliar constructs requires some extra brainpower. I might
be totally wrong and I apologize if that is the case.

--
Thomas.

Approaching singularity.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Adam Warner  
View profile  
 More options Aug 27 2002, 6:30 pm
Newsgroups: comp.lang.lisp
From: Adam Warner <use...@consulting.net.nz>
Date: Wed, 28 Aug 2002 10:30:33 +1200
Local: Tues, Aug 27 2002 6:30 pm
Subject: Re: Why learn Lisp

Erik Naggum wrote:
> * Adam Warner
> | Scratch that. A large and more satisfying simplification would be the
> | original text being associated with any individual symbol name the
> first | time it is met by the reader (perhaps until the associated text
> is | explicitly destroyed).

>   What would happen to (defstruct foo ...)?  Would you have MAKE-foo or
>   make-foo?

Nothing different because the information would only be available to
someone who requested it by calling the new function designed to retrieve
the original string info. That's why it shouldn't affect any existing
code.

>   I have spent many hours working on various ways to make a
>   case-preserving, lower-case Common Lisp work according to the
>   standard, but I find myself stumped by macros that generate symbols by
>   "concatenating" input symbols with symbols of its own making.  I have
>   come to believe that this should be avoided at all cost, including
>   writing out the symbols created by defstruct in full.  You see, what I
>   want is for `intern´ and `symbol-name´ to use lower-case symbol names
>   when I throw a switch, but if I also want a case- preserving reader,
>   what comes out of defstruct is probably MAKE-foo.  To make this work,
>   macros that call intern need to capture the state of the flag that
>   modifies how `intern´ and friends work so that they would do the right
>   thing as the macro writer intended when it was compiled.  This is
>   pretty messy, so I have not taken then idea any further.

This is a much more ambitious idea Erik. I hope it pays off.

Regards,
Adam


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Adam Warner  
View profile  
 More options Aug 27 2002, 7:17 pm
Newsgroups: comp.lang.lisp
From: Adam Warner <use...@consulting.net.nz>
Date: Wed, 28 Aug 2002 11:17:48 +1200
Local: Tues, Aug 27 2002 7:17 pm
Subject: Re: Why learn Lisp

Adam Warner wrote:
>>   What would happen to (defstruct foo ...)?  Would you have MAKE-foo or
>>   make-foo?

> Nothing different because the information would only be available to
> someone who requested it by calling the new function designed to
> retrieve the original string info. That's why it shouldn't affect any
> existing code.

I think I now see your point. While the symbol name would still be
MAKE-FOO it seems logical that the separate strings name would become
MAKE-foo.

Regards,
Adam


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Erik Naggum  
View profile  
 More options Aug 27 2002, 9:49 pm
Newsgroups: comp.lang.lisp
From: Erik Naggum <e...@naggum.no>
Date: 28 Aug 2002 01:49:03 +0000
Local: Tues, Aug 27 2002 9:49 pm
Subject: Re: Why learn Lisp
* Thomas Stegen CES2000
| One "problem" is that recursion is often used and I do not have that much
| training in reading recursive functions.  But my guess is that this is a
| trivial problem which will disappear with time :)

  Heh.  Probably not.  Recursion can be extremely hard to understand if you
  look too closely at it.  E.g., the simple factorial function is hard to read
  if you try to think about what actually happens to 10! and you try to work
  out the recursive calls in your head.  What you need to do with recursive
  functions is figure out the problem as composed of sub-problems that are
  just like itself.  For instance, an iterative tree traversal function will
  do a lot of work to remember past nodes, while a recursive version can work
  on a single node at a time and completely hide the fact that the call stack
  holds all the information that the iterative version would have to allocate
  explicit memory to hold.  So-called tail-recursive problems are only simple
  decompositions into itself without any new information in each step and it
  makes little sense to use this idiom even when you want to train yourself to
  think recursively, because the whole point with recursive functions is that
  the call stack contains useful information and tail-recursive functions only
  use the function call paradigm to express iteration.

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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Craig Brozefsky  
View profile  
 More options Aug 27 2002, 10:57 pm
Newsgroups: comp.lang.lisp
From: Craig Brozefsky <cr...@red-bean.com>
Date: Wed, 28 Aug 2002 02:56:25 GMT
Local: Tues, Aug 27 2002 10:56 pm
Subject: Re: Why learn Lisp

zi...@netvision.net.il (Ziv Caspi) writes:
> On Tue, 27 Aug 2002 07:02:32 +0000 (UTC), Kaz Kylheku
> <k...@ashi.footprints.net> wrote:
> [...]
> >Cruft like semicolons and commas is largely replaced by whitespace.

> Yes, that's the point. Commas, semicolons, parens, braces in C provide
> a larger diversity than parens and whitespace alone. This makes it
> more difficult to parse, much more difficult (if not impossible) to do
> the type of things people use LISP macros for, etc. But it also makes
> it easier on the human eye to read.

What is the source for your assertion that it is easier for the human
eye to read more diverse syntax?

I don't really have a hard time with any of the syntaxes, although ML
and Haskell can give me a headache at times.

--
Sincerely,
Craig Brozefsky <cr...@red-bean.com>
Free Scheme/Lisp Software  http://www.red-bean.com/~craig


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dorai Sitaram  
View profile  
 More options Aug 28 2002, 9:13 am
Newsgroups: comp.lang.lisp
From: d...@goldshoe.gte.com (Dorai Sitaram)
Date: 28 Aug 2002 13:13:40 GMT
Local: Wed, Aug 28 2002 9:13 am
Subject: Re: Why learn Lisp
In article <87y9ar6679....@piracy.red-bean.com>,
Craig Brozefsky  <cr...@red-bean.com> wrote:

>zi...@netvision.net.il (Ziv Caspi) writes:

>> On Tue, 27 Aug 2002 07:02:32 +0000 (UTC), Kaz Kylheku
>> <k...@ashi.footprints.net> wrote:
>> [...]
>> >Cruft like semicolons and commas is largely replaced by whitespace.

>> Yes, that's the point. Commas, semicolons, parens, braces in C provide
>> a larger diversity than parens and whitespace alone. This makes it
>> more difficult to parse, much more difficult (if not impossible) to do
>> the type of things people use LISP macros for, etc. But it also makes
>> it easier on the human eye to read.

>What is the source for your assertion that it is easier for the human
>eye to read more diverse syntax?

I think he means that more syntax offers concise
visual hints not possible when you are forced to
spelling things out with less syntax.  Eg,

   "Lisp syntax is *truly* hard," don't you think?

is certainly easier to read than

   quote capitalize lisp syntax is emphasize truly
   unemphasize hard comma unquote don apostrophe t you
   think query

I think the Lisp syntax is plenty readable myself, but
I also don't think its syntax is really as terribly
minimal as it could be.  It uses parens very
effectively to identify groups and subgroups, and it
uses keywords at the "car" position where other
languages wantonly use up dedicated characters --
making for less diversity in user-chosen symbols!
Once you start getting a feel for the specialness of
keywords, you get back the diversity of syntax that you
may have initially felt was missing.

If Lisp keywords were not written as words fashioned
from an alphabet but as dedicated symbols (say as
Japanese kanji), with all other words being
alphabet-based, then the wrench of going from C
to Lisp may not be felt as much.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ng Pheng Siong  
View profile  
 More options Aug 28 2002, 11:03 am
Newsgroups: comp.lang.lisp
From: n...@vista.netmemetic.com (Ng Pheng Siong)
Date: 28 Aug 2002 14:59:51 GMT
Local: Wed, Aug 28 2002 10:59 am
Subject: Re: Why learn Lisp
According to Kaz Kylheku <k...@ashi.footprints.net>:

> If you know what real macros are, why do you make stupid claims
> about Lisp having a fixed syntax which forces you do to things one
> way, such as to keep nesting deeper and deeper if you want to
> introduce a series of lexical variables which refer to earlier
> lexical variables, and have code interspersed in between?

I'm a Lisp newbie, and I am producing code that looks like this.

What are the better alternatives? Enquiring minds want to know! ;-)

TIA. Cheers.

--
Ng Pheng Siong <n...@netmemetic.com> * http://www.netmemetic.com


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "OT: No active projects at J13 ?? (was Re: Why learn Lisp)" by Kent M Pitman
Kent M Pitman  
View profile  
 More options Aug 28 2002, 11:25 am
Newsgroups: comp.lang.lisp
From: Kent M Pitman <pit...@world.std.com>
Date: Wed, 28 Aug 2002 15:25:13 GMT
Local: Wed, Aug 28 2002 11:25 am
Subject: Re: OT: No active projects at J13 ?? (was Re: Why learn Lisp)

Andreas Hinze <a...@smi.de> writes:
> Kent M Pitman wrote:

> > I personaly think ANSI is a large, too-slow, not-very-useful entity to
> > be accomodating all but the most low-level basic standards.  It was
> > probably appropriate to standardize CL itself this way, but even then
> > it's quite clear that the long time-line caused by ANSI resulted in
> > some companies going bankrupt in the meanwhile.  Was ANSI the cause?
> > Probably not.  But did producing an ANSI standard cost a serious lot of
> > money on the part of all Lisp vendors?  Yes.

> I didn't know that it is so slow and expensive. That explains a lot.

Not in terms of its people in their offices nor in terms of its fees.
In terms of the hidden costs of travel to
meetings, of offline work, of the lead time required for notices of
meetings (stretching out timetable), the publishing and review
requirements (resources and temporal duration), the loss of control of
intellectual property they are increasingly pushing for (we just scraped
by before)... everything adds up.

The easily enumerable part is loaded salary costs (salary + overhead
for offices, machines, etc).  Producing ANSI CL [1986 to 1995] took a
bit over $400K, if I recall right.

The costs of a zillion people traveling, of the timeline being years
long, of people sitting at desks answering email and reviewing
hardcopy, etc., are hard to measure.  I'd say probably that comes
close to doubling it...

None of this counts the cost of the community "accepting" the changes,
meaning of each user reading new documentation, of vendors making and
testing new implementations, of deployed products looking for and perhaps
even debugging incompatibilities (this cost may be present even if the
incompatibilities won't be there, since one has to at least check).
An analyst report I saw at Symbolics once for a fairly modest set of
incompatible changes (that is, small in number but pervasive in nature)
showed that target customers often pay upwards (sometimes way upwards)
of $10K per customer to accept such releases...  This aggregates to ENORMOUS
community cost before any new benefit is realized.  

Before making changes, one wants to believe they are going to overcome
these costs.

Layered standards are another matter, but require no change to the existing
core.

> > Users love to point to things like this because they want
> > everything on a silver platter if they can get it, but the cost of
> > getting this silver platter is high enough that the rough edges
> > present will buy you more in terms of other things vendors could
> > provide.
> Right. I was only looking for the advantages of further standardisation
> without thinking about the costs.

> Your explaination give me a new sight to the hole topic. I didn't realize the
> problems behind that hole process. Thanks for your patient explanations.

Not a problem.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "Why learn Lisp" by Erik Naggum
Erik Naggum  
View profile  
 More options Aug 28 2002, 12:10 pm
Newsgroups: comp.lang.lisp
From: Erik Naggum <e...@naggum.no>
Date: 28 Aug 2002 16:10:10 +0000
Local: Wed, Aug 28 2002 12:10 pm
Subject: Re: Why learn Lisp
* Dorai Sitaram
| I think the Lisp syntax is plenty readable myself, but I also don't think
| its syntax is really as terribly minimal as it could be.

  Some years ago, I spent considerable time playing with the reader in order
  to learn how it worked and how much I could change it without removing the
  Lisp feel.  I modified the list reader to post-process them such that, e.g.,
  `(x <- y)´ and `(y -> x)´ would transform to `(setf x y)´, reintroduced the
  `=>´ from Scheme's `cond´ to pass the value of the conditional to the body,
  got rid of `aref´ with `[array index ...]´ and sundry other minor changes.
  Most of these were dead ends, but I still kind of like the infix -> and <-.
  (It looks even better with an assortment of Unicode arrows.)

| If Lisp keywords were not written as words fashioned from an alphabet but as
| dedicated symbols (say as Japanese kanji), with all other words being
| alphabet-based, then the wrench of going from C to Lisp may not be felt as
| much.

  You can do an amazing amount of syntactic harm with Unicode.  I have all
  sorts of cute symbols available on my keyboard, now.  Real less-than-or-equal
  signs, open and filled triangles for brackets and bullets and open and filled
  circles and squares for bullets, and a little greek and, um.  Syntactic harm.

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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Thomas F. Burdick  
View profile  
 More options Aug 28 2002, 2:31 pm
Newsgroups: comp.lang.lisp
From: t...@hurricane.OCF.Berkeley.EDU (Thomas F. Burdick)
Date: 28 Aug 2002 11:31:41 -0700
Local: Wed, Aug 28 2002 2:31 pm
Subject: Re: Why learn Lisp

Adam Warner <use...@consulting.net.nz> writes:
> Thomas F. Burdick wrote:

> > So basically you want a case-insensitive but case-preserving reader.
> > FWIW, that does sound like a nice thing.  I've had a new-to-me Mac for a
> > couple weeks now, and that's one thing I'm loving about its filesystem.
> > If I "touch Foo", the file's called "Foo", and if I "cat foO", "cat
> > FOO", and "cat foo", I get the contents of the file "Foo".  I think
> > that's about as close as the machine can get to doing what I mean in
> > this situation.

> You'd like Windows filesystems as well Thomas. They also have
> case-preserving but case-insensitive filesystems.

One important thing I left implicit in that paragraph was that this
was a Unix with the above semantics ... I know I dislike VFAT,
although possibly whatever filesystem NT uses would be okay.  The OS
is another question...

> >> The idea would seem to require the string information for each unique
> >> symbol to be retained forever (unless explicitly destroyed).

> > Well, it already is.  The only way the Lisp system is allowed to forget
> > a symbol's name is if you unintern it and lose all references to it.

> Well storing a few extra bytes equal to the length of the symbol name
> wouldn't seem to be a problem then.

Why would it need to do this?  If I understand you correctly, you're
proposing that the reader preserve case, but that it uses a
case-insensitive INTERN.

--
           /|_     .-----------------------.                        
         ,'  .\  / | No to Imperialist war |                        
     ,--'    _,'   | Wage class war!       |                        
    /       /      `-----------------------'                        
   (   -.  |                              
   |     ) |                              
  (`-.  '--.)                              
   `. )----'                              


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Thomas F. Burdick  
View profile  
 More options Aug 28 2002, 2:45 pm
Newsgroups: comp.lang.lisp
From: t...@hurricane.OCF.Berkeley.EDU (Thomas F. Burdick)
Date: 28 Aug 2002 11:45:15 -0700
Local: Wed, Aug 28 2002 2:45 pm
Subject: Re: Why learn Lisp

Erik Naggum <e...@naggum.no> writes:
> * Adam Warner
> | Scratch that. A large and more satisfying simplification would be the
> | original text being associated with any individual symbol name the first
> | time it is met by the reader (perhaps until the associated text is
> | explicitly destroyed).

>   What would happen to (defstruct foo ...)?  Would you have MAKE-foo or
>   make-foo?

Well, if the reader was case-insensitive but case-preserving, you'd
get the following behavior:

  * (defstruct foo)
  foo
  * (make-foo)
  #S(foo)
  * (symbol-name 'make-foo)
  "MAKE-foo"
  * (eql 'make-foo '|make-foo|)
  NIL

This wouldn't be backwards-compatible, but it would only break for
ugly code like defstruct.  Which is probably too high of a price to
pay, but that's too bad because that looks like very nice case semantics.

>   I have spent many hours working on various ways to make a case-preserving,
>   lower-case Common Lisp work according to the standard, but I find myself
>   stumped by macros that generate symbols by "concatenating" input symbols
>   with symbols of its own making.  I have come to believe that this should be
>   avoided at all cost, including writing out the symbols created by defstruct
>   in full.  You see, what I want is for `intern´ and `symbol-name´ to use
>   lower-case symbol names when I throw a switch, but if I also want a case-
>   preserving reader, what comes out of defstruct is probably MAKE-foo.  To
>   make this work, macros that call intern need to capture the state of the
>   flag that modifies how `intern´ and friends work so that they would do the
>   right thing as the macro writer intended when it was compiled.  This is
>   pretty messy, so I have not taken then idea any further.

Yech.  I can think of some messy partial-solutions, but I don't know
if they could be made to work because I really don't like thinking
about this problem.

--
           /|_     .-----------------------.                        
         ,'  .\  / | No to Imperialist war |                        
     ,--'    _,'   | Wage class war!       |                        
    /       /      `-----------------------'                        
   (   -.  |                              
   |     ) |                              
  (`-.  '--.)                              
   `. )----'                              


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Messages 76 - 100 of 118 < Older  Newer >
« Back to Discussions « Newer topic     Older topic »