Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror
×
Programming Communications It's funny.  Laugh. Social Networks The Internet Technology

1st International Longest Tweet Results 44

Dr_Evil6_6_6 writes "Slashdot had a story about the 1st International Longest Tweet Contest last month, and the winners have just been announced." The winner is impressive.
This discussion has been archived. No new comments can be posted.

1st International Longest Tweet Results

Comments Filter:
  • by SpazmodeusG ( 1334705 ) on Friday April 30, 2010 @07:18AM (#32042528)

    For those wondering of a better way.

    for( i = 4339; i > 0; i-=31) {
        output((wxchar)(bigInt & 0xef)); //output lowest 31bits of our 4339bit block of data
        bigInt = bigInt >> 31; // Shift down
    }

    Reverse

    while( curInput = input() ) {
        bigInt += curInput; // add the 31 bits to the current bitInt
        bigInt = bigInt 31; // Shift up
    }

  • by Zocalo ( 252965 ) on Friday April 30, 2010 @07:26AM (#32042576) Homepage
    It does what is required of the competition. There are 2^4339 available bits in a valid tweet so the first algorithm takes any 2^4339 bit sequence and converts it into a valid tweet, the second converts it back again. What is missing is the means for generating that 2^4339 bit value and converting it back into the original content.

    4339 bits is 542 bytes plus three spare bits, so if you wanted to actually use this for something you could use those three bits to define your data format from one of eight types, then "attach" your data payload to the header to generate the sequence of 4339 bits. Some ideas for the payload would be:
    • A sequence of 542 8bit characters
    • A sequence of 619 7bit characters + 3 padding bits
    • A sequence of 722 6bit characters + 4 padding bits
    • A Zip file equal to, or smaller than, 542 bytes
    • A GZip file equal to, or smaller than, 542 bytes
    • etc.
    • If using compressed files, you'd also need some way of dealing with spare bytes in the payload; either a decompressor that can ignore extra characters at the end of the file or a compressor that can manipulate the file to equal 542 bytes - using the comments field of the archive, perhaps.
  • by Zocalo ( 252965 ) on Friday April 30, 2010 @08:33AM (#32042932) Homepage
    Doh! That should be just "4339 bits" and not "2^4339 bits" which is a somewhat larger value, to put it mildly... I think you could theoretically describe a snapshot of the state of the entire universes in 2^4339 bits, and probably do so several times over as well, let alone the entire Internet. :)

Those who can, do; those who can't, write. Those who can't write work for the Bell Labs Record.

Working...