2
\$\begingroup\$

Possibly relevant.

So I was looking at this answer and was amazed by the compactness and unreadability, when I suddenly thought: "That are an awful lot of non standard characters!" So I get that coding golf languages utilize single characters for extended functionality, but as I remember it, a "byte" are 8 bit, so only 256 one-character-commands could possibly be used. And then I found out that the language in question uses more. So, are you really that lenient with encodings? Can one just select which parts of the command list are to be taken? But then that would be the same as counting any character as 1 byte. So shouldn't languages that are okay here only use up to 256 bytes?

(I understand that single characters can have an encoding bigger than 255 for display reasons, I just kinda disagree that more than 256 characters are allowed in general.)

\$\endgroup\$
5
  • 2
    \$\begingroup\$ Not all of the commands in 05AB1E are a single byte. \$\endgroup\$
    – Wheat Wizard Mod
    Mar 7, 2018 at 2:53
  • 1
    \$\begingroup\$ Related: codegolf.meta.stackexchange.com/q/10145/45941 \$\endgroup\$
    – user45941
    Mar 7, 2018 at 3:43
  • \$\begingroup\$ Number of bytes is whatever wc -c returns. Without any exception. \$\endgroup\$
    – DELETE_ME
    Mar 7, 2018 at 5:48
  • \$\begingroup\$ If you don't think that (some answer) has the claimed bytecount, just ask them to provide a hexdump. Done. \$\endgroup\$
    – DELETE_ME
    Mar 7, 2018 at 5:50
  • \$\begingroup\$ tio.run/… \$\endgroup\$
    – DELETE_ME
    Mar 7, 2018 at 6:06

2 Answers 2

8
\$\begingroup\$

05AB1E uses this code page, which contains exactly 256 characters. The info.txt includes many two-byte tokens (such as ža and .€), which is why there are more than 256.

\$\endgroup\$
1
  • \$\begingroup\$ Ah jeez! I was so concentrated on counting out the white lines and characters without a command assigned I completely missed that! \$\endgroup\$
    – SK19
    Mar 7, 2018 at 9:23
5
\$\begingroup\$

A byte is a byte

There are, in fact, only 256 characters used in these types of languages!

The linked answer uses a SBCS, or a Single Byte Character Set. The code page can be found here. Every character in 05AB1E corresponds to a single codepoint in the 256 byte range. The language uses a translator to correspond UTF8 encoded source code to raw bytes. This is the same for most languages that use funky-looking characters on this site.

\$\endgroup\$
1
  • \$\begingroup\$ Except for Charcoal which does it the other way round >_> \$\endgroup\$
    – ASCII-only
    Mar 7, 2018 at 2:40

You must log in to answer this question.

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