Live data from Hacker News

TypeScript types can run DOOM [video]

youtube.com

321–330 of 391 posts

Re: TypeScript types can run DOOM [video]

#321

What are the minimum system requirements in order to run this at 30fps?

it was done on an 13900k system with 128gb ram. I bet the performance would be very different on other systems. and by my calculations the next frame would only take like maybe an hour or so to render. so that means that actually, hilariously, if anyone wanted to really dig in and make the engine faster - which I suspect it can be done by multiple orders of magnitude, truly - then actually I'd say 30fps types-only-doom is possible in the next maybe year or two. the TAS-style keyboard controls will work, but one problem is definitely going to be "how do you refresh a screen" which is a problem I didn't attempt to tackle other than to say you could (with what I already built) just hover your mouse over another type that contains the information for frame 2.

Re: TypeScript types can run DOOM [video]

#323

I'm sorry to rain on this parade, but I fail to see the merit of spending so much effort - and writing so much code, generating so much data, working 18hr days etc. - to render Doom in TypeScript type-checker. I mean, there all sorts of feats and achievements one could choose as one's goal, which would also be impressive, but would be more useful to users and/or software developers, than this. I'm just thinking of al…

hi! author here! this doesn't rain on my parade at all! actually I really appreciate what you're saying, so thanks for saying it!

until yesterday, I did this whole thing in isolation (aside from a few of my close friends in a then-private-now-public discord channel patting me on the back every few days when I'd get stuck with no idea how to get unstuck). I realize that what I'm going to say next will be alarming to some people, but as nice as it is to hear all these wonderful just super heartwarming things from people over the last day (thank you!!) I have a kind of brain that would have been roughly equally satisfied if after completing it, I closed VS Code and never mentioned it to anyone again. For a different example, I used to spend most of my time making music and being in many bands and whatnot and I have, not exaggerating, like 200 hours of unreleased finished music - some even with album art (back when we had CDs haha). Probably 50 hours no one but me has ever heard and 50 hours only my wife has heard in the background while I worked on it and the rest just close friends. But when my close friends urge me to just release it... I just.... why? I do really really love to share, and I have (all the MiTS music https://soundcloud.com/michigan-typescript is open source with the BitWig sets available https://github.com/michigantypescript/music), but it honestly doesn't bring me a lot of satisfaction. Creating though... just simply creating and learning how to do new things brings me just a tsunami of satisfaction. I don't know how else to explain it. I'm just wired this way. I can't help it. It's like breathing. If I am lucky enough to grow old, I'm gonna be the grandpa in his basement with all the oscilloscopes trying to fix a Ham radio, even though I have no purpose for fixing it. I can tell you already.

That said, I'm relived to say that when it comes to this Doom project I learned SO SO SO many things that have been VERY VERY directly applicable to my career as a software engineer. In that way, ALONE, it was worth the effort. It's like multiple times per week that I'm able to help or contribute to something at my company with my team that was a skill I picked up on this project.

I've contributed quite a lot over my career to FOSS and I can tell you that many of the most useful contributions really started in really strange places with strange motivations. What's beautiful is that none of that matters to the user - they see functions and functionality and never know what's behind the curtain for why someone was motivated enough to really make it happen.

So to cap it off, I'd say, that actually what you're seeing in this Doom project is literally the best possible path to get what you say you want. There's nothing commercial about this, but if it gets people excited and gives people energy and capabilities to contribute to FOSS (even if it's just me, the author) - then now yer' cookin with gas.

Re: TypeScript types can run DOOM [video]

#324
post #307
post #262

These typescript fanatics never fail to make me feel disgusted by what they've done...

People who downvote me clearly lack any sense of humour.

it's just so hard to tell sometimes - but thank you for clarifying that you meant it in a jokey way!

Re: TypeScript types can run DOOM [video]

#325

imagine how amazing it would be if every major browser tomorrow suddenly dropped support for JS entirely and said that they only run typescript now. It will be a hard but absolutely mind blowing transition

I think that would be a big loss for TypeScript and a very unfortunate thing for the whole ecosystem.

Re: TypeScript types can run DOOM [video]

#327
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…

Yeah I worked out the "N days without sleep" was mostly rubbish too.

I personally went for 3 days without any sleep in the army as part of a sleep deprivation exercise and it was one of the most brutal things I've ever done, I fell asleep standing up whilst digging a trench, ouch.

So I know when people say "I literally haven't slept in 6 days", they very much don't mean literally, they normally mean they went to bed and had a few hours of sleep per night.

Re: TypeScript types can run DOOM [video]

#328

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!!)

I work with a couple type-dense libraries: Elysia and Kysely. Kysely holds up remarkably well. Elysia... Well...

Elysia is a backend framework like express. As you construct your routes — annotating the input structure and return types, it constructs a HUGE MEGA TYPE, that you can then use with a thin query client:

https://elysiajs.com/eden/overview

If I recall, the query client uses proxies. I did something similar before, this one is a much smaller codebase:

https://github.com/boehs/ajar

But as you can imagine, typescript does begin to lag when your routes enter the hundreds

Re: TypeScript types can run DOOM [video]

#329

"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…

One of the things I like to mention to younger devs, when I pull out a solution that they think is from thin air, is that I have failed far more often then they have. I just have a good memory on how to fix my mistakes.

Re: TypeScript types can run DOOM [video]

#330
post #191

I am at the same time both amazed and utterly unsurprised that this was possible, given all the hullaballoo about TypeScript's type system being Turing complete. Having the grit to actually go through with it though? Bravo.

I have seen papers saying at least Java and Python type systems are turing complete. I wouldn't surprised if all type systems are turing complete

No, good language designers take care that their type system is not Turing complete.
Post reply on HN