Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

jozef (8299)

jozef
  (email not shown publicly)
http://jozef.kutej.net/
Jabber: jozef@kutej.net

Journal of jozef (8299)

Thursday August 19, 2010
10:09 AM

Bundles Packages Builds Releases Tests

When I showed Benjamin (a college of mine) my TPF 2010Q3 grant proposal, we slipped to a discussion about deploying Perl software. Nice (and recent) list of different approaches can be found @modernperlbooks.com. To sum it up => TIMTOWTDI. Which is good, but none of those is perfect. The Perl+CPAN world is way too complex.

During out discussion with Benjamin I proposed an idea of shipping the application altogether with the OS. Insane? The base Debian system is ~190MB, all the rest is needed for the application. Then deployment will be a matter of running this system on a virtual machine, somewhere in the cloud or in a simple chroot. (btw any Linux distribution can have any other Linux distribution working in a chroot) The files will never clash, all the "machines" would be dedicated. No fear of putting files where they belong to.

(crossposted)

Monday August 02, 2010
09:07 AM

XML + XPath + GUI = Xacobeo

Xacobeo a Perl GUI to visualize XML and perform XPath queries just entered Debian unstable - http://packages.debian.org/sid/xacobeo.

Wednesday July 28, 2010
12:00 PM

You just upload your application, ...

It is amazing what happened to the Python thanks to just one company. The killer feature of that company is that they can handle and manage millions of servers and even give them for a public usage => "..., there are no servers to maintain: You just upload your application, and it's ready to serve your users.". I would like this to be true one day for Perl too!

I really do. In coming months (years?) I'll try to plug together « MiniCPANInject + SmokeTesting + ContinuousIntegration + Virtualization + Debian + Monitoring » to create an architecture for Debian-Perl hosting. Actually who cares about OS used, when the uploaded code just works, right?... A hosting that is aware that one server is not enough for everyone and will offer an architecture for development, user-acceptance, staging and production environments to start with a project from $day == 1.

(crossposted)

Tuesday June 22, 2010
12:22 PM

sub r {return if !$_[0]; r($_[0]-1); } leaktrace{ r(1);};

Today @$work we discovered that even dummy recursive calling of a function is leaking memory. Here is the one-liner 10000x calling it self and returning:

perl -MEnglish -MGTop -le 'my $g=GTop->new();$m=$g->proc_mem($PID);print $m->size; sub r { return if not $_[0]; r($_[0]-1); } r(100000); $m=$g->proc_mem($PID); print $m->size;'

The output is:

7122944
34729984

Before the recursion 7MB allocated. After the recursion (that finished) 34MB...

Here is what Test::LeakTrace say about it:

$ perl -MTest::LeakTrace -le 'sub r { return if not $_[0]; r($_[0]-1); } leaktrace{ r(1); };'
leaked ARRAY(0x9b7e8e8) from -e line 1.
leaked SCALAR(0x9b98cb8) from -e line 1.
leaked ARRAY(0x9c311f8) from -e line 1.
leaked SCALAR(0x9c311e8) from -e line 1.

Are we doing anything wrong? Is it ok? How to release the memory?

Saturday June 19, 2010
09:29 AM

UNIX / in Strawberry %INC

That was a surprise for me to see / in MSWin32 paths. Dump of %INC:

$VAR1 = {
         'bytes.pm' => 'C:/strawberry/perl/lib/bytes.pm',
         'XSLoader.pm' => 'C:/strawberry/perl/lib/XSLoader.pm',
         'Carp.pm' => 'C:/strawberry/perl/lib/Carp.pm',
         'warnings/register.pm' => 'C:/strawberry/perl/lib/warnings/register.pm',
         'File/Spec/Unix.pm' => 'C:/strawberry/perl/lib/File/Spec/Unix.pm',
         'Exporter.pm' => 'C:/strawberry/perl/lib/Exporter.pm',
         'vars.pm' => 'C:/strawberry/perl/lib/vars.pm',
         'strict.pm' => 'C:/strawberry/perl/lib/strict.pm',
         'warnings.pm' => 'C:/strawberry/perl/lib/warnings.pm',
         'File/Spec.pm' => 'C:/strawberry/perl/lib/File/Spec.pm',
         'overload.pm' => 'C:/strawberry/perl/lib/overload.pm',
         'base.pm' => 'C:/strawberry/perl/lib/base.pm',
         'File/Spec/Win32.pm' => 'C:/strawberry/perl/lib/File/Spec/Win32.pm',
         'Data/Dumper.pm' => 'C:/strawberry/perl/lib/Data/Dumper.pm',
         'App/whichpm.pm' => 'lib/App/whichpm.pm'
       };

Thursday May 06, 2010
01:55 AM

Learning from StackOverflow.com

http://www.youtube.com/watch?v=NWHfY_lvKIQ

Joel shows that StackOverflow is (||was?) running on 2 servers (+1 backup) using C# and SQL Server. Impressive :-) seek to 24:56 to see the full performance+tech table.

There is also a Perl+Perl6 mentioned in this talk, seek to 38:00 to hear the #1 thing you should never do...

(crossposted)

Sunday April 25, 2010
12:40 PM

Data::Keys

is just a base module responsible for loading extension (Data::Keys::E::*) during the object build time. It just makes sure one of the extensions supplied get() and set() method. The rest is up to the extensions.

get() should be called with one argument a $key and return value for it. set() should be called with $key and $value arguments returning modified (if it was) $key.

So far I've created this extensions:

How I want to use it now? Value::InfDef to help reading folders full of JSON files. Key::Auto to store data as Git does - based on the hash of data. Key::Adapt to easily access Debian distribution files in the pool folder or CPAN distributions files based on the AUTHORID/DISTRIBUTION in CPAN mirror folder structure.

For now there is just folder storage as I want to use it for some tasks, but it should be quite easy to create any key/value storage extension.

(crossposted)

Friday March 26, 2010
04:44 AM

dh-make-perl --locate Foo::Bar

I didn't know about this easy way to locate Perl modules in Debian packages.

$ dh-make-perl --locate Foo::Bar
Using cached Contents from Fri Mar 26 10:25:51 2010
Foo::Bar is not found in any Debian package

$ dh-make-perl --locate Moose::Meta::Class
Using cached Contents from Fri Mar 26 10:25:51 2010
Moose::Meta::Class is in libmoose-perl package

$ dh-make-perl --locate Test::More
Using cached Contents from Fri Mar 26 10:25:51 2010
Test::More is in Perl core (package perl) since 5.6.2

So there is a ready made solution how to locate Perl modules in Debian packages. The '--locate' option is in Squeeze (testing) version of dh-make-perl or in the source repositiory.

Thursday March 11, 2010
05:35 AM

How to get a CPAN module into Debian

05:01 AM

Perl 5.12 for Squeeze?

"The squeeze freeze is also just around the corner AFAIK so I don't think there's much chance of 5.12 making it in. If somebody wants to step up and push for it, they should definitely talk to the release team first."

http://lists.debian.org/debian-perl/2010/03/msg00045.html