# Sandbox for Proposed Challenges

This "sandbox" is a place where Code Golf users can get feedback on prospective challenges they wish to post to main. This is useful because writing a clear and fully specified challenge on your first try can be difficult, and there is a much better chance of your challenge being well received if you post it in the sandbox first.

Sandbox FAQ

## Posting

Write your challenge just as you would when actually posting it, though you can optionally add a title at the top. You may also add some notes about specific things you would like to clarify before posting it. Other users will help you improve your challenge by rating and discussing it.

When you think your challenge is ready for the public, go ahead and post it, and replace the post here with a link to the challenge and delete the sandbox post.

## Discussion

The purpose of the sandbox is to give and receive feedback on posts. If you want to, feel free to give feedback to any posts you see here. Important things to comment about can include:

• Parts of the challenge you found unclear
• Problems that could make the challenge uninteresting or unfit for the site

You don't need any qualifications to review sandbox posts. The target audience of most of these challenges is code golfers like you, so anything you find unclear will probably be unclear to others.

If you think one of your posts needs more feedback, but it's been ignored, you can ask for feedback in The Nineteenth Byte. It's not only allowed, but highly recommended!

It is recommended to leave your posts in the sandbox for at least several days, and until it receives upvotes and any feedback has been addressed.

## Other

Search the sandbox / Browse your pending proposals

The sandbox works best if you sort posts by active.

To add an inline tag to a proposal use shortcut link syntax with a prefix: [tag:king-of-the-hill]. To search for posts with a certain tag, include the name in quotes: "king-of-the-hill".

Get the Sandbox Viewer to view the sandbox more easily!

# Wuhan Xi Estimates

Challenge
Create a program that takes two base-ten integer number inputs (w,x). The program should output the closest integer number that is x order of magnitude smaller than w, rounded downwards. The output should be zero if the result is less than 1.

Test cases

f(10,1) = 1
f(10,2) = 0
f(1000000, 3) = 1000
f(888, 2) = 8
f(99999, 4) = 9
f(7777777, 8) = 0
f(123455, 5) = 1
f(123455, 4) = 12345
f(123455, 0) = 123455


Example Code
Here's an ungolfed example in Lua:


a,b=b:match("([^,]+),([^,]+)")

if (b+0 > #a) then
print(0)
else
d = (a+0)/(10^b)
print (math.floor(d))
end



Try it online!

General rules

• This is , so shortest code in bytes in its respective language wins.

• Standard rules apply for your answer with default I/O rules, so you are allowed to use STDIN (with the specification above)/STDOUT, functions/method with the proper parameters and return-type, full programs.

• Default Loopholes are forbidden.

• Can we take input as string where the two numbers are separated by "E-" ? – Adám Jun 22 '20 at 21:52
• @Adám, Is "E-" executable code? If so, I guess that's fine, but it has to be part of the byte count. If it is just a glorified separator, or a switch of some kind, then yes and doesn't have to be included in the byte count. – ouflak Jun 23 '20 at 5:55
• My idea what that one could do something like floor(input) where input is e.g. 888E-2 thus trivialising the challenge. – Adám Jun 23 '20 at 5:57
• @Adám, That would be fine, and the challenge will have many 'trivial' answers in several languages. I'd be surprised if there isn't atleast a few 2/3 byte solutions. – ouflak Jun 23 '20 at 6:00
• Maybe mention in the challenge text that this amounts to computing $⌊w×10^{-x}⌋$? – Adám Jun 23 '20 at 6:10
• @Adám, There are other ways to look at it. My Turing Machine Code solution certainly won't be computing any powers. – ouflak Jun 23 '20 at 6:34
• Is that integers or positive integers? ;) – Trebor Jun 23 '20 at 16:07
• The wording 'closest integer number that is $x$ order of magnitude smaller than $w$' is ambiguous. I initially interpreted it to mean, e.g., f(1000000, 3) = 9999 (closest integer to 1000000 that is 3 orders of magnitude smaller). As Adám said above, it seems that you're just asking for $\lfloor w\times 10^{-x}\rfloor$. – Dingus Jun 25 '20 at 0:22

# Meta-golfing Numbers

The Esolangs Wiki has a page here cataloging the shortest known programs in Brainf*** to generate a given number. A similar catalog could exist for any language: it would simply be a list of the shortest known programs in that language outputting a given constant. By extension, we can assume that for any given language, a catalog like this could be generated programmatically, by creating a program that given a constant outputs another program outputting that constant.

## The Challenge

Your challenge is to create a program in any language $$\A\$$, such that when that program is given an input $$\N\$$, it outputs a program in language $$\B\$$ that will ouput $$\N\$$.

• Languages $$\A\$$ and $$\B\$$ need not be different; you can output a program in the same language as your source code.
• All outputted programs must be in the same language $$\B\$$.
• $$\N\$$ is guaranteed to be a positive integer. It may be $$\0\$$.

# I/O

• Input and output can be done with any of the default I/O methods.
• $$\N\$$ should be inputted as an integer, the string representation of an integer, or an array of digits. Programs should be outputted as a string or a list of characters.

## Restrictions

• Your program must handle values of $$\N\$$ at least up to $$\255\$$.
• Trailing whitespace and newlines are allowed, as long as they do not make any program invalid; ie., I can have trailing newlines and whitespace as long as the implementation of $$\B\$$ allows them in programs.

## Scoring

This question is a , so the answer with the most votes wins!

• A critique of the scoring system (and possibly the challenge as a whole): In some languages, the empty program outputs its input, and in some languages, a numeric literal outputs itself. So the optimal submission will be program A, 0 bytes, for a score of 0. But even if the scoring system is changed to prevent the multiplying-by-zero exploit, I don't see how any other approach will be better than the empty-identity-program approach. So as it stands, this challenge will gather multiple trivial answers--and probably some interesting ones, but with worse scores. – DLosc Aug 21 '20 at 1:52
• I don't think lowest score wins is a good idea for a contest where you have the flexibility to choose how difficult the task it. Might be better as a popularity contest, or maybe it would be better with a list of difficult languages to print constants in. – Razetime Aug 21 '20 at 2:09
• @Razetime yeah, I actually hadn't realized the multiplying by zero exploit, so this seems like the best course of action - I've updated the answer. – sugarfi Aug 21 '20 at 12:09
• Righ now, this is not metagolf, this is just... meta? – the default. Aug 22 '20 at 3:10
• I guess so, yeah... But metagolf is a bit catchier, isn't it? – sugarfi Aug 22 '20 at 13:23
• Program: any implementation of cat in any language A. Language B: cat. – user253751 Aug 24 '20 at 17:46

# Feedback Wanted

• Is this too vague? should I change it to something like "create a quine with the fewest unique bytes", or perhaps adapt another existing challenge that might otherwise use lots of repeated bytes?
• Maybe the idea is just too boring on its own and I should create a new proper challenge based around it?
• Should I change the scoring system (votes - unique_bytes) - should it be divided instead, or use a more complex formula?

# Introduction

This is , but not as you know it. Instead of every byte, This is sort-of also a question.

# Challenge

Write an interesting program that uses the fewest unique bytes. This is not really about what the program does, but what you can do with a limited set of characters.

### Rules

