0
\$\begingroup\$

TASK:

Make an acrostic poem in the lines.
e.g.

BATCH

break  
attrib -h acrostic.txt  
type acrostic.txt  
cls  
help 

The output CAN also be an acrostic poem.

RULES:

  • Popularity Contest - the answer with highest vote wins!
  • You may create more than one.
  • Any language is accepted.
  • Every line must be executable.
\$\endgroup\$
  • \$\begingroup\$ Your question might be a good one, but it is poorly written now. Please, try to improve it. \$\endgroup\$ – Victor Stafusa Feb 3 '14 at 8:41
  • \$\begingroup\$ Imho it is a bit broad as it is currently written. \$\endgroup\$ – Howard Feb 3 '14 at 9:17
  • \$\begingroup\$ how are to be considered the ubiquitous $ in PHP? \$\endgroup\$ – Einacio Feb 3 '14 at 19:26
  • \$\begingroup\$ Sorry, for special characters you can decide. $ you can read it as dollar or just not read it. Other reading will be accepted. \$\endgroup\$ – Jamie Feb 3 '14 at 23:52
  • \$\begingroup\$ Please include <how to read>. It will be easier for reader. \$\endgroup\$ – Jamie Feb 3 '14 at 23:52
2
\$\begingroup\$

Java

class s {
//acrostic starts below this line  
public static void main(String[] args) { int
a; int
n;
class b {}
a=1; int 
k; int
e;
System.out.println("are very tasteful."); } }
| improve this answer | |
\$\endgroup\$
2
\$\begingroup\$

bash - every man dies alone

This line writes the poem:

echo echo view echo renice yes make apropos nice date identify echo start apropos locate octave nice echo | xargs -n 1 | awk '{s = s substr($1, 1, 1); if ($1 == "echo"){print $1, "-n", s; s = "";}else print $1, "--they >.said 2>&1";}' > acrostic.sh

To see the poem:

$ cat acrostic.sh

To see the poem within the poem:

$ sh acrostic.sh
| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ @Jamie, It's Bash. \$\endgroup\$ – unclemeat Feb 4 '14 at 1:20
  • \$\begingroup\$ @Jamie, don't worry... it's a matter of time. Just don't try to tackle GolfScript or APL in too much of a hurry! \$\endgroup\$ – WallyWest Feb 4 '14 at 5:22
1
\$\begingroup\$

Batch

Quite lazy, I'll admit -

@(
Code
Other than that which
Does
Echo Code^
Golf
Often
Lacks the
Fun
) 2>nul

H:\uprof>accro.bat
CodeGolf
| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ I'm frozen - "code" "other than that which" "does" "often" "lacks the" "fun" are all invalid programs. \$\endgroup\$ – Jamie Feb 3 '14 at 11:41
  • 2
    \$\begingroup\$ This is invalid. All lines must be executable. I can write a better with 2>nul. \$\endgroup\$ – Jamie Feb 3 '14 at 11:48
  • 5
    \$\begingroup\$ Changing the rules - uncool. \$\endgroup\$ – unclemeat Feb 3 '14 at 21:39
  • \$\begingroup\$ Yes, that's uncool and quite rude - but to prevent these invalid acrostic poem, i guess i need to stop it. \$\endgroup\$ – Jamie Feb 3 '14 at 23:54
1
\$\begingroup\$

Yay! Java!

import java.io.*;public
class poem{static String[]
a = 
new String[1];
public static void main(String[] args){a();fin();
return;}static
Object myMethod(){String
g = "This is my ";
return g;} static void a(){
a[0] = "output";}static boolean fin(){System.out.println(
myMethod().toString()+a[0]);Boolean fin =
!(0==1);return fin;}}
| improve this answer | |
\$\endgroup\$
1
\$\begingroup\$

Befunge-93

go down, "Dev" 00ps -- 2*4-10 \ please
um I guess 1 - 3 \, is that right "hmm", @
maybe

run as ./befungee.py acrostic for the output gum.

Note sure how rule #3 should be interpreted in this context.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Not sure if this is better suited at link. Would be stretching the definition of a story a bit though... \$\endgroup\$ – Joel Bosveld Feb 4 '14 at 9:15
1
\$\begingroup\$

Ruby

ruby = "rubylicious"; control = true
unless (!ruby)
begin y = ruby
y.each_char do |l| print (
l)
if (l=='s') then 
control=false end  
if (!control) then puts "!" end
over = true
unless 
self == true then over = false end end end end

This prints Rubylicious!. I am not happy with some of the lines (especially last line), so future edits are possible.

| improve this answer | |
\$\endgroup\$
1
\$\begingroup\$

Javascript

document.getElementById("dog).appendChild(document.createElement('div'));
o = [];
e = [];
s = [];

t = 0;
h = 0;
i = 0;
s[0] = 0;

e[0] = 0;
v = 0;
e[1] = 0;
n = [];

c = 0;
o[0] = 0;
u = 0;
n[0] = 0;
t
? count=1:count=0;
| improve this answer | |
\$\endgroup\$

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