help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Partition for Emacs Lisp


From: Marc Tfardy
Subject: Re: Partition for Emacs Lisp
Date: Sun, 28 Jun 2009 22:11:41 +0200
User-agent: Thunderbird 2.0.0.22 (Windows/20090605)

Xah Lee schrieb:

> On Jun 28, 6:26 am, Marc Tfardy <b...@cyk.cyk> wrote:
>> Hi!
>>
>> I looking for a ELISP function that do the job like Partition in
>> Mathematica. The simplest case:
>>
>> (partition '(a b c d e f) 2)
>>
>> should return:
>> ((a b) (c d) (e f))
>>
>> Is there something ready out from the box?
>>
>> In more sophisticated cases one can define overlap with offset and much
>> more interesting things - look 
at:http://documents.wolfram.com/mathematica/functions/Partition
>
> there's no such function. You have to write it yourself.
>
> my experiences with lisps from Mathematica is that, most basic list
> processing functions in Mathematica does not exist in lisp, and in
> general, there's no coherent libraries to use either.

This is unfortunately my experience too. After 10+ years with
Mathematica and after my swtich to (Emacs) Lisp I miss many of
mathematica functions and concepts. (for explanation - I used
mathematica primary in non-mathematical way, simply as all purpose
programming language.)

> Everyone just write it from scratch. (it's not easy to write them
> either, due to the cons business) things like Partition, Flatten,
> Part, Level, etc gets asked every maybe 3 months for example in
> comp.lang.lisp over the past decade, and the answers are always wild.

I wonder that no one implemented this stuff years ago in Common Lisp
(and of course in ELISP). This would be so useful!


> might be of interest:
>
> • Xah Lee's Computing Experience Bio
>   http://xahlee.org/PageTwo_dir/Personal_dir/xah_comp_exp.html
>
> • Fundamental Problems of Lisp
>   http://xahlee.org/UnixResource_dir/writ/lisp_problems.html
>
> the first one is some of my experience from Mathematica to lisp. The
> second one is about the cons business, and the shock that lisp doesn't
> do list procesing well.

I flew over your articles and I must say I don't agree with your opinion
at 100%. Mathematica as language is very pretty and incredible clear,
indeed (I love this, really), but it have some serious diseases: it is
not free, it is very expensive, no compiler - not even one that generate
some special binary code independent from whole big and expensiv
mathematica as application, no real debugger (at least up to mathematica
5 - my last version), and at the beginning i was in addition slow,
sometimes very slow. By contrast Common Lisp is since years ANSI
standardized, wide variety of implementation, compiler and iterpreter
available - free and commercial, CL can generate very fast code and...
the language is still very, very consistent and pretty - simple and
powerful. I love Lisp, too.

regards
Marc



reply via email to

[Prev in Thread] Current Thread [Next in Thread]