Skip to main content

Posts

A semantic fuzzer for Obsidian Sync... in spite of Claude

I guided Claude Code to build a fuzzer to find Obsidian Sync bugs. It runs Obsidian instances in containers and makes them edit notes while it cuts their network connection.  And it works: it finds amusingly short sequences of operations that trigger data loss, and that you can verify yourself by running them manually on your own phone and computer. I got a functional prototype in 30h, but the next 30h turned into a painful bug treadmill, where at every turn Claude broke as much as it fixed.  So  I wrote an experience report: what went wrong, why research (and Anthropic's own docs) suggests that this was to be expected, and how to salvage the good bits. I posted the full experience report in Substack ; Blogger is not keeping up with the world. 

In quick praise of Quinn "The Skimo"

Apple is dismal with their documentation, and their Feedback Assistant is a cruel joke and waste of time that makes users and devs work for free for one of the biggest companies in the world – and then ignores them anyway. So when you're diving for information among the layers of deprecated debris, you end up noticing and remembering the rare nice nugget.  I've been noticing the name of Quinn "The Skimo" appearing at the bottom of many random dives, I'd swear since before OS X. And I just found that I'm not the only one remembering him! People in Hacker News also noticed the same .  So, I just wanted to thank you, Quinn "The Skimo"! (Possibly I failed to notice others with less memorable signatures... there's a lesson here)

Introducing DARUM - DAfny Resource Usage Measurement

Warum? Ach, darum! My team at Consensys R&D worked mostly with Dafny , the verification-friendly language. We enjoyed good success with it in our projects during the last few years; our extensive use got us a mention in Rustan Leino's Program Proofs book, and we even got a Best Paper Award in the 2022 edition of the International Conference on Formal Methods for Industrial Critical Systems! Unfortunately, our team at Consensys is no more. So I finished my tool DARUM for a v1.0 release, and this post aims to gather the lose threads and offer an easier entry point for external users.

What kext was that??

MacOS sometimes asks you to accept some system extension / kext. Unfortunately it can be difficult to clarify why, which can be scary. Sometimes you will only get notified that the kext signed by XYZ has been updated, and then it's on you to find out how to relate XYZ to a specific file and functionality in your system. I have found myself in the situation a couple of times, so in case it helps others, here's my notes to connect signers with kexts. BEWARE, just because something is in my list doesn't mean that it's OK in your system; instead, I recommend that (1) you re-confirm my information and then (2) decide if this kext makes sense in your system. If you don't know why you have some kext, maybe you should just remove it.

Lowest-latency Ethernet: Byte-oriented NICs? (deleted from StackOverflow...)

Back in 2017 I had a kinda esoteric question about Ethernet NICs with less-than-frame latency, based on my experience with networking software and hardware, and the evidence for something "atypical" being in use by High Frequency Traders. So I posted my question to Stack Overflow. The question got a lot of pushback, which I found bizarre. It had to be moved across 3 SO sites... and finally it stayed in SO proper, where anyway the only response I got was my own, when some days later I found the necessary information myself. Aaand a couple of years of inactivity later, the question just got deleted. 🤷‍♂️ I thought it was an interesting question (why would I ask it otherwise); it was an interesting collection of pushback; and had an interesting answer. So I saved them and here they are for posterity.

Home Assistant on macOS, the easy way

I almost got put off trying Home Assistant on my Mac because of the complex/useless installation instructions in the docs . For HA-OS, there's no KVM for macOS (you'd have to use QEMU), and VirtualBox is (still?) unavailable for current ARM (Apple Silicon) Macs. And the instructions for HA Core are off-puttingly involved, probably more useful for someone developing HA than for an end user. (... possibly a Python ecosystem-level problem...) Fortunately, it's actually much easier than any of that. I just gave feedback so hopefully it will be fixed in place, but just in case here's my instructions.

Así hace un Valenciano e̶x̶p̶a̶t̶ emigrante una paella con arroz integral

Viviendo fuera de España como expat emigrante es difícil (y caro) encontrar arroz bomba para hacer una paella de verdad. Pero además, si estás intentando reducir hidratos de carbono en tu dieta, el arroz en sí es ya un mal paso. Así que me puse a hacer pruebas para hacer una paella con arroz integral normalucho, del que encuentras en cualquier supermercado. Y lo conseguí. Resulta que no es tan difícil, así que me pregunto por qué cuando empecé a buscar cómo hacerlo no encontré nada al respecto – aunque sí que encontré marcianadas como usar "arroz de coliflor" o arroz arborio.  Curiosamente, los que hacen cosas así suelen ser de fuera de España, así que supongo que nunca han probado una paella de verdad y les da igual acabar con un risotto amarillo. ¿O quizás es que los influencers no tienen paladar? Pero yo nací y crecí entre Alicante y Valencia, así que no puedo aguantar algo así. Y más cuando la morriña ataca. En fin, al grano. A mí me ha funcionado con paella y con arroz...

A script to announce new chat messages in Zoom

Available at https://github.com/hmijail/announce-zoom-chat-messages . It's so disheartening to see AppleScript to stay so ... unloved. It was never easy to deal with it, enough so that I decided this time to force myself to get into the newish JavaScript syntax. And yes, that eases the syntax; but the whole ecosystem feels so devolved since the last time I used it. Even Apple's own Accessibility Inspector has lost capabilities. osacompile works but the resulting app does something different. I didn't try looking for new Scripting Additions, and in fact it wasn't needed; good old System Events was enough. But, gosh... even Smile was last released on 2013 . I wonder how would I do something like this announcer without AppleScript. What do Windows users do? Well, who cares for Windows ;P, what do Linux users do? Maybe next time I'll have to research it.

Bluetooth audio latency, codecs, when does it matter

These are some random-ish observations regarding Bluetooth audio latency vs "codecs". This started life as a long comment trying to untangle a messy thread in Wirecutter's review of bluetooth speakers, but since it covers a lot of things that I periodically forget about, I'll have it now as a refresher for myself next time I'm checking BT headphones. A couple of pre-clarifications: Different people measure different things, sometimes without even realizing, so it's important to make sure that one understands what a number means. Algorithmic delay? Hardware (+firmware) implementation? Hardware + software? Which software: OS + encoding + decoding, or just the OS piping things around? Is there some app involved? Each layer not only adds delay (lag, latency), but also variation (jitter).

YOU could have invented the LMAX Disruptor... if only you were limited enough!

This is about a shocking realization I got while learning about the LMAX Disruptor – a data structure / architecture that got published in 2011 and made some waves across the web because it allowed LMAX to process +6M transactions per second on a single thread. In Java. Which was interesting because Java was (still?) supposed to be too slow for that kind of thing. By then I was already a couple of years out of the Java world and getting into embedded C, so I took a mental note to look into it just out of curiosity. But, as could be expected, the note was promptly forgotten. I'm now looking again into Java, so finally I managed to take a peek at the Disruptor. Shock: this is just a description of what I was implementing in C while I was still learning it! But it's not that I'm a genius; it's that this is probably the only way to do things when in a limited environment. In fact, the basic architecture is the one used typically in drivers and in Linux's NAPI networ...

Macbook 2013 vs 80 MHz WiFi channels

I found that the WiFi on my MacBook Pro (late-2013) works slowly on 5 GHz / 80 MHz channels (topping out at about 30 Mbps). Enough so that it's at least 3x faster when connected to the 2.4 GHz band in the same router (and I say at least because I can't measure any higher). So, if your router works in the 2 bands and your Mac is switching between them transparently (as it usually does, which usually is advantageous), then you would be seeing big, mysterious changes in speed.

