HNHacker News
TopNewBestAskShowJobs

dvratil

482 karma · joined October 17, 2013

me@<username>.cz
submissionscomments
dvratil··on Show HN: Needle2: 14MB agentic LLM for phones, wearables, smart home and robots
Cannot unlock, though:

Prompt: "Unlock my doors"

{ "function_calls": [], "reasoning": "No tool for unlocking or locking door exists. lock_door only performs lock/unlock actions, not unlock.", "confidence": 0.9492 }

dvratil··on The PImpl idiom and the C++26 std:indirect type
I think the parent's point is that we started with raw pointers to implement PIMPL, then we had std::unique_ptr, and now we have std::indirect. So there are now three different ways how PIMPL can be implemented, each has its gotcha's and subtle differences that one needs to keep in mind. In large codebases you will now have to deal with all three solutions being used, depending on how old the code is.
dvratil··on The PImpl idiom and the C++26 std:indirect type
It's often used in libraries where you need to guarantee ABI compatibility. Fixing a bug or implementing a feature may require adding a new member into the class, which would change its size (thus break ABI compatibility). PIMPL is the typical solution here, since the inner/impl class is not part of the public ABI.

I also like to use it sometimes to "hide" private methods and their documentation into PIMPL, so the public header is kept clean.

dvratil··on Every new car sold in the European Union must include a driver monitoring camera
I sometimes wonder how these systems are being tested on the road and whether there's any feedback from the test drivers, or what kind of morons are there saying "this is completely fine, exactly like intended" when they read the feedback...

My car has adaptive cruise control and will automatically adjust speed based on speed limit signs. I was on a highway at 130km/h and the car read a 60km/h speed limit sign that was on an exit shoulder (already separated by a concrete barrier from the highway, so technically a different road altogether) and started breaking really fast - I was pretty close from getting tailgated by the driver behind me, who did not (rightfully) expect me to suddenly start breaking with nothing in front of me. Luckily this can be permanently turned off, so I can continue using cruise control without being afraid of every single speed limit sign.

Recently I had rented a Skoda Karoq (very new one, probably 2024/2025) which adjusted the cruise control speed not even based on signs, but probably based on data from built-in maps? I don't know - but it would randomly decide that I entered a 20km/h zone while driving on a 90km/h road. And this couldn't be turned off. So I just turned off cruise control completely, because wtf, how can anyone think this is improving road safety?

Edit: typo

