4 ms·
A Matlab Programmer's Take On Julia
- Derbasti 15y agoIt seems to be a bit early to criticize Julia on details like that. Still, not a bad article.
- pron 15y agoBecause Julia is at such an early stage, such articles are important to help it improve.
- asg 15y agoThis post was discussed constructively on the Julia mailing list some time ago, and spawned a long and interesting thread. Worth perusing for some followup. https://groups.google.com/forum/?fromgroups#!searchin/julia-dev/a$20matlab$20programmer/julia-dev/W2C9-HbXH3o/86D4GUYtYgwJ https://groups.google.com/forum/?fromgroups#!searchin/julia-...
- probably 15y agoThe authors seem very receptive to feedback -- which is encouraging. Maybe I missed if they addressed this, but I wish they'd consider the IDE to be an important part of the language ecosystem. A web REPL is good... but I suspect that (despite Steve Yegge's prediction that the browser is the next IDE) that programmers will expect a serious language/environment to be called interactively through emacs as can R, matlab, and python/ipython (I heard vim can also do this with R?). Or, possibly through an IDE like Rstudio with optional local/server access.
- etrain 15y agoI expect the Web REPL will ultimately evolve into something like RStudio (which itself is web-based, even in local mode). There is already an emacs mode for Julia: https://github.com/JuliaLang/julia/blob/master/contrib/julia-mode.el https://github.com/JuliaLang/julia/blob/master/contrib/julia...
- probably 15y agoEmacs mode already? They're doin it right. :) I was not aware RStudio was web-based. News to me...
- etrain 15y agoYep, RStudio is GWT driven (https://developers.google.com/web-toolkit/ https://developers.google.com/web-toolkit/) and uses some very particular configuration tricks to keep you from accessing it with a browser in local mode.
- karpathy 15y agoInteresting points, the matrix edge cases seem a bit weird. I program in Matlab all the time, but I basically can't imagine leaving it for Julia no matter how good the language is. The main reason being that the single most valuable part of Matlab, for me, is its amazing IDE. I've seen a lot of people caught up in debates about languages, obsessing about this feature or that one but it is much more rare to see people argue about the IDE, as if it was merely an afterthought. I find this article guilty of the same crime. The author also dismisses Matlab because a statement with no semicolon prints its result (something I take advantage of often) and other small issues , but there is no mention of everything else you lose when going to Octave. Really? Maybe I'm spoiled, but I now can't live without seeing all my variables and their size, types and values listed, my ability to quickly execute blocks of code at random, jump around all files, super fast and flexible visualizations, great debugger, profiler, docs at fingertips, etc etc etc all integrated into a single package that just works out of the box. It's development on steroids and I've never seen anything that lets me code faster. I feel sorry for people who code in vim.
- etrain 15y agoFor a language as young as Julia, I'm really surprised that the author focused as much as he did on the Web REPL and development environment. These things can be added later, and I think at this point in the language lifecycle, the team behind it really needs to be focused on getting the fundamentals right (which they seem to be). For a good example of IDE as afterthought, look at RStudio (http://www.rstudio.org http://www.rstudio.org) - note that this came around after a decade of other, bad, GUIs for R. I actually see the matrix edge cases as pretty interesting - while they don't reflect the way I'd try to code things, they probably reflect the way someone codes things, and I imagine that their behavior is either due to a nasty implementation detail or oversight by the Julia core team. Either way, it's good to hash this stuff out now.
- simonster 15y agoI would leave MATLAB's IDE in a heartbeat for something that ran in the browser. In my experience, MATLAB's IDE is a terrible piece of crap. It's slow. It's particularly slow when accessed via X11 forwarding, even from the same network. It's memory-hungry. It crashes randomly on OS X (and semi-randomly on Linux). The plots aren't anti-aliased. If you open too many plots, it runs out of Java heap space and crashes. The only thing it has going for it is the tight integration with mlint, but even that's kinda stupid because they could have just written a better optimizing compiler.
- cageface 15y agoNo plotting, except in the web REPL, and only very simple (if pretty) 2D plots supported. This is something I'd miss. I use R sometimes only because it's plotting features are so fantastic.
- mahmud 15y agoit's just for now. as soon as the language gathers steam you can expect for the modern amenities to show up, including 2D plots on the desktop. Julia has a stub-free FFI; you don't have to write anything to interface with C. trivial to add your favorite 2D graphics library. P.S. Don't people know how to interface with Gnuplot?
- apl 15y ago> Furthermore, in Julia the varargs tuple x will have to be > processed without the convenience of Matlab's nargin > function. I genuinely don't get that. nargin is equivalent to length(x) in this scenario, and Julia's overall handling of default/variable arguments seems significantly more convenient than MATLAB's if nargin < 5 foo = 21; end preambles.
- dkarl 15y agoIn Julia, I could do (s,z,zz) = spectrum(x); but I end up with variables z and zz that clutter the workspace and take up memory. This is easy to fix with a bit of additional syntax. Using a placeholder to indicate values you don't care about, that would be: (s,_,_) = spectrum(x); I don't know if it's simple on the implementation side, but it's easy to read and understand.
- buo 15y agoI'm the post's author. I submitted it to HN a couple of weeks ago, but it didn't get much attention; I'm happy to see more comments this time around. Regarding IDEs: I guess it's a matter of taste. I don't like IDEs, but I wouldn't mind using one as long as it allowed me to code in my editor of choice. Plotting: I decided to scratch my own itch, and created Gaston, a gnuplot interface. It already offers quite a bit of functionality. It's available at https://bitbucket.org/mbaz/gaston/ https://bitbucket.org/mbaz/gaston/ nargin vs length: this is something I overlooked when I wrote the article. I will post a new article with the perspective and knowledge that working on Gaston has given me. I already know what the conclusion will be: julia stands a very good chance of becoming the new standard language for technical computing.