Talk:Quine: Difference between revisions

(a C (cheating?) quine imitating forth in a compiled fashion but runtime output produces a real quine...)
Line 50:
 
::: From a "functional" point of view, this works the same way of forth (and maybe others), by accessing the text of the source stored in memory (not by loading it at runtime...); since C is compiled, the binary holds no the source (compiler at least once loaded the source in memory, but compiled binary can't see its past...), and I had to include it manually... (Hm, one could work harder on debug informations and ELF maybe, and write a more forth-like quine accessing at runtime the "segment" where the whole source code, stored by the compiler itself this time, is and print it...)... Is this a honest quine or really cheating? (Interesting question to me:D) --[[User:ShinTakezou|ShinTakezou]] 00:54, 31 March 2009 (UTC)
 
== Second scheme example correct? ==
 
I have some doubt about the correctness of the second scheme example. It only works when entered into an interpreter. When compiled there will be no output. The reason for this is that the expression evaluates to a result which is identical to the original expression. However, I realise that this is not the same as simply entering a constant expression like <code>0</code>, which will evaluate to itself. When the given expression is evaluated, the lambda function will be applied to the argument that follows, resulting in an expression that is identical to the original expression. The problem description states that the program must output its own source. The given example doesn't produce any output by itself (generated by <code>display</code> in scheme). How should we handle this?
Anonymous user