[{"data":1,"prerenderedAt":727},["ShallowReactive",2],{"project-24615185":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":28,"sentiment":29,"stance_mix":30,"scored_comments":35,"aspects":36,"strip":46,"post_text":48,"what":49,"said":69,"maker_in_thread":168,"shape":176,"grid":180,"attempts":692,"same_week":693,"maker_shows":39,"maker_hidden":719,"reader_version":720,"card":721},"24615185","ts-sql","A SQL database implemented purely in TypeScript type annotations","title","Show HN: A SQL database implemented purely in TypeScript type annotations","https:\u002F\u002Fgithub.com\u002Fcodemix\u002Fts-sql","github.com","phpnode",1601289485,2020,426,191,74,3028,3,"legend","languages","type-level programming demo","library",[24,25,26,27],"typescript","sql","template literal types","type system","mixed",0.185,{"positive":31,"neutral":32,"mixed":33,"critical":34},19,26,1,7,53,{"idea":37,"execution":40,"design":42,"docs":44,"performance":45},{"positive":38,"critical":39},17,4,{"positive":41,"critical":33},2,{"positive":43,"critical":33},0,{"positive":43,"critical":43},{"positive":43,"critical":33},[47,47,18,47,43,33,43,39,43,18,18,39,43,43,43,43,43,43,18,43,43,43,43,33,39,18,43,43,43,43,43,39,47,18,18,33,18,18,18,47],5,null,{"problem":50,"audience":48,"pricing":48,"motivation":57,"time_to_build":48,"stack":61,"openness":68,"stage":68,"team_size":68},{"value":51,"source":52,"evidence":53},"Demonstrates parsing SQL queries and computing result types purely at compile time with TypeScript types","maker",[54],{"id":55,"by":11,"text":56},"24615556","oh let's be clear there's no sensible real world use cases of this thing. it's a demonstration of what TS's type system can do",{"value":58,"source":52,"evidence":59},"A demonstration of what TypeScript's type system can do",[60],{"id":55,"by":11,"text":56},[62],{"value":63,"source":64,"evidence":65},"TypeScript","inferred",[66],{"id":67},"post","unknown",{"praise":70,"objections":94,"requests":115,"questions":130,"alternatives":149},[71,87],{"value":72,"source":73,"evidence":74},"Impressive demonstration of TypeScript's type system and template literal types","commenter",[75,79,83],{"id":76,"by":77,"text":78},"24615423","Tarean","The implementation isn't even that horrible. Ignoring the integer list. That workaround is still hillarious to me. Anyway, it seems both impressive that someone did this and that…",{"id":80,"by":81,"text":82},"24615429","amitport","This is a great demonstration of typescript's flexibility",{"id":84,"by":85,"text":86},"24616300","tobyhinloopen","This is terrible, I love it",{"value":88,"source":73,"evidence":89},"Useful for learning advanced TypeScript generics",[90],{"id":91,"by":92,"text":93},"24620431","kamilafsar","Very interesting project. If you want a deep dive into TypeScript generics, this project's code is truly a must-read! This project really shows how powerful TypeScript has become…",[95,104,111],{"value":96,"source":52,"evidence":97},"Parsing is fragile and lacks escaping and whitespace handling",[98,101],{"id":99,"by":11,"text":100},"24615459","it's a bit fragile only due to my laziness, it could be done properly if this were a serious project.",{"id":102,"by":11,"text":103},"24616163","same mechanism, just deal with more edge cases. e.g. whitespace isn't really trimmed correctly at the moment, it doesn't handle escaping quotes in strings and so on. I did think…",{"value":105,"source":73,"evidence":106},"Complex types hurt readability and maintainability",[107],{"id":108,"by":109,"text":110},"24617351","flowerlad","This shows how complex TypeSript has become. It may be fun to write complicated Type annotations such as this, but imagine having to read and maintain the code!",{"value":112,"source":52,"evidence":113},"No practical real-world use cases",[114],{"id":55,"by":11,"text":56},[116,123],{"value":117,"source":73,"evidence":118},"Compute types from JavaScript functions rather than type-level code",[119],{"id":120,"by":121,"text":122},"24617690","bartq","That's pretty neat. What I really want is this: ``` function fn(query:string){ const stuff = \u002F\u002F do some stuff with `query` variable return createType(stuff); } type MyType =…",{"value":124,"source":73,"evidence":125},"Type-safe GraphQL queries without a code generation step",[126],{"id":127,"by":128,"text":129},"24617897","alangpierce","Great project, really expands what feels possible with the new improvements in TS 4.1. I wonder if this strategy could also be used to have strongly-typed GraphQL queries without…",[131,142],{"value":132,"source":73,"evidence":133},"Is it actually useful beyond being a demo?",[134,138],{"id":135,"by":136,"text":137},"24634576","blitz_skull","Genuinely curious: is this actually useful or just a cool thing that is useful simply for the fact that it can be done?",{"id":139,"by":140,"text":141},"24615549","ralusek","I'm viewing this on my phone, so maybe I'm missing something, but isn't this getting all of its typing information from you explicitly declaring a result set `as const`, and then…",{"value":143,"source":73,"evidence":144},"Why is this functionality in the language",[145],{"id":146,"by":147,"text":148},"24615443","chrismorgan","I’m impressed\u002Ffascinated\u002Fhorrified by the way it parses a string into a type with a variant of template literal syntax—though it looks like the parsing is probably very fragile.…",[150,161],{"value":151,"source":73,"evidence":152},"Zod and io-ts for runtime validation",[153,157],{"id":154,"by":155,"text":156},"24616398","smichel17","This is why you need input validation. Eg, zod or io-ts.",{"id":158,"by":159,"text":160},"24621690","colinmcd","Or just plain zod",{"value":162,"source":73,"evidence":163},"myzod for runtime type validation",[164],{"id":165,"by":166,"text":167},"24618497","IggleSniggle","You should checkout myzod, which is very close to this experience.",{"comments":169,"answered":34,"key":170},11,[171,172,173],{"id":99,"text":100},{"id":102,"text":103},{"id":174,"text":175},"24615445","> The implementation isn't even that horrible You're making me blush! The list of integers could be replaced by using tuples and reading their lengths to do basic arithmetic.…",{"commenters":177,"max_depth":178,"maker_replies":169,"first_comment_mins":32,"lifespan_hours":179},118,9,99,[181,183,185,188,189,193,196,200,203,205,206,210,214,217,220,224,227,228,231,234,237,239,242,245,248,251,254,257,261,263,266,269,272,275,279,283,285,288,291,294,296,299,301,305,308,310,313,315,317,320,323,325,327,332,335,338,340,343,346,349,351,354,357,360,362,364,367,369,372,375,377,379,382,384,386,389,391,394,397,400,403,406,409,412,415,416,418,421,424,426,429,430,431,433,436,440,443,445,448,450,454,456,458,461,463,465,468,470,472,474,477,479,482,485,488,491,494,496,498,501,504,507,509,511,513,516,519,521,524,526,529,531,534,537,539,542,544,547,549,551,553,555,558,561,564,567,569,572,575,577,582,584,586,588,591,594,596,598,601,605,608,611,614,618,620,622,625,627,630,633,635,637,640,644,647,651,654,658,660,662,666,667,670,675,677,681,683,684,686,688,690],[146,43,47,182,147,43],"project\u002Fpositive\u002Fidea",[99,43,43,184,11,33],"maker\u002Fneutral\u002Fexecution",[186,43,18,184,187,43],"24616034","3np",[102,43,43,184,11,33],[190,43,43,191,192,43],"24615514","other\u002Fneutral\u002Fidea","nicoburns",[194,43,43,191,195,43],"24624442","ianhorn",[197,43,43,198,199,43],"24625254","other\u002Fneutral\u002Fnone","AlphaSite",[201,43,43,198,202,43],"24619951","dcre",[76,33,47,204,77,43],"project\u002Fpositive\u002Fexecution",[174,33,43,184,11,33],[207,33,18,208,209,43],"24615651","project\u002Fneutral\u002Fidea","jedimastert",[211,33,18,212,213,43],"24616332","project\u002Fneutral\u002Fexecution","jitl",[215,33,18,212,216,43],"24616440","akavi",[218,33,43,219,11,33],"24616455","maker\u002Fneutral\u002Fnone",[221,33,43,222,223,43],"24616915","commenter\u002Fneutral\u002Fnone","jakear",[225,41,47,182,226,43],"24615699","esamatti",[127,18,47,182,128,43],[229,39,47,182,230,43],"24615446","cjdell",[232,39,47,182,233,43],"24615568","ricksharp",[235,39,43,198,236,43],"24615868","cuddlecake",[238,39,43,198,230,43],"24616359",[240,39,43,191,241,43],"24625789","dixon395",[243,47,43,198,244,43],"24618305","bionhoward",[246,47,43,198,247,43],"24624920","ozorOzora",[249,47,43,198,250,43],"24628514","yowlingcat",[252,47,43,198,253,43],"24639964","mewpmewp2",[108,255,33,256,109,43],6,"project\u002Fcritical\u002Fdesign",[258,255,43,259,260,43],"24618990","commenter\u002Fneutral\u002Fdesign","smt88",[262,255,43,259,128,43],"24620015",[264,255,43,198,265,43],"24620781","freeqaz",[267,255,43,198,268,43],"24640128","eyelidlessness",[270,255,43,198,271,43],"24625288","searchableguy",[273,255,43,259,274,43],"24631727","bhandziuk",[276,34,33,277,278,43],"24616323","project\u002Fcritical\u002Fidea","aleksjess",[280,281,43,282,233,43],"24615460",8,"commenter\u002Fneutral\u002Fidea",[284,281,47,182,233,43],"24616422",[286,281,43,198,287,43],"24621870","thrashh",[289,281,47,182,290,43],"24622904","gfody",[292,281,43,198,293,43],"24631222","throwaway7422u",[295,281,43,198,233,43],"24635336",[297,281,43,222,298,43],"24618002","johnghanks",[300,281,43,222,233,43],"24620558",[302,178,18,303,304,43],"24615959","project\u002Fneutral\u002Fnone","dandare",[306,178,33,277,307,43],"24616009","alex_duf",[309,178,47,182,290,43],"24622781",[311,178,18,208,312,43],"24624314","nsonha",[314,178,18,208,307,43],"24625585",[316,178,43,282,312,43],"24627867",[318,178,18,208,319,43],"24616084","tombh",[321,178,18,303,322,43],"24616140","SCLeo",[324,178,43,198,304,43],"24621158",[326,178,43,198,312,43],"24624303",[328,329,18,330,331,43],"24623925",10,"project\u002Fneutral\u002Fdesign","gitgud",[333,329,18,330,334,43],"24623998","ruffrey",[336,169,43,198,337,43],"24623851","kwindla",[84,339,47,182,85,43],12,[341,342,43,198,230,43],"24615987",13,[344,342,43,222,345,43],"24616018","PudgePacket",[347,342,43,198,348,43],"24616093","akmittal",[350,342,43,198,230,43],"24616141",[352,342,43,282,353,43],"24616258","h0h0h0h0111",[355,342,43,282,356,43],"24616415","williamdclt",[358,342,43,222,359,43],"24616759","faichai",[361,342,43,222,11,33],"24616776",[363,342,43,222,353,43],"24662376",[365,342,43,282,366,43],"24616459","inbx0",[368,342,43,282,166,43],"24618431",[370,342,43,222,371,43],"24625865","maxgraey",[373,342,43,282,374,43],"24616481","bengillies",[376,342,43,222,233,43],"24616499",[378,342,43,282,356,43],"24616712",[380,342,43,381,11,33],"24616745","commenter\u002Fneutral\u002Fdocs",[383,342,43,222,233,43],"24617257",[385,342,43,222,366,43],"24616814",[387,342,43,222,388,43],"24617334","svieira",[390,342,43,222,233,43],"24619568",[392,342,43,282,393,43],"24616561","BreakfastB0b",[395,342,43,222,396,43],"24617060","mind-blight",[398,342,43,222,399,43],"24618221","maple3142",[401,342,43,222,402,43],"24617579","z3t4",[404,342,43,222,405,43],"24618146","ballenf",[407,342,43,282,408,43],"24618567","p4bl0",[410,342,43,282,411,43],"24622791","int_19h",[413,342,43,282,414,43],"24616160","Merad",[154,342,43,282,155,43],[417,342,18,303,230,43],"24616452",[419,342,43,222,420,43],"24616578","buu700",[422,342,43,282,423,43],"24616506","52-6F-62",[425,342,43,222,11,33],"24616977",[427,342,43,282,428,43],"24617489","vorticalbox",[165,342,43,222,166,43],[158,342,43,222,159,43],[432,342,43,222,166,43],"24635675",[434,342,43,435,428,43],"24659815","commenter\u002Fpositive\u002Fnone",[437,342,43,438,439,43],"24620101","commenter\u002Fcritical\u002Fidea","mypalmike",[441,342,43,282,442,43],"24620247","wolfgang42",[444,342,43,282,411,43],"24622834",[446,342,43,282,447,43],"24616562","DougBTX",[449,342,43,282,230,43],"24616629",[451,342,43,452,453,43],"24616510","commenter\u002Fpositive\u002Fidea","jey",[455,342,43,222,11,33],"24616528",[457,342,43,282,312,43],"24624414",[459,342,43,222,460,43],"24616680","tegeek",[462,342,43,222,230,43],"24616923",[464,342,43,222,453,43],"24617181",[466,342,43,222,467,43],"24620347","chrischen",[469,342,43,222,312,43],"24624932",[471,342,43,435,233,43],"24620867",[473,342,43,452,460,43],"24616567",[475,342,43,198,476,43],"24619203","dynamite-ready",[478,342,43,198,476,43],"24621747",[480,342,43,198,481,43],"24628792","bmarkovic",[483,342,43,198,484,43],"24626467","bruh2",[486,342,33,277,487,43],"24616799","Wilem82",[489,342,18,208,490,43],"24616902","kingdomcome50",[492,342,18,493,487,43],"24617022","project\u002Fneutral\u002Fdocs",[495,342,43,204,11,33],"24617286",[497,342,47,204,490,43],"24617447",[499,342,43,198,500,43],"24617529","rimliu",[502,342,33,503,487,43],"24618873","project\u002Fcritical\u002Fexecution",[505,342,43,222,506,43],"24619208","zamadatix",[508,342,43,222,490,43],"24619500",[510,342,43,222,487,43],"24620429",[512,342,47,182,490,43],"24619243",[514,342,43,198,515,43],"24618016","aszen",[517,342,43,198,518,43],"24618791","throwanem",[520,342,43,198,515,43],"24619483",[522,342,43,198,523,43],"24618889","mattgreenrocks",[525,342,43,222,515,43],"24619154",[527,342,43,198,528,43],"24618026","erikpukinskis",[530,342,43,198,460,43],"24618257",[532,342,43,198,533,43],"24618260","dwohnitmok",[535,342,43,198,536,43],"24622492","jacinabox",[538,342,43,222,533,43],"24627716",[540,342,43,198,541,43],"24618281","zensavona",[543,342,43,198,533,43],"24618561",[545,342,43,198,546,43],"24619569","dllthomas",[548,342,43,198,533,43],"24620039",[550,342,43,198,546,43],"24620669",[552,342,43,198,533,43],"24620923",[554,342,43,222,546,43],"24621039",[556,342,43,198,557,43],"24618746","vlang1dot0",[559,342,43,198,560,43],"24618875","dvt",[562,342,43,198,563,43],"24622410","still_grokking",[565,342,43,198,566,43],"24619049","daeken",[568,342,43,198,304,43],"24621395",[570,342,43,198,571,43],"24622447","fendy3002",[573,342,43,198,574,43],"24619068","jariel",[80,576,47,182,81,43],14,[578,579,18,580,581,43],"24615326",15,"project\u002Fmixed\u002Fexecution","CGamesPlay",[583,579,43,219,11,33],"24615332",[585,579,18,208,81,43],"24615437",[587,579,18,208,233,43],"24615675",[589,579,43,222,590,43],"24616249","james-mcelwain",[592,579,43,222,593,43],"24617164","whatshisface",[595,579,43,222,233,43],"24617384",[91,597,47,182,92,43],16,[599,38,18,208,600,43],"24615415","fbn79",[602,603,43,198,604,43],"24616066",18,"bhouston",[606,603,43,198,607,43],"24616173","Jweb_Guru",[609,603,43,198,610,43],"24616436","franky47",[612,31,18,208,613,43],"24616129","bebe3000",[615,616,18,208,617,43],"24616368",20,"soheilpro",[619,616,18,208,356,43],"24616444",[621,616,43,198,233,43],"24617456",[623,616,18,208,624,43],"24620109","greencore",[120,626,18,208,121,43],21,[628,626,43,198,629,43],"24617726","Justsignedup",[631,626,43,198,632,43],"24617784","NieDzejkob",[634,626,43,198,121,43],"24617806",[636,626,33,277,312,43],"24627998",[638,626,43,198,639,43],"24619275","nikki93",[641,642,18,208,643,43],"24618386",22,"primitivesuave",[645,642,43,198,646,43],"24618530","yonixw",[648,649,43,198,650,43],"24617911",23,"gmac",[652,649,43,198,653,43],"24622198","g5becks",[655,656,43,198,657,43],"24620565",24,"thelazydogsback",[659,656,43,198,268,43],"24620611",[661,656,43,198,653,43],"24622063",[663,664,43,198,665,43],"24626951",25,"crazypython",[135,32,18,208,136,43],[668,669,18,330,402,43],"24624675",27,[671,672,33,673,674,43],"24619597",28,"project\u002Fcritical\u002Fperformance","UhDev",[676,672,43,222,388,43],"24619689",[678,679,47,182,680,43],"24617400",29,"meijer",[139,682,18,208,140,43],30,[55,682,43,208,11,33],[685,682,47,182,147,43],"24615613",[687,682,47,182,639,43],"24619295",[689,682,47,182,85,43],"24616331",[691,682,47,182,140,43],"24619588",[],[694,699,703,708,711,715],{"id":695,"name":696,"points":697,"category":698},"24604291","DevUtils.app",241,"dev_tools",{"id":700,"name":701,"points":702,"category":698},"24577642","Headless Recorder",224,{"id":704,"name":705,"points":706,"category":707},"24610658","Keyboard Simulator",210,"creative",{"id":709,"name":710,"points":15,"category":20},"24637797","Ruby One-Liners Cookbook",{"id":712,"name":713,"points":714,"category":707},"24588523","modfy.video",129,{"id":716,"name":717,"points":714,"category":718},"24621479","Motion","productivity",false,"v2",{"id":722,"name":5,"line":6,"ai":719,"cat":20,"year":13,"points":14,"comments":15,"rec":28,"s":723,"top":18,"kw":724,"maker":11,"domain":10,"tier":19,"attempts":43,"strip":725,"url":9,"mix":726,"praise":72,"objection":96,"sub":21},24615185,0.19,[24,25,26,27],"5535010403340000003000014300000453313335",[31,32,33,34],1794036596505]