Live data from Hacker News

TypeScript types can run DOOM [video]

youtube.com

311–320 of 391 posts

Re: TypeScript types can run DOOM [video]

#311

"But I'm not one of those fancy 10x developers. Instead of a master of craftsmanship, I'm more a master of close-enough-manship" I definitely relate to this comment. and he also says "It was a brutal year long journey of 18 hour days" I think people are looking for those unicorn 10x devs that are like Good Will Hunting for code, but forget that there are those devs that might not get things right away but never stop…

I agree with you, and with the comment but.. Come on, this guy is not THAT type of guy

Re: TypeScript types can run DOOM [video]

#312

"But I'm not one of those fancy 10x developers. Instead of a master of craftsmanship, I'm more a master of close-enough-manship" I definitely relate to this comment. and he also says "It was a brutal year long journey of 18 hour days" I think people are looking for those unicorn 10x devs that are like Good Will Hunting for code, but forget that there are those devs that might not get things right away but never stop…

I can also relate - I'm a tech lead, and it just also happens to be I find programming to be an enjoyable puzzle. When my wife sticks on some TV, I'll usually scratch an itch with some problem I've spotted, or some improvement that can be made - most of our docker build time improvements are me trying out different things and finding what works - same with little QoL features.

Props to the dev of this project though - in some ways this kind of project is one of those 'magnum opus' things - not many people might know or care about it, but it's actually something to be proud of achieving.

Re: TypeScript types can run DOOM [video]

#313
post #179

> "It was a brutal year long journey of 18 hour days" [to run doom in TypeScript types] This is some serious dedication for what at first blush may sound to many to be a completely unserious, or even useless, achievement. But I say to those people: a DOOM proof is just as worthy of praise as any other academic mathematical proof, and has the advantage of being verifiable by laymen. Congrats on this amazing achievemen…

I don't thinks statements like this are meant to be read literally in American English. IE US English speakers always fond of telling me how they work X hours in a day, or they went N days without sleep. Which used to really impress me, until I realised "wait... do they just exaggerate as matter of course"? And then I realised - of course they do; these are people for whom every purchase is an "upgrade"; where a bicy…

> I don't thinks statements like this are meant to be read literally in American English.

I don't know, when I got hyperfocused on a side-project a few years ago, I was dedicating almost all my awake time to it. 12+ hours a day, every day, including weekends, for months.

Surprisingly, I didn't burn out. I was just so interested in it, I couldn't stop, and even started neglecting other things to work more on it.

I never hit such a focus state since that time in 2017~2018.

Re: TypeScript types can run DOOM [video]

#314
post #179

> "It was a brutal year long journey of 18 hour days" [to run doom in TypeScript types] This is some serious dedication for what at first blush may sound to many to be a completely unserious, or even useless, achievement. But I say to those people: a DOOM proof is just as worthy of praise as any other academic mathematical proof, and has the advantage of being verifiable by laymen. Congrats on this amazing achievemen…

I don't thinks statements like this are meant to be read literally in American English. IE US English speakers always fond of telling me how they work X hours in a day, or they went N days without sleep. Which used to really impress me, until I realised "wait... do they just exaggerate as matter of course"? And then I realised - of course they do; these are people for whom every purchase is an "upgrade"; where a bicy…

I think you are confusing hyperbole with poetic license, and overstating the effects it has on English vernacular. I am not American, but I wouldn't go around minimizing how industrious the "great society" is.

Re: TypeScript types can run DOOM [video]

#315
post #55
post #34

Earlier quoted context omitted.

For the first frame...

I think that 177 TB is for the whole shebang, it's just that it took 12 days to render the first frame.

both this and parent comment are right! once you have the first frame, it's probably just a few hundred more megabytes to get the second one - although I won't be the one to find out! 1 is enough for for me!

Re: TypeScript types can run DOOM [video]

#316
post #251

Earlier quoted context omitted.

(author here) _yes I realize how ridiculous what I'm about to say is considering the project I just shared_ but I actually strongly disagree, haahah. there's this thing I learned of called "the turing tarpit". my position is that just because something could theoretically be done with infinite time and infinite resources, doesn't mean you can even approach the throne of doing it for real in a human lifetime. And if I…

> And if I'm just totally wrong on this, then you have your answer on why I never gave up on this project. I never once, ever, at any point, lost hope that it wouldn't work (HOW COULD IT?!).... right up until the very instant when I couldn't deny it anymore and it was on the screen in front of me. Has this experience changed your way of thinking at all? It sounds like the thing people thought was possible actually wa…

I hope this doesn't come off wrong like but honestly - but the outcome on this project doesn't change my view one bit. it didn't make me dig in my heels either, but I strongly doubt it's possible in a human lifetime to do this with at least some of the other languages that have type systems that are considered Turing complete.

Re: TypeScript types can run DOOM [video]

#317
post #145
post #106

Earlier quoted context omitted.

leetcode seems to agree with your definition [0]. the meme isn't to say that inverting a binary tree is particularly difficult - anyone familiar with coding challenges and trees could trivially produce a solution. the meme is more pointing out how ludicrous it is that senior/staff/principal interviews can hinge on these types of problems, despite the engineer proving their proficiency by doing something like running…

I think those challenges (especially leetcode) are heavily misused. When my team conducts technical interviews, we are asking for a couple simple programming solutions - but we're asking because we want to hear the candidate talk through it and see what their problem solving process is like. If you aren't evaluating based on conditions like those, I don't really see the value of coding questions.

Our technical questions typically stay within the realm of the position we are hiring for, so technical usually revolves around “would you use X or Y in this scenario? Why?”

Understanding how someone thinks is more core to evaluating candidates, so questions like “let’s say you own a window washing company and you’ve been hired to wash every window on every skyscraper in New York City - how do you do it?” provide a much better insight into how someone goes about approaching a challenge.

A coworker has a simple diagram they use outlining a tech stack: backend, cache, frontend, and they give a brief overview of the “application.” Then they explain that there’s a big report that “customer says X isn’t working - how would approach fixing this?” It’s less technical on details and more about again how they would approach finding the issue.

Re: TypeScript types can run DOOM [video]

#318

Wow. I still don't quite understand what it means to run Doom in the type system. I can sort of get how you might trick it into doing some calculations and generating some ASCII art. But how do you get tsc to access the audio system or load files etc?

I don't think it's actually playing audio or loading files. The required game data (.WAD) was presumably pre-transformed into the encoding that the virtual machine uses for data and passed to the program as type-level "input". Edit: Playing music isn't really relevant here anyway given that it took 17 days to load the level and display the first frame, and that's as far as the author took it. He says that subsequent…

no audio - correct. technically, in a certain sense, the first frame will contain only one sample of audio, and I did consider that, but a single impulse is the definition of "juice wasn't worth the squeeze", haha.

re the .WAD - the types-only-wasm-engine doesn't know anything at all about Doom (it only knows about what to do with WebAssembly) so actually the .wad is embedded in the WebAssembly exactly like you see in any regular WebAssembly Doom project (e.g. https://diekmann.github.io/wasm-fizzbuzz/doom). There's more to say about what "the WAD" means in this case, because it's a very minimal WAD - but it's all open source and I'll be explaining that in great depth soon!

Re: TypeScript types can run DOOM [video]

#319

Earlier quoted context omitted.

But in this case he kind of did anyway (at least the video makes reference to "L1 Instructions Cache").

But that's all CPU -- he doesn't have to emulate the rest of the computer (video card, IO systems, etc). You provide WASM with your own interface to the outside world.

(not arguing, really just want to hear your thoughts to this!) so re: video card - but I did write what I don't know what else to call other than "a graphics driver" (i.e. it takes Doom palette pixel values and converts them to something the user sees on their screen with ASCII art). what else would you call that? or are you saying video card would have to be at the level of VSCode or my operating system that actually lights up physical pixels on my screen.

Re: TypeScript types can run DOOM [video]

#320

Out of curiosity, could the learnings/toolings from this project have real improvements to more "practical" TypeScript?

yes! I completely skipped over it in the video for time, but the performance benchmarking tooling I had to make to is something everyone can benefit from, and I'm excited to find someone that sees how big it'd be for the TypeScript world if we can extract some of that (I'll need help!!)
Post reply on HN