Context: i'm forced to program math stuff in Maple 17 at the university at a class. it's the worst thing i've ever used for math, a supposedly pro math tool.
I had to use maple in my physics degree like 20 years ago. Never since leaving university, in my whole career in software have I ever encountered anybody using maple for anything. God only knows why they couldn’t teach us R or something else that might have actually been useful.
On my last year of CS Bsc, so far only had about 1-2 useful courses of them all. The curriculum is very outdated and ran by teachers who never worked in the industry. So "if you want to learn something useful or well, do it yourself" kind of university quality. Maple is another beautiful exaple of it. My first semester optimism has turned very quickly into "just give me the fucking paper so i can get a better cs job already" years ago, also gave up on expecting anything useful from them.
Oof. Well if it makes you feel any better, I'm about to start on a project at work replacing maple code generation with SymPy. To hell with proprietary tools!
Out of curiosity, what exactly are you using it for?
I like Maple (and my favourite version Maple V is as old as my self), but there sure are things it it good at and things it's bad at. It's good for deriving formulae and symbolic linear algebra, but trying to use it to process tabular data gives you hell...
I looked it up quickly and it doesn’t really look like programming to me. Didn’t look very much though that stuff looks like it would be hell to work with
Basically editing "code" in MS word text editor-like UI. Type unsafe as fuck, buggy as hell, i quicksave after every line in case it crashes randomly again.
The point of it in the class would be that "you don't have to do this on paper anymore, use this pro tool", but the "pro tool" is garbage. Could wirte the required math solutions in most mainstream programming languages in 1/10th the time with some basic math and graph libraries. Fuck, i would throw in some colourful CSS shapes or something even.
Theoretically, simple control schemes (if, loops, function/processes) exist in this, but it's useless, because you take a coinflip for the variable's type each time and well if it's not exactly what you intended, it won't run properly. The fact that the IDE is even bad for a text editor (not even "replace only in selection" is included for find&replace, no indentation, unless you manually do it with spaces) doesn't help either.
I've used a decent amount of Maple (for poking and prodding some math and/or generating test cases for things I eventually have to implement as well as for learning/implementing some cryptographic algorithms). I'm confused what you mean by "you take a conflip for the variable's type." It's no worse than e.g. Python when it comes to types. I'm even more confused with how this would make control structures useless.
For example: There is no interchangeability between a 'f:=3x+1' and the 'f:=t->2x+1' format.
I can build the former with for loop (for example a binomial function dinamically, based on it's exponential num), but then if i want to use the built function in the latter format, there is no way to convert it and can't be used for graphplots and such. Why? Because, it is a function, however, not the arrow syntax fn type. The arrow syntax one can't be concated/summed with other of the same type, so can't be built with loops.
Therefore both type useless with any command structure that would build them iteratively.
There's a few issues here. All are based on the fact that the former example is an expression representing an mathematical function, the latter is a function in Maple.
You'd run into this exact type separation with e.g. SymPy as well - there is a difference between an expression written in the embedded DSL and a function written in Python.
The second example is literally a Maple procedure of one variable with some pretty-printing. If you need more complex output, you can write a procedure that uses loops, ifs, etc. You could also take a functional approach instead and use map, fold, and composition.
Plotting does work with expressions or one variable functions. The rest of the arguments to the "plot" function do depend on what you're feeding into it.
The real weird thing is that you're forced to use Maple 17 when IIRC, 2023 is the latest major version.
Oh okay looks like i need to research that particular problem a bit more. From your description it doesn't seem impossible to unfuck my worksheet :D Maple's documentation is not super helpful tho, i'll look at youtube next.
The University did not even bother buying student licences, just told us to install this old cracked version... yeah... why do i even pay tuition then.
If you want to build parametrized functions in a loop, you should use unapply, not arrow.
Arrow operators is basically a syntactic sugar for the proc function definition. It works good if everything inside is made of the arguments and constants, but if you want to build a parametrized function, this will not work, as the variables are not evaluated at the moment the function is built.
The unapply(expression, argument), in contrast, evaluates everything before building a function. This is closer to the usual behaviour of the lambda operators from other languages: 'substitute the values of all defined variables and make a function out of this'.
The f := 3x+1 is not a function at all, but a polynomial- Wait... It's not the good old Maple V we're talking about...
Yeah that sounds horrible. Don’t understand why people feel the need to make a shit version of programming for science stuff, had something similar with a program mainly used for physics called coach (iirc) where it probably would’ve been just as easy to just use js or something.
Unfortunately in university you gotta deal with a lotta bs. I'll never forget on a calc exam getting every answer right but an intermediate step was incorrect so that brought me down to an 86 and yes I remember that years later.
Anyways when you're in the real world the BS changes, so you have that to look forward to!
It's essentially programming for math. It's really not that bad aside from the slightly verbose syntax. It's a bit easier than working with a DSL embedded in another language imo.
I was never asked to do any programming in it, but I hated Maple too... Until my sister was forced to do everything using TI-Nspire and asked for my help. That was such a horrible experience that I was thankful we used maple at my uni for math
56
u/maszmi Apr 25 '23 edited Apr 25 '23
Context: i'm forced to program math stuff in Maple 17 at the university at a class. it's the worst thing i've ever used for math, a supposedly pro math tool.
14
u/kai58 Apr 25 '23
I looked it up quickly and it doesn’t really look like programming to me. Didn’t look very much though that stuff looks like it would be hell to work with
16
u/Existential_Owl Apr 25 '23
*brofisting* over the headaches caused by Maple
7
u/G2-Games Apr 25 '23
I thought I was on r/Nichijou haha
I've never used it, but it doesn't look great
4
u/Xephyz Apr 26 '23
I was never asked to do any programming in it, but I hated Maple too... Until my sister was forced to do everything using TI-Nspire and asked for my help. That was such a horrible experience that I was thankful we used maple at my uni for math
2
u/Jeprin Apr 25 '23
Hot take. I like maple 😈
0
u/[deleted] Apr 26 '23
Isn't Onimai ?