Live data from Hacker News

FastR: An implementation of the R language in Java [pdf]

oracle.com

1–10 of 34 posts

Re: FastR: An implementation of the R language in Java [pdf]

#4
post #3

Are there any tools to convert R to JS or Python, or... any other common language that doesn't require a 60mb runtime distribution?

I have done some work converting R to C++ by hand. The problem, as this presentation discusses, is that a 95% automated conversion is easy, but that last 5% often involves diving deep into the weirdness of the R interpreter.

Re: FastR: An implementation of the R language in Java [pdf]

#5
post #3

Are there any tools to convert R to JS or Python, or... any other common language that doesn't require a 60mb runtime distribution?

That's a really bizarre reason not to use R. Python's distribution is about 30MB if I recall. It doesn't really make much sense to convert R to JS or Python, since the semantics are so different.

If you don't want to use R, Pandas in Python provides very powerful data frames (which are likely faster for many cases). However, it depends on NumPy, matplotlib, and a few other libraries, which probably total more than 60 MB.

Re: FastR: An implementation of the R language in Java [pdf]

#6
The programming language analysis is pretty interesting, but you have to ask, what's the point of a brand-new Java implementation? R isn't just a programming language, but it's a software framework/ecosystem. They mentioned this in the slides, but it's problematic because R crucially relies on C and Fortran interaction (which I thought the JVM can't do efficiently, since it doesn't like giving C/Fortran raw memory access to its internals). Decades of work has gone into highly optimized Fortran linear algebra libraries, for example -- which R and all the other high-level numerical languages (NumPy/SciPy, Matlab, Julia) use. And many of the CRAN packages (the availability of which are a major reason anyone uses R in the first place) are partly or mostly C/Fortran code.

There are many other R implementation efforts going on right now -- Radford Neal lists a few (as well as his own) here: http://radfordneal.wordpress.com/2013/07/24/deferred-evaluat...

The presentation focuses on the R programming language, which they nicely show has all sorts of misfeatures that impede rapid execution. If you're going to not try to have compatibility with R and CRAN, you might as well start from scratch with design and performance in mind, as in Julia: http://julialang.org/

Re: FastR: An implementation of the R language in Java [pdf]

#7
post #5
post #3

Are there any tools to convert R to JS or Python, or... any other common language that doesn't require a 60mb runtime distribution?

That's a really bizarre reason not to use R. Python's distribution is about 30MB if I recall. It doesn't really make much sense to convert R to JS or Python, since the semantics are so different. If you don't want to use R, Pandas in Python provides very powerful data frames (which are likely faster for many cases). However, it depends on NumPy, matplotlib, and a few other libraries, which probably total more than 60…

Python 3's installed size is 90MB here, 2 is 60MB.

Re: FastR: An implementation of the R language in Java [pdf]

#8
post #5
post #3

Are there any tools to convert R to JS or Python, or... any other common language that doesn't require a 60mb runtime distribution?

That's a really bizarre reason not to use R. Python's distribution is about 30MB if I recall. It doesn't really make much sense to convert R to JS or Python, since the semantics are so different. If you don't want to use R, Pandas in Python provides very powerful data frames (which are likely faster for many cases). However, it depends on NumPy, matplotlib, and a few other libraries, which probably total more than 60…

I already use python, so having it in same codebase would be perfect. However, I have some code in R that is pretty important, so I have to include that as well with an application (model).

Re: FastR: An implementation of the R language in Java [pdf]

#9
post #7
post #5

Earlier quoted context omitted.

That's a really bizarre reason not to use R. Python's distribution is about 30MB if I recall. It doesn't really make much sense to convert R to JS or Python, since the semantics are so different. If you don't want to use R, Pandas in Python provides very powerful data frames (which are likely faster for many cases). However, it depends on NumPy, matplotlib, and a few other libraries, which probably total more than 60…

Python 3's installed size is 90MB here, 2 is 60MB.

Good thing is that python is pretty ubiquitous, as is virtual env :)

Re: FastR: An implementation of the R language in Java [pdf]

#10
post #6

The programming language analysis is pretty interesting, but you have to ask, what's the point of a brand-new Java implementation? R isn't just a programming language, but it's a software framework/ecosystem. They mentioned this in the slides, but it's problematic because R crucially relies on C and Fortran interaction (which I thought the JVM can't do efficiently, since it doesn't like giving C/Fortran raw memory ac…

I think compatibility with GNU R and CRAN is a pretty reasonable goal - even if it's not the focus of this particular Oracle research project.

We've been working hard and now systematically to get Renjin (also R on the JVM) to run CRAN packages: http://packages.renjin.org. Renjin also compiles C and Fortran code to JVM bytecode, though there is still some work to do there as well.

Regarding the hand-tuned matrix math libraries, there's nothing to stop you from using them with Renjin - you can drop in MKL or Atlas as desired, or fall back to pure-Java versions in a pinch.

Post reply on HN