Earlier quoted context omitted.
Open source version of Alpha? That will never happen. Wolfram is the most anti-source-code person out there. He even has this diatribe about why you should not be allowed to see "his" source code: http://reference.wolfram.com/language/tutorial/WhyYouDoNotUs...
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.
Launching Today: Mathematica Online
31–40 of 52 posts
Re: Launching Today: Mathematica Online
#32$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…
Except Wolfram should just restore Wolfram Alpha to its once free glory (instead of the annoying nagware that it's become) and also offer this Wolfram cloud stuff at a reduced price.
The end goal for them should be to convince people that they need to purchase Mathematica. Pricing at $15/month means they're only really attracting existing Mathematica users who want the convenience of the cloud when they're away from their primary machine.
Re: Launching Today: Mathematica Online
#33Earlier quoted context omitted.
> Unit testing ... are only available at the higher price levels. Actually, this is now available for everyone, something I advocated for. VerificationTest and TestReport are the key functions there. Good implicit suggestion about QuickCheck. We've supported unit testing in our Eclipse plugin for years, and with V10 brought the MUnit package into the System context with a redesign of the essential functions.
Yeah quickcheck (and smart check which minimizes the counterexamples) seem like places where mathematica could shine bright for software debs. I would absolutely adore seeing smart check implemented in Mathematica. Please make it so.
Re: Launching Today: Mathematica Online
#34Earlier quoted context omitted.
If you come from a programming background, just treat it as a Lisp with M-expressions rather than S-expressions. It all comes together quite quickly then. At it's core Mathematica is actually a rule rewriting engine. but except for more heavyweight uses you can view it as simply a Lisp with the worlds best standard library.
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. The jungle of function-definition-like expressions and the scoping constructs were particularly bad, but I also found that the language & the culture made it far too difficult to write rea…
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 easy for a Lisp programmer to pick up. See [0].
In fact the suite of functions you have available for basic list and hashmap manipulation is probably one of the richest among languages in this space.
Btw, its called a "term rewriting system", not a "rule rewriting engine".
> Moreover, I never figured out how to do iterations quickly; even once I got the thing working, it was prohibitively slow.
It's a bit odd to criticize a functional programming language for not having super-fast 'for' loops. But you can use Compile[1] if you want to write fast procedural-style code. We also do some amount of JIT compilation.
> Ultimately I re-wrote it in Julia, which was a much better fit for the problem (exact diagonalization of a one-particle tight-binding Hamiltonian). That was a rather more pleasant experience.
Did you really want to write diagonalization from scratch? Why not use the superfunction Eigensystem [2], which has been honed by many experts over many years?
> Now, this is in part about the problem domain: I wasn't doing any symbolic manipulation, though (IIRC) I was comparing my results with those from some symbolic calculations. (Honestly, I feel pretty stupid for having even tried to do it in Mathematica in the first place.)
> The lesson I learned, though, was to never use Mathematica for anything beyond basic symbolic calculations---integrals, that sort of thing.
That's basically nonsense. Wolfram|Alpha is a multi-million line Mathematica/WL system that goes far beyond symbolic manipulation. As a totally random example, take Facebook social network analysis [3].
Note to self: clearly we aren't making it easy enough to understand what WL can do, especially for people who pick it up for one specific thing. The video helps a bit, and there is the fast introduction for programmers [4].
[0] http://reference.wolfram.com/language/guide/FunctionalProgra...
[1] http://reference.wolfram.com/language/ref/Compile.html
[2] http://reference.wolfram.com/language/ref/Eigensystem
[3] http://www.wolframalpha.com/facebook/
[4] http://www.wolfram.com/language/fast-introduction-for-progra...
Re: Launching Today: Mathematica Online
#35Re: Launching Today: Mathematica Online
#36Earlier quoted context omitted.
I would have loved to have something like this in school. I ended up paying for mathematica while working on my degree. I think IPython/Sage connected to an open-source version of Wolfram Alpha would be a Killer app. Any chance Julia would be integrated at some point?
Open source version of Alpha? That will never happen. Wolfram is the most anti-source-code person out there. He even has this diatribe about why you should not be allowed to see "his" source code: http://reference.wolfram.com/language/tutorial/WhyYouDoNotUs...
Re: Launching Today: Mathematica Online
#37Earlier 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. The jungle of function-definition-like expressions and the scoping constructs were particularly bad, but I also found that the language & the culture made it far too difficult to write rea…
> 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…
The compile function spec -as little as is there - does not make me happy as a Lisp programmer. The compile function has only very limited capabilities...
From the doc:
> Compiled code does not handle numerical precision and local variables in the same way as ordinary Wolfram Language code.
This is a huge warning sign. It does not even say HOW it works differently. Mathematica from a language implementation point is stuck in the 70s... They have fancy stuff on top, but the basic language looks broken. The Lisp and FP communities faced these implementation and semantics problems (like lexical binding, having an interpreter and compiler with same semantics, implementing optimizing compilers for the full language, ...) in the 70s and 80s. Scheme, ML and other languages showed how this stuff should be specified and implemented.
Re: Launching Today: Mathematica Online
#38Earlier 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. The jungle of function-definition-like expressions and the scoping constructs were particularly bad, but I also found that the language & the culture made it far too difficult to write rea…
> 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…
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 from SICP (https://mitpress.mit.edu/sicp/full-text/book/book-Z-H-20.htm...) to cache some intermediate computations, and it got very messy very quickly.
Now I recognize that this is in no way idiomatic Mathematica code, and I'm sure there is a nice Mathematica-y way to achieve this, but that's sort of my point. I have a problem, think "Aha! I know exactly how to deal with this in Scheme!", try to translate the Scheme solution into Mathematica, and either fail miserably or spend way too much time trying to figure out how to persuade Mathematica to do what I want. (I should perhaps admit that when I hear "Lisp" I think Scheme and to a certain extent CL, with lexical scoping, as opposed to elisp, with dynamic scoping. This is a flaw in my thinking I've never really gotten around to rectifying.)
> The functional parts of Mathematica/WL (by which I mean the equivalents of fold, filter, map, etc) are pretty straightforward and should be quite easy for a Lisp programmer to pick up. See [0].
Yeah, those were pretty natural.
> Note to self: clearly we aren't making it easy enough to understand what WL can do, especially for people who pick it up for one specific thing.
This is important, I think, but I also think the problem's less in your documentation than in how I "learned" Mathematica. I got started using Mathematica for things like messy integrals, or differentiating and then simplifying some huge expression. Something comes up in a problem set, I try three or four times to do it by hand and always lose signs/factors/whatever, and then farm it out to Mathematica; as I gradually started doing more and more, I kept just porting Lisp experience, and this always worked just barely well enough that I wasn't forced to learn Mathematica on its own terms.
I suspect if I had thought about it as "basically m4 with a crazy-awesome standard library", rather than "basically Scheme with a crazy-awesome standard library", I might have been happier, but ultimately I needed (need) to recognize that Mathematica is its own thing, with its own strengths, weaknesses, and fundamental metaphors.
> Btw, its called a "term rewriting system", not a "rule rewriting engine".
Ack. Thanks; I'll try to bear that in mind.
> Did you really want to write diagonalization from scratch? Why not use the superfunction Eigensystem [2], which has been honed by many experts over many years?
No! You're right, that would be a terrible idea. I was using Eigensystem; in Julia I farmed it out to LAPACK via eigs(). 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. (There were some tricks to pull so I was iterating through O(N) states, not O(N^2).)
Ultimately, for sufficiently large N, the diagonalization is going to take much longer than the setup, just because the scaling's worse. For small-ish N, though, the setup was interminable, and those small-N test cases are precisely where I need to be able to move quickly when I'm trying to figure out which stupidity I perpetrated this time.
> It's a bit odd to criticize a functional programming language for not having super-fast 'for' loops.
Yeah, no kidding. This was a classic Fortran-style problem, which is why I feel kind of stupid for having even tried to do it in Mathematica.
>> The lesson I learned, though, was to never use Mathematica for anything beyond basic symbolic calculations---integrals, that sort of thing.
>That's basically nonsense. Wolfram|Alpha is a multi-million line Mathematica/WL system that goes far beyond symbolic manipulation. As a totally random example, take Facebook social network analysis [3].
Fair enough. And I have a very smart friend who has sworn by Mathematica for years (and just spent some time working for you guys)---maybe it really is a combination of how I approach Mathematica, the types of problems I've tried to solve in it, and the fact that de gustibus non disputandum. 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.
Edit: missing newline, missing )
Re: Launching Today: Mathematica Online
#39Earlier quoted context omitted.
Open source version of Alpha? That will never happen. Wolfram is the most anti-source-code person out there. He even has this diatribe about why you should not be allowed to see "his" source code: http://reference.wolfram.com/language/tutorial/WhyYouDoNotUs...
nonetheless, the man makes cool things which I think are worth their price.
Re: Launching Today: Mathematica Online
#40Earlier 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…
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…
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 very poorly.
Why do you fear that? From my experience we're about on a par with CPython.
> Why isn't it better specified?
There is a gargantuan library of documentation, available both offline and online, that covers every area of the language, including core language areas like scoping.
> Why isn't it better specified? Because Wolfram wants to prevent competition?
We don't need to obscure how the language works to prevent competition, we can rely on the fact that it would take hundreds of engineers (with a full spectrum of domain knowledge) a decade to replicate the kind of functionality we have.
The exact thing you seem to want, which is "what does a LISP programmer need to know about WL?" doesn't exist, but perhaps it should! It might make sense to add Block, Module, and With to the functional programming page, though the Scoping Constructs guide [1] is the place to start understanding our scoping.
> > Compiled code does not handle numerical precision and local variables in the same way as ordinary Wolfram Language code. > This is a huge warning sign.
Again, you seem to have little patience for documentation. The notes in the function page are a summary of salient points, rather than an essay about every detail. The tutorial goes into more depth [2].
And specifically: precision tracking is something almost no-one else does. BLAS can't do it -- so yes, the semantics have to change if you want speed. Lisp and the FP community would have the same problem if they represented quantities with the generality we do.
[1] http://reference.wolfram.com/language/guide/ScopingConstruct...
[2] http://reference.wolfram.com/language/tutorial/CompilingWolf...