> From: Jon Harrop <use...@[EMAIL PROTECTED]
>
> During my PhD I needed to convolve two "lists" and I found a
> serious bug in Mathematica's ListConvolve function where it was
> silently destroying its input (my data!).
Does the do***entation clearly say it's a destructive operation? If
not, I agree it's a *horrible* bug, so that function needs to be
avoided (until the bug is fixed). But ...
> I also wanted to use Mathematica's Compile function to improve
> the performance of a function but discovered that it hung on
> recursive functions (!). Mathematica 6 addresses this problem by
> rejecting all recursive definitions. Can you imagine if Lisp's EVAL
> hung on or rejected recursive functions?!
IMO that's a showstopper, a complete language rejector! The only
language I ever used that didn't sup****t recursion was FORTRAN
("with format" and "2d") circa 1964-67 and possibly also FORTRAN IV
a few years later. The reason was that it stored the return address in
an impure cell contiguous with the function instead of on a separate
stack, so each function had only one such place to hold *its* *own*
return address. (First *-* for emphasis, like bold. Second *-* to
denote computer science jargon "own variables" which are privately
accessible but static bound.) FORTRAN IV on VM/CMS (as recently as
1991 when I last worked at Stanford) had a similar problem: IBM
linkage, used by FORTRAN, has all registers saved and restored by
means of a block of memory, one such block per function. (Note that
even if a function actually changes only a couple registers, all
sixteen of them are saved and restored, for simplicity, not
efficiency.)
> My PhD was largely on wavelets so I obtained Wolfram Research's
> own ($595!) WaveletExplorer add-on only to discover that they deal
> solely with discrete wavelets and completely ignore continuous
> wavelets.
Why didn't you ask around on newsgroups for consumer feedback, like
the book reviews o Amazon.com, before making such a significant
purchase for which you'd need a requisition rather than take
(shake?) out of the petty cash jar (piggy bank?)?
> Also, I needed textbook data structures and algorithms during my
> PhD and found that Mathematica not only lacked them but could not
> be used to implement them efficiently. Given that an efficient set
> union is impossible for Mathematica users, for example, I would not
> say that its standard library is comprehensive even in the context
> of mathematics, let alone general-purpose computing.
If what you say is true, that's pretty awful. What low-level
primitive is missing such that you can't even efficiently roll your
own? What do you classify as "efficient" for set union? Do you have
in mind using lists (with duplicates already eliminated) for
emulating each set, and a hash table for registering all the
elements in each set, and thereby being able to efficiently detect
which elements are in both sets (for example by mapping down the
elements of the smaller set checking if they are also in the
hashtable of the larger set), hence need to be put just once in the
union?
> Putting everything into the standard library is only useful if
> you do not have a package manager.
That's a good point. Actually the word "package" doesn't mean the
same thing in different languages, so more needs to be said here.
First, there are two primary meanings of the term:
- A namespace (that's what "package" means in Common Lisp, and at a
higher level what it means in Java where a package is the next
level above a class but a class is really the namespace of
interest except when doing include package.*)
- A single file of utilities to be loaded
In languages such as C which have only one namespace, the second
meaning is used. include "stdio.h" causes a single file to be
included in the source causing (usually) a single compiled file to
be loaded at load time. A "package manager" for C is nothing more
than the collection of header files to pick-and-choose inclusion in
source, and corresponding do***entation so that application
programmers know which heaader hence library to include.
In languages like Lisp, where there are many packages, but there's
a USER package for developing new code, and programmers do most
development work peacemeal within a single invocation of the
runtime environment, loading source files or even indiidual
functions one by one, there's a "package manager" within the core
language to deal with keeping track of which packages are loaded
and what symbols are in each package, but also another kind of
"package manager" consisting of whatever method (such as asdf, or
undefined-function-autoload-hook) is used to load individual files
as needed.
I take it from what you say that Mathematica has only one name
space and no way to incrementally load new files as it's discovered
that some function/method within them is needed for the task in
progress (triggered by encountering an undefined function) or even
the next task to start (invoked by the user manually)?


|