[ prog / sol / mona ]

prog


Printf is Turing-complete

1 2021-01-06 13:12

https://www.ioccc.org/2020/carlini/index.html

2 2021-01-06 20:39

It's been a while since I last studied automata theory, but shouldn't a simple finite-state automata suffice for tic-tac-toe? In the description, they reference a paper[0] that claims to actually prove that it is Turing complete, but all they implement is some logic gates, which are even weaker than a finite-state automata!

[0] https://www.usenix.org/system/files/conference/usenixsecurity15/sec15-paper-carlini.pdf

3 2021-01-10 08:15 *

I tried reading that entry. All I know now is that I'm a true mental midget.

4 2021-01-14 17:01

>>3

Here its the expanded version that makes it obvious(fmt is too large to post it here)
while(*d) printf(fmt, d+6,d+8,d+10,d+12,d+14,d+16,d+18,d+20,d+22,0,d+46,d+52,d+48,d+24,d +26,d+28,d+30,d+32,d+34,d+36,d+38,d+40,d+50,(scanf(d+126,d+4),d+(6 -2)+18*(1-d[2]%2)+d[4]*2),d,d+66,d+68,d+70, d+78,d+80,d+82,d+90,d+ 92,d+94,d+97,d+54,d[2],d+2,d+71,d+77,d+83,d+89,d+95,d+72,d+73,d+74 ,d+75,d+76,d+84,d+85,d+86,d+87,d+88,d+100,d+101,d+96,d+102,d+99,d+ 67,d+69,d+79,d+81,d+91,d+93,d+98,d+103,d+58,d+60,d+98,d+126,d+127, d+128,d+129);

5 2021-01-15 05:20

linus explains why writing hardware drivers in raw C is the best option so far.
https://www.youtube.com/watch?v=CYvJPra7Ebk

6 2021-01-15 07:46

>>5 The Year of Rust Kernel Modules
https://hackaday.com/2020/07/15/will-2020-be-the-year-of-rust-in-the-linux-kernel/

7 2021-01-15 20:36

>>7
torvalds would disagree

8 2021-01-15 20:37

*>>6

9


VIP:

do not edit these