<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>Alp Mestanogullari's blog</title>
        <link>http://alpmestan.com</link>
        <description><![CDATA[Alp Mestanogullari's blog posts about Haskell and occasionally Math, AI or other topics]]></description>
        <atom:link href="http://alpmestan.com/rss.xml" rel="self"
                   type="application/rss+xml" />
        <lastBuildDate>Mon, 08 Oct 2012 00:00:00 UT</lastBuildDate>
        <item>
    <title>Factorization diagrams with Happstack</title>
    <link>http://alpmestan.com/posts/2012-10-08-factorization-diagrams-with-happstack.html</link>
    <description><![CDATA[<h1>Factorization diagrams with Happstack</h1>

<div class="cool" style="float:left;"><small>on <strong>October  8, 2012</strong></small></div>
<div class="cool" style="float:right; margin-right:0.5em;"><small>Tags: <a href="/tags/haskell.html">haskell</a>, <a href="/tags/diagrams.html">diagrams</a>, <a href="/tags/happstack.html">happstack</a>, <a href="/tags/math.html">math</a></small></div>
<div style="clear: both;"></div>

<p>After having seen <a href="http://mathlesstraveled.com/2012/10/05/factorization-diagrams/">Brent Yorgey’s blog post</a>, I started hacking-up a simple Happstack webapp to display factorization diagrams. This has been pretty straight forward, although <a href="http://hub.darcs.net/alp/factorization-diagrams-happstack">the code</a> isn’t really clean nor idiomatic. I just felt like quickly putting something up and running during the little free time I have had this weekend. You can play with the app at <a href="http://diagrams.alpmestan.com/">diagrams.alpmestan.com</a>. Here is an example of generated SVG.</p>
<div class="figure">
<img src="http://diagrams.alpmestan.com/diagrams/1235.svg" alt="1235’s factorization" /><p class="caption">1235’s factorization</p>
</div>

]]></description>
    <pubDate>Mon, 08 Oct 2012 00:00:00 UT</pubDate>
    <guid>http://alpmestan.com/posts/2012-10-08-factorization-diagrams-with-happstack.html</guid>
</item>
<item>
    <title>Haskell job opening at Functor AB</title>
    <link>http://alpmestan.com/posts/2012-10-23-haskell-job-opening-at-functor.html</link>
    <description><![CDATA[<h1>Haskell job opening at Functor AB</h1>

<div class="cool" style="float:left;"><small>on <strong>October 23, 2012</strong></small></div>
<div class="cool" style="float:right; margin-right:0.5em;"><small>Tags: <a href="/tags/haskell.html">haskell</a>, <a href="/tags/job.html">job</a>, <a href="/tags/functor.html">functor</a></small></div>
<div style="clear: both;"></div>

<blockquote>
<p>Functor AB is looking for enthusiastic, highly skilled and experienced Haskell developers for our core technology, who are interested in a challenging opportunity partly at the JET fusion reactor (Oxford) and in collaboration with some renowned researchers.</p>
</blockquote>
<p>Functor collaborates with the JET fusion reactor run by EFDA CCFE outside Oxford, UK. JET is currently the largest reactor in the world of its kind and there is an on-going technology transfer at JET to the emerging ITER project, which is some decade ahead as far as operation is concerned. You will be part of this collaboration and have a key role in the development of new programming tools for a new programming paradigm known as the constructive programming paradigm.</p>
<p>At Functor, almost all development is done in Haskell but also to some extent also C and Scala. Although Functor AB is based in Stockholm, Sweden, work may be carried out e.g. in Oxford or otherwise. The developers we look for will be working closely with some senior / well-known researchers within the disciplines of computer science and mathematical logic, collaborate with staff at the JET plant including highly experienced key software engineers at that facility and will face interesting and challenging problems. Developers at Functor can contribute to fusion energy research in the sense of being involved in new technology for software that concerns the stabilisation of the plasma inside a reactor.</p>
<p>A solid background in computer science, documented experience and/or strong academic education in advanced functional programming in Haskell are assumed. Knowledge of type systems, Martin-Lof type theory, dependent types, formal methods, static analysis, Spec#, Coq, Agda, Idris, Epigram, Twelf or other similar tools, languages, theorem provers is desirable but not required. Knowledge of parsing, skills also in other programming languages including experience from C, C#, C++, Objective-C and also Scala, is also desirable but not required. Higher academic degrees such as a PhD in computer science are not required but certainly taken into account. Entrepreneurship skills or industrial experience is not required here - but if such exists it is considered to be a strong merit as well. Knowledge in UNIX and Linux is required. Finally, experience in using Visual Studio, Eclipse or other IDEs is relevant.</p>
<p>To apply, please send your resume, references and other relevant documentation to <script type="text/javascript">
<!--
h='&#102;&#x75;&#110;&#x63;&#116;&#x6f;&#114;&#46;&#x73;&#x65;';a='&#64;';n='&#106;&#x6f;&#98;&#x73;';e=n+a+h;
document.write('<a h'+'ref'+'="ma'+'ilto'+':'+e+'">'+'<code>'+e+'</code>'+'<\/'+'a'+'>');
// -->
</script><noscript>&#106;&#x6f;&#98;&#x73;&#32;&#x61;&#116;&#32;&#102;&#x75;&#110;&#x63;&#116;&#x6f;&#114;&#32;&#100;&#x6f;&#116;&#32;&#x73;&#x65;</noscript>. If you have any questions, they can be sent to the same address.</p>

]]></description>
    <pubDate>Tue, 23 Oct 2012 00:00:00 UT</pubDate>
    <guid>http://alpmestan.com/posts/2012-10-23-haskell-job-opening-at-functor.html</guid>
</item>
<item>
    <title>The cabal/hackage situation, and what you can do about it</title>
    <link>http://alpmestan.com/posts/2012-11-02-cabal-hackage-what-you-can-do-about-it.html</link>
    <description><![CDATA[<h1>The cabal/hackage situation, and what you can do about it</h1>

<div class="cool" style="float:left;"><small>on <strong>November  2, 2012</strong></small></div>
<div class="cool" style="float:right; margin-right:0.5em;"><small>Tags: <a href="/tags/haskell.html">haskell</a>, <a href="/tags/cabal.html">cabal</a>, <a href="/tags/hackage.html">hackage</a>, <a href="/tags/scoutess.html">scoutess</a></small></div>
<div style="clear: both;"></div>

<p>It’s that time of the year, again, when the community talks a lot about what is wrong with cabal and hackage. A few discussions happened on reddit (see <a href="http://www.reddit.com/r/haskell/comments/12hbzb/why_cabal_has_problems/">1</a>, <a href="http://www.reddit.com/r/haskell/comments/12e3a0/the_good_the_bad_and_the_ugly_haskell_in/">2</a> and <a href="http://www.reddit.com/r/haskell/comments/12alw1/why_inbreeding_is_bad_for_your_community_cabal/">3</a> for example). So, we all know what the issues are (if you don’t, reading the comments on these links will certainly help you realize what the issues are). This post is about what can be done from different point of views.</p>
<h1 id="using-other-peoples-libraries-or-programs-in-your-projects">Using other people’s libraries or programs in your projects</h1>
<p>So, you have a project, and that project has a .cabal file, listing the dependencies. But when you want to build your project, you install the dependencies in your user package database. Just having a couple of projects may be enough to introduce conflicts and get you a one-way ticket to the dependency hell. For that kind of issues, there is a solution. There are several of them, actually, but the most popular one probably is <a href="http://hackage.haskell.org/package/cabal-dev">cabal-dev</a>. You can learn how to use it on <a href="https://github.com/creswick/cabal-dev/blob/master/README.md">its github page</a>.</p>
<p>Basically, you will have per-project package databases. The big disadvantage in that approach is that your projects tend to always use libraries like bytestring, text, etc and that you will have to build them once per project, but I do not find this to be that big a problem with today’s hardware. So, with that solution, unless different dependencies <em>of the same project</em> use conflicting versions of some package, you should be fine.</p>
<p>An important note is that the next release of cabal-install will have sandboxes (just like cabal-dev) built-in. This is the result of a hard work during the GSoC this year, and even after the end of it. So what you’ll be used to do with cabal-dev will be possible with the usual ‘cabal’ program. However, this isn’t about importing some code from cabal-dev. It provides better sandboxes than cabal-dev. For instance, cabal-dev only take snapshots of dependent packages whereas cabal-install will support live source trees.</p>
<p>The Cabal/cabal-install developers have a lot of ideas to improve the situation. Also, <a href="https://github.com/haskell/cabal">the code is on github</a>. They even provide a <a href="https://github.com/haskell/cabal/blob/master/HACKING">HACKING</a> file and their <a href="https://github.com/haskell/cabal/issues?labels=&amp;page=1&amp;state=open">issue tracker</a> has an awful lot of open issues (483 right now). This provides pretty much all you need if you want to help on the Cabal front.</p>
<h1 id="the-hackage-mess">The Hackage mess</h1>
<p>So, you are looking on Hackage for a library that provides some specific functionality. You find 5 of them that seem to offer it, but don’t know which one to choose? Do you really have to test all of them to figure out their ease of use, their performance characteristics and whatnot? Well, except when the package is one that is known to be a reference, that’s pretty much your only solution, yes. However, many of you may be aware that a new version of Hackage is being worked on, but probably don’t know where that work is happening, who is working on it, what needs to be done, etc.</p>
<p>These last few months, Duncan Coutts and Ian Lynagh have been working hard on improving the performances of the current Hackage2 code, on some refactorings and on getting it closer and closer to being deployed to replace the current hackage.</p>
<p>This new version of Hackage will have a <em>huge</em> amount of new features, eventually, that will help sorting out “the mess” that we see when looking at <a href="http://hackage.haskell.org/packages/archive/pkg-list.html">this page</a>. And it will bring a lot more than just this. However, obviously that requires a lot of hacking, so how about joining the effort? There are many simple tasks that one can do to get Hackage2 closer to a deployment. For instance, I am working on adding some code to back-up some data the Hackage2 server stores in memory while running, and on the corresponding import code. Really, right now, most of the tasks are about filling in some gaps: making sure we can import the old data, making sure backups will work, etc. It’s about getting it ready for the switchover. The initial version of Hackage2 will be similar to the current one, but will be a <em>much better basis</em> for adding all the features needed to improve our experience as a community (number of downloads and reverse dependencies as empirical “quality” metrics? attaching “getting started” code snippets to your package’s page? etc).</p>
<p>If you want to help with this, you can find a lot of information about the Hackage2 project <a href="http://hackage.haskell.org/trac/hackage/wiki/HackageDB/2.0">here</a>. That includes where you can find the code, the tasks that need to be done, the people you can contact to talk about what you should do, etc.</p>
<h1 id="maintaining-a-project-is-hard">Maintaining a project is hard</h1>
<p>A lot of package maintainers know this situation: a dependency of your project introduces some breaking change, and someone sends you a message on IRC or by email to tell you they can’t install your package. You thus either have to adjust the version bounds for that dependency, or make your code compatible with the changes (or you write different code for the two different version ranges, but that of course scales badly). The former keeps you from benefiting from all future improvements to this dependency, the latter keeps your code from working with all the previous versions. And you can’t do anything about it anymore, because the new version of your dependency is released on Hackage.</p>
<p>Another scenario: you introduce some breaking change in your package. All your reverse dependencies (packages using yours) may now be broken. What can you do about that? Maybe luckily some of them had the right version bounds for you in their .cabal file (this isn’t that hard to get right, if you follow the <a href="http://www.haskell.org/haskellwiki/Package_versioning_policy">PVP</a>). But then again, every now and then, some package doesn’t follow it. Or the version bounds for some dependency of a package are just wrong and that pretty much keeps you from being able to install that package, unless you figure out the exact problem, which… let’s be honest, is tiresome and not always reasonable to do.</p>
<p>These scenarios (among many others) are something Jeremy Shaw (<a href="http://www.happstack.com/">Happstack</a>’s lead dev) and I were so tired of that we decided to start the <em>scoutess</em> project. For more information about it, please visit <a href="http://alpmestan.com/posts/2012-03-21-scoutess-continuous-integration-cabal-gsoc.html">this post</a> and visit us on #scoutess on ‘irc.freenode.net’. This aims at being a build-bot-on-steroids for cabal-powered projects. There’s still plenty to be done before we can get a first release out, and we would benefit a lot from having a few more hands to help us write down some more code to get us closer to a release. So if you’re interested, contact us, by email, IRC, or <a href="http://groups.google.com/group/scoutess">the fresh mailing-list</a>, take a look at the code <a href="http://hub.darcs.net/alp/scoutess">on darcshub</a> (although it may change drastically soon).</p>
<p>A side note about this: there will be a feature in the new Hackage that will let package maintainers or Hackage trustees adjust dependencies <em>after</em> a release without having to update the tarball. cabal-install’s latest release has the client-side code for this, and the server-side code is partly written too.</p>
<h1 id="conclusion">Conclusion</h1>
<p>There is yet another interesting and related project, about a nix-style persistent package store. You can read about it <a href="http://www.haskell.org/haskellwiki/HaskellImplementorsWorkshop/2012/Schuster">here</a> and watch the Haskell Implementors Workshop talk about it <a href="http://www.youtube.com/watch?v=h4QmkyN28Qs">here</a>. This may be a key for opening the door of the dependency paradise. So do not hesitate to take a look at what Philip did and whether you can help.</p>
<p>You can do a lot to improve the situation. Just contributing a tiny feature to one of the projects I talked about is already a huge win for that project’s authors, and almost-directly for the <em>whole community</em>. We know the problems, so it’s not that helpful to keep talking about it on Google+, reddit, twitter and whatnot without doing anything to solve them. The people working on all of these projects know the technical details to improve the situation, but do not have an awful lot of time to spend working on it. Anyone in the community can make a difference, can bring us closer to a state where we do not hear/read complaints every single day about cabal, hackage, broken packages, dependency hells, etc. Pretty much all the Hackage/Cabal/Scoutess devs would be delighted to welcome new contributors, whatever the size of the contribution is, may it be good bug reports, some documentation improvements, bug fixes and of course new features. And contributing to these projects may seem scary, but you will figure out that there are an awful lot of simple tasks that need to be done. For instance, I have something like 10 of them in mind for Scoutess. So if you’re interested, please come talk to us, let us know what you want to work on, we’ll most likely give you a few advices/directions, and you’ll be good to go!</p>
<p><em>Many thanks to Duncan Coutts for the many helpful comments on the drafts of this post. I definitely owe you a beer or two!</em></p>

]]></description>
    <pubDate>Fri, 02 Nov 2012 00:00:00 UT</pubDate>
    <guid>http://alpmestan.com/posts/2012-11-02-cabal-hackage-what-you-can-do-about-it.html</guid>
</item>

    </channel> 
</rss>
