# What is the Sandbox?

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

See the Sandbox FAQ for more information on how to use the Sandbox.

## Get the Sandbox Viewer to view the sandbox more easily

To add an inline tag to a proposal use shortcut link syntax with a prefix: [tag:king-of-the-hill]

So christmas is comming and carols are on the radio all day. Jose Feliciano's Feliz Navidad song is a good example of this. Your task is to print the entire (and repetitive) song.

Feliz navidad

I want to wish you a merry Christmas
I want to wish you a merry Christmas
I want to wish you a merry Christmas from the bottom of my heart

I want to wish you a merry Christmas
I want to wish you a merry Christmas
I want to wish you a merry Christmas from the bottom of my heart

A-ha!

I want to wish you a merry Christmas
I want to wish you a merry Christmas
I want to wish you a merry Christmas from the bottom of my heart

I want to wish you a merry Christmas
I want to wish you a merry Christmas
I want to wish you a merry Christmas from the bottom of my heart

I want to wish you a merry Christmas
I want to wish you a merry Christmas
I want to wish you a merry Christmas from the bottom of my heart

I want to wish you a merry Christmas
I want to wish you a merry Christmas
I want to wish you a merry Christmas from the bottom of my heart



RULES:

• Default loopholes are forbidden.
• Default I/O.
• Programs or functions are acceptable.
• You MUST include the ñ character in the año word.
• You can print it in lowercase, uppercase or sentence case.
• Shortest code in bytes wins!
• Hi there! I'm the downvoter. I'm not sure this adds much to the site beyond other recent KC challenges, and it is very likely to be closed as a dupe of either "RickRoll" or "Writing Lines in Detention" as it's currently written. What can you describe about this challenge that adds to the site? – AdmBorkBork Dec 19 '17 at 22:09
• For reference -- RickRoll challenge -- Write lines in detention – AdmBorkBork Dec 19 '17 at 22:10
• Well, it may be a mix of those two challenges but what I found mainly interesting to see is how the users manage to put the ñ character and the "A-ha!" line that is the unique part of the song. – WORNG ALL Dec 19 '17 at 22:14
• That ñ is just one byte in Win1252, which most answers will probably output in. I don't think this adds anything, personally, and cannot recommend posting it. – ATaco Dec 19 '17 at 22:16

# Golf an interpreter

The challenge is to find a path from A to B, but you must also provide an interpreter for your program. The shortest interpreter wins.

Input to path finder:

A list of edges in a graph e.g.

AC
CD
DB


Output from path finder:

A list of vertices e.g. A C D B

Feel free to somewhat adjust the input/output format.

Scoring:

Your score is the number of bytes of your interpreter/compiler. The lowest score wins.

Note:

It's possible to work around the question and interpret a language that is too similar to an existing one by doing something like:

eval(input_file.replace("this never happens", ""))


I don't have a good rule to prevent this other than to ask that you don't.

• Not interesting, so downvote. Yes, you can't restrict that. – user202729 Jan 7 '18 at 4:25

## Ultimate crackpot

In minimum number of ASCII bytes, write a plain text "physics research article" in English that scores each item in The Crackpot Index at least once.

I'm not sure if such thing is on-topic here or on the Puzzling.

