Skip to content

July 2023#

Monday, 31#

Kirk#

Finished reading the GNOME Developer Documentation.

Added support for editing Qobuz credentials in the app. Made use of the Secret Service (via libsecret) to store them. I store the token as a secret and use the user ID as an attribute (which is required to differentiate secrets from each other). Now that I’ve done it, I wonder if it’s fine to just store the ID in the settings and use the service name as an attribute.

Time tracking#

Sunday, 30#

Kirk#

Added the Add Release Window with a (not yet functional) search entry. It is just an Adw.EntryRow and not a Gtk.SearchEntry, so there is no configurable delay between the input events. It should be fine for starters, but I might hit some API rate limits eventually. Which also brings up the question of having a cache for search results.

Today I found out that gtk_widget_class_add_binding_action is a thing: it allows one to have class specific key bindings. I used it to fix the issue where the Preferences Window and the Add Release Window would open one on top of the other when repeatedly pressing the shortcuts.

Also, turns out there is an issue with using mold with LTO enabled. It requires a plugin which is (ironically) not present in the latest version from Nixpkgs and also seems to be specific to the gold linker. Switched back to LLD in the Nix package declaration.

Time tracking#

Saturday, 29#

Kirk#

Commited the code adding the destination folder path. I nuked input validation (checking if the chosen folder exists) in favor of trying to create the full path when necessary. This simplifies the approach a lot: I wanted at first to create an idle callback that would check if the folder path is valid. If not, it would notify about it both in the application window (via the menu button) and in the preferences window (via the dialog-error-symbolic image).

Switched to using the mold linker.

Time tracking#

Okay, here’s my categorization so far: time can be used to

  1. Produce something: this is man’s noblest activity
  2. Consume something that is potentially pragmatically useful
  3. Consume something that is definitely not pragmatically useful

I would like to be proud of focusing on the first option, making use of the second option when necessary, and limiting the third option. I will exclude from reports time periods that are related to the last option (I consider those wasteful, although sometimes necessary).

Friday, 28#

Kirk#

Worked on making the program save the destination folder path and validate it.

Time tracking#

Today I encountered (again) this simple yet annoying idea:

You can’t improve what you don’t measure.

So, I decided I will investigate what self-tracking options are there. I found Furtherance to be what I needed: it allows me to easily log a period of time and put a label on it. It’s manual, so it makes me responsible to stay focused to the task described in the label. I will be publishing the logs publicly, so that I stay accountable and consistent. Finally, it allows me to elaborate on my work-life balance. I also find it valuable to think of the latter in terms of the consumption-creation balance.

  • Today [09:13:00]
    • Software engineering [03:58:21]
      • Kirk [03:04:25]
      • Investigating a GTK leak [00:28:36]
      • Inspecting an SQLite database [00:25:20]
    • Games [02:18:58]
      • LEGO® The Lord of the Rings™ [02:18:58]
    • Life [01:14:09]
      • Eating [00:57:49]
      • Dishes [00:16:20]
    • Research [00:56:46]
      • Time tracking [00:56:46]
    • Entertainment [00:44:46]
      • Good Omens - S02E01 [00:44:46]

Yeah, I definitely have to automate this.

Thursday, 27#

Kirk#

Was working on adding the file chooser dialog for the destination directory, but got stuck with tracking down memory leaks. Turns out AddressSanitizer doesn’t catch many leaks (e.g., a missing g_autoptr). Also, using GTK’s and GLib’s suppression files is essential (they do have a more generic version for LSan, too). Switched back to Valgrind.

Objectivism#

Read more of Objectivism: The Philosophy of Ayn Rand.

The refute of Determinism still seems to be lacking for me: they make the volition a self-evidential axiom (a corollary to consciousness) and then refute determinism by accusing it in denying this axiom (which is not necessarily what determinism proposes). That’s a fallacy. I find the subject of deterministic volition amusing because it’s hard to resolve objectively (which is what Objectivism claims to have done), and yet the results of this resolution are utterly worthless pragmatically (what does it really change if your choices are predetermined?).

Still, I share the Objectivism’s conclusions here. And I like this segue to the next chapter:

Man’s senses are valid. His mind is free. Now how should he use his mind?

Wednesday, 26#

Kirk#

Renamed the application from Groovy to Kirk (mostly because groovy turned out to be already taken, but also because I deem this captain to be better).

