• Latest Articles
  • Atom Feed
  • About
  • Latest Articles Tommie's blog

    A Small Variable-Length Bit/Byte Encoding

    This is an encoding that unifies the treatment of booleans, bit sets, integers and arbitrary byte data. For a while, I’ve been toying with the idea of unifying variable-length integer encoding with encoding the length of byte data. It’s dogmatically annoying that Protocol Buffers doesn’t support uint128 or bigger, and I have to resort to bytes. I want to express an RSA modulus as a big integer, not as a byte sequence! Or conversely, I want to treat byte sequences and integers the same at the encoding level. This grew out of that mental exercise.

    Read more…

    — tommie,

    Google Chrome Breakpoint Trap on Ubuntu/Linux

    I haven’t been able to run Google Chrome normally for a few days on my desktop computer (running Ubuntu 22.04.) Any time I try to run it, it would just terminate with “Trace/breakpoint trap (core dumped)”. The error message coming before it seemed irrelevant, so it was basically just dying. AFAIK, the APT repository for Google Chrome doesn’t have a debug symbol package, so no luck there.

    Read more…

    — tommie,

    WebAssembly Memory Limits

    I thought it would be nice to use WebAssembly as a sequencing language for a project running on an RP2040. It’s like a BusPirate, but for higher voltages.

    Read more…

    — tommie,

    A Poorly Assembled Connector On A Cable

    We were happily going to slowUp in Ticino, an event where they close roads and let cyclists roam free. It’s a great idea, and they’ve been doing it since 2000! At the hotel, though, I plugged in my laptop charger to the wall, and a loud explosion emanated from the charger brick. And the entire room went dark. With a burnt-electronics smell on the primary side of the charger. Fuse box did nothing, probably something they have to reset in the reception. A few moments later, we got the light back and the janitor checked the outlet. Aight, no charging for me.

    Read more…

    — tommie,

    Changing the Battery on a Google Pixel 5

    My Pixel 5 barely survives a day… without screen time. When you need the phone alive to prove that you have train ticket, this can be a very expensive experience here in Switzerland. If I use the Easy Ride system of the SBB app, the app needs to be available if there’s a ticket check (and there are many.) Otherwise, you get a phone number that you have to call after you check out from the ride, and have paid (at the end of the day.) For this fun ride, you have to pay CHF 30, which is far better than the CHF 100 fine for not having a ticket, but still not great.

    Read more…

    — tommie,

    Extending The Many-Worlds Interpretation To Consciousness

    This is going to be a bit far out there, and I’m going to sound like a wacko… It’s not a topic I’m supposed to like to talk about in the society I live in. It’s labeled pseudo-scientific drivel, and is mocked for trying to sound scientific, while just being unprovable armchair philosophy. Well, this is my blog, and if you’re not into armchair philosophy, you should probably stop reading now.

    Read more…

    — tommie,

    Setting Up USB Device Pass-Through on Android Emulator on Linux

    If you are trying to get a USB device to work with your Android app, it can be useful to be able to do it in an emulator. In my case, my intended tablet can’t provide enough current, so until I have a USB hub (or even Y-cable,) I could use my desktop’s USB port instead. Or so I thought. Trying to get it up and running took a few hours of reading. Here is a short history of what I tried, and a step-by-step at the end.

    Read more…

    — tommie,

    Free and Open Firmware for the AT860D Hot-Air Soldering Station

    This is an overview post of my project to create a replacement for the lost firmware of my Atten AT860D hot air soldering station. At some point, I might dig into more details about the individual parts and the problems they solve. For now, I just want to tell that it exists, and summarize how I made it. (Conversely, if I had more time, I would have written a shorter post.)

    Read more…

    — tommie,

    Automatically Unbinding a Linux Kernel USB Device Driver With UDev

    For an upcoming project, I’m implementing a USB Test and Measurement Class device. To avoid having to build apps for desktop and mobile, I’m starting with a web app using WebUSB.

    Read more…

    — tommie,

    Google Session Length Darkness

    Itergia has had a Google account since two years, paying $20 a month for two users barely using it.

    Read more…

    — tommie,

    BST 78, An Old N-MOSFET

    I found BST 78s in an old drawer (salvaged from a school that has since been demolished.)

    Read more…

    — tommie,

    How to Mess With a Web Developer

    Leverage CSS for anarchy and uproar in your team:

    Read more…

    — tommie,

    Some Gathered Quotes

    Here are some of the quotes I’ve collected over time.

    Read more…

    — tommie,

    Speculation and Money Laundering

    In response to Karl Jobst’s video on the vintage video game market. The video is an update to his previous video that explained the unclear links between the largest valuation house and auction house. In both of these videos, his speculation is always that a bubble must be formed because people buy to speculate.

    Read more…

    — tommie,

    Life Is Never Finished

    Sometimes I wonder if I do anything at all. While working for Spotify and Google, I was told some things I did were useful. Most of them never felt “done” to me, though. Privately, I know I rarely tell anyone about hobby projects (though, trying to get better at sharing.) But even so, I never feel I accomplish much, which makes day-to-day rather dull. Today I had a thought. The following is a letter to myself, trying to work out why I’ve been thinking about project goals the wrong way.

    Read more…

    — tommie,

    Reverse Engineering an RF Sensor Protocol Checksum

    Update: rtl_433 has merged the patch. See the updated discussion below.

    Read more…

    — tommie,

    Carbon Offsetting

    This post was inspired by this video about the “CO2 train”. How much energy, money and space does it take to offset a household’s CO2 footprint?

    Read more…

    — tommie,

    Life Provides an Empty Meaning Container

    Einzelgänger made a recent video about the meaning of life, through the hands of various philosophers. It starts at Nietzsche and ends with Camus. Sartre and Frankl are in the middle.

    Read more…

    — tommie,

    Post-Causality

    I’m a regular watcher of YouTube videos on various (semi-)educational topics, like How To Cook That, Thunderf00t and many others not relevant to this post. I just now watched Sabine Hossenfelder’s What Problems Could Quantum Computers Solve?. At around P5m50s, there are two images comparing what Pinterest says you will achieve, and what someone actually achieved, following some recipe for buns.

    Read more…

    — tommie,

    Closed-System Consciousness

    Having read Consciousness begins with feeling, not thinking via Hacker News, I wondered…

    Read more…

    — tommie,

    Making It Look Easy

    You: “I built this app that lets you dot your Is and cross your Ts!”

    Read more…

    — tommie,

    Deglobalization

    Work-from-home is the new normal in Canada. Whether that is true or not, I can’t tell, but it made me realize that the deglobalization movement and the work-from-home movement are both instances of decentralization.

    Read more…

    — tommie,

    Greed + Innovation and Inflation

    In the game of economics, I think it’s a good idea to assume all participants are greedy and act in their own interests first. That “own interest” may look altruistic if the participants have Mirror neurons strongly influencing their choices. But in the end, we can only feel what is in our own brains.

    Read more…

    — tommie,

    Changing the Output Voltage of a Cheap Power Supply

    Recently, I found myself wanting to hook up a Bluetooth beacon (a JDY-25M) to a cheap mains power supply module. First time, it went well, and the beacon beaconed. The second time, the thing blew up. Voltage overshoot? Yepp.

    Read more…

    — tommie,

    The Version Control System I Yearn For

    Ever since I left Google two years ago, I have been wondering how to use Git to build a good version control system. Don’t get me wrong; for small codebases, Git is perfectly fine, but when you care about not downloading all code locally, it’s not enough. Perhaps the code size is too large, or access control says someone shouldn’t be able to access some parts. In the end, it feels like Git is the assembly language of a VCS, and we need a BASIC on top of it. That said, whether it is actual Git at the bottom, or some other versioned hierarchical document store doesn’t matter much.

    Read more…

    — tommie,

    Notes on a Property Graph Query Language Parser with Goyacc

    The past week, I implemented pgql-go, a parser and AST definition in Go. When implementing a graph database, picking a query language can be tricky. This research is part of that journey for Itergia Core.

    Read more…

    — tommie,

    Homeopathic Tomato in Cooking

    Homeopathy is surprisingly prevalent in Switzerland. I don’t know how many people actually buy at the stores, but the stores are quite common.

    Read more…

    — tommie,

    Upgrading the NVMe SSD In My Ubuntu 21.10 Laptop (EFI, LVM, LUKS)

    I’ve had far too many close encounters recently… I don’t like living in the danger zone. Ubuntu saying “generating initramfs…”, and df -h / is slowly ticking down below 100 MiB available. All you can do is sit there with the fingers on Ctrl-C, but hope for the best. It’s silly that it takes 1 GiB of free space just to create the initramfs for a kernel upgrade. (Most of the time seems to be spent in zstd compression, so I guess the end product is nicely space-efficient.)

    Read more…

    — tommie,

    Things I Feel Bad About

    Sometimes, I’m overwhelmed by how much crap is going on:

    Read more…

    — tommie,

    Being an Extra Introvert

    I don’t like having to talk to people I don’t know. Not sure exactly why, but I think it’s about the risk of being disappointed with the meeting. There’s nothing better than meeting friends and family and have a good chat, but this seeking out and trembling steps that are needed when meeting a stranger, is just not something I look forward to. Or so I keep telling myself.

    Read more…

    — tommie,

    Replacing My Baratza Virtuoso Coffee Grinder with Eureka Mignon Specialità

    The Virtuoso grinder has served me fairly well for a few years, but ever since I got an espresso machine (a Lelit Victoria), it’s been iffy. Grinding coarse is fine, but for espresso, I need to set the grinder so fine that the stall protection blows every other grind. That requires a reset by twisting the hopper to the coarsest setting and then moving it back. Not ideal when you’re trying to keep precision. On top of that, the steps are too large for the minute adjustments needed, and the ground coffee isn’t particularly uniform. This is well known and why people don’t recommend the Virtuoso for espresso.

    Read more…

    — tommie,

    Reverse Engineering the Galaxy Buds Pro Configuration Protocol

    I purchased a pair of Galaxy Buds Pro last week, and I’m met with some truly horrible distortions listening to speech in a YouTube video. I assumed it was the noise cancelation, so I just wanted to turn that off. Since the Bose headphones not-broken-noise-cancelation firmware update, and some reviews of a buggy Android app, I wasn’t too keen on installing the Samsung app, and let it do a firmware upgrade. Instead, I downloaded the APK and reverse engineered it to build the tommie/pygalaxybuds Python library to interact with the earbuds. It only supports Linux, since it uses PyBluez.

    Read more…

    — tommie,

    Learning From 52 Loaves of Sourdough

    COVID-19 brought with it more time to do slow cooking, and baking. One of the most demanding baking ideas I’ve had is to make sourdough bread. Not demanding in terms of time, but commitment. Like a Tamagochi, this thing needs to be fed and nurtured regularly. Unlike a child or a pet, neither the Tamagochi nor the sourdough will suffer if I neglect them. I’m fairly sure they have no feelings, consciousness or ability to make my life worse.

    Read more…

    — tommie,

    An image shuffle game with VueJS

    Inspired by my wife playing this game, I thought it would be an interesting challenge to use drag-n-drop, and using CSS to split up an image into multiple tiles.

    Read more…

    — tommie,

    Skipping a small instruction when generating machine code

    I just saw a cool optimization by a C compiler. This is assembly for the Freescale HCS08 series.

    Read more…

    — tommie,

    Installing Windows 7 with Intel SRT SSD caching on a Gigabyte GA-Z170N-WiFi

    I got a new gaming computer since the video card on my old one died and it was time to do a full upgrade. This turned out to be an effort spread across several weekends and four re-installations of Windows. It’s finally set up the way I want it. Here is a short build log.

    Read more…

    — tommie,

    C Logical-And With Optimization

    I have been working on refactoring a software called XPPAUT for a while now. Whenever I run it with Valgrind, there is a warning about a conditional based on an uninitialized value. It has been working well anyway, and it is in a part of the code I have not refactored yet, so I have been ignoring it. Today, I got tired of seeing this noise, so took the time to fix it. What I found was surprising, to say the least.

    Read more…