7
\$\begingroup\$

Suppose you are answering a code-golf challenge in a language whose interpreter can only use UTF-8. Say you have a program that uses some code points in the range 128-255, but not higher. Would it then be permissible to encode your answer in Latin-1 or some other single-byte encoding?

I would argue that only encodings directly usable with the language interpreter should be allowed. Otherwise, one could compress any answer and then claim that it uses a zip encoding.

This question is motivated mainly by answers that use an APL code page. I suspect that not all modern APL interpreters are capable of executing source that uses this encoding (but maybe I'm wrong).

\$\endgroup\$
11
  • \$\begingroup\$ Which compiler/interpreter? It's not fair if all APL interpreters have to support the encoding being used. \$\endgroup\$ Commented Oct 22, 2015 at 2:31
  • \$\begingroup\$ I would be amazed if there was an APL interpreter that didn't support the APL code page because then what's the point? \$\endgroup\$
    – Alex A. Mod
    Commented Oct 22, 2015 at 2:33
  • \$\begingroup\$ @AlexA. The APL codepage was created eons ago to be used on IBM mainframes. The technology may have moved on by now. \$\endgroup\$
    – feersum
    Commented Oct 22, 2015 at 2:35
  • 1
    \$\begingroup\$ I think this question falls under meta.codegolf.stackexchange.com/q/5878/20469. \$\endgroup\$
    – Alex A. Mod
    Commented Oct 22, 2015 at 2:36
  • \$\begingroup\$ @Calvin'sHobbies The various APL flavors are all mutually incompatible, so most programs only work on one of them. \$\endgroup\$
    – feersum
    Commented Oct 22, 2015 at 2:37
  • \$\begingroup\$ @AlexA. But none of the answers to that question address the point I'm bringing up here. \$\endgroup\$
    – feersum
    Commented Oct 22, 2015 at 2:38
  • \$\begingroup\$ @feersum what about MartinBüttner's comment on that question itself? \$\endgroup\$ Commented Oct 22, 2015 at 6:58
  • \$\begingroup\$ Once I checked the APL code page in Wikipedia and didn't find some important characters like . But I'm not sure whether it is the code page being used in modern APL. \$\endgroup\$
    – jimmy23013
    Commented Oct 22, 2015 at 9:41
  • \$\begingroup\$ @DanHenderson This one? I don't see how it's relevant. \$\endgroup\$
    – feersum
    Commented Oct 22, 2015 at 11:36
  • 1
    \$\begingroup\$ Either way, the problem is trivial to fix. Someone writes a program that converts from the legacy APL encoding to the Unicode APL characters and feeds the code to a "real" interpreter-- then an interpreter exists. \$\endgroup\$
    – lirtosiast
    Commented Oct 24, 2015 at 4:01
  • \$\begingroup\$ @jimmy23013 See here. \$\endgroup\$
    – Adám
    Commented Jun 21, 2016 at 22:12

2 Answers 2

13
\$\begingroup\$

No

People need to be able to actually run your entry. Just as you can't write code with syntax errors, you can't write code that your interpreter won't compile because it's not encoded in a certain way.

If you need a certain encoding for a language, write your own interpreter, even if it just converts encodings and delegates to the real one (as @ThomasKwa said in comments).

\$\endgroup\$
3
\$\begingroup\$

Have it be a different language.

In effect, the new language is a combination of recode (with the right arguments) and the original language.

For by-language competitions, it thus wouldn't compete against the original language, but just against your own recoded language.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .