[HN Gopher] TypeScript types can run DOOM [video]
       ___________________________________________________________________
        
       TypeScript types can run DOOM [video]
        
       Author : franky47
       Score  : 699 points
       Date   : 2025-02-26 15:05 UTC (7 hours ago)
        
 (HTM) web link (www.youtube.com)
 (TXT) w3m dump (www.youtube.com)
        
       | goodoldneon wrote:
       | To be clear, it's running in TypeScript types only -- not
       | JavaScript. Absolutely insane
        
       | joshuakgoldberg wrote:
       | Nothing will ever top this for typescript types. This is the
       | pinnacle. An entire virtual machine and system memory with
       | garbage collector in types.
       | 
       | Turing Completeness is one level, but being able to run Doom is
       | the real test of whether a programming environment is complete
       | and robust. Absolutely stunning to see TypeScript's type system
       | get there.
        
         | pcthrowaway wrote:
         | Well we haven't implemented a web browser capable of running
         | javascript in the typescript type system yet.
         | 
         | Quick, someone tell this author it's not possible.
        
           | orangecat wrote:
           | Doom is Turing complete (https://calabi-
           | yau.space/blog/doom.html), so it's just a matter of building
           | the appropriate map.
        
             | pcthrowaway wrote:
             | That's not really relevant. Turing complete languages are
             | used to build Doom and Pong, but one is more impressive
             | than the other.
        
               | Jolter wrote:
               | Pong was (originally) built using transistor-transistor
               | logic on a circuit board. AFAIK it did not involve any
               | software at all.
        
             | dimitropoulos wrote:
             | (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'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.
        
               | orangecat wrote:
               | Of course you're right, and I should have put quotes
               | around "just". It would be amusing to calculate how long
               | it would take to render the Google home page via Doom via
               | TypeScript; I'd guess much longer than the age of the
               | universe.
        
               | scotty79 wrote:
               | Off topic, but as an obsessive debugger and experimenter
               | with ADHD and someone who hates telling people lies about
               | what can and can't be done your motivation speaks to my
               | soul. But my usual rabbit holes last just few hours up to
               | few days. And even those that go far (that avoided all
               | obstacles) end up right before implementing the last
               | step, when it becomes obvious to me that this thing can
               | be done. Congrats on the sheer stamina.
               | 
               | I might use lesson you provided in my future to actually
               | achieve something. I just need to doubt the feasibility
               | of even the last step.
        
           | acchow wrote:
           | It looks like they built a WASM runtime in the TS type
           | system. Implement some more OS calls and you should be able
           | to get a browser running. And then WASM on WASM on TS types.
           | Lol
        
           | brundolf wrote:
           | I for one would like to see TypeScript's type inference be
           | self-hosted
        
             | phpnode wrote:
             | You're in luck! https://github.com/ronami/HypeScript
        
         | aylmao wrote:
         | Not unless someone ports typescript to typescript types. That
         | would be some next-level self-hosting haha
        
       | Rzor wrote:
       | If there's one top story HN deserves today, it has to be this.
       | Absolutely insane and incredibly inspirational.
        
         | karmakaze wrote:
         | My literal LOL of the month. Love the types scale
         | graphics/animation. :mind-blown:
        
       | sangeeth96 wrote:
       | Blew my mind! Dimitri talks about it in the video but I love the
       | mention of how this project came to be[0]:
       | 
       | > This engine was built to service a project that aimed to
       | demonstrate why Doom can't run in TypeScript types. Well. The
       | funny thing is.. It can.
       | 
       | [0]: https://github.com/MichiganTypeScript/typescript-types-
       | only-...
        
       | acemarke wrote:
       | I got to watch Dimitri posting internal updates about his
       | progress on this, and it has been utterly mindblowing. This is
       | genuinely one of the most amazing things I've ever seen done with
       | code. Absolutely legendary feat! (And also an incredible amount
       | of persistence.)
        
         | pcthrowaway wrote:
         | Where can we see these updates?
        
           | sys13 wrote:
           | Michigan Typescript has an active discord:
           | https://discord.com/invite/DHtwNDTwrR
        
           | dimitropoulos wrote:
           | the #doom channel is where Mark is referring to. it's all
           | there!
        
       | kamilafsar wrote:
       | That's pretty insane Dimitri. If you like stuff like this I
       | really recommend Dimitri's TypeScript challenges series:
       | https://www.youtube.com/playlist?list=PLOlZuxYbPik180vcJfsAM...
        
       | ramesh31 wrote:
       | Brilliant. The TS type system is a true marvel of modern software
       | engineering. Its a shame that it hasn't just been developed into
       | a proper fully fledged runtime at this point. Something like Deno
       | is the closest we'll get it seems.
        
       | Kuraj wrote:
       | What the FUCK
        
       | user2093 wrote:
       | About time some good news!
        
       | dang wrote:
       | Related: _MichiganTypeScript: A WebAssembly runtime implemented
       | in TypeScript types_ -
       | https://github.com/MichiganTypeScript/typescript-types-only-...
       | 
       | (via https://news.ycombinator.com/item?id=43185174, but we merged
       | that thread hither)
        
       | bilekas wrote:
       | This shouldn't be possible.. Typescript devs have lost their
       | collective minds and I'm totally here for it.
       | 
       | Edit : TS not front end
        
         | dimitropoulos wrote:
         | I didn't ask them outright, but I sorta think the TypeScript
         | team might agree with you on this point! haha. At least we can
         | all agree it's not an intended use-case, to play Doom.
        
       | alex_suzuki wrote:
       | Try to fit _that_ in a context window! Absolutely amazing.
        
         | dimitropoulos wrote:
         | (author here) that was one of the 1st-week "ok, but THAT'S
         | surely a good reason this can't work..." until I dug in and (to
         | my great surprise) found a way.
        
       | dfabulich wrote:
       | A WASM runtime in TypeScript types is impressive in its own
       | right, but I think I can dimly see how it could work with a lot
       | of effort. https://github.com/MichiganTypeScript/typescript-
       | types-only-...
       | 
       | What I don't understand is how this thing does keyboard input.
       | 
       | At 3:42, the video simply says, "And, yes, there's a way to do
       | keyboard input," without elaborating on how. What sorcery is
       | _that_? There must be _something_ outside the type system
       | translating keyboard input into TypeScript types...??
        
         | darcien wrote:
         | I haven't checked the DOOM one, but for the Pong example, the
         | keyboard input is prerecorded. As in the sequence of the
         | keyboard key press are sequenced in a TS array[0].
         | 
         | [0]: https://github.com/MichiganTypeScript/typescript-types-
         | only-...
        
           | dimitropoulos wrote:
           | yep! exactly this! like how a tool assisted speedrunner works
        
         | pcthrowaway wrote:
         | If I had to guess, it's a file with an array of keys pressed
         | (or unpressed) at some time interval (say 0.1 seconds). Then a
         | VS code extension can append to the array every 0.1 second
         | along with any key-press states at that time. The compiler
         | updates the game state whenever this array gets updated.
         | 
         | However, I'm guessing this is why we see a demo of pong and not
         | doom. Doom probably just can't keep up with this.
         | 
         | No idea if I'm remotely on the right track here though.
        
           | jschoe wrote:
           | If I heard him correctly he stated that it takes A LOT to
           | just render a single frame. It's not playable. It can run
           | DOOM, but you can't actually play it.
        
             | abound wrote:
             | "A lot" is an understatement, rendering the screen at ~320p
             | took 12 days.
        
         | dimitropoulos wrote:
         | (author here) pause on that screen and look at the code
         | displayed on the right (as well as the note at the bottom!) the
         | way to do keyboard inputs is basically exactly what people do
         | for tool assisted speedrunners. Some people at this point in
         | the message just went "oh cool!" and others went "you liar!
         | that's not the same thing!". There was SO MUCH to say in 7
         | minutes in a short video like that, but rest assured, I'll go
         | into depth on that in the next videos. The pong stuff that's
         | shown is real (only the animating part was the creative
         | liberty) and it's in the open source codebase.
        
       | nicetryguy wrote:
       | Incredibly good video editing, unbridled insantiy, cheers!
        
         | dimitropoulos wrote:
         | conservatively 200 hours dropped into that 7 minute video - so
         | you can imagine how happy I am to hear people are enjoying it!
        
       | sys13 wrote:
       | Not only is Dimitri an amazing engineer - he's also great at
       | building community and event/video production. Michigan
       | Typescript meetups and videos have a level of polish that goes
       | over and above
        
         | jschoe wrote:
         | In the YouTube comments he stated nonetheless that he still
         | bombed big tech interviews, specifically the technical portion,
         | probably because of some ridiculous LeetCode problem he did not
         | memorize beforehand. It just goes to show how these procedures
         | do not effectively determine who is actually a good engineer or
         | programmer. If this guy can't land a job while achieving this,
         | then something is not quite right with the interview process.
        
           | dimitropoulos wrote:
           | hi! yep! this definitely happened. I do mention it in the
           | next "why" video, but it's good feedback to know this is
           | interesting to people because I could say a bit more about
           | what those rejections were like - specifically the one where
           | I failed the technical screening.
           | 
           | I'm actually really excited to share that part of the story
           | because I hope it can be a small thing in the back of
           | people's mind to help them if it happens to them. It can
           | happen to anyone. Interviews are SUCH a lossy process and
           | most engineers I know don't have any training on how to do
           | interviews at all - yet we just assume they know how to
           | evaluate people's skillsets.
        
             | hakaneskici wrote:
             | What you've accomplished demonstrates a very important
             | skill you have, persistence. Kudos and don't give up.
             | 
             | About those rejections, did they effect your confidence in
             | yourself and your skills? How did they make you feel?
        
               | dimitropoulos wrote:
               | I was crushed and embarrassed. Yep. Not even gonna lie.
               | 
               | I used to work on Insomnia at Kong, which is literally a
               | frontend for cURL. But some of the questions I couldn't
               | answer were like "how do you get headers with cURL". I
               | DON'T FRIGGIN KNOW. THAT'S WHY I WORKED ON A GUI FOR
               | CURL. I CAN'T STAND USING THE CLI. lol. But to them, it
               | was a question they were supposed to ask, and I got it
               | wrong. Same story for questions about the git CLI DX (I'm
               | a GitKraken fanatic lol), and more like that.
               | 
               | I would rate my confidence overall as being quite low.
               | Well. I donno how to explain what I'm trying to say. It's
               | not that it's low or high, it's that I don't factor it in
               | a lot in what I decide to do. Where I've noticed some
               | people dip their toe in, I find it easy to just cannon-
               | ball into the frozen lake without needing a lot of
               | justification. That's what I meant in the video about
               | "close-enough-manship". I'm a sort of personality that
               | spends a lot of time just failing miserably over and over
               | again in the least efficient way possible until I get
               | what I'm looking for - and I usually quickly move on
               | before I learn what I could have done better, lol. I've
               | been told that my comfort in the face of non-stop-
               | failures is what confidence is, but I donno if that
               | sounds right.
               | 
               | Getting a job these days is really tough on the psyche.
        
           | mattgreenrocks wrote:
           | Those interviews select for the type of person that believe
           | it is worthwhile to dump tons of time into studying minutia
           | to succeed at those types of interviews.
           | 
           | The purpose of a system is what it does, after all.
        
       | vivzkestrel wrote:
       | 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
        
         | mirkodrummer wrote:
         | What would be the point? Why waste time parsing and ignoring
         | types? Types are for static analysis during comp time, they
         | have nothing to do with the runtime and they don't provide
         | "type hints" to the runtime about types, and code isn't
         | optimized based on static typing analysis. Or should the
         | browser do that? In that case which version of TypeScript? And
         | by version I actually mean which tsconfig? Sorry for being
         | picky but can't image why we would want something like that. If
         | all we wanted was a compiled runtime like flash/actionscript
         | was then I wonder why we killed flash
        
       | aylmao wrote:
       | At this point the easiest way to know if a system is Turing
       | complete is to check if someone has ported DOOM to it haha
       | 
       | Very impressive!
        
         | cobbal wrote:
         | Only if the church-turing-carmack thesis holds, which I
         | personally doubt
        
           | FergusArgyll wrote:
           | HN Pedantism never fails to elicit a chuckle from me
        
           | ccvannorman wrote:
           | Alternatively if The Romero Hypothesis is proven to map the
           | distribution of Mancubus numbers ... >_<
        
             | kridsdale1 wrote:
             | If it holds does that confirm that I'm his bitch?
        
         | evolveyourmind wrote:
         | https://github.com/desi-ivanov/ts-lambda-calc
        
       | vardump wrote:
       | Doom compiled to just 177 TB (terabytes) of TypeScript types.
       | Amazing on many levels.
        
         | tgv wrote:
         | For the first frame...
        
           | abound wrote:
           | I think that 177 TB is for the whole shebang, it's just that
           | it took 12 days to render the first frame.
        
         | luckystarr wrote:
         | This must be the quintessential example of a Turing tarpit.
         | 
         | In TypeScript types, everything is possible, but nothing of
         | interest is easy.
        
       | sim04ful wrote:
       | I know the following comment is discouraged from hackernews but
       | these are extenuating circumstances:
       | 
       | Yoooo WTAF
        
       | nokeya wrote:
       | Bad Apple time!
        
       | koakuma-chan wrote:
       | I wish tsc didn't take eternity to run though.
        
         | mithametacs wrote:
         | now we have a benchmark
        
       | R3Y-P2U-jz3PVKd wrote:
       | 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 comical to me.
       | 
       | Maybe it's just me, don't want to crash the party. Carry on
        
         | antihero wrote:
         | I guess you have to ask yourself, what truely gives value in
         | life? The answer is that value is subjective, and this person
         | is wasting his time no less or more than you or I.
        
         | Gehinnn wrote:
         | You could say the same about art. Artists put lots of time and
         | effort into creating unuseful things to inspire others. Just
         | like here!
        
         | abound wrote:
         | > don't want to crash the party
         | 
         | > I just see a massive waste of time & effort
         | 
         | Kinda seems like you do wanna "crash the party". I disagree
         | that this is a "waste of time" of course, the value I see here
         | is manyfold:
         | 
         | 1. Learning how to do self-directed learning, managing time,
         | etc
         | 
         | 2. Learning, at an expert level, about dozens of complicated
         | (not to mention in-demand) CS subdomains
         | 
         | 3. Doing something that nobody has attempted, and few people
         | could realistically accomplish
         | 
         | 4. Having fun on the journey of taking a ridiculous idea from
         | conception through to a truly functional implementation
         | 
         | 5. Sharing something you've built with the world
         | 
         | It is, of course, not everyone's cup of tea, but if someone
         | wants to spend a not insignificant fraction of their life
         | building something unique (and beautiful, in its own way) and
         | sharing it with the world, to the detriment of quite literally
         | nobody else, I support them in their adventure.
        
         | porridgeraisin wrote:
         | 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.
        
         | dimgl wrote:
         | It's just you. It's extremely impressive. He likely set himself
         | up for life with this + learned an unbelievable amount. And
         | this is, in and of itself, a business. He has merch, a
         | conference, a social media presence, etc.
        
       | ulrischa wrote:
       | Typescript is for me one of the most overengineered programming
       | languages. Why did JS not follow the way python and php did?
       | Integrate types in the main language but make it optional.
        
         | BoorishBears wrote:
         | Thank god they didn't follow the way Python did.
        
           | adhamsalama wrote:
           | Python keeps the types at runtime, that's why no TypeScript
           | framework will have a developer experience anywhere near
           | something like FastAPI.
        
             | code_biologist wrote:
             | First party runtime types would be nice, but zod has become
             | pretty much the standard answer for projects that need it.
             | Not complicated.
        
         | esailija wrote:
         | Typescript does support it. You can do everything ts can in js
         | with just jsdoc style comments. I actually prefer it.
        
         | zachrip wrote:
         | When typescript came out, you were seen as weird for wanting
         | such a thing. I once had a VP of engineering dm me to tell me
         | to stop discussing typescript in the company dev channel around
         | 2015 (if you're reading this, that was a dick move). Nowadays
         | you're kinda odd man out if you _don 't_ want types. So the
         | idea of adding types even optional ones probably wouldn't have
         | gone down well. The closest we ever came was es4 which of
         | course never landed: https://evertpot.com/ecmascript-4-the-
         | missing-version/
        
       | qwertox wrote:
       | Plus three months of recording/cutting/editing the video. Well
       | done.
        
         | TechDebtDevin wrote:
         | The video is very impressive by itself. This guy is a
         | perfectionist
        
       | Ericson2314 wrote:
       | Not to be a grouch, but I feel like this could be way more
       | optimized
        
         | rvnx wrote:
         | It's a bit that it is oversold, but it's a cute little VM.
         | 
         | https://github.com/MichiganTypeScript/typescript-types-only-...
         | 
         | Though the fact that the actual converter that converts from
         | WASM to TypeScript types is in Rust makes it lose a bit of
         | charm, but still.
         | 
         | Like Flappy Bird in TypeScript types did:
         | https://zackoverflow.dev/writing/flappy-bird-in-type-level-t...
        
         | abound wrote:
         | It is open-source, you are of course more than welcome to take
         | a crack at it.
        
       | undebuggable wrote:
       | Honestly every time I worked on TypeScript codebase and the type
       | definition "any" started popping out more and more often, I felt
       | I'm starring into the abyss.
        
         | epolanski wrote:
         | There are valid use cases for any (such as type constraints).
         | 
         | Playground with example here: https://tinyurl.com/5ahs366a
        
           | undebuggable wrote:
           | That was the tipping point in transition from "we are serious
           | and use static typing instead of lame JavaScript" into "ok we
           | lost control over this thing".
        
             | epolanski wrote:
             | What do you mean?
             | 
             | This is perfectly sound and valid from both a practical and
             | theoretical pov.
             | 
             | Which is why I was pointing out that there are scenarios
             | like constraints where any not only makes sense but is the
             | correct type.
        
           | tyilo wrote:
           | Seems to also work without any:                   type
           | Values<T extends Record<string | number | symbol, unknown>> =
           | T[keyof T]
        
             | epolanski wrote:
             | Sure, there's many other ways to type it, but none adds any
             | kind of additional safety or strictness over Record<any,
             | any> which was my point that `any` is the correct type in
             | many cases, except when it widens a type.
             | 
             | But in my case it's not widening anything, in Record<A, B>,
             | B can already be `any`thing.
             | 
             | People tend to see it as an unsafe escape hatch (which is
             | how it is abused), but it's just a set of all possible
             | types.
        
               | matt_kantor wrote:
               | > it's just a set of all possible types
               | 
               | `unknown` is the set of all possible types (it's the top
               | type[0]). `any` goes beyond that--it basically turns off
               | the type checker[1][2].
               | 
               | [0]: https://en.wikipedia.org/wiki/Top_type
               | 
               | [1]: https://tsplay.dev/mA9vXm
               | 
               | [2]:
               | https://www.typescriptlang.org/docs/handbook/2/everyday-
               | type...
        
               | remolueoend wrote:
               | 'any' has always been intended as an escape hatch, so no
               | abuse here [1]. The type representing the set of all
               | possible values (the top type in the type lattice) is
               | 'unknown'.
               | 
               | [1]
               | https://www.typescriptlang.org/docs/handbook/2/everyday-
               | type...
               | 
               | [2] https://www.typescriptlang.org/docs/handbook/release-
               | notes/t...
        
       | TechDebtDevin wrote:
       | Your only miss is that you should be selling that "Types" Doom
       | themed shirt.
        
         | mormegil wrote:
         | Here you are: https://shop.squiggle.tools/
        
           | TechDebtDevin wrote:
           | Ty!
        
       | ourmandave wrote:
       | Microsoft Solitaire is apparently the most installed program.
       | 
       | Doom must be the most ported.
        
       | ejones wrote:
       | Amazing work. I'm interested in the choice of WASM - presumably
       | any target that can run DOOM could've been used? Of which there
       | are innumerable choices I assume. Was it for symbolic reasons or
       | genuinely the most useful target?
        
         | wvenable wrote:
         | WASM is the easiest target because you don't have to emulate an
         | entire computer.
        
           | svieira wrote:
           | But in this case he kind of did anyway (at least the video
           | makes reference to "L1 Instructions Cache").
        
             | wvenable wrote:
             | 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.
        
         | rvnx wrote:
         | WASM is one of the easier platforms to port as the Virtual
         | Machine is well documented and there are actual implementations
         | in many languages that can be used for debugging and comparing
         | the results.
         | 
         | even in pure JS: https://github.com/evanw/polywasm
        
         | dimitropoulos wrote:
         | love this feedback - will definitely talk about it in the next
         | videos.
         | 
         | you're gonna laugh.. but the answer is "ignorance". I had no
         | idea what I was doing and had literally never touched
         | WebAssembly before but thought it'd be a good place to start.
         | Then it just stuck.
         | 
         | Hilariously, later a friend explained to me "Dimitri, this
         | would have been a LOT easier if you had just targeted ASSEMBLY.
         | IT WAS RIGHT THERE IN THE NAME". haha. oh well! ignorance is
         | bliss
        
           | ejones wrote:
           | Ah nice! Well, hats off this is really impressive. As other
           | commenters mentioned the extent to which it's documented and
           | the restricted scope probably helped.
        
             | dimitropoulos wrote:
             | exactly! knowing what I know now, actually WebAssembly was
             | probably just about the best thing I could have
             | accidentally picked!
        
       | layer8 wrote:
       | 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
        
         | __alexander wrote:
         | I think you missed the part about how much effort they put into
         | it.
        
         | graynk wrote:
         | There's a difference between a _system_ being Turing complete
         | and something actually _using_ that Turing-completeness to make
         | something arbitrary run on it. You can't deny this is an
         | impressive effort.
        
           | layer8 wrote:
           | 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.
        
             | kristiandupont wrote:
             | Oh come on, are you seriously being blase about this? What
             | could ever impress you?
        
               | rvnx wrote:
               | A time-travel machine would be really impressive, I would
               | give all my money for that, and even upvote the thread.
        
             | rictic wrote:
             | 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.
        
               | layer8 wrote:
               | > 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.
        
         | frankfrank13 wrote:
         | > I wonder if there will come a time when the HN audience will
         | stop being amazed that some system is Turing complete
         | 
         | The time is now, but if you had said
         | 
         | > I wonder if there will come a time when the HN audience will
         | stop being amazed that some system can run Doom
         | 
         | The answer is never, and particularly not when its this insane
         | to even try
        
         | sizeofchar wrote:
         | There is a big gap between "Turing complete"-able and "real-
         | time, interactive, graphical and performant"-thing.
        
           | Philpax wrote:
           | 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.
        
         | regularfry wrote:
         | Ah yes, the Underpants Gnomes theory of Doom execution:
         | 1) Show that a system is Turing complete         2) ???
         | 3) Run Doom on it.
         | 
         | Step 2 is, of course, always trivial, and no amount of effort
         | or technical nous that goes into actually getting to step 3 can
         | possibly be relevant.
        
         | brap wrote:
         | We know that humans are capable of writing amazing symphonies
         | or running a 2h marathon, so there's no point in doing it?
         | 
         | Just because we know something is possible in theory doesn't
         | mean it's not impressive to see it done in practice. There was
         | a lot of effort and creativity involved here.
        
       | ravenstine wrote:
       | 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."
        
         | brap wrote:
         | I'm 100% sure that if he was being considered for a domain
         | expert role in some domain related to this (e.g. TypeScript)
         | his score in a typical whiteboard interview wouldn't have been
         | a deciding factor whatsoever. This is a standard hiring track
         | even in big tech. Sometimes you'll even be exempt from these
         | interviews altogether.
         | 
         | But if he was being considered for a mid level generalist role,
         | yeah, none of this would've mattered. And why should it?
        
           | turnsout wrote:
           | > But if he was being considered for a mid level generalist
           | role, yeah, none of this would've mattered. And why should
           | it?
           | 
           | As someone who has been on the hiring manager side, I'll
           | state the obvious: because it demonstrates insanely good
           | problem-solving skills that would transfer to nearly any
           | challenge.
        
             | jf wrote:
             | Would he have made it past your recruiter screen though?
        
               | SXX wrote:
               | A lot of people who have a gap between jobs for 1-2 years
               | because they worked on their insane projects certainly
               | wouldn't.
        
               | soulofmischief wrote:
               | People are allowed to not work when they please, and you
               | should avoid any employer who perceives self-indulgence
               | and self-sufficiency as a red flag.
        
               | SXX wrote:
               | Unfortunately I feel like recruiters at larger companies
               | are squinting at CVs and think like: "Open source?
               | Entrepreneur? Eh, oh. Smell of despair and discarded
               | pizza boxes.".
               | 
               | Of course unless your passion project is very successful
               | one, but majority of them are not.
        
               | turnsout wrote:
               | And would he have even bothered to apply, given the
               | boring-sounding, narrowly worded JDs that get posted?
        
             | mgfist wrote:
             | Seriously lol. Someone who can figure this out can figure
             | anything else out.
        
         | gspencley wrote:
         | > "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."
         | 
         | I have a nuanced view of your particular example. I've been in
         | this industry for almost 30 years. I cut my teeth writing
         | C/C++, had an interest in language theory and frameworks and
         | was brought up to care about portability. I always wanted to be
         | able to easily transition from one language to another, or one
         | framework to another.
         | 
         | And I always assumed this was the case for other engineers in
         | our field as well.
         | 
         | However, I have worked for startups that like to move really
         | fast, and hired talented developers who passed our technical
         | screenings (read: "had the fundamentals down") under a
         | "framework agnostic" hiring policy ... only to see them display
         | stunning degrees of incompetence trying to learn our tooling.
         | 
         | The problems that compound this are:
         | 
         | - When you enter a new company with a large codebase that you
         | have to ramp up on, you're not only required to learn the
         | language or 3rd party frameworks and libraries that they use
         | ... you need to ramp up on THEIR "framework." Depending on the
         | complexity of the system, there is a lot of domain specific
         | knowledge and custom supporting code that will have been
         | written. Try to learn the ins and outs of Angular change
         | detection, for example, while also ramping up on a massive
         | codebase that does things in weird ways for legacy and historic
         | reasons.
         | 
         | - Every business, but some more so than others, has time
         | pressure. You need to be able to write functional, easy to
         | maintain code but also get it shipped yesterday. If you come
         | into a company unfamiliar with the languages and tools that
         | they use, you are essentially coming in handicapped.
         | Expectations that you can deliver are very high, despite the
         | time that you need to ramp up. Maybe you're one of those
         | 10x'ers who can learn all the ins and outs of a new tool in a
         | week or two before starting your position and then apply that
         | knowledge at the level of someone whose been working with the
         | tool for years and has learned all of the hidden footguns ...
         | but if so, you are a rare specimen indeed. The industry can
         | save itself a ton of inefficiency if it takes a "better not
         | take a chance" attitude.
         | 
         | - All problems are people problems. It's not that the company
         | needs people who know how to code in the language or tool ...
         | they need someone who has worked on enough different projects
         | with that tool that they can navigate the completely fucked up
         | ways that THIS company uses it. Because THIS company will for
         | sure have years of active development behind it by developers
         | of all sorts of different experience levels ... and some of
         | those developers did it the right way while others found
         | creative solutions and did things weird. The company doesn't
         | need someone who can write the Hello World tutorial in the
         | language or framework, they need someone who can evaluate the
         | good decisions vs the bad ones in an existing codebase.
        
           | pjmlp wrote:
           | The problem is that eventually they outsource key parts of
           | the codebase to a cheap consulting agency where all this
           | reasoning goes to waste anyway.
        
         | Jasper_ wrote:
         | 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?
        
           | Liquix wrote:
           | 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 DOOM in typescript types or writing homebrew [1].
           | 
           | [0] https://leetcode.com/problems/invert-binary-
           | tree/description...
           | 
           | [1] https://x.com/mxcl/status/608682016205344768
        
             | devmor wrote:
             | 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.
        
               | josephg wrote:
               | > If you aren't evaluating based on conditions like
               | those, I don't really see the value of coding questions.
               | 
               | The way I think about it, you're really trying to
               | evaluate a candidate on about 10 different metrics all at
               | once. Metrics like programming skill (writing &
               | debugging), communication skills (listening and
               | explaining), capacity to learn, domain knowledge (eg if
               | you're hiring a react dev, do they know HTML & react?),
               | likeability, and so on.
               | 
               | A good interview gives the candidate the chance to show
               | their worth in all of those different areas. But time is
               | limited - so you want some different challenges which
               | will show many capabilities at once.
               | 
               | Asking a candidate to talk through how they'd solve a
               | "leetcode problem" sort of does that - you can see their
               | CS knowledge and their communication skills. But if thats
               | all you ask, you end up overemphasising the candidate's
               | CS knowledge. Most people aren't very good at thinking
               | and talking at the same time. And you don't learn about
               | other stuff. How good are they at debugging? At reading
               | code? Do they have domain knowledge? Can they talk to
               | clients? Are they good at design? Its also quite easy for
               | the interviewer to be distracted by the question of
               | whether or not the candidate solved the problem you gave
               | them. - Which isn't really what anyone is there for.
               | 
               | As part of a larger interview, and especially for systems
               | engineering roles, I think they're still fine questions
               | to ask. But if thats the entire job interview, its a bad
               | interview - because it won't let you evaluate a candidate
               | properly. Especially in product roles where CS knowledge
               | isn't very relevant anyway.
        
               | cancerhacker wrote:
               | This is absolutely the way. My interviews are
               | conversations with someone that I want to work closely
               | with, and while leet code might be an interesting lunch
               | conversation it's not going to be part of any of our day
               | to day work (c/c++/swift/obj-c)
        
               | xenadu02 wrote:
               | I agree with this. I got to experience both sides when I
               | interviewed at FB/Meta. I practiced the leetcode and
               | Cracking the Code Interview stuff of course and one of my
               | interviewers asked something like that. I guess it was
               | insulting and pointless but whatever - I just did it.
               | 
               | Another interviewer asked a much more interesting
               | question: you are writing an IM client. How do you build
               | the client-server communication?
               | 
               | That was a great conversation I enjoyed on its own
               | without regard for the interview. Asking questions: do we
               | have online/offline status? (yes) What are the target
               | devices? (mobile).
               | 
               | IIRC I said I'd want to optimize for bandwidth and
               | latency. Cellular networks can be spotty at times and
               | stall out in really annoying ways. I'd design the
               | protocol to use an efficient encoding with a pre-shared
               | dictionary (the list of friends doesn't change that much
               | after all and lots of the same words/emoji are used
               | frequently). I also said I'd make a flexible format that
               | would let things like online/offline status or you have a
               | new message from X ride along with an actual message in
               | the current conversation and explore options like QUIC or
               | other UDP-based eventually-consistent options given how a
               | cellular dead band can put you in TCP retransmit jail for
               | minutes at times.
               | 
               | For closure I was offered a position but went to a
               | different company.
        
           | mirekrusin wrote:
           | Maybe the catch was in saying that left right labels are
           | arbitrary, could be called node1 and node2 as well, inverting
           | is not necessary per se, just visit it in node2, node1 order
           | if needs to be flipped - ie. no physical rearrangement is
           | necessary.
        
             | jerf wrote:
             | Also the best answer to "how do you reverse an array". You
             | don't. You just read it in the opposite order. Especially
             | in any iterator-based language it should be trivial.
             | 
             | In a pure ASCII world, this doubles as "how do you reverse
             | a string". In a Unicode world, the answer to "how do you
             | reverse a string" is "you should never want to do that".
        
           | ryanmcbride wrote:
           | That's what it means, and people use it as an example not
           | because it's like, some sort of super difficult unreasonable
           | challenge, but because it's completely unrelated to the work
           | you'd be doing on the job like 99.99% of the time. It's like
           | interviewing for a line cook and asking them to make a
           | spatula.
        
           | emmanueloga_ wrote:
           | I think brew's author point holds even if you replace "invert
           | binary tree" with any other LC problem.
           | 
           | In terms of the problem itself, a binary tree can be
           | expressed something like:                   type Node<T> = {
           | value: T, left?: Node<T>, right?: Node<T> }
           | 
           | Given a root, you can invert it recursively with some code
           | like this:                   function invertTree(root) {
           | if (!root) return null;                // Swap!
           | const tmp = root.left;           root.left =
           | invertTree(root.right);           root.right =
           | invertTree(tmp);                return root;         };
           | 
           | Or using an explicit stack:                   function
           | invertTree(root) {           const stack = [root];
           | while (stack.length > 0) {             const node =
           | stack.pop(); if (!node) continue;                  // Swap!
           | const tmp = node.right;             node.right = node.left;
           | node.left = tmp;                  stack.push(node.left);
           | stack.push(node.right);           }           return root;
           | }
           | 
           | I think without prep would be harder to come up with the non-
           | recursive version.
        
         | SXX wrote:
         | By now there is more than one story how some open source
         | developer wasn't hired because their skills with the project
         | they created was not sufficient for the job.
        
           | callalex wrote:
           | I go back and forth on my opinion for this one. You wouldn't
           | necessarily want a mechanic or engineer to drive a race car,
           | for example.
        
             | magicpin wrote:
             | Yes, but having a mechanic or engineer who's worked on the
             | racecar your driver is in would be very helpful on your
             | team.
        
               | adamtaylor_13 wrote:
               | And we're also not driving race cars, we're the pit
               | crew... So you kinda do want mechanics...
               | 
               | Like, literally, we build and fix the thing you're
               | selling. We do not USE the thing we're building by and
               | large.
        
               | josephg wrote:
               | > We do not USE the thing we're building by and large.
               | 
               | Yes, thankyou, that's quite obvious judging by the
               | quality of most software.
               | 
               | It really is amazing how bad most software made for non-
               | developers is. Like, as software engineers, we understand
               | how essential version control is. We made git and github
               | for ourselves. But nobody has bothered building that
               | functionality for people who edit word documents all day.
               | Or people who edit video, or animators, or 3d modellers,
               | or 100 different jobs. Word and google docs have track
               | changes. But they don't let you bounce between branches
               | or make pull requests. You usually can't time travel, or
               | bisect, or git blame, or any of the other things we take
               | for granted. My partner works in a CMS all day at work.
               | Every change she makes is pushed directly to production.
               | There's no review process. No staging. No testing. No
               | change control or rollback. If anyone messes something
               | up, they get blamed for "taking down the app". As a
               | software engineer, I look on in horror.
               | 
               | I believe the more cognitive distance there is between
               | 20-something silicon valley tech bros and your particular
               | use case, the worse your software is going to be. If
               | you're a manchild living in san francisco who can't be
               | bothered driving, doing your laundry or shopping for
               | groceries, you're in good hands. There is a startup that
               | will solve your problem! But the further from that
               | "ideal" you get, the worse. Here in Melbourne, I can't
               | use my iphone to pay for public transit. Google maps
               | couldn't really handle roundabouts (traffic circles) for
               | a decade and change. (I guess they don't have those in
               | California). Unicode support was only added recently
               | because of Emoji. Until then, a huge amount of software
               | butchered non-english text. I shudder to think how badly
               | most software probably handles right to left languages.
               | And the list goes on and on.
        
               | mhnthrow wrote:
               | > My partner works in a CMS all day at work. Every change
               | she makes is pushed directly to production. There's no
               | review process. No staging. No testing. No change control
               | or rollback. If anyone messes something up, they get
               | blamed for "taking down the app". As a software engineer,
               | I look on in horror.
               | 
               | Fwiw that just sounds like an immature CMS - I've seen
               | review/approval workflows, branches, preview environments
               | etc in more than one CMS. I take your overall point but
               | maybe your partner doesn't have to live this way.
        
           | hombre_fatal wrote:
           | I do think shipping a product that has real users (and
           | everything it entails, like writing the docs) is 100x more
           | important than having leetcode and common interview tactics
           | fresh on your mind.
           | 
           | Without context, I suppose I can see the Homebrew guy's case
           | possibly signaling a sort of hubris since it was just a
           | fizzbuzzy-level question.
           | 
           | In his defense, I would find it ridiculous if we just had a
           | technical convo about how I built Homebrew and then they gave
           | me leetcode question.
           | 
           | At least an easy leetcode question is insulting in a bearable
           | way, like inverting a binary tree. But a medium+ question
           | risks me not even being able to solve like, like having to
           | use dynamic programming. And that's just humiliating.
        
             | ljm wrote:
             | Never mind that a lot of the jobs that ask you to do this
             | will mostly involve the conversion of database data to JSON
             | or HTML with a few steps of business logic in between.
             | 
             | And the harder computational challenges you'd likely learn
             | as you need it. In which case, simply knowing what a binary
             | tree is means you'll know it's available to you, even if
             | you can't invert one from the top of your head.
             | 
             | And even then, start going for staff or principal and your
             | leadership, communication and architecture skills should be
             | more of a focus than algorithmic puzzle solving.
        
             | josephg wrote:
             | > I do think shipping a product that has real users (and
             | everything it entails, like writing the docs) is 100x more
             | important than having leetcode and common interview tactics
             | fresh on your mind.
             | 
             | It depends on the job! At a small product company,
             | absolutely. Shipping useful features to customers is what
             | you're hired to do. Hardcore CS knowledge is less useful
             | than understanding how to talk to customers and shipping.
             | Interviews should reflect that.
             | 
             | But that isn't all jobs, or all software. For a lot of
             | problems - particularly in systems software or places where
             | performance matters, understanding data structures and
             | algorithms is essential. For example, video game engines,
             | operating systems, databases, LLM inference and training,
             | etc.
             | 
             | I get it - most product engineers don't make use of
             | "leetcode" skills. But absolutely relevant at a place like
             | google. If you don't understand how to reverse a binary
             | tree, I wouldn't hire you to work on Google Chrome or the
             | Go compiler either.
             | 
             | > But a medium+ question risks me not even being able to
             | solve like, like having to use dynamic programming. And
             | that's just humiliating.
             | 
             | What an incredibly entitled thing to say. "Those horrible
             | interviewers asked me to solve a problem that was too hard
             | for me! How humiliating! I failed the interview and its all
             | their fault!"
        
               | smileson2 wrote:
               | Googles issue is a good part of their hiring is generic
               | and the interviewers random
               | 
               | No one knows what your going to be working on
        
           | rafram wrote:
           | The "invert a binary tree" thing is a reference to a tweet by
           | Max Howell [1] where he complains that he didn't get hired by
           | Google even though he wrote Homebrew, which he estimates 90%
           | of their engineers use.
           | 
           | Howell describes himself as a "dick" [2], hadn't been
           | involved with the Homebrew project for years, and has since
           | gone on to write the NFT-based package manager Tea [3] and
           | pkgx [4], which is an "everything app"-style CLI tool with
           | lots of fever-dream AI art and RCE as a feature.
           | 
           | It's possible that Google just didn't hire him because he
           | wasn't a good candidate.
           | 
           | [1]: https://x.com/mxcl/status/608682016205344768
           | 
           | [2]: https://www.quora.com/Whats-the-logic-behind-Google-
           | rejectin...
           | 
           | [3]: https://tea.xyz/
           | 
           | [4]: https://pkgx.dev/
        
             | SXX wrote:
             | This wasn't the only story like that. I at least remember
             | similar stories about some kind of database / library
             | maintainer and yet another javascript framework.
             | 
             | Dont have enough time to find them now, but it's kind a
             | obvious people would like to apply to places that already
             | use their open source code. I would at least try, but no
             | one use open source game-clone engines so no way on earth
             | anyone will use what I worked on.
        
             | bluedino wrote:
             | Did he tell the interviewer that? Or did he just expect him
             | to have known?
             | 
             | I have had maybe two interviewers ever mention anything on
             | my GitHub, which I usually include on my
             | application/resume.
        
         | renewiltord wrote:
         | Yeah that's obvious and probably good. You're trying to make a
         | machine that reliably adds employees to your company in a way
         | that minimizes nepotism or corruption.
         | 
         | Faced with the immutable fact that the chief executive cannot
         | watch everything, that there will be pockets within the
         | organization where people will sell access to a $300k job, and
         | where others will hire from their family, their tribe, or so
         | on: you make a system that is meant to prove some minimum
         | standard while constraining your interviewers.
         | 
         | One thing that is not immediately obvious is that the Big Tech
         | hiring process is to constrain your hiring team in who they
         | bring on.
         | 
         | Startup executives are close to the road so they can tell if
         | the rubber's good much more easily.
         | 
         | The hiring process is designed around the constraint of
         | executive attention. As are most things in firms.
        
         | garaetjjte wrote:
         | Reminds me of https://aphyr.com/posts/342-typing-the-technical-
         | interview
        
         | butterisgood wrote:
         | I think, nowadays, I can get a generative AI to tell anyone how
         | the process of inverting a binary tree works, and perhaps even
         | give sample code for it.
         | 
         | So that's not interesting to me at all as a person hiring
         | engineers.
         | 
         | What I want to know is "how have you solved bigger design
         | problems" or "what's your approach to keeping code maintainable
         | and reducing cost of ownership"
         | 
         | I've also hired people who 3 other managers have passed on and
         | those people have gone on to amazing things at the company in
         | which I work.
         | 
         | So the process is horribly broken... it doesn't successfully
         | weed out anyone, and we've also hired really toxic individuals
         | also with the same processes.
        
         | stjo wrote:
         | Why do you think person capable of making doom run in such an
         | environment is incapable of basic tree operations?
        
           | mattgreenrocks wrote:
           | I suspect the technical interview devolves into an act of
           | shunting the blame of potential bad hires away at some
           | places. Elite credentials and leetcode shibboleths serve the
           | same purpose: this person has checked the boxes we've agreed
           | upon as important in the hiring process, regardless of the
           | job duties. If they turn out to be a bad hire, who could've
           | known, esp. with that Ivy League bachelor's degree?
           | 
           | It's less the tree operations themselves and more that _this
           | candidate_ just didn 't know the shibboleth, so they
           | shouldn't be allowed in. Cue the vague feeling of disgust on
           | the interviewer's part that the interviewee didn't know
           | something "so simple" in a tense environment with lopsided
           | power dynamics.
        
             | GinsengJar wrote:
             | >shibboleth Fantastic word right there, had to look it up.
             | That's exactly how I'd describe the hiring process these
             | days. Relevant expertise seems like its only seen as a
             | bonus. That or I'm interviewing at some terrible companies.
        
             | yodsanklai wrote:
             | The role of such standardized coding interviews is to
             | ensure consistency when hiring at very large scale. Some
             | big tech companies hire thousands of people a year, and
             | interview ten times that.
             | 
             | Candidates have a very diverse set of backgrounds, age,
             | experience, culture, education, interests, experience. The
             | coding interview is a common denominator: undergrad
             | algorithmic knowledge, being able to solve problems which
             | are application of classic algorithms. This is something
             | that a decent coder should be able to prepare for within a
             | few months of regular practice. In my case, I can tell that
             | these months of practice were the best investment in my
             | life. And honestly, I feel I'm a better programmer after
             | this preparation.
             | 
             | > Cue the vague feeling of disgust on the interviewer's
             | part that the interviewee didn't know something "so simple"
             | in a tense environment with lopsided power dynamics.
             | 
             | This is your interpretation of the situation. As an
             | interviewer, I want the interviewee to succeed, I
             | understand it's stressful for them as I've been in their
             | shoes before.
             | 
             | Ultimately, there are more candidates than positions, so
             | whatever the interview is, people will complain about it. I
             | think leetcode is a decent interview technique. I wish we
             | would give more time to candidates though.
        
           | ramon156 wrote:
           | Its a meme, Batman
        
         | guelo wrote:
         | The justification is that it's almost impossible to get "good
         | employee" signal any other way. If you tell people upfront that
         | you're testing them on leetcode you at least get some signal
         | that 1) they're willing to put in time and follow through on
         | studying for something 2) they have some base level of
         | programming skill and intelligence
         | 
         | Companies optimize hiring for avoiding false positives (bad
         | hire) over false negatives (bad rejection), especially in this
         | job market.
        
         | yodsanklai wrote:
         | Given his skills, he'll be able to pass the usual coding
         | interviews with some preparation. In most companies, the bar
         | isn't that high, they're just there to ensure that candidates
         | have some minimal (usually undergraduate) algorithmic
         | knowledge, and is able to interact with the interviewer
         | (communicate their ideas, act on hints and so on...).
        
         | legutierr wrote:
         | Event better is his response to the comment.
         | 
         | > I was looking for a job during working on this and absolutely
         | got some disappointing rejections, and one was because of my
         | lack of skillset on things like this in a big tech company's
         | interview. I literally failed the technical screening. Oh well.
        
       | zeroq wrote:
       | From YT comment section:
       | 
       | >> @TimMattison >> If this guy goes for a big tech interview
       | they're still going to ask him how to invert a binary tree
       | 
       | > @MichiganTypeScript > So actually in the "why" video, you're
       | going to hear about exactly that! I was looking for a job during
       | working on this and absolutely got some disappointing rejections,
       | and one was because of my lack of skillset on things like this in
       | a big tech company's interview. I literally failed the technical
       | screening. Oh well.
        
         | kibwen wrote:
         | He's also one of the principal organizers of SquiggleConf, a
         | conference focused on devtools that takes place in Boston:
         | https://2024.squiggleconf.com/about
         | 
         | What I'm saying is, if he still happens to be looking for a
         | job, any employer reading this should be falling over
         | themselves to recruit this man.
        
           | karparov wrote:
           | There is more to hiring than technical competence. I'm not
           | seeing any red flags in his videos, but just saying, ability
           | to work in a team is not obvious from such posts.
        
             | dimitropoulos wrote:
             | strong agree! so much of it boils down to "do you treat
             | people good and stuff". then there's "do you treat yourself
             | good and stuff", and then a tiny little fraction that's
             | "can you work hard to get to an answer" and finally, least
             | of all, "what do you know"
        
       | cod1r wrote:
       | i envy dimitri's ambition and capabilities. i want to be able to
       | dedicate that much effort and more into something I'm passionate
       | about. mostly personal discipline/skill issues but MAJOR props to
       | dimitri and this awesome project.
        
         | sunnybeetroot wrote:
         | If you decide to have kids that's a great long term project.
        
           | dimitropoulos wrote:
           | I'm glad you said this actually, because I had a section in
           | the "why" video where I tried to compare this project to how
           | I've felt having kids and cut it out because it was too
           | cheesy. maybe I'll bring it back!
        
       | ajkjk wrote:
       | 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.
        
         | rvnx wrote:
         | Arithmetics were apparently integrated into TypeScript types
         | for that exact reason:
         | 
         | https://note89.github.io/typescript-typelevel-tic-tac-toe/
        
       | 4gotunameagain wrote:
       | 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.
        
       | whoisthisguy wrote:
       | mad respect! you are a legend.
        
       | g4zj wrote:
       | Can someone help direct me toward an understanding of what it
       | means for something to be "run in/by TypeScript types"?
       | 
       | A short explanation or link to a resource would really be
       | helpful. :)
        
         | mahoro wrote:
         | Normally you would write a program that is a game of Doom when
         | you run it (you create a program, then compile it and run).
         | Dmitri created a program that does nothing and he don't even
         | run it. But while it's compiling, it does a lot of tricky
         | things to make typescript compiler to run Doom as a side
         | effect.
         | 
         | It's extremely hacky because Typescript is not even a runtime,
         | it's not meant to run any code at all. Typescript is a thing
         | that takes .ts file and produces .js file (which you then run
         | using different program - a javascript runtime).
        
         | svieira wrote:
         | TypeScript types are a kind of Prolog [1] (sort of, kind of,
         | not entirely). Like any language they have primitives
         | (`boolean`, `string`, `true`, 'Manchester'), functions (`type
         | WaitWhat<T> = { yesReally: T }`), variables (`type X =
         | number;`), and conditionals (`type Huh<T> = T extends Foo ? Bar
         | : Baz`). You run the types program by asking `tsc` to check the
         | types of some program - e. g. `type Foo<T extends number> = {
         | x: T }; type Bar = Foo<string>;`. Getting _output_ out of the
         | type system other than via  "hover over the type in VSCode" is
         | probably a bit more involved, but it's definitely doable (I
         | suspect some abuse of the Language Server Protocol here).
         | 
         | [1]: https://en.wikipedia.org/wiki/Prolog
        
       | syrusakbary wrote:
       | Hats off to the creator big way.
       | 
       | Really amazing stuff, and impressive dedication. To the author:
       | if you would like to work on challenges of similar caliber, ping
       | me (I'm Syrus, from Wasmer)
        
         | dimitropoulos wrote:
         | WOW that's quite kind of you to say!
         | 
         | As luck would have it I happen to be the happiest at my current
         | job than I've ever been ever (and by a lot) buttttttt if it's
         | interesting to you one of the express goals of SquiggleConf is
         | to get WebAssembly to be a "oh I know how to use it" tool in
         | the everyday dev's mind. So I'll definitely ping you some time
         | soon to see what you think (and I hope you can tell I'm not
         | sponsor shopping! even if you have people building wasm tools
         | web devs should know about and you can point them towards our
         | CFP that would be huge! we really want great wasm coverage to
         | widen the playing field for everyone).
         | 
         | Also -> actually Wasmer does have a small part in this whole
         | story with Doom, too, which is sorta neat (will come up in the
         | next few videos!).
        
       | AndreasMoeller wrote:
       | This was the best thing I saw all day
        
       | kgeist wrote:
       | The next challenge could be making TypeScript types run an LLM. I
       | wonder how their performance would compare to that of Excel
       | sheets.
        
       | franky47 wrote:
       | The subtle Devin Townsend references in the video were a super
       | nice touch, Dimitri is literally a Power Nerd.
        
         | dimitropoulos wrote:
         | I don't have any tattoos, but if I did, it would most
         | definitely be of the world's ultimate cup of coffee!
        
       | porsager wrote:
       | And yet it's still not possible to type tagged template
       | literals...
       | 
       | https://github.com/microsoft/TypeScript/pull/49552#issuecomm...
       | 
       | Insane achievement nonetheless!
        
       | bobsmooth wrote:
       | As someone that's unfamiliar with typescript, can someone explain
       | exactly what was accomplished here?
        
       | theThree wrote:
       | Can anyone explain to me what is "TypeScript types"?
        
       | notfed wrote:
       | > "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 achievement.
        
       | internetter wrote:
       | Out of curiosity, could the learnings/toolings from this project
       | have real improvements to more "practical" TypeScript?
        
       | dgunay wrote:
       | 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.
        
       ___________________________________________________________________
       (page generated 2025-02-26 23:00 UTC)