• I don't think this is on topic on either of those sites. I'm not sure there is a StackExchange site that this would be on-topic. it would have to be some sort of parody writing site similar in style to uncyclopedia or something – Destructible Lemon Feb 13 '18 at 22:19
• I think it's a funny idea to achieve as many of these as possible but it's not really on topic here and it would not be possible in plain text to, for example, mail the paper to someone (#12) – dylnan Feb 14 '18 at 5:01
• A lot of these aren’t very objective either. – Jo King Feb 14 '18 at 6:46

# Same code, different work

Write a code in a language that do these few things:

1. Input a positive integer n, check whether it's a prime. (2 -> true, 5 -> true, 8 -> false)
2. Input an integer n>1, output an array with fewest positive prime as element, where the sum of the array is n. (2 -> [2], 5 -> [5], 6 -> [3, 3], 8 -> [3, 5] or [5, 3])
3. Input an integer n, output sum(n mod i, for i=1 to n). (2 -> 0, 5 -> 4, 8 -> 8)

Your code should theoretically solve all legal n, but in practive up to 1000 is enough

Shortest code in bytes win.

• The third task: shouldn't it be 2 -> 0 (2 % 1 = 0; 2 % 2 = 0). And you should probably decompress the specs a bit. And isn't there a polyglot tag? – wastl Mar 16 '18 at 23:11
• There IS a polyglot tag. Although same languages are OK, that can probably only work with different versions (e.g. Python 2 vs Python 3), which seems to be considered a polyglot too. – wastl Mar 17 '18 at 10:18

Write a program who return the current month.

## The Rules

• The result needs to be correct even if the program is run in the future.
• It's so the shortest code wins!

## Optional

Add an interpreter so the submission can be tested. It is allowed to write this interpreter yourself for a previously unimplemented language.

It's my first code-golf idea I'm fully open to improving it with more experienced users.

• That's usually a problem with trivial challenges. If this isn't a duplicate of an existing challenge, I predict it will get a lot of answers very quickly, many of which will be very short golfing language solutions. – Adám Apr 11 '18 at 14:54
• Possible duplicate? codegolf.stackexchange.com/questions/114787/… – DIDIx13 Apr 11 '18 at 14:54
• Nope, still not all that good. – Nissa Apr 13 '18 at 12:41
• @StephenLeppik Hm, what can I improve so? – DIDIx13 Apr 13 '18 at 12:42
• IMO you're wasting your time trying to improve this. Delete it and try to come up with something which is inherently interesting. – Peter Taylor Apr 13 '18 at 12:50
• Write a program who return the current month should probably change that to Write a program which return the current month. what do you think. Also JSYK : This is a one line task for languages like JS and Ruby. So you should probably ban those – Muhammad Salman Apr 13 '18 at 12:51
• good point. I guess leave it as is. – Muhammad Salman Apr 13 '18 at 13:06
• @MuhammadSalman Easier challenges get shorter solutions. If you don't want to see short solutions (no idea why), write hard challenges. – user202729 Apr 13 '18 at 13:12
• @user202729 : I never said I don't want short solutions. But these aren't much of a challenge. For example even a ten year old kid would be able to solve this in JavaScript using built in's. in all a total of 10 chars spent and 2 seconds. Not fun. Challenges that make you stop and think and actually work for them are best. Of course feel free to disagree. – Muhammad Salman Apr 13 '18 at 13:16

# Output Infinity (updated v2)

## Challenge

Output the following infinity symbol:

         ∞∞infinity                         ∞infinity
infinity∞∞infinity                 infinity∞∞infinity
infinity∞∞∞∞∞∞∞infinity           infinity∞∞∞∞∞∞∞infinity
infinity        ∞∞infinity      ∞∞∞∞∞infinity        ∞∞∞∞∞∞∞
∞∞∞∞∞                 ∞∞∞∞∞∞∞  ∞∞∞infinity               ∞∞∞∞∞
∞∞∞                      ∞∞∞∞∞∞∞infinity                   ∞∞∞
∞∞∞                         ∞∞infinity                       ∞∞∞
∞∞∞                       ∞∞infinity                         ∞∞∞
∞∞∞                    ∞∞∞∞∞∞infinity                      ∞∞∞
∞∞∞∞∞               ∞∞∞infinity  ∞∞∞∞∞∞∞                 ∞∞∞∞∞
infinity       ∞∞∞∞∞infinity     ∞∞∞infinity        infinity
infinity∞∞∞∞∞∞∞infinity           infinity∞∞∞∞∞∞∞infinity
infinity∞∞infinity                infinity∞∞∞infinity
∞infinity                        ∞∞∞infinity


## Rules

• No input.
• Output can be given in any convenient format.
• Any number of trailing spaces at the end of each line is allowed.
• Any number of trailing new lines at the end of the shape is permitted.
• Either a full program or a function are acceptable. If a function, you can return the output rather than printing it.
• If possible, please include a link to an on-line testing environment so other people can try out your code!
• Standard loopholes are forbidden.
• This is so all usual golfing rules apply, and the shortest code (in bytes) wins.
• need some comments for down-vote... – mdahmoune Apr 20 '18 at 19:01
• If the challenge's goal is -- as I understand it -- to output one of the five objects, in most languages that would result in an optimal submission of something along the lines of print("∞"). A rather boring but valid submission to a challenge that effectively asks to print a single unicode character. – Jonathan Frech Apr 20 '18 at 19:34
• The downvotes are probably because you're allowing multiple outputs, some of which are interesting (4-5), some of which are trivial (1-3). As @JonathanFrech suggests, for a code-golf challenge, everyone is going to chose a trivial output for shortness. Alternate ideas: Input an integer 1-5, output the corresponding form of infinity. Or perhaps narrow to just output option #4 (or an even larger, fancier ASCII infinity), and make it a kolmogorov-complexity question. – BradC Apr 20 '18 at 20:59
• I would even say that this challenge in its current form should be tagged kolmogorov-complexity. If you decide to go in the direction @BradC suggested, you could maybe also consider to incorporate the challenge's theme into your challenge rather than posting yet another Kolmogorov complexity challenge. Something along the lines of infinitely outputting the ASCII art or taking two numbers as input, dividing them and producing the infinity symbol when the second one is zero. – Jonathan Frech Apr 20 '18 at 22:01
• I don't think this is anyhow related to math. Only "inspired by math", maybe. – user202729 Apr 21 '18 at 10:54
• Now -- is there any exploitable pattern in the output such that it should not be closed as a dupe of "We're no stranger to code golf, you know the rules, and so do I"? – user202729 Apr 21 '18 at 10:55
• @user202729 No, there is no predefined specific pattern, I prepared this MANUALLY. How could I specify that in the challenge? – mdahmoune Apr 21 '18 at 11:00
• I believe it's customary to specify if trailing spaces / new lines are permitted and if so, how many – Asone Tuhid Apr 21 '18 at 19:30
• @AsoneTuhid for spaces I think it is ok because it does not deform the shape, but I do not think so for new lines, what do you think? – mdahmoune Apr 21 '18 at 19:54
• Not between the lines, of course. I mean new lines after the whole drawing. Some people put restrictions (none, one, whatever). Nice art btw – Asone Tuhid Apr 21 '18 at 19:57
• @AsoneTuhid yes of-course, thanks a lot for this remarks. – mdahmoune Apr 21 '18 at 20:06
• Can you write a reference implementation which beats bzip2 and gzip, preferably by a few percent? – Peter Taylor Apr 25 '18 at 12:05

# Not today

### The challenge

Given a timestamp (date and time) output another timestamp that differs from the input at all positions, i.e. has different value for year, month, day, hour and minute.

### Input and output

A timestamp in any reasonable format including, but not limited to:

• timestamp type, if your language supports it,
• string,
• number (eg. number of seconds from specific fixed date),
• array of numbers or strings.

You may assume valid date (AD) and time as input and must have valid date (AD) and time as output. You can follow simplified date regulations for the whole time since year 1 AD:

• respective month lengths: 31, 28/29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31;
• leap years are needed to be taken into account;
• a day has 24 hours and an hour has 60 minutes - no need to account for leap seconds and other anomalies;
• you can handle midnight any way you prefer (as 00:00 or 24:00).

If you choose, you can support seconds and milliseconds, but the difference condition doesn't apply.

### Examples

2018-05-01 17:28 --> 2000-01-02 12:11
0001-01-01 00:01 --> 3000-12-31 23:59
3000-12-31 23:59 --> 0101-01-01 01:01

• I'm afraid that this is too trivial. Just add 1 year, 32 days, 1 hour and 1 minute. (about 34390860 seconds) There may be better constants, but once a good constants had been figured out, people would just port that to other languages. Boring. – user202729 May 2 '18 at 8:59
• @user202729 do you think removing the input/output as number will make it less trivial (without making it a chameleon challenge)? Also, maybe making an upper and lower limit for the date would add some difficulty? – pajonk May 2 '18 at 19:29
• Javascript String->string s=>1+s – l4m2 May 3 '18 at 10:58

# Reverse Code Golf- Print out two by using variables a and b that both equal one and adding them without any extraneous lines.

Your task is very simple, display that 1+1=2, except you need as many commands and non extraneous lines as possible.

What counts as non-extraneous? If one cannot remove any kind of sequence or segment of commands, then the program is counted as non-extraneous. The variable names need to be only one byte each, without any kind of trailing zeroes or insignificant digits.

Input: nothing

Output: "2" or 2 or whatever, as long as the program runs 1+1.

Sample: Java- System.out.println( Integer.parseInt( "1" ) + Integer.parseInt( "1"));

• xkcd.com/1960 obviously inspired by this – bleh May 9 '18 at 3:48
• – Peter Taylor May 9 '18 at 8:13
• What is a "sequence"? What is a "segment"? – user202729 May 9 '18 at 11:33
• The only way we've found to express your "non-extraneous" criteria is pristine-programming, which is very strict but much less ambiguous. – Kamil Drakari May 9 '18 at 15:51

# Send the pairs

Write two program A and B. A takes 1024 pairs of integers (a,b), where 0≤a<232, 0≤b<1024, and all as are different. Output a positive integer. B take the output of A and one a from the input pairs of A, and output its b.

Smallest output of A under a same random test data win.

• To be a truly objective challenge, the test data should be included in the question; but then B could hard-code it and A could output 1 as a flag to invoke the hard-coded data. – Peter Taylor Jul 24 '18 at 20:03
• @PeterTaylor I don't think hiding the test case make the challenge less objective. – user202729 Jul 25 '18 at 7:45
• @user202729, codegolf.meta.stackexchange.com/a/1369/194 . If I can't tell whether a change to my answer makes it better or worse, it's not an objective challenge. If the only person who can tell is the OP, then the judging is a black box which from the outside is indistinguishable from a purely subjective judgement. – Peter Taylor Jul 25 '18 at 7:50
• @PeterTaylor codegolf.meta.stackexchange.com/a/308 (+15 vote) – l4m2 Jul 25 '18 at 10:44
• @l4m2, that agrees perfectly with the last sentence of my previous comment. – Peter Taylor Jul 25 '18 at 11:18
• @PeterTaylor No if the test is public some days after – l4m2 Jul 25 '18 at 11:33
• @l4m2, then you would lack a winning criterion until you post those tests publicly. – JungHwan Min Jul 29 '18 at 14:41
• @JungHwanMin A recent meta post explicitly allowed that. – user202729 Aug 1 '18 at 2:52

Write a program that takes a list of strings as input and creates trees of prefixes as such:

Hi_there_how_are_you?
Hi_there_would_you_mind?
Hi_the_weather_is_nice
Hills_are_green
Many_of_us
May_has_11_days
May_has_11_days_left
IWillLearnTheTrombone
IWillLearnTheSaxophone
IWillLearnThePiano


Which would output:

Hi Hi_there Hi_there_how_are_you?
Hi_there_would_you_mind?
Hi_the_weather_is_nice
Hills_are_green
Ma Many_of_us
May_has_11_days May_has_11_days
May_has_11_days_left
IWillLearnThe IWillLearnTheTrombone
IWillLearnTheSaxophone
IWillLearnThePiano


The input strings shall contain no spaces and the output shall be separated by at least one space, any number of extra line breaks or spaces are allowed. The output above is formatted to explain the challenge, the following formatting is also valid:

Hi Hi_there Hi_there_how_are_you? Hi_there_would_you_mind? Hi_the_weather_is_nice Hills_are_green Ma Many_of_us May_has_11_days May_has_11_days May_has_11_days_left IWillLearnThe IWillLearnTheTrombone IWillLearnTheSaxophone IWillLearnThePiano


This question is a kind of reverse of this Prefix Tree Traversal. This is code golf, shortest code in bytes win.

Note: I'm struggling with the output? What would be the most 'fun'/ have high potential for cleverness? The one I have now just looks like a mess. Can i have output as a list of lists(of lists)? Or do that hinder people?

• Related (make an alphabeTrie). Very close, though I think it might depend on your output format on whether it is a dupe – Jo King Sep 23 '18 at 8:48
• I would mark it as a duplicate to the one that Jo King linked. – AdmBorkBork Sep 27 '18 at 19:54

I'm glad the sandbox exists because I have a few issues coming up with the right wording for this.

Background

Theoretically, any numeric pattern should exist somewhere in the decimal places of pi.

Challenge

Given any numeric input, find the index (location?) of the first occurrence of that input in the decimal place of pi

Example cases:

• 1 = 1
• 14 = 1
• 41 = 2
• 897 = 11

Rules:

any numeric input, can't see why it should be limited by any number of characters. I am not sure about limitations, but this could get computationally intense if it's a large sequence of numbers that occur very deep into pi. Do I need to add any restrictions to cater for computational complexity?

• We'be had this challenge before. That one only requires the first few digits, but I think we've had enough challenges about pi that this won't add anything – H.PWiz Sep 25 '18 at 7:36
• "Theoretically, any numeric pattern should exist somewhere in the decimal places of pi." - how do you know that? – ngn Sep 25 '18 at 10:00

Code-Bowling

# Name: Two is an error, One runs fine!

The challenge is simple.

When one character is removed from the given program, it should not error, but when two are removed, it should error.

PENALTIES:

If you repeat one Unicode character in the program, then your score will be the number of bytes subtracted by the Unicode value of the character (0 for NUL, 10 for newline, 64 for A, etcetera).

Else, your score is the number of bytes.

As always, since this is code bowling, most bytes win!

• What if I repeat two characters in the program? – user202729 Dec 1 '18 at 3:29
• What if I just have a really large amount of NUL bytes? – Jo King Dec 1 '18 at 3:33
• Is it ok if the program itself error/not error? – user202729 Dec 1 '18 at 3:35
• What about infinite loop? – user202729 Dec 1 '18 at 3:35
• This question needs major work: in its current state I would definitely vote to close it, and the only question would be whether to close as Too Broad or to close as Unclear. It's too broad because there's no specification for what the program must do. It's unclear because it's not specific enough on the quantifiers around the character removal: if it should be robust against the removal of any character, be explicit. See radiation-hardening for existing questions in this area, both for examples of how to word them and to ensure that it's different enough to be new and interesting. – Peter Taylor Dec 1 '18 at 10:42
• @PeterTaylor Although the program can do anything, it should not be too broad if the challenge is sufficiently hard. – user202729 Dec 4 '18 at 10:30
• About the removal of any character: I guess that the score is $len-\sum_{c}{c\times \max(0,n(c)-1)}$ for $len$ = program length in bytes and $n(c)$ = number of occurences of character c in program, but I'm not sure. – user202729 Dec 4 '18 at 10:32
• LENGUAGE win!!! – l4m2 Dec 4 '18 at 11:32

Output a number $$\n\$$ such that:

1. $$\n\text{mod}10=5\$$
2. $$\n^2\text{mod}10^{10000}=n\$$

Shortest code win. You should be able to try it rather than purely know it work.

Sandbox mainly to check duplication

• Wouldn't this be easy to just hardcode the number? – Jo King Dec 13 '18 at 13:22
• @JoKing We must have $n^2\ge 10^{10000}$, so $n\ge 10^{5000}$ which if naively hardcoded takes $5000 \log_2{10}$ bits. – user202729 Dec 13 '18 at 14:24
• However, we already have modular multiplicative inverse challenge, I expect most answers to be very similar. – user202729 Dec 13 '18 at 14:42
• @user202729 It's likely that you'll get 1 in that way or be too slow so I need time requirement – l4m2 Dec 13 '18 at 15:00
• @l4m2 Most solutions there use extended Euclid algorithm so they will not be too slow... – user202729 Dec 13 '18 at 15:06
• @user202729 So they'll get 1 – l4m2 Dec 13 '18 at 15:22
• Get 1 what? The correct answer is 810...90625. – user202729 Dec 13 '18 at 15:31
• Will how many languages use this? – l4m2 Dec 13 '18 at 15:57

# Integer or decimal to array and array to decimal or integer

Write two functions

1) Convert an integer or decimal to array of integers that potentially includes a single decimal

