RSSAmplifier

Blog

Andrea Bergia's Website

Developer, gamer, cat lover, tea addict

andreabergia.comRSS feed ↗25 posts

Latest posts

Billions

One billion is a large number. It's so large, it is mind-boggling impossible to understand for a human. And yet it's a pretty basic number for computers. For example, one day is 86,400 seconds, so one million seconds is roughly 11.6 days. It's quite a bit of time, but it's an understandable amount of time. One billion seconds is crazy though: it is 31.7 years . That is a very long time, enough to…

Links list - 2026-05-10

Hello! After a house-moving-related hiatus, here I am back with a links list issue. Bugs Rust won't catch You probably have seen this one recently as it made the rounds, but if you haven't read it, this is a very interesting article. It describes various vulnerabilities in uutils , the Rust reimplementation of coreutils ( cat , ls , and friends - i.e. the core Unix tools). The interesting thing is…

Links list - 2026-03-06

Hello! I was planning to finish this issue of links list in February, because I have a ton of links saved, but life happened, and now it's already March. Let's get on with it! 🙂 Build your own (LSM) database A fantastic introduction to Log-Structured Merge Tree, the core data structure behind many key-value stores. Outstanding explanation and animations. Really clear and well done. Build Your Own…

PyChat.ai: A live Python REPL with an agentic LLM that edits and evaluates code

I have built something that I believe is pretty interesting: it's a Python REPL that embeds an LLM agentic loop, which has access to the Python environment and can query a value or run code. Here's a screenshot of a simple interaction: I want to stress that this is just a prototype! It supports only one LLM provider (Gemini), the UI is buggy and not particularly pretty, and it is incredibly…

Website Redesign!

Restarting my blog in 2022 was one of the best decisions I have ever made. Since then, I have written almost 60 posts, a few of which have been featured on the front page of Hacker News, and one of which led me directly to my current job , so this has been successful beyond my dreams. Besides that, it put me in contact with a ton of interesting and smart people, led me to my first conference talk…

Links list - 2026-01-01

Hello, and happy new year. Here's the first issue of links list for 2026, with lots of links because hopefully you're still in vacation and you have more time to read! 🙂 What happens if we inline everything? A very fun experiment in pushing the compiler to inline everything , which includes patching LLVM too. A fun read! What Happens If We Inline Everything? You’d expect that everything would…

Turning 40

Today I am turning 40 years old. Which, while not exactly great , is better than the alternative, so kudos to me for still being alive! 🎉 I am a pretty lucky person. I was born in one of the best, richest countries of the world. I feel safe, I have a good job, I am pretty healthy and I have a lovely family. But, for the past couple of months leading up to this milestone, I have spent a lot of…

Links list - 2025-11-28

Hello, and welcome to a new issue of Links list! Lots of articles this time; hopefully some will be interesting to you! Usage of Rust in Android Two related articles: the first, from Google's Security Blog, is a bit more high-level. The second is a paper, and thus more in-depth, with concrete suggestions on "how to adopt Rust in your codebase". The benefits that the Android team saw are fantastic…

RustLab 2025

This week I've had the pleasure of attending and speaking at RustLab , a conference dedicated to Rust in Florence, Italy. Here's the recording of the talk. It was only the second conference I’d ever attended, and the first I’d spoken at, so it was quite a novel experience for me. And I had a lot of fun! The conference was well organized, the venue was great, the pastries for the coffee breaks were…

Useful tools and apps

Today I wanna share with you a list of very useful tools and apps that I use regularly. I'm not going to include very popular things such as neovim , VS Code , Claude Code , or Obsidian , but I'll try to link you to some slightly less known things, hoping you get to discover some useful thing you didn't know! Shell tools eza Let's start simple with eza , a drop-in replacement for ls . Quoting from…

Links list - 2025-09-19

Hello, and welcome to a new issue of Links list! More non-technical links than usual this time. Modern sort algorithms A very interesting comparison between very data-tailored sort algorithm versus modern generic ones. Spoiler: it's almost never worth writing a specific radix-sort, because generic sorts are amazing and tuned so carefully. sort-research-rs/writeup/unreasonable/text.md at main ·…

Pest gotchas

I have been using the Pest parser generator library for Rust recently in a couple of projects, and I want to talk a bit about a couple of things that weren't too obvious for me. Pest has really good documentation in my opinion, so I won't give you a basic tutorial. But, in the interest of making this post understandable even if you don't know much about it, here's an example grammar written with…

Links list - 2025-07-16

