HydrogenAudio

Misc. => Off-Topic => Topic started by: Ania on 2003-09-18 12:51:36

Title: Check it out...
Post by: Ania on 2003-09-18 12:51:36
Aoccdrnig to a rscheearch at an elingsh uinervtisy, it deosn't mttaer in
waht oredr the ltteers in a wrod are, the olny iprmoetnt tihng is taht
frist and lsat ltteer is at the rghit pclae. The rset can be a toatl
mses and you can sitll raed it wouthit porbelm. Tihs is bcuseae we do
not raed ervey lteter by istlef but the wrod as a wlohe.
Title: Check it out...
Post by: Florian on 2003-09-18 13:10:51
wroks fnie for me
Title: Check it out...
Post by: Gabriel on 2003-09-18 13:14:48
Itnreestnig...I can raed yuor txet but I had a porlbem on "elingsh".

I tnhik taht nmaes of ctrieounts, tonws, and nemas slhoud slitl be perporly wtirten to be eisaly udnetrsood.
Title: Check it out...
Post by: n68 on 2003-09-18 15:12:29
Gday...


finlay.. omes validdadeda resharce..
Title: Check it out...
Post by: M on 2003-09-18 15:27:42
Quote
finlay.. omes validdadeda resharce..

I wolund't hvae bieveled it psibsole, aluthgoh prephas sohlud hvae epeexctd shomiteng lkie tihs: n68 arladey velaiotd the biasc rlue of "cehonert" sructtrue! 

  As Ania eplianxed, the olny iprmoetnt tihng is taht frist and lsat ltteer is at the rghit pclae.

    - M.
Title: Check it out...
Post by: Lev on 2003-09-18 15:33:13
lmfao   

I can never make up my mind if my favourite poster is n68, or 2bdecided 

@ n68 : Bring back the best avatar ever, someone p1ssing on the Norweige flag 

Quote
finlay.. omes validdadeda resharce..
Title: Check it out...
Post by: john33 on 2003-09-18 15:48:33
If I hadn't read this myself (  ), I wouldn't have believed it!!
Title: Check it out...
Post by: ScorLibran on 2003-09-18 22:32:29
Ficsanatnig!

And esiaer to wtire tahn h4><0r 1337.  You colud ralely mses wtih polepe...

"Waht do you maen my slepling is all mseesd up?  It's fnie!  Are you dixyslec?"
Title: Check it out...
Post by: lucpes on 2003-09-18 23:15:43
no conetmmt LOL 
Title: Check it out...
Post by: _Balint_ on 2003-09-19 00:28:03
I certead tihs slmal pgarrom jsut a few mnieuts ago. It'll mkae winirtg in tihs new and faitciasnng sylte mcuh eiesar, I hpoe.

Code: [Select]
/* spelling.c
** Copyright (C) 2003 Bálint Balogh
** This program is free software released under the GNU
** General Public License Version 2 or any later version. */

#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>

/* This is needed because of strfry() */
#ifndef __GLIBC__
#error This program needs the GNU C library
"This program needs the GNU C library" (portable #error)
#endif

#define INCREMENT (1024)
#define MAX_ITERATION (64)

int main( int argc, char *argv[] )
{
   char *word = NULL;
   char *original = NULL;
   size_t length = 0;
   size_t allocated = 0;
   int ch;

   while (1) {
       ch = getchar();
       if ( !isalpha( ch ) ) {
           if ( length ) {
               if ( length > 3 ) {
                   unsigned i = 0;
                   char end = word[length - 1];

                   memcpy( original, word + 1, length - 2 );
                   word[length - 1] = 0;
                   do {
                       strfry( word + 1 );
                       i++;
                   } while ( i < MAX_ITERATION
                     && !memcmp( original, word + 1, length - 2 ) );
                   word[length - 1] = end;
               }
               word[length] = 0;
               fputs( word, stdout );
               length = 0;
           }
           if ( ch == EOF ) return 0;
           putchar( ch );
       } else {
           if ( allocated <= length + 1 ) {
               allocated += INCREMENT;
               if ( (word = realloc( word, allocated )) == NULL
                 || (original = realloc( original, allocated )) == NULL ) {
                   fprintf( stderr, "%s: Out of memory. Aborting.\n", argv[0] );
                   return -1;
               }
           }
           word[length++] = ch;
       }
   }
}


[Eidt:] Bgfuix.
Title: Check it out...
Post by: M on 2003-09-19 12:27:49
Ahh... but the true test will be whether or not the program still functions if you encode the code in garbledy-speek.

    - M.