Recently in Haskell Category

Yesterday, I submitted my first program modification to the computer language shootout game, which is a change to the thread-ring program. If you've followed the shootout at all, you will probably know that haskell dominates at this benchmark, with the next contender (Mozart/OZ) being 50% slower than haskell already. While i was having a look at the code, I noticed that the haskell entry was forkIO'ing a lot of threads, which is exactly what we want. But we weren't quite forking enough; one of the 503 threads was the main thread. Bad idea! I learnt a few weeks ago, while...

AVar released (three times)

| 2 Comments | No TrackBacks

The other day, I put my AVar package on hackage. Doing so taught me more than i expected it would, mainly that i need to do more testing of cabal packages before submitting them, and also to make sure you've exported all the functions you need to actually use the package (I forgot to put putAVar in the module exports -_-). So i'm up to release 0.0.3, without much work being done at all (although, I can't think of much more to do really). With the current release, i think that all exceptions that may occur from functions passed by...

ASTM updates

| 1 Comment | No TrackBacks

Today, I've been talking with some people in #haskell about this ASTM thing, and I've had some great input, mainly from Stefan Ljungstrand (ski on #haskell), along with quicksilver and Simon Marlow, and I thought I'd share the changes I've put in with their help. I'm still not sure how useful this stuff is, but it's fun and I'm learning. If you're wondering what i'm on about, see this post. So, the new features I've added are mainly to do with exception handling, so that variables don't 'die' if you call tail on [], they report the error, and don't...

ASTM: redundant STMish fun

| No Comments | No TrackBacks

...an idea for the emulation of mutable variables, using functions as a way of storing the values in an accumulating parameter of sorts. They could safely be shared between threads, and could (and sort of do) support atomic actions...

So, I'm putting a call out to see if anyone else can either think of a better way to get the answer than the current entry, or any tips about reducing memory usage. If you come up with anything, I'd love to hear from you.

Other shootout news

| No Comments | No TrackBacks

I've been talking to Stephen Blackheath on the #haskell-in-depth channel, and he's just submitted another new program to the shootout. This entry is for the regex-dna problem. For this benchmark, each language is limited by the speed of the regex library it's using. Right... let me see. Here's what I did; I am not certain, but it seems that forcing the evaluation of s1, s2 and s3 (the blobs of input data) before parallelizing the processing gave better CPU utilisation. I also changed the part at the end where it does large numbers of pattern substitutions, so that it updated...

More n-bodies speedups

| No Comments | No TrackBacks

So I've been taking full advantage of the new #haskell-in-depth channel, and with the thanks of blackh and others, I've made a few more changes, and I've shaved another whole 30 seconds of my already not too shabby 1m17s. I'm now down to 47.215s, making a saving of 30s, or a saving of 39%. If you're wondering what I'm on about, take a look at this post for the story of my n-bodies program so far, and this port for what my code looked like before. So how did I do it this time? Well, I decided STRefs weren't necessary,...

For the last week or so, ozy` has been working on improving the haskell bundle in TextMate. He's done a lot of work, and it really makes a difference. The changes should be in SVN sometime soon I hope...

N-bodies evolution

| No Comments | No TrackBacks

The reason I got interested in this problem was because I decided to take a look at the current haskell submission. I was a little horrified when I say it as all pointer nonsense and back magic. Full of stuff haskell can do fine (And possibly better and more safely that other languages), but should really be avoided where possible. I wanted to see if you could write a fast version, using more accessible techniques.

Movable Type

| No Comments | No TrackBacks

So what's so great about Movable type? Well, it publishes static html, which means there's no processing needed when someone visits the page. This will certainly suite lighty, as it's a fantastic static content server.

ST Monad examples

| No Comments | No TrackBacks

So, I’m wanting to put more examples on the Monad/ST page on the Haskell wiki, but I’m not sure what else I can do with it that’s simple. I’ve been using Haskell for too long to remember what sort of problems I’d write statefully! So, if you have any ideas, either let me know, or just post them on the wiki! My first example is: import Control.Monad.ST import Data.STRef import Control.Monad     sumST :: Num a => [a] -> a sumST xs = runST $ do -- runST takes out stateful code and makes it pure again. n <-...

Well, it's been over a year since I last had a blog of any kind (that's a small lie, but who cares), and I have realised I now have stuff to blog about! I've finished my first year of uni, and damn has it been awesome. They taught me Haskell, and wow, I've been hooked ever since! I've finally found something that perfectly suites my needs and interests, and challenges me. So what have I been up to in haskell? Well lots of playing around, the most fun has been parallel and concurrent programming, which is easy, fun and interesting...

March 2009

Sun Mon Tue Wed Thu Fri Sat
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        
OpenID accepted here Learn more about OpenID
Powered by Movable Type 4.23-en

About this Archive

This page is an archive of recent entries in the Haskell category.

OSS is the next category.

Find recent content on the main index or look in the archives to find all content.