27
\$\begingroup\$

In modern day standards Golfing translates to playing a game of golf, while golf itself translates to a car manufactured by Volkswagen.
So instead of the usual golfing of code, you will today be coding a golf.

Challenge

Write a program (A) in language A which will output the source code of another program (B) of language B, which in it's turn will output Vroom vrooom! when executed.

Rules

  • The source code of program A is formatted into a nice ASCII car (not necessarily a volkswagen).
  • Program A must be executable in the format you posted it in.
  • Language A is NOT the same language as language B.
  • The output of program B may or may not end with a new line.
  • Program A takes no input.
  • In non-obvious languages (esoteric) please explain program A.
  • You must start your answer with # Language A, Language B eg. # Brainfuck, Python.
  • Valid languages must have either an English Wikipedia article, an esolangs article or a Rosetta Code article at the time this challenge was posted.
  • Be creative :-)

Scoring

This is a popularity contest. Whichever answer has the most upvotes by Oct 4, will be declared the winner.

Example

Brainfuck, Python 2

                   ++++++++++[>+++>
                ++++    ++>+++    ++++
              +++<        <<        -]>>>
     ++++++++++++.        ++        .------
   ---.+++++.++++++.<<++.++.>++++++++++++++
 ++++++++++++.>--.---..--.<<--.>>+++++++++.
 ----.---...--.----------------------------
  ---------------------------------------
     \--o--/                    \--o--/
      \-_./                      \+_./

This outputs the following code, which can be executed in Python 2;

print "Vroom vrooom!"
\$\endgroup\$

closed as too broad by Geobits, feersum, Dennis Sep 17 '15 at 16:40

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 12
    \$\begingroup\$ I'm not sure your golf's wheels can roll properly with this shape! \$\endgroup\$ – Fatalize Sep 17 '15 at 11:44
  • 3
    \$\begingroup\$ Heh, you're right. I'll have myself a sliding golf then. \$\endgroup\$ – Bassdrop Cumberwubwubwub Sep 17 '15 at 11:49
  • 2
    \$\begingroup\$ Yes. Edited my post to clarify \$\endgroup\$ – Bassdrop Cumberwubwubwub Sep 17 '15 at 13:32
  • 7
    \$\begingroup\$ This question is too broad and focuses more on ASCII art skills than programming skills. In many languages, whitespace can be inserted at will, so this challenge boils down to an art contest. \$\endgroup\$ – Dennis Sep 17 '15 at 16:43
  • 10
    \$\begingroup\$ While I agree with Dennis' comment, I'd like to point out that, if we ignore the nature of the question for a moment, this spec is quite well written for a first post. Good job :) \$\endgroup\$ – Sp3000 Sep 17 '15 at 17:28
40
\$\begingroup\$

evil, JavaScript (ES6)

                                        aeMeeeDDDeDDDwHwwwwwwDaeeaeae;.
                                  .eu@wa04QMMM4WHHWWM#404HGV#0B4aeee0HeHa
                               .ewD&M%e       aG##a       aa a@Q%Bwaaeeuu4.
                           .uwuwW&u          e&M&e        H  wB0B&uGMVBGuuGu
                          wuu@M0Bu           wW@4Be      ueu=w#H00%V%QG@W%eGa
               ...aa+aeeweWWaee#G&G%V@B@G0@B&00V0V0%4VB4%BQGeewwB%BwwwV0%HMwae
           eaeee&BQM%M@4B%Mu%4G@BMwaeeaeeaawwaeeeuuuuwaaaeewwwuueee&QBeweaeMQ4e
      ,w#QawaHBH4Veaaaawueueeawaaeeeeuuwue&%#eeaeewaaawueewaeaeawueaQBBeeeHVewe.
    .eeuu0waaeQMQ%0Waaaawaeaeeee+u<+<=<===->::w~<+<=~-:<><uuwaeeaee&@B&&uuwawaa.
   aaaaaweaaQ#@4%@4#Veuuu~><uuw<-ewaaeueeaweeeeueweaeewaaaee-weH#V#%BBQ@0ueeawea
   aeewuuu#QB4B4B&0W%QVeuweeeaeM4M%&0W&MG@M0QV%VB0M%W0M&#QQeae4%#G#Q%4#4Q#Vwu>uuw
  wQWGuuwMHWVVuue<e%eQ4M4#@0BBWVHVVQ#4HG4%B%#&H@M#BMM0G0MVW0WQ44uwue.eueHGG#waHBe
  e&H0ueeV%Heu0wu,GQu0BGWQVH40MM4@0H0BQMMHWW%weueeaawuuuuwuu#@4Hu@&w+MVw@4M%ueeB
   %B0V&QW%MaVee>uwH%BW%4aeeeeueeuweaeeeeBMBGM&%H0QG&44#Mwe&#%VaWeeee~&Qw#V%G&wu.
   eaeDD&WQ&eGu,.&&0H%04ewaeeaDeB%#HG&#H#BQQ#&#@0Vuw0HBMaD4H#G#eWDee%DaD.Ww
         .u%.ue.4aaa.@Mw                                    ,w&wDwwDwwue@a
           eeHueMwa@Ge                                       .uV&.eeDw.4u
            "ee00V0e'                                          "a@HB4wP

