Talk:Unnecessary

From Esolang

Jump to: navigation, search

"Every working program is the null program and a quine." Is this intended to be vacuously true (every purple banana is poisonous), as no program works, or is it supposed to imply that "working programs" (nonexistant files) output nothing? The given interpreter does produce output, and hence the latter isn't true. The former seems a bit counterintuitive given the rest of the page, but that could be the point :). --GregorR 21:48, 23 Aug 2005 (GMT)

If I remember correct my original version was "Every working program is a null quine." or something similiar, Graue has added modified that part. But anyways; the interpreter doesn't output any program stuff, it just reports what's happening, that is not because of the 'program file'.. ;) It's not necessary for a interpreter to report if the execution is completed, like mine does with "Program executed perfectly right!". The only report interpreter must do is the case when the program file is found; then it must report an error message and terminate. --User:Keymaker

[edit] Making Unecessary do something

On many operating systems, it's possible to recover the contents of a file after it's been deleted (as long as they haven't been overwritten). Might it not be a good idea for an Unnecessary interpreter to first check for this situation, and then do something based on the contents of the file before it was deleted? --User:ais523

[edit] Interpreter (Windows XP command prompt)

@ECHO OFF
IF EXIST %1 (
  ECHO ERROR 1>&2
  EXIT /B 1
)

Do you think it works? --Zzo38 20:33, 28 June 2008 (UTC)

Cool, thanks! Works perfectly as far as I can see. --Keymaker 23:50, 28 June 2008 (UTC)
Personal tools