Recently I came across this 10 year old post by Robert Atkins: Objective C is like Jimi Hendrix . It is about reconciling admiration for Objective-C by the "old-timers" with the newcomers' somewhat less enthusiastic response. His very cogent insight was that Objective-C, like Jimi Hendrix, introduced new concepts that were somewhat revolutionary (""mind blowing") at the time, but are now taken for…
Every once in a while, you get an insight that hits you like a truck. Or maybe a ton of bricks. Or a truck carrying a ton of bricks. Developing Objective-S has delivered a bunch of these, but one of the biggest was that our General Purpose Programming Languages are nothing of the sort. They are Domain Specific Languages for the domain of algorithms. See also: ALGOL. To move forward, programming…
One of the primary things that people don't understand about Objective-C is that it is a solution of the two language problem , or more precisely a generalisation of the two language problem to the scripted component pattern. The scripted component pattern itself is a (common) solution to the problem, first identified in the 70s that programming-in-the-large is not the same as…
The recent introduction of reasonably-priced ARM64 VPS instances by Hetzner was accompanied by a big smile and sigh of relief on my part, as I had previously made the decision to prioritize ARM with Objective-S, for example the native-compiler is currently ARM64-only, but the simple and low-cost VPS providers like Digital Ocean were sticking to x86 exclusively. Although it is possible to operate…
The other day I was fighting once again with Apple Music. Not the service, the app. What I wanted to do was simple: I have some practice recordings for my choir and voice lessons that I want on my iPhone and Apple Watch. How hard could it be? Apple: hold my beer. These are sent via WhatsApp so the audio recordings are mp4 files, which for some bizarre reason won't open in Music and instead open in…
If I've been a bit quiet recently it's not due to lack of progress, but rather the very opposite: so much progress in Objective-S land hat my head is spinning and I am having a hard time both processing it all and seeing where it goes. But sometimes you need to pause, reflect, and show your work, in whatever intermediate state it currently is. So without further ado, here is the distributed…
Wow, what a mouthful! Although this architecture has featured in a number of my other writings, I haven't really described it in detail by itself. Which is a shame, because I think it works really well and is quite simple, a case of Sophisticated Simplicity . Why a reference architecture? The motivation for creating and now presenting this reference architecture is that the way we build connected…
My previous post titled Glue: the Dark Matter of Software may have given the impression that I see glue code as exclusively a problem. And I have to admit that my follow-up (and reaction to Github's copilot) called Don't Generate Glue...Exterminate may not have done much to dissuade anyone of that impression, but I just couldn't resist the Dalek reference. However, I think it is important to…
About two months ago, I showed a trivial tasks backend for a hypothetical ToDoMVC app. At the time, I noted that the performance was pretty insane for something written in a (slow) scripting language: 7K requests per second when fetching a single task. That was using an encoder method (that writes key/value pairs to the JSON encoder) written in Objective-S, and I wondered how much faster it would…
The other week, I stumbled on the post Inserting One Billion Rows in SQLite Under A Minute , which was a funny coincidence, as I was just in the process of giving my own SQLite/Objective-S adapter a bit of tune-up. (The post's title later had "Towards" prepended, because the author wasn't close to hitting that goal). This SQLite adapater was a spin-off of my earlier article series on optimizing…
Today I saw the news of github's release of the "AI Autopilot". As far as I can tell, it's an impressive piece of engineering that shouldn't exist. I mean, "Paste Code from Stack Overflow as a Service" was supposed to be a joke, not a product spec. As of this writing, the first example given on the product page is some code to call a REST service that does sentiment analysis, which the AI…
Finally took the plunge to start generating ARM64 assembly. As expected, the actual coding was much easier than overcoming the barrier to just start doing it. The following snippet generates a program that prints a message to stdout , so a classic "Hello World": #!env stsh #-gen:msg messageLabel ← 'message'. main ← '_main'. framework:ObjSTNative load arm := MPWARMAssemblyGenerator stream arm…
One of funkier aspects of Swift syntax is the if let statement. As far as I can tell, it exists pretty much exclusively to check that an optional variable actually does contain a value and if it does, work with a no-longer-optional version of that variable. Swift packages this functionality in a combination if statement and let declaration: if let value = value { print("value is \(value)") } This…
Browsing the WWDC '21 session videos, I came across the session on Asynchronous Sequences . The preview image showcased some code for asynchronously fetching and massaging current earthquake data from the U.S. Geological Survey: @main struct QuakesTool { static func main() async throws { let endpointURL = URL(string: "https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_month.csv")! for…
"Software seems 'large' and 'complicated' for what it does". I keep coming back to this quote by Alan Kay. The same feeling has been nagging me pretty me much ever since I started writing software. On the one hand, there is the magic, almost literally: we write some text (spells) and the machine does things in the real world. On the other hand, it seems just way too much work to make the machine…
A couple of weeks ago, I showed a little http backend . Well, tiny is probably a more apt description, and also aptly describes its functionality, which is almost non-existent. All it does is define a simplistic Task class, create an array with two sample instances and then serves that array of tasks over http. And it serves the -description of those tasks rather than anything usefuk like a JSON…
My previous example raised a question : why no return statements? I am assuming this was about this part of the example: -description { "Task: {this:title} done: {this:done}". } The answer is that I would like to do without return statements if and as much as I can. We will see how much that is. In general, I am in favor of expression-orientation in programming languages. A simple example is…
Recently there was a question as to what one should use to create a backend for an iOS/macOS app these days. I couldn't resist mentioning Objective-S, and just to check for myself whether that's feasible, I quickly jotted down the following tiny backend that returns a hardcoded list of tasks via HTTP: #!env stsh framework:ObjectiveHTTPD load. class Task { var <bool> done. var title. -description {…
The last few weeks, I spent a little time getting Objective-S working well on the Raspberry Pi, specifically my Pi400. It's a really wonderful little machine, and the form factor and price remind me very much of the early personal computers. What's missing, IMHO, is an experience akin to the early BASICs. And I really mean "akin", not a nostalgia project, but recovering a real quality that has…
The M1 Macs are out now, and not only does Apple claim they're absolutely smokin', early benchmarks seem to confirm those claims. I don't find this surprising, Apple has been highly focused on performance ever since Tiger, and as far as I can tell hasn't let up since. One maybe somewhat surprising aspect of the M1s is the limitation to "only" 16 Gigabytes of memory. As someone who bought a 16 Kilo…
Just recently came across Ralf Jung's 2018 post titled Pointers are Complicated . The central thesis is that the model that most C (and assembly language) programmers have that a pointer is just an integer that happens to be a machine address is wrong, in fact the author flat out states: "Pointers are definitely not integers." That's a strong statement. I like strong statements, because they make…
When looking at the MPWPlistStreaming protocol that I've been using for my JSON parsing series, one thing that was probably noticeable is that it isn't particularly JSON-focused. In fact, it wasn't even initially designed for parsing, but for generating. So could we use this for other de-serialization tasks? Glad you asked! CSV parsing One of the examples in my performance book involves parsing…
I was really surprised to learn that Swift recently adopted Smalltalk keyword syntax: [Accepted] SE-0279: Multiple Trailing Closures . That is: a keyword terminated by a colon, followed by an argument and without any surrounding braces. The mind boggles. A little. Of course, Swift wouldn't be Swift if this weren't a special case of a special case, specifically the case of multiple trailing…
It should be noted, if it wasn't obvious, that MPWTest is opinionated software , meaning it achieves some of its smoothness by gleefully embracing constraints that some might view as potentially crippling limitations. Maybe the biggest of these constraints, mentioned in the previous post, is that MPWTest only tests frameworks. This means that the following workflow is not supported out of the box:…
By popular demand, a quick rundown of MPWTest (“ The Simplest Testing Framework That Could Possibly Work ”), my own personal unit testing framework, and how it makes TDD fast, fun, and frictionless. I created MPWTest because once I had been bitten by the TDD bug, I definitely did not want to write software without TDD ever again, if I could help it. This was long before XCTest, and even its…