Skip to content

{ Tag Archives } haskell

HSGrep benchmarking

Few days ago, I rewrote sgrep in Haskell. I was curious to know how it compares to grep in term of execution speed. In particular, I was interested to verify that hsgrep scales as O(log n), instead of O(n), with n being the size of the file analyzed. First of all, in order to have [...]

Also tagged ,

HSGrep: Sorted Grep in Haskell

As an exercise to learn Haskell, I wrote a specialized grep to work on sorted files. It uses binary search to scan a text file and print all the (consecutive) lines that start with a user defined string. My program is a rewrite of sgrep in Haskell: I called it HSGrep. Code is available on [...]

Also tagged ,

Haskell and VIM

I had to tinker quite a bit before finding a decent configuration for vim to edit Haskell files. Here are the packages and config files I use: Haskell mode: interaction with Haddock, compiler integration, and other general settings. Indentation: proper source code indentation. More configs to enforce good style (no tabs, tabstops, etc.):  You can [...]

Also tagged ,

http client in haskell

To try to make sense of this, I decided to write a “simple” http client in Haskell in as many styles as I could think of: it’s a long time since I found so many new concepts while studying a new programming language…

Also tagged , ,