Think Python in Perl 6 Chapter 4: Interface Design

It is time for Chapter 4 of Allen Downey’s Think Python refashioned in Perl 6. I just needed some time to make a simple wrapper for his Swampy framework. Feel free to install and play along, but don’t rattle Swampy.pm6 too much. I have only implemented enough to finish this chapter.

Then again, go ahead.

Play Perl: Sign In with Email

Starting from today, you can sign in to Play Perl using email, even if you don't have a twitter account. (It won't ask you for password; it uses Mozilla Persona.)

Quick recap: Play Perl is a new social and gamified website for Perl developers, where people can declare their open source plans and get points for completing them. I launched it 2 weeks ago.

This week was much slower than the last, due to me being back to my daily job from vacation. Still, I managed to get more than a 100 commits in, including:

  • the ability to unclaim quests, moving them into a global "up-for-grabs" pool
  • the ability to abandon quests without removing them
  • RSS for the global news feed
  • 4 separate explore sub-tabs
  • performance optimizations
  • many refactorings, html improvements, bugfixes and new bugs, as usual

Also, thanks to the awesome creaktive@, Play Perl got a favicon. And then, thanks to the awesome neilb@, it got another one :)

Strawberry Perl 5.16.2.2 released

Strawberry Perl 5.16.2.2 is available at http://strawberryperl.com
(all editions: MSI, ZIP, PortableZIP for both: 32/64bit MS Windows)

More details in Release Notes:
http://strawberryperl.com/release-notes/5.16.2.2-32bit.html
http://strawberryperl.com/release-notes/5.16.2.2-64bit.html

Pumpkin Perl Patchset

The blog post.

The github repository

Comments?

EplSite ETL

EplSite ETL is an open source tool, developed using Perl, to do easy the data migrations, doing extraction, transformation, validation and load in a very fast way.

It is very low resource consuming and use a web interface for data transformation creation.

The transformations can run using the web interface or a batch process and as a batch process you can schedule tasks to run in automatic way.

EplSite ETL runs in all the environments where Perl runs, Linux,Windows,OSX, Unix.

It was built by people involved in data migrations so, it contains the necessary to do the migration(Extract Transformation, validation and load) and do it well.

The last release is 1.1, it is running in production environments now, EplSite ETL can be downloaded from here:

sourceforge.net/projects/eplsiteetl/

Perl programmer humour

Three examples of perl programmer humour I've seen in code and/or documentation. Read the comments for more examples.

Crypt::RSA without Pari

Crypt::RSA is a module that's been around since 2001, when Vipul Ved Prakash put it on CPAN. It's had only very minor updates since then, and gets used by a few other modules. However, it's had one big problem: it uses Math::Pari for all its calculations, and two of its dependencies (Crypt::Primes and Crypt::Random) also use Pari. Debian in particular has been pining for a version that gets away from the Math::Pari dependency (see RT52689 for some reasons).

I decided to go ahead and do the Pari removal, and it's on CPAN as Alt::Crypt::RSA::BigInt. This uses Ingy's Alt framework -- install the Alt version and you get a new shiny Crypt::RSA. Install the old version and you're back again. There are no Pari dependencies, and if Math::BigInt::GMP is used, it's 5 to 11 times faster. I decided to use Math::BigInt directly, as that makes it very portable, though the speed without either the GMP or Pari backend leaves much to be desired.

A perl of your own

Want per project perl defaults that save boilerplate? You want your perl - you want myperl.

Method::Signatures: here a tweak, there a bugfix


Just a quick note to say that I’ve released a new version of Method::Signatures today.  There’s nothing major, just a few housekeeping duties.  Here’s the highlights:

YAPC::NA 2013 (Austin, TX June 3-5) Update

DBIx::DataModel - Elegant Database Interaction with Perl

DBIx::DataModel (DBIDM) is an Object Relational Mapper for Perl that is very elegant, simple and effective. It helps you to efficiently interact with your database.

This article discusses three of the great features of DBIDM and how I find they help me to develop software more efficiently. The three features discussed are:
  • results are hashes - so it is very easy to manipulate and debug query results,
  • schema generation is fast, clean and effective - so we very quickly get a useful map within Perl of just the most important aspects of our database, and
  • the API allows inserts, updates and selects to be defined extremely efficiently - keeping the easy things easy
The article also provides a very brief introduction to DBIDM and some notes on getting started with it. There is also a rough example demonstrating how I combine DBIDM with Perl Dancer.

if you build write it they will come

After reading some of the posts about renaming Perl to something else I noticed that a commonly used argument was about the language visibility. Personally I don't want to take party here and restart all the discussion about that issue, I think a lot of people more capable and committed to the language evolution already gave their opinion.

My point here is about that comment mentioned before, the language visibility and appearance. If the way how people see and remember Perl is the problem, I think that we can come up with some kind of solution without any dramatic changes in the language itself, and I'm going to tell you how, in my opinion, we could address this issue.

pathed - munge the Bash PATH

I wrote "pathed", a tool to munge the Bash "PATH" environment variable.

The Bash "PATH" environment variable contains a colon-separated list of paths. pathed - "path editor" - can split the path, append, prepend or remove elements, remove duplicates and reassemble it.

http://marcelgruenauer.com/blog/2013/02/22/pathed/

fresh perlbrew sugar

A fresh new version of perlbrew is out that incorporates some sweet new sugar via arc:

perlbrew install --switch stable

Which expands as:

  • Install the "latest stable" Perl - don't make me think about version numbers ;)
  • When you're done, switch to it

It is just sugar, but it makes a one-liner out of what used to be:

  • Figure out what the latest stable version of Perl is.
    • Think about here: "those outside the echo chamber"
  • perlbrew install perl-5.16.2
  • perlbrew switch perl-5.16.2

More usefully for my (planned) purposes, I can write documentation targetted to outside the echo chamber that ensures both:

  • those reading it will always get the latest stable version of Perl, and
  • I won't have to bump the docs every time a new release is rolled.

Go lazy!

Headless Selenium testing with PhantomJS

As you know, Selenium is a marvelous library for automating a browser. It can be combined with Test::More and PhantomJS to provide a headless test suite.

An example script looks like:

Give your application a shell (and never write any ad-hoc scripts again)

As developers, we sometimes have to help operations going smoothly by fiddling with the data "by hand" because there's no GUI to allow people doing some rare and obscure things. One common way of doing it is by connecting to the DB and writing some SQL. But often, accessing your database is not enough, because you need your application code to be run.

And for that, you need a shell.

Recreated comments for Perl in Catincan, an open source crowd funding proposal

I spent time to create the below message for Brian's post on crowfunding. For whatever reason, he felt the need to delete my post. So I've recreated the gist of what I said previously. I guess next time I'll take a screenshot for posterity.

Brian, Now that is a great contribution! Thank you!

Discoverability issues: On a crowdfunding platform that is generic in nature there is a discoverability problem if you are targeting a specific audience. Brian, does Catincan support creating a Perl channel/filter with permalinking? If so this could then be linked directly from Perl.org. If not, how do we address that issue?

A follow up on three-value logic in Perl

So far the initial response to my three-value logic in Perl post has been great. Due to that response, on Reddit, Perlmonks, here and my RT queue has led to:

  • Made sorting a bit more useful
  • Contemplating removing stringification
  • Plenty of strengthening of the documentation (including making it explicitly clear that the unknown logic is akin to SQL's NULL)

And then there's been some interesting rebuttals.

Swampy.pm6

Last night I reached chapter 4 of Think Python, which is full of good old fashioned turtle graphics stuff.

It’s just - well - there’s a problem. I don’t think there is a port of the swampy library to Perl 6. I could write one, but that would probably require a Tk interface with Perl 6. Even just writing a Perl 5 Tk version of Swampy is beyond my spare time attention span.

I know what I’ll do. I’ll cheat and have perl6 call python.

Perl in Catincan, an open source crowd funding proposal

I've proposed a "Perl" project on Catincan, a new crowd funding site targeted at open source software. They've said that the first 25 projects to be fully funded have their fees waived for life. That is, if a Perl project gets funded, we have a crowd sourcing platform where the developer gets all the money.

That fee waiver is interesting. I've looked at many crowd funding sites. Most at least charge the credit card fees. Fractured Atlas, where I'm a board member, charges 7% for their fiscal sponsorship program. If TPF wanted to set up their own program, not only would they have to charge some fees, even to just cover costs, but they'd have to manage it as well. If there's already someone doing all that work and doing it for us for free, so much the better.

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.