From robert.wenner at gmx.de Mon Feb 9 12:11:52 2009 From: robert.wenner at gmx.de (Robert Wenner) Date: Mon, 9 Feb 2009 14:11:52 -0600 Subject: APM: New Perl book ;-) Message-ID: <200902091411.52578.robert.wenner@gmx.de> http://automatthias.files.wordpress.com/2007/01/p6_cover.png From lrstott at swbell.net Thu Feb 12 08:40:08 2009 From: lrstott at swbell.net (Rich Stott) Date: Thu, 12 Feb 2009 08:40:08 -0800 (PST) Subject: APM: Was there a meeting last night? Message-ID: <27336.136.qm@web81504.mail.mud.yahoo.com> Hi all, Was there a meeting last night? If there was, was notification sent out? When/where is the next meeting? Rich -------------- next part -------------- An HTML attachment was scrubbed... URL: From ian at remmler.org Thu Feb 12 13:00:16 2009 From: ian at remmler.org (Ian Remmler) Date: Thu, 12 Feb 2009 15:00:16 -0600 Subject: APM: Was there a meeting last night? In-Reply-To: <27336.136.qm@web81504.mail.mud.yahoo.com> References: <27336.136.qm@web81504.mail.mud.yahoo.com> Message-ID: <20090212210016.GA15892@brane> On Thu, Feb 12, 2009 at 08:40:08AM -0800, Rich Stott wrote: > Was there a meeting last night? If there was, was notification sent out? > When/where is the next meeting? Not last night - the next meeting will be next Wednesday. It's usually on the third Wednesday of the month unless there is a conflict. I think Mangia is a nice venue, so let's do it there again unless it causes people problems. Tim volunteered to talk about Moose at some point, which I'll assume isn't next week since I haven't heard from him, so why don't we just do a "bring your Perl problems" meeting. Bring your laptops to hack'n'google (sounds like something the Sweedish chef would say). I'll try to remember to bring a power strip. :) If someone could bring a projector again, I'm sure we would all appreciate it immensely. -- - Ian. From tmcd at panix.com Thu Feb 12 13:14:39 2009 From: tmcd at panix.com (Tim McDaniel) Date: Thu, 12 Feb 2009 15:14:39 -0600 (CST) Subject: APM: Was there a meeting last night? In-Reply-To: <20090212210016.GA15892@brane> References: <27336.136.qm@web81504.mail.mud.yahoo.com> <20090212210016.GA15892@brane> Message-ID: One topic that recently occurred to me: Perl Peeves. Recently I learned how -r, -w, and -x are broken by design on any systems with ACLs (like, say, Windows). I've run across a few other gotchas (unary +, unary -, true&false&relational operators), but I could rant^H^H^H^H talk about them maybe 5-10 minutes at most. So my proposal: is there something about Perl that you frequently forget about and it always bites you on the butt? Do you always have to do some workaround that just makes your teeth itch in irritation? Does this sound like a plan? -- Tim McDaniel, tmcd at panix.com From tmcd at panix.com Thu Feb 12 19:33:36 2009 From: tmcd at panix.com (tmcd at panix.com) Date: Thu, 12 Feb 2009 21:33:36 -0600 (CST) Subject: APM: Was there a meeting last night? In-Reply-To: References: <27336.136.qm@web81504.mail.mud.yahoo.com> <20090212210016.GA15892@brane> Message-ID: On Thu, 12 Feb 2009, Tim McDaniel wrote: > One topic that recently occurred to me: Perl Peeves. Recently I > learned how -r, -w, and -x are broken by design on any systems with > ACLs (like, say, Windows). I've run across a few other gotchas > (unary +, unary -, true&false&relational operators), but I could > rant^H^H^H^H talk about them maybe 5-10 minutes at most. > > So my proposal: is there something about Perl that you frequently > forget about and it always bites you on the butt? Do you always have > to do some workaround that just makes your teeth itch in irritation? After further thought: Weird Perl. Including peeves, as above, but also plain strange things (maybe useful, maybe not), unusual idioms, and such. Maybe that would be more interesting? -- Tim McDaniel; Reply-To: tmcd at panix.com From JPolache at texasmutual.com Fri Feb 13 13:34:50 2009 From: JPolache at texasmutual.com (Jonathan S. Polacheck) Date: Fri, 13 Feb 2009 15:34:50 -0600 Subject: APM: topic for a meeting? Message-ID: Here at my office we use the Netscout Infinistream for continuous packet capture. It's a sniffer with a terabyte of disk and a database that allows me to take traces of traffic that occurred hours ago. It is a great tool, but very expensive. Also, the disk array cannot be extended with off the shelf disks (of course). Things got worse when Network General sold out to Netscout. The smaller model (500 gig) is no longer being offered. We have 5 of these and they work quite well for our remote sites. I found this code on Perl Monks http://www.perlmonks.org/?node=Packet+Capture+IP+Accounting). It might be a basis for an open source CPC application; "This script makes use of the libpcap library to capture network packets in a non-switched environment for the purpose of traffic logging and accounting. All captured traffic is logged to a MySQL database to facilitate later analysis and auditing. Note that execution of this script will require root privileges or equivalent as the network interface is set into promiscuous mode. The incipience behind this script was a client who required the establishment of an IP accounting system to audit traffic usage over the corporate LAN. Constraints in the existing network topology led to the development of this code such that this IP accounting could be carried out without impacting upon the existing network infrastructure." #!/usr/bin/perl -Tw use AppConfig; use Carp; use DBI; use Net::Pcap; use NetPacket::Ethernet; use NetPacket::IP qw/ :protos /; use NetPacket::TCP; use NetPacket::UDP; use strict; use vars qw/ $CONFIG $VERSION /; BEGIN { $CONFIG = AppConfig->new({ 'CASE' => 0, 'GLOBAL' => { 'ARGCOUNT' => 1 } }, 'configuration|c' => { 'DEFAULT' => undef }, 'database|d' => { 'DEFAULT' => 'DBI:mysql:database=development;host=localhost' }, 'filter|f' => { 'DEFAULT' => 'none' }, 'interface|i' => { 'DEFAULT' => eval { my $err; my $dev = Net::Pcap::lookupdev( \$err ); if ( defined $err ) { croak( 'Cannot determine network interface for packet capture - ', $err ); } $dev; } }, 'mtu|m' => { 'DEFAULT' => 1500 }, 'password' => { 'DEFAULT' => undef }, 'table|t' => { 'DEFAULT' => 'ipacct' }, 'username' => { 'DEFAULT' => undef } ); $CONFIG->args; if ( defined $CONFIG->get('configuration') ) { # If the configuration file parameter is defined on the command line via # the -c switch, attempt to load the specified configuration file if ( $CONFIG->file( $CONFIG->get('configuration') ) ) { croak( 'Cannot open configuration file ', $CONFIG->get('configuration'), ' - ', $! ); } } $VERSION = '0.3'; } # Create database handle for storage of captured packet information in data # store for accounting and audit analysis my $dbh; unless ( $dbh = DBI->connect( $CONFIG->get('database'), $CONFIG->get('username'), $CONFIG->get('password'), { 'RaiseError' => 1 } ) ) { croak( 'Cannot connect to storage database - ', $! ); } # The $err variable is passed as a reference to libpcap library methods for # returning error messages from this library. my $err; # The lookupnet method of the libpcap library is used to validate the device # argument specified for packet sniffing and capture. This method also # returns the interface address and network mask for the device specified, # the latter of which is required for the compilation of a packet filter # should such a filter be specified. my ( $address, $netmask ); if ( Net::Pcap::lookupnet( $CONFIG->get('interface'), \$address, \$netmask, \$err ) ) { croak( 'Unable to look up device information for ', $CONFIG->get('interface'), ' - ', $err ); } # The open_live method of the libpcap library will open the device $dev for # packet sniffing and capture. The second argument passed to this method # is intended to be the maximum number of bytes to capture from each packet # for which the maximal transmission unit for the interface is recommended. # As this parameter cannot be reliably determined programmatically in a # portable fashion, this value can be specified in the configuration file # via the 'mtu' configuration parameter. # # Furthermore, this packet capture method will set the device in promiscuous # mode for continuous packet capture. my $pcap; $pcap = Net::Pcap::open_live( $CONFIG->get('interface'), $CONFIG->get('mtu'), 1, -1, \$err ); unless ( defined $pcap ) { croak( 'Unable to open device for packet capture - ', $err ); } # If the filter configuration parameter is set to anything other than # 'none', the default value for this parameter, then this parameteris used # to build a filter for the packet sniffing and capture interface. # # This is particularly useful if the storage database resides on another # host so that the network traffic generated from data storage is not also # logged. if ( $CONFIG->get('filter') ne 'none' ) { my $compile; if ( Net::Pcap::compile( $pcap, \$compile, $CONFIG->get('filter'), 0, $netmask ) ) { croak( 'Unable to compile packet capture filter' ); } if ( Net::Pcap::setfilter( $pcap, $compile ) ) { croak( 'Unable to set compiled packet capture filter on packet capture device' ); } } # Initiate packet capture on the specified network device - All captured # packets are passed to the &capture subroutine where packet decoding and # recording of pertinent traffic information to the accounting database is # carried out. # # The database handle is passed as the user data argument to the packet # capture processing subroutine - This alleviates the requirement for a # globally scoped database statement handle for the storage of captured # packet information. unless ( Net::Pcap::loop( $pcap, -1, \&capture, $dbh ) ) { croak( 'Unable to initiate packet capture for device ', $CONFIG->get('interface') ); } Net::Pcap::close( $pcap ); sub capture { my ( $dbh, $header, $packet ) = @_; # Strip ethernet encapsulation of captured network packet my $ether = NetPacket::Ethernet->decode( $packet ); # Decode contents of IP packet contained within stripped ethernet packet # and decode the packet data contents if the encapsulated packet is # either TCP or UDP my $proto; my $ip = NetPacket::IP->decode( $ether->{'data'} ); if ( $ip->{proto} == IP_PROTO_TCP ) { $proto = NetPacket::TCP->decode( $ip->{'data'} ); } elsif ( $ip->{proto} == IP_PROTO_UDP ) { $proto = NetPacket::UDP->decode( $ip->{'data'} ); } else { # Unsupported network packet protocol - Currently, only TCPand UDP packets # are decoded with all other packet types silently dropped by this # accounting process. } # If the network packet encapsulated within the ethernet frame has been # successfully recognised and decoded, insert relevant information with # respect to source, destination and packet length into storagedatabase. if ( defined $proto ) { # Insert the source, destination and packet length information into storage # database - Note that $proto->{'flags'} is not defined forNetPacket::UDP # objects and in place the invalid flag value of -1 is inserted. # # The database table structure is as follows: # # CREATE TABLE ipacct ( # src_ip varchar(16) NOT NULL default '0.0.0.0', # src_port smallint(5) unsigned NOT NULL default '0', # src_mac tinytext NOT NULL, # dest_ip varchar(16) NOT NULL default '0.0.0.0', # dest_port smallint(5) unsigned NOT NULL default '0', # dest_mac tinytext NOT NULL, # protocol tinyint(4) NOT NULL default '-1', # length smallint(6) NOT NULL default '-1', # flags tinyint(4) NOT NULL default '-1', # timestamp timestamp(14) NOT NULL # ) TYPE=MyISAM; # $dbh->do(qq/ INSERT INTO / . $CONFIG->get('table') . qq/ ( src_ip, src_port, src_mac, dest_ip, dest_port, dest_mac, protocol, length, flags ) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ? ) /, undef, $ip->{'src_ip'}, $proto->{'src_port'}, $ether->{'src_mac'}, $ip->{'dest_ip'}, $proto->{'dest_port'}, $ether->{'dest_mac'}, $ip->{'proto'}, $ip->{'len'}, ( exists $proto->{'flags'} ) ? $proto->{'flags'} : -1 ); } } __END__ From tshinnic at io.com Mon Feb 16 18:58:13 2009 From: tshinnic at io.com (Thomas L. Shinnick) Date: Mon, 16 Feb 2009 20:58:13 -0600 Subject: APM: Brain popups (Perl 6 from last time) Message-ID: <6.2.5.6.2.20090216203845.02e7e248@io.com> Re: the Parrot register-based architecture... Since I'm currently interested in things Javascript I noticed a mention of Opera working on their Javascript engine... Opera revs JavaScript engine of the future http://www.theregister.co.uk/2009/02/05/new_opera_java_script_engine/ Of course, nowadays everyone's working on faster JS engines, Mozilla, Google, Opera, and probably even Microsoft, but these paragraphs caught my eye: Opera's core-technology team has overhauled their JavaScript - er, ECMAScript - engine in three distinct ways. For one, they've switched from a stack-based bytecode instruction set to a register-based set. Rather than using a single stack of values, Carakan stores values in fixed registers accessible by any instruction. Since there's no need to copy values to and from the top of a stack, fewer instructions are executed and less data is copied, Bolstad explains. And that prompted me to think about the other groups' extensive work towards moving to native code. That necessarily means they get registers... and indeed that is a major differentiation (at least in their minds) between Mozilla and Google - how well they manage their slots. Re: :dba People looking at the Perl 6 regular expressions in Std.pm noticed the strange annotations embedded in the rules, e.g. :dba('yadayada') I found the explanation while reading the "Regexes and Rules" synopsis 5, http://perlcabal.org/syn/S05.html : By default the error message uses the name of the current rule as an indicator of the abstract goal of the parser at that point. However, often this is not terribly informative, especially when rules are named according to an internal scheme that will not make sense to the user. The :dba("doing business as") adverb may be used to set up a more informative name for what the following code is trying to parse: token postfix:sym<[ ]> { :dba('array subscript') '[' ~ ']' } Then instead of getting a message like: Unable to parse expression in postfix:sym<[ ]>; couldn't find final ']' you'll get a message like: Unable to parse expression in array subscript; couldn't find final ']' (The :dba adverb may also be used to give names to alternations and alternatives, which helps the lexer give better error messages.) So once again the beauty and purity of code is polluted through catering to users.... as if they weren't so ungrateful anyway! ;-) Tom -- I'm a pessimist about probabilities; I'm an optimist about possibilities. Lewis Mumford (1895-1990) -------------- next part -------------- An HTML attachment was scrubbed... URL: From ian at remmler.org Tue Feb 17 07:57:52 2009 From: ian at remmler.org (Ian Remmler) Date: Tue, 17 Feb 2009 09:57:52 -0600 Subject: APM: February Meeting Message-ID: <20090217155752.GA1611@brane> The February meeting will be tomorrow, Wednesday February 18 at Mangia's Gracy Farms location from 7:00 PM - 9:00 PM. It'll be pretty free form and interactive. Just bring code, questions, and ideas. Some possible topics: - Ponder perplexing Perl problems - Stupid Perl tricks - Perl gotchas If someone could generously bring a projector again, that would be fantastic. http://www.mangiapizza.com/33/Gracy-Farms.htm 12001 Burnet Road @ Mopac Austin, TX 78758 Phone: 832-5550 By the way, Mangia has a happy hour that ends at 7:00, so if you wish to enjoy tasty adulterated beverages you might want to show up a few minutes early. Hmmm, perhaps we should start future meetings a tad earlier. See you there! -- - Ian. From tmcd at panix.com Tue Feb 17 18:52:21 2009 From: tmcd at panix.com (tmcd at panix.com) Date: Tue, 17 Feb 2009 20:52:21 -0600 (CST) Subject: APM: February Meeting In-Reply-To: <20090217155752.GA1611@brane> References: <20090217155752.GA1611@brane> Message-ID: On Tue, 17 Feb 2009, Ian Remmler wrote: > The February meeting will be tomorrow, Wednesday February 18 at > Mangia's Gracy Farms location from 7:00 PM - 9:00 PM. Drat! I committed to be at a meeting in Wells Branch from 7:30 on. I hope to come to APM to rant & run. -- Tim McDaniel; Reply-To: tmcd at panix.com From ian at remmler.org Wed Feb 18 13:35:55 2009 From: ian at remmler.org (Ian Remmler) Date: Wed, 18 Feb 2009 15:35:55 -0600 Subject: APM: Reminder: Meeting tonight Message-ID: <20090218213554.GA19509@brane> Don't forget, the meeting is tonight at 7:00 at Mangia Gracy Farms. See you there! -- - Ian. From jameschoate at austin.rr.com Tue Feb 24 15:02:38 2009 From: jameschoate at austin.rr.com (jameschoate at austin.rr.com) Date: Tue, 24 Feb 2009 23:02:38 +0000 Subject: APM: Goodwill Computer Museum - Requesting volunteers and perhaps other opportunities Message-ID: <20090224230238.J5W4F.116315.root@hrndva-web19-z02> A posting from the Goodwill Computer Museum, it was sent to The Robot Group along with a discussion about providing places for exhibits and demo space. Might even be a good place to do a talk or demonstration. http://www.ischool.utexas.edu/jobweb/JobDetails.php?JobID=28561 -- -- -- -- -- Venimus, Vidimus, Dolavimus James Choate jameschoate at austin.rr.com james.choate at twcable.com 512-657-1279 www.ssz.com Adapt, Adopt, Improvise -- -- -- --