For the evil program, I used a similar method as I did for this answer. In summary, I generated an optimally short program (limited to these four commands) that produced the desired JS, before mixing it with ignored characters to make a Volkswagen golf.

It prints out the following JS program, which in turn prints out Vroom vrooom! to the console:

       c=console
      o  =   x=>c
.log(x+"om!");O=o
Q="Vroom\x20vroo";
  (O)       (Q)
\$\endgroup\$
19
\$\begingroup\$

Common Lisp, BASIC (and Python)

I took inspiration from some nice ASCII cars. Mine is a pickup truck seen from behind:

         (if'(
      (-----------------)  
    _(  _______________  )_ 
   (_( (               ) )_)
     ( (_______________) )
     (                   )
   (=======================)
   (( MY OTHER CAR        ))
   (( IS A CDR            ))
   (-----------------------)
    (  )               (  )
    (__)               (__))
(lambda()(format t"~&PRINT ~S~%""Vroom vroom!")))
\$\endgroup\$
  • 2
    \$\begingroup\$ @ETHproductions It is an old joke, not mine, btw. It is attributed to Erik Naggum. \$\endgroup\$ – coredump Sep 17 '15 at 15:00
  • 3
    \$\begingroup\$ nice one. Liked the rear window \$\endgroup\$ – Kishan Kumar Sep 17 '15 at 15:32
12
\$\begingroup\$

CJam, C++

My car is a 1988 Pontiac Trans Am. (I tried my best. :P)

                                 "#"e####===========_
                            "inclu"+               e#\
                          "de "   +           "<iostream>"+e#+--.____    __..
             N+N+"using"+" namespace "+"std;"+Ne#---" """""       """""  __'
      +N+"int "                                                    +"main()"+
 N+"{"+N+" "4*+"c"   +"out << \"Vr"+e#====================.--""  ""--.=======:
e#      [w] : /        \ : |========================|    : /        \ :  [w] :
"oom"+" vro"+            "oom!\";"+e#===============|    :|          |:   _-"
 N+"}"+e#___: \        / :_|=======================/_____: \        / :__-"
  e#--------'  ""____""  `-------------------------------'  ""____""

You can test this here.

CJam

"#include <iostream>"N+N+"using namespace std;"+N+N+"int main()"N+"{"+N+" "4*+"cout << \"Vroom vrooom!\";"+N+"}"+

And you can test that, here.

C++

#include <iostream>

using namespace std;

int main()
{
    cout << "Vroom vrooom!";
}
\$\endgroup\$
11
\$\begingroup\$

BrainFuck, Golf Script, Glee, JQ, Lasso, Lang5 & many more

          ++++++++++
       [>+++     >+++++
     +++>++      +++++++++<
   <<-]>++       + +.>++++++.
  <>>>>>>><<<<<<<><><><><><><>
 >++++.---..--.<<--.>>+++++++--
 ++++.----.---...--.<<+.+.-----
       --              --
      |  |            |  |
       --              --

Output

"Vroom vrooom!"

Which will be valid syntax for these language which will ouptut "Vroom vroom!"

Golf Script

Glee

J

JQ

Lasso

Lang5

m4

Ml/I

Salmon

TPP & many more

This list came from Rosetta code's Hello World Program

\$\endgroup\$
  • 12
    \$\begingroup\$ That source code doesn't look like any car I've ever seen! \$\endgroup\$ – Mark Butler Sep 17 '15 at 12:17
  • \$\begingroup\$ @Fatalize. it was typo. And sorry for J \$\endgroup\$ – Kishan Kumar Sep 17 '15 at 12:26
6
\$\begingroup\$

Java, Python

    public final class
Car{public static void main
(String    ...a    ){System
//CCCCC    CCCC    CCCCCCCC//
.out.println("print(\"Vroom"+
" vroom!\")");}}//HDBSKJBGIWE
      /////         /////
       ///           ///

(Sorry, the car's really bad)

\$\endgroup\$
  • 11
    \$\begingroup\$ That looks a lot more like a rain-cloud than a car :D \$\endgroup\$ – mınxomaτ Sep 17 '15 at 19:05
  • 1
    \$\begingroup\$ Yeah, it does. :) \$\endgroup\$ – HyperNeutrino Sep 17 '15 at 21:46

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