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

IE8 Beta

Now that I work for Opera Software, I am somewhat more interested in browsers, standards, W3C working groups and so on… We also have a CTO that worked on (invented?) initial CSS specs.
Of course, new things about competitor browsers are immediately subject to discussions and opinions inside Opera.

The breaking news this morning was that Microsoft released a beta version of Internet Explorer 8. But the really surprising thing is that it seems to pass the ACID2 test, and without any doctype-switching or faking trick.

They just seem to have switched to standards-rendering by default.

Seems impossible?
Let's wait for the final, then… :-)

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…

MySQL is just crazy or what?

Ok, I was working on the staging/test database, checking out some performance problems I was experiencing.
Then I thought of optimizing one table. Optimizing should be like rebuilding the physical data file to compact record structures, remove invalidated data, …

MySQL has this OPTIMIZE TABLE command.
Ok, fire!

2/3 minutes passed. Then other 2/3. Then again.

I started to worry and tried to start new sessions, to see if table was blocked. It was.
Completely locked up.

Ok, I left the session running. Went to lunch. Came back.
Still running. WTF? I decided to interrupt the command. CTRL + C.

MySQL responded with some error code, 22 or something.
Ok, just check if I have to rebuild indexes, just in case.

SELECT * FROM sometable

Boom!

Table corrupted. No kidding. Tried to REPAIR TABLE and REPAIR TABLE QUICK.
No way. Table was completely DESTROYED.

Amazing…

Wikidoc syntax highlighting for vim

Recently I've been editing some wikidoc documentation, and I found boring to see everything as plain text.
I wanted to add some color to my vim screen.

So I decided to put together a wikidoc syntax highlighting file for vim.
And, 30 minutes later, it was working!

Thanks to the author of POD syntax highlighting. I shamelessly copied and modified his work…

BonDigi is the programming game of the moment

As I said in my last post, Bon Digi (really Bon Diggy) game is taking over!
When I posted the original announcement on our nonsense mailing list, I didn't know that I would have caused such an incredible activity from our brain cells!

So far, there have been nearly 10 different programming languages versions of Bon Digi game. Languages are: Perl5 (oneliners, scripts and classes), Python, Ruby, Haskell (3 versions!), Perl6, Emacs Lisp, Vim scripting and even CSS!

I will try to post some of these wonderful pieces of fine arts here in the next days.
Stay tuned.