Narcography

Allison on 2002-10-15T18:22:59

A tip for writers: if you fall asleep while editing an article, don't keep making notes after you're asleep. A case in point:

"Beware the Perl 6 early-morning joggers."


Ummmm.... huh? Someone's been reading a bit too much Lewis Carroll, eh? :)


Biased journalism

gnat on 2002-10-15T22:01:43

Oh sure, criticize Perl's early-morning joggers without once mentioning the inherent limitations of Python's mid-evening power walkers! The fact is that Python is dependent on the gravitational constant remaining constant, while not only can Perl cope with differing values of big G, Damian even has a module that emulates gravitational constant changes for you. Just you try moving Python scripts between two machines using different values of big G and see whether you think early-morning joggers are so bad after all!

--Nat
Conway Industries: Making Your Code Safe for Cosmological Change for Over 2πi Years!

Re:Biased journalism

Allison on 2002-10-15T22:41:51

‘Twas bind, and the socketpair times
Did glob and grep in the wait:
All msgget were the binmode,
And the map rand opendir.

Beware the Perl 6 early-morning jogger!
The shoes that trip, the skin that blinds!
Beware the Java bowler, and shun
The Ruby gymnast in tights!

Re:Biased journalism

ask on 2002-10-18T09:46:07

Allison, that is brilliant! :-)

  - ask

Re:Biased journalism

Damian on 2002-10-16T04:19:21

Damian even has a module that emulates gravitational constant changes for you.
Oh, it's much more general than that:

    package Inconstant;   

    sub import {   
        my ($T0, $class, $caller) = (time, shift, caller()."::");   
        (*{$caller."T"}, *{$caller."T0"}) = (sub(){time}, sub(){$T0});   
        do{ tie my($fn), $class; *{$caller.$_} = sub():lvalue{$fn} } for @_;   
    }   

    sub TIESCALAR { bless {gen => sub{undef}}, $_[0] }   
    sub FETCH     { $_[0]{gen}() }   
    sub STORE     { $_[0]{gen} = $_[1] }   

    1;

which lets you then write things like:

    use Inconstant G, Pi;

    G  = sub { 6.67259e-11 - 1e-21*(T-T0) };
    Pi = sub { 3.1415926 + sin(T) };

    for (1..10) {
        sleep $_;
        print G, "\n";
        print Pi, "\n";
    }