13
\$\begingroup\$

Write a quine with 1 or more rhyme scheme from http://en.wikipedia.org/wiki/Rhyme_scheme when read. The following characters are spoken aloud:

  • any alphanumeric words or characters not in a comment;
  • comparison and arithmetic characters (+ plus; - minus; * times, / divided by, | or, || or, & and, && and, ! not, = equals, == equals, === equals).

The following is not accounted for (is not spoken aloud):

  • any characters which signify the beginning or end of string literals ("');
  • any characters which signify the beginning or end of logical blocks ((){}[]);
  • any characters which signify the delineation of a variable, function or line of code (.,;).
  • any characters in comments;

The "spoken aloud" rules always apply. the "not spoken aloud" rules apply to all languages, except Brainfuck, K, J, APL, Befunge and Sclipting. In the case of APL, Brainfuck, Befunge, K and J, any character not mentioned in "spoken aloud rules" are subject to the "choose consistently" rule outlined above. Sclipting characters are pronounced like they would be if they were that Chinese character, with free choice of which pronounciation you use.

Any characters which are not explicitly allowed or denied pronounciation are free to be pronounced or kept silent. However, a specific character is either always pronounced or always kept silent. You may not pronounce # as hashtag in one line and keep # silent in the next.

Words may be pronounced in any dialect or language, but it needs to be consistent within the same stanza (no having the first word be pronounced in a Scottish way and the second in a Welsh way).

Contest type is popularity contest. The deadline is April 23rd in honor of one of the most well known bards, William Shakespeare, who was born and allegedly died on that day. Winner is he who gets the most votes.

Edit: because I don't think there will be any more submissions, I've decided to end the contest early. I'll mark the winner momentarily.

\$\endgroup\$
  • 2
    \$\begingroup\$ +1, well formulated. I like how you called out Sclipting as a special case. \$\endgroup\$ – Kaya Mar 20 '14 at 16:51
9
\$\begingroup\$

Batch AABBA (Limerick)

This is my best try, but I have never been any good at poems.

Code:

@Echo off || cd \.
If "this"=="a largeish" pot
Type %0 || chef
Color 7f
Goto :eof || shallot

In english:

Echo off else CD slash dot
If this equals a largeish pot
Type zero else chef
Color seven f
Go to EOF else shallot

\$\endgroup\$
1
\$\begingroup\$

Fortran 95 (McCarron Couplet)

McCarron Couplet: "AABBABCCDDCDEEFFEF" a contemporary take on a classic rhyming pattern, introduced by the academic James McCarron.

My code (which should be saved as all.f95 in order for it to work):

character (LEN=100) :: &
bend; logical :: wondered
inquire(file="superstar &
&car",exist=wondered,number=i_r)

open(unit=100, &
file="superstar car")
if (.NOT.(.NOT.(wondered))) then
i_sum = 1; read(100,*) n

i_sum = n + i_sum
rewind(100); else; i_sum = 1
endif; write(100,*) i_sum, 10
codingThis = fun

write(bend,"(I5)") n; call &
SYSTEM ("copy all.f95 all"//&
TRIM(TRIM(ADJUSTL(bend)))//&

".f95"); open(access="append", &
unit=10,file="waterfall")
write(10,*) "foo bar"; end

It will copy itself to numbered files, starting with all0.f95, then all1.f95, all2.f95, and so on...

It reads:

character len equals hundred
bend logical wondered
inquire file superstar
car exist wondered, number equals IR

open unit equals hundred
file equals superstar car
if not not wondered then
I sum equals one, read hundred N

I sum equals N plus I sum
rewind hundred else I sum equals one
endif write hundred I sum ten
conding this equals fun

write bend I five N call
system copy all F point ninety five all
trim trim adjust L bend

point ninety five access append
open unit ten file waterfall
write ten foo bar end
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.