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
What gives you power in CL, that you don't have in other languages
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  Messages 1 - 25 of 56 - Collapse all  -  Translate all to Translated (View all originals)   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
 
Dimiter malkia Stanev  
View profile  
 More options Jan 27 2009, 9:45 pm
Newsgroups: comp.lang.lisp
From: "Dimiter \"malkia\" Stanev" <mal...@mac.com>
Date: Tue, 27 Jan 2009 18:45:17 -0800
Local: Tues, Jan 27 2009 9:45 pm
Subject: What gives you power in CL, that you don't have in other languages
        To me, as a newbie common-lisper (I am in my 2nd year - still wet
behind the ears), these are three of the many features that I simply
wished were in my daily-work languages (C++ and sons):
            - The iteration cycle -- the best old idea - modify your
application as it runs. It's dirty, mostly non-deterministic, and you
might not be able to reproduce the same steps if you started again, but
hey - sometimes you just need to attach to your stuff change it on the
fly and keep going - without hefty restarts.
            - Dynamic special variables -- the ability to "hook" and change
something deep, communicating with it through a *special* medium created
at lexical scope (binding). This is just too awesome to skip in other
languages! I miss it a lot! It's not a global variable really - it's
more than that literally!
            - Multiple Value Returns -- and not like Python, where you need to
take care of not caring about values you do not care - this simply beats
everything else I've used! You can safely extend your API with cases
that you have not accounted for, and still the old code would work just
fine.
            - The CLOS multiple-dispatch -- this is the best idea I've heard in
all the OO I did - combined with the eql matching - this is so much
needed techniquie - no more visitor pattern indeed. I've actually
grokked the visitor pattern, after I understood how the
multiple-dispatch works.

        Off course there are others things: macroses, exception-handling, etc
and many others... But I'm still learning these, so I can't tell yet.


 
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.
Kenneth Tilton  
View profile  
 More options Jan 28 2009, 12:56 am
Newsgroups: comp.lang.lisp
From: Kenneth Tilton <kentil...@gmail.com>
Date: Wed, 28 Jan 2009 00:56:29 -0500
Local: Wed, Jan 28 2009 12:56 am
Subject: Re: What gives you power in CL, that you don't have in other languages

Dimiter "malkia" Stanev wrote:
>     To me, as a newbie common-lisper (I am in my 2nd year - still wet
> behind the ears), these are three of the many features that I simply
> wished were in my daily-work languages (C++ and sons):
>         - The iteration cycle -- the best old idea - modify your
> application as it runs. It's dirty, mostly non-deterministic, and you
> might not be able to reproduce the same steps if you started again, but
> hey - sometimes you just need to attach to your stuff change it on the
> fly and keep going - without hefty restarts.
>         - Dynamic special variables -- the ability to "hook" and change
> something deep, communicating with it through a *special* medium created
> at lexical scope (binding). This is just too awesome to skip in other
> languages! I miss it a lot! It's not a global variable really - it's
> more than that literally!

so far so good.

>         - Multiple Value Returns -- and not like Python, where you need
> to take care of not caring about values you do not care - this simply
> beats everything else I've used! You can safely extend your API with
> cases that you have not accounted for, and still the old code would work
> just fine.
>         - The CLOS multiple-dispatch -- this is the best idea I've heard
> in all the OO I did - combined with the eql matching - this is so much
> needed techniquie - no more visitor pattern indeed. I've actually
> grokked the visitor pattern, after I understood how the
> multiple-dispatch works.

two things that are indeed special and I use 0.1% of the time. Not sure
how that multiplies out.

>     Off course there are others things: macroses, exception-handling,
> etc and many others... But I'm still learning these, so I can't tell yet.

Yes, it is a list, macros possibly being the only thing some other
language will not have. Hell, even Scheme does not have useful macros.

kth


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
GP lisper  
View profile  
 More options Jan 27 2009, 11:43 pm
Newsgroups: comp.lang.lisp
From: GP lisper <spamb...@CloudDancer.com>
Date: Tue, 27 Jan 2009 20:43:27 -0800
Local: Tues, Jan 27 2009 11:43 pm
Subject: Re: What gives you power in CL, that you don't have in other languages

On Tue, 27 Jan 2009 18:45:17 -0800, <mal...@mac.com> wrote:
>What gives you power in CL, that you don't have in other languages

It's a blind men and the elephant situation.  For instance:

>        - Multiple Value Returns -- and not like Python, where you need to
> take care of not caring about values you do not care - this simply beats
> everything else I've used! You can safely extend your API with cases
> that you have not accounted for, and still the old code would work just
> fine.

I've done that, and until I read this, I never would have mentioned it
as a 'power' in that elephant.

--
Lisp : a multi-fetish language


 
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.
Slobodan Blazeski  
View profile  
 More options Jan 28 2009, 3:27 am
Newsgroups: comp.lang.lisp
From: Slobodan Blazeski <slobodan.blaze...@gmail.com>
Date: Wed, 28 Jan 2009 00:27:32 -0800 (PST)
Local: Wed, Jan 28 2009 3:27 am
Subject: Re: What gives you power in CL, that you don't have in other languages
On Jan 28, 3:45 am, "Dimiter \"malkia\" Stanev" <mal...@mac.com>
wrote:

Multiple value returns are something I really miss in C#, I could
mimic with references but it's not the same thing.
Lambda, very convenient.
High order functions.
...
Though other langauges have many of those, they are usually not well
integrated, unnatural and cumbersome to  use. Something like making
octopus by adding extra legs to a dog.
So it's very important if language integrates some feature else nobody
will use it, except some experts in a pissing contests.

bobi


 
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.
Robert Dodier  
View profile  
 More options Jan 28 2009, 12:01 pm
Newsgroups: comp.lang.lisp
From: Robert Dodier <robert.dod...@gmail.com>
Date: Wed, 28 Jan 2009 09:01:48 -0800 (PST)
Local: Wed, Jan 28 2009 12:01 pm
Subject: Re: What gives you power in CL, that you don't have in other languages
The interesting, useful major feature of Lisp is that code = data.
Lots of other useful stuff derives from that.

Robert Dodier


 
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.
java....@gmail.com  
View profile  
 More options Jan 28 2009, 1:28 pm
Newsgroups: comp.lang.lisp
From: java....@gmail.com
Date: Wed, 28 Jan 2009 10:28:49 -0800 (PST)
Local: Wed, Jan 28 2009 1:28 pm
Subject: Re: What gives you power in CL, that you don't have in other languages
On 28 Gen, 03:45, "Dimiter \"malkia\" Stanev" <mal...@mac.com> wrote:

> Lisp

The real unique distinctive of Lisp is that it's absolutely
invincible.
So you can either love it or hate (read: envy) it, but you can't beat
it...

 
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.
Rainer Joswig  
View profile  
 More options Jan 28 2009, 2:00 pm
Newsgroups: comp.lang.lisp
From: Rainer Joswig <jos...@lisp.de>
Date: Wed, 28 Jan 2009 20:00:47 +0100
Local: Wed, Jan 28 2009 2:00 pm
Subject: Re: What gives you power in CL, that you don't have in other languages
In article
<f8636591-0b09-4d94-bd44-09fd8ddbd...@z6g2000pre.googlegroups.com>,
 Robert Dodier <robert.dod...@gmail.com> wrote:

> The interesting, useful major feature of Lisp is that code = data.
> Lots of other useful stuff derives from that.

> Robert Dodier

I would go back one step. The interesting, useful major
feature of Lisp is computing with symbolic expressions.

  McCarty, 1960
 'Recursive Functions of Symbolic Expressions
  and Their Computation by Machine, Part I'

  http://www-formal.stanford.edu/jmc/recursive.ps

It lists the following applications (page 22):

  1. Writing a compiler to compile LISP programs into machine language.
  2. Writing a program to check proofs in a class of formal logical systems.
  3. Writing programs for formal differentiation and integration.
  4. Writing programs to realize various algorithms for generating proofs in predicate calculus.
  5. Making certain engineering calculations whose results are formulas rather than numbers.
  6. Programming the Advice Taker system.

'code as data' is then an application of computing with symbol expressions.

--
http://lispm.dyndns.org/


 
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.
guenth...@gmail.com  
View profile  
 More options Jan 28 2009, 3:56 pm
Newsgroups: comp.lang.lisp
From: guenth...@gmail.com
Date: Wed, 28 Jan 2009 12:56:56 -0800 (PST)
Local: Wed, Jan 28 2009 3:56 pm
Subject: Re: What gives you power in CL, that you don't have in other languages
On Jan 27, 8:43 pm, GP lisper <spamb...@CloudDancer.com> wrote:

> On Tue, 27 Jan 2009 18:45:17 -0800, <mal...@mac.com> wrote:
> >What gives you power in CL, that you don't have in other languages

> It's a blind men and the elephant situation.  For instance:

> >        - Multiple Value Returns -- and not like Python, where you need to
> > take care of not caring about values you do not care - this simply beats
> > everything else I've used! You can safely extend your API with cases
> > that you have not accounted for, and still the old code would work just
> > fine.

> I've done that, and until I read this, I never would have mentioned it
> as a 'power' in that elephant.

Indeed. Lisp has many advantages, but Multiple Value Returns is much
nicer done in FORTH (or other stack oriented languages?). Now FORTH
might be a good idea which time has come and gone and I don't really
miss stack counting, but it has some beauty to it.

 
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.
Marek Kubica  
View profile  
 More options Jan 28 2009, 6:03 pm
Newsgroups: comp.lang.lisp
From: Marek Kubica <ma...@xivilization.net>
Date: Thu, 29 Jan 2009 00:03:40 +0100
Local: Wed, Jan 28 2009 6:03 pm
Subject: Re: What gives you power in CL, that you don't have in other languages
On Wed, 28 Jan 2009 12:56:56 -0800 (PST)

guenth...@gmail.com wrote:
> Now FORTH might be a good idea which time has come and gone and I don't really
> miss stack counting, but it has some beauty to it.

I have tried Factor recently, a Factor/Lisp/Joy-inspired stack
language.. it is quite fun, although I have no idea how to get useful
stuff done with it.

regards,
Marek


 
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.
William James  
View profile  
 More options Jan 28 2009, 7:17 pm
Newsgroups: comp.lang.lisp
From: "William James" <w_a_x_...@yahoo.com>
Date: 29 Jan 2009 00:17:56 GMT
Local: Wed, Jan 28 2009 7:17 pm
Subject: Re: What gives you power in CL, that you don't have in other languages

java....@gmail.com wrote:
> On 28 Gen, 03:45, "Dimiter \"malkia\" Stanev" <mal...@mac.com> wrote:
> > Lisp

> The real unique distinctive of Lisp is that it's absolutely
> invincible.
> So you can either love it or hate (read: envy) it, but you can't beat
> it...

I've beaten it many times, but the religious zealots refused
to admit it.

 
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.
Kenneth Tilton  
View profile  
 More options Jan 28 2009, 7:35 pm
Newsgroups: comp.lang.lisp
From: Kenneth Tilton <kentil...@gmail.com>
Date: Wed, 28 Jan 2009 19:35:54 -0500
Local: Wed, Jan 28 2009 7:35 pm
Subject: Re: What gives you power in CL, that you don't have in other languages

William James wrote:
> java....@gmail.com wrote:

>> On 28 Gen, 03:45, "Dimiter \"malkia\" Stanev" <mal...@mac.com> wrote:
>>> Lisp
>> The real unique distinctive of Lisp is that it's absolutely
>> invincible.
>> So you can either love it or hate (read: envy) it, but you can't beat
>> it...

> I've beaten it many times, but the religious zealots refused
> to admit it.

We prefer "savages".

hth,kxo


 
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.
asandroq@gmail.com  
View profile  
 More options Jan 29 2009, 5:45 am
Newsgroups: comp.lang.lisp
From: "asand...@gmail.com" <asand...@gmail.com>
Date: Thu, 29 Jan 2009 02:45:32 -0800 (PST)
Local: Thurs, Jan 29 2009 5:45 am
Subject: Re: What gives you power in CL, that you don't have in other languages
On Jan 28, 2:56 am, Kenneth Tilton <kentil...@gmail.com> wrote:

     It depends on what you call "useful".

-alex


 
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.
Kenneth Tilton  
View profile  
 More options Jan 29 2009, 6:46 pm
Newsgroups: comp.lang.lisp
From: Kenneth Tilton <kentil...@gmail.com>
Date: Thu, 29 Jan 2009 18:46:59 -0500
Local: Thurs, Jan 29 2009 6:46 pm
Subject: Re: What gives you power in CL, that you don't have in other languages

Here, I'll use it in a sentence:

"Anyone not clear on the meaning of useful would love writing macros in
Scheme."

hth,kth


 
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.
Jon Harrop  
View profile  
 More options Jan 30 2009, 1:27 pm
