From rkleeman at energoncube.net Mon May 2 14:56:43 2005 From: rkleeman at energoncube.net (Bob Kleemann) Date: Mon May 2 14:56:53 2005 Subject: [San-Diego-pm] Perl Meeting on Monday, May 9th Message-ID: <20050502215643.GY18887@energoncube.net> Hey Folks, Just a reminder there is a meeting next Monday, May 9th at Panera Bread in Mira Mesa at our normal meeting time, 7PM. Bring your latest and greatest questions, answers, troubles, triumphs, and tribulations and we'll talk about them. Please let me know if there are any questions. From tkil at scrye.com Tue May 10 01:14:42 2005 From: tkil at scrye.com (Tkil) Date: Tue, 10 May 2005 02:14:42 -0600 Subject: [San-Diego-pm] Perl Meeting on Monday, May 9th In-Reply-To: <20050502215643.GY18887@energoncube.net> (Bob Kleemann's message of "Mon, 2 May 2005 14:56:43 -0700") References: <20050502215643.GY18887@energoncube.net> Message-ID: A few questions and answers that came up at tonights meeting: ------------------------------------------------------------------------ 1. What do we do about broken links that start with http://www.perl.com/CPAN-local/... The old CPAN mirror setup worked so that if you just used http://www.perl.com/CPAN/ It would redirect you to another mirror in an attempt to spread out the load over the replicated archive. This sometimes ended up not working, and other times being very sub-optimal. So more than a few people got into the habit of using the "CPAN-local" link on perl.com, which would always take you to the copy of the repository that lived on perl.com itself. Since that site was owned and funded by O'Reilly, it had good connectivity and bandwidth. Apparently that's been moved around a bit. CPAN activities now seem to be consolidated under http://cpan.org/ And they have a pretty zippy copy of the repository right there. Joel pointed out some dead links like: http://www.perl.com/CPAN-local/modules/index.html http://www.perl.com/CPAN-local/scripts/index.html http://www.perl.com/CPAN-local/ports/index.html http://www.perl.com/CPAN-local/src/index.html Just looking at the front page of cpan.org, it seems that those have been transplanted to: http://cpan.org/modules/index.html http://cpan.org/scripts/index.html http://cpan.org/ports/index.html http://cpan.org/src/index.html So that takes care of that. Another resource to keep handy is: http://search.cpan.org/ ------------------------------------------------------------------------ 2. How can a perl program discover the names of columns in SQL tables (or, more generally, the column names returned by a given query)? Answer: Use the $statement_handle->{NAME_lc} property. More details are in "perldoc DBI". The only hiccup is that it returns an array ref; this means that you have to unpack it, and you should probably make a copy of it before you modify it. Example: sub columns_in_table ( $ $ ) { my ( $dbh, $table ) = @_; my $sth = $dbh->prepare( "SELECT * FROM $table" ); my $col_names_aref = $sth->{NAME_lc}; return @$col_names_aref; } my $dbh = DBI->connect( ... ); my @employee_cols = columns_in_table( 'employee' ); This is the DBI abstraction over a "reflection" capability present in most RDBMSes: they usually have "metadata" tables that describe tables, columns in tables, constraints on those columns, etc. Unfortunately, that "system catalog" information is not standardized, so every RDBMS does it slightly differently. Using the DBI methods can isolate a programmer from that. Using DBI also means that you can get the column names from arbitrary queries: my $sql = <prepare( $sql ); my @cols = @{ $sth->{NAMES_lc} }; # @cols should now have: "foo", "baz", "alert_level" Which is something you'd be hard-pressed to do with the system catalog. Joel also mentioned filtering (as regards to which columns to show). You can use the array of column names to figure out which indexes to display, but if you're not going to display a column, why fetch it at all? That is, don't put it in the SELECT in the first place. In extreme cases you can even get a performance win by not fetching unnecessary data (especially if those columns are wide; an example might be fetching all the contents of posts off a "web bbs" system but not actually displaying those contents -- that's a lot of I/O that is for naught.) ------------------------------------------------------------------------ 3. How can you access HTML form controls by control name from JavaScript, when that name is itself stored in a separate variable? (This is similar to the problem of "variable that names a variable" in perl, also known as symbolic refs; frowned upon, but in a language such as JavaScript that (SFAIK) lacks proper references...) JavaScript treats all objects (including forms) as dictionaries; while you can put a literal name after a dot to index into such a dictionary, you can also use square brackets with a string value. That is, these two lines have the same effect: var control = document.my_form.my_widget; var control = document.my_form["my_widget"]; For a simple example, see http://scrye.com/~tkil/pm/js-by-name.html I use this function to toggle the state of the named control within form "f1". function toggle( name ) { var control = document.f1[name]; control.checked = ! control.checked; } You might have noticed that you can even parameterize away the form name; since I needed a more general toggle for my second example there, I made "toggle2" which relies on the fact that all four of these (executable) lines have the same effect: // same as above var control = document.my_form.my_widget; var control = document.my_form["my_widget"]; // parameterize away the form name, too, if you like. var control = document["my_form"].my_widget; var control = document["my_form"]["my_widget"]; Here's "toggle2": function toggle2( form, name ) { var control = document[form][name]; control.checked = ! control.checked; } You can use any sort of string construction to build the name; an obvious use is working with matrices or other highly repetitive structures. As an example, I built up a 3x3 matrix with checkboxes named m(x)(y): m00 m10 m20 m01 m11 m21 m02 m12 m22 Then I added buttons that flip a row (by calling "flip( 'row', 0 )" for row 0, or "flip( 'col', 0 )" for flipping column 0): Last, we need to implement the function "flip" that builds up each control name and toggles it within form "f2": function flip( dir, which ) { var i, name; for ( i = 0; i < 3; ++i ) { if ( dir == "row" ) { name = "m" + i + which; } else { name = "m" + which + i; } toggle2( "f2", name ); } } Finally, you can also iterate through all the elements in an object / dictionary with the "for ( i in ... )" syntax. This seems to be a nice reference on this sort of javascript fun: http://www.comptechdoc.org/independent/web/cgi/javamanual/javaloops.html (And I'm by no means a DHTML expert; if others want to comment or correct this example, please feel free. The examples were tested under IE6 (XP Pro SP2), FireFox 1.0.3 (Linux), and Safari 1.3 (OSX 10.3); only issue was the rendering of the "flip col" button on Safari, but I was abusing it anyway...). Cheers, t. From joel at fentin.com Tue May 10 07:22:31 2005 From: joel at fentin.com (Joel Fentin) Date: Tue, 10 May 2005 07:22:31 -0700 Subject: [San-Diego-pm] Perl Meeting on Monday, May 9th In-Reply-To: References: <20050502215643.GY18887@energoncube.net> Message-ID: <4280C3A7.9000709@fentin.com> Tkil wrote: > A few questions and answers that came up at tonights meeting: > 3. How can you access HTML form controls by control name from > JavaScript, when that name is itself stored in a separate variable? > (This is similar to the problem of "variable that names a variable" > in perl, also known as symbolic refs; frowned upon, but in a > language such as JavaScript that (SFAIK) lacks proper > references...) > > JavaScript treats all objects (including forms) as dictionaries; while > you can put a literal name after a dot to index into such a > dictionary, you can also use square brackets with a string value. > That is, these two lines have the same effect: > > var control = document.my_form.my_widget; > var control = document.my_form["my_widget"]; > > For a simple example, see > > http://scrye.com/~tkil/pm/js-by-name.html > > I use this function to toggle the state of the named control within > form "f1". > > function toggle( name ) > { > var control = document.f1[name]; > control.checked = ! control.checked; > } > > You might have noticed that you can even parameterize away the form > name; since I needed a more general toggle for my second example > there, I made "toggle2" which relies on the fact that all four of > these (executable) lines have the same effect: > > // same as above > var control = document.my_form.my_widget; > var control = document.my_form["my_widget"]; > > // parameterize away the form name, too, if you like. > var control = document["my_form"].my_widget; > var control = document["my_form"]["my_widget"]; > > Here's "toggle2": > > function toggle2( form, name ) > { > var control = document[form][name]; > control.checked = ! control.checked; > } > > You can use any sort of string construction to build the name; an > obvious use is working with matrices or other highly repetitive > structures. As an example, I built up a 3x3 matrix with checkboxes > named m(x)(y): > > m00 m10 m20 > m01 m11 m21 > m02 m12 m22 > > Then I added buttons that flip a row (by calling "flip( 'row', 0 )" > for row 0, or "flip( 'col', 0 )" for flipping column 0): > > > > > > onClick="javascript:flip('row','0')" /> > > > Last, we need to implement the function "flip" that builds up each > control name and toggles it within form "f2": > > function flip( dir, which ) > { > var i, name; > for ( i = 0; i < 3; ++i ) > { > if ( dir == "row" ) > { > name = "m" + i + which; > } > else > { > name = "m" + which + i; > } > toggle2( "f2", name ); > } > } > > Finally, you can also iterate through all the elements in an object / > dictionary with the "for ( i in ... )" syntax. This seems to be a > nice reference on this sort of javascript fun: > > http://www.comptechdoc.org/independent/web/cgi/javamanual/javaloops.html > > (And I'm by no means a DHTML expert; if others want to comment or > correct this example, please feel free. The examples were tested > under IE6 (XP Pro SP2), FireFox 1.0.3 (Linux), and Safari 1.3 (OSX > 10.3); only issue was the rendering of the "flip col" button on > Safari, but I was abusing it anyway...). Unlike Tony, I actually slept last night. Real programmers don't sleep. I'm just not made of the right stuff. But I'm grateful. I did a few experiments before sleeping. The following relate to a select control. The first two lines tell if a specific element has been selected. The second two are to give the quantity of elements. Also indicated are the results I got with two browsers. function N() { var X = 'Name'; alert(document.form1[X][0].selected);//works for firefox but not IE alert(document.form1.Name[0].selected);//works alert(document.form1.Name.length); //works alert(document.form1[X].length); //works } -- Joel Fentin tel: 760-749-8863 FAX: 760-749-8864 Email me: http://fentin.com/me/ContactMe.html Biz Website: http://fentin.com Personal Website: http://fentin.com/me From menolly at mib.org Tue May 10 11:40:00 2005 From: menolly at mib.org (Menolly) Date: Tue, 10 May 2005 11:40:00 -0700 (PDT) Subject: [San-Diego-pm] Perl Meeting on Monday, May 9th In-Reply-To: References: <20050502215643.GY18887@energoncube.net> Message-ID: On Tue, 10 May 2005, Tkil wrote: > Answer: Use the $statement_handle->{NAME_lc} property. More details > are in "perldoc DBI". The only hiccup is that it returns an array > ref; this means that you have to unpack it, and you should probably > make a copy of it before you modify it. And speaking of DBI and arrayrefs, here's the snippet of fun with map and grep that I mentioned: my %taken; @taken{map $_->[0], @{$rd2->{'sth'}->fetchall_arrayref()}} = (); my @untaken = grep {!exists $taken{$_->[0]}} @{$rd->{'sth'}->fetchall_arrayref()}; $testDigest = @untaken[rand(@untaken)]->[0]; $rd and $rd2 are hashrefs returned by a function in our internal DBI wrapper. I needed to select a random item from a pool, but it needed to be one which has not already been used by this user. The query in $rd2 selects items which have been used by this user; $rd is the pool. First, I declare a hash, which will act as a lookup table. I populate it with the user's taken list using hash slicing, and dereferencing the arrayrefs via map. Next, I use grep to build a list of items in the pool which have not been used. Finally, I select a random arrayref from the resulting list, deref, and use the data in the code that follows. -- menolly at mib.org http://www.livejournal.com/~nolly/ On that day, many will say to me, "Lord, Lord, did we not prophesy in your name, and cast out demons in your name, and do many mighty works in your name?" And then will I declare to them, "I never knew you; depart from me you evildoers." -- Matt 7:20-23, RSV From merlyn at stonehenge.com Tue May 10 12:16:33 2005 From: merlyn at stonehenge.com (Randal L. Schwartz) Date: 10 May 2005 12:16:33 -0700 Subject: [San-Diego-pm] Perl Meeting on Monday, May 9th In-Reply-To: References: <20050502215643.GY18887@energoncube.net> Message-ID: <864qdanb72.fsf@blue.stonehenge.com> >>>>> "Menolly" == Menolly writes: Menolly> my %taken; Menolly> @taken{map $_->[0], @{$rd2->{'sth'}->fetchall_arrayref()}} = (); Menolly> my @untaken = grep {!exists $taken{$_->[0]}} @{$rd->{'sth'}->fetchall_arrayref()}; Menolly> $testDigest = @untaken[rand(@untaken)]->[0]; I didn't look at the rest, but this last line is illegal syntax. It "accidentally" works, but what you're really saying there is the same as: $testdigest = $untaken[rand @untaken]; And you might as well say what you mean. :) It will definitely stop working in the future, and is already a "warnable" offense, that you would have caught with -w turned on. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! From menolly at mib.org Tue May 10 12:47:36 2005 From: menolly at mib.org (Menolly) Date: Tue, 10 May 2005 12:47:36 -0700 (PDT) Subject: [San-Diego-pm] Perl Meeting on Monday, May 9th In-Reply-To: <864qdanb72.fsf@blue.stonehenge.com> References: <20050502215643.GY18887@energoncube.net> <864qdanb72.fsf@blue.stonehenge.com> Message-ID: On Tue, 10 May 2005, Randal L. Schwartz wrote: >>>>>> "Menolly" == Menolly writes: > > Menolly> my %taken; > Menolly> @taken{map $_->[0], @{$rd2->{'sth'}->fetchall_arrayref()}} = (); > Menolly> my @untaken = grep {!exists $taken{$_->[0]}} @{$rd->{'sth'}->fetchall_arrayref()}; > Menolly> $testDigest = @untaken[rand(@untaken)]->[0]; > > I didn't look at the rest, but this last line is illegal syntax. > It "accidentally" works, but what you're really saying there > is the same as: > > $testdigest = $untaken[rand @untaken]; > > And you might as well say what you mean. :) > > It will definitely stop working in the future, and is already a > "warnable" offense, that you would have caught with -w turned on. Hmm, I thought we _did_ have -w turned on across the board. But I don't think your syntax will work; @untaken is an array of arrayrefs; I need to select a random element from it, dereference that element, and set $testDigest to the first (and, as it happens, only) element of the referenced array. (It's a ref because of DBI; it's a question of where I place the complexity.) -- menolly at mib.org http://www.livejournal.com/~nolly/ On that day, many will say to me, "Lord, Lord, did we not prophesy in your name, and cast out demons in your name, and do many mighty works in your name?" And then will I declare to them, "I never knew you; depart from me you evildoers." -- Matt 7:20-23, RSV From merlyn at stonehenge.com Tue May 10 12:50:09 2005 From: merlyn at stonehenge.com (Randal L. Schwartz) Date: 10 May 2005 12:50:09 -0700 Subject: [San-Diego-pm] Perl Meeting on Monday, May 9th In-Reply-To: References: <20050502215643.GY18887@energoncube.net> <864qdanb72.fsf@blue.stonehenge.com> Message-ID: <86u0lalv2m.fsf@blue.stonehenge.com> >>>>> "Menolly" == Menolly writes: Menolly> $testDigest = @untaken[rand(@untaken)]->[0]; Menolly> Hmm, I thought we _did_ have -w turned on across the board. But I don't Menolly> think your syntax will work; @untaken is an array of arrayrefs; I need Menolly> to select a random element from it, dereference that element, and set Menolly> $testDigest to the first (and, as it happens, only) element of the Menolly> referenced array. (It's a ref because of DBI; it's a question of where Menolly> I place the complexity.) OK, that's $untaken[rand @untaken][0]; -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! From menolly at mib.org Tue May 10 12:56:13 2005 From: menolly at mib.org (Menolly) Date: Tue, 10 May 2005 12:56:13 -0700 (PDT) Subject: [San-Diego-pm] Perl Meeting on Monday, May 9th In-Reply-To: <86u0lalv2m.fsf@blue.stonehenge.com> References: <20050502215643.GY18887@energoncube.net> <864qdanb72.fsf@blue.stonehenge.com> <86u0lalv2m.fsf@blue.stonehenge.com> Message-ID: > OK, that's > > $untaken[rand @untaken][0]; That's what I've changed it to already; thanks for catching my typo. (I plead Friday afternoon code in a file that's old enough to not be up to standard wrt warnings, etc.) If it had failed, I'd've caught it. *grin* -- menolly at mib.org http://www.livejournal.com/~nolly/ On that day, many will say to me, "Lord, Lord, did we not prophesy in your name, and cast out demons in your name, and do many mighty works in your name?" And then will I declare to them, "I never knew you; depart from me you evildoers." -- Matt 7:20-23, RSV From tkil at scrye.com Tue May 10 13:22:49 2005 From: tkil at scrye.com (Tkil) Date: Tue, 10 May 2005 14:22:49 -0600 Subject: [San-Diego-pm] Perl Meeting on Monday, May 9th In-Reply-To: (menolly@mib.org's message of "Tue, 10 May 2005 11:40:00 -0700 (PDT)") References: <20050502215643.GY18887@energoncube.net> Message-ID: >>>>> "Menolly" == menolly writes: Menolly> my %taken; Menolly> @taken{map $_->[0], @{$rd2->{'sth'}->fetchall_arrayref()}} = (); You were complaining that you couldn't readily do that in one line. Complain no more: my %taken = map { ( $_->[0] => 1 ) } @{ $rd2->{sth}->fetchall_arrayref() }; One more optimization -- if you're returning just a single value per row (or if you only care about the first value in each row returned by $rd2->{sth}), use "selectcol_arrayref". Only complication is that it seems to require the database handle, not just the statement handle. If you have the corresponding $dbh lying around, fine: my %taken = map { ( $_ => 1 ) } @{ $rd2->{dbh}->selectcol_arrayref( $rd2->{sth} ) }; If not... more attribute abuse! Every statement handle has a "Database" attribute that points to its parent $dbh: my %taken = map { ( $_ => 1 ) } @{ $rd2->{sth}->{Database}->selectcol_arrayref( $rd2->{sth} ) }; Depending on how much access you have to the server and the SQL running behind "$rd2->{sth}", you're possibly better off asking the DB server to do set membership tests for you. my @untaken = @{ $dbh->selectcol_arrayref( < References: <20050502215643.GY18887@energoncube.net> Message-ID: On Tue, 10 May 2005, Tkil wrote: >>>>>> "Menolly" == menolly writes: > > Menolly> my %taken; > Menolly> @taken{map $_->[0], @{$rd2->{'sth'}->fetchall_arrayref()}} = (); > > You were complaining that you couldn't readily do that in one line. > Complain no more: > > my %taken = map { ( $_->[0] => 1 ) } @{ $rd2->{sth}->fetchall_arrayref() }; Indeed; perhaps next time I'm messing with the file. (Too close to release for mere aesthetic changes; the syntax one is already pushed to QA.) > One more optimization -- if you're returning just a single value per > row (or if you only care about the first value in each row returned by > $rd2->{sth}), use "selectcol_arrayref". Only complication is that it > seems to require the database handle, not just the statement handle. > If you have the corresponding $dbh lying around, fine: I don't have it conveniently[*], which is why I didn't use selectcol_arrayref -- I'm quite fond of that in other contexts. > If not... more attribute abuse! Every statement handle has a > "Database" attribute that points to its parent $dbh: > > my %taken = map { ( $_ => 1 ) } > @{ $rd2->{sth}->{Database}->selectcol_arrayref( $rd2->{sth} ) }; Ah! This changes my previous "conveniently", but I'm not sure it's actually any simpler than my existing code. > Depending on how much access you have to the server and the SQL > running behind "$rd2->{sth}", you're possibly better off asking the DB > server to do set membership tests for you. > > my @untaken = @{ $dbh->selectcol_arrayref( < SELECT a.thingy > FROM all_thingy a > WHERE NOT EXISTS ( SELECT * > FROM taken_thingies t > WHERE t.thingy_id = a.thingy_id > AND t.person_id = ? ) > SQL MySQL 4.0.22; no subqueries. -- menolly at mib.org http://www.livejournal.com/~nolly/ On that day, many will say to me, "Lord, Lord, did we not prophesy in your name, and cast out demons in your name, and do many mighty works in your name?" And then will I declare to them, "I never knew you; depart from me you evildoers." -- Matt 7:20-23, RSV From merlyn at stonehenge.com Tue May 10 14:12:57 2005 From: merlyn at stonehenge.com (Randal L. Schwartz) Date: 10 May 2005 14:12:57 -0700 Subject: [San-Diego-pm] Perl Meeting on Monday, May 9th In-Reply-To: References: <20050502215643.GY18887@energoncube.net> Message-ID: <86hdhalr8m.fsf@blue.stonehenge.com> >>>>> "Menolly" == Menolly writes: Menolly> MySQL 4.0.22; no subqueries. In other words, not a real database, but a sort of a "structured file storage system that understands some subset of modern SQL". PostgreSQL. The only thing I recommend these days. Unless they can get by with DBD::SQLite (still preferred over MYSQL), or can afford Oracle. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! From menolly at mib.org Tue May 10 14:25:30 2005 From: menolly at mib.org (Menolly) Date: Tue, 10 May 2005 14:25:30 -0700 (PDT) Subject: [San-Diego-pm] Perl Meeting on Monday, May 9th In-Reply-To: <86hdhalr8m.fsf@blue.stonehenge.com> References: <20050502215643.GY18887@energoncube.net> <86hdhalr8m.fsf@blue.stonehenge.com> Message-ID: On Tue, 10 May 2005, Randal L. Schwartz wrote: >>>>>> "Menolly" == Menolly writes: > > Menolly> MySQL 4.0.22; no subqueries. > > In other words, not a real database, but a sort of a "structured file > storage system that understands some subset of modern SQL". > > PostgreSQL. The only thing I recommend these days. Unless they can > get by with DBD::SQLite (still preferred over MYSQL), or can afford > Oracle. Changing databases is not feasible at this point, for primarily non-technical reasons. If the costs of using MySQL ever outweigh the costs of replacing it, we'll likely switch to Oracle. For now, MySQL is working for us. -- menolly at mib.org http://www.livejournal.com/~nolly/ On that day, many will say to me, "Lord, Lord, did we not prophesy in your name, and cast out demons in your name, and do many mighty works in your name?" And then will I declare to them, "I never knew you; depart from me you evildoers." -- Matt 7:20-23, RSV From schoon at amgt.com Tue May 10 14:22:21 2005 From: schoon at amgt.com (Mark Schoonover) Date: Tue, 10 May 2005 14:22:21 -0700 Subject: [San-Diego-pm] Perl Meeting on Monday, May 9th Message-ID: merlyn at stonehenge.com wrote: >>>>>> "Menolly" == Menolly writes: > > Menolly> MySQL 4.0.22; no subqueries. > > In other words, not a real database, but a sort of a "structured file > storage system that understands some subset of modern SQL". > > PostgreSQL. The only thing I recommend these days. Unless they can > get by with DBD::SQLite (still preferred over MYSQL), or can afford > Oracle. Bah... Mark From rkleeman at energoncube.net Tue May 10 14:55:25 2005 From: rkleeman at energoncube.net (Bob Kleemann) Date: Tue, 10 May 2005 14:55:25 -0700 Subject: [San-Diego-pm] Perl Meeting on Monday, May 9th In-Reply-To: <86hdhalr8m.fsf@blue.stonehenge.com> References: <20050502215643.GY18887@energoncube.net> <86hdhalr8m.fsf@blue.stonehenge.com> Message-ID: <20050510215525.GP29513@energoncube.net> On Tue, May 10, 2005 at 02:12:57PM -0700, Randal L. Schwartz wrote: > >>>>> "Menolly" == Menolly writes: > > Menolly> MySQL 4.0.22; no subqueries. > > In other words, not a real database, but a sort of a "structured file > storage system that understands some subset of modern SQL". Oh boy, it's starting to get hot around here, and I don't think it has anything to do with summer.... > PostgreSQL. The only thing I recommend these days. Unless they can > get by with DBD::SQLite (still preferred over MYSQL), or can afford > Oracle. Not that a good flame war isn't fun and all, but why is there so much religion on this topic? Pretty much every article that I've found on the topic boils down to "weigh the differences and run whatever works best for your situation". Why don't you subscribe to this philosophy? From merlyn at stonehenge.com Tue May 10 15:15:08 2005 From: merlyn at stonehenge.com (Randal L. Schwartz) Date: 10 May 2005 15:15:08 -0700 Subject: [San-Diego-pm] Perl Meeting on Monday, May 9th In-Reply-To: <20050510215525.GP29513@energoncube.net> References: <20050502215643.GY18887@energoncube.net> <86hdhalr8m.fsf@blue.stonehenge.com> <20050510215525.GP29513@energoncube.net> Message-ID: <8664xqlocz.fsf@blue.stonehenge.com> >>>>> "Bob" == Bob Kleemann writes: Bob> Not that a good flame war isn't fun and all, but why is there so much Bob> religion on this topic? Pretty much every article that I've found on Bob> the topic boils down to "weigh the differences and run whatever works Bob> best for your situation". Why don't you subscribe to this philosophy? I'm giving "what works for me and my clients". That's opinion. It always is. However, most people don't know why they need triggers, rules, views, and subselectes, and good data integrity. Thus, I'm also trying to educate the crowd through blatent bantering. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! From christopher.hahn at peregrine.com Tue May 10 15:18:18 2005 From: christopher.hahn at peregrine.com (Christopher Hahn) Date: Tue, 10 May 2005 15:18:18 -0700 Subject: [San-Diego-pm] Perl Meeting on Monday, May 9th Message-ID: "Blatent" ...... is this being Latently Blatant? :0) Whenever asked to pick between pg and mysql, I choose pg and say "better parentage" ....just parroting better minds than mine. chahn -----Original Message----- From: merlyn at stonehenge.com [mailto:merlyn at stonehenge.com] Sent: Tuesday, May 10, 2005 3:15 PM To: Bob Kleemann Cc: Perl Mongers Subject: Re: [San-Diego-pm] Perl Meeting on Monday, May 9th >>>>> "Bob" == Bob Kleemann writes: Bob> Not that a good flame war isn't fun and all, but why is there so Bob> much religion on this topic? Pretty much every article that I've Bob> found on the topic boils down to "weigh the differences and run Bob> whatever works best for your situation". Why don't you subscribe to this philosophy? I'm giving "what works for me and my clients". That's opinion. It always is. However, most people don't know why they need triggers, rules, views, and subselectes, and good data integrity. Thus, I'm also trying to educate the crowd through blatent bantering. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! _______________________________________________ San-Diego-pm mailing list San-Diego-pm at pm.org http://mail.pm.org/mailman/listinfo/san-diego-pm From glim at mycybernet.net Tue May 10 20:03:00 2005 From: glim at mycybernet.net (Gerard Lim) Date: Tue, 10 May 2005 23:03 -0400 Subject: [San-Diego-pm] Yet Another Perl Conference final details Message-ID: Hi everyone... There have been some recent developments on the YAPC::NA front, and it has been suggested to us that a reminder might be helpful to some people, so here's a quick summary of the event. Summary ------- YAPC::NA 2005 (Yet Another Perl Conference, North America) in Toronto, Canada, Monday - Wednesday 27 - 29, June 2005 Home page: http://yapc.org/America/ Conference Location: http://89chestnut.com/ A facility of the University of Toronto Accommodations -------------- Normally registration information would come first, but accommodations are the bottleneck -- our main group reservation (at the conference hotel) expires at the end of the week, and as the conference approaches it will be extremely difficult to find a hotel anywhere in the city. Info on how to book at: http://yapc.org/America/accommodations-2005.shtml Registration ------------ Register now! :-) We are on track to break attendance records at YAPC::NA this year, and we could even sell out before the conference starts. The price for the full 3 days is USD$85. We keep it insanely low through many generous sponsorships and the all-volunteer organizational and speaking crews. Registration info: http://yapc.org/America/register-2005.shtml Direct registration link: http://donate.perlfoundation.org/index.pl?node=registrant%20info&conference_id=423 Conference Speaking Schedule ---------------------------- We've got an excellent selection of talks and speakers for Perl programmers of all levels, beginner through expert. We are fortunate enough to have presentations coming from some of the most recognizable names in Perl programming today, including Larry Wall, Chip Salzenberg, Dan Sugalski, Autrijus Tang and brian d foy. Summary -- http://yapc.org/America/schedule-2005/summary.html Day 1 -- http://yapc.org/America/schedule-2005/day1.html Day 2 -- http://yapc.org/America/schedule-2005/day2.html Day 3 -- http://yapc.org/America/schedule-2005/day3.html Lightning Talks --------------- These short (5 minutes each) talks, presented by the conference attendees, are a YAPC tradition. If you're interested please read more about them and sign up: http://www.justanotherperlhacker.org/lightning/ [ This message was sent by Gerard Lim on behalf of the YAPC::NA 2005 Conference organizing committee of the Toronto Perl Mongers. Thanks for your patience and support. ] From billdav at cox.net Thu May 12 20:18:22 2005 From: billdav at cox.net (Bill Davidson) Date: Thu, 12 May 2005 20:18:22 -0700 Subject: [San-Diego-pm] Perl Meeting on Monday, May 9th In-Reply-To: <8664xqlocz.fsf@blue.stonehenge.com> References: <20050502215643.GY18887@energoncube.net> <86hdhalr8m.fsf@blue.stonehenge.com> <20050510215525.GP29513@energoncube.net> <8664xqlocz.fsf@blue.stonehenge.com> Message-ID: <42841C7E.8090905@cox.net> Randal L. Schwartz wrote: > However, most people don't know why they need triggers, rules, views, > and subselectes, and good data integrity. Testify! From my experience, most people who work on databases don't seem to get a lot of instruction in serious databases before they start working with them. I know I didn't. After I took some classes and learned how to use some of these more advanced features, my opinions changed considerably. MySQL is good for some things. It just runs out of power eventually when other RDBMS's keep on going. I've looked at the 5.0 enhancements and while they are a step in the right direction, they are still very far behind PG and Oracle. Also, PG is free for all purposes. MySQL isn't. --Bill Davidson From christopher.hahn at peregrine.com Tue May 17 15:55:35 2005 From: christopher.hahn at peregrine.com (Christopher Hahn) Date: Tue, 17 May 2005 15:55:35 -0700 Subject: [San-Diego-pm] Textual Analysis Message-ID: -----Original Message----- From: Menolly [mailto:menolly at mib.org] Sent: Tuesday, May 10, 2005 2:26 PM To: Randal L. Schwartz Cc: Perl Mongers Subject: Re: [San-Diego-pm] Perl Meeting on Monday, May 9th On Tue, 10 May 2005, Randal L. Schwartz wrote: >>>>>> "Menolly" == Menolly writes: > > Menolly> MySQL 4.0.22; no subqueries. > > In other words, not a real database, but a sort of a "structured file > storage system that understands some subset of modern SQL". > > PostgreSQL. The only thing I recommend these days. Unless they can > get by with DBD::SQLite (still preferred over MYSQL), or can afford > Oracle. Changing databases is not feasible at this point, for primarily non-technical reasons. If the costs of using MySQL ever outweigh the costs of replacing it, we'll likely switch to Oracle. For now, MySQL is working for us. -- menolly at mib.org http://www.livejournal.com/~nolly/ On that day, many will say to me, "Lord, Lord, did we not prophesy in your name, and cast out demons in your name, and do many mighty works in your name?" And then will I declare to them, "I never knew you; depart from me you evildoers." -- Matt 7:20-23, RSV _______________________________________________ San-Diego-pm mailing list San-Diego-pm at pm.org http://mail.pm.org/mailman/listinfo/san-diego-pm From christopher.hahn at peregrine.com Tue May 17 15:57:43 2005 From: christopher.hahn at peregrine.com (Christopher Hahn) Date: Tue, 17 May 2005 15:57:43 -0700 Subject: [San-Diego-pm] Textual Analysis Message-ID: Whoops, the previous email was an accident....sorry. What I wanted to ask was whether anyone in the group had worked with any perl modules that analyze text. I want to write something quick and dirty that will look for license agreements in source files. We need to check our products for Third Party tools. Thanks in advance for time, Christopher From merlyn at stonehenge.com Tue May 17 16:05:31 2005 From: merlyn at stonehenge.com (Randal L. Schwartz) Date: 17 May 2005 16:05:31 -0700 Subject: [San-Diego-pm] Textual Analysis In-Reply-To: References: Message-ID: <8664xhsbb8.fsf@blue.stonehenge.com> >>>>> "Christopher" == Christopher Hahn writes: Christopher> What I wanted to ask was whether anyone in the group had Christopher> worked with any perl modules that analyze text. You'll have to define "analyze text". Perl is *all about* that. Christopher> I want to write something quick and dirty that will look Christopher> for license agreements in source files. OK, so what's your strategy for that? A simple "grep" would do that, right? -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! From christopher.hahn at peregrine.com Tue May 17 16:09:17 2005 From: christopher.hahn at peregrine.com (Christopher Hahn) Date: Tue, 17 May 2005 16:09:17 -0700 Subject: [San-Diego-pm] Textual Analysis Message-ID: Fair enough. I am thinking of computing a "score" based on the number of certain strings found in a file. You see, I do not know the exact format that I am looking for.... ...but it will likely use certain words, like "agreement" and "license", etc I know that a "semantic analyzer" is dreamland, but still think that I could do something useful. Perhaps I should just dump all of the files onto my desktop and use Google Desktop search? :^) Well, garbage in, garbage out! (but thank you for the time anyhow) -----Original Message----- From: merlyn at stonehenge.com [mailto:merlyn at stonehenge.com] Sent: Tuesday, May 17, 2005 4:06 PM To: Christopher Hahn Cc: Perl Mongers Subject: Re: [San-Diego-pm] Textual Analysis >>>>> "Christopher" == Christopher Hahn writes: Christopher> What I wanted to ask was whether anyone in the group had Christopher> worked with any perl modules that analyze text. You'll have to define "analyze text". Perl is *all about* that. Christopher> I want to write something quick and dirty that will look Christopher> for license agreements in source files. OK, so what's your strategy for that? A simple "grep" would do that, right? -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! From billdav at cox.net Thu May 19 06:54:08 2005 From: billdav at cox.net (Bill Davidson) Date: Thu, 19 May 2005 06:54:08 -0700 Subject: [San-Diego-pm] Textual Analysis In-Reply-To: References: Message-ID: <428C9A80.6080007@cox.net> Christopher Hahn wrote: > I am thinking of computing a "score" based on the number of certain > strings found in a file. > > You see, I do not know the exact format that I am looking for.... > > ...but it will likely use certain words, like "agreement" and "license", etc That certainly makes it tough. It is often harder to figure out exactly what it is that you want to do than to figure out a way to do it. It sounds like once you figure out what you're looking for, this program should be extremely easy to write. --Bill Davidson From rkleeman at energoncube.net Wed May 25 10:20:55 2005 From: rkleeman at energoncube.net (Bob Kleemann) Date: Wed, 25 May 2005 10:20:55 -0700 Subject: [San-Diego-pm] Possible Perl Jobs Message-ID: <20050525172055.GM11054@energoncube.net> If anyone is interested in this, please contact jp at osft.com. ----- Forwarded message from jp at osft.com ----- Subject: Perl User Group - Request To: rkleeman at energoncube.net From: jp at osft.com X-MIMETrack: Serialize by Router on Exposed/Opensoft(Release 5.0.9a |January 7, 2002) at 05/24/2005 10:19:09 PM X-Spam-Bayes-Status: NOT learned Wanted 10 Perl Java C++ developers with a Unix and or Linux background - This is a re-write for a large firm on the west coast. Roles are available for candidates at Junior to Intermediate experience levels. Skills in order of experience and ability - Perl, Java, C++. Contracts will start ASAP. Please send resumes to jp at osft.com. Thanks Jay Parmar Opensoft Inc. Phone: 416-260-2656 x221 Fax: 416-260-5973 e-mail: jp at osft.com ----- End forwarded message -----