General Development Archive

Rust9x update: Rust 1.76.0-beta

20 months since the initial release, Rust9x is back, whether you like it or not! I’ve spent the last couple of days migrating the changes from Rust 1.61-beta to Rust 1.76-beta, and filling some of the holes in API support on the way. ↫ Dennis Duda Yes, this is Rust ported to Windows 9x, and this new releases comes with a lot of the benefits in 1.76, but also adds backtrace support, thread parking support, and initial work on adding 64bit support for 64bit Windows XP and newer.

The world depends on 60-year-old code no one knows anymore

The problem is that very few people are interested in learning COBOL these days. Coding it is cumbersome, it reads like an English lesson (too much typing), the coding format is meticulous and inflexible, and it takes far longer to compile than its competitors. And since nobody’s learning it anymore, programmers who can work with and maintain all that code are a increasingly hard to find. Many of these “COBOL cowboys” are aging out of the workforce, and replacements are in short supply. This puts us in a tricky predicament. We need to maintain and modernize the code that underpins so much of the business and finance worlds, but we don’t have enough skilled workers we need to carry out those updates. This is precisely the kind of problem that IBM thinks it can fix with AI. ↫ JD Sartain for PCMag It seems like learning and getting good at COBOL is a surefire way to ensure job security. I wonder if there’s a way to make modern applications or software in COBOL? I mean, there are COBOL compilers for modern platforms, of course, but are there any bindings (I think that’s the correct term?) for modern GUI toolkits like GTK, Qt, and so on? The headline’s probably a bit hyperbolic, but the core of the issue stands.

Accessibility training will not save you

I cannot pinpoint the source of this misconception, it could have been a vendor, or long-lost blog post, or one of the many webinars I attended in my early days as a program lead. Regardless of the source, I operated under the wild misconception that all I needed to do was train my teams to do accessibility. Developers, QAs, designers, all they needed was training! This model does not work. Especially for an organization with multiple products, multiple platforms, and multiple development teams. Accessibility is so much more complicated than can be summarised in a mere training. It requires experts, capable programmers, users who actually require said accessbility, and so much more. It’s also an ongoing process – it’s not a static “train once, use everywhere” kind of deal.

Swift, meet WinRT

The goal of this post is to share how we, at the Browser Company, have made it possible to use Swift to build a modern Windows application. There is no UI framework for Windows written in Swift, and Windows itself is written in C++ – so that may leave you wondering, “how can I build my app on Windows”?  Modern Windows applications use WinRT, a technology built on top of COM, which can interop really well with Swift, as we presented in our previous post. To be able to build idiomatic UI for Windows in Swift, we have built a language projection tool which creates idiomatic Swift language bindings for WinRT, and today we are open sourcing it at https://github.com/thebrowsercompany/swift-winrt. Swift/Winrt is based on Microsoft’s code generators for C++ (github.com/microsoft/cppwinrt) and C# (github.com/microsoft/cswinrt), and thus is written in C++. Cool stuff.

Thread-per-core

I want to address a controversy that has gripped the Rust community for the past year or so: the choice by the prominent async “runtimes” to default to multi-threaded executors that perform work-stealing to balance work dynamically among their many tasks. Some Rust users are unhappy with this decision, so unhappy that they use language I would characterize as melodramatic. What these people advocate instead is an alternative architecture that they call “thread-per-core.” They promise that this architecture will be simultaneously more performant and easier to implement. In my view, the truth is that it may be one or the other, but not both. A very academic discussion.

PicoCalc: a fully-functional clone of VisiCalc

