<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Feast For Eyes</title>
	<atom:link href="http://www.feastforeyes.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.feastforeyes.com</link>
	<description>Solving Problems With Elegance</description>
	<lastBuildDate>Sun, 22 Aug 2010 23:03:17 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Installing Scala On Mac</title>
		<link>http://www.feastforeyes.com/2010/08/installing-scala-on-mac/</link>
		<comments>http://www.feastforeyes.com/2010/08/installing-scala-on-mac/#comments</comments>
		<pubDate>Sat, 21 Aug 2010 15:00:03 +0000</pubDate>
		<dc:creator>Evgeniy Sharapov</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[ad hoc]]></category>
		<category><![CDATA[scala]]></category>
		<category><![CDATA[sed]]></category>
		<category><![CDATA[shell]]></category>

		<guid isPermaLink="false">http://www.feastforeyes.com/?p=41</guid>
		<description><![CDATA[Yey, Scala 2.8 final is out there and it&#8217;s waiting for people to start using it. For those who have Mac OS X, install MacPorts, if you haven&#8217;t done it yet. This is a more or less usable way to obtain all-favourite tools from the Unix world on Mac. Yes, Mac is running on top [...]]]></description>
				<content:encoded><![CDATA[<p>Yey, <a href="http://www.scala-lang.org/node/7009">Scala 2.8</a> final is out there and it&#8217;s waiting for people to start using it. </p>
<p>For those who have Mac OS X, install <a href="http://www.macports.org/install.php">MacPorts</a>, if you haven&#8217;t done it yet. This is a more or less usable way to obtain all-favourite tools from the Unix world on Mac. Yes, Mac is running on top of the Unix already, but command line interface definitely could be better. </p>
<p>After one has installed <a href="http://www.macports.org/install.php">MacPorts</a></p>
<pre class="terminal">
$ sudo port install scala28
</pre>
<p>Here&#8217;s the main caveat &#8211; if you run</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">port install scala</div></div>
<p>you will get scala 2.7.7 which is not what we want. So, run</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">port install scala28</div></div>
<p>After that you will be left with </p>
<pre class="terminal">
$ ls /opt/local/bin/scala*
/opt/local/bin/scala-2.8    /opt/local/bin/scaladoc-2.8
/opt/local/bin/scalac-2.8   /opt/local/bin/scalap-2.8
</pre>
<p>which should be changed to normal executable names using next one liner </p>
<pre class="terminal">
/opt/local$ for n in $(ls /opt/local/bin/scala*); do sudo ln -s $n /usr/local/bin/$(echo $n | sed -n -e 's/.*\/\(.*\)-.*/\1/p'); done
Password:
</pre>
<p>Now one can run <a href="http://www.scala-lang.org/">Scala</a> with a simple</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">scala</div></div>
<p>command.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.feastforeyes.com/2010/08/installing-scala-on-mac/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Post Using iPhone</title>
		<link>http://www.feastforeyes.com/2010/08/post-using-iphone/</link>
		<comments>http://www.feastforeyes.com/2010/08/post-using-iphone/#comments</comments>
		<pubDate>Thu, 19 Aug 2010 06:00:57 +0000</pubDate>
		<dc:creator>Evgeniy Sharapov</dc:creator>
				<category><![CDATA[Daily]]></category>

		<guid isPermaLink="false">http://www.feastforeyes.com/2010/08/post-using-iphone/</guid>
		<description><![CDATA[Ok. This is a check if iPhone can do something useful. Photo is Santorini like looking building in monastery in Ocala, FL]]></description>
				<content:encoded><![CDATA[<p>Ok. This is a check if iPhone can do something useful.</p>
<p>Photo is Santorini like looking building in monastery in Ocala, FL</p>
<p><a href="http://www.feastforeyes.com/wp-content/uploads/2010/08/p_1600_1200_FC42613E-AECB-4177-BE19-36D3C2E0E8B9.jpeg"><img src="http://www.feastforeyes.com/wp-content/uploads/2010/08/p_1600_1200_FC42613E-AECB-4177-BE19-36D3C2E0E8B9.jpeg" alt="" class="alignnone size-full" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.feastforeyes.com/2010/08/post-using-iphone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ICFP 2010 Contest Continues</title>
		<link>http://www.feastforeyes.com/2010/06/icfp-2010-continues/</link>
		<comments>http://www.feastforeyes.com/2010/06/icfp-2010-continues/#comments</comments>
		<pubDate>Sat, 19 Jun 2010 07:59:00 +0000</pubDate>
		<dc:creator>Evgeniy Sharapov</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[icfp]]></category>

		<guid isPermaLink="false">http://www.feastforeyes.com/blog/?p=7</guid>
		<description><![CDATA[As I said I wanted to participate in ICFP contest for such a long time. Reading a memoirs  of contestants was akin to reading a thriller or an investigative novel of some sort. So, I was looking forward to this year. I guess lots of people will be complaining about organization, so everything below is [...]]]></description>
				<content:encoded><![CDATA[<p>As I said I wanted to participate in ICFP contest for such a long time. Reading a memoirs  of contestants was akin to reading a thriller or an investigative novel of some sort. So, I was looking forward to this year.</p>
<div class="note">I guess lots of people will be complaining about organization, so everything  below is not a complain, but rather couple thoughts I have got  so far.</div>
<p><span id="more-7"></span><br />
First and foremost <a href="http://icfpcontest.org/2010/task/">the task itself</a> is difficult to understand. I have read it multiple times, tried this and that with the organizers&#8217; server and the only functional part in the task is constructing <em>so called</em> circuits. That is the part <a href="http://icfpcontest.org/2010/task/#fuels">Fuels</a>. Everything else seems to be just a disguise or a decoy.</p>
<p>So far, one has to construct a logic circuit, that uses ternary logic instead of binary (aha, there was even computer on ternary logic -<a href="http://en.wikipedia.org/wiki/Setun"> Setun</a>). Circuits are written using following notation.</p>
<pre>

<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">19L:<br />
12R13R0#1R12R,<br />
14R0L0#4R9L,<br />
9R10R0#3L8L,<br />
2L17R0#5L9R,<br />
15R1L0#10R13R,<br />
3L18R0#6L15L,<br />
5L11R0#13L12L,<br />
19R16R0#11R8R,<br />
2R7R0#11L10L,<br />
1R3R0#18L2L,<br />
8R4L0#16L2R,<br />
8L7L0#15R6R,<br />
6R0R0#14L0L,<br />
6L4R0#14R0R,<br />
12L13L0#17L1L,<br />
5R11L0#16R4L,<br />
10L15L0#17R7R,<br />
14L16L0#18R3R,<br />
9L17L0#19R5R,<br />
X18L0#X7L:<br />
19L</div></div>

</pre>
<p>Based on description, I guess that in</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">19L : ... : 19L</div></div>
<p>19 is number of flip-flop elements ( well, flip-flop-flap, since it is ternary logic ), and every element has left (L) and right (R)  inputs and left (L) and right (R) outputs.</p>
<p>Every circuit seems to be a <a href="http://en.wikipedia.org/wiki/Counter">Counter</a>. Instead of bits, though, elements of the counter store trits (that is ternary bit &#8211; 0,1,2 instead of 0,1). And the signal is a sequence of trits as well.</p>
<p>Typical elements looks like</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">12R13R0#1R12R,</div></div>
<p>which I think reads  &#8220;this element has left input connected to 12th element&#8217;s right out and right input connected to 13th right out, has a state (or counter) set to 0 and its left out connected to 1st element&#8217;s right in, and right out to 12th right in&#8221;</p>
<p>Supposedly one needs to create a program that would generate these circuits and then submit these circuits as a fuel for cars.</p>
<p>So far I have constructed some, but all of them are rejected. Server says something along the lines &#8220;illegal prefix 20101020210 blah blah blah&#8221;. I think one should reverse engineer organizer&#8217;s circuit interpreter based on this outputs. Which is difficult. What doesn&#8217;t help is that they use ternary logic.</p>
<p>By the way, since I am using Python, these links came really handy:<br />
<a href="http://openbookproject.net/courses/intro2ict/logic/logic1.xhtml">Logic Circuits in Python &#8211; Part One</a><br />
<a href="http://openbookproject.net/courses/intro2ict/logic/logic2.xhtml">Logic Circuits in Python &#8211; Part Two</a></p>
<p>Also I think, it would be nice to have something like Parsec for Python in order to write your own circuit interpreter. I know that there&#8217;s pyparsing but it&#8217;s not as terse and flexible as Parsec.</p>
<p>I will try to get somewhere with all this but my hope and interest fades as fog in early morning.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.feastforeyes.com/2010/06/icfp-2010-continues/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ICFP Contest 2010 Started</title>
		<link>http://www.feastforeyes.com/2010/06/icfp-contest-2010-started/</link>
		<comments>http://www.feastforeyes.com/2010/06/icfp-contest-2010-started/#comments</comments>
		<pubDate>Fri, 18 Jun 2010 15:39:33 +0000</pubDate>
		<dc:creator>Evgeniy Sharapov</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[icfp]]></category>

		<guid isPermaLink="false">http://www.feastforeyes.com/blog/?p=5</guid>
		<description><![CDATA[Yehaw!!! ICFP Contest 2010 has started. I&#8217;ve always wanted to take part in it and there was always something on my way. Now, I am up to my neck in errands and problems to be solved, but I will try my best. My team is evgeniysharapov. So, let&#8217;s see what&#8217;s going to happen.]]></description>
				<content:encoded><![CDATA[<p>Yehaw!!! <a href="http://icfpcontest.org/2010">ICFP Contest 2010</a> has started. I&#8217;ve always wanted to take part in it and there was always something on my way. Now, I am up to my neck in errands and problems to be solved, but I will try my best.</p>
<p>My team is <strong>evgeniysharapov</strong>. So, let&#8217;s see what&#8217;s going to happen.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.feastforeyes.com/2010/06/icfp-contest-2010-started/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
