⚠️ Warning: This is a draft ⚠️
This means it might contain formatting issues, incorrect code, conceptual problems, or other severe issues.
If you want to help to improve and eventually enable this page, please fork RosettaGit's repository and open a merge request on GitHub.
I will note that while input has been defined, output has not, nor has the bounds of the input. Since the first implementation was in C, I would have expected a success/fail exit status to be the output, but apparently the output is meant to be the character '1' or '0' on stdout? Anyways, that said, I wanted to also point out that this I/O specification is heavily tailored to the C environment (or the unix environment, but unix and c were invented together), and is nearly nonsensical for other languages (such as SQL). And, from this, we can deduce that the input is probably meant to be terminated by end of file... --[[User:Rdm|Rdm]] 15:59, 22 September 2010 (UTC)
:I think that printing a literal "0" or "1" was probably the original intent, something like:
$ narcissist narcissist.src
$ narcissist some_other_file
:But I also think that perhaps the original definition is too restrictive; rather than ''specifically'' returning "0" or "1" or "accept" or "reject", I think it would be better to use whatever makes sense for the chosen language. For example, the ALGOL 68 example returns "T" or "F". -- [[User:Eriksiers|Erik Siers]] 16:41, 22 September 2010 (UTC)
:: Note that the above invocations seem to violate the specification (since they would require reading a file from disk instead of from standard input). A command line which would not violate the specification would probably look like this:
narcissist <narcissist.src --[[User:Rdm|Rdm]] 17:18, 22 September 2010 (UTC)
:::Yeah, thought of that, but :shrug:. Incidental to the output side, methinks. :-)
:::Anyway, I vote for loosening the task specification somewhat, in the manner I said above. -- [[User:Eriksiers|Erik Siers]] 17:46, 22 September 2010 (UTC)
Using the representation of the code in the file system or in memory, with $ARGV or equivalent, as done in the python solution, is cheating imho. It should be explicitly excluded in the instructions.--[[User:Grondilu|Grondilu]] 21:23, 17 October 2012 (UTC)