Read a bit more of the GNOME Developer Documentation.

Added saving of the window state. Started working on adding the destination folder entry. This latter simple addition already requires input validation and providing sensible defaults.

Tuesday, 25#

Kirk#

Read a bit more of the GNOME Developer Documentation.

Monday, 24#

Deltarune#

Finished playing the Snowgrave route. It was surprisingly short.

Kirk#

Was reading the GNOME Developer Documentation today.

Sunday, 23#

Deltarune#

Finished Deltarune today, but turns out it also has an alternate route (as Undertale did). Okay!

Life#

Spent the significant part of the day picking cherries from the tree and picking sprouts from potatoes. Ironically, was thinking about what it means to provide value while doing it.

Saturday, 22#

Kirk#

So, I’ve added a sample preferences page, and then went to report the issue I described yesterday. Also, I wanted to report GTK’s transitive dialogs shifting on subsequent calls, but turns out I actually already reported it a year ago! Completely forgot that was a thing. Also, surprising that this last one is still not confirmed.

Nixpkgs#

I decided I will jump in where possible to maintain some of the Nixpkgs packages I use frequently. Such as Lazygit (yesterday’s PR) and Blueprint (today’s PR). This is just so that I don’t have to wait for others to do updates and so that I can make use of my fork of Nixpkgs if necessary (read about the system branch below).

Friday, 21#

Kirk#

I’ve solved the problem with the GSettings schema by making the program look into a directory next to the executable (in debug mode only). Turns out, on Linux, you can get data about the current process from the /proc/self/ path, as described here. For instance, I’ve got the directory where the executable is located at runtime by reading the contents of /proc/self/cwd.

Encountered another weird issue, though: there are memory leaks when using AdwPreferencesWindow. Specifically, when using the search functionality or when switching the AdwPreferencesPages. I was struggling to get the backtrace for the AddressSanitizer, and I remembered also wondering why Valgrind was so slow in comparison. Turns out, one have to put fast_unwind_on_malloc=0 in the ASAN_OPTIONS environment variable, and then you get the same slow performance of Valgrind, but with the full backtrace. Anyhow, it only shows that the memory came from the template initialization, which is rather expected. No clue why wasn’t it freed, though. I will probably have to report this (or investigate it myself).

Nixpkgs#

A small addition to the yesterday’s entry: I will be using cherry-pick instead of merge. This way, I don’t have to deal with potential conflicts between the master and nixos-unstable branches.

Thursday, 20#

Deltarune#

Played Deltarune today, and it’s great! I did play the first episode when it came out, but I barely remembered anything from it. Brings back good memories from Undertale, too!

Nixpkgs#

Since I maintain some of the packages in Nixpkgs, I sometimes want to make use of them before the associated pull requests are reviewed and merged. For that, I’ve made the nixpkgs input in my NixOS flake point to the new system branch of my copy of Nixpkgs. This branch is basically the same as the upstream’s nixos-unstable, but I merge some of my local branches into it.

Here’s how I’ve created it:

git checkout nixos-unstable
git pull --rebase upstream nixos-unstable
git checkout -b system
git merge zigmod
git push -u origin system

Here’s how I can update it:

git checkout nixos-unstable
git pull --rebase upstream nixos-unstable
git checkout -b system
git rebase -r nixos-unstable
git push -f origin system

Wednesday, 19#

Kirk#

Was working on adding a preferences window, but got stuck at making the local settings schema visible to the program. Needed to create a custom target in the Meson build file just to get the gschemas.compiled file (the built-in function assumes the location of the schema itself). I can just set GSETTINGS_SCHEMA_DIR to the path where this file is located, but I’d like to make it work out of the box (e.g., by setting the variable to a relative path in the Nix flake’s devshell).

Tuesday, 18#

Noita#

I finally beat Noita today! My strat is a wand with the Pollen spell with low cast and recharge times, with the Projectile Repulsion Field perk. Spamming Pollen allows you to create a shield that consumes all projectiles and also moves automatically to the enemies, dealing damage to them. The Projectile Repulsion Field will push the projectiles from yourself, including Pollen. This way, if you’re careful, pretty much nothing can hurt you. Add to this some modifiers to deal more damage (e.g., I had Burning Trail), some protection perks (e.g., I had Fire Immunity), and voilà. The final boss didn’t deal any damage.

