news
Programming Leftovers
-
Hackaday ☛ Fully Characterized Systems
So now, in addition to the engineer’s “have you fully characterized the system?”, I have the hacker’s “can you avoid characterizing parts of the system?” in my mind. And a holey chunk of hose in the trashcan.
-
Daniel Doubrovkine ☛ Ruby Instance Variables Are Not Inherited (and Why That Breaks Your DSL)
The ruby-enum gem is a small library I maintain that adds enum-like behavior to a class via include Ruby::Enum and define :KEY, value. Four pull requests landed against it recently, each fixing a different symptom, and all four turned out to be the same underlying bug: class-level instance variables set in a module’s included hook are not inherited by subclasses the way you might expect. All of these fixes shipped in ruby-enum 1.2.0.
-
Daniel Doubrovkine ☛ Benchmarks Are Free Now
My previous post walked through four bugs in ruby-enum, a gem I maintain, all stemming from the fact that class-level instance variables aren’t inherited by subclasses. The third fix, #59, made keys, key?, value?, key, value, to_h, parse and each walk up superclass and merge in a parent’s enums, so a subclass would see everything its ancestors defined. It was correct, fully tested, and shipped. It also made every one of those methods roughly 5x slower on any subclass.
-
Markus Eliasson ☛ Guilt-Driven Development
Still, the request should not have caused an error to be reported (bot or not). That needs to be adjusted, but it is not urgent. I added some comments to the error and once again shut down my computer to celebrate Midsummer.
This got me thinking: what is the essence of that bad feeling, and what do I do to avoid it?
-
Rlang ☛ Some everyday data tasks: a few hints with R
It is important to know how to reshape a dataframe into a form that might be more suitable for the analyses we intend to perform. For me, it is also important to know how to do this with base R, without using any other packages.
-
Rlang ☛ ‘Zero-Shot Probabilistic Stock Returns Forecasting with Pretrained RVFL Networks’ accepted at COPA 2026 (and to appear in the Proceedings of Machine Learning Research)
-
Python
-
Kushal Das: replyfast 0.4.0 is available
Yesterday I released replyfast version 0.4.0, which is a Python module to receive and send messages on Signal
-
Adam Johnson ☛ Python: use re.prefixmatch() instead of re.match() from Python 3.15
So, there’s a bit of name confusion with match(). In many other regex implementations, like JavaScript, PCRE, and Ruby, the “match” method name means “match this pattern somewhere in the string”. Python has this behaviour as search(), and instead its match() means “match this pattern as a prefix of the string”, which programmers may not even realize until they hit a bug like the above.
-
Brett Cannon ☛ What's missing to have reproducible builds on PyPI
While writing the section of my 2026 Python Packaging Council (PPC) nomination on secure supply chain, I realized that one thing related to having a secure supply chain that we lack is a defined way to perform reproducible builds. The reason I like the idea of making reproducible builds work is that I think it can be done in such a way as to not require any work on the part of the producer of a distribution (which is a technical term for sdists or wheels, i.e., the people who upload stuff to PyPI), and thus make reproducible builds very low-friction for people to opt into supporting.
-
-
Java/Golang
-
Daniel Lemire ☛ Go 1.27 will make some allocations cheaper
Like most programming languages, Go has both stack allocations, whose lifetime is limited to the current function, and dynamic (or heap) allocations.
The name stack comes from the fact that the memory management is somewhat trivial. There is typically one stack per thread (or goroutine in Go). When a function needs memory, it simply appends data to the stack. When the function returns, the memory is dropped from the end of the stack. So the memory last allocated is deallocated first.
-