Contribute  :  Web Resources  :  Past Polls  :  Calendar  :  Advanced Search  :  Site Statistics  
    Kneuro.net Liberal/Libertarian/Development/Evolution    
 Welcome to Kneuro.net
 Tuesday, September 07 2010 @ 06:15 PM EDT

Quines

   

SoftwareI had a very interesting experience last night: just for the hell of it, I decided to try writing a quine (http://en.wikipedia.org/wiki/Quine) in Scheme. It took just a few minutes for me to think of a reasonable approach, and it worked the first time under DrScheme (http://www.plt-scheme.org/):

((lambda (x) (print `(,x ',x))) '(lambda (x) (print `(,x ',x))))

This week I've engaged in a silly thread about quining on comp.lang.forth (archived here http://groups.google.com/group/comp.lang.forth/browse_thread/thread/ba6fe1a735c3dca6/8bee19a004b7cbcd#8bee19a004b7cbcd), in which I argue pointlessly with another poster about the exact definition of "quine". I think what bothers my correspondent about my "context-specific" quines is that it is the context, rather than the quine itself, which contains the knowledge about how to reproduce the quine's source. My position was that that is true of all quines, to the extent that they depend on external tools (such as a runtime library) in order to run. However, in a "context-specific" quine, the self-referentiality is trivial, since it is built in to the runtime environment. The Scheme quine above does not share that characteristic, although it's hard to see exactly where the dividing line is.




What's Related

Story Options

Quines | 0 comments | Create New Account
The following comments are owned by whomever posted them. This site is not responsible for what they say.
 Copyright © 2010 Kneuro.net
 All trademarks and copyrights on this page are owned by their respective owners.
Powered By Geeklog 
Created this page in 0.20 seconds