Programming Leftovers
-
Colin King: Integer shift gotcha
-
Protocols, APIs, and conventions
The Fediverse is wired together by protocols like ActivityPub and WebFinger which, as yet, I know very little about. That’s because the Steampipe plugin, which supports the dashboards I’ve been building and describing in this series, doesn’t require me to understand or use those protocols.
It does, however, require me to understand and use the Mastodon API. Mostly I use that API by way of the Go SDK for Mastodon (thanks, mattn!), sometimes I make REST calls directly. Either way, my read-only dashboards use a fairly small subset of the Mastodon API. The full API is quite broad and deep; it enables API clients to read from and write to Mastodon servers in all sorts of ways. Here are the chapters of the Mastodon API book: apps, accounts, admin, instance, search, statuses, timelines, notifications, oembed. These chapters define what’s common to all Mastodon clients, including web apps, phone apps, native OS apps, and Steampipe dashboards.
-
A brief interview with Tcl creator John Ousterhout
Dr. John Ousterhout is a computer science luminary who has made significant contributions to the field of computer science, particularly in the areas of operating systems and file systems. He is the creator of the Tcl scripting language, and has also worked on several major software projects, including the AFS distributed file system and the Sprite operating system. John Ousterhout's creation of Tcl has had a lasting impact on the technology industry, transforming the way developers think about scripting and automation.
-
Google shares drop $100 billion after its new AI chatbot makes a mistake
But the James Webb Telescope didn't discover exoplanets. The European Southern Observatory's very large telescope took the first pictures of those special celestial bodies in 2004, a fact that NASA confirms.
Social media users quickly pointed out that the company could've fact-checked the exoplanet claim by, well, Googling it.
The ad aired just hours before Google's senior executives touted Bard as the future of the company at a launch event in Paris. By Wednesday, Alphabet shares had slid as much as 9% during trading hours, balancing out by the day's close.
-
Are we racing toward AI catastrophe?
Another great part of human nature is that we are often incredibly competitive — and while that competition can lead to great advancements, it can also lead to great destruction. It’s the Cold War that drove the space race, but it was also WWII that drove the creation of the atomic bomb. If winner-takes-all competition is the attitude we bring to one of the most powerful technologies in human history, I don’t think humanity is going to win out.
-
Rails System Tests with Safari
Not gonna bury the lede. Did you know you can write Rails system tests against Safari? I think most of the documentation and old websites that come up on search largely talk about Chrome and Firefox, but Safari is on the table: [...]
-
Can sanitizers find the two bugs I wrote in C++?
A few days ago I published a short post about two bugs I wrote while developing the C++ external scanner for my TLA⁺ tree-sitter grammar. Reactions were mixed! Many people were supportive, but there were of course the usual drive-by claims by developers that the bugs were trivial, they would’ve found & fixed them inside of 20 minutes, and I was laughably incompetent for having written them in the first place. Maybe so! I’m a fan of formal methods primarily so I don’t have to be a genius to write correct code. In that same vein of building tools to save us from ourselves, one user suggested building the tree-sitter grammar with the LLVM address & undefined behavior sanitizers enabled. I’d used valgrind a long time ago but had never played around with sanitizers. I was also doing some closely-associated work to build the grammar for fuzzing with LLVM’s libFuzzer, so it seemed a fun detour to check whether those sanitizers would have saved me days of debugging pain!
-
What's the difference between references and pointers in Rust?
Ultimately, the underlying representation is the same: both hold an address for some memory. The difference between them is ultimately in semantics.
-
Creating an R Project Directory
When working in R I find it best to create a new project when working on something. This keeps all of the data and scripts in one location. This also means that if you are not careful the directory you have your project in can become quite messy. This used to happen to me with regularity, then I got smart and wrote a script that would standardize how projects are built for me.
-
Modernizing C Arrays For Greater Memory Safety
Lately, there has been a push for people to stop using programming languages that don’t promote memory safety. But as we still haven’t seen the death of some languages that were born in the early 1960s, we don’t think there will be much success in replacing the tremendous amount of software that uses said “unsafe” languages.
-
The Mypy Blog: Mypy 1.0 Released
-
Why Python needs to be paused during profiling - but Ruby doesn't always
-
The Rust Programming Language Blog: Announcing Rust 1.67.1
The Rust team has published a new point release of Rust, 1.67.1. Rust is a programming language that is empowering everyone to build reliable and efficient software.