Thank You Sponsors!

We’d like to thank our sponsors for stepping up to support us. We really couldn’t do this without their support.

You too could sponsor YAPC.

[From the YAPC::NA Blog.]

orphaned public key

So, I thought I'd contribute to moose.

A week ago I joined #moose and nopasted a public key. Cats and kids jumped all over me and I didn't follow through. In the end, I think that nobody acted on that. Today I thought I'd get back to that while the kids were out of the house. I still had the nopaste tab open, so pasted the URL and mst added my key.

Updated parrot and rakudo releases for cygwin

I've updated the cygwin packages for parrot, rakudo and rakudo-star for cygwin.

There were a couple of test failures and changes.

See the patches and build specs here:
http://code.google.com/p/cygwin-rurban/source/list
and bugs here:
https://rt.perl.org/rt3/Ticket/Display.html?id=112740
https://rt.perl.org/rt3/Ticket/Display.html?id=112742
https://rt.perl.org/rt3/Ticket/Display.html?id=112744
https://rt.perl.org/rt3/Ticket/Display.html?id=112746

rakudo-star make test is broken. You'd need to install it first, and then you can successfully test it.

nqp had three versions floating around: an old parrot-nqp needed for bootstrapping rakudo, rakudo's nqp-201204 and rakudo star needs an updated 201204.1 version as /usr/bin/nqp. Use /usr/bin/nqp.

http://cygwin.com/ml/cygwin-announce/2012-05/msg00004.html

Have fun and report problems to cygwin@cygwin.com

Tad McClellan, R.I.P.

Tad McClellan passed away last weekend.

Most Perl people probably Tad from his activity on Usenet, where he was a frequent and helpful presence on comp.lang.perl.*. I worked with him personally when he handled the operations for Stonehenge Consulting, handling the boring business stuff while Randal and I, along with the other Perl trainers, stood in front of rooms of students. Tad was a Perl trainer himself, and some of you may have met him either at OSCON or YAPC when he'd occasionally give a Perl talk.

The Perl Foundation Party at YAPC::NA

You may or may not have heard that The Perl Foundation is throwing a private party after the banquet at YAPC::NA 2012.

We’ve shut down a local party spot for the night so that we can turn it into geek-space. Though it’s usually a hot college night club, on this one night only it’s going to feel more like a private Perl-only pub. Here’s what we’re doing to ensure a great party:

perlbrew and tmux

Tonight I decided to install a variety of perl versions on the desktop PC where I run Arch Linux. Rather than kick them all off manually, I whipped up a bash script wrapper around perlbrew.

It loops through all of the versions of perl I'm interested in. It starts perlbrew with the specified options but backgrounded. When the build.log shows up, it sends keystrokes to tmux window 4 telling it tail the build.log and brings perlbrew to the foreground. When the install is finished, it sends keystrokes to tmux window 4 telling it stop tailing the file and moves the build.log out of the way so we can view it later.

perlinstall.sh

Milecore is NOT associate with, any SEO spam Activities

Hello all,

This post is to clarify about previous negative post about Milecore Technologies. We think we have rights to clarity the right things if some one try to spoil our Reputation.

At Milecore there were some employees are doing unethical work against the company policy and also did stolen some clients important data therefor they got terminated from the company and they hack our IDs and hire some SEO spammers to take revenge of their termination and did spam posts on some of the scam sites to harm Milecore's reputation.

Therefor we as Milecore announce that the post you read about milecore here on this blog says "Milecore are, or associate with, SEO spammers" where some SEO spam activities introduce are not did by our TEAM or any member of Milecore..

We are very trusted, ethical and reputed IT company whose goal is to give satisfaction to their clients by doing very hard work along with positive ethics, We have more than 1500 satisfied clients base and more then 60 satisfied employees team. What ever we did with those employees are just to stick with our company policy and being a company nobody will allow their employees to mass with policy.

Milecore is (& will) always dedicated towards ethic works only.

I've just joined the 'Been There Done That' Rising Damp Club

1. Empty laundry and loo of clothes dryer, odds-and-ends, etc, as far as possible, since both rooms need to be done.

Amazingly, these 2 (and the back hall) are on a concrete slab at ground level, 1 step below the kitchen, which is - along with the rest of the house, on stumps.

The large back yard slopes down towards the house, so heavy rains are a pain.

The loo, laundry and back hall are at the same level as the bricks in the patio, photographed in the rain today:

back.yard.jpg

Why did they build the house like that?, I hear you ask!

Yes, well, back in the late 1940s, that's how they did things around here.

2. Strip off some plaster, since the paint and plaster are impregnated with salt from uprising water:

