I recently started trying out different cloud providers to find one that meets my Perl needs. I see many uses for cloud computing in the form of on demand, ubiquitus computing nodes that I can launch with a range of "hardware" specifications. This translates directly into saving money, the prices are different for each hardware plan and you pick what you think you need and erase it when you are done. This article is focused on using Joyent to run Perl applications, not using Perl to interact with the Joyent API, that is a future article already in the works.
It's like a LEGO blocks to making web applications for me. I'm using the Mojolicious as a web application framework. Mojolicious is a very good framework that is thin and simple, but it does not support a model, database accessing, form validation and others. So, we should choose CPAN modules to construct my web application and use the modules with the framework.
On YAPC::NA, I'll introduce my best practices of choosing CPAN modules and composing for web application that I'm developing in Japan. My application depends on many modules written by Japanese authors. The libraries I'll talk about are below.
Plack - Interface between web applications and servers
I'll be speaking about using (and abusing) the MetaCPAN API on day 2 of YAPC::NA. If you think you might be attending (or even if you're not), I thought I'd post some links to some helpful info. No, you don't need to do any prep for this talk, but for those who are interested, this is just some background info that will help you get your head around MetaCPAN.
This talk will touch on and expand on some of the points I discussed last year, so you could have a quick look at last year's slides. I've also put together some sample code for tomorrow's talk. If you use Carton, you can follow the instructions in the top-level README to get started in just a couple of minutes.
On a barely related note, iCPAN 2.1.0 is now in the app store. I used it on the flight down to prepare for my talk. Seemed to work well for my purposes. :)
It started off with just a simple problem; a friend recommended some songs from various artists on YouTube. I go and listen to the songs, like them, and start looking for more from the same artists. Browsing around I find some interesting playlists but notice some of them have the same songs and I think "I'll just download the playlists and remove duplicates with a quick script".
Welcome to Perl 5 Porters Weekly, a summary of the email traffic of the
perl5-porters email list. I'll be at YAPC all week, so be sure to say
"Hi!" if you see me or come to my talk.
A friend of mine, with whom I am teaching Old Irish, asked for some diagnostic features of Middle Irish so I thought I would put it here to help them and anyone else who may want to know.
Introduction
There are many different features which mark the change from Old to
Middle Irish. Much of this is discussed in much more detail in Kim
McCone’s ”A First Old Irish Grammar and Reader” pp. 173—217. I will give a small précis of this here. For a more
full account for verbs, see Kim McCone ”The Early Irish Verb” pp. 163—240. A full analysis by Liam Breatnach is detailed in ”Stair na Gaelige” pp. 221—333. The
main problem with Breatnach’s analysis is that it is entirely in
Modern Irish so unless you know that language first, or you enjoy
typing and trust Google Translate, it will be inaccessible to you.
If you have a good web hosting, you may have run into a pattern, where you
are uploading files to it for other people to download and need to find the
URL where they were uploaded to. Thing is - recalling the exact
Rsync (= a file
uploader) command and then going to the web browser to access the URL
is time-consuming, and repetitive.
sky,
written in Perl using Moo and available on CPAN, aims to fix all that.
In the Perl world at this moment,
a lot is being said about the consequences of bad design.
And it is useful to study design failures.
But the exercise will come to nothing
without a road to good design.
This post will point out four
Perl-centric
projects that
are worth study as models
of good design.
The projects are
ack,
cpanm,
local::lib and
perlbrew.
Each of these is perfect
in the older sense of "having all that is requisite to its nature and kind"
(Webster's 1828).
If you are into Perl,
they are all widely useful,
and looking at them as a potential or an actual user
is the best way to gain an appreciation of the art behind them.
This year we're using HRForecast to keep track of ticket sales and talk submissions for YAPC::Asia Tokyo 2013, and it's looking good. I highly recommend you using these tools to visualize your data
Among other things, I will briefly discuss a series of tutorials I created titled Notes from a Newbie, which document the creation and deployment of yardbirdfanclub.org with Perl Catalyst on shared hosting. They are intended for a Perl Catalyst Newbie who would like to study the creation and deployment of a simple Perl Catalyst application.
Vicky Brasseur has started a project on GitHub to collect information about companies that use Perl. I think this could be a huge asset to the Perl community. Just knowing who uses the language is immensely helpful to job seekers, managers, module authors, language maintainers, conference organizers, and entrepreneurs.
The database has already been seeded with information extracted from several years of job postings[1]. So if your company is listed, please make sure the information is correct. And if it's not listed, then feel free to add it. All you have to do is fork, edit the CSV file and make a pull request. You can do it all right in your browser at GitHub.com!
If you have a bit more bandwidth, then consider contributing some code too. I would love to see a web form that makes it easy for folks to add & update data, or some online tools for slicing and filtering and graphing the data. There are lots of really interesting possibilities. And you'll be helping to inform the future evolution of Perl!
I was pleasently surprised to find out that there is already a Plack Middleware that improves security against CSRF attacks. And it's very easy to use.
I'll demonstrate with a Catalyst example but any app running with Plack can make use of it.
In your application you simply configure the middleware.
(Note: Plack::Middleware::CSRFBlock depends on Plack::Middleware::Session)
I've always found it difficult to comprehend the relationships between all the Perl modules in a large application. So for a long time I used GraphViz to create dependency graphs. But I was never quite happy with them because they were fairly static and hard to understand once you had more than a couple dozen modules in play.
Then a few weeks ago, I discovered D3. The sample gallery has a very nice interactive dependency graph. Since it is organized in a circle, it scales to a large number of modules very well. So now, every repository on Stratopan will have graphs like this one (click the picture at left to view the interactive demonstration).
The graph isn't as intuitive as I would like yet, so let me explain a bit... What you're seeing are the relationships between all the distributions on a "stack" in a Stratopan repository. In this case, the stack contains everything required to build, test, and run Perl::Critic. When you hover over a distribution name, the relationships are highlighted. Dependencies (i.e things it requires) are connected with red lines, and Dependers (i.e. things that require it) are connected with green lines.
Over time, I hope to add more helpful visualizations like this to Stratopan. If you've got some ideas, I'd love to hear them.
When I first read about the idea to remove CGI.pm from core, I was like "Yeah!". And then I thought about it and I was like "meh".
Who cares? Your typical noob that needs to be protected from the horrors of CGI.pm is not the kind of guy who builds his own perl. He is also not the kind of guy who uses an up-to-date perl. He probably has some company server running 5.8 or he might use whatever his hoster installed. Before he learns that there even is a core, he'll have a zoo of spaghetti cgi-scripts that won't work when using strictures.
But here is someone who will care about a missing CGI: the package maintainers of all the Linux distros out there. They will have to decide whether to pack CGI.pm into their main perl-package or whether to put it in its own new package. Since there are about a gazillion packages that quietly depend on CGI.pm, their most likely choice will be the former option.
So what I am trying to say is: You will not kill CGI.pm by removing it from core. But removing it from core will also not be noticed by any kind of user who doesn't know how to use a cpan client.
I just read chris fedde's response to Ejecting CGI.pm From the Perl Core, my head nodded in agreement from start to finish. It helped me clarify a few of the thoughts and concerns I've had bouncing around in my head for the past several days.
So here goes: I think it would be a mistake for perl core to not "Dance with the one that brung ya".
How many of us are using Perl because of CGI.pm? When I first got my feet wet with programming it was for the web, using Perl. It was a good month before I got a feel for where perl ended and CGI.pm began. At first they were very much one in the same.
Marpa works very differently from the parsers
in wide use today.
Marpa is a table parser.
And Marpa is unusual among table parsers --
its focus is on speed.
The currently favored parsers use stacks,
in some cases together with a state machine.
These have the advantage that it is easy
to see how they can be made
to run fast.
They have the disadvantage of severely limiting
what the parser can do and how much it can know.
What is table parsing?
Table parsing means parsing by constructing a table of all the possible parses.
This is pretty clearly something you want -- anything less means
not completely knowing what you're doing.
It's like walking across the yard blindfolded.
It's fine if you can make sure there are
no walls, open pits, or other dangerous obstacles.
But for the general case,
it's a bad idea.