2
\$\begingroup\$

I think that Brainfuck and many other esoteric languages almost never win , because they take many characters to express things. So, overall, Brainfuck programs are longer in bytes, because they use only eight different characters. I think that it isn't fair to give each character one byte in a language which uses just over 3 per cent of the ASCII charset.

I'm suggesting this simple amendment to the scoring rules of which will give some esoteric languages more of a chance.

If you have a character set of only 16 characters, each character is 4 bits. Hence, you can store 2 characters in one byte.

So, in languages which have 16 or fewer useful characters (e.g. Brainfuck, any others?), every character should count as 0.5 bytes (unless the program contains ASCII characters which are not in our set of 16, in which case normal scoring applies).

Similarly, for languages such as Whitespace, which uses 3 different characters (correct me if I'm wrong), you could count every char as 0.25 bytes, unless the program contains other chars.

I'm a bit reluctant about giving HQ9+ the 0.25 byte privilege, but ultimately there's no reason why not - we all know it's a joke, it won't somehow become more clever if we allow it to be scored like this, and if we didn't let HQ9+ have 0.25 bytes per char it would be a confusing exception to the rules.

TL;DR (too long, didn't read)

I think that in languages that use 16 or fewer different characters, and ignore all others (e.g. Brainfuck), every character should count as half a byte for . This will give more of a fair chance (?) to many esoteric languages, and allow them to compete with more respectable things.

\$\endgroup\$
4
  • \$\begingroup\$ You can still have many functions even if using 16 characters (eg. there are 65536 different four character combinations), so people may make 16-character languages which are completely acceptable, just to get this bonus on their code. \$\endgroup\$
    – kitcar2000
    Commented May 14, 2014 at 18:57
  • \$\begingroup\$ @kitcar2000 Good point, but creating your own language for a question is "no longer funny": meta.codegolf.stackexchange.com/questions/1061/…. If someone makes a special language which uses 16 characters, and it gets popular, then we could accept it just as we accept HQ9+ or GolfScript. But then it wouldn't be cheating, because you aren't creating it for a specific question. \$\endgroup\$
    – user16402
    Commented May 14, 2014 at 19:22
  • \$\begingroup\$ speaking of HQ9+ - does this means that these rules now provide us a 0.25-byte quine and a 0.25-byte hello-world? \$\endgroup\$ Commented May 14, 2014 at 19:30
  • 1
    \$\begingroup\$ @JanDvorak Unfortunately yes... but as I explained, HQ9+ won't suddenly get more upvotes. It's still a complete joke. Even without these rules it can still beat any other language. \$\endgroup\$
    – user16402
    Commented May 14, 2014 at 19:32

1 Answer 1

6
\$\begingroup\$

This doesn't need to be in the site's rules because it already exists in the real world.

For example, let me define my own language called "BitF*ck," directly mapping BF commands to bits:

+ 000
- 001
> 010
< 011
. 100
, 101
[ 110
] 111

Now each BF character is .375 bytes, and look, we didn't need to change any of the site's rules! Similarly, we could map HQ9+ to 00 01 10 11 and get .25 bytes per character.

The advantages of this are:

  1. We have an objective way of determining how many bytes a character should be (just use bits instead of characters!).
  2. It's already used in the real world
  3. No special cases are needed - just map any language to a set of bits and you're good for every challenge from that point on
  4. No arguments about what a "character set" is

You could always provide a BF program alongside the binary translation, to make it easier to understand.

\$\endgroup\$
5
  • 2
    \$\begingroup\$ Good idea, but ultimately creating your own language is still frowned upon, and just counting BF chars as 0.5 is simpler \$\endgroup\$
    – user16402
    Commented May 15, 2014 at 7:46
  • 2
    \$\begingroup\$ This is basically a Huffman encoding of bitfuck and would be relatively easy to implement. I wonder why there aren't any esolangs that take advantage of compression techniques like this. \$\endgroup\$
    – Kyle G
    Commented Nov 17, 2015 at 13:25
  • 3
    \$\begingroup\$ Sorry, but I independently did this \$\endgroup\$ Commented Nov 19, 2015 at 0:37
  • 2
    \$\begingroup\$ @professorfish When has that ever been frowned upon? Never. \$\endgroup\$
    – cat
    Commented Jun 23, 2016 at 20:00
  • \$\begingroup\$ @LegionMammal978 "Sorry"? This post was posted in 2014 and your link says you created it in 2015. \$\endgroup\$
    – Stephen
    Commented Nov 2, 2017 at 1:48