Programming Leftovers
-
Re: Conformance Should Mean Something - fputc, and Freestanding
It is a mess. The code from the blog post works on most systems, but most systems these days use 8-bit characters; the article is about systems where a character is defined as 16-bits (allowed by the C Standard) and where an integer is also 16-bits (again, allowed by the C Standard and is the minimum size an integer can be per the C specification). It's rare to have non-8-bit characters on desktop computers these days (or even tablet and smart phones) but it seems it's not quite that rare in the embedded space, where you have DSPs that have weird architectures and a charater is most likely the same size as an integer. And that's where the trouble starts.
The main issue is with fputc(). The C Standard states: [...]
-
CMake vs. Make: What’s the Difference?
Creating software isn’t only about writing code; you need to build all the source code to get a usable software artifact. This build process can be done manually, but it can become difficult as you start working on larger projects. This is where tools like CMake and Make can help you automate the process. Both of these tools allow you to go from source code to executables.
In this article, you’ll learn how CMake and Make work and the key differences between them. You’ll then implement CMake and Make to see their differences in action.
-
The Law of Stretched [Cognitive] Systems
One of the things I knew right when I started at my current job is that a lot of my work would be for "nothing." I'm saying this because I work (as Staff SRE) for an observability vendor, and engineers tend to operate under the idea that the work they're doing is going to make someone's life easier, lower barriers of entry, or just make things simpler by making them understandable.
While this is a worthy objective that I think we are helping, I also hold the view that any such improvements would be used to expand the capacities of the system such that its burdens remain roughly the same.
-
Day 14 (Advent of Code 2022)
I like how the day 14 puzzle sounds, because I think it'll give me an opportunity to show off yet another way to have Rust embedded in a web page.
-
How Might Generative AI Change Programming?
From my perspective, the obvious question is: how might ML and GAI change programming? In particular, the rapid advances in GAI have led many to assume that we will gradually do away with programming as a human activity. Although it's rarely spelt out explicitly, this implies that a GAI system can take in a human description (or "specification") and produce usable software from it. At a small scale, this is already possible, with the best known example being CoPilot.
-
AI-driven Interfaces
The current generation of LLMs uses natural language as an input/output. This is convenient (and impressive) for human interaction, but what about computer-to-computer communication?
-
Checking for the absence of a string, naive AVX-512 edition
Suppose you would like to check that a string is not present in a large document. In C, you might do the following using the standard function strstr: [...]
-
GPT: High-tech parlor trick or the first real AI for everyday use?
Not so fast! My own experiments with the underlying technology suggest we have a ways to go before we get there.
Still, what is different about ChatGPT versus previous AI wunderkinds is that it isn’t just the tech and business media who are paying attention: Regular folks are too.
-
Challenging the status quo at work?
Last week I dove into the topic of psychological safety and how to build a culture where employees feel comfortable enough to speak up with ideas, concerns or even to admit mistakes.
Of the 4 stages of psychological safety, the stage I feel isn’t discussed enough is the challenger safety stage.
Challenger safety is about feeling comfortable challenging the status quo or ideas.
Indulge me for a minute! Think about the last time you challenged someone at work. I mean truly looked someone dead in the eye and maybe said something along the lines of, “I don’t agree with your approach.”
How did that make you feel?
Did you get that sinking feeling in your stomach? Did you instantly worry about how this would impact your relationship? Or worse, did you think about how this would impact your growth at the company?
-
Faster hardware is a bad first solution to slow software
Your data pipeline is too slow, or uses too much memory. How should you speed it up?
One obvious solution is purchasing better hardware. With cloud computing, switching to a computer with more cores, or adding more RAM, can be done in minutes or seconds. Given that developer time is expensive, switching to more powerful hardware is often seen as a cheap first solution to slow software.
But there are longer-term costs involved that aren’t immediately visible. If your first solution to any performance problem is spending more money on hardware, you may eventually end up with software that is unnecessarily slow, hard to speed up, and extremely expensive.
-
The GPT-3 Architecture, on a Napkin
There are so many brilliant posts on GPT-3, demonstrating what it can do, pondering its consequences, vizualizing how it works. With all these out there, it still took a crawl through several papers and blogs before I was confident that I had grasped the architecture.
So the goal for this page is humble, but simple: help others build an as detailed as possible understanding of the GPT-3 architecture.
-
How Might Generative AI Change Programming?
The use of AI (Artificial Intelligence) techniques, specifically ML (Machine Learning) and its various sub-fields, is changing many fields and undoubtedly will change more in the coming years. Most of us are at least generally familiar with the idea of using ML to identify patterns in data. More recently Generative AI ("GAI" for the rest of this post), in the form of systems such as ChatGPT and Stable Diffusion, has made itself more widely known. Rather than simply classify new data, GAI can, as the name suggests, generate new outputs that conform to the underlying patterns contained in the model [1]. Existing ML systems, in general, and GAI systems particularly, are almost certainly the harbingers of further advances. This inevitably leads to speculation about "what's next?"
-
Day 17: How to clarify which parts of the documentation change - Raku Advent Calendar
Using Pod::To::HTML2 a new custom FormatCode, D<> (D for deprecation), can be made to help with the Raku Documentation process. The new FormatCode should show a span of documentation that is deprecated in some way. This happens a lot when Rakudo is being upgraded. However, people using older versions of Rakudo need to understand what has changed, as well as what has been added. So it is not a good idea to delete older information, but it is not efficient to re-generate the entire Documentation suite for each new version of Rakudo.
[...]
However, this is about making a bespoke plugin to implement a new Formatting Code. Pod::To::HTML2 interprets specified local sub-directories whose name does not contain the character _ after the first character of the name to contain plugin information.
Pod::To::HTML2 is a sub-class of ProcessedPod, so below I shall mention instances of ProcessedPod, though possibly I should be saying instances of Pod::To::HTML2.