Tag: english

Tricking the JVM JIT into speed

On the Clojurians Slack, PEZ brought some delicious Fibonacci performance tuning from the “languages” repo. While I don’t think that benchmark is as useful as mesmerizing the moving circles are in the animated graphs, I had a few very confusing and interesting discoveries.

Step 1: watch Alex Miller’s talk about Clojure’s interop performance. Step 2: learn how to actually do all that stuff. Step 3: notice that recursion does things. Step 4: magic.


Untyped JS objects in ClojureScript

Working on a Chrome plugin I got to use ClojureScript in yet another new environment. After the usual browser setup, Node, Deno and Github Actions, this time it was the Chrome plugin system. While it was mostly a very smooth ride, I had a little trouble figuring out how to deal with a “Cannot infer target type in expression” warning.

It showed up while dealing with a HAR entry object passed in to my callback from devtools.network.onRequestFinished. The HAR object, while its shape is well defined, is not typed in a strict sense (though I guess there may be some type definition for it somewhere out there if I looked hard enough). That’s why when I tried to access its fields like (-> entry .-request .-url) the ClojureScript compiler (through Shadow CLJS) would complain about inferring the “target type” as above.


HTTP Signatures are RFC

If you’ve worked with Mastodon (or possibly other ActivityPub implementations too) HTTP Signatures might sound familiar. When notifying another server of an event, the request can be signed thus proving its authenticity, meaning that the receiving server doesn’t need to go and fetch the authoritative version from the origin. This reduces load on both the receiver of the event (less requests to send) and the origin (less requests to serve).

black audio mixer

Why isn’t my HTTP/3 working?

On a sudden impulse, today I updated the Traefik in my cluster to v3. Unlike the transition from v1 to v2, v2 to v3 was very smooth. I only needed a few tiny tweaks to the configuration. One of those was that HTTP/3 support is no longer “experimental” and so it shouldn’t be configured as such. This started me on a weird quest on getting my sites to use H3.


Anime weekend

Friday I was just spacing out looking at some AMV on Youtube when I noticed a shot from Dragon Maid. It’s been a while since I last (re-)watched that, so I decided to enjoy some delicious slice-of-life sakuga.

By the time I realized what’s happening I’d speedrun both seasons of Dragon Maid and it was time for more. Mahoushoujo ni Akogarete has been on my to-watch list for a while, and I took this opportunity to actually watch it end to end. It was… well, a not exactly safe-for-work experience, but especially the close-ups of Baiser’s face are absolute cinema.


Magic

A while back I picked up my fretless Ibanez to practice some old-school songs. Think Elvis, Cream, Stray Cats or Blue Cheer. I use the fretless even if the original wasn’t played on one, because otherwise I’d pretty much never pick it up. I still do so sadly infrequently…

So it was quite a shock that the bass’s neck was so bowed that it was unplayable (strings touching the fretboard all along). At that point I didn’t have time to learn how to fix it (by adjusting the rod inside) so I put it back into its case and kinda forgot about it.

Then today after cleaning my room I gathered the tools I needed and took it out of the case to fix it—except it was back to normal. I can only assume that the bending was caused by the ridiculous humidity and summer heat, especially during the weeks in June while I was on Denali (and so the AC in the room was off), and then it gradually returned to normal.

To celebrate I played until my fingers started to ache (which isn’t a lot of time considering how out of routine I am).


Remote work

Recently I’ve been seeing lots of articles about companies enforcing RTO (return to office), putting an end to the remote work “paradise” that’s been around since the ‘rona lockdowns. Luckily my company isn’t doing that for devs (though sales folk are hybrid), and it would be tough too considering how many of us moved even further away from the office in downtown Tokyo.

I personally don’t really feel a difference in productivity whether I’m in the office or not. Even if I’m in the office, I’ll just put on my headphones and do my stuff. Team meetings? I really don’t feel there’s a difference between sitting around a table (or standing in front of a whiteboard) and an online video meeting.

On the other hand, losing two hours of my life every working day to a soul-numbing crowded commute? Or paying 3-4x as much just so I can live near the office and drown in the concrete jungle smog every time I want to go for a jog? How about no?


Thunderstorms

I love thunderstorms. Looking at them. Observing them from safety. I’ve had an unfortunate encounter with one on Tsurugi a few years back so I’d prefer not to run into one again exposed on a ridgeline, but looking at one from somewhere the lightning and the rain aren’t threats is fantastic.

Single cell thunderstorm cloud

Personally I also like the sound of it. I used to have a few hours long “soundscape” of a thunderstorm too that I’d listen to when I couldn’t fall asleep. It’s the same kind of majestic, raw power of nature I admire when I look at the overwhelming scale of mountains.

This was inspired by that today we’re getting round two of huge (and quick) thunderstorms. I don’t think I’ve ever seen two completely separate storms in a day…


Denali ’24

This year I was back on Denali for another try. It’s been 3 years since my previous attempt and while my training routine was a bit haphazard, I felt really strong and my training hikes were going great. It was time to head back to Alaska!

This time I flew in through Minneapolis. Why? Flying in through Seattle would’ve been longer and more expensive. I was a bit traumatized by just how flat the US midwest is, but I can deal with that. This time I didn’t have to deal with any vaccination process at the airport, but I did manage to meet some of my teammates before the next day team gathering.


Upgrading to Ubuntu 24.04

Didn’t go smoothly. I was on 22.04 I believe and I decided to upgrade without waiting for 24.04.1. It was a mistake. I started the upgrade with do-release-upgrade -d, but way too soon I ran into a very nasty crash screen telling me “Oh no! Something has gone wrong and the system can’t recover”.

Aside. I personally hate these “friendly” additions like “Oh no!” Fuck off? My system just crashed, I’m pissed and the last thing I need now is some linux dev who thinks they know how to be friendly rubbing it in.

The way to fix it for me was: first reboot and choose recovery mode in the Grub menu. Once recovery mode is on, enable network then drop into a root terminal. Run dpkg --configure -a to fix whatever was interrupted. After reboot it should boot all right (at least the GUI would work).

However the network was still broken. I could ping 1.1.1.1 so the connection itself was alive, but nothing could be resolved. Turns out the installation removed the resolve component of systemd. Luckily for me sudo apt-get install systemd-resolved could install it back and that solved the connection issue.

At this point the system seems to be functioning properly (nothing is obviously broken other than Thunderbird for some reason getting removed from my dash), but I don’t know if the interrupted install broke anything nor how to check if anything is broken or in an uexpected state.