<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>ByteLabs</title>
    <link>http://blog.solaris.bytelabs.org</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>additions to a vast pool of entropy by Igor and Ines</description>
    <item>
      <title>Existential Datatypes</title>
      <description>&lt;p&gt;A nice &lt;a href="http://okmij.org/ftp/Computation/Existentials.html"&gt;article&lt;/a&gt; by Oleg Kiselyov about &lt;a href="http://okmij.org/ftp/Computation/Existentials.html"&gt;Existential Datatypes&lt;/a&gt;. Enjoy!&lt;/p&gt;</description>
      <pubDate>Thu, 11 Sep 2008 01:38:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:9827b27b-5918-4821-ba24-38b7aa99b518</guid>
      <author>igor</author>
      <link>http://blog.solaris.bytelabs.org/articles/2008/09/11/existential-datatypers</link>
      <category>Hacking and Computers</category>
    </item>
    <item>
      <title>foldl.com - foldr.com</title>
      <description>If you are functional programmer you surely have used &lt;a href="http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#v%3Afoldr"&gt;foldr&lt;/a&gt; or &lt;a href="http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#v%3Afoldl"&gt;foldl&lt;/a&gt; before. By accident I found out that &lt;a href="http://osteele.com/"&gt;Oliver Steele&lt;/a&gt; registered the following domains:
	&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://foldl.com/"&gt;http://foldl.com/&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://foldr.com/"&gt;http://foldr.com/&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;:-)&lt;/p&gt;</description>
      <pubDate>Thu, 21 Aug 2008 21:44:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:01aad929-bab3-4159-80e1-4b19931fe388</guid>
      <author>igor</author>
      <link>http://blog.solaris.bytelabs.org/articles/2008/08/21/foldl-com-foldr-com</link>
      <category>Fun Stuff</category>
      <category>Hacking and Computers</category>
    </item>
    <item>
      <title>George Orwell and Others Online</title>
      <description>&lt;p&gt;Under Australian copyright laws, copyright in literary works of authors, who died before 1955, has expired. These works are now within the &#8216;public domain&#8217; in Australia and this is why the &lt;a href="http://www.adelaide.edu.au/"&gt;University of Adelaide&lt;/a&gt; is able to reproduce such works on the world wide web. Here go some of my favourites:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://ebooks.adelaide.edu.au/o/orwell/george/"&gt;George Orwell&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://ebooks.adelaide.edu.au/d/darwin/charles/"&gt;Charles Darwin&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://ebooks.adelaide.edu.au/k/kant/immanuel/"&gt;Immanuel Kant&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://ebooks.adelaide.edu.au/k/kafka/franz/"&gt;Franz Kafka&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://ebooks.adelaide.edu.au/k/kafka/franz/"&gt;Leo Tolstoy&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://ebooks.adelaide.edu.au/d/dostoyevsky/"&gt;Fyodor Dostoyevsky&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://ebooks.adelaide.edu.au/meta/authors.html"&gt;many more&amp;#8230;.&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;</description>
      <pubDate>Mon, 11 Aug 2008 14:12:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:6d265eaa-760d-4f7f-a166-ba6c1cd45d5a</guid>
      <author>igor</author>
      <link>http://blog.solaris.bytelabs.org/articles/2008/08/11/george-orwell-and-others-online</link>
      <category>Everyday Life</category>
      <category>Fun Stuff</category>
    </item>
    <item>
      <title>War in Georgia</title>
      <description>&lt;p&gt;&amp;#8220;Long-escalating tensions between Russia and the former Soviet republic of Georgia erupted into full-scale war Friday, leaving hundreds if not thousands of civilians dead and turning thousands more into refugees, forced to flee for their lives.&amp;#8221; &lt;a href="http://www.wsws.org/articles/2008/aug2008/ruge-a09.shtml"&gt;[1]&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;It seems Georgia is another proxy state supported by the US to expand its imperialist plans. Everyone who knows a bit of history should not be surprised by what is going on. Mass media &amp;#8211; as usual &amp;#8211; doesn&amp;#8217;t give the appropriate context in order to understand the conflict. But if you are looking for the truth, you can find it.&lt;/p&gt;


	&lt;p&gt;I would like to direct your attention to &lt;a href="http://en.wikipedia.org/wiki/Bill_Van_Auken"&gt;Bill Van Auken&amp;#8217;s&lt;/a&gt; article &lt;a href="http://www.wsws.org/articles/2008/aug2008/ruge-a09.shtml"&gt;US-Russian tensions in Caucasus erupt into war&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;Here is a &lt;a href="http://www.lonelyplanet.com/maps/europe/georgia/"&gt;map&lt;/a&gt; of Georgia which might be useful in combination with the article, and further background reading:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://www.wsws.org/articles/2008/jul2008/russ-j14.shtml"&gt;Further escalation of tensions in the Caucasus between Russia and Georgia&lt;/a&gt; &lt;/li&gt;
		&lt;li&gt;&lt;a href="http://www.wsws.org/articles/2008/jul2008/miss-j18.shtml"&gt;The missile defense scheme and the sharpening of US-Russian geopolitical tensions&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://www.wsws.org/articles/2008/may2008/geog-m10.shtml"&gt;Russia and Georgia on the brink of armed conflict over Abkhazia&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://en.wikipedia.org/wiki/Georgia_(country)#Economy"&gt;Economy in Georgia&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;</description>
      <pubDate>Sun, 10 Aug 2008 14:41:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:2e483a17-e626-4fcb-8cc8-68fec2e2835e</guid>
      <author>igor</author>
      <link>http://blog.solaris.bytelabs.org/articles/2008/08/10/war-in-georgia</link>
      <category>Opinions</category>
    </item>
    <item>
      <title>Complexity of Type Reconstruction</title>
      <description>&lt;p&gt;Again I would like to draw an interesting example from Benjamin Pierce&amp;#8217;s book &lt;a href="http://www.cis.upenn.edu/~bcpierce/tapl/index.html"&gt;Types and Programming Languages&lt;/a&gt; that is originally due to &lt;a href="http://portal.acm.org/citation.cfm?id=101856.101870"&gt;Kfoury, Tiuryn, and Urzyczyn&lt;/a&gt;. The following Haskell program is well typed but takes a very long time to typecheck:&lt;/p&gt;


