Tag Archives: perl

Communities in Action 2010 in Oslo

Last Monday, 10th of May, the regular Oslo.pm (Oslo Perl Mongers) meeting was a little special. In fact, there wasn't any Oslo.pm meeting, but we went to a free, one evening mini conference sponsored by several norwegian companies: "Communities in Action".

The basic idea was to put together several different communities in the Oslo area, so the conference program was diverse and exciting. There were 7 different tracks. Among them, the most interesting for me, apart from Oslo.pm, were:

  • XP (extreme programming, agile, etc…)
  • scalabin (about the scala language)
  • OWASP
  • Oslo C++ users group

Other tracks were by the NNUG, Norwegian .NET users group and IASA, some norwegian association about something…

There were a couple of colleagues from Opera, and other guys I know from Oslo.pm, but being there alone, I couldn't follow more than one track, so I tried jumping a bit between different rooms. I found the XP talk a bit boring, so I settled on the Oslo.pm track. There was a talk on rakudo * by Karl Rune Nilsen and a talk about meta-object programming in Perl vs Ruby by Matt Trout.

Both talks rocked. I think I had attended a very similar rakudo talk before, but the Ruby one was entirely new. It was funny when Matt, just before starting, tried to attract Ruby folks screaming and shouting
throughout the hotel hall :-)

After the conference, a small group of us gathered and headed over to tilt, a nice pub/pinball place, where I ended up making the day record even if I suck at pinballs…

Pimp my Debian

Have you ever reinstalled your workstation and found out that your Perl scripts need a shit load of modules that you don't have anymore? Or maybe on a server?

I have. In such cases you have to:

  • run your script,
  • find out which module is missing,
  • figure out if there's a debian package for it,
  • install the debian package,
  • GOTO 10

Today I was so annoyed and lazy, that I decided to put an end to this madness. So I wrote pimp-my-debian. It's an innocent script that you can run as follows:

$ pimp-my-debian --command 'perl ./myscript'

It will keep running your command (perl ./myscript), reading its output, and if it contains something like Can't locate module Foo/Bar.pm in @INC, or Base class package "Foo::Bar" is empty, it will try to figure out a suitable debian package, install it, and retry your command.

It worked so well that I so want to use it again… :-)
Get pimp-my-debian here and have fun!

European Perl Conference, Day 1

Every YAPC::EU (Yet Another Perl Conference Europe) is a really big event in the Perl world, with lots of people from every part of the planet. I got to know some of them already, so we just meet like good friends :-) This year's theme was Corporate Perl, how Perl is used in the corporate world.

This time though I was presenting a talk during the first day of the conference: How Opera uses Perl, that's up on Slideshare right now. If you take a look at it, you will find out that we actually use Perl for a lot of systems, from the very tiny to very complex, mission-critical ones. It's been quite some fun preparing the talk, and I think it also went decently.

There were lots of other interesting talks, even lightning talks, like Giuseppe Maxia's MySQL Sandbox, or Sue Spencer's talk about "Perl at Cisco Systems". There was also a talk on roles and inheritance in OO systems by Curtis Poe of the BBC, and a really funny lightning talk by Alex Kapranoff, a russian guy, but I don't remember the title. Merijn Brand presented lots of ways to improve your Perl modules. This guy's amazing. Also avid Opera user.

During lunch we met up with Martin Berends and Carl Mäsak and talked about Perl 6 syntax, CPAN 6, etc… really cool people.

LWP::Simple for Perl 6

During the last Perl 6 hackaton in Oslo, I got to meet in person some very cool folks from the Perl Community, and we had a lot of brainstorming fun, as usual.

I went there with the ambitious (and out of my skills, most probably) goal of implementing a Socket interface for Perl 6. Talking to the various smart folks there, I realized that we didn't need to write that much, because Parrot, on which the current Perl 6 implementation is based on, already had sockets support.

After much nagging, I wrote a quick & dirty wrapper that mimicked the existing Perl5's IO::Socket library, that Carl and Martin improved. And on top of that, we were able to write a really tiny LWP::Simple-like class for Perl 6.

