Recent submissions

Comment · 1 month ago
Vancouver is in Canada.
Comment · 1 year ago
sysctl vm.overcommit_memory=2. However, programs for *nix-based systems usually expect overcommit to be on, for example, to support fork(). This is a stark contrast with Windows NT model, where an allocation will fail if it doesn't fit in the remaining memory+swap.
Comment · 2 years ago
I was talking specifically about double-precision floats. Single-precision floats can represent every integer up to +-2^24.
Comment · 2 years ago
I have a way simpler explanation. IEEE 754 double can only represent integers up to 2^53 without precision loss, so if you naively average two numbers greater than 2^52, you get an erroneous result.

It just so happens that 2^52 nanoseconds is a little bit over 52 days.

I've seen the same thing with AMD CPUs where they hang after ~1042 days which is 2^53 10-nanosecond intervals.

Comment · 2 years ago
Comment · 2 years ago
Powershell is mostly case-insensitive, and most of the core cmdlets have short aliases. Try `Get-Alias` (or `gal`) to learn more.
Comment · 2 years ago
You can use streaming WALs, like Litestream does. It is a pretty simple way to do incremental backups.
Comment · 2 years ago
Comment · 2 years ago
It really doesn't help that it's written in ancient K&R C, but if you spend ten or so minutes just staring at it, familiar shapes and patterns start to appear. (Give it a try!)

Incidentally, it's in line with how APL code looks like an alien artifact at first, but you get used to it fast if you have spatial reasoning to wrap your head around reshaping and transposing.

Comment · 2 years ago
In datacenters, you're mostly limited by the power (and thus cooling). Most commercial DCs only let you use up to about 10kW per rack. For standard 40U racks it's just 250W/RU, give or take.

There are niche expensive datacenters with higher power density, but as it stands, exotic multi-kW hardware at scale makes sense if you either save a ton on per-node licensing, or you need extreme bandwidth and/or low latency.

Comment · 3 years ago
Zenfone 10 is only marketed as a compact phone. In reality, it is just slightly narrower than a Samsung S23 (146.3 x 70.9 x 7.6).
Comment · 3 years ago
Comment · 3 years ago
>why do we measure time in hours, days, weeks, months, and years rather than in decaseconds, hectoseconds, kiloseconds, megaseconds, etc.?

We don't use them generally because at the time of French Revolution, due to taxes, standardizing the state units of measurement of physical goods was a much more pressing concern than time. (If I were to guess, there were no work hours limits, and thus it just hadn't crossed the popular mind). Weeks were changed to have ten days though.

That's not to say that they hadn't tried: decimal time was mandatory for a few years before they realized that there were too many clocks around, and pushing decimal time can actually turn people hostile against the then-new metric system.

We still kinda sorta use them in form of fractions of Julian days.

Comment · 3 years ago
How long do you keep the transaction logs before rewriting them?

I too had a few EC2 instances go down with signs of being severed from the EBS in the recent couple of weeks; mine were in eu-west.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton