sheesh.

Jan. 9th, 2005 12:27 pm
sev: (Default)
[personal profile] sev
fucking spamassassin and their fucking memory-hog code.

SCALAR EACH IS YOUR FRIEND, DIPSHIT.

sheesh. I did *not* need to be optimizing code written by people I've never met. (EDIT: though technically, in my mind, addressing 'out of memory' errors that crop up under normal usage isn't optimizing anymore; it's debugginging.)

on 2005-01-09 01:35 pm (UTC)
Posted by [identity profile] nmc.livejournal.com
But I thought if code was reasonably written, it wasn't good Perl?

You wouldn't want the SpamAssassin people to write bad Perl, now, would you?

*innocent*

on 2005-01-09 07:12 pm (UTC)
Posted by [identity profile] nmc.livejournal.com
I will not laugh at my friend's misfortune.
I will not laugh at my friend's misfortune.
I will not laugh at my friend's misfortune.

*giggle*

Well, at least I didn't laugh.

Re: it gets worse...

on 2005-01-09 09:21 pm (UTC)
ext_243: (Default)
Posted by [identity profile] xlerb.livejournal.com
I don't want to think about that.

Re: it gets worse...

on 2005-01-13 11:56 am (UTC)
Posted by [identity profile] cjcollier.livejournal.com
Eew. Is that even possible?

on 2005-01-09 09:33 pm (UTC)
ext_243: (Default)
Posted by [identity profile] xlerb.livejournal.com
There's More Than One Way To Do It.

Although it would be nice if Perl could recognize that, in for $x (keys %y) { foobar $x }, the array value of that keys %y is never actually used as such and so doesn't need to be constructed. I can understand if static analysis would be too much, but surely there's already enough runtime magic strewn about that this kind of thing can be tossed in. (For example, having while ($x = each %y) { foobar $x } not halt when the key is "0" or "".)

On the other hand, at what point does Perl stop being a scripting language and start being a DB query planner?

on 2005-02-04 09:13 am (UTC)
ext_243: (Default)
Posted by [identity profile] xlerb.livejournal.com
grep (and map) would make it a little trickier; it'd have to make sure the predicate/block is free of side-effects so that the lazy-evaluation thing can be done without possibly changing the code's behavior. I think.

(Bigger chainsaw!!!)

on 2005-01-13 11:59 am (UTC)
Posted by [identity profile] cjcollier.livejournal.com
while( defined $x = each %y ) foobar $x doesn't halt on "0" or ""

In a lot of cases, you want to halt on false-evaluating values, and it's relatively simple to add a C<defined> operator.

on 2005-01-13 11:55 am (UTC)
Posted by [identity profile] cjcollier.livejournal.com
did someone do a foreach(){ ... } ?

I hate that one, and it seems that *everyone* and their brother does it.

Profile

sev: (Default)
sev

March 2019

S M T W T F S
     12
3456789
1011 1213141516
17181920212223
24252627282930
31      

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jan. 26th, 2026 04:45 am
Powered by Dreamwidth Studios