• Your program must run on Try It Online
• Programming languages with only a few permissible bytes anyway like Brainfuck's +-.,[]<>, are allowed, but officially considered boring

Apart from this, you can write anything.

### Scoring

• Hybrid of and "fewest-unique-bytes". Score is calculated as votes - unique_bytes
• Unique bytes is based on bytes, not characters or whatever. You can calculate unique bytes using this Python snippet: len(set(b"your code here"))
• It's definitely too vague. "Interesting" could mean anything, and you'd have to argue with several people over whether their ignore-input-and-print-0 program counts as interesting before the challenge is closed as too broad or unclear. [popularity-contest] is also a dangerous tag, in that it's very hard to do well and has fallen out of favor long ago. This extends to all scoring systems that involve votes. – Zgarb Aug 21 '20 at 19:33
• I think this idea has been largely covered by Fewest (distinct) characters for Turing Completeness. Many languages require surprisingly few characters to run arbitrary code, so I expect there's not much interesting room for specific programs that use fewer characters than needed for that. – xnor Aug 21 '20 at 22:39
• As far as I remember, there exists a Lenguage quine (that uses only 1 unique byte). I think combining popularity-contest with something else is even worse than simply using popularity-contest. – the default. Aug 22 '20 at 3:00
• For future reference, start your sandbox entries with the title of your challenge rather than a generic "feedback wanted". It's the prevailing convention and doing something different is a little confusing to scroll past. – Beefster Aug 24 '20 at 16:18

# Solving P=NP!

Today, we are going to solve P=NP, kinda...

## Input

A guaranteed prime positive integer, P.

## Output

The smallest composite number (NonPrime,NP) which sum of digits equals P.

## Examples

Input (P)    Output (NP)      Why? (for reference)
2              20          2+0=2 and 11 is prime
3              12                 1+2=3
5              14                 1+4=5
7              16                 1+6=7
11             38          3+8=11 and 29 is prime
13             49                 4+9=13
17             98          9+8=17 and 89 is prime


Check OEIS A073868 for more results.

## Challenge

Write a function or program that, given a positive prime number P as input, calculates NP, the smallest composite number which sum of digits equals P.

• Range of input: any integer prime number greater than 1, up to the limit of the chosen language.
• Range of output: also according to the limits of the chosen language.
• Means of input/output: free to choose.

## Winning condition

This is a challenge. The shortest code wins!

## Meta

I have searched if this was already posted, but with no success.

• To me, this isn't all that interesting of a challenge because it's a mash-up of "find a number whose digit sum is X" and "check if a number is prime." If a language has a built-in for primality, it's done. If not, it's still been done over and over again. The fact that the input is prime doesn't really add anything here for me. And skipping over primes as possible answers doesn't either. Why not do "find the smallest number whose digits add to X?" or "Find the Yth number whose digits add to X" where both x and y are inputs? – Xcali Dec 23 '20 at 20:37
• The challenge itself looks to be well specified but I dislike the title. I'm all for using clever/controversial titles to attract attention, but not at the expense of accurately conveying what the challenge is about. – Dingus Jan 1 at 1:38

# Enumerate all possible IPv4 addresses

Title might make the challenge hard, but it's easy.

You have to print all the possible IPv4 addresses from 0.0.0.0 to 255.255.255.255

Standard loopholes apply, no internet usage for this

# English Grammar Checker

Being tired of checking English grammar, I decided to write an English grammar regular expression.

## Notations

1. All capital letters denote an expression.
2. Quoted strings (like "a") and lower-case letters denotes literals.
3. AB means concatenating expressions / literals A and B together.
4. (...) groups the expression inside the parentheses, as a whole expression.
5. A* means repeating the expression A zero or more times.
6. A? means the expression A is optional here.
7. A|B means either A or B can be placed here.
8. A=B means all expression A should be replaced by B.

## Grammatical Rules

### Parts of Speech

For simplicity, all parts of speech are substituted using symbols.

Symbol Part of Speech
a article
b verb
m numeral
n noun
r pronoun

### Rules

There's a whole bunch of rules in English grammar. For simplicity, I only chose a tip of the iceberg. Your RegEx should only match all valid S's.

1. S=N+V
2. N=((a|m)?j*n(pN)?)|r
3. V=b((pN)*|N)?v?

## Examples

These should be matched Real-life example
anb The man runs
rbpajjnv He dives into the deep blue sea quickly
anpanbpr The wave on the sea came towards me
mnpambv Two friends of the man walks slowly
anpmjjnbajjnv The robot of two tall thin girls greets the young handsome man repeatedly
These shouldn't be matched Real-life "wrong" sentences example
nn Man child
nabr Student a told me
arbv The you laughed happily
anbvv The woman sang slowly beautifully
rbvj He is very funny

Notice that the last example is a valid English sentence, but it doesn't match our simplified rules. You shouldn't match them.

## Tips

You can assume that there's no whitespaces and line feeds in the input.

You can assume that you only need to match 1 input per time.

You can use any RegEx dialects no newer than this challenge.

## Scoring

Your score is the bytes in your RegEx. Flags are not counted.

The least score wins!

