Skip to content

August 2023#

Thursday, 31#

gnome-shell-memento-mori#

Finished the rewrite. Found out that Gio.Settings.get_string() can be used to get the nick of the currently active state of an enum. It is mentioned in the documentation of the Gio.Settings.set_enum() method.

Also, found out about the rules for XML internationalization. Modified the GSchema‘s ITS file so that xgettext doesn’t pick up summary and description strings. Made the same workflow for managing translations work with a simple Bash script.

I found the Learn X in Y minutes‘s resources for JavaScript (including the mentioned MDN’s language overview) and TypeScript to be a great way to refresh my knowledge of these languages.

Also, I was able to make the emitted JavaScript code look pretty much the same as the TypeScript code via a separate ESLint config and a couple of sed calls.

Wednesday, 30#

gnome-shell-memento-mori#

Almost done with the rewrite. I dropped the date-fns library in favor of computing total number of average months and years, just so that I don’t have to bundle dependencies.

Monday, 28#

gnome-shell-memento-mori#

I learned that typescript-language-server can provide limited type checking in pure JavaScript via JSDoc annotations. Naturally, I tried it, and then quickly decided to switch back to TypeScript. I still drop Rollup, though. Since GNOME Shell has transitioned to ESM, calling tsc works quite well (I will have to implement a workaround for preserving blank lines, though).

Spent most of the day figuring out how to make ts-for-gir work. It eventually did!

Sunday, 27#

gnome-shell-memento-mori#

I’ve started preparing my GNOME Shell extension for GNOME 45. I decided I will rewrite everything in pure Javascript, nuking Typescript, Rollup and use of a pseudo-build system (package.json scripts). There is really no need of all this bloat in this case.

Also, I’ve changed my mind on flake-utils. Rewriting parts of it myself quickly became a hurdle and increased the amount of noise in the code, so I would rather stick with this extra dependency.

Saturday, 26#

Maintenance#

I’ve solved a couple of issues with the Codon Nix package in the currently open pull request. Specifically, making the compiling to executable feature work out of the box took me the whole day to figure out. Had to write a tiny bit of C++ code (yikes!), so that I can override the runtime search paths from Nix and make sure the Zlib library is visible to the C++ compiler (Codon calls it under the hood).

Friday, 25#

Japanese#

Damn, found out I missed pre-lesson exercises in other places of the textbook and workbook (4 places to look in total, plus 2 in the Answer Key). That, and I found even more online resources today. Plus, I will be using Anki for expanding vocabulary, eventually.

Also, I found a tier list of the Hololive members ranked by how easy it is to comprehend what they’re saying. I do have Okayu’s Minecraft stream open in a tab now…

Maintenance#

I removed flake-utils from my dotfiles Nix flake today (a bad practice). Also, I don’t pass pkgs to the nixosSystem anymore (also a bad practice). Now I provide as an output the nixosConfigurations attribute set instead of the packages.${system}.nixosConfigurations attribute set.

Thursday, 24#

Japanese#

Well, now I can thank for the food.

よろしくおねがいします!

Wednesday, 23#

Japanese#

Memorized Katakana, too. Although, admittedly, it’s much easier to read the syllables than to write them by hand (for both syllabaries). There’s still some effort required for deciphering, too. Especially when diacritics and digraphs are involved. Some reading is necessary.

Maintenance#

Updated my site to use the new built-in plugin. Created a pull request to update Quod Libet in Nixpkgs.

Tuesday, 22#

Japanese#

Aight, I memorized Hiragana (basic syllables + syllables with diacritical marks + the contracted sounds). Will need a bit more practice, of course. Speaking of which, I found the Real Kana website to be immensely useful for learning and practicing the syllables.

Monday, 21#

Japanese#

Started learning Japanese today. Kind of because of Hololive, but also because of a vastly different culture. I have Nyarons in my music collection and can’t understand their songs, but they sound so cool! Anyway, I’ve started with GEIKI as a complete beginner. This is my second attempt to approach the language, though.

Learned a bunch about IMFs and IMEs. They are pretty easy to set up on NixOS: I chose to use the Mozc IME. I’ve set it up to use the US layout in the Direct Input mode. This allows me to have English and Japanese in one layout! I’ve also installed the 10ten Japanese Reader extension in Librewolf, so that I can get explanations for how words are constructed by hovering over them.

Saturday, 19#

HoloCure#

Aight, the IRyS strat works, although I was able to get maximum 250K HoloCoins on S1 (Hard). Didn’t have everything upgraded yet, though. YAGOOs kill me rather quickly after the 30 minute mark.

Friday, 18#

HoloCure#

Today I played HoloCure and found out about Hololive. The game is cool, but I’m not sure about the Hololive’s content yet.

Thursday, 17#

Kirk#

Read a bit more on TCP. Found out that I could just use the libsoup library to make HTTP conversations. I would also like to switch to HTTP/2 over TLS if Qobuz supports it. I don’t even know how to quickly test it, since it seems to work completely differently compared to HTTP/1.1 (tried with Netcat). Gotta learn a lot of networking stuff!