2) Convert array including integers and potentially a single decimal to integer or decimal

## Input

Integer or decimal to array

• An integer or decimal

Array to integer or decimal

• An array

## Output

Integer or decimal to array

• An array containing each digit of the input at an individual index with the first decimal portion of input containing the decimal character.

Array to integer or decimal

• An integer or decimal equal to input

# Specification

When the first digit of a decimal is a 0 , and a digit follows, that value includes all 0's up to and including the last digit of that decimal, else the decimal portion is spread or expanded to the remainder of the decimal portion for the remainder of indexes of the array, that is: -0.01 <-> [-0.01], 100.01 <-> [1,0,0,0.01], 100.0001 <-> [1,0,0,0.0001]

# Test cases

Input <----------> Output

-123               [-1,-2,-3]
4.4                [4,0.4]
44.44              [4,4,0.4,4]
-0.01              [-0.01]
123                [1,2,3]
200                [2,0,0]
2.718281828459     [2,0.7,1,8,2,8,1,8,2,8,4,5,8,9]
321.7000000001     [3,2,1,0.7,0,0,0,0,0,0,0,0,1]
809.56             [8,0,9,0.5,6]
1.61803398874989   [1,0.6,1,8,0,3,3,9,8,8,7,4,9,8,9]
1.999              [1,0.9,9,9]
100.01             [1,0,0,0.01]
545454.45          [5,4,5,4,5,4,0.4,5]
-7                 [-7]
-83.782            [-8,-3,-0.7,-8,-2]
1.5                [1,0.5]
100.0001           [1,0,0,0.0001]


