Live data from Hacker News

Renjin: a JVM-based interpreter for the R language

renjin.org

21–30 of 37 posts

Re: Renjin: a JVM-based interpreter for the R language

#21

FastR [1], an R implementation for the JVM using Truffle aims to be both fast and compatible, including C and fortran calls from R using Truffle's polyglot framework. The thing that makes this even more awesome is inter language optimization - inline your C code into your R code at runtime, which can result in zero overhead inter language calls. [1] https://github.com/graalvm/fastr

One of the interesting things I note from the readme, is that they have an implementation of Grid graphics. Grid is pretty awesome for lower level graphics, and is part of the reason ggplot is able to be as good as it is.

Looking forward to poking around at their implementation. If it’s a JVM friendly implementation, that could open up some nicer visualization options from other languges like clojure, scala, etc.

Re: Renjin: a JVM-based interpreter for the R language

#22

It's been a while since I've looked at Renjin. Last I looked, it was a worthy replacement for tasks that you'd do in base R, but the library story was incomplete. Nowadays, my R usage has gone full tidyverse. Anyone know if dplyr and the gang work here? I know dplyr has a lot of C++ code, and don't know how well the "Renjin-specific" Rcpp interop story is.

First thing I did was look at packages and see if tidyverse, purrr, lubridate, stringr and feather. They are all there.

http://packages.renjin.org/packages/search?q=tidyverse

Re: Renjin: a JVM-based interpreter for the R language

#23

FastR [1], an R implementation for the JVM using Truffle aims to be both fast and compatible, including C and fortran calls from R using Truffle's polyglot framework. The thing that makes this even more awesome is inter language optimization - inline your C code into your R code at runtime, which can result in zero overhead inter language calls. [1] https://github.com/graalvm/fastr

One of the interesting things I note from the readme, is that they have an implementation of Grid graphics. Grid is pretty awesome for lower level graphics, and is part of the reason ggplot is able to be as good as it is. Looking forward to poking around at their implementation. If it’s a JVM friendly implementation, that could open up some nicer visualization options from other languges like clojure, scala, etc.

Indeed, they presented this at the last RIOT workshop in July [1] and it's a great way to support graphics without dealing with the grDevices package from GNU R.

[1] https://youtu.be/otXTGBTb-3w?t=985

Re: Renjin: a JVM-based interpreter for the R language

#26
post #22

It's been a while since I've looked at Renjin. Last I looked, it was a worthy replacement for tasks that you'd do in base R, but the library story was incomplete. Nowadays, my R usage has gone full tidyverse. Anyone know if dplyr and the gang work here? I know dplyr has a lot of C++ code, and don't know how well the "Renjin-specific" Rcpp interop story is.

First thing I did was look at packages and see if tidyverse, purrr, lubridate, stringr and feather. They are all there. http://packages.renjin.org/packages/search?q=tidyverse

Yes, but some of them aren't available yet, specifically dplyr:

http://packages.renjin.org/package/org.renjin.cran/tidyverse

Re: Renjin: a JVM-based interpreter for the R language

#27
post #16

Earlier quoted context omitted.

Even just using Renjin to be able to access Java code within R seems super useful.

Wasn’t that already possible via the rJava library?

True. Although Renjin seems like it provides a bit of a nicer interface in some cases. (Disclaimer: not an R developer)

Re: Renjin: a JVM-based interpreter for the R language

#28

How does Renjin run the BLAS and LAPACK Fortean code, and the C code in R?

We transpile all C, C++, and Fortran code directly to Java-bytecode using our open source tool called gcc-bridge (https://github.com/bedatadriven/renjin/tree/master/tools/gcc...). This is included as part of Renjin, but you can use it independently as part of your project as well.

Re: Renjin: a JVM-based interpreter for the R language

#29
Tried a few basic things, some of them did not work:

1. x = rnorm(1000) 2. plot(density(x)) --> not work 3. stem(x) --> not work 4. summary(x) --> works

For R data handling, I always use data.table for its efficiency and power.

1. library(data.table) 2. x = data.table(x=rnorm(1000)) --> not work > x = data.table(x=rnorm(1000)) ERROR: Exception calling Calloccolwrapper : Unimplemented GNU R API function 'DUPLICATE_ATTRIB'

Re: Renjin: a JVM-based interpreter for the R language

#30
post #14

Earlier quoted context omitted.

I suppose their reasons are here: http://www.renjin.org/about.html I've only used R for a short time, so I can't comment on it myself.

“R has been traditionally limited by the need to fit data sets into memory, and working with even modest sets of data can quickly exhaust memory due to historical limitations in GNU R interpreter’s implementation.” I see that the propaganda machine never rests, no matter which language. Either that, or they haven’t heard of Vertica’s R, which is excellent and counters these claims. The rest with the “fragmentation of…

that's a fairly toxic and silly attitude towards a free software project. Don't like it - don't use it.

I personally think it's great that there are people who are working on making R faster/better/popular, even though I may disagree with the methods they've chosen to achieve those goals.

Post reply on HN