dvratil··on Bohemia Interactive: Cold War Assault Remastered Source Code on GitHub
I learned HTML thanks to Operation Flashpoint so that I could write mission briefings in the editor...one thing led to another, and I have a successful career as a software developer. Thanks, Bohemia Interactive.
dvratil··on Let's talk about EU Sovereignty (2025)
For me (as an EU citizen), sovereignty is about being independent of companies operating under law that I have no control of (can't vote in the US) and is veeery unpredictible (Trump administration). I don't want to wake up one day I find out my bill tripped because of some tax imposed on EU or completely cut off, because the president woke up in bad mood that morning. EU is very fat from perfect, but for me it is still closer to home, and I truly root for any EU company that tries to take on the US behemoths. I moved everything from GCP and AWS to Hetzner, and am moving from Github to Codeberg.

Unfortunately, it's realty hard. The US giants have offerings that no one in EU has and I am investing huge amounts of time into working around them (e.g. Windows and MacOS CI runners on Github - try to get this for free in EU). I'm fine with paying a bit for this, but even then it's a huge hassle to set it up to be able to get CI checks for my projects on Windows/MacOS. And it's not cheap either. I can afford it, but it is still very expensive.

dvratil··on OpenRouter raises $113M Series B
One thing I haven't seen mentioned here yet and really like about OpenRouter is their openrouter "meta" model, that automatically routes the prompt to an appropriately capable model. Saves me a ton of money on not routing everything through Opus, but not giving me bad results when I ask something more complex, which gets autorouted to Opus.
dvratil··on Rockstar Games Hacked, Hackers Threaten a Massive Data Leak If Not Paid Ransom
Maybe I'm missing something, but how would GTA6 source leak really harm Rockstar? I mean it's unlikely it would be possible to compile a full working game from the leak, and even if so, it's such a non-trivial task, that I don't believe it would hurt sales /that/ much.

The only thing I can imagine is the story would get spoiled on the internet, but that's about it.

dvratil··on LibreOffice and the art of overreacting
Just yesterday I used Jellyfin2Samsung to install Moonlight on my TV. After the installation, the app shown a popup to donate to the author ("buy me a beer"). And I figured why not? The software turned a tedious process into a one-click solution, letting me do what I wanted to do (stream games to my TV) rather than spending an evening messing with Tizen Studio. Absolutely worth a few dollars.

KDE's Plasma will popup a notification every once in a while asking for donation. When you close it, you won't hear from it again until the next fundraiser. I almost always donate as well.

If a software asks in a non-obtrusive way, ideally after I used it (either for a while or like in case of Jellyfin2Samsung after doing the one thing it's supposed to do), I don't mind at all.

I dislike apps (mostly websites) that keep asking for money, regardless of whether you already donated or not every single time you visit them.

dvratil··on Gitas – A tool for Git account switching
I used to have a git post-checkout hook that set the repo identity based on the repo origin url [0] on checkout - maybe there's some post-clone hook these days, but 10 years ago when I wrote it there was only post-checkout hook.

[0] https://www.dvratil.cz/2015/12/git-trick-%23628-automaticall...

dvratil··on The Unix Pipe Card Game
Well, there's a SELinux coloring book - you need to start with SELinux while they are still young! https://people.redhat.com/duffy/selinux/selinux-coloring-boo...
dvratil··on The Dangers of SSL Certificates
Happened on the first day of my first on-call rotation - a cert for one of the key services expired. Autorenew failed, because one of the subdomains on the cert no longer resolved.

The main lesson we took from this was: you absolutely need monitoring for cert expiration, with alert when (valid_to - now) becomes less than typical refresh window.

It's easy to forget this, especially when it's not strictly part of your app, but essential nonetheless.

dvratil··on How SQLite is tested
I believe every sensible open-source developer strives to keep their software performant. To me, a performance regression is a bug like any other and I got and fix it. Sure, there's no warranty guaranteed in the license, yet no-one who takes their project even a little seriously takes it as "I can break this any way I want".
dvratil··on 8M users' AI conversations sold for profit by "privacy" extensions
The question is, does Mozilla rigorously review every single update of every featured extension? Or did they just vet it once, and a malicious developer may now introduce data collection or similar "features" though a minor update of the extension and keep enjoying the "recommended" badge by Mozilla?
dvratil··on Heavy metal is healing teens on the Blackfeet Nation
I always enjoyed being a metal head, the music is the main reason of course (I like it), but the community is a very big aspect of it too.

I always thought about metal shows and festivals as a "safe space", where people can really be themselves, because you don't have to suffer judgmental remarks about what you wear, what you look like or what you listen to. And most people there get this and feel this as well, which is why the community feels so welcoming and chill. Plus as someone else posted here, it's also all a bit silly and I think most people get that as well.

dvratil··on Largest cargo sailboat completes first Atlantic crossing
But that's extra time when the ship is sitting idle, while it could've already been on its way with new cargo, making more money.
dvratil··on Do you know that there is an HTML tables API?
It's not that long ago that tables were the only reliable layout tool for HTML emails (mostly due to Outlook supporting only very limited subset of CSS).
dvratil··on Futurelock: A subtle risk in async Rust
I would guess this is just to make the explanation of the bug easier.

In real world, the futurelock could occur even with very short locks, it just wouldn't be so deterministic. Having a minimal reproducer that you have to run a thousand times and it will maybe futurelock doesn't really make for a good example :)

dvratil··on The QNX Operating System
I was involved in porting some software to Qt back when Photon was deprecated, and I always found the system very interesting. This is the first time I'm actually learning more about its history. Thanks for the great read.

I was also a huge fan of BlackBerry phones (having used Q5 and Z10 as daily drivers). The system was solid and had some really cool ideas. Too bad it didn't work out...

dvratil··on The AI coding trap
It's more about having the LLM give you a plan of what it wants to do and how it wants to do it, rather rhan code. Then you can mold the plan to fit what you really want. Then you ask it to actually start writing code.

Even Claude Code lets you approve each change, but it's already writing code according to a plan that you reviewed and approved.

dvratil··on The repercussions of missing an Ampersand in C++ and Rust
This is my gripe with C++ - I have to have a CI pipeline that runs a job with clang-tidy (which is slow), jobs with asan, memsan and tsan, each running the entire test-suite, and ideally also one job for clang and one for gcc to catch all compiler warnings, then finally a job that produces optimized binaries.

With Rust I have one job that runs tests and another that runs cargo build --release and I'm done...

dvratil··on One-Click RCE in Asus's Preinstalled Driver Software
The problem I found about the adaptors is that you can't charge your phone and listen to music at the same time.

I have an older car with an old stereo where the only external input is via jack. Worked perfectly fine with my old phone. When I got a new Samsung, I went through the hassle of trying several "combined usb-c charger and audio jack adaptor" only to eventually find out they can only work in on mode or the other, not both at the same time. I ended up throwing away my old phone holder and spending even more money on one with built-in wireless charging so I could both listen to a damn music and charge my phone at the same time while driving.

dvratil··on Matt Godbolt sold me on Rust by showing me C++
The one thing that sold me on Rust (going from C++) was that there is a single way errors are propagated: the Result type. No need to bother with exceptions, functions returning bool, functions returning 0 on success, functions returning 0 on error, functions returning -1 on error, functions returning negative errno on error, functions taking optional pointer to bool to indicate error (optionally), functions taking reference to std::error_code to set an error (and having an overload with the same name that throws an exception on error if you forget to pass the std::error_code)...I understand there's 30 years of history, but it still is annoying, that even the standard library is not consistent (or striving for consistency).

Then you top it on with `?` shortcut and the functional interface of Result and suddenly error handling becomes fun and easy to deal with, rather than just "return false" with a "TODO: figure out error handling".

dvratil··on The Beauty of Having a Pi-Hole (2024)
With pi-hole, you can also block telemetry from smart devices (TVs, dish washers and stuff), and if you run it on a VPN that your phone is connected to, you can also block ads and tracking in phone apps.

As mentioned in the article, pi-hole complements a browser ad block, doesn't replace it.

dvratil··on C++26: more constexpr in the standard library
Amazing, now could I just get a way to do asynchronous network requests in two lines of code, like I have with other languages?

Honestly, it seems to me like the committee is constantly chasing the easy bits but is failing to address the bigger issues in the language and, more importantly, the standard library.

dvratil··on Air Con: $1697 for an on/off switch
We installed Daikin AC in our house two years ago. Luckily, those units can be controlled locally (no cloud) via Daikin app (which says is unsupported and I should update to another app, but that one requires creating an account so screw that) and, more importantly, via HomeAssistant. What makes me really sad is that of all the "smart home" appliances we have, the AC is the only one doesn't go through cloud.
dvratil··on Microsoft says Delta's ancient IT explains long outage after CrowdStrike snafu
Windows did not disable the driver because Crowdstrike marked their driver as critical for boot. Had they not done that, Windows would disable the driver automatically.
dvratil··on Arch Linux turns 20: Small, simple, great documentation
What I miss mentioned here is AUR and the fact that almost any software that you can think of is packaged there. You read about some cool software (like git-bug I learned about today here on HN), you do `yay -S cool-software` and it's there. On Ubuntu or Debian? Not so much...
dvratil··on Zeek is now a component of Microsoft Windows
I had a chance to use Bro a few years back in a network traffic analysis software and the code was fairly bad - global states, no multithreading, weird scripting language (because of which everything was dynamically allocated with measurable overhead). We ended up implementing our own traffic analyzer, during which we found that major protocols implementations in Bro had bugs or failed to detect or parse valid traffic.

I hope they got better over the years, if they want to integrate into such major products...

dvratil··on Can I use a system call?
Syscalls are provided by the operating system, it doesn't matter which C library you use. The C library usually just provides a nice API to call the syscall. And it it doesn't, you can still call it directly via syscall(1).
Page 1 of 2Next →