Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> The exact thing you seem to want, which is "what does a LISP programmer need to know about WL?" doesn't exist,

I would want a spec of the basics of the language. Not a collection of vague statements and some examples.

> The tutorial goes into more depth [2].

A tutorial goes into more depth than the main documentation? Really?

If you read the tutorial, you see that the compiler is far from being able what a modern compiler for Lisp, SML, OCAML or Haskell does. The Wolfram compiler is mostly there to speed up some simple numeric processing. As you can see the parameters need to be numbers or 'logical variables'.

> compilation can speed up execution by a factor as large as 20.

Which is completely vague...

> For more complicated functions, such as BesselK or Eigenvalues, most of the computation time is spent executing internal Wolfram Language algorithms, on which compilation has no effect.

That more or less shows how primitive the compiler is.

> Compile can handle approximate real numbers that have machine precision, but it cannot handle arbitrary‐precision numbers

...

> An important feature of Compile is that it can handle not only mathematical expressions, but also various simple Wolfram Language programs.

Wow.

> Thus, for example, Compile can handle conditionals and control flow structures.

Really.



WL is similar to Python: it is predominantly an interpreted language. Where that becomes a problem, we wrap other libraries, or move small chunks of code into a VM to avoid the cost of the evaluator, or to C and then compile that (a rather roundabout way of doing things that will improve when we move to LLVM).

But as I said before, CPython is a close analogy for where we are at. What we don't have yet is the equivalent of PyPy. Still, if you were to make this kind of dismissive critique against the maintainers of CPython, I think most people would find it kind of silly.

Also, one should note that this documentation was written during an era when perhaps most of Mathematica's user base were people doing math, for which the primary use for compilation was things like plotting, numeric solving, and so on. The language of the tutorial reflects that heritage. At this point we should probably rewrite it.


If there is something like a Wolfram Language, it better should be documented like other 'programming' languages. The core of the language is underspecified. Even the small Scheme standard is much more rigorously specified, including an attempt on a formal semantics.


I want a good "what does a LISP programmer need to know about WL?" :-)---or, rather, a nice, conversational tutorial, a "WL for Lisp programmers" that discusses not just the things you need to know, but the underlying philosophical similarities and differences and the pitfalls you're liable to encounter if you try to make the transition.

(I also want an open-source implementation, but it would seem that isn't on the table.)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: