Import this into your own language

-2

The Zen of Python must surely be one of the most beautiful Easter eggs in any language. (It is created by writing import this)

So why not create a version for your own language?

For those who don't have access to Python 2 or 3, your code should output the following:

The Zen of [YOUR LANGUAGE]

Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than *right* now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!

The original was The Zen of Python, by Tim Peters.

This is code-golf, so the shortest answer in bytes wins.

Standard loopholes apply, this includes no built-ins (if you are making a solution in Python, Pyth or another derivative of Python, the equivalent of import this is forbidden).

boboquack

Posted 2016-10-24T20:56:57.467

Reputation: 2 017

Question was closed 2016-10-24T21:17:44.620

This is my first question, so please tell me whether it is good or not. – boboquack – 2016-10-24T20:57:26.960

@DJMcMayhem clearly, the solution here is to rename yourself :) – Nathan Merrill – 2016-10-24T21:04:35.240

2Even with the language and username fields, this challenge is still just printing a large, static block of text, which means it's a dupe of the rickroll challenge. – Mego – 2016-10-24T21:05:05.950

@DJMcMayhem I have removed the username part of the challenge. – boboquack – 2016-10-24T21:07:50.030

I argue that this isn't just a duplicate because it is relevant to coding. – boboquack – 2016-10-24T21:08:27.440

It is very similar in spirit to the rickroll, but I don't see why it couldn't stay open. I know we've been closing challenges as dupes of the rickroll for years, but I think it's kinda getting ridiculous. I want to leave it open. – James – 2016-10-24T21:09:59.827

If this question is closed as a duplicate, I think that there should be some way for new PPCG users to find these questions, as I couldn't find anything with a search. – boboquack – 2016-10-24T21:19:28.567

2

@boboquack there is the sandbox to get feedback on your ideas for challenges.

– Jonathan Allan – 2016-10-24T21:26:46.963

1

For KC questions in particular, a search is going to be hard, since while the words printed may not be the same, the underlying challenge often is. In addition to the sandbox (suggested by Jonathan), you can also browse the top voted Kolmogorov complexity challenges to get a (very brief) overview of the kinds of things that have been done.

– Geobits – 2016-10-24T21:32:21.427

Thank you @JonathanAllan I wasn't aware of this at the time. – boboquack – 2016-10-24T22:13:15.390

Answers

2

JavaScript (ES6) 665 bytes

f=a=>{for(_="._eds  ieaouobvishld itxplicpecial  idonesaty ennever th    to mplbetter   an explain, e Althgh If iemti`ThZ of JS__ButifuluglyEiicSiecoexCoexcoicFlntSparsedseRdabilcntsScas ar't sghbrk  rulpracticalbepuryError passiltlyUnlelsilcIn    facof ambiguy, refusthtemptigusTherbe-- and preferabll--waydo th wamanot b first unly'rDutchNowoft *right* nowhard'a badsy maba goodNampac arhking gre -- let'do morof  ose!`";G=/[-]/.exec(_);)with(_.split(G))_=join(shift());return eval(_).split`_`.join`
`}

Because of string compression, some characters cannot be displayed in this snippet. This is above script hex-encoded:

663D613D3E7B666F72285F3D222E5F1D65641D1C73201B20691B1A6561196F75186F627669181B177368186C64201669741578706C6963151470656369616C201320696419126F6E1165731061740F79200E656E0C6E657665720B2074680920746F20086D706C0762657474657209616E2006086578706C61696E2C2015056520041D416C746818676820031D496609046907656D0C740F69111A021A0601605468045A0C206F66204A535F5F421975746966756C0175676C791D45140169076963151D5369076501636F0765781D436F07657801636F0769630F1C466C0F016E10741C53706172736501640C73651D5219646162696C150E63186E74731D5313636173102061720C27742073130C186768086272196B090472756C100370726163746963616C150E62650F1B70757215791D4572726F721B160B207061731B73696C0C746C791D556E6C101B65146C0E73696C0C631C496E0904666163046F6620616D6269677515792C2072656675730474680474656D70740F691108677510731D546865720416620411652D2D20616E642070726566657261626C0E116C0E11042D2D1777617908646F20150374680F2077610E6D610E6E6F74206204170F20666972737420756E6C101B791827720444757463681D4E6F77010B030B1A6F66740C20062A72696768742A206E6F77026861726405271B6120626164120219737905206D610E62046120676F6F64121D4E616D107061631020617204110468116B696E67206772650F12202D2D206C6574271B646F206D6F72046F66096F73652160223B473D2F5B012D1D5D2F2E65786563285F293B2977697468285F2E73706C6974284729295F3D6A6F696E2873686966742829293B72657475726E206576616C285F292E73706C6974605F602E6A6F696E600D0A607D

It can be compiled using the following function:

f=a=>eval(a.match(/../g).map(a=>String.fromCharCode(parseInt(a,16))).join``)

Demo

sbisit

Posted 2016-10-24T20:56:57.467

Reputation: 291