1
\$\begingroup\$

I know I'm probably on thin ice, but I tried an answer in the print "Hello, World!" challenge.

I consider it to be 5 bytes total, but the user ais523 pointed out that I had to count the entire batch command (the name of the interpretter, the name of the file plus the piping parameter).

I may very well be wrong, but whats the general thought on these type of answers?

\$\endgroup\$

2 Answers 2

9
\$\begingroup\$

If you're using multiple languages in an answer, your byte count includes the glue that holds them together

The byte count should include all the bytes used for the program. If the program's being run in an unusual way, we use byte penalties for the configuration needed to run it; this is required to stop people putting their entire program into compiler arguments (which is a commonly used loophole in at least C, on some golfing sites).

Piping the result of one program into another is a similar sort of unusual way to run the program, and similarly needs a byte penalty. (Nonetheless, it's sometimes useful despite the penalty; I wrote such an answer here, and had to pay quite a few bytes gluing Jelly to GraphViz via the use of a third programming language; a Jelly answer would have been much longer without being able to call into GraphViz, though, and vice versa, so the combination was worth it.)

If you didn't have such a penalty, it'd be fairly easy to construct 0-byte solutions to arbitrary problems. (IIRC, there's a language in which a program entirely consisting of newlines will output itself plus one extra newline. Pipe that into itself sufficiently many times, pipe the result into Lenguage, and you have the program entirely encoded in the plumbing, with no input bytes for the program itself.)

\$\endgroup\$
2
\$\begingroup\$

You must include ALL bytes required to achieve desired output

This seems really cut and dry to me. You're not actually using 5 bytes for your solution. The 5 bytes in question are >LPT1 and I can assure you, those won't pass "Hello, World!" to my printer without any other intervention if I enter those into a batch terminal. I don't know much batch and I don't know Stuck, but I'd imagine you'd at least need stuck a>LPT1, which is 12 bytes. This is also ignoring the fact that a in this case still needs to actually be created (which if you used something like touch a would be another 7 bytes).

I believe this confusion comes from the fact you're using a REPL (which is allowed), so you're missing the fact that Stuck still has to be actually called, and needs enough information to still actually output "Hello, World!" so that output can actually ultimately reach the printer.

\$\endgroup\$

You must log in to answer this question.

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