and privately I hear from folks who
tell me that
is an OO
superclass waiting to happen.
I can see their point.
If there ever was a case for code reuse,
the Marpa algorithm is one.
On the other hand,
any non-trivial use of
Marpa requires additional semantics,
so that the Marpa classes
walk, swim and quack
very much like abstract type classes.
Furthermore, the additional semantics
that Marpa needs comes in pieces -- semantic actions.
And even though these pieces
often share little code
with each other,
they interact heavily
as part of a specific
This means that their semantics are tightly coupled,
both to each other and to Marpa.
In short, Marpa's semantic actions look a lot
like the methods of a subclass.
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.]
While I'm rambling about AnyEvent (which I'll probably do more often), here's a note I'd like to give myself.
I'm using AnyEvent in a big app with objects (objects are, generally, good!) and I have a lazy attribute (lazy attributes are good!) of an AnyEvent timer. This is so the timer doesn't lose scope and will be closed.
At first the constraint was a EV::Timer object. On one machine this failed the type constraint while on another it worked. Some of you already know why. Then I changed it to a generic Object. This failed one as well. Why?
Because AnyEvent is basically like a hub for many event loops (ANY event loop, get it?) and apparently on one machine it used EV (a high-performance kickass event loop written by Marc Lehmann) while on another it hadn't. This meant that one AnyEvent->timer() returned an EV::Timer object while another returned an Array Reference. I removed the type constraint complete. It's now good. :)
When people hear I learned POE much faster than AnyEvent, they're usually surprised. I don't know why, but POE always made a whole lot of sense to me than AnyEvent. I've used POE in several projects (some pretty big) and it was always easy to work with, always had every component I wanted (except the SSH I wanted, though that exists too now) and the community was totally supportive and helpful. This is not unlike AnyEvent, though. I just haven't used it much.
Recently I started using AnyEvent. Not because I don't like POE anymore but because I wanted to be familiar with both. I have to say I felt quite at home with AnyEvent and started to write more and more elaborate stuff with it. I'm also trying to find more stuff to do with it, though it feels suited for more hardcore people than I. I have no idea where to start if I wanted to write an AnyEvent SSH client based on Net::OpenSSH, for instance.
If you've ever used AnyEvent, I recommend getting familiar with POE. Rocco Caputo and the community have done amazing work on it.
If you've ever used POE, I recommend getting familiar with AnyEvent. Marc Lehmann and the community have done amazing work on it.
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.]
uh yes I have a running grant and want to close it in 2012 even it will take much more effort than just written down in the proposal. I was a bit shy with that to don't get rejected. I don't want to open any new projects til I get this done.
Recently I updated Index A, which is still the most usable part, because its a quick overview of all builtins and operators. There were tons of details I did: setting new links, cleaning up things I didn't understood myself exactly, making better examples, more "see also" for similar commands. There were even some Perl 6 commands new to me, which I added and we are currently approaching the entry number 650. But the most important bit was: I understand the strange socialtext wiki syntax a bit better, so I could insert a lots of anchors inside of lines. So not only similar terms are now interlinked. Even better, many (and soon every) commands can be linked from outside which is good for automatically generated links if you need some quick explanation to a perl 6 term which is linked to an even more detailed explanation and to tables where it is summarized with similar things.
Thats the link-syntax for the builtin "if":
I came along this crazy code.
But first some short explanation. The perl compiler B::C saves the state of any program at CHECK time, and runs it later. That means every action in BEGIN blocks is frozen and then thawed on a potential another machine in later time.
Not all action can be frozen/thawed as we know from the common modules Data::Dumper or Storable
The compiler is better than those.
It can restore regular expressions which Storable cannot.
It can save the state of some IO object, which Data::Dumper can not.
It can save the whole dependency tree of code. Data::Dumper or Storable can only save data, not code along with it.
But some actions are really a bad a idea to be restored at run-time.
my $f;open($f,">&STDOUT");print $f "ok"
This is trivial. The fileno 2 is dup'ed to $f. All at run-time. Nevertheless you will not be able to freeze/thaw $f. The compiler can.