# Winning criteria

Least amount of total (each of function or programs 1 and 2) bytes used.

code-golf

• 1) What should output be for test cases 0, 200, and 1.0015? 2) I would suggest a more descriptive title. 3) Bonuses are generally discouraged in code golf, so make sure they add something to this challenge. – lirtosiast Dec 18 '18 at 23:43
• The string method thing is very iffy. Won't a print function in any language be converting a number/list of numbers to a string? – Jo King Dec 19 '18 at 0:16
• @lirtosiast [0], [200], [1,0.001,5]. What title do you suggest? Not using string methods does add something to the challenge. – guest271314 Dec 19 '18 at 0:47
• @JoKing Not sure what you mean by a print function converting a number or list to a string? If JavaScript is used it means not using , '', String, template literal, RegExp.prototype.match(), etc. to create or convert the input to output or add, subtract, divide, multiply, manipulate arrays are what is meant, not print(output) or console.log(output). A user is not obligated to try for the bonus in their answer. – guest271314 Dec 19 '18 at 0:49
• @guest271314 The challenge is not clear to me: why is 200 [200] but 100.01 [1,0,0,.01]? Maybe a worked-through example in the question as well as a reference implementation would help. For a title "Modified decimal expansion of a number" is a start. – lirtosiast Dec 19 '18 at 0:57
• @guest271314 Some languages have builtins for the digits of an integer or float e.g. Mathematica RealDigits[3.14159] = [{3,1,4,1,5,9},1] . Do those count as string methods? – lirtosiast Dec 19 '18 at 0:59
• @lirtosiast 200 does not contain a decimal, 100.01 contains a decimal. The reference implementation is at the question. Created the requirement from scratch while attempting to solve another inquiry. Does Mathematica have a method to check if a value is a string, integer or decimal? – guest271314 Dec 19 '18 at 1:03
• I don't see any reference implementation. It might be better if you explicitly listed the rules behind the transformation – Jo King Dec 19 '18 at 1:05
• @JoKing See "Test cases". That goes back to whether to post the question here or at Software Engineering. The question does not ask users to write an entire specification (frequently edited; maintained; an entire process in and of itself). Observing the test cases: when the first digit of a decimal is a 0 , and a digit follows, that value includes all 0's up to and including the last digit of that decimal, else the decimal portion is spread or expanded to the remainder of the decimal portion for the remainder of indexes of the array, that is: [-0.01], [1,0,0,0.01], [1,0,0,0.0001]. – guest271314 Dec 19 '18 at 1:09
• Right, you should include those rules in the question, along with what happens when the input is an integer and/or ends in zero. I'm not sure what you'd achieve by posting on Software Engineering because I doubt any form of this question would be on-topic. – Jo King Dec 19 '18 at 1:22
• Also, the specification should be given as a specification, not as a set of test cases to reverse-engineer. – Peter Taylor Dec 19 '18 at 9:42
• "The specification ... is WIP." That's fine: that's what the sandbox is for. I'm trying to identify things which need addressing before the question leaves the sandbox. "A users' answer could redefine the specification, in a good way" This is completely against the ethos of this site. All users should implement the same specification, because otherwise it's not a fair contest. – Peter Taylor Dec 19 '18 at 14:56
• I'm guessing he means move the specification from below the test cases to the task section and remove the Observing the test cases part. And perhaps make it a bit clearer, for example giving us the inputs that led to [-0.01], [1,0,0,0.01], [1,0,0,0.0001] rather than having them in isolation. – Jo King Dec 20 '18 at 5:36
• Specifically? Nothing is clear to me. Try reading through the spec yourself without the test cases and forgetting that you already know in your head how everything should work - is it clear to you? As for a solution to making it clearer: start by having a look through the specs of recent, well-received challenges and note the detail they go into about what is expected of solutions and what is & isn't allowed. Then rewrite your own spec in a similar manner so there's no (or very little) room for doubt or confusion. (1/2) – Shaggy Dec 20 '18 at 19:11
• Ah, I didn't realise you'd deleted the bounty post. I think you misunderstood what I meant when I commented. I was just clarifying that if an answer were to be posted, the 500 rep would come from me, though you could add some rep if you wanted. There was no censorship of your post and I'm not sure why you deleted it. Typically on PPCG, we post the bounties after a valid answer has been posted, in order to make sure the rep doesn't go to waste, especially if the task is very hard or possibly impossible – Jo King Feb 19 '19 at 10:37

