December 2011 Archives

Syntax Highlighting Perl Debugger on github

You may have seen this:

Perl Debugger with Syntax Highlighting

I had debugger syntax highlighting working before, but I overcomplicated it and never figured out how to approach the problem.

I was inspired to try again by Mithaldu's post about augmenting the debugger. Once I realized that I had a much better strategy than previously, the code was straightforward.

I tested it on 5.12.2. I offer no guarantees. It's on Github as DB--Color. You don't like it? Fix it :)

A regex for my book

I wrote the following on Facebook:

I have a very good reason for including this regular expression in my book. It's a tiny part of a much longer one I once wrote.

(?x-ism:(?-xism:(?!\.(?![0-9]))(?:(?:(?i)(?:[+-]?)(?:
(?=[.]?[0123456789])(?:[0123456789]*)(?:(?:[.])(?:
[0123456789]{0,}))?)(?:(?:[E])(?:(?:[+-]?)(?:[0123456789]+
))|))\b|\b(?-xism:[[:upper:]][[:alnum:]_]*)\b))(?:\s*
(?-xism:(?:\*\*|[-+*/%]))\s*(?-xism:(?!\.(?![0-9]))(?:(?:
(?i)(?:[+-]?)(?:(?=[.]?[0123456789])(?:[0123456789]*)(?:
(?:[.])(?:[0123456789]{0,}))?)(?:(?:[E])(?:(?:[+-]?)(?:
[0123456789]+))|))\b|\b(?-xism:[[:upper:]][[:alnum:]_]*)
\b)))*)

At which point, many people piled on and criticized this without asking why I was going to include this. I should have known better than to make such a cryptic post and then head to bed, so here's the explanation.

Beginning Perl - Sneak Peek

In my chapter on subroutines, I need to explain recursion. One example program I give draws mazes recursively. Here's a variation of the program, somewhat expanded beyond the book example.

Moving to Paris

As people have been repeatedly surprised to discover that I'm moving to Paris, I thought I would mention it here in hopes that I don't have to keep explaining over and over again.

Leila and I were quite happy in Amsterdam and I enjoyed my job at booking.com. However, for a variety of reasons, not the least of which was Leila's difficulty in finding a job in Amsterdam, I decided to accept a position in Paris. I started at Weborama on December 1st. We'll be in Amsterdam for two or three months until we make the actual move. We'll likely be moving to a small town outside of Paris (we currently have our eye on Meaux), but nothing is quite decided yet.

I had a blast at booking.com and I'm going to miss my colleagues, but my family comes first, so off to France we go. My wife has previously lived and worked in Paris and still has contacts there, so we expect this will make things easier. Plus, since she is French, we won't have the language barrier to overcome. My French is gradually improving, but Weborama's working language is English (a rare thing in France), so I won't have to worry too much about my broken French being a source of frustration.

Now if I can just figure out this darned azerty keyboard.

About Ovid

user-pic Have Perl; Will Travel. Freelance Perl/Testing/Agile consultant. Photo by http://www.circle23.com/. Warning: that site is not safe for work. The photographer is a good friend of mine, though, and it's appropriate to credit his work.