• Are you sure that this grammar is really decidable with a regex? – user202729 Feb 19 at 9:12
• YES @user202729 and I've already made one; but not decided to make it public yet. – SketchySketch Feb 19 at 9:14
• It's better if you explain what format the rules are specified in. (while I can understand it, it isn't obvious) The standard is Backus-Naur form I guess? – user202729 Feb 19 at 9:20
• Any dialect restriction? – user202729 Feb 19 at 9:21
• I wrote the format for rules in Notation section; is it unclear? – SketchySketch Feb 19 at 9:22
• Originally I overlook that = can be recursive and I can't find capital N in the table. – user202729 Feb 19 at 9:24
• Err, yes, but I don't have good ideas about how to explain ='s. It's just kind of, substitution? But it can be recursive? Anyone have ideas? – SketchySketch Feb 19 at 9:26
• Perhaps you can show an example of a simple (recursive) pattern matching a simple string. – user202729 Feb 19 at 9:30
• Not sure if you're asking an example regex matching a recursive rule. For A=(yA)|x using the same notation, regex: y*x. – SketchySketch Feb 19 at 9:37
• Does "without flags" mean ", flags are not counted"? That sentence can be interpreted as "regex flags are not allowed" too. – user202729 Feb 20 at 8:44
• English grammar is not regular and cannot be matched with a regular expression. At best, you can tease out some subset that is context-free, but realistically, this is not a good challenge as it is written. Natural languages tend to be riddled with all sorts of crazy complexity that makes them highly context-sensitive and possibly undecidable. – Beefster Feb 22 at 16:55
• @Beefster As I wrote in the challenge you should only match the simplified "rules", as in section Rules. There're only 3 rules. As I commented before I already wrote a regex that can match these rules, so the challenge is absolutely solvable. – SketchySketch Feb 23 at 2:54
• @Beefster And op did do that. (op claim that the chosen subset is context-free, but I didn't verify it) – user202729 Feb 24 at 3:52
• @user202729 if you want to verify, <S> ::= <N><V>, <J> ::= "j"<J> | "", <N> ::= "r" | "a"<J>"np"N | "a"<J>"n" | "m"<J>"np"N | "m"<J>"n" | <J>"np"N | <J>"n", <P> ::= "p"N<P> | "", <V> ::= "b" | "bv" | "b"<N> | "b"<N>"v" | "b"<P> | "b"<P>"v". Really verbose. – SketchySketch Feb 24 at 4:08
• Even with this limited subset, reducing it to a regex really only has one optimal approach and isn't particularly interesting in lending itself to many different approaches. – Beefster Feb 24 at 16:31

Given a positive even integer $$\n\$$, generate a random Brainfuck snippet of length $$\n\$$, containing only +-<>, that do no modify to the tape or tapehead.

To avoid random generation and try again or fallback into a trivial nop for invalid nops, your solution should run in polynomial time, and the ratio of possibility returning any two nops should be below polynomial.

## Code-challenge: Guess my number

### The challenge

You have a number from 1 to 10 in mind, and your program should ask questions to find out which number. These questions can be any questions, the program only has to find out the number as fast as possible.

Your program should ask a question, such as "Is the number a prime?", and the user must answer either y or n (yes or no). Ask questions until you know the number.

### The scoring

To calculate the score, you need to take the sum of the question count for each number. For example, if you need 1 question to find the number 1, 2 questions to find the number 2, and so on, the score is 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10, so the score is 55.

Important note: the question count for a specific number must always be the same. For example, if you need 4 questions to find out the number 10, then you have to ask always 4 questions to find out the number 10, otherwise it is impossible to calculate the score.

• boooring. The Huffman tree for a uniform set is any perfectly balanced tree. The question asks us to perform a binary search on the usr device. Is the number greater than 5? Is the number greater than 2? Is the number greater than 1? Hey' I think it's 1. – John Dvorak Jan 2 '14 at 11:49
• Maybe if this were a pop-contest and the goal was to make the most original set of questions while still keeping the score at its theoretical minimum. – John Dvorak Jan 3 '14 at 5:28

Bovine Ignorance

I'm curious about code which still works after being mangled by figlet, toilet, cowsay et al, but I'm not sure whether this in any way sane.

What I'm toying with is a challenge in which a participant may submit any program in any language. It should be possible to use this program's source code as input to cowsay or whatever, and the result should be another valid program in any language, which still does a similar thing. For instance, the following bf program prints Hello world! with no newline:

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


Running cat ./prog.bf | cowsay -e .. -T $'>.' yields the following output:  _________________________________________ / +++++ +++++ [ > +++++ ++ > +++++ +++++ \ | > +++ > + <<<< - ] > ++ . > + . +++++ | | ++ . . +++ . > ++ . << +++++ +++++ | | +++++ . > . +++ . ----- - . ----- --- . | | > + . | | +++++++++++++++++++++++++++++++++++++++ | \ ++ / ----------------------------------------- \ ^__^ \ (..)\_______ (__)\ )\/\ >. ||----w | || ||  Which is itself a valid bf program which prints Hello world!!!, followed by a newline. The problem with using bf here is that it ignores most of the cow, making this a bit too easy. The problem with using any other language is that it doesn't ignore most of the cow, making this far too difficult. Is there a sensible middle ground I could pick for this? I don't think it's impossible, I'm fairly sure you can exploit cowsay's behavior on one-liners to produce valid svgs, but I'm not sure how best to pose this challenge. Any ideas? • I could not think of any language that falls in the middle ground. Even brainfuck is affected by the -----------------------------------------..>.---- inserted by cowsay. Most languages have strong parsing rules that would not cope with being post-processed by cowsay. The few exceptions for this will be either completely unaffected or badly affected, making the challenge uninteresting. – Victor Stafusa Feb 19 '14 at 12:32 • Actually, you can't transform just any brainfuck program to cowsay-brainfuck. Namely those that can output fewer than three characters cannot be transformed at all. – John Dvorak Feb 19 '14 at 14:52 • @JanDvorak, I was intending to allow competitors to choose the parameters of their calls to cowsay. For the uninitiated, -e controls the string used for eyes and defaults to oo, and -T controls the string used for the tongue, defaulting to  U. This is all yak-shaving, though, and having written this up and read the comments, I suspect that this idea has neither legs, horns nor udders. – ymbirtt Feb 19 '14 at 23:19 • If I could propose a variant that is more feasible, you could do a challenge like "Write a program in your language of choice that draws ASCII art of a cow saying something (does not have to be identical or even similar to the cowsay art). The entire drawing must itself be valid source code that does something other than no-op. Post results of both programs." That gives people more leeway to work around the specific restrictions of their compiler. – Jonathan Van Matre Feb 21 '14 at 23:22 • Ok, I found a language that falls within the middle ground: whitespace. Anyway, this question has a too narrow scope to develop an interesting challenge. – Victor Stafusa Feb 22 '14 at 18:31 • @JonathanVanMatre That would be a subjective validity criterion, and would probably be closed as too broad. – wastl Jul 2 '18 at 13:55 # 99 Bottles of Errors While there are already many versions of "print 99 Bottles of Beer," I thought another one wouldn't hurt. The challenge is fairly simple: print the lyrics to 99 bottles of Beer to STDERR. I don't care how you do it, so long as the entire lyrics show up. An entire program is required, so the following Java program would be invalid (even if it did do the correct thing): System.out.println("99 Bottles of Beer on the Wall, take one down and pass it around...");  ## The scoring: • This challenge is , so shortest code by byte count wins. • If necessary, assume UTF-8 is the character encoding used. ## The rules • All the code must be in one file. • Any language is allowed. • Reading input, whether it is from STDIN, a file, or the web, is not allowed. • This is trivial in some languages (Java), where it reduces to a simple kolmogorov challenge, and impossible in others (those that have no distinct STDERR) – John Dvorak Mar 27 '14 at 7:42 # Create an Identicon Generator The challenge is to create an identicon generator. The identicons must be randomly generated, so we get a new identicon for each key the program receives. You can input a key using std-in or you can use your language's random number generator for the key. In order to make your identicon look reasonably nice, it must generate a picture, then rotate that picture around the bottom right corner, the way this mockup shows: The output must be to a PNG file. Shortest code wins. • Far too broad. As this stands I can create a 1-pixel image whose colour is just the key. I don't think this question will be ready to go until you've found a way to prevent me from making the images differ only in their palette (and to pre-empt, I think that adding a rule "Images may not differ only in their palette" isn't a real fix). – Peter Taylor Mar 28 '14 at 14:50 • If you just ask for "random" images, you'll get images that are either hardly random at all (a solitary pixel in a random location), or completely random (noise). To get something "reasonably nice", you'll have to provide very clear instructions on how to produce these images. I suggest you try creating a few of these yourself, and find a minimal set of rules that produces results that look OK. Include requirements on dimensions (100x100px?), selection of colours (at least 2, not too similar), and drawing method (e.g., "five triangles with random vertices and a minimum area of 20 px²"). – r3mainer Mar 28 '14 at 15:25 • How important is the PNG file output? This will be a challenge in itself for many languages. Would you accept an uncompressed non-interlaced format like PPM? – trichoplax Apr 16 '14 at 9:45 ## Underhand Bejewled Help me to write a game of bejewled, which cannot be lost! ## Bejewled game rules If you ever played bejewled, you can skip this, but for those who did not see it ever: • Playing field of 8*8 grid is filled in with gems of 7 different types randomly • By swapping two adjective stones, your goal is to create a line of at least three same type of stones in the either vertical or horizontal line • If did so, the gems will dissappear, points are added (say 20 points for a matching) and new gems are provided randomly from the top • image related: ## Your challenge Provide me a game which cannot be lost. In other words, the gems falling from the top are not random at all, but are falling in order that there is always at least one possibility to match three gems But, from looking at the code at level of newbie programmer, it should look like that game acts as if it was random ## Output Playable game. As long as it is the grid of 8*8 filled in with 7 different types of "gems" the game is ok. It does not to have killer graphics, neither it does not need to be playable by mouse. (But in that case please make sure you show which "gem" is hovered and then selected) ## Winning criteria This is popularity contest. So highest rated game wins • I think this is too big a task to work well for an underhanded contest. The programs will be way too large for anyone to actually read the source and try to find what's underhanded about it. – Martin Ender Nov 11 '14 at 8:32 • Thats what I was also afraid of. I will either take it as lesson to progress on my programming skill, or abandon the idea completly – Pavel Janicek Nov 11 '14 at 8:38 # Shortest Program that May or May not Terminate: Write a program such that whether or not it terminates depends on the answer to an unsolved question in Computer Science or Mathematics. For example, your program might test the Goldbach conjecture for every N and quit if a counterexample is found, or hunt for odd perfect numbers. Please include an explanation of why your program may or may not terminate! Note: assume infinite memory and stack size, because otherwise they all terminate. Your program must be self contained, take no input, and only use standard libraries. This is Codegolf, so shortest code wins! • What about "unsolvable" problems, e.g. halting problem? Can I take another code as input and terminate if that terminates? Because that other program may or may not terminate, and there's no way to tell. – Martin Ender Nov 20 '14 at 18:03 • The intention was that the program isn't allowed to take input. I'll be more specific. – QuadmasterXLII Nov 20 '14 at 18:50 • Does this differ from this previous question in the sandbox? – trichoplax Nov 20 '14 at 19:34 • (even if not the comments explaining why that one wouldn't work as a question may help Taylor this one) – trichoplax Nov 20 '14 at 19:35 • The intent of this doesn't differ significantly from the question you linked, I searched posted questions but forgot to search the sandbox. – QuadmasterXLII Nov 20 '14 at 19:41 • Infinite memory isn't required. – feersum Nov 20 '14 at 21:46 # Something Else - ASCII Art maker: A text to ASCII art generator maker, the program must input a string and return ASCII art from it. Something like patorjk.com/software/taag/. It has to use the Graffiti font. The winning criteria is the whoever gets the most likes. • Hello! Just a few things to point out: 1) The current spec is very broad. For example, what fonts, how does spacing look, what characters need to be supported... there's a lot more details that need to be included than just "return ASCII art of this text" – Sp3000 Feb 24 '15 at 4:07 • 2) What's the winning criterion? Popularity contest? Code golf? – Sp3000 Feb 24 '15 at 4:08 # Identifying a Sonnet This challenge is about determining if a given file (read-in from stdin) meets the criteria to be a sonnet. You may use any language for this challenge. If your language supports an API to use an online dictionary you may use that API, if your language doesn't then too bad. Additionally, it is preferred if your language is one that can be ran directly from the command line and is a language that has a compiler or interpreter available directly from my distro's repos(Fedora), as I would rather just use a bash script to test the various programs, then test each program manually. # Definition of a Sonnet • Has 14 Lines (lines are denoted as the standard newline on your operating system). • Has a definite rhyme scheme, it will have one of the following rhyme schemes • ABBA ABBA CD CD CD • ABBA ABBA CDE CDE • ABAB ABBA EFEF GG • Iambic Pentameter - consists of alternating stressed, unstressed syllables. This doesn't have to be perfect 100% of the time, just at least 50% of the time. In order for your program to declare a given string a sonnet, it must meet all of the above criteria. ## Additional Notes You do not have to identify the following: • Thought Structure - too intense for a code golf challenge, and too subjective. • Topic - computer lacks context to determine this # Input Input will be read from stdin. This is the string that you will be declaring to be or not to be a sonnet. # Output Your program will output either yes or no for the question: Does this string meet the given requirements to be a sonnet? As this is code golf yes or no can be abbreviated to Y/N. # Winner The solution with fewest number of bytes win that has the highest accuracy ratio for the correct identification of a sonnet. The preference is for higher accuracy rather than brevity of the program. # Test Data and Resources ## What is not a sonnet The following are examples that you program should return false on: • Beowulf • Haiku • Input that doesn't have exactly 14 Lines in it • The text of this question. • The text of just about any other question on StackExchange. • Things that don't have a rhyme scheme. See Below # Not A Sonnet A man got on a boat The boat was leaky and had poor construction For it was made by a one-eyed blind man and his dumb intern As soon as he got out of port at the fort it started to sink eventually, it tanked. And it capsized If only that shipwright wasn't so blind deaf and dumb as microsoft tech support That's not much support at all.  • I think without dictionaries for rhymes and stresses this is probably not a good idea. Of course you can use some sort of accuracy ratio, but then you also need false positives, and you need a lot more examples than the few on the pages you've linked. But if you do this there's no requirement to actually recognise the sonnets by their rhymes and stresses - instead, I'm pretty sure, people will just regex golf the test sets. – Martin Ender Mar 24 '15 at 19:36 • @MartinBüttner I updated the requirements with an accuracy percentage, and added the option to use an API to look up terms from a dictionary. – HSchmale Mar 24 '15 at 19:57 • 1. Test data which only covers one possible output isn't test data. I can write a program which always outputs Y in as little as one byte and it will pass all of the linked "test data", but it comes nowhere near to meeting spec. 2. Unless you specify which rhyme/stress dictionary to use, you can't guarantee that the test data is "correct". – Peter Taylor Mar 24 '15 at 20:20 • @PeterTaylor I added examples of what is not a Sonnet. – HSchmale Mar 24 '15 at 20:32 • I'm not sure how to say this, but it feels as though this task has a lot of individual parts, each of which could be quite tricky. Especiallly detecting rhymes/syllables/stresses, since words can be pronounced/stressed differently based on context. Also if you're using Shakespeare's sonnets I have no idea where to get rhyming and stress dictionaries for Elizabethan English... – Sp3000 Mar 25 '15 at 14:18 • To make this interesting, you'll need some interesting near-misses: non-sonnets that can't be detected by something simple like counting lines or words per line. – xnor Mar 25 '15 at 20:59 • @xnor You mean a file with a that looks like a sonnet but has no rhyme. – HSchmale Mar 25 '15 at 21:04 • Yes, for example. Or, one with rhyme by wrong rhythm. Or, one with nonsense characters that seem to "rhyme". – xnor Mar 25 '15 at 21:06 • @Sp3000 You can just use modern english, or just base it on words that have similar endings. – HSchmale Mar 25 '15 at 21:11 # Stop the dance! Your sister was at the hospital, but now she's fine, awfully, you lost a day of work, one of your most important days. You work at your local television, and they have a contest, called "Stop the dance!", what is it about?: People is dancing, they have a big screen in the wall, while it says "Dance!", they have to dance, if it says "Stop!", they must stop, if you move, you lose. You don't have internet at the studio, so you use some strange offline data sharing method. The day you weren't there, another programmer came, such a silly programmer! He made a "Reciever" program, basically, gets data, processes data and prints data in the Big Screen Wall. The programmer was bored, so he made a way to get data, well, you don't know what way he choose! (Author comment: Let's assume he made all the possible ways. Cya.) Now you have to make a sender program, in any language, that sends data to that program using the protocol specified under this section. You are an expert code golfer, so you decide that you must make the shortest code possible. (Another author comment: Any lang is allowed. Cya.) # How did I came out with this idea? Having a shower, my friend... # Your task You must make the shortest (and winner) code possible, that sends data to the reciever, using this protocol: The reciever must recieve: $displaytext:"<text here>";$instnm:<integer here>;$displaytext corresponds to what it is going to be displayed on the Big Screen Wall.

