Programming Leftovers
-
Dirk Eddelbuettel ☛ Dirk Eddelbuettel: nanotime 0.3.11 on CRAN: Polish
Another minor update 0.3.11 for our nanotime
This release covers two corner case. Michael sent in a PR avoiding a
clang
warning on complex types. We fixed an issue that surfaced in a downstream package under sanitizier checks: R extends coverage of NA to types such as integer or character which need special treatment in non-R library code as ‘they do not know’. We flagged (character) formatted values after we had called the corresponding CCTZ function but that leaves potentiall ‘undefined’ values (from R’s NA values forint
, say, cast todouble
) so now we flag them, set a transient safe value for the call and inject the (character) representation"NA"
after the call in those spots. End result is the same, but without a possibly slap on the wrist from sanitizer checks. -
Rlang ☛ Another season, another release. {survivoR} v2.3.5 now on CRAN
Survivor 47 has wrapped up and the data has been add to the package.
-
SICP ☛ In which things are not known | Structure and Interpretation of Computer Programmers
In the last episode—Is software engineering a thing?—I (apparently controversially) suggested that software is the reification of thought, and that software engineering is thus the art of reifying thought, and that thus there can’t be any single one-size-fits-all software engineering approach. Let’s dig in.
One of the big questions in a software project, hence one of the big topics in software engineering, is requirements: who wants the software to do something, do we need to pay attention to them, and what do they want it to do? We’re already well into the realm of individuals and interactions—whether the people building the thing and the people telling them what to build can agree on what one of the two groups thinks they mean—and haven’t got as far as building software yet. There’s plenty of software engineering ink spilled in this domain, but it can be hard to even decide whether to agree at a metaphysical level with some of it.
-
[Repeat] Linuxiac ☛ Git 2.48 Is Out with Faster SHA-1s, Meson Takes the Stage
And now to something quite interesting – for almost two decades, Git’s default building process has centered on GNU Make. However, according to devs, this Makefile has grown considerably in both size and complexity over the years. To tackle this challenge—and keep Git friendly for new contributors—Git 2.48 introduces Meson as an alternative build system.
-
Rlang ☛ Best Git Books
Best Git Books, Git is an essential tool for version control and collaboration in software development.
Whether you’re a beginner or an experienced developer, mastering Git can significantly enhance your workflow and productivity.
There are several excellent books available that can help you understand and utilize Git effectively.
-
Rlang ☛ Working with colours in R
When you create a data visualisation using R (or any other software), a set of default colours is used. These aren’t always the most effective, or aesthetically pleasing, set of colours. That means that, at some point, you’ll likely want to use a different set of colours that you have chosen. This blog post will cover how to define those colours in R, where to find examples of colour palettes, and how to make generate your own. It won’t focus too much on how to use these in plots, in base R or {ggplot2}, but there are plenty of good resources out there on this topic, several of which are listed at the end of the post.
To demonstrate some of the palettes that will be used or created in this blog post, we’ll start by creating a function, plot_palette(), that takes a vector of colours and returns a plot showing them.
-
Shell/Bash/Zsh/Ksh
-
Ruben Schade ☛ Which shell do I use on FreeBSD?
Today, I use two different shells depending on context. I use plain sh(1) for servers and remove machines that I won’t otherwise be regularly interacting with because, again, it’s now the default. Scripts written against this are also easier to be made portable, so I can run them on NetBSD, illumos, or Linux. If I do need to something more complicated, I still have tcsh(1) to fall back on (though I find myself reaching for it less and less now, which is bittersweet).
-
Redowan Delowar ☛ Dynamic shell variables
I came across a weird shell syntax today—dynamic shell variables. It lets you dynamically construct and access variable names in Bash scripts, which I haven’t encountered in any of the mainstream languages I juggle for work.
In an actual programming language, you’d usually use a hashmap to achieve the same effect, but directly templating variable names is a quirky shell feature that sometimes comes in handy.
-