news
Programming Leftovers
-
University of Toronto ☛ Shooting myself in the foot with Git by accident
This turned out to be my own fault (as suggested by a helpful Fediverse denizen). I have copies of this repository on several hosts, and because I want to read every commit message in it, I try to update all of those repositories at the same time, getting the same new commits in each. This time around I accidentally opened two windows on the same host and didn't notice, so when I ran 'git pull' in each of them at the same time, they stepped on each other somehow.
-
Rlang ☛ Code Hosting Options Beyond GitHub
In this post, we describe one approach which allows rOpenSci members to use alternative platforms while still staying connected to rOpenSci operations on GitHub. This is most applicable to current or future developers of rOpenSci peer-reviewed packages, but we hope also serves as a useful guide for those testing approaches for managing code across multiple platforms more generally.
This approach involves “mirroring” repositories from GitHub to another platform. We’ll start by exploring what this means and will end with some guidance on setting up multiple mirrors and some words of warning.
-
Simon Willison ☛ swift-justhtml
Kyle ran some benchmarks to compare the different implementations: [...]
-
Max Bernstein ☛ How to annotate JITed code for perf/samply | Max Bernstein
Brief one today. I got asked “does YJIT/ZJIT have support for [Linux] perf?”
The answer is yes, and it also works with samply (including on macOS!), because both understand the perf map interface.
This is the entirety of the implementation in ZJIT1: [...]
-
Simon Willison ☛ Your job is to deliver code you have proven to work
In all of the debates about the value of AI-assistance in software development there’s one depressing anecdote that I keep on seeing: the junior engineer, empowered by some class of LLM tool, who deposits giant, untested PRs on their coworkers—or open source maintainers—and expects the “code review” process to handle the rest.
This is rude, a waste of other people’s time, and is honestly a dereliction of duty as a software developer.
Your job is to deliver code you have proven to work.
-
Ben Joffe ☛ The fastest "Is Leap Year" functions
In this article I give an overview and explanation of various functions that people have developed to calculate whether a year is a leap year. This type of calculation is a fundamental date library utility, it is used all over the place: validating and parsing dates, determining the Nth last weekday of a month, handling month overflow/underflow when adjusting the day, etc.
-
Anže Pečar ☛ Advent of Code 2025 🎄
December is the time for Advent of Code, as it has been since 2015, when the first Advent of Code event was published.
This year, Advent of Code only had 12 days instead of the usual 25. To me, this was a relief. I always get competitive and then start waking up at 5 am every day to get more points on the leaderboards. I did the exact same thing this year as well, of course, but at least I only did it for 12 days!
-
R / R-Script
-
Rlang ☛ How to draw the Economist-style graph with ggplot2 in R?
I think everyone agrees on the fact that the Economist magazine produces very-well designed graphics, sometimes the best in the world. The success behind their graph lies on the ability of explaining complex matters in a simpler way by employing traditional data visualization techniques such as line graph or bar plot. They put emphasis on the message they want to convey rather than the aesthetics of the graph itself. They also have a clear hiearchy in their plots and use colors, fonts and lines which represents the brand identity of the magazine.
In this tutorial, we are going to create an Economist-style graph in R by using ggplot2, ggthemes, showtext, ggtextand grid packages. I am going to use a dataset that I have been collecting since 2014 about the poverty line and minimum wage in Turkey, but you can adopt these codes to any dataset you want to visualize.
-
Dirk Eddelbuettel ☛ Dirk Eddelbuettel: dang 0.0.17: New Features, Plus Maintenance
A new release of my mixed collection of things package dang package arrived at CRAN earlier today. The dang package regroups a few functions of mine that had no other home as for example
lsos()from a StackOverflow question from 2009 (!!), the overbought/oversold price band plotter from an older blog post, the market monitor blogged about as well as thecheckCRANStatus()function tweeted about by Tim Taylor. And more so take a look.
-
-
Python
-
Robotic Systems LLC ☛ tview logging - mjbots blog
Wow, the updates to the graphical moteus monitoring application tview just won’t stop! We’ve had a lot of changes recently (python console, fault text decoding, fault monitoring, UUID addressing) and now here is yet another long requested big quality of life improvement – recording data to log files! As of pypi moteus-gui version X, tview now can write log files in either the .jsonl format as a single file or as a set of CSV files. Continue reading for more details!
-
Ned Batchelder ☛ A testing conundrum | Ned Batchelder
In coverage.py, I have a class for computing the fingerprint of a data structure. It’s used to avoid doing duplicate work when re-processing the same data won’t add to the outcome. It’s designed to work for nested data, and to canonicalize things like set ordering. The slightly simplified code looks like this: [...]
-
Ben Hoyt ☛ Don't fear Python subprocess or Go codegen
Jubilant is a Python API that I created for Juju, a deployment and operations tool made by Canonical. While Jubilant itself is very simple, this article describes some design choices that might be interesting to other developers: the use of Python’s subprocess.run, code generation to create Python dataclasses from Go structs, and the use of Make and uv.
-
-
Perl / Raku
-
Rakulang ☛ Day 17 – An issue with evaluation – Raku Advent Calendar
“Ah, yes, CodeUnit, a module that provides a unit for execution of code”, thought Lizzybel, “that cute one that I abstracted from the REPL module I worked on earlier this year. Ah, and there’s Steve‘s issue!”.
Time to look at the code! So why did setting $*ERR to /dev/null not work? Aaah… found it: [...]
-
Rakulang ☛ Day 16 – Melian and the Helpers of Evergreen – Raku Advent Calendar
These elves were familiar with Raku‘s reputation: expressive, concurrent, type-driven, joyful with binary data, and backed by a runtime that had been quietly optimized for real workloads. But this was the first time they’d attempt to pair Raku with a high-throughput caching server.
To their surprise, Raku behaved as if it had been waiting for precisely this job.
-
Rakulang ☛ Day 15 – An expression language for Vixen – Raku Advent Calendar
Let’s fragment the system a little bit by introducing an expression language just for this sort of composition. Our justification is that we aren’t going to actually replace execline; we’re just going to make it easier to write. We’ll scavenge some grammar from a few different flavors of Smalltalk. The idea is that our program above could be represented by something like: [...]
-
Rakulang ☛ Day 14 – Taming Concurrency – Raku Advent Calendar
Data is persisted in a DB. Each table and field lies in the responsibility of one of these components. So naturally, because the responsibility of each data unit is clear the components are nicely separated. But the tools often need to hand work over to some other component. They do so by creating the respective DB entries (either new rows or filling out fields) and then notifying that other component that data is waiting to be processed.
-
Rakulang ☛ Day 13 – Christmas Crunching Part II – Raku Advent Calendar
Rudolph (him again) was pacing up and down, mashing his cheroot. He cast his mind back to the App::Crag calcs he had done last time – sure all the distances, times and speeds had worked out. But something was still missing. Could he be sure that all the prerequisites were finalised, that the crucial flight would be a success again this year?
-
-
Java/Golang
-
Anton Zhiyanov ☛ Detecting goroutine leaks in modern Go
Deadlocks, race conditions, and goroutine leaks are probably the three most common problems in concurrent Go programming. Deadlocks usually cause panics, so they're easier to spot. The race detector can help find data races (although it doesn't catch everything and doesn't help with other types of race conditions). As for goroutine leaks, Go's tooling did not address them for a long time.
-
-
Rust
-
Rust Weekly Updates ☛ This Week In Rust: This Week in Rust 630
Hello and welcome to another issue of This Week in Rust!
-