Yet Another Dancer Site

So we launched the new look moonfruit portal site today:

http://www.moonfruit.com/

It got some coverage in techcrunch.

It uses the rather awesome Dancer.

I mentioned it on the Dancer-users list, who seemed to like it, and wanted to know more. Below is reproduced from a post to the dancer-users.

The main Moonfruit service allows users to create sites in flash in a handy draggy droppy way (it being flash).

To do this we have a sprawling, slightly legacy, (but getting much better) Plack based set of API's.

The plan was to upgrade the portal from this (which was basically completely static html).

To a shiny web 2.<whatever we're on now> dynamic system.

So we have 3 collections of routes (ish):
MF-Portal/lib/MF/Portal.pm MF-Portal/lib/MF/Portal/API.pm MF-Portal/lib/MF/Portal/Support.pm

1: Serving the HTML

CPAN::Reporter fails to send through Metabase with new LWP 6

I tweeted something last night knowing full well that few people see my tweets and most of those that do aren't programmers. So I decided to post here in case anyone else experienced the same problem.

I installed the new LWP (v6) last night via cpan.

The next time I tried to install a module my cpan client barfed red errors (see below). CPAN::Reporter was erroring when trying to send test results via Metabase.

I updated all SSL modules (cpan> upgrade /SSL/) and installed Mozilla::CA as suggested in the LWP Changes (and a tweet by miyagawa).

No luck.

I noticed something else in the LWP Changes file:

For https://... default to verified connections with require IO::Socket::SSL
and Mozilla::CA modules to be installed.  Old behaviour can be requested by
setting the PERL_LWP_SSL_VERIFY_HOSTNAME environment variable to 0.  The
LWP::UserAgent got new ssl_opts method to control this as well.

so I added this to my .bashrc and all is well again:

CHI Saves The Day

The Server Is Down

  1. No it isn't, I didn't get paged.
  2. Wait a minute, why didn't I get paged?
  3. FUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU--
  4. CHALLENGE ACCEPTED

Diagnosis

The client reported that the site sometimes took more than a minute to load. Doesn't respond very slowly to me, and the pager is only primed to ping me if there is a sustained downtime (hiccups are not something I want to wake up for every night at 3:00am).

Strangely, load hovered around 7 most of the time, only spiking to 13 every few minutes. With a 16-core processor, this was well within operating parameters, if just a little worrisome. Nothing in the log files.

Oops, now I get a slow page load. Takes 30 seconds to load a page. Refresh again, and the page loads just fine. Clear browser cache, and the page still loads just fine.

Le Roi est mort, vive le Roi!

Like I said in my previous blogpost, Module::Build has some serious technical problems. This causes another problem that I didn't discuss previously, but that's maybe the worst thing: no one loves it. MakeMaker also has some crazy internals, but it commands the love of a dedicated group of hackers. It's because of that more than anything else that I'm pretty sure its flame won't extinguish any time soon. Module::Build does not have such a luxury; no one seems motivated anymore to maintain it (if you are, do please take up contact with its current maintainer, David Golden). I fear Module::Build is screwed.

The way out

Dutch Perl Workshop

Last weekend I spend a few nice days in the Netherlands, thanks to the Dutch Perl Workshop 2011. It took place in Den Haag at the very cool Relevation Space (the pinball machines! the Space Invaders carpet! the LackRacks!)

Yet Another Dancer Website

It just got official today, although already listed in Dancer Web Site for some time. Livro-Aberto, is a Dancer website to track current progress of Portuguese on Gutenberg Project and Distributed Proofreaders. Therefore, it is written in Portuguese, sorry.

There isn't much that I can say about the website. It still lacks a backend (we are editing the database directly) although one is planed, using Dancer::Plugin::SimpleCRUD. Current database access is performed using Dancer::Plugin::Database, emails are being sent with Dancer::Plugin::Email and all templates are Template::Toolkit powered (through the respective plugin).

It is running in Apache fast-cgi (fcgid), and the database is MySQL.

What should be core in Perl 5.16?

What are the Perl modules you immediately install when you get a new Perl? Jesse Vincent, the Perl 5 pumpking, opened the door, albeit slightly, to possibly considering maybe thinking about provisionally expanding the Standard Library. Is that modally weak enough for you? (Jesse tells me I misread him, so, maybe the door is not open and never was).

Larry designed Perl 5 to be extensible, which is another way of saying that he designed basic Perl 5 to be small. CPAN is great, but we also know that through various social and technical factors, mere mortals struggle with the idea of having to get their wheels, fenders, and mirrors separately once they buy a car. Distributions such as ActivePerl and Strawberry and popular partly because they come with the extra bits. Non-perl people with their fingers in the pie tend to think about those included parts differently than the "third-party" parts.

