news
Programming Leftovers
-
Anton Zhiyanov ☛ Solod v0.2: Networking, new targets, friendlier interop
Solod (So) is a system-level language with Go syntax, zero runtime, and a familiar standard library. It's designed for two main audiences: [...]
-
Zig ☛ SPIR-V Backend Progress
There’s quite a bit to cover. The SPIR-V backend had bitrotted in a number of places after the recent compiler changes, so I spent the past several weeks dragging it into a better state.
-
Rlang ☛ stick function for the EDA in time series
You have probably seen my post about the STI classification of Hans Levenbach (this one). Well, I’ve decided to implement it, and it has landed in the greybox package for R/Python. What’s greybox? It is a package for statistical modelling focusing on forecasting and time series analysis.
-
R / R-Script
-
Rlang ☛ Data for fitting models versus data for predicting from models
Answering a question that came up from a student recently.
Say you have 20 surveys of reef fish biomass at different locations. Then you also have gridded data with environmental covariates. The gridded data is for all reefs everywhere.
The goal is to predict fish biomass at all reefs everywhere. Here’s an older post that walks through the steps in R with older packages (you will want to update raster to terra, everything else should work).
The statistically correct workflow would look like this: [...]
-
-
Python
-
Jussi Pakkanen ☛ Pystd standard library, similar-ish functionality with a fraction of the compile time
I submitted talk proposals about Pystd, the from-scratch written standard library for C++ (custom design, not a implementation of the ISO specification) to a bunch of conferences. Unfortunately all of them were rejected, so it's blog posting time.
-
-
Java/Golang
-
Blain Smith ☛ Prioritizing Recent Messages with Go Channels
I was writing a controller that watches Kubernetes HPAs and Istio VirtualServices for changes and coordinates between the two. Both watchers feed updates into the same reconciliation loop, and the loop needs to act on whatever the current state is, not replay a backlog of intermediate states it missed while it was busy reconciling. I had the watchers sending over Go channels and the reconciler was falling behind, processing stale HPA specs while a newer one was already queued up behind it.
Go channels block by default, and for most workloads that's the right behavior. But in this kind of system where you care about the latest value more than processing every value in order, blocking becomes a liability.
I ended up reaching for two patterns to fix this: non-blocking sends with select/default, and the drain-before-send pattern on a buffered channel. They solve related but different problems and which one fits depends on the situation.
-