LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 10-12-2003, 06:17 PM   #1
chr15t0
Member
 
Registered: Jun 2002
Location: London
Distribution: Slackware
Posts: 201

Rep: Reputation: 30
Attempting perl poetry


Well I figure poetry makes a pleasant distraction from the usual daily scripting chores. And
because it's written in PERL, I can post in here without feeling too off-topic It's my first
attempt at perl poetry It is valid perl which parses, compiles and runs without error on
Slackware 9 and OpenBSD. I personally think the last verse is the best.
I hope you like it,

Code:
#!/usr/bin/perl
                                                                                                                                                                                                                  
untie $me; open $doors;
for($ever){ join
$me, 'and', $you;
last or sleep and die;}
                                                                                                                                                                                                                  
map $our $future or kill my $hopes;
my %hope = ('to','be','with','you');
open $doors unless $I& break;
$Read= each %hope and wait;
                                                                                                                                                                                                                  
times; shift and tell;
warn my $friends; warn
for($they_are_not_safe);
$I& sort and study time;
                                                                                                                                                                                                                  
wait for($me);
close $doors and sin
bind (You_and, me);
$please= wait and $see;
                                                                                                                                                                                                                  
if ($you){ chop( my $words);}
my %hopes& break and die ;
if($you){split 'from', $me;}
$I= 'cry' and die 'inside';
                                                                                                                                                                                                                  
                                                                                                                                                                                                                  
# A perl poem by 
# chris lacy-hulbert
# October 12th 2003
 
Old 10-13-2003, 12:34 AM   #2
HappyDude
Member
 
Registered: Jul 2003
Posts: 140

Rep: Reputation: 15
Interesting idea, I like the functions! It be cool if it actually did something...
 
Old 10-15-2003, 08:27 AM   #3
chr15t0
Member
 
Registered: Jun 2002
Location: London
Distribution: Slackware
Posts: 201

Original Poster
Rep: Reputation: 30
yeah - I guess that should be my next challenge.. but that'd be really hard. It's difficult enough to make it readable as well as executable. To make it useful aswell would be maad

laters,
christo
 
Old 10-16-2003, 10:02 PM   #4
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
PERL is one thing..try it in C...it doesn't look as poetic as PERL but...

I found this snippet from a mailing list for an online 'zine called Desperado...here in the original form:
http://groups.google.com/groups?hl=e...mp.nac.dec.com

Code:
char*lie;

 double time, me= !0XFACE,

 not; int rested,   get, out;

 main(ly, die) char ly, **die ;{

     signed char lotte,


dear; (char)lotte--;

 for(get= !me;; not){

 1 -  out & out ;lie;{

 char lotte, my= dear,

 **let= !!me *!not+ ++die;

     (char*)(lie=


"The gloves are OFF this time, I detest you, snot\n\0sed GEEK!");

 do {not= *lie++ & 0xF00L* !me;

 #define love (char*)lie -

 love 1s *!(not= atoi(let

 [get -me?

     (char)lotte-


(char)lotte: my- *love -
 
 'I'  -  *love -  'U' -

 'I'  -  (long)  - 4 - 'U' ])- !!
 
 (time  =out=  'a'));} while( my - dear

 && 'I'-1l  -get-  'a'); break;}}

     (char)*lie++;


(char)*lie++, (char)*lie++; hell:0, (char)*lie;

 get *out* (short)ly   -0-'R'-  get- 'a'^rested;

 do {auto*eroticism,

 that; puts(*( out

     - 'c'
 
-('P'-'S') +die+ -2 ));}while(!"you're at it");


for (*((char*)&lotte)^=

 (char)lotte; (love ly) [(char)++lotte+

 !!0xBABE];){ if ('I' -lie[ 2 +(char)lotte]){ 'I'-1l ***die; }

 else{ if ('I' * get *out* ('I'-1l **die[ 2 ])) *((char*)&lotte) -=

 '4' - ('I'-1l); not; for(get=!


get; !out; (char)*lie  &  0xD0- !not) return!!

 (char)lotte;}


(char)lotte;

 do{ not* putchar(lie [out

 *!not* !!me +(char)lotte]);

 not; for(;!'a';);}while(

     love (char*)lie);{


register this; switch( (char)lie

 [(char)lotte] -1s *!out) {

 char*les, get= 0xFF, my; case' ':

 *((char*)&lotte) += 15; !not +(char)*lie*'s';

 this +1s+ not; default: 0xF +(char*)lie;}}}

 get - !out;

 if (not--)

 goto hell;

     exit( (char)lotte);}
"This is an actual, compile-able, runnable C program! The author's
name is Westley, and the program was given the same name. If you
compile it (which is complicated; you have to tell the C compiler to
do all sorts of gymnastics) and type "westley 3" it will print

Westley loves me.
Westley loves me, not.
Westley loves me.

Anyway, the C code is far more interesting than the output."

Just amazing. I think that programming poetry is something I could get into...

Last edited by bulliver; 10-16-2003 at 10:04 PM.
 
Old 10-16-2003, 11:15 PM   #5
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
Here's one I threw together...a cheesy little love poem written in bash:
Code:
#!/bin/bash

You="R_a_dream"
Are="you_really_there?"
let Me=make love; To="u"
i="long"; FOR="you"
Not="meant_2_b"
for the_stars in the sky and the light from The moon
do #not forget...I will
	echo "I love you" # 'til I am
done #in from the heartache
declare -i am_in_love
if [[ -n $You ]] && [[ -n $Are ]] && [[ -n $Not ]]; then
	echo "I love you anyway"
fi #naly I am free
This one will run...

Last edited by bulliver; 10-16-2003 at 11:16 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
does any members in this forum like poetry or something that sounds "poetic" alred General 8 06-03-2005 12:07 PM
what is Perl Poetry Competition ? indian General 1 08-14-2004 07:19 AM
perl(Cwd) perl(File::Basename) perl(File::Copy) perl(strict)....What are those? Baldorg Linux - Software 1 11-09-2003 08:09 PM
Poetry to Microsoft linuxfond Linux - Software 1 02-25-2003 03:01 AM
attempting to subsist Karnak Linux - Networking 5 10-12-2002 07:08 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:06 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration