Programming Leftovers
-
Medium ☛ These Enhancements Make Flutter Beast At Making Apps For Windows, macOS, and Linux.
You can control the app window size, position, and whether it can be resized.
-
The Register UK ☛ How a good business deal torpedoed BASIC's reputation
It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration.
(To be fair, he also really did not like FORTRAN, PL/I, COBOL or APL, either.) We are pretty sure that his short paper "How do we tell truths that might hurt?" was at least somewhat tongue in cheek. What's often missed, though, is that it was written in 1975, before the era of the microcomputer. The original Dartmouth BASIC was a compiler, and very different from later versions.
-
Max Bernstein ☛ Weak references and garbage collectors
From 2018 to 2021, I worked on a greenfield Python runtime called Skybison. One of its major differences from CPython was that it used a moving garbage collector (GC). This I understood in theory—I knew that it ran when the heap filled up, knew we needed handles to update pointers in the runtime’s code, had read the Moon paper (PDF)—but the other day, I wanted to implement weak references and couldn’t immediately figure it out. Skybison thankfully has a reasonably clear implementation. So now I’m writing this post, mostly for myself, but maybe it will be useful to you as well.
In this post I’ll give a brief overview of a garbage collector, a sample “normal” object, and then show the special handling for weak references. I’ve taken inspiration from the Skybison code, but it’s possible other projects have different approaches.
-
Juha-Matti Santala ☛ Say hello to Garden of Learning
During last month’s Advent of Code, I did an experiment where I wrote notes about my solutions and technical concepts I learned during the month and published them as a digital garden. I’ll share more about that experiment next week in a retrospective post.