Home
The Broken Hut
Working my way up to a full-size building
Recent Entries 
1st-Jul-2007 03:07 pm - Haskell Blogpost update.

Not sure if this is of interest. Just updated blogpost app to deal with LJ cuts and usernames/communities.

If you write

<!-- "Click here for more..." -->

it gets converted into

<lj-cut text="Click here for more..." />

Also, if you do a local preview it would previously leave any user tags unchanged. But most browsers would skip over <lj user="brokenhut" /> as an unknown tag, so you’d end up with a gap in the sentence. So I converted it into a brokenhut.

  • Browse repository
  • Fetch code: darcs get --partial http://193.219.108.225/code/blogpost/

I recently got my lazy self in gear and finished a piece of code that had been languishing for a while. It had been neglected because I no longer actually needed it; and it wasn’t desperate, because there were other ways to solve the problem — ways that didn’t involve me engaging my brain.

But for one reason or another I felt it needed done. And I’m glad it’s finished, because there were a couple of interesting lessons learned.

If you want to know how to do text processing from Haskell with external programs like Markdown, then read on. It took me a while to get this working properly, with many a deadlock or zombie process along the way. So I thought it worthwhile to write up the stuff that I learned.

(I couldn’t find this information via Google. I got some useful stuff from reading the source for the Hugs interpreter and some utility libaries from John Goerzen. But trying to guess the full behaviour from reading isolated functions is a tricky business sometimes.)

Read more... )
16th-Dec-2006 02:01 pm - First (pre-)release of JoinCabal

This is the first official pre-release announcement of JoinCabal.

It works like this:

$ joincabal

and creates this:

projectname/
projectname/LICENCE
projectname/ProjectName.hs
projectname/projectname.cabal
projectname/Setup.lhs

The important part is the dot-cabal file, since this is quite intricate and a bit dull to set up. It just outlines the basics of the program, what the executable will be called, who the maintainer is and their contact details, that kind of thing.

A previous version called mkcabal was written by Don Stewart. His is naturally more elegant than mine. JoinCabal — apart from being an obvious instance of NIH syndrome also writes a bit of licence header into the top of your main source file. Which is my justification for writing it.

And obviously it’s going to be grand and wonderful in the future. Obviously.

6th-Dec-2006 02:19 am - Alan Yentob on the World wide web

I watched this evening’s Imagine, (Alan Yentob culture show) for two reasons. One, it had Tom Reynolds on it — all too briefly, in fact. He certainly got less screen time than a man with a mask on, and a guy who put a cravat on to blog.

And two, because it was about the internet: specifically, the world wide web. I find it amusing to watch programs like that as an exercise in culture-watching. You can see how familiar the general populace is with technology by seeing how it is portrayed. And I was happy to note that there were no real technical errors in what was presented. Five years ago that would not have been the case. What’s more worrying is that this show was more grounded and far realler than anything Horizon would put on at the moment.

Read all about the intarwebs here! )

A few days back I had a conversation with [info]zootm about Richard Stallman, which led to this joke. I thought it was good enough for inclusion in Everybody Loves Eric Raymond (a Free software web comic) and emailed the author.

And this is the result in all its glory. So, congratulation to Zootm for his quick wit!

This page was loaded Jul 4th 2009, 5:19 pm GMT.