News for hackers. Stuff that matters.
Re:Julia is awesome, but.. by chollida1 on Monday December 29, 2014 @10:00AM (#8810006)
I agree with alot of the authors criticism's.

Julia's sweet spot seems to be anyone who needs to do statistical work who also has an existing C ABI based environment.

The ability to seamlessly plug in Julia to your production system via C code is a boon for those of us who have to use R in an "offline" capacity and then feed data to production systems.

The downside of alot of the Julia posts is that its not R. R, for better and worse, has many years of bug fixing and library design behind it.

I have yet to stump cran (http://cran.r-project.org/) when looking for a library and after 5+ years of using R I still am amazed that I can learn some new ability that ggplot can do.

My advice to people who ask what language to use is always, I think Julia is still a bit too early on to use unless you already know what code you want to write and are using a C based enviroment.

The reason is that most programmers just want to get one task done. They aren't an expert on the mathematical domain they are trying to use, they just want to plug their values into a library and get their results and maybe print them in a nice format. With Julia I still run into issues too often where you have to second guess the langugage or library and if you aren't fully sure that your math is right you tend to assume you are wrong:)

Otherwise use R. It just works and it will make googling for answers much easier.

EDIT replaced jvm with C ABI. Not sure how I made that big of a typo:(.

Re:Julia is awesome, but.. by tenfingers on Monday December 29, 2014 @10:31AM (#8810140)
I would say Julia's target is much wider than R.

R is actually a nice language (also with multiple dispatch!), but it's basically useless for any actual numerical work. Too slow. There have been efforts in the past to introduce a JIT compiler, but nothing has become mainline yet. The GC is also very poor.

The actual base system in R is also very small. The built-in vector types helped the language mitigate the issue due to the fact that it's very easy to build a C extension that does the actual computation by just taking the underlying memory pointer (it's actually easier to do than python and it maps much better). But it stops there. If it wasn't for the large swath of statistical packages, R wouldn't have much traction. Not to mention that the code quality of the typical CRAN package is quite low, coming from people with a background in statistics and very little CS knowledge.

The hope with Julia is being able to actually develop methods in Julia itself. I personally looking forward to replace python&c++ with Julia&Rust in the future.

Re:Julia is awesome, but.. by bachmeier on Monday December 29, 2014 @11:16AM (#8810339)
> There have been efforts in the past to introduce a JIT compiler, but nothing has become mainline yet

It's been included in the default install of R since version 2.14. You can compile any function you want, and in some cases you can get a speedup of several times. Sure, you're not getting the speed of C, but it's there, it works, and in the future it will lead to much larger speedups.

Some info and timings are here: http://www.rinfinance.com/agenda/2014/talk/LukeTierney.pdf

The experimental version of the compiler can achieve speedups in the neighborhood of 20x.

Re:Julia is awesome, but.. by lottin on Monday December 29, 2014 @02:43PM (#8811419)
Well, it's true, it is included in the default install. After unsuccessfully trying to locate the elusive 'compiler' package at CRAN, I came to the conclusion that the R compiler was an urban legend. Now I realise it was already installed all along from the start and all I had to do is 'library(compiler)'. Silly me.
Re:Julia is awesome, but.. by bachmeier on Monday December 29, 2014 @04:13PM (#8811817)
> Silly me.

Not really. That's an example of one R's rough edges. I did the same thing.

Re:Julia is awesome, but.. by grayclhn on Monday December 29, 2014 @11:23AM (#8810372)
Are you sure you're referring to JIT as opposed to byte-compilation?
Re:Julia is awesome, but.. by bachmeier on Monday December 29, 2014 @02:17PM (#8811282)
It is a byte code compiler that has a JIT mode.[1] I'm pretty sure that's what the parent comment was referring to.

[1] See page 7 of the presentation I linked above.

Re:Julia is awesome, but.. by grayclhn on Monday December 29, 2014 @03:10PM (#8811535)
I didn't know about the JIT mode. Thanks for the specific pointer.
Re:Julia is awesome, but.. by tenfingers on Monday December 29, 2014 @11:31AM (#8810419)
I have R 3.1.x and I never noticed (it's in "compiler"). It's off by default... pretty sad.
Re:Julia is awesome, but.. by jghn on Monday December 29, 2014 @02:10PM (#8811233)
It can, but it often doesn't, at least not a year or so ago (perhaps it got much better). I've seen the examples with great speedups but every time I've tried it on real code I never saw anything. You're much better off just using Rcpp for those sorts of cases.
Re:Julia is awesome, but.. by edraferi on Monday December 29, 2014 @11:37AM (#8810451)
If it wasn't for the large swath of statistical packages, R wouldn't have much traction.

I agree, but Community & Ecosystem are critical to any language's success. R's community is great and getting better [1].

You could make very similar criticisms about JavaScript, which is a lousy language that has accomplished amazing things thanks to third-party extensions and a very active development community.

[1] http://www.tiobe.com/index.php/content/paperinfo/tpci/index....

Re:Julia is awesome, but.. by minthd on Monday December 29, 2014 @11:42AM (#8810474)
Why rust ? can't Julia offer enough speed?
Re:Julia is awesome, but.. by sixbrx on Monday December 29, 2014 @02:19PM (#8811294)
In my experience Julia is quick with low level array oriented programming which doesn't allocate ("C in Julia"), but if the garbage collector is needed within loops or you use anonymous functions there then you'll suffer greatly.
Re:Julia is awesome, but.. by hayd on Monday December 29, 2014 @07:33PM (#8812662)
Have you seen the recent (unmerged) GC work https://github.com/JuliaLang/julia/pull/8699
Re:Julia is awesome, but.. by sixbrx on Tuesday December 30, 2014 @01:13PM (#8815793)
I had not, thanks for the link. I haven't given up on Julia!
Re:Julia is awesome, but.. by tenfingers on Tuesday December 30, 2014 @03:08AM (#8813775)
Rust covers the lower-level much better. In Julia for example you currently don't have a nice way to modify C-like structs. You can offset memory directly, but it's a pointless exercise. Even if a record-like syntax is added, the dynamic nature of Julia might incur in different latencies, you have the GC (not optional), and the runtime is quite big.

Rust is filling the same niche I'm using c/c++ for, where I need absolute control of every detail: not necessarily for performance.

Re:Julia is awesome, but.. by peatmoss on Monday December 29, 2014 @10:28AM (#8810125)
I'm not sure you're talking about Julia here. Or maybe it has some way of interfacing with the JVM that I'm not familiar with? I've thought Julia's interop story had more to do with being able to interface with C code easily via LLVM.

For the JVM, Clojure and Incanter seem like a better statistical bet. I heard they're moving toward a 2.0 release of Incanter too...

Re:Julia is awesome, but.. by synparb on Monday December 29, 2014 @10:30AM (#8810133)
Could you point to a link about how to seamlessly plug Julia into the jvm? I haven't seen any documentation or examples.
Re:Julia is awesome, but.. by KenoFischer on Monday December 29, 2014 @10:49AM (#8810218)
Even though there parent misspoke here, there's https://github.com/aviks/JavaCall.jl for interfacing with the JVM, though of course that's more the reverse.