From perl.abe at rjbs.manxome.org Wed Nov 4 12:02:19 2009 From: perl.abe at rjbs.manxome.org (Ricardo Signes) Date: Wed, 4 Nov 2009 15:02:19 -0500 Subject: [ABE.pm] see you a week from today Message-ID: <20091104200219.GA4472@cancer.codesimply.com> Remember, we moved to 2nd Wednesday of the month, so I'll see you guys NEXT week at, say, Macht's Gute? That said, if anyone was mis-scheduled and is dying to get out tonight, drop me a line and I will help you drink a pitcher. ;) -- rjbs From perl.abe at rjbs.manxome.org Tue Nov 10 11:15:56 2009 From: perl.abe at rjbs.manxome.org (Ricardo Signes) Date: Tue, 10 Nov 2009 14:15:56 -0500 Subject: [ABE.pm] see you a week from today In-Reply-To: <20091104200219.GA4472@cancer.codesimply.com> References: <20091104200219.GA4472@cancer.codesimply.com> Message-ID: <20091110191556.GA26329@cancer.codesimply.com> * Ricardo Signes [2009-11-04T15:02:19] > Remember, we moved to 2nd Wednesday of the month, so I'll see you guys NEXT > week at, say, Macht's Gute? See you tomorrow. I will probably get sloppy and tell you all how much I hate dealing with UTF-8 and Latin-1. -- rjbs From faber at linuxnj.com Tue Nov 10 15:53:57 2009 From: faber at linuxnj.com (Faber J. Fedor) Date: Tue, 10 Nov 2009 18:53:57 -0500 Subject: [ABE.pm] see you a week from today In-Reply-To: <20091110191556.GA26329@cancer.codesimply.com> References: <20091104200219.GA4472@cancer.codesimply.com> <20091110191556.GA26329@cancer.codesimply.com> Message-ID: <20091110235357.GA32513@neptune.faber.nom> On 10/11/09 14:15 -0500, Ricardo Signes wrote: > * Ricardo Signes [2009-11-04T15:02:19] > > Remember, we moved to 2nd Wednesday of the month, so I'll see you guys NEXT > > week at, say, Macht's Gute? > > See you tomorrow. > > I will probably get sloppy and tell you all how much I hate dealing with UTF-8 > and Latin-1. And that'll be different from other months how? :-) -- Regards, Faber Fedor President Linux New Jersey, Inc. 908-320-0357 800-706-0701 http://www.linuxnj.com http://cloudcomputingnj.com From perl.abe at rjbs.manxome.org Tue Nov 10 15:54:46 2009 From: perl.abe at rjbs.manxome.org (Ricardo Signes) Date: Tue, 10 Nov 2009 18:54:46 -0500 Subject: [ABE.pm] see you a week from today In-Reply-To: <20091110235357.GA32513@neptune.faber.nom> References: <20091104200219.GA4472@cancer.codesimply.com> <20091110191556.GA26329@cancer.codesimply.com> <20091110235357.GA32513@neptune.faber.nom> Message-ID: <20091110235446.GA28539@cancer.codesimply.com> * "Faber J. Fedor" [2009-11-10T18:53:57] > > > > I will probably get sloppy and tell you all how much I hate dealing with > > UTF-8 and Latin-1. > > And that'll be different from other months how? :-) > I rarely mention Latin-1. -- rjbs From fiedlert at gmail.com Wed Nov 11 12:14:06 2009 From: fiedlert at gmail.com (Ted Fiedler) Date: Wed, 11 Nov 2009 15:14:06 -0500 Subject: [ABE.pm] see you a week from today In-Reply-To: <20091104200219.GA4472@cancer.codesimply.com> References: <20091104200219.GA4472@cancer.codesimply.com> Message-ID: <814422ce0911111214n3bfccb3bv185b4248989b9eb2@mail.gmail.com> Ill be late, having some production issues. Ted On 11/4/09, Ricardo Signes wrote: > > Remember, we moved to 2nd Wednesday of the month, so I'll see you guys NEXT > week at, say, Macht's Gute? > > That said, if anyone was mis-scheduled and is dying to get out tonight, drop > me > a line and I will help you drink a pitcher. ;) > > -- > rjbs > _______________________________________________ > ABE-pm mailing list > ABE-pm at pm.org > http://mail.pm.org/mailman/listinfo/abe-pm > -- Sent from my mobile device Everything was beautiful and nothing hurt. -- Kurt Vonnegut From fiedlert at gmail.com Wed Nov 11 12:16:40 2009 From: fiedlert at gmail.com (Ted Fiedler) Date: Wed, 11 Nov 2009 15:16:40 -0500 Subject: [ABE.pm] see you a week from today In-Reply-To: <20091104200219.GA4472@cancer.codesimply.com> References: <20091104200219.GA4472@cancer.codesimply.com> Message-ID: <814422ce0911111216s2fc1e46cp2292875fd55dafd7@mail.gmail.com> Having production issues, ill be late. On 11/4/09, Ricardo Signes wrote: > > Remember, we moved to 2nd Wednesday of the month, so I'll see you guys NEXT > week at, say, Macht's Gute? > > That said, if anyone was mis-scheduled and is dying to get out tonight, drop > me > a line and I will help you drink a pitcher. ;) > > -- > rjbs > _______________________________________________ > ABE-pm mailing list > ABE-pm at pm.org > http://mail.pm.org/mailman/listinfo/abe-pm > -- Sent from my mobile device Everything was beautiful and nothing hurt. -- Kurt Vonnegut From fiedlert at gmail.com Tue Nov 17 06:14:39 2009 From: fiedlert at gmail.com (fiedlert at gmail.com) Date: Tue, 17 Nov 2009 14:14:39 +0000 Subject: [ABE.pm] Perl and memory usage Message-ID: <000e0cd6c8f62118a6047891bf1d@google.com> Anyone know if there is a way to retrieve the amount of memory a variable is using from within Perl? Ted -------------- next part -------------- An HTML attachment was scrubbed... URL: From perl.abe at rjbs.manxome.org Tue Nov 17 06:27:38 2009 From: perl.abe at rjbs.manxome.org (Ricardo Signes) Date: Tue, 17 Nov 2009 09:27:38 -0500 Subject: [ABE.pm] Perl and memory usage In-Reply-To: <000e0cd6c8f62118a6047891bf1d@google.com> References: <000e0cd6c8f62118a6047891bf1d@google.com> Message-ID: <20091117142738.GA23115@cancer.codesimply.com> * fiedlert at gmail.com [2009-11-17T09:14:39] > Anyone know if there is a way to retrieve the amount of memory a variable > is using from within Perl? Devel::Size is pretty good. -- rjbs From fiedlert at gmail.com Tue Nov 17 07:37:20 2009 From: fiedlert at gmail.com (fiedlert at gmail.com) Date: Tue, 17 Nov 2009 15:37:20 +0000 Subject: [ABE.pm] Perl and memory usage In-Reply-To: <20091117142738.GA23115@cancer.codesimply.com> Message-ID: <000e0cd4cc6ed793ca047892e619@google.com> What I need to do is fill memory, a little at a time. Im trying to force OOM errors. Whith the following Perl exits w/ Out of memory, but no OOM kills. Any ideas? This is what Im using. I also have ulimit set to unlimited. It looks like Perl is doing the right thing, by just die-ing. Is there anyway to force it do the wrong thing? #!/usr/bin/perl use strict; use warnings; use Devel::Size qw(size); my @mem; while (1) { { open my $contents, "test.256MB" or die "Unable to open test.256MB: $!\n"; while ( <$contents> ) { push @mem, $_; } } my $size = size(\@mem); print "Size = $size \n"; } On Nov 17, 2009 9:27am, Ricardo Signes wrote: > * fiedlert at gmail.com [2009-11-17T09:14:39] > > Anyone know if there is a way to retrieve the amount of memory a > variable > > is using from within Perl? > Devel::Size is pretty good. > -- > rjbs > _______________________________________________ > ABE-pm mailing list > ABE-pm at pm.org > http://mail.pm.org/mailman/listinfo/abe-pm -------------- next part -------------- An HTML attachment was scrubbed... URL: From perl.abe at rjbs.manxome.org Tue Nov 17 07:42:08 2009 From: perl.abe at rjbs.manxome.org (Ricardo Signes) Date: Tue, 17 Nov 2009 10:42:08 -0500 Subject: [ABE.pm] Perl and memory usage In-Reply-To: <000e0cd4cc6ed793ca047892e619@google.com> References: <20091117142738.GA23115@cancer.codesimply.com> <000e0cd4cc6ed793ca047892e619@google.com> Message-ID: <20091117154208.GA23451@cancer.codesimply.com> * fiedlert at gmail.com [2009-11-17T10:37:20] > What I need to do is fill memory, a little at a time. Im trying to force > OOM errors. Whith the following Perl exits w/ Out of memory, but no OOM > kills. Any ideas? No idea. The Linux kernel's "kill random stuff when memory is low" behavior is voodooriffic and, as far as I know, hard to trigger. I have not done any research just now, though, so I could just be living under the cloud of FUD. Let me know if you find a good strategy. -- rjbs From perl.abe at rjbs.manxome.org Tue Nov 17 08:05:21 2009 From: perl.abe at rjbs.manxome.org (Ricardo Signes) Date: Tue, 17 Nov 2009 11:05:21 -0500 Subject: [ABE.pm] String::Formatter Message-ID: <20091117160521.GA23587@cancer.codesimply.com> I finally gave up on String::Format and wrote my own souped-up replacement. http://github.com/rjbs/string-formatter/blob/master/lib/String/Formatter/Cookbook.pm Fun! -- rjbs From fiedlert at gmail.com Tue Nov 17 08:52:02 2009 From: fiedlert at gmail.com (fiedlert at gmail.com) Date: Tue, 17 Nov 2009 16:52:02 +0000 Subject: [ABE.pm] Perl and memory usage In-Reply-To: <20091117154208.GA23451@cancer.codesimply.com> Message-ID: <000e0cd23ba0001e11047893f287@google.com> > Let me know if you find a good strategy. Voodoo is a good word. This is far from perfect, there has to be a better way - but Im going to use this for now: So you ned to find a sweet spot where you dont get Perl 'Out of Memory!' conditions. It was 11 for me. So I just keep running ./memeater 11 & over and over until I get OOM kills. Now I just need to do some tuning. #!/usr/bin/perl use strict; use warnings; use threads; #use Devel::Size qw(size); my $mem; my $iterations = $ARGV[0] || 5; my $count = 0 ; while ($count < $iterations) { my $thr = threads->new(\&fillmeup); #my $size = size($thr); #print "Size = $size \n"; $count++; } sleep 900; sub fillmeup { my $buf = 'A' x ( 1024*1024*256 ); return 0; } -------------- next part -------------- An HTML attachment was scrubbed... URL: From perl.abe at rjbs.manxome.org Wed Nov 25 16:10:49 2009 From: perl.abe at rjbs.manxome.org (Ricardo Signes) Date: Wed, 25 Nov 2009 19:10:49 -0500 Subject: [ABE.pm] rjbs advent calendar! Message-ID: <20091126001049.GA11762@cancer.codesimply.com> >From my blog: Back when I first started learning Perl 5, I was excited to find the [Perl Advent Calendar](http://perladvent.pm.org/archives.html). It was a series of 24 or so short articles about useful Perl modules or techniques, with one new entry each day leading up to Christmas. A few years later, the Catalyst crew started the [Catalyst Advent Calendar](http://www.catalystframework.org/calendar/2005). I always liked the Perl Advent Calendars, and kept meaning to contribute. Every time, though there were too many things I'd want to write about -- and mostly they were my own code, so I felt sort of smarmy and self-promoting and never did it. Finally, though, I'm glad to say I have tackled those feelings. I will not shy away from showing off my own code, and I will not worry about having to choose just one thing. This year, I will publish the [RJBS Advent Calendar](http://advent.rjbs.manxome.org/), 24+ full days of cool, useful, or stupid code that I have written and given as a gift to the rest of the CPAN community. I've had a lot of fun working on this project, and it's helped me find and fix a number of little bugs or imperfections in the software I'll be talking about. The first door opens in six days. I hope it's as fun to read as it was to write. No returns will be accepted. Approximate actual cash value: $0.02 Basically: starting Dec 1, I'm publishing 24-ish short articles about some of CPAN modules. Hopefully some of them will be useful! -- rjbs