Test entry

Why is blogs.perl.org so slow?

Perl en France?

(Pardonnez mon mauvais français). Ma belle-mère (presque) visite Londres cette semaine. Elle aimerait que Leïla (ma fiancée) habiter en France et me demanda s'il serait difficile pour moi de trouver un emploi en France. J'avais l'impression que Perl n'est pas très populaire en France et je lui ai expliqué que, sans parler couramment le français, il serait difficile pour moi d'obtenir un emploi en France dans un autre langage que Perl. Pour Perl, il semble qu'il ya très peu d'emplois à Perl en France. Est-ce vrai?

Nous n'avons aucune intention de quitter le Royaume-Uni, mais je suis curieux de connaître l'état de Perl en France.


My future mother-in-law is visiting this week. She wants Leila to move back to France and asked me if it would be difficult for me to find a job in France. I was under the impression that Perl is not very popular in France and found myself trying to explain that without speaking French fluently, it would be difficult for me to get a job in France in a programming language other than Perl. As for Perl, it's seems that there are very few Perl jobs in France. Is this true?

We are not planning on leaving the UK, but I am curious about the state of Perl in France.

I heed the call

I will use this space to blog about Perl, which might not sound peculiar, but wait!

Unlike most here, I don't make my living by programming in Perl, but rather by working on several unconnected Microsoft frameworks that have a .NET in their brand name. I do use Perl for my pet projects and tools I work on my space time. In this sense I'm a hobbyist Perl programmer.

I think this gives me a unique look on the world of Perl, one of an outsider looking inside. Now, this is quite an oversimplification of the matter, as I should make clear. I frequent the different Perl online presences, such as PerlMonks, use.Perl, blogs.perl.org and planetperl. But I do all that as an enthusiast rather than as a professional.

Debugging B::C, fixing method_named (part 4)

In the first B::C debugging article we stepped into the B::C compiler with Od.
In the second B::C debugging article we stepped the c code with gdb.
We saw that the compiler is missing a method_named sub (aka a package->method call), the most typical problem with the compiler.
In the third B::C debugging article we saw the easy workaround, using -u to force using the package subs from the package given in the -u option.

Now let's finally fix this bug which was introduced with the addition of the opcode method_named forever.
Looking at the source of pp_method_named() we see that the package name is a PV at
[PL_stack_base+TOPMARK+1], and the method name is at the stack.
Looking at the illguts stack page, inspecting the optree generator in op.c and debugging into pp_method_named we confirm that the missing package PV is the SVOP->sv of the previous op. The name of the CONST.

Bundled or Unbundled? Perl Programming Helps Decide.

Over the holidays, a few friends challenged us to video-game duels. We enjoyed them enough to want a game system of our own. A bit of on-line price comparisons turned up an interesting trend- the bundles seemed more expensive then buying items separately. Perhaps there's greater demand and price competition on simpler, single items? Nevertheless, there are a variety of bundles, controller packs, and accessories, and I was curious what the price range was for the various ways to assemble a given system.

What better way then Perl*. And it turns out the same program can be used to price anything with various parts assembled or not- or to plan a multi-city trip, showing the total cost difference between various modes of travel, lodgings, etc. The code below only uses one module not included in the standard distribution, "enum", and if you don't want to install it you can "use constant" instead to define the name-to-number mapping.

Dear Lazyweb: 3D Graphing Software?

Assuming I have an undirected graph of 3D points, what (free) Javascript or Flash software would you recommend for plotting them (along with their connections) in a browser? I vaguely need an end result like this 3d scatter plot, but with fewer (87) points and a similar number of connections.

It would be nice if it was cross-browser compatible and didn't require a Flash authoring tool :)

Looking for help with decryption in Spreadsheet::ParseExcel

I am the current maintainer of Spreadsheet::ParseExcel and I am looking for help from some people with an interest in cryptography in Perl.

I would like to extend Spreadsheet::ParseExcel to parse encrypted Excel files with user supplied or default passwords. This is a frequently requested feature from end users.

The problem is as follows. At its most basic level an Excel file is comprised of sequential binary records like this:

Name     Length   Data 
2 bytes  2 bytes  variable length

When the file is encrypted some additional unencrypted records are added to the start of the file to define the encryption type (usually RC4) along with some information such as salt and verifier hash. The Data segment of the subsequent records, but not the Name or Length bytes, are then encrypted.

Debugging B::C, the workaround (part 3)

In the first B::C debugging article we stepped into the B::C compiler with Od.
In the second B::C debugging article we stepped the c code with gdb.
We saw that the compiler is missing a sub in a seperate package, the most typical
problem with the current compiler. (since 1995)

We have a cool workaround for this, the -u option for "use".
-udummy forces all symbols in the package dummy to be dumped.

Remember, our testcase was:
'package dummy;sub meth{print "ok"};package main;dummy->meth' as ccode35.pl

Reducing Database Backups

Having monitored the logs on the server over the last few days, I've noticed some improvements that can be made to some of the processing. Some of the improvements are in the server code itself and will be introduced alongside some of the changes towards CPAN Testers 2.0.

However, some of the proposed changes are to the files available on the Development site. Specifically the database downloads. As there hasn't been anyone accessing any of the CSV files for the Uploads DB, these will be removed next week. Of the other files, although the GZip and BZip files are accessed, they aren't accessed very often, except for the cpanstats DB. As such the archives for both the Uploads DB and Release DB will only be updated once a day from next week.

These changes are to help reduce the processing load on the server, which in turn will help to improve response times for web pages and allow more processing capacity for parsing reports once we move to the Metabase.

Post!

I really wish more people would post here. I don't want this to be Ovid + the rest of the Perl community. I feel bad about the number of posts I make because I feel like I'm almost dominating this blog.

In other news, I've discovered that using GraphViz and star charts is harder than I thought.

On low attendance in TelAviv.pm meetings

Shlomi Fish published a post in Israel.pm that I think is worth reading by anyone from Israel (or Israhell), especially if you're from the Tel Aviv region.

In a year that dealt mostly with marketing, there seemed to be a decline in people showing up to meetings. Even though Tel Aviv University provided us with a room (and now a better room), with a projector, boards, air conditioner and a lot of space, few people show up.

Whatever the reason is, if these trends continue, the meetings will cease. If you care about Perl, if you like to learn, if you like to teach and if you want to spread it, these meetings are for you (or for you to drag someone else to :).

I find it hard to believe there are no Perl programmers in Tel Aviv (I personally know a few), and that they all know everything already.

Seriously, wake up and give a shout out to Shlomi (or even me) about why you aren't showing up. Whatever reason it is, there's bound to be some solution to it.

P.S.:
No, I didn't really understand what you wanted, Shlomi. :) My answer was "whatever parser you want to write, it has two steps. Step one is Parse::RecDescent." I thought it was funny.

blogs.perl.org Feedback

This site has live been on the new hardware for a while now and things seem to be a lot more stable than they were previously.

There are, however, still a few issues that are left over from the old system and which are causing problems for some users (and some potential users). One particular problem that we keep coming across is that of accounts that were half-created on the old system. If you think you set up an account but you can't log in here or if you log in successfully but the system says you don't have permission to post a blog entry then your account is almost certainly in one of several possible intermediate states.

Most of these issues are really simple to fix. But we can't fix them unless we know about them. We have a ticket tracker on github where you can tell us about these problems. There is a link to this tracker at the bottom of every page on this site.

So if you have a problem of any kind with the site, please use the tracker to left us know about it.

CPAN upload

CPAN offers multiple ways for uploading modules. I only know of 3 ways:

I'm wondering if it's possible to upload a file through scp (ssh). This would be very convenient in the case where SSH keys would be allowed as it wouldn't require users to type in a password (except for the first time that the ssh-aget loads the key).

Anyone knows if it's possible to use scp?

Things on my "not" todo list

Silly facebook conversation inspired the following:

package UNIVERSAL::Don't; # Because putting things in UNIVERSAL is fun!'

