# Do submissions have to be answered with a programming language?

We've got various answers strewn across meta that tell different stories:

On the standard loopholes, we disallow answers that aren't programming languages. This appears to be the most definitive answer of the lot. It has a vote count of 16/-8.

However, on a question that asks "Should answers to fixed-output challenges be written in a programming language?", the top answer says that we shouldn't "generally disallow solutions written in non-programming languages". It's vote count is currently 19/-5.

On yet another post, we are asking what programming languages are, and xnor says that "For this purpose, I think that markup languages and limited output languages should be treated the same as programming languages". Vote count of 18/-3.

On that same question, the leading answer provides a very solid definition of a programming language, which excludes languages which can't represent natural numbers or tuples, add two natual numbers, determine primality of a natural number, and operate on either a decision model (accept or reject an input based on rules in the program, a la Prolog) or a transformation model (transform an input into an output using the algorithm defined in the program, a la C) (vote count +57/-4). A remark from this answer:

This definition excludes HQ9+. I don't consider this a problem either, for two reasons:

1. It was created as a joke rather than a language, and has ceased to be funny in the context of this site.

2. I think that every interesting problem which HQ9+ can "solve" has already been asked, so I don't think this will exclude any interesting answers in the future.

Without discussing what a programming language is, do we allow non-programming languages on any challenge (assuming it can answer the challenge)?

Regardless of whether the answer is Yes/No, can we also please edit/remove answers that conflict with the official view we hold?

• Thanks for bringing this to meta. It's too late here to write an answer right now, but the current state is a bit nonsensical: Kolmogorov complexity challenges can be answered in non-programming languages, but other challenges (which non-programming languages usually can't solve anyway) cannot. – Dennis Oct 26 '16 at 6:27
• Slightly related – James Oct 26 '16 at 18:53
• I'd consider Minecraft commands as a programming language (it sits into the definition). After all, it has the /scoreboard command, which allows to create, operate with and assign variables. – RudolfJelin Nov 5 '16 at 19:40
• @RudolfL.Jelínek we've already allowed Minecraft, and have standards for how to count it – Nathan Merrill Nov 5 '16 at 19:49
• @NathanMerrill Yay! Awsome! Now, my full power is unleashed... just kidding. – RudolfJelin Nov 5 '16 at 19:51

# Answering in non-programming languages is allowed

The best challenges are written in terms of input and output. We avoid Do X without Y challenges because the Y is usually not defined in terms of input/output.

Disallowing non-programming languages is like disallowing arbitrary classes of languages. As long as they produce the right output with given input, they are fine.

If we disallow non-programming languages, then people will simply create clones of the non-programming languages that now fit our arbitrary "programming language" requirements.

Now, to address some common concerns:

1. If you are non-programming language, you aren't programming. Tell this to everybody who writes HTML or CSS1. Programming is all about problem solving. The act of implementing a solution to a problem is programming. This is why we allow non-programming golf challenges.
2. If a non-programming language can solve a challenge, then that's a sign that the challenge is poor: I frankly don't see how this matters. If the challenge is poor, then downvote it/close it. If the challenge is of good quality, then let people answer it however they want.
3. Non-programming languages answers are usually uninteresting. Yeah, if your answer is simply the text from a , that's uninteresting. However, this problem isn't limited to non-programming languages. print "Hello world" and "Hello world" are equally uninteresting (and H in HQ9+ is more interesting than either of those).
4. We've run out of challenges for non-programming languages to be competitive in. If that is true, then we simply won't see them on any more challenges, problem solved. If they are answering a challenge without being competitive, we already have policies for that. If they are competitive, then let's allow them!

We have a serious double-standards problem here:

1. We are disallowing arbitrary classes of languages.
2. We are disallowing them on non- challenges, where they have the most chance of being interesting
3. We are disallowing languages based off of whether they can solve arbitrary problems (like "primality checking"), not whether they can solve the problem at hand.

