news
Programming Leftovers
-
Orson R L Peters ☛ A Better UTF-8 Automaton
Any edge not shown goes to an error state. If you can start in ACC, follow the edges for each byte in your input and end up back in ACC, your string is valid UTF-8.
Some C code implementing the above DFA is as follows. It highlights some of the neat features that our new automaton supports, namely quick branchless transitions as a shift-DFA, trivial parallel evaluation, and instant error recovery.
-
Modernes C++ GmbH ☛ Most Valuable std::variant (Part 1)
Most std::variant tutorials introduce it as a way to store wildly different types in a single variable – the canonical example being a JSON-like value type that can hold a number, a bool, a string, or a null.
-
Perl / Raku
-
Arne Sommer ☛ Fractional Reconstruction with Raku
This would normally require keeping track of the denomiators manually, but Raku's Numeric type Num keeps track of that for us automatically.
-
-
Python
-
R / R-Script
-
R Works ☛ October 2026 Top 40 New CRAN Packages – R Works
Four hundred fifteen new ppackages were submitted to CRAN in October. Here are my Top 40 picks in seventeen categories: Agriculture, Control Charts, Decision Theory, Ecology, Epidemiology, Finance, Genomics, Machine Learning, Mathematics, Medical Statistics, Probability, Public Health, Statistics, Time Series, Utilities, and Visualization. The CRAN Top 40 is an attempt to sort through the massive amount of new packages submitted to CRAN every month and find forty, interesting packages that demonstrate the broad use of the R language, and appeal to a wide audience of potential users. If you take the time to scan through the post, I hope you will find something interesting and maybe even useful.
-
Data Science Plus ☛ Coefficient of variation in R: when it beats the standard deviation+
The standard deviation tells you how far values spread around their mean, in the units of the data. That is exactly why it cannot compare two variables measured on different scales. The coefficient of variation (CV) fixes this by dividing the standard deviation by the mean:
CV = (standard deviation / mean) x 100
The result is a percentage with no units, so a CV of 15% means the same thing for millimetres, kilograms or dollars. In this tutorial we compute the CV in base R, use it on the built-in iris dataset, and look at the three cases where it misleads.
-
-
Java/Golang
-
Anton Zhiyanov ☛ Go proposal tracker
I built a Go proposal tracker. It shows proposals already implemented in the upcoming Go version, as well as accepted and "likely accept" proposals. Each proposal includes some metadata and a short summary (2-3 paragraphs). There's also an RSS feed and a weekly digest.
-