7 ms·
The fact that R has such buy-in despite being a rather awful programming language (a friend of mine worked on the next Lisp-like version of R under Ross Ihaka,
by EdwardDiego 8y ago
The fact that R has such buy-in despite being a rather awful programming language (a friend of mine worked on the next Lisp-like version of R under Ross Ihaka, and the next version is based on the fact that current R is a bit awful) is precisely because it offers such convenience to non-programmers.
In my sister company, they have data scientists, and data engineers. The data scientists write their algorithms in the language they're most comfortable with (typically JS), and the data engineers rewrite to perform efficiently in the application that's applying them.
Data scientist and programmer are two very different specialisations.
- minimaxir 8y agoBase R is annoying, but IMO the tidyverse alone makes the language worthwhile.
- mathematicaster 8y agoIMO it's the exact opposite. "Il mondo e' bello perche' e' vario".
- peatmoss 8y agoIt’s a great set of DSLs that show off some of the pretty decent meta programming facilities of R. I think those DSLs could be created elsewhere, but I also don’t think it's an accident that it happened in R.
- xaranke 8y agoCan you elaborate more on the "algorithms in JS" bit? What libraries/tools are they using? Why JS versus Python or JVM languages?
- mythrwy 8y agoSeconded. "Data scientists" and "being most comfortable writing in JS" just sounds strange to me.
- telchar 8y agoI don't want to pile on but that sentence strongly reminded me of the oldish saw about "a data scientist is a programmer who lives in SF". I've never heard of anyone using JS for data science. What might it have that's anywhere comparable to the tidyverse or numpy/scipy/sklearn?
- EdwardDiego 8y agoThey don't use JS to investigate the data, they use SQL (Hive, Impala etc.) as their lingua franca for exploring datasets. But they then write their algorithms based on that analysis in JS. Again, I don't know why, it struck me as odd also, but hey, whatever they're doing, it works for them.
- EdwardDiego 8y agoI have no idea why they use JS - it's a Berlin start-up so maybe trendiness is involved? All I know is that their data engineers have to make those algorithms work in production.
- 110285591136 8y ago> ... despite being a rather awful programming language (...) it offers such convenience to non-programmers I've heard people say similar things about MATLAB - that it's a poorly designed language, but many that people (mostly non-CS folk) use it out of convenience. Can someone with experience using R explain what makes it so appealing to non-programmers? It seems like these two factors, "poorly designed" and "easy to use", should be at odds with each other.
- nicwilson 8y ago(Havn't used much R, Have used MATLAB) Its all about availability of libraries. I did control systems in undergrad, and despite being a shitty language, being able to describe and manipulate dynamic systems (ODEs) was very useful. Doing numerical integration by hand for the nonlinear systems was horrible, though better than simulink (which is about as much fun as using LabVIEW or sculling H2SO4).
- jhbadger 8y agoWhat makes R appealing is basically all statistical methods are available in it -- and it is often the initial implementation language of new methods in statistics. Often an R program involves very little programming as such other than to read in data, run some existing statistical methods on it and print or plot the results. I'm not a particular fan of the language itself (I kind of wish XLispStat hadn't died), but every time I feel like checking out Python or Julia I find things I need that haven't been implemented yet in those languages that are in R.
- peatmoss 8y agoEh, it’s not as bad as people like to whinge that it is. There are indeed warts, but they’re pretty overblown. If you are comfortable with functional idioms R mostly does what you want without a great deal of fuss. If you’re predisposed to procedural idioms, then you’re going to be fighting the language. I started learning R about the time I started reading How to Design Computer Programs, and I found it pretty easy to transfer that model of thinking to R. And I find Clojure, Racket, and Scheme to also be somewhat comfortable after a short reacclimation period. Some of the convenience bits have to do with most functions working on vectors without needing to explicitly iterate most of the time. Also libraries. If you want to estimate a linear regression, or make some exploratory plots, or try some rando statistical method that your graduate advisor suggests, you don’t have to worry about whether it’s already been implemented for you in R. You can do a lot of heavy lifting by cribbing off of example code because most code is short. You just get heaps of leverage by using R. Look, I like to do things the hard way a lot. My whole life is pretty much a string of highest friction path choices. For data science R is easy because all the work has been done for you. It's the difference between writing GUI apps against Cocoa APIs vs, I dunno, XLib or Motif.
- nsriv 8y agoR is cumbersome, but then you look at Matlab and Stata and try to explain that to social science graduate students that just managed to grok LaTex, and R starts looking like a streamlined vision of the future.
- peatmoss 8y agoTotally. I’ve taught intro R to mostly social scientists, and intro Python to mostly physical scientists. Every workshop, the R group is coding circles around the Python group with the same number of hours of instruction. And the intro R curriculum that we use was largely a ported version of the Python curriculum. Having seen brand new scientific programmers tackle two “beginner friendly” languages, man the differences after a day or two are stark.
- joycian 8y ago> The data scientists write their algorithms in the language they're most comfortable with (typically JS) This seems weird to me, I associate JS with web dev (and even more with the front end side of it)
- dasmoth 8y agoa friend of mine worked on the next Lisp-like version of R under Ross Ihaka Did anything come of this? I seem to remember seeing a paper or article where he proposed doing this, but I’ve never seen an implementation. Edit: paper I was thinking of is https://www.stat.auckland.ac.nz/%7Eihaka/downloads/Compstat-2008.pdf https://www.stat.auckland.ac.nz/%7Eihaka/downloads/Compstat-...
- lispm 8y agoProbably: https://github.com/blindglobe/common-lisp-stat https://github.com/blindglobe/common-lisp-stat
- noelsusman 8y ago>The data scientists write their algorithms in the language they're most comfortable with (typically JS) I'm sorry, what? You know data scientists who use JavaScript to implement their algorithms?