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.

How to use built-in SPL exception classes for better error handling

Tags:

Since PHP 5, there has been a bundle of built-in exceptions – the “SPL exceptions” – in PHP. However, the documentation for these classes is quite lacking in examples, and it can be difficult to understand when you should be using them. The short answer is always. You’ll find a longer answer if you continue reading :) There is also …

Now you can write PHP code… without writing any code

Tags:

Yes, you heard that right! You can now code in PHP without having to write a single line of code – amazing, right? The application that makes this possible is called Lemon ADE, and it runs on the iPad. In this post I’ll go over how Lemon ADE works, and I have also recorded a short video demonstrating coding with …

Wicket from the point of view of a PHP developer

Tags:

Not long ago, I had to learn some Wicket. What is that? In this case it has nothing to do with cricket – The Wicket I’m talking about is a Java web application framework. I’ve mostly used PHP and Python to do server-side web application sort of programming. Compared to what I’m used to, Wicket is way different. Read on …

Refactoring explained to an absolute beginner

Tags:

Recently while on a drive with a non-programmer friend, I talked with him about code complexity and manageability, how very complicated code is detrimental to productivity and stuff like that. Later on, I decided to explain it to him with actual code examples, although the most he has ever done was some HTML back in elementary school. Here’s what I …

Benefits of Developing With Microsoft AND Open Source

Tags:

The Internet seems to be the latest battleground for the computer age-old struggle between Microsoft and open source solutions. For some reason, many web developers like to engage in holy wars over various web site hosting solutions and development platforms, fiercely defending their beloved vendor’s suite of products. They battle over their particular setup so much they block out any …