Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Poetry Written in Code Contest

Poetry Written in Code Contest

Scheduled Pinned Locked Moved The Lounge
tutorial
45 Posts 34 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Dalek Dave

    . . / | { , , SYSTEM HALTED

    . . / Ampersand bracket bracket dot dot slash, | { , , SYSTEM HALTED Vertical-bar curly-bracket comma comma CRASH.

    ------------------------------------ I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave CCC Link[^] Trolls[^]

    A Offline
    A Offline
    Alan Burkhart
    wrote on last edited by
    #26

    :thumbsup::thumbsup:

    XAlan Burkhart

    1 Reply Last reply
    0
    • A Andrew Rissing

      A few coworkers were joking about writing poetry in code and I was curious to put it up here as a challenge to others. The premise is that you must write something that is poetry that is reasonably compilable (i.e. excluding the scaffolding of the language of choice). Bonus points if it produces output that is relevant to the theme of the poem. Here is an example to get you started:

      float myhope;
      float mypride;
      if (myhope is Empty)
      Goto ZeroDivide;

      B Offline
      B Offline
      BillWoodruff
      wrote on last edited by
      #27

      Note: at the time I wrote this, I had not read the other posts, and did not realize others were already taking on Hamlet's famous soliloquy.

      // c#

      bool? TheQuestion = true;
      bool? ToBe = true;

      public bool? ToBeOrNotToBe()
      {
      return (TheQuestion == true && ToBe == true) ? ToBe : null;
      }

      "Our life is a faint tracing on the surface of mystery, like the idle, curved tunnels of leaf miners on the surface of a leaf. We must somehow take a wider view, look at the whole landscape, really see it, and describe what's going on here. Then we can at least wail the right question into the swaddling band of darkness, or, if it comes to that, choir the proper praise." Annie Dillard

      1 Reply Last reply
      0
      • A Andrew Rissing

        A few coworkers were joking about writing poetry in code and I was curious to put it up here as a challenge to others. The premise is that you must write something that is poetry that is reasonably compilable (i.e. excluding the scaffolding of the language of choice). Bonus points if it produces output that is relevant to the theme of the poem. Here is an example to get you started:

        float myhope;
        float mypride;
        if (myhope is Empty)
        Goto ZeroDivide;

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #28

        Charlie and Charlotte, the lovers in C (doesn't compile, Charlie and Charlotte are incompatible types)

        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);}

        Bastard Programmer from Hell :suss:

        1 Reply Last reply
        0
        • N Norman Dziedzic

          Question = (2 * b) || !(2 * b); Is a nicer form but still only = Question; Then again Wit.soul = brevity;

          H Offline
          H Offline
          hmoulding
          wrote on last edited by
          #29

          ITYM wit.soul = brevity ;

          1 Reply Last reply
          0
          • A Andrew Rissing

            A few coworkers were joking about writing poetry in code and I was curious to put it up here as a challenge to others. The premise is that you must write something that is poetry that is reasonably compilable (i.e. excluding the scaffolding of the language of choice). Bonus points if it produces output that is relevant to the theme of the poem. Here is an example to get you started:

            float myhope;
            float mypride;
            if (myhope is Empty)
            Goto ZeroDivide;

            M Offline
            M Offline
            msvbdev
            wrote on last edited by
            #30

            Not really a poem, but here's some famous Shakespeare in C/C++

            bool question = (toBe || !toBe);

            1 Reply Last reply
            0
            • A Andrew Rissing

              A few coworkers were joking about writing poetry in code and I was curious to put it up here as a challenge to others. The premise is that you must write something that is poetry that is reasonably compilable (i.e. excluding the scaffolding of the language of choice). Bonus points if it produces output that is relevant to the theme of the poem. Here is an example to get you started:

              float myhope;
              float mypride;
              if (myhope is Empty)
              Goto ZeroDivide;

              D Offline
              D Offline
              da808wiz
              wrote on last edited by
              #31

              ...
              send(girl,"Flowers");
              send(girl,"Chocolates");
              send(girl,"Money");
              send(girl,"Heart");
              if ( recv(girl)==cold_shoulder )
              goto hell;
              ...

              :hell
              switch ( girl2 = new Girl() ) {
              ...

              1 Reply Last reply
              0
              • A Andrew Rissing

                A few coworkers were joking about writing poetry in code and I was curious to put it up here as a challenge to others. The premise is that you must write something that is poetry that is reasonably compilable (i.e. excluding the scaffolding of the language of choice). Bonus points if it produces output that is relevant to the theme of the poem. Here is an example to get you started:

                float myhope;
                float mypride;
                if (myhope is Empty)
                Goto ZeroDivide;

                U Offline
                U Offline
                User 8077241
                wrote on last edited by
                #32

                Class TimeGoesBySlowly

                Function toSave(yourLife) As TimeGoesBySlowly
                
                    For Each Day As TimeGoesBySlowly In yourLife
                        Dim theLights As New TimeGoesBySlowly, TaketheTime
                
                        toSave(yourLife) 'and
                        Return (theLights) 'until the
                
                    Next Day
                
                
                End Function
                

                End Class

                http://thephilosopherstone.ca

                A 1 Reply Last reply
                0
                • A Andrew Rissing

                  A few coworkers were joking about writing poetry in code and I was curious to put it up here as a challenge to others. The premise is that you must write something that is poetry that is reasonably compilable (i.e. excluding the scaffolding of the language of choice). Bonus points if it produces output that is relevant to the theme of the poem. Here is an example to get you started:

                  float myhope;
                  float mypride;
                  if (myhope is Empty)
                  Goto ZeroDivide;

                  M Offline
                  M Offline
                  MacSpudster
                  wrote on last edited by
                  #33

                  interface EternalLove
                  {
                  object ofMyDesire;
                  byte ofMyLoveAspire;

                  string meAlong;
                  double mySong;

                  private class ofYourAffection : ICollection {}

                  enum erateMyLoveForYou
                  {
                  rosesBought,
                  diamondsSought,
                  muchMuchThought
                  }

                  public abstract Array Divine;
                  protected Buffer recline;

                  readonly int endedProse;
                  long erWoes;

                  Exception Denied;
                  ExceptionHandler.ExceptionDialog AgonyUponMyPride;

                  StackOverflowException soMuchCommotion;
                  Screen myEmotion;

                  EventHandler ABrandNewDay;
                  Environment Secure_SoTheySay;

                  Help MeFindAWife; //as I
                  float alongThroughLife;
                  }

                  public class icWishfulThinking : EternalLove
                  {
                  //Son, yer on yer own.
                  }

                  ~ [Don't] Visual[ize the] Basic[s], C#[ly instead] ~ ASPX: Apple Simply Performs eXcellently

                  A 1 Reply Last reply
                  0
                  • U User 8077241

                    Class TimeGoesBySlowly

                    Function toSave(yourLife) As TimeGoesBySlowly
                    
                        For Each Day As TimeGoesBySlowly In yourLife
                            Dim theLights As New TimeGoesBySlowly, TaketheTime
                    
                            toSave(yourLife) 'and
                            Return (theLights) 'until the
                    
                        Next Day
                    
                    
                    End Function
                    

                    End Class

                    http://thephilosopherstone.ca

                    A Offline
                    A Offline
                    Andrew Rissing
                    wrote on last edited by
                    #34

                    Nice. +5

                    1 Reply Last reply
                    0
                    • M MacSpudster

                      interface EternalLove
                      {
                      object ofMyDesire;
                      byte ofMyLoveAspire;

                      string meAlong;
                      double mySong;

                      private class ofYourAffection : ICollection {}

                      enum erateMyLoveForYou
                      {
                      rosesBought,
                      diamondsSought,
                      muchMuchThought
                      }

                      public abstract Array Divine;
                      protected Buffer recline;

                      readonly int endedProse;
                      long erWoes;

                      Exception Denied;
                      ExceptionHandler.ExceptionDialog AgonyUponMyPride;

                      StackOverflowException soMuchCommotion;
                      Screen myEmotion;

                      EventHandler ABrandNewDay;
                      Environment Secure_SoTheySay;

                      Help MeFindAWife; //as I
                      float alongThroughLife;
                      }

                      public class icWishfulThinking : EternalLove
                      {
                      //Son, yer on yer own.
                      }

                      ~ [Don't] Visual[ize the] Basic[s], C#[ly instead] ~ ASPX: Apple Simply Performs eXcellently

                      A Offline
                      A Offline
                      Andrew Rissing
                      wrote on last edited by
                      #35

                      Haha...nice. +5

                      1 Reply Last reply
                      0
                      • R Rage

                        if (life == ToBe)
                        return Question
                        else if (life != ToBe)
                        return Question

                        K Offline
                        K Offline
                        KP Lee
                        wrote on last edited by
                        #36

                        You still get the credit, but I like:

                        if (ToBe || !ToBe) return ThatIStheQuestion

                        1 Reply Last reply
                        0
                        • M Marc Clifton

                          And in Haiku:

                          double myTrouble;
                          if (sheFindsOut(myTrouble))
                          {
                          SummerDaysAreGone();
                          }

                          Marc

                          My Blog
                          An Agile walk on the wild side with Relationship Oriented Programming
                          Melody's Amazon Herb Site

                          R Offline
                          R Offline
                          randomusic
                          wrote on last edited by
                          #37

                          Good one, a 5-7-5 haiku

                          1 Reply Last reply
                          0
                          • R Rage

                            Seems like you are slightly getting all the subtleties of Shakespeare's genius ;P OTOH, it is disastrous to see how the best translation in programming language, namely return Question; ( as you very correctly pointed out ) completely ruins the effect.

                            L Offline
                            L Offline
                            Luiz Monad
                            wrote on last edited by
                            #38

                            From that we can conclude that life is random, and dont affect the result of question. that is: from where we come from? where are we? and where are we going to?

                            1 Reply Last reply
                            0
                            • R Rage

                              if (life == ToBe)
                              return Question
                              else if (life != ToBe)
                              return Question

                              F Offline
                              F Offline
                              fatman45
                              wrote on last edited by
                              #39

                              How about:

                              Question = life ? ToBe : !ToBe;

                              Da Bomb

                              1 Reply Last reply
                              0
                              • N Norman Dziedzic

                                Question = (2 * b) || !(2 * b); Is a nicer form but still only = Question; Then again Wit.soul = brevity;

                                A Offline
                                A Offline
                                AspDotNetDev
                                wrote on last edited by
                                #40

                                Repost! :-D

                                Thou mewling ill-breeding pignut!

                                1 Reply Last reply
                                0
                                • A Andrew Rissing

                                  A few coworkers were joking about writing poetry in code and I was curious to put it up here as a challenge to others. The premise is that you must write something that is poetry that is reasonably compilable (i.e. excluding the scaffolding of the language of choice). Bonus points if it produces output that is relevant to the theme of the poem. Here is an example to get you started:

                                  float myhope;
                                  float mypride;
                                  if (myhope is Empty)
                                  Goto ZeroDivide;

                                  A Offline
                                  A Offline
                                  AspDotNetDev
                                  wrote on last edited by
                                  #41

                                  {O, Row(Me, 0), Row(Me, 0)}.Where((fore) => Art("Thou"))

                                  Thou mewling ill-breeding pignut!

                                  1 Reply Last reply
                                  0
                                  • A Andrew Rissing

                                    A few coworkers were joking about writing poetry in code and I was curious to put it up here as a challenge to others. The premise is that you must write something that is poetry that is reasonably compilable (i.e. excluding the scaffolding of the language of choice). Bonus points if it produces output that is relevant to the theme of the poem. Here is an example to get you started:

                                    float myhope;
                                    float mypride;
                                    if (myhope is Empty)
                                    Goto ZeroDivide;

                                    U Offline
                                    U Offline
                                    User 8585015
                                    wrote on last edited by
                                    #42

                                    while : # rickiT :Sleep For zzz = 1 To 3 Next zzz GoTo Sleep rickiT 2012

                                    1 Reply Last reply
                                    0
                                    • A Andrew Rissing

                                      A few coworkers were joking about writing poetry in code and I was curious to put it up here as a challenge to others. The premise is that you must write something that is poetry that is reasonably compilable (i.e. excluding the scaffolding of the language of choice). Bonus points if it produces output that is relevant to the theme of the poem. Here is an example to get you started:

                                      float myhope;
                                      float mypride;
                                      if (myhope is Empty)
                                      Goto ZeroDivide;

                                      J Offline
                                      J Offline
                                      Jenny Quinn
                                      wrote on last edited by
                                      #43

                                      dim seeTree as boolean = false
                                      if seeTree then
                                      dim poem as string = "this poem is as lovely as a tree"
                                      end if

                                      1 Reply Last reply
                                      0
                                      • A Andrew Rissing

                                        A few coworkers were joking about writing poetry in code and I was curious to put it up here as a challenge to others. The premise is that you must write something that is poetry that is reasonably compilable (i.e. excluding the scaffolding of the language of choice). Bonus points if it produces output that is relevant to the theme of the poem. Here is an example to get you started:

                                        float myhope;
                                        float mypride;
                                        if (myhope is Empty)
                                        Goto ZeroDivide;

                                        J Offline
                                        J Offline
                                        Jeffrey Knight
                                        wrote on last edited by
                                        #44

                                        #!/bin/bash #-------- # For Agnes #-------- # A poem in bash on Mac # Tue Feb 7 15:01:01 EST 2012 # Jeffrey Knight for you_Agnes in `which time`; do find /if_you_can/ \ \ "there is nothing, Agnes" 2> be_done; until [[ $you = **know** ]]; do you="know `whoami` ?"; look " my Agnes ... "; if [ "only" == "you could ..." ]; then id rejoice; patch false hopes; fi; my_fate="is sealed"; from nothing 2> nothing; done; done; say -v Agnes $my_fate #and be clear

                                        1 Reply Last reply
                                        0
                                        • R Rage

                                          if (life == ToBe)
                                          return Question
                                          else if (life != ToBe)
                                          return Question

                                          N Offline
                                          N Offline
                                          Nick Alexeev
                                          wrote on last edited by
                                          #45

                                          0x2B || !0x2B Saw it in the book somewhere. No, it wasn't Shakespeare, it was an embedded firmware book.

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups