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 ]

+ -

  Journal: Will parrot be the last one standing? on 2010.08.20 4:37

Journal by nicholas on 2010.08.20 4:37
User Journal

I'm a bit behind the times here, but I read today that one of the two remaining developers of IronRuby has left Microsoft:

Overall, I see a serious lack of commitment to IronRuby, and dynamic language on .NET in general. At the time of my leaving Tomas and myself were the only Microsoft employees working on IronRuby.

Read More 6 comments
Comments: 6
+ -

  Journal: Some you win, some you loose on 2010.07.28 14:50

Journal by nicholas on 2010.07.28 14:50
User Journal

So, my attempt to avoid 3D Secure was successful, but seems to have had the unintended side effect that I sold my soul for 3 days.

Read More 0 comments

+ -

  Comment: It's easy to get it wrong (Score 1) on 2010.06.24 4:12

What's really sad is that GC algorithms are very well known and quite easy to use; the Boehm GC comes to mind immediately.

What you're missing from this analysis is that swapping to mark & sweep GC, particularly a conservative GC such as Boehm, means that you no longer have any guarantee of the timing of destruction of objects, or even that they'll be (formally) destroyed at all, before program exit. So many of the existing uses of DESTROY in Perl would go out of the window, and the paradigm of Resource Acquisition Is Initialization would no longer be possible. Files handles wouldn't close automatically when the go out of scope. Database handles wouldn't be released immediately that their enclosing object becomes unreferenced. If the system has a lot of free memory, it's quite possible that the GC decides that it doesn't need to run a sweep, with the result that the program runs out of a limited resource such as database handles.

Hence it's easy to do something "obvious" and get it very wrong.

What would be needed is code to detect cycles of references, which is something more subtle than general "live-ness".

And as Andy suggests, nothing is stopping you contributing patches to Perl 5 to implement this. You can get the source code from http://perl5.git.perl.org/perl.git

Read More 7 comments
Comments: 7
+ -

  Journal: Ding Dong! The Witch is Dead! on 2010.04.21 16:10

Journal by nicholas on 2010.04.21 16:10
User Journal

$ git show --stat 75108aefc8b50fcf
commit 75108aefc8b50fcf2f053da2df34756c7b269a1f
Author: Nicholas Clark <nick@ccl4.org>
Date: Mon Apr 19 20:35:54 2010 +0100

Remove Switch from the core distribution. Get it from CPAN now.

Read More 0 comments

+ -

  Journal: Random thing to phase Dean on 2010.04.21 15:58

Journal by nicholas on 2010.04.21 15:58
User Journal

It seems that I haven't seen The Sound of Music recently enough*. I can't remember more than a couple of lines from any of the songs, despite being confident about the tunes. Hammerstein would be frustrated. Rogers, I assume, happy enough. Dean Wilson likely will comment that I have too much time on my hands, as seemingly surreal blog entries like this one seem to perturb him.

Read More 0 comments

+ -

  Journal: Rocket fuel review on 2010.04.04 15:22

Journal by nicholas on 2010.04.04 15:22
User Journal

So, mostly conclusions without much justification. Of the recent consumption:

Read More 1 comments
Comments: 1
+ -

  Comment: Re:HgSubversion (Score 1) on 2010.04.02 12:33

by nicholas on 2010.04.02 12:33 (#71813)
Attached to: svn to mercurial?

Admittedly this is only from reading its fine manual, but it looks more like git svn than a "proper" importer. i.e. it concentrates on bidirectional tracking of one remote branch in a subversion repository, not on untangling the "branches are branches and tags are branches too*" mess that a subversion repository can get into, not on converting them all to first class tags and first class branches.

* but really they're all just copies within a directory tree.

Read More 4 comments
Comments: 4
+ -

  Journal: svn to mercurial? on 2010.04.01 9:14

Journal by nicholas on 2010.04.01 9:14
User Journal

Dear lazyweb...

We're using Trac at work. It's made of software, but some software is more equal than others. In particular, we're planning to move from subversion to mercurial, because Trac seems to work nicely (enough)* with mercurial, unlike git.

Read More 4 comments
Comments: 4
+ -

  Comment: That's odd - I get an error diagnostic (Score 1) on 2010.03.01 8:36

by nicholas on 2010.03.01 8:36 (#71738)
Attached to: Gaming FAIL

I don't get a SEGV. I get an error that answers your question:

$ ~/Sandpit/5100/bin/perl5.10.0 -e 'qr/^([\w|\.]+)\s+(?(\d+)\s+)?(\w+)\s+(?:(\d+)\s+)?([\w|\d|\.]+)$/;'
Unknown switch condition (?(\d in regex; marked by <-- HERE in m/^([\w|\.]+)\s+(?( <-- HERE \d+)\s+)?(\w+)\s+(?:(\d+)\s+)?([\w|\d|\.]+)$/ at -e line 1.

And that's on This is perl, v5.10.0 built for i686-linux

Read More 1 comments
Comments: 1
+ -

  Journal: So we're getting Calais back? on 2010.02.17 15:01

Journal by nicholas on 2010.02.17 15:01
User Journal

The ambitious scheme follows a move by the French to cash in on the London Olympics by rebranding their region ‘part of Britain’.

The ploy has helped them land contracts with a string of foreign teams to train in France ahead of the 2012 Games.

Boulogne and Calais now claim that the Britain no longer stops at the white cliffs of Dover.

Read More 3 comments
Comments: 3
+ -

  Journal: don't do this on 2010.02.16 13:03

Journal by nicholas on 2010.02.16 13:03
User Journal

It's just occurred to me that it might be possible to goto \&sub_ref out of a BEGIN block. After all, they're really subroutines at heart. So, does it work?

$ cat sick.pl
#!perl -w
use strict;

sub sick {
    warn "Yuck!";
}

BEGIN {
    goto \&sick;
}

Read More 2 comments
Comments: 2
+ -

  Journal: Chip and Pin counterfud exposed. on 2010.02.12 12:31

Journal by nicholas on 2010.02.12 12:31
User Journal

So, Chip and Pin is broken.

But the fun part is in the comments. Comment 19 from the anonymous "Scrutineer" includes:

Read More 0 comments

+ -

  Comment: Re:making hard things easier (Score 1) on 2010.02.09 12:35

Good point.

Sadly, once again the punchline from the "Irishman giving directions" joke bites:

If I were you sir, I wouldn't start from here.

Read More 62 comments
Comments: 62
+ -

  Comment: Re:making hard things easier (Score 1) on 2010.02.09 12:18

Sorry, I wasn't clear enough. My fault. Prior art for a dynamic language implemented in C. Clojure is a dynamic programming language that targets the Java Virtual Machine. (To the best of my knowledge) Jython does threads just fine - it's CPython that can't, and even the folks at Google working on Unladen Swallow can't see how to take that Jython know-how and port it to the C implementation.

Read More 62 comments
Comments: 62
+ -

  Comment: Re:making hard things easier (Score 1) on 2010.02.09 5:33

I just phrased it wrong.

Yes, just that. Sorry for annoying you. I know that you contribute massively to keeping the dual life modules in shape. I'm not as aware of the other things that you do.

But I don't like the phrase. Particularly as it can be taken out of context, and likely will be some people who read it. It implies that the people referenced have the power to change that policy. Whereas the policy is totally defensive - we're already stretched beyond what a volunteer group can manage. If we tried to support more we'd soon collapse in failure. It's simply not an option. Hence we don't have "power".

Read More 62 comments
Comments: 62