Explains the history behind and first steps of my home server project.
After reading Stan Vassilev's post on Practical Uses for the PHP Tokenizer, I got to thinking about his example of a preprocessor. It makes a lot of sense for the library developer. They could easily create multiple versions of their code depending on PHP version, target platform, backend database, etc. So I started working on my own implementation of a preprocessor with the goal of making it easy to add plugins for additional functionality. It was during the construction of the core of the preprocessor, that it hit me: why can't we implement new language features in the preprocessor. The first things that came to mind for me were traits and scalar type hints. So without further ado, I present version 0.1.0-dev of PPP (with its own doubly recursive meaning: PPP PHP PreProcessor).
In my everyday work, I spend a lot of time waiting on SolidWorks to finish a task. The SolidWorks task scheduler is able to remove some of these burdens by allowing them to be run overnight. The great thing about the task scheduler is that it allows me to select folders or groups of files and runs the task in a separate SolidWorks instance for each file it finds. It also has a timeout for each file to complete its task. This means it can keep churning through all of the files and recover from a problem with one of the files (SolidWorks 2008 is notoriously unstable).
The problem is that the number of tasks available is limited. There is the Custom Task which allows you to run a custom program or macro, but for some reason removes the file selection capability. It is for this reason that I set out to recreate the functionality of the task scheduler, but with the ability to run any macro (or multiple macros) in separate instances of SolidWorks for entire groups of files. I call it SolidWorksBatchRunner.
I ran into a hard to spot bug the other day and decided to share it. I worked on some code for a while and then fired up my browser to test it. I would be using Xdebug straight from Eclipse PDT, but I can't get it to work with the latest php snapshots for Windows. Anyway, when I went to test it, there was no output. It turns out that php-cgi had segfaulted. I spent the better half of a day trying to figure out the problem. When I thought I had figured it out, I would try to write up a test script for just that problem, and all of them ran just fine. Just when I was about to give up, I found the problem in this little class I was sure couldn't be wrong.