Newsgroups: comp.lang.lisp
From: Jon Harrop <j...@ffconsultancy.com>
Date: Fri, 30 Jan 2009 18:27:37 +0000
Local: Fri, Jan 30 2009 1:27 pm
Subject: Re: What gives you power in CL, that you don't have in other languages

Dimiter "malkia" Stanev wrote:
> - Multiple Value Returns -- and not like Python, where you need to
> take care of not caring about values you do not care - this simply beats
> everything else I've used! You can safely extend your API with cases
> that you have not accounted for, and still the old code would work just
> fine.

Multiple values are handled much more elegantly in other languages, like
tuples in OCaml, Haskell and F#.

> - The CLOS multiple-dispatch -- this is the best idea I've heard in
> all the OO I did - combined with the eql matching - this is so much
> needed techniquie - no more visitor pattern indeed. I've actually
> grokked the visitor pattern, after I understood how the
> multiple-dispatch works.

Pattern matching is related but not a replacement for multiple dispatch that
you may like to look at.

--
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
http://www.ffconsultancy.com/?u


 
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.
Kaz Kylheku  
View profile  
 More options Jan 30 2009, 4:23 pm
Newsgroups: comp.lang.lisp
From: Kaz Kylheku <kkylh...@gmail.com>
Date: Fri, 30 Jan 2009 21:23:21 +0000 (UTC)
Local: Fri, Jan 30 2009 4:23 pm
Subject: Re: What gives you power in CL, that you don't have in other languages
On 2009-01-30, Jon Harrop <j...@ffconsultancy.com> wrote:

> Dimiter "malkia" Stanev wrote:
>> - Multiple Value Returns -- and not like Python, where you need to
>> take care of not caring about values you do not care - this simply beats
>> everything else I've used! You can safely extend your API with cases
>> that you have not accounted for, and still the old code would work just
>> fine.

> Multiple values are handled much more elegantly in other languages, like
> tuples in OCaml, Haskell and F#.

Remember the song folks:

  You can lead him to Lisp, but he sees just parentheses.
  But syntax he likes looks like ve-ne-re-al disease.

Even if tuples in and of themselves are nice in these languages, the overall
syntax is indecipherable dog's breakfast that is more geared toward obfuscated
programming contests than real work.

Look at Haskell.  The Haskell 98 spec has to use a special superscript notation
to collapse the million precedence levels.  Any language in whose syntactic
specification there is a need to use variables over the domain of precedence
levels, and discuss them algebraically, should be tossed out the window by
anyone with a shred of sanity.


 
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.
Jon Harrop  
View profile  
 More options Jan 31 2009, 8:19 pm
Newsgroups: comp.lang.lisp
From: Jon Harrop <j...@ffconsultancy.com>
Date: Sun, 01 Feb 2009 01:19:43 +0000
Local: Sat, Jan 31 2009 8:19 pm
Subject: Re: What gives you power in CL, that you don't have in other languages

Kaz Kylheku wrote:
> Even if tuples in and of themselves are nice in these languages, the
> overall syntax is indecipherable dog's breakfast that is more geared
> toward obfuscated programming contests than real work.

No reason why Lisp 3.0 cannot have decent support for tuples and do away
with cons cells, multiple value bind, values, separate namespaces and all
the other useless cruft.

--
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
http://www.ffconsultancy.com/?u


 
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.
Marco Antoniotti  
View profile  
 More options Feb 1 2009, 10:36 am
Newsgroups: comp.lang.lisp
From: Marco Antoniotti <marc...@gmail.com>
Date: Sun, 1 Feb 2009 07:36:35 -0800 (PST)
Local: Sun, Feb 1 2009 10:36 am
Subject: Re: What gives you power in CL, that you don't have in other languages
On Feb 1, 2:19 am, Jon Harrop <j...@ffconsultancy.com> wrote:

> Kaz Kylheku wrote:
> > Even if tuples in and of themselves are nice in these languages, the
> > overall syntax is indecipherable dog's breakfast that is more geared
> > toward obfuscated programming contests than real work.

> No reason why Lisp 3.0 cannot have decent support for tuples and do away
> with cons cells, multiple value bind, values, separate namespaces and all
> the other useless cruft.

But CL has support for tuples.  We call them vectors.  CONS cells are
there in any functional language that supports lists (I may be stupid,
but I fail to see what 1::[2; 3] is... also considering how this
operator is called in the OCaml manual).  Multiple Value Bind can be
macroed away.   Separate namespaces are an intriguing beast.  I do
think that they are not all that needed, at least the one separating
functions from values, but then again, there are separate namespaces
in other languages as well.