# Introduction

The original creator of this meme has gone blind, lost his internet and accidentally deleted all his memes. Except this one. He has this one last meme on his desktop, and since he can't see, he wants to know what this meme is.

By hearing it.

# Challenge

Your challenge is to write the shortest program that will produce a playable audio file that the meme creator will play to hear the text in this meme.

• The input is the meme below
• The output will be a audio file that reads the output text in English and has a slight pause after a colon or a new line. But don't read out 'colon'

• You can use any programming language
• You can use any existing library
• Output audio must be playable by vlc
• Networking is not allowed, you cannot connect to any internet services

# Input and Output

Input:

Output:

Me: spends 8 hours per day on the internet

Eyesight: gets worse

me:

• The output would always be hardcoded, so there's no point in the input – Jo King Mar 8 '19 at 9:43
• This challenge would be nice with different memes as test cases. Otherwise it would be hardcoded as said previously. – Belhenix Mar 20 '19 at 19:35

# Compress briefly

Compress and decompress the first chapter of Worm, beginning with the opening words "Class ended" and ending with the closing words "my best friend." (including the period). You do not need to include any of the formatting (copy and paste as plain text).

## Rules

• You may not use any built-in or imported compression functions or procedures. You must implement the compression yourself.

• You may either write one program to compress and another to decompress, or one program that does both. If you wish, the second option can be a polyglot, where compiling as one language compresses and compiling as the other decompresses.

