Programming Leftovers
-
The Register UK ☛ Google throws $1M at Rust Foundation to build C++ bridges
Google on Monday donated $1 million to the Rust Foundation specifically to improve interoperability between the language and C++.
C++, a popular general purpose programming language, has arguably fallen out of fashion due to concerns over safety. Memory safety errors are the source of the majority of vulnerabilities for Google and Microsoft, and this has led to evangelism for memory-safe Rust and a scarlet letter for C/C++.
-
Sean Conner ☛ The difficulties in supporting “write-only memory” in assembly
Now, the next bit requires some explaining. There's another 3-bit value that needs to be configured on the MC6883, but it's not as simple as writing the 3-bit value to a hardware register—each bit requires writing to a different address, and worse—it's a different address if the bit is 0 or 1. So that's six different addresses required. It's not horrible though—the addresses are sequential: [...]
-
Rachel ☛ Stamping production binaries with build info
My system is something that uses a little nuance of C++ that I've mentioned a couple of times already. It's not the cleanest thing and it does involve a bit of groaning, but it works. In case anyone else wants to try it in their projects, here's how I set it up.
First, I have this buildinfo/base.h, and in it, I define a struct called Details, and it has all of the fields I care about - times, hostnames, usernames, commit hashes, that kind of thing.
-
Pete Brown ☛ My expectations are different for indie technology and tools.
And in large part, we have internalized that idea through no fault of our own. After all, a multi-billion/trillion dollar industry had spent the better part of the last three decades trying to convince us that the tech products they sell are groundbreaking, indispensable, and reliable. And a sizeable chunk of that same industry has spend the last twenty(ish) years telling us that there is no real cost to any of it.
So yeah—no big surprise that these expectations are now built into our assessments of the software and systems that we use, but I think they need to change. No one should be expecting tools to be perfect or to do everything they want. Beyond that, though, these expectations need to change if we really are looking for a smaller, more sustainable, more humane internet.
-
Logikal Solutions ☛ C++ – Defaults and Deletes – Pt. 2
Before we go much further with this discussion on Defaults and Deletes, I need you to read the section titled Near Heap in this blog post. It’s a short read with pictures. Then you need to go thank the fools . . . err . . . “learned academics”, cough cough, who re-purposed the word heap to be a binary tree data structure.
To understand why things are the way they are, I need you to understand some things you would have learned had you actually taken an Assembly Language class. I also need you to, at least temporarily, ignore what the . . . “learned academics” used the name heap for. Adding insults to your injuries you will find many on-line experts and official C++ documentation sites using the phrases stack for near heap and heap for far heap.
-
Leon Mika ☛ Goland Debugger Not Working? Try Upgrading All The Things
My previous attempts at fixing this — upgrading Go and Goland — did get it working for a while, but recently it’s been happening to me again. And being at the most recent version of Go and Goland, that avenue was not available to me.
-
Chris Coyier ☛ Thoughts on a Global Design System
Dave and I just had Brad on ShopTalk Show to talk about his idea for a Global Design System. I love Brad’s optimism on all this. From Brad’s perspective, he’s seen, and helped build, the same set of components over and over over (and over) for design systems. On a very professional level! While design systems themselves have been a great success for individual organizations (they prevent repeating effort internally and bring consistency though a shared set of components), there is still a lot of repeat work being done across organizations.
-
Rlang ☛ Getting marine polygon maps in R
There are marine polygon maps available for download, e.g. at Marineregions.org. But if you don’t need the separation into particular seas or oceans or EEZs, you can easily create a global marine polygon from a countries map in R: [...]
-
Devever ☛ The Bootstrapping Exam: Escaping from “Trusting Trust”
The following is an “exam”. To my knowledge, nobody has ever passed it, as it is an extremely difficult challenge. But I am firmly convinced it is possible, and it makes for an interesting discussion.
-
Olimex ☛ Did you ever hear for Mad-Pascal? Now you can program Neo6502 with this 32-bit Turbo-Pascal for Atari XL/XE compiler
I didn’t know until recently that there is version for 6502 named Mad-Pascal. I read about it in Neo6502 discord channel, where Wojciech Bociański (bocianu) posted Mad-Pascal library for Neo6502 [...]
-
Nicholas Tietz-Sokolsky ☛ Too much of a good thing: the trade-off we make with tests
I've worked places where we aspired to (but did not reach) 100% code coverage. We used tools like a code coverage ratchet to ensure that the test coverage always went up and never down. This had a few effects.
One of them was the intended effect: we wrote more tests. Another was unintended: we would sometimes write unrelated tests or hack things to "cheat" the ratchet. For example, if you refactored well-tested code to be smaller, code coverage goes down but the codebase is better, so you have to work around that.
It's well known that targeting 100% code coverage is a bad idea, but the question is why, and where should we draw the line?
There are many reasons why you don't want to hit 100% code coverage in a typical scenario. But one that's particularly interesting to me is the value trade-off you make when you're writing tests.
-
Security Week ☛ Google Open Sources AI-Aided Fuzzing Framework
The tool leverages large language models (LLM) to generate fuzz targets for real-world C and C++ projects and benchmarks them using Google’s OSS-Fuzz service, which has long been the top resource for the automated discovery of vulnerabilities in open source software.
-
Python
-
University of Toronto ☛ I switched to explicit imports of things in our Django application
However, when I moved the application to Python 3 I also switched all of these over to specific imports. This wasn't required by Django (or by Python 3); instead, I did it because it made my editor complain less. Specifically it made Flycheck in GNU Emacs complain less (in my setup). I decided to do this change because I wanted to use Flycheck's list of issues to check for other, more serious issues, and because Flycheck specifically listed all of the missing or unknown imports. Because Flycheck listed them for me, I could readily write down everything it was reporting and see the errors vanish. When I had everything necessary imported, Flycheck was nicely quiet (about that).
-
-
Education
-
Henrique Dias ☛ Surviving FOSDEM '24
This past weekend I went to Brussels for FOSDEM with Sebastiaan, who has already written a bit about it. FOSDEM, if you don’t know, is the largest open source software conference in Europe - or in the world, not sure. This was not my first time attending, but it was positively chaotic as usual.
I’ve been to FOSDEM before, in 2018 and 2019, with some coworkers. However, I would say that at that time it was not as memorable. Perhaps I was just following people around in general, and my English was probably not as good as now, which gives a different sort of flexibility.
-
-
OS/2
-
Arca Noae ☛ Arca Noae Status Update: Wi-Fi Drivers
ArcaOS 5.1 is the first version of OS/2 capable of not only booting on modern UEFI hardware with or without the availability of a Compatibility Support Module (CSM), but also the first to be able to access – and indeed, boot from – GUID Partition Table (GPT) disk layouts. All of this work was prioritized above Wi-Fi driver development, under our guiding philosophy of “if the system can’t boot, not much else matters.”
-
-
Funding
-
Chad Whitacre ☛ Funding the Five Thousand
If there are only a few thousand maintainers, then solving the sustainability crisis should be quite a tractable problem to approach from the bottom up (who are they and what do they need?) rather than the top down (how much do we estimate Open Source is worth?).
In other words, let’s see if we can price to cost instead of to value. In general, that leaves value on the table, but we’re not trying to maximize profit for Open Source as if it were a business. We’re trying to make it sustainable:
"Open Source sustainability is when any smart, motivated person can produce widely adopted Open Source software and get paid fairly without jumping through hoops."
-