Re:A Matlab Programmer's Take On Julia
by asg on Tuesday April 10, 2012 @07:07AM
(#3821626)
This post was discussed constructively on the Julia mailing list some time ago, and spawned a long and interesting thread. Worth perusing for some followup.
Re:A Matlab Programmer's Take On Julia
by probably on Tuesday April 10, 2012 @07:21AM
(#3821664)
The 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.
Re:A Matlab Programmer's Take On Julia
by etrain on Tuesday April 10, 2012 @10:34PM
(#3825654)
Yep, RStudio is GWT driven (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.
Re:A Matlab Programmer's Take On Julia
by buo on Tuesday April 10, 2012 @01:32PM
(#3823359)
I'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/
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.
Re:A Matlab Programmer's Take On Julia
by karpathy on Tuesday April 10, 2012 @07:21AM
(#3821663)
Interesting 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.
Re:A Matlab Programmer's Take On Julia
by simonster on Tuesday April 10, 2012 @08:28AM
(#3821825)
I 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.
Re:A Matlab Programmer's Take On Julia
by dkarl on Tuesday April 10, 2012 @10:45AM
(#3822363)
Why the browser? In my experience, editing text in a browser is pretty horrible. It doesn't matter for banging out HN comments or emails, but for code, I don't think I could put up with it. It's bad enough having to use the text editors in Eclipse and IntelliJ; regressing all the way to browser text boxes would be a tragedy.
Is it for the sake of having persistent server sessions that don't go away when you close your client? That could easily be done, and has been done, without resorting to using a web browser. I admit that Emacs with Slime is not a paragon of simplicity and reliability, but I suspect it would be easier to recreate the convenience and polish of a web UI in an independent client (possibly based on a hacked version of Chrome or Firefox, if you really, really like your browser) than it would be to turn a text box into a decent code editor.
Re:A Matlab Programmer's Take On Julia
by simonster on Tuesday April 10, 2012 @07:13PM
(#3824979)
My main reason for the browser is that it makes seamless to execute code on a remote machine. Text-based interfaces are not very useful because you can't see plots without saving them and copying them. X11 forwarding is slow. My current solution is NX, but it's not optimal, since I hate NX 4 and NX 3.5 doesn't run on Lion.
Cloud9 IDE is already a decent browser-based code editor. It's already better than the MATLAB editor in just about every way but integration with the interpreter. Using a browser-based IDE will solve both the cross-platform UI issue and the remote access issue.
Re:A Matlab Programmer's Take On Julia
by etrain on Tuesday April 10, 2012 @07:36AM
(#3821698)
For 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) - 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.
Re:A Matlab Programmer's Take On Julia
by apl on Tuesday April 10, 2012 @08:30AM
(#3821830)
> 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
https://groups.google.com/forum/?fromgroups#!searchin/julia-...
There is already an emacs mode for Julia: https://github.com/JuliaLang/julia/blob/master/contrib/julia...
I was not aware RStudio was web-based. News to me...
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/
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.
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.
Is it for the sake of having persistent server sessions that don't go away when you close your client? That could easily be done, and has been done, without resorting to using a web browser. I admit that Emacs with Slime is not a paragon of simplicity and reliability, but I suspect it would be easier to recreate the convenience and polish of a web UI in an independent client (possibly based on a hacked version of Chrome or Firefox, if you really, really like your browser) than it would be to turn a text box into a decent code editor.
Cloud9 IDE is already a decent browser-based code editor. It's already better than the MATLAB editor in just about every way but integration with the interpreter. Using a browser-based IDE will solve both the cross-platform UI issue and the remote access issue.
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.
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:
I don't know if it's simple on the implementation side, but it's easy to read and understand.This is something I'd miss. I use R sometimes only because it's plotting features are so fantastic.
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?