News for hackers. Stuff that matters.
Re:Accidentally Turing-Complete by moreati on Friday April 24, 2020 @03:17AM (#22965475)
I'm still not sure if Python Pickles, without the GLOBAL opcode to call into Python, are Turing complete.

Python pickle files are a sequence of op-codes that run on the pickle VM. By default the VM allows calls to arbitrary Python functions. I'm still puzzling whether Python pickles without access to Python globals (e.g. using https://docs.python.org/3/library/pickle.html#restricting-gl...) are Turing complete. I don't think so, because the pickle VM has no branching or looping, but it does have a stack and my understanding of automata theory is not great.

My research/tinkering so far is https://github.com/moreati/pickle-fuzz

Re:Accidentally Turing-Complete by bugmen0t on Friday April 24, 2020 @10:17AM (#22968177)
Pickle is a stack machine (https://en.wikipedia.org/wiki/Stack_machine). It is Turing complete. See source code and documentation at https://github.com/python/cpython/blob/master/Lib/pickle.py#... https://github.com/python/cpython/blob/master/Lib/pickletool...

N.B: "Turing complete" really means a lot less than you seem to believe.

Re:Accidentally Turing-Complete by Dylan16807 on Friday April 24, 2020 @10:37AM (#22968389)
A machine that has a stack and runs a series of instructions in sequence, no looping or branching, is a pushdown automaton. That's significantly weaker than Turing complete.

(A pushdown automaton can do branching if it wants, but the lack of looping / going left is critical.)