Shawn Moore will give a talk at YAPC::Europe 2012 described as
Roles are one of the most exciting and powerful features provided by Moose, but also one of the most misunderstood. This talk will explore, in depth, some common usage patterns (and antipatterns) for roles and how best to use them in the design of your classes. I will also talk about the philosophy of roles and how they fit in with the larger OO toolset.
"You get to create your own world,
and the only thing that limits what you can do
are the capabilities of the machine --
and, more and more often they days,
your own abiliites"
Linus Torvalds, Just For Fun, p. 74
As of
Marpa::R2 2.010000,
Marpa has two new, documented, interfaces.
(For those new to this blog,
Marpa is something new in parsing --
it parses anything you can write in BNF and,
if your grammar is in one of the classes currently in practical use,
parses it in linear time.
Marpa's parse engine is written in optimized C,
so that Marpa's speed is competitive with parsers of far less power.
Marpa's stable version is
Marpa::XS.)
Announcing Marpa's C library: Libmarpa
The first new interface is Libmarpa, a C language library.
Previously, Marpa's only documented interfaces required the
programmer to use it
through Perl. Using Marpa through Perl had major advantages --
it gave the programmer convenient access not just to Perl's capabiliites,
but to all of CPAN as well.
While I was browsing the CPAN the other day, I came across Coro::LocalScalar and I said to myself, oh, what a useful idea… it lets you localize globals to a thread. An important feature if you do anything in your thread with those pesky globals from perlvar, for instance.
But, said I, its calling convention is the rather gross Coro::LocalScalar->new->localize($scalar); and it’s implemented using tie and only for scalar values. It would be nice to have a new keyword and support for arrays and hashes as well. As it happens, I’d also recently run across Begin::Declare, which is a Devel::Declare based module that provides custom variable declarations.
A few hours later, with the example of Begin::Declare to work from, I bring you Coro::Localize (now on a CPAN mirror near you). It’s localization is achieved through a combination of Coro’s on_enter /on_leave blocks and Data::Alias.
If a distribution contains multiple modules, how should VERSION be set in each module?
There are a number of options:
Every module has the same version number, and it's the version number of the dist.
Each module has its own version number. The version number of the dist might be different from all of them, or it might be take from the lead module, if there's an obvious one.
The lead module has a version number defined, but none of the other modules have a version defined.
The first option makes most sense to me, and until recently I thought it was the approach most people follow. Sure, it's a pain updating version number in every module for every release, but Dist::Zilla (and other tools?) can handle this for you automatically.
David Leadbeater will give a talk at YAPC::Europe 2012 described as
The RE2 regular expression engine uses a data structure called a trie to match regexps. However perl itself can use this data structure under certain circumstances. We'll investigate Perl's behaviour, apply some insane optimisations and compare with RE2 (via re::engine::RE2).
This question came up recently on the comments of a blog post. I can’t really answer that question. What I can try and answer is how to get more recognition as a Perl programmer and how to create a public portfolio, making it easier for you to find a job.
This is mostly a clean up of what I originally wrote in the comment, and I would thank you to add your own comments. John Napiorkowski has proposed a recruiters resource page on Perl.org and is working on how such a page would look. This information might be useful for a counterpart to it, completing both questions of how recruiters could reach programmers and how programmers can be more visible to recruiters and other viable employers. John has written a first post on his website. That’s a good place to start.
Due to server issues last night, a number of people were unable to submit their surveys. As such I have now reset the deadline to midnight on Saturday, so you have an extra day to complete your surveys and evaluations.
Unfortunately, the backup process ran last night and filled up the disk, as I hadn't gotten around to archiving the backups from past few weeks on to the main backup server. Many apologies for any inconvenience caused.
Rest assured, the automatic backup update has now moved higher up my priority list :)
Last month I was lucky enough to attend YAPC::NA in Madison, WI. Among the many spectacular talks, impressive people, and events there was a raffle that took place for conference attendees. With all proceeds going to the Perl Foundation, I contributed $100 and threw my raffle tickets in to two buckets: lunch with Larry Wall and some ThinkGeek swag.
Unfortunately, I didn't get to dine with the great one, but at one of the evening events I did win the ThinkGeek grand prize: a remote controlled outdoor helicopter (picture at right).
Now, at the time, I was slightly underwhelmed. My first thought was, "Wow! I won! Wait .. I won? How am I going to get this thing home?" My second thought was, "What the heck am I going to do with a remote controlled helicopter!?"
Windows are the main element in any Prima application. Windows belong to the Prima hierarchy, but at this time we are interested on windows simply being windows.
Prima offers two basic types of windows: the MainWindow and the Window. The main difference is that destroying a MainWindow will destroy the application, causing the closing of any related windows, dialogs, while closing a Window does not destroy the application.
The creation of both types of window requires some minimal setting. Many others can be used to get the look and feel and the behavior intended.
The settings are of two types:
Parameters indicate properties of the new window, as size, the text to be shown on top, the menu to be shown, color of the canvas, status of windows as e.g. maximized or minimized, border colors, and so on
Events indicate the way the window would react on events. The one almost always present is the paint event, which shows the operations that are performed when the window is created and then painted
The Lacuna Expanse is a massively multiplayer empire builder game written in Perl. Long ago we open sourced the iPhone and web clients for the game, today I'm pleased to announce that we're open sourcing the server as well.
Some of you may be asking, "Why would you do that?" and "Does this mean you're shutting down the server?"
No we're not shutting down our server! As long as it's at least paying for itself, we'll continue to host the server and all related infrastructure forever.
Damien Krotkine will give a talk at YAPC::Europe 2012 described as
Message::Passing is a new Log interoperability and aggregation framework, by Tomas Doran. He's doing a proper introductory presentation of it.
This talk is a more practical presentation of how to create meaningful log messages with Log::Message::Structured, how to send them to Message::Passing and how to configure Message::Passing. It will also show 2 frontend, one small Dancer application using MongoDB, and an ElasticSearch frontend.
Object orientation is a great benefit for programming but also a key for learning.
Prima offers a very large set of objects to the needs of development. As the human brain can group together a quite limited number of objects (four to seven depending on individuals), having a large number of objects can make the whole stuff unmanageable. That is the reason that makes our brain starting with one topic, then a first level of some different groups of things, and then puts at the bottom of each one, the objects that can be a kind of that.
This is the way we can manage large sets of objects, buy putting them in a hierarchy. This way the mind works inspired the pyramid principle by B. Minto, as a way to produce documents while validating the ideas.
So, to get off of the numerosity that affects Prima as any other real world tool, we have to depict what type of objects we have, at first.
The YAPC::NA 2012 Survey closes on Friday. If you have not already done so please go fill out the survey. It will help next year’s organizers plan a better conference. Check your email, you got an invitation with a code to fill out the survey. Fill it out now!
Damien Krotkine will give a talk at YAPC::Europe 2012 described as
This in *not* a talk about doing a hello world in Dancer, as there are plenty of it. This is a real-life example of using Dancer to address a problem in an elegant and powerful way
At $job, we have cpan mirrors. We want them to stay a bit behind the real CPAN for stability, but we have a tool to update modules from the real CPAN to our mirrors. Cool.
I wanted to have a web interface to trigger it, and monitor the injection. This problem is not a typical one (blog, wiki, CRUD, etc). Here we have a long running operation that shall happen only one at a time, that generates logs to be displayed, with states that need keeping. In this regard, it's interesting to see how Dancer is versatile enough to address these situations with ease.
This talk details how I did that, the technology I used, and the full source code (which is quite short). I used Dancer + WebSocket + AnyEvent + Twiggy + some other stuff.
This talk doesn't require any particular knowledge beyond basic Perl, and very basic web server understanding.
The Conference Surveys for YAPC::NA 2012 will close this Friday. Of the 447 listed attendees, we've had 110 responses to the main conference survey, 404 talk evaluations and 7 course evaluations. All this is great, but it would be even greater to see even more responses.
If you attended the YAPC::NA conference in Madison last month, and haven't already completed the surveys, please check your email for your personal keycode, and take a few minutes to complete the survey. It really does help to improve the event every year.
In addition, please take a few minutes to complete talk evaluations for those that you attended. The speakers put a lot of work into their presentations, preparing slides, researching their subject matter and working up the confidence to stand up in front of people who they don't know. Getting feedback those listening can really help them to improve their presentation skills for future events.
Just a quick note : if you plan to use
MooseX::Singleton, beware ! It
is easy to use and it implements properly what it claims, however it is quite
slow.
If my profilings are corrects, each call to ->instance() calls meta(),
get_metaclass_by_name() one time, and blessed() two times.
So for now I'll avoid it and implement a simplified version using something
similar to this :