5 ms·
Yes there is a really great statistics functional programming language that was founded on being a scheme for data science. Unfortunately the data scientist bac
by baldfat 8y ago
Yes there is a really great statistics functional programming language that was founded on being a scheme for data science. Unfortunately the data scientist back then were not training in doing code well so the examples of the language got cluttered up but there is a great functional Scheme right in there.
That language is R. http://adv-r.had.co.nz/Functional-programming.html http://adv-r.had.co.nz/Functional-programming.html
I learned Racket (Lisp) and then realized I had so many thing inside of R that I was missing. Hadley Wickham's tidyverse and funtional Advance R book changed everything in my code.
- tree_of_item 8y agoThe parent asked for a Lisp dialect. R is not a Lisp dialect. It's ridiculous to claim there's a "Scheme" in R. R is not Scheme, it's not even close.
- peatmoss 8y agoIt’s much closer than people think. R originally built on a Scheme runtime, and the DNA of Scheme is still lurking pretty close to the surface. The meta programming facilities in R still look very lispy, and are used to good effect throughout the Tidyverse family of packages. If I had one wish, it would be to see something like the Tidyverse exist in something still closer to Scheme... like Racket.
- qwerty456127 8y agoIf it's all Scheme under the hood, why can't it be backported easily?
- disgruntledphd2 8y agoThis is valid R sum(1:10) This is also valid R: (sum (1:10))
- qwerty456127 8y agoJust wrapping whatever in parentheses does not make a lisp.
- peatmoss 8y agoCurrently, this comment is heavily downvoted, which I do not understand. If Julia warrants mentioning as having a lispy core, then it’s at least as valid to point out R’s deeply lisp-inspired (and technical implementation based) heritage. I mean, scratch the surface on any of the FFI docs, and you’ll see that SEXPRs are right there lurking barely beneath the surface: http://dirk.eddelbuettel.com/code/rcpp.html http://dirk.eddelbuettel.com/code/rcpp.html EDIT: and you can, as the parent comment says, do much worse than Hadley’s functional programming guide as an introduction.
- qwerty456127 8y ago> and you’ll see that SEXPRs are right there lurking barely beneath the surface Then why the surface? Why can't we just have a lisp with a good data-science library? Scheme seems the easiest of all the programming languages to me. I bet I can teach Scheme (not including advanced FP stuff though) to anybody faster than any other language although I have never used it to code anything serious (because libraries), I actually find it simpler than Python or even VBA. Phenomenally everybody seems so scared by the parentheses but these are not a serious problem given an intelligent IDE with proper outlining and highlighting.
- disgruntledphd2 8y agoBecause they made the decision to be S-compatible, as many statisticians used S+ at the time. At that point in time, the real lispers all used X-Lisp Stat: https://en.wikipedia.org/wiki/XLispStat https://en.wikipedia.org/wiki/XLispStat (in fact, some people objected to the journal of statistical software on the basis that it would only cover XLispStat).
- peatmoss 8y agoYou’re preaching to the choir here. I’d love to see a data science community around Racket in particular. In fact, you can do quite a lot in Racket today, just with not nearly the libraries and tooling as Python or R. But as a consolation prize, R is pretty Schemey, and has the best collection of libraries for data around. It’s been a dream for years to figure out a way of making use of more of R from Racket, but time and deadlines keep getting in the way.