<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.3" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: Rotonym, what the heck is a rotonym?</title>
	<link>http://www.willmcgugan.com/2008/01/22/rotonym-what-the-heck-is-a-rotonym/</link>
	<description>Blog of Will McGugan</description>
	<pubDate>Mon, 06 Oct 2008 17:57:09 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.3</generator>
		<item>
		<title>By: Corey</title>
		<link>http://www.willmcgugan.com/2008/01/22/rotonym-what-the-heck-is-a-rotonym/#comment-15122</link>
		<dc:creator>Corey</dc:creator>
		<pubDate>Thu, 24 Jan 2008 20:16:54 +0000</pubDate>
		<guid>http://www.willmcgugan.com/2008/01/22/rotonym-what-the-heck-is-a-rotonym/#comment-15122</guid>
		<description>Jeethu, the change to frozenset is superfluous in this case, it doesn't gain anything. However, all you've managed to do is add back the python-land conditional that Christian's example employed. Using the set intersection (&#38;) to sort out which ROTs are words is much more efficient.</description>
		<content:encoded><![CDATA[<p>Jeethu, the change to frozenset is superfluous in this case, it doesn&#8217;t gain anything. However, all you&#8217;ve managed to do is add back the python-land conditional that Christian&#8217;s example employed. Using the set intersection (&amp;) to sort out which ROTs are words is much more efficient.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeethu Rao</title>
		<link>http://www.willmcgugan.com/2008/01/22/rotonym-what-the-heck-is-a-rotonym/#comment-15070</link>
		<dc:creator>Jeethu Rao</dc:creator>
		<pubDate>Thu, 24 Jan 2008 05:10:14 +0000</pubDate>
		<guid>http://www.willmcgugan.com/2008/01/22/rotonym-what-the-heck-is-a-rotonym/#comment-15070</guid>
		<description>Something similar to Corey and Christian's solutions. The list of words could be a frozen set, because we don't have to mutate it. The 2nd list of rot13 words need not be a set, since we we just iterate over it. This is 2 or 3 lines long, depending on how you look at it :)

s = frozenset(x.strip() for x in open('WORD.LST','r'))
for w, rw in sorted([(x,x.encode('rot13')) for x in s if x.encode('rot13') in s],key=len,reverse=True) :     print '%s : %s'%(w.ljust(20),rw)</description>
		<content:encoded><![CDATA[<p>Something similar to Corey and Christian&#8217;s solutions. The list of words could be a frozen set, because we don&#8217;t have to mutate it. The 2nd list of rot13 words need not be a set, since we we just iterate over it. This is 2 or 3 lines long, depending on how you look at it :)</p>
<p>s = frozenset(x.strip() for x in open(&#8217;WORD.LST&#8217;,'r&#8217;))<br />
for w, rw in sorted([(x,x.encode(&#8217;rot13&#8242;)) for x in s if x.encode(&#8217;rot13&#8242;) in s],key=len,reverse=True) :     print &#8216;%s : %s&#8217;%(w.ljust(20),rw)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Magnus</title>
		<link>http://www.willmcgugan.com/2008/01/22/rotonym-what-the-heck-is-a-rotonym/#comment-15024</link>
		<dc:creator>Magnus</dc:creator>
		<pubDate>Wed, 23 Jan 2008 10:49:49 +0000</pubDate>
		<guid>http://www.willmcgugan.com/2008/01/22/rotonym-what-the-heck-is-a-rotonym/#comment-15024</guid>
		<description>An implementation in Haskell: http://therning.org/magnus/archives/337</description>
		<content:encoded><![CDATA[<p>An implementation in Haskell: <a href="http://therning.org/magnus/archives/337" rel="nofollow">http://therning.org/magnus/archives/337</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Christian Glodt</title>
		<link>http://www.willmcgugan.com/2008/01/22/rotonym-what-the-heck-is-a-rotonym/#comment-14998</link>
		<dc:creator>Christian Glodt</dc:creator>
		<pubDate>Tue, 22 Jan 2008 22:54:08 +0000</pubDate>
		<guid>http://www.willmcgugan.com/2008/01/22/rotonym-what-the-heck-is-a-rotonym/#comment-14998</guid>
		<description>I wrote "In conclusion, I &#60;3 (heart) list comprehensions!", but the everything after the &#60; didn't show up because WordPress took it for the beginning of an HTML tag. Sorry about that.

It is nice, every once in a while, to cram as much functionality as possible into the fewest lines of code imaginable.</description>
		<content:encoded><![CDATA[<p>I wrote &#8220;In conclusion, I &lt;3 (heart) list comprehensions!&#8221;, but the everything after the &lt; didn&#8217;t show up because WordPress took it for the beginning of an HTML tag. Sorry about that.</p>
<p>It is nice, every once in a while, to cram as much functionality as possible into the fewest lines of code imaginable.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: WokTiny</title>
		<link>http://www.willmcgugan.com/2008/01/22/rotonym-what-the-heck-is-a-rotonym/#comment-14991</link>
		<dc:creator>WokTiny</dc:creator>
		<pubDate>Tue, 22 Jan 2008 21:30:23 +0000</pubDate>
		<guid>http://www.willmcgugan.com/2008/01/22/rotonym-what-the-heck-is-a-rotonym/#comment-14991</guid>
		<description>It should be noted that it is only necessary to run half of the word list (A-M).
I like how Corey sorted by length, it does well to push the one and two letter matches down.

"I think the author invented the term, because the only reference I found to ‘rotonym’ came from his site."

I think I did, also; likely (found and named them) out of the same drive for interesting exercises that motivated you to code your own script to find them.</description>
		<content:encoded><![CDATA[<p>It should be noted that it is only necessary to run half of the word list (A-M).<br />
I like how Corey sorted by length, it does well to push the one and two letter matches down.</p>
<p>&#8220;I think the author invented the term, because the only reference I found to ‘rotonym’ came from his site.&#8221;</p>
<p>I think I did, also; likely (found and named them) out of the same drive for interesting exercises that motivated you to code your own script to find them.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Corey</title>
		<link>http://www.willmcgugan.com/2008/01/22/rotonym-what-the-heck-is-a-rotonym/#comment-14989</link>
		<dc:creator>Corey</dc:creator>
		<pubDate>Tue, 22 Jan 2008 21:10:52 +0000</pubDate>
		<guid>http://www.willmcgugan.com/2008/01/22/rotonym-what-the-heck-is-a-rotonym/#comment-14989</guid>
		<description>I was thinking something similar to Christian.

words = set([line.strip() for line in file('WORD.LST', 'r')])
rotwords = set([word.encode('rot13') for word in words]) &#38; words
for word in sorted(rotwords, key=len, reverse=True):
	print word.encode('rot13'), word

With sorted printing, and maximal work done by native code.</description>
		<content:encoded><![CDATA[<p>I was thinking something similar to Christian.</p>
<p>words = set([line.strip() for line in file(&#8217;WORD.LST&#8217;, &#8216;r&#8217;)])<br />
rotwords = set([word.encode(&#8217;rot13&#8242;) for word in words]) &amp; words<br />
for word in sorted(rotwords, key=len, reverse=True):<br />
	print word.encode(&#8217;rot13&#8242;), word</p>
<p>With sorted printing, and maximal work done by native code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: fa</title>
		<link>http://www.willmcgugan.com/2008/01/22/rotonym-what-the-heck-is-a-rotonym/#comment-14987</link>
		<dc:creator>fa</dc:creator>
		<pubDate>Tue, 22 Jan 2008 20:01:27 +0000</pubDate>
		<guid>http://www.willmcgugan.com/2008/01/22/rotonym-what-the-heck-is-a-rotonym/#comment-14987</guid>
		<description>Other languages?
here's the stuff in php:
http://stuff.art-core.org/code/rot.phps
http://stuff.art-core.org/code/rot.php</description>
		<content:encoded><![CDATA[<p>Other languages?<br />
here&#8217;s the stuff in php:<br />
<a href="http://stuff.art-core.org/code/rot.phps" rel="nofollow">http://stuff.art-core.org/code/rot.phps</a><br />
<a href="http://stuff.art-core.org/code/rot.php" rel="nofollow">http://stuff.art-core.org/code/rot.php</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Will</title>
		<link>http://www.willmcgugan.com/2008/01/22/rotonym-what-the-heck-is-a-rotonym/#comment-14984</link>
		<dc:creator>Will</dc:creator>
		<pubDate>Tue, 22 Jan 2008 18:23:21 +0000</pubDate>
		<guid>http://www.willmcgugan.com/2008/01/22/rotonym-what-the-heck-is-a-rotonym/#comment-14984</guid>
		<description>In conclusion you what?

Neat, but I also removed equivalent pairs and sorted the output by length of word.</description>
		<content:encoded><![CDATA[<p>In conclusion you what?</p>
<p>Neat, but I also removed equivalent pairs and sorted the output by length of word.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Christian Glodt</title>
		<link>http://www.willmcgugan.com/2008/01/22/rotonym-what-the-heck-is-a-rotonym/#comment-14983</link>
		<dc:creator>Christian Glodt</dc:creator>
		<pubDate>Tue, 22 Jan 2008 18:15:53 +0000</pubDate>
		<guid>http://www.willmcgugan.com/2008/01/22/rotonym-what-the-heck-is-a-rotonym/#comment-14983</guid>
		<description>Why so many loops and so many lines? :D

&#62;&#62;&#62; words = set([w.strip().decode('ascii', 'ignore') for w in file('/usr/share/dict/words')])
&#62;&#62;&#62; print [(w, w.encode('rot13')) for w in words if w.encode('rot13') in words]

First line reads the dictionary while ignoring unicode encoding errors (unfortunately necessary on my Ubuntu system). Second line gets the rotonyms (I don't like the duplicated encode() call in that line).

Favourite rotonyms from my dictionary:
Robyn - Ebola
sync - flap
rail - envy
one - bar
Green - Terra

In conclusion, I </description>
		<content:encoded><![CDATA[<p>Why so many loops and so many lines? :D</p>
<p>&gt;&gt;&gt; words = set([w.strip().decode(&#8217;ascii&#8217;, &#8216;ignore&#8217;) for w in file(&#8217;/usr/share/dict/words&#8217;)])<br />
&gt;&gt;&gt; print [(w, w.encode(&#8217;rot13&#8242;)) for w in words if w.encode(&#8217;rot13&#8242;) in words]</p>
<p>First line reads the dictionary while ignoring unicode encoding errors (unfortunately necessary on my Ubuntu system). Second line gets the rotonyms (I don&#8217;t like the duplicated encode() call in that line).</p>
<p>Favourite rotonyms from my dictionary:<br />
Robyn - Ebola<br />
sync - flap<br />
rail - envy<br />
one - bar<br />
Green - Terra</p>
<p>In conclusion, I</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Will</title>
		<link>http://www.willmcgugan.com/2008/01/22/rotonym-what-the-heck-is-a-rotonym/#comment-14980</link>
		<dc:creator>Will</dc:creator>
		<pubDate>Tue, 22 Jan 2008 17:07:57 +0000</pubDate>
		<guid>http://www.willmcgugan.com/2008/01/22/rotonym-what-the-heck-is-a-rotonym/#comment-14980</guid>
		<description>Ack. I had forgotten there was a rot13 encoding!</description>
		<content:encoded><![CDATA[<p>Ack. I had forgotten there was a rot13 encoding!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
