Recent submissions

Comment · 6 years ago
Good point, I should have said TTY driver (all my information is from half-remembered reading of https://www.linusakesson.net/programming/tty/index.php, any mistakes are my own).

With respect to rebinding, what is "stty intr ^D" doing if not rebinding the interrupt character to ^D?

I feel your pain about not having SIGINFO though.

Comment · 6 years ago
The terminal can optionally catch some characters and convert them to signals. By default, ^C sends SIGINT, ^\ sends SIGQUIT, and ^Z sends SIGTSTP. Programs can disable that for their own purposes (stty -isig) and you can rebind them to other characters if you want (stty intr, stty quit, stty susp) but I don't know why anyone would these days.
Comment · 6 years ago
Amiga icons really felt like they were miles ahead of the competition and I'm surprised more of their possibilities didn't take off in other OSes.

- could change the icon for individual files/folders

- could have differently-sized icons

- different icons for unclicked + clicked state

Comment · 6 years ago
Thanks! I'd actually been looking for that software rendering article for a while as well and couldn't find it.
Comment · 6 years ago
Genuine question from someone looking at toying with graphics programming who had never heard of WebGPU before today: does this mean I should hold off on learning WebGL? How different are the two?
Comment · 6 years ago
I didn't appreciate how big of a deal washing machines were until mine broke down and I had to do all my laundry in the bathtub for a couple of weeks waiting for a replacement. Hand-washing is a lot more of a workout than you'd expect, and getting things dry without a spin-cycle afterwards is a pain too.
Comment · 6 years ago
Comment · 6 years ago
There are lots of fun ways to smooth out short-term variation in game randomness. This article shows a few used by various Tetris games, with one of them being your deck-of-cards approach: https://simon.lc/the-history-of-tetris-randomizers

One of my favourite techniques not listed there is weighting the probabilities by distance, so individual outcomes get more likely the longer you've not seen them (making the gamblers' fallacy real, I guess).

Comment · 6 years ago
Comment · 6 years ago
Off topic, but in today's bitter and divided world, it's reassuringly wholesome that people can still get together to recite the alphabet in GitHub comments.
Comment · 6 years ago

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton