<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: polyglot programming</title>
	<atom:link href="http://www.haibane.info/2007/04/28/polyglot-programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.haibane.info/2007/04/28/polyglot-programming/</link>
	<description>a celebration of science fiction, anime, and geek culture</description>
	<pubDate>Tue, 06 Jan 2009 20:39:36 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.5</generator>
		<item>
		<title>By: fledgling otaku</title>
		<link>http://www.haibane.info/2007/04/28/polyglot-programming/#comment-982</link>
		<dc:creator>fledgling otaku</dc:creator>
		<pubDate>Sat, 28 Apr 2007 09:07:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.haibane.info/2007/04/28/polyglot-programming/#comment-982</guid>
		<description>Steven, that is called a _quine_ - check out "the original post":http://scienceblogs.com/goodmath/2007/04/true_pathology_a_multilingual.php and comments at Good Math, Bad Math for many more examples. There's even an entire programming language where "the only way to loop is to quine the program":http://scienceblogs.com/goodmath/2006/11/friday_pathological_programmin_5.php! Cool but esoteric :)

Here's &lt;a href="http://www.nyx.net/~gthompso/quine.htm" rel="nofollow"&gt;a link to quines&lt;/a&gt; in all the major programming languages. And here's a simple quine in C:

&lt;code&gt;#include&lt;stdio.h&gt;
main(){char*c="\\\"#include&lt;stdio.h&gt;%cmain(){char*c=%c%c%c%.102s%cn%c;
printf(c+2,c[102],c[1],*c,*c,c,*c,c[1]);exit(0);}\n";printf(c+2,c[102],c[1],*c,*c,c,*c,c[1]);exit(0);}&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Steven, that is called a _quine_ - check out &#8220;the original post&#8221;:http://scienceblogs.com/goodmath/2007/04/true_pathology_a_multilingual.php and comments at Good Math, Bad Math for many more examples. There&#8217;s even an entire programming language where &#8220;the only way to loop is to quine the program&#8221;:http://scienceblogs.com/goodmath/2006/11/friday_pathological_programmin_5.php! Cool but esoteric <img src='http://www.haibane.info/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Here&#8217;s <a href="http://www.nyx.net/~gthompso/quine.htm" rel="nofollow">a link to quines</a> in all the major programming languages. And here&#8217;s a simple quine in C:</p>
<p><code>#include<stdio .h><br />
main(){char*c=&#8221;\\\&#8221;#include</stdio><stdio .h>%cmain(){char*c=%c%c%c%.102s%cn%c;<br />
printf(c+2,c[102],c[1],*c,*c,c,*c,c[1]);exit(0);}\n&#8221;;printf(c+2,c[102],c[1],*c,*c,c,*c,c[1]);exit(0);}</stdio></code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steven Den Beste</title>
		<link>http://www.haibane.info/2007/04/28/polyglot-programming/#comment-981</link>
		<dc:creator>Steven Den Beste</dc:creator>
		<pubDate>Sat, 28 Apr 2007 09:01:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.haibane.info/2007/04/28/polyglot-programming/#comment-981</guid>
		<description>There was a C program I saw about 30 years ago which, when compiled and run, would print out its own source.

That's a hell of a lot tougher than it sounds. The trick in that case was careful (ab)use of macros.</description>
		<content:encoded><![CDATA[<p>There was a C program I saw about 30 years ago which, when compiled and run, would print out its own source.</p>
<p>That&#8217;s a hell of a lot tougher than it sounds. The trick in that case was careful (ab)use of macros.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.133 seconds -->
