I migrated my SVN repository to Git yesterday and moved the XBBCode project to
GitHub Drupal.org yesterday. The git migration should make it much easier to manage multiple branches for different Drupal core versions, and also make it much easier for others to contribute in case anyone is interested.
In recent years I have switched from PHP to using Python for most of my programming. That's not because PHP is particularly bad, because having worked with Drupal for most of seven years now, I dismiss that frequent criticism as a mixture of outdated complaints, inexperience and personal taste. PHP doesn't suck, but Python is incredibly awesome. It has lambda expressions! Array slicing! List comprehensions! Lazily-evaluated iterators! In Python, once an algorithm is written down in pseudocode, its implementation is trivial.
While traveling to a workshop with a friend and family this morning, I had the rare occasion to be not only awed by a piece of technology, but completely flabbergasted at its existence. This friend has a liking for cool gadgets, and what he showed me today had me first suspecting some sleight of hand, then shortly later positively drooling. The best part? It's a fraction of the price of a netbook.
Yesterday, the entire Ermarian Network was migrated to a different server. After spending the past four years on millhouse, an AMD Opteron machine with two 2GHz cores and 2GB RAM, it is now hosted on carvin a brand new Intel Xeon with four 2.5GHz cores (hyperthreaded to eight virtual cores) and 16GB RAM. These impressive numbers are of course slightly misleading, since I'm one of a great number of users sharing the server.
The first qualification round of the Google Code Jam just ended, and I managed to scrape through with two of the three problems solved in time. On the third, unfortunately, I failed to take into account the orders of magnitude of complexity, and my algorithm was not fast enough to solve the larger input case.
At 0400 on Wednesday (yesterday), my home partition suddenly disappeared. I didn't have a clue what had happened, but the problem persisted on reboot.
Now, Enki has two hard drives - one contains /home, and one contains my backups. I was able to mount the backup drive manually, but the one containing /home appeared to be unresponsive.
So I took out what I assumed to be the defective drive. I then connected it to a different computer and was instantly smelling magic smoke.
As I concluded in the first part, one problem remains with the strict "inner-tag-first" evaluation of code (which roughly equates to a Left-Right-Root traversal of the code tree). Namely, some tags, like
[nocode], require that further code inside them is not parsed.
If you read the code of my Extensible BBCode module for [[Drupal]], you'll notice that my tag parsing algorithm is kind of complex. In two steps, the tags are first "paired" (inserting a matching ID into the opening and closing tag) and then "rendered", all by an evaluated regular expression that calls another function. The process certainly ensures that all tags are balanced - and it even allows some tags to be rendered before others are, regardless of nesting.