ycitm

Joined 13 years ago

Karma
493
Submissions
46
Member since
Apr 5
[ my public key: https://keybase.io/richardtowers; my proof: https://keybase.io/richardtowers/sigs/M-8IG90NBwlLwpscBH7FdJjkNfov9VkYKP9rR6jHYIQ ]
View on Hacker News

Recent submissions

Comment · 5 months ago
The next sentence in the quote hasn't aged so well - "What weather they shall have is not ours to rule."
Comment · 1 year ago
Comment · 1 year ago
Doesn't seem to be any discernable improvement on the Zoom Cat Lawyer.
Comment · 3 years ago
Comment · 3 years ago
Comment · 3 years ago
I don't think there's any way to do iteration in the type system (other than recursion), so there's no way around it.

I considered forking the compiler to set a deeper limit, but at some point Typescript itself is going to stack overflow. Also that probably goes a bit beyond what Criss is expecting in an interview...

Comment · 3 years ago
I wondered if anyone would spot this :)

There's a recursion depth limit of 500 on the TypeScript compiler, which prevents this solution working for N > 7

Even Aphyr's original Haskell solution only demonstrates N = 6, so in some sense this is an improvement on the state of the art for type-level N Queens solutions /s

Comment · 3 years ago
Comment · 3 years ago
The runes are mostly "just because", but there is a reason.

Ideally, I would have written:

  type Nil = unique symbol
Which would ensure the Nil type wouldn't match with anything but itself. Unfortunately, the compiler doesn't allow unique symbol other than on const variables initialised with Symbol(). So I needed some meaningless symbols.

I could also have done

  type Nil = "nil"
But then it would have looked like the string meant something.
Comment · 9 years ago
Comment · 9 years ago
One of my new years resolutions was to learn to type faster. To get some practice I started taking notes in all the meetings I attend. This wasn't common practice in my team before, but I've found it to be really useful. I've lost track of the number of times someone's said "didn't we talk about this in that meeting a couple of weeks back" and I've been able to point them at my notes.

I've found a really simple way of authoring and sharing notes is to write them in Org mode and then push them to a wiki on github. Github understands how to render Org markup nicely, so you get a nicely formatted wiki pretty much for free.

As an added benefit I can now touch type :)

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton