

A Matlab Programmer's Take On Julia - fuzzythinker
http://2pif.info/op/julia.html

======
asg
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.

[https://groups.google.com/forum/?fromgroups#!searchin/julia-...](https://groups.google.com/forum/?fromgroups#!searchin/julia-
dev/a$20matlab$20programmer/julia-dev/W2C9-HbXH3o/86D4GUYtYgwJ)

~~~
probably
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.

~~~
etrain
I 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...](https://github.com/JuliaLang/julia/blob/master/contrib/julia-
mode.el)

~~~
probably
Emacs mode already? They're doin it right. :)

I was not aware RStudio was web-based. News to me...

~~~
etrain
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.

------
buo
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.

------
karpathy
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.

~~~
simonster
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.

~~~
dkarl
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.

~~~
simonster
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.

------
apl

      > 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
_In 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.

------
Derbasti
It seems to be a bit early to criticize Julia on details like that. Still, not
a bad article.

~~~
pron
Because Julia is at such an early stage, such articles are important to help
it improve.

------
cageface
_No 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
it'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?