Yet Another Perl Podcast -- Пилотный выпуск (№0)

Пилотный выпуск подкаста про Perl на русском языке. Выпуск №0 С чего все началось
  • 2000 год
  • три серии документов
    • Apocalypses — Определение (список идей от автора и пользователей)
    • Exegeses — Разъяснение
    • Synopses — Тезисы
Perl6 — скорее новый язык, чем продолжение perl5:
  • основная идея — предварительное компилирование в байт-код, а затем выполнение в виртуальной машине
. Среды исполнения:
  • Parrot -> Pugs -> Rakudo (Parrot) — переходящая пальма первенства
  • Существуют и другие интересные реализации компиляторов Perl6:

Чуть подробнее про Rakudo (Rakuda-do — путь верблюда)

Документация
  • Очень мало — Все начиналось в STD.pm — Набора грамматик Perl6
  • perl6.ru
  • perl6doc.ru — Авторы Наим Шафиев и Александр Загацкий — НУЖНА ПОМОЩЬ тестеров и переводчиков
  • perl6.org
  • perl.org
  • rakudo.org

London.pm technical meeting 10th March 2011

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 10th March 2011 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 James Hudson, NET-A-PORTER.COM and everyone involved for allowing us to use this wonderful venue. We have the following wonderful speakers:

Zefram - The new extendability features that are going into Perl 5.14
Dave Hodgkinson - Perl, Hudson and Selenium
Pete Sergeant - Something testy
James Laver - Spark Form

For more information and to sign up, please visit:

http://londonpmtech.appspot.com/

See you there, Leon.

So there's this TelAviv.pm meeting, right?

I wanted to write up on the February TA.pm meeting we had two weeks ago but kept delaying it. I think it's about time!

As with every TA.pm meeting, we try to mix both beginner and advanced talks, in order to have something for everyone. It's proven very effective so far. We've also started doing lightning talks, which I really wanted to do for a while.

The beginner talk was done by Gabor Szabo, giving an introduction on how to get started contributing to an open source project. There were a lot of laughs and a lot of fun. We also got to see new faces, and that's always great.

Then we had a round of lightning talks, one by Shlomi Fish on how to solve a very specific problem in a ton of different ways, and one by no speaker at all, on how to write a nifty website in under a minute using Dancer.

Second Round of Talks Accepted

We've now accepted the second round of talks. Thank you to everyone who has submitted so far! As for the first round, please be aware that just because your talk hasn't been accepted yet, it doesn't necessarily mean that it won't be.

You've got almost three weeks left to submit talks before the deadline on the 24th. We need many more still to fill out the available slots! Don't make us start volunteering people on IRC. ;)

Putting Perl Back on Top in the Fields of Scientific and Financial Computing

As a bioinformatician and software developer of many years and avid Perl programmer and supporter, one thing I've noticed over the past few years is that Perl has been needlessly losing ground to Python in the major areas of scientific and financial computing, areas where it used to be *the* high-level interpreted language of choice. I am constantly having to correct people on blogs and forums that state incorrect Perl shortcomings when compared to Python or they were shortcomings from many years ago which don't exist anymore in the current language and ecosystem. If they spent two seconds researching Modern Perl and Enlightened Perl they would say WOW look where Perl has come!!!

Where do those links come from?

This came up in a post-work discussion last night

How do the links to methods appear at the top of module documentation? Are they automatically generated?

A specific example of POD that does this is DBIx::Class::ResultSet

Since I wasn’t sure what the exact behaviour is off the top of my head, I thought I’d investigate.

search.cpan.org

As you may have already seen, the web-rendered version of the POD has a table-of-contents list of “stuff” at the start of the document.

search.cpan.org

perldoc

perldoc doesn’t produce the same table-of-contents. This makes sense to me, there’s not much scope for a clickable list of headings in text output

perldoc DBIx::Class::ResultSet

What magic markup makes this happen?

The simple answer is, “there’s no magic markup required”.

As long as you’re using pod2html, or something that behaves in the same manner you just need to use ’=head1’, ’=head2’ and friends in your own POD.

The DBIx::Class::ResultSet pattern

Checking the file source quickly with

What's New in WebGUI 8.0 #5 - Asset Helpers

By far the biggest change we've made in WebGUI 8 is the new Admin Console. Though parts of it may look familiar, it has been completely rewritten from the ground up to be a flexible, extensible, responsive JavaScript application making calls to JSON services in Perl.

I could talk about how to use the admin interface, but I don't think that's why you would read this blog, so instead I'm going to talk about how you can add functionality to it.

Asset Services

Since Assets are the basic unit of both application and content in WebGUI, much of the Admin Console is spent interacting with Assets. It does so by calling out to Asset Helpers.

By default, every asset has a helper to Cut, Copy, Duplicate, Delete, and more. When a helper gets called, it returns a JSON data structure explaining to the Admin Console what to do next.

We can simply show the user a message:

Call for Venue for YAPC::Europe::2012

Although YAPC::Europe::2011 preparations are well underway in Riga, it is time for the venue committee of the YAPC::Europe Foundation (YEF) to think about the location of the 2012 conference. YAPC::Europe wouldn’t exist without dedicated teams of volunteers, and we are always excited to see the enthusiasm and learn about the new ideas the community has to offer.

Further information about preparing a complete application can be found on the YAPC::Europe Foundation website. Proposals submitted to the venue committee will be added to this public repository (you may provide private information separately) to benefit future organizers.

The deadlines which apply to this portion of the procedure are:

  • Saturday, 30 April: Deadline for sending a letter of intent. This letter simply expresses interest in hosting the conference and provides contact information (both email and telephone) for at least two organizers. This is an optional step but it can be to your advantage to alert the venue committee of your proposal.
  • Thursday, 30 June: Deadline for sending proposals to host YAPC::Europe 2012.

Please send your questions, letters of intent, and proposals to venue@yapceurope.org.

CPAN Testers Summary - February 2011 - A Saucerful of Secrets

Much of February was taken up with monitoring updates and watching for any unfortunate consequences. Thankfully the improvements seem to have done their job. The report submissions in January dropped from previous months, which is normal going on past experience, and sure enough the submissions increased again last month. Despite this the builder has managed to stay on top of the page requests. Some fine tuning has taken place and currently the builder stays at most about 2-3 days behind, but is average in only 1-2 days behind. We'd prefer to have updates even more frequent than this, so over the next few months we'll investigate further what improvements can be made.

Subclassing Tricky Non-Moose Classes: Don't Do It

We have a non-Moose class but want to make a Moose subclass of it. First, step back and consider if we really need a subclass.

Don't subclass

There are probably some good arguments against subclassing non-Moose classes with a Moose class that center on principles of good design, and applying the most suitable design patterns. From a practical standpoint, though, there's a very simple reason to avoid it: using Moose to subclass a non-Moose class is fraught with "gotchas." We'll see some of these problems in an upcoming post, but for now let's look at an alternative to subclassing.

Perhaps a better option is to simply create your a new class and use delegation to call methods on an accessor containing your non-Moose object.

Let's say we initially wanted to subclass Date::Handler, but we decided to try delegation instead. After reading through Moose::Manual::Delegation we come up with the following:

Grant Street Group hiring Perl developers

Just a head’s up that my employer—Grant Street Group—is hiring more Perl developers. Most Grant Street Group developers telecommute.

The company is great, the quality of people I work with are top-notch, and the work is challenging and stimulating.

For more information, see this post on jobs.perl.org:

A Module::CoreList for vendor distributions

How much do perl distributions diverge from or augment the Standard Library? Lately I've been doing a lot of work with distributions that augment their standard Perl installations, so although I'm restricted to the distribution's Perl and its modules, most of the good stuff is already there. However, we don't have a tool like Module::CoreList that knows about vendor distributions.

Although I don't have the time to write it myself, I'd really like to have a tool that can report module presence and version for either the current operating system or any that I name:

$ corelistng --debian -a Scalar::Util

$ corelistng --macosx -v 5.10.0

This would be pretty handy when I have to put together a private MiniCPAN.

More stupid testing tricks

For the guy who wrote the test harness currently ships with Perl and has commit rights to an awful lot of the Perl testing toolchain, I sure do seem to do a lot of stupid things while testing. That being said, sometimes I need to do those stupid testing tricks. That's because there seem to be roughly two types of developers:

  • Those who work in a perfect world
  • Those who work in the real world

I say the latter with a bit of bitterness because invariably I keep hearing YOU MUST DO X AND NOTHING ELSE where "X" is a practice that I often agree with, but it's the "and nothing else" bit that really frosts my Pop Tart (tm).

About blogs.perl.org

blogs.perl.org is a common blogging platform for the Perl community. Written in Perl with a graphic design donated by Six Apart, Ltd.