$instnm corresponds to the number of the instruction, the count of things displayed, starts from 1. Your program may take an input, and send the data, in any way (except the ones in Rules) to the Reciever. Remember there's no internet. The winner will be the user with shortest bytes of code. # Rules ## As a good code golfer, you may not: • You can't use program arguments to send the data. • It must be an application. • If you apply for the bonus, mind you have to make both programs, if not, just the sender. • The string you have to send it has to be STRICT, no different ones, if not, unvalid answer. (I decided to call that "Strict JASON Protocol", get the joke?) # Bonus You can make the reciever program, and you get -1 byte. Not much, but k. (In bytes, you must not decrement your byte result, you must do: "n Bytes + Bonus") # Example Input and Output ## Input: From Sender program: Dance! or Stop! ## Protocol: Inbetween both commands $displaytext:"Dance!";$instnm:5 ## Output: In Reciever program: Dance! (9) or Stop! (187) # Overall objective: Send data between two programs, without internet connection. Edit: i can't post an example answer, because then i can give ideas of how to do this codegolf/puzzle, while the ideas are limited, i'm finding for the creativity of the user. • I have no idea what you're asking me to do. – Peter Taylor Feb 3 '16 at 21:26 • It is pretty clear what is asking you to, is defined in Task (You must make the shortest (and winner) code possible, that sends data to the reciever, using this protocol), all the story and background is defined on Introduction. I dont see any hole on the post. – TheCrimulo Feb 3 '16 at 22:11 • @TheCrimulo Example answer? – Xwtek Feb 7 '16 at 7:06 • There is no Example, because you are just sending the same info you wrote in. If you type ´Dance!´, the output will be Dance! (n), n being the number of the sequence. The idea isn't to read input, and append (n) to it. You have to make it, in anyway (except command args/internet), dropping out the enoded data (input in the protocol), and, if necessary, make a reciever program, the reciever program its a bonus that discounts 1 byte, also, it can help you making your sender smaller. I can, i.e., make a file with the info on it. As explained, the reciever will read it. – TheCrimulo Feb 7 '16 at 15:54 # Biggest single character This challenge is simple, its like the challenges we've had before where the goal is to produce the biggest output one can. But in this one, you can only use one character in your code. You get no input, your code has to be a single character (not byte), and the person with the largest output in byte wins, ties broken by posting time. • Doesn't this boil down to which language has the biggest output stored in a predefined variable? – Denker Apr 3 '16 at 20:50 • @DenkerAffe true. maybe i should make it 2 byte src code. that might allow some interesting stuff – Maltysen Apr 3 '16 at 20:52 • I think I would raise the char amount a bit more to allow for some competition between the same language. Also you should keep in mind that this rules out every non-golfing language. While this should be allowed per meta consensus, I am not sure how much the community likes this. – Denker Apr 3 '16 at 20:58 • G for pyth wins :D :D – Leaky Nun Apr 4 '16 at 4:45 • Befunge & co. would probably win via infinite output. If output has to be finite though, I wouldn't consider this a very interesting challenge since it would just be one big language hunt. – Sp3000 Apr 4 '16 at 10:27 • Actually, N in Seriously wins. 11752 bytes output. – user45941 Apr 6 '16 at 4:06 • @Mego Vitsy wins. 0 bytes, 11752 bytes of output. – Addison Crump Apr 7 '16 at 17:07 # Alphabetization 101 (popularity contest) Your task is to use all 52 letters of both the uppercase and lowercase alphabet, ONCE and ONCE only, and make a program. You are free to use any other ASCII character more than once, or use a letter of the alphabet more than once if it's required for the language to function. ## Meta: • Not sure if this has been done before. • Any questions regarding the task? • Not really meta: Is there any place I can go to (like a chat or something) to post a question about BF? StackOverflow probably isn't suitable. – clismique Apr 17 '16 at 6:48 • Come to our chatroom! :) – Leaky Nun Apr 17 '16 at 6:50 • I would vote to close this as too broad. It's not a particularly interesting restriction per se, and it certainly doesn't make a good question without some restriction on the task to be performed. – Peter Taylor Apr 17 '16 at 14:07 • @PeterTaylor That's why it's a popularity contest, though - it lets the people decide whether the program made is good or not. What WOULD be a good restriction on the task? – clismique Apr 18 '16 at 1:40 • The popularity-contest tag is not an excuse for a broad challenge. "Write a program that does anything..." is pretty much the definition of "too broad", regardless of any source code restriction put on the program. So at least you should choose a specific task. Could be anything really, but if it relates to the restriction it might be more interesting (e.g. a pangram checker). Even so, I agree with Peter that the restriction isn't particularly interesting. There are tons of languages where it's trivial to avoid unwanted letters and then include the remaining ones in a string or comment. – Martin Ender Apr 21 '16 at 7:04 # Why did I come to Sandbox? I have a very specific challenge, and I wanted to see if it was too specific. The challenge is to output "Valdosta ACM" using the shortest number of characters with the BrainF**k programming language. I've noticed it isn't the norm to specify a programming language on this domain, so I've come here to get feedback on whether or not this is acceptable. # Introduction As a challenge to the members of my local Association for Computing Machinery(ACM) chapter, I asked them to produce the shortest Brainf**k code that would output "Valdosta ACM". This was a very fun challenge for all of our members, and we got very competitive! I was impressed with the solutions turned in, but I wondered if it was possible to beat our best solution. Surely it's possible, but who could do it? # Challenge Output the string "Valdosta ACM". Stipulations: • Use only the Brainf**k programming language (you can test your code here) • No input can be accepted by your program • Your program must halt • The space in the string must be ASCII character #032. These are the ASCII values of each character, as they appear in the string, for convenience:  086 097 108 100 111 115 116 097 032 065 067 077  The winner is determined by the shortest code, by character count. # Example Input and Output ### Input: NO input is allowed ### Output: Valdosta ACM • Welcome to Programming Puzzles & Code Golf! Thanks for using the Sandbox. :) A few things to note: 1.) Generally we discourage language-specific challenges, 2.) typically code golf is scored by bytes rather than characters, and 3.) printing a fixed string like this would be insufficiently different from the Hello, World! challenge to avoid it being closed as a duplicate. – Alex A. Apr 25 '16 at 3:38 • Thanks Alex! Since I want to compare the results of my local competition with the results of the challenge here, is there anything I could change about the challenge to make it acceptable? I don't see a way to do this, but I was so excited about seeing if anyone here could do better than our coders. And thanks for the warm welcome! :) – Matt C Apr 25 '16 at 3:48 • You could look at Brainf**k solutions to other challenges (like this one), and see if the techniques used there can help you improve your solution. – ugoren Apr 25 '16 at 7:09 • We also have a tips question that may be of interest. – trichoplax Apr 26 '16 at 6:30 • Although this particular challenge is probably too similar to "Hello, World!" (as Alex pointed out), if you had a different challenge that you wanted to see solutions for in a specific language, you can still post it but just allow all languages to compete. If you don't see solutions in your specific language you can post a bounty for that language to encourage it. – trichoplax Apr 26 '16 at 6:33 # The FitnessGram™ Code Golf Test Same concept and rules to the well-known Rick Astley post a while back, only instead of using samples of various sizes, sample length is limited to what number sample it is. And different text for the program to write. It's code golf, so standard loopholes apply, and fewest bytes wins. • Closed as a dupe. And/or unclear. – Rɪᴋᴇʀ May 19 '16 at 20:04 • Paragraphs of text are boring for compression. Unless there's some particular structure in the text, the same techniques apply to all of them. – xnor May 19 '16 at 20:07 • First off, thank you for using the Sandbox before posting on main. That said, I don't understand what your challenge is supposed to be: what is the sample length? What is a sample? In addition to that, if this challenge winds up being "print some fixed string" then it is a duplicate of the rick astley post, as the techniques used for compression will be identical. – FryAmTheEggman May 19 '16 at 20:09 • we want to give them a challenge, not a flashback.... – user56309 Aug 4 '16 at 19:42 • This sandbox post has had little activity in a while and little positive reception from the community. Please improve / edit it or delete it to help us clean up the sandbox. – user58826 Jun 9 '17 at 14:12 # Obfuscate your program In this challenge, you must create a program which does something but you need to obfuscate it so that it becomes hard to understand (so don't explain it in your post). It can accept anything as input and output anything. Score The shorter program (in bytes) which hasn't been understood wins. Example Can you guess what does this code calculate? var t=1e5,s=t/1e4,n=s*0.1,i=n*s*7.5,r=!true,b=1,t='01'.split('').map(c=>parseInt(c)).concat(Array(i).join('.').split('.').map(m=>{a=r+b;(r=b)&&(b=a);return a})),t=t.join('').length,b=s,t=r,s=4+NaN;  Rules • You should say what language you used • You must not use any obfuscation tool • At a minimum, you should state an actual objective: "obfuscate a program that does x". Otherwise it's just too broad and will likely be closed as such. You'll also need something else to explain the scoring, since "shortest that isn't understood" seems odd to me. Understood when? How do you show that it hasn't been understood? Do you mean something like Cops and Robbers?. – Geobits Jun 4 '16 at 19:06 • This sandbox post has had little activity in a while and little positive reception from the community. Please improve / edit it or delete it to help us clean up the sandbox. – user58826 Jun 9 '17 at 14:12 ## "01_firstHole" Challenge for Performance Golf First there was code golf. Now, there is Performance Golf. FORE! ## Motivations This is a crowd-sourced approach to easier and better performance troubleshooting. Performance problems are everywhere, so java technicians need access to easy-to-use diagnostic tools at every step of the SDLC. ## How to play? 1. Start by installing the live demonstrations of Java Performance Problems in this repo. 2. Pick one of the six holes of golf to play. You can do this by picking one of the six numbered folders in the repo. This particular codegolf.stackexchange.com challenge is for the 01_firstHole. 3. One at a time, run the 'a' load test and the 'b' load test for the hole you selected. The a & b tests are two different implementations of the same REST/SOA service. See the 'installing' link, above, for how to run the tests. 4. Compare the performance of the two tests, a & b. Which has better response time / throughput? 5. Using the least amount of tooling/instrumentation, identify the performance problem of the slower test. Hook it up your self and run the tests. 6. At codegolf.stackexchange.com, there is one "Stack Exchange Challenge" for each hole of golf. Post the following two things for your solution to that challenge: • Post a description of the tools/techniques you used to detect the performance problem. Must be detailed enough so that others can reproduce your work. Performance golf always compares two different loads -- a & b. The solution must identify the inefficient code in the slower of the two examples. It must also show the absence of that inefficient processing in the faster of the two examples. • Tally the number of strokes for your approach, using the "Scorecard" below. All solutions must specify the # of strokes incurred, and it must be specified in the answer heading/title. 7. Upvote the solutions that best identify the performance problem and have the fewest strokes (see Scorecard, below). Similar solutions on different platforms (Mac/Linux/MS-Win) deserve roughly the same number of upvotes. ## Scorecard This scorecard determines the approach with the least amount of tooling/instrumentation. Lowest score wins! • 1 stroke if JVM restart is required to hook up your monitoring tool of choice. • 1 stroke for any tool with any$$licensing cost. • 1 stroke for every separate install process. No strokes for JVM and pre-installed OS tools. • 1 stroke for tools/techniques specific to a particular Database vendor. Ex: Oracle AWR report. Even ‘EXPLAIN PLAN’ solutions are proprietary. ## Example One -- zero strokes :-D This example does not use this github repo, but it will give you the general idea. This solution to solving a high CPU problem would get lowest=best instrumentatin score: zero strokes. Only JVM and OS tools are used (thread dump and top -H). There are no tool license costs and a JVM restart was not required for the thread dump. ## Example Two -- 3 strokes :-( This example also does not use this github repo, but it will give you the general idea of what we mean by the best troubleshooting with the least tooling/instrumentation. A modern, commercial profiler (YourKit, JProfiler, etc...) would easily solve the high CPU problem in example 1. But look how many strokes (1+1+1=4!) are taken off with this approach: * 1 stroke because a JVM restart is required to hook up the tool * 1 stroke because there are licensing costs. * 1 stroke to install profiling the tool • Answers in this site normally involve writing code, so this doesn't really appear to be on topic. – feersum Jun 16 '16 at 7:43 • Thanks for using the sandbox! I do however, see some problems with this challenge. For one, I think you would need to clarify a lot of the stroke criteria, as something like "rarely used" is pretty subjective. In addition, there doesn't seem to be a way to enforce a person to not use a high level tool, and then after figuring out the problem finding it again with a more basic tool. Even further, why couldn't someone look at another answer and then reuse their data to get a better score? cont... – FryAmTheEggman Jun 16 '16 at 13:22 • After all that, there doesn't seem to be an objective winning criterion, unless it is number of strokes. If number of strokes determines the winner, then won't there be many ties? I think you would need something more granular. – FryAmTheEggman Jun 16 '16 at 13:24 • Sounds like I need to work on the "rarely used" part mentioned by @FryAmTheEggMan. Regarding the same commenter's comments about the high-level tool and the basic tool. That is part of the natural progression of monitoring. We learn to do it one way, then we learn a better, less intrusive, less expensive way. As long as the user of the basic tool is "detailed enough so that others can reproduce your work", who cares how much refinement was involved? – Erik Ostermueller Jun 16 '16 at 22:45 • Regarding @FryAmTheEggman's question of "many ties". I look at auction sites like eBay as reasonable crowd-sourced arbiters of value of a given object for sale. I was hoping the voters would provide that kind of assessment, but I see where lack of objectivity could cause cronyism and perhaps other problems. Could someone point me to codegolf tolerance/lack of for ties? I'll try to work on that. – Erik Ostermueller Jun 16 '16 at 22:48 • @FryAmTheEggman, you mentioned that my "rarely used" criteria was pretty subjective. That's a good call, so just edited / removed that. – Erik Ostermueller Jun 18 '16 at 21:36 • @FryAmTheEggman, the "many ties" concern could also looked at from a different perspective -- that Performance Golf will provide a very useful "catalog" of answers. This "catalog" concept got 18 upvotes here. – Erik Ostermueller Jun 18 '16 at 21:43 • The catalogue concept is a failed experiment, and your mention of it is one of the reason why. "It's a catalogue question" should not be used to justify why a question should be closed even though it's off-topic and wouldn't have an effective scoring mechanism even if it were on-topic. – Peter Taylor Jun 19 '16 at 13:31 # Make a Fork Bomb code-golf under construction, please constructively (no pun intended) criticize Create a program which forks itself at twice and exits, or forks itself once and idles. Whether it continues forever or exits is your choice. Forks can be OS forks or simply a command to relaunch the program. ## Rules • No spoon bombs allowed, please. • Don't make any assumptions about the location of the program. # Bash, 10 chars ./$0|./\$0&


