# Creating new language. Would it be legal?

Would it be legal if I create my own programming (actually scripting) language with many cool built in functions, that would let win code-golf challenges?

Please, do not discuss if it would be hard to implement, but just express your opinion, if it would be legal or not.

Thanks!

• Since I've not enough rep: please add tags and/or extend the title with tags like "DSL", "invent custom language", "create own language", etc. to make it findable. (The title "would it be legal?" applies to nearly 50% of the questions in this meta, I think ;) I didn't found it with searching for therese words, only accidently. – try-catch-finally Jun 7 '14 at 12:41
• There are already such languages, and the general consensus seems to be that it's okay as long as you use a version of the language that existed before the question was posted. – nyuszika7h Feb 13 '15 at 19:00

I think that Timtech has already done this with a source-to-source compiler which is basically a macro language. That seems to tread rather close to the subject matter of the previous meta question Is a code golfing library legitimate? It's also on rather thin ice because there isn't a generally available reference implementation: the only compiler provided is provided in an encoded format for which there doesn't appear to be a decoder. I personally would not accept or upvote an answer in GTB.

It's easy to imagine a language which would be clearly unacceptable. I'll call it zc: its compiler is

#!/bin/sh
zcat "\$@" | sh


and a program is generally written by first writing in another language and then source-to-source translating it. E.g. the "source" is

gcc -flags <<<X
#include foo
...
X


after it's run through gzip.

So it seems to me that there are several minimal criteria which affect whether a language which you create is reasonable to use:

• The source is directly editable in general (i.e. you don't need to "compile" a different source into the code you submit).
• The language is well enough documented that other people can use it, and there is a reference implementation available for them to use.
• The language is stable, or at least stable enough that you don't give the impression that you're adding bits for each new challenge.

If you can get other people using your language, that's obviously a big bonus to its credibility. (The creators of J and GolfScript do not, as far as I know, participate on this site).

• Would this count? It's not translated, there's a reference, and pretty much fixed right now – mniip Jan 17 '14 at 3:30
• A stable language? Java is not stable, there are new versions from time to time. I suggest that the language version must already exist when the question was submitted. – Johannes Kuhn Jan 21 '14 at 2:18
• Timwi's got one too, now: esolangs.org/wiki/Sclipting – boothby Jan 24 '14 at 18:13

In this post, I'm writing as a user, not a moderator.

Personally, I believe there's a fine line between GolfScript and HQ9+. Both languages are designed for golfing, but GolfScript is actually a general-purpose programming language (albeit one that lacks many useful features like floating-point numbers) that happens to use really short identifiers for its built-in operators, whereas HQ9+ is a language that's tailor-made to be good at three specific problems only.

So my question for you is, is your language going to be general-purpose? (That is, are your "cool built-in functions" going to be applicable to a wide range of programming problems, as opposed to being specific to a small handful of code challenges?) If so, great!

Also, you need to decide what will make your language appealing compared to GolfScript. One of GolfScript's strengths is that, compared to FlogScript, it's actually pretty easy to read: the operators are chosen with some care, and in particular, the author of GolfScript aimed to make most of the operators use punctuation rather than alphanumeric names (and given GolfScript's lexer, there is good reason for this). In contrast, in FlogScript, many operators use alphanumeric names and they are nearly indecipherable (IMHO).

Build it. Then see if they come. What I mean is if you construct such a language, one great test of legitimacy is whether other code golfers start to use it also.

Frustrating as it might seem, you may not get a ruling in advance on this strategy until you actually try it. Context is very important when it comes to judging fairness. And rules can change day to day as the community continues to assess a situation.

Build a compelling tool and they will come! So whatcha got?