Linux Lunacy V & Perl Whirl
Total Page:16
File Type:pdf, Size:1020Kb
SPEAKERS Linux Lunacy V Nicholas Clark Scott Collins & Perl Whirl ’05 Mark Jason Dominus Andrew Dunstan Running Concurrently brian d foy Jon “maddog” Hall Southwestern Caribbean Andrew Morton OCTOBER 2ND TO 9TH, 2005 Ken Pugh Allison Randal Linux Lunacy V and Perl Whirl ’05 run concurrently. Attendees can mix and match, choosing courses from Randal Schwartz both conferences. Doc Searls Ted Ts’o Larry Wall Michael Warfield DAY PORT ARRIVE DEPART CONFERENCE SESSIONS Sunday, Oct 2 Tampa, Florida — 4:00pm 7:15pm, Bon Voyage Party Monday, Oct 3 Cruising The Caribbean — — 8:30am – 5:00pm Tuesday, Oct 4 Grand Cayman 7:00am 4:00pm 4:00pm – 7:30pm Wednesday, Oct 5 Costa Maya, Mexico 10:00am 6:00pm 6:00pm – 7:30pm Thursday, Oct 6 Cozumel, Mexico 7:00am 6:00pm 6:00pm – 7:30pm Friday, Oct 7 Belize City, Belize 7:30am 4:30pm 4:30pm – 8:00pm Saturday, Oct 8 Cruising The Caribbean — — 8:30am – 5:00pm Sunday, Oct 9 Tampa, Florida 8:00am — Perl Whirl ’05 and Linux Lunacy V Perl Whirl ’05 are running concurrently. Attendees can mix and match, choosing courses Seminars at a Glance from both conferences. You may choose any combination Regular Expression Mastery (half day) Programming with Iterators and Generators of full-, half-, or quarter-day seminars Speaker: Mark Jason Dominus Speaker: Mark Jason Dominus (half day) for a total of two-and-one-half Almost everyone has written a regex that failed Sometimes you’ll write a function that takes too (2.5) days’ worth of sessions. The to match something they wanted it to, or that long to run because it produces too much useful conference fee is $995 and includes matched something they thought it shouldn’t, and information. A search function might locate ten all courses, course materials, and often it can be hard to predict what a regex will thousand matches. A database query might return the Bon Voyage Cocktail Party. do. This class will fix that. ten million records. What can you do? The first section will explore the algorithm that Perl provides a simple and familiar model for Introduction to Perl 6 (half day) perl uses internally to do regex matching. Under- dealing with such problems: The filehandle! Speaker: Allison Randal standing this algorithm will allow us to predict Instead of reading every file in one giant gulp, we This talk is an introduction to Perl 6, the next whether a regex will match, which of several can use filehandles to staunch the flow of infor- major version of Perl. The primary focus is on matches Perl will find, and which regexes will be mation, trickling it into the program in manage- the syntax of Perl 6, but beyond the syntax, we’ll faster than others. During this discussion we’ll able gulps. briefly look at the some of reasons behind the pause to discuss practical applications that illus- In this class, we’ll see several important modules, changes. What makes one feature more desir- trate features of the algorithm. We’ll examine the such as File::Find and DBI, which use this ap- able than another? What makes it Perlish? What essential but frequently misunderstood concept of proach. We’ll go inside these modules and see how makes it DWIM? How on earth does Larry decide? ‘greed’, and we’ll learn why commonly-used regex to implement filehandle-like data structures and You’ll leave with a better understanding of the symbols like ‘.’, ‘$’, and ‘\1’ might not mean what objects ourselves. We’ll see how to write functions changes in Perl 6, and the fundamental nature of you thought they did. that suspend themselves and then pick up later Perl itself. In the second section, we’ll apply our knowledge where they left off. We’ll learn how to take long- of the internals, examining at several common running slow functions and convert them into Parrot and the Perl 6 Compiler (half day) disasters, a few practical parsing applications, speedy filehandle-like data generator objects. Speaker: Allison Randal and some new features such that would have been This fundamental technique is a mainstay of hard to understand before. We’ll see an example Parrot is the virtual machine that will run Perl 6, programmers in other languages, but isn’t as well- of every regex metacharacter and modifier. We’ll as well as Python, Ruby, PHP, and a host of other known as it should be. You’ll be amazed at how finish with a discussion of some of the new optimi- dynamic languages. But more than that, it’s a many difficult problems become simple when you zations that were added in Perl 5.6, and why you suite of tools for compiler writers. It boasts its unleash the power of filehandles. should avoid the ‘/i’ modifier. own object-oriented assembly language, which is • Introduction a breath of fresh air to anyone who’s worked with • Inside the Regex Engine – Filehandles are Iterators XS. It even plays Tetris! This talk is an introduc- – Regular Expressions are Programs – Iterators are Objects tion to Parrot: what it is, how it works, and what – Backtracking – Common Examples of Iterators: readdir, each, you can do with it today. We’ll also dig into the – Quantifiers and DBI implementation of the Perl 6 compiler as a stan- – Greed • Building iterators and Examples dard compiler module in Parrot. – Anti-greed – File tree scanning – Anchors and assertions – Permutations – Backreferences – Genomic Sequence Generator • Disasters and Optimizations – Filehandle Iterators – Where machines come from – A Flat-File Database – Disaster examples – Searching Databases Backwards – Regex modifiers – Random Number Generation – Tokenizing • Alternatives to Iterators – New optimizations • Filters and Transforms: ‘map’ and ‘grep’ – Matching strings with balanced parentheses for iterators • Recursively-Constructed Iterators • The Semipredicate Problem • Alternative Interfaces to Iterators: Tied scalars and handles • An Extended Example: Web Spiders Testing Perl (half day) Developing Web Applications Using When Perl is Not Quite Fast Enough (half day) Speaker: brian foy CGI::Prototype (half day) Speaker: Nicholas Clark Speaker: Randal Schwartz Learn how to test your scripts and modules using This is a tutorial on how make Perl run faster, Perl’s test harness, Test::More, Test::Simple, and Randal presents an introduction to what Captain without having to use C or XS. In it you will learn the popular Test modules available from CPAN. Neil calls “the most significant web application ways I’ve found to make your troublesome slow You don’t have to be a Perl expert to start testing module since CGI.pm”, the recently released scripts go faster, and how you can try to avoid your creations. Spend a little time with testing CGI::Prototype module. some problems in the first place. and spend a lot less time debugging. Attendees Learn how every CGI application can be reduced The tutorial starts with ways to cheat and duck should know how to create and run Perl scripts, to “figure out what state we’re in ... what got sent the whole optimising problem, as that’s usually and experience using Perl modules is helpful but ... what to respond”, and how to represent that in a much better solution. I present a systematic not necessary. If you want to make your Perl more this flexible framework. The framework maxi- approach to optimising in general, and show robust and have more confidence in your work, mizes code re-use through easy creation of data the Perl tools available to help you carry it out. this course is for you. accessors and methods in a hierarchical class By explaining why the cause of slowness in Perl structure, including trivial one-off lightweight ob- programs often differs from your experience of Creating Perl Distributions (2 hours) ject classes for unusual situations or exceptions. compiled languages, you will gain a better feel for Speaker: brian foy The framework also leverages the industrial- the right types of trade-offs to make to gain speed. strength Template Toolkit for generating output. Learn how to put together a Perl distribution, The second half presents a smorgasbord of optimis- including an installer, a test suite, documentation, Full and robust “MVC” applications can be ing ideas to try out, and speed traps to locate and and all of the other things that go into sharing created using CGI::Prototype for the Controller, avoid. There’s bound to be at least one approach your creations with the world. Learn how to use Template Toolkit for the View, and Class::DBI for you’ve never seen before . Module::Release to distribute your Perl creations. the Model data. And although the name begins The tutorial will demonstrate the techniques using Attendees should know how to create and run Perl with CGI, this module is also fully compatible with specific real code as examples, showing code be- scripts, and experience creating Perl modules is mod_perl as well, either as a direct handler or as fore and after. Running this interactively will give helpful but not necessary. If you want to share your an Apache::Registry “script”. Even in CGI mode, a feel for what sort of results can be achieved. Perl code with the world, this course is for you. many things are lazy-loaded and can be cached, for rapid response! Creating Applications with PostgreSQL Introduction to Mod_perl 2.0 (half day) The last half of the class will be spent building and Perl (half day) Speaker: Randal Schwartz a complete application using CGI::Prototype, Speaker: Andrew Dunstan including deployed Class::DBI classes using DBD:: Learn about the heavy-lifting mod_perl interface SQLite for the database. In this seminar learn to use the features of Post- for Perl embedded in the popular Apache web greSQL in an application — with the emphasis server in this introduction.