procedure
01.06.2008, 13:28
Чем программист не стихоплет?
тема из ряда как всегда, для тех кто не в теме!
В общем недавно (точнее сегодня утром) зародилась идея. А есть ли программы написанные в рифму?
Нашел и имхо здорово ппц, крута, мне понравилось*))
Все скрипты полностью работоспособны. Брал инфо из googel.com
Perl:
study, write, study,
do review (each word) if time.
close book. sleep? what's that?
sleep, close together,
sort of sin each spring & wait;
50% die
not exp log srand xor s qq qx xor
s x x length uc ord and print chr
ord for qw q join use sub tied qx
xor eval xor print qq q q xor int
eval lc q m cos and print chr ord
for qw y abs ne open tied hex exp
ref y m xor scalar srand print qq
q q xor int eval lc qq y sqrt cos
and print chr ord for qw x printf
each return local x y or print qq
s s and eval q s undef or oct xor
time xor ref print chr int ord lc
foreach qw y hex alarm chdir kill
exec return y s gt sin sort split
Результатом выполнения будет фраза "just another perl hacker".
#!/usr/bin/perl
APPEAL:
listen (please, please);
open yourself, wide;
join (you, me),
connect (us, together),
tell me.
do something if distressed;
@dawn, dance;
@evening, sing;
read (books, $poems, stories) until peacful;
study if able;
sort your feelings, reset goals, seek (friends, family, anyone);
do*not*die (like this)
if sin abounds;
keys (hidden), open (locks, doors), tell secrets;
do not, I-beg-you, close them, yet.
accept (yourself, changes),
bind (grief, despair);
require truth, goodness if-you-will, each moment;
select (always), length(of-days)
#listen (a perl poem)
#Sharon Hopkins
#rev. June 19, 1995
C:
#ifndef IAM
#include
int main(int life,
char** every_byte_in_system)
{ printf("How long can be this sorrow age ?
");
return 2;
DREAMS:
}
#endif // but no one here listen ...
- Warning LIFE.C 7: Function should return a value
- Warning LIFE.C 7: Parameter 'life' is never used
- Warning LIFE.C 7: Parameter 'every_byte_in_system' is never used
C++:
/* Title: verse.cpp */
/* Version: 1.0.2.11 */
/*************************/
#include < Perception.Stream >
#define SPACE as_a_dream
void is (char* acter, int rinsically) {
register universally;
long empty, road, ahead;
unsigned and, sad;
int ernal, gloomy, eternity;
float when, empty;
for (me = 2; it^ernal; unborn++)
if ( I(will) ) return;
else continue; to_die ( alone );
while ( time ) { isStone ();
break; it = apart;
}
// smell it, following chart
switch (on_illusion) {
case 'of': self=confusion;
default: everything = null;
}
matter = transient & lull;
utter ( DiplayOf.theMend() );
is ( "there", NoEnd );
}
$ gcc verse.cpp
verse.cpp: In function `void is(char *, int)':
verse.cpp:1: ANSI C++ forbids declaration `universally' with no type
verse.cpp:1: conflicting types for `float empty'
verse.cpp:1: previous declaration as `long int empty'
verse.cpp:1: `me' undeclared (first use this function)
verse.cpp:1: (Each undeclared identifier is reported only once
verse.cpp:1: for each function it appears in.)
verse.cpp:1: `it' undeclared (first use this function)
verse.cpp:1: `unborn' undeclared (first use this function)
verse.cpp:1: `will' undeclared (first use this function)
verse.cpp:1: implicit declaration of function `int I(...)'
verse.cpp:1: `alone' undeclared (first use this function)
verse.cpp:1: implicit declaration of function `int to_die(...)'
verse.cpp:1: `time' undeclared (first use this function)
verse.cpp:1: implicit declaration of function `int isStone(...)'
verse.cpp:1: `apart' undeclared (first use this function)
verse.cpp:2: parse error at end of input
тема из ряда как всегда, для тех кто не в теме!
В общем недавно (точнее сегодня утром) зародилась идея. А есть ли программы написанные в рифму?
Нашел и имхо здорово ппц, крута, мне понравилось*))
Все скрипты полностью работоспособны. Брал инфо из googel.com
Perl:
study, write, study,
do review (each word) if time.
close book. sleep? what's that?
sleep, close together,
sort of sin each spring & wait;
50% die
not exp log srand xor s qq qx xor
s x x length uc ord and print chr
ord for qw q join use sub tied qx
xor eval xor print qq q q xor int
eval lc q m cos and print chr ord
for qw y abs ne open tied hex exp
ref y m xor scalar srand print qq
q q xor int eval lc qq y sqrt cos
and print chr ord for qw x printf
each return local x y or print qq
s s and eval q s undef or oct xor
time xor ref print chr int ord lc
foreach qw y hex alarm chdir kill
exec return y s gt sin sort split
Результатом выполнения будет фраза "just another perl hacker".
#!/usr/bin/perl
APPEAL:
listen (please, please);
open yourself, wide;
join (you, me),
connect (us, together),
tell me.
do something if distressed;
@dawn, dance;
@evening, sing;
read (books, $poems, stories) until peacful;
study if able;
sort your feelings, reset goals, seek (friends, family, anyone);
do*not*die (like this)
if sin abounds;
keys (hidden), open (locks, doors), tell secrets;
do not, I-beg-you, close them, yet.
accept (yourself, changes),
bind (grief, despair);
require truth, goodness if-you-will, each moment;
select (always), length(of-days)
#listen (a perl poem)
#Sharon Hopkins
#rev. June 19, 1995
C:
#ifndef IAM
#include
int main(int life,
char** every_byte_in_system)
{ printf("How long can be this sorrow age ?
");
return 2;
DREAMS:
}
#endif // but no one here listen ...
- Warning LIFE.C 7: Function should return a value
- Warning LIFE.C 7: Parameter 'life' is never used
- Warning LIFE.C 7: Parameter 'every_byte_in_system' is never used
C++:
/* Title: verse.cpp */
/* Version: 1.0.2.11 */
/*************************/
#include < Perception.Stream >
#define SPACE as_a_dream
void is (char* acter, int rinsically) {
register universally;
long empty, road, ahead;
unsigned and, sad;
int ernal, gloomy, eternity;
float when, empty;
for (me = 2; it^ernal; unborn++)
if ( I(will) ) return;
else continue; to_die ( alone );
while ( time ) { isStone ();
break; it = apart;
}
// smell it, following chart
switch (on_illusion) {
case 'of': self=confusion;
default: everything = null;
}
matter = transient & lull;
utter ( DiplayOf.theMend() );
is ( "there", NoEnd );
}
$ gcc verse.cpp
verse.cpp: In function `void is(char *, int)':
verse.cpp:1: ANSI C++ forbids declaration `universally' with no type
verse.cpp:1: conflicting types for `float empty'
verse.cpp:1: previous declaration as `long int empty'
verse.cpp:1: `me' undeclared (first use this function)
verse.cpp:1: (Each undeclared identifier is reported only once
verse.cpp:1: for each function it appears in.)
verse.cpp:1: `it' undeclared (first use this function)
verse.cpp:1: `unborn' undeclared (first use this function)
verse.cpp:1: `will' undeclared (first use this function)
verse.cpp:1: implicit declaration of function `int I(...)'
verse.cpp:1: `alone' undeclared (first use this function)
verse.cpp:1: implicit declaration of function `int to_die(...)'
verse.cpp:1: `time' undeclared (first use this function)
verse.cpp:1: implicit declaration of function `int isStone(...)'
verse.cpp:1: `apart' undeclared (first use this function)
verse.cpp:2: parse error at end of input