sub don::t {
    my ( $proto, $method ) = @_;
    my $class = ref $proto // $proto;
    my $method = $proto->can($method) or return;
    *{"$proto\::$method"} = sub {};
    return $method;
}

Just think of how much fun you could have with that ;)

And even though the single quote mark package separator is deprecated, it will be at least a decade before a more strongly worded deprecation notice is added. This, oddly, was inspired by the fact that today at work, I wrote the following package: Don't::Put::Me::In::t::lib:Unless::You::Want::To::Drag::The::Test::Suite::To::A::Screaming::Halt.

And for some reason, this blog is cutting off the rest of that package name, so here it is, broken up: Don't::Put::Me::In::t::lib:Unless::You::Want:: To::Drag::The::Test::Suite::To::A::Screaming::Halt

Debugging B::C, gdb into it (part 2)

At the previous entry Debugging B::C, hitting the recursion depth I showed how attack a typical B::C problem, how to use the perl level debugger
stepping into compiling code with Od.

However we found no error in the compiler at a first glance.
Inspecting the generated c code we see for the perl code

package dummy;sub meth{print "ok"};package main;dummy->meth

parts of the optree as

Padre plugin for Autodia

One of the cool benefits of my new job at Connected-UK is that I get a day a month to hack CPAN/FLOSS projects.

So far, I've done some work on Autodia, Test::HTML::Form and even released two new modules (the latter sponsered by Connected-UK) : Test::HTTP::Response and Padre::Plugin::Autodia

The Autodia plugin for Padre is currently only version 0.01 and very simplistic, but it does allow you to create, view and save UML class diagrams of your code within Padre..

I even had time for some cool screenshots :
Menu (now allows you to do multiple files using the file dialog
A diagram of the current file

yeay!

MSNBOT must die!

If you've suffered any problems accessing any of the sites, the databases, the CPAN mirror, etc from the CPAN Testers server last night, please direct your wrath at Microsoft. Last night the msnbot took out the CPAN Testers server with a dedicated denial of service attack. As a consequence measures are now being put in place to completely ban the msnbot from accessing at least the Reports site, and probably all the sites on the server.

Microsoft in their incompetent wisdom decided to unleash 20-30 bots every few seconds. I know this because I can see the IP addresses in the logs. The ones spotted within a few minutes of rebooting the server this morning to clear the processes were:

65.55.207.50
65.55.207.23
65.55.207.93
65.55.207.25
65.55.207.48
65.55.207.46
65.55.207.72
65.55.207.26
65.55.106.234
65.55.107.179
65.55.207.100
65.55.207.121
65.55.207.30
65.55.207.69
65.55.207.28
65.55.107.180
65.55.207.27
65.55.207.47
65.55.207.21
65.55.207.51
65.55.207.54

First blogs.perl.org post

First post on blogs.perl.org, coming from .

Debugging B::C, hitting the recursion depth

The nature of the data driven perl compiler is hitting the perl debuggers recursion limit, even on one-liners.

Consider this bug: [CPAN #53889]
package dummy;sub meth{print "ok"};package main;dummy->meth
=>
ok

The compiler does not detect the meth sub in the dummy package.

  $ perl -MO=C,-DcOACMSGpo,-v,-oa.c -e 'package dummy;
                 sub meth{print "ok"};package main;dummy->meth'
  $ cc_harness a.c
  $ ./a

Can't locate object method "meth" via package "dummy" (perhaps you forgot to load "dummy"?) at -e line 1.

BTW: Easier tested in the distro with
$ t/testc.sh 35

Elegance Fail

Elegance might seem like a lost trait in programming these days, but it is live and vibrant in Perl. A rather large part of the Test namespace is devoted to providing an elegant way to write "run this code, get the result, compare it with this one".

Today I found myself at a loss of an elegant solution to a problem.

I want to run a set of tests. Theoretically I can write each subset of tests as a Role in a test object (there are at least three testing frameworks that allow this nicely) and then run the tests in the object. I can even use MooseX::POE (or regular POE, AnyEvent, Test::Aggregate and the list goes on) to run them asynchronously in order to save the time.

Two things bug me:

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.