Solving Interesting Problems by Writing Parsers

*
Accepted Session
Short Form
Beginner
Scheduled: Thursday, June 28, 2012 from 3:45 – 4:30pm in B302/303

Excerpt

What do you do when you have to parse weird message formats? You write parser! Or, in this case a regular expression. See how I make a moderately challenging problem easy for everyone.

Description

The problem: your client gives you a document covering the specification of some weird message format they want you to handle. It’s tab delimited, and pure ASCII, but actually some fields are multi-part and include tabs, and nothing is quoted. Oh, and actually there’s multiple different kinds of messages you will need to parse.

The solution: Using Perl 5.10+ and named capture groups we’ll create a data definition. Over the rest of the talk we’ll be taking advantage of a host of tactics (including re-parsing a regular expression) to see how we can take an interesting problem and make it fun again.

Although Perl will be used in this talk, and code will be shown, hopefully you won’t actually need to know any Perl at all to understand the ideas I run through. Although knowing might help.

Speaking experience

I speak for a living. I run Perl training courses, I speak at Perl monger meetings, and any conference that'll have me. ;) Bridge is an awesome conference that's accepted me a couple of times before and I'd love to speak here again.

Speaker

  • Jarich face

    Jacinta Richardson

    Perl Training Australia

    Biography

    Jacinta Richardson runs Perl Training Australia, a micro-business offering courses throughout Australia. Both as part of her job and a massive free-time sink, she is involved in running conferences (linux.conf.au 2007, Open Source Developers’ Conference (Australia) 2004-2008, Australian System Administrators Conference (SAGE-AU) 2008-2009), attending conferences, writing perl-tips, speaking at Perl Monger meetings whenever she’s in the right town, participating in on-line Perl forums and promoting women in IT. For her work in the Perl community, Jacinta was awarded the White Camel Award in 2008. When away from the computer, Jacinta enjoys scuba diving, cycling and baking.

    Sessions

      • Title: Don't Fear Unicode
      • Track: Cooking
      • Room: B201
      • Time: 2:303:15pm
      • Excerpt:

        Unicode isn’t new, but it still seems hard when your starting at the beginning and haven’t even been told the difference between a glyph, a codepoint, a character and a byte. Every year there are talks and tutorials at conferences about it, but if you haven’t grasped the basics, you can feel frustrated and lost much too quickly. This talk will cover the essentials of Unicode, locale and how they affect things like regular expressions, reading and writing files and sending data out to the world. Perl will be the programming language used to demonstrate these ideas, but much of the content should be accessible to all programmers.

      • Speakers: Jacinta Richardson