Chris Prather will be giving a talk at YAPC::NA 2012 described as:
Most Perl developers are employed by large corporations, but many dream of what it would be like to strike out on their own. Tamarou is a company that has done just that, and we’re here to tell the tale of what it’s like.
It’s been a wild ride so far, and we’ll discuss the illicit details of what we’ve learned over the last two years, and what we probably should have learned.
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. :)
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.
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.
1st sample:
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.
Recently an article was published that claimed Perl usage in websites had dropped below 1%. For a Perl developer this seems ridiculous on the face of it. As it turned out, it was ridiculous, since the error margin was 17.6%. Meaning that for 17.6% of the sites they surveyed they could not even detect that they were using Perl. And they only survey the top 1 million, out of the 175 million active sites Netcraft reported. So the validity of these numbers is highly suspect.
So, all is fine? Catastrophe averted? Heh, not really.
Here's the issue: To a Perl developer this might seem ridiculous. Most of us are aware of how many websites use it under the hood. But to the average person it seems perfectly reasonable. The suffixes ".php" and ".asp" are ubiquitous and lets everyone know what the website is running on. Ruby and Python operations are proud of using their languages and flaunt it. To an average person it might even seem like there are more Ruby and Python websites.
Yet Perl is practically invisible. It drives a lot of sites, businesses and livelihoods worldwide, neither of which make any indication of the tools they're using. Let's take a look at a random sampling:
These are sites that run on Perl, but to look at them you'd never even know it. Perl has advanced route dispatching mechanisms and its great modularity makes it possible to write an entire website as a single application. In fact, for most modern Perl web frameworks it has become customary to run web applications as self-hosting services to which a web server connects via a network port. Perl has made it very easy to design one's url structure exclusively around the data one serves, which has made it entirely impossible to tell for most Perl-driven sites that they actually are Perl.
Now, all of these sites have reasons to be proud of the tools they use. Some of them indeed are very proud, booking.com for example has donated 150.000 USD last year to Perl development and others on the list have donated smaller amounts as well or are supporting Perl conferences and spend a lot of money to have a presence on Perl conferences. Those on the list who are hiring, are also hiring Perl developers, some of them quite prominently. Even others on the list are websites created for the express purpose of serving the Perl community.
Yet none of them even mention Perl on their frontpage or even link to perl.org. I know Perl doesn't have nice and easy promotion buttons like Python or PHP do. But a simple text link does the job just as well. Just a simple "Built with Perl" in the footer or a sidebar would show that you care about Perl, would make it easier for job seekers to notice that you're looking for Perl devs and would raise the visibility of Perl and make it a more appealing choice for students looking to learn a dynamic language.
I do not believe this is done out of any maliciousness and that it's rather just a simple oversight, something that was never considered. As such i've sent a small email to each of those sites, asking them to consider this issue and to please add a link to perl.org or to weigh in on why they would not do it. Maybe they are issues that the Perl community can fix.
Similarly, if you own a site yourself that runs on Perl and does not link to perl.org:
I don't want this blog to be political, so all I will post here is this: I have posted some views on SOPA on my non-Perl blog. If you would like to read them, click here. To paraphrase Wikipedia, although this blog is neutral, its existence is not. Thank you.
Lately I've been choosing Indonesian names for my software projects/codenames, beginning with Sah, and then Rinci/Perinci, Riap, Serabi. Others will certainly follow. These names are words straight from the dictionary, but I plan to extend to proper nouns like island names (we have 17k+ of those!), characters from traditional stories, words from dialects (why, we have hundreds of living dialects too!), famous people, and so on.
The first reason for this is running out of good, distinct English names. Since we have already come to the point of picking household names like "cucumber" and "tasty pie", why not use these household names from a different language altogether.
The second reason is to catch up. Why should non-Indonesians have all the fun picking Indonesian names? :-) This blog post will also lists software projects/products with Indonesian names. I will separate the list as two, those started by Indonesians and those which are not. I will add to the list when I spot new ones.
I was thinking about writing a blog post on TDD, but then I discovered that chromatic had beaten me to it. Damn that chromatic for saying everything I wanted to say before I had a chance to say it! But, seriously: go read that if you haven’t already. Anything I might add to it would be mostly redundant. Although I do have a post on the other blog where I discuss TDD in the context of techno-dogma and our fear of it. You might find it interesting.
Also, big thanks to Gabor for including last week’s blog post in the Perl Weekly this past week. If you haven’t yet signed up for PW, you should do so now! It’s invaluable.
London Perl Mongers organises technical meetings every two months. The technical meetings are a chance to find out what has been going on in the Perl community, what techniques people are using and how Perl integrates with other software.
The next technical meeting will be on the 26th January 2012 from 7pm to 9pm (you may arrive earlier, please sign in at the reception). You have to sign up to attend, see below.
It will be hosted by NET-A-PORTER.COM and held at their offices in Westfield London Shopping Centre. Many thanks to Kristian Flint, NET-A-PORTER.COM and everyone involved for allowing us to use this wonderful venue.
Talks
Gianni Ceccarelli - "Dispatch tables" inside regexes and nasty tricks in the name of speed
Paul Makepeace - Ruby cuteness applied to testing & webserving
Zefram - Customising ops for semantic fun and performance profit
Tomas Doran - Using ZeroMQ and Elasticsearch for log aggregation
Today I just want to thank you to all CPAN Testers. I do not know if there are such initiatives for other programming languages, but you are awesome. So many architectures, so many operating systems, so many Perl versions.
I hope to help someday. I just need to find some time for it.
Contrary to popular belief you can install almost all CPAN packages under 5.6.2.
First Step:
Set the urllist in your ./cpan/CPAN/MyConfig.pm to http://cp5.6.2an.barnyard.co.uk/
and rm ./cpan/Metadata and the 3 outdated
sources/authors/01mailrc.txt.gz sources/modules/02packages.details.txt.gz sources/modules/03modlist.data.gz
Then start installing.
There are a couple of authors who agressively used to boycott 5.6 in their dependencies (schwern, dagolden, kenwilliams, rsignes), but it is quite easy to fix this. So after a couple of refused installations do this:
cd .cpan/build
grep 'use ExtUtils::MakeMaker' */Makefile.PL
sed -i 's/use ExtUtils::MakeMaker 6.3[0-9];/use ExtUtils::MakeMaker;/' \
*/Makefile.PL
Module::Build can also be installed (0.34), DBI (1.604), Moose (0.40), DateTime (0.66) and many more.
A. Sinan Unur will give a talk at YAPC::NA 2012 described as:
Personal response systems (PRS) are small, dedicated pieces of hardware with a bunch of buttons on them. They transmit key presses to a dedicated receiver.
PRS are used in large classrooms to track and measure student attendance and participation, and to record responses to questions interspersed in a lecture. The software that comes with these systems is usually closed source, not-extensible, and generally lame.
Twilio provides a service that will contact a web application at a designated URL in response to text messages. Cell phones with messaging are almost ubiquitous on college campuses these days. Using mobile phones students already have along with open source software would alleviate a lot of the headaches teachers go through when implementing proprietary solutions.
I am putting together such a system using the Perl web application framework Dancer. The system will include a web interface for the lecturer to manage questions, visualize responses etc, and I hope it will demonstrate the superiority of such a system to a combination of clunky proprietary hardware and software.
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.
Marpa::XS
is a general context-free parser.
What does that mean?
For a grammar writer, it means that he doesn't
need to worry that the next rule he adds to the grammar
is the one that makes it hit the invisible wall that
most other parser generators set up.
If you can write it in BNF, Marpa will parse it.
Which makes
Marpa::XS
good at incremental development.
As you develop your Marpa grammar,
you can track the tradeoffs you are making
between features and efficiency.
Chances are,
if your grammar is unambiguous or lightly ambiguous,
there are no tradeoffs --
you're getting everything you want in linear time.
Marpa is linear for every class of grammar currently in
practical use.
Marpa is also linear with many ambiguous grammars
and, in the worst case,
Marpa's time complexity
is what is accepted as optimal in practice.
Whatever the time complexity that you're seeing with Marpa,
it's probably as good or better than you're going to get
from another parser generator.