4 ms·
Statistical Rethinking and Nix
- SkyMarshal 6y agoFYI, this is Part 2 of a series. Author mentions several times you need to read Part 1 to understand his objectives and rationales in Part 2. Having skimmed Part 2 before Part 1, I concur. Part 1: https://rgoswami.me/posts/nix-r-devtools/ https://rgoswami.me/posts/nix-r-devtools/
- random3 6y agoThis looks like a lot of work for something that could probably easily get done with a simple docker container. It's probably a great exercise and example for Nix, but otherwise, looks like a "nix hammer" thing. Statistical Rethinking is a great book though :)
- jkachmar 6y agoI always find this comparison a little... silly? I dunno, there’s probably a better word, but I can’t think of one right now. Nix focuses on reproducible build declarations and development environments, while Docker focuses on self-contained, distributable sandboxes for code execution. You can certainly try to use Docker to manage development environments or reproducibly build software, but that’s a secondary concern of the system. You’re probably right that these sorts of posts tend to have a “Nix hammer in search of a nail” feel, but the inevitable comparison to Docker always feels cheap to me I guess.
- emj 6y agoI think the problem is that it all feels so "one off", so Docker feels like the better option. Taken as a whole I guess all those one-offs in Nix will hopefully lead to something better in the end, there seems to be a lot of work behind the scenes here. For us Docker is how we manage reproducibility, and it's pretty damn fine in so many ways, most certainly a lot better than Nix for the most part.
- HaoZeke 6y agoA lot better than Nix? With all the security vulnerabilities and lack of efficient storage? Though honestly this setup for a one-off system is a bit much. For the most part I use the system level nix-R configuration instead (explained in the previous post).
- xitrium 6y ago> Unfortunately, the rethinking package which is a major component of the book itself depends on the V8 engine for some reason. This is my fault, in a sense. In order to get the new Stan compiler (written in OCaml) distributed via CRAN (which requires everything to be built from source on its antiquated build servers), we decided to use js_of_ocaml to translate the OCaml compiler into javascript. See this thread for more details: https://discourse.mc-stan.org/t/a-javascript-stanc3/11044 https://discourse.mc-stan.org/t/a-javascript-stanc3/11044 When I posted that, I didn't really think we would end up using it.
- HaoZeke 6y agoThanks for this. It's great to get some more perspective on changes ^_^