Hacker News new | past | comments | ask | show | jobs | submit login

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

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.




Currently, 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

EDIT: and you can, as the parent comment says, do much worse than Hadley’s functional programming guide as an introduction.


> 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.


You’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.


I searched and I can't find it but someone was trying to implement R inside of Racket.

Personally I really want a language just for cleaning data in Racket first and then tidyverse.


Have you seen this package yet? http://alex-hhh.github.io/2018/08/racket-data-frame-package....

I think it could be the starting point for some data science work in Racket.


Thank you so for finding that. It is a totally different project but further along then the one I was following a few years ago.


Because 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 (in fact, some people objected to the journal of statistical software on the basis that it would only cover XLispStat).


Most programmers, esp from ALGOL-like and C-like languages, hate the syntax. Decades have been wasted trying to convince them to overlook it. Clojure was a surprising exception. Whereas many languages that stayed close to languages people were familiar with got adoption.

Better to hide the LISP'y core underneath a syntax similar to a widely deployed language. Julia was a brilliant example that's getting a lot of uptake vs scientific LISP's as predicted.


The 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.


It’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.


If it's all Scheme under the hood, why can't it be backported easily?


This is valid R

  sum(1:10)
This is also valid R:

  (sum (1:10))


Just wrapping whatever in parentheses does not make a lisp.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: