[{"data":1,"prerenderedAt":309},["ShallowReactive",2],{"project-37438028":3},{"id":4,"name":5,"line":6,"line_source":7,"title":8,"url":9,"domain":10,"maker":11,"posted_at":12,"year":13,"points":14,"comments":15,"rank_in_year":16,"shown_in_year":17,"top":18,"tier":19,"category":20,"subcategory":21,"format":22,"keywords":23,"reception":29,"sentiment":30,"stance_mix":31,"scored_comments":35,"aspects":36,"strip":45,"post_text":46,"what":47,"said":58,"maker_in_thread":130,"shape":135,"grid":139,"attempts":272,"same_week":273,"maker_shows":38,"maker_hidden":301,"reader_version":302,"card":303},"37438028","cursed-typescript","Conway's Game of Life in TypeScript's type system","title","Show HN: Conway's Game of Life in TypeScript's type system","https:\u002F\u002Fgithub.com\u002FRuyiLi\u002Fcursed-typescript\u002Fblob\u002Fmaster\u002Frandom\u002Fgame-of-life.ts","github.com","candleknight",1694200307,2023,186,45,307,3109,10,"notable","languages","type system experiments","other",[24,25,26,27,28],"typescript","type system","game of life","template literal types","conditional types","mixed",-0.025,{"positive":32,"neutral":18,"mixed":33,"critical":34},5,0,6,21,{"execution":37,"idea":39,"docs":41,"performance":42,"design":43},{"positive":33,"critical":38},1,{"positive":40,"critical":38},3,{"positive":33,"critical":38},{"positive":38,"critical":38},{"positive":33,"critical":44},2,[40,40,33,40,40,33,32,33,33,33,33,33,33,33,33,33,32,38,32,40,40,38,40,33,33,33,33,33,33,32,33,33,40,40,32,38,38,40,33,38],"TypeScript playground: https:\u002F\u002Fwww.typescriptlang.org\u002Fplay?#code\u002FKYDwDg9gTgLgBDAnmYcCiBHArgQwDYDOAPABoA0cAmgHxwC8AUHHABREAq1LAlPbe3FAxgAOwAmBOCTgB+OAEY4ALjgAmXkNESmrDl151+gkMPGTKshcrW85MKFlQqAZvgLAA3AwZIUcAMLAeHj0cADkIGFwAD7hAHRhPsioAEIQOFBioYHBANoAugXevqgAavgAlmIAkuKgRACCUFDGphJwWCIA1iIQAO4iBbSMzGggAMZ4WGLARF3AiBDOcE1QFGOT07Pzi8urFAAGACQA3iJYALYARsBQAL4H1LSaZnDHJxUizrdwAHKtWkk52utweOjkvx0KhEwAAbrdvAB6RFwAAiEGABBEYXgAAscOI8KgYQBzHAwCrwuDQOAzcYVC74ODjHDuAgMZFwaowMKSAm9RCfEkICBwfGE1AwXHEuE-FnuCgEUXVMIXDoEIVwAC0ilZcBwcHcIgpMJCsPwjjgnwIwhwYiSfgAylgrvIiP8Xu1gTc1gEAa8AAwFUJDeg6eyWz2STC4QjuigB2ixGNue",{"problem":48,"audience":48,"pricing":48,"motivation":48,"time_to_build":48,"stack":49,"openness":56,"stage":57,"team_size":57},null,[50],{"value":51,"source":52,"evidence":53},"TypeScript","maker",[54],{"id":55},"post","open_source","unknown",{"praise":59,"objections":76,"requests":95,"questions":107,"alternatives":119},[60],{"value":61,"source":62,"evidence":63},"Clever and fun demonstration of TypeScript's type system","commenter",[64,68,72],{"id":65,"by":66,"text":67},"37439762","vishnumenon","Love it! Reminds me of the hilarious \"Typing the technical interview\" [1] and \"Typescripting the technical interview\" [2], a couple of my favorite blog posts of all time. [0]…",{"id":69,"by":70,"text":71},"37439441","hbn","Sometimes I think I don't understand TypeScript's type system and then I see something like this and I realize I know even less than I thought",{"id":73,"by":74,"text":75},"37440666","maxbendick","I'm happy to see people learning the Curry–Howard isomorphism the fun way.",[77,88],{"value":78,"source":62,"evidence":79},"Hard to read and understand the type code",[80,84],{"id":81,"by":82,"text":83},"37442022","dmalvarado","I though I knew TypeScript pretty well, but I can barely read that.",{"id":85,"by":86,"text":87},"37439744","Thaxll","I'm really confused, is it what TS is supposed to looks like?",{"value":89,"source":62,"evidence":90},"Slow to compute",[91],{"id":92,"by":93,"text":94},"37443737","thdespou","This is probably the slowest Game of Life ever.",[96],{"value":97,"source":62,"evidence":98},"Explain how to run or see the output",[99,103],{"id":100,"by":101,"text":102},"37439003","calebegg","How do I run this\u002Fsee the results? I'm a little lost.",{"id":104,"by":105,"text":106},"37439072","aazo11","Same here. I hit \"run\" but get an error",[108],{"value":109,"source":62,"evidence":110},"How to view the board state in the playground",[111,115],{"id":112,"by":113,"text":114},"37439132","_jab","Because it's all just types, there's nothing _to_ run. Instead, you'll want to hover your cursor over the `PGunX` types at the end of the file in the playground; this will cause…",{"id":116,"by":117,"text":118},"37439439","dag11","In the typescript playground, the best way to see the output of any evolution number is to have it autocomplete a string literal! Uncomment one of the PGunXX types that you want…",[120],{"value":121,"source":62,"evidence":122},"Other type-level programs such as a TypeScript lambda calculus interpreter",[123,127],{"id":124,"by":125,"text":126},"37439963","evolveyourmind","You can also easily implement meta-languages. Eg. lambda calculus: https:\u002F\u002Fgithub.com\u002Fdesi-ivanov\u002Fts-lambda-calc",{"id":128,"by":125,"text":129},"37439935","Yes: https:\u002F\u002Fgithub.com\u002Fdesi-ivanov\u002Fts-lambda-calc",{"comments":38,"answered":33,"key":131},[132],{"id":133,"text":134},"37441680","the power of tail call optimization :)",{"commenters":136,"max_depth":34,"maker_replies":38,"first_comment_mins":137,"lifespan_hours":138},39,43,69,[140,142,145,147,150,153,157,159,163,166,169,172,175,177,179,182,185,188,191,196,200,203,206,208,211,213,214,218,221,225,228,230,233,235,240,241,244,248,251,252,254,257,260,262,265,268],[116,33,40,141,117,33],"project\u002Fneutral\u002Fexecution",[143,33,40,141,144,33],"37441815","eyelidlessness",[65,38,33,146,66,33],"other\u002Fpositive\u002Fnone",[148,38,40,141,149,33],"37439904","epgui",[151,38,40,141,152,33],"37440063","other_herbert",[154,38,33,155,156,33],"37444188","other\u002Fneutral\u002Fnone","mizzao",[69,44,32,158,70,33],"project\u002Fpositive\u002Fidea",[160,44,33,161,162,33],"37439773","other\u002Fneutral\u002Fidea","jimkoen",[164,44,33,161,165,33],"37439894","chatmasta",[167,44,33,155,168,33],"37439918","prologist",[170,44,33,155,171,33],"37440157","baq",[173,44,33,155,174,33],"37440565","divs1210",[176,44,33,161,168,33],"37440792",[178,44,33,155,174,33],"37469051",[180,44,33,161,181,33],"37442984","bazoom42",[183,44,33,155,184,33],"37443854","ushakov",[186,40,33,155,187,33],"37439042","kiechu",[189,40,33,155,190,33],"37439355","franky47",[192,193,32,194,195,33],"37440530",4,"maker\u002Fpositive\u002Fnone","jhirshman",[197,32,38,198,199,33],"37442672","project\u002Fcritical\u002Fidea","heroku",[201,34,32,158,202,33],"37438681","brundolf",[204,34,33,161,205,33],"37439415","klysm",[124,34,40,207,125,33],"project\u002Fneutral\u002Fidea",[100,209,40,210,101,33],7,"project\u002Fneutral\u002Fdocs",[104,209,38,212,105,33],"project\u002Fcritical\u002Fexecution",[112,209,40,210,113,33],[215,216,33,161,217,33],"37439761",8,"brap",[219,216,33,161,220,33],"37439827","phpnode",[222,216,33,223,224,33],"37440531","other\u002Fpositive\u002Fidea","quickthrower2",[226,216,33,227,217,33],"37440893","commenter\u002Fneutral\u002Fnone",[229,216,33,161,220,33],"37447218",[231,216,33,161,232,33],"37439840","bafe",[234,216,33,161,217,33],"37448946",[236,237,32,238,239,33],"37438584",9,"project\u002Fpositive\u002Fperformance","nimos",[133,237,33,238,11,38],[242,18,33,155,243,33],"37439584","JoeAltmaier",[245,246,40,207,247,33],"37439396",11,"koolala",[249,246,40,207,250,33],"37439882","thamer",[128,246,33,161,125,33],[73,253,32,158,74,33],12,[81,255,38,256,82,33],13,"project\u002Fcritical\u002Fdocs",[85,258,38,259,86,33],14,"project\u002Fcritical\u002Fdesign",[261,258,40,207,168,33],"37439948",[263,258,33,161,264,33],"37441189","EMM_386",[92,266,38,267,93,33],15,"project\u002Fcritical\u002Fperformance",[269,270,38,259,271,33],"37441879",16,"nathanfig",[],[274,279,283,288,293,297],{"id":275,"name":276,"points":277,"category":278},"37427127","HackYourNews",335,"ai",{"id":280,"name":281,"points":282,"category":20},"37470611","splat",309,{"id":284,"name":285,"points":286,"category":287},"37444683","Ghidra Plays Mario",207,"dev_tools",{"id":289,"name":290,"points":291,"category":292},"37499375","Lantern",196,"data",{"id":294,"name":295,"points":296,"category":278},"37433218","Rivet",176,{"id":298,"name":299,"points":300,"category":20},"37448914","view.py",173,false,"v2",{"id":304,"name":5,"line":6,"ai":301,"cat":20,"year":13,"points":14,"comments":15,"rec":29,"s":305,"top":18,"kw":306,"maker":11,"domain":10,"tier":19,"attempts":33,"strip":307,"url":9,"mix":308,"praise":61,"objection":78,"sub":21},37438028,-0.02,[24,25,26,27,28],"3303305000000000515331300000050033511301",[32,18,33,34],1794036641504]