Why Nostr? What is Njump?
2023-06-07 02:53:09
in reply to

roconnor at theorem.ca [ARCHIVE] on Nostr: 📅 Original date posted:2011-12-29 🗒️ Summary of this message: OP_EVAL ...

📅 Original date posted:2011-12-29
🗒️ Summary of this message: OP_EVAL proposal makes the script language Turing complete, with no limit on recursion depth, allowing arbitrary computation, and looping.
📝 Original message:On Thu, 29 Dec 2011, theymos wrote:

> On Thu, Dec 29, 2011, at 01:55 AM, roconnor at theorem.ca wrote:
>> The number of operations executed is still bounded by the number of
>> operations occurring in the script. With the OP_EVAL proposal the
>> script language becomes essentially Turing complete, with only an
>> artificial limit on recursion depth preventing arbitrary computation
>> and there is no way to know what code will run without executing it.
>
> Even if OP_EVAL allowed infinite depth, you'd still need to explicitly
> specify all operations performed, since there is no way of looping.

That's not true. Gavin himself showed how to use OP_EVAL to loop:
OP_PUSHDATA {OP_DUP OP_EVAL} OP_DUP OP_EVAL.

Basically OP_DUP lets you duplicate the code on the stack and that is the
key to looping. I'm pretty sure from here we get get Turing completeness.
Using the stack operations I expect you can implement the SK-calculus
given an OP_EVAL that allows arbitrary depth.

OP_EVAL adds dangerously expressive power to the scripting language.

--
Russell O'Connor <http://r6.ca/>;
``All talk about `theft,''' the general counsel of the American Graphophone
Company wrote, ``is the merest claptrap, for there exists no property in
ideas musical, literary or artistic, except as defined by statute.''
Author Public Key
npub1a39ym06slzfdspsuxq2jqcf2u8cddq6sml6w8c28ql28gxw42grqlzue3f