News for hackers. Stuff that matters.

griffindor

Re:Don't YOLO your file system on Saturday March 28, 2026 @04:20AM (#47552630)
I use Nix shells to give it the tools it wants.

If it wants to do system-level tests, then I make sure my project has Qemu-based tests.

Re:Everything old is new again: memory optimization on Friday March 27, 2026 @05:58AM (#47540766)
Nice!

> Peak memory consumption is 1.3 MB. At this point you might want to stop reading and make a guess on how much memory a native code version of the same functionality would use.

I wish I knew the input size when attempting to estimate, but I suppose part of the challenge is also estimating the runtime's startup memory usage too.

> Compute the result into a hash table whose keys are string views, not strings

If the file is mmap'd, and the string view points into that, presumably decent performance depends on the page cache having those strings in RAM. Is that included in the memory usage figures?

Nonetheless, it's a nice optimization that the kernel chooses which hash table keys to keep hot.

The other perspective on this is that we sought out languages like Python/Ruby because the development cost was high, relative to the hardware. Hardware is now more expensive, but development costs are cheaper too.

The take away: expect more push towards efficiency!

Re:Ask HN: Programmable Watches with WiFi? on Tuesday March 10, 2026 @07:42PM (#47330190)
Thanks, that's good to know. I'll adjust expectations for any things I write. I guess I'll have to either very infrequently poll. (I really want to avoid having to write a mobile companion, even though that is a more battery efficient setup).
Re:Ask HN: Programmable Watches with WiFi? on Sunday February 22, 2026 @07:20AM (#47110427)
AsteroidOS, which runs on many Android watches, and offers a Linux environment over SSH and WiFi (for watches that support it). https://asteroidos.org/

The simplest integration is writing a daemon (in the language of your choice) that schedules wakes, syncs, and sends FreeDesktop notifications.

If you want more of a UI, then you'll be writing QtQuick, which is QML/Javascript/C++.

Their best supported watch is the TicWatch Pro: https://asteroidos.org/watches/catfish/