Hello, and welcome to a new issue of Links list! Here are some interesting links I've collected recently. Bot or not? An interesting collection of techniques used to detect whether an HTTP request comes from a browser or from a bot. There's a ton of subtle tricks used! A short history of web bots and bot detection techniques · OlegWock Did you know your favorite website can detect when you’re…

Debugging tricks for IntelliJ

I have been using IntelliJ Idea at work for a decade or so by now, and it's been a reliable companion. JetBrains IDEs have a bit of a reputation for being slow, but their feature set is incredible: powerful refactoring tools, a great VCS UI (though I like magit even more!), a huge number of supported frameworks, integration with just about any testing library for any language, code coverage tools,…

Links list - 2025-05-27

Hello, and welcome to a new issue of Links list! It's been a while, so there are a lot of links this time! Hope you enjoy the selection. Pipelining operators An interesting article about the beauty of pipelining, in multiple languages. Pipelining might be my favorite programming language feature Free-standing function call syntax considered kind of suboptimal. Mond · MOND←TECH MAGAZINE Inventing…

Writing C++ in 2025

Spoiler: this is a rant. 😂 I have tried to write a small side project in modern C++ recently. I wanted to have a proper setup with modern tooling and practices, in part because I wanted to see what the state of the art was for C++. So I settled on these tools: compiler: clang ; build system: cmake ; dependencies resolution: conan ; unit test framework: I have adopted catch 2 , because it looked…

Emjay - implementing function calls

In this post, I am following up on the explanation of my simple JIT compiler glorified calculator Emjay and I will show you how I implemented function calls. Why the complexity? Imagine we are JIT-compiling the following program: fn f() { return 1 + g(2); } fn g(x) { return 2 * x; } In the backend, when generating the code for f , we need to insert a call to g . But to do that, we need the address…

Emjay - a simple JIT that does math

Today I wanna show off my most recent little project, called emjay . It's a very simple "language", with an evaluator that generates JIT code and executes it. It does not have a "normal" interpreter, only the JIT compiler. The language is extremely limited, but that was intentional, since I wanted something simple that I could write end-to-end. All the code is written in Rust and it is hosted on…

Links list - 2025-02-09

Hello, and welcome to a new post of Links lists! Hope you enjoy today's selection. 🙂 Mistakes engineers make in large established codebases An interesting article about working in large, legacy codebases - something I have been doing for a living most of my career. All the article is very relatable for me. I especially love this quote: So you should know how to work in the “legacy mess” because…

Crazy debugging stories - Quota

Welcome to a new post in my miniseries about some crazy bugs I've had to investigate and debug throughout my career. Quota This story is from about three years ago, at a previous job . I was involved in doing a lift-and-shift migration from on-prem to Google Cloud of a bespoke system we had built for a large insurance company . The application was a very complicated and interesting distributed…

Crazy debugging stories - Macros

Welcome to the second post of my new miniseries about some of the craziest bugs I've had to investigate and debug throughout my career. Macros This is another story that happened to me when working on a massive C++ code base, around a decade ago. The investigation started when one of our largest customer complained about crashes of our monolith. This was our biggest installation, and for some…

Links list - 2024-03-30

Hello, and welcome to a new issue of my Links lists! I hope you will enjoy today's selection. Code Doing the basic things right A useful post on the importance of doing the basic things of a software project right. The list includes: having an up-to-date readme; have some devs' and users' docs; at all times, the main branch should have all tests passing; there should be a single command for…

Crazy debugging stories - Recursion

Welcome to the first post of my new miniseries, where I'll be sharing some of the most intricate and entertaining bug investigations I've done throughout my career. I hope you find these stories enjoyable! Recursion Over a decade ago, I used to work in a large and crazy C++ code base. The system had a feature that allowed our customers to search for a record based on a referred field's value. For…

Links list - 2024-03-30

Hello, and welcome to a new post of Links lists! I hope you will find today's links interesting. How large is your website? Unsurprisingly, it turns out that many websites are stupidly bloated and large. This is thanks to the ridiculous amount of advertisement, tracking, and all other bullshit that we need to endure in exchange for having tons of content for free. If only the content you pay for…

How is this blog built?

In this post, I want to explain the technologies I use for building this blog. There are never enough technical blogs around, so hopefully it will inspire you to start on your own. ☺️ The website The first decision I made, a long time ago, was that I wanted to write Markdown and not raw HTML (or any sort of non plain-text format). Markdown is fast to write and edit, has enough formatting tools for…