Objectivism#

Read more of Objectivism: The Philosophy of Ayn Rand. Couple of things are bothering me:

  1. There is a lot of accent on “an entity acts in accordance to its nature”, but then how come most of an entity’s actions are dependent on the context? For instance, using an example from the book, “under ordinary circumstances, if a child releases a balloon filled with helium, only one outcome is possible: the balloon will rise”. Now, this might be true, but what if one releases the same balloon in space? Will it also “act in accordance to its nature” and rise up? Not really, it will just pop. Did the identity of the balloon change on a trip from Earth to outer space? When and how did that happen? Or is this example extraordinary and therefore doesn’t count? The author mentions this nuance: “the same entity, under the same circumstances, will perform the same action”, and yet continues to put emphasis on the entity itself, rather than the circumstances that really define the outcome.

  2. When there is talk of causality, it is very probable to see an opinion on determinism. I can see (sort of a spoiler for myself, I guess) that Objectivism rejects the latter, but I am now unsure what the justification might be. “The concept of «cause» is inapplicable to the universe”, they say, but what about physical cosmology then?

Whisparr#

Opened a pull request to add the Whisparr NixOS module. Turns out it’s not that hard to write a NixOS module (especially if it’s a service). There are nuances, of course, but overall it’s rather straightforward, having lots of examples in Nixpkgs.

Monday, 17#

Whisparr#

I’ve been working on creating a NixOS module for the Whisparr service.

Sunday, 16#

Kirk#

Finished reading the GLib reference. Also, read the Libadwaita reference. Ported the current code to Libadwaita.

Objectivism#

Read more of Objectivism: The Philosophy of Ayn Rand. It seems to be very approachable and promises to be pragmatic (which is what I’d like to see by choosing non-fiction books first).

Saturday, 15#

Kirk#

Read more of the GLib reference. By the way, the reference is better structured if you use Devhelp to access it.

Objectivism#

Started reading Objectivism: The Philosophy of Ayn Rand.

Friday, 14#

Life#

Registered an application to the military commissariat today, so that they proceed with me according to the law. This is hopefully the last interaction with them this month, so I’ve finally finished with all these worries and now have some time for myself.

Thursday, 13#

Life#

Somewhat upset after the visit to the military commissariat today. The draft board there is seemingly unenthusiastic about me going against the system, although some draft department workers are genuinely trying to help. I might encounter unpleasant surprises in the fall.

Wednesday, 12#

Life#

Visited my local military commissariat today, taught some ol’ fellas about alternative civilian service. Will be visiting them again tomorrow. Did some related paper work.

Changed the router at home to the one I was using in the dormitory while studying at the university. Turns out one antenna gives better coverage and more stable signal than three antennas (same dBm and dBi). Not sure why, though.

Tuesday, 11#

Nixpkgs#

Answered to the reviews of the pull requests for Zigmod and GR Framework.

Also, created a PR to update libremidi. First time using nipkgs-review in a while!

Site#

Made it so that the repo_url configuration option is set based on the hosting.

Saturday, 8#

Kirk#

We had a pretty rough thunderstorm today, had no electricity for quite some time and still don’t have internet (this update will be pushed much later than committed). I was able to finish watching the Creating a GObject in C video by Christian Hergert before lights went out. Did some small stylistic changes in the code after that. Then, I read some of the GLib documentation.

I will be on a short business trip for the next couple of days.

Friday, 7#

Kirk#

Finished with the GObject documentation. Tested this new knowledge by rewriting the current code using subclassing.

Thursday, 6#

Kirk#

Read more of the GObject documentation.

Wednesday, 5#

MAP#

Read some more MAP related materials.

Tuesday, 4#

MAP#

Did some more study on MAP related topics.

Monday, 3#

MAP#

Was reading about minor-related chronophilias the whole day. This is apparently actually tabooed knowledge (it’s even censored on Wikipedia, and bigoted by almost everyone on any platform).

Sunday, 2#

Kirk#

Have been reading the GObject documentation, and the library is actually pretty neat. But also somewhat convoluted. Insert the obligatory “we have OOP at home” meme here.

Saturday, 1#

Kirk#

Finished reading the additional documentation in the GTK documentation. GObject documentation is next, since having a grasp of the type system is essential.