News for hackers. Stuff that matters.
Re:A Pamphlet against R: Computational Intelligence in Guile... by groceryheist on Monday July 30, 2018 @03:30AM (#17642669)
Mother of all clickbait titles.

I read the first few pages and didn't see any content about R. The first chapter is an introduction to scheme. I scanned it and didn't see any R code all. It's an introduction to scheme that builds up to K means.

R does suck in so many ways, especially the object oriented systems and the horrible default libraries with so many inconsistent idioms, but we put up with it because mainly because it provides the most advanced open source ecosystem for modeling and visualizing data and it is also pretty fast, especially with data.table. If being fast is important we have Julia as a competitor. If having a better designed language with a reasonably complete ecosystem and sometimes being slower is OK we have python. Like pretty much every other domain area, there just isn't a competitive niche in data science for a lisp.

Also, R is already pretty functional and Lisp-like, sure it doesn't have prefix syntax, but it does have first class functions. Using various types of map (lapply, apply &c) is practically mandatory after a certain point.

I love the Wizard Book too, but this is embarrassing.

Re:A Pamphlet against R: Computational Intelligence in Guile... by discardable_dan on Monday July 30, 2018 @04:50AM (#17643034)
My main beef with R is that this is valid code:

    > f <- function (n) {
    +     f <- 1
    +     if (n == 0) return(f) else n * f(n-1)}
    > f(5)
    [1] 120
The language has some warts, that's for sure.
Re:A Pamphlet against R: Computational Intelligence in Guile... by Tarq0n on Monday July 30, 2018 @09:14AM (#17644167)
Functions having their own environment is actually pretty useful once you get your head around them.
Re:A Pamphlet against R: Computational Intelligence in Guile... by hatmatrix on Monday July 30, 2018 @05:29AM (#17643177)
Isn't that just lisp-2-like behavior where functions and data maintain separate identities?
Re:A Pamphlet against R: Computational Intelligence in Guile... by kgwgk on Monday July 30, 2018 @06:41AM (#17643467)
No, if you set f <- 42 between the moment where you define f as a function and the moment where you call it then it doesn't work anymore:

  > f(5)
  Error in f(5) : could not find function "f"
Re:A Pamphlet against R: Computational Intelligence in Guile... by chairmanwow on Monday July 30, 2018 @03:46AM (#17642748)
Thanks for saving me a click.
Re:A Pamphlet against R: Computational Intelligence in Guile... by naiveai on Monday July 30, 2018 @11:26AM (#17645066)
First class functions does not a functional language make.