Acts as a standard punching bag for other solutions.

# Microsoft Windows Batch file, 5 chars

 %0|%0


Anybody who beats this one gets a million internet points. (and maybe a bounty)

• I assume that the downvote is because someone considers that this violates our policy on malicious code. I think it's borderline, but if it's on the right side of the border then the question has other issues. 1. Why fork itself at least twice? Surely forking once is enough for a fork bomb? 2. Define "OS forks" in a way which doesn't rely on the OS being POSIX. Or, better, remove that requirement: it seems to me to limit the languages permitted more than necessary for no benefit. 3. What's a spoon bomb? Google is not being helpful. – Peter Taylor Jul 14 '16 at 13:49
• @PeterTaylor 1. the chat said it was fine 2. If you only fork once and exit, you have a constant amount of processes 3. Good idea. Any tips for windows forks? 4. it's a joke – noɥʇʎԀʎzɐɹƆ Jul 14 '16 at 16:38
• I'm downvoting because I think it's close enough to malicious. A fork bomb can hang a computer. – mbomb007 Jul 22 '16 at 19:27

# Stump The Golfing Languages

This is the seed of an idea. I'm unclear on the details that might make it work.

I want people to submit answers in the form of a program in a "normal" language (defined how?), such that reproducing its functionality in a golfing language isn't much smaller. That is, I want to find the algorithms that Jelly and Pyth and Matl and such are not optimized for.

