«Insert Name Here»

15 November 2009

Past, Present and PEPM

Filed under: Gentoo,Haskell,Uni — Ivan Miljenovic @ 11:14 PM

I was planning on posting semi-regularly here, but I’ve been procrastinating way too much. It’s not that I don’t have anything to write about, it’s just that by the time I get on the computer I can usually find better things to do ;-)

Anyway, this is kind of a summary update about what I’ve been working on and what I’m going to be doing.

The Graph Trifecta

I’m responsible for three graph-related Haskell packages on HackageDB: graphviz, Graphalyze and SourceGraph. These three packages are interrelated: graphviz is used by Graphalyze which is in turn used by SourceGraph (which also uses graphviz).


The graphviz provides bindings to the Graphviz (note the differences in capitalisation) suite of tools for visualising graphs. Well, OK, I’m not actually binding the actual C library, just generating the appropriate representation into Graphviz’s Dot code and calling the appropriate tool, but close enough. I’m hoping that it will eventually become the definitive way of using Graphviz in Haskell (as opposed to all the other packages that either provide “bindings” to Graphviz or do so internally). It does have some limitations, however:

  • Only supports conversion to/from FGL graphs for now, as there’s (as-yet) no standard way of considering an arbitrary graph data structure.
  • Does not support arbitrary placement of Dot statements but follows a specific order; I did ask on the Haskell mailing lists if anyone wanted this feature but was told resoundly “no”; I might add it as an option in a future release however.

It seems every release of graphviz introduces an API change. Well, OK, not all; there are bug-fix releases, etc., and I use the Haskell Package Versioning Policy (PVP) so releases that do break the API are obvious. Also, after the 2999.5.0.0 release, I’m trying to keep the API changes to a minimum whilst still improving the library. After all, it’s all part of the process of making A Better Library (TM) for everyone ;-)

What I’m working on at the moment for graphviz is improved support for interaction with the actual Graphviz tools in how you call them and how you choose which format they’re created in. Rather than just indicating if the operation was successful or not and printing any error messages to stderror, it’s now using the Either datatype to return the actual error if there is one. The code isn’t perfect (a full disk exception will currently freeze it, etc.) but it’s getting there. I’ve also improved the image output support by allowing the programmer to use any (non-deprecated) image type that Graphviz officially supports and not just those that I happened to have had available on my system when the first version was written (note that there might be other types as well that aren’t listed in the official documentation; my install has support for a gv output type and I have no idea what it is); there is also the ability for the library to automatically add the correct file extension to the output filename. Canvas (i.e. make a window with the graph visualisation rather than create a file) output types are now also treated separately.

I’m also working on adding QuickCheck support to ensure that parse . print == id for all supported types. Note that it isn’t valid to consider this the other way round: graphviz doesn’t support arbitrary placement of statements in the Dot code, and it parses more liberally than it prints. This should hopefully find any lingering bugs I’ve got lying around in the parsing and printing side of things. The next step would then be to ensure that any generated Dot code is then able to be processed by Graphviz using the Dot (why does Graphviz have to call so many things “Dot”?) output type to add position information, etc. and have that fully parseable.

Also, documentation is gradually being improved; I’m never intending that users will be able to completely ignore the official Graphviz documentation; however, I’m trying to make it as obvious as possible the differences of opinions/terminology/etc. between Graphviz and what graphviz supports, as well as providing broad overviews of the different options and giving links to the appropriate upstream documentation.


Graphalyze was the main focus of my mathematics honours thesis last year. It provides a library to use graph-theory to analyse the relationships in discrete data sets. Nowadays, it mainly serves to do the heavy lifting for SourceGraph.

Work on Graphalyze is mainly to add extra graph algorithms that I want for SourceGraph. I’m also wanting to eventually replace the current reporting framework with a pretty-printing based one; possibly removing the pseudo-option of using something apart from Pandoc and just making it the default; this will definitely necessitate a licensing change for most of the library however (which I have no problems with, and it doesn’t appear to be used by anyone else…).


First of all, I was urged (by people who shall remain nameless unless they say its OK) to submit a paper based upon SourceGraph to Partial Evaluation and Program Manipulation 2010 (PEPM) which is going to be held in Madrid next January. I didn’t expect to get it expected (to be honest, there’s nothing that I think is that interesting/new in SourceGraph for the moment except for possibly the overall concept), but it gave me a figurative kick up the proverbial to actually update SourceGraph (which was my first ever real released Haskell program… :o ) and I thought that the actual process of writing the paper would be good practice. It turns out however that I was chosen, which resulted in a mad rush to update the paper (many thanks to quicksilver on #haskell for fixing up my Haskell terminology). So I now find myself preparing for my first ever real academic conference, let alone the first one that I’ll be presenting at! What makes the situation even more interesting is that I’m currently not a student (more on that later) and so the financial aspect will be interesting… I’ll be putting a version of my paper up here as soon as I fully understand the hoops I have to jump through to do so.

Whilst SourceGraph was just a sample application of Graphalyze in my honours thesis, it was why I’d originally thought up the topic; my supervisor convinced me to make the application aspects more general by splitting out the graph-theory side of things into a library and having several sample usages, of which I only ever ended up doing the one (mainly due to time constraints). It is now the driving force behind graphviz and Graphalyze (well, OK, users sending me bug reports/feature requests and my own sense of pride do help with graphviz; the latter was what prompted the re-writing of the printing/parsing layout whilst I was meant to be on holidays overseas visiting family…) and the focus (transitively or otherwise) of most of my Haskell hacking at the moment.

Anyway, I’m currently trying to improve the quality of the output produced by SourceGraph in terms of usage (by adding command line parameters) and in what kind of analyses it produces. I have kind of shot myself in the foot, however, as I’ve already updated it to use the as-yet-unreleased 1.8 series of Cabal, so I can’t release it (not that it’s anywhere close to being in a releasable state) until Cabal-1.8 is available…

Haskell in Gentoo

I’m going to do a proper post over on the official Gentoo-Haskell blog later on about most of this, but here’s a brief rundown on what I’ve been doing (along with kolmodin, trofi, etc.):

  • I’m still not an official dev, as I don’t have time/can’t be bothered (pick whichever you think is more accurate :p ) to finish off the dev quiz; I still help out on the IRC channel, answer (but not close) bugs on bugzilla, etc.
  • I’ve been doing some “spring-cleaning” in the overlay to try and remove old, unused packages (and versions of packages). I’m defining “unused” as “the version in the overlay is out of date, no-one has complained about it being out of date and I can’t be bothered checking through all the dependencies, etc.” ;-)
  • Trying to get GHC 6.12 RC1 to work; whilst I’ve managed to build an x86 binary bootstrap package, I’m not able to actually use it to bootstrap, and if I try and install that with USE="binary", then it appears our hack for not installing haddock with GHC doesn’t seem to work anymore :s
  • haskell-updater has been updated to work with GHC 6.12/Cabal 1.8 \o/ . Of course, I can’t actually test this out fully as I’m not able to install 6.12 here… The underlying code has also been rewritten to make it easier to add extra options down the track.