CrashPlan complaints

After a couple of months using CrashPlan I wrote about its awkward feature set and their interactions . The awkwardness didn't negate that it seemed to work well enough, better than the alternatives I tried at the moment. Still, it was also bad enough that it motivated me to keep my TimeMachine local backup, even though my earlier idea was to get rid of it. 8 months later, I'm fed up enough with CrashPlan to start looking for alternatives. This is a list of my problems with it, which are the things I would have liked to realize earlier. All of these complaints have been brought up with their Support, even explicitly as feature requests and/or bug reports, and the eventual answers have not been particularly helpful nor encouraging; in the best cases Support just provided workarounds to suspend the pain for a while.

CrashPlan limitations

After a few weeks using CrashPlan PRO for small business (not the free tier!) I tried contacting support to ask how to do some underexplained things, and/or to open some bug reports/feature requests. Like: How to know which were the last backed-up files? or, when was a file last backed up? (maybe some useless-but-frequently-updated file is slowing down backups of bigger and more important files?) The app defines backup sets, but they don't seem to correspond to "restore sets". How to restore a particular set? Support's answers were pretty underwhelming, bordering on canned-responses; but I found that Code42, the makers of CrashPlan, have an API to access the backup data. So I browsed a bit to see whether it'd be easy to do myself what I wanted.

