I don't believe programs can handle as much randomness as you're suggesting...
Perhaps an alternative scheme;
- Predefined functions Munge() and MungeConsistently() will be available.
- Munge calls MungeConsistently, but passes in the count of how many calls to Munge have already been made, so it is essentially random but still reproducible.
- MungeConsistently takes a number as its first parameter, which will be used to pick the sub to call.
- Everybody is given a random number from 0..1, indicating their position in the program. (so that early code can do more input, and late code can do more output)
- PASS 1: Everybody then submits a small block of code that does something "useful", PLUS a small subroutine to be included in the Munges
- PASS 2: Each person is given the task of gluing together two adjacent pieces of code, NOT including their own. (One player is chosen to glue the command line to the first block by choosing the input parameters, so there are N glues for N players)
The second pass to glue things together should change the result from a twitching mass of random code to something that at least runs to completion. (I hope)
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|