[{"data":1,"prerenderedAt":216},["ShallowReactive",2],{"project-41444855":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":41,"post_text":42,"what":43,"said":71,"maker_in_thread":115,"shape":122,"grid":126,"attempts":177,"same_week":178,"maker_shows":34,"maker_hidden":208,"reader_version":209,"card":210},"41444855","tetris-sql","Using SQL's Turing completeness to build Tetris","title","Show HN: Using SQL's Turing completeness to build Tetris","https:\u002F\u002Fgithub.com\u002Fnuno-faria\u002Ftetris-sql","github.com","nffaria",1725452900,2024,338,19,162,3515,5,"legend","games","puzzle game","other",[24,25,26,27],"sql","tetris","recursive cte","turing complete","loved",0.538,{"positive":31,"neutral":32,"mixed":33,"critical":34},10,3,0,1,14,{"idea":37,"docs":39},{"positive":38,"critical":34},6,{"positive":40,"critical":33},2,[18,33,33,32,18,18,18,18,33,18,32,32,33,18,18,18,18,34,33],null,{"problem":44,"audience":42,"pricing":42,"motivation":51,"time_to_build":42,"stack":55,"openness":70,"stage":70,"team_size":70},{"value":45,"source":46,"evidence":47},"Explores how far SQL can be pushed given it is Turing complete","maker",[48],{"id":49,"by":11,"text":50},"41488103","Mainly to see if it was possible. I have been wondering for quite some time how far can you push SQL, given it is Turing complete.",{"value":52,"source":46,"evidence":53},"To see if it was possible and how far SQL can be pushed",[54],{"id":49,"by":11,"text":50},[56,62],{"value":57,"source":46,"evidence":58},"SQL",[59],{"id":60,"by":11,"text":61},"41475605","While there were some workarounds needed to implement the game, such as handling input and output, the core of the game logic uses regular SQL. Even recursive CTEs are part of…",{"value":63,"source":64,"evidence":65},"PostgreSQL","inferred",[66],{"id":67,"by":68,"text":69},"41469600","written-beyond","I will admit that in the past I've used `RAISE NOTICE` quite frequently for debugging difficult to navigate PL\u002FpgSQL procedures.","unknown",{"praise":72,"objections":104,"requests":112,"questions":113,"alternatives":114},[73,85,93],{"value":74,"source":75,"evidence":76},"Fun and creative demonstration of working within constraints","commenter",[77,81],{"id":78,"by":79,"text":80},"41468730","jihadjihad","It seems at first to be a toy or silly intellectual exercise, but after reading the whole thing it really feels like an example of how constraints can lead to creative solutions.…",{"id":82,"by":83,"text":84},"41470167","fishtoaster","This is hilarious and amazing. But moreso than most such cool hack projects, it has a great writeup. The author really did a great job walking through how it worked. Love it.",{"value":86,"source":75,"evidence":87},"Excellent write-up and documentation",[88,92],{"id":89,"by":90,"text":91},"41468896","foreigner","This is great but even more impressive than the code is all the documentation and explanation of how it works. Well done!",{"id":82,"by":83,"text":84},{"value":94,"source":75,"evidence":95},"Impressive hack that shows what SQL can do",[96,100],{"id":97,"by":98,"text":99},"41471054","tisdadd","Nice, I remember my boss telling me not to do that when I was an intern for routing services, always wanted to see a working example. Well done.",{"id":101,"by":102,"text":103},"41470648","prng2021","Wow this is amazing. Makes me realize how elementary my SQL skills are.",[105],{"value":106,"source":75,"evidence":107},"Implementation is convoluted and relies on extensions rather than pure SQL",[108],{"id":109,"by":110,"text":111},"41475544","johnwatson11218","The article you linked, \"tetris-sql,\" appears to be using database extensions to overcome SQL's limitations. While the core SQL language itself is not Turing complete, these…",[],[],[],{"comments":32,"answered":40,"key":116},[117,120,121],{"id":118,"text":119},"41468879","Thanks for the kind words, it was exactly like you described. Many times I thought it would not be possible after hitting some of those walls, but luckily there was always a way…",{"id":49,"text":50},{"id":60,"text":61},{"commenters":123,"max_depth":32,"maker_replies":32,"first_comment_mins":124,"lifespan_hours":125},16,3262,121,[127,129,131,135,137,140,142,143,147,150,153,156,161,162,164,169,171,173,176],[78,33,18,128,79,33],"project\u002Fpositive\u002Fidea",[118,33,33,130,11,34],"maker\u002Fneutral\u002Fnone",[132,33,33,133,134,33],"41469039","other\u002Fneutral\u002Fnone","tanelpoder",[67,33,32,136,68,33],"project\u002Fneutral\u002Fnone",[138,34,18,128,139,33],"41468729","abhgh",[89,40,18,141,90,33],"project\u002Fpositive\u002Fdocs",[82,32,18,141,83,33],[144,145,18,128,146,33],"41470945",4,"gfody",[148,145,33,133,149,33],"41473727","thih9",[151,18,18,128,152,33],"41468872","otteromkram",[154,38,32,136,155,33],"41475192","chaps",[157,158,32,159,160,33],"41486757",7,"maker\u002Fneutral\u002Fidea","jamiehewitt",[49,158,33,159,11,34],[163,158,18,128,160,33],"41488573",[165,166,18,167,168,33],"41469752",8,"maker\u002Fpositive\u002Fnone","gigatexal",[97,170,18,128,98,33],9,[101,31,18,172,102,33],"project\u002Fpositive\u002Fnone",[109,174,34,175,110,33],11,"project\u002Fcritical\u002Fidea",[60,174,33,159,11,34],[],[179,184,188,193,198,203],{"id":180,"name":181,"points":182,"category":183},"41416714","Linkpreview",362,"dev_tools",{"id":185,"name":186,"points":187,"category":20},"41424371","Defrag the Game",326,{"id":189,"name":190,"points":191,"category":192},"41448439","AlphaFold3",314,"ai",{"id":194,"name":195,"points":196,"category":197},"41389176","solar concentrator",296,"hardware",{"id":199,"name":200,"points":201,"category":202},"41424954","Broadcast Box",283,"infrastructure",{"id":204,"name":205,"points":206,"category":207},"41436338","Repaint",236,"web_saas",false,"v2",{"id":211,"name":5,"line":6,"ai":208,"cat":20,"year":13,"points":14,"comments":15,"rec":28,"s":212,"top":18,"kw":213,"maker":11,"domain":10,"tier":19,"attempts":33,"strip":214,"url":9,"mix":215,"praise":74,"objection":106,"sub":21},41444855,0.54,[24,25,26,27],"5003555505330555510",[31,32,33,34],1794036660450]