Looking forward to 2023

(Note: This draft was being written when that Monday Night Football incident happened, so it was shelved for a bit.)

As this is my last day of holiday break, I thought I’d reflect a bit on what makes me the most excited for the coming year. Obviously, none of us know what the future holds, but these are some of my hopes for 2023:

Social stuff

It looks like Twitter might survive after all, but the fragmentation and millions of people going to the Fediverse intrigues me. I am very curious to see where the Fediverse goes now that it has so much more interest. I am hoping to see people like journalists and meteorologists start using it in earnest, which were some of my favourite follows on Twitter. It would be great to see the platform grow to new interests, since the majority of people there lean towards being in tech.

While their privacy policies and business practices still disturb me, this year will likely be the year I rekindle my Facebook account. There are still family members and friends of mine that use it, and some pretty nifty retrocomputing groups are on it as well. If you can’t beat ‘em, join ‘em, I guess. Any content that I post on Facebook would be mirrored to better platforms, so it wouldn’t be anything special for those of you who want to continue to stay away. I just don’t want to miss out on those connections that I could have just because of my aversion to late-stage advertisement capitalism.

Apple ecosystem

My iPad Pro is going to be seeing more usage this year as Stage Manager is finally available, bringing multiple app/window support. This is something that I’ve personally felt has kept the iPad from living up to its full potential, and something I remember seeing being done in the jailbreak scene for years, so I’m quite happy to see Apple finally putting it in official system software.

While I know rumours abound and there is no reason to think it would be released this year, I’m eternally looking forward to a wearable – like, say, an Apple Watch – that can also function as a glucometer. As someone with type 1 diabetes, it’d be a real boon to be able to have enough a rough estimate of what my blood glucose level is without having to wear a separate sensor.

It would be very cool, though unlikely, to see a MacBook Pro with a Dynamic Island like the iPhone 14 Pro.

Retrocomputing

I’ve received a lot of goodies, hardware and software, over autumn and winter. I can’t wait to put them to good use in the Retro Lab. I’m hoping to write a number of new articles in my Retro Lab series.

There are a number of software development projects I’d like to tinker with in the retrocomputng circle. I’m keeping details vague for now, as I don’t want to make any promises, but my focus as always will be on making classic Macs and Windows NT useful in the modern era.

Linux and libre software

I’ve been following the SPDX project’s continual drive to make automated tooling around discovering and managing licenses of software packages. It would be very cool to integrate some of these tools into package managers like APK.

The Qt project is still not in my good graces after their decision to make LTS releases commercial-only. This only became stronger when it was announced qmlsc, the QML compiler that would make QML apps into high-performant, non-interpreted C++ apps, is also only available for commercial customers of Qt. Maybe the KDE team will support a libre Qt 6 LTS branch in the same way they support 5.15?

Speaking of LTS branches of things with major versions of 6, the Linux kernel 2023 LTS edition should be pretty exciting. Linux 6.1 and 6.2 bring a lot more support of AArch64 boards, including the Apple M1 and Qualcomm 8cx Gen 3. When the Linux 6 LTS drops, it will be very exciting to dual-boot mainline Linux on my MacBook Pro M1.

I am personally hoping to have some time to devote to “traditionally opposite” endian projects. Specifically, I want to see if I can bootstrap an aarch64_be environment on my Pine A64, and similarly bootstrap a ppc64el environment. There are probably going to be a lot of false assumptions in code regarding aarch64_be.

Adélie continues to improve regularly, and hopefully this will finally be the year of the release of Adélie Linux 1.0. Yes, I am taking on a somewhat more active role again, and no, I do not want to comment 😉

Lastly, it will be exciting to see where the GCC Rust front end goes. Hopefully this will lead to significant improvements in Rust’s bootstrap story, which will help make it more useful and approachable by people who cannot use, or do not want to trust, the Mozilla-provided binaries.

Personal

I want to take photography seriously again. Photography can tell a story, document history, and transport others to a new perspective. I really enjoy taking these kinds of photos and hope to have some great snapshots to share throughout the year.

In addition to the retrocomputing projects, there are a few others non-retro-related software development and library improvement projects that I hope to spend some time on this year. Some of them are Wayland on Power, Zig on big-endian Power, and adding better compression support to APK Tools.

In conclusion

That is an overview of what I hope to devote my time to in 2023. What do you think? Are there cool developments that I should be looking at that I missed? Are you excited about some of these too? Feel free to discuss in the comments!

Compiling XIBs with CMake without Xcode

I’ve been enjoying using the JetBrains IDE CLion to do some refactoring and improvements to the Auctions code base. However, when I tried to build the Mac app bundle with it, the app failed to launch:

2022-07-30 19:54:15.117 Auctions[80371:16543044] Unable to load nib file: Auctions, exiting

The XIB files were definitely part of the CMake project. I later learned that CMake does not automatically add XIB compilation targets to a project. It relies on the Xcode generator to do that.

I found a long-archived documentation page from CMake on the Kitware GitLab that described a method to build NIB files from XIBs, and have modified it to make it simpler for Auctions.