Of course, your definition of "cruft" may vary.  If you want to look
at some crufty code you can peruse a source file to be fed fed to
camlp4.  Looks like the "look ma, no cons cells" has some drawbacks
after all. :)

Cheers
--
Marco


 
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.
Tamas K Papp  
View profile  
 More options Feb 1 2009, 10:57 am
Newsgroups: comp.lang.lisp
From: Tamas K Papp <tkp...@gmail.com>
Date: 1 Feb 2009 15:57:18 GMT
Local: Sun, Feb 1 2009 10:57 am
Subject: Re: What gives you power in CL, that you don't have in other languages

I think that lists built of cons cells are very neat, because Lisp
exposes the mechanism of constructing simple linked lists and you can
go under the hood if you prefer.  I would never trade this for an
"abstract" list mechanism that has some interface for traversing the
list, but if one is bothered by cons cells, such a mechanism can be
easily implemented in Lisp.  Again, the fact that it is not done
should be a hint.

I don't see why we should do away with multiple values.  Tuples are
not a replacement, since functions that return multiple values can
behave as single-values functiond if the caller does not capture the
other values.  Consider

(defun plot-function (function ...)
   ;; plots the univariate function
   ...)

(plot-function (lambda (x) (sin x)) ...)
(plot-function (lambda (x) (floor x)) ...)

With tuples, one would have to extract the first value of the tuple,
which is a nice pastime for F# programmers who love to waste their
time with patterns, but I don't really care for it.

Separate namespaces are something completely orthogonal to the issues
above.  I personally like them and they don't bother me at all.

Tamas


 
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.
Michael Ekstrand  
View profile  
 More options Feb 1 2009, 11:34 am
Newsgroups: comp.lang.lisp
From: Michael Ekstrand <mich...@elehack.net>
Date: Sun, 01 Feb 2009 10:34:01 -0600
Local: Sun, Feb 1 2009 11:34 am
Subject: Re: What gives you power in CL, that you don't have in other languages

Marco Antoniotti <marc...@gmail.com> writes:
> On Feb 1, 2:19 am, Jon Harrop <j...@ffconsultancy.com> wrote:
>> Kaz Kylheku wrote:
>> > Even if tuples in and of themselves are nice in these languages, the
>> > overall syntax is indecipherable dog's breakfast that is more geared
>> > toward obfuscated programming contests than real work.

>> No reason why Lisp 3.0 cannot have decent support for tuples and do away
>> with cons cells, multiple value bind, values, separate namespaces and all
>> the other useless cruft.

> But CL has support for tuples.  We call them vectors.

Vectors would be the CL equivalent of OCaml's arrays, not tuples.
Tuples are kind of their own thing without a direct CL conceptual
equivalent.  Sometimes they're replaced by lists, sometimes multiple
value return.  Sometimes cons cells are used where an OCaml programmer
would use 2-tuples.

> CONS cells are there in any functional language that supports lists (I
> may be stupid, but I fail to see what 1::[2; 3] is... also considering
> how this operator is called in the OCaml manual).

