Programming and HowTos
-
Some More To Talk About Flask
A few days ago I published a harsh critique of the Flask's team practices with regards to releases, versioning and especially about their weak backwards compatibility track record. This generated a bit of a stir and lots of people, including members of the Flask core development itself, have voiced their opinions.
I'm going to start by admitting that even though I have received some support, there has been a lot of push back as well. I really have no problem with this, as I don't hide from criticism. In this follow up article I'm going to talk about the good and the bad takes that resulted from my blog post, but I especia
-
JavaScript Is Enabled by Default in Web Browsers
Building in layers of technology (HTML, CSS, JS — in that order) is how the web is designed to work. It breeds resiliency.
-
About all those -k.html backlinks to your website
Since the end of last year, most of my backlinks have originated from websites without any relevant connection to my content. However, they’re suspiciously similar, identified by the suffix of the referring URL being -k.html. Another distinct feature of the backlinks is that they’re only targeting (as in hotlinking) images.
-
Appending to an std::string character-by-character: how does the capacity grow?
Empirically, we can measure the allocation. Starting with an empty string, we may add one character at a time. I find that GCC 12 uses capacities of size 15 × 2 k for every increasing integers k, so that the string capacities are 15, 30, 60, 120, 240, 480, 960, 1920, etc. Under macOS (LLVM 15), I get that clang doubles the capacity and add one, except for the initial doubling, so you get capacities of 22, 47, 95, 191, 383, 767, etc. So the string capacity grows by successively doubling in all cases.
-
Unpacking some Rust ergonomics: getting a single Result from an iterator of them
Rust has a lot of nice things that make life easy. One of the least discussed ones is also one of my favorites. It's a little nugget in the standard library that makes handling possible failures a lot easier. And it's not even baked in—it just falls out from the type system.
-
Internet network sessions can be remarkably durable
These days, we do NAT for our internal networks on our perimeter firewall instead of the firewalls for these internal networks. One of the advantages of doing your NAT on your perimeter firewall is that the external NAT IP ranges you use can be on a completely different subnet than your internal firewalls, which is quite handy if you want to do things like round robin NAT but are running out of IP address space on the subnet with your firewalls. With OpenBSD PF based firewalls, you can normally switch your NAT IPs without breaking existing connections (provided that you have state entries, which is the normal behavior for good reasons). However, if you do this live switch, the old state table entries for the old NAT IPs will stick around for as long as the underlying connections or sessions last, which makes reusing those old NAT IPs a little bit exciting. Probably you want to wait until the sessions and thus the state table entries go away on their own.
-
LMDE Faye (6) vs Debian (11/12) network installers regarding LVM flexibility
Looks like it's hard to associate LVM group with physical volumes created by Gparted when running LMDE 6 installation vs GUI provided by classical Debian Network installer.
-
Friendly Neighbor: A network service for Linux wake-on-demand, written in Zig
The last post shared a technique for making a Linux machine automatically sleep and then wake up on demand. At the time, I felt I'd found something useful for my own purposes, but wasn't sure if it would arouse any interest beyond my own. After I posted it to Hacker News, the post ended up garnering attention and discussion, seeming to show that this is a common problem looking for a simple solution.
Reading through those discussions, there were a few common themes in feedback: [...]