Yet another stupid mistake #4
use Plack::Builder;
Instead of:
$app = builder { ... };
I wrote:
$app = sub { builder { ... } };
Now watch the weird errors you'll get if you do the same.
use Plack::Builder;
Instead of:
$app = builder { ... };
I wrote:
$app = sub { builder { ... } };
Now watch the weird errors you'll get if you do the same.
I’m pleased to announce that Grant Street Group has decided to sponsor YAPC::NA 2012. Here’s how they describe themselves:
Grant Street Group is a Software as a Service pioneer. In 1997, our company hosted the world’s first online bond auction for the City of Pittsburgh, Pennsylvania. Since this first auction, over 3,100 clients have used our software to process financial transactions exceeding $11 trillion.
Today, Grant Street Group is a growing company providing Software as a Service in fields such as electronic payments, auctions, and tax collection. Our customers include banks, financial companies, and state and local governments.
Are you a Perl expert? Do you prefer programming at home instead of getting interrupted at the office?
Do you want to tackle challenging software engineering problems in a well established and fast growing company?
Do you want to work with talented and smart developers? Build elegant and scalable solutions for large applications? Meet the challenges of deadlines while still delighting customers? Then you’d enjoy working at Grant Street Group and we’d like to hear from you.
[From the YAPC::NA Blog.]
I'm on a bit of a roll about unpacking archives. Last week I wrote about peeking into archives and recently I was wondering about extracting archives.
The classic tool for extracting archives is Archive::Extract. This module was originally written for CPANPLUS and has been in the Perl core since 5.10.0. It tries a variety of methods for extracting archives, from pure-Perl modules such as Archive::Zip and Archive::Tar (portable but slow) to external tar and unzip commands (unportable but slightly faster).
Having played around with libarchive, a "C library and command-line tools for reading and writing tar, cpio, zip, ISO, and other archive formats", I wondered if it would be interesting to use it instead.
Behold my newly-written module Archive::Extract::Libarchive. This uses libarchive to extract archives, extracts most archive formats and is quite fast. It requires libarchive to be installed.
How fast? Well, it depends on what you are extracting. If you happen to be extracting all the current CPAN distributions (for a total of 7.1G), then Archive::Extract (with PREFER_BIN) takes about 20 minutes while Archive::Extract::Libarchive takes about two minutes.
Yet another tool for your archive extracting toolbox...
I'll introduce PrePAN to you here. PrePAN is a website for all Perl Mongers, especially for those who have intention to upload their Perl modules to CPAN. PrePAN aims to be a good place for them to make discussion about Perl modules pre-uploaded to CPAN (`PrePAN' is named after that).
I introduced the website at YAPC::Asia 2011. Some Perl mongers have submitted their modules already. Please give a look at them at PrePAN.
You may wirte a useful module for your job or your own purpose. You may think it might be worthy for others. However, you may worry about something like below:
About the Perl Module Ideas posting series. Previous posts: #1.
* Archive::Manager (or Archive::Writer) using libarchive. There is now already Archive::Extract::Libarchive but a generic interface for writing would be nice too.
* Something to replace Log::Log4perl for my Log::Any::App (or Log::Any in general, so maybe I'll end up with a Log::Any::Adapter::Something). Log4perl is nice and all, but its startup is a bit slow. I don't need all its features. All I need to do is combine the various Log::Dispatch modules and give them categories. I know, there are already too many log modules on CPAN, so I'll look at them first before reinventing the wheel.
* A front-end (or tutorial, or something) for Marpa. Being a parser newbie, I always end up with Regexp::Grammars as that's the easier one to use.
* (Continuing idea on previous post) A generic framework for App::perlmv and App::perlmp3tag and other similar application. Or even, a generic framework for application that works on a tree (not just directory tree).
* A DateTime::Format module to parse natural dates/times that is easy to translate. Currently DateTime::Format::Natural is English-only and hard to translate.
I've just released a new module called iTransact::Lite. It's just a simple wrapper around the iTransact XML Connect payment gateway web service.
It does all the hard work of signing, serializing, and submitting your requests to their web service. However, I call it "Lite" because it doesn't do any document formatting or response handling. Therefore it still requires knowledge of the web service documents. Luckily, those are well documented on iTransact's web site.
If you're looking for a new payment provider, you could do worse than iTransact, and with this module, you have fairly easy access to the service. This module is in use in The Game Crafter and our forthcoming Mob Rater service.
YAPC::Asia Tokyo 2011 was record breaking, but I think we just broke one more record: namely, number of blog posts
We collected at least over 150 blog posts (~157) from our attendees about YAPC::Asia Tokyo 2011. We had 672 attendees total, so that means about 23% of our attendees wrote something in their blog. I'm pretty sure this will pay off in the future, as it will be much much easier for us to tell our would-be sponsors and attendees what YAPC is like
BTW, this year punytan created a simple form for people to submit the url, and a lot of people including myself just kept collecting them blog entries. punitan++.
If you're an organizer, make sure to tell your attendees that their YAPC ain't over until you blog about it!
I am very happy to announce that Marpa::XS is now beta. Marpa::XS will kept stable. Changes to its interface will be especially avoided.
Marpa is an advance over recursive descent and yacc. I hope the Marpa algorithm will become the standard parser for problems too big for regular expressions.
Just thinking aloud about a list of things people using Perl want.
Here is what I want:
What do you want?
We’ve opened up the schedule for YAPC::NA 2012 so you can view the talks we approve as we approve them. In addition, we’ve opened up the wiki so you can start planning your BOFs and other activities.
[From the YAPC::NA Blog.]
This review is now hosted elsewhere.
For a very long time, I was rather stuck because, as a scholar in the humanities who uses LaTeX, I could not get people to use LaTeX because they could not annotate people’s work without a professional copy of Acrobat. Well, I have figured out how to do this using Evince. How you may ask? It is a simple process but it is rather hidden and it should be more prominent when looking at PDFs.
These instructions should work on Evince 3.2 in Xubuntu 11.10.
Yesterday was the last day of the german perl workshop.
Denis Banovic started with a live demo demonstrating development and deployment of a dancer app in the "Cloud". It looked very easy to do.
Karl Gaissmaier was the next speaker explaining a lot of details about Captive::Portal, a hostspot software his university developed.
Stefan Hornburg talked about various advanced features of and his experiences with Dancer.
After lunch, Rolf Langsdorf held a very interesting talk comparing Perl and JavaScript. After that, Herbert Breunung had two talks: Thoughts about better documentation and a comparison of Hg and git.
And the last two speakers were Richard Lippmann discussing the usage of the right language for programming projects and Renée Bäcker with tips and tricks for doing talks.
All to gether, this was a great workshop. I will definitely attend next year's workshop which is in Erlangen from March 5 to March 7, 2012.
Ricardo Signes will be giving a talk at YAPC::NA 2012 that he describes as:
There are almost twenty thousand lines of documentation describing what has changed since perl 5.8. Those docs are where you can find out that the // operator is awesome, or that the “r” flag on substitution is going to save you typing and bugs, or that you can stop worrying so much about your exception handling. Unfortunately, they also contain a lot of talk about things like GSVS_mg_SLOPPY or engine derecursivisation or what happens now if you try to reset a glob reference during global destruction. With most common Unix distributions now shipping Perl 5.12, and more and more workplaces moving off 5.8, many programmers are faced with reading these documents. Instead, you can come listen to the forty minute summary.
[From the YAPC::NA Blog.]
I'm considering ditching my RDBM for my next application and using ElasticSearch as my only data store.
My home-grown framework uses unique IDs for all objects, which currently come from a MySQL auto-increment column, and my framework expects the unique ID to be an integer.
ElasticSearch has its own unique auto-generated IDs, but:
KpSb_Jd_R56dH5Qx6TtxVA
' and I'd say are less human-readable than an integerInitially I thought I could keep MySQL around as a ticket server, as described by Flickr but then I wondered if I could achieve the same thing by abusing ElasticSearch's built-in versioning, allowing me to ditch MySQL completely, and give me a distributed ticket server with high availability into the bargain.
The logic is simple: when you index a document in ElasticSearch, it returns a new version number for the document, which is always incrementing and is guaranteed to be unique across the cluster.
This is a module I wrote a few weeks ago and intended to share sooner for feedback, suggestions and guidance.
The module was born out of my discovery that although there’s PSGI support in recent versions of Catalyst the session’s are discrete entities. As I was experimenting with mounting multiple PSGI apps, pretending to be one, I didn’t want to have to manage multiple sessions, or worst still, keep multiple session configurations in sync.
The initial release, documented below, does work in the cases that are relevant to me. I’m concerned that I’ve abused some methods or taken some bad design choices to solve the problem as I percieve it. I’m worried that there are sharp edges and stupid bugs in places I simply haven’t considered yet.
I’m always happy to receive feedback, constructive criticism and patches on my modules and I’d really like to get some feedback, better solutions and tests so that I feel more comfortable dropping the experimental warning in the future.
Yes lichtkind moves around the continent. Dates are 16-18 Aug in Riga, 8-9 Okt Turin, 19-21 Okt Frankfurt and 4-5 Nov in Vienna and Bratislava. Which stands out for me is that I will have given then at least 11 talks (4 different) + 3 lighting (always the same) spanning 5 1/4 hours. I really wanted know where are my limits and how far my skills in talk preparation go.
And as a surprise I found, start very early with you preparation. I mean by that that you can still hack together your slides or storyline quickly together. that is fine. But start you research, your search for sources, quotes and knowledge very early. that doesn't work well under time preassure. As soon you found something worthwhile, write it down. Organize your knowledge: loosely but searchable. having something so say that fits the situation with the attendees and recent discussion is the most important thing i believe. you have to live with the topic for a time and see it from different angles. talk with people about it. no matter how good you are, theres always something to learn even its just what others interests about that subject.
btw, same is true about writing docs, but wait, ... that is the content of one of the talks. later ... :)
Mike Friedman will be giving a talk at YAPC::NA 2012 that he describes as:
At SocialFlow, we initially built a simple job queue system using a relational database and a daemon for running workers. While this model is sufficient for a relatively small volume of jobs, an increase in scale resulted in problems with concurrency, failover, and efficiency. This presentation examines the process and design that we used to move our jobs system to the Redis structured data store, and the simultaneous development and design philosophy behind the Redis::Client CPAN module.
The presentation will cover the structure of job queues, an analysis of the pros and cons of relational vs. non-relational data-store models for queues, a brief introduction to the Redis platform, and code examples demonstrating a simplified system.
[From the YAPC::NA Blog.]
It eliminates method polymorphism.
Makes it simple for over-riding inherited method, as there is only one method.
Now that makes Liskov Substituion simpler to implement.
As many of you know, tied variables lend extra magic to an otherwise normal Perl variable.
One of my favorites comes from File::chdir
. This provides your Perl script with $CWD
and @CWD
. When a folder is assigned to $CWD
or pushed onto @CWD
the working directory is changed, in a platform independent way. The coolest thing about this is if you first local $CWD
, then this change in the working directory is done locally to the block, and is undone as the scope ends.
I just released version 0.03 of Tie::Array::CSV
. This module allows accessing a CSV file (or other separator parsable by Text::CSV
), using a Perl array.
Underneath the hood there is more tie magic! Tie::Array::CSV
uses Tie::File
which provides random line access to a file as a Perl array. Using this module in mine allows the module to pick the row just like my users will, as an array index.
Version 0.03 adds a new
constructor. So that the users don’t even need to be aware of the tie
usage, which looks a little strange at first.
As far as I am aware, other languages don’t have anything like tie
. Just one more reason to love Perl! Which other Tie classes do you find especially interesting?
blogs.perl.org is a common blogging platform for the Perl community. Written in Perl with a graphic design donated by Six Apart, Ltd.