Programming and Standards
-
Rlang ☛ Scraping the NYSE Composite Index
For a side project I needed to scrape data for the NYSE Composite Index going back as far as possible.
-
Daniel Stenberg ☛ decomplexifying curl
Two contributing factors that make code hard to read are function length and function complexity. To keep source code easy to read, understand and debug we should strive towards keeping functions short and simple. Nothing ground-breaking in that conclusion.
I know, it sounds really simple and straight forward but in a living project that goes on for decades, code develops, moves and grows over time. What started out small and simple risk gradually turning into something else.
This of course because there are so many more factors involved that need to be given focus as well. Like security, bugfixes, performance, food on the table and getting more people involved.
-
Karl Seguin ☛ TCP Server in Zig - Part 7 - Kqueue
kqueue is a BSD/MacOS alternative over poll. In most ways, kqueue is similar to the Linux-specific epoll, which itself is important, but important, incremental upgrade to poll. Because kqueue has a single function it superficially looks like poll. But, as we'll soon see, that single function can behave in two different ways, making its API and the integration into our code very similar to epoll.
Because kqueue is rather similar to epoll, this part is shorter as it assumes that you're familiar with topics discussed in part 6, such as edge-triggering and @intToPtr.
-
Antonio Martinović ☛ Maximal effort, minimal impact: How I learned what engineering guidelines should be like
The big takeaway here? Less is often more. In my quest to be comprehensive, I had forgotten that people are much more likely to follow a set of adaptable guidelines than an encyclopedia, the rules must be simple and adaptable so that people can actually make decisions in real time regardless of the situation they face. Your mission is to steer not to control.
-
Perl / Raku
-
Arne Sommer ☛ The Largest Zuma with Raku - Arne Sommer
This is my response to The Weekly Challenge #292.
-
-
Python
-
Enrico Zini: Typing decorators for class members with optional arguments
This looks straightforward and is far from it. I expect tool support will improve in the future. Meanwhile, this blog post serves as a step by step explanation for what is going on in code that I'm about to push to my team.
Let's take this relatively straightforward python code. It has a function printing an int, and a decorator that makes it argument optional, taking it from a global default if missing: [...]
-
-
Standards/Consortia
-
Chloé Vulquin ☛ What’s New in POSIX 2024 – XCU
In the early 1980s, Unix had become a univeral operating system, used on virtually every serious machine. Then, AT&T got hit by an antitrust suit again. The exact details matter less, but freed it from the old restriction. System V immediately turned into a product, almost killing it. That very year, the GNU project was created, and the BSD project was started in Berkeley. Having grown accustomed to interoperability (since up until that point, there was only really one serious Unix), several standardization attempts were created. The System V Interface Definition was the AT&T one, Europe created the X/Open consortium of Single UNIX Specification fame, and the IEEE put out POSIX. These latter two would eventually merge and become equivalent, developed by the Austin Group, defining the only interface said to be universally interoperable on the OS level that we have to this day.
As of the previous release of POSIX, the Austin Group gained more control over the specification, having it be more working group oriented, and they got to work making the POSIX specification more modern. POSIX 2024 is the first release that bears the fruits of this labor, and as such, the changes made to it are particularly interesting, as they will define the direction of the specification going forwards. This is what this article is about!
-
Dan Q ☛ Hour of Ambiguity
That helpful dialog that computers used to have had a secondary purpose. Maybe we should bring it back. Not as a popup – heaven knows we’ve got enough of those – but just a subtle subtext at the bottom of the clock screens on our phones. “Daylight savings: clock will change in 30 minutes” or “Daylight savings: clock changed 30 minutes ago”. Such a message could appear for, say, six hours or so before and after our strange biannual ritual, and we might find ourselves more-aware as a result.
-
Computers Are Bad ☛ 2024-10-26 buy payphones and retire
For much of the history of the telephone system, payphones were owned and operated by telephone carrier. As with the broader telephone monopoly, there were technical reasons for this integration. Payphones, more specifically called coin operated telephones, were "dumb" devices that relied on the telephone exchange for control. In the case of a manual exchange, you would pick up a payphone and ask the operator for your party---and they would advise you of the price and tell you to insert coins. The coin acceptor in the payphone used a simple electrical signaling scheme to notify the operator of which and how many coins you had inserted, and it was up to the operator to check that it was correct and connect the call. If coins needed to be returned after the call, the operator would signal the phone to do so.
-
Medium ☛ Every map of China is wrong. And this is intentional…
To answer this question, we have to take a step back and talk about how the earth is mapped. Maps of the world use systems of reference known as geodesic datum, which use various base points around the globe to anchor positional measurements.
GPS uses the World Geodesic Standard 1984 (or WGS-84) as its reference standard. The National Geospatial Intelligence Agency (NGA) in the U.S. maintains WGS-84. This means that de facto, most of the world has subscribed to American mapping conventions.
There are a few countries that have established their own geodesic data, including Russia and China. China’s datum is called GCJ-02, which translates to ‘Topographic map non-linear confidentiality algorithm’ (the name ‘GCJ’ comes from the Chinese ‘guó-cè-jú’).
Here’s where it gets interesting — GCJ-02 is based on WGS-84, but with a deliberate obfuscation algorithm applied to it. The effect of this is that there are random offsets added to both latitude and longitude, ranging from as little as 50m to as much as 500m.
-
Pi My Life Up ☛ Self-Hosting Zigbee2MQTT using Docker
Zigbee2MQTT is a super neat tool that replaces your proprietary Zigbee bridges and leaves you in control of your connected devices. This software works by taking control of a Zigbee coordinator and using that to build a Zigbee
-
Ruben Schade ☛ Michał Sapka’s new home
Prolific writer, emacs aficionado, and friend Michał has consolidated many of his previous disparate thoughts into one site over on CrysSite, with its own RSS feed. This is the more rational thing to do, as opposed to me sharding off something else for no good reason!
I especially like the visual representation of his site structure on the sidebar. It’s clear and easy to follow.
-