<?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>HCoder.org &#187; haskell</title>
	<atom:link href="http://hcoder.org/tag/haskell/feed/" rel="self" type="application/rss+xml" />
	<link>http://hcoder.org</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Sun, 15 Apr 2012 21:43:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>The quest to learn a new programming language</title>
		<link>http://hcoder.org/2011/03/20/the-quest-to-learn-a-new-programming-language/</link>
		<comments>http://hcoder.org/2011/03/20/the-quest-to-learn-a-new-programming-language/#comments</comments>
		<pubDate>Sun, 20 Mar 2011 12:40:37 +0000</pubDate>
		<dc:creator>emanchado</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[functional]]></category>
		<category><![CDATA[go]]></category>
		<category><![CDATA[haskell]]></category>
		<category><![CDATA[languages]]></category>
		<category><![CDATA[lisp]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[scala]]></category>

		<guid isPermaLink="false">http://hcoder.org/?p=887</guid>
		<description><![CDATA[Some time ago I realised I wasn&#8217;t all that excited about any programming language. All the languages I knew were, for some reason or another, annoying and I didn&#8217;t really feel like having any pet projects. That, combined with the idea that learning new stuff is good, pushed me to try and learn some new [...]]]></description>
			<content:encoded><![CDATA[<p>Some time ago I realised I wasn&#8217;t all that excited about any programming language. All the languages I knew were, for some reason or another, annoying and I didn&#8217;t really feel like having any pet projects. That, combined with the idea that learning new stuff is good, pushed me to try and learn some new programming language.</p>
<p>Choosing one was actually kind of a problem: it had to be &#8220;mainstream&#8221; enough that it wouldn&#8217;t just be a theoretical exercise (I wanted to use it to write actual code, not just to learn it) and yet different enough to what I was used to. It also had to be &#8220;stable&#8221; enough that I didn&#8217;t have to install it from sources or follow the development of the compiler/interpreter. That didn&#8217;t really leave me a lot of options, I thought. The only ones I could think of, really, were Haskell, Go, Lisp and Scala.</p>
<p><strong>Haskell</strong> I had tried to learn, and I more or less failed. I did learn the basics and I tried to start writing a Sudoku solver with it, but I got demoralised quite quickly. I felt it was a bit too exotic for actual work, and it was a bit of a downer that it took me <em>so long</em> to write some simple unit tests for some basic code I started to write (I couldn&#8217;t get my head around the type system and I was fighting with something really silly for many hours). <strong>Go</strong>, well, I didn&#8217;t even start learning because the <a href="http://golang.org/doc/install.html">Go installation instructions</a> totally freaked me out. Not that I didn&#8217;t <em>understand</em> them, but the idea of fetching the sources of the compiler just to learn a programming language turned me off. And don&#8217;t get me started with the name of the compiler (dependent on the architecture, no less!), the separate linking step or the 90s-style &#8220;.out&#8221; file name for the binaries. So that left me with Lisp and Scala.</p>
<p><strong>Lisp</strong>, I did know a bit. I had learned some basic Lisp at the university, and liked it quite a bit back then. I had also read part of the excellent &#8220;<a href="http://www.paulgraham.com/onlisp.html">On Lisp</a>&#8221; and I thought it was really cool. I still had my doubts <em>I</em> could use for actual work, but I was willing to give it a try. So I borrowed the (also excellent) book &#8220;<a href="http://oreilly.com/catalog/9781593272814">Land of Lisp</a>&#8221; from a friend and started reading, trying to learn a bit. The process wasn&#8217;t too bad, but I had the increasing feeling that in the end it would be too exotic for me, and I found the syntax too annoying. I was learning some practical Lisp, but it was taking really long to learn interesting things. And when those interesting things came, I felt they were too obscure for me, and I needed a lot of thinking to even understand the examples. But I decided to give it a try anyway, and I went ahead and tried to write some simple code to use some web service (the final goal was to write some example code for the <a href="http://dev.opera.com/articles/view/introducing-the-opera-link-api/">Link API</a>). In this case, the deal breaker was that the OAuth library I found depended on an <em>obscene</em> number of Lisp packages, many of which were recommended to be downloaded directly from <a href="https://github.com/">GitHub</a> (srsly? <em>fuck this shit</em>).</p>
<p>That left me with <strong>Scala</strong>. I had mixed feelings about it. At a first glance it looked interesting, but it was compiled, related to Java and more or less centred on concurrency. I tried to learn Scala by reading &#8220;<a href="http://programming-scala.labs.oreilly.com/">Programming Scala</a>&#8220;, which turned out to be more fun and productive than I had anticipated. I&#8217;m considering buying the &#8220;dead tree&#8221; version, but I have so many books to read that I don&#8217;t know <em>when</em> I&#8217;ll do that. So, what did I like about Scala so much? It made me feel like when I learned Ruby: it had fairly powerful features (pattern matching, traits, type inference, others I forget about) but with a readable, easy to understand syntax. It&#8217;s like the Robin Hood of programming languages, stealing features only available in impossible-to-understand languages, and bringing them to the masses. It also felt good <em>liking</em> a statically typed language, I didn&#8217;t think that was possible for me anymore :-)</p>
<p>But enough for now. Some other day I&#8217;ll write some more details about Scala and about my pet project <a href="https://github.com/emanchado/Flickr-Memories">FlickrMemories</a>.</p>
 <p><a href="http://hcoder.org/?flattrss_redirect&amp;id=887&amp;md5=c24c0a0269c27d79f37b471300d939ff" title="Flattr" target="_blank"><img src="http://hcoder.org/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://hcoder.org/2011/03/20/the-quest-to-learn-a-new-programming-language/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=30124&amp;popout=1&amp;url=http%3A%2F%2Fhcoder.org%2F2011%2F03%2F20%2Fthe-quest-to-learn-a-new-programming-language%2F&amp;language=en_GB&amp;category=text&amp;title=The+quest+to+learn+a+new+programming+language&amp;description=Some+time+ago+I+realised+I+wasn%26%238217%3Bt+all+that+excited+about+any+programming+language.+All+the+languages+I+knew+were%2C+for+some+reason+or+another%2C+annoying+and+I+didn%26%238217%3Bt+really...&amp;tags=functional%2Cgo%2Chaskell%2Clanguages%2Clisp%2Cprogramming%2Cscala%2Cblog" type="text/html" />
	</item>
		<item>
		<title>Recent pet projects + Git + Github</title>
		<link>http://hcoder.org/2009/04/06/recent-pet-projects-git-github/</link>
		<comments>http://hcoder.org/2009/04/06/recent-pet-projects-git-github/#comments</comments>
		<pubDate>Mon, 06 Apr 2009 22:21:00 +0000</pubDate>
		<dc:creator>emanchado</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[darcs]]></category>
		<category><![CDATA[demisus]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[haskell]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[kiva]]></category>
		<category><![CDATA[loanmeter]]></category>
		<category><![CDATA[opera]]></category>
		<category><![CDATA[sudoku]]></category>
		<category><![CDATA[widget]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[I had mentioned that I was learning Javascript to write a Kiva Opera widget. Some time ago I released the first version of my World Loanmeter widget, and I have uploaded two more since. Not much has happened between the first and the third release from the user POV, but a couple of things were [...]]]></description>
			<content:encoded><![CDATA[<p>I had mentioned that I was <a href="http://hcoder.org/2009/02/26/kiva-api-javascript-git-and-my-first-widget-oh-my">learning Javascript to write a Kiva Opera widget</a>. Some time ago I released the first version of my <a href="http://widgets.opera.com/widget/12102/">World Loanmeter</a> widget, and I have uploaded two more since. Not much has happened between the first and the third release from the user <span class="caps">POV</span>, but a couple of things were interesting when developing it:</p>
<ul>
<li>I learned <a href="http://docs.jquery.com/QUnit">QUnit</a>, which I used to write <a href="http://github.com/emanchado/world-loanmeter/blob/31d34707728a1f7d5813a57de4d3b8caf10750ce/test/unittest.html">some really useful unit tests</a>. It&#8217;s quite nice to be able to write Javascript unit tests easily.</li>
<li>I made some <a href="http://github.com/emanchado/world-loanmeter/commit/425a4a854bc074c825b6f15546235958977da1d5">heavy refactoring</a> (see above) which made me learn some more Javascript <em>and</em> made the code much more flexible, so now the widget is not limited to a single Kiva <span class="caps">API</span> page of results, but to as many pages as needed to fetch whatever number of loans the user wants. Not to mention that the data source need not be a <span class="caps">URL</span>.</li>
<li>Now the widget actually has some configuration. Namely, the number of loans to show in the map. It also stores it persistently using the <a href="http://dev.opera.com/articles/view/opera-widgets-preference-store/">preference store</a>, which is quite nice.</li>
</ul>
<p>As I said, I used Git for it. I don&#8217;t &#8220;hate&#8221; it anymore, but I still find some things annoying, like the horrible, confusing names some options have (I&#8217;m thinking about &#8220;git checkout <file>&#8221; to revert the local changes, or &#8220;git diff &#8212;cached&#8221; to see the contents of the index/staging area; seriously guys, W-T-F?). I used to be skeptical about the &#8220;git add&#8221; for changes and then &#8220;git commit&#8221;, but I actually find it quite nice: it&#8217;s easier to plan a commit that way, and if you don&#8217;t want to plan it, you can always just &#8220;git commit <file>&#8221; directly. Also &#8220;git add -p&#8221; is really nice to commit just <em>parts</em> of a file (at last, someone copies some of the good stuff <a href="http://darcs.net/">Darcs</a> had had for ages!). Apart from Git itself, it&#8217;s cool that there is <a href="http://github.com">GitHub</a>, so it&#8217;s easy to share your repositories without having to <code>rsync</code> to some web server or similar&#8230; not to mention that your project is much more visible that way.</p>
<p>But the World Loanmeter wasn&#8217;t the only pet project I was working on these past weeks: I also wrote a simple sudoku solver, <a href="http://wiki.github.com/emanchado/demisus">demisus</a>, in Ruby. The reason? Writing a prototype of a sudoku solver in a language I&#8217;m fluent with, to play with the design and get something interesting and easy to maintain&#8230; to rewrite it in Haskell. I have been trying to learn some functional language for some years now, but I never find a &#8220;project&#8221; that is interesting enough to write some &#8220;real world program&#8221; in the language and I end up not learning anything. After starting reading <a href="http://book.realworldhaskell.org/">Real World Haskell</a>, I really felt like trying to learn the language once and for all, and I figured that a sudoku solver was easy enough to write, something I know enough about, and something math-y enough to be reasonably easy to implement in Haskell.</p>
<p>So, if you&#8217;re interested in any of them, you can have a look in Github and even contribute ;-)</p>
 <p><a href="http://hcoder.org/?flattrss_redirect&amp;id=65&amp;md5=e6722f7dfe9cd27244931593fc4215ed" title="Flattr" target="_blank"><img src="http://hcoder.org/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://hcoder.org/2009/04/06/recent-pet-projects-git-github/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" href="https://flattr.com/submit/auto?user_id=30124&amp;popout=1&amp;url=http%3A%2F%2Fhcoder.org%2F2009%2F04%2F06%2Frecent-pet-projects-git-github%2F&amp;language=en_GB&amp;category=text&amp;title=Recent+pet+projects+%2B+Git+%2B+Github&amp;description=I+had+mentioned+that+I+was+learning+Javascript+to+write+a+Kiva+Opera+widget.+Some+time+ago+I+released+the+first+version+of+my+World+Loanmeter+widget%2C+and+I+have...&amp;tags=darcs%2Cdemisus%2Cgit%2Cgithub%2Chaskell%2Cjavascript%2Ckiva%2Cloanmeter%2Copera%2CRuby%2Csudoku%2Cwidget%2Cblog" type="text/html" />
	</item>
	</channel>
</rss>

