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 ]

Matts (1087)

Matts
  (email not shown publicly)

I work for MessageLabs [messagelabs.com] in Toronto, ON, Canada. I write spam filters, MTA software, high performance network software, string matching algorithms, and other cool stuff mostly in Perl and C.
+ -

  Journal: ah, dreams... on 2010.01.26 5:31

Journal by Matts on 2010.01.26 5:31
User Journal

I just woke from a dream where it was rjbs' birthday and we got him an onion cake. Only the person who made the cake misunderstood, and instead of a cake shaped like an onion he cooked it WITH onions in it.

Bizarro.

Read More 3 comments
Comments: 3
+ -

  Journal: Time::Piece test failures on Win32 on 2010.01.25 18:23

Journal by Matts on 2010.01.25 18:23
User Journal

Can someone with Time::Piece test failures on Win32 please contact me offlist? I have a proposed patch I'd like to test, but no Win32 perl to test it on.

Read More 0 comments

+ -

  Comment: Re:More details... (Score 1) on 2010.01.04 17:23

by Matts on 2010.01.04 17:23 (#71479)
Attached to: Warning compiling perl stuff on Snow Leopard

Never mind... It's just a buggette in the perl that ships with SL...

MEM_WRAP_CHECK_1 is defined as:

#define MEM_WRAP_CHECK_1(n,t,a) \
    (void)(sizeof(t) > 1 && ((MEM_SIZE)(n)+0.0) > MEM_SIZE_MAX/sizeof(t) && (Perl_croak_nocontext(a),0))

Fix is to change it to:

#define MEM_WRAP_CHECK_1(n,t,a) \
    (void)(sizeof(t) > 1 && ((MEM_SIZE)(n)+0.0) > MEM_SIZE_MAX/sizeof(t) && (Perl_croak_nocontext("%s",(a)),0))

Read More 2 comments
Comments: 2
+ -

  Comment: More details... (Score 1) on 2010.01.04 17:19

by Matts on 2010.01.04 17:19 (#71478)
Attached to: Warning compiling perl stuff on Snow Leopard

Clang gives a few more details:

KQueue.xs:71:5: warning: format string is not a string literal (potentially insecure)
    Newxz(ke, max_events, struct kevent);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/System/Library/Perl/5.10.0/darwin-thread- multi-2level/CORE/handy.h:776:28: note: instantiated from:
#define Newxz(v,n,t)    (v = (MEM_WRAP_CHECK_(n,t) MEM_LOG_ALLOC(n,t,(t*)safecalloc((n),sizeof(t)))))
                              ^
/System/Library/Perl/5.10.0/darwin-thread-multi-2level/CORE/handy.h:704:30: note: instantiated from:
#define MEM_WRAP_CHECK_(n,t) MEM_WRAP_CHECK(n,t),
                             ^
/System/Library/Perl/5.10.0/darwin-thread-multi-2level/CORE/handy.h:701:29: note: instantiated from:
#define MEM_WRAP_CHECK(n,t) MEM_WRAP_CHECK_1(n,t,PL_memory_wrap)
                            ^

Read More 2 comments
Comments: 2
+ -

  Journal: Warning compiling perl stuff on Snow Leopard on 2010.01.04 17:13

Journal by Matts on 2010.01.04 17:13
User Journal

I've searched but can't find any reference to this...

Compiling IO::KQueue on Snow Leopard I get the following warning:

KQueue.xs: In function 'XS_IO__KQueue_kevent':
KQueue.xs:71: warning: format not a string literal and no format arguments

Yet that line is just:

    Newxz(ke, max_events, struct kevent);

Read More 2 comments
Comments: 2
+ -

  Comment: Re:Programmable keywords... (Score 1) on 2009.12.10 5:05

by Matts on 2009.12.10 5:05 (#71365)
Attached to: Why Should I Program in $Language?

I think you're assuming I *haven't* checked it out.

Read More 24 comments
Comments: 24
+ -

  Comment: Re:Programmable keywords... (Score 1) on 2009.12.02 12:42

by Matts on 2009.12.02 12:42 (#71300)
Attached to: Why Should I Program in $Language?

Yeah I know, but it's very heavyweight (brings in Moose).

Read More 24 comments
Comments: 24
+ -

  Comment: Programmable keywords... (Score 1) on 2009.12.01 9:46

by Matts on 2009.12.01 9:46 (#71273)
Attached to: Why Should I Program in $Language?

Did I hear in my vague readings of p5p that this might be possible in 5.12?

If so, it'd be SO nice to have:

class Foo isa Bar {
  method init(%options) {
    $self->{some_key} = $options{some_key} // "default";
    ...
  }
}

Read More 24 comments
Comments: 24
+ -

  Comment: =for ? (Score 1) on 2009.10.27 10:36

by Matts on 2009.10.27 10:36 (#70992)
Attached to: Syntax Highlighting in Pod::Parser::Groffmom

Isn't that incorrect usage of =for?

I think it should be =begin.

Read More 4 comments
Comments: 4
+ -

  Comment: Irony... (Score 1) on 2009.08.19 8:39

by Matts on 2009.08.19 8:39 (#70176)
Attached to: REST Versus Soap

Rather ironic that page has mojibake on it though :-/

Read More 6 comments
Comments: 6
+ -

  Comment: Shrug... (Score 1) on 2009.08.11 18:29

by Matts on 2009.08.11 18:29 (#69985)
Attached to: Use packages?

Personally I don't think it's really any cleaner. You've just hidden your meaning behind another statement, another module that the next maintainer has to go and read the docs for to figure out what it does. Sure it's a bit of extra typing, but you only do it once per file.

Read More 13 comments
Comments: 13
+ -

  Comment: Registration... (Score 1) on 2009.08.04 8:06

by Matts on 2009.08.04 8:06 (#69859)
Attached to: The Longer "Roles" Talk

Is there a download where I don't have to register for SlideShare?

Read More 4 comments
Comments: 4
+ -

  Comment: Re:JSON (Score 1) on 2009.07.31 8:27

by Matts on 2009.07.31 8:27 (#69825)
Attached to: Why I Don't Like YAML

I had this argument with Ingy way back when he was coming up with YAML. He made it over complex (IMHO), resulting in a spec which made XML easier to implement than YAML (32 pages of spec vs nearly 200), which makes no sense since YAML was supposed to be EASIER to read and write than XML.

It's a bit more human readable than XML, but not much, and edge cases like this are going to make it a LOT harder to debug an issue with YAML than with XML.

Read More 11 comments
Comments: 11
+ -

  Comment: Re:Additions of Komodo IDE (Score 1) on 2009.06.06 6:30

by Matts on 2009.06.06 6:30 (#68971)
Attached to: Early Komodo Edit review

Komodo Edit does the second thing there.

I know there's lots of things the IDE adds (there's a comparison table on ActiveState's site), but most of them wouldn't be very useful to me.

Read More 6 comments
Comments: 6
+ -

  Comment: Re:Padre? (Score 1) on 2009.06.03 21:46

by Matts on 2009.06.03 21:46 (#68942)
Attached to: Early Komodo Edit review

Couldn't get it working on OSX (mostly I think it was the GUI library - Wx). Spent about an hour on it and then gave up.

Komodo has a .dmg file I just opened and it worked.

Read More 6 comments
Comments: 6