I just looked at Should we disallow "capture the flag" puzzles where the user has to install software?

If the source code of the program is given as text in the question, is it acceptable to post these sorts of puzzle on the site? Users would then need to copy and paste the code, however they can see what they are copying before they run it.


At Programming Puzzles & Code Golf, where code golf puzzles revolve around providing code snippets and (ideally) making them safely runnable, users post their code on sites which can run the code in their own (sandboxed) environment - so users can read the code, and then go to the site where it's also hosted to "run it in their browser" and see what it does.
Example: https://tio.run/nexus

If code is an important part of a puzzle, and it's not better suited for PPCG, then I'd suggest the code be handled the same way PPCG does. This avoids leaving it to Puzzling users to download and run essentially random code of unknown provenance on their own systems—a practice I think we are very right to discourage.

  • $\begingroup$ Well...what is the puzzle is just a whitespace program and you need to run it? $\endgroup$ Feb 10 '17 at 0:05
  • $\begingroup$ @greenturtle3141 tio.run/nexus/whitespace ? I'm not sure I understand your question. If you mean the puzzle in its entirety is literally just a whitespace program, then I don't think that changes anything; you can still embed something meaningful in it to point someone that way, and once you can do that, you could mask a URL to a whitespace runner in it also $\endgroup$
    – Rubio Mod
    Feb 10 '17 at 0:06
  • $\begingroup$ It is possible that you could make the puzzle text a runnable Whitespace program, that when run, deletes System32 or something, no? $\endgroup$ Feb 10 '17 at 0:08
  • 2
    $\begingroup$ @greenturtle3141 Well yeah. I mean, I wouldn't run random code on my own system, ever, unless I could read and understand it and know what it is (or at least isn't) doing. Running on someone else's hosted system, though, sure - I'll do that. $\endgroup$
    – Rubio Mod
    Feb 10 '17 at 0:10

You must log in to answer this question.

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