Make the longest cat program

-5

There's been challenges for the shortest cat program, but as far as I know, there hasn't been any for the longest one.

A cat program is a program that copies its input to its output. Here's an example:

Input: Hello
Output: Hello

Input: cat
Output: cat

So, the rules are simple:

  • The program has to copy its input to its output
  • No loopholes allowed.
  • This is code-bowling, so the longest code wins.

Also, I'm quite new here, so if you don't like this challenge, then please do tell me why so I'll be able to make better ones later!

m654

Posted 2016-05-15T08:13:16.383

Reputation: 765

Question was closed 2016-05-15T11:04:41.173

1

The problem with [tag:code-bowling] challenges in general is that a simple "longest code wins" is usually not that useful. People can always throw in arbitrary things to make the code as long as they want, or use languages like Unary for obscene byte counts.

– Sp3000 – 2016-05-15T08:18:31.223

@Sp3000 Should I add a new rule against "arbitrary things"? Not sure how that's going to work out though. – m654 – 2016-05-15T08:24:26.457

3You can try, but you'd have to have a good definition of what's not allowed. For example, "no comments" wouldn't work because someone could just do a += 1; a -= 1, which you can try to patch with "no no-ops" but then someone would just make the code count to a massive number, one increment at a time, and only execute the cat program at the end if the counter's at the right number. (Long story short: I don't think this challenge will work well, unfortunately...) – Sp3000 – 2016-05-15T08:40:11.820

@m654 I suggest first using the sandbox before posting challenges.

– flawr – 2016-05-15T08:46:26.960

@flawr Oh, I didn't know there was one :P Thanks for the info! – m654 – 2016-05-15T08:48:37.350

Answers

2

Brachylog, theoretically infinite

.............................................................................................

You can add as many periods as you like.

The first period will unify the output with the input. The second period will unify the output with the output (which is always true), the third period will unify the output with the output, etc.

Fatalize

Posted 2016-05-15T08:13:16.383

Reputation: 32 976

0

Lenguage, 23855 bytes

Program: Any file that is 23855 bytes long

Based off the brainfuck cat program on an interpreter returns 0 on EOF:

,[.,]

ASCII-only

Posted 2016-05-15T08:13:16.383

Reputation: 4 687