スマート電球の第一印象

スマート電球っていいね… と思っちゃった。わざわざベッドから起きなくても消せるし、スマホから操作もできるし、遠距離で点けたり消したりできるし、明度も調整できるし、強いでしょう?とか思いながらも結局金出すほどやりたいことでもなかった。そして今年の夏、ようつべでルームツアーやインテリア動画にハマった時期に紹介の動画を見たら結局衝動買いしちゃった。なぜかというとその辺飲みに行った店の内観がめっちゃササって、それっぽくできるじゃない?と思ったから。


The Weave GitOps UI for Flux

Unlike Argo, Flux has no built-in UI. CD tools should be invisible most of the time, just quietly running in the back, getting changes in the cluster. This is fine for “most of the time” when there are no changes to the applications I’m making myself or the cluster itself. It can just look at the various helm charts and other (git) sources and deploying the changes as configured. It’s nice that I can be sure that my cluster has the latest possible versions of everything running within 10-15 minutes of release (depending on the Flux interval configured) without ever touching kubectl.


How do foreign keys work in MariaDB system versioned tables?

When I read about the system versioned (and bitemporal) tables in MariaDB, I was both surprised and delighted. This kind of data versioning is thought of as standard in the “immutable” databases that are big in Clojureland, such as Datomic and XTDB. On the other hand, these databases in Clojureland are usually EAVT based and not the “usual” relational kind. After a little thinking I could think of a bunch of really tricky issues that could arise from system versioning (eg having a by-default immutable log of all changes to some piece of data) in a relational context. The first being foreign keys.

If you create a foreign key in MariaDB without any further specifiers, it assumes ON UPDATE RESTRICT ON DELETE RESTRICT, meaning no referenced key could be changed and no referenced row could be deleted. Just consider this: if there’s a row in some table referencing a row in another, system versioned table, can the row in the system versioned “parent” table be deleted? After all the referenced version of the row will still exist… Or in a similar scenario if the “child” row is system versioned and updated to now reference a different row, will both of those referenced rows be RESTRICTed? After all, both referencing rows will still exist… Of course I had to try.

brown-and-white clocks

自分でアドカレを作ってみた

アドカレのブログでアドカレ作った話を書くのはさすがにちょっとメタすぎる気もするが、学ぶことは少なくなかったのでまとめる。思いの外スムーズにいったこともあって、小規模ながらもおもしろかった。


Hot reloading and reitit in the frontend

Ever since I first ran into the Metosin libraries, I’ve been using many of them. One of the most known and used of those is probably reitit, a routing library that can be used both on the server and in the browser. Recently I’ve had more opportunities using ClojureScript in the browser, and I noticed something that was confusing for a few moments.

closeup photo of fox

Trying FluxCD

When you create a whole FluxCD new setup from zero, it’s really easy: use flux bootstrap. it does “everything” for you. In my case I tried this setup first for last year’s advent calendar. Except back then I had an expedition scheduled for the first half of December, so this took the back seat and was eventually forgotten. Therefore in this year past everything I did back then slowly sank into oblivion, so I again had to start pretty much from zero.

I did set up the repo and a cluster (on Civo) back then, but I quickly tore down the cluster when I realized I wouldn’t be able to test it all out. The repo stayed though, so now i was starting afresh with a k3s cluster spanning three nanodes (that’s a linode referral link with a $100 credit over 60 days) and a repository already set up from last year.


Prometheus vs Longhorn, fight!

Last year I had a brief affair with Longhorn. It’s a tool that abstracts the interface to interact with volumes (in my case in Kubernetes) from where the underlying data actually lives. In my case, my cluster consists of three small nodes, and back then most of the data lived in local-path provisioned volumes. Using local-path means that the data is physically on the host machine instead of some virtually mounted filesystem. This also means that once an application has a PVC, it can’t be assigned to any other node (it results in a “conflict”).


Fuck ads

There are ads that I don’t mind. I’ve multiple times clicked on ads on Facebook and ended up actually buying stuff I’m happily using to this day (trousers, shoes, games…). On the other hand I don’t remember ever clicking on any Google ads, mostly because I adblock everywhere by default so I don’t even see them. On my work machine, where I don’t have adblock, Google ads are just plain stupid so it never even occurs to me.

red fire digital wallpaper

Maybe a new watch

I’ve been using a Garmin Instinct since I got back from Aconcagua, both for training in the gym and running or hiking outdoors. I might need to replace it sooner than later.


Rings of what?

I looked forward to the Rings of Power. A show set in the second age of Middle Earth? There is so much potential. Other than the history textbook outline of the Akallabeth, there’s basically nothing set in stone. There are some characters who are described being kings of regions, founding lordships over thousands of years, but for most of it the second age is a blank sheet where you could make any story you’d want. As long as it doesn’t contradict those historical outlines in the Akallabeth.