• Your program must be no more than 2000 bytes long. You may, at your option, compress your program with bzip2 or gzip before measuring its size for the purpose of meeting this limit.

• Your program does not need to work for any other text.

• Standard loopholes apply.

• Standard I/O rules apply.

## Scoring

• The score is the sum of the total number of bytes of your program(s) and the total number of bytes in the compressed text.

• If you use a single program to compress and decompress, then you may have to pay a penalty. Specifically, you must pay a number of bytes equal to the Levenshtein distance between the shell command needed to (compile and) run your compression program and the one needed to run your decompression program. You can calculate this online. A special exception: if you choose to write a polyglot, then you can leave out the paths to the compilers/interpreters when you calculate the penalty.

Tags: code-challenge, compression

• Related – Beefster Mar 19 '19 at 22:31
• @Beefster, a bit, but I think there are enough differences to make competitive answers largely incompatible. – dfeuer Mar 19 '19 at 22:36
• I don't think any answers are going to outperform gzip/bzip/whatever. There's no obvious patterns to exploit in the text. – Beefster Mar 19 '19 at 22:37
• Also: how is this different from kolmogorov-complexity? – Beefster Mar 19 '19 at 22:38
• @Beefster, it's different because I don't allow the code to be big enough to have much chance of encoding the text in it. It doesn't have to outperform industrial-strength algorithms. That mention had to do with the source code size limit, intended to give extremely verbose languages the opportunity to participate. – dfeuer Mar 20 '19 at 0:28
• Every answer will be some variant of import gzip; gzip.compress(story) – Beefster Mar 20 '19 at 16:21
• @Beefster, is my explicit prohibition of that insufficient? My first rule is that you can't use a built-in or imported compression function. – dfeuer Mar 20 '19 at 16:42
• That sounds a lot more interesting than it actually is. There's a reason "do X without Y" questions have fallen out of favor. Compression challenges are hard to write. At the very least, you need some exploitable pattern common to a class of strings. This simply isn't the case in the linked text. – Beefster Mar 20 '19 at 19:29
• Even without using built-ins the best answer will use some variant of Huffman coding that fits in 2000 bytes. LZ77 is also pretty easy to implement and works well on text. – Beefster Mar 20 '19 at 19:44

