LLM as a compiler

Recently I have been using LLMs to explore different ideas related to syncing two nodes. I wanted to see how far I could take the setsum idea. The first tries last year was fraught with disappointing. The LLMs needed a lot of hand-holding to get things into shape. Eventually I settled on a stable foundation (tests) and code base and that made it easier to iterate on performance improvements. This resulted in a 10x speedup compared to the initial version. ...

March 29, 2026

Learning python

My son (12 years old) recently started getting interested in programming. They had been working with the Micro:bit in school and he was playing around with it at home with an emulator on his laptop. The machine is not very powerful and he soon ran into problems with the code size. We started talking about Python and he was very interesting in learning more, so we spent an afternoon one weekend going over the basics. Then I thought it would be much nicer if things were more visual. There is always pygame, but I wanted something a bit more tangible. I remembered that raspberry pi has some small screens that can be bought relatively cheap, so I ordered a Raspberry Pi Pico with a Pico Display Pack 2.0. ...

December 9, 2024

Distributed findings

Recently I stumpled upon two interesting projects that I thought was worth sharing. The first is Reticulum, an encrypted network that allows one two create adhoc private mesh networks over both internet and wireless links. The second is the Eg-walker paper detailing an efficient crdt algorithm for text. What I found interesting is that some of the algorithms seems more general and this might be applicable in other situations with concurrency. The paper also details a lot of tricks used to spead an the implementation. The paper is based on diamond types, so more a write up of an existing system rather than a new algorithm that is not really used anywhere yet. ...

October 11, 2024

SQL links

SQL sometimes feel a bit like black magic. How the query engine figures out what plan to execute, why is this query slow etc. The best resource I have come across is the book Indexing beyond the basics. Its available as a PDF download or for reading online. It gives a bit of easy to remember theory and lots of great examples. Some more random links I stumples upon recently: ...

January 2, 2024

A work diary

Acording to wikipedia, diaries are almost 2000 years old. And they still work just as well today! At work I have been keeping a simple diary in the form of a giant org document. It's a practice I have been doing for 9 years and would not be without. While org mode can do a million things, I almost use none of the functionality. Instead the main function I use is the ability to search anything instantly. I use it as for todos, for saving SQL queries, code snippets, for links and in general for things I need to find again. I have a key binding to enable F9 to insert the current date and then I use tags to split things into topics. ...

January 2, 2024

Raspberry pi music player

Ever since the raspberry pi zero 2 was released I knew it would be good as a always on machine at home. It uses around 0.4Wh idle power which amounts to around 5kWh per year at 0.6 Wh average. Or 1-2 euros and around 500g co2 per year. I have been digitizing my music collection. I do still enjoy and mostly listen to full albums and having the ability to listen to any of hundreds of those with a click is amazing. I still keep my CDs around, they look like this: ...

February 13, 2023

P2P applications

User autonomy is at the heart of P2P applications. This means that the data should be written locally first and later exchanged with peers. For this data to be safely exchanged, the data should be signed by a key in the users control and ideally be encrypted as well. The aggregate data is what makes up a full application. There is no single source of truth as in a centralized application instead this concept is fluid and changes over time as the application grows. ...

November 26, 2021

Butts in the Browser Fosdem talk

Over the weekend I gave a talk on running secure scuttlebutt directly in the browser. The talk gives an overview of ssb in general, how it is different from federated services. It touches on some of the work we have been doing for a European NGI pointer grant including jitdb. The browser app uses local storage, indexed db and Chrome FS. WASM for crypto and web sockets for communication with other nodes. Slides are available here and video available here. ...

February 7, 2021

GITEA and cors

I was looking to use git as a storage backend for a project I was working on, as one can run git in the browser now using isomorphic git. The app needed to run from my machine directly for easier development, which meant that the remote git backend has to support CORS. Luckily the gitea project allows one to quite easily host your own git reposities with an interface very similar to github. ...

April 28, 2020

How to setup a PUB for SSB browser

SSB-browser as mentioned in my last blog post runs a SSB client in the browser. In order to communicate with other peer it needs a pub to relay messages through. Furthermore the pub acts as a super node allowing the browser peer to do partial replication without necessarily needing to store the full feeds of peers. We don't really gain very much compared to the classical client-server setup if we rely too much on especially a single pub. The browser client can of course run fully off-line, but still when it needs to communicate messages with other peers it needs some intermediary. ...

March 4, 2020