Standard loopholes only

-5

So, you're browsing Programming Puzzles & Code Golf, and you see a new challenge. The author (gasp) forgot to say "No standard Loopholes". You decide to take advantage of this situation, and you read the answer from a file/network. However, you need to make sure that your answer is actually shorter than the legitimate answers, so you golf it, too.

The Challenge

Write a complete program that prints out the contents of the file definitelynottheanswer.txt to STDOUT. This text file only contains valid ASCII characters. Alternatively, the program can get the file location from STDIN or command line args. The only input allowed is the file location if you choose to get the location from the user; otherwise, no input is allowed. There is no reward for getting the file location from the user, but the user input of the file location does not count against the byte total (in other words, definitelynottheanswer.txt wouldn't be included in the byte score).

The program must not write to STDERR.

Bonus

Retrieve the file from the internet instead of a file (the URL must be user-supplied). Reward: multiply source length by 0.85

Scoring

  • This is , so the lowest score,program length (bytes) * bonus, wins.
  • No (other) standard loopholes.
  • If the language does not support reading files from disk, it cannot be used (sorry).

Daniel M.

Posted 2015-10-09T02:52:03.903

Reputation: 3 737

Question was closed 2016-06-07T18:01:24.130

4So the task is... read a file? – Alex A. – 2015-10-09T02:57:48.183

No- it's "getting the solution from an external source" </s>. This idea sounded a lot better when I was writing it... – Daniel M. – 2015-10-09T03:00:16.387

I'll try writing my next one earlier than 11 pm – Daniel M. – 2015-10-09T03:02:53.650

4

I recommend using the Sandbox for future challenges. That way you can get feedback before the challenge is posted.

– Alex A. – 2015-10-09T03:04:02.437

2It should be noted that if a poster doesn't say "No standard loopholes" in their question, they are still forbidden by default unless the OP explicitly allows them. – mbomb007 – 2015-10-09T15:26:28.593

How many only use standard loopholes have their been in the past? It seems like there have been many – Beta Decay – 2015-10-09T16:58:38.670

@BetaDecay I searched it and there wasn't anything similar in the first few pages. – Daniel M. – 2015-10-09T17:04:31.710

I'm voting to close this question as off-topic because it is [tag:underhanded]. – Erik the Outgolfer – 2016-06-07T15:16:19.100

4I'm voting to close this question as off-topic because this is basically like code-trolling, but without the tag. – NoOneIsHere – 2016-06-07T16:39:15.203

Answers

14

GNU sed, 0 bytes

Even better..

a spaghetto

Posted 2015-10-09T02:52:03.903

Reputation: 10 647

4Right tool for the job. – Dennis – 2015-10-09T03:14:50.940

Well, this is the shortest it can go... – Daniel M. – 2015-10-09T03:15:13.473

@DanielM. No, you could make one that's so short it closes the console window, which would make it -1 bytes... not really – HyperNeutrino – 2017-01-12T21:30:40.887

2

Bash, 7 bytes * .85 = 5.9 bytes

curl $1

zzz

a spaghetto

Posted 2015-10-09T02:52:03.903

Reputation: 10 647

1

Pyth - 2 bytes * .85 = 1.7

'z

Does not work online.

Maltysen

Posted 2015-10-09T02:52:03.903

Reputation: 25 023

1

Bash, 6 bytes

cat $1

Provide filename as a command line argument. Probably breaks if the argument contains spaces or newlines or weird chars or whatever.

Doorknob

Posted 2015-10-09T02:52:03.903

Reputation: 68 138

1

CJam, 1.7 bytes

qg

For security reasons, this does not work in the online interpreter.

Dennis

Posted 2015-10-09T02:52:03.903

Reputation: 196 637