Tagged: haskell

Open Source Extravaganza!

I’ve been quiet here lately. That’s what happens when a heavy workload blends into a long vacation.

To help myself get back in the swing of this blogging lark, I’m made today an “open source dump”. Basically, I went through all the stuff I hadn’t made publicly available before and added mirrors on github.

Most of this is incomplete, trivial, and most likely crap. Read on for links!

Continue reading

Haskell logo

Snippet Sunday: Mapping Over Large Numbers of I/O Resources

(This is the first in what will hopefully be a series of useful code snippets to solve problems. For each snippet, I’ll try to provide a basic solution to the problem, then ask my readers to post alternatives in the comments.)

Haskell provides some greatly composable functions in its standard Prelude library (accessible by default) that make performing operations on large lists of data very easy.

However, when dealing with certain resources (especially I/O resources, like file handles and network connections), these simple abstractions can get you in to trouble by easily exhausting available system resources.

What follows is a (very) simple method for mapping over large numbers of resources. It’s really just intended as an example for newcomers to Haskell, that may have encountered this problem.

Continue reading

Haskell logo

How is Haskell Working for You? (Survey Response)

The Commercial Haskell SIG recently sent out a survey through Haskellers.com. They plan on releasing the survey results to the public, but I found the questions interesting enough that I wanted to post my own response to it. Whether you agree or disagree with my responses, I think a conversation around the questions is highly relevant both to those just building an interest in Haskell as well as for those who have been practicing since Before Time Began.

For the curious, read on!

[Slight editing of survey responses was done for better readability. These responses are also highly subjective, of course – they are the personal thoughts of the author of this blog. :)]

Caution! If you received the survey and haven’t yet responded to it, please don’t read this post until you do so! I’d hate to see my writing skew their results.

Continue reading

Haskell logo

Intro to Haskell’s conduit library (Conduit 101)

Haskell’s conduit library provides some deep capabilities for building transformative workflows, while providing many useful guarantees (such as constant memory usage – something that often bites Haskell developers). In this post, I’ll walk you through some simple examples of using conduit to transform text, but also demonstrate some useful variations on input and output.

Continue reading

Haskell logo

Continuous Builds in Haskell, Part 3

In Part 2, we extended our continuous build system in Haskell to use TVars for tracking the status of whether our CI system was currently working, or just waiting for more file changes. In this post, we’re going to actually kick off some cabal compilation.

This post applies to Linux users only, due to build dependencies. Hackage does not yet have a corresponding package for Windows.

This post also assumes a basic but passable familiarity with developing in Haskell. If you don’t know how to use cabal yet, this is probably a bit advanced for you.

Continue reading

Haskell logo

Continuous Builds in Haskell, Part 2

In Part 1, we laid the groundwork for a simple directory file watcher that we could extend to construct our own continuous build system using Haskell. In this post, we’re going to add the next layer by integrating with our cabal project we want monitored.

This post applies to Linux users only, due to build dependencies. Hackage does not yet have a corresponding package for Windows.

This post also assumes a basic but passable familiarity with developing in Haskell. If you don’t know how to use cabal yet, this is probably a bit advanced for you.

Continue reading