Strongly Typed Notifications in Swift

IN SWIFT

While working on rewriting Spotijack in Swift, I started to feel dissatisfied with Foundation’s notification API. It’s a stringly typed API that makes heavy use of Any and as someone who loves their types this makes me sad. To cheer myself up, I set about writing a more strongly typed notification system.

The end result is a small library1TypedNotification—that provides a set of protocols defining a more descriptive type system for notifications. Check out the GitHub project if you’re interested. There’s a Playground in it demoing the protocols. The rest of this blog post will cover them in a bit more detail.

Read More…

Fixing MATLAB on Fedora

IN MATLAB LINUX

The other week I had to set up a new installation of MATLAB r2016a on a (somewhat) fresh Fedora installation. After running the installer, I ran into a bunch of library errors when trying to run external C++ programs1 from MATLAB or when trying to plot something. When running an external C++ program, MATLAB would complain about missing versions of CXXABI and GLIBCXX in libstdc++2. When plotting something, MATLAB would complain about libmwosgserver.so.

Read More…

Integrating Receipts with ledger-mode

IN EMACS LEDGER

I’ve written a couple of functions for Emacs’ ledger-mode that make working with receipts a bit easier. With the cursor on a transaction, calling alex/ledger-attach-receipt will prompt for a file. This function copies the file to a receipts directory, renaming it to its hash and sorting it in subdirectories according to the transaction’s year and month1. Finally, the function adds a comment to the transaction with the hash of the file. The function alex/ledger-open-attached-receipt reads this comment and opens the associated file in Emacs. The receipts folder can be customised through the variable alex/ledger-receipt-folder.

Read More…

Using Ledger With an Encrypted Journal

IN LEDGER

I’m a pretty big fan of Ledger, a command line accounting system based on the double entry bookkeeping system. One of its strengths lies in the fact that the journal file that contains your transactions is a plain text file. This makes it super easy to sync the journal using your favourite file syncing service. Of course, before putting the journal file on a remote server, you’ll probably want to encrypt it. Ledger program doesn’t support encrypted journal files but, using GPG and a shell alias, you can get the vast majority of Ledger’s functionality to work with an encrypted journal.

Read More…

Spotijack 0.6 Released

IN SPOTIJACK PROJECTS

After sitting on the project for a few months, I’ve just released the next version of Spotijack on GitHub, as well as the application’s source code. This is the first public version of Spotijack because I’ve spent a while contemplating whether the project is OK to release.

Spotijack is a utility for the Mac that automates the process of recording music playing in Spotify with Audio Hijack Pro. Whenever the song changes in Spotify, Spotijack tells Audio Hijack Pro to split the recording and update the new recording’s metadata. Obviously the program enables piracy which I do not support, and this is why I’ve sat on it for so long.

Read More…