←back to thread

151 points todsacerdoti | 6 comments | | HN request time: 0.624s | source | bottom
Show context
ngriffiths ◴[] No.42193839[source]
Makes me curious what state R was at the time, or whatever else could've been useful for deep learning, and the benefits of a new language vs adapting something that exists. Seems like it was a big investment
replies(2): >>42193979 #>>42194909 #
1. _Wintermute ◴[] No.42194909[source]
In my opinion R should thought of as an unbeatable graphical calculator, but an awful programming language.
replies(4): >>42197177 #>>42198754 #>>42205140 #>>42228955 #
2. williamcotton ◴[] No.42197177[source]
The tinyverse collection of packages makes things a lot more sane, IMO:

  penguins <- read_csv("penguins.csv") |>
    na.omit() |>
    select(species, island, bill_length_mm, body_mass_g) |>
    group_by(species, island) |>
    summarize(
      mean_bill_length = mean(bill_length_mm),
      mean_mass = mean(body_mass_g),
      n = n()
    ) |>
    arrange(species, desc(mean_bill_length))
  
  penguins |>
    ggplot(aes(x = species, y = mean_bill_length, fill = island)) +
    geom_col(position = "dodge") +
    labs(
      title = "Mean Bill Length by Species and Island",
      y = "Mean Bill Length (mm)"
    ) +
    theme_minimal()
replies(1): >>42202384 #
3. currymj ◴[] No.42198754[source]
i would compare base R to basically a shell. meant to be used interactively. okay for small scripts. you can write big programs but it will get weird.
4. _Wintermute ◴[] No.42202384[source]
True, but trying to wrap any of that into a function rather than simple scripts makes you delve into the ever-deprecated API for non-standard evaluation.
5. perrygeo ◴[] No.42205140[source]
That's how I view it. I still use R for plotting and quick stats analyses but it is painful to do any real work.

I recommend the article "Evaluating the Design of the R Language" [1] - it reads like a horror story. The memory usage and performance is abysmal, the OO features are a mess, and the semantics are very weird ("best effort semantics" is about as predictable as it sounds!). The lexical scoping is based on Scheme but has so many weird edge cases. It's a dumpster fire of a language, but it somehow works for its intended purpose.

[1] http://janvitek.org/pubs/ecoop12.pdf

6. wdkrnls ◴[] No.42228955[source]
You must hate lisp/scheme then too, which has similar semantics as R. In that case books such as SICP would be lost on you.