HackerTrans
TopNewTrendsCommentsPastAskShowJobs

nffaria

no profile record

Submissions

Show HN: Using SQL's Turing completeness to build Tetris

github.com
338 points·by nffaria·2 jaar geleden·19 comments

comments

nffaria
·2 jaar geleden·discuss
Noita is an amazingly complex game, from the alchemy reactions, to the cryptographic secrets [1], to the wand building mechanic -- which is itself like a small programming language.

Here is someone using a (really complex) wand to beat the game in 2 seconds (some spoilers): https://youtu.be/YYTB5_zBANg?feature=shared&t=309

[1] https://noita.wiki.gg/wiki/Eye_Messages
nffaria
·2 jaar geleden·discuss
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.
nffaria
·2 jaar geleden·discuss
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 the SQL standard (https://en.wikipedia.org/wiki/SQL:1999#Common_table_expressi...), which makes the language Turing complete. Also, apart from the small function to print to stdout, there were no procedural languages used.
nffaria
·2 jaar geleden·discuss
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 around them.