Note that there are some explanatory texts on larger screens.

plurals
  1. POTwitter text compression challenge
    primarykey
    data
    text
    <h3>Rules</h3> <ol> <li>Your program must have two modes: <strong>encoding</strong> and <strong>decoding</strong>.</li> <li><p>When <strong>encoding</strong>:</p> <ol> <li>Your program must take as input some human readable <code>Latin1</code> text, presumably English. <ul> <li>It doesn't matter if you ignore punctuation marks.</li> <li>You only need to worry about actual English words, not L337.</li> <li>Any accented letters may be converted to simple ASCII.</li> <li>You may choose how you want to deal with numbers.</li> <li>123 <ul> <li>one two three</li> <li>one hundred twenty three</li> <li>123</li> <li>1 2 3</li> </ul></li> <li>one hundred twenty three <ul> <li>one two three</li> <li>one hundred twenty three</li> <li>123</li> <li>1 2 3</li> </ul></li> </ul></li> <li><p>Your program must output a message which can be represented in</p> <ul> <li><p>140 code points in the range <code>U+0000</code>–<code>U+10FFFF</code></p> <p>Excluding non-characters:</p> <ul> <li><code>U+FFFE</code></li> <li><code>U+FFFF</code></li> <li><code>U+</code><em><code>n</code></em><code>FFFE</code>, <code>U+</code><em><code>n</code></em><code>FFFF</code> where <em><code>n</code></em> is <code>1</code>–<code>10</code> hexadecimal</li> <li><code>U+FDD0</code>–<code>U+FDEF</code></li> <li><code>U+D800</code>–<code>U+DFFF</code> (surrogate code points).</li> </ul></li> </ul></li> </ol> <p>It may be output in any reasonable encoding of your choice; any encoding supported by <a href="http://www.gnu.org/software/libiconv/" rel="nofollow noreferrer">GNU <code>iconv</code></a> will be considered reasonable, and your platform native encoding or locale encoding would likely be a good choice.</p></li> <li><p>When <strong>decoding</strong>:</p> <ol> <li>Your program should take as input the output of your <strong>encoding</strong> mode.</li> <li>The text output should be an approximation of the input text. <ul> <li>The closer you can get to the original text, the better.</li> <li>Doesn't need to have any punctuation.</li> </ul></li> <li><p>The output text should be readable by a human, again presumably English.</p> <ul> <li>Can be L337, or lol.</li> </ul></li> <li>The decoding process may have no access to any other output of the encoding process other than the output specified above; that is, you can't upload the text somewhere and output the URL for the decoding process to download, or anything silly like that.</li> </ol></li> <li>For the sake of consistency in user interface, your program must behave as follows: <ol> <li>Your program must be a script that can be set to executable on a platform with the appropriate interpreter, or a program that can be compiled into an executable.</li> <li>Your program must take as its first argument either <code>encode</code> or <code>decode</code> to set the mode.</li> <li>Your program must take input in at least one of the following ways: <ul> <li>Take input from standard in and produce output on standard out. <ul> <li><code>my-program encode &lt;input.txt &gt;output.utf</code></li> <li><code>my-program decode &lt;output.utf &gt;output.txt</code></li> </ul></li> <li>Take input from a file named in the second argument, and produce output in the file named in the third. <ul> <li><code>my-program encode input.txt output.utf</code></li> <li><code>my-program decode output.utf output.txt</code></li> </ul></li> </ul></li> </ol></li> <li>For your solution, please post: <ol> <li>Your code, in full, and/or a link to it hosted elsewhere (if it's very long, or requires many files to compile, or something).</li> <li>An explanation of how it works, if it's not immediately obvious from the code or if the code is long and people will be interested in a summary.</li> <li>An example text, with the original text, the text it compresses down to, and the decoded text.</li> <li>If you are building on an idea that someone else had, please attribute them. It's OK to try to do a refinement of someone else's idea, but you <strong>must</strong> attribute them.</li> </ol></li> </ol> <p>The rules are a variation on the rules for <a href="https://stackoverflow.com/questions/891643/twitter-image-encoding-challenge"><strong>Twitter image encoding challenge</strong></a>.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload