[HN Gopher] Programming R at native speed using Haskell (2015)
       ___________________________________________________________________
        
       Programming R at native speed using Haskell (2015)
        
       Author : behnamoh
       Score  : 100 points
       Date   : 2020-11-03 16:53 UTC (6 hours ago)
        
 (HTM) web link (www.tweag.io)
 (TXT) w3m dump (www.tweag.io)
        
       | stewbrew wrote:
       | I was hoping for a way to write R extensions in Haskell - similar
       | to rcpp. Oh well.
        
       | neolog wrote:
       | (2015)
        
         | dang wrote:
         | Added. Thanks!
        
       | bitdizzy wrote:
       | This 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.
        
         | vlovich123 wrote:
         | It 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.
        
         | pvaldes wrote:
         | > the body text font sucks.
         | 
         | Could benefit ot a 1.5 linespacing and a slightly shorter
         | textwidth, for sure.
        
       | platz wrote:
       | I 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 wrote:
       | This 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.
        
       | dang wrote:
       | Discussed at the time:
       | https://news.ycombinator.com/item?id=10189141
        
       ___________________________________________________________________
       (page generated 2020-11-03 23:01 UTC)