Related: Fair size comparison across languages with different source alphabets

Scoring non-ASCII languages in has been long-debated. Since I primarily uses APL for code golf, I have seen and been in these discussions.

I think it is reasonable to handicap non-ASCII languages based on expressing power of a single character. However, utf-8 does not do that. Take APL as an example. All non-ASCII character APL uses are in the Miscellaneous Technical block which is 3 bytes. There are also ASCII characters that simply goes unused or for things that are useless for code golf (like forking or object-oriented stuff). Actually, APL uses only 50 or so non-ASCII symbols so APL programs can be mapped entirely within ASCII if you restrict legal identifiers and/or allow non-printable ASCII.

Community consensus is that any language whose spec is up before the challenge is posted is allowed if the OP does not otherwise restrict its use. And that leads to my question: Does a language which is only character substitutions of an existing language allowed? And, if it is, is a translation table for such a language sufficient as a spec?

  • \$\begingroup\$ You could just define a character mapping, call it a new language (AsciiPL?), write a "compiler" that translates programs to APL and use it for future challenges. \$\endgroup\$ Commented Sep 28, 2014 at 6:44
  • \$\begingroup\$ @MartinBüttner That is EXACTLY my question (in bold) \$\endgroup\$
    – TwiNight
    Commented Sep 28, 2014 at 6:45
  • \$\begingroup\$ Ah right, I understood your question as asking for an exception, so that you could use a hypothetical language. In that case, yes I don't think there's anything wrong with it if you actually create the language. It's not much different from Pyth then (search meta for it, that one had its own similar question). \$\endgroup\$ Commented Sep 28, 2014 at 7:04
  • \$\begingroup\$ If you do this, please also include the corresponding APL bytecount in your answers so that it can be compared to other potential APL answers. \$\endgroup\$
    – xnor
    Commented Sep 29, 2014 at 2:06
  • \$\begingroup\$ APL fits inside a byte easily, and in fact there are several APL encodings that fit within a byte. So I've been counting them as bytes for the longest time and nobody has complained. I've only seen one question where they asked for "amount of bytes in Unicode representation" specifically. \$\endgroup\$
    – marinus
    Commented Sep 29, 2014 at 7:29

1 Answer 1


I don't think this is different from, e.g., Pyth which is mostly a 1-to-1 mapping of built-ins to single letters. That's another form of eliminating some inherent weakness of the language for golfing. In your case, it's just even simpler in that you want to replace 3-byte Unicode characters with ASCII. So the usual rules apply:

  • Write your own spec for an APL derivative.
  • Write a compiler (which can probably be a YourLanguage-to-APL compiler).
  • Use the new language after you've released the compiler.

Reference: 1 on 1 language mappings "legal"?


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