News for hackers. Stuff that matters.

doodledoodahs

Re:Steam Machine on Tuesday June 23, 2026 @07:27AM (#48643355)
Tennis is terrible to watch these days. It was always a bit of a corporate jolly, but the stands are literally half empty for all but the finals of slams. Nobody really cares for the game...
Re:Swiss parliament lifts ban on new nuclear power plants on Thursday June 18, 2026 @04:38PM (#48591209)
What about the waste inherent in decommissioning plants?
Re:John Ternus to become Apple CEO on Tuesday April 21, 2026 @07:44AM (#47847436)
Have you actually looked at apple products and compared them to the competition? The different in quality of finish is really stark in my experience. Some other manufacturers have some products which have some nice features. Whatever you think of the software or ecosystem, almost Apple hardware is just nicely made.
Re:R: Introduction to Data Science on Saturday March 02, 2024 @10:11AM (#39573049)
The consistency of model specification across multiple libraries is really helpful (base lm, lme4, brms etc). Even though the syntax is sometimes extended, it seems consistent enough to mostly be comprehensible/guessable.
Re:R: Introduction to Data Science on Saturday March 02, 2024 @10:08AM (#39573025)
> R will often do something instead of explicitly failing.

I mentioned exception handling above, but this is more specifically the problem.

I think it's a hard problem to solve, because the behaviour of older libraries is so varied.

I have sometimes thought that something like a try catch wrapper which pattern matched or tested the value returned would be useful.

Re:R: Introduction to Data Science on Saturday March 02, 2024 @10:05AM (#39573016)
OK, since you're here!

(this all prefaced with a massive thank you for tidyverse, without which R is very crusty).

I love R for interactive work and quick analyses, but I'm currently trying to integrate various bits of R code into a large document-building pipeline and wishing I could use Python for it:

- Exception handling and error processing seem a pain in R. Maybe I'm doing it wrong, but if feels like a mess and not nearly as ergonomic as python. Trycatch seems to have gotchas related to scope because the error handling is in a function. The distinction between warning, stop etc seems odd. The option to stop on warnings isn't useful because older packages seem to abuse warnings as messages. I have just discovered `safely` which is helpful, but then you have to unwrap lists in pipelines which feels clunky.

- Related, I _really_ wish we could just drop model objects or other tibbles as single objects directly into a tibble cell rather than as list(df). Unpacking lists and checking objects inside them exist is much more of a pain (e.g. can't just do `filter(!is.na(df_col))`)

- I really miss defaultdict from python, and dictionaries generally.

- Passing variable names as strings to dynamically generate things seems clunky compared with python. Again, it may be because I'm doing to wrong but I end up having to wrap things in !!sym the whole time and the nse semantics seem hard to remember (I only use R about 20% of the time). I liked cur_data() for passing a df row to a function but this now seems deprecated.

- String formatting -- fstrings are just great. Glue is OK, but escaping special characters seems more tricksy. Jinjar is OK, not quite jinja.

- purrr is nice, but furrr just isn't a drop-in replacement. Making http requests in parallel seems non-trivial compared to doing it with python. Is there an easy way to do it without creating multiple processes? Why can't I just do something like `. %>% mutate_parallel(response=GET(url), workers=10) %>% ...`?