Also, I think I found a bug in GIO: the GTask in the g_tcp_connection_close_async function (which is allocated when graceful disconnects are enabled) is never freed if there are no errors. Usually, one would put a g_object_unref(task) after any of the g_task_return_* functions.

Wednesday, 16#

Kirk#

Used Wireshark to find out that my login conversation was closing abruptly (the connection termination phase was just skipped each time). Turns out that one has to explicitly enable it when using GIO: via the g_tcp_connection_set_graceful_disconnect function.

Time tracking#

I will stop tracking my time. Putting the stats at the end of the day became mechanical and doesn’t seem like something that affects me in any way anymore. If I have something scheduled, I will do it anyway, if possible. It also doesn’t represent some of my commitments that I find somewhat valuable. For example, today I’ve reorganized my NixOS config, which took quite a while. Then I created a couple of pull requests to update KeePassXC and Picard in Nixpkgs. I would call this type of activity maintenance, and I usually don’t log maintenance tasks, because it always feels like it won’t take that much time (and then it does).

Tuesday, 15#

Wireshark#

Finally, finished learning Wireshark.

Time tracking#

Sunday, 13#

Wi-Fi power management#

I think I found the reason my network speed was getting lower on idle: presumably, it’s a Linux module that enables Wi-Fi power management (dynamic power-saving). Here’s a quick fix via NetworkManager on NixOS:

networking.networkmanager.wifi.powersave = false;

Time tracking#

Saturday, 12#

Time tracking#

  • Today [02:10:09]
    • Consuming [02:10:09]
      • Research [02:10:09]

Friday, 11#

Time tracking#

Thursday, 10#

Time tracking#

Monday, 7#

Kirk#

I scrapped the idea of reducing the closure size of the output of the Nix package. My overlays affected not only my package’s and its derivation’s closures, but also the devShell‘s closures, which I completely didn’t think about. At some point I started compiling WebKit from scratch (because it has Cairo as a requisite, which I had an overlay for). As you can imagine, this isn’t good (too long to compile). This made me realize that the idea of a generic runtime is much better for distributing an application (which is what Flatpak is known for). Nix flakes allow me to lock Nixpkgs to a specific version, and then consumers can override it to their version if they’d like. Using the locked version would mean getting a guaranteed build at the price of downloading and storing (highly likely) duplicated dependencies. Overriding the input would mean using Nixpkgs as a runtime, with shared libraries updated at your will (which can potentially break the application). I can still support both of these choices, but by favoring the latter option (which would mean not overlaying anything) I don’t have to compile the world every time I update the lock file.

Also, Nix makes it easy to fiddle with the derivation if necessary (which is what Flatpak can’t provide), and there are no annoyances because of sandboxing.

Time tracking#

  • Today [03:17:36]
    • Producing [02:42:22]
      • Software engineering [02:42:22]
    • Consuming [00:35:14]

Sunday, 6#

Kirk#

I was able to reduce the closure size of the output of the Nix package from 875 MiB to approximately 200 MiB by just removing the GStreamer media backend. I mean, that’s just a single flag! Ironically, as I edit the derivations of more and more packages, the closure size of the Kirk’s derivation gets bigger (e.g., librsvg requires Rust, so it’s part of the closure now).

Found another neat tool: nix-output-monitor. It shows you an active part of the graph of the derivation’s closure while building.

Time tracking#

  • Today [02:00:51]
    • Producing [02:00:51]
      • Software engineering [02:00:51]

Saturday, 5#

Kirk#

Was working on reducing the size of the closure of the Nix package. Turned out to be quite an involved process! Found out the nix-tree tool to be very useful to quickly navigate the tree of requisites (it supports derivations, too!). Also, related to this, found out that the latest version of nix-direnv supports manual reload of the Nix environment.

Time tracking#

Friday, 4#

Kirk#

Committed the code that makes the authorization button work. Switched to using Adw.Toasts for notifying the user about the results. Also, made it so that the request can be cancelled using the same button.

Time tracking#

Thursday, 3#

Kirk#

Found out what was causing the issue: I had to switch from the g_input_stream_read_all_async function to the g_input_stream_read_async function. Seems like it was trying to read it all and failing for some reason until the timeout.

Got the authentication working! Added a simple light bulb that changes color to indicate the success of the verification.

Time tracking#

Wednesday, 2#

Kirk#

Figured out how to wrap a chain of asynchronous operations into a new asynchronous operation and pass data in between using GTask. Wrote a lot of asynchronous functions for logging in Qobuz. By the end of the day I was able to get a response! Albeit, sometimes I get it, and sometimes I don’t. I think this might be related to a socket not being closed, I once had a similar issue with mini-database-server-in-zig, but never found out why Linux be like that.

Time tracking#

  • Today [06:06:43]
    • Producing [05:01:39]
      • Software engineering [05:01:39]
    • Consuming [01:05:04]

Tuesday, 1#

Kirk#

Was working on making the “Verify credentials” button work. Really struggling with figuring out how to do a proper composition of asynchronous tasks. I don’t quite understand the examples in the GTask‘s documentation.

Time tracking#