From shawnhcorey at gmail.com Fri Apr 1 11:26:52 2011 From: shawnhcorey at gmail.com (Shawn H Corey) Date: Fri, 01 Apr 2011 14:26:52 -0400 Subject: [Ottawa-pm] Anyone out there? Message-ID: <4D9618EC.1000407@gmail.com> Hi, Is this list still active? -- Just my 0.00000002 million dollars worth, Shawn Confusion is the first step of understanding. Programming is as much about organization and communication as it is about coding. The secret to great software: Fail early & often. Eliminate software piracy: use only FLOSS. From champoux at pythian.com Fri Apr 1 11:30:38 2011 From: champoux at pythian.com (Yanick Champoux) Date: Fri, 01 Apr 2011 14:30:38 -0400 Subject: [Ottawa-pm] Anyone out there? In-Reply-To: <4D9618EC.1000407@gmail.com> References: <4D9618EC.1000407@gmail.com> Message-ID: <4D9619CE.4090706@pythian.com> On 04/01/11 14:26, Shawn H Corey wrote: > > Is this list still active? Active would be an overstatement, but there are short spurts of traffic every few months. `/. From scoles at pythian.com Fri Apr 1 12:02:02 2011 From: scoles at pythian.com (John Scoles) Date: Fri, 01 Apr 2011 15:02:02 -0400 Subject: [Ottawa-pm] Anyone out there? In-Reply-To: <4D9619CE.4090706@pythian.com> References: <4D9618EC.1000407@gmail.com> <4D9619CE.4090706@pythian.com> Message-ID: <4D96212A.60402@pythian.com> ,/'\ @ // : \ // : \ @ @ // . \ ,|/ \ .-----. /|/ | \ -- .. . .---------. /|/ \ ( __.-^-.__\ | Tumble | / / | -- .',_)/ - - \ | Weeds | ,'|/ | __ -.-: / : | | / / O _, O |next |/ |/ -- \___/ |400km--^ | / | | '----.----' / | __________-_ W--. ___________|_/ |/ | | -- | ____| __\_ | | / | | / \-`7 / \` | | / -- \_/ \_/ | | From allan.fields at gmail.com Fri Apr 1 12:19:54 2011 From: allan.fields at gmail.com (allan.fields at gmail.com) Date: Fri, 1 Apr 2011 19:19:54 +0000 Subject: [Ottawa-pm] CIDR to IP:netmask Message-ID: <192592373-1301685595-cardhu_decombobulator_blackberry.rim.net-1273598248-@bda2490.bisx.prod.on.blackberry> What do you'all do to get the netmask in dotted-quad form from CIDR? Or apply the mask to your IP to get the subnet? Does anyone have the arithmetic answer? No modules allowed! I do a bitwise-stringy version. The reason I ask is I found this an interesting example of using perl's pack/unpack as an IP calculator. Linux has a command named ipcalc, but you may know not all installs can just request specific binary/modules. As a reminder CIDR for IPv4 is: IP ::= ([0-9]{1,3} '.' ){3} [0-9]{1,3} MASK ::= integer(0..32) CIDR ::= IP '/' MASK Example (not meant to resemble real network): 166.66.7.24/23 166.66.7.0/23 0.0.0.0/32 1.2.3.4/22 I do something like: If ($IPADDR=~qr{ \s* ['"]* ( (?:[0-9]{1,3}\.){3} [0-9]{1,3} ) / ( [0-9]{1,2}. ) ['"]* \s* }x) { ($subnet_ip, $subnet_mask) = ($1,$2); if (not defined $subnet_mask or ($subnet_mask < 0 or $subnet_mask > 32)) { print "CIDR: Invalid mask\n"; return 1; } my $bitstr = '1'; $bitstr.= '0' x (32 - $subnet_mask); my $mask = join('.',unpack('C4',pack('B*',$bitstr))); print "IP: $subnet_ip Netmask: $mask\n"; return 0; } else { print "CIDR: Invalid\n"; return 1: } # More advanced examples include calculating the subnet mask for two CIDR's and determining if they reside in the same range. .. Tired of typing on my BB keyboard. Please post your code. Sent from my BlackBerry device on the Rogers Wireless Network From shawnhcorey at gmail.com Fri Apr 1 12:38:57 2011 From: shawnhcorey at gmail.com (Shawn H Corey) Date: Fri, 01 Apr 2011 15:38:57 -0400 Subject: [Ottawa-pm] Anyone out there? In-Reply-To: <4D9619CE.4090706@pythian.com> References: <4D9618EC.1000407@gmail.com> <4D9619CE.4090706@pythian.com> Message-ID: <4D9629D1.5050205@gmail.com> On 11-04-01 02:30 PM, Yanick Champoux wrote: > On 04/01/11 14:26, Shawn H Corey wrote: >> >> Is this list still active? > > > Active would be an overstatement, but there are short spurts of traffic > every few months. > > > `/. Hey, it's Friday and I'm feeling optimistic :) -- Just my 0.00000002 million dollars worth, Shawn Confusion is the first step of understanding. Programming is as much about organization and communication as it is about coding. The secret to great software: Fail early & often. Eliminate software piracy: use only FLOSS. From allan.fields at gmail.com Fri Apr 1 13:03:29 2011 From: allan.fields at gmail.com (allan.fields at gmail.com) Date: Fri, 1 Apr 2011 20:03:29 +0000 Subject: [Ottawa-pm] Anyone out there? In-Reply-To: <4D9629D1.5050205@gmail.com> References: <4D9618EC.1000407@gmail.com> <4D9619CE.4090706@pythian.com><4D9629D1.5050205@gmail.com> Message-ID: <412548540-1301688210-cardhu_decombobulator_blackberry.rim.net-520094685-@bda2490.bisx.prod.on.blackberry> Good to see some enthusiasm for Perl. I was about to post something earlier to the list but decided that I would wait for some hapless sole to ask the proverbial question.. "Is there any body out there?" Well of course, and if not there is always a "talking tree" in the forest. Right next to the "bubbling brook" and just past the "grassy knoll." The rest is up to you the reader! - Thanks, Allan Fields Perl user since the 90s! Sent from my BlackBerry device on the Rogers Wireless Network -----Original Message----- From: Shawn H Corey Sender: ottawa-pm-bounces+allan.fields=gmail.com at pm.orgDate: Fri, 01 Apr 2011 15:38:57 To: ottawa-pm Subject: Re: [Ottawa-pm] Anyone out there? On 11-04-01 02:30 PM, Yanick Champoux wrote: > On 04/01/11 14:26, Shawn H Corey wrote: >> >> Is this list still active? > > > Active would be an overstatement, but there are short spurts of traffic > every few months. > > > `/. Hey, it's Friday and I'm feeling optimistic :) -- Just my 0.00000002 million dollars worth, Shawn Confusion is the first step of understanding. Programming is as much about organization and communication as it is about coding. The secret to great software: Fail early & often. Eliminate software piracy: use only FLOSS. _______________________________________________ Ottawa-pm mailing list Ottawa-pm at pm.org http://mail.pm.org/mailman/listinfo/ottawa-pm From veljko at gmail.com Fri Apr 1 13:45:20 2011 From: veljko at gmail.com (Veljko Vidovic) Date: Fri, 1 Apr 2011 16:45:20 -0400 Subject: [Ottawa-pm] Anyone out there? In-Reply-To: <412548540-1301688210-cardhu_decombobulator_blackberry.rim.net-520094685-@bda2490.bisx.prod.on.blackberry> References: <4D9618EC.1000407@gmail.com> <4D9619CE.4090706@pythian.com> <4D9629D1.5050205@gmail.com> <412548540-1301688210-cardhu_decombobulator_blackberry.rim.net-520094685-@bda2490.bisx.prod.on.blackberry> Message-ID: What do you mean is it active? It is one of most active lists. But you have to read it with special 3-D Monocle (http://goo.gl/gSsm1) On Fri, Apr 1, 2011 at 4:03 PM, wrote: > Good to see some enthusiasm for Perl. > > I was about to post something earlier to the list but decided that I would wait for some hapless sole to ask the proverbial question.. > > "Is there any body out there?" > > Well of course, and if not there is always a "talking tree" in the forest. ?Right next to the "bubbling brook" and just past the "grassy knoll." ?The rest is up to you the reader! > > - Thanks, > ? ?Allan Fields > ? ?Perl user since the 90s! > > Sent from my BlackBerry device on the Rogers Wireless Network > > -----Original Message----- > From: Shawn H Corey > Sender: ottawa-pm-bounces+allan.fields=gmail.com at pm.orgDate: Fri, 01 Apr 2011 15:38:57 > To: ottawa-pm > Subject: Re: [Ottawa-pm] Anyone out there? > > On 11-04-01 02:30 PM, Yanick Champoux wrote: >> On 04/01/11 14:26, Shawn H Corey wrote: >>> >>> Is this list still active? >> >> >> Active would be an overstatement, but there are short spurts of traffic >> every few months. >> >> >> `/. > > Hey, it's Friday and I'm feeling optimistic ?:) > > > -- > Just my 0.00000002 million dollars worth, > ? Shawn > > Confusion is the first step of understanding. > > Programming is as much about organization and communication > as it is about coding. > > The secret to great software: ?Fail early & often. > > Eliminate software piracy: ?use only FLOSS. > _______________________________________________ > Ottawa-pm mailing list > Ottawa-pm at pm.org > http://mail.pm.org/mailman/listinfo/ottawa-pm > _______________________________________________ > Ottawa-pm mailing list > Ottawa-pm at pm.org > http://mail.pm.org/mailman/listinfo/ottawa-pm > From dmo at acm.org Fri Apr 1 15:31:10 2011 From: dmo at acm.org (Dave O'Neill) Date: Fri, 1 Apr 2011 18:31:10 -0400 Subject: [Ottawa-pm] Anyone out there? In-Reply-To: <4D9618EC.1000407@gmail.com> References: <4D9618EC.1000407@gmail.com> Message-ID: <20110401223110.GB14503@chicken.dmo.ca> On Fri, Apr 01, 2011 at 02:26:52PM -0400, Shawn H Corey wrote: > Is this list still active? It's about as active as the PM group :) Cheers, Dave From allan.fields at gmail.com Mon Apr 4 18:38:59 2011 From: allan.fields at gmail.com (Allan Fields) Date: Mon, 4 Apr 2011 21:38:59 -0400 Subject: [Ottawa-pm] Fwd: CIDR to IP-netmask Message-ID: Dunno why this didn't get to the list. It's not exactly off-topic. -Allan ---------- Forwarded message ---------- From: allan.fields at gmail.com Date: Fri, 1 Apr 2011 19:19:54 +0000 Subject: CIDR to IP:netmask To: ottawa-pm at pm.org What do you'all do to get the netmask in dotted-quad form from CIDR? Or apply the mask to your IP to get the subnet? Does anyone have the arithmetic answer? No modules allowed! I do a bitwise-stringy version. The reason I ask is I found this an interesting example of using perl's pack/unpack as an IP calculator. Linux has a command named ipcalc, but you may know not all installs can just request specific binary/modules. As a reminder CIDR for IPv4 is: IP ::= ([0-9]{1,3} '.' ){3} [0-9]{1,3} MASK ::= integer(0..32) CIDR ::= IP '/' MASK Example (not meant to resemble real network): 166.66.7.24/23 166.66.7.0/23 0.0.0.0/32 1.2.3.4/22 I do something like: If ($IPADDR=~qr{ \s* ['"]* ( (?:[0-9]{1,3}\.){3} [0-9]{1,3} ) / ( [0-9]{1,2}. ) ['"]* \s* }x) { ($subnet_ip, $subnet_mask) = ($1,$2); if (not defined $subnet_mask or ($subnet_mask < 0 or $subnet_mask > 32)) { print "CIDR: Invalid mask\n"; return 1; } my $bitstr = '1'; $bitstr.= '0' x (32 - $subnet_mask); my $mask = join('.',unpack('C4',pack('B*',$bitstr))); print "IP: $subnet_ip Netmask: $mask\n"; return 0; } else { print "CIDR: Invalid\n"; return 1: } # More advanced examples include calculating the subnet mask for two CIDR's and determining if they reside in the same range. .. Tired of typing on my BB keyboard. Please post your code. Sent from my BlackBerry device on the Rogers Wireless Network From mark at mark.mielke.cc Mon Apr 4 19:29:33 2011 From: mark at mark.mielke.cc (Mark Mielke) Date: Mon, 04 Apr 2011 22:29:33 -0400 Subject: [Ottawa-pm] Fwd: CIDR to IP-netmask In-Reply-To: References: Message-ID: <4D9A7E8D.50408@mark.mielke.cc> I think it did get to the list - or I've seen it twice anyways. :-) My personal take is that it is wrong to not use a module to do this, and my reasoning is that almost everybody who tries to do it themselves, I believe including the code you submitted, muck it up. I had trouble reading the code, though, and not having time to analyze it for a particularly common mistake, I didn't bother responding... :-) How do you handle: 127.1/24 Cheers, mark On 04/04/2011 09:38 PM, Allan Fields wrote: > Dunno why this didn't get to the list. It's not exactly off-topic. > > -Allan > > ---------- Forwarded message ---------- > From: allan.fields at gmail.com > Date: Fri, 1 Apr 2011 19:19:54 +0000 > Subject: CIDR to IP:netmask > To: ottawa-pm at pm.org > > What do you'all do to get the netmask in dotted-quad form from CIDR? > Or apply the mask to your IP to get the subnet? > > Does anyone have the arithmetic answer? No modules allowed! I do a > bitwise-stringy version. > > The reason I ask is I found this an interesting example of using > perl's pack/unpack as an IP calculator. Linux has a command named > ipcalc, but you may know not all installs can just request specific > binary/modules. > > As a reminder CIDR for IPv4 is: > IP ::= ([0-9]{1,3} '.' ){3} [0-9]{1,3} > MASK ::= integer(0..32) > CIDR ::= IP '/' MASK > > Example (not meant to resemble real network): > 166.66.7.24/23 > 166.66.7.0/23 > 0.0.0.0/32 > 1.2.3.4/22 > > I do something like: > > If ($IPADDR=~qr{ \s* ['"]* > ( (?:[0-9]{1,3}\.){3} [0-9]{1,3} ) / > ( [0-9]{1,2}. ) > ['"]* \s* }x) { > ($subnet_ip, $subnet_mask) = ($1,$2); > > if (not defined $subnet_mask or > ($subnet_mask< 0 or $subnet_mask> 32)) { > print "CIDR: Invalid mask\n"; > return 1; > } > > my $bitstr = '1'; > $bitstr.= '0' x (32 - $subnet_mask); > > my $mask = join('.',unpack('C4',pack('B*',$bitstr))); > > print "IP: $subnet_ip Netmask: $mask\n"; > > return 0; > } else { > print "CIDR: Invalid\n"; > return 1: > } > > # More advanced examples include calculating the subnet mask for two > CIDR's and determining if they reside in the same range. > > .. Tired of typing on my BB keyboard. > Please post your code. > > Sent from my BlackBerry device on the Rogers Wireless Network > _______________________________________________ > Ottawa-pm mailing list > Ottawa-pm at pm.org > http://mail.pm.org/mailman/listinfo/ottawa-pm -- Mark Mielke From champoux at pythian.com Tue Apr 5 08:12:32 2011 From: champoux at pythian.com (Yanick Champoux) Date: Tue, 05 Apr 2011 11:12:32 -0400 Subject: [Ottawa-pm] Fwd: CIDR to IP-netmask In-Reply-To: <4D9A7E8D.50408@mark.mielke.cc> References: <4D9A7E8D.50408@mark.mielke.cc> Message-ID: <4D9B3160.2070809@pythian.com> On 04/04/11 22:29, Mark Mielke wrote: > My personal take is that it is wrong to not use a module to do this I pretty much had the same reaction. For real projects, I would use something like Net::CIDR, and be done with it. It's the kind of problem that falls in the same category than XML, CSV and email addresses. On the outside, it looks simple enough. Once you begin to poke around, you realize the exceptions, subtleties and quirks are much more trouble than first expected. If some other poor sod^D^D^D brave soul took years to finely hone a solution for the problem, I don't see the point of trying to churn my own. Mind you, playing with IP addresses by hand is a good exercise, but that's a bit of fun that I don't have time for right now. :-) Joy, `/anick From allan.fields at gmail.com Tue Apr 5 09:23:19 2011 From: allan.fields at gmail.com (allan.fields at gmail.com) Date: Tue, 5 Apr 2011 16:23:19 +0000 Subject: [Ottawa-pm] Tool to package module Message-ID: <702278660-1302020598-cardhu_decombobulator_blackberry.rim.net-455914738-@bda2490.bisx.prod.on.blackberry> I seem to recall there was a simple tool to package and redistribute modules in a single archive. Can this work on Linux and does not use CPAN / RPM but Perl itself? Packaging Perl modules in RPM is one model. Thanks, Allan Fields Sent from my BlackBerry device on the Rogers Wireless Network From champoux at pythian.com Tue Apr 5 12:32:53 2011 From: champoux at pythian.com (Yanick Champoux) Date: Tue, 05 Apr 2011 15:32:53 -0400 Subject: [Ottawa-pm] Tool to package module In-Reply-To: <702278660-1302020598-cardhu_decombobulator_blackberry.rim.net-455914738-@bda2490.bisx.prod.on.blackberry> References: <702278660-1302020598-cardhu_decombobulator_blackberry.rim.net-455914738-@bda2490.bisx.prod.on.blackberry> Message-ID: <4D9B6E65.1080401@pythian.com> On 04/05/11 12:23, allan.fields at gmail.com wrote: > I seem to recall there was a simple tool to package and redistribute modules in a single archive. App::FatPacker is one of the tools that does it. You can either add all dependencies in a 'fatlib' that is part of your distribution, or go hardcore and put everything in a single file. Hope that helps, `/anick From dmo at acm.org Tue Apr 5 16:12:55 2011 From: dmo at acm.org (Dave O'Neill) Date: Tue, 5 Apr 2011 19:12:55 -0400 Subject: [Ottawa-pm] Tool to package module In-Reply-To: <4D9B6E65.1080401@pythian.com> References: <702278660-1302020598-cardhu_decombobulator_blackberry.rim.net-455914738-@bda2490.bisx.prod.on.blackberry> <4D9B6E65.1080401@pythian.com> Message-ID: <20110405231255.GC1231@chicken.dmo.ca> On Tue, Apr 05, 2011 at 03:32:53PM -0400, Yanick Champoux wrote: > App::FatPacker is one of the tools that does it. You can either add > all dependencies in a 'fatlib' that is part of your distribution, or go > hardcore and put everything in a single file. There's also PAR and related modules (PAR::Packer, etc) Cheers, Dave From jpuderer at littlebox.ca Wed Apr 6 13:59:16 2011 From: jpuderer at littlebox.ca (James Puderer) Date: Wed, 6 Apr 2011 16:59:16 -0400 Subject: [Ottawa-pm] Update: Ottawa IPv6 Summit (April 29th) Message-ID: Hello, This is just to let you know that the list of speakers for the IPv6 Summit is now available, and the presentations are looking really good. http://ipv6summit.ca/ Also, a reminder that early registration is available until April 15th, so sign up now and save the $20. Hope to see you there! -- James -------------- next part -------------- An HTML attachment was scrubbed... URL: