From grantm at web.co.nz Wed Apr 26 20:42:33 2000 From: grantm at web.co.nz (Grant McLean) Date: Thu Aug 5 00:24:05 2004 Subject: Perl Mongers Meeting Next Wednesday Message-ID: <416EBC605EBED111A31A08002B9F4B362473E0@scarab.lq.web.co.nz> Doesn't time fly ... Meeting: Wellington Perl Mongers Start Time: 5:30pm Wednesday 3rd May Location: The Web Limited Level 8, 86 Lambton Quay At this point, there's nothing specific on the agenda so if anyone has something Perlish they'd like to talk about then please let me (and the list) know. Ewen had offered to talk on state machines/code generation, or parsing SGML/XML. (Is that offer still open Ewen?) The group therapy session is probably worth doing again (although without my characteristic bully-boy tactics). If you'd like to participate, put your thinking caps on to come up with an interesting question or answer. Other than that, what would *you* like to see covered? Think about this (but not too long) and reply to the list. I'm sure some people would be interested in more basic-intermediate level topics while others are hanging out for more advanced topics. Don't be afraid to suggest a topic even if you don't feel qualified to talk about it yourself. Regards Grant ===================================================================== Grant McLean | email: grantm@web.co.nz | Lvl 8, 86 Lambton Quay The Web Limited | WWW: www.web.co.nz | PO Box 15-175 Internet Solutions | Tel: (04) 495 8250 | Wellington Awesome service | Fax: (04) 495 8259 | New Zealand From ewen at naos.co.nz Thu Apr 27 00:00:46 2000 From: ewen at naos.co.nz (Ewen McNeill) Date: Thu Aug 5 00:24:05 2004 Subject: Perl Mongers Meeting Next Wednesday In-Reply-To: Your message of "Thu, 27 Apr 2000 13:42:33 +1200." <416EBC605EBED111A31A08002B9F4B362473E0@scarab.lq.web.co.nz> Message-ID: <200004270500.RAA16948@pagoda.wgtn.naos.co.nz> In message <416EBC605EBED111A31A08002B9F4B362473E0@scarab.lq.web.co.nz>, Grant McLean writes: >Ewen had offered to talk on state machines/code generation, or >parsing SGML/XML. (Is that offer still open Ewen?) Providing I know which of those topics people are more interested in, _and_ I know before the weekend that I'm definitely doing it. (It gives me some time to figure out what I'm actually going to say, because next week is going to be Rather Busy (tm)). >The group therapy session is probably worth doing again (although >without my characteristic bully-boy tactics). :-) Ewen From dan.morrison at vuw.ac.nz Thu Apr 27 01:06:41 2000 From: dan.morrison at vuw.ac.nz (Dan Morrison) Date: Thu Aug 5 00:24:05 2004 Subject: Perl Mongers Meeting Next Wednesday - dans waffling In-Reply-To: <200004270500.RAA16948@pagoda.wgtn.naos.co.nz> Message-ID: > Grant McLean writes: > >Ewen had offered to talk on state machines/code generation, or > >parsing SGML/XML. (Is that offer still open Ewen?) > > Providing I know which of those topics people are more interested in, Parsing XML is dull, (with the odd bit of stress thrown in by character entities). Validating it is more challenging. Actually _USING_ XML would be interesting. I've been doing serious XSL stuff with XML::XSLT (My stylesheet is a Turing machine!) and would like to see what anyone else has actually achieved. I'm unsure what 'state machines/code generation' would entail, therefore it my be even more instructive to me. I have visions in my head of 'life' and 'core wars'. Am I on the right track? If so these topics would cover the two extreme ends of the 'Information Age', timeline-wise ;-) I've failed to turn up the last two times, but I'll try harder if there's some XML to be seen. And as for group therapy - my question is: When is it correct to subclass an object and end up with all its baggage, and when is it better to create a new object that contains little more than a handle and accessors to an instance of your desired object? In the second case, what are the gotchas with AUTOLOAD? Case in point : I've subclassed XML::Document into XML::Sitemap(my own pm), as I like being able to manipulate the heirachical structure directly, yet I've added functions like 'spider', 'summarize-site' and serialization and rendering to it. I feel there's something inelegant about this, but I don't know what. I thought it was using inheiritance efficiently, but it seems to be muddying the waters (Not least because I've now come across modules that check (ref $obj eq "XML::Document") and not (obj->isa("XML::Document")) Arrg. ) ... sorry, I guess I should write this on a bit of paper next week, but now I finally figured out what my burning Perl issue of the day was, I had to share. .dan. From ewen at naos.co.nz Thu Apr 27 04:03:52 2000 From: ewen at naos.co.nz (Ewen McNeill) Date: Thu Aug 5 00:24:05 2004 Subject: Perl Mongers Meeting Next Wednesday - dans waffling In-Reply-To: Your message of "Thu, 27 Apr 2000 18:06:41 +1200." Message-ID: <200004270903.VAA18264@pagoda.wgtn.naos.co.nz> In message , "Dan Morrison" writes: >> Grant McLean writes: >> >Ewen had offered to talk on state machines/code generation, or >> >parsing SGML/XML. (Is that offer still open Ewen?) > >Parsing XML is dull, (with the odd bit of stress thrown in by character >entities). >Validating it is more challenging. >Actually _USING_ XML would be interesting. Parsing SGML is hard enough that I've never actually done it myself; what I've done is used nsgmls (written by James Clark) and sgmlspm (a perl module that reads ESIS and does call backs, in effect) to handle SGML data. Since XML is SGML with lots of restrictions and IIRC both nsgmls and sgmlspm will handle those restrictions I think it'd probably work for XML too. I've used this combination and some perl scripting to do things like my CV (with the ability to highlight skills, turn into multiple formats (well print and HTML at present), etc), and timesheeting/invoicing. The work I've done with XML to date has largely been with the iMatix GSL tool (see http://www.imatix.com/ if you want to know more -- it's free/open source), but that's a C-based tool so is somewhat off topic. (I should disclaim that I pretty much am iMatix New Zealand -- the NZ offshoot of iMatix -- so I don't wish to push it here.) I'm happy to talk about this SGML stuff if anyone cares; I've found it useful, but maybe the more XML-specific tools are taking over the world and no one cares any more. (Although call-back based programming is a useful thing to know about anyway.) >I'm unsure what 'state machines/code generation' would entail, therefore it >my be even more instructive to me. I have visions in my head of 'life' and >'core wars'. Am I on the right track? Not really, no. State machines are a Comp Sci formalism, and one that's very handy when dealing with something where there are only a few legitimate choices in any given "state" (eg, if you're waiting for some data to arrive pretty much the only things that can happen are that it doesn't, it does but it's not allowed, or it does and you go to the next stage). Code generation is a way of getting the computer to program for you :-) No seriously, it lets you write the program logic (typically) at a higher level, and have the computer fill in the details necessary to make that into actual executable code (be it perl or whatever). iMatix's answer to this is Libero (again see http://www.imatix.com/; again it's free/open source). For a fair class of problems, particularly communication oriented ones, it's a very good way to model the problem, and you can step away from a lot of the niggly details fairly easily (such as "what happens if something unexpected happens here") to let them be handled by code generated for you. Since talking about what you've used is obviously easier than talking about what you haven't, I'd be looking to talk about one of the nsgmls/sgmlspm combination or the libero/perl combination (libero's code generation is from schema files so it can target pretty much any imperative language you choose). But I'd try to avoid pushing any particular tool. Since it sounds like everyone and their dog is doing *ML in perl these days, possibly the state machine/code generation side might be of more interest. Ewen From grantm at web.co.nz Thu Apr 27 15:40:55 2000 From: grantm at web.co.nz (Grant McLean) Date: Thu Aug 5 00:24:05 2004 Subject: Perl Mongers Meeting Next Wednesday - dans waffling Message-ID: <416EBC605EBED111A31A08002B9F4B362473E1@scarab.lq.web.co.nz> From: Ewen McNeill [mailto:ewen@naos.co.nz] > Since it sounds like everyone and their dog is doing *ML in perl these > days, possibly the state machine/code generation side might be of more > interest. As the speaker, you get to choose - just let us know when you've made a decision. Regards Grant From grantm at web.co.nz Thu Apr 27 16:00:30 2000 From: grantm at web.co.nz (Grant McLean) Date: Thu Aug 5 00:24:05 2004 Subject: Perl Mongers Meeting Next Wednesday - dans waffling Message-ID: <416EBC605EBED111A31A08002B9F4B362473E2@scarab.lq.web.co.nz> From: Dan Morrison [mailto:dan.morrison@vuw.ac.nz] > Parsing XML is dull [...] Not if you've never done it before :-) If you've struggled with using regular expressions or whatever to extract useful data from files, the first encounter with XML and an XML parser that already knows how to make sense of the files is a liberating experience. > Validating it is more challenging. And potentially interesting to the group. > Actually _USING_ XML would be interesting. Agreed. > I've been doing serious XSL stuff with XML::XSLT (My stylesheet > is a Turing machine!) and would like to see what anyone else has > actually achieved. Perhaps you could set the ball rolling by showing us what *you've* achieved. Even just a 10 minute walkthrough along the lines of 'this is an XML document, this is a style sheet, this is the result and this is how it works'. Regards Grant ===================================================================== Grant McLean | email: grantm@web.co.nz | Lvl 8, 86 Lambton Quay The Web Limited | WWW: www.web.co.nz | PO Box 15-175 Internet Solutions | Tel: (04) 495 8250 | Wellington Awesome service | Fax: (04) 495 8259 | New Zealand From Dan.Morrison at vuw.ac.nz Thu Apr 27 18:47:55 2000 From: Dan.Morrison at vuw.ac.nz (Dan Morrison) Date: Thu Aug 5 00:24:05 2004 Subject: Perl Mongers Meeting Next Wednesday - dan's still waffling References: <416EBC605EBED111A31A08002B9F4B362473E2@scarab.lq.web.co.nz> Message-ID: <3908D1AB.3CF45580@matai.vuw.ac.nz> Grant McLean wrote: > From: Dan Morrison [mailto:dan.morrison@vuw.ac.nz] > > Parsing XML is dull [...] > > Not if you've never done it before :-) When it comes to tokenizing streams by hand, in Perl it's a LOT less painful than Java! OK, look, I never said it was *easy*, just not particularly rivetting as a discussion topic. After all, one of the theoretical points of the whole XML revolution is that we can now give up on worrying about the intracies of file formats and just work with portable data. Admittedly that's not the case yet, but soon thre'll be as many XML editing apps as there are bloody HTML tools, and it's very rarely I get any 'wow factor' out of seeing that the app got the syntax colouring crorrect (ie, it parsed). > > Perhaps you could set the ball rolling by showing us what *you've* > achieved. Even just a 10 minute walkthrough along the lines of > 'this is an XML document, this is a style sheet, this is the > result and this is how it works'. > Weeellll. There's this thing I've been working on I'm calling HTML::GUI or GUIML, where I've got XML docs that define an interface and XSL which turns it into forms of certain schemes or skins. CGI + XML::DOM + XML::XSLT. It sort of becomes a toolkit for CGI scripts, but could be applied to any app. It can eventually interface with Tcl when I get inspired to do so. It's along the lines of two current DTDs - Xwingml (This concept in Java Swing) and UIML (Which looks like just a theoretical thesis at this point, it's crap) sorry, no bookmarks on hand.