stripped.loo.jpg

3. Paint with goo. This process is called tanking.

It stops horizontal penetration of water, as distinct from uprising water.

4. Drill holes:

drilled.bricks.jpg

Noisy! Very noisy!

5. Pump holes full of silicon.

Not so noisy.

The silicon re-establishes (if there ever was one) a horizontal DPC 'damp proof course' to stop uprising water.

6. Wait 2 weeks.

7. Renew plaster.

8. Pay $1,800.00 (20% up front) for this form of in-door entertainment :-(.

Becoming a Polyglot

Tatshuhiko Miyagawa will give a talk at YAPC::NA 2012 described as:

Many of you might have noticed that, a lot of my recent Perl projects (such as Plack, cpanm and carton) have been greatly influenced by what are available in other programming languages such as Python, Ruby and JavaScript.

Over the past few years, I’ve also been using mainly Python and Ruby for my work.

In this talk I will show you what I’ve learned by using these languages -  Things you can steal, things you can ignore. Also as a bonus, I will give you a hint of a few tools what I think is missing in Perl but will become extremely popular when ported the right way.

[From the YAPC::NA Blog.]

Help to write Perl 6 Documentation

You have no clue about Perl 6 but still want to help? Here is your chance. After Appendix A now stabilizes and most of the 750 entries are well formated (signatures still catching on) and in Appendix B also over 600 items link back to Appendix A so you can click back and forth to get a minimal wikipedia effect (What I was looking for in the first place?), now my primary focus is on Appendix G.

Tweaking what Moose does when a type constraint fails

Back when Curtis Poe was at Booking.com we were in the the first team to use Moose (actually Mouse at the time) for anything serious. While it saved us a lot of time overall that we'd otherwise have spend on writing boilerplate code we found the Moose support for type constraints to be fairly inflexible for our purposes.

Moose will simple die if you pass it a value that violates a type constraint, in an environment where you control the whole stack this is usually what you want, but when you're dealing with data from other people and user-supplied parameters you often want to handle the situation more gracefully.

Curtis pointed this out on the Moose mailing list, and quickly found that this was something covered in the Moose FAQ.

mod_perl 2.0.6 released

Last week mod_perl 2.0.6 was released. You can download it here - http://perl.apache.org/download/index.html

Thanks to the many contributors to this release. Below is a summary of changes.

2.0.6 April 24, 2012

Preserve 5.8 compatibility surrounding use of MUTABLE_CV [Adam Prime]

Move code after declarations to keep MSVC++ compiler happy. [Steve Hay]

Adopt modperl_pcw.c changes from httpd24 branch. [Torsten Foertsch]

Pool cleanup functions must not longjmp. Catch these exceptions and turn
them into warnings. [Torsten Foertsch]

Fix a race condition in our tipool management.
See http://www.gossamer-threads.com/lists/modperl/dev/104026
Patch submitted by: SalusaSecondus
Reviewed by: Torsten Foertsch

Ensure that MP_APXS is set when building on Win32 with MP_AP_PREFIX,
otherwise the bundled Reload and SizeLimit builds will fail to find a
properly configured Test environment.
[Steve Hay]

Fix a few REFCNT bugs.
Patch submitted by: Niko Tyni
Reviewed by: Torsten Foertsch

Dependency Injection with Bread::Board

Jesse Luehrs will give a talk at YAPC::NA 2012 described as:

Dependency injection is a powerful method of organizing your applications. It has been referred to as “the inverse of garbage collection”, because while garbage collection frees you from having to worry about how your objects are destroyed, dependency injection frees you from having to worry about how your application objects are created.

This talk will contain an overview of what dependency injection is and how it works (you’re probably already using basic forms of it!), and will introduce the Bread::Board module, which provides a more structured form way to model the relationships between your objects.

[From the YAPC::NA Blog.]

Rvalue references

From the C++11 FAQ, section on rvalue references, about a simple incrementation function incr:

If that incr(0) were allowed either some temporary that nobody ever saw would be incremented or - far worse - the value of 0 would become 1. The latter sounds silly, but there was actually a bug like that in early Fortran compilers that set aside a memory location to hold the value 0.

That actually made me think about that nifty one-liner:

perl -wE 'Internals::SvREADONLY(${\undef},0);undef=42;say undef'

githook-perltidy update

Last year I wrote script to automatically tidy up your Perl code as it is commited by Git. I just ironed out a final issue that had been bugging me: partially indexed files. That change plus a few documentation cleanups are now available as version 0.04 from my Github repository or as a .zip file.

I also uploaded a distribution (App-githook-perltidy) to CPAN however I'm not sure yet if it is installable as it doesn't contain any Perl module files, and cpanm at least doesn't seem to install based on distribution name only. Anyone have thoughts on if it makes sense to have a single-script CPAN distribution?

Oracle SESSIONS_PER_USER

Connecting to Oracle with a proxy connection like this:
DBI->connect( $dsn, 'user[otheruser]', 'password', $option_list)

We recently updated DBI to 1.620 and DBD::Oracle to 1.44 (late last week I think). Today I saw an error that I have never seen before (but should have). "ORA-02391: exceeded simultaneous SESSIONS_PER_USER limit" You see otheruser has a profile that limits SESSIONS_PER_USER to one. We're creating between one and eleven of these database connections simultaneously in different processes.

So I tried it with the older install that was using DBI 1.616 and DBD::Oracle 1.30. I didn't receive the error so it appears that the SESSIONS_PER_USER profile limit was not being respected.

We're bumping up the SESSIONS_PER_USER where appropriate and adding some checks for this error condition now that it's being thrown.

I'm curious if anyone is aware of which change may have caused this to start working correctly?

Perl Testing 101: 82% of What You Need to Be a Competent Perl Tester

James E Keenan will give a talk at YAPC::NA 2012 described as:

In fifty minutes, this presentation will provide you with 82 percent of what you need to know to be a competent user of Perl’s core testing functionality.

If you are new to Perl — or if you know Perl but have shied away from learning to write tests — this presentation is for you!

[From the YAPC::NA Blog.]

Big module sizes

I measured the size of some big modules, with B::Stats and B::C, statically compiled.
This amounts to about to the same size as dynamic usage via perl, with all options and modules used at once. I.e. the worst-case scenario.

Interestingly Module::Build is much harder to compile - you'd need 6GB RAM at least -
and much bigger in the end-result than Moose, which compiles/compresses really fine.

Modules

Module::Build

perl -e'use Module::Build: print q(k)'

ops68K
files48
src lines18K
compiled c lines1.5M
perl compiler memory360M
gcc compiler memory3.4G
executable size37M

Moose

ops91K
files109
src lines28K
compiled c lines889K
perl compiler memory218M
gcc compiler memory1.6G
executable size23M

DateTime::TimeZone

ops2.3K
files6
src lines2.2K
compiled c lines130K
perl compiler memory19M
gcc compiler memory415M
executable size32M

Typical Apps

Biggest cPanel app

The recipe for less than 2MB RAM and gcc < 4.5 is:
cc_harness -E -o$@-cpp.c $@.c
cc_harness -O0 -fno-var-tracking -fno-stack-protector \
-fno-tree-loop-optimize \
-fpreprocessed -fno-exceptions $@-cpp.c

ops467K
files539
src lines95K
compiled c lines1.5M
perl compiler memory352M
gcc compiler memory (32bit -O0)2.0G
executable size61M

Typical cPanel app

Lazy == Cache ?

While I was working on some Moose code this past week, I was struck (again) by how the lazy property of attributes functions almost like a cache.  In fact, often when working in Moose I find that when I want something to be cached, I just make it lazy and call it a day.

Let me illustrate what I’m talking about with some code.  Now, the real process of putting this code together involved a lot of blind alleys and false starts, but I’m going to present it like I came up with the final product smoothly and without interruption.  I do this for two reasons: one, it makes for less frustrating reading, and, two, it makes me look smarter. ;->

So I’m creating a little command line utility to do some moderately complex data loading.  I decide to use MooseX::App::Cmd for the basic structure—this is an excellent module that I’m using more and more these days.  Definitely check it out.

Automating On Call Jury Instructions

Early in February, I received a jury summons for the United States District Court, Southern District of California. Prospective jurors for federal jury service (at least in this court) are placed on call for a period of about 30 days. I was to call for instructions on April 1 and potentially proceed to do so periodically until May 4 (assuming I wasn’t instructed to report).

Since my initial instruction date was nearly two months away, I created an entry for it in Google Calendar, and promptly forgot about it. On Monday, April 2, I was riding the train to work when I realized that I hadn’t remembered to check my instructions. Fortunately, after arriving at my office and checking my instructions, I had been deferred to the next day.

So I added a new entry in Google Calendar, this time with an SMS reminder. I proceeded to do this for most of April, checking my instructions and duplicating the calender entry with another SMS reminder.

I’m embarrassed to admit that it wasn’t until the last week of April that it occurred to me that I could automate the whole process. After all, isn’t automating drudgery the whole reason I ended up programming Perl in an engineering support group at my day job?

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.