I would appreciate suggestions on how to make this work. Maybe cops and robbers? Maybe each entry just contains two programs, and comments are given to help golf the smaller one?

• The only language that could possibly win is mathematica – Destructible Lemon Aug 23 '16 at 1:52
• – Dennis Aug 23 '16 at 1:53
• It's very easy to come up with boring examples e.g. print this exact trace, reproduce the output of this random number generator, etc. I don't see any way to get interesting answers. – feersum Aug 23 '16 at 6:31
• @feersum I'd probably disqualify errors and crashes and stacktrace outputs and such, and maybe all built-in non-trivial algorithms. Thanks for pointing those out. – Sparr Aug 24 '16 at 7:26
• @DestructibleWatermelon you don't have to beat the golfing language to win. The winning entry will probably still have a shorter Jelly solution than Python (or whatever). – Sparr Aug 24 '16 at 7:27
• I don't know of any golfing languages where creating a simple webserver is possible. All this would be is finding a task that isn't normally required for when doing code-golf – Blue Aug 24 '16 at 14:16
• I'm thinking of restricting it to algorithms and output, not stuff like network and file access. – Sparr Aug 24 '16 at 22:11

# Draw "Stack Exchange"

Stack Exchange has many site (159) and It has a logotype too. Anyway, In this challenge you'll need to draw Stack Exchange in the most shortest way.

