Can anyone consider adding these functions to lisp?
In particular, i'm thinking Qi, NewLisp would be very good candidates.
The official list of Mathematica's list manipulation functions is
here:
http://reference.wolfram.com/mathematica/guide/ListManipulation.html
It may be overwhelming for anyone exposed to it for the first time.
But the following is few of the most powerful, essential ones, with
some comment on the side.
I want the following functions:
--------------------------------------------------
(in the following, tree will mean nested list of arbitrary shape. A
node will mean a leaf or a branch of a tree)
-------------
Tree generators:
• Table; generate arbitrary rectangular tree by eval vars in a nested
loop
-------------
List/Tree parts extraction:
• Part ; http://reference.wolfram.com/mathematica/ref/Part.html
returns a collection of nodes from a given tree, using a sequence of
indexes
• Take ; http://reference.wolfram.com/mathematica/ref/Take.html
• Extract ; http://reference.wolfram.com/mathematica/ref/Extract.html
• Select ; http://reference.wolfram.com/mathematica/ref/Select.html
gets sublist by appyling a predicate function (like grep/filter)
• Cases; http://reference.wolfram.com/mathematica/ref/Cases.html
return nodes of a tree that matches a pattern
-------------
• ReplacePart
• Flatten; flattens all, or up to level n, or only those with
particular head
• Position ; returns the index(es) of a particular node (or pattern)
• Partition; chop list to sublists; generalized to cover trees at
arbitrary levels and specify overlapping and cyclic results
• Transpose; transposition of arbitrary dimensional matrix
(rectangular tree)
this is not exhaustive list... there are few others.... and this
message is botched... but my attention span ran out now.
few years ago, i started a project to implement each of these in Perl,
Python, lisp, Java, but the project got botched. ( http://xahlee.org/tree/tree.html
) Part of the reason is that i'm ambivalent about carrying it out
thoroughly, in part there are legal ramifications, in part i'm not so
sure i want to spread the extremely quality design to the Open Source
community fuck.
Xah
···@xahlee.org
∑ http://xahlee.org/
☄
> Part of the reason is that i'm ambivalent about carrying it out
> thoroughly, in part there are legal ramifications, in part i'm not so
> sure i want to spread the extremely quality design to the Open Source
> community fuck.
>
> Xah
> ····@xahlee.org
> ∑http://xahlee.org/
>
> ☄
I can't speak for NewLisp, but Qi II will be MIT licensed so you're
free from that worry.
Mark
Hi Mark,
Sorry for bad language. What i actually meant is that, if one copies
Mathematica's list manipulations wholesale into other langs, it may
infringe Wolfram Research's intellectual properties.
Xah
···@xahlee.org
∑ http://xahlee.org/
☄
On Feb 11, 1:19 am, Mark Tarver <··········@ukonline.co.uk> wrote:
> > Part of the reason is that i'm ambivalent about carrying it out
> > thoroughly, in part there are legal ramifications, in part i'm not so
> > sure i want to spread the extremely quality design to the Open Source
> > community fuck.
>
> > Xah
> > ····@xahlee.org
> > ∑http://xahlee.org/
>
> > ☄
>
> I can't speak for NewLisp, but Qi II will be MIT licensed so you're
> free from that worry.
>
> Mark
On 11 Feb, 09:55, Xah Lee <····@xahlee.org> wrote:
> Hi Mark,
>
> Sorry for bad language. What i actually meant is that, if one copies
> Mathematica's list manipulations wholesale into other langs, it may
> infringe Wolfram Research's intellectual properties.
>
> Xah
> ····@xahlee.org
> ∑http://xahlee.org/
>
> ☄
>
> On Feb 11, 1:19 am, Mark Tarver <··········@ukonline.co.uk> wrote:
>
>
>
> > > Part of the reason is that i'm ambivalent about carrying it out
> > > thoroughly, in part there are legal ramifications, in part i'm not so
> > > sure i want to spread the extremely quality design to the Open Source
> > > community fuck.
>
> > > Xah
> > > ····@xahlee.org
> > > ∑http://xahlee.org/
>
> > > ☄
>
> > I can't speak for NewLisp, but Qi II will be MIT licensed so you're
> > free from that worry.
>
> > Mark- Hide quoted text -
>
> - Show quoted text -
A lot of those functions have been around in CL for years implemented
by CL programmers in applications or as part of the language standard.
I don't think you should be intimidated from producing your work
because it has been influenced by your experiences with Mathematica.
From what I can see their lawyers would have a very hard job making it
stick. Go and do what you want to do.
Mark
Mark Tarver <··········@ukonline.co.uk> wrote:
«A lot of those [mathematica's list manipulation] functions have been
around in CL for years implemented by CL programmers in applications
or as part of the language standard.»
You speak too quick Mark.
From what i know of emacs lisp, and scheme literature (reading the
sicp book and r4rs a decade ago), and from the discussions i see from
Common Lispers here, CL has nothing like the complete set of
Mathematica's list manipulating functions. (you might want to argue
this point, thinking that since i don't know technical details of CL
so i might be wrong, but i'm quite sure of this.)
As far as i know, the closest lang that might have something
_similar_, is APL/J family.
(so called “array programing langs”
See Wikipedia here:
http://en.wikipedia.org/wiki/Array_programming_language
Note that Wikipedia lists Matlab as one. I've touched Matlab a bit in
the past. Matlab's functions have nothing near the consistency and
generalization of Mathematica's.
)
> I don't think you should be intimidated from producing your work
> because it has been influenced by your experiences with Mathematica.
> From what I can see their lawyers would have a very hard job making it
> stick. Go and do what you want to do.
Assign the job to Kenny Tilton. He seems to have nothing to do all
day.
I might do it for emacs lisp down the road for practical reasons (so
that when i program in elisp, i can use these without bothering with
cons business). I think you should consider doing it for Qi... it
really empowers the lang.
Xah
···@xahlee.org
∑ http://xahlee.org/
☄
> From what i know of emacs lisp, and scheme literature (reading the
> sicp book and r4rs a decade ago), and from the discussions i see from
> Common Lispers here, CL has nothing like the complete set of
> Mathematica's list manipulating functions. (you might want to argue
> this point, thinking that since i don't know technical details of CL
> so i might be wrong, but i'm quite sure of this.)
OK, fair enough. Some of those functions listed in your ref are in CL
though.
Generally CL programmers take list handling stuff for granted and its
so simple to roll your own that we don't fret too much if the language
spec does not include a specific operation. It would be very hard to
persuade people to part with $ for this. But maybe Mathematica
includes some really mind-bending operations which it is good to have
in a library.
Mark
On 11 Feb., 13:00, Xah Lee <····@xahlee.org> wrote:
> Mark Tarver <··········@ukonline.co.uk> wrote:
>
> «A lot of those [mathematica's list manipulation] functions have been
> around in CL for years implemented by CL programmers in applications
> or as part of the language standard.»
>
> You speak too quick Mark.
>
> From what i know of emacs lisp, and scheme literature (reading the
> sicp book and r4rs a decade ago), and from the discussions i see from
> Common Lispers here, CL has nothing like the complete set of
> Mathematica's list manipulating functions.
Since when is it forbidden to implement some algorithms, assuming
nobody has a patent on them?
For this, we don't even have to discuss the utterly absurd notion of a
patent on algorithms. The only question is, whether the "complete set
of Mathematica's list manipulating functions in any language of the
world" is patented or not.
On Mon, 11 Feb 2008 06:34:53 -0800 (PST), Ingo Menger
<···········@consultant.com> wrote:
>On 11 Feb., 13:00, Xah Lee <····@xahlee.org> wrote:
>> Mark Tarver <··········@ukonline.co.uk> wrote:
>>
>> �A lot of those [mathematica's list manipulation] functions have been
>> around in CL for years implemented by CL programmers in applications
>> or as part of the language standard.�
>>
>> You speak too quick Mark.
>>
>> From what i know of emacs lisp, and scheme literature (reading the
>> sicp book and r4rs a decade ago), and from the discussions i see from
>> Common Lispers here, CL has nothing like the complete set of
>> Mathematica's list manipulating functions.
>
>Since when is it forbidden to implement some algorithms, assuming
>nobody has a patent on them?
>For this, we don't even have to discuss the utterly absurd notion of a
>patent on algorithms. The only question is, whether the "complete set
>of Mathematica's list manipulating functions in any language of the
>world" is patented or not.
The algorithms may be PD, but Wolfram may have a copyright on the API
which you _might_ be infringing by implementing it elsewhere. "Look
and feel" copyrights are a PITA because you can never predict how a
judge will perceive similarities.
George
--
for email reply remove "/" from address
Den Mon, 11 Feb 2008 19:01:05 -0500 skrev George Neuner:
> On Mon, 11 Feb 2008 06:34:53 -0800 (PST), Ingo Menger
> <···········@consultant.com> wrote:
>
>>On 11 Feb., 13:00, Xah Lee <····@xahlee.org> wrote:
>>> Mark Tarver <··········@ukonline.co.uk> wrote:
>>>
>>> «A lot of those [mathematica's list manipulation] functions have been
>>> around in CL for years implemented by CL programmers in applications
>>> or as part of the language standard.»
>>>
>>> You speak too quick Mark.
>>>
>>> From what i know of emacs lisp, and scheme literature (reading the
>>> sicp book and r4rs a decade ago), and from the discussions i see from
>>> Common Lispers here, CL has nothing like the complete set of
>>> Mathematica's list manipulating functions.
>>
>>Since when is it forbidden to implement some algorithms, assuming nobody
>>has a patent on them?
>>For this, we don't even have to discuss the utterly absurd notion of a
>>patent on algorithms. The only question is, whether the "complete set of
>>Mathematica's list manipulating functions in any language of the world"
>>is patented or not.
>
> The algorithms may be PD, but Wolfram may have a copyright on the API
> which you _might_ be infringing by implementing it elsewhere. "Look and
> feel" copyrights are a PITA because you can never predict how a judge
> will perceive similarities.
Are you sure you can copyright APIs at all? IANAL and IANEAUC[1], but I
seem to recall that there were precendents at least in the US copyright
law that made .h files and their kin NOT copyrighteable.
Cheers,
Maciej
[1] I Am Not Even A US Citizen
On Tue, 12 Feb 2008 17:25:45 +0000 (UTC), Maciej Katafiasz
<········@gmail.com> wrote:
>Den Mon, 11 Feb 2008 19:01:05 -0500 skrev George Neuner:
>
>> On Mon, 11 Feb 2008 06:34:53 -0800 (PST), Ingo Menger
>> <···········@consultant.com> wrote:
>>
>>>On 11 Feb., 13:00, Xah Lee <····@xahlee.org> wrote:
>>>> Mark Tarver <··········@ukonline.co.uk> wrote:
>>>>
>>>> �A lot of those [mathematica's list manipulation] functions have been
>>>> around in CL for years implemented by CL programmers in applications
>>>> or as part of the language standard.�
>>>>
>>>> You speak too quick Mark.
>>>>
>>>> From what i know of emacs lisp, and scheme literature (reading the
>>>> sicp book and r4rs a decade ago), and from the discussions i see from
>>>> Common Lispers here, CL has nothing like the complete set of
>>>> Mathematica's list manipulating functions.
>>>
>>>Since when is it forbidden to implement some algorithms, assuming nobody
>>>has a patent on them?
>>>For this, we don't even have to discuss the utterly absurd notion of a
>>>patent on algorithms. The only question is, whether the "complete set of
>>>Mathematica's list manipulating functions in any language of the world"
>>>is patented or not.
>>
>> The algorithms may be PD, but Wolfram may have a copyright on the API
>> which you _might_ be infringing by implementing it elsewhere. "Look and
>> feel" copyrights are a PITA because you can never predict how a judge
>> will perceive similarities.
>
>Are you sure you can copyright APIs at all? IANAL and IANEAUC[1],
Yes, APIs can be both copyrighted and patented. My father and sister
are IP attorneys so I am quite certain of this. I myself am not an
attorney, but I speak legalese fluently and I generally keep up with
changes in IP law because it increasingly affects everything software.
****
Disclaimer: don't take my word for anything ... if you have questions
or concerns consult a qualified IP attorney.
****
>but I seem to recall that there were precendents at least in the US
>copyright law that made .h files and their kin NOT copyrighteable.
In fact all code is copyrightable - both sources and binaries.
Human readable .h files and the like are copyrighted by default under
the Berne convention. Binary files produced by a tool from human
readable source are derivative works covered by the copyright on the
source that produced them. Once assembled into a distribution, the
distribution itself is copyrightable.
So the .h file itself is copyrighted as an original work. In
addition, particular contents of the file may be covered under
separate copyright which the file's author has license to reproduce or
derive (either by being also the author of the included information or
by contract with the original author or his delegate). This would be
the case with the API representation contained in the file.
So the rights conferred with an .h file may be quite complicated. For
example, the user may have limited reproduction rights (e.g., he can
give copies to coworkers), may use the file in his own original work,
but may not alter the file or transfer it to anyone not directly
involved in his work, and may not use it to develop a derivative work
(aka. a competing implementation).
George
--
for email reply remove "/" from address
On Feb 9, 5:38 pm, Xah Lee <····@xahlee.org> wrote:
> Can anyone consider adding these functions to lisp?
>
> The official list of Mathematica's list manipulation functions is
> here:http://reference.wolfram.com/mathematica/guide/ListManipulation.html
Xah, are you aware that many of the ideas in Mathematica came from
Macsyma for which there is now a GPL licensed version Maxima? See:
http://directory.fsf.org/project/maxima/
http://en.wikipedia.org/wiki/Macsyma
This means that the functions you have listed have already been
implemented in Common Lisp; look at the source code.
The Common Lisp Wiki, CLiki, also lists several mathematics packages
implemented in Common Lisp: Matlisp, Axiom, and Octave to name a few.
http://www.cliki.net/Mathematics
If you have a look at those packages, it might help you to decide how
to distinguish your proposed implementation in terms of innovation and
creativity.
Also, this kind of implementation in Common Lisp would already be
quite a mammoth task in itself, so I wouldn't try to do the same thing
in Python, Java, etc simultaneously - or the project will get botched
again.
agt
On 9 Feb, 22:38, Xah Lee <····@xahlee.org> wrote:
> Can anyone consider adding these functions to lisp?
>
> In particular, i'm thinking Qi, NewLisp would be very good candidates.
>
> The official list of Mathematica's list manipulation functions is
> here:http://reference.wolfram.com/mathematica/guide/ListManipulation.html
>
> It may be overwhelming for anyone exposed to it for the first time.
> But the following is few of the most powerful, essential ones, with
> some comment on the side.
>
> I want the following functions:
> --------------------------------------------------
>
> (in the following, tree will mean nested list of arbitrary shape. A
> node will mean a leaf or a branch of a tree)
>
> -------------
> Tree generators:
>
> • Table; generate arbitrary rectangular tree by eval vars in a nested
> loop
>
> -------------
> List/Tree parts extraction:
>
> • Part ;http://reference.wolfram.com/mathematica/ref/Part.html
>
> returns a collection of nodes from a given tree, using a sequence of
> indexes
>
> • Take ;http://reference.wolfram.com/mathematica/ref/Take.html
>
> • Extract ;http://reference.wolfram.com/mathematica/ref/Extract.html
>
> • Select ;http://reference.wolfram.com/mathematica/ref/Select.html
>
> gets sublist by appyling a predicate function (like grep/filter)
>
> • Cases;http://reference.wolfram.com/mathematica/ref/Cases.html
>
> return nodes of a tree that matches a pattern
>
> -------------
>
> • ReplacePart
>
> • Flatten; flattens all, or up to level n, or only those with
> particular head
>
> • Position ; returns the index(es) of a particular node (or pattern)
>
> • Partition; chop list to sublists; generalized to cover trees at
> arbitrary levels and specify overlapping and cyclic results
>
> • Transpose; transposition of arbitrary dimensional matrix
> (rectangular tree)
>
> this is not exhaustive list... there are few others.... and this
> message is botched... but my attention span ran out now.
>
> few years ago, i started a project to implement each of these in Perl,
> Python, lisp, Java, but the project got botched. (http://xahlee.org/tree/tree.html
> ) Part of the reason is that i'm ambivalent about carrying it out
> thoroughly, in part there are legal ramifications, in part i'm not so
> sure i want to spread the extremely quality design to the Open Source
> community fuck.
>
> Xah
> ····@xahlee.org
> ∑http://xahlee.org/
>
> ☄
What would be a lot more useful than reimplementing a lot of stuff
thats probably in the CL maths library; is to go in and look at these
systems. What can they do and which do you think is best? Then
choose your favourite system S and think about the numerical type
theory of the library functions. Qi gives you the power to assign
types to imported CL functions. So you could produce a type secure
version of S which can be loaded into Qi as a maths package and you
can do type secure maths.
Mark
Its actually useful to be able to rev
On Feb 12, 12:48 pm, Mark Tarver <··········@ukonline.co.uk> wrote:
> On 9 Feb, 22:38, Xah Lee <····@xahlee.org> wrote:
>
>
>
> > Can anyone consider adding these functions to lisp?
> What would be a lot more useful than reimplementing a lot of stuff
> thats probably in the CL maths library; is to go in and look at these
> systems. What can they do and which do you think is best? Then
> choose your favourite system S and think about the numerical type
> theory of the library functions. Qi gives you the power to assign
> types to imported CL functions. So you could produce a type secure
> version of S which can be loaded into Qi as a maths package and you
> can do type secure maths.
Xah:
I recently discovered that there is new, ongoing work on implementing
more efficient mathematical algorithms in Lisp. Tamas Papp's cl-sparse-
matrix,
http://www.cliki.net/cl-sparsematrix
and Jeronimo Pellegrini's Spartns,
http://aleph0.info/spartns/
http://groups.google.com/group/comp.lang.lisp/browse_thread/thread/f8a3e184bfa86039
are examples of new implementations, while the group "lisp-matrix-
devel"
http://groups.google.com/group/lisp-matrix-devel
aims to develop better optimized, faster Lisp code for numerical
linear algebra.
Mark's suggestion is a good idea, but my previous comment was really
the result of my own concerns about the efficiency of mathematical
algorithms coded in Lisp, of which I was again reminded recently while
running through the final chapters of Lisp 3rd edition; see my code
here:
:
http://groups.google.com/group/lisp-matrix-devel/msg/0aa2558c261459c0
agt