1I know, CSS technically is a programming language, but 99% percent of the programmers aren't using it as a programming language.

• Re "We are disallowing arbitrary classes of languages", surely the point is that the things we disallow aren't languages, and that's why they're disallowed. – Peter Taylor Oct 26 '16 at 15:33
• I'm not sure what to call it then, as they still take input and produce output. – Nathan Merrill Oct 26 '16 at 15:35
• Can you give an example (other than HQ9+, for which the appropriate term is bad joke)? – Peter Taylor Oct 26 '16 at 16:11
• Standard regex isn't a language solely because there isn't a spec with corresponding implementation which says how the output should be given. If you add a wrapper which defines output of 1 for match and 0 otherwise then regex with backreferences meets the definition of a programming language. HTML can probably be claimed as well, because it's a subset of a valid "language" (HTML+CSS). – Peter Taylor Oct 26 '16 at 16:26
• I agree with you here. To sum up my thoughts: if a "non-programming language" can solve a challenge, either the challenge has a problem, or the answer is (at least somewhat) clever, or the answer is just plain uninteresting. Only the last case seems like a problem that would be addressed by banning non-programming languages; the second case is a benefit that would be lost. – ETHproductions Oct 26 '16 at 18:43
• For fixed output challenges? Sure. – Nathan Merrill Oct 27 '16 at 6:41
• What about the claimed 0 byte answer to the cat challenge using "language" cat? – Peter Taylor Oct 27 '16 at 9:15
• It's technically a language, yes. The thing here, is that there is probably some esolang that is a programming language by our standards, but prints out the input by default. The existence of a 0 byte solution has no relevance to this – Nathan Merrill Oct 27 '16 at 12:54
• How on Earth is cat "technically a language"? According to what technical definition? Is your argument that every executable defines a language? – Peter Taylor Oct 27 '16 at 20:54
• What about vim? It's turing complete. – noɥʇʎԀʎzɐɹƆ Nov 5 '16 at 19:07
• @NathanMerrill Does a computer made up of cells and neurons count? :P – Buffer Over Read Dec 5 '16 at 18:19
• The entire point of this answer is to say It doesn't matter how your language works, if it can complete the challenge, its ok. (At a more fundamental level, your program should be representable in bytes, have an output, and an input (if the question requires an input)) – Nathan Merrill Apr 3 '17 at 21:37
• Disallowing non-programming languages is like disallowing arbitrary classes of languages. As long as they produce the right output with given input, they are fine. Disregarding the enormous logical leap required to arrive at that incorrect conclusion, by your reasoning, MetaGolfScript would be acceptable. – user45941 Apr 16 '17 at 1:47
• Assuming it was written before the post, yes. The problem with MetaGolfScript is that the actual interpreter doesn't exist until somebody uses it – Nathan Merrill Apr 16 '17 at 3:43
• New programming language: English. is interpeter-defined. Is deterministic but must use same human each time for execution. – Downgoat Aug 3 '17 at 3:27

# No, answers in non-programming languages are not allowed

This site is Programming Puzzles and Code Golf. From Wikipedia:

Programming involves activities such as analysis, developing understanding, generating algorithms, verification of requirements of algorithms including their correctness and resources consumption, and implementation (commonly referred to as coding[1][2]) of algorithms in a target programming language.

https://en.wikipedia.org/wiki/Computer_programming

We have a policy on what defines a programming language. Writing a "program" in a "language" that does not meet those requirements is not programming, and thus does not fit in the scope for Programming Puzzles and Code Golf.

A challenge being solvable in a non-programming language is often a sign that the challenge has quality issues. We've already exhausted (or, at least, have mostly exhausted) the list of unique problems that are solvable in non-programming languages (outputting fixed text, for example) and where such a solution would be competitive. There is nothing more for such languages to contribute to the site.