&lt;code&gt;&lt;pre&gt;module Main (main) where
main =
 let f0 = \x -&amp;gt; (x,x)
     f1 = \y -&amp;gt; f0 (f0 y)
     f2 = \y -&amp;gt; f1 (f1 y)
     f3 = \y -&amp;gt; f2 (f2 y)
     f4 = \y -&amp;gt; f3 (f3 y)
     f5 = \y -&amp;gt; f4 (f4 y)
 in
 f5 (\z -&amp;gt; z)
&lt;/pre&gt;&lt;/code&gt;
It has long been believed that type-checking programs in languages that allow for let-polymorphism appears to be &amp;#8220;essentially linear&amp;#8221; in the size of the input program. It therefore came as a surprise that its worst-case complexity is still exponential as the above example demonstrates ;-)</description>
      <pubDate>Sun, 10 Aug 2008 13:17:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:0a23a4c6-8110-477a-9f3c-e855ddb592eb</guid>
      <author>igor</author>
      <link>http://blog.solaris.bytelabs.org/articles/2008/08/10/complexity-of-type-reconstruction</link>
      <category>Fun Stuff</category>
      <category>Hacking and Computers</category>
    </item>
    <item>
      <title>Playing with Rank-N Types</title>
      <description>The following shows some dummy Haskell example code that demonstrates the usage of rank-n types:
&lt;pre&gt;&lt;code&gt;{-# LANGUAGE RankNTypes #-}
module Main (main) where
-- g1: identity function
-- GHC implicitely quantifies it to: forall a. a -&amp;gt; a
g1 :: a -&amp;gt; a
g1 x = x
-- g2: Rank2Type
g2 :: (forall a. a -&amp;gt; a) -&amp;gt; (Bool, Char)
g2 f = (f True, f 'a')
-- g3: Rank3Type
g3 :: ((forall a. a -&amp;gt; a) -&amp;gt; (Bool, Char)) -&amp;gt; (Char, Bool)
g3 f = (\x -&amp;gt; (snd x, fst x)) (f g1)
-- g4: Rank4Type
g4 :: (((forall a. a -&amp;gt; a) -&amp;gt; (Bool, Char)) -&amp;gt; (Char, Bool)) -&amp;gt;
         (Bool, Char)
g4 f = (\x -&amp;gt; (snd x, fst x)) (f g2)

main :: IO ()
main = do
  putStrLn "Rank-2 Example:" 
  putStrLn . show . fst . g2 $ g1
  putStrLn . show . snd . g2 $ g1
  putStrLn "Rank-3 Example:" 
  putStrLn . show . fst . g3 $ g2
  putStrLn . show . snd . g3 $ g2
  putStrLn "Rank-4 Example:" 
  putStrLn . show . fst . g4 $ g3
  putStrLn . show . snd . g4 $ g3
&lt;/code&gt;&lt;/pre&gt;

 If you want to see more &amp;#8216;useful&amp;#8217; examples have a look at the paper &lt;a href="http://research.microsoft.com/~simonpj/papers/higher-rank/putting.pdf"&gt;Practical Type Inference for Arbitrary-Rank Types&lt;/a&gt;.</description>
      <pubDate>Sun, 10 Aug 2008 12:51:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:488c2a29-77c7-4c9f-8e1e-e7a1843f8766</guid>
      <author>igor</author>
      <link>http://blog.solaris.bytelabs.org/articles/2008/08/10/playing-with-rank-n-types</link>
      <category>Hacking and Computers</category>
      <category>Haskell</category>
      <category>Types</category>
    </item>
    <item>
      <title>Predicative vs. Impredicative Polymorphism and Type Reconstruction</title>
      <description>&lt;p&gt;The polymorphism of &lt;a href="http://en.wikipedia.org/wiki/System_F"&gt;System F&lt;/a&gt; is often called &lt;strong&gt;impredicative&lt;/strong&gt;. A definition is called &lt;strong&gt;impredicative&lt;/strong&gt; if it involves a quantifier whose domain includes the very thing being defined. For example in &lt;a href="http://en.wikipedia.org/wiki/System_F"&gt;System F&lt;/a&gt;, the type variable X in the type T = &amp;forall;X. X &amp;rarr; X ranges over all types, including T itself (so that, for example, we can instantiate a term of type T at type T, yielding a function from T to T).[6]&lt;/p&gt;


	&lt;p&gt;The polymorphism found in ML is called &lt;strong&gt;predicative&lt;/strong&gt;, because the range of type variables is restricted to monotypes (i.e. quantifier-free types), which do not contain quantifiers.&lt;/p&gt;


	&lt;p&gt;When talking about type reconstruction the previous definitions are important. There is a growing &amp;#8220;[...] need for ever more expressive type system features, 
most of which threaten the decidability and practicality of Damas-Milner type inference.  One such feature is the ability to write functions with higher-rank types&#8212;that is, functions  that take polymorphic functions as their arguments.&amp;#8221;[1]&lt;/p&gt;


	&lt;p&gt;Complete type inference is known to be undecidable for higher-rank (impredicative) 
type systems. This post serves as a reference for type reconstruction in the presence of polymorphism in higher-rank type systems.&lt;/p&gt;


	&lt;p&gt;[1] &lt;a href="http://research.microsoft.com/~simonpj/papers/higher-rank/putting.pdf"&gt;Practical type inference for arbitrary-rank types&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;[2] &lt;a href="http://en.wikibooks.org/wiki/Haskell/Polymorphism"&gt;Haskell/Polymorphism&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;[3] &lt;a href="http://docforge.com/wiki/Type_polymorphism#Rank_Restrictions"&gt;Type Polymorphism &amp;#8211; DocForge&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;[4] &lt;a href="http://en.wikipedia.org/wiki/Polymorphism_(computer_science"&gt;Type Polymorphism -Wikipedia&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;[5] &lt;a href="http://en.wikipedia.org/wiki/System_F"&gt;System F &amp;#8211; Polymorphic/Second-Order Lambda Calculus&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;[6] &lt;a href="http://www.cis.upenn.edu/~bcpierce/tapl/index.html"&gt;Types and Programming Languages&lt;/a&gt; [p.360]&lt;/p&gt;</description>
      <pubDate>Sun, 10 Aug 2008 11:29:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:f5ccb877-e3c8-4aa9-9c13-50fb50320f5a</guid>
      <author>igor</author>
      <link>http://blog.solaris.bytelabs.org/articles/2008/08/10/predicative-vs-impredicative-polymorphism-and-type-reconstruction</link>
      <category>Hacking and Computers</category>
      <category>Types</category>
    </item>
    <item>
      <title>Mac OS X Leopard - GHC workaround for missing '_environ' symbol</title>
      <description>&lt;p&gt;If you managed to compile the latest darcs version of &lt;span class="caps"&gt;GHC&lt;/span&gt; (6.9.20080720 in my case) on Mac &lt;span class="caps"&gt;OS X&lt;/span&gt; Leopard, then there is a good chance that you ran into the &lt;a href="http://www.haskell.org/pipermail/glasgow-haskell-users/2007-December/013690.html"&gt;following problem&lt;/a&gt;. I have opened a &lt;a href="http://hackage.haskell.org/trac/ghc/ticket/2458"&gt;ticket&lt;/a&gt; with a &lt;a href="http://hackage.haskell.org/trac/ghc/ticket/2458"&gt;solution&lt;/a&gt; proposal.&lt;/p&gt;


	&lt;p&gt;It&amp;#8217;s not the cleanest solution but it works. Good luck!&lt;/p&gt;</description>
      <pubDate>Mon, 21 Jul 2008 16:01:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:38faf3ed-5a9d-4e8a-9c1c-3140e82b8bb3</guid>
      <author>igor</author>
      <link>http://blog.solaris.bytelabs.org/articles/2008/07/21/mac-os-x-leopard-ghc-workaround-for-missing-_environ-symbol</link>
      <category>Hacking and Computers</category>
    </item>
    <item>
      <title>Howard Zinn about Nationalism</title>
      <description>&lt;p&gt;I would like to point out the &lt;a href="http://www.alternet.org/story/55822/?comments=view&amp;#38;cID=689374&amp;#38;pID=689338"&gt;following article&lt;/a&gt; by Howard Zinn published a while ago on &lt;a href="http://www.alternet.org"&gt;www.alternet.org&lt;/a&gt;. Although it has been a year since it was published the topic is still current and deserves attention.&lt;/p&gt;</description>
      <pubDate>Fri, 18 Jul 2008 10:47:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:7775ad90-4134-4542-a07d-c21f83cb916b</guid>
      <author>igor</author>
      <link>http://blog.solaris.bytelabs.org/articles/2008/07/18/howard-zinn-about-nationalism</link>
      <category>Opinions</category>
    </item>
    <item>
      <title>American Dream</title>
      <description>&lt;p&gt;There is new movie coming out called the &lt;a href="http://www.americandreamthemovie.com"&gt;American Dream&lt;/a&gt;. It looks very interesting and features interviews with people like &lt;a href="http://howardzinn.org"&gt;Howard Zinn&lt;/a&gt; and &lt;a href="http://en.wikipedia.org/wiki/Danny_Glover"&gt;Danny Glover&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;The &lt;a href="http://www.americandreamthemovie.com"&gt;movie webpage&lt;/a&gt; also features a very interesting trailer and teaser as well as a quite shocking &amp;#8216;Facts&amp;#8217; page.&lt;/p&gt;</description>
      <pubDate>Sun, 06 Jul 2008 17:53:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:b33afd96-87e2-457c-b120-73deb532ec87</guid>
      <author>igor</author>
      <link>http://blog.solaris.bytelabs.org/articles/2008/07/06/american-dream</link>
      <category>Opinions</category>
      <category>Cinema</category>
    </item>
  </channel>
</rss>
