Live data from Hacker News

TypeScript types can run DOOM [video]

youtube.com

91–100 of 391 posts

Re: TypeScript types can run DOOM [video]

#92

I hope he learned something useful while doing it and it seems like he did, because, although regarding all the comments here I'll likely be alone in my assessment, I just see a massive waste of time & effort? He described it as "a brutal year-long journey of 18 hour days" and he didn't bootstrap a company, he wrote Doom in Typescript types...?! The "epic" doom music underlying his story just makes it seem even more…

It is just you, I think.

Recreating the WASM runtime makes you learn a crap ton of useful stuff no matter what you use as your host compiler. In this case, the host being the typescript compiler happens to also add a wow-factor.

Re: TypeScript types can run DOOM [video]

#93
post #88
post #82

Earlier quoted context omitted.

It’s a considerable amount of work for sure, but that alone doesn’t make it impressive. Maybe there were particularly difficult hurdles to overcome that were solved in novel ways? But I don’t see such noteworthy aspects being mentioned in this thread, and it’s not evident at all that there should be any.

Is this your reaction when someone climbs a mountain? "Bipedal locomotion was shown sufficient for climbing mountains centuries ago, given reasonable assumptions about the terrain, why should I be impressed?" Doing things can be difficult and admirable, even if it was confidently believed possible beforehand.

> Is this your reaction when someone climbs a mountain?

My reaction then isn’t “wow, this blows my mind that it’s possible”. The first time someone climbing Mount Everest 72 years ago was impressive and possibly astounding. Nowadays, not really that much.

Re: TypeScript types can run DOOM [video]

#94
post #72

I wonder if there will come a time when the HN audience will stop being amazed that some system is Turing complete, or that any Turing-complete system can run Doom (barring resource constraints). Maybe I’ve just seen it too often. The fact that TypeScript’s type system is Turing-complete was shown back in 2017 [0], and then of course you can run Doom on it. [0] https://github.com/microsoft/TypeScript/issues/14833

There is a big gap between "Turing complete"-able and "real-time, interactive, graphical and performant"-thing.

To be fair, this is graphical, but it's not real-time, not performant, and while it technically takes input, it'll be a while before you see it reflected in the output.

Re: TypeScript types can run DOOM [video]

#96
Throughout the video and while appreciating this unbelievable feat I kept thinking "how could someone have the motivation necessary to tackle such an insurmountable undertaking" ?

And then he said it: "All I wanted was the specific reason DOOM can't run in a type system but every time I hit a roadblock I always came up with some ridiculous workaround. I clung to that belief that it couldn't work and that doubt fuelled me the whole time."

Beautiful. I wonder if I can trick myself to one time attempt the impossible.

Re: TypeScript types can run DOOM [video]

#97
post #89

I wonder if there are any small changes/improvements to TS that would make this orders-of-magnitude more efficient to run? It would be fun to go implement some random TS feature with the secret sneaky goal of making it run Wasm better.

Arithmetics were apparently integrated into TypeScript types for that exact reason:

https://note89.github.io/typescript-typelevel-tic-tac-toe/

Re: TypeScript types can run DOOM [video]

#98

One of the top comments in the video: > If this guy goes for a big tech interview they're still going to ask him how to invert a binary tree The industry's hiring process is so messed up that this is completely believable. "We've decided to prioritize other candidates, as you are strong in the fundamentals but lack the kind of experience in Vue that we're looking for."

Has anybody ever figured out what "invert a binary tree" means? That came from Max Howell, and nobody else seems to have ever received that question.

The best anyone can figure out is that it's reversing the left and right branches, which seems like it's ten lines of code, at most?

Post reply on HN