-3
\$\begingroup\$

Disclaimer: a symbol is in this post. This is not a swastika, this is a religious Hindu symbol. I apologise in advance if I cause any offence


I am currently creating a new language called Tesseract where the source code must be arranged in the shape of a tesseract (asciiart below) otherwise the compiler throws an error. This is what an empty program full of no-ops would look like (gross oversimplification; it also has another cube in the middle but I'm writing this on my phone):

         ,,,,,,,,,,,,,,,,,,,,
        ,                  ,,
       ,                  , ,
      ,                  ,  ,
     ,                  ,   ,
    ,                  ,    ,
   ,                  ,     ,
  ,                  ,      ,
 ,                  ,       ,
,,,,,,,,,,,,,,,,,,,,        ,
,                  ,       ,
,                  ,      ,
,                  ,     ,
,                  ,    ,
,                  ,   ,
,                  ,  ,
,                  , ,
,                  ,,
,,,,,,,,,,,,,,,,,,,,

Obviously this has a lot of empty white space simply to fit the restrictions I have placed upon the source code layout which I can't remove from the program and it still run.

One other problem is the use of no-ops. A simple Hello, World! program would have to look like this in order to work as the smallest valid tesseract has dimensions of 10x10x20 but this submission would be 117 bytes without the spaces.

         "Hello, World!"࿘,,,,
        ,                  ,,
       ,                  , ,
      ,                  ,  ,
     ,                  ,   ,
    ,                  ,    ,
   ,                  ,     ,
  ,                  ,      ,
 ,                  ,       ,
,,,,,,,,,,,,,,,,,,,,        ,
,                  ,       ,
,                  ,      ,
,                  ,     ,
,                  ,    ,
,                  ,   ,
,                  ,  ,
,                  , ,
,                  ,,
,,,,,,,,,,,,,,,,,,,,

Therefore, I would like to ask that only no-ops that are in the program flow be counted. This means that the above program would be 16 bytes (Tesseract uses a custom code-page), the length of the actual code. But this program would be 17 bytes

         "Hello, World!",࿘,,,
        ,                  ,,
       ,                  , ,
      ,                  ,  ,
     ,                  ,   ,
    ,                  ,    ,
   ,                  ,     ,
  ,                  ,      ,
 ,                  ,       ,
,,,,,,,,,,,,,,,,,,,,        ,
,                  ,       ,
,                  ,      ,
,                  ,     ,
,                  ,    ,
,                  ,   ,
,                  ,  ,
,                  , ,
,                  ,,
,,,,,,,,,,,,,,,,,,,,

as a no-op is part of the program flow.

What do you think? Do you agree with my idea or do you have a better one?

EDIT

I would just like to point out that I will downvote answers that tell me to change the way my code works as it is quite far along and it is easier to have a custom scoring for one obscure language than it is to completely change my language structure.

\$\endgroup\$
  • 4
    \$\begingroup\$ You could do what Cubix and Hexagony do and have the compiler take a program not in the shape of a tesseract and fold it into a tesseract. \$\endgroup\$ – Pavel May 16 '17 at 23:48
  • \$\begingroup\$ @Phoenix this isn't designed to be a golfing language and the shape is part of the difficulty in coding it. I like the challenge. I only raised this before I start using it before people start questioning how to count its score. \$\endgroup\$ – caird coinheringaahing May 16 '17 at 23:55
  • 3
    \$\begingroup\$ Regarding your edit, your byte count is the number of bytes of code, it's as simple as that. Users suggesting you change your language are just offering friendly advice. There's no reason to assume your language deserves special treatment just because it would be more convenient for you. \$\endgroup\$ – DJMcMayhem May 17 '17 at 0:13
11
\$\begingroup\$

Your score is the number of bytes in your code in your language's encoding

This is how it works with every other language on PPCG, and there's no need to make an exception.

In Java, this is a valid solution to "Hello, World!" (posted here):

class H{public static void main(String[]a){System.out.print("Hello, World!");}}

There's no rule that says "the code that is required for any full program doesn't count toward your answer's score". If there was such a rule, you could technically submit this:

System.out.print("Hello, World!");

But as this is not a valid full program in Java, it is not a valid entry.


Now, if you were to choose to include a character in your encoding that auto-magically fills in the rest of the tesseract (say @ for the time being), you could submit this as a valid entry, as long as your interpreter/compiler supports it:

         "Hello, World!"࿘@

Or you could do what Hexagony and Cubix do and automatically fill in missing whitespace and no-ops. In that case, this might be a valid answer (again, as long as your interpreter supports it):

"Hello, World!"࿘

But regardless of whether you choose to do any of these things, your score is the number of bytes in your code in your language's (default) encoding.

\$\endgroup\$

You must log in to answer this question.

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