From Peter at PSDT.com Sun Jan 5 12:43:44 2003 From: Peter at PSDT.com (Peter Scott) Date: Wed Aug 4 00:11:13 2004 Subject: Happy New Year Message-ID: <4.3.2.7.2.20030105103943.00a88e10@shell2.webquarry.com> And may your programs be bug-free. Shall we meet this month? In other news, I can give you early notice about a YAPC::Canada; May 15/16 at Carleton U, Ottawa. I expect to be giving a session and going up early to teach a class locally. -- Peter Scott Pacific Systems Design Technologies http://www.perldebugged.com/ From darren at DarrenDuncan.net Sun Jan 5 15:09:29 2003 From: darren at DarrenDuncan.net (Darren Duncan) Date: Wed Aug 4 00:11:13 2004 Subject: Happy New Year In-Reply-To: <4.3.2.7.2.20030105103943.00a88e10@shell2.webquarry.com> References: <4.3.2.7.2.20030105103943.00a88e10@shell2.webquarry.com> Message-ID: Peter Scott said: >And may your programs be bug-free. Well, I plan to put up my first release of DBIx::Portable tonight or so (prior to returning to work tomorrow), but it is all documentation. When it is up, I plan to inform this list and modules@perl.org simultaneously, so you can have a look. >Shall we meet this month? Sure, but I don't know which week yet, though, or what to discuss. Perhaps if it was later in the month we would have more time to come up with a topic. I also don't mind waiting until there are more than 3 people free at once. So far, Tuesdays seem to work best, I think. >In other news, I can give you early notice about a YAPC::Canada; May 15/16 at Carleton U, Ottawa. I expect to be giving a session and going up early to teach a class locally. I'm dismayed that it isn't in mid-February instead, since that's when I would be in the general neighbourhood (to see my sister's graduation from U of Guelph). But I may get a chance later. -- Darren Duncan From darren at DarrenDuncan.net Mon Jan 6 01:01:59 2003 From: darren at DarrenDuncan.net (Darren Duncan) Date: Wed Aug 4 00:11:13 2004 Subject: Fwd: Module submission DBIx::Portable Message-ID: >Delivered-To: cpanmail-duncand@cpan.org >Date: Mon, 6 Jan 2003 07:56:49 +0100 >Reply-To: modules@perl.org >Subject: Module submission DBIx::Portable >From: "Perl Authors Upload Server" >To: modules@perl.org, duncand@cpan.org >X-SMTPD: qpsmtpd/0.20, http://develooper.com/code/qpsmtpd/ >X-Spam-Status: No, hits=0.8 required=5.0 > tests=SPAM_PHRASE_02_03 > version=2.43 >X-Spam-Level: > > >The following module was proposed for inclusion in the Module List: > > modid: DBIx::Portable > DSLIP: cdpOp > description: Framework for RDBMS-generic apps and schemas > userid: DUNCAND (Darren Duncan) > chapterid: 7 (Database_Interfaces) > communities: > victoria-pm@pm.org - more later when demo is up > > similar: > more than fit here; eg: DBI, SQL::Schema, DBIx::AnyDBD, > SQL::Builder, DBIx::Browse, DBIx::Abstract, DBIx::SearchBuilder, ... > > rationale: > > I will make a detailed list how how each of the above and other > modules are different from or like mine in the near future. > Meanwhile, here is a general summary, from my module's Description > POD (hopefully not truncated by form): ----------------------------- > > DESCRIPTION > > The DBIx::Portable framework is intended to support complex (or > simple) database-using applications that are easily portable across > databases because common product-specific details are abstracted > away. These include the RDBMS product and vendor name, what dialect > of SQL its scripting or query interface uses, whether the product > uses SQL at all or some other method of querying, how query results > are returned, what features the RDBMS supports, how to manage > connections, how to manage schema, how to manage stored procedures, > and perhaps how to manage users. The main thing that this framework > will not be doing in the forseeable future is managing the > installation and configuration of the RDBMS itself, which may be on > the same machine or a different one. > > There are two main types of functionality that the DBIx::Portable > framework is designed to implement; this functionality may be better > described in different groupings. > > The first functionality type is the management (creation, > modification, deletion) of the schema in a database, including: > tables, keys, constraints, relations, sequences, views, stored > procedures, triggers, and users. This type of functionality > typically is used infrequently and sets things up for the main > functionality of your database-using application(s). In some cases, > typically with single-user desktop applications, the application may > install its own schema, and/or create new database files, when it > starts up or upon the user's prompting; this can be analogous to the > result of a "New..." (or "Save As...") command in a desktop > financial management or file archiving application; the application > would then carry on to use the schema as its personal working space. > In other cases, typically with multiple-user client-server > applications, one "Installer" or "Manager" type application or > process with exclusive access will be run once to create the schema, > and then a separate application or process will be run to make use > of it as a shared working space. > > The second functionality type is the management (creation, > modification, deletion) of the data in a database, including such > operations as: direct selects from single or multiple tables or > views, direct inserts or updates or deletes of records, calling > stored procedures, using sequences, managing temporary tables, > managing transactions, managing data integrity. This type of > functionality typically is used frequently and comprises the main > functionality of your database-using application(s). In some cases, > typically with public-accessible websites or services, all or most > users will just be viewing data and not changing anything; everyone > would use the same database user and they would not be prompted for > passwords or other security credentials. In other cases, typically > with private or restricted-access websites or services, all or most > users will also be changing data; everyone would have their own real > or application-simulated database user, whom they log in as with a > password or other credentials; as the application implements, these > users can have different activity privileges, and their actions can > be audited. > > The DBIx::Portable framework can be considered a low-level service > because it allows a fine level of granularity or detail for the > commands you can make of it and the results you get back; you get a > detailed level of control. But it is not low-level in the way that > you would be entering any raw SQL, or even small fragments of raw > SQL; that is expressly avoided because it would expose > implementation details that aren't true on all databases. Rather, > this framework provides the means for you to specify in an > RDBMS-generic fashion exactly what it is you want to happen, and > your request is mapped to native or emulated functionality for the > actual RDBMS that is being used, to do the work. The implementation > or mapping is different for each RDBMS being abstracted away, and > makes maximum use of that database's built-in functionality. > Thereby, the DBIx::Portable framework achieves the greatest > performance possible while still being 100% RDBMS-generic. > > This differs from other database abstraction modules or frameworks > that I am aware of on CPAN, since the others tend to either work > towards the lowest-common-denominator database while emulating more > complex functionality, which is very slow, or more often they > provide a much more limited number of abstracted functions and > expect you to do things manually (which is specific to single > databases or non-portable) with any other functionality you need. > With many modules, even the abstracted functions tend to accept sql > fragments as part of their input, which in the broadest sense makes > those non-portable as well. With my framework I am attempting the > "holy grail" of maximum portability with maximum features and > maximum speed, which to my knowledge none of the existing solutions > on CPAN are doing, or would be able to do short of a full rewrite. > This is largely why I am starting a new module framework rather than > trying to help patch an existing solution; I believe a rewrite is > needed. > > enteredby: DUNCAND (Darren Duncan) > enteredon: Mon Jan 6 06:56:48 2003 GMT > >The resulting entry would be: > >DBIx:: >::Portable cdpOp Framework for RDBMS-generic apps and schemas DUNCAND > > >Thanks for registering, >The Pause Team > >PS: The following links are only valid for module list maintainers: > >Registration form with editing capabilities: > https://pause.perl.org/pause/authenquery?ACTION=add_mod&USERID=34100000_a06412c7cf6a82fc&SUBMIT_pause99_add_mod_preview=1 >Immediate (one click) registration: > https://pause.perl.org/pause/authenquery?ACTION=add_mod&USERID=34100000_a06412c7cf6a82fc&SUBMIT_pause99_add_mod_insertit=1 From darren at DarrenDuncan.net Mon Jan 6 11:19:51 2003 From: darren at DarrenDuncan.net (Darren Duncan) Date: Wed Aug 4 00:11:13 2004 Subject: Module submission DBIx::Portable (fwd) Message-ID: ---------- Forwarded message ---------- Date: Mon, 6 Jan 2003 11:54:11 +0000 From: Tim Bunce To: modules@perl.org Cc: duncand@cpan.org Subject: Re: Module submission DBIx::Portable Frameworks of multiple closely related modules are encouraged to have a catchy 'brand name' at the top level rather than fit into an existing namespace. e.g., Alzabo and Tangram. Tim. From peter at PSDT.com Mon Jan 6 11:23:30 2003 From: peter at PSDT.com (Peter Scott) Date: Wed Aug 4 00:11:13 2004 Subject: Module submission DBIx::Portable (fwd) In-Reply-To: Message-ID: <4.3.2.7.2.20030106092236.00b3fae0@shell2.webquarry.com> I didn't think you were clustering multiple modules like this. You certainly don't seem to be in the same arena as those two products. At 09:19 AM 1/6/03 -0800, Darren Duncan wrote: >---------- Forwarded message ---------- >Date: Mon, 6 Jan 2003 11:54:11 +0000 >From: Tim Bunce >To: modules@perl.org >Cc: duncand@cpan.org >Subject: Re: Module submission DBIx::Portable > >Frameworks of multiple closely related modules are encouraged to >have a catchy 'brand name' at the top level rather than fit into >an existing namespace. e.g., Alzabo and Tangram. > >Tim. -- Peter Scott Pacific Systems Design Technologies http://www.perldebugged.com/ From darren at DarrenDuncan.net Mon Jan 6 11:43:56 2003 From: darren at DarrenDuncan.net (Darren Duncan) Date: Wed Aug 4 00:11:13 2004 Subject: Module submission DBIx::Portable (fwd) In-Reply-To: <4.3.2.7.2.20030106092236.00b3fae0@shell2.webquarry.com> Message-ID: On Mon, 6 Jan 2003, Peter Scott wrote: > I didn't think you were clustering multiple modules like this. You > certainly don't seem to be in the same arena as those two products. Can you please clarify what you mean by this (and preferably soon, as I am writing a reply to Tim and the Modules List right now). For example, do you mean that you did not know that my release consists of about a dozen closely related (to be used together) modules? Or, do you mean that what I am doing should not be in a top level namespace (I actually like a top level namespace)? Or, do you mean that I should not have a 'brand name' because I didn't intend to before? Or, did you think that my solution was less complicated or targeted differently than Alzabo or Tangram? Please let me know what you meant so I know how to take it. Thank you. -- Darren Duncan > At 09:19 AM 1/6/03 -0800, Darren Duncan wrote: > >---------- Forwarded message ---------- > >Date: Mon, 6 Jan 2003 11:54:11 +0000 > >From: Tim Bunce > >To: modules@perl.org > >Cc: duncand@cpan.org > >Subject: Re: Module submission DBIx::Portable > > > >Frameworks of multiple closely related modules are encouraged to > >have a catchy 'brand name' at the top level rather than fit into > >an existing namespace. e.g., Alzabo and Tangram. > > > >Tim. From peter at PSDT.com Mon Jan 6 11:51:11 2003 From: peter at PSDT.com (Peter Scott) Date: Wed Aug 4 00:11:13 2004 Subject: Module submission DBIx::Portable (fwd) In-Reply-To: References: <4.3.2.7.2.20030106092236.00b3fae0@shell2.webquarry.com> Message-ID: <4.3.2.7.2.20030106094536.00abaf00@shell2.webquarry.com> At 09:43 AM 1/6/03 -0800, Darren Duncan wrote: >On Mon, 6 Jan 2003, Peter Scott wrote: > > I didn't think you were clustering multiple modules like this. You > > certainly don't seem to be in the same arena as those two products. > >Can you please clarify what you mean by this (and preferably soon, as I >am writing a reply to Tim and the Modules List right now). > >For example, do you mean that you did not know that my release >consists of about a dozen closely related (to be used together) modules? No. >Or, do you mean that what I am doing should not be in a top level >namespace (I actually like a top level namespace)? No. >Or, do you mean that I should not have a 'brand name' because I didn't >intend to before? I don't see why it should be branded. >Or, did you think that my solution was less complicated or targeted >differently than Alzabo or Tangram? Yes. Unless I grossly misunderstood, you created a system that allowed people to perform database operations without SQL knowledge or being tied to a specific platform. DBIx:: seemed the right place and Portable seemed the right name. Alzabo and Tangram are massive systems designed for completely taking over implementing persistence for an object hierarchy via an RDBMS. I tend to think of them as being portable ways of emulating an OODBMS on an RDBMS. I can't see how they compare to what you've done. Branding them makes sense because you really end up getting married to the product in order to use it, and have to invest a lot of learning to get there. >Please let me know what you meant so I know how to take it. Thank you. -- >Darren Duncan > > > At 09:19 AM 1/6/03 -0800, Darren Duncan wrote: > > >---------- Forwarded message ---------- > > >Date: Mon, 6 Jan 2003 11:54:11 +0000 > > >From: Tim Bunce > > >To: modules@perl.org > > >Cc: duncand@cpan.org > > >Subject: Re: Module submission DBIx::Portable > > > > > >Frameworks of multiple closely related modules are encouraged to > > >have a catchy 'brand name' at the top level rather than fit into > > >an existing namespace. e.g., Alzabo and Tangram. > > > > > >Tim. -- Peter Scott Pacific Systems Design Technologies http://www.perldebugged.com/ From darren at DarrenDuncan.net Mon Jan 6 12:06:58 2003 From: darren at DarrenDuncan.net (Darren Duncan) Date: Wed Aug 4 00:11:13 2004 Subject: Module submission DBIx::Portable (fwd) In-Reply-To: <4.3.2.7.2.20030106094536.00abaf00@shell2.webquarry.com> Message-ID: On Mon, 6 Jan 2003, Peter Scott wrote: > I don't see why it should be branded. I don't see why it should be either. I actually prefer a descriptive name. That said, I don't have a problem with using a top-level namespace per-se, in the same way that DBI itself does. > Yes. Unless I grossly misunderstood, you created a system that allowed > people to perform database operations without SQL knowledge or being > tied to a specific platform. DBIx:: seemed the right place and > Portable seemed the right name. You are correct about the intent of my system, but there is a possible advantage of my own top level (shorter module names). > Alzabo and Tangram are massive systems designed for completely taking > over implementing persistence for an object hierarchy via an RDBMS. I > tend to think of them as being portable ways of emulating an OODBMS on > an RDBMS. I can't see how they compare to what you've done. Branding > them makes sense because you really end up getting married to the > product in order to use it, and have to invest a lot of learning to get there. Thank you for this. I will use it in my reply. That said, are you willing to participate in modules@perl.org yourself? Meaning, can you quote what Tim said and send your reply or explanation to the Modules List? That would probably help my position and/or the situation there. I appreciate your time and effort. -- Darren Duncan From darren at DarrenDuncan.net Mon Jan 6 12:10:31 2003 From: darren at DarrenDuncan.net (Darren Duncan) Date: Wed Aug 4 00:11:13 2004 Subject: Module submission DBIx::Portable (fwd) Message-ID: One more thing; if you do reply to anything on modules@perl.org, then please CC my address as well since that list doesn't send copies to my mailbox. Thank you. -- Darren Duncan From darren at DarrenDuncan.net Mon Jan 6 12:46:09 2003 From: darren at DarrenDuncan.net (Darren Duncan) Date: Wed Aug 4 00:11:13 2004 Subject: Module submission DBIx::Portable Message-ID: Tim Bunce said: > Frameworks of multiple closely related modules are encouraged to > have a catchy 'brand name' at the top level rather than fit into > an existing namespace. e.g., Alzabo and Tangram. > Tim. Thanks, I appreciate the "encouragement"! (FYI, I had previously avoided making a new top level on purpose since the CPAN module guidelines said it was preferable to fit into an existing top level if possible, and only make a new one if there were no existing ones that were appropriate. And I had thought it would be presumptuous of me to assume my work was important enough to deserve its own top level, as if that was highly sought-after real-estate like top level internet domain names.) As it stands, I had already structured my module hierarchy in such a way that it could be translated to elsewhere in the namespace but keep relative consistency to itself. That is, "DBIx::Portable::PDBI"/::* can become "PDBI"/::* and "DBIx::Portable::PDBD"/::* become "PDBD"/::*. Technically, this means I would be using two top-level namespaces; however, in my mind this seems appropriate because I more or less have two distinct frameworks that use each other but are mostly separate (or as much as DBI and DBD::* are separate). I haven't thought much about branding since I usually name my modules according to their purpose or function. So it may take me time to come up with something "brandable". I welcome any suggestions from the community. The "Description" that I already posted should give a good idea of what I am going for: interface to all types of database activity or features in a completely portable, detailed level of control, and fast/efficient way. On the other hand, I don't really think that my distribution should be branded; despite anything I may have written, what I am doing is meant to be a generic way of talking to databases without knowing any SQL, so applications are portable, but do this more completely than existing abstraction solutions do. It is not meant to be anything huge and complicated like an OORDBMS emulation on top of a non-object RDBMS. If I should be using my own top-level namespace (which I don't have a problem with on its own terms), then I prefer to keep a descriptive name or acronym of such. Namely, I have been using "Portable Database Interface" which shortens to "PDBI". So, would it be okay if I used a top-level namespace of "PDBI" for my modules? Technically it is more of a coincidence that my existing "PDBI" name looks like your "DBI" name, since yours was a descriptive acronym to begin with, and not a "brand" (even if it became a defacto standard over time). So, would it be considered an infringement on your "trademark" or be bad community behaviour to use "PDBI" in the root level as my own name? I want to play nice, but I also want a descriptive name. That said, it may not be entirely inappropriate to have similar-looking names, since I organized my interface or structure similarly to that of DBI/DBD (I experimented with different ideas, and the tried-and-true general structure seems to be the best). For example, my execute_command() method is used similarly to your prepare() or execute(), except mine doesn't take a SQL string, and it is also used instead of connect(). On the other hand, perhaps an alternate abbreviation like "PortableDBI" may be more unique looking and not infringing, and in addition it would be easier to tell at a glance what it means, since "P" could mean anything. So, if the community is amicable (sp?), I would like to request "PortableDBI" as my module name to register instead of "DBIx::Portable". Or does "PDBI" actually look better? Or are there other suggestions? On a similar note, I have a question: if there was the foresight of what would happen to the name-spaces when DBI was first made, would the drivers for it still sit parallel in "DBD::*", or would they go underneath, such as in "DBI::Driver::*"? If the first option would still have been chosen, then is it reasonable for me to also use a second top-level namespace, for example of "PortableDBD" or "PDBD", since the drivers for PortableDBI are meant to be created or used or owned in the same relative way as the drivers for DBI? Thank you in advance for your feedback. -- Darren Duncan From abez at abez.ca Wed Jan 8 23:01:17 2003 From: abez at abez.ca (abez) Date: Wed Aug 4 00:11:13 2004 Subject: Next Meeting? Message-ID: Are we going to meet the week of the 20th? I wouldn't mind doing a presentation regarding multi-dispatch and/or WWW::Mechanize. abram -- abez----- ----- ------ - ------ -- ------------ http://www.abez.ca/ Abram Hindle (abez@abez.ca) --- --- ------ --------- - - ------ --------abez From nkuipers at uvic.ca Wed Jan 8 23:14:01 2003 From: nkuipers at uvic.ca (nkuipers) Date: Wed Aug 4 00:11:13 2004 Subject: Next Meeting? Message-ID: <3E1E1900@wm2.uvic.ca> Sounds good to me. I can bring along my newest Perl book to show people too. It's called Programming Perl and Computer Science: The Best of the Perl Journal, and so far it's a great read. Nathanael >===== Original Message From abez ===== >Are we going to meet the week of the 20th? > >I wouldn't mind doing a presentation regarding multi-dispatch and/or >WWW::Mechanize. > >abram > >-- >abez----- ----- ------ - ------ -- ------------ >http://www.abez.ca/ Abram Hindle (abez@abez.ca) >--- --- ------ --------- - - ------ --------abez From Peter at PSDT.com Thu Jan 9 00:44:09 2003 From: Peter at PSDT.com (Peter Scott) Date: Wed Aug 4 00:11:13 2004 Subject: Next Meeting? In-Reply-To: <3E1E1900@wm2.uvic.ca> Message-ID: <4.3.2.7.2.20030108224307.00b6e9d0@shell2.webquarry.com> At 09:14 PM 1/8/03 -0800, nkuipers wrote: >Sounds good to me. I can bring along my newest Perl book to show >people too. >It's called Programming Perl and Computer Science: The Best of the Perl >Journal, and so far it's a great read. I have a complete collection of the printed Perl Journal, if anyone's interested. >Nathanael > > >===== Original Message From abez ===== > >Are we going to meet the week of the 20th? > > > >I wouldn't mind doing a presentation regarding multi-dispatch and/or > >WWW::Mechanize. Sounds great. Pick a day. -- Peter Scott Pacific Systems Design Technologies http://www.perldebugged.com/ From Peter at PSDT.com Fri Jan 10 10:21:05 2003 From: Peter at PSDT.com (Peter Scott) Date: Wed Aug 4 00:11:13 2004 Subject: Fwd: YAPC::Canada - May 15 and 16, 2003 in Ottawa - http://www.yapc.ca/ Message-ID: <4.3.2.7.2.20030110081948.00ab3010@shell2.webquarry.com> Forwarded from the conference organizers. The "pre-conference training" is yours truly :-) >YAPC::Canada - May 15 and 16, 2003 in Ottawa - http://www.yapc.ca/ > >YAPC::Canada (Yet Another Perl Conference) is a low-cost 1 1/2 day >conference with its roots in the Perl Mongers groups. YAPC::Canada >features two speaker streams and an optional day of pre-conference training. > >The Ottawa Tulip Festival ( http://tulipfestival.ca/ ) will be in full >swing at this time. Great for spouses while you're at YAPC::Canada! > >Accomodations will are available at Carleton University residences. > >Pre-register at http://www.yapc.ca/ with no obligation and tell us: > - courses that interest you > - you would like to sponsor us > - you would like to present > - any special needs > - your ideas > >Location: Carleton University, Ottawa, Ontario > >Cost: CAD 75.00 (roughly USD 48.75) > Dinner on Thursday and Friday, and lunch on Friday included. > >Keynote: TBA > >Times: Thursday May 15, 2003 - 1:00pm to 5:30pm > Friday May 16, 2003 - 9:00am to 5:30pm > >Training: Wednesday May 14, 2003 - all day > Training is optional and is an extra fee > > >If you encounter any problems with the site or would like to contact us >directly then please write to help@yapc.ca . Peter Scott peter@psdt.com http://www.perldebugged.com From abez at abez.ca Tue Jan 14 00:01:01 2003 From: abez at abez.ca (abez) Date: Wed Aug 4 00:11:13 2004 Subject: When is the next meeting?w Message-ID: The week of the 20th when do we want to meet. I'd prefer to meet on Tuesday. We should decide soon so I can reserve a room. January 2003 Su Mo Tu We Th Fr Sa 19 20 21 22 23 24 25 -- abez----- ----- ------ - ------ -- ------------ http://www.abez.ca/ Abram Hindle (abez@abez.ca) --- --- ------ --------- - - ------ --------abez From Peter at PSDT.com Tue Jan 14 00:05:11 2003 From: Peter at PSDT.com (Peter Scott) Date: Wed Aug 4 00:11:13 2004 Subject: When is the next meeting?w In-Reply-To: Message-ID: <4.3.2.7.2.20030113220329.00aaeb80@shell2.webquarry.com> At 10:01 PM 1/13/2003 -0800, you wrote: >The week of the 20th when do we want to meet. > >I'd prefer to meet on Tuesday. Then it's yours; you were going to present, yes? >We should decide soon so I can reserve a room. > > January 2003 >Su Mo Tu We Th Fr Sa >19 20 21 22 23 24 25 -- Peter Scott peter@psdt.com http://www.perldebugged.com From abez at abez.ca Tue Jan 14 00:06:02 2003 From: abez at abez.ca (abez) Date: Wed Aug 4 00:11:13 2004 Subject: When is the next meeting?w In-Reply-To: <4.3.2.7.2.20030113220329.00aaeb80@shell2.webquarry.com> References: <4.3.2.7.2.20030113220329.00aaeb80@shell2.webquarry.com> Message-ID: Yes I was going to present. Probably about Class::MultiMethod, and WWW::Mechanize. On Mon, 13 Jan 2003, Peter Scott wrote: > At 10:01 PM 1/13/2003 -0800, you wrote: > > >The week of the 20th when do we want to meet. > > > >I'd prefer to meet on Tuesday. > > Then it's yours; you were going to present, yes? > > >We should decide soon so I can reserve a room. > > > > January 2003 > >Su Mo Tu We Th Fr Sa > >19 20 21 22 23 24 25 > > > > -- > Peter Scott > peter@psdt.com > http://www.perldebugged.com > -- abez----- ----- ------ - ------ -- ------------ http://www.abez.ca/ Abram Hindle (abez@abez.ca) --- --- ------ --------- - - ------ --------abez From nkuipers at uvic.ca Tue Jan 14 01:09:10 2003 From: nkuipers at uvic.ca (nkuipers) Date: Wed Aug 4 00:11:13 2004 Subject: When is the next meeting?w Message-ID: <3E23EA1F@wm2.uvic.ca> >>The week of the 20th when do we want to meet. >> >>I'd prefer to meet on Tuesday. sounds groovy nathanael From peter at PSDT.com Tue Jan 14 12:43:15 2003 From: peter at PSDT.com (Peter Scott) Date: Wed Aug 4 00:11:13 2004 Subject: Meeting - Tuesday Jan 21 Message-ID: <4.3.2.7.2.20030114093005.00ab9340@shell2.webquarry.com> I hereby declare that the next meeting of Victoria.pm, the Victoria Perl Mongers, will take place as follows: Date: Tuesday, January 21 Time: 7:00pm Place: McPherson Library, UVic We will gather from 6:45pm at the art gallery just inside the doors of the McPherson Library; at 7pm, we will adjourn to a conference room. We usually don't know which room that will be before the date but if you arrive late you can always look through the windows in each one's door until you see something that looks like Perl. A camel will be in evidence. Abram will probably talk about Class::MultiMethod and WWW::Mechanize. Sounds cool. I'll have the latest news on YAPC::Canada. -- Peter Scott Pacific Systems Design Technologies http://www.perldebugged.com/ From darren at DarrenDuncan.net Tue Jan 14 14:00:55 2003 From: darren at DarrenDuncan.net (Darren Duncan) Date: Wed Aug 4 00:11:13 2004 Subject: When is the next meeting?w In-Reply-To: Message-ID: On Mon, 13 Jan 2003, abez wrote: > The week of the 20th when do we want to meet. > I'd prefer to meet on Tuesday. > We should decide soon so I can reserve a room. > January 2003 > Su Mo Tu We Th Fr Sa > 19 20 21 22 23 24 25 Tuesday should work well for me too, since I have a ride on tuesday and thursday evenings, that I can get home with afterwards. -- Darren Duncan From abez at abez.ca Tue Jan 14 15:03:38 2003 From: abez at abez.ca (abez) Date: Wed Aug 4 00:11:13 2004 Subject: Meeting - Tuesday Jan 21 In-Reply-To: <4.3.2.7.2.20030114093005.00ab9340@shell2.webquarry.com> References: <4.3.2.7.2.20030114093005.00ab9340@shell2.webquarry.com> Message-ID: Actually in Cleahaue A Wing 206, I got a data projector as well. On Tue, 14 Jan 2003, Peter Scott wrote: > I hereby declare that the next meeting of Victoria.pm, the Victoria > Perl Mongers, will take place as follows: > > Date: Tuesday, January 21 > Time: 7:00pm > Place: McPherson Library, UVic > > We will gather from 6:45pm at the art gallery just inside the doors of > the McPherson Library; at 7pm, we will adjourn to a conference > room. We usually don't know which room that will be before the date > but if you arrive late you can always look through the windows in each > one's door until you see something that looks like Perl. A camel will > be in evidence. > > Abram will probably talk about Class::MultiMethod and > WWW::Mechanize. Sounds cool. I'll have the latest news on YAPC::Canada. -- abez----- ----- ------ - ------ -- ------------ http://www.abez.ca/ Abram Hindle (abez@abez.ca) --- --- ------ --------- - - ------ --------abez From Peter at PSDT.com Tue Jan 14 15:07:41 2003 From: Peter at PSDT.com (Peter Scott) Date: Wed Aug 4 00:11:13 2004 Subject: Meeting tomorrow (Tuesday) Message-ID: <4.3.2.7.2.20030114110801.00abb140@shell2.webquarry.com> Victoria.pm will meet tomorrow, Tuesday January 21, at UVic at Cleahaue A Wing 206, at 7:00pm. Abram is expected to talk about Class::MultiMethod and WWW::Mechanize. I'll have the latest news on YAPC::Canada. For those unfamiliar with UVic, see http://www.uvic.ca/maps/index.html. Parking can be found at the top centre of B3. If you don't know how to get to UVic - welcome to Victoria - see http://www.uvic.ca/maps/directions.html. -- Peter Scott Pacific Systems Design Technologies http://www.perldebugged.com/ From peter at PSDT.com Tue Jan 14 15:14:08 2003 From: peter at PSDT.com (Peter Scott) Date: Wed Aug 4 00:11:13 2004 Subject: Ignore that last one Message-ID: <4.3.2.7.2.20030114131259.00ab7100@shell2.webquarry.com> D*mn Eudora... when I modify a future queued message I don't expect it to send it immediately when I close it. Only Send should mean Send. Grrr... -- Peter Scott Pacific Systems Design Technologies http://www.perldebugged.com/ From darren at DarrenDuncan.net Tue Jan 14 15:25:03 2003 From: darren at DarrenDuncan.net (Darren Duncan) Date: Wed Aug 4 00:11:13 2004 Subject: Ignore that last one In-Reply-To: <4.3.2.7.2.20030114131259.00ab7100@shell2.webquarry.com> Message-ID: On Tue, 14 Jan 2003, Peter Scott wrote: > D*mn Eudora... when I modify a future queued message I don't expect it > to send it immediately when I close it. Only Send should mean Send. Grrr... Odd. I've never had Eudora do that to me. And I've used it for a good 5 years. -- Darren Duncan From abez at abez.ca Tue Jan 14 17:13:00 2003 From: abez at abez.ca (abez) Date: Wed Aug 4 00:11:13 2004 Subject: The Year in Scripting Languages Message-ID: Check this out. Date: 2003-Jan-14 00:00:00 To: various Subject: The Year In Scripting Languages Lua/Perl/Python/Ruby/Tcl 2002 From: Mitchell N Charity et al This is a joint review of 2002 for the programming languages Lua, Perl, Python, Ruby, and Tcl. It was a cooperative effort by people from the five communities. An HTML version is available at http://www.vendian.org/language_year/ . -- abez----- ----- ------ - ------ -- ------------ http://www.abez.ca/ Abram Hindle (abez@abez.ca) --- --- ------ --------- - - ------ --------abez From nkuipers at uvic.ca Wed Jan 15 00:09:26 2003 From: nkuipers at uvic.ca (nkuipers) Date: Wed Aug 4 00:11:13 2004 Subject: links from vic-pm website? Message-ID: <3E250F98@wm2.uvic.ca> Hey everyone, Just wanted to show you my little me-page. You can find it at http://www.csc.uvic.ca/~nkuipers/nkuipers.html If you remove the terminal nkuipers.html portion, my brood war site will pop up instead, but don't tell the csc server admins. ;) I would imagine that most if not all of us have a me-page associated with Perl in some way. Would it be a fun, appropriate thing to link them up to our pm site, sort of like a meet-the-band? Just wondering. g'night, Nathanael From Peter at PSDT.com Wed Jan 15 13:27:59 2003 From: Peter at PSDT.com (Peter Scott) Date: Wed Aug 4 00:11:14 2004 Subject: links from vic-pm website? In-Reply-To: <3E250F98@wm2.uvic.ca> Message-ID: <4.3.2.7.2.20030115112717.00b442b0@shell2.webquarry.com> At 10:09 PM 1/14/03 -0800, nkuipers wrote: >Hey everyone, > >Just wanted to show you my little me-page. You can find it at > >http://www.csc.uvic.ca/~nkuipers/nkuipers.html > >If you remove the terminal nkuipers.html portion, my brood war site will pop >up instead, but don't tell the csc server admins. ;) > >I would imagine that most if not all of us have a me-page associated >with Perl >in some way. Would it be a fun, appropriate thing to link them up to our pm >site, sort of like a meet-the-band? Good idea, done. If anyone wants to take over http://victoria.pm.org, let me know. I don't have time to do much. -- Peter Scott Pacific Systems Design Technologies http://www.perldebugged.com/ From nkuipers at uvic.ca Wed Jan 15 13:32:47 2003 From: nkuipers at uvic.ca (nkuipers) Date: Wed Aug 4 00:11:14 2004 Subject: links from vic-pm website? Message-ID: <3E25C0C4@wm2.uvic.ca> >If anyone wants to take over http://victoria.pm.org, let me know. I >don't have time to do much. I'll do it, just pass on relevant information to me. Nathanael From nkuipers at uvic.ca Fri Jan 17 15:16:37 2003 From: nkuipers at uvic.ca (nkuipers) Date: Wed Aug 4 00:11:14 2004 Subject: diddling with regexes Message-ID: <3E288654@wm2.uvic.ca> Hi everyone, A colleague of mine is annotating, by hand, DNA sequences tens of thousands of residues in length. I can't speed up the annotation per se since she needs to decide for each feature whether or not to remark on it and what to note. However I can flag the features of interest for her so that she can zoom right to them sequentially, like a pre-processing step. She needs to find all instances of the following: T-rich nonamer->12bp->heptamer with terminal GTG->15-40bp->TTYGGNNNNGGN As far as I know it is impossible to program a regex to find "T-rich" so I have to stick to simple the nonamer aspect (9 chars). A regex for this might be as follows: /\G[acgt]{25}gtg[acgt]{15,40}tt[ct]gg[acgt]{4}gg[acgt]/gi There are various optimizations I could try and different approaches like lookaround assertions but for now my concern is with \G. As far as I understand it, the \G assertion means that the /g modifier will not bump the engine to the position after the last match, thus operating like pos() in the regex and not missing overlapping instances of the pattern? This is very important, I can't miss overlaps. Do I understand correctly? Any suggestions in general for this task? Thanks muchly, Nathanael From Peter at PSDT.com Fri Jan 17 16:02:47 2003 From: Peter at PSDT.com (Peter Scott) Date: Wed Aug 4 00:11:14 2004 Subject: diddling with regexes In-Reply-To: <3E288654@wm2.uvic.ca> Message-ID: <4.3.2.7.2.20030117132900.00b5fed0@shell2.webquarry.com> At 01:16 PM 1/17/03 -0800, nkuipers wrote: >Hi everyone, > >A colleague of mine is annotating, by hand, DNA sequences tens of >thousands of >residues in length. I can't speed up the annotation per se since she >needs to >decide for each feature whether or not to remark on it and what to note. >However I can flag the features of interest for her so that she can >zoom right >to them sequentially, like a pre-processing step. She needs to find all >instances of the following: > >T-rich nonamer->12bp->heptamer with terminal GTG->15-40bp->TTYGGNNNNGGN > >As far as I know it is impossible to program a regex to find "T-rich" I don't know what you mean by that. >so I >have to stick to simple the nonamer aspect (9 chars). > >A regex for this might be as follows: > >/\G[acgt]{25}gtg[acgt]{15,40}tt[ct]gg[acgt]{4}gg[acgt]/gi > >There are various optimizations I could try and different approaches like >lookaround assertions but for now my concern is with \G. As far as I >understand it, the \G assertion means that the /g modifier will not bump the >engine to the position after the last match, thus operating like pos() in the >regex and not missing overlapping instances of the pattern? This is very >important, I can't miss overlaps. Do I understand correctly? Not quite. \G is an anchor, which means "must match the point where the previous /g match left off." Because without it, you'd have no way of saying that you want successive global matches to succeed only if there's no intervening junk. If you want to make sure that you don't miss overlapping instances, you need to ensure that pos isn't advanced past the point where one might be. Using a zero-width positive lookahead assertion should do that. I don't have time to play around with this some more so I don't know whether there's a way to avoid the kludge but check this out: [peter@tweety ~]$ perl -le '$_="abacad"; print $1 while /(a.+)/g' abacad [peter@tweety ~]$ perl -le '$_="abacad"; print $1 while /\G(a.+)/g' abacad [peter@tweety ~]$ perl -le '$_="abacad"; print "$1$2" while /(a(?=(.+)))/g' abacad acad ad -- Peter Scott Pacific Systems Design Technologies http://www.perldebugged.com/ From darren at DarrenDuncan.net Mon Jan 20 00:39:49 2003 From: darren at DarrenDuncan.net (Darren Duncan) Date: Wed Aug 4 00:11:14 2004 Subject: rewritten concise summary of my database module Message-ID: For those of you who are interested, I am working on release 0.02 of my Perl framework for database abstraction, which should be uploaded in a few days. There were large improvements. Following discussions with modules@perl.org, I have decided to name the framework and its root module "Rosetta". It uses a top-level name since that seemed the most appropriate first to Tim Bunce, and then to me also. I chose "Rosetta" because that name is symbolic for what my framework does. In retrospect, this is much better than "DBIx::Portable" ever was. Regardless, I still thank all of you who helped me out with picking the older name, and release 0.01 will live forever in the CPAN historical archives under that name. Below this letter is a copy of my module's abstract, which I wrote to be as concise as possible, basically summarizing other documentation. So it should give you an idea where I was heading, or at least much better than any old discussions, I suppose. Yes, it lacks example code; but hopefully that isn't a problem right now. Have a good day. -- Darren Duncan ---------------------------------------- The Rosetta framework is intended to support complex (or simple) database-using Perl 5 applications that are easily portable across databases because all common product-specific details are abstracted away. Rosetta is designed to natively handle (interface to or implement) a superset of generic RDBMS product features, so that you can do any action that you could before, including standard data manipulation (including complex multi-table selects or updates with subqueries or stored procedure calls), and schema manipulation (tables, views, procedures). At the same time, it is designed to do its work quickly and efficiently. The native interface of Rosetta (RNI) is unique to itself and verbose, being designed to use non-ambiguous structured definitions of all tasks; all input is multi-dimensional data structures (or objects) having atomic values, rather than strings to be parsed. It is intended primarily for a data-driven application programming model, where an application uses a "data dictionary" to control what work it is doing (whose composite values map directly). For cases where you don't already have a data dictionary, Rosetta can scan your existing database to create one. That said, Rosetta also includes emulators (which sit on RNI) for common existing database interfaces, so that most Perl applications can simply use Rosetta as a hot-swappable replacement for them; you do not have to "learn yet another language" or re-code your application in order for it to just work with more databases. Add-on utilities are also available for the likes of copying or backing up a database, or editing one through a web interface (like PHPMyAdmin but for Perl and any RDBMS). From yf110 at victoria.tc.ca Mon Jan 20 13:07:55 2003 From: yf110 at victoria.tc.ca (Malcolm Dew-Jones) Date: Wed Aug 4 00:11:14 2004 Subject: diddling with regexes In-Reply-To: <3E288654@wm2.uvic.ca> Message-ID: On Fri, 17 Jan 2003, nkuipers wrote: > Hi everyone, > > A colleague of mine is annotating, by hand, DNA sequences tens of thousands of > residues in length. I can't speed up the annotation per se since she needs to > decide for each feature whether or not to remark on it and what to note. > However I can flag the features of interest for her so that she can zoom right > to them sequentially, like a pre-processing step. She needs to find all > instances of the following: > > T-rich nonamer->12bp->heptamer with terminal GTG->15-40bp->TTYGGNNNNGGN > > As far as I know it is impossible to program a regex to find "T-rich" so I > have to stick to simple the nonamer aspect (9 chars). > I do not understand this. > A regex for this might be as follows: > > /\G[acgt]{25}gtg[acgt]{15,40}tt[ct]gg[acgt]{4}gg[acgt]/gi > > There are various optimizations I could try and different approaches like > lookaround assertions but for now my concern is with \G. As far as I > understand it, the \G assertion means that the /g modifier will not bump the > engine to the position after the last match, thus operating like pos() in the > regex and not missing overlapping instances of the pattern? This is very I think the opposite is true (and \G makes no difference) , plus \G prevents the regex from continuing past sections that don't match, because the regex is anchored to where it left off. The simplist way to ensure that overlaps are found is to restart the regex at exactly one character past the start of the last match The following example shows what I mean #!perl # find all occurences of two digits, include overlaps $_ = '11111 22222 33333 44444 55555'; while (m/(\d\d)/g) { print "pos=",pos()," \$1=$1, \$` \$& \$' =[$`][$&][$']\n"; # # backup almost to the start of the thing that just matched # pos = pos() - length($&) + 1; } You can easily see the effect of \G by putting it into the m// above while (m/\G(\d\d)/g) (the regex will stop at the first blank). If you comment out the pos= assignment then you'll see that the regex match misses the overlaps. I don't know more about what you're matching to give a more specific example. From Peter at PSDT.com Mon Jan 20 03:14:00 2003 From: Peter at PSDT.com (Peter Scott) Date: Wed Aug 4 00:11:14 2004 Subject: Meeting tomorrow (Tuesday) Message-ID: <4.3.2.7.2.20030114131421.00b3b6c0@shell2.webquarry.com> Victoria.pm will meet tomorrow, Tuesday January 21, at UVic at Cleahaue A Wing 206, at 7:00pm. Abram is expected to talk about Class::MultiMethod and WWW::Mechanize. I'll have the latest news on YAPC::Canada. For those unfamiliar with UVic, see http://www.uvic.ca/maps/index.html. Parking can be found at the top centre of B3. If you don't know how to get to UVic - welcome to Victoria - see http://www.uvic.ca/maps/directions.html. -- Peter Scott Pacific Systems Design Technologies http://www.perldebugged.com/ From abez at abez.ca Mon Jan 20 23:37:35 2003 From: abez at abez.ca (abez) Date: Wed Aug 4 00:11:14 2004 Subject: Meeting tomorrow (Tuesday) In-Reply-To: <4.3.2.7.2.20030114131421.00b3b6c0@shell2.webquarry.com> References: <4.3.2.7.2.20030114131421.00b3b6c0@shell2.webquarry.com> Message-ID: Simple instructions how to get there. Go to the library on campus like we usually have done. If your back is facing the library doors and you're looking at the fountain Clearihue building is on your right. It's got a big clock on it which I doubt actually works. >From the library you can see a bunch of bikes on a bike rack at clearihue walk to the bike racks and you'll see some doors. Go inside clearihue straight ahead should be the computer labs and there should be a set of doors on the left which go upstairs. Go through the doors and go upstairs. Once you see a pair of doors at the immediate top of the stairs go in. This hallway has one or two doors labelled "A206", that's where you're supposed to be. If you really are stuck just hassle a student walking by. lame ASCII map fountain | Clearihue | doors +---==+ +------+ +-===-+ |library | bikes | | | |-----+ | | stairs abram On Mon, 20 Jan 2003, Peter Scott wrote: > Victoria.pm will meet tomorrow, Tuesday January 21, at UVic at Cleahaue > A Wing 206, at 7:00pm. > > Abram is expected to talk about Class::MultiMethod and > WWW::Mechanize. I'll have the latest news on YAPC::Canada. > > For those unfamiliar with UVic, see > http://www.uvic.ca/maps/index.html. Parking can be found at the top > centre of B3. If you don't know how to get to UVic - welcome to > Victoria - see http://www.uvic.ca/maps/directions.html. > -- > Peter Scott > Pacific Systems Design Technologies > http://www.perldebugged.com/ > -- abez----- ----- ------ - ------ -- ------------ http://www.abez.ca/ Abram Hindle (abez@abez.ca) --- --- ------ --------- - - ------ --------abez From darren at DarrenDuncan.net Tue Jan 21 11:53:31 2003 From: darren at DarrenDuncan.net (Darren Duncan) Date: Wed Aug 4 00:11:14 2004 Subject: Meeting tomorrow (Tuesday) In-Reply-To: Message-ID: On Mon, 20 Jan 2003, abez wrote: > lame ASCII map > > fountain | Clearihue > | doors > +---==+ > +------+ +-===-+ > |library | bikes | > | | |-----+ > | | stairs No, not lame. I was able to understand it immediately. Much faster than the text led me to learn. -- Darren Duncan From nkuipers at uvic.ca Wed Jan 22 13:16:17 2003 From: nkuipers at uvic.ca (nkuipers) Date: Wed Aug 4 00:11:14 2004 Subject: criticisms, comments on newest module please Message-ID: <3E2F0C28@wm2.uvic.ca> Hi everyone, First of all, I know everyone is busy, and that taking the time to critique a newby module is a bit of a hassle, so it's not a problem if I get no responses. But since one of my goals this year is to improve my module writing skills, I figure that it is valuable to me to have peers review my work. I'm not after criticism of the "what" (which will undoubtedly be fleshed out as new functionality occurs to me) so much as the "how" and "why", the style, the housekeeping within the module, etc. Any comments or suggestions are greatly appreciated. I'll roll out documentation when the technical aspects are satisfactory, of course. Thanks, Nathanael -------------- next part -------------- A non-text attachment was scrubbed... Name: Annotate.pm Type: application/octet-stream Size: 2793 bytes Desc: not available Url : http://mail.pm.org/archives/victoria-pm/attachments/20030122/5a8d1685/Annotate.obj From darren at DarrenDuncan.net Wed Jan 22 13:50:31 2003 From: darren at DarrenDuncan.net (Darren Duncan) Date: Wed Aug 4 00:11:14 2004 Subject: criticisms, comments on newest module please In-Reply-To: <3E2F0C28@wm2.uvic.ca> Message-ID: On Wed, 22 Jan 2003, nkuipers wrote: > First of all, I know everyone is busy, and that taking the time to critique a > newby module is a bit of a hassle, so it's not a problem if I get no > responses. But since one of my goals this year is to improve my module > writing skills, I figure that it is valuable to me to have peers review my > work. I'm not after criticism of the "what" (which will undoubtedly be > fleshed out as new functionality occurs to me) so much as the "how" and "why", > the style, the housekeeping within the module, etc. Any comments or > suggestions are greatly appreciated. I'll roll out documentation when the > technical aspects are satisfactory, of course. At first glance the module looks quite satisfactory, although I don't know much about what it is supposed to do. I can look more closely at it during the following few days, but at the moment I can offer these suggestions: - Put the "use strict" pragma above *all* lines in the file, except the "package" line. - Instead of saying "[action] if/unless [condition]", say either "if/unless ( [condition] ) { [action] }" or "[condition] and/or [action]". I find code much easier to understand if the cause comes before the effect, even if Perl supports the other approach as well. - Do not export any symbols into the caller's namespace. Since you are already using objects, just let the caller say "Classname->func()" or "$object->method()". This makes calling code easier to understand, and your functions or methods won't conflict with any that the caller declares themselves. Besides, in order for the caller to use the exported function names in the way that exporting provides, they would have to say "function( $obj, @args )" rather than "$obj->function( @args )". That's all I can say for the moment. Hope this helps. -- Darren Duncan From Peter at PSDT.com Wed Jan 22 14:03:04 2003 From: Peter at PSDT.com (Peter Scott) Date: Wed Aug 4 00:11:14 2004 Subject: criticisms, comments on newest module please In-Reply-To: References: <3E2F0C28@wm2.uvic.ca> Message-ID: <4.3.2.7.2.20030122115032.00b38740@shell2.webquarry.com> At 11:50 AM 1/22/03 -0800, Darren Duncan wrote: >On Wed, 22 Jan 2003, nkuipers wrote: > > First of all, I know everyone is busy, and that taking the time to > critique a > > newby module is a bit of a hassle, so it's not a problem if I get no > > responses. But since one of my goals this year is to improve my module > > writing skills, I figure that it is valuable to me to have peers review my > > work. I'm not after criticism of the "what" (which will undoubtedly be > > fleshed out as new functionality occurs to me) so much as the "how" > and "why", > > the style, the housekeeping within the module, etc. Any comments or > > suggestions are greatly appreciated. I'll roll out documentation when the > > technical aspects are satisfactory, of course. > >At first glance the module looks quite satisfactory, although I don't know >much about what it is supposed to do. I can look more closely at it >during the following few days, but at the moment I can offer these >suggestions: > >- Put the "use strict" pragma above *all* lines in the file, except the >"package" line. Agreed. Ditto "use warnings", unless the main program uses -w. I've taken to "use warnings" everywhere so I can selectively disable them where necessary. >- Instead of saying "[action] if/unless [condition]", say either >"if/unless ( [condition] ) { [action] }" or "[condition] and/or >[action]". I find code much easier to understand if the cause comes >before the effect, even if Perl supports the other approach as well. Just as another point of view :-) perlstyle makes the IMHO valid point that On the other hand print "Starting analysis\n" if $verbose; is better than $verbose && print "Starting analysis\n"; because the main point isn't whether the user typed -v or not. I follow that style. When I want the test to precede the action I use 'and', viz: $nuts > 0 and hibernate(); I have a convention of using or/and for things that I think of as changing the flow of control and ||/|| where I want to use the result of the expression. >- Do not export any symbols into the caller's namespace. Since you are >already using objects, just let the caller say "Classname->func()" or >"$object->method()". This makes calling code easier to understand, and >your functions or methods won't conflict with any that the caller declares >themselves. Besides, in order for the caller to use the exported function >names in the way that exporting provides, they would have to say >"function( $obj, @args )" rather than "$obj->function( @args )". Totally agree. Especially since the convention is that methods beginning with _ are private and you've exported some of those too. Your AUTOLOAD is redundant. You might consider using it for the accessors, though, viz : sub AUTOLOAD { (my $meth = our $AUTOLOAD) =~ s/.*:://; # Untested {id => 1, desc => 1, seq => 1}->{$meth} and return $_[0]->{$meth}; carp "Called undefined subroutine \"$meth\""; } Then you can get rid of the id, desc, seq subs... -- Peter Scott Pacific Systems Design Technologies http://www.perldebugged.com/ From nkuipers at uvic.ca Wed Jan 22 14:28:21 2003 From: nkuipers at uvic.ca (nkuipers) Date: Wed Aug 4 00:11:14 2004 Subject: criticisms, comments on newest module please Message-ID: <3E2EFF09@wm2.uvic.ca> >sub AUTOLOAD { > (my $meth = our $AUTOLOAD) =~ s/.*:://; # Untested > {id => 1, desc => 1, seq => 1}->{$meth} and return $_[0]->{$meth}; > carp "Called undefined subroutine \"$meth\""; >} A couple of questions here. First, is it common practice to catch accessor methods with AUTOLOAD()? Second, I'm not familiar with the {id=>1,...}->{$meth} notation. Is this effectively the same as my %validcalls = (id=>1,desc=>1,seq=>1); $validcalls{$meth} ? return $_[0]->$meth : carp ...; Thanks, Nathanael From nkuipers at uvic.ca Wed Jan 22 14:38:24 2003 From: nkuipers at uvic.ca (nkuipers) Date: Wed Aug 4 00:11:14 2004 Subject: multiple dispatch in Perl Message-ID: <3E2F0491@wm2.uvic.ca> For anyone, including and likely only myself, interested in more information on this subject, there is an article by Damian Conway in The Perl Journal somewhere. I bring it up because I discovered it in my book "Computer Science and Perl Programming: The Best of The Perl Journal", which doesn't include the original TPJ citations. ;) He discusses three methods for multiple dispatch: "tests-in-methods", a table, and dynamic dispatch tables. And of course, Class::Multimethods is near the end. Cheers, and thanks to Abram once again for his presentation last night, Nathanael From peter at PSDT.com Wed Jan 22 14:42:33 2003 From: peter at PSDT.com (Peter Scott) Date: Wed Aug 4 00:11:14 2004 Subject: multiple dispatch in Perl In-Reply-To: <3E2F0491@wm2.uvic.ca> Message-ID: <4.3.2.7.2.20030122124145.00b3c2d0@shell2.webquarry.com> At 12:38 PM 1/22/03 -0800, nkuipers wrote: >Cheers, and thanks to Abram once again for his presentation last night, I'll echo that. Superb job. Those of you who weren't there, it was a high quality presentation with excellent slides. -- Peter Scott Pacific Systems Design Technologies http://www.perldebugged.com/ From peter at PSDT.com Wed Jan 22 14:45:44 2003 From: peter at PSDT.com (Peter Scott) Date: Wed Aug 4 00:11:14 2004 Subject: criticisms, comments on newest module please In-Reply-To: <3E2EFF09@wm2.uvic.ca> Message-ID: <4.3.2.7.2.20030122124239.00b41ad0@shell2.webquarry.com> At 12:28 PM 1/22/03 -0800, nkuipers wrote: > >sub AUTOLOAD { > > (my $meth = our $AUTOLOAD) =~ s/.*:://; # Untested > > {id => 1, desc => 1, seq => 1}->{$meth} and return $_[0]->{$meth}; > > carp "Called undefined subroutine \"$meth\""; > >} > >A couple of questions here. First, is it common practice to catch accessor >methods with AUTOLOAD()? More or less. There are various modules that encapsulate this for you, and they add the trick that once a method is called, they instantiate an actual subroutine to do that job so the next time it's called it goes straight to the real method. Like to see Java or C++ do that... >Second, I'm not familiar with the >{id=>1,...}->{$meth} notation. Is this effectively the same as > >my %validcalls = (id=>1,desc=>1,seq=>1); >$validcalls{$meth} ? return $_[0]->$meth : carp ...; Yep. Here's how to read it: got an arrow, so there's dereferencing. Right hand side is {}, so left hand side must be reference to hash. And indeed it is, to an anonymous hash. Nothing you haven't seen before. -- Peter Scott Pacific Systems Design Technologies http://www.perldebugged.com/ From abez at abez.ca Wed Jan 22 17:04:53 2003 From: abez at abez.ca (abez) Date: Wed Aug 4 00:11:14 2004 Subject: Inheritance Message-ID: here's a good article on inheritance and how it should be used: http://archive.eiffel.com/doc/manuals/technology/oosc/ACROBAT/inh-m6fs.pdf Warning it's 55+ pages and it's written for eiffel. But it covers the 12 main cases when to use inheritance. -- abez----- ----- ------ - ------ -- ------------ http://www.abez.ca/ Abram Hindle (abez@abez.ca) --- --- ------ --------- - - ------ --------abez From peter at PSDT.com Thu Jan 23 20:31:06 2003 From: peter at PSDT.com (Peter Scott) Date: Wed Aug 4 00:11:14 2004 Subject: perl.com catches up with victoria.pm Message-ID: <4.3.2.7.2.20030123182934.00b54830@shell2.webquarry.com> One day after Abram's talk on WWW::Mechanize, perl.com follows in his footsteps and publishes their own article: http://www.perl.com/pub/a/2003/01/22/mechanize.html We're on the cutting edge! -- Peter Scott Pacific Systems Design Technologies http://www.perldebugged.com/ From abez at abez.ca Thu Jan 23 20:59:34 2003 From: abez at abez.ca (abez) Date: Wed Aug 4 00:11:14 2004 Subject: perl.com catches up with victoria.pm In-Reply-To: <4.3.2.7.2.20030123182934.00b54830@shell2.webquarry.com> References: <4.3.2.7.2.20030123182934.00b54830@shell2.webquarry.com> Message-ID: That's somewhat funny. They give a good example of automating the banking. I like the idea of using the HTML Tokenizer. I presented my OOP Perl lecture to the rest of my software engineering 430 class. It went pretty well, one person said , "Why would you program OO in a scripting language it's so slow especially for the web.". I then informed them that Mod_perl's performance is 4th of all the apache modules, being beaten by mod_html and C and mod_ssi.. So speed with OO really isn't much of an issue. He pulled out the PHP card and claimed he made a comparison between Perl and PHP and PHP was faster. I told him he was using CGI instead of mod_perl and CGI is slower. It was good. Some people got to see the cool features that perl has to offer. abram On Thu, 23 Jan 2003, Peter Scott wrote: > One day after Abram's talk on WWW::Mechanize, perl.com follows in his > footsteps and publishes their own article: > http://www.perl.com/pub/a/2003/01/22/mechanize.html > > We're on the cutting edge! > -- > Peter Scott > Pacific Systems Design Technologies > http://www.perldebugged.com/ > -- abez----- ----- ------ - ------ -- ------------ http://www.abez.ca/ Abram Hindle (abez@abez.ca) --- --- ------ --------- - - ------ --------abez From darren at DarrenDuncan.net Thu Jan 23 21:56:23 2003 From: darren at DarrenDuncan.net (Darren Duncan) Date: Wed Aug 4 00:11:14 2004 Subject: perl.com catches up with victoria.pm In-Reply-To: <4.3.2.7.2.20030123182934.00b54830@shell2.webquarry.com> Message-ID: On Thu, 23 Jan 2003, Peter Scott wrote: > One day after Abram's talk on WWW::Mechanize, perl.com follows in his > footsteps and publishes their own article: > http://www.perl.com/pub/a/2003/01/22/mechanize.html > We're on the cutting edge! HA! Funny you should mention this, because I just went to Perl.com 5 minutes ago and saw the same article for myself. At first I thought it was even written by someone at our meeting. But the point is, I only saw *your* message on this matter because I opened my email client for the sole purpose of telling victoria-pm that I saw the perl.com article. Small world, eh? -- Darren Duncan From abez at abez.ca Thu Jan 23 22:37:12 2003 From: abez at abez.ca (abez) Date: Wed Aug 4 00:11:14 2004 Subject: GD.pm Message-ID: Wow! Previously I've strung things together using pipes and the netpbm packages so I could do things like png2pnm $file | pnmscale -width 640 -height 480 | cjpeg > $file.jpg So this got slow, tedious and tired. I then downloaded the latest version of Gd installed the library. then I went and got CPAN to install GD for Perl. Then I made this script: #!/usr/bin/perl use GD; use strict; my $WIDTH = 640; my $HEIGHT = 480; foreach my $file (<*.jpg>) { print "Converting $file\n"; my $image = GD::Image->newFromJpeg($file,1); my ($iw,$ih) = $image->getBounds(); if ($ih > $iw) { print "\tRotating $file\n"; $image = $image->copyRotate90(); ($iw,$ih) = $image->getBounds(); } my $imageout = GD::Image->new($WIDTH,$HEIGHT,my $truecolor=1); $imageout->copyResized($image,my $dstX=0,my $dstY=0,my $srcX=0, my $srcY=0,$WIDTH,$HEIGHT,$iw,$ih); print "\tWriting $file\n"; open(FILE,">./tmp/".$file) or next; binmode FILE; print FILE $imageout->jpeg; close(FILE); } I load all the jpegs in a directory, if they are taller than they are wide I rotate them 90 degrees, then I resize the image down to 640x480 (no I don't need to maintain aspect ratio). and write it out to a jpeg. So this script parsed about 80,000 images in about 4 hours. 20000 images an hour. so about 5 per second. That was pretty good. Oh and this was running in the background at the lowest priority so it wasn't the most important job. I'm just really impressed I can write a script in 10 minutes using a library just ten minutes after downloading the thing. These GD libs are really neat.. I doubt I'll use netpbm much anymore. -- abez----- ----- ------ - ------ -- ------------ http://www.abez.ca/ Abram Hindle (abez@abez.ca) --- --- ------ --------- - - ------ --------abez From darren at DarrenDuncan.net Mon Jan 27 22:40:05 2003 From: darren at DarrenDuncan.net (Darren Duncan) Date: Wed Aug 4 00:11:14 2004 Subject: perl win32::ole question In-Reply-To: <5044125429.20030127200531@users.sourceforge.net> References: <5044125429.20030127200531@users.sourceforge.net> Message-ID: Hello Andrew. P.S. This message is CCd to victoria-pm@pm.org, which is a newish local Perl users group (that also meets in person). This is a good place to discuss questions or interesting topics, as more people can see them. But don't send anything there without subscribing to the list first (see http://victoria.pm.org for instructions). Please tell the other students about it if you can, as we could always use more people here. I see that Darrell is putting you through all sorts of interesting assignments such as I never had to do when I was a student. But if this Win32::OLE assignment is any example, it seems to be good to get stretched in ways that just doing core language based assignments (like text file processing) would never go. The thousands of CPAN modules are good for this. Doubtless you will get a GD assignment soon for drawing a map using GPS data, if not already. I have never used Win32::OLE before, but I did a quick Google search, and following several tries I got something that might be what you need: http://www.ngbdigital.com/perl_ole_word.html Note that the line containing just "Word" looks like a comment but it doesn't have the # in front; probably a typo. I found this with a Google search of "Win32::OLE Application.Word" or something like that. Generally speaking, you have to realize that Win32::OLE is mostly a Perl interface to a different programming language, so beyond the basic documentation in Win32::OLE itself for how to use the interface, it would help just to read up on OLE. But the above example should get you a good way there. Have a good day. -- Darren Duncan Your letter said: >Dear Darren, > >Dr Wick (Camosun) mentioned I should ask you a perl question we were >stuck on. > >I'm trying to write an application that creates custom brochures from >a template word document and from form inputs (web based). CPAN's Win32::OLE >module has helped in terms of opening, saving, and adding formatted text; >but I'm looking for any way to replace phrases in the template with values >from the web form. > >Do you have any ideas on how to do the search/replace with OLE? > >Thank-you > >Andrew >mailto:andrewd@users.sourceforge.net >icq: 191875245 From darren at DarrenDuncan.net Mon Jan 27 22:41:46 2003 From: darren at DarrenDuncan.net (Darren Duncan) Date: Wed Aug 4 00:11:14 2004 Subject: Another link for the website. Message-ID: Whomever is updating the Victoria.pm website at the moment, would you please add my website to the link list of members at the bottom. It is "http://www.DarrenDuncan.net". Thanks muchly. -- Darren Duncan From nkuipers at uvic.ca Thu Jan 30 15:12:11 2003 From: nkuipers at uvic.ca (nkuipers) Date: Wed Aug 4 00:11:14 2004 Subject: recursion Message-ID: <3E39B456@wm2.uvic.ca> Hello all, In Java class today the instructor introduced recursion. He coded up a very simple program expressed in pseudocode as follows: method printme with arg int if int not equal to 0 { printme (int-1) } print int The fact that this program with initial input of 7 printed 1 through 7 in that order blew my mind, and although I came to a recognition of what was happening, I can't say I truly understand it and certainly in a more complex recursion I'd be hooped. Now, of the three concepts he told us we need to understand (base case, progress), the third was the oddest, and, he said, the trickiest, and that was simply that you have to believe it will work. He also said that it's critical to sit down in front of a computer and play with stuff like this. Since Perl is more native to my mind, I'd like to do my conceptual playing in Perl, and then I expect it'll be fairly easy to implement these concepts in Java. My question then is what is the best way to approach recursion in general, with a slant to Perl. Hints on good explanatory references? Examples? Mindsets? Anything appreciated. I've also done a supersearch at perlmonks and am scanning the nodes returned. Thanks, Nathanael From yf110 at victoria.tc.ca Thu Jan 30 15:58:08 2003 From: yf110 at victoria.tc.ca (Malcolm Dew-Jones) Date: Wed Aug 4 00:11:14 2004 Subject: recursion In-Reply-To: <3E39B456@wm2.uvic.ca> Message-ID: On Thu, 30 Jan 2003, nkuipers wrote: > Hello all, > > In Java class today the instructor introduced recursion. He coded up a very > simple program expressed in pseudocode as follows: > > method printme with arg int > if int not equal to 0 { printme (int-1) } > print int > > The fact that this program with initial input of 7 printed 1 through 7 in that > order blew my mind, and although I came to a recognition of what was > happening, I can't say I truly understand it and certainly in a more complex > recursion I'd be hooped. Now, of the three concepts he told us we need to > understand (base case, progress), the third was the oddest, and, he said, the > trickiest, and that was simply that you have to believe it will work. I wouldn't take this on faith. Simply write down the steps of the procedure and you'll see it works. Or more easily, just save the following and run it. It will print the steps as it runs them, and why. #!perl sub printme { my $i = $_[0]; my $nice_indent = ' 'x(10-$i); print $nice_indent , "printme called with $i\n"; if ($i > 0) { print $nice_indent , "$i > 0 so calling printme(",$i-1,")\n"; printme($i-1); }else { print $nice_indent , "$i == 0 so DONT call printme\n"; } print $nice_indent , "about to run next line of the printme ", "called with $i\n"; print "=> $i\n"; } printme(7); __END__ and sure enough, the numbers are printed in the order 0 1 2 3 4 5 6 7 From darren at DarrenDuncan.net Thu Jan 30 16:04:38 2003 From: darren at DarrenDuncan.net (Darren Duncan) Date: Wed Aug 4 00:11:14 2004 Subject: recursion In-Reply-To: <3E39B456@wm2.uvic.ca> Message-ID: Essentially, recursion is where a method or function calls itself. If this is done without conditions, it is like an endless loop, except this one will cause you to run out of memory quickly. So all recursive functions that work take arguments, and when that function calls itself, it calls itself with a different argument than it was called with itself; a simple example is to take its own argument and subtract one, and call itself with the result. Moreover, the call to itself is always conditional, such as if the passed number is less than or equal to zero, then don't call itself. This is a perl version of the Java example: On Thu, 30 Jan 2003, nkuipers wrote: > method printme with arg int > if int not equal to 0 { printme (int-1) } > print int sub printme { my ($int) = @_; $int <= 0 or printme( $int-1 ); print $int; } Note that the call to itself happens before the print, which means that the last call to printme prints first, with subsequently earlier ones printing next. Hence, if the function is first called with a '7', then that 7 is the last value to be printed. If you want a good example of where recursion is actually useful, try writing a simple Perl function which takes a reference to an arbitrarily complex multi-dimensional Perl data structure as an input and outputs a serialized representation, such as a string that can be eval'd to produce the original data structure. I have written one that handles scalars, arrays, and hashes, properly differentiating undef, and it is less than 10 lines long (pretty-printed). When you have done, post your resulting function on this list, and I'll do mine. -- Darren Duncan From darren at DarrenDuncan.net Thu Jan 30 16:07:17 2003 From: darren at DarrenDuncan.net (Darren Duncan) Date: Wed Aug 4 00:11:14 2004 Subject: recursion In-Reply-To: <3E39B456@wm2.uvic.ca> Message-ID: As an addendum to my previous homework assignment, make the serialized string pretty-printed, for extra points. -- Darren Duncan From darren at DarrenDuncan.net Thu Jan 30 16:34:21 2003 From: darren at DarrenDuncan.net (Darren Duncan) Date: Wed Aug 4 00:11:14 2004 Subject: February meeting Message-ID: I'm just letting you know in advance that I will be unavailable for 2 weeks in february, between Feb 8 and Feb 23; during the second week I will be in Ontario, and in the first week I will be in Victoria but not have a ride home after 5pm. So, either the first week or the last week of February would work best for me for a meeting. -- Darren Duncan From darren at DarrenDuncan.net Thu Jan 30 16:39:02 2003 From: darren at DarrenDuncan.net (Darren Duncan) Date: Wed Aug 4 00:11:14 2004 Subject: another large update to my module on CPAN Message-ID: For those who are interested, on monday night I uploaded Rosetta-0.02, which is almost twice as large (c80K) as DBIx-Portable-0.01 (c55K). It is still all documentation. Also, as mentioned briefly at our last meeting, the newer module is officially registered. I don't plan to do any significant updates until after I return from Ontario, at the end of February, although there may be a smaller update in the next couple weeks. -- Darren Duncan From peter at PSDT.com Thu Jan 30 16:40:39 2003 From: peter at PSDT.com (Peter Scott) Date: Wed Aug 4 00:11:14 2004 Subject: recursion In-Reply-To: <3E39B456@wm2.uvic.ca> Message-ID: <4.3.2.7.2.20030130142907.00abfa10@shell2.webquarry.com> At 01:12 PM 1/30/03 -0800, nkuipers wrote: >In Java class today the instructor introduced recursion. He coded up a very >simple program expressed in pseudocode as follows: > >method printme with arg int >if int not equal to 0 { printme (int-1) } >print int > >The fact that this program with initial input of 7 printed 1 through 7 >in that >order blew my mind, and although I came to a recognition of what was >happening, I can't say I truly understand it and certainly in a more complex >recursion I'd be hooped. Now, of the three concepts he told us we need to >understand (base case, progress), the third was the oddest, and, he said, the >trickiest, and that was simply that you have to believe it will >work. He also >said that it's critical to sit down in front of a computer and play >with stuff >like this. Since Perl is more native to my mind, I'd like to do my >conceptual >playing in Perl, and then I expect it'll be fairly easy to implement these >concepts in Java. > >My question then is what is the best way to approach recursion in general, >with a slant to Perl. I confess I am unable to fathom the modern approach to teaching CS. Why they teach O-O before or instead of procedural or structured programming is beyond me. Why they make it so hard to understand the basic concepts of stack frames and parameter passing likewise. Recursion is extremely easy to understand when you look at it in terms of stack frames. Why they have to make it so difficult to follow that you have to take it on faith is... well, you get the picture. Here, try this: fact(5); sub fact { my $arg = shift; $arg < 2 and return 1; return $arg * fact($arg - 1); } Run that under the debugger and s(tep) through it, periodically hitting T for stack trace. To make it a bit plainer, let's make a version that allows us to trace the percolation back up: fact(5); sub fact { my $arg = shift; $arg < 2 and return 1; my $res = $arg * fact($arg - 1); return $res; } Do that and in addition to s, T, do x $res when stopped at the second return. -- Peter Scott Pacific Systems Design Technologies http://www.perldebugged.com/ From peter at PSDT.com Thu Jan 30 18:39:38 2003 From: peter at PSDT.com (Peter Scott) Date: Wed Aug 4 00:11:14 2004 Subject: recursion Message-ID: <4.3.2.7.2.20030130163851.00b1d3f0@shell2.webquarry.com> Of course, no introduction to recursion would be complete without the canonical reference: http://catb.org/~esr/jargon/html/entry/recursion.html -- Peter Scott Pacific Systems Design Technologies http://www.perldebugged.com/