MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/Python/comments/5eljwc/the_case_for_python_3/daeifcw/?context=3
r/Python • u/earthboundkid • Nov 24 '16
349 comments sorted by
View all comments
Show parent comments
76
Does he want a mathematical proof that it is?
Actually, that's not hard. Brain fuck is proven Turing complete (so is the game of life).
Write any of those in python, and that is a proof that python is at least as powerful as them, therefore python is Turing complete.
71 u/meltingdiamond Nov 24 '16 Writing a brainfuck interpreter has to be the worst way to prove turning completeness. 2 u/iwsfutcmd Nov 24 '16 Now you're making me want to try to write a Brainfuck interpreter for Python. I've never written anything even remotely like an interpreter before, but I'm thinking a BF one really can't be that hard. 2 u/alexanderpas Nov 25 '16 Go for it, it really isn't that hard.The variables you need are:1 string containing the actual brainfuck program1 int containing the position in the program1 list of ints containing the cells that form the data storage1 int containing the active data cell being manipulated1 local int containing the indentation level when returning to the start of or skipping over loops.
71
Writing a brainfuck interpreter has to be the worst way to prove turning completeness.
2 u/iwsfutcmd Nov 24 '16 Now you're making me want to try to write a Brainfuck interpreter for Python. I've never written anything even remotely like an interpreter before, but I'm thinking a BF one really can't be that hard. 2 u/alexanderpas Nov 25 '16 Go for it, it really isn't that hard.The variables you need are:1 string containing the actual brainfuck program1 int containing the position in the program1 list of ints containing the cells that form the data storage1 int containing the active data cell being manipulated1 local int containing the indentation level when returning to the start of or skipping over loops.
2
Now you're making me want to try to write a Brainfuck interpreter for Python. I've never written anything even remotely like an interpreter before, but I'm thinking a BF one really can't be that hard.
2 u/alexanderpas Nov 25 '16 Go for it, it really isn't that hard.The variables you need are:1 string containing the actual brainfuck program1 int containing the position in the program1 list of ints containing the cells that form the data storage1 int containing the active data cell being manipulated1 local int containing the indentation level when returning to the start of or skipping over loops.
Go for it, it really isn't that hard.
The variables you need are:
1 string containing the actual brainfuck program
1 int containing the position in the program
1 list of ints containing the cells that form the data storage
1 int containing the active data cell being manipulated
1 local int containing the indentation level when returning to the start of or skipping over loops.
76
u/[deleted] Nov 24 '16
Does he want a mathematical proof that it is?
Actually, that's not hard. Brain fuck is proven Turing complete (so is the game of life).
Write any of those in python, and that is a proof that python is at least as powerful as them, therefore python is Turing complete.