Except, I don't want to use eval or do. You're missing the fact that this is a QA application.

Well, if you reread the original post at the top of the thread, it is QA people who will be using this. They aren't programmers, but presumably they know how to do QA. If not, the company has problems that inventing a scripting language won't solve.

As for Turing-completeness, I might be wrong, but I believe that GOTO, JZ, and JNZ are the minimal requirements for Turing completeness

It depends. Turing-completeness is about equivalence, not a specific implementation. Unlambda is Turing complete but does not provide GOTO or anything like it, really. (All the work in Unlambda is done by combining and applying functions.) Pascal does not provide GOTO and is certainly Turing complete. I don't think Befunge provides GOTO; it handles control flow by changing directions, not positions. Hofstadter argues convincingly that sufficiently powerful formal systems in math (e.g., Typographical Number Theory or Principia Mathematica) are Turing-equivalent.update: No, wait, that's not right. TNT represents all primitive recursive truths, but not all general recursive truths. I was momentarily confused. P.M. is probably similar. It is, however, almost certainly possible to construct a Turing equivalent formal system.

Also, I do not see why both JZ and JNZ should be required; they are, as near as I can determine, equivalent; at _least_ they are equivalent if you also have GOTO, because a JNZ followed by a GOTO is equivalent to a JZ, and a JZ followed by a GOTO is equivalent to a JNZ. However, a decision mechanism of some kind (what I called "conditionals") is needed. JZ and JNZ can provide this. In Perl we use (among other things) if. I suspect, however, that conditionals are a feature the QA people in question (who don't want to learn Perl) won't need, at least, not initially. All they really want to do, as I understand it, is call a series of prefabricated procedures that the OP is going to write.


$;=sub{$/};@;=map{my($a,$b)=($_,$;);$;=sub{$a.$b->()}} split//,".rekcah lreP rehtona tsuJ";$\=$ ;->();print$/

In reply to Re: Keyword parser function mapping module by jonadab
in thread Keyword parser function mapping module by apprentice

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.