Slash Boxes
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 ]

ank (5971)

  (email not shown publicly)

Journal of ank (5971)

Wednesday June 23, 2010
10:42 PM

PHP 5.3 includes garbage collection for circular references

Now, this is what I'm talking about. I haven't done PHP in ages, but today I needed to do some quick scripting and I realized there's been a new major release sometime after my last contact with the language. Quick look at new features includes garbage collection for circular references, something that perl still doesn't include.

You see? This is the sort of things that we lose by allowing Wall and his minions to have his way. A few years ago it would have been laughable to think that PHP was somehow more advanced than perl, but that's not the case anymore.

Of course, PHP has this garbage collection disabled by default, and seems quite experimental, in a very PHP-ish way. But still, at least there's an evolution.

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

See what happens when you dream of a pluggable, perfect GC scheme for a language that's been in development for 12 years instead of finishing something that's better than perl 5 and can be done now?

Cross posted to my blog

Monday June 14, 2010
07:48 PM

Perl 6: True-Believer Syndrome

I've been dealing with some delusional people lately, mostly as a side-effect of recent posts I made regarding chromatic, his entourage and Perl 6. This contact has left me wondering over and over - how was it that I used to love the idea of Perl 6 so much? How did I become so disenchanted with it? And ultimately, why is there still people rooting for Perl 6, seemingly oblivious to the defects the project has been dragging with it for more than a decade?

It's actually quite easy to explain. I have always been programming Perl and other languages in parallel, so it wasn't that hard for me to stop believing the idea that Perl 6 was going to be great. I have also changed and evolved as a person and programmer, so I am no longer at the place I was when I used to work for Yahoo! and used Perl on a daily basis, a decade ago.

This is markedly not the position other programmers find themselves in. Fervently believing that Perl 6 will be a good thing for the Perl community and buying O'Reilly reference books for the unfinished language, they simply cannot accept the fact that the whole concept is broken, even after it's been shown to them over and over.

This cognitive disorder is actually very well known, and is called True-believer syndrome. Wikipedia says:

According to The Skeptic's Dictionary, an example of this syndrome is evidenced by an event in 1988, when James Randi, at the request of an Australian news program, coached stage performer José Alvarez to pretend he was channelling a two-thousand-year-old spirit named "Carlos". Even after it was revealed to be a fictional character created by himself and Alvarez, many people continued to believe that "Carlos" was real.[5] Randi commented: "no amount of evidence, no matter how good it is or how much there is of it, is ever going to convince the true believer to the contrary."[9]

This reminds me of Chet Raymo's book "Skeptics and True Believers," which is filled with amusing depictions of True Believers.

Another point is that the few in the know, such as Larry Wall, chromatic, etc are having fun creating their project, and don't really care all that much about how long it takes - it will be done when it's done. So they don't really fit into this group - they are more like the Carlos who show the rest some mysterious cool magic acts that we are supposed to awe at.

02:10 PM

Perl and line noise: an objective comparison

We've heard over and over again that perl is like line noise - especially by people who don't program perl and are not used to seeing its code.

I think it's time to take a scientific approach to this problem, and figure out how "line-noisy" perl is. I believe that by comparing character frequencies in perl files versus C/java/plain English/etc we can ascertain once and for all which language looks more like English, which one more like line noise, etc.

The only problem I see with this is, just what exactly is line noise? Well, for perfect line noise, I would expect any character to be as likely as any other at any given time; so I think that by using that definition, we can easily compare.

I'm not going to do it right now because I'm awfully lazy, but I will soon. I'm more than ready to hear comments and criticisms on my approach, and on which code to use.

03:21 AM

chromatic's real name

What is chromatic's real name?

So far, my assumption has been that his last name was Christopher, since he has published a few books under that name. Now, it's much more likely that this is an alias used just for publishing - and that his real name is Shane Warden.

My evidence?

This is Mr. Warden:

These are some photos of chromatic: [removed] [removed] [removed] [new]

[Update: more to come, he has removed a whole bunch, but I can find them again. I've also ensured there are a few copies of the youtube video; please let me know if it goes down. -- ank]

See for yourself.

Note that I couldn't care less if he uses an alias (although I have to confess I find his one-name alias hilarious); and I actually hesitated until now to divulge this information because I believe in individual freedoms (in this case, the freedom of being called whatever the hell you want.) This changed when he didn't approve many of my comments on his blog - a violent, frightened response to a threat I simply don't pose. All I wanted is coherent discussion on what the Perl 6 group has been doing and how this is bad for the Perl community as a whole. I am now disgusted by the way he has dealt with my criticisms - and his utter lack of even a trace of humility or self-doubt.

I'm just a software developer in Australia, and have a family to feed. I'm much more interested in having my things done at the end of the day so I can play with my son than anything else - and I certainly take no delight in debating pretentious assholes.

I enjoy complex/weird programming languages just like every other nerd, but I would rather use a coherent, time-tested, stable, multithreaded and fast programming language for my daily work. Ultimately, it's no longer up to us which way Perl 6 goes - the damage has already been done.

And who do we have to blame for it? Well, largely, ourselves, for not taking the matter into our own hands. After all, this was based on our own RFCs back in the late 90s, so we are partially responsible for the train-wreck.

But ultimately we do not control what the word "perl" gets glued to - we don't own the name, so we can't just create a new programming language and call it "perl 6" - it doesn't work that way. There is a group of people who can. This is the people that have chosen to turn the Perl 6 logo into a joke. This is the people who think it's okay to have a whole bunch of operators that any smart person will laugh at. This is the people who refuse to see that Perl looks like line noise, even to decade-old Perl programmers. And these same people keep saying that Perl is "like English", even in light of atrocities like twigils.

We don't have to accept the programming language Wall and his circle of friends decide to unleash - we can sail away to cleaner waters. And lots of us have.

Monday August 31, 2009
11:36 PM

Constructive Criticism: the Perl 6 Butterfly

Here is a design I made:


It only took a few minutes. I hope it fosters some talk and maybe helps understand why I think the current one is defective. It is only a work in progress, and we can change and improve on it a lot; but I just want to put this on the table to show that I'm not being deliberately obtuse; I seriously want the best for perl.

-- ank

Tuesday June 24, 2008
08:47 AM

Data::Dumping code refs

Just another reason to love Data::Dumper which is, in my opinion, the best module in perlland. Pay close attention.

Suppose you have this data structure:

my $ref = { a => sub { print "a"; } };

Data::Dumper dumps it as:

$VAR1 = { 'a' => sub { "DUMMY" } };

Because it doesn't print out sub references. But you can tell it to deparse them (through B::Deparse) by setting $Data::Dumper::Deparse:

use Data::Dumper;
$Data::Dumper::Deparse = 1;

my $ref = { a => sub { print "a"; } };
print Dumper $ref;


$VAR1 = {
 'a' => sub {
  print 'a';

I didn't know this feature existed, and was considering creating a new module to mix Data::Dumper and B::Deparse.