# Output an alphabet suite

A successor to the ŋarâþ crîþ alphabet challenge.

Outputting the alphabet song with as few letters as possible was too easy, but what about outputting many of them?

Your challenge is to write as many programs as you can, with no two programs sharing any Unicode codepoints, and each program outputting the names of the letters of the alphabet (or the glyphs of some other kind of phonetic script) used by a different language. For instance, one program can output

a bee cee dee e eff gee aitch i jay kay el em en o pee cue ar ess tee u vee double-u ex wye zed


and another program can output

a be ce de e efe ge hache i jota ka ele eme ene eñe o pe cu erre ese te u uve uve doble equis ye zeta


Notes:

• For a given language, there will probably be some leeway in what you can output.
• Unlike in the previous challenge, you don't need to worry about any particular punctuation. You should at least separate each letter name with whitespace.
• You must output the names of the letters, not the letters themselves (so A B C... is invalid), unless the letters are literally pronounced so in the language in question.
• If a language uses both capital and lowercase letters, then you may output the letter names in either case. If it uses only one of them, then you must output the alphabet in that case.
• You must use a different language's alphabet for each program, but you are allowed to use the same script in the context of different languages.
• Constructed languages are allowed, as long as they predate the challenge.
• You may use different programming languages for each program. Or the same.
• Standard loopholes are forbidden.

TODO:

• is the requirement against sharing any codepoints too strict?
• I haven't downvoted you, but suspect that the major reason that you're getting downvoted is that it's totally unclear what outputs are valid or not, and skimming the edges of that is where most of the byte savings are going to come from in a code-golf. That said, I don't think this is code golf, despite having the tag. You'll probably find that, when any golfing aspect is removed, the strings to print are more or less irrelevant, so you might as well use a fixed, objective set of strings instead of the ones you have. – ais523's temporary account May 13 '19 at 16:24

# add two numbers in string representation

### Idea:

Given two strings representing non-negative integers in base 10, return the string corresponding to their sum - without any explicit arithmetic operations. This means you have to implement incrementing (probably with a lookup and indexing) and carrying (probably with iteration or recursion) on your own. Comparisons and boolean operations are allowed.

### Examples:

"1" + "1" = "2"
"5" + "6" = "11"
"0" + "8" = "8"


### I/O:

Write a function or program which takes the two strings in a way you want to.
Output, print or return the solution in whatever way you want.

Ah, and also don't forget that this is code-golf, so shortest answer in bytes will win. Also, all standard loophole rules and so on apply (you should know from all the other challenges!)

# Sandbox

This challenge changed, evolved and got compressed during discussion with Adám starting from here (feel free to review the edits and chat of this post on how we got here)

### Tags for cgcc post:

• This is still "Do X without Y", and Y is not always clear-cut. What counts as an "explicit arithmetic operation" in lambda calculus? – Peter Taylor Jul 25 '19 at 15:22
• @PeterTaylor my english is not the best in the world and also i am not a pro in thins like loopholes or coding terminus around maths. you have any idea how to propose this or what kind of operations to prohibit? I would just come up with explicite "+" "-" "*" and "/" operations directly on the string representations (also to exklude languages which can handle interpreting strings as numbers). But are there furter operations I forget? – pixma140 Jul 26 '19 at 5:43
• I don't think it can be fixed. – Peter Taylor Jul 26 '19 at 5:53
• I agree this can't be defined objectively. The only way I can see this working is if the output was required to include the steps of calculation so that it's no longer an non-observable requirement. That would probably involve specifying a particular approach to implement though. I can't guess whether such a restriction would make the challenge interesting, but I suspect it would not. – trichoplax Jul 28 '19 at 18:58
• Guess then I will better not post this question outside of the sandbox.. But thanks to you all so far! :) – pixma140 Jul 29 '19 at 5:41

The goal is to make a program that is compilable in as many languages as possible.

• The program must be compilable with a specific compiler version and compiler parameters without any errors.
• The program may result in an error when run.
• The source code must not be empty or whitespace.
• This is somewhat similar in spirit but not the same. This probably is a duplicate of something, strictly or less so, but that's the first thing that came to mind – Unrelated String Aug 27 '19 at 7:48
• A null program is compilable in most(if not all) languages. (Including specific compilers of C(in IOCCC).) – user85052 Aug 27 '19 at 10:15
• @A_ I've added an additional rule. – user11909 Aug 27 '19 at 10:58
• As-is, this will be closed as Too Broad, since there's no "thing" for the program to do. Have a look at the polyglot tag and see what others have done. – AdmBorkBork Aug 27 '19 at 14:25
• Define "compile". – pppery Aug 28 '19 at 23:23

