4 ms·
I keep seeing Julia promoted as the grand new language but honestly, I am incredibly sceptical. Working in the scientific programming community, I am keenly awa
by cabinpark 13y ago
I keep seeing Julia promoted as the grand new language but honestly, I am incredibly sceptical. Working in the scientific programming community, I am keenly aware at how slow things move. In only the last few years have I seen a push towards even using Python as a viable scientific tool. The problem is that science moves slow and, for the most part, scientists aren't interested in the programming aspect too much, but getting the results. They have one system that works and they stick with it.
One problem, that I don't see mentioned, is that verification of correctness. There is a reason people use decades old packages and code: they know that the tool is reliable and correct. My supervisor's code is based off his supervisor's code, which has been around since the 80s. At least 50+ papers have been published based off this specific code so we know that it is correct. The amount of time it would take to re-write and test the code written in a new language would be a very large times-sync that no one wants to do because they could spend that time doing research. I think this is part of the reason why things change slowly in the scientific computing community as whole. There have been tens of thousands of papers published that use Fortran/C/C++/Matlab and this new kid Julia comes along and how many scientific papers have been published using Julia code? I would imagine barely even a fraction. To scientists, this is reason to be sceptical. I'm not saying I agree with this but it is how scientific computing does think.
Also, on a personal note, the marketing needs to change. Since of the creators is reading this, if you want get the scientists, drop the grandiose claims of "one language to rule them all", although that's probably not your fault. To me, I immediately smell bullshit a mile away when I hear that. Too many times in the history of scientific programming languages have people made similar types of claims only to see it crash and burn. This is why many the older folks won't bother.
Reading Julia's homepage, I would be unconvinced about why I should choose Julia over Matlab. Heck, why not use Python? Python is open source and has been around a lot longer and people have certainly of that.
Also your speed tests, well fix them. For example Matlab vs Julia. Calculating the Fibonacci numbers? Honestly who cares. Plus why are you even computing them recursively, that's a silly way to do it. I understand it demonstrates recursion, but it's a pretty useless thing in my opinion. I only ever see the Fibonacci numbers come up in programming contest problems. I can honestly say I've never seen them used in real applications that scientists do. And if they were you would never implement them this way. Also the implementation of quicksort, why did you write your own? Use the built-in one for a more fair comparison. No one writes their own sorting algorithm but uses the built-in languages ones. Do that here. It is disingenuous to Matlab to not use the built-in functions.
The real tests that I would care about would be the random matrix multiplication. That's something that is way more common than calculating Fibonacci numbers. And here Julia is a little faster than Matlab but not too much. I'd be sceptical of why I should switch. Similarly a single number tells me nothing. Just because it says Julia is faster, well that's one test. How well does Julia scale? Is it true that Julia is faster than Matlab for multiplying NxN random matrices? How well does this scale? A single test tells me nothing. I'm obviously bias towards matrix tests since my research used a lot of matrix operations, but if you read papers about various codes they almost always include scale tests. This is what my colleagues would care about more than anything since they have massive datasets so scalability is critical. Remember you are trying to sell this to scientists who are, obviously, scientists, so having good quality data to show them is critical. I discussed Julia with my colleagues and this was one of the things we immediately mentioned. The tests shown didn't convince us at all that it was even worth considering.
Plus, I'll be honest, I feel the homepage is marketed more towards computer scientists than numerical scientists. The first feature is "Multiple dispatch: providing ability to define function behavior across many combinations of argument types". The hell is that? Why do I care? Remember who your audience is! To give you an example, I will tell you about my office mate. He is a PhD student working on turbulence and uses Matlab for all his data processing afterwards. His code comes from simulations written in Fortran that run on the local supercomputing cluster. They are stored in the NetCDF format. After the simulations are done, he opens up Matlab, reads in the NetCDF file and runs a bunch of data-processing functions to compute various quantities from the raw data. He then plots these things. On the Julia homepage I don't even know if Julia can even do graphics. Can it? If it can, the homepage doesn't mention any plotting libraries. So, I repeat, what exactly does multiple dispatch mean and why is it so important? If you want him to be using Julia, then you need to explain to him why he should be using it over Matlab. Look at the numpy homepage. It is short and to the point. Plus it has a nice link to "NumPy for Matlab users" which is something I would want to know immediately. Julia, as far as I can tell, you have to go to docs, Julia manual, Noteworthy differences from other languages (which is at the bottom of the screen!!).
I could probably come up with more criticisms and suggestions but I don't want to write a book. I should say, I completely and fully support what Julia is trying to achieve. I find that Python is just too awkward to be a good Matlab replacement. To me, Python is a very general tool that also has the ability to do similar things to Matlab. However since Matlab is designed to do numerical computing, and Python isn't, I find Python to be awkward for some things. But, at least it can run on the computing clusters. Matlab is stupid with licensing and trying to get it to run on the supercomputing clusters is near impossible. Definitely in the future I am going to try Julia as a data-processing step since it is free and open-source and not subject to any of that licensing crap. Plus the parallel aspect interests me although I have no idea how good it is since I don't see any graphs showing what sorts of advantages I might get. Plus the documentation page is rather dense text-wise and not that appealing to read right now.
But, I think the tl;dr is that remember who you are marketing to. Remember that scientific computing moves slow. I know colleagues who have just discovered version control and think it's amazing.
- Stubb 13y agoWhy not use Python? Do you mean Python 2.7 or Python 3.x? Multiple dispatch lets the user define several functions with the same name and have the compiler pick the right one based on the arguments. For example, you could have three versions of the foo() function, one for reals, another for complex, and a third for matrices. You could define your own types and write additional versions of foo()—the compiler will pick the right one based on the underlying types. Julia's type system makes a lot of sense once you've gotten the hang of it. I'd suggest fiddling with Julia if you have some time, as I think it rolls together some good ideas. But it still has a way to go IMHO. Redefining functions with dependencies in the interactive toplevel doesn't work quite right, and you can't delete entries from the symbol table. It concerns me that these things don't work. I figure that I'll give it another look as a tool for serious work when 1.0 gets released. I'll stick with R in the mean time—less change of unpleasant surprises. But I could see Julia replacing R for me in a few years if it's done right.
- cabinpark 13y agoI'll admit that is an interesting feature honestly the first thing on the list? It's certainly a cool and interesting idea, but I'll admit it's not a super important feature in my view. Thinking back on all the research I've done I can't think of a single time where I would need such a feature. I never use any data strucures beyond matrices, which Matlab handles by default. Since 1x1 matrices are just numbers, every function that works for matrices, works for single numbers. I do use Python, but it came into it late on my project. Future projects will definitely use Python since it's good enough for data processing stuff. Hard core numerics will still be done in Fortran/C. I definitely do see Julia being the better version of Matlab but it certainly has a ways to go.
- Fomite 13y ago> I'd suggest fiddling with Julia if you have some time This is my biggest problem with Julia. I'd love to tinker with Julia, port some code over, especially some slow Python code, but it's hard to do trying to shove papers out the door and knowing it'll be days/weeks before I'm up to speed, and that there's libraries I may have to reimplement (probably poorly, what with being a scientist rather than a programmer).