Live data from Hacker News

Launching Today: Mathematica Online

blog.wolfram.com

41–50 of 52 posts

Re: Launching Today: Mathematica Online

#41
post #38

Earlier quoted context omitted.

> I found that "just using it as a lisp" was a huge pain: the fact that Mathematica is, as you say, "actually a rule rewriting engine" kept causing it to behave in ways that looked absolutely bonkers if you were trying to think Lisp. Can you give an example of bonkers-ness? The functional parts of Mathematica/WL (by which I mean the equivalents of fold, filter, map, etc) are pretty straightforward and should be quite…

> Can you give an example of bonkers-ness? Maybe :-)---this was a year and a half ago, or more. I do remember spending a fair amount of time trying to wrap my head around the implications of the difference between `f[x] = x^2` and `f[x_] = x^2`, and the differences between "Module", "Block", and "With". I also had a hard time with closures & symbols---I was trying use something not unlike the bank-account example fro…

> f[x] = x^2` and `f[x_] = x^2

That's a really good example: you'd have to find the tutorial [0] to know what to do. And we could make that job easier by detecting your probably incorrect use of = instead of := and giving you a "I see you're trying to define a function" kind of deal. Of course people hated Clippy, so we have to tread carefully with that kind of thing :)

> This is important, I think, but I also think the problem's less in your documentation than in how I "learned" Mathematica.

Yes, I think you hit the nail on the head with this paragraph. It is possible to 'accrete' tricks in a way that potentially blocks you from having a holistic knowledge of the language. The workflows for symbolic manipulation, which involve lots of global state and symbols representing variables, is probably a prime culprit.

> My problem was in setting up the matrix to be diagonalized. The state space had something like seven degrees of freedom (four two-dimensional and three with arbitrary dimensions), so I was calculating matrix elements for up to something like N = 10^5 basis states.

That makes more sense. There might have been higher level ways to do this using functions like Array and Table, but perhaps not. And Julia is a really interesting language, I think we can learn a lot from them.

> I can't shake the feeling, though, that I'd want to run away very quickly from a large Mathematica/WL project like Wolfram|Alpha.

Huge codebases in any language get hairy. I'd say we're on a par with C++ in that respect (meaning: not very good, but workable).

Modern languages have had some innovations with clean package systems and API boundaries (though the ML family showed the way), so it's perhaps good we're still waiting to modernize our package system. Plus, I think we have a chance in the next year or two to really leapfrog other languages with some amazing static analysis tools.

Still in the lab, though :)

[0] http://reference.wolfram.com/language/tutorial/ImmediateAndD...

[1] http://reference.wolfram.com/language/ref/Array.html, http://reference.wolfram.com/language/ref/Table.html

Re: Launching Today: Mathematica Online

#42
post #39
post #36

Earlier quoted context omitted.

nonetheless, the man makes cool things which I think are worth their price.

He mostly claims other people's work for himself. I suppose he's a good salesman and a good huckster, that much is demonstrably true. He's also apparently competent as a mathematician somewhat, but it's doubtful how much of Mathematica really is his own work. He puts everything under his own name and sues anyone who disputes otherwise.

[deleted]

Re: Launching Today: Mathematica Online

#43
post #38

Earlier quoted context omitted.

> Can you give an example of bonkers-ness? Maybe :-)---this was a year and a half ago, or more. I do remember spending a fair amount of time trying to wrap my head around the implications of the difference between `f[x] = x^2` and `f[x_] = x^2`, and the differences between "Module", "Block", and "With". I also had a hard time with closures & symbols---I was trying use something not unlike the bank-account example fro…

> f[x] = x^2` and `f[x_] = x^2 That's a really good example: you'd have to find the tutorial [0] to know what to do. And we could make that job easier by detecting your probably incorrect use of = instead of := and giving you a "I see you're trying to define a function" kind of deal. Of course people hated Clippy, so we have to tread carefully with that kind of thing :) > This is important, I think, but I also think…

> probably incorrect use of = instead of :=

Oh, man, that bit me so many times, especially when it had to interact with some kind of scoping trick. I read that tutorial (or the equivalent from before the WL), and never really got good intuition for how immediate & delayed evaluation worked and when to use which.

