<?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>thattommyhall.com &#187; haskell</title>
	<atom:link href="http://www.thattommyhall.com/category/haskell/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.thattommyhall.com</link>
	<description>A Random Walk Through Idea Space</description>
	<lastBuildDate>Sun, 08 Jan 2012 11:42:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Python talk for WYLUG, Ruby envy, Haskell Joy.</title>
		<link>http://www.thattommyhall.com/2007/12/27/python-talk-for-wylug-ruby-envy-haskell-joy/</link>
		<comments>http://www.thattommyhall.com/2007/12/27/python-talk-for-wylug-ruby-envy-haskell-joy/#comments</comments>
		<pubDate>Thu, 27 Dec 2007 12:05:38 +0000</pubDate>
		<dc:creator>tom</dc:creator>
				<category><![CDATA[haskell]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://www.thattommyhall.com/2007/12/27/python-talk-for-wylug-ruby-envy-haskell-joy/</guid>
		<description><![CDATA[I am just getting a talk ready for WYLUG on python. I sent Dave the following blurb: Why I love Python: A talk on the programming language Python, in 3 parts (feel free to leave in the interludes if you have had enough) Part 1: Past, Present, Future. A bit of history and the design [...]]]></description>
			<content:encoded><![CDATA[<p>I am just getting a talk ready for WYLUG on python.</p>
<p>I sent Dave the following blurb:</p>
<blockquote><p> Why I love Python:</p>
<p>A talk on the programming language Python, in 3 parts (feel free to<br />
leave in the interludes if you have had enough)</p>
<p>Part 1: Past, Present, Future.<br />
A bit of history and the design of the language, a look at all the<br />
implementations available today, quick tour of built-in and commonly<br />
used modules and future plans.</p>
<p>Part 2: Language overview<br />
A quick tour of the language: builtin types, control structures, using<br />
modules etc</p>
<p>Part 3: Recent Magic.<br />
Some relatively recent changes that make programming Python even more<br />
pleasurable.<br />
Decorators, Generators, List comprehensions, Iterators, Functools and<br />
anything else I can fit in.<br />
Again a whirlwind tour, but you should be impressed and want to read<br />
up on these some more</p></blockquote>
<p>I have been revisiting some of the Python talks I have watched over the last few years for ideas and will update my ComSci page with links.</p>
<p>I stumbled across some excellent video from RubyConf, particularly the <a href="http://rubyconf2007.confreaks.com/d2t1p3_rubinius.html" target="_blank">Rubinius</a> one. Rubinius is a ruby VM partially written in Ruby, taking some lessons from Python and Smalltalk. Some of the stuff he bigs up (compiling to bytecode automatically comes to mind) Python has had for ages, but the self hosting aspect is cool (not as cool as PyPy though). Rubinius seems to be doing what Avi Bryant suggested <a href="http://itc.conversationsnetwork.org/shows/detail3432.html" target="_blank">here,</a> learn from the Smalltalk guys and the <a href="http://research.sun.com/self/papers/papers.html" target="_blank">papers</a> from the Self team that Sun spun off and later bought back to do the hotspot VM for Java. Interesting times for dynamic languages, target the JVM, CLR, self host and generate code in other languages while always writing in the same fun language. I say Ruby envy only because I think the Ruby community does a better job of looking cool and exciting people than the Python one.</p>
<p>Now Haskell joy. After describing working through Yet Another Haskell Tutorial to the 2 friends doing it with me as &#8220;not an obviously pleasurable experience&#8221; I had a great moment on the train the other day looking at partial application.<br />
<code>(\y -&gt; y*3)</code><br />
is Haskell for the anonymous function  that takes y and multiplies it by 3 (I wish I had LaTeX here to draw the lamda calculus). What I like is that you can also write that as<br />
<code>(*3)</code><br />
While this example is trivial, what is happening is interesting. The compiler knows * is an infix operator that takes 2 arguments and that is has been supplied one and &#8220;partially applies&#8221; the function, making (*3) (a function that takes one argument). One more thing is changing prefix and infix operators around using ( _ ) and ` _ ` , for example:<br />
<code>3 * 5<br />
(*) 3 5<br />
</code><br />
<code>map (*2) [1,2,3]<br />
(*2) `map` [1,2,3]<br />
</code><br />
I hope this second example is clear, map usually is a prefix function that takes a function and a list and returns a list with the result of applying the function to each element (the return value here would be [2,4,6]). This flexibility is neat and is starting to make Haskell a joy to hack in.</p>
<p>Merry Christmas,</p>
<p class="facebook"><a href="http://www.facebook.com/share.php?u=http://www.thattommyhall.com/2007/12/27/python-talk-for-wylug-ruby-envy-haskell-joy/" target="_blank" title="Share on Facebook">Share on Facebook</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.thattommyhall.com/2007/12/27/python-talk-for-wylug-ruby-envy-haskell-joy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Faith, Evolution, and Programming Languages</title>
		<link>http://www.thattommyhall.com/2007/11/28/faith-evolution-and-programming-languages/</link>
		<comments>http://www.thattommyhall.com/2007/11/28/faith-evolution-and-programming-languages/#comments</comments>
		<pubDate>Wed, 28 Nov 2007 22:03:57 +0000</pubDate>
		<dc:creator>tom</dc:creator>
				<category><![CDATA[ComSci]]></category>
		<category><![CDATA[haskell]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://www.thattommyhall.com/2007/11/28/faith-evolution-and-programming-languages/</guid>
		<description><![CDATA[I just watched Faith, Evolution, and Programming Languages, a Google EngEDU video. It was by Philip Wadler, a chap who I had never heard of but who has done loads of cool things. He designed Haskell&#8217;s Type Classes and Java&#8217;s Generics, and is currently working on a bridge between strongly typed and dynamically typed languages. [...]]]></description>
			<content:encoded><![CDATA[<p>I just watched <a href="http://video.google.com/videoplay?docid=-4167170843018186532">Faith, Evolution, and Programming Languages</a>, a Google EngEDU video. It was by Philip Wadler, a chap who I had never heard of but who has done loads of cool things. He designed Haskell&#8217;s Type Classes and Java&#8217;s Generics, and is currently working on a bridge between strongly typed and dynamically typed languages. The talk starts off with a brief, fascinating  explanation of links (more properly isomorphisms) between logics and programming languages and makes the point that aliens may not create Java but certainly will create (discover?, I suppose it depends if you are a Platonist) the lambda calculus (calculi ?).</p>
<p>For about 20 mins towards the end I lost the plot and could not really follow his argument, but I will revisit it when I know a bit more. I am glad I hung on as the 10 minutes of discussion at the end were quite interesting and <a href="http://groups.inf.ed.ac.uk/links/" target="_blank">Links</a> (the recent work he did not have time to show the slides for, a web framework with every tier written in the same language) seemed very interesting.</p>
<p>For more on the language/logic link, see <a href="http://homepages.inf.ed.ac.uk/wadler/topics/history.html" target="_blank">here </a></p>
<p class="facebook"><a href="http://www.facebook.com/share.php?u=http://www.thattommyhall.com/2007/11/28/faith-evolution-and-programming-languages/" target="_blank" title="Share on Facebook">Share on Facebook</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.thattommyhall.com/2007/11/28/faith-evolution-and-programming-languages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why I am learning Haskell</title>
		<link>http://www.thattommyhall.com/2007/11/27/why-i-am-learning-haskell/</link>
		<comments>http://www.thattommyhall.com/2007/11/27/why-i-am-learning-haskell/#comments</comments>
		<pubDate>Tue, 27 Nov 2007 20:15:17 +0000</pubDate>
		<dc:creator>tom</dc:creator>
				<category><![CDATA[ComSci]]></category>
		<category><![CDATA[FP]]></category>
		<category><![CDATA[haskell]]></category>

		<guid isPermaLink="false">http://www.thattommyhall.com/2007/11/27/why-i-am-learning-haskell/</guid>
		<description><![CDATA[I saw Simon Peyton-Jones talk on Software Transactional Memory at OSCON and was amazed at how neat it sounded. Taking some ideas from databases to remove some of the pain of multithreaded programming is a great idea. His point that a thread-safe Dequeue is a post-doc publishable result convinced me that something is wrong with [...]]]></description>
			<content:encoded><![CDATA[<p>I saw Simon Peyton-Jones <a href="http://www.blip.tv/file/317758/" target="_blank">talk</a> on Software Transactional Memory at OSCON and was amazed at how neat it sounded. Taking some ideas from databases to remove some of the pain of multithreaded programming is a great idea. His point that a thread-safe Dequeue is a post-doc publishable result convinced me that something is wrong with the threading models in widespread use, while STM reduces it to an undergrad problem. The maping from the complexity of the problem domain to your code should be sane, if implementing a a simple structure like a dequeue using threads makes the code lots longer and requires a large amount of effort by someone with a doctorate, something is wrong. I love python, but multithreaded programs suffer (at least in the C implementation) because of the global interpretor lock (GIL). So I decided to learn Haskell.</p>
<p>There are (as far as I know) two ways of doing concurrency; shared state and message passing. STM is a neat syntax and smart compiler technology that ultimately uses shared state. See a Java or C# implementation <a href="http://www.cs.brown.edu/~mph/" target="_blank">here</a>.</p>
<p>Erlang is becoming increasingly popular and big successes with high availability at Ericsson are compelling real world examples of its use. It uses message passing concurrency and is a nice (mostly) functional language. I am happy with the choice of Haskell though, the syntax seems neat (because of my maths background) and the functional purity enforces functional thinking more than (say) Common Lisp or OCaml. There was a <a href="http://cgi.cse.unsw.edu.au/~dons/blog/2007/11/26#no-headaches" target="_blank">great post</a> today on Planet Haskell on concurrency options in Haskell and I am keen to explore them.</p>
<p>Maybe I will not hack in Haskell full time, but I think some of the ideas will go mainstream (already appearing in Linq and C# from Microsoft, who have bought in <a href="http://research.microsoft.com/~emeijer/" target="_blank">a lot</a> of <a href="http://research.microsoft.com/~simonpj/" target="_blank">talented folk</a> from the FP world ), but maybe I will.</p>
<p>It fits my mind well so far.</p>
<p class="facebook"><a href="http://www.facebook.com/share.php?u=http://www.thattommyhall.com/2007/11/27/why-i-am-learning-haskell/" target="_blank" title="Share on Facebook">Share on Facebook</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.thattommyhall.com/2007/11/27/why-i-am-learning-haskell/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mind Bending Stuff</title>
		<link>http://www.thattommyhall.com/2007/11/01/mind-bending-stuff/</link>
		<comments>http://www.thattommyhall.com/2007/11/01/mind-bending-stuff/#comments</comments>
		<pubDate>Thu, 01 Nov 2007 12:57:05 +0000</pubDate>
		<dc:creator>tom</dc:creator>
				<category><![CDATA[ComSci]]></category>
		<category><![CDATA[FP]]></category>
		<category><![CDATA[haskell]]></category>
		<category><![CDATA[OCaml]]></category>

		<guid isPermaLink="false">http://www.thattommyhall.com/?p=3</guid>
		<description><![CDATA[I am just getting my head around this (pdf) comment on the problem at the last ICFP Programming Contest , anyone who likes puzzles, compilers and reverse engineering should take a look, I am amazed by how rich this problem was. The ICFP do not specify what counts as &#8220;functional&#8221;, but OCaml and Haskell usually [...]]]></description>
			<content:encoded><![CDATA[<p>I am just getting my head around <a href="http://www.cs.uu.nl/research/techreps/repo/CS-2007/2007-029.pdf" target="_blank">this (pdf)</a> comment on the problem at the last <a href="http://www.icfpcontest.org/">ICFP Programming Contest</a> , anyone who likes puzzles, compilers and reverse engineering should take a look, I am amazed by how rich this problem was. The ICFP do not specify what counts as &#8220;functional&#8221;, but OCaml and Haskell usually do very well in the contest. This year a C++ team won it and a perl team came second, after lots of teams abandoned their functional languages. The authors make the point that data structure design/choice is very important (which we all should know I suppose), they recommend Data.sequence in Haskel and I think it is similar to a Rope (sort of tree based string representation that makes concatenation a snip, <a href="http://en.wikipedia.org/wiki/Rope_%28computer_science%29" target="_blank">wikipedia </a>is weak on it but <a href="http://www.rubyquiz.com/quiz137.html" target="_blank">Ruby Quiz</a> mentioned it a few weeks ago)</p>
<p class="facebook"><a href="http://www.facebook.com/share.php?u=http://www.thattommyhall.com/2007/11/01/mind-bending-stuff/" target="_blank" title="Share on Facebook">Share on Facebook</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.thattommyhall.com/2007/11/01/mind-bending-stuff/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

