Skip to content

October 2023#

Tuesday, 31#

Kirk#

Spent quite a lot of time figuring out how to connect to signals from the Secret Service API via D-Bus to set up my callback when the password changes in the secret store (spoiler: you apparently can’t monitor that, only public parameters), just to find a simpler, one line solution afterward.

Also, started wrapping my blocking regex searching functions in asynchronous wrappers, as described here, so that I can use the g_task_run_in_thread function and make them run in a worker thread. Simply using std::thread from the C++ standard library turned out to be not enough to avoid blocks.

I get somewhat annoyed by C++’s need to run destructors all the time. For example, I can’t really steal the pointer from an std::string to bypass the destructor. This causes workarounds in asynchronous code, such as copying the string to GTask‘s data. I might as well just use GLib… and switch back to C?…

Monday, 30#

Kirk#

Implemented the retrieval of the application ID from Qobuz. Used the support for regular expressions and multi-threading in the standard C++ library. Currently, in the process of implementing UI nuances (like updating the password entry on changes in the secret store), so that the process of fetching the ID is more intuitive.

Friday, 27#

Kirk#

I started rewriting the code using gtkmm, but eventually encountered that there is no pretty way to derive from the libadwaita‘s widgets. There are hardly any examples of someone doing it (GNOME System Monitor is one, but they just use the GTK Builder to avoid defining new classes). Also, I found out that you can’t use templates in XML descriptions of user interfaces, only concrete objects. Furthermore, the API seems slightly different from the upstream (and their reference doesn’t have a search!). I decided to stick with C-like C++ for the time being.

Started writing support for fetching application ID from Qobuz.

Thursday, 26#

Kirk#

Converted the code from C to the C-like C++. Turned out to be a pretty straight forward thing to do. Started rewriting into more C++-esque style using gtkmm. Hopefully type-safe callbacks are worth it!

Wednesday, 25#

Kirk#

Started converting the code from C to C++.

Maintenance#

Worked on polishing the pull request to update qBittorrent in Nixpkgs.

Tuesday, 24#

C++#

Finished reading A Tour of C++. It changed my opinion of C++ (I think it’s pretty good).

Maintenance#

Created a pull request to update qBittorrent in Nixpkgs.

Monday, 23#

C++#

Read more of A Tour of C++.

Friday, 20#

C++#

Read more of A Tour of C++.

Thursday, 19#

C++#

Read more of A Tour of C++.

Maintenance#

Spent a lot of time figuring out what went wrong with using mold on Darwin (checks failed here). Turns out support for macOS exists as a separate commercial project by the same authors, called sold (that’s pretty funny). Learned about otool and objdump as alternatives to patchelf and readelf.

Wednesday, 18#

C++#

Read more of A Tour of C++. Turns out the support for generic programming in C++ is very powerful!

Maintenance#

Created a pull request to update mold in Nixpkgs. Also, I’ve set allowedRequisites to null for useMoldLinker to avoid issues downstream (see #261825).

Tuesday, 17#

C++#

Read more of A Tour of C++.

Maintenance#

Created a pull request to update Tracy in Nixpkgs.

mpv#

Turns out you can create per-directory configuration files (mpv.conf) and make them loaded automatically if you enable the use-filedir-conf option. So, for example, you can select an audio stream, a subtitles stream, a size and a position of the subtitles, for all files in a directory. Really useful when watching series!

Monday, 16#

C++#

Read more of A Tour of C++. Already diving in complexities like the rule of three/five/zero. Added locally a pkg-config file to the Nixpkgs package for Microsoft’s Guidelines Support Library to make it work with Meson.

Friday, 13#

C++#

Started reading A Tour of C++.

Thursday, 12#

Kirk#

Finished reading the GDB manual.

Wednesday, 11#

Kirk#

Finished setting up additional linters (clang-tidy, scan-build, and PVS-Studio). Surprisingly, there was only one new warning that I found useful: I didn’t initialize a variable in one place, and clang-tidy notified me about that.

Read a part of the GDB manual.

Monday, 9#

Algorithms & Data Structures#

Started reading Cracking the Coding Interview.

Japanese#

Dropped learning the language since I don’t see the pragmatic reasoning of its usage anymore.

Friday, 6#

Counter-Strike: Source#

Wrote the blog post after finally figuring out how to fix the issues with the fonts.

Thursday, 5#

Counter-Strike: Source#

Worked on fixing some of the issues with the game (almost finished with a blog post on fixing issues with fonts on Linux). Found my old custom folder and configs on an old laptop!

Wednesday, 4#

Kirk#

Set up PVS-Studio, started going through the warnings.

Tuesday, 3#

Japanese#

Switched from the Tae Kim’s Guide to Learning Japanese to IMABI for proper explanations.

Kirk#

Started learning how to use PVS-Studio. Since I got a trial key yesterday and packaged the CLI tools to Nixpkgs today, I will look into it first before returning to rr and GDB.

Excited to find out what their implementation of MISRA C will find in my code!

Maintenance#

Created a pull request to add PVS-Studio to Nixpkgs.

Monday, 2#

Maintenance#

Created a pull request to add VTFEdit to Nixpkgs. That’s a rather old Windows application (circa 2005–2011), but it’s rather important for people who’d like to have high quality sprays in Source games. So, I used Wine and winetricks to make it work!