You can see the change in the commit diff, but I’ll include the snippet here for posterity.

First, you define an array with the XIB file names with no suffix. For instance, I’ve done set(COCOA_UI_XIBS AXAccountsWindow AXSignInWindow Auctions) for the three XIB files presently in the codebase.

Then we have the loop to build them:

find_program(IBTOOL ibtool REQUIRED)
foreach(XIBFILE ${COCOA_UI_XIBS})
add_custom_command(TARGET Auctions POST_BUILD
COMMAND ${IBTOOL} --compile ${CMAKE_CURRENT_BINARY_DIR}/Auctions.app/Contents/Resources/${XIBFILE}.nib ${CMAKE_CURRENT_SOURCE_DIR}/${XIBFILE}.xib
COMMENT "Compiling NIB file ${XIBFILE}.nib")
endforeach()

Now it starts correctly and works properly when built from within CLion. This was surprisingly difficult to debug and fix, so I hope this post can help others avoid the hours of dead ends that I endured.

Until next time, Happy Hacking!

Daily-driving a Mac, one year later

It has been about a year since I published Really leaving the Linux desktop behind. This marks the first year I’ve used Mac OS as my primary computing environment since 2014. Now, I want to summarise my thoughts and feelings on using the Apple ecosystem as my primary platform – good and bad.

The Amazing

Universal Clipboard

Universal Clipboard has dramatically simplified my blog workflow. Typically, all of my articles are drafted and composed on my iPad Pro, as WordPress offers a great native app. This allows me to avoid using a browser. As I write this article, I am copying the links out of Safari on my Mac. They immediately show up in the pasteboard of the iPad.

KDE Connect does offer a Clipboard plugin, but it only supports plain text at this time. Apple’s implementation allows you to copy rich text, photos, files, and more.

Something else I would really like to note is that these features will work on High Sierra and later. It is transparent to the user no matter what version of the OS they are running. This somewhat alleviates the issue of newer OS versions having newer device requirements.

Safari Tab Groups

Safari 15 introduced the concept of Tab Groups, which is something I have been missing a lot since Firefox killed off extensions and replaced them with a severely limited alternative. Tab Groups simply allow you to categorise groups of tabs into cohesive sets. You can almost consider it a “focus window” where a logical set of tabs live.

The best part is that Safari’s Tab Groups sync between iCloud devices, which means I can use, add to, and manipulate tab groups on my tablet and phone as well. The replacement extension I used for Firefox had most of the features I enjoyed, but it doesn’t sync between devices using Firefox Sync, which meant I could really only browse the Web in this powerful way on my main desktop (then, my Talos II).

Having tab groups that sync between devices has allowed me to bring order to my previously chaotic Web browsing habits, allowing me to focus better and waste less time being distracted.

AirPlay

I love having the ability to AirPlay my screen directly to a TV. As far as I am aware, it is not possible on Linux to share your entire display to a smart TV without complicated command-line invocations that change regularly.

I used this to show my grandmother family photos while she was recovering from a health challenge. We use this monthly for budget planning in our household – just share Excel to the TV and we can see and discuss where the money is going this month.

There is no reason that this couldn’t be implemented on Linux, but off the top of my head I can think of a few challenges: the TV may have a different DPI than the computer screen (which has always been challenging for Linux windowing systems and toolkits), compressing the video using a libre codec while providing good picture quality and low bandwidth usage, and the general sorry state of wireless networking in Linux (which is due to the chipmakers, I know).

Apple Maps

Having a Maps app on my computer that I can use to view place details, satellite imagery, landmark information, and plan routes is a very powerful tool. I use this regularly to find places to shop local, and to plan weekend excursions to parks and attractions.

The closest thing I found on Linux was Marble. While I did enjoy the fact that Marble integrated so well with OSM, the views were always slightly grainy and off. Zoom and pan needed work and I could never understand the code well enough to contribute a fix.

You can still boot Linux on them

The Asahi Linux project has done an amazing job on building a boot loader for the M1 that should allow a whole host of alternative systems working. This includes not just Linux but also the BSDs, and perhaps even illumos when they bring up ARM64 support.

I remember when the M1 came out, everyone thought the firmware would be locked down and prevent non-Mac OS systems from running at all. It turns out that not only did this not happen, but you can actually sign your own kernels and have Trusted Boot using your own compiled Linux. This may end up making the M1 more libre-friendly than x86 systems.

Misc

  • Apps like Things really demonstrate the power of the Mac platform and what is on offer. You could probably make something as nice and integrated as Things on Linux, but for someone as busy as me, it is nice to use what is already there.
  • I feel much more in control of notifications on the Mac platform than I did on Linux with libnotify and Plasma. Notifications can be handled per-app, not just per-notification in the app itself. “Focus modes” (DnD) sync with my other devices like my phone and tablet. I can set repeating schedules (or one-offs) with profiles that allow some apps through but not others.
  • Older devices really are still supported. Even if you can’t boot Big Sur or Monterey on them, which is a big list if you are willing to play with a patching system, most of the niceties I’ve written about work back to High Sierra.