> There might have been higher level ways to do this using functions like Array and Table, but perhaps not.

I was actually using Table, but I was thinking of it as "iterate over these variables". Table's nice, although every once in a while it would break the picture I had in my head of it as "map-over-cartesian-products".

> Plus, I think we have a chance in the next year or two to really leapfrog other languages with some amazing static analysis tools.

Great! Another beef I have with Mathematica (and Scheme, for that matter) is that it doesn't have types: since I learned bits and pieces of Haskell and started using Julia seriously, I've come to love the way a type system can save me from my own stupidity. This is definitely a matter of taste, though.

Re: Launching Today: Mathematica Online

#44
post #37

Earlier quoted context omitted.

As you can see from the doc, functional programming is completely underspecified in Mathematica. How does lexical binding / closures /... work? I fear these are all dirty hacks and performing very poorly. Why isn't it better specified? Because Wolfram wants to prevent competition? From here it looks like the implementation is the spec. There is no rigorous language spec, which is quite poor for a language used in Mat…

> As you can see from the doc, functional programming is completely underspecified in Mathematica. That inference is not correct. That doc is one of many hundreds of 'guide pages' that collect together various functions by domain/concern. It's not meant to be the exhaustive proof of "WL is a modern functional programming language with all the features you expect". > I fear these are all dirty hacks and performing ver…

> 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.

Re: Launching Today: Mathematica Online

#45
post #44

Earlier quoted context omitted.

> As you can see from the doc, functional programming is completely underspecified in Mathematica. That inference is not correct. That doc is one of many hundreds of 'guide pages' that collect together various functions by domain/concern. It's not meant to be the exhaustive proof of "WL is a modern functional programming language with all the features you expect". > I fear these are all dirty hacks and performing ver…

> 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 c…

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.)

Re: Launching Today: Mathematica Online

#46
post #39
post #36

Earlier quoted context omitted.

nonetheless, the man makes cool things which I think are worth their price.

He mostly claims other people's work for himself. I suppose he's a good salesman and a good huckster, that much is demonstrably true. He's also apparently competent as a mathematician somewhat, but it's doubtful how much of Mathematica really is his own work. He puts everything under his own name and sues anyone who disputes otherwise.

I wouldn't agree with any of those characterizations. I see him mention the team he has built and what they accomplish together rather frequently.

Re: Launching Today: Mathematica Online

#47
post #44

Earlier quoted context omitted.

> As you can see from the doc, functional programming is completely underspecified in Mathematica. That inference is not correct. That doc is one of many hundreds of 'guide pages' that collect together various functions by domain/concern. It's not meant to be the exhaustive proof of "WL is a modern functional programming language with all the features you expect". > I fear these are all dirty hacks and performing ver…

> 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 c…

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.

Re: Launching Today: Mathematica Online

#48
post #21

$15/mo is still too high for dabblers. It should have a free or cheaper tier (with low quota, or $0.20/hr, bill as-you-use like AWS) for people who want want to fiddle.

Allowing people to try it for free would definitely help them attract potential users. IMO they should just use a cookie to let you try it out for a couple of days, and then tell you that you need to buy the product. It's easy to circumvent, but a ton of people would just choose to pay for it. I also think that they should have some kind of student pricing. Many students couldn't afford $15/month, but they might be a…

You can try the Programming Cloud for free. That also exposes the Wolfram Language.

Re: Launching Today: Mathematica Online

#49
post #31
post #27

Earlier quoted context omitted.

SymPy has made a start on an open source version of Alpha, SymPy Gamma, http://www.sympygamma.com The biggest missing piece it's missing is the data used by Alpha. It's missing other things as well, but it's a start.

I don't know if it's too late for this, but as a matter of marketing, why not Omega instead of Gamma? Alpha was the first word on the subject. Omega will be the last.

I wasn't involved in the Gamma aspects of SymPy. At this point, Gamma is probably more appropriate.

Re: Launching Today: Mathematica Online

#50

This is the beginning of the end for the conventional desktop license, I fear. Is the Wolfram Creative Cloud far behind?

Seems unlikely, I imagine a lot of the users live behind extremely restrictive firewalls.

I agree, seems unlikely
Post reply on HN