After I finished my maths honours last year, I had been hoping to study at the University of Edinburgh this year (starting in September, which would have been convenient for going to ICFP), but whilst I was accepted I was unable to obtain any funding :( As such, I’ve been either working at the University of Queensland (doing some casual sysadmin-ing as well as developing material for and helping to run the new SCIE1000 subject) or working on a few odds and ends at home (that is, the projects mentioned above) all this year.

Because my dreams of studying overseas have been dashed, I’ve now applied to study at Australian National University in Canberra under the supervision of Professor Brendan McKay. Whilst I haven’t been officially accepted, I’ve been told that I’m guaranteed a spot (and at least some funding) due to my academic results for honours last year. I’ll be working on combinatorial algorithms, so nothing officially Haskelly in nature (but I’m intending on doing most – if not all – of my coding in my favourite programming language).


I mentioned previously that I’d be going to PEPM next year… will anyone else from the Haskell community be there (or at any of the other conferences associated with POPL)? I’ve as yet only had the pleasure of meeting one person (dibblego), and it’d be great if I could put some faces to some of the other names I see in #haskell or on the mailing lists…

That’s all folks

In case anyone cares, this is what I’ve been up to and am planning on doing for the most part. This blog post on the main was to try and get me writing here more often, as well as an attempt to stifle Joe Fredette’s continual complaints of lack of Haskell Weekly News material because I haven’t released anything recently ;-) So Joe, go ahead and write about this! :p

14 May 2009

Functions All The Way Down

Filed under: Uni — Ivan Miljenovic @ 10:20 PM

This morning, I did a talk for the UQ Maths PhD Journal Club (which is not just for PhDs, not just about maths and not only articles from Journals…) on Lambda Calculus and Church Encoding.

Thanks to byorgey, etc. on #haskell for checking my slides for me!

Anyway, you can now get the slides here

15 December 2008

RWH Arrives Down Under!

Filed under: Haskell — Ivan Miljenovic @ 7:30 PM

As far as I know, no-one has as yet reported that Real World Haskell has hit the shores of Australia. Well, I’d like to rectify that situation now that I just received my copy (which whilst later than people in the Northern Hemisphere and the Americas have reported, is a day earlier than the earliest I was told to expect it by Fishpond)!

RWH in packaging

Proof that RWH is indeed "Down Under"

3 November 2008

Graph Theoretic Analysis of Relationships within Discrete Data

Filed under: Haskell,Uni — Ivan Miljenovic @ 2:28 PM

The title of this post is that of my Mathematics Honours Thesis, the final version of which I submitted (in triplicate!) this morning! :D


29 October 2008

Honours + LXDE

Filed under: Gentoo,Haskell,LXDE,Uni,Xfce,XMonad — Ivan Miljenovic @ 11:36 PM

In this post, I’m going to discuss the status of my Haskell-oriented Mathematics Honours thesis, as well as the new Desktop Environment I’m using.


19 September 2008

Getting Real World Haskell Down Under

Filed under: Haskell — Ivan Miljenovic @ 11:23 PM

Are you an Australian and want to order yourself a copy of Real World Haskell? More importantly, want to do so relatively cheaply?

Most bookstores seem to be selling pre-orders of RWH from $80 to $90, which doesn’t seem fair when comparing this to the Amazon US price of US$40 (even though you can read it for free online!).

However, I’ve just managed to find an online bookstore that’s selling pre-orders for $55, which is much closer to the Amazon price!

Delivery is free, and there’s no GST (because it appears that they’re actually based in New Zealand). Also, it looks like if someone refers you to that page, you can get an extra $10 off. If you’d like a referal, leave a comment or ask me on #haskell on Freenode.

Note: no, I’m not doing any affiliate program or the like to get money off you buying it… Fishpond’s affiliate program requires the purchaser to buy $100 worth to give me $10 credit… which would probably expire in 30 days anyway :(

24 February 2008

Uni and Computers

Filed under: Gentoo,Haskell,Uni — Ivan Miljenovic @ 9:51 PM

The first semester of 2008 starts tomorrow. This year, I’ll be doing Honours in Mathematics at the University of Queensland. I’ve also got a couple more computers to put Gentoo onto!


28 January 2008

LCA 2008

Filed under: Gentoo,Uncategorized,XMonad — Ivan Miljenovic @ 8:21 PM
Tags: ,

So I’m here at LCA 2008. Tomorrow morning there’s the Gentoo Down Under Mini-Conf, at which I’ll be giving a short-ish tutorial/talk on what I’m calling “The Portage Ecosystem”. That link will give you the slides I’m going to use. As it stands, I don’t know if I’ll end up using all of them as I’m only meant to be talking for 10-15 minutes :s

I’ll also be helping to man the Gentoo stall at the LCA Open Day, where I’m going to demo my laptop running Xfce+XMonad, on which I’ve spent a couple of hours playing with different layouts, etc. since posting my previous post.

20 January 2008


Filed under: Gentoo,Haskell,XMonad — Ivan Miljenovic @ 12:59 AM

I’ve been following the XMonad project recently. For those of you who don’t know what XMonad is, I recommend you have a browse through the home page and it’s Wikipedia article. I’ve been planning on playing with XMonad for a while, though my initial plans were to wait till I bought myself a new über box to use in conjunction with my laptop. However, I decided to delay purchasing a new computer (because I couldn’t decide which CPU to get, not due to lack of cash) but couldn’t delay using XMonad any further.

Square that X!

One problem I’ve always had with all the XMonad screenshots I’d seen was that to my mind, dzen and xmobar look rather ugly to me, though this could be due to everyone loving dark colours for their setup. Personally, I much prefer a live graphical image of the various meters, etc. that I have residing on my panels.

Since I heard that KDE 4.0 was going to be released soon (this was around the 9th of January when I started this), I thought I’d do one better than Spencer Janssen’s usage of kicker with XMonad and actually use the full KDE environment with XMonad replacing kwin. After all, if it’s possible to integrate XMonad into Gnome, doing it with KDE should be possible. However, I got sick of waiting for the release date and decided to install version 3.5.8 instead.

Whilst I prefer KDE to Gnome, in the end I couldn’t stand using KDE either. So I decided to go back to using Xfce 4.4, which I’ve been using since one of its betas. I quite like Xfce: for a Desktop Environment, it’s rather responsive and fast. My only complaints is that sometimes it’s too simplistic: so to change an autostart application I have to manually edit the file rather than using the GUI; and some Gnome-oriented apps keep dumbing down. So I decided to combine Xfce with XMonad to form X2Monad (though it turns out gour on #gentoo-haskell has been doing this for a while already without telling anyone).

So why use a DE?

First of all, why not? :p Sure, most people use XMonad in a very minimalistic-environment. However, I’ve become used to having an overall set of applications that integrate nicely, with a consistent manner for configuration (including setting the theme, etc.). Furthermore, I quite like the Xfce panels and the plugins for them (more so than kicker & co.).

Secondly, I’ve found that DEs have better menus and have them by default. Whilst I don’t use the menu often, it is often useful to get an idea of what’s installed and what the name of a particular program you have is (I’ve done this before where I installed something, decided I didn’t like it but couldn’t remember what it was called to uninstall it).

Finally, I want to use a DE with XMonad because I can… that’s the beauty of FLOSS! Especially when you bring in Gentoo’s USE-flags, etc.

How to setup Xfce and XMonad to play nicely together.

5 December 2007

Time to join the crowd

Filed under: Uncategorized — Ivan Miljenovic @ 10:31 PM

To quote the immortal Tripod:

I always get into stuff, just as it finishes being cool.

Well, I decided to buck the trend for once and get myself a blog whilst they were still cool, more for the sake of doing so than anything else I suppose. So, first things first, I had to decide where to have my envisaged blog.

I’m not into the whole “social network” thing (e.g. Facebook, MySpace, etc.), especially after a friend of mine (who for now shalt go nameless) studied the relationships inherent in Facebook for his honours thesis (graph theory), convinced just about everyone else doing honours with him to join it (thus decreasing productivity as they all started to play games on Facebook rather than doing work), and once it was over decided that he was sick of Facebook. I, however, wanted a (semi-)serious blog. I quickly narrowed the list of possible online blog hosts down to Blogger and WordPress.com, as to me they seemed to be the two largest/best free blog hosting sites.

Since you’ve found your way here, my eventual decision regarding which of these two I should go with should be obvious :p. However, I decided as my first blog post to discuss why I decided to choose WordPress.com over Blogger. This isn’t a review per-se, more of a rationale which may help someone else make up their mind.

The Google Factor

Most people seem to think that the fact that Blogger is now owned by Google is A Good Thing (R). I disagree. I think that the following strip from Userfriendly best sums up my feelings on the matter:

Userfriendly on Google

I don’t like having all my eggs in the one basket. If Google does decide that they’re going to ignore their famous motto “Don’t be evil”, then at least this blog will (hopefully) not be under their control (then again, it mighn’t be long until Google is the internet :p ). It’s bad enough that – just because I’m signed in to my gmail account – I can’t even access Blogger’s front page easily and instead get redirected to a sign-up page.


Down the track, I may wish to port my blog over to my own website. If and when that occurs, then it should be much easier to shift my blog from WordPress.com to a self-hosted (or at least externally-hosted) WordPress installation, whereas Blogger doesn’t even seem to let people export their blogs. This sounds suspiciously like the techniques used by a certain company;-)


Blogger aims to be hip. WordPress.com seems to be catering itself slightly more towards the intelligentsia of the blogging community. I never claimed to be hip or cool, but I do like to think I have some “little grey cells” in my head ;-) The actual setup and layout of WordPress.com also seems to be more professional, though this opinion dropped slightly when I saw after I first logged in the word “Howdy” used to greet me.