1::[2; 3] is (cons 1 '(2 3)).  So yes, OCaml has cons cells with the
caveat that the cdr is only allowed to point to another cons cell or nil
(improper lists are prohibited).

- Michael

--
mouse, n: A device for pointing at the xterm in which you want to type.
Confused by the strange files?  I cryptographically sign my messages.
For more information see <http://www.elehack.net/resources/gpg>.


 
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.
Marco Antoniotti  
View profile  
 More options Feb 1 2009, 2:44 pm
Newsgroups: comp.lang.lisp
From: Marco Antoniotti <marc...@gmail.com>
Date: Sun, 1 Feb 2009 11:44:58 -0800 (PST)
Local: Sun, Feb 1 2009 2:44 pm
Subject: Re: What gives you power in CL, that you don't have in other languages
On Feb 1, 5:34 pm, Michael Ekstrand <mich...@elehack.net> wrote:

Yes.  This is the fine print and everybody here - pardon my sarcasm,
not directed at you :) -  is aware of that. (aren't we all?!?)

> > CONS cells are there in any functional language that supports lists (I
> > may be stupid, but I fail to see what 1::[2; 3] is... also considering
> > how this operator is called in the OCaml manual).

> 1::[2; 3] is (cons 1 '(2 3)).  So yes, OCaml has cons cells with the
> caveat that the cdr is only allowed to point to another cons cell or nil
> (improper lists are prohibited).

Of course.  I think people here are also aware of *that*... (again,
aren't we all?!?)  :)  You for sure are.  I am, long time CLLers
are... :)

Cheers
--
Marco


 
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.
Jon Harrop  
View profile  
 More options Feb 1 2009, 4:42 pm
Newsgroups: comp.lang.lisp
From: Jon Harrop <j...@ffconsultancy.com>
Date: Sun, 01 Feb 2009 21:42:47 +0000
Local: Sun, Feb 1 2009 4:42 pm
Subject: Re: What gives you power in CL, that you don't have in other languages

Tamas K Papp wrote:
> I think that lists built of cons cells are very neat, because Lisp
> exposes the mechanism of constructing simple linked lists and you can
> go under the hood if you prefer.

Can you elaborate with an example of what you mean by "going under the
hood"?

> I would never trade this for an
> "abstract" list mechanism that has some interface for traversing the
> list, but if one is bothered by cons cells, such a mechanism can be
> easily implemented in Lisp.  Again, the fact that it is not done
> should be a hint.

That's some seriously flawed logic right there. Modern features do not get
successfully retrofitted onto Lisp because the people familiar with these
features never go back to Lisp and the few who continue to use Lisp remain
blissfully unaware of what they are missing out on.

Indeed, the confusion surrounding tuples in this thread would have
highlighted this your you had you known what tuples were used for. As it
is, you could only resort to considering far more people are choosing OCaml
and Haskell over Lisp.

> I don't see why we should do away with multiple values.  Tuples are
> not a replacement, since functions that return multiple values can
> behave as single-values functiond if the caller does not capture the
> other values.  Consider

> (defun plot-function (function ...)
>    ;; plots the univariate function
>    ...)

> (plot-function (lambda (x) (sin x)) ...)
> (plot-function (lambda (x) (floor x)) ...)

> With tuples, one would have to extract the first value of the tuple,
> which is a nice pastime for F# programmers who love to waste their
> time with patterns, but I don't really care for it.

That great "benefit" of silently dropping parts of your data.

> Separate namespaces are something completely orthogonal to the issues
> above.  I personally like them and they don't bother me at all.

Ironically, the code you just wrote was needlessly obfuscated by this
ridiculous flaw in Lisp. Specifically, you used lambdas as a workaround for
separate namespaces.

In OCaml or F#, you just do:

  plot sin
  plot floor

because the "sin" function is just another variable (and floor doesn't
return the fractional part).

--
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
http://www.ffconsultancy.com/?u


 
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.
joswig@corporate-world.li sp.de  
View profile  
 More options Feb 1 2009, 5:27 pm
Newsgroups: comp.lang.lisp
From: "jos...@corporate-world.lisp.de" <jos...@corporate-world.lisp.de>
Date: Sun, 1 Feb 2009 14:27:48 -0800 (PST)
Local: Sun, Feb 1 2009 5:27 pm
Subject: Re: What gives you power in CL, that you don't have in other languages
On 1 Feb., 22:42, Jon Harrop <j...@ffconsultancy.com> wrote:

> Ironically, the code you just wrote was needlessly obfuscated by this
> ridiculous flaw in Lisp. Specifically, you used lambdas as a workaround for
> separate namespaces.

> In OCaml or F#, you just do:

>   plot sin
>   plot floor

(plot 'sin) or (plot #'sin) works fine.

> because the "sin" function is just another variable (and floor doesn't
> return the fractional part).

CL-USER 34 > (floor 3.5)
3
0.5

CL-USER 35 > (identity (floor 3.5))
3

Read a Lisp book before you post again.


 
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.
Jon Harrop  
View profile  
 More options Feb 1 2009, 8:18 pm
Newsgroups: comp.lang.lisp
From: Jon Harrop <j...@ffconsultancy.com>
Date: Mon, 02 Feb 2009 01:18:25 +0000
Local: Sun, Feb 1 2009 8:18 pm
Subject: Re: What gives you power in CL, that you don't have in other languages

jos...@corporate-world.lisp.de wrote:
> On 1 Feb., 22:42, Jon Harrop <j...@ffconsultancy.com> wrote:
>> Ironically, the code you just wrote was needlessly obfuscated by this
>> ridiculous flaw in Lisp. Specifically, you used lambdas as a workaround
>> for separate namespaces.

>> In OCaml or F#, you just do:

>> plot sin
>> plot floor

> (plot 'sin) or (plot #'sin) works fine.

Which is comparable verbosity to the destructuring that Tamas was referring
to.

>> because the "sin" function is just another variable (and floor doesn't
>> return the fractional part).

> CL-USER 34 > (floor 3.5)
> 3
> 0.5

> CL-USER 35 > (identity (floor 3.5))
> 3

> Read a Lisp book before you post again.

$ ocaml
        Objective Caml version 3.10.2

# floor 2.3;;
- : float = 2.

Read the context before you post again.

--
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
http://www.ffconsultancy.com/?u


 
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.
Kaz Kylheku  
View profile  
 More options Feb 1 2009, 8:25 pm
Newsgroups: comp.lang.lisp
From: Kaz Kylheku <kkylh...@gmail.com>
Date: Mon, 2 Feb 2009 01:25:33 +0000 (UTC)
Local: Sun, Feb 1 2009 8:25 pm
Subject: Re: What gives you power in CL, that you don't have in other languages
On 2009-02-01, Michael Ekstrand <mich...@elehack.net> wrote:

> Marco Antoniotti <marc...@gmail.com> writes:
>> On Feb 1, 2:19 am, Jon Harrop <j...@ffconsultancy.com> wrote:
>>> Kaz Kylheku wrote:
>>> > Even if tuples in and of themselves are nice in these languages, the
>>> > overall syntax is indecipherable dog's breakfast that is more geared
>>> > toward obfuscated programming contests than real work.

>>> No reason why Lisp 3.0 cannot have decent support for tuples and do away
>>> with cons cells, multiple value bind, values, separate namespaces and all
>>> the other useless cruft.

>> But CL has support for tuples.  We call them vectors.

> Vectors would be the CL equivalent of OCaml's arrays, not tuples.

Only restricted uses of vectors in CL are equivalent to OCaml arrays.

Don't forget that a vector in CL can have heterogeneous contents.

> Tuples are kind of their own thing without a direct CL conceptual
> equivalent.

When you write the syntax for a tuple, you're making something that might be
called an anonymous struct.  It's compatible with other such structs that have
the same number of elements, of the same types, in the same order.

It is kind of to structs what lambda is to functions, loosely speaking.

It's not impossible to visualize a Lisp extension for this. Regular Lisp
structs are not anonymous. They are named, and use name equivalence.  So they
can't be used directly.  I don't see how anonymous structs like tuples would be
all that useful in Lisp.  They have no reason to exists, because if you want to
represent a pair of values, which are integer and string, respectively, just
go ahead and use a vector or list:

  #(123 "456")  ;; effectively a tuple

Tuples are used in these autistic languages like Haskell and OCaml in
situations when the programmer wants a collection of values of heterogeneous
types, but the type system gets in the way of a vector or list being used.

The problem that tuples solve does not have a counterpart in Common Lisp.

>> CONS cells are there in any functional language that supports lists (I
>> may be stupid, but I fail to see what 1::[2; 3] is... also considering
>> how this operator is called in the OCaml manual).

> 1::[2; 3] is (cons 1 '(2 3)).  So yes, OCaml has cons cells with the
> caveat that the cdr is only allowed to point to another cons cell or nil

You mean to another cons cell which holds an integer! Oops.

 
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.
joswig@corporate-world.li sp.de  
View profile  
 More options Feb 1 2009, 8:35 pm
Newsgroups: comp.lang.lisp
From: "jos...@corporate-world.lisp.de" <jos...@corporate-world.lisp.de>
Date: Sun, 1 Feb 2009 17:35:36 -0800 (PST)
Local: Sun, Feb 1 2009 8:35 pm
Subject: Re: What gives you power in CL, that you don't have in other languages
On Feb 2, 2:18 am, Jon Harrop <j...@ffconsultancy.com> wrote:

You are in the wrong context. This is not fa.caml. This is c.l.l.

Both (plot 'sin) and (plot 'floor) work fine.
The lambdas in Tamas post were not needed and your
post about some namespace blabla is only babbling.
The LAMBDA macro is also not a workaround since it is not needed,
since the functions objects can be passed directly.

You should better work on your F# business instead of
wasting time with comp.lang.lisp.


 
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 1 - 25 of 56   Newer >
« Back to Discussions « Newer topic     Older topic »