The drawbacks

The only real drawback that I’ve found in this year is that since the Mac isn’t a fully libre open-source system, I can’t fix the few bugs that I’ve run into.

I have not felt “trapped” or “helpless” or at all like I am living in a walled garden. Terminal is still there, unsigned apps can still be run with a simple context-click, and AppleScript (and now Shortcuts) is available to automate workflows.

I still believe that libre software ideals are correct and the goal of having a libre operating environment is a good one. However, I also believe that it was perhaps naive of me to believe that such a thing can truly exist in the way I hoped it could. The people who develop libre operating environments have different priorities.

And when you are spending your days using technology instead of making technology, the libre software ideals genuinely do become more of a theoretical than something in your face. This can be good, or bad, depending on your viewpoint.

At the end of the day, my goal in life is to make a difference, and also have a bit of fun. I want a system that is out of my way and lets me focus on that. For me, in 2022, that system is a Mac.

A final word on cost

Far too many people are priced out of the Apple ecosystem. I understand that part of the high cost of Apple products are to subsidise the R&D of making all these things work so well. However, they also have pretty high profit margins beyond their R&D expenditures.

I wish that Apple would lower their price, even a little, so that this amazing technology that works so well could be in the hands of more people.

Everyone on Earth deserves technology that is easy to use and lets them have a fun, happy life. That was my goal when I started the Adélie Linux project, and I only wish that more open source projects would do the same. Until then, I will continue doing my part to make the world a little bit better from the keyboard of a Mac.

Using MailWrap on macOS Monterey

Apple’s Mail Plug-In system is quite amazing, and has led to some innovative and brave developments as an MUA (Mail User Agent). These brave developments include: wrapping long lines like a decent MUA, quoting messages in replies correctly like a decent MUA, and an option to Wrap Text like a decent MUA.

I actually forgot to install MailWrap on my M1 when I built it up, and haven’t noticed mostly because I haven’t been posting to mailing lists lately. However, I feel deep personal shame for posting on lkml without remembering to install it first. Look at those long lines!

So I set out to install MailWrap. It certainly is a lot more difficult than it used to be.

#1: Allowing the installer to access ~/Library/Mail

The first time I tried to install MailWrap, I received the unhelpful message that access to ~/Library/Mail/Bundles was denied. This is because I had to grant Terminal the Full Disk Access permission.

You can do this in System Preferences under Security & Privacy. You’ll be helpfully reminded that you have to restart Terminal. Hope you don’t have six active SSH connections open, like I did!

#2: Using the correct UUID

Now we need to add the correct UUID to the Info.plist file. Open ~/Library/Mail/Bundles/MailWrap.mailbundle/Contents/Info.plist in your favourite plain-text editor. Scroll to where you’ll find “Supported10.16PluginCompatibilityUUIDs” and then add the following lines under the “</array>” line:

        <key>Supported12.2PluginCompatibilityUUIDs</key>
<array>
<string>6FF8B077-81FA-45A4-BD57-17CDE79F13A5</string>
<string>25288CEF-7D9B-49A8-BE6B-E41DA6277CF3</string>
</array>

Note that this says “12.2”; when 12.3 comes out, we will need to change this again.

#3: Sign and allow the bundle to run

Gatekeeper will try to keep you safe from untrusted code, which is generally a good thing. We can sign our bundle now:

$ cd ~/Library/Mail/Bundles
$ codesign -f -s - MailWrap.mailbundle

And now that it is signed properly, we can tell Gatekeeper to trust the signature:

$ sudo spctl --add --label “MailExtensions” MailWrap.mailbundle
$ sudo spctl --enable --label “MailExtensions”

Troubleshooting

Incompatible Plug-ins Disabled.  Mail has disabled the following plug-ins: MailWrap.mailbundle Contact the makers of these plug-ins for versions that are compatible with Mail 15.0.
Incompatible Plug-ins Disabled

If you receive this Incompatible Plug-ins Disabled message, then something has gone wrong with your UUIDs. You’ll need to try again and make sure that you’ve pasted those lines in the correct spot.

“MailWrap.mailbundle” is damaged and can’t be opened.  You should move it to the Bin.  Mail created this file on an unknown date.
“MailWrap.mailbundle” is damaged and can’t be opened.

I received this message when I edited the Info.plist file after running codesign. It means the CodeSignature doesn’t match the contents. You need to re-run the codesign command every time you change any file in the bundle to keep the signature updated.

“Mail” needs to be updated.  This app will not work with future versions of macOS and needs to be updated to improve compatibility.  Contact the developer for more information.
“Mail” needs to be updated.

This message is because MailWrap uses Python 2.7. Hopefully I will have some time to update it to Python 3 before the eventual removal of Python 2.7 from macOS. I’ve had success doing this before, so hopefully it goes well.

In conclusion

Now my emails are nice and wrapped and I’m not breaking a bunch of email clients in faraway lands. And all was quiet in the world. (Except not: the kernel is still broken, and Ukraine is still being invaded.)

I hope this post was useful to you. Happy hacking!