Writing a WebCrawler

Challenge

Design a web crawler that recursively extracts all the hyperlinks from the HTML of the web page and does the same for every hyperlinked page it finds. The webcrawler must store the hyperlinks in a separate file

How The WebCrawler Works

First the webcrawler should download the HTML file of the URL the user inputted.

Second the webcrawler will copy every single hyperlink embedded in the hyperlink and paste it into an output text file. The best general way to do this based on my experience is to have the webcrawler iteratively search through the HTML file for an "a href" tag. Be careful about what kind of hyperlinks are embedded in those tags. Sometimes only the subdomain directories of a complete hyperlink are embedded in this

For example: https://en.wikipedia.org/wiki/Toyota may simply have an a href tag in the HTML file of a webpage as: "/wiki/Toyota"

After extracting all the hyperlinks of the first webpage, visit all the hyperlinks found on the base webpage starting from the the first hyperlink found and repeat all the steps above. The only exception to doing this is obviously if the hyperlink fails to lead to an HTML page.

Input

The program must accept only one URL as input.

Output

A text file that lists every hyperlink that it finds. Note:

Your webcrawler must avoid revisiting webpages it has already crawled. This can cause the crawler get trapped in a "circular link loop" where it continously visits the same pages endlessly.

Note:

Special consideration will be given to submissions that prove they are capable of crawling deep web websites, including those with the .onion sites.

# Produce the next Italy number code-golfintegersequence

This is the third post for the second RGS's Golfing Showdown.

Italy is a Southern European country that was greatly devastated by the impact of the coronavirus crisis in its fairly aged population. As of the 27th of April, Italy was roughly 600 cases short of hitting 200.000 total confirmed cases.

Your task is to produce the total number of confirmed cases on day n+1 given the total number of confirmed cases on day n, with n going from the 21st of February 2020 to the 10th of April 2020, as per Wikipedia's data, obtained at 19:38 27/04/2020 UTC.

For your convenience, these are the 20 numbers involved; the first 19 are inputs and the last 19 are outputs.

[20, 79, 150, 229, 322, 445, 650, 888, 1128, 1694, 2036, 2502, 3089, 3858, 4636, 5883, 7375, 9172, 10149, 12462]


# I/O

I/O should be integers or reasonable representations of those, with the restriction that your code must accept as input its own output.

# Test cases:

20 -> 79
79 -> 150
150 -> 229
229 -> 322
322 -> 445
445 -> 650
650 -> 888
888 -> 1128
1128 -> 1694
1694 -> 2036
2036 -> 2502
2502 -> 3089
3089 -> 3858
3858 -> 4636
4636 -> 5883
5883 -> 7375
7375 -> 9172
9172 -> 10149
10149 -> 12462


Python reference implementation

• Can we use ResourceObject["Epidemic Data for Novel Coronavirus COVID-19"] for Mathematica? (it involves fetching the data from a server, but 1) it's still built-in 2) so do many SomethingData functions for the first time). – my pronoun is monicareinstate Apr 28 at 1:47
• @mypronounismonicareinstate if that is not against some loophole, sure. Just make sure the numbers coincide with the numbers I posted – RGS Apr 28 at 6:00
• How is this not a hard-code the data challenge? Is there any possible relation? Because otherwise, it seems really boring. – S.S. Anne Apr 29 at 0:54
• @S.S.Anne thank you for your feedback; I changed the task and reduced the total amount of days we are dealing with. Please let me know if this looks more sensible. – RGS Apr 29 at 18:40
• It's better, but I still don't see how this couldn't be solved without just a big array. – S.S. Anne Apr 29 at 19:06
• @S.S.Anne someone will think of something! Hopefully :) – RGS Apr 29 at 19:15
• You can't just hope that someone will find some interesting way to solve your challenge to make a boring challenge interesting. The shortest way I see to solve this right now is to hard-code the data, which is probably what everybody will do. – S.S. Anne Apr 29 at 19:22
• Just graph your data, see how much it deviates from only a simple parabola? – S.S. Anne Apr 29 at 19:29
• Maybe you could allow some small error bound on the output (say 10%)? Then the challenge would become about finding a model that approximates the data well, rather than hardcoding values – math junkie Apr 29 at 20:16

# Output the number of lines of your code

Your task is to write a program that counts the number of its lines of code and outputs them.

Specs:

• The number mustn't be hardcoded into the program, nor in any other external resource;

• Internet access is forbidden;

• Your program's output must be the number of lines only;

• Your program should not use any tool, macro, function, or similar device designed with the specific purpose of counting lines.

$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? – Akangka 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. – Mego Apr 6 '16 at 4:06 • @Mego Vitsy wins. 0 bytes, 11752 bytes of output. – Addison Crump Apr 7 '16 at 17:07 # 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. – programmer5000 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. – programmer5000 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

# 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