Now it's on up on github, go fetch it!, before it's too late :)

Ubuntu 8.04 and Perl OpenGL extension

Recently, I was trying to install the perl OpenGL module for a fun hack I'm trying to write at home.

There was no way of getting it installed. The compilation didn't succeed. The error message from the compiler was something along the line of:


... /usr/lib/xorg/extensions/glx.so: Undefined symbol GetTimeInMillis ...

Searching on the web held the following result (just 1):

Perl and OpenGL: http://ubuntuforums.org/showthread.php?t=948812

Reading the thread, from last October, it was clear that the author found no solution to this problem. A look at the OpenGL extension, and in particular, to its build script revealed that you can compile and link the OpenGL extension with different GL libraries.

Turns out that Ubuntu works with the FREEGLUT library. Thus, doing:

$ wget http://cpan.perl.org/modules/by-module/OpenGL/OpenGL-0.57.tar.gz
$ tar xzvf OpenGL-0.57.tar.gz
$ cd OpenGL-0.57
$ perl Makefile.PL interface=FREEGLUT
$ make
$ make test
(a small demo application should run...)
$ sudo make install

should build and install the OpenGL extension.
More about my fun project later… It's going to be presented at the Nordic Perl Workshop next April…

New T-shirt design


#!/usr/bin/env perl


                                                       ''=~("(".
                                                '?'.'{'.('`'|'%').("["^
                                           '-').('`'|             '!').('`'|
                                        ',').""".                  '#'.'!'.'/'
                                      .('['^'.').                    ('['^"(").(
                                    '['^')').'/'                      .('`'|'"').(
                                   '`'|(')')).(                        '`'|'.').'/'.
                                  ('`'|('%')).(                         '`'|'.').('['
                                 ^'-').(('{')^                          '[').('['^'+')
                                .('`'|('%')).(                           '['^')').('`'|
                               ',').('!'^'+').                           ('!'^'+').('['^
                              '+').('['^')').                            ('`'|')').('`'|
                              '.').('['^'/').                            ('{'^'[')."'".(
                             '`'^'*').(('[')^                            '.').('['^'(').(
                             '['^'/').(('{')^                            '[').('`'|'!').(
                             '`'|'.').(('`')|                            '/').('['^'/').(
                       '`'|'(').('`'|('%')).(                            '['^')').(('{')^
               '[').('{'^'+').('`'|'%').('['^")").(                     '`'|',').(('{')^
         '[').(('`')|        '(').('`'|'!').('`'|'#').('`'               |'+').('`'|'%').
      ('['^')')."'"          .','.('{'^"[").   '\'.'"'.('\').         '\'.('`'|".").
    '\'.'"'.";".(           '!'^'+').("["^       '+').('['^')').(     '`'|')').(('`')|
   '.').('['^"/").(          '{'^'[')."'".(         '{'^'[').(('{')^   '[').('{'^'['). 
   ('{'^'[').('{'^'[')         .('{'^('[')).(            '{'^'[').('{'^'[').('{'^"[").( 
    '{'^'[').('{'^'[').        '.'.'.'.('.').(             '{'^'[').('`'|'!').('['^'/')  
     .('{'^'[').('`'^'/')       .('['^('+')).(               '`'|'%').('['^')').("`"|  
       '!').'!'."'".(',').(      '{'^'[').'\'                 .'"'.'\'.'\'.(('`')|   
         '.').'\'.'"'.";".(     '!'^'+').('!'                  ^'+').'"'.'}'.')');    
            $:='.'^'~';$~="@"|    '(';$^=(')')^                  '[';$/='`'|'.';$,=
               '('^'}';$='`'|'!'   ;$:=')'^'}';                    $~='*'|'`';$^=
                  '+'^'_';$/='&'|'@'  ;$,='['&'~'                    ;$=','^'|'
                       ;$:='.'^"~";$~=  '@'|'(';$^                =')'^'[';$/
                            ='`'|'.';$,='('^('}');$=            '`'|'!';$:
                                    =')'^'}';$~='*'|'`';$^='+'^"_";$/=
                                                '&'|'@';$,=('[');

Perl Club

The First Rule of Perl Club
You do not talk about Perl Club

The Second Rule of Perl Club
You do not talk about Perl Club

Third Rule of Perl Club
A laptop crashes, breaks, runs down. The hack is over

Fourth Rule of Perl Club
Only two programmers to a pair

Fifth Rule of Perl Club
One bug at a time

Sixth Rule of Perl Club
No Java, no VB

Seventh Rule of Perl Club
Hacks will go on as long as they have to

Eighth, and Final Rule of Perl Club
If this is your first night at Perl Club, you have to hack

From dave.org.uk

Win32::API v0.52 released to CPAN

I just released version 0.52 of Win32::API. It should be available at your local CPAN mirror very soon.

This version should play nicer with CPAN testers, since it checks if the OS makes sense before going through Makefile.PL, so no more failures with Solaris, Linux, FreeBSD, and such are expected.

Please note that I published 0.51 one hour ago, but it's broken, so I have already scheduled its deletion. Please don't use 0.51.

Enjoy and please report to me any problems you have.

UPDATE: it seems that I screwed up again the META.yml and the dist resulted as UNauthorized because of my inclusion of Devel::AssertOS. Oh well…

Here's a list of latest changes:

2008-03-01 Win32::API v0.52 Cosimo

– Devel::AssertOS was not properly set up in 0.51.

2008-03-01 Win32::API v0.51 Cosimo

– Cleaned up API.pm pod docs and clearly stated Win32::API license
– Fixed $$/pid tests for Cygwin
– Now uses Devel::AssertOS to check that we are on a Win32 or Cygwin system. This should ease the work of CPAN testers.

2008-02-23 Win32::API v0.50 Cosimo

– Fixed RT#31702 http://rt.cpan.org/Public/Bug/Display.html?id=31702
Thanks to RUrban for supplying the fix.

2008-02-20 Win32::API v0.49 Cosimo

– Fixed the stack cleanup assembler statements for GCC in API.xs, I hope.
– Fixed a Borland C macro definition in API.xs
– Fixed META.yml (stupid me)

2008-02-20 Win32::API v0.48 Cosimo

– Finally applied the cdecl/stdcall patch available since long time
from http://www.xs4all.nl/~itsme/projects/perl/.
Now Win32::API *can* work with cdecl DLLs.
Fixes RT#32424 http://rt.cpan.org/Public/Bug/Display.html?id=32424
and RT#24685 http://rt.cpan.org/Public/Bug/Display.html?id=24685
Thanks to Willem Jan Hengeveld (itsme at xs4all.nl) for his great work. Thanks to JimK for a test case and to BrowserUk and others at PerlMonks for providing me useful information and complaints. :-)

However, still missing some GCC assembler magic for stack cleanup. Any help?

– Clarified licensing info. Yes, Win32::API is available with GPL 2 / Artistic license.

Win32::API v0.48 adds cdecl function call support

In my (really little) spare time, I enjoy hacking on fun projects.
Lately, I have been struggling to get Win32::API Perl module to work on Vista with various MSVC++ and GCC compilers.

Since many have asked for it, and some brave soul had an old patch available on the net, I decided to give it a shot. I had already tried 2 or 3 times to get this patch (originally for v0.41) integrated in the new Win32::API versions, but always failed at it.

Today I decided to take the full journey, and seems I succeeded. Probably I broke something else… :-)
Please bare with me. Anyway, I have 2 things left in this release that I want to address in the new one:

– There's a Borland C macro def that is completely broken (thanks to BrowserUk for noticing)
– I need to complete the stack cleanup assembler code at the end of Call() function in the XS code. This should be easy, for some definition of "easy", since I already have some examples of MSVC/GCC assembler code in my RT queue.

Stay tuned for further updates…