TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Programming R at native speed using Haskell

145 pointsby psibiover 9 years ago

7 comments

baldfatover 9 years ago
I love R and I love programming in it, but I have always thought I need to learn Julia due to a few things including speed, but that the R community keeps coming out with great answers to those questions where Julia keeps my interest. I don&#x27;t see how this would speed up my typical R programming or code to be worth learning Haskell. What am I missing and yes I read the whole article.<p>I have found Haskell very difficult to use with Cabal and its package management. The reason I went to Haskell was to teach myself functional programming. After struggling and going through 2 books I still felt like I hated Haskell due to making the environment just work. I work in three different locations and to get all 5 computers to work in Haskell was a serious pain. This lead me to see what else is out there. It lead me to <a href="https:&#x2F;&#x2F;www.coursera.org&#x2F;course&#x2F;proglang" rel="nofollow">https:&#x2F;&#x2F;www.coursera.org&#x2F;course&#x2F;proglang</a> which introduced me to Racket and I loved it and felt that Racket was the perfect fit for me.
评论 #10190855 未加载
评论 #10191844 未加载
评论 #10190897 未加载
jmountover 9 years ago
Looks fun. However, what is REALLY slow in R isn&#x27;t the interpreter or garbage collector: but some of the object re-allocation patterns you accidentally trigger. Here is my note making some comparisons and recommendations on writing fast code in R: <a href="http:&#x2F;&#x2F;www.win-vector.com&#x2F;blog&#x2F;2015&#x2F;07&#x2F;efficient-accumulation-in-r&#x2F;" rel="nofollow">http:&#x2F;&#x2F;www.win-vector.com&#x2F;blog&#x2F;2015&#x2F;07&#x2F;efficient-accumulatio...</a>
JanneVeeover 9 years ago
Well haskell is not the only option.<p>From .NET: <a href="http:&#x2F;&#x2F;rdotnet.codeplex.com&#x2F;" rel="nofollow">http:&#x2F;&#x2F;rdotnet.codeplex.com&#x2F;</a> there is also a dataprovider directly to F# : <a href="http:&#x2F;&#x2F;bluemountaincapital.github.io&#x2F;FSharpRProvider&#x2F;" rel="nofollow">http:&#x2F;&#x2F;bluemountaincapital.github.io&#x2F;FSharpRProvider&#x2F;</a><p>Also there is C++ binding available also: <a href="http:&#x2F;&#x2F;www.rcpp.org&#x2F;" rel="nofollow">http:&#x2F;&#x2F;www.rcpp.org&#x2F;</a>
评论 #10191931 未加载
jzwinckover 9 years ago
How does garbage collection work? Does this version improve on the R I know from a year ago, which had a reference counting system with only three values: 0, 1, and 2+?
评论 #10190633 未加载
评论 #10190802 未加载
ximengover 9 years ago
Does anyone have good links to documentation on quasiquotation in Haskell? Last time I looked I struggled to find a good summary.
评论 #10190850 未加载
评论 #10191728 未加载
Mikeb85over 9 years ago
While this really has nothing to do with programming R, this is a neat way to use Haskell for some statistics&#x2F;data science tasks whilst making use of all the work that has gone into R over the years.<p>I personally don&#x27;t see this as a way of using R, rather a way of using Haskell.
jbssmover 9 years ago
I don&#x27;t know almost anything about Haskell (tried to learn it some years ago but never pass form the basics).<p>Yet from what I&#x27;m seeing we are only calling R functions from Haskell. I&#x27;m probably missing something on the explanation, but how does this speed up R?
评论 #10190896 未加载
评论 #10190907 未加载