This is a code-golf. challenge.

## Rules

1. Have fun!
2. You've to draw Stack Exchange, you can't use Paint or something like that, you can't use libraries.
• Challenges that start with "Most creative" are almost certainly guaranteed to not generate creative answers (or any answers for that matter) – Fatalize Sep 8 '16 at 13:47
• @Fatalize I changed the challenge. – Rizze Sep 8 '16 at 13:54
• Now there is basically no interesting solution possible to the challenge, because there is no patterns in Stack Exchange. So all shortest solutions will to print that string directly or a compressed version of it. – Fatalize Sep 8 '16 at 13:58

# Open the browser, polyglot edition. polyglotcode-challenge

Your job is to open a browser window of the default browser to https://codegolf.stackexchange.com in as many languages as possible.

Your code must open the browser itself, and cannot rely on an open one.

## Rules

• Versions of the same language are considered a single language
• Define "default browser" in the context of non-Windows OSes. – Peter Taylor Sep 25 '16 at 21:47
• @PeterTaylor Whatever browser the open command works with. There was a previous version of this challenge, it worked then. – noɥʇʎԀʎzɐɹƆ Sep 25 '16 at 22:24

Inspired by the paper calculator episode of Numberphile.

Your challenge in this puzzle is to take in two two-bit (0-3) numbers and output the sum of the two numbers... using ordinary household objects.

Some possibilities of how this can be done:
Dominoes
Paper
Marbles
music box (+ some helpers..)

## Input:

input must always be involving two sets of two-bit integers, which can be represented by anything you like, so long as the cardinality of the representations is the same.

## Output:

The output should be a single 3-bit integer which represents the addition of the two inputs.

## Rules:

• your device cannot have the capability to connect to the internet in any way (sorry, this also disqualifies carrier pigeons). Your device must also not be able to perform this function alone (eg a calculator).
• It must be somewhat original. put your own twist on it!
• Pictures are required for each entry to show how it works. videos would be better, but aren't required!
• The sole function of your machine does not have to be adding, it can do other things as well. This means that older projects that may serve a slightly different function are welcome, so long as they meet the rules stated above.
• Your device can be as simple or as complex as you like, so long as it doesn't get to a point where it's completely esoteric.

## Judging:

You will be judged based on ease of use, ease of understanding, as well as originality! This means that entries should be easily explained, used, and be unique in some way.

This is a , so the most upvotes wins! good luck!

• In my opinion, this is not a programming challenge. Once we start leaving the realm of a computer-based programming paradigm, a challenge becomes more difficult to test, replicate, and verify. Plus, something done with Dominoes, for example, may not "run" to completion 100% of the time, and in my opinion that makes it non-deterministic. – mbomb007 Sep 26 '16 at 18:43
• Related meta: meta.codegolf.stackexchange.com/a/10151/34718. TLDR, if you want to program with dominoes, find or create a domino simulator where programs can be scored in bytes. Instead of marbles, use Marbelous. – mbomb007 Sep 26 '16 at 18:52
• @mbomb007 what about papers, and counting dogs? This isn't a code golf, it's a popularity contest – user56309 Sep 26 '16 at 19:20
• Popcons still require the use of programming languages. meta.codegolf.stackexchange.com/q/2028/34718. See both linked meta questions. What you are trying to do is off-topic for this site. – mbomb007 Sep 26 '16 at 19:42
• @mbomb007 I'm not sure you linked the correct thing. I have found no reference of popularity contests in your recent link.. – user56309 Sep 26 '16 at 19:44
• Rules and meta consensus apply to all challenges, not just code-golf. – mbomb007 Sep 26 '16 at 20:21
• Popcons should be held to a higher standard than other questions, not a lower one as your comments imply. – Peter Taylor Sep 27 '16 at 7:33

