I was really
bored one day, so I was messing around with my
sound card, recording my
voice and then reversing the waveform
backwards and playing it back, when I discovered that the
sarcastic inflection of the phrase "Yeah, right!" when played backwards is *exactly* the same sound as what is heard when played forewards (it still says "Yeah, right!" either way). I've never heard of this before, but the best way I could describe it is as a "
phonic palindrome". I made sure I was
reversing the
waveform, and tried it on other
phrases which were easily garbled when reversed, but each time I tried "Yeah, right!" again, it was always the same backwards or forewards.
Here's the complete list of reversible
words from the /usr/dict/words file on
Linux - I couldn't find any
opposites.
Here's the quick and dirty
source code I wrote. You can use it to try to find any in your
native language. It's not very
elegant, but it works. I didn't want to spend a lot of time on it. I spent more time making this
node than writing it :)
Be sure to resize the MAX_WORDS define to be larger or equal to the number of words you will be sorting through.
#include <stdio.h>
#include <string.h>
#define MAX_WORDS 65536
char *words[MAX_WORDS];
char *revwords[MAX_WORDS];
void stripcrlf(char *s){
int n;
for(n=0;s[n];n++){
if(s[n]==13 || s[n]==10){
s[n]=0;
break;
}
}
}
char *str_reverse(char *text){
int g,t,n;
char c;
g=(t=strlen(text)-1)/2;
for(n=0;n<=g;n++){
c=text[n];
text[n]=text[t-n];
text[t-n]=c;
}
return text;
}
int main(){
char text[4096];
long numwords=0;
int x,y;
while(fgets(text,4096,stdin)){
stripcrlf(text);
if(text[0] && text[0] >= 'a' && text[0] <= 'z'){
if(words[numwords]=strdup(text)){
if(revwords[numwords]=strdup(text)){
str_reverse(revwords[numwords]);
}else{
fprintf(stderr,"strdup error\n");
exit(1);
}
}else{
fprintf(stderr,"strdup error\n");
exit(1);
}
numwords++;
}
}
for(x=0;x<numwords;x++){
for(y=x+1;y<numwords;y++){
if(!strcmp(words[x],revwords[y])){
printf("%s %s\n",words[x],words[y]);
}
}
}
}