Programming Leftovers
-
Jussi Pakkanen ☛ On the scalability of C++ module implementations or lack thereof
This is a follow up to an earlier blog post called The road to hell is paved with good intentions and C++ modules. As it was a bit on the gloomy side so maybe I should preface this post by reiterating that adding module support to C++ is a huge task. All people who have worked on the specification and implementations in the various toolchains have had to do an incredible amount of unrewarding work. Everything said here (and in the previous post) is not to badmouth their existing work. It is merely to say that where we currently are is not a place we want to stay in, we need to move forward to get a better foundation to base decades of future work on.
-
Python
-
James Bennett ☛ Python packaging: use the “src”
Imagine you write a Python library named, say, foo. And you diligently set up the configuration to package it for distribution (which is not that hard; you can learn the basics of packaging up some Python code in an hour or two, and it’s only when you get into things like bundling compiled extensions in C or other languages that things get annoying). And you also diligently write some tests and periodically run them, and they pass, both on your local machine and in whatever CI you’ve set up.
Except one day someone tells you your package doesn’t actually work. Even though the tests are passing. Huh?
A surprising amount of the time, this can be traced back to a simple decision: to put the directory foo, containing your library’s main importable Python module, at the top level of the repository (so that if you were looking at it you’d see the pyproject.toml and other config files, and the foo/ directory all alongside each other).
The issue with this is that the current directory is, by default, on the Python import path. Which means import foo was always going to work even if your packaging config was broken. That’s why the tests passed: they were still able to successfully import everything they needed. But the packaging wasn’t replicating that structure to someone else’s machine, so they couldn’t use it.
-
James Bennett ☛ Say what you mean in a regex
Suppose you’re writing a blog in Django, and you get to the point where you’re setting up the URLs for the entries. Django has two ways to write URLs, depending on your preferred style: [...]
-
-
R
-
Rlang ☛ Unlocking Efficiency in Computational Biology: How Nextflow Streamlines Workflow Management
Efficiently handling complex workflows is crucial in computational biology, going beyond necessity to become a competitive differentiator. As professionals in this dynamic field, you’re likely familiar with the challenges: integrating diverse data sources, ensuring reproducibility, and scaling operations efficiently.
-
Rlang ☛ Demystifying Odds Ratios in Logistic Regression: Your R Recipe for Loan Defaults
Ever wondered why some individuals default on loans while others don’t? Logistic regression can shed light on this, and calculating odds ratios in R is the secret sauce.
-
Rlang ☛ Empowering R in Paris: Mouna Belaid’s Journey with R-Ladies and the French R Community
The R Consortium recently interviewed Mouna Belaid, a co-organizer of R-Ladies Paris, who provided insights into the growth of the R community in Paris, especially in the French language.
-