Recent submissions

Comment · 8 months ago
What do you mean, "the OS as a whole"? This is the OS!
Comment · 1 year ago
In addition to sibling commenter, niri exposes everything over an IPC accessible via its cli (or a socket), so if you wanted, say, a keybind to switch to your terminal, no matter where it is, you could bind it to this:

  niri msg action focus-window --id $(niri msg --json windows | jq '.[] | select(.app_id=="foot") | .id')
Comment · 1 year ago
I don't think it's particularly useful to think of unit as an empty tuple specifically, that is just an arbitrary but convenient definition for it.

Really a unit type is just one that contains only a single value. This is a unit in the same way that 1 is a unit for the integers. With some hand waving it is an identity for product types, for example (int, ()) is the "same" (xxxmorphic yada yada) as int

Comment · 2 years ago
X does, you can use xrandr --setmonitor.

For example, splitting a 5120x1440 monitor into three:

  xrandr --setmonitor DisplayPort-0-0 1280/297x1440/340+0+0 none
  xrandr --setmonitor DisplayPort-0-1 2560/595x1440/340+1280+0 none
  xrandr --setmonitor DisplayPort-0-2 1280/297x1440/340+3840+0 none
Comment · 3 years ago
Comment · 3 years ago
Emmett's
Comment · 3 years ago
Comment · 5 years ago
2 is prime
Comment · 5 years ago
Comment · 5 years ago
All the jokes about launching rockets in the "what is a monad" articles are finally coming true!
Comment · 5 years ago
Comment · 5 years ago
The article mentions unions vs discriminated unions and then mentions nesting nullable being different than nesting optional, but it doesn't really tie the knot.

Imagine (sorry for pseudocode):

  type Option T = Some T | None
  type Nullable T = T | null
The difference here is that Option "tags" each part of its union, which guarantees that the parts are disjoint. In Nullable, the parts of the union are disjoint only if T is not itself nullable. If T is S | null, Nullable T is S | null | null, which is just S | null (since null and null are not disjoint.
Comment · 6 years ago
Comment · 6 years ago
> Remote Desktop in Windows, for example, feels laggy even on LAN

I'm not convinced by this, because RDP feels laggy even remoting to a vm on the same machine

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton