Hacker Newsnew | past | comments | ask | show | jobs | submit | pr_fancycorn's commentslogin

If it's about "ethics", that makes sense. But if price is what prevents, say, a software dude in the bay area from trying out Mathematica, well that's just l, o, l; i, m, o.


That's about right. It's somewhat of a superset of most languages, with Lisp chosen as its programmatic subset of choice. And its libraries are huge. Something like a few thousand functions. And the IDE uses the same language, so you can programmatically construct UIs. The key in all of this is that everything uses the same data structure.

In previous versions the data stuff was not impressive, but with the recent versions it's starting to come into par with the rest of the language.


It uses raw lists as the data structure for everything (including code) and has enormous math/sci and presentation infrastructure. Every part of the system can easily talk to any other part of the system.

Because of this you can just throw things together and get great results, where in other systems you might need to use external libraries or otherwise have to deal with high-ceremony architecture (I'm looking at you, OOP).

So I think the difficulty for newcomers is recognizing that "there is no spoon" and that you're entirely welcome to just start flying around like this:

https://www.youtube.com/watch?v=CnuquqR7QOQ

The language itself is simple, I think. But I could see how the APL-ish/functional aspect of it could seem abstruse to new people.


You can only "easily" "throw together" things if you have any clue about a) where to find things, and b) how you can make them fit together. The problem with Mathematica is that neither of these is easy. I mean, look at their literal Hello World example:

GeoGraphics[Text[Style["Hello!", 150]], GeoRange -> World]

In any other language, if I wanted to write some text on a graphic, I would find a routine to load an image into memory and another to render text into that memory. That's genuinely easy.

But in Wolfram's case, I'm apparently just supposed to know that there's something called "GeoGraphics" that does this kind of thing, that the text goes in a Style[] block (what?), and "GeoRange -> World" is how you tell it to create a worldmap as a background. WTF. And don't tell me "read the docs", because even if I found this, it wouldn't help me much with the rest:

http://reference.wolfram.com/language/ref/GeoGraphics.html


That's because they were showing off the functionality of GeoGraphics. To do that for general images you would just load an image and place text on top of it, with a function like Overlay or ImageCompose:

    img = Import["c:/blah/blah.jpg"];
    ImageCompose[img, Rasterize["HELLO"]]
That's the same Import you'd use if you wanted to read a webpage through a URL, etc.

You're right that it might not be obvious what to search for, but in this case you would search for "image" or "importing" or "overlaying" and you'd figure it out.

Mathematica uses a 'compositional' model like some other functional languages, as opposed to a 'memory' model like system languages, so that could take some getting used to if your background is system languages.


The simplest Hello World in Wolfram Language is just:

"Hello World"

or even:

Hello World

which are both quines. The only reason you need to know about Style and GeoGraphics is for making a prettier, but still small, Hello World example.


Sure, but to print ASCII text on the screen one could use any language. What were discussing here is why one might want to choose WL instead of other languages.


What you are getting at here is the fact that Mathematica is a symbolic language through-and-through.

In my webpage here: http://www.oftenpaper.net/sierpinski.htm I try to give passing mentions to how the Mathematica language and its infrastructure make various things easier.

As a programming language geek, I haven't found a language more powerful than Mathematica, and that's before considering the infrastructure it comes with.


I've always found the repeated application of rules to simplify patterns in expressions until the expression stops changing to be pretty powerful when just playing around, especially with small problems. However, in my experience in bioinformatics, that flexible approach is so slow in the face of actual data as to be totally useless for use on real problems in my line of work.

I think an option to use a faster, less powerful, linear pattern matching algorithm more like in ML/Haskell would help a lot in this regard.


(author here) I wanted to mention that I'm not a mathematician, or anything in particular. Any math grad should know comfortably more than me. I'm basically just a "hobbyist of everything," like a "midget polymath" who, by the way, happened to drop out of a terrible college. In fact I originally started that blog because I was having trouble finding a job (for a very broad spectrum of reasons, not least of which that I'm as bad at speaking as I am good at writing). I think most of the content on that page is approachable by high school students, since the most complicated stuff is really just basic trigonometry and complex numbers.

My intent was to wander into quote-unquote "advanced topics" but not necessarily dwell on them, so the math is intended to be casual, even though I didn't hold back on the formulas. I.e. you're not supposed to understand everything. From a larger point of view, you could think of the page as a response to the inanity of the logic-only expositional style that passes as higher math education today.

Regarding the code, to me most of the code snippets on that page are "scripts." There's maybe 2 or 3 snippets that might cross over into being "applications." The MovieMaker[1] utility is probably the most application-y. (Apologies for having to squint at the code in some cases. I felt that the visceral immediacy of the source code was critical, in the "this is not magic" kind of way, which is why it's all plaintext rather than, say, links to Mathematica notebooks.)

For better or worse, however, the source was one of those places where I had trouble holding back. I tried to make the code educational in the process, though. In particular, if you want to learn or expand on function-oriented/functional programming skills, the code may learn you some insights.

By the way everybody, thanks for the comments. It's been hilarious/endearing reading them, and I'm happy that one of my minor magnum opii is irreversibly burning such a healthy number of man-hours from the coffers of society. I should also mention that all the imagery/source/audio is public domain. Also if you want to link to a specific slide view, View Source/Inspect Element on it to find its name (the CSS class is "flipbook"). So if you see

  name="game of life 2"
That becomes

  http://www.oftenpaper.net/flipbook-gameoflife2.htm
Where it has its own page. Of course, my inimitable laziness is why this process isn't automated.

[1] http://www.oftenpaper.net/flipbook-fadeleafanimation.htm


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

Search: