Luminescent Dreams

Weekly Ramblings for November 17th, 2019

January 01, 0001
Barnaby Castle, 2019-09

This is Barnaby Castle in Providence, Rhode Island. Some of my friends live here, and it is currently undergoing incredible rennovations. The castle was apparently neglected for many years, and fell into disrepair, but it is still a very recognizable landmark that apparently everybody in Providence knows about. Currently it consists of something like five separate apartments, with signs of room for several more as the owner progressively continues with improvements.

I rather like my visits there, but I could really not live in the middle of a construction site.

Photography

Those who know me know that photography has been a significant part of my life for eight years now. Three cameras, many thousands of photos, and a bit shy of 1000 photos fully developed.

Photography on Linux, especially HDR photography, is definitely a trial. Five years ago I tried to build an HDR processor for Linux, but I never actually succeeded. I always ended up with a result that didn’t look like it could even be tone mapped correctly.

Sadly, the state of photography on Linux really hasn’t changed in that time. Digikam is still the best tool for the organization job, but it’s incredibly clunky with a 2000’s user interface when we’re about to enter the 2020’s. HDR photography exists in Luminance HDR, which is still very user unfriendly in that it presents the tone mappers to the user with just the names of the people who created them, and doesn’t allow the user to apply multiple different tone mapping operations to the same file.

Since I want to be doing my photography now, I’ve updated and rebuilt some old applications that chain together Hugin’s align_image_stack tool, RawTherapee, and pfstools into a semi-coherent whole. But since pfs-tools is batch mode only, there is no interactivity for me to run some tone mappers and view the results.

This is a hard problem. There is no way that I would ever say that it is not. It saddens me that the Linux tools have not advanced since 2011, though it saddens me more that I failed to actually build a tool myself.

At this point, these tools do the job, but it appears that Photomatix now exists for Linux, and I’ll need to see how to rebundle it for NixOS.

Though I have not given up the dream for building an entire excellent toolkit for doing photo editing on Linux.

Fitnesstrax and GTK

I spent a few hours reworking Fitnesstrax to be a GTK application, and had some interesting results. By interesting, I mean that I can get data to appear on the screen, but not in good format and certainly not in an interactive way.

Terrifyingly, I have learned that GTK 3 uses CSS for actually styling components. While this may make some things easier for me, I am terrified of doing CSS-style programming without all of the DOM-tree examination that is available in the browser. I will learn more about that in the upcoming week and will write more next time.

I will also need to learn how to handle state and its interactions with components. I have gotten very accustomed to React, Redux, changing the properties of a component to have it automatically update, making the Redux store look like properties. If I understand things correctly, React and Redux basically amount to Functional Reactive Programming. Rust has Carboxyl, but not really anything else comes up in Google. On the other hand, when I did Haskell programming I never fully understood functional reactive programming, so I may end up building something terrible, or I may hand-roll something more naive. In the very distant past, I set up a Mediator pattern where different parts of the application would listen to application events. I could possibly do something similar here, where state updates trigger mediator events.

But, likely, I should start by looking more deeply at Carboxyl, because FRP is generally a good tool.


And, that’s it for this week.

As always, I keep my nixos configuration and my nix shell on Github, so if you see anything Nix-related that interests you, that is where to see how I accomplished my tasks.

Weekly Ramblings for November 3rd, 2019

January 01, 0001
Along the Tracks, 2019-05

Hello, everyone, and welcome back to another round of my weekly ramblings!

This week I was still a bit under the weather, but I did a lot of work and started setting up my new machine.

NixOS

For me, setting up a machine is a complicated process. I typically run NixOS where I can, and I run MacOS with a Nix overlay when I cannot. For running MacOS, where the OS comes pre-installed and ready on the pre-configured hardware, system setup can take less than half an hour. I have to install nix, clone my nix-shell repository, then run nix-env -i all, and suddenly I have a full system with all of my configuration options.

But, with NixOS, I do not have any configuration options any more. I am having to build from the base system up. My last NixOS machine has been gone for several years, the configuration options on that machine have been lost, and wouldn’t really work on the new machine, anyway.

I went with AMD fo this build, and there were a couple of different quirks that I had to resolve.

  • Thinkpad x395
  • Ryzen 7 processor

First of all, and since this is my first time really dealing with the UEFI boot, be sure to turn off Secure Boot! NixOS cannot be booted in secure mode at this time, so it is very necessary to turn this off. Primary symptom was that I would reach the UEFI boot menu, select a NixOS USB key, and would immediately get back to the UEFI boot menu. This is particularly annoying because there is no error message and no log to check.

Second one is that the stable versions of NixOS ship with a 4.x Linux kernel, and it turns out that recent AMD processors really require a 5.x kernel to resolve quite a few different bugs, especially with ACPI. That meant switching to the latest linux kernel by setting boot.kernelPackages = pkgs.linuxPackages_latest;.

I have done quite a bit in the way of configuring my new system. I have shared my entir NixOS configuration on Github. Relevant options for a Thinkpad probably come down to just these, with everything else being specific more to me.

  boot.loader.systemd-boot.enable = true;
  boot.loader.efi.canTouchEfiVariables = true;
  boot.kernelPackages = pkgs.linuxPackages_latest;
  boot.kernelModules = [ "kvm-amd" ];
  boot.extraModulePackages = with config.boot.kernelPackages; [ ];

  systemd.services.systemd-udev-settle.serviceConfig.ExecStart = ["" "${pkgs.coreutils}/bin/true"];

  boot.kernelParams = [ "acpi_backlight=none" ];
  programs.light.enable = true;
  services.actkbd = {
    enable = true;
    bindings = [
      { keys = [ 225 ]; events = [ "key" ]; command = "/run/current-system/sw/bin/light -s sysfs/backlight/amdgpu_bl0 -A 10"; }
      { keys = [ 224 ]; events = [ "key" ]; command = "/run/current-system/sw/bin/light -s sysfs/backlight/amdgpu_bl0 -U 10"; }
    ];
  };

Still got more to do here, as I don’t have the screen locking when I suspend the machine, and sometimes the machine hard locks on suspend instead of actually suspending. But I’ve made progress!

Derivations

It turns out that very few of my MacOS derivations work on NixOS. It appears that on NixOS, the derivation builders generally don’t have internet access, and so derivations that download as part of the build don’t work.

As an example, my derivation for floki depends on running npm install in a normal build script, and that npm install doesn’t have access to the internet.

For some of these, the only thing I shoul need to do is to learn how to use node2nix. But for Floki it gets more complicated because Floki is not a Javascript app, but a Clojure app that compiles to Javacript.


  • all of my development derivations
  • Fitnesstrax
  • Photography tools
  • Steam

I have a lot more to do in order to be fully running on my new machine. Much more than I expected when I started on this, but it is all educational.

Furthermore, I think of it is training, and it certainly gives me more hands-on experience with NixOS that I can share here.

But, I’m running late on this post, so that’s it for this week! I’ll let you know about additional progress over the weekend.

Weekly Ramblings for October 26th, 2019

January 01, 0001
_DSC2984

Every week I try to post a set of ramblings about things I find interesting or things that I have done in tech for the most recent week.

However, I’ve spent weeks sick. Longest illness of my life, to the point that I felt better while on bed rest eight days post-op than I did eight days into this illness.

In the midst of this, though, I was able to celebrate my 41st birthday, complete with wine, cheese, friends, and me threatening a cake with a knife. My pastry creations don’t fare well, but they are very, very tasty.

Go

A few weeks ago attended a Go tournament for the first time. This was an official handicap tournament under the rules of the American Go Association. In theory, the results have been reported to the AGA and I will get an official rating, though that hasn’t happened yet. I’m sure it’s because AGA is not a technical organization and everything has to be manually entered.

On OGS, I currently have a rating of 16 kyu. I entered the tournament at 15 kyu. I then won three of my four games. In some cases, I received six and eight stone handicaps, and in both cases I was victorious by a significant margin. While some of the problem is that my opponents have never had to fight against such a handicap, which really does change the nature of the game significantly, I do feel that I should have entered as a 14 or even a 13 kyu.

Either way, that tournament, and playing Go Quest (all blitz games), I have certainly gotten a lot more momentum in my playing, especially because it has been easy to play at least one 13x13 game on the train ride from Davis Square to South Station. This inspiration has made it relatively easy for me to play one or two full size games in an evening after all of my chores are done, or while I am unwinding from work.

In case you are interested, this is my account on OGS.

Por miaj esperantistaj sekvantoj, mi trovis afiŝon Baza strategio de goo. Mi bonvenas defion el alia Esperantisto.

New Machine

I have a new machine coming my way. I switched off of Linux onto MacOS about two years ago when my office pressured me to switch operating systems, and I also made the decision to continue having only one computer, which means that I have effectively not owned my own machine for a couple of years.

In some ways, this has been really nice. I’ve had access to a library of games that did not used to be available for Linux. But in other ways, it has been hard. As much as I have tried to continue using Nix to keep my environments isolated and to be able to consistently have a known good baseline state for every development environment, in practice some of the tools that we use as a matter of course actually resist such isolation. Yes, I’m glaring at you, Ruby. See about my nixpkgs bug report here. That bug has been resolved, but that, plus the next contract I joined, hammered home that at Cloud City we really do not use tools that lend themselves to isolation, and for work purposes I cannot wait for fixes to Nixpkgs.

I would actually rather just set up a separate VM for each client, but MacOS is very unfriendly towards virtual machines and I was never able to get an installation to actually work.

Time Machine has already had three catastrophic failures this year. While I have not lost data, that is only sheer dumb luck. In the case of this failure, Time Machine’s recovery strategy is to delete the original backup and then start on a new backup, leaving me with multiple days of no backups while the new one is being built. Apple should bloody well be ashamed of themselves for that. Further, when I was using rsnapshot on Linux, the only failure I ever had over the course of years was actually a physical hard drive failure. That is the degree of reliability that I expect.

So, I’m really looking forward to switching back to NixOS.

One of the benefits that I’d forgetten about is that the GTK bindings for Rust are much more complete than the Cocoa bindings, so I can just start on porting Fitnesstrax to a GUI application immediately instead of also taking the time to rewire a widget set. Now that i am well again, I can actually start thinking about resuming development on the project.

The only drawback is that I’ll likely lose access to Aurora HDR, which I have been using for my photography for a few years. This isn’t necessarily terrible, as I did a lot of very good photography before switching to MacOS, but the tools available on Linux are really substandard. I tried to build an HDR application for Linux many years ago, but unfortunately the math was too hard. It is always possible that I will return to that project, as it is as interesting to me as Fitnesstrax, but that is not in my schedule for today. Note that there are HDR processors for Linux, but they are horribly user-unfriendly. The one and only GUI tool exposes a bunch of different tone mappers, but it does so with excessively technical names such as “Debevec”, “Mantiuk”, and “Fattal”. None of the tone mappers can be used together, and the settings have undescriptive names such as “Phi” and “Key Value”. Hence why I wanted to develop my own tool, but it turns out that the core math problem, developing an HDR map from the original sources, was beyond my ability.

Hollow Knight

As I mentioned, I was sick for almost two weeks. Not hospital-level sick, but coughing, low energy, my entire face hurting kind of sick. With the lack of energy, I haven’t studied, written or coded outside of work.

What did I do?

I played a lot of Hollow Knight.

I actually started back at the beginning of the game. This is easily the best game released in the last two years, but it was so hard that I got completely stumped in my last play-through. This time, though, I actually am doing much better. Partly, I am looking at the wiki to make sure that I find important items. Mostly, though, I’ve practiced some of the more… ahem acrobatic techniques, and I’ve learned to spam spells, and that has made some of the bosses, like the second encounter with Hornet, much easier.

Now, I said that the game was be best released in the last few years, and there’s a few reasons why.

The most obvious one is that the action is clear and crisp. Other games, like Salt and Sanctuary, are plenty good, but they are more about tanking than about developing any real skill. Hollow Knight obviously has upgrades that make the game easier, but generally no battle can be won just by tanking, only by developing skill, combining the right techniques and having some good luck. This is very satisfying.

But my real love for the game comes from the very consistent mood through the entire arena. You are exploring a fallen kingdom, one which tried many times to survive, but simply couldn’t. And while the wild areas around it seem to be doing fine, the kingdom itself; through the architecture, color schemes, and music; all speak to a place of sadness, loss, and resignation. I have never before encountered a game that was so consistent in maintaining a mood and theme, and this was done masterfully, with beauty mixed so carefully with nostalgia.

Hence… why I decided to spend my sick time re-playing a game that caused me to nearly throw my controller across the room back in March.


And that’s it for this week. Now that I am well again I should be able to resume posting regularly. I hope you all enjoy reading my ramblings.

Weekly Roundup

January 01, 0001
Arches, 2019-09

While normally I post these on Friday, this last week was quite busy and left me no time to write.

And, in fact, I have very little to write about. I had a trip with my partner to New Hope, Pennsylvania. It was, as always, quite lovely, but there is very little to do in New Hope.

I returned to start a job with a new client company, in the company’s office for the first time since starting at Cloud City, and meet for the first time a co-worker with whom I’ve paired for literally hundreds of hours of work.

First day had a rocky start, with me first forgetting my bike lock after getting to Assembly Station, and then watching as one train after another pulls into the station, completely full. Like, people trying to press in so they can clear the doors full. Moral of the story: don’t take the orange line during rush hour. Or, during rush hour there is no reason for people to get off the train at Assembly, and the addition of a parking garage there means that the train just keeps on acquiring passengers until downtown.

This week will again be busy, primarily spending all of the week in the client office, but also with a vet appointment and other random things.

So, yeah, this is a boring update. Hopefully I’ll have more next week, but until then, have fun and do something interesting!

Wiki

January 01, 0001

Wiki

Projects

Palimpsest

Cloister

Fitnesstrax

This is a workout and fitness tracking application written in Haskell with a GTK user interface. This project has served as a playground for trying out ideas.
  • Data persistence using an event log instead of a traditional database
  • Handling GTK widgets
  • Clean separation of the application GUI from the widgets
  • User experience concerns

Articles

Interesting Technologies

Solar X-Rays: x-ray status
Geomagnetic Field: x-ray status
From n3kl.org