The full-featured, high-precision spreadsheet application for the Pico-8 that nobody asked for has finally arrived! PicoCalc is a feature-complete clone of the 1979 classic VisiCalc, which introduced the world to an entirely new category of business application. Steve Jobs said of VisiCalc, it’s “what really drove — propelled — the Apple ][. This is a few years old already, but still an amazing piece of work.

The absolute minimum every software developer must know about Unicode in 2023

A lot has changed in 20 years. In 2003, the main question was: what encoding is this? In 2023, it’s no longer a question: with a 98% probability, it’s UTF-8. Finally! We can stick our heads in the sand again! The question now becomes: how do we use UTF-8 correctly? Let’s see! Everything you ever wanted to know about how Unicode works, and what UTF-8 does. Plus some annoying website design tricks, for which In apologise, even if it’s obviously not our site we’re linking to.

Playing with Caml Light on DOS

Caml Light is implemented as a bytecode compiler which made it highly portable. It is possible to create executables using the CAMLC.EXE command, but please be aware that the resulting binaries are not standalone when using the default linking mode, and the runtime system (CAMLRUN.EXE) is required to run them. The latest available release of Caml Light for DOS is version 0.7 released in 1995. Here’s a fun project for the weekend.

Dotfiles matter: please stop dumping files in users’ $HOME directories.

Dotfiles are important. We use them every day for storing configuration for all kinds of applications, knowingly or otherwise. You know the ones, hidden in your $HOME directory, ~/.ssh/ for your ssh keys, or ~/.Xauthority (whatever the heck that does). Something you may not know is these are legacy locations for configuration. Please do not copy their behaviour. Your application’s configuration may be the most important thing on a user’s machine. There are now standardised locations on major platforms for applications to store user-specific configuration. Your application should not be dumping random files into an unconfigurable location in the user’s home directory. This speaks to my soul.

No more stale bots!

On github, there has been an increasing trend of using “Staleness detector bots” that will auto-close issues that have had no activity for X amount of time. In concept, this may sound fine, but the effects this has, and how it poisons the core principles of Open Source, have been damaging and eroding projects for a long time, often unknowingly. I’m not a developer and even I can instantly see such bots would create countless problems. I had no idea such bots were being used.

Web apps are better than no apps

There’s a certain community in tech that’s very vocal about their preference toward native apps. I share that sentiment, yet sometimes people take this idea too religiously. Unfortunately, the actual choice is about having an app or not, and I’d rather take something over nothing. I mean, sure, but that doesn’t negate the fact that web applications – or, more specifically, Electron and Electron-like applications – are just bad. Any time I see an Electron application offered, I instantly know the developers behind the project do not respect me as a user. They choose their own convenience over my experience as a user, and while that’s a perfectly valid choice they can make, it does mean I’m not going to use your service.

Why my favourite API is a zipfile on the European Central Bank’s website

A lot is possible with a zipfile of data and just the programs that are either already installed or a quick brew install/apt install away. I remember how impressed I was when I was first shown this eurofxref-hist.zip by an old hand from foreign exchange when I worked in a bank. It was so simple: the simplest cross-organisation data interchange protocol I had then seen (and probably since). A mere zipfile with a csv in it seems so diminutive, but in fact an enormous mass of financial applications use this particular zipfile every day. I’m pretty sure that’s why they’ve left those commas in – if they removed them now they’d break a lot of code. When open data is made really easily available, it also functions double duty as an open API. After all, for the largeish fraction of APIs in which are less about calling remote functions than about exchanging data, what is the functional difference? I wonder how many of these types of simple, but extremely powerful open datasets that are so relatively easy to use exist.

ObjFW 1.0 released

ObjFW is a portable, lightweight framework for the Objective-C language. It enables you to write an application in Objective-C that will run on any platform supported by ObjFW without having to worry about differences between operating systems or various frameworks you would otherwise need if you want to be portable. It supports all modern Objective-C features when using Clang, but is also compatible with GCC ≥ 4.6 to allow maximum portability. ObjFW version 1.0 has just been released, which is, of course, a major milestone for any project. In this case, it also means ObjFW now has a stable API and ABI. ObjFW is available on a variety of platforms, from macOS and Windows to more exotic ones like the Amiga and Nintendo (3)DS.

How to create a Qt 5 ARM/Intel universal binary for Mac

I recently released a big update for my Mac ROM SIMM Programmer software which is written using Qt for cross-platform compatibility. As part of the update I wanted to release the Mac build as a universal x86_64/arm64 binary so that M1/M2 Mac users would be able to run it natively. It doesn’t currently compile for Qt 6, although I think I can fix that in the future without too much effort. However, Qt 5.15.9 and later do support creating universal binaries out of the box, so I decided to figure out how to set it all up. Even though I think I have pretty decent Google-fu, it was difficult to piece everything together to accomplish this goal. I’m hoping this post can serve as a reference for people in the future. These instructions are based on Qt 5.15.10 because that is the latest version that is currently open source. I did this on an M2 Mac Mini running macOS 13.5.1 Ventura. Useful information for those that need it. I’m not one of those, but I’m sure some of you are.

Backward compatibility, Go 1.21, and Go 2

That raises an obvious question: when should we expect the Go 2 specification that breaks old Go 1 programs? The answer is never. Go 2, in the sense of breaking with the past and no longer compiling old programs, is never going to happen. Go 2 in the sense of being the major revision of Go 1 we started toward in 2017 has already happened. There will not be a Go 2 that breaks Go 1 programs. Instead, we are going to double down on compatibility, which is far more valuable than any possible break with the past. In fact, we believe that prioritizing compatibility was the most important design decision we made for Go 1. I’m not well-versed enough in either programming or the Go programming language, but this seems like good news for Go programmers.

I have written a JVM in Rust

Lately I’ve been spending quite a bit of time learning Rust, and as any sane person would do, after writing a few 100 lines programs I’ve decided to take on something a little bit more ambitious: I have written a Java Virtual Machine in Rust. With a lot of originality, I have called it rjvm. The code is available on GitHub. I want to stress that this is a toy JVM, built for learning purposes and not a serious implementation. Toy or not, this is ambitious and impressive.

Lotus 1-2-3 and arbitrary terminal sizes

Using Lotus 1-2-3 in today’s world is a bit of a challenge. The truth is I’m cheating, it does work, but it only supports a few standard text mode resolutions. If your terminal is not exactly 80 columns wide, it just makes a big ugly mess on your screen. There’s a workaround, just type stty cols 80, and it will be confined to a portion of your terminal, looking a bit sad. There is no way to display more columns, and maximizing your terminal will do nothing. …or is there? After a lot of research, reverse-engineering, and hard work, Tavis Ormandy managed to get Lotus 1-2-3 to respect any arbitrary terminal size. Bonkers work.