• Please keep in mind that for example the "Makefile" syntax is officially a programming language but it would not meet the requirements in the policy. Claiming that anything that doesn't meet the requirements in the policy is not "programming" would mean that the word "programming" would have a completely different meaning in Code Golf than in real life. And this would mean that Code Golf has nothing to do with programming any more... – Martin Rosenau Oct 27 '16 at 6:28
• @MartinRosenau Makefiles do meet the requirements. They are Turing-complete. In general, we have to draw the line somewhere. Our current policy sets a good line. – user45941 Oct 27 '16 at 6:35
• Even if most variants of "make" are turing complete there are hundreds of programming languages not meeting the requirements but being accepted as "programming languages" in the "real world". On the other hand many "Golfing-Languages" would NOT be seen as "programming-languages" in the "real world". Insisting on these requirements will lead to the situation that "Code Golf" has nothing to do with what they call "programming" in the "real world" any more. – Martin Rosenau Oct 27 '16 at 6:55
• @MartinRosenau I think you are being extremist here. Our definition of programming (at least the one I use in this answer) is exactly the same as elsewhere: writing a program in a programming language. Outside of PPCG, the definition of a programming language is either fuzzy or unnecessarily restrictive. We seek to avoid both of those. – user45941 Oct 27 '16 at 6:59
• So far so good. However the open question is: "WHAT is a programming language?" Another example: MS-DOS (not Windows) Batch is accepted as "programming language" elsewhere. Anyone will tell you that writing a batch file is "programming". However it only meets 2 of the 4 requirements and therefore isn't "programming" according to YOUR definition. Ask anyone in the industry if "Jelly", "Jolf", "J", "051ABE", "MATL"... are programming languages. You'll get only one answer: "No, these are not programming languages!" – Martin Rosenau Oct 27 '16 at 7:10
• @MartinRosenau That question is not open - it's been answered definitively here. Batch definitely meets our requirements. And if I were to ask about any of those languages, the response would be "there's a language named that?" – user45941 Oct 27 '16 at 7:12
• @MartinRosenau, I don't often wish that I could downvote comments, but your comments on this answer are objectively wrong. – Peter Taylor Oct 27 '16 at 8:59
• @PeterTaylor I think you haven't understood my concern: According to the requirements "Mego" links to a "programming language" must be able to add two numbers. Otherwise it is not a programming language. Using MS-DOS Batch (whose state as "programming language" is unquestioned in computer science) it is not possible to add numbers. This means that the definition given in the link obviously differs from that what is called "programming language" in the real world. My concern is the following one: – Martin Rosenau Oct 27 '16 at 19:51
• @PeterTaylor I'm sure this web site is not the only place in the world where code golfing is done. If the definition of a "programming language" here differs too much from the definitions in the "real world" the code golfers elsewhere will also make own definitions. They could define that cat is an interpreter (so each file is a quine by definition) and they may do similar stupid definitions. The only way to avoid this is to use definitions that are accepted in the "real world". And as the example of MS-DOS Batch files show this is not true for the definition in the link. – Martin Rosenau Oct 27 '16 at 19:58
• @MartinRosenau Again, you are provably incorrect. Batch can do addition. See: stackoverflow.com/a/10675264. If you are going to argue, please do some research on your "facts". – user45941 Oct 27 '16 at 20:32
• @Mego from the comments on that linked answer, set /a is not MS-DOS batch, but an NT extension. (I also remember that I had to call third-party programs for arithmetic.) – Paŭlo Ebermann May 12 '17 at 16:51
• @PaŭloEbermann Languages are defined by their implementation. If it works then it's a part of the language. – user202729 Apr 28 '18 at 3:25
• @user202729 the question is "which language", in this case. If I find some implementation which does something, but the standard/original/usual implementations don't, then IMHO it is not the same language, but another one – so in this case not "MS-DOS batch", but "MS-DOS batch with NT extensions" or similar. (This just changes the title to be used in the answer, though.) Otherwise I could just use my C compiler to run a program, but pretend it to be Python. – Paŭlo Ebermann Apr 28 '18 at 10:46