Saturday, August 09, 2008

Mathematica Undo

Mathematica is generally a good program. The programming language may be primitive, but the symbolic and graphics functionality are excellent. However, I just can't believe that it only has one level of undo. I just lost 20 minutes of work because of this. If you must use Mathematica notebooks as opposed to text edited files, save often!

10 comments:

  1. Anonymous1:31 AM

    If you think that the programming language is primitive then you probably don't have the slightest idea how to use it.

    ReplyDelete
  2. You're right, I'm no Mathematica expert. However, from my limited understanding, I have many issues with it. I think any untyped language is primitive. Moreover, the fact that variables can be captured after function definitions (dynamic scoping) is a mistake in my opinion. Labeling function arguments with underscores is a hack. The fact that Mathematica will accept

    f[x] := x + 1

    rather than

    f[x_] := x + 1

    is frustrating. It's true, I often make mistakes while programming. A modern language keeps you from writing stupid programs at compile time. An untyped, unstructured system like lisp or Mathematica makes you debug these out at run time.
    The module system is primitive as well, providing only namespace management. No data types, information hiding, no signatures. There is nothing in this language that wasn't know to programming language designers in the 1960's.

    ReplyDelete
  3. Anonymous4:56 AM

    Sean,

    The underscores are not for function arguments. Read some about pattern matching in Mathematica, and you'll understand why these underscores can be very useful and flexible.

    I agree that Mma is not a great language for writing long and complicated programs (and WRI's claims about this are just bs), but for interactive work it is great. Strong typing is a big drawback for a language that's meant to be used interactively most of the time (try to work with Axiom/FriCAS to see what I mean).

    ReplyDelete
  4. Thanks for your comments. Amusingly, I was going to write "and without sum types you can't have pattern matching...". I'm wrong, obviously. The tags that label the expressions can be matched upon, just like extensible sums. It would be nice to have a "guide to Mma for functional programmers...".


    Sean

    ReplyDelete
  5. Anonymous10:12 AM

    I've got to agree with the others... mathematica is not what i would call primitive in the least. It took me a few years to really start to understand how it works, but it seems amazing....

    EXCEPT!!!!!! THAT THERE IS ONLY ONE LEVEL OF UNDO. not to mention, there is not a 'redo' button ether! (seems silly, but i can't find one).
    AND NO 'AUTO RECOVERY!'

    I can't tell you how many times i've spent hours working on something only to have a portion of it.. accidently deleted a large section, typed the letter 'j', and was only able to remove my 'j' from the page. Or when mathematica crashed (seems to do that occasionally on a mac)... and bye bye work!

    ReplyDelete
  6. Primitive? No.
    Incomplete? Yes. In the sense of a programming language, anyway. Aside from mathematical functions, it's about as pretty as a hungry pit bull (hence the name).

    It's probably the easiest math program to learn, but if any programmer attempts it...don't want to be around for that debugging session.

    Has anyone tried increasing the amount of time before the merge? Since there is a history file, I don't see why it wouldn't be possible for >1 undo, but I can't find the option to save my life.

    ReplyDelete
  7. Anonymous7:16 AM

    i hate mathematica. i just lost work to this stupid single undo. if i knew of another math editor with similar shortcuts for exponents, fractions, etc... i would drop it instantly

    ReplyDelete
  8. Anonymous7:06 PM

    i agree mathematica undo is such a basic text-editor thing even notepad has more than one and a real programmer could easily add that feature in less than 5 min

    ReplyDelete
  9. Anonymous10:21 PM

    To the future me that's looking at this - Wolfram Workbench is what you're looking for. It has all the capabilities of any other IDE.

    ReplyDelete
  10. Anonymous3:16 AM

    you guys are numbnuts. Mathematica is one of the most sophisticated, complex, powerful, useful, and complete programming languages (and paradigms) around. If you don't agree then you simply don't know how to use it.

    Yes it doesn't have syntax or format restrictions of other programming languages. So if you don't control yourself and write terrible code then mathematica won't stop you. It is a bit like a bulldozer...extremely powerful, but if you put a monkey behind the wheel....

    ReplyDelete