New blog. New role.

TPF (The Perl Foundation) announced the new Secretary of the Grants Committee. It's me.

Some of you may not know what TPF does. It may not be well known that TPF grants money for Perl development.

Here in this blog, I would like to add a bit of transparency on what the committee does, answer questions and have feedback from the community.

While it's my blog as the Secretary, the Grants Committee's official communication channel continues to be news.perlfoundation.org. You don't need to read my blog to apply for a grant but you are expected to read news.perlfoundation.org.

Keep yer notes

I was cleaning up some papers out of a notes binder this AM and blundered across something I scribbled down during a YACEU, (not sure if it ws 08 or 09). On closer examination it was a number of notes taken during one of the lighting talk session.

Nothing that I would want 5 years later the only interesting bits where some of those magic/secret/sacred code one-lines that somebody always presentes during one the the lightning talks.

I rarely use them myself except for the good old spaceship operator or

<=>

Useful when you want to sort this @(-1,23,5,-6,0) you want this @(-6,-1,0,5,23 ) and get this @(-1 -6 0 23 5)*

Used normally like this

my @arry = (-1,23,5,-6,0);

my @sorted = sort({$a<=>$b}) @arry;

detecting "too heavy" views in Template Toolkit

$client is doing a lot of heavy lifting (perhaps accidentally) in some Catalyst-driven Template Toolkit code. Apparently, it's far too easy to pass a DBIx::Class object into the stash, and then trigger things that end up hitting the database... from the view. That wouldn't be horrible, except the same exact queries are being used in multiple places in the templates, causing many redundant identical queries to the database per page hit. (Note aside: if this was Rose::DB... I'd trivially jump to Rose::DB::Object::Cached. Problem solved.)

I wanted a way to see what method calls were being invoked on the objects in the stash. Simple... just subclass Template::Stash! Now I get a list of the component invoking the method, the path from the root stash to the object, and the method call being made.

Three ways to introduce othogonal behavior: Aspects, Method modifiers, and Subroutine attributes

In my previous post I spoke about what Subroutine attributes are and how to use them. Here I compare them to other techniques for introducing orthogonal behaviors: Method modifiers and Aspects. These three techniques enable to modify what a subroutine does, but they do it in different ways and are thus suited for different needs.

Joose - advanced meta-class system for JavaScript

Joose - advanced meta-class system for JavaScript :

Joose is Moose in Javascript.

[From my blog.]

Ok No is not Moose

A many readers of this blog know I have been spending a good deal of time lately playing about with Moose doing all sorts of silly little things with AD&D character creation and alike.

Well I was curious today and started to take apart a little bit of Moose and see what was under the hood so to speak. So far I have discover that all the nice Moose sugar are really just function calls and since some programming I was doing today requires me to use 'no Moose', he much preferred 'namespace::autoclean;' not being install on the box I was playing with yet.

So I started to look in the Moose dir of my perl for the 'sub no' the one that takes away all the sugar. Well I tired every combination of 'sub no' I could think of with 'ack', 'Grep' and even loading things on Padre to see the outline result.

Nothing couldn't find it anywhere???

I bought a weekly round for my friends

Given our community is a little... let's say cautious I feel the need to open with a disclaimer. I am in no way affiliated with Gittip, in the past, present and the foreseeable future. In fact I looked at their bugtracker for the first time this morning and am appalled that a site in production for 2 years can have so many outstanding basic conceptual issues.

In any case this entry is about the underlying idea, so if you can manage to not get distracted by a shoddy implementation - read on (NSFW language as always :)

"You and your ilk are a tiny minority trying to impose your opinion upon the majority who actively and vocally disagree with you."

I will no longer be participating at Perlmonks.

Using DBIx::Class::Schema::Loader to find design flaws

If you avoid DBIx::Class because of performance issues, you should probably check out version 0.08250 or better. In an interesting note from the Changes file:

Rewrite from scratch the result constructor codepath - many bugfixes and performance improvements (the current codebase is now capable of outperforming both DBIx::DataModel and Rose::DB::Object on some workloads).

Previously I used it because with DBIx::Class::Schema::Loader, I could pregenerate my classes from a database schema and it's fairly robust. When the database changes, I can regenerate my classes on the fly and and run the tests to verify that nothing's broken. However, I hit upon a case where it generated some bad code. As it turns out, DBIx::Class::Schema::Loader was correct and it revealed a bug in my database design.

Blast From the Past

Was cleaning up a few files on the server today and blundered across a few code files that look something like this on the inside

Kephra, GCL, Tablets, state of my Perl projects Part 1

Cheerio, in case you missed me, started to study again (compunter science and music) so had almost none time for Perl. Even worse, I was forced to learn and write Java. My complaint on international human rights court is pending. But now are holidays, time to prepare exams and .. to reflect about my open source activities.

Stupid CPAN Tricks

At MadMongers’s tomorrow night we’ll be covering a bunch of CPAN modules that people probably don’t know about, but that are super useful.

[From my blog.]

Perl and Me, Part 10: What We Talk About When We Talk About DWIM

This is part 10 of an ongoing series where I explore my relationship with Perl.  You may wish to begin at the beginning.

This week we look at DWIMmery.1

Last week we talked about the awesome productivity of Perl without really asking why it’s so good at it.  For one answer to that, we’ll need to look at a new spectrum.

There are several different spectra in Perl.  In fact, one of the coolest things about Larry is that he’s not only given us a cool language to play with; he’s also given us cool new ways to think about the languages we play with.  Along one spectrum we have the tripartite concept of laziness, impatience, and hubris.  This series has only touched on these indirectly: laziness drives the language be legible, impatience drives it to be productive, and hubris drives it to be closer to a natural language.2  Along another spectrum, we have the orthogonal concepts of manipulexity and whipuptitude, which we just discussed last week.

But there’s another spectrum to look at, which includes the twin concepts of TMTOWTDI and DWIM.3  TMTOWTDI is closely linked to context, which we covered pretty thoroughly.  But what about DWIM?

Final Little Moose Droppings

Well I am getting close to finishing off my 'Creator' class that I started in this post I really have only three little parts to add on to get to the end. Character Starting Monies, Alignment, and equipping the character.

Well equipping is more a game play than a character creation part as buying something and stuffing it in your sack happens at any point in the game. So all I will have to do is give the character his starting tithe then let them loose in the store, as everyone knows a fool and his money are quickly parted if that 1th level Magic-User want to blow his wad on Chainmail and a Falchion far be it from me from stopping me from buying it.

Encumberance_loRes.jpg

Equipping and using it is another question and again that belongs in game play so I will defer that till later.

Announcing App::Midgen v0.28

So what’s new?

  • Now with support for prereqs->runtime->recommends Meta-CPAN-spec v2
  • Internal scanner update and why
    • New scanner UseModule, Module::Runtime support
    • Scanner Eval now supports try Blocks as well.
    • Internal scanners now provide version strings, used by infile, output format
  • Changes to the output formats:
    • Output format, eumm, added for ExtUtils::MakeMaker (enabling -> META.json)
    • Updates to metacpan && cpanfile to show prereqs->runtime->recommends

for the rest of the blog go here

Any comments leave them here.

pmtools v2.0.0 - Now with pmtools::new_pod_iterator()!

pmtools (Perl Module Tools) v2.0.0 has been unleashed upon the unsuspecting world.

v2.0.0 accommodates when the POD (.pod) file is separate from the module (.pm) file. (I gather that this is the case in upcoming Debian.) As I had to modify both pman and podpath for this change, it was easier to just push that functionality into an iterator-generator routine in the pmtools module itself (the first time the pmtools module has contained any useful code.) I only have 1 data point (my consulting PC), but pman and podpath appear to be slightly faster for it.

I bumped the version up to v2.0.0 because of the new dependency on the pmtools module, as well as all of the changes from v1.00 to v2.0.0.

Debian, MariaDB, Perl and DBD::mysql

My pain is your gain!

Debian, MariaDB, Perl and DBD::mysql

Sigh. If only it was worth it....

Moose, Mouse, Moo what next 'M'

My step into what I wood call the world of Moose was actually job related a few years ago and have been happy with it ever since.

One thing in the community I have seen it the rise of other flavors of 'postmodern object system' perl namely the first 'Mouse' and the more recent 'Moo'. Will 'M' will be next? I had some time after bashing in walls and laying wire so I had a look at them.

Both I guess try to solve the same problem mainly the over head of Moose. Mouse drops some parts of moose and redoes others and tries to retain most of Moose's syntax, Moo takes a use only what you need approach so is a little more basic but is much more compatible with Moose.

Both state that they are useful for 'CGI' command line and other simple implementations. To me this begs the question why would you even choose OO design for the above three situations??

Subroutine attributes: where and how to use them

I watched this video about Subroutine attributes, and I wrote myself a summary of what I learned. I thought I could share it.

blogs.perl.org and https

I'm living in Moscow, Russian. Here we have Underground, a rapid transit system. Recently there appeared free WiFi. You just need to connect some WiFi spot, then accept the Licence agreement and you can use Internet.

Yesterday I've opened blogs.perl.org at my mobile phone and here is what I've seen:

At the bottom of the screen the ad has appeared. A small investigation showed that blogs.perl.org is working over http and the WiFi provider changed html and adds that ad.

I don't think that this is ok. Actually I think that this is a horrible business model to change some others sites. But this is the thing that is real and the only way to stop it is to use https.

Actually ssl certificates are very cheep nowadays one year certificate costs less than $10.

So I want blogs.perl.org to work over https. How can I help you with switching to https? I will be very glad to donate the ssl purchase. Where can I transfer money? =)

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.