Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

Required fields*

Bowl a rectangular quine

Code-Bowling Quine Challenge

You must bowl a quine following the rules of code bowling and quines but the source code must be in the shape of a rectangle (details specified below)


Quine

Quines returned must be returned via the ways defined in the standard I/O rules.


Rules

Code-Bowling Rules

  1. Character : Byte Ratio In Code-Bowling a character-count is preferred over a byte-count. The obvious reasoning for this is that multi-byte unicode characters (e.g. 🁴) can be used in place of single-byte unicode characters to fluff up byte count and will make bowling more about who renames the most variables with high-byte unicode characters rather than who most strategically creates meaningful complex code. (See Useful tools section at end for character-counting widget)

  2. Variable/Function/Object Names All variable names (or object pointers, function names, etc) should be 1 character long. The only acceptable time to use 2-character variables names is after all possible 1-character variables have been used. The only acceptable time to use 3-character variables names is after all possible 2-character variables have been used. Etc.

  3. Non-simplified Arithmetic All arithmetic should be in simplified form unless there is a justifiable reason for doing otherwise (e.g. circumventing penalties defined in the scoring system of the challenge (In which case you still must use the smallest possible alternative form)). Finding the simplified form of any equation (as well as a list of small alternative forms) is easy to do using Wolfram|Alpha. (See Useful tools section at end)

  4. Un-used Code All code must be used. Meaning the program must fail to always properly complete the task if any individual character (or varying set(s) of characters) is/are removed. Naturally, a subset of the program should not be able complete the task on its own without the rest of the program.

  5. Line-breaks and White-space Unless necessary for code function or otherwise specified by the challenge, all line-breaks and white-space should be removed from code before scoring by counting characters.

  6. Comments Comments are not permitted towards character-count, unless somehow utilized by your program/function.

Rectangle Rules

Your code must be in the shape of a rectangle, i.e. every line has the same number of characters. Your code must have at least 2 lines, with at least 3 chars on each line.

Also, each line of code must be distinct to a certain threshold. Distinctness is calculated using the Levenshtein distance. The threshold is 85%, meaning the Levenshtein distance between any two lines must be greater than or equal to 0.85*w, where w is the number of characters used in a line of your rectangle.

And for convenience, here is a Levenshtein distance calculator and a character length calculator.


Scoring

This is a variant. The program with the highest number of characters wins!

Answer*

Draft saved
Draft discarded
Cancel
2
  • \$\begingroup\$ Dang. That is impressive, good job! \$\endgroup\$ Commented Mar 27, 2017 at 15:10
  • \$\begingroup\$ If you want to make me smile (I would offer a upvote but you already got it) add a explanation \$\endgroup\$ Commented Mar 27, 2017 at 15:11

AltStyle によって変換されたページ (->オリジナル) /