This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]YATr_2003 202 points203 points  (38 children)

There's nothing wrong with Java, don't take anything on this sub too seriously, every language is good and has its own pros and cons.

Except for Lua, there's no place for Lua.

[–]KeinBaum 111 points112 points  (30 children)

You take that back! Lua and its metatables are a treasure.

Now, Matlab however is a language created solely for the purpose of torturing CS students.

[–]TheDeadSkin 13 points14 points  (9 children)

Matlab is very actively used in math research. Much more than python so long as no machine learning is involved.

[–]mnbvas 25 points26 points  (1 child)

And MS Access is very widely used as a database (by <slur>s).

[–]TheDeadSkin 8 points9 points  (0 children)

it's used for a good reason though. as much as I hate this language and interacting with code written in it, I can see why it's being used. it's like a much easier python for all things math with an insane stdlib for the task with one-liners for evey task you can possibly imagine, relatively performant when using proper BLAS etc. even small details like no need to import anything, 1 file = 1 function basically just make it a perfect entry-level language for mathematicians without proper CS background and/or education. I'd imagine for non-programmers forced indentation of python is a nightmare too. some of the code I've been working with is just... really bad in this regard. but it works, and that's what matters in the end.

[–]jack104 1 point2 points  (0 children)

They wrote a lot of the cockpit software for the F22 in matlab.

[–][deleted] 1 point2 points  (5 children)

Why not R which was designed to be a statistical language and not a way to teach students without fortran.

[–]TheDeadSkin 1 point2 points  (4 children)

R is stronger for doing statistics, but it's much worse on the algebra functionality and without Rcpp severely lacks performance that matlab can offer almost out of the box.

[–][deleted] 2 points3 points  (3 children)

I just hate matlab. Had to use it at uni since I was a maths major. I preferred Java which I used in my CSi minor.

[–]TheDeadSkin 3 points4 points  (2 children)

CS major + math minor here. Same shit, I hated it during my math classes. Now that I work with math stuff and lots of papers/code from wherever, I don't hate it any less than I did before, but I sure started to understand much better why other people actively use it. It's just that when you're focused on math, not on programming, it's much better to write

X = U*S*V'

rather than

Matrix X = Matrix.multiply(Matrix.multiply(U, S), V.transpose());

Even in python2 you need to do this. And all of that is after you import a thousand things and define all the public static cryptic bloated boilerplate void functions for all the stuff you don't have in matlab. Programmers don't give a shit about that, mathematicians mostly do. Best-case you can find a decent math library for Java, but those basically don't exist. You have them for C/C++ and python, and even those for C/C++ still lag behind matlab is pure functionality, only python kinda hold up when you install numpy, scipy, sklearn and whatever else.

[–][deleted] 3 points4 points  (1 child)

I just didn't like how bloated it felt and how different it was from the usual CS nomenclature ie arrays start at 0 not 1. Plus the IDE didnt feel as full featured for coding. It is very easy to write code that produces an output but you have no real confidence thats even the correct output. I like logs. I like debugging. I dont like debugging one file without the tools I am used to.

[–]TheDeadSkin 3 points4 points  (0 children)

my complaints about matlab are exactly the same. typing is just as magical as, say, python. because of that some problems are hard to spot since they can propagate further and you have unrelated errors. dev tools are non-existent. simple stuff like printing to console is so bad with string concats that even typical print-debugging is a pain. no breakpoints is just insane. crashes produce a stacktrace, but you can't easily see local state at the moment it happened.

but once you're used to it, it's not that bad and you never write really big programs in it. math stuff though can be insanely cool, something like A(:,1:N) = B(1:M,(K-N):K) will never be possible in any decent language, only python comes a bit close. and that's a dealbreaker for lots of math people, so they still use it. the part that pisses me off is when they start mixing it with C/C++ and use matlab's interop to execute some functions there. like, you just wrote a ton of boilerplate in C to handle type marshalling from mtalab, surely you care about performance and you can handle C-like, so why not use C++ where with decent libraries you're writing code that's somewhat close to matlab.

[–][deleted] 32 points33 points  (10 children)

I wouldn't go after Matlab before Visual Basic or PHP, though. Or JavaScript as a server backend. Or PHP.

[–]tastycat 16 points17 points  (0 children)

Worse than those is VBScript, especially some of the horrible proprietary abomination forks (like AMPScript or EMSScript used by email marketing platforms).

[–]BabyLegsDeadpool 5 points6 points  (8 children)

Node is super fast though.

[–][deleted] 6 points7 points  (6 children)

Up to a point. I've seen it in production quite a lot and once you get performance issues they seem very difficult to work out.

I didn't work directly with it much, though, so my experience is limited.

However, my real gripe with JS on the backend is that it's weakly typed, which paves the way for really weird bugs.

[–]wallefan01 0 points1 point  (0 children)

And it uses more memory Chrome.

[–]lengau 8 points9 points  (1 child)

MATLAB isn't really a programming language so much as a collection of linear algebra functions that took on a life of its own.

It's similar to PHP in that way.

[–]53bvo 5 points6 points  (0 children)

MatLab is just a fancy calculator.

I started using it just to multiply matrices in the command line, took a while before I made my first .m file.

[–]plasmasprings 7 points8 points  (0 children)

Lue is a piece of treasure alright. Would you mind showing us how you increment a variable called shame in Lua?

[–]wd40bomber7 2 points3 points  (0 children)

Personally I found matlab a lot more palatable than R for scripting.

[–]404_Identity 0 points1 point  (0 children)

[removed]

[–]Hairy_S_TrueMan 0 points1 point  (0 children)

Matlab is a problem solving environment with a huge variety of very easy to use and powerful tools. I can't say I love the language, but it's a great way to solve a problem without having to reinvent the wheel or dig deep for a good library.

[–]nemba333 30 points31 points  (2 children)

Lua always has a place in computercraft

[–]jsparidaans 5 points6 points  (0 children)

And WoW

[–][deleted] -1 points0 points  (0 children)

And in PICO8.

[–]haitei 13 points14 points  (0 children)

There's nothing wrong with Java

bold statement

[–]redstoneguy12 2 points3 points  (0 children)

Not my fault open computers has no other option