Hello World Open 2014 thoughts

Tags:

I participated in the coding world championships, or Hello World Open, 2014. The challenge was to write an artificial intelligence for a slot-car racing game. I wrote my bot in Haskell, and managed to rank 11 out of 856 competitors in the first qualification round, and 78 out of 203 in the second qualification round. Read on for some general …

Parsing and evaluating PHP in Haskell: Part 2

Tags:

Last week I wrote a post about a PHP parser / evaluator I wrote in Haskell. I explained some of the parts on how the parser itself was designed to process PHP code into an abstract syntax tree. Continuing from where we left off in the previous part, in this post I’ll discuss the actual evaluation part.

Parsing and evaluating PHP in Haskell: Part 1

Tags:

The other day I uploaded a new experimental project on GitHub – A Haskell PHP parser / evaluator. It doesn’t understand 100% of all PHP syntax, but it was an interesting experiment nevertheless. Here’s some insights and other thoughts from working on the code.

Is Haskell good for web development?

Tags:

I’ve been trying out Haskell for developing a web application, using the Yesod framework. I always found Haskell quite nice, but never tried developing web apps with it. After using Yesod, I’m slowly starting to think that Haskell might be much better for it than many of the commonly used languages like PHP, Python, Ruby or JavaScript. Here’s why:

Adventures in Haskell: Dynamic loading and compiling of modules

Tags:

In my latest attempt at using Haskell, I was working on creating a kind of a plugin architecture for my application. I wanted to be able to load haskell code dynamically, without having to restart the main application. This is doable using the GHC compiler API’s. However, the documentation for it is quite lacking in examples, and while I was …

Functional programming and Haskell

Tags:

I’ve been learning some Haskell for fun. Haskell is a functional language, so it’s quite different from other languages I know like PHP or C#. One of the main “ideas” of functional programming is immutability – in other words, you can’t change the value of a variable after you’ve defined it. How do you deal with this? Also, Haskell has …