3 ms·
Programming R at native speed using Haskell (2015)
- bitdizzy 6y agoThis is really cool! Of all the ways to get numerical and statistical capabilities into Haskell this seems to be the right balance of pragmatic and ambitious. I wonder if there any surprising linker optimizations that happen because the R interpreter is in the same binary as the Haskell. Also the body text font sucks.
- pvaldes 6y ago> the body text font sucks. Could benefit ot a 1.5 linespacing and a slightly shorter textwidth, for sure.
- vlovich123 6y agoIt sounds like the embed the interpreter which would make it impossible for the linker to really do much. Even if it could, my understanding here is that the R interpreter is mostly just calling out to native C precompiled functions which would be another barrier. Cross-language linker optimizations is an active area of research though so it’s a good instinct. Rust is definitely trying to do this across FFI boundaries with C/C++ code.
- platz 6y agoI had a much nicer time using inline-r to create graphs in haskell with ggplot; that is one of the nice things about a big ecosystem, sometimes it's just too hard to catch up / rebuilt with a native library
- 6gvONxR4sf7o 6y agoThis is awesome. I love seeing languages benefit from existing ecosystems. For anyone interested, there’s a similar library in python called rpy2. Rpy2 is finicky, but if you’re doing something more traditionally softwarey and want to benefit from R, I still find it easier to use a general language like python and call R than it is to use R alone and try to do things it’s not great at and doesn’t have an ecosystem for. It’s great to see another venue like that.
- neolog 6y ago(2015)
- stewbrew 6y agoI was hoping for a way to write R extensions in Haskell - similar to rcpp. Oh well.
- dang 6y agoDiscussed at the time: https://news.ycombinator.com/item?id=10189141 https://news.ycombinator.com/item?id=10189141