Most people on Blogger seem to use this extremely annoying theme where all the blog content is in this tiny little rectangle taking up the middle quarter to third of the screen… and that’s it. The box seems to be hardcoded to be that size rather than dynamically growing with the text size. This is particularly annoying to me, as I like to increase the font size of most web pages I visit to make them easier to read.

I know that this isn’t a universal trait: there are some Blogger blogs that take up the majority of the horizontal screen space, just as there are WordPress.com themes that restrict the blogging area. But the impression I received from looking at various blogs that this is not the norm.

Feature Promotion

WordPress.com has rather clear links off its main page showing various features available, as well as the different themes, etc. that bloggers can use. Furthermore, it is possible to search through the forums to find discussions on other possible features, etc.

If this is also the case for Blogger, then they’ve hidden it well. All I got is “hey, now that Beta is no longer Beta, we’ve got cool stuff!” without an actual explanation of what that cool stuff is. I still can’t find anywhere what exactly the features in the Beta where meant to be.


I don’t mind having a couple of small, unobtrusive ads on web pages or blogs to help alleviate the costs of providing a free service. So I really don’t have a problem with what I’ve read that WordPress.com is trialling the usage of ads on some blogs. After all, it’s quite rare to get something for nothing!

However, I believe that if you are blogging solely to make money, then you should get yourself a real job. Blogging to me is an opportunity for people to get their ideas out there to other people, and you should be grateful that anyone is actually interested in what you have to say, rather than trying to scab some money off them. So I don’t like Blogger’s approach of giving people a cut in exchange for them letting Google put ads in their blogs. That’s just increasing the overall amount of greed in the world.

Summing up

There’s probably other reasons I chose WordPress.com over Blogger that I can’t recall at the moment, but these are probably the most important ones anyway. The only real concern I had with WordPress.com is that Blogger apparently plays nicer with Haskell code in posts, but using <pre> apparently works well enough.

So, here endeth my first blog/rant. I’m aiming to use this blog mainly for discussions of a more technical nature, but possibly including some more personal-style posts as well (and by that I don’t mean post-teen angst about people not liking me, but more on various ethnic, etc. issues that affect me). So, to all 3 of you reading this, I hope you liked it! :p

« Previous Page

The Rubric Theme. Blog at WordPress.com.


Get every new post delivered to your Inbox.