Shortest program to print "Never gonna give you up..."

  • Joke answer

      $h = "549d9635795ef37857e0b3dc02e52e53";
      $v = 0;
      while( $v == 0 ){
        $n = "";
        for( $i=0; $i<1943; $i++ ){
          $n .= chr(rand(0, 127));
        }
        if( md5($n) == $h ){
          echo $n;
          $v = 42;
        }
      }
    
    By the time we have our answer (or a collision), we forgot what the question was.

  • 597 bytes of Python:

        : d="""ou@on@he@ell@ w@ay it
        : @ otUr@BVna @make4 @ve@'re@ing@t's been@ a@
        : (Ooh@o @ g@
        : YX@ t@ know@nd @
        : N2@ how I'm feelJ
        : @iL4 up@6)E)8giL, n2giL
        : (G@ yX@
        : I justSannaxT47Gotta Munderstand0@eLrP@
        : 
        : We'Lqn eachQ for sClVgzr UarHFchJ butzKxoCshyxCsRInsideSe bothqShaHBoJ V
        : WeqxUBameF9weKPplR@
        : 8g68let4 down8runFrX9a9desert48Mcry8sayBoodbye8tTF lieF9hurt4@WeK nCstrangersxCloLzqxU rulesF9sCdCI
        : A full commitment'sShat I'mxhinkJ ofzSXldn'tBetxhis fromFnyQBuy31A9if4Fsk me7DV'txT me4KxoCbli9tCsee00
        : E,B6)E,B556)1300
        : """
        : for s in 'XVUTSRQPMLKJHFECBzxq9876543210':
        :  a,b=d.split('@',1)
        :  d=b.replace(s,a)
        : print d
    
    I could make it a little better, but could only spend 30 minutes or so.

    Added in edit: a small tweak gets it to 594 bytes - not included here.

  • The thing I find interesting is this simple task highlights a constant problem with programming: clarification. Looking at the utf8 example, who wins, the fewest bytes or the fewest characters? It's always those little details that tend to cause the biggest issues.

  • I wonder how long the program would be if written in Malbolge. http://www.99-bottles-of-beer.net/language-malbolge-995.html

  • undefined

  • I started writing a solution in Google Blockly, but alas it does not yet save programs, and procedures have incomplete implementation.

  • undefined

  • the sed one is great!

  • 104 bytes:

    <iframe src="http://pastebin.com/raw.php?i=wwvdjvEj width="100%" height="100%" frameborder=no></iframe>