Not sure if the title is understandable. But I will give an example. Consider a word (well, invented one): noogoo. Now, consider you want to do all possible combinations substituting oo with aa, that is, generate naagoo and noogaa.
The solution I am using, that was idea of my friend Luciano, is as follows:
$word = "noogoo";
push @where, pos($word)-2 while $word =~ /oo/g;
for my $i (@where) {
my $other = $word;
substr($other,$i, 2, "aa");
push @words, $o if $o ne $word;
}
During OSCON, you can meet several Perl book authors for a panel discussion, questions and answers, and socializing at Powell's Technical Books on Tuesday, July 20 at 7 pm. Bring your Perl books to get them signed by your favorite authors. Confirmed authors include:
Peter Scott (Perl Medic, Perl Debugged, Perl Fundamentals (DVD))
Powell's Technical Books is at 33 Northwest Park Avenue in Portland. You can take the MAX Green line (for free) from the Convention Center to NW 5th St and NW Couch St, then walk 4 blocks west to the store. There are other Powell's location, so ensure you are going to the Technical Books location.
Being a bookish type I am always on the lookout for new stock. One thing to avoid in a bookshop is probably the computer shelf, although I always do check it out. Good job too! On a recent trip into our more remote rural areas I came across a little gem.
Larry Wall & Randal L. Schwartz. PROGRAMMING PERL. January 1991 1st printing
The very first edition of the book was on the shelf in front of my eyes sandwiched between a Win95 book and some other item of even less consequence. A taller format than the current O'Reilly books, it is complete with a 16pp 'Quick Reference Guide' , and came as a Nutshell Handbook in the 'Unix Programming' series.
Unlike the other first editions that I might be searching for, and which can often be worth a small fortune, this item has little monetary value, but is worth a lot to me just to have on the shelf (at home of course).
I saw some article about HTML::FormHandler, and decided I'd give it a try. I'm probably not really using it as intended... and I'm also not pushing this confluence of tech nearly as far as it can go.
#!/usr/bin/perl
use strict;
use MooseX::Declare;
use KiokuDB;
use Continuity;
First we just pull in some libraries. We'll use MooseX::Declare for fun :) . Now let's make a lovely base class for our forms, to set up some good defaults an an updater.
Even though I had to let go of web programming for a while now, Dancer is still my favorite framework. Bad attitudes do not exist in Dancer, we don't trash anyone and we're not just polite and respectful towards each other (and by "each other" I'm definitely including all developers _and_ users), but we're also very attentive to one another.
That is how we're able to continue with the project successfully even when one or two core developers are very busy (which happens at times) - as with me right now or Sukria in the past. We're still able to push in new features, serious fixes or even major overhauls when needed.
For example, Dancer has pushed new pure-regex syntax (deprecating the regex path wrapper function we had before) and even provide plugins (w00t! plugins!) and we'll be adding websockets support (omg omg omg *drool*) as well!
In my my roles talk I have a long section on the B:: modules but that is so confusing to folks (as one might expect from multiple inheritance (MI) and B:: modules) that I decided to rip it out. I've replaced it with an example from the BETA programming language (all CAPS in BETA is from them, not me).
While this example is fascinating, I realised that I no longer had a damning indictment of multiple inheritance. I'm hoping that I won't need it and people will follow what's going on, but I'm now unsure and I have less time for revising this talk. However, in the process of thinking and researching about this, I discovered something interesting.
I've published a new module to CPAN this week called Facebook::Graph, which allows you to interact with Facebook to query data, publish content, and more using the new Graph API that they released at the F8 conference at the end of April. I want to take a few minutes to introduce you to the module.
As I prepare the material for my 5h WxPerl training course in Pisa (attendees are always welcome :)) I like to post some information you may find useful if you're a WxPerl user. Today I started to prepare my slides, which will cover only the theoretical part/first chapter. After that we will just deal with code that we do run live. For this I prepare many scripts which are snapshots of an real app in development. After doing this kind of teaching last year in Essing at the German WxPerl workshop, I think this time I will focus more on building a real application, rather than just playing with little examples that highlight corner cases and typical mistakes.
All students will get all the material, like the scripts a sheet with tips and links, but also some additional docs like this WxPerlTablet I once wrote in English and German, that will also be enriched until Pisa.
Erlangen.pm is a very active Perl mongers group in the Franconian city Erlangen in Germany.
We are about 15 to 20 peoples who meet on the third Monday every month with Perl in our minds. Our meetings usually take place in a small Italian restaurant in Erlangen. From time to time we organize talks and presentations at the RRZE, the Computing Center of the University of Erlangen. And once a year we even organize hackathons and workshops in the nice buildings of the yachtclub of Nuremberg.
The German Perl community might also remember us as host of the 10th German Perl Workshop in 2008 at the Computing Center of the University of Erlangen.
And now, Erlangen.pm wants to tell the world about their activities. We want to show you the discussions, ideas and the fun we have with our favourite programming language. Maybe we can even give you some hints for your own Perl mongers group and of course we want to get some feedback for our daily community work.
And last but not least we want you as a reader to have fun reading about another healthy and wealthy mongers group in our great Perl community.
I got home this evening to find an Unexpected Parcel waiting for me, full of books. I have no idea who it's from, but I'm guessing that it's from someone who finds CPANdeps useful. Thank you, Anonymous Benefactor! Your generosity is much appreciated!
I previously wrote a post called "Get the damned version". This post is tentatively entitled "There Is More Than One Way To Get The Damned Version" and speaks about the plethora of applications and modules to get versions. Brace yourself!
So, apparently I'm not the only one who hates how you cannot distinctively get the version of a specific module. We have various trickeries such as loading the module and printing it, trying to load an unknown - yet hopefully - non-existent advanced version and failing thus showing the version and a few other such odd possibilities... and then there are the modules and applications.
While use.perl.org proves yet again to suck (and this time by not being able to continuously supply the simple CPAN module uploads RSS stream), I've gone to the original stream (which shows every single module upload as an RSS item), I noticed that a new module and application surfaced called App::Mver.
I’ve recently moved away from s5 as my presentation framework of choice - mostly because they’re hard to share on sites like SlideShare should I ever choose to.
I’m currently playing with Beamer to generate PDF-based presentations.
As ever it’s a bit of a learning curve. I’ve managed one company-internal presentation so far, and intend to write my YAPC::EU 2010 presentation using it.
Being inherently lazy, I got bored manually running the voodoo required to regenerate the PDF from the .tex file(s).
Here’s my self-howto for using make to increase my laziness coefficient. It’s not perfect, but seems to do the trick.
As a follow-up to one of issues I raised in Installing Deviant OpenSSL XS Modules, I sought out to determine how difficult it would be pass makepl_args (arguments for Makefile.PL) to cpanminus.
With the big announcement on Monday, that we are now live with CPAN Testers 2.0, the next couple of months are likely to be interesting to say the least. We now have the task of helping people set up their smoker clients to use the HTTP submission process, rather than the current SMTP defaults. In most cases it will just require some changes to existing configuration settings and the possible upgrade to the latest smoker tools. Part of the setup process does involve registering with the Metabase submission service, which initially will be a little bit of a manual process, although will be a more automated process once the web site is up and running. Once correctly configured, you should then be able to continue testing as before.
Pursuant to an idiotic discussion that I'm just not going to link to, I have formulated a general rule about type discussions:
Computer scientists have reasonable disagreements over the meaning of "static" and "dynamic" typing. Computer programmers have unreasonable disagreements over the meaning of "static" and "dynamic" typing.
Installing XS modules that link to OpenSSL can be tricky if you don't have OpenSSL installed in the normal place. I'm using Solaris 10, and I have OpenSSL installed in /usr/sfw.
I was having a problem getting Crypt::OpenSSL::Random, Crypt::OpenSSL::RSA, Crypt::OpenSSL::DSA and Crypt::OpenSSL::Bignum to install.
I'm working on some apps lately that require some extreme single sign on, and also a little Facebook integration. Since Facebook now supports OAuth 2.0, I'd like to kill two birds with one stone. However, I don't like duplicating functionality if I can help it. Is anybody working on a module for the OAuth 2.0 spec? If not, I'm probably going to throw a little effort into it. If you are, and would like some help, please let me know. Or if it interests you and you want to help me, let me know that as well.