As I had written in my last blog post, in order to upgrade my blog from Wordpress to a static site like Octopress, I decided that while performing the migration I would improve the syntax highlighting of OpenEdge ABL code snippets. Obviously I’m no fan of the language, but it’s baggage that I’m burdened to carry so I thought I might as well carry it with me in style.
Therefore, I had to write an OpenEdge lexer myself for Pygments. This lexer has since been included in the recent Pygments 1.5 release, so is available for download and use right now.
I was happy to learn that GitHub’s syntax highlighting is also done using Pygments. They use a custom gem called linguist for this purpose. Linguist itself uses another gem called pygments.rb for calling out to Pygments by using the RubyPython library, which actually embeds a Python interpreter inside of Ruby using FFI (very cool, and also fast!).
I went ahead and wrote the linguist support for OpenEdge, the update to pygments.rb to update its Pygments version, and also helped out a bit on the linguist issues list by adding Coq lexer support (requested by someone), improving the PowerShell lexer, and guiding some others through the process of adding support for their language (making sure all the tests pass, etc.) and answering misc. questions.
It was very cool to go through the process of writing some code that will actually be running on GitHub’s core infrastructure, even though it’s just a little piece. :-) It also feels nice to write open source software. I hope that when my wife finally finishes medical school and becomes a doctor and after my daughter grows a bit older that I will have more time to contribute to it.