web developer & system programmer

coder . cl

ramblings and thoughts on programming...


memory usage in haskell

published: 21-03-2012 / updated: 21-03-2012
posted in: development, haskell, logrev, programming, projects, tips
by Daniel Molina Wegener

As you I am a Haskell programmer. I have started a FOSS project called Apache Log Reviser, or logrev as short name. I have been playing with code optimizations in Haskell on that project. So, I want to share some experience and considerations regarding its memory usage, mainly on what is related to lazy evaluations and non-strict bindings. Where lazy evaluations should be used every time you need to read or write data with delayed behaviour, for example reading large lists or even lazy lists, and non-strict bindings should be used every time you need to request data to be placed on memory for immediate reading or writing.

a good start on logrev

published: 17-03-2012 / updated: 17-03-2012
posted in: development, haskell, logrev, programming, projects
by Daniel Molina Wegener

As you know ApacheLogRev or logrev as short name, is my first Haskell FOSS project — I have other FOSS projects written in C and Python — and I want to share some experiences about logrev while I was developing some features that it should have in the future, because it is still under development and it is not finished yet. Basically, it is using the Parsec combinator based parser. One of the best advantages of this parser builder is the fact that it is generating parsers on run time, rather than creating fixed parsers using BNF grammars which are subject of static context free processing, rather than creating dynamic parsers.

the logrev design

published: 04-03-2012 / updated: 04-03-2012
posted in: development, logrev, programming, projects
by Daniel Molina Wegener

On March 2th, the past Friday, I have released the initial code for a new FOSS project. The current code is hosted at github. LogRev is a log reviser tool, it extracts statistics from — currently — the Apache Access Logs. The initial design only supports few grouping queries but how it was coded will allow some interesting features that I will explain in this article. I hope that you will enjoy the design of this tool.