Most creative way to display 42

  • Douglas Adams was born on March 11, 1952, and died when he was just 49. In honor of this wonderful writer, I challenge you to display 42 in the most creative way possible.



    You could print it in the log, via some convoluted method, or display it as ASCII art, or anything! Just come up with a creative method of displaying 42.



    Because this a popularity-contest, whichever answer has the most upvotes by March 11, will be declared the winner.



    Note: this is not a duplicate. The question it was marked as duplicating was a code-trolling question whose goal was to write code to output 42, not find the most creative way to display it.



    Winner: grovesNL! With an astounding 813 votes! Congrats!



    Honorable Mentions:



    Mr Lister C 228 For the clever use of #define



    David Carraher Mathematica 45 For the complicated and convoluted math function to achieve 42



    Aschratt Windows Calculator 20 Because, well, it's windows calculator And definitely 1337.



    f.rodrigues Python 17 Because of the clever use of using external programs. And MSPaint



    Jason C LMGTFY 14 For the use of LMGTFY (Let Me Google That For You)



    Trimsty Python 12 For the clever use of an error message to output 42.



    Mukul Kumar C++ 7 For the nice ASCII output.



    If you think that there is another answer worth putting on the list, please comment it!


    A fortitudinous challenge....

    @keshlam I guess...if one considers this challenge to be brave and courageous then yeah I guess it is :)

    @keshlam I know I was just messing with you :)

    The old closed question was a code-trolling, i.e, anything that does not shows 42 beside appearing to do so or do it in a really horrible way. This one is not code-trolling, i.e. the output should really be 42 in a nice way. Hence it is not duplicate.

    On any other SE site, this would be closed as "too broad".

    @DanDascalescu This SE site has many questions without strict requirements, which allows users to exercise creative freedom in their answers. Sometimes too many restrictions can impede the expression of creativity

    The question should remain at 42 votes.

    This question had just 42 answers!

    Marvin The Robot *"I would post my brilliant answer, but you would probably down vote it. Being right all the time is so depressing."*

    @SampritiPanda - too late!

    Everybody un-upvote!

    Can we get 42 favorites?

    @Milo: fav-count is at 42 now. :)

    First dibs on audio!

    @Aschratt Someone favourited past 42. Everyone unfavourite now to get down to 42!

    @Cruncher What if you guys unfavored it to 42 then someone else unfavored it to 41? Or favored it back to 43? :P

    Make votes and favorites 42 and freeze the question.

    @SampritiPanda I'm not sure questions can be frozen so solid as to prevent favouriting. Unless they are deleted.

    Haha, I'm the 42nd person to earn the Civic Duty badge... and I got it by voting on this question! That's just perfect :D

    42k views lol :D

    42 kviews, and the question above (the one about reversing an integer) has 42 answers...

    Pi! (314 votes)

  • grovesNL

    grovesNL Correct answer

    7 years ago

    Double Brainfuck


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

    which outputs...


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

    which outputs...


    6*7=42

    While being the worst dressed code in the universe, brilliant!

    Does the first output occur in that very shape? :O

    I always thought something was fundamentally wrong with the universe.

    @mfitzp Yeah, especially since mice were appointed to find the Question. o_O

    @mikhailcazi: Yes, it prints newlines and spaces to create that output. Run it in an online interpreter if you want to see.

    It should be `6*9=42`.

    7*7=49, so, 49-7=6*7=42

    @Proxy: True, but sometimes those references are lost on the viewers, even despite the context... ;-)

    @IsmaelMiguel: That's so base 10 of you...

    I upvoted the whole question just so people would see this answer.

    @IsmaelMiguel Not binary. Base 13! xD

    I still don't know the question.. but I think you may have just found the question to the ultimate question to life the universe and everything.

    One word: inception.

    If this is inception... can it go another layer to get the 42 that makes the 42 that makes the 42 that makes the 42?

    @WernerCD: rright. Let's just write TheApp that given an integer N emits a Brainfuck code that upon running will emit strictly different Brainfuck code that will be output-equivalent to running TheApp with (N-1) value.

    @WernerCD why not go further with 42 steps of 42s that make 42s?

    @Gorkk OK, do it!

    I logged on to this site for the first time *just* to upvote this awesome answer.

    @WernerCD I did consider going another level, but I was afraid I'd never stop.

    And I thought Brainfuck was the most useless language. I never once considered the horror of *Double* Brainfuck. +1 for masochism.

    I think this might be the 2nd highest rated answer ever on codegolf; we'll have to wait for next week's data snapshot to check.

    @JasonC Thanks for that information. This was only my second post on this board. I had no idea it would be this popular.

    @grovesNL That's because it's totally kick-ass! BTW I just noticed that I accidentally edited that query to show top questions not answers, and saved it. Fixed to show top answers again. We'll have to go talk smack on the Happy New Year post.

    Good. Now write a Brainfuck program that spells out a huge `42` and outputs a Brainfuck program that spells out a _larger_ `42`.

    @grovesNL Snapshots updated. It's official, lol.

License under CC-BY-SA with attribution


Content dated before 7/24/2021 11:53 AM