Review of air purifier Prem-i-Air Invierno and air analyzer AirVisual Node

Living in Warsaw, I got tired of worrying about the air quality – which some days during winter got reported as worse than that of infamously polluted Beijing. So some months ago I bought an air purifier. I had a number of doubts about how to use it so it was effective: does it have to work all day? The purifier's power level depends on the room's size, how do I know that it's working as it should? Air quality sensors included in these purifiers are said to be pretty unreliable, are they any useful at all? How does air quality indoors correlate to air quality reported by an official station about 1 km away from home – which daily recommended wearing a mask during winter!? What happens if I just leave the windows closed, or if I open them for a while? ... So I bit the bullet and bought an air quality sensor, which cost almost as much as the purifier itself. And these are my results and tips for anyone thinking about doing the same.

User-site-installed python packages, and PATH modification

Python makes it apparently easy to install packages. Just use pip , or any of the other more-or-less old and deprecated ways to install them, right? (heh) The first difficulty is that maybe your system's Python needs sudo to install those packages, and you don't want (or even can't) use it. The definitive solution is to use virtual environments, but that can feel like going too far in the "local" direction. You might just want to have something at the user level, without having the risks of using sudo , but still global for everything that the user does. Well, turns out that PEP 370 allows you to have user-local installs of packages. You're supposed to run pip --user install whatever . But now you have to remember to always use the --user flag! Kinda breaks the purpose of having something "global for everything that the user does".

Installing Ubuntu 16.04's friends into an iBook G4 with a USB pendrive

I had an old iBook G4 that could be useful for an elderly person, to be able to do her banking and basic internet browsing without having to use an XP-vintage, molasses-slow, honeypot-aspiring PC. There's a reasonably complete and up-to-date guide in https://ricanlinux.blogspot.com/2015/03/ubuntu-mate-on-my-ibook-g4.html . I had to change a couple of details; and there are a couple of practical considerations to be had. (Note to self: "lightness" in Linux rather correlates to "barebones" [3] , which correlates with "hardcore" (text configs, mailing list scouring, lots of googling). Next time I'll be trying a heavy-weight distro for this kind of thing; better slow-but-useable than less-slow-but-WTF.)

Grand Central Dispatch for Android?

(Sometimes after a couple of hours of research, the result is a dead-end or needs further digesting. Still, such a result might itself still be worth remembering. This is a Quick&Dirty report of one of those cases.) GCD is an implementation of thread pools / queueing (+ event management (sockets, files), etc) by Apple for Mac OS X / iOS. It was open-sourced, and FreeBSD got an implementation. They are practically an abstraction and simplification over pthreads (+ events, etc), and the GCD implementation includes some kernel and compiler changes (workqueues and blocks, respectively). Implementation details at http://newosxbook.com/articles/GCD.html . It's well performing and seemingly can help simplifying a lot. What if one wanted to use GCD in Android? Is there anything compatible enough and that could be used at the C level?

Cocinando con citrato sódico casero

Parece ser que un ingrediente típico para la "cocina molecular" de Ferrán Adriá y compañía es el citrato sódico, que se usa por ejemplo para esferificaciones, caviar de frutas y cosas así. Pero también se usa para algo mucho más simple y usable en casa en el día a día: ¡queso fundido!, que queda genial para salsas, dips, incluso fondues. ¿Pero cuál es el problema? Fundir queso es fácil, ¿no? En realidad, no. Prueba a fundir un taco de 100 gramos de queso normal y verás que el resultado es casi para tirar a la basura: un charco de aceite por un lado, una especie de trapo gomoso por otro. Esto lo podemos salvar con citrato sódico.

GitFlow (and friends) with remotes: avoid the busywork

If your local feature branch tracks origin/feature , you are probably working extra, no matter your flow . There are lots of places online where one can learn about GitFlow, but it's seemingly always discussed in a local way; the details, subtle or not, about using GitFlow when you are pushing and pulling your changes through the network are never mentioned. Now, GitFlow is a bit long on the teeth, and some of the younger and simpler alternatives do take into consideration things as Pull (or Merge) Requests; lately some even want the original GitFlow to be considered harmful . But still, there's a common basic concept in GitFlow and the alternatives, which is local feature branches. How and when exactly to merge them back into a development branch is one of the big differences, but is rarely detailed. The goal of this post is to gather some tips on how to keep developing in the local feature branch while staying involved on a lively repository; and how to make easier t...