## 99 selttob fo reeb no eht llaw popularity-conteststring

I teb ev'uoy lla draeh tuoba eht doog 'lo 99 selttob fo reeb no eht llaw. Llew ti os sneppah taht I emoc morf na evitanretla esrevinu - eht esrevinu erehw ew etirw gnihtyreve ni esrever! Ew peek eht snoitisop fo lanigiro hguoht. Siht osla snaem reporp noitazilatipac fo tsrif (ekil rettel ni siht txet). Ruoy egnellahc si ot etirw a margorp taht stuptuo eht lausu 99 selttob fo reeb no eht llaw, tub ni esrever (ni ruo egaugnal uoy dluow llac ti 99 bottles of beer on the wall). Siht si a ytiralupop tsetnoc, os teg evitaerc dna yrt ot sserpmi eht dworc. Doog kcul!

I bet you've all heard about the good ol' 99 bottles of beer on the wall. Well it so happens that I come from an alternative universe - the universe where we write everything in reverse! We keep the positions of original though. This also means proper capitalization of first letter(like in this text). Your challenge is to write a program that outputs the usual 99 bottles of beer on the wall, but in reverse (in our language you would call it 99 selttob fo reeb no eht llaw). This is a popularity contest, so get creative and try to impress the crowd. Good luck!

Elpmas fo derised tuptuo:

Sample of desired output:

99 selttob fo reeb no eht llaw, 99 selttob fo reeb. Ekat eno nwod dna ssap ti dnuora, 89 selttob fo reeb no eht llaw.

89 selttob fo reeb no eht llaw, 89 selttob fo reeb. Ekat eno nwod dna ssap ti dnuora, 79 selttob fo reeb no eht llaw.

...

1 elttob fo reeb no eht llaw, 1 elttob fo reeb. Ekat eno nwod dna ssap ti dnuora, on erom selttob fo reeb no eht llaw.

On erom selttob fo reeb no eht llaw, on erom selttob fo reeb. Og ot eht erots dna yub emos erom, 99 selttob fo reeb no eht llaw.

• There's no need for the reversed text in the description - it distracts the viewer from the challenge at hand. – clismique Oct 21 '16 at 12:06
• @Qwerp-Derp I wanted to make this a bit more "unique" and "immersing", so I thought about giving the reversed description(I like it). I also included original text(although in spoilers), but I was also wondering about distracting readers. Do you have some other idea on how to keep both versions without making it look obscure? – MatthewRock Oct 21 '16 at 12:10
• 1. This should not be a popularity-contest. 2. It's fundamentally a duplicate of codegolf.stackexchange.com/q/64198/194 . 3. If you're going to muck around with the question text, write a program that mucks it around correctly. "elpmaS" doesn't follow the specified transformation rule. – Peter Taylor Oct 21 '16 at 12:34
• @PeterTaylor 1. why not? 2. It's not. You can't simply reverse, and counting is a bit different. – MatthewRock Oct 21 '16 at 13:24
• Do X creatively popularity contests have fallen out of scope. This will get closed if posted on main. – Dennis Oct 21 '16 at 13:46
• @Dennis Damn, too bad. I guess I won't be posting it then, it's boring "shortest code". – MatthewRock Oct 21 '16 at 14:16
• What does this add to the original '99 bottles of beer on the wall'? – 0WJYxW9FMN Oct 21 '16 at 20:54
• This sandbox post has had little activity in a while and little positive reception from the community. Please improve / edit it or delete it to help us clean up the sandbox. – user58826 Jun 9 '17 at 14:08

# Best n out of 2n - 1

### Challenge:

This one should be relatively simple. Output this exact text:

Best [n] out of [2n - 1].


given n as an input.

### Input:

Just the integer n, can be from stdin or as an argument. n will always be greater than 0.

### Output:

The exact text above. Trailing spaces/newlines are allowed.

### Rules:

This is , so shortest code in bytes wins. Standard loopholes are forbidden.

### Meta:

Is this too simple? What other tags should be included, ?

• Seems like a dupe of 2spooky4me, just with a different operator. – Geobits Nov 1 '16 at 17:52
• Your wording specifies "this exact text" while I think your intent is "Best 5 out of 9." or the like. – AdmBorkBork Nov 1 '16 at 17:53
• @Geobits Aha, I knew I remembered a similar challenge. Just forgot the exact name, so I thought maybe I was just imagining things after I tried to find it. My bad. – Yodle Nov 1 '16 at 17:55

# Google Home / Amazon Echo - Turing complete?

Your challenge is to try to make a turing machine based on Google Home and Amazon Echo, see this video.

You must describe how to set up the machine, and how to give it input.

You must also describe a program for integer addition. It should compute 1+1 to be 2, 200+55 = 255, 200+56 = 0, and so on for all other combinations of 2 8-bit integers.

• It's basically not possible... – TuxCrafting Dec 2 '16 at 19:52
• VTC as unclear and too broad. What are you even expecting as an answer? – Rɪᴋᴇʀ Dec 2 '16 at 19:52
• @EasterlyIrk A set of commands that send the 2 computers into infinite loop, reading commands endlessly from a list of commands for the other to run, eventually processing a computer program and finally calculating the answer to the universe. – SoniEx2 Dec 2 '16 at 20:14
• @TùxCräftîñg Why not? I mean other than that we have yet to prove their turing-completeness. – SoniEx2 Dec 2 '16 at 20:14
• @SoniEx2 so only 1 of each computer? And what defines a command? – Rɪᴋᴇʀ Dec 2 '16 at 20:16
• @EasterlyIrk A command is anything that starts with "Hey google" or "Alexa" and triggers a successful response on either of the computers. – SoniEx2 Dec 2 '16 at 20:19
• Are we allowed to program the Echo and Google device? If so this is trivial. If we're supposed to construct a sentence that winds up having the devices compute using existing services like the calendar in the video, there are plenty of web sites that can process a variety of languages and read back the solution. Echo has basic math built in. – wyldstallyns Dec 2 '16 at 21:09
• I really hope this can be tweaked into a challenge because the youtubes would be awesome. – wyldstallyns Dec 2 '16 at 21:12
• @wyldstallyns tbh I have no idea what I'm doing... But yes, you're allowed to program both of them. – SoniEx2 Dec 2 '16 at 22:51
• A question should ideally be self-contained. In this case the APIs for Google Home (whatever that is) and Amazon Echo (whatever that is) probably won't fit in the question, but an overview and links to the APIs would. – Peter Taylor Dec 2 '16 at 23:03
• @PeterTaylor This isn't a matter of APIs. This is a matter of voice commands. – SoniEx2 Dec 3 '16 at 0:19