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
Functional Programing: stop using recursion, cons. Use map & vectors
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
  10 messages - Collapse all  -  Translate all to Translated (View all originals)
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
 
Xah Lee  
View profile  
 More options May 22 2011, 6:47 pm
Newsgroups: comp.lang.lisp, comp.lang.python, comp.lang.scheme, comp.lang.functional
From: Xah Lee <xah...@gmail.com>
Date: Sun, 22 May 2011 15:47:53 -0700 (PDT)
Local: Sun, May 22 2011 6:47 pm
Subject: Functional Programing: stop using recursion, cons. Use map & vectors

this is important but i think most lispers and functional programers
still don't know it.

Functional Programing: stop using recursion, cons. Use map & vectors.

〈Guy Steele on Parallel Programing〉
http://xahlee.org/comp/Guy_Steele_parallel_computing.html

btw, lists (as cons, car, cdr) in the lisp world has always been some
kinda cult. Like, if you are showing some code example and you
happened to use lisp vector datatype and not cons (lists) and it
doesn't really matter in your case, but some lisper will always rise
up to bug you, either as innocent curious question or attacking you
for not “understanding” lisp. (just as other idiocies happen in other
lang that lispers see but other langs don't see)

it's interesting to me that all other high level langs: Mathematica,
perl, python, php, javascript, all don't have linked list as lisp's
list. It's also curious that somehow lispers never realises this. I've
been having problems with lisp's cons ever since i'm learning Scheme
Lisp in 1998 (but mostly the reason is language design at syntax and
lack of abstraction level in calling “cons, car, cdr” stuff, without
indexing mechanism). Realizing the algorithmic property and parallel-
execution issues of linked list is only recent years.

 Xah


 
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.
Deeyana  
View profile  
 More options May 22 2011, 10:29 pm
Newsgroups: comp.lang.lisp, comp.lang.python, comp.lang.scheme, comp.lang.functional
From: Deeyana <d.awlb...@hotmail.invalid>
Date: Mon, 23 May 2011 02:29:26 +0000 (UTC)
Local: Sun, May 22 2011 10:29 pm
Subject: Re: Functional Programing: stop using recursion, cons. Use map & vectors

You might be interested in Clojure, then. Lists are more abstracted, like
in Scheme, and vectors and also dictionaries/maps and sets are first
class citizens along side lists. And unlike Scheme, Clojure has good
library/host interop support. You can write real-world applications in it
without spontaneously combusting.

 
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  
View profile  
 More options May 23 2011, 3:52 am
Newsgroups: comp.lang.lisp, comp.lang.python, comp.lang.scheme, comp.lang.functional
From: asandroq <asand...@gmail.com>
Date: Mon, 23 May 2011 00:52:07 -0700 (PDT)
Local: Mon, May 23 2011 3:52 am
Subject: Re: Functional Programing: stop using recursion, cons. Use map & vectors
On May 23, 4:29 am, Deeyana <d.awlb...@hotmail.invalid> wrote:

> You might be interested in Clojure, then. Lists are more abstracted, like
> in Scheme, and vectors and also dictionaries/maps and sets are first
> class citizens along side lists. And unlike Scheme, Clojure has good
> library/host interop support. You can write real-world applications in it
> without spontaneously combusting.

     Nonsense. Several Scheme systems have excellent FFIs with more
than "good library/host interop support".

-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.
Torben 苂idius Mogensen  
View profile  
 More options May 23 2011, 4:51 am
Newsgroups: comp.lang.lisp, comp.lang.python, comp.lang.scheme, comp.lang.functional
From: torb...@diku.dk (Torben 苂idius Mogensen)
Date: Mon, 23 May 2011 10:51:44 +0200
Local: Mon, May 23 2011 4:51 am
Subject: Re: Functional Programing: stop using recursion, cons. Use map & vectors

Xah Lee <xah...@gmail.com> writes:
> Functional Programing: stop using recursion, cons. Use map & vectors.

> 〈Guy Steele on Parallel Programing〉
> http://xahlee.org/comp/Guy_Steele_parallel_computing.html

This is more or less what Backus said in his Turing Award lecture about
FP.

        Torben


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Pascal J. Bourguignon  
View profile  
 More options May 23 2011, 9:39 am
Newsgroups: comp.lang.lisp, comp.lang.python, comp.lang.scheme, comp.lang.functional
From: "Pascal J. Bourguignon" <p...@informatimago.com>
Date: Mon, 23 May 2011 15:39:11 +0200
Local: Mon, May 23 2011 9:39 am
Subject: Re: Functional Programing: stop using recursion, cons. Use map & vectors
torb...@diku.dk (Torben Ęgidius Mogensen) writes:

> Xah Lee <xah...@gmail.com> writes:

>> Functional Programing: stop using recursion, cons. Use map & vectors.

>> 〈Guy Steele on Parallel Programing〉
>> http://xahlee.org/comp/Guy_Steele_parallel_computing.html

> This is more or less what Backus said in his Turing Award lecture about
> FP.

Stop inflating his ego!  Next he'll quote Nobel prize winners...

--
__Pascal Bourguignon__                     http://www.informatimago.com/
A bad day in () is better than a good day in {}.


 
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.
Antti J Ylikoski  
View profile  
 More options May 23 2011, 12:36 pm
Newsgroups: comp.lang.lisp, comp.lang.python, comp.lang.scheme, comp.lang.functional
From: Antti J Ylikoski <antti.yliko...@tkk.fi>
Date: Mon, 23 May 2011 19:36:20 +0300
Local: Mon, May 23 2011 12:36 pm
Subject: Re: Functional Programing: stop using recursion, cons. Use map & vectors
On 23.5.2011 16:39, Pascal J. Bourguignon wrote:

> torb...@diku.dk (Torben Ęgidius Mogensen) writes:

>> Xah Lee<xah...@gmail.com>  writes:

>>> Functional Programing: stop using recursion, cons. Use map&  vectors.

>>> 〈Guy Steele on Parallel Programing〉
>>> http://xahlee.org/comp/Guy_Steele_parallel_computing.html

>> This is more or less what Backus said in his Turing Award lecture about
>> FP.

> Stop inflating his ego!  Next he'll quote Nobel prize winners...

Well said.... That inspired me to note:

LISP without recursion would be like a jet airplane without wings....
Recursion is an important part of the functional programming paradigm
(yes, I do know that LISP is not a purely functional language...)

LISP denotes, List Processing.  List Processing without cons ?????  Ugh.

regards, andy


 
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.
Deeyana  
View profile  
 More options May 23 2011, 6:27 pm
Newsgroups: comp.lang.lisp, comp.lang.python, comp.lang.scheme, comp.lang.functional
From: Deeyana <d.awlb...@hotmail.invalid>
Date: Mon, 23 May 2011 22:27:11 +0000 (UTC)
Local: Mon, May 23 2011 6:27 pm
Subject: Re: Functional Programing: stop using recursion, cons. Use map & vectors

On Mon, 23 May 2011 00:52:07 -0700, asandroq wrote:
> On May 23, 4:29 am, Deeyana <d.awlb...@hotmail.invalid> wrote:

>> You might be interested in Clojure, then. Lists are more abstracted,
>> like in Scheme, and vectors and also dictionaries/maps and sets are
>> first class citizens along side lists. And unlike Scheme, Clojure has
>> good library/host interop support. You can write real-world
>> applications in it without spontaneously combusting.

>      Nonsense.

Classic unsubstantiated and erroneous claim. Nothing that I write is ever
"nonsense".

> Several Scheme systems have excellent FFIs with more than "good library/
> host interop support".

Classic unsubstantiated and erroneous claim. Scheme does not come OOTB
with any suitable libraries for host interop and though it can make calls
to C libraries, doing so is awkward and involves difficulties with the
impedance mismatch between Scheme's data structures and C's char *, void
*, int, double, array, etc. types. To top it off, C lacks automatic
memory management, which means you'll have to concern yourself with
manually disposing of allocated data structures used in interop. (Or,
worse, things will get garbage collected by the Scheme runtime that the
Scheme code no longer references, but the C library is still using, and
bam! SIGSEGV.)

And then you gain what, the diverse mix of platform-specific, unportable,
sometimes-wonky C libraries?

Versus Clojure immediately granting simple, easy to use access to a large
standard Java library that works more or less the same across a broad
range of host platforms, as well as the rest of the JVM library
ecosystem, which mostly has the same qualities. Clojure being designed
for the JVM, there's much less of an impedance mismatch with Java's
types, and the interop call syntax is easy to master and won't set your
hair on fire.


 
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  
View profile  
 More options May 24 2011, 4:39 pm
Newsgroups: comp.lang.lisp, comp.lang.python, comp.lang.scheme, comp.lang.functional
From: asandroq <asand...@gmail.com>
Date: Tue, 24 May 2011 13:39:15 -0700 (PDT)
Local: Tues, May 24 2011 4:39 pm
Subject: Re: Functional Programing: stop using recursion, cons. Use map & vectors
On May 24, 12:27 am, Deeyana <d.awlb...@hotmail.invalid> wrote:

> Classic unsubstantiated and erroneous claim. Scheme does not come OOTB
> with any suitable libraries for host interop and though it can make calls
> to C libraries, doing so is awkward and involves difficulties with the
> impedance mismatch between Scheme's data structures and C's char *, void
> *, int, double, array, etc. types. To top it off, C lacks automatic
> memory management, which means you'll have to concern yourself with
> manually disposing of allocated data structures used in interop. (Or,
> worse, things will get garbage collected by the Scheme runtime that the
> Scheme code no longer references, but the C library is still using, and
> bam! SIGSEGV.)

Classic unsubstantiated and erroneous claim.

 
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.
Deeyana  
View profile  
 More options May 24 2011, 8:03 pm
Newsgroups: comp.lang.lisp, comp.lang.python, comp.lang.scheme, comp.lang.functional
From: Deeyana <d.awlb...@hotmail.invalid>
Date: Wed, 25 May 2011 00:03:17 +0000 (UTC)
Local: Tues, May 24 2011 8:03 pm
Subject: Re: Functional Programing: stop using recursion, cons. Use map & vectors

On Tue, 24 May 2011 13:39:15 -0700, asandroq wrote:
> On May 24, 12:27 am, Deeyana <d.awlb...@hotmail.invalid> wrote:

>> Classic unsubstantiated and erroneous claim. Scheme does not come OOTB
>> with any suitable libraries for host interop and though it can make
>> calls to C libraries, doing so is awkward and involves difficulties
>> with the impedance mismatch between Scheme's data structures and C's
>> char *, void *, int, double, array, etc. types. To top it off, C lacks
>> automatic memory management, which means you'll have to concern
>> yourself with manually disposing of allocated data structures used in
>> interop. (Or, worse, things will get garbage collected by the Scheme
>> runtime that the Scheme code no longer references, but the C library is
>> still using, and bam! SIGSEGV.)

> Classic unsubstantiated and erroneous claim.

On your part, asandroq.

 
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.
dihedral88...@googlemail.com  
View profile  
 More options Oct 11 2011, 4:01 am
Newsgroups: comp.lang.functional
From: dihedral88...@googlemail.com
Date: Tue, 11 Oct 2011 01:01:47 -0700 (PDT)
Local: Tues, Oct 11 2011 4:01 am
Subject: Re: Functional Programing: stop using recursion, cons. Use map & vectors
In my experience of using recursion of multiple levels, the following situations are possible:

1. unpredictable chained close loop recursion that will hang in some bugs

2. with those nested calls in a single line, the old style step-by-step break down  for debugging becomes really inconveniently    


 
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.
End of messages
« Back to Discussions « Newer topic     Older topic »