Haskell Scripting: Log Analysis
The other day I wanted to analyze some of my website log files to get a better idea of how many active users I have. I've been meaning to do this for quite some time, but have kept putting it off. I decided to see what I could accomplish by just doing some experimenting in GHCI. It was so easy and convenient that I decided to do a screencast demonstrating what I did and how easy it was. The conciseness of Haskell combined with the instant feedback of an interpreter make a very powerful combination. Here's the screencast on vimeo.
Comments
(Compiled OO languages are another story obviously... C++, Java etc.)
But it's not the kind of thing I'd do in any interpreter, to be honest; I'll stick with Webalizer.
-mike
it fits well the title of the book: real world haskell
Great vid! Thanx.
Glad you liked it. In my experience the best way to learn more is to just write more Haskell code. Learning more of the functionality provided by the standard libraries will be helpful. Data.List is the obvious place to start.
I would suggest just trying to solve whatever problems jump out at you. You can play around in ghci, but I think you'll quickly find that you want to load code from an external file so you can more easily define your own functions.
If you're having trouble with something and it just seems like there should be a better way, there probably is. When that happens try searching on Google or ask on the #haskell IRC channel. I've found the real-time nature of IRC and the extreme friendliness of the people in #haskell very helpful.
I'm a total noob on it. But decided to get into it just to do something like that you showed us in the screencast.
It's great to see it in action. Thanks.
Where could I find some more screencasts like this?
Thanks. It's always nice to hear that other people have found it useful. I don't really know of much else in the way of Haskell screencasts, so Google is pretty much the best place I can point you to.