From jdthornton at ozemail.com.au Thu Oct 1 19:41:21 2009 From: jdthornton at ozemail.com.au (ajthornton) Date: Fri, 2 Oct 2009 12:41:21 +1000 Subject: [Melbourne-pm] Bamboozled by perl In-Reply-To: References: Message-ID: Hello I am a student of graphics design and .NET/java/XML programming. I don't know what sort of skillset this leads to - computational graphics designer!? :) Anyway, I don't mean by the above to imply that I have any ability at, or knowledge of, programming. In fact I am an idiot at computers in general. Anyway, after resurrecting a 64 MB RAM Packard Bell computer, nuking Windows 98 with GpARTED, and putting in Puppy Linux 4.3 instead, maybe I know a little bit. It is completely offline and unless I can find an ancient hard modem will never go online. Anyway, Puppy Linux has one programming language already on it: Perl!!!!!!!!!!!!!!!!!!!!!!!!!!!! [from memory 5.8 or something]. Puppy also has a primitive but effective text style IDE. So I thought after going to the trouble of resurrecting such a monster and finding Perl on it, that I would put aside my loathing for Perl that I have said on this list many times, and at least mess about with some very simple Perl programs. So I started with my main online PC [this one: a dual booted Windows XP/kubuntu 9.04 box] and found strawberry perl. Downloaded starberry perl, it pops up in -v in windows cmd line, and has the cpan etc things [whatever cpan is] in the program list. So I got out notepad and cut and pasted a program into notepad++: #!/usr/local/bin/perl # # Program to do the obvious # print 'Hello world.'; # Print a message *** Then I saved this as perlme.pl and put it in the Perl bin part of strawberry dir [I don't why this usually works - but I did find with Ruby that I have to whack the sourcew code file into the bin folder for the program to work on command line]. So I went to cmd in windows and typed perlme.pl and windows notepad appears with the entire raw sourcecode in it. Not the desired outcome. Then I search for forums. There is so much stuff on the net that I am bamboozled and forums for beginners appear to be lost in the fog. OK. If anyone feels that as a beginner that I am intruding on the list I will say this much: [1] the above pt is where more people give up a programming language entirely - no contest - they can't get perl-v to pop up in the command line, basically can't get the car to start. [2] Some of you teach Perl. The above is pretty much the thought process of someone who tries perl for about the first 5 mins. I have lost count of the number of languages that I have downloaded the guts of it and gone cmd/language blahblah -v and seen "file not recognised" and turned my back on it. There is a reason why I use mainly IDEs. My track record for getting command line programming to work is pretty lousy. I have Netbeans. IDE. I have QT4. IDE. I have Pelles. IDE. So if somebody can come up with a Perl IDE, yeah, I will use that. John From toby.corkindale at strategicdata.com.au Thu Oct 1 20:18:39 2009 From: toby.corkindale at strategicdata.com.au (Toby Corkindale) Date: Fri, 02 Oct 2009 13:18:39 +1000 Subject: [Melbourne-pm] Bamboozled by perl In-Reply-To: References: Message-ID: <4AC5710F.1090407@strategicdata.com.au> ajthornton wrote: > So I started with my main online PC [this one: a dual booted > Windows XP/kubuntu 9.04 box] and found strawberry perl. Downloaded starberry > perl, it pops up in -v in windows cmd line, and has the cpan etc things > [whatever cpan is] in the program list. So I got out notepad and cut and > pasted a program into notepad++: > > #!/usr/local/bin/perl > # > # Program to do the obvious > # > print 'Hello world.'; # Print a message > > > *** > Then I saved this as perlme.pl and put it in the Perl bin > part of strawberry dir [I don't why this usually works - but I did find with > Ruby that I have to whack the sourcew code file into the bin folder for the > program to work on command line]. So I went to cmd in windows and typed > perlme.pl and windows notepad appears with the entire raw sourcecode in it. > Not the desired outcome. Then I search for forums. There is so much stuff on > the net that I am bamboozled and forums for beginners appear to be lost in > the fog. Hi John, You don't need, or want, to put your perlme.pl in the perl bin directory. Please take it out, and save it somewhere else.. Maybe "My Documents/perl" or something like that? Then fire up the windows command line, as you did before, and navigate to where you saved the program. Now type: perl perlme.pl This should run your program as desired. > OK. If anyone feels that as a beginner that I am intruding on > the list I will say this much: [1] the above pt is where more people give up > a programming language entirely - no contest - they can't get perl-v to pop > up in the command line, basically can't get the car to start. [2] Some of > you teach Perl. The above is pretty much the thought process of someone who > tries perl for about the first 5 mins. > > I have lost count of the number of languages that I have > downloaded the guts of it and gone cmd/language blahblah -v and seen "file > not recognised" and turned my back on it. There is a reason why I use mainly > IDEs. My track record for getting command line programming to work is pretty > lousy. I have Netbeans. IDE. I have QT4. IDE. I have Pelles. IDE. So if > somebody can come up with a Perl IDE, yeah, I will use that. Perhaps you might like to try reading some of the tutorials geared towards using Perl on Windows? I notice this guy has a few.. http://damienlearnsperl.blogspot.com/ He also mentions "Padre" which is a development environment for Perl on Windows. Maybe you'd be more familiar with that? Cheers, and best of luck, Toby From daniel at rimspace.net Thu Oct 1 20:20:09 2009 From: daniel at rimspace.net (Daniel Pittman) Date: Fri, 02 Oct 2009 13:20:09 +1000 Subject: [Melbourne-pm] Bamboozled by perl In-Reply-To: (ajthornton's message of "Fri, 2 Oct 2009 12:41:21 +1000") References: Message-ID: <87y6nuqy6u.fsf@rimspace.net> "ajthornton" writes: [...] > So I went to cmd in windows and typed perlme.pl and windows notepad appears > with the entire raw sourcecode in it. Not the desired outcome. Windows associates the Perl script with Notepad, and executes whatever command it thinks should be associated with the file for you. Not a Perl issue, as such. [...] > So if somebody can come up with a Perl IDE, yeah, I will use that. http://www.activestate.com/komodo/ HTH, HAND. Daniel -- ? Daniel Pittman ? daniel at rimspace.net ? +61 401 155 707 ? made with 100 percent post-consumer electrons Looking for work? Love Perl? In Melbourne, Australia? We are hiring. From sgc294 at internode.on.net Thu Oct 1 20:21:38 2009 From: sgc294 at internode.on.net (andrew Dent) Date: Fri, 02 Oct 2009 13:21:38 +1000 Subject: [Melbourne-pm] Bamboozled by perl In-Reply-To: References: Message-ID: <4AC571C2.9090000@internode.on.net> G'day John You have two choices. 1. Fix up the Windows File Types so that file extensions with .pl are executed with the perl.exe binary or 2. Use this syntax to run your .pl files at a command prompt. perl perlme.pl Hints: 1. You can use the "Folder Options"->"File Types" tool from Windows Explorer to do this, or the command line Oddly enough the dos command used to set this up called ftype has instructions to setup .pl and Perl in its helpfile that is embedded into Windows. Type ftype /? to see the help file. You'll need to ensure your PATH environment variable is setup to point to eh Strawberry Perl binary. 2. Make sure that the path to your Strawberry Perl installation is included in your PATH environment variable. Type set PATH at a command prompt. If you see C:\strawberry\perl\bin; in the output (our something different depending on where you loaded Strawberry Perl into) then your ok. Otherwise edit your PATH variable via Control Panel. Cheers Andrew ajthornton wrote: > > Hello > I am a student of graphics design and .NET/java/XML > programming. I don't know what sort of skillset this leads to - > computational graphics designer!? :) > > Anyway, I don't mean by the above to imply that I have any > ability at, or knowledge of, programming. In fact I am an idiot at computers > in general. Anyway, after resurrecting a 64 MB RAM Packard Bell computer, > nuking Windows 98 with GpARTED, and putting in Puppy Linux 4.3 instead, > maybe I know a little bit. It is completely offline and unless I can find an > ancient hard modem will never go online. Anyway, Puppy Linux has one > programming language already on it: Perl!!!!!!!!!!!!!!!!!!!!!!!!!!!! [from > memory 5.8 or something]. Puppy also has a primitive but effective text > style IDE. > > So I thought after going to the trouble of resurrecting such a > monster and finding Perl on it, that I would put aside my loathing for Perl > that I have said on this list many times, and at least mess about with some > very simple Perl programs. > > So I started with my main online PC [this one: a dual booted > Windows XP/kubuntu 9.04 box] and found strawberry perl. Downloaded starberry > perl, it pops up in -v in windows cmd line, and has the cpan etc things > [whatever cpan is] in the program list. So I got out notepad and cut and > pasted a program into notepad++: > > #!/usr/local/bin/perl > # > # Program to do the obvious > # > print 'Hello world.'; # Print a message > > > *** > Then I saved this as perlme.pl and put it in the Perl bin > part of strawberry dir [I don't why this usually works - but I did find with > Ruby that I have to whack the sourcew code file into the bin folder for the > program to work on command line]. So I went to cmd in windows and typed > perlme.pl and windows notepad appears with the entire raw sourcecode in it. > Not the desired outcome. Then I search for forums. There is so much stuff on > the net that I am bamboozled and forums for beginners appear to be lost in > the fog. > > OK. If anyone feels that as a beginner that I am intruding on > the list I will say this much: [1] the above pt is where more people give up > a programming language entirely - no contest - they can't get perl-v to pop > up in the command line, basically can't get the car to start. [2] Some of > you teach Perl. The above is pretty much the thought process of someone who > tries perl for about the first 5 mins. > > I have lost count of the number of languages that I have > downloaded the guts of it and gone cmd/language blahblah -v and seen "file > not recognised" and turned my back on it. There is a reason why I use mainly > IDEs. My track record for getting command line programming to work is pretty > lousy. I have Netbeans. IDE. I have QT4. IDE. I have Pelles. IDE. So if > somebody can come up with a Perl IDE, yeah, I will use that. > > John > > > > > _______________________________________________ > Melbourne-pm mailing list > Melbourne-pm at pm.org > http://mail.pm.org/mailman/listinfo/melbourne-pm > > > From jdthornton at ozemail.com.au Thu Oct 1 21:37:15 2009 From: jdthornton at ozemail.com.au (ajthornton) Date: Fri, 2 Oct 2009 14:37:15 +1000 Subject: [Melbourne-pm] FW: Bamboozled by perl Message-ID: <8ED5CF5A56E04E9F94FD1BFCA39CFE56@homepc> -----Original Message----- From: ajthornton [mailto:jdthornton at ozemail.com.au] Sent: Friday, 2 October 2009 2:37 PM To: 'Toby Corkindale' Subject: RE: [Melbourne-pm] Bamboozled by perl OK. That works! :) I have a folder called perlstuff with source code in it so I went cd perlstuff and then perl perlme.pl I get hello world in the terminal as desired. OK. Your reward for helping me is that I will try to like Perl!!!!! I am in the final analysis pragmatic; if a language helps my health, welath and happiness I will persist with it. I even had fun with Prolog a few months ago. I grabbed a free IDE and some tutorials and actually some progress, albeit ata beginner level, and had a lot of fun. I thought that I would give it up after 5 mins - I had heard that it was this weird language that did this out there AI stuff. But I was still going after a few weeks. BTW when I was at Software Freedom Day I didn't see a Perl stand. That was a pity because at least you would have got in a lightning talk about perl/perl groups. I really missed the bus with programming. If I were 18 0r 20 right now I would go to uni or TAFE and get a Bsc in computer science. But I was in the wrong era. It was 1992. I left school computer illiterate. I couldn't turn a computer on or put a disk in the disk drive. I failed reasoning and data maths [the worst freaking unit of maths ever clunked together by eduational eggheads - teachers treated it like it was an insult to teach it; "that's a year 8 maths unit" was said so often, never mind that a chapter had calculus so difficult in the Rehill/macauliffe book that you wouldn't do it until the later years of an undergraduate maths program , if then, oh man that was so all over the shop that I wondered what the hell I had done in a previous life to deserve such tripe.] because I couldn't operate a computer and use Minitab. Then the teacher came up with this psychobabble that I was "technophobic". There was no notion of responsibility in teaching computers. For a start what about giving me a mouse??? But like I said, I am going to try to like Perl. It must have something going for it if it's included off the bat in PuppyLinux. At least programming is something tnat can be learnt. There's stuff that's "you have got it or you haven't". Music and drawing certainly fit that category. Maths probably does. But I do think that anyone can program. Some people might be better at it etc. But anyone can learn to do it. Unlike other things. I could plaster a blackboard with power series in maths. But give me year 6 primary school maths problem solving and I am stuffed. Once I had a third year maths unit where I got 90 percent for texbook work and 10 percent for probalem solving and passed with 56%. I don't know what lateral thinking means. Indeed Edward De Bono probably meant it in a different way to how it is used now. But I am convinced in any case that I have the lateral thinking ability of a pile of cement. In problam solving it's where to start that kills me. Often I don't get past that pt - a blank sheet of paper. John -----Original Message----- From: Toby Corkindale [mailto:toby.corkindale at strategicdata.com.au] Sent: Friday, 2 October 2009 1:19 PM To: ajthornton Cc: melbourne-pm at pm.org Subject: Re: [Melbourne-pm] Bamboozled by perl ajthornton wrote: > So I started with my main online PC [this one: a dual > booted Windows XP/kubuntu 9.04 box] and found strawberry perl. > Downloaded starberry perl, it pops up in -v in windows cmd line, and > has the cpan etc things [whatever cpan is] in the program list. So I > got out notepad and cut and pasted a program into notepad++: > > #!/usr/local/bin/perl > # > # Program to do the obvious > # > print 'Hello world.'; # Print a message > > > *** > Then I saved this as perlme.pl and put it in the Perl > bin part of strawberry dir [I don't why this usually works - but I did > find with Ruby that I have to whack the sourcew code file into the bin > folder for the program to work on command line]. So I went to cmd in > windows and typed perlme.pl and windows notepad appears with the entire raw sourcecode in it. > Not the desired outcome. Then I search for forums. There is so much > stuff on the net that I am bamboozled and forums for beginners appear > to be lost in the fog. Hi John, You don't need, or want, to put your perlme.pl in the perl bin directory. Please take it out, and save it somewhere else.. Maybe "My Documents/perl" or something like that? Then fire up the windows command line, as you did before, and navigate to where you saved the program. Now type: perl perlme.pl This should run your program as desired. > OK. If anyone feels that as a beginner that I am intruding > on the list I will say this much: [1] the above pt is where more > people give up a programming language entirely - no contest - they > can't get perl-v to pop up in the command line, basically can't get > the car to start. [2] Some of you teach Perl. The above is pretty much > the thought process of someone who tries perl for about the first 5 mins. > > I have lost count of the number of languages that I have > downloaded the guts of it and gone cmd/language blahblah -v and seen > "file not recognised" and turned my back on it. There is a reason why > I use mainly IDEs. My track record for getting command line > programming to work is pretty lousy. I have Netbeans. IDE. I have QT4. > IDE. I have Pelles. IDE. So if somebody can come up with a Perl IDE, yeah, I will use that. Perhaps you might like to try reading some of the tutorials geared towards using Perl on Windows? I notice this guy has a few.. http://damienlearnsperl.blogspot.com/ He also mentions "Padre" which is a development environment for Perl on Windows. Maybe you'd be more familiar with that? Cheers, and best of luck, Toby From scottp at dd.com.au Thu Oct 1 21:42:40 2009 From: scottp at dd.com.au (Scott Penrose) Date: Fri, 2 Oct 2009 14:42:40 +1000 Subject: [Melbourne-pm] Bamboozled by perl In-Reply-To: <87y6nuqy6u.fsf@rimspace.net> References: <87y6nuqy6u.fsf@rimspace.net> Message-ID: <0B3E2222-C31E-426D-8BA1-A085CE4FD43B@dd.com.au> > >> So if somebody can come up with a Perl IDE, yeah, I will use that. http://padre.perlide.org/ Padre is a perl IDE written in Perl, and has a simple windows installer (MSI, windows installers script). So install Strawberry Perl then Padre and you should be up and running. Scott From toby.corkindale at strategicdata.com.au Thu Oct 1 21:56:19 2009 From: toby.corkindale at strategicdata.com.au (Toby Corkindale) Date: Fri, 02 Oct 2009 14:56:19 +1000 Subject: [Melbourne-pm] Bamboozled by perl In-Reply-To: <6A6BAD2D82E549B998476C08C0CCE25D@homepc> References: <4AC5710F.1090407@strategicdata.com.au> <6A6BAD2D82E549B998476C08C0CCE25D@homepc> Message-ID: <4AC587F3.10102@strategicdata.com.au> ajthornton wrote: > OK. That works! :) > > I have a folder called perlstuff with source code in it so I went cd > perlstuff and then perl perlme.pl > > I get hello world in the terminal as desired. > > OK. Your reward for helping me is that I will try to like Perl!!!!! I am in > the final analysis pragmatic; if a language helps my health, welath and > happiness I will persist with it. I even had fun with Prolog a few months > ago. I grabbed a free IDE and some tutorials and actually some progress, > albeit ata beginner level, and had a lot of fun. I thought that I would > give it up after 5 mins - I had heard that it was this weird language that > did this out there AI stuff. But I was still going after a few weeks. BTW > when I was at Software Freedom Day I didn't see a Perl stand. That was a > pity because at least you would have got in a lightning talk about perl/perl > groups. > > I really missed the bus with programming. If I were 18 0r 20 right now I > would go to uni or TAFE and get a Bsc in computer science. But I was in the > wrong era. It was 1992. I left school computer illiterate. I couldn't turn a > computer on or put a disk in the disk drive. I failed reasoning and data > maths [the worst freaking unit of maths ever clunked together by eduational > eggheads - teachers treated it like it was an insult to teach it; "that's a > year 8 maths unit" was said so often, never mind that a chapter had calculus > so difficult in the Rehill/macauliffe book that you wouldn't do it until the > later years of an undergraduate maths program , if then, oh man that was so > all over the shop that I wondered what the hell I had done in a previous > life to deserve such tripe.] because I couldn't operate a computer and use > Minitab. Then the teacher came up with this psychobabble that I was > "technophobic". There was no notion of responsibility in teaching computers. > For a start what about giving me a mouse??? Hi John, I only left high school slightly later than you, and I'm probably one of the younger Perl coders in our group! My school had a single Commodore 64 per class, and there were certainly no mice around. I learnt to program in the 1980s on scrounged hardware that makes your recent "junk" computer look like a supercomputer, and back then had to learn out of "Learn to program" books and an old Olivetti or IBM BASIC reference manual, without anyone else to ask for help. I believe a lot of other coders also just picked up the language through self-learning. What I'm saying is that you can't blame a lack of tertiary education for "missing the bus" on programming. It's quite possible to learn yourself without too much difficult. Just follow some tutorials, ask here if you get stuck, and I'm sure you'll be there in no time! Also, there is a Melbourne-based organisation which provides Perl training in a more "classical" (ie. classroom + lab) environment, if that's more your way of learning. Have a chat to Paul and Jacinta at Perl Training Australia for that - they're world-renowned! :) > But like I said, I am going to try to like Perl. It must have something > going for it if it's included off the bat in PuppyLinux. > > At least programming is something tnat can be learnt. There's stuff that's > "you have got it or you haven't". Music and drawing certainly fit that > category. Maths probably does. But I do think that anyone can program. Some > people might be better at it etc. But anyone can learn to do it. Unlike > other things. I could plaster a blackboard with power series in maths. But > give me year 6 primary school maths problem solving and I am stuffed. Once I > had a third year maths unit where I got 90 percent for texbook work and 10 > percent for probalem solving and passed with 56%. I don't know what lateral > thinking means. Indeed Edward De Bono probably meant it in a different way > to how it is used now. But I am convinced in any case that I have the > lateral thinking ability of a pile of cement. In problam solving it's where > to start that kills me. Often I don't get past that pt - a blank sheet of > paper. > > John Well, just try an old trick.. If you don't know where to start, just start anywhere! (And then work organically out from there) Cheers, Toby From jdthornton at ozemail.com.au Thu Oct 1 22:21:27 2009 From: jdthornton at ozemail.com.au (ajthornton) Date: Fri, 2 Oct 2009 15:21:27 +1000 Subject: [Melbourne-pm] Padre IDE In-Reply-To: References: Message-ID: <12275AFADEB7404DBE43A8332427A4AB@homepc> So, one thing that I have to ask. Great help so far! According to Arthur Griffiths it is unwise in Java to have both IDE and command line on the same machine - he says that it makes the programming "unstable" and "you can't really trust it". So with Padre, will it cause instability to have both it and command line perl on the same machine? John From shlomif at iglu.org.il Thu Oct 1 22:51:19 2009 From: shlomif at iglu.org.il (Shlomi Fish) Date: Fri, 02 Oct 2009 07:51:19 +0200 Subject: [Melbourne-pm] FW: Bamboozled by perl In-Reply-To: <8ED5CF5A56E04E9F94FD1BFCA39CFE56@homepc> References: <8ED5CF5A56E04E9F94FD1BFCA39CFE56@homepc> Message-ID: <200910020751.19714.shlomif@iglu.org.il> Hi John! See below for my response. On Friday 02 Oct 2009 06:37:15 ajthornton wrote: > -----Original Message----- > From: ajthornton [mailto:jdthornton at ozemail.com.au] > Sent: Friday, 2 October 2009 2:37 PM > To: 'Toby Corkindale' > Subject: RE: [Melbourne-pm] Bamboozled by perl > > OK. That works! :) > > I have a folder called perlstuff with source code in it so I went cd > perlstuff and then perl perlme.pl > > I get hello world in the terminal as desired. > > OK. Your reward for helping me is that I will try to like Perl!!!!! I am in > the final analysis pragmatic; if a language helps my health, welath and > happiness I will persist with it. I even had fun with Prolog a few months > ago. I grabbed a free IDE and some tutorials and actually some progress, > albeit ata beginner level, and had a lot of fun. I thought that I would > give it up after 5 mins - I had heard that it was this weird language that > did this out there AI stuff. But I was still going after a few weeks. Cool. I tried Prolog too a while ago, but I could not find a decent online tutorial. The closest I found was http://www.learnprolognow.org/ , but it had a lot of typos and missing stuff. So I have temporarily given up on it. > BTW > when I was at Software Freedom Day I didn't see a Perl stand. That was a > pity because at least you would have got in a lightning talk about > perl/perl groups. > > I really missed the bus with programming. If I were 18 0r 20 right now I > would go to uni or TAFE and get a Bsc in computer science. But I was in the > wrong era. It was 1992. I left school computer illiterate. I couldn't turn > a computer on or put a disk in the disk drive. I failed reasoning and data > maths [the worst freaking unit of maths ever clunked together by > eduational eggheads - teachers treated it like it was an insult to teach > it; "that's a year 8 maths unit" was said so often, never mind that a > chapter had calculus so difficult in the Rehill/macauliffe book that you > wouldn't do it until the later years of an undergraduate maths program , > if then, oh man that was so all over the shop that I wondered what the > hell I had done in a previous life to deserve such tripe.] because I > couldn't operate a computer and use Minitab. Then the teacher came up with > this psychobabble that I was "technophobic". There was no notion of > responsibility in teaching computers. For a start what about giving me a > mouse??? Interesting. Did you graduate from Uni in 1992 or from high school? In any case, I should note that with the right attitude and spirit, it's never too late to learn new things and become proficient in programming or almost anything else. See for example: http://www.shlomifish.org/philosophy/philosophy/advice-for-the-young/ (also see the links) http://www.shlomifish.org/philosophy/computers/education/introductory- language/ (short URL - http://shlom.in/intro-lang ) > > But like I said, I am going to try to like Perl. It must have something > going for it if it's included off the bat in PuppyLinux. The reason is probably because /usr/bin/perl is part of the Linux Standard Base: http://www.linuxfoundation.org/collaborate/workgroups/lsb And it is used extensively by many scripts and other programs on Linux because writing scripts in Perl 5 is much more robust than writing them in shell/sed/awk and Python cannot effectively be used from the command-line (i.e: like {{{ perl -e '....' }}}). Reportedly, the One Laptop Per Child (OLPC) people decided to avoid having to install Perl and they ran into many problems with programs that implicitly required /usr/bin/perl. > > At least programming is something tnat can be learnt. There's stuff that's > "you have got it or you haven't". Music and drawing certainly fit that > category. Maths probably does. But I do think that anyone can program. Some > people might be better at it etc. But anyone can learn to do it. Unlike > other things. I could plaster a blackboard with power series in maths. But > give me year 6 primary school maths problem solving and I am stuffed. Once > I had a third year maths unit where I got 90 percent for texbook work and > 10 percent for probalem solving and passed with 56%. I don't know what > lateral thinking means. Indeed Edward De Bono probably meant it in a > different way to how it is used now. But I am convinced in any case that I > have the lateral thinking ability of a pile of cement. In problam solving > it's where to start that kills me. Often I don't get past that pt - a > blank sheet of paper. > Welcome aboard! But don't underestimate yourself. Regards, Shlomi Fish -- ----------------------------------------------------------------- Shlomi Fish http://www.shlomifish.org/ My Aphorisms - http://www.shlomifish.org/humour.html Chuck Norris read the entire English Wikipedia in 24 hours. Twice. From scottp at dd.com.au Thu Oct 1 22:53:16 2009 From: scottp at dd.com.au (Scott Penrose) Date: Fri, 2 Oct 2009 15:53:16 +1000 Subject: [Melbourne-pm] Padre IDE In-Reply-To: <12275AFADEB7404DBE43A8332427A4AB@homepc> References: <12275AFADEB7404DBE43A8332427A4AB@homepc> Message-ID: <576D7939-F01F-4EA6-BDAB-5F145A4CC3E8@dd.com.au> On 02/10/2009, at 3:21 PM, ajthornton wrote: > > So, one thing that I have to ask. Great help so far! > According to > Arthur Griffiths it is unwise in Java to have both IDE and command > line on > the same machine - he says that it makes the programming "unstable" > and "you > can't really trust it". I have to say that I don't believe that in Perl or Java. Scott From daniel at rimspace.net Thu Oct 1 23:45:06 2009 From: daniel at rimspace.net (Daniel Pittman) Date: Fri, 02 Oct 2009 16:45:06 +1000 Subject: [Melbourne-pm] Padre IDE In-Reply-To: <576D7939-F01F-4EA6-BDAB-5F145A4CC3E8@dd.com.au> (Scott Penrose's message of "Fri, 2 Oct 2009 15:53:16 +1000") References: <12275AFADEB7404DBE43A8332427A4AB@homepc> <576D7939-F01F-4EA6-BDAB-5F145A4CC3E8@dd.com.au> Message-ID: <87ab0aqop9.fsf@rimspace.net> Scott Penrose writes: > On 02/10/2009, at 3:21 PM, ajthornton wrote: > >> So, one thing that I have to ask. Great help so far! According to Arthur >> Griffiths it is unwise in Java to have both IDE and command line on the >> same machine - he says that it makes the programming "unstable" and "you >> can't really trust it". > > I have to say that I don't believe that in Perl or Java. O_o I have to agree with Scott: I can't imagine why Arthur Griffiths argues this, because is it so ... crazy, basically. The closest I can come to any sort of explanation would be if you used an IDE written in Java that shipped another version of the JVM, or something like that. Having multiple, accidental installed versions of the same language environment /could/ lead to problems, maybe. So, um, no. Daniel -- ? Daniel Pittman ? daniel at rimspace.net ? +61 401 155 707 ? made with 100 percent post-consumer electrons Looking for work? Love Perl? In Melbourne, Australia? We are hiring. From ajsavige at yahoo.com.au Fri Oct 2 05:16:57 2009 From: ajsavige at yahoo.com.au (Andrew Savige) Date: Fri, 2 Oct 2009 05:16:57 -0700 (PDT) Subject: [Melbourne-pm] Padre IDE In-Reply-To: <12275AFADEB7404DBE43A8332427A4AB@homepc> References: <12275AFADEB7404DBE43A8332427A4AB@homepc> Message-ID: <308700.32225.qm@web56405.mail.re3.yahoo.com> ajthornton?wrote:?????? > According to Arthur Griffiths it is unwise in Java to have both IDE and > command line on the same machine - he says that it makes the programming > "unstable" and "you can't really trust it". Who is this Arthur Griffiths person? Is this him? http://en.wikipedia.org/wiki/Arthur_Griffiths In any case, the remarks attributed to him above sound like muddled superstition to me. Cheers, /-\ __________________________________________________________________________________ Get more done like never before with Yahoo!7 Mail. Learn more: http://au.overview.mail.yahoo.com/ From jdthornton at ozemail.com.au Fri Oct 2 14:47:10 2009 From: jdthornton at ozemail.com.au (ajthornton) Date: Sat, 3 Oct 2009 07:47:10 +1000 Subject: [Melbourne-pm] Melbourne-pm Digest, Vol 66, Issue 2 In-Reply-To: References: Message-ID: <3B21A374D0F34E1CA2045B9C29CEC566@homepc> Not that Arthur Griffiths!! U meant the computer programmer who does the tutorials on Java on VTC. John -----Original Message----- From: melbourne-pm-bounces+jdthornton=ozemail.com.au at pm.org [mailto:melbourne-pm-bounces+jdthornton=ozemail.com.au at pm.org] On Behalf Of melbourne-pm-request at pm.org Sent: Saturday, 3 October 2009 5:01 AM To: melbourne-pm at pm.org Subject: Melbourne-pm Digest, Vol 66, Issue 2 Send Melbourne-pm mailing list submissions to melbourne-pm at pm.org To subscribe or unsubscribe via the World Wide Web, visit http://mail.pm.org/mailman/listinfo/melbourne-pm or, via email, send a message with subject or body 'help' to melbourne-pm-request at pm.org You can reach the person managing the list at melbourne-pm-owner at pm.org When replying, please edit your Subject line so it is more specific than "Re: Contents of Melbourne-pm digest..." Today's Topics: 1. Re: Bamboozled by perl (Toby Corkindale) 2. Padre IDE (ajthornton) 3. Re: FW: Bamboozled by perl (Shlomi Fish) 4. Re: Padre IDE (Scott Penrose) 5. Re: Padre IDE (Daniel Pittman) 6. Re: Padre IDE (Andrew Savige) ---------------------------------------------------------------------- Message: 1 Date: Fri, 02 Oct 2009 14:56:19 +1000 From: Toby Corkindale Subject: Re: [Melbourne-pm] Bamboozled by perl To: melbourne-pm Message-ID: <4AC587F3.10102 at strategicdata.com.au> Content-Type: text/plain; charset=ISO-8859-1; format=flowed ajthornton wrote: > OK. That works! :) > > I have a folder called perlstuff with source code in it so I went cd > perlstuff and then perl perlme.pl > > I get hello world in the terminal as desired. > > OK. Your reward for helping me is that I will try to like Perl!!!!! I > am in the final analysis pragmatic; if a language helps my health, > welath and happiness I will persist with it. I even had fun with > Prolog a few months ago. I grabbed a free IDE and some tutorials and > actually some progress, albeit ata beginner level, and had a lot of > fun. I thought that I would give it up after 5 mins - I had heard that it was this weird language that > did this out there AI stuff. But I was still going after a few weeks. BTW > when I was at Software Freedom Day I didn't see a Perl stand. That was > a pity because at least you would have got in a lightning talk about > perl/perl groups. > > I really missed the bus with programming. If I were 18 0r 20 right now > I would go to uni or TAFE and get a Bsc in computer science. But I was > in the wrong era. It was 1992. I left school computer illiterate. I > couldn't turn a computer on or put a disk in the disk drive. I failed > reasoning and data maths [the worst freaking unit of maths ever > clunked together by eduational eggheads - teachers treated it like it > was an insult to teach it; "that's a year 8 maths unit" was said so > often, never mind that a chapter had calculus so difficult in the > Rehill/macauliffe book that you wouldn't do it until the later years > of an undergraduate maths program , if then, oh man that was so all > over the shop that I wondered what the hell I had done in a previous > life to deserve such tripe.] because I couldn't operate a computer and > use Minitab. Then the teacher came up with this psychobabble that I was "technophobic". There was no notion of responsibility in teaching computers. > For a start what about giving me a mouse??? Hi John, I only left high school slightly later than you, and I'm probably one of the younger Perl coders in our group! My school had a single Commodore 64 per class, and there were certainly no mice around. I learnt to program in the 1980s on scrounged hardware that makes your recent "junk" computer look like a supercomputer, and back then had to learn out of "Learn to program" books and an old Olivetti or IBM BASIC reference manual, without anyone else to ask for help. I believe a lot of other coders also just picked up the language through self-learning. What I'm saying is that you can't blame a lack of tertiary education for "missing the bus" on programming. It's quite possible to learn yourself without too much difficult. Just follow some tutorials, ask here if you get stuck, and I'm sure you'll be there in no time! Also, there is a Melbourne-based organisation which provides Perl training in a more "classical" (ie. classroom + lab) environment, if that's more your way of learning. Have a chat to Paul and Jacinta at Perl Training Australia for that - they're world-renowned! :) > But like I said, I am going to try to like Perl. It must have > something going for it if it's included off the bat in PuppyLinux. > > At least programming is something tnat can be learnt. There's stuff > that's "you have got it or you haven't". Music and drawing certainly > fit that category. Maths probably does. But I do think that anyone can > program. Some people might be better at it etc. But anyone can learn > to do it. Unlike other things. I could plaster a blackboard with power > series in maths. But give me year 6 primary school maths problem > solving and I am stuffed. Once I had a third year maths unit where I > got 90 percent for texbook work and 10 percent for probalem solving > and passed with 56%. I don't know what lateral thinking means. Indeed > Edward De Bono probably meant it in a different way to how it is used > now. But I am convinced in any case that I have the lateral thinking > ability of a pile of cement. In problam solving it's where to start > that kills me. Often I don't get past that pt - a blank sheet of paper. > > John Well, just try an old trick.. If you don't know where to start, just start anywhere! (And then work organically out from there) Cheers, Toby ------------------------------ Message: 2 Date: Fri, 2 Oct 2009 15:21:27 +1000 From: "ajthornton" Subject: [Melbourne-pm] Padre IDE To: Message-ID: <12275AFADEB7404DBE43A8332427A4AB at homepc> Content-Type: text/plain; charset="us-ascii" So, one thing that I have to ask. Great help so far! According to Arthur Griffiths it is unwise in Java to have both IDE and command line on the same machine - he says that it makes the programming "unstable" and "you can't really trust it". So with Padre, will it cause instability to have both it and command line perl on the same machine? John ------------------------------ Message: 3 Date: Fri, 02 Oct 2009 07:51:19 +0200 From: Shlomi Fish Subject: Re: [Melbourne-pm] FW: Bamboozled by perl To: melbourne-pm at pm.org Cc: ajthornton Message-ID: <200910020751.19714.shlomif at iglu.org.il> Content-Type: Text/Plain; charset=iso-8859-1 Hi John! See below for my response. On Friday 02 Oct 2009 06:37:15 ajthornton wrote: > -----Original Message----- > From: ajthornton [mailto:jdthornton at ozemail.com.au] > Sent: Friday, 2 October 2009 2:37 PM > To: 'Toby Corkindale' > Subject: RE: [Melbourne-pm] Bamboozled by perl > > OK. That works! :) > > I have a folder called perlstuff with source code in it so I went cd > perlstuff and then perl perlme.pl > > I get hello world in the terminal as desired. > > OK. Your reward for helping me is that I will try to like Perl!!!!! I > am in the final analysis pragmatic; if a language helps my health, > welath and happiness I will persist with it. I even had fun with > Prolog a few months ago. I grabbed a free IDE and some tutorials and > actually some progress, albeit ata beginner level, and had a lot of > fun. I thought that I would give it up after 5 mins - I had heard that it was this weird language that > did this out there AI stuff. But I was still going after a few weeks. Cool. I tried Prolog too a while ago, but I could not find a decent online tutorial. The closest I found was http://www.learnprolognow.org/ , but it had a lot of typos and missing stuff. So I have temporarily given up on it. > BTW > when I was at Software Freedom Day I didn't see a Perl stand. That was > a pity because at least you would have got in a lightning talk about > perl/perl groups. > > I really missed the bus with programming. If I were 18 0r 20 right now > I would go to uni or TAFE and get a Bsc in computer science. But I was > in the wrong era. It was 1992. I left school computer illiterate. I > couldn't turn a computer on or put a disk in the disk drive. I failed > reasoning and data maths [the worst freaking unit of maths ever > clunked together by eduational eggheads - teachers treated it like it > was an insult to teach it; "that's a year 8 maths unit" was said so > often, never mind that a chapter had calculus so difficult in the > Rehill/macauliffe book that you wouldn't do it until the later years > of an undergraduate maths program , if then, oh man that was so all > over the shop that I wondered what the hell I had done in a previous > life to deserve such tripe.] because I couldn't operate a computer > and use Minitab. Then the teacher came up with this psychobabble that > I was "technophobic". There was no notion of responsibility in > teaching computers. For a start what about giving me a mouse??? Interesting. Did you graduate from Uni in 1992 or from high school? In any case, I should note that with the right attitude and spirit, it's never too late to learn new things and become proficient in programming or almost anything else. See for example: http://www.shlomifish.org/philosophy/philosophy/advice-for-the-young/ (also see the links) http://www.shlomifish.org/philosophy/computers/education/introductory- language/ (short URL - http://shlom.in/intro-lang ) > > But like I said, I am going to try to like Perl. It must have > something going for it if it's included off the bat in PuppyLinux. The reason is probably because /usr/bin/perl is part of the Linux Standard Base: http://www.linuxfoundation.org/collaborate/workgroups/lsb And it is used extensively by many scripts and other programs on Linux because writing scripts in Perl 5 is much more robust than writing them in shell/sed/awk and Python cannot effectively be used from the command-line (i.e: like {{{ perl -e '....' }}}). Reportedly, the One Laptop Per Child (OLPC) people decided to avoid having to install Perl and they ran into many problems with programs that implicitly required /usr/bin/perl. > > At least programming is something tnat can be learnt. There's stuff > that's "you have got it or you haven't". Music and drawing certainly > fit that category. Maths probably does. But I do think that anyone can > program. Some people might be better at it etc. But anyone can learn > to do it. Unlike other things. I could plaster a blackboard with power > series in maths. But give me year 6 primary school maths problem > solving and I am stuffed. Once I had a third year maths unit where I > got 90 percent for texbook work and 10 percent for probalem solving > and passed with 56%. I don't know what lateral thinking means. Indeed > Edward De Bono probably meant it in a different way to how it is used > now. But I am convinced in any case that I have the lateral thinking > ability of a pile of cement. In problam solving it's where to start > that kills me. Often I don't get past that pt - a blank sheet of paper. > Welcome aboard! But don't underestimate yourself. Regards, Shlomi Fish -- ----------------------------------------------------------------- Shlomi Fish http://www.shlomifish.org/ My Aphorisms - http://www.shlomifish.org/humour.html Chuck Norris read the entire English Wikipedia in 24 hours. Twice. ------------------------------ Message: 4 Date: Fri, 2 Oct 2009 15:53:16 +1000 From: Scott Penrose Subject: Re: [Melbourne-pm] Padre IDE To: "ajthornton" Cc: melbourne-pm at pm.org Message-ID: <576D7939-F01F-4EA6-BDAB-5F145A4CC3E8 at dd.com.au> Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes On 02/10/2009, at 3:21 PM, ajthornton wrote: > > So, one thing that I have to ask. Great help so far! > According to > Arthur Griffiths it is unwise in Java to have both IDE and command > line on the same machine - he says that it makes the programming > "unstable" > and "you > can't really trust it". I have to say that I don't believe that in Perl or Java. Scott ------------------------------ Message: 5 Date: Fri, 02 Oct 2009 16:45:06 +1000 From: Daniel Pittman Subject: Re: [Melbourne-pm] Padre IDE To: melbourne-pm at pm.org Message-ID: <87ab0aqop9.fsf at rimspace.net> Content-Type: text/plain; charset=utf-8 Scott Penrose writes: > On 02/10/2009, at 3:21 PM, ajthornton wrote: > >> So, one thing that I have to ask. Great help so far! According to >> Arthur Griffiths it is unwise in Java to have both IDE and command >> line on the same machine - he says that it makes the programming >> "unstable" and "you can't really trust it". > > I have to say that I don't believe that in Perl or Java. O_o I have to agree with Scott: I can't imagine why Arthur Griffiths argues this, because is it so ... crazy, basically. The closest I can come to any sort of explanation would be if you used an IDE written in Java that shipped another version of the JVM, or something like that. Having multiple, accidental installed versions of the same language environment /could/ lead to problems, maybe. So, um, no. Daniel -- ? Daniel Pittman ? daniel at rimspace.net ? +61 401 155 707 ? made with 100 percent post-consumer electrons Looking for work? Love Perl? In Melbourne, Australia? We are hiring. ------------------------------ Message: 6 Date: Fri, 2 Oct 2009 05:16:57 -0700 (PDT) From: Andrew Savige Subject: Re: [Melbourne-pm] Padre IDE To: ajthornton , melbourne-pm at pm.org Message-ID: <308700.32225.qm at web56405.mail.re3.yahoo.com> Content-Type: text/plain; charset=iso-8859-1 ajthornton?wrote:?????? > According to Arthur Griffiths it is unwise in Java to have both IDE > and command line on the same machine - he says that it makes the > programming "unstable" and "you can't really trust it". Who is this Arthur Griffiths person? Is this him? http://en.wikipedia.org/wiki/Arthur_Griffiths In any case, the remarks attributed to him above sound like muddled superstition to me. Cheers, /-\ ____________________________________________________________________________ ______ Get more done like never before with Yahoo!7 Mail. Learn more: http://au.overview.mail.yahoo.com/ ------------------------------ _______________________________________________ Melbourne-pm mailing list Melbourne-pm at pm.org http://mail.pm.org/mailman/listinfo/melbourne-pm End of Melbourne-pm Digest, Vol 66, Issue 2 ******************************************* From wayland at wayland.id.au Fri Oct 2 20:36:29 2009 From: wayland at wayland.id.au (Timothy S. Nelson) Date: Sat, 3 Oct 2009 13:36:29 +1000 (EST) Subject: [Melbourne-pm] OT: Re: FW: Bamboozled by perl In-Reply-To: <8ED5CF5A56E04E9F94FD1BFCA39CFE56@homepc> References: <8ED5CF5A56E04E9F94FD1BFCA39CFE56@homepc> Message-ID: On Fri, 2 Oct 2009, ajthornton wrote: > I really missed the bus with programming. If I were 18 0r 20 right now I > would go to uni or TAFE and get a Bsc in computer science. But I was in the > wrong era. It was 1992. I left school computer illiterate. I couldn't turn a > computer on or put a disk in the disk drive. I failed reasoning and data > maths [the worst freaking unit of maths ever clunked together by eduational > eggheads - teachers treated it like it was an insult to teach it; "that's a > year 8 maths unit" was said so often, never mind that a chapter had calculus > so difficult in the Rehill/macauliffe book that you wouldn't do it until the > later years of an undergraduate maths program , if then, oh man that was so > all over the shop that I wondered what the hell I had done in a previous > life to deserve such tripe.] because I couldn't operate a computer and use I went through a year after they junked Reasoning & Data, and the teachers said "We haven't had tiome to review the new books -- buy last years ones and we'll teach the appropriate chapters". That was fine by me -- secondhand books were cheaper, but I noticed all my least favourite topics came from the R&D book. > At least programming is something tnat can be learnt. There's stuff that's > "you have got it or you haven't". Music and drawing certainly fit that > category. Maths probably does. But I do think that anyone can program. Some I'd like to challenge this. These things require years of practise, but are to a certain degree learnable skills, assuming that you have the right material to learn from. I, for example, have spent countless hours playing various musical instruments. If I'd spent that amount of time drawing or doing maths, I'm sure I'd be good at them too. And why? Because I enjoy it! Natural ability certainly counts for something, but having fun probably has more effect. While it's not something I'd quote often... In every job that must be done There is an element of fun You find the fun and snap the job's a game And every task you undertake becomes a piece of cake A lark! A spree! It's very clear to see... To optimise your Perl experience for fun, it would be a good idea to cater to its strengths. Perls biggest strength is in text processing. So if you have any text processing you need to do, then Perl is the right tool for the job. Of course, it's good for other things too, but IMHO, text processing is where it really shines. HTH, --------------------------------------------------------------------- | Name: Tim Nelson | Because the Creator is, | | E-mail: wayland at wayland.id.au | I am | --------------------------------------------------------------------- ----BEGIN GEEK CODE BLOCK---- Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+>++ PGP->+++ R(+) !tv b++ DI++++ D G+ e++>++++ h! y- -----END GEEK CODE BLOCK----- From sam at nipl.net Sat Oct 3 08:16:29 2009 From: sam at nipl.net (Sam Watkins) Date: Sun, 4 Oct 2009 01:16:29 +1000 Subject: [Melbourne-pm] OT: Re: FW: Bamboozled by perl In-Reply-To: References: <8ED5CF5A56E04E9F94FD1BFCA39CFE56@homepc> Message-ID: <20091003151629.GC6003@nipl.net> > text processing is where it really shines. # perl invocation to extract email addresses from text, 4 all ur spamming needs perl -ne 'print "$1\n" while /(\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b)/ig' Sam From jdthornton at ozemail.com.au Sat Oct 3 20:53:21 2009 From: jdthornton at ozemail.com.au (ajthornton) Date: Sun, 4 Oct 2009 14:53:21 +1100 Subject: [Melbourne-pm] Scaling perl In-Reply-To: References: <8ED5CF5A56E04E9F94FD1BFCA39CFE56@homepc> Message-ID: Hello OK, I kept my promise to try to enjoy perl. I looked up some tutorials on text processing and cut and paste ane xample, before playing with it and coming up with: #!/usr/bin/perl $str = "The 34567744444444 foxes jumped over the ripe yellow pumpkin"; $str2= "The spaceman is a mutt in a spiderman suit"; $str3= "Melbourne Storm"; $comma = ','; # returns ? print length ($str); print $comma; print length ($str2); print $comma; print length ($str3); IN Padre this runs; it's a correct program. It returns 60,42,15 The original example had only str and did not put output between commas; I nutted those things out. But imagine if there were more $str say up to $str20000000000000 or whatever. Then it becomes bad to write print $comma; that many times!!!!!!!!! What a waste. Also better, come to think of it, would be to put the string lines in what I call a series [once a msths grad, always a maths grad] , say print length ($str...+ 1...$str2000000) to give a series of strings to be printed. [I expect that that example is nonsense; just made it up - I was trying to do the same thing that from memory is done in Python but in that you use i= or something] Then we could run a huge program with very little sourcecode to write. In short, for "real world" size tasks as above would the sourcecode be scalable? If so , how? Am I on the right track? I am enjoying perl! :) John From jdthornton at ozemail.com.au Sat Oct 3 21:24:29 2009 From: jdthornton at ozemail.com.au (ajthornton) Date: Sun, 4 Oct 2009 15:24:29 +1100 Subject: [Melbourne-pm] Scaling perl References: <8ED5CF5A56E04E9F94FD1BFCA39CFE56@homepc> Message-ID: <1F2A9396F03846A18D08DFEE243DA1A1@homepc> P.s pasting from padre to perl to here messed up the code; but it still works in padre. Perl. Maybe it has grown on me like a song that you don't like until you've heard it a few times. -----Original Message----- From: ajthornton [mailto:jdthornton at ozemail.com.au] Sent: Sunday, 4 October 2009 2:53 PM To: 'melbourne-pm at pm.org' Subject: Scaling perl Hello OK, I kept my promise to try to enjoy perl. I looked up some tutorials on text processing and cut and paste ane xample, before playing with it and coming up with: #!/usr/bin/perl $str = "The 34567744444444 foxes jumped over the ripe yellow pumpkin"; $str2= "The spaceman is a mutt in a spiderman suit"; $str3= "Melbourne Storm"; $comma = ','; # returns ? print length ($str); print $comma; print length ($str2); print $comma; print length ($str3); IN Padre this runs; it's a correct program. It returns 60,42,15 The original example had only str and did not put output between commas; I nutted those things out. But imagine if there were more $str say up to $str20000000000000 or whatever. Then it becomes bad to write print $comma; that many times!!!!!!!!! What a waste. Also better, come to think of it, would be to put the string lines in what I call a series [once a msths grad, always a maths grad] , say print length ($str...+ 1...$str2000000) to give a series of strings to be printed. [I expect that that example is nonsense; just made it up - I was trying to do the same thing that from memory is done in Python but in that you use i= or something] Then we could run a huge program with very little sourcecode to write. In short, for "real world" size tasks as above would the sourcecode be scalable? If so , how? Am I on the right track? I am enjoying perl! :) John From daniel at rimspace.net Sat Oct 3 21:20:22 2009 From: daniel at rimspace.net (Daniel Pittman) Date: Sun, 04 Oct 2009 15:20:22 +1100 Subject: [Melbourne-pm] Scaling perl In-Reply-To: (ajthornton's message of "Sun, 4 Oct 2009 14:53:21 +1100") References: <8ED5CF5A56E04E9F94FD1BFCA39CFE56@homepc> Message-ID: <87eipj6b95.fsf@rimspace.net> "ajthornton" writes: > OK, I kept my promise to try to enjoy perl. I looked up some tutorials on > text processing and cut and paste ane xample, before playing with it and > coming up with: > > #!/usr/bin/perl > $str = "The 34567744444444 foxes jumped over the ripe yellow pumpkin"; > $str2= "The spaceman is a mutt in a spiderman suit"; > $str3= "Melbourne Storm"; > $comma = ','; > # returns ? > print length ($str); > print $comma; > print length ($str2); > print $comma; > print length ($str3); [...] > The original example had only str and did not put output between commas; If you have hand-written the name of each string variable then, yeah, life sucks. Assuming something sensible like an array of 20,000 strings, though, your code would be roughly: my @strings = qw{one two three ... twenty-thousand}; print join(", ", map { length } @strings), "\n"; [...] > In short, for "real world" size tasks as above would the sourcecode be > scalable? If so, how? Am I on the right track? Hand-naming variables? As many as any other language, which means that by the time you are getting to ten or so you should look at using better data structures or algorithms. In my example, the "join" and "map" functions are the better algorithms: join pastes together an array of strings with a bit of text between them, which is exactly what you want to do to your three strings.[1] map runs the same code on all the values in an array; in this case we transform from the string to the length of the string. It might be clearer to explain that map is, essentially, a loop like this: my @input = (...); my @output; foreach my $_ (@input) { # whatever goes in the middle is run here my $result = ...; # in this case = length($_); } @input = @output; Regards, Daniel Footnotes: [1] print join(', ', $str, $str2, $str3); works too. -- ? Daniel Pittman ? daniel at rimspace.net ? +61 401 155 707 ? made with 100 percent post-consumer electrons Looking for work? Love Perl? In Melbourne, Australia? We are hiring. From jarich at perltraining.com.au Sun Oct 4 08:11:57 2009 From: jarich at perltraining.com.au (Jacinta Richardson) Date: Mon, 05 Oct 2009 02:11:57 +1100 Subject: [Melbourne-pm] Scaling perl In-Reply-To: <87eipj6b95.fsf@rimspace.net> References: <8ED5CF5A56E04E9F94FD1BFCA39CFE56@homepc> <87eipj6b95.fsf@rimspace.net> Message-ID: <4AC8BB3D.3000404@perltraining.com.au> Daniel Pittman wrote: > my @strings = qw{one two three ... twenty-thousand}; > print join(", ", map { length } @strings), "\n"; The only change I'd make to the above, is to show explicitly how to do this using the strings John was using (and be explicit about the argument to length()): my @strings = ( "The 34567744444444 foxes jumped over the ripe yellow pumpkin", "The spaceman is a mutt in a spiderman suit", "Melbourne Storm", ); print join( ", ", map { length $_ } @strings ), "\n"; This should print "60, 42, 15" followed by a newline. The above uses a lot of short-hand and can be written several ways. For example we can remove the map, using a foreach loop as Daniel mentioned: my @strings = ( "The 34567744444444 foxes jumped over the ripe yellow pumpkin", "The spaceman is a mutt in a spiderman suit", "Melbourne Storm", ); my @lengths; foreach my $string (@strings) { push @lengths, ( length $string ); } print join( ", ", @lengths ), "\n"; we could also generate the string before printing it, if that would be useful: my $str_of_lengths = join( ", ", @lengths ); print "$str_of_lengths\n"; but I'd only do this if we weren't planning to print it, but instead wanted to return it from a subroutine or put it into an email etc. The advantage of using an array for this kind of thing is that the code automatically works if we add a few more strings to our array. We don't have to create new variables or do any extra work. All the best, J From daniel at rimspace.net Sun Oct 4 16:30:51 2009 From: daniel at rimspace.net (Daniel Pittman) Date: Mon, 05 Oct 2009 10:30:51 +1100 Subject: [Melbourne-pm] Scaling perl In-Reply-To: <4AC8BB3D.3000404@perltraining.com.au> (Jacinta Richardson's message of "Mon, 05 Oct 2009 02:11:57 +1100") References: <8ED5CF5A56E04E9F94FD1BFCA39CFE56@homepc> <87eipj6b95.fsf@rimspace.net> <4AC8BB3D.3000404@perltraining.com.au> Message-ID: <871vlid9ec.fsf@rimspace.net> Jacinta Richardson writes: > Daniel Pittman wrote: > >> my @strings = qw{one two three ... twenty-thousand}; >> print join(", ", map { length } @strings), "\n"; > > The only change I'd make to the above, is to show explicitly how to do this > using the strings John was using (and be explicit about the argument to > length()): Thanks. Jacinta has also pointed out, privately, that my example of equivalent Perl code doesn't have exactly the same semantics as the version above. I was intending it more as a pseudo-code illustration than strictly executable code, but I didn't actually say that, so sorry for any unintended confusion I caused there. Daniel -- ? Daniel Pittman ? daniel at rimspace.net ? +61 401 155 707 ? made with 100 percent post-consumer electrons Looking for work? Love Perl? In Melbourne, Australia? We are hiring. From jdthornton at ozemail.com.au Sun Oct 4 17:37:18 2009 From: jdthornton at ozemail.com.au (ajthornton) Date: Mon, 5 Oct 2009 11:37:18 +1100 Subject: [Melbourne-pm] Melbourne-pm Digest, Vol 66, Issue 4 In-Reply-To: References: Message-ID: That is great! Because the next tutorials do teach things like loop and map and arrays! Oh what a feeling! Perl! John -----Original Message----- From: melbourne-pm-bounces+jdthornton=ozemail.com.au at pm.org [mailto:melbourne-pm-bounces+jdthornton=ozemail.com.au at pm.org] On Behalf Of melbourne-pm-request at pm.org Sent: Monday, 5 October 2009 6:01 AM To: melbourne-pm at pm.org Subject: Melbourne-pm Digest, Vol 66, Issue 4 Send Melbourne-pm mailing list submissions to melbourne-pm at pm.org To subscribe or unsubscribe via the World Wide Web, visit http://mail.pm.org/mailman/listinfo/melbourne-pm or, via email, send a message with subject or body 'help' to melbourne-pm-request at pm.org You can reach the person managing the list at melbourne-pm-owner at pm.org When replying, please edit your Subject line so it is more specific than "Re: Contents of Melbourne-pm digest..." Today's Topics: 1. Scaling perl (ajthornton) 2. Re: Scaling perl (ajthornton) 3. Re: Scaling perl (Daniel Pittman) 4. Re: Scaling perl (Jacinta Richardson) ---------------------------------------------------------------------- Message: 1 Date: Sun, 4 Oct 2009 14:53:21 +1100 From: "ajthornton" Subject: [Melbourne-pm] Scaling perl To: Message-ID: Content-Type: text/plain; charset="us-ascii" Hello OK, I kept my promise to try to enjoy perl. I looked up some tutorials on text processing and cut and paste ane xample, before playing with it and coming up with: #!/usr/bin/perl $str = "The 34567744444444 foxes jumped over the ripe yellow pumpkin"; $str2= "The spaceman is a mutt in a spiderman suit"; $str3= "Melbourne Storm"; $comma = ','; # returns ? print length ($str); print $comma; print length ($str2); print $comma; print length ($str3); IN Padre this runs; it's a correct program. It returns 60,42,15 The original example had only str and did not put output between commas; I nutted those things out. But imagine if there were more $str say up to $str20000000000000 or whatever. Then it becomes bad to write print $comma; that many times!!!!!!!!! What a waste. Also better, come to think of it, would be to put the string lines in what I call a series [once a msths grad, always a maths grad] , say print length ($str...+ 1...$str2000000) to give a series of strings to be printed. [I expect that that example is nonsense; just made it up - I was trying to do the same thing that from memory is done in Python but in that you use i= or something] Then we could run a huge program with very little sourcecode to write. In short, for "real world" size tasks as above would the sourcecode be scalable? If so , how? Am I on the right track? I am enjoying perl! :) John ------------------------------ Message: 2 Date: Sun, 4 Oct 2009 15:24:29 +1100 From: "ajthornton" Subject: Re: [Melbourne-pm] Scaling perl To: "'ajthornton'" Cc: melbourne-pm at pm.org Message-ID: <1F2A9396F03846A18D08DFEE243DA1A1 at homepc> Content-Type: text/plain; charset="us-ascii" P.s pasting from padre to perl to here messed up the code; but it still works in padre. Perl. Maybe it has grown on me like a song that you don't like until you've heard it a few times. -----Original Message----- From: ajthornton [mailto:jdthornton at ozemail.com.au] Sent: Sunday, 4 October 2009 2:53 PM To: 'melbourne-pm at pm.org' Subject: Scaling perl Hello OK, I kept my promise to try to enjoy perl. I looked up some tutorials on text processing and cut and paste ane xample, before playing with it and coming up with: #!/usr/bin/perl $str = "The 34567744444444 foxes jumped over the ripe yellow pumpkin"; $str2= "The spaceman is a mutt in a spiderman suit"; $str3= "Melbourne Storm"; $comma = ','; # returns ? print length ($str); print $comma; print length ($str2); print $comma; print length ($str3); IN Padre this runs; it's a correct program. It returns 60,42,15 The original example had only str and did not put output between commas; I nutted those things out. But imagine if there were more $str say up to $str20000000000000 or whatever. Then it becomes bad to write print $comma; that many times!!!!!!!!! What a waste. Also better, come to think of it, would be to put the string lines in what I call a series [once a msths grad, always a maths grad] , say print length ($str...+ 1...$str2000000) to give a series of strings to be printed. [I expect that that example is nonsense; just made it up - I was trying to do the same thing that from memory is done in Python but in that you use i= or something] Then we could run a huge program with very little sourcecode to write. In short, for "real world" size tasks as above would the sourcecode be scalable? If so , how? Am I on the right track? I am enjoying perl! :) John ------------------------------ Message: 3 Date: Sun, 04 Oct 2009 15:20:22 +1100 From: Daniel Pittman Subject: Re: [Melbourne-pm] Scaling perl To: melbourne-pm at pm.org Message-ID: <87eipj6b95.fsf at rimspace.net> Content-Type: text/plain; charset=utf-8 "ajthornton" writes: > OK, I kept my promise to try to enjoy perl. I looked up some tutorials on > text processing and cut and paste ane xample, before playing with it and > coming up with: > > #!/usr/bin/perl > $str = "The 34567744444444 foxes jumped over the ripe yellow pumpkin"; > $str2= "The spaceman is a mutt in a spiderman suit"; > $str3= "Melbourne Storm"; > $comma = ','; > # returns ? > print length ($str); > print $comma; > print length ($str2); > print $comma; > print length ($str3); [...] > The original example had only str and did not put output between commas; If you have hand-written the name of each string variable then, yeah, life sucks. Assuming something sensible like an array of 20,000 strings, though, your code would be roughly: my @strings = qw{one two three ... twenty-thousand}; print join(", ", map { length } @strings), "\n"; [...] > In short, for "real world" size tasks as above would the sourcecode be > scalable? If so, how? Am I on the right track? Hand-naming variables? As many as any other language, which means that by the time you are getting to ten or so you should look at using better data structures or algorithms. In my example, the "join" and "map" functions are the better algorithms: join pastes together an array of strings with a bit of text between them, which is exactly what you want to do to your three strings.[1] map runs the same code on all the values in an array; in this case we transform from the string to the length of the string. It might be clearer to explain that map is, essentially, a loop like this: my @input = (...); my @output; foreach my $_ (@input) { # whatever goes in the middle is run here my $result = ...; # in this case = length($_); } @input = @output; Regards, Daniel Footnotes: [1] print join(', ', $str, $str2, $str3); works too. -- ? Daniel Pittman ? daniel at rimspace.net ? +61 401 155 707 ? made with 100 percent post-consumer electrons Looking for work? Love Perl? In Melbourne, Australia? We are hiring. ------------------------------ Message: 4 Date: Mon, 05 Oct 2009 02:11:57 +1100 From: Jacinta Richardson Subject: Re: [Melbourne-pm] Scaling perl To: melbourne-pm at pm.org Message-ID: <4AC8BB3D.3000404 at perltraining.com.au> Content-Type: text/plain; charset=utf-8; format=flowed Daniel Pittman wrote: > my @strings = qw{one two three ... twenty-thousand}; > print join(", ", map { length } @strings), "\n"; The only change I'd make to the above, is to show explicitly how to do this using the strings John was using (and be explicit about the argument to length()): my @strings = ( "The 34567744444444 foxes jumped over the ripe yellow pumpkin", "The spaceman is a mutt in a spiderman suit", "Melbourne Storm", ); print join( ", ", map { length $_ } @strings ), "\n"; This should print "60, 42, 15" followed by a newline. The above uses a lot of short-hand and can be written several ways. For example we can remove the map, using a foreach loop as Daniel mentioned: my @strings = ( "The 34567744444444 foxes jumped over the ripe yellow pumpkin", "The spaceman is a mutt in a spiderman suit", "Melbourne Storm", ); my @lengths; foreach my $string (@strings) { push @lengths, ( length $string ); } print join( ", ", @lengths ), "\n"; we could also generate the string before printing it, if that would be useful: my $str_of_lengths = join( ", ", @lengths ); print "$str_of_lengths\n"; but I'd only do this if we weren't planning to print it, but instead wanted to return it from a subroutine or put it into an email etc. The advantage of using an array for this kind of thing is that the code automatically works if we add a few more strings to our array. We don't have to create new variables or do any extra work. All the best, J ------------------------------ _______________________________________________ Melbourne-pm mailing list Melbourne-pm at pm.org http://mail.pm.org/mailman/listinfo/melbourne-pm End of Melbourne-pm Digest, Vol 66, Issue 4 ******************************************* From toby.corkindale at strategicdata.com.au Sun Oct 4 17:52:25 2009 From: toby.corkindale at strategicdata.com.au (Toby Corkindale) Date: Mon, 05 Oct 2009 11:52:25 +1100 Subject: [Melbourne-pm] OT: Re: FW: Bamboozled by perl In-Reply-To: <20091003151629.GC6003@nipl.net> References: <8ED5CF5A56E04E9F94FD1BFCA39CFE56@homepc> <20091003151629.GC6003@nipl.net> Message-ID: <4AC94349.5080504@strategicdata.com.au> Sam Watkins wrote: >> text processing is where it really shines. > > # perl invocation to extract email addresses from text, 4 all ur spamming needs > perl -ne 'print "$1\n" while /(\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b)/ig' Which fails to match some email addresses. You may want to use these CPAN modules, which follow the appropriate RFC: http://search.cpan.org/~cwest/Regexp-Common-Email-Address-1.01/ http://search.cpan.org/~rjbs/Email-Address-1.889/ Hope this helps, Toby From sam at nipl.net Sun Oct 4 21:23:23 2009 From: sam at nipl.net (Sam Watkins) Date: Mon, 5 Oct 2009 15:23:23 +1100 Subject: [Melbourne-pm] OT: Re: FW: Bamboozled by perl In-Reply-To: <4AC94349.5080504@strategicdata.com.au> References: <8ED5CF5A56E04E9F94FD1BFCA39CFE56@homepc> <20091003151629.GC6003@nipl.net> <4AC94349.5080504@strategicdata.com.au> Message-ID: <20091005042323.GA8811@nipl.net> On Mon, Oct 05, 2009 at 11:52:25AM +1100, Toby Corkindale wrote: > Sam Watkins wrote: > >>text processing is where it really shines. > > > ># perl invocation to extract email addresses from text, 4 all ur spamming > >needs > >perl -ne 'print "$1\n" while > >/(\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b)/ig' > > Which fails to match some email addresses. > You may want to use these CPAN modules, which follow the appropriate RFC: It doesn't fail to match any email addresses that are actually used by anyone. The RFC-based regexps on email addresses are brain-damaged in the extreme, no one uses comments inside emails and all that crap. One should follow what is actually done, not the RFC. and he is not actually trying to match email addresses, is was just an example. Sam From toby.corkindale at strategicdata.com.au Sun Oct 4 21:37:23 2009 From: toby.corkindale at strategicdata.com.au (Toby Corkindale) Date: Mon, 05 Oct 2009 15:37:23 +1100 Subject: [Melbourne-pm] OT: Re: FW: Bamboozled by perl In-Reply-To: <20091005042323.GA8811@nipl.net> References: <8ED5CF5A56E04E9F94FD1BFCA39CFE56@homepc> <20091003151629.GC6003@nipl.net> <4AC94349.5080504@strategicdata.com.au> <20091005042323.GA8811@nipl.net> Message-ID: <4AC97803.4050905@strategicdata.com.au> Sam Watkins wrote: > On Mon, Oct 05, 2009 at 11:52:25AM +1100, Toby Corkindale wrote: >> Sam Watkins wrote: >>>> text processing is where it really shines. >>> # perl invocation to extract email addresses from text, 4 all ur spamming >>> needs >>> perl -ne 'print "$1\n" while >>> /(\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b)/ig' >> Which fails to match some email addresses. >> You may want to use these CPAN modules, which follow the appropriate RFC: > > It doesn't fail to match any email addresses that are actually used by anyone. I have some friends whose email addresses would not be matched. Yes, they may have intentionally picked email addresses that are uncommon, but hey, it's in the standard, so why shouldn't they? > The RFC-based regexps on email addresses are brain-damaged in the extreme, no > one uses comments inside emails and all that crap. One should follow what is > actually done, not the RFC. I don't think that "meeting the standard requirements" can be equated with "brain damaged", in fact I would say it's good software engineering - but apparently that's just a difference of opinion between us. As you say, you were just giving an example, so let's drop it here. Cheers, Toby From daniel at rimspace.net Sun Oct 4 22:01:13 2009 From: daniel at rimspace.net (Daniel Pittman) Date: Mon, 05 Oct 2009 16:01:13 +1100 Subject: [Melbourne-pm] OT: Re: FW: Bamboozled by perl In-Reply-To: <20091005042323.GA8811@nipl.net> (Sam Watkins's message of "Mon, 5 Oct 2009 15:23:23 +1100") References: <8ED5CF5A56E04E9F94FD1BFCA39CFE56@homepc> <20091003151629.GC6003@nipl.net> <4AC94349.5080504@strategicdata.com.au> <20091005042323.GA8811@nipl.net> Message-ID: <87ab06bfja.fsf@rimspace.net> Sam Watkins writes: > On Mon, Oct 05, 2009 at 11:52:25AM +1100, Toby Corkindale wrote: >> Sam Watkins wrote: >> >>text processing is where it really shines. >> > >> ># perl invocation to extract email addresses from text, 4 all ur spamming >> >needs >> >perl -ne 'print "$1\n" while >> >/(\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b)/ig' >> >> Which fails to match some email addresses. >> You may want to use these CPAN modules, which follow the appropriate RFC: > > It doesn't fail to match any email addresses that are actually used by > anyone. Sure it does. Perhaps you meant to say: It doesn't fail to match any email addresses that I have seen in use, or that I have cared about when extracting this sort of information. > The RFC-based regexps on email addresses are brain-damaged in the extreme, ...yeah, probably. Regexp is a dreadful tool for trying to parse the syntax specified in RCF-822 and descendants. > no one uses comments inside emails and all that crap. Sure they do. I know several people who have done so precisely *because* it reduces the number of tools that can recognise their address ? it turns out that spammers, like you, make all sorts of assumptions about what actually happens... > One should follow what is actually done, not the RFC. Not a bad general policy, but... with the but being that (A) you have been given proof that this does actually happen, and (B) the RFC specified syntax is a superset of the "practice" you are talking about. > and he is not actually trying to match email addresses, is was just an > example. Ah. The same problem I ran into earlier, with my faulty pseudo-code in Perl. Incorrect advice isn't a good thing; people tend to follow it, then run into trouble, and wonder why things are harder than they should be... Daniel -- ? Daniel Pittman ? daniel at rimspace.net ? +61 401 155 707 ? made with 100 percent post-consumer electrons Looking for work? Love Perl? In Melbourne, Australia? We are hiring. From sam at nipl.net Sun Oct 4 23:05:17 2009 From: sam at nipl.net (Sam Watkins) Date: Mon, 5 Oct 2009 17:05:17 +1100 Subject: [Melbourne-pm] OT: Re: FW: Bamboozled by perl In-Reply-To: <87ab06bfja.fsf@rimspace.net> References: <8ED5CF5A56E04E9F94FD1BFCA39CFE56@homepc> <20091003151629.GC6003@nipl.net> <4AC94349.5080504@strategicdata.com.au> <20091005042323.GA8811@nipl.net> <87ab06bfja.fsf@rimspace.net> Message-ID: <20091005060517.GA22078@nipl.net> On Mon, Oct 05, 2009 at 04:01:13PM +1100, Daniel Pittman wrote: > > no one uses comments inside emails and all that crap. > > Sure they do. I know several people who have done so precisely *because* it > reduces the number of tools that can recognise their address ? it turns out > that spammers, like you, make all sorts of assumptions about what actually > happens... Excellent, then my tool is doing the right thing by ignoring your friends' email addresses, as they wish for them to be ignored. ffs how much pedantic bullshit discussion do we need to have about a one-line hack? Would that one-liner be better if it used a 10 line POS RFC-conformant regexp? read this if you care that much: http://www.regular-expressions.info/email.html !@#$!@#%!#@$!@#$!@#$!@$ <- perl code expressing my pedanticidal mood (I'm grumpy already because of some bullshit on a different list.) From cas at taz.net.au Mon Oct 5 03:03:32 2009 From: cas at taz.net.au (Craig Sanders) Date: Mon, 5 Oct 2009 21:03:32 +1100 Subject: [Melbourne-pm] OT: Re: FW: Bamboozled by perl In-Reply-To: <4AC97803.4050905@strategicdata.com.au> References: <8ED5CF5A56E04E9F94FD1BFCA39CFE56@homepc> <20091003151629.GC6003@nipl.net> <4AC94349.5080504@strategicdata.com.au> <20091005042323.GA8811@nipl.net> <4AC97803.4050905@strategicdata.com.au> Message-ID: <20091005100332.GB1435@taz.net.au> On Mon, Oct 05, 2009 at 03:37:23PM +1100, Toby Corkindale wrote: > I don't think that "meeting the standard requirements" can be > equated with "brain damaged", in fact I would say it's good software > engineering - but apparently that's just a difference of opinion > between us. true. the rule of thumb to use here is, as always, "be liberal in what you accept, but strict in what you emit". in this case, "liberal" means if you're going to try matching email addresses then you have to match every possible valid email address, not just an arbitrary subset. fortunately, the RFCs have very precise definitions of what a valid email address can be, and there are perl modules which can parse any matching address. craig PS: variations of this are bugs that i run across quite frequently - there are far too many cretinous web site developers who think, for example, that "+" isn't a valid character in email addresses. or they don't think about it at all and are just lazy. -- craig sanders From jdthornton at ozemail.com.au Wed Oct 7 20:05:22 2009 From: jdthornton at ozemail.com.au (John Thornton) Date: Thu, 8 Oct 2009 14:05:22 +1100 Subject: [Melbourne-pm] OT[sort of] plain hashing text passwords Message-ID: Hello Yesterday I succeeded in getting Ruby on Rails working with mysql to get a localhost website for web development. There is only one thing that befuddles me: when I edited the .yml database file with netbeans it said that I should do a plain text hash of the mysql/.yml databse password. That is double dutch to me. I've tried Google. But it is one of those questions where you don't know what to google. The next generation of intelligent heuristic browsers will be good in such a case. Anyway, ruby on rail forums haven't proven to be any use. So, does anyone here know how to hash/encrypt/disguise passwords that are in plain text, as the password is on my computer in the .yml file. John -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjc at wintrmute.net Wed Oct 7 20:10:27 2009 From: tjc at wintrmute.net (Toby Wintermute) Date: Thu, 8 Oct 2009 14:10:27 +1100 Subject: [Melbourne-pm] OT[sort of] plain hashing text passwords In-Reply-To: References: Message-ID: 2009/10/8 John Thornton : > ???????????????????????? So, does anyone here know how to > hash/encrypt/disguise passwords that are in plain text, as the password is > on my computer in the .yml file. use Digest::SHA; my $password = "secret_password"; my $sha = Digest::SHA->new; $sha->add($password); print "My hashed result is: " . $sha->hexdigest ."\n"; From david.warring at gmail.com Wed Oct 7 21:35:27 2009 From: david.warring at gmail.com (David Warring) Date: Thu, 8 Oct 2009 15:35:27 +1100 Subject: [Melbourne-pm] OT[sort of] plain hashing text passwords In-Reply-To: References: Message-ID: This is better, but still open to compromise. The problem is that the hashing is predictable. Weaker to medium strength passwords can be fairly easily discovered, considered: #!/usr/bin/perl $password = "hello"; $sha->add($password); print $sha->hexdigest; This produces: aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d Try googling this! You'll see pages of matches for the hex string, from which you can originally discover the original password. This type of attack can be thwarted by salting the password, ie prepending some random characters to both the input string and output digest: See http://www.perlmonks.org/index.pl?node_id=469789 for an example that combines SHA digests with salting. Cheers David On Thu, Oct 8, 2009 at 2:10 PM, Toby Wintermute wrote: > 2009/10/8 John Thornton : > > So, does anyone here know how to > > hash/encrypt/disguise passwords that are in plain text, as the password > is > > on my computer in the .yml file. > > use Digest::SHA; > my $password = "secret_password"; > my $sha = Digest::SHA->new; > $sha->add($password); > print "My hashed result is: " . $sha->hexdigest ."\n"; > _______________________________________________ > Melbourne-pm mailing list > Melbourne-pm at pm.org > http://mail.pm.org/mailman/listinfo/melbourne-pm -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjc at wintrmute.net Wed Oct 7 21:41:14 2009 From: tjc at wintrmute.net (Toby Wintermute) Date: Thu, 8 Oct 2009 15:41:14 +1100 Subject: [Melbourne-pm] OT[sort of] plain hashing text passwords In-Reply-To: References: Message-ID: 2009/10/8 David Warring : > This is better, but still open to compromise. > > The problem is that the hashing is predictable. Weaker to medium strength > passwords can be fairly easily discovered, considered: > > ?#!/usr/bin/perl > ?$password = "hello"; > ?$sha->add($password); > ?print $sha->hexdigest; > > This produces: aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d > > Try googling this! You'll see pages of matches for the hex string, from > which you can originally discover the original password. Well, yes, because the password was "hello". If you're using a password like "hello" or "qwerty" or "password" then you have a bigger problem -- someone doesn't even need to google for the password hash. They will just try a brute-force dictionary attack and pick your password up quickly. Salting the hash doesn't protect against that. I think it's better to prevent users from setting such passwords altogether. That said, it doesn't *hurt* to salt the hash, and does have a few benefits as you've pointed out. Toby From sam at nipl.net Fri Oct 9 09:38:25 2009 From: sam at nipl.net (Sam Watkins) Date: Sat, 10 Oct 2009 03:38:25 +1100 Subject: [Melbourne-pm] OT[sort of] plain hashing text passwords In-Reply-To: References: Message-ID: <20091009163825.GA17041@nipl.net> On Thu, Oct 08, 2009 at 03:35:27PM +1100, David Warring wrote: > This type of attack can be thwarted by salting the password, ie prepending > some random characters to both the input string and output digest: Another method is used by the tool "hashalot", you salt your password or whatever, and hash it then hash the hash repeatedly perhaps 1000000 times, you can fold your password back in or use whatever method you like. This takes a significant amount of time, on the order of seconds. A brute force attack will then take 1000000 times longer than it otherwise might. You might not have the CPU power to use that method in a web app though. Sam From jarich at perltraining.com.au Mon Oct 12 05:40:07 2009 From: jarich at perltraining.com.au (Jacinta Richardson) Date: Mon, 12 Oct 2009 23:40:07 +1100 Subject: [Melbourne-pm] Next meeting tomorrow night: Wednesday 14th October Message-ID: <4AD323A7.7040101@perltraining.com.au> G'day folk, I don't think anything's been organised for Wednesday's meeting. Paul's teaching in Sydney and I'll be acting as a taxi for some family members, so unfortunately someone else will have to make a plan. Failing that, the lovely people in substandards (as opposed to pubstandards) are meeting at the Barcode (bar? pub?) on 211 La Trobe Street, at 6:30pm. So you could all go and join them for some random technical talking. J -- ("`-''-/").___..--''"`-._ | Jacinta Richardson | `6_ 6 ) `-. ( ).`-.__.`) | Perl Training Australia | (_Y_.)' ._ ) `._ `. ``-..-' | +61 3 9354 6001 | _..`--'_..-_/ /--'_.' ,' | contact at perltraining.com.au | (il),-'' (li),' ((!.-' | www.perltraining.com.au | From sgc294 at internode.on.net Mon Oct 12 15:36:57 2009 From: sgc294 at internode.on.net (andrew Dent) Date: Tue, 13 Oct 2009 09:36:57 +1100 Subject: [Melbourne-pm] Next meeting tomorrow night: Wednesday 14th October In-Reply-To: <4AD323A7.7040101@perltraining.com.au> References: <4AD323A7.7040101@perltraining.com.au> Message-ID: <4AD3AF89.5080408@internode.on.net> G'day Jacinta I've never heard of substandards. Can you give some more info as to what this group of people is about? Is there a website with info? Cheers Andrew Jacinta Richardson wrote: > G'day folk, > > I don't think anything's been organised for Wednesday's meeting. Paul's > teaching in Sydney and I'll be acting as a taxi for some family members, so > unfortunately someone else will have to make a plan. > > Failing that, the lovely people in substandards (as opposed to pubstandards) are > meeting at the Barcode (bar? pub?) on 211 La Trobe Street, at 6:30pm. So you > could all go and join them for some random technical talking. > > J > > From jarich at perltraining.com.au Mon Oct 12 16:56:13 2009 From: jarich at perltraining.com.au (Jacinta Richardson) Date: Tue, 13 Oct 2009 10:56:13 +1100 Subject: [Melbourne-pm] Next meeting tomorrow night: Wednesday 14th October In-Reply-To: <4AD3AF89.5080408@internode.on.net> References: <4AD323A7.7040101@perltraining.com.au> <4AD3AF89.5080408@internode.on.net> Message-ID: <4AD3C21D.2030406@perltraining.com.au> andrew Dent wrote: > I've never heard of substandards. > Can you give some more info as to what this group of people is about? > Is there a website with info? Sub Standards is a joke on Pub Standards (http://pubstandards.org/). "Pubstandards meet-ups are for social web-types. Join us for beer, web-talk, and other general waffle. PubStandards meet-ups happen once a month at the same venue. SubStandards meet-ups occur between PubStandards meet-ups and are always at different venues." Clearly spacing and capitalisation need not be consistent. ;) I think it was Ben Balbo who tried to start up PubStandards in Melbourne, but for some reason (I think venue related) it didn't last, and so we just have approximately monthly Substandards meet-ups between the last PubStandard meeting and the next one.... ;) Attendees are mostly techie, open source people, and you'd probably be surprised at how many you know. A somewhat out-of-date wiki for the Melbourne event is kept at: http://pubstandards.org/asia_pacific/australia/melbourne This is as much my fault as anyone else's as I'm sure I could easily get an account and updated, but I haven't. Despite what it says, I assure you that the real next meeting is tomorrow night. J From melbourne-pm at popcorn.cx Tue Oct 13 22:12:15 2009 From: melbourne-pm at popcorn.cx (Stephen Edmonds) Date: Wed, 14 Oct 2009 16:12:15 +1100 Subject: [Melbourne-pm] Next meeting tomorrow night: Wednesday 14th October In-Reply-To: <4AD3C21D.2030406@perltraining.com.au> References: <4AD323A7.7040101@perltraining.com.au> <4AD3AF89.5080408@internode.on.net> <4AD3C21D.2030406@perltraining.com.au> Message-ID: <4AD55DAF.3070103@popcorn.cx> I'm surprised nobody else has commented on our lack of meeting tonight :( but maybe people missed the melb.pm emails because they were filtered as spam: http://log.perl.org/2009/10/blackholes.html A reminder that all are welcome tonight. Now, Barcode (http://www.eatability.com.au/au/melbourne/barcode/) was chosen at random from a big list. If it isn't suitable (usually a meal and beers) then we might go somewhere else. Thanks, Stephen Jacinta Richardson wrote: > andrew Dent wrote: > >> I've never heard of substandards. >> Can you give some more info as to what this group of people is about? >> Is there a website with info? > > Sub Standards is a joke on Pub Standards (http://pubstandards.org/). > > "Pubstandards meet-ups are for social web-types. Join us for beer, > web-talk, and other general waffle. > > PubStandards meet-ups happen once a month at the same venue. > SubStandards meet-ups occur between PubStandards meet-ups and are always > at different venues." > > Clearly spacing and capitalisation need not be consistent. ;) I think > it was Ben Balbo who tried to start up PubStandards in Melbourne, but > for some reason (I think venue related) it didn't last, and so we just > have approximately monthly Substandards meet-ups between the last > PubStandard meeting and the next one.... ;) Attendees are mostly > techie, open source people, and you'd probably be surprised at how many > you know. > > A somewhat out-of-date wiki for the Melbourne event is kept at: > http://pubstandards.org/asia_pacific/australia/melbourne This is as > much my fault as anyone else's as I'm sure I could easily get an account > and updated, but I haven't. Despite what it says, I assure you that the > real next meeting is tomorrow night. > > J > > _______________________________________________ > Melbourne-pm mailing list > Melbourne-pm at pm.org > http://mail.pm.org/mailman/listinfo/melbourne-pm From tjc at wintrmute.net Tue Oct 13 22:23:44 2009 From: tjc at wintrmute.net (Toby Wintermute) Date: Wed, 14 Oct 2009 16:23:44 +1100 Subject: [Melbourne-pm] Next meeting tomorrow night: Wednesday 14th October In-Reply-To: <4AD55DAF.3070103@popcorn.cx> References: <4AD323A7.7040101@perltraining.com.au> <4AD3AF89.5080408@internode.on.net> <4AD3C21D.2030406@perltraining.com.au> <4AD55DAF.3070103@popcorn.cx> Message-ID: Ah.. Yeah, I had missed the emails. I was wondering what was up.. It also makes me think I should check my own postfix configs.. Which DNSBL was it? As it is, I'm feeling ill today and think I will resist attempting to infect everyone else, and just go home and mope. (I can't even play my PC games at home thanks to bloody DRM wanting to online-verify them. Gah! I wouldn't have this problem if I'd pirated them! *insert further grumble about how long it takes to get adsl connected*) Cheers, Toby 2009/10/14 Stephen Edmonds : > I'm surprised nobody else has commented on our lack of meeting tonight :( > but maybe people missed the melb.pm emails because they were filtered as > spam: http://log.perl.org/2009/10/blackholes.html > > A reminder that all are welcome tonight. > > Now, Barcode (http://www.eatability.com.au/au/melbourne/barcode/) was chosen > at random from a big list. ?If it isn't suitable (usually a meal and beers) > then we might go somewhere else. From daniel at rimspace.net Tue Oct 13 22:52:57 2009 From: daniel at rimspace.net (Daniel Pittman) Date: Wed, 14 Oct 2009 16:52:57 +1100 Subject: [Melbourne-pm] Next meeting tomorrow night: Wednesday 14th October In-Reply-To: (Toby Wintermute's message of "Wed, 14 Oct 2009 16:23:44 +1100") References: <4AD323A7.7040101@perltraining.com.au> <4AD3AF89.5080408@internode.on.net> <4AD3C21D.2030406@perltraining.com.au> <4AD55DAF.3070103@popcorn.cx> Message-ID: <877huyjzd2.fsf@rimspace.net> Toby Wintermute writes: > Ah.. Yeah, I had missed the emails. I was wondering what was up.. > It also makes me think I should check my own postfix configs.. Which > DNSBL was it? Well, blackhole.us, which supplied IP->country mapping, went hostile around that sort of time... Daniel -- ? Daniel Pittman ? daniel at rimspace.net ? +61 401 155 707 ? made with 100 percent post-consumer electrons Looking for work? Love Perl? In Melbourne, Australia? We are hiring. From ddick at iinet.net.au Wed Oct 14 03:21:52 2009 From: ddick at iinet.net.au (David Dick) Date: Wed, 14 Oct 2009 21:21:52 +1100 Subject: [Melbourne-pm] Senior Perl Programmer wanted Message-ID: <4AD5A640.1000608@iinet.net.au> Remasys is looking to hire a senior Perl programmer. We need someone who is very comfortable with programming in a linux environment, using CPAN and mysql. This is not a web/html job, instead the primary focus will be on improving/extending the functionality of a set of unix daemons and helping with the installation/setup of Remasys software at new client sites. An additional responsibility will be maintaining the build environment. Extra points are awarded for familiarity with branching, tagging, the FHS, atomic filesystem operations and oddly enough any experience with Win32 gui programming. Remasys is actively engaged in maintaining and selling two products, a systems management product and a file transfer product that you will be required to maintain and extend. As part of the job, you will get exposed to a wide variety of protocols, rfcs and software installations and expected to get involved with understanding, mapping out and automating complex environments as well as creating tools to make it easier to carry out these processes. Our office is on flinders st opposite federation square, quite close to the station. We have a small group of skilled people working in a open plan environment and the development model would be classified as agile. The director comes from a technical background, so it is easy to discuss requirements and make proposals for improvements. Required overtime is definitely the exception rather the rule and time-in-lieu is happily granted on all such occasions. If anyone is interested and available, please send a resume to jobs at remasys.com. Happy to talk off-list if anyone wants to ask questions. From pjf at perltraining.com.au Wed Oct 14 18:33:49 2009 From: pjf at perltraining.com.au (Paul Fenwick) Date: Thu, 15 Oct 2009 12:33:49 +1100 Subject: [Melbourne-pm] Senior Perl Programmer wanted In-Reply-To: <4AD5A640.1000608@iinet.net.au> References: <4AD5A640.1000608@iinet.net.au> Message-ID: <4AD67BFD.1040201@perltraining.com.au> David Dick wrote: > Remasys is looking to hire a senior Perl programmer. For the benefit of the list, Remasys also hosts Melbourne.pm each month, so getting to meetings from work should prove to be very easy for the successful applicant. ;) Paul -- Paul Fenwick | http://perltraining.com.au/ Director of Training | Ph: +61 3 9354 6001 Perl Training Australia | Fax: +61 3 9354 2681 From jarich at perltraining.com.au Sun Oct 18 03:35:24 2009 From: jarich at perltraining.com.au (Jacinta Richardson) Date: Sun, 18 Oct 2009 21:35:24 +1100 Subject: [Melbourne-pm] Submit your talk to the Open Programming Languages Mini-conf, LCA2010 Message-ID: <4ADAEF6C.3030805@perltraining.com.au> G'day folk, If you're not intending to go to LCA next year, please ignore this message. So far there has been only one Perl proposal to the Open Programming Languages Mini-conf. There have been many PHP talks submitted however. I know that Paul and I clearly need to get our acts into gear, but perhaps you'd like to submit something too! Our CFP can be found here: http://blogs.tucs.org.au/oplm/cfp/ and we've extended the deadline until this Friday 23rd October. Please submit. If you want help putting together a proposal, send it through to this list and we can talk ideas, wording etc. Ideas I'd be very happy to see: * A tour of CPAN (my [your] favourite 10 modules) * Your Perl build chain to make it easy to install your application * An introduction to [your favourite module] * How to create [something cool] in [some small number] lines of Perl. (for example 2-d barcodes) * How Perl made [hard problem] easy. Please submit more Perl talks! All the best, J From ben at benbalbo.com Wed Oct 28 05:33:47 2009 From: ben at benbalbo.com (Ben Balbo) Date: Wed, 28 Oct 2009 23:33:47 +1100 Subject: [Melbourne-pm] OSDC 2009 Early Bird Ends Friday Message-ID: <4AE83A2B.5010609@benbalbo.com> Hi all! Here's a message from OSDC - hope to see some of you there! Please feel free to forward this to anyone that might be interested. This is your last chance to get early bird registration for the Open Source Developers Conference, 2009. Places are running out and the discount ends on the 30th, so get in quick! The Open Source Developers' Conference is a conference run by open source developers, for developers and business people. It covers numerous programming languages across a range of operating systems, and related topics such as business processes, licensing, and strategy. Talks vary from introductory pieces through to the deeply technical. OSDC 2009 will be held at the Bardon Conference Center in Brisbane, Queensland, Australia from the 25th to the 27th of November, 2009. Our programme includes a great array of good speakers, and can be viewed here: http://2009.osdc.com.au/programme Prices: Early bird $275, standard price $300. Early bird ends the 30th of October. You can register for the conference at http://2009.osdc.com.au/register ---- If you're going to be in Brisbane on the 24th of November, you might wish to attend Upstarta Camp: a picnic in the park. A workshop follows a barbecue in the afternoon and while there's no firm cap on numbers at the moment, you'd best register early to ensure you get a place. More info and registration: http://upstarta.biz/Main/UpstartaCamp When: Tuesday 24 November (afternoon before first OSDC day), 12pm-5pm Where: Brisbane, Mt Coot-Tha / Bardon area (near OSDC venue) Cost: $10 for members, $20 for non-members ---- For more information, please feel free to contact us on conference at osdc.com.au -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 260 bytes Desc: OpenPGP digital signature URL: From alec.clews at gmail.com Wed Oct 28 05:49:11 2009 From: alec.clews at gmail.com (Alec Clews) Date: Wed, 28 Oct 2009 23:49:11 +1100 Subject: [Melbourne-pm] Google Wave Anyone? Message-ID: <1256734151.2458.10.camel@k11> Hello, In a vain attempt to find something useful to do with Google Wave I have started a MELB PM Wave. Contact me at alecclews at googlewave.com to be added. Sorry - I don't have any Google wave invites to give out :-( I am not worthy.... -- Alec Clews Personal Melbourne, Australia. Jabber: alecclews at jabber.org.au PGPKey ID: 0x9BBBFC7C Blog http://alecthegeek.wordpress.com/ From tjc at wintrmute.net Wed Oct 28 17:29:35 2009 From: tjc at wintrmute.net (Toby Wintermute) Date: Thu, 29 Oct 2009 11:29:35 +1100 Subject: [Melbourne-pm] Google Wave Anyone? In-Reply-To: <1256734151.2458.10.camel@k11> References: <1256734151.2458.10.camel@k11> Message-ID: 2009/10/28 Alec Clews : > Hello, > > In a vain attempt to find something useful to do with Google Wave I have > started a MELB PM Wave. > > Contact me at alecclews at googlewave.com to be added. I'm sad that I've had to brush up on Javascript in order to use Wave stuff. (And Java for Android) Waah.. Where's the Perl love gone? In other news; I'm liking Moose a lot, especially since the .9 release with all the built-in attributes and corresponding traits.. but I'm curious to know what everyone else thinks of Moose. It's evidently superior to Perl's existing OO framework, which has been showing it's age and tacked-on-afterwards feel for a long time.. but on the other hand, Moose involves learning a quite different syntax, and in some ways you're barely working in Perl.. and if you wanted to learn whole new syntax, you could have learnt Ruby or Jython or NOOP instead. I see Moose as good because it enables you to update Perl and it's objects, while still retaining compatibility with existing code and CPAN. I think we all agree that CPAN is a major strength of Perl. UNLIKE fun things like DBIx::Class or Catalyst, Moose only has a few dependencies so it's not hard to install, or persuade your sysadmins to install. (Although of course, the debian-stable packaged version is too old to really satisfy.) However, Moose does really appreciate a Perl 5.10.x running it; it'll work fine on 5.8.x but you get a measureable performance hit. (But hey, when even Debian is packaging perl 5.10, you *know* you're behind the times if you're still on 5.8, right?) What are your feelings on the matter? Cheers, Toby -- Turning and turning in the widening gyre The falcon cannot hear the falconer Things fall apart; the center cannot hold Mere anarchy is loosed upon the world From wayland at wayland.id.au Wed Oct 28 20:51:34 2009 From: wayland at wayland.id.au (Timothy S. Nelson) Date: Thu, 29 Oct 2009 14:51:34 +1100 (EST) Subject: [Melbourne-pm] Google Wave Anyone? In-Reply-To: References: <1256734151.2458.10.camel@k11> Message-ID: On Thu, 29 Oct 2009, Toby Wintermute wrote: > In other news; I'm liking Moose a lot, especially since the .9 release > with all the built-in attributes and corresponding traits.. but I'm > curious to know what everyone else thinks of Moose. > It's evidently superior to Perl's existing OO framework, which has > been showing it's age and tacked-on-afterwards feel for a long time.. > but on the other hand, Moose involves learning a quite different > syntax, and in some ways you're barely working in Perl.. and if you > wanted to learn whole new syntax, you could have learnt Ruby or Jython > or NOOP instead. From what I'm told, Moose is much more like Perl 6 than the old stuff. Disclaimer: you'll find my name on some of the Perl 6 documents (mostly I reorganised stuff that was already there). Think of Moose as a way of getting a head start on Perl 6 :), keeping in mind that Rakudo Star comes out in April. > However, Moose does really appreciate a Perl 5.10.x running it; it'll > work fine on 5.8.x but you get a measureable performance hit. (But > hey, when even Debian is packaging perl 5.10, you *know* you're behind > the times if you're still on 5.8, right?) CentOS version 5.3 has Perl 5.8. :) --------------------------------------------------------------------- | Name: Tim Nelson | Because the Creator is, | | E-mail: wayland at wayland.id.au | I am | --------------------------------------------------------------------- ----BEGIN GEEK CODE BLOCK---- Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+>++ PGP->+++ R(+) !tv b++ DI++++ D G+ e++>++++ h! y- -----END GEEK CODE BLOCK----- From jarich at perltraining.com.au Wed Oct 28 21:35:55 2009 From: jarich at perltraining.com.au (Jacinta Richardson) Date: Thu, 29 Oct 2009 15:35:55 +1100 Subject: [Melbourne-pm] OSDC 2009 Early Bird Ends Friday 30th October Message-ID: <4AE91BAB.2060202@perltraining.com.au> This is your last chance to get early bird registration for the Open Source Developers Conference, 2009. Places are running out and the discount ends on the 30th, so get in quick! The Open Source Developers' Conference is a conference run by open source developers, for developers and business people. It covers numerous programming languages across a range of operating systems, and related topics such as business processes, licensing, and strategy. Talks vary from introductory pieces through to the deeply technical. OSDC 2009 will be held at the Bardon Conference Center in Brisbane, Queensland, Australia from the 25th to the 27th of November, 2009. Our programme includes a great array of good speakers, and can be viewed here: http://2009.osdc.com.au/programme Prices: Early bird $275, standard price $300. Early bird ends the 30th of October. You can register for the conference at http://2009.osdc.com.au/register ---- If you're going to be in Brisbane on the 24th of November, you might wish to attend Upstarta Camp: a picnic in the park. A workshop follows a barbecue in the afternoon and while there's no firm cap on numbers at the moment, you'd best register early to ensure you get a place. More info and registration: http://upstarta.biz/Main/UpstartaCamp When: Tuesday 24 November (afternoon before first OSDC day), 12pm-5pm Where: Brisbane, Mt Coot-Tha / Bardon area (near OSDC venue) Cost: $10 for members, $20 for non-members ---- For more information, please feel free to contact us on conference at osdc.com.au From daniel at rimspace.net Wed Oct 28 21:51:02 2009 From: daniel at rimspace.net (Daniel Pittman) Date: Thu, 29 Oct 2009 15:51:02 +1100 Subject: [Melbourne-pm] Google Wave Anyone? In-Reply-To: (Toby Wintermute's message of "Thu, 29 Oct 2009 11:29:35 +1100") References: <1256734151.2458.10.camel@k11> Message-ID: <87r5smajm1.fsf@rimspace.net> Toby Wintermute writes: [...] > In other news; I'm liking Moose a lot, especially since the .9 release > with all the built-in attributes and corresponding traits.. but I'm > curious to know what everyone else thinks of Moose. > > It's evidently superior to Perl's existing OO framework, which has been > showing it's age and tacked-on-afterwards feel for a long time.. Well, Moose is pretty much just syntax sugar and convention, sitting over the top of the traditional Perl OO design. Aside from the crazy syntax hacks like Method::Signature, it really doesn't do that much different... Daniel ...just much, much nicer. :) -- ? Daniel Pittman ? daniel at rimspace.net ? +61 401 155 707 ? made with 100 percent post-consumer electrons Looking for work? Love Perl? In Melbourne, Australia? We are hiring. From toby.corkindale at strategicdata.com.au Wed Oct 28 22:18:03 2009 From: toby.corkindale at strategicdata.com.au (Toby Corkindale) Date: Thu, 29 Oct 2009 16:18:03 +1100 Subject: [Melbourne-pm] Google Wave Anyone? In-Reply-To: <87r5smajm1.fsf@rimspace.net> References: <1256734151.2458.10.camel@k11> <87r5smajm1.fsf@rimspace.net> Message-ID: <4AE9258B.3010508@strategicdata.com.au> Daniel Pittman wrote: > Toby Wintermute writes: > > [...] > >> In other news; I'm liking Moose a lot, especially since the .9 release >> with all the built-in attributes and corresponding traits.. but I'm >> curious to know what everyone else thinks of Moose. >> >> It's evidently superior to Perl's existing OO framework, which has been >> showing it's age and tacked-on-afterwards feel for a long time.. > > Well, Moose is pretty much just syntax sugar and convention, sitting over the > top of the traditional Perl OO design. Aside from the crazy syntax hacks like > Method::Signature, it really doesn't do that much different... Mmm, doesn't Moose implement "diamond" inheritance too? (Although I suppose one could get that with Class::C3 outside of Moose if they desired) From megamic at gmail.com Wed Oct 28 23:11:10 2009 From: megamic at gmail.com (Michael Potter) Date: Thu, 29 Oct 2009 17:11:10 +1100 Subject: [Melbourne-pm] Google Wave Anyone? In-Reply-To: <87r5smajm1.fsf@rimspace.net> References: <1256734151.2458.10.camel@k11> <87r5smajm1.fsf@rimspace.net> Message-ID: <167f9c460910282311q1ee4ca74ifadae081e5f2b785@mail.gmail.com> On Thu, Oct 29, 2009 at 3:51 PM, Daniel Pittman wrote: > Toby Wintermute writes: > > [...] > > > In other news; I'm liking Moose a lot, especially since the .9 release > > with all the built-in attributes and corresponding traits.. but I'm > > curious to know what everyone else thinks of Moose. > > > > It's evidently superior to Perl's existing OO framework, which has been > > showing it's age and tacked-on-afterwards feel for a long time.. > > Well, Moose is pretty much just syntax sugar and convention, sitting over > the > top of the traditional Perl OO design. Err....no. Moose allows for idioms that are rarely if ever used in conventional Perl OO programming. For example composition/delegation, method currying, built in type definition and validation, attribute traits, roles, full meta-class reflection and so much more. Once you start programming in Moose you will adopt an entirely new way of thinking about OO programming that leaves old-school Perl OO in the dust. > Aside from the crazy syntax hacks like > Method::Signature, it really doesn't do that much different... > > Daniel > > ...just much, much nicer. :) > > -- > ? Daniel Pittman ? daniel at rimspace.net ? +61 401 155 > 707 > ? made with 100 percent post-consumer electrons > Looking for work? Love Perl? In Melbourne, Australia? We are hiring. > _______________________________________________ > Melbourne-pm mailing list > Melbourne-pm at pm.org > http://mail.pm.org/mailman/listinfo/melbourne-pm > -------------- next part -------------- An HTML attachment was scrubbed... URL: From daniel at rimspace.net Wed Oct 28 23:11:47 2009 From: daniel at rimspace.net (Daniel Pittman) Date: Thu, 29 Oct 2009 17:11:47 +1100 Subject: [Melbourne-pm] Google Wave Anyone? In-Reply-To: <4AE9258B.3010508@strategicdata.com.au> (Toby Corkindale's message of "Thu, 29 Oct 2009 16:18:03 +1100") References: <1256734151.2458.10.camel@k11> <87r5smajm1.fsf@rimspace.net> <4AE9258B.3010508@strategicdata.com.au> Message-ID: <87ljiuafvg.fsf@rimspace.net> Toby Corkindale writes: > Daniel Pittman wrote: >> Toby Wintermute writes: >> >> [...] >> >>> In other news; I'm liking Moose a lot, especially since the .9 release >>> with all the built-in attributes and corresponding traits.. but I'm >>> curious to know what everyone else thinks of Moose. >>> >>> It's evidently superior to Perl's existing OO framework, which has been >>> showing it's age and tacked-on-afterwards feel for a long time.. >> >> Well, Moose is pretty much just syntax sugar and convention, sitting over the >> top of the traditional Perl OO design. Aside from the crazy syntax hacks like >> Method::Signature, it really doesn't do that much different... > > Mmm, doesn't Moose implement "diamond" inheritance too? (Although I suppose > one could get that with Class::C3 outside of Moose if they desired) That is a fair cop: yes, Moose imports Class::C3, so gets a saner multiple inheritance search order than stock Perl. OTOH, Perl itself is importing C3 into core because the alternatives are pretty crazy. I /think/ that is about the last bit of difference though. Daniel -- ? Daniel Pittman ? daniel at rimspace.net ? +61 401 155 707 ? made with 100 percent post-consumer electrons Looking for work? Love Perl? In Melbourne, Australia? We are hiring. From daniel at rimspace.net Wed Oct 28 23:23:41 2009 From: daniel at rimspace.net (Daniel Pittman) Date: Thu, 29 Oct 2009 17:23:41 +1100 Subject: [Melbourne-pm] Google Wave Anyone? In-Reply-To: <167f9c460910282311q1ee4ca74ifadae081e5f2b785@mail.gmail.com> (Michael Potter's message of "Thu, 29 Oct 2009 17:11:10 +1100") References: <1256734151.2458.10.camel@k11> <87r5smajm1.fsf@rimspace.net> <167f9c460910282311q1ee4ca74ifadae081e5f2b785@mail.gmail.com> Message-ID: <87aazaafbm.fsf@rimspace.net> Michael Potter writes: > On Thu, Oct 29, 2009 at 3:51 PM, Daniel Pittman wrote: >> Toby Wintermute writes: >> >> [...] >> >> > In other news; I'm liking Moose a lot, especially since the .9 release > >> with all the built-in attributes and corresponding traits.. but I'm > >> curious to know what everyone else thinks of Moose. > > It's evidently >> superior to Perl's existing OO framework, which has been > showing it's age >> and tacked-on-afterwards feel for a long time.. >> >> Well, Moose is pretty much just syntax sugar and convention, sitting over >> the top of the traditional Perl OO design. > > Err....no. Moose allows for idioms that are rarely if ever used in > conventional Perl OO programming. Absolutely. > For example composition/delegation, method currying, built in type > definition and validation, attribute traits, roles, full meta-class > reflection and so much more. ...but all of those are *possible* with standard Perl OO, right? Method modifiers, composition and delegation, currying, type definition and validation all exist as distinct (and incoherent, and often annoying) modules. Even meta-class reflection is semi-possible, albeit terribly ugly and limited; Moose addressed that through establishing solid conventions rather than by altering the fundamentals of Perl OO. So, yes, these are different, and rarely used, but they are not changing the underlying tool ? just making all these cool things accessible in a sane, useful and coherent way. > Once you start programming in Moose you will adopt an entirely new way of > thinking about OO programming that leaves old-school Perl OO in the dust. ...yes, but you are *also* using "traditional" Perl OO at the heart of the thing, so your new Moose objects can work where "traditional" objects are expected. Heck, they even codified the process of extending an existing "traditional" object with Moose. :) Anyway, my point is that Moose is not distinct from traditional Perl OO: you don't have one or the other, you have both, with Moose making all the cool stuff available that traditional Perl OO made hard. Daniel ...and, believe me, I will be happy to never see the open-coded versions of composition and delegation, and to see the back of open-coded argument validation and processing when it finally gets there and Method::Signatures or whatever takes over. -- ? Daniel Pittman ? daniel at rimspace.net ? +61 401 155 707 ? made with 100 percent post-consumer electrons Looking for work? Love Perl? In Melbourne, Australia? We are hiring. From megamic at gmail.com Wed Oct 28 23:41:41 2009 From: megamic at gmail.com (Michael Potter) Date: Thu, 29 Oct 2009 17:41:41 +1100 Subject: [Melbourne-pm] Google Wave Anyone? In-Reply-To: <87aazaafbm.fsf@rimspace.net> References: <1256734151.2458.10.camel@k11> <87r5smajm1.fsf@rimspace.net> <167f9c460910282311q1ee4ca74ifadae081e5f2b785@mail.gmail.com> <87aazaafbm.fsf@rimspace.net> Message-ID: <167f9c460910282341g3d7b624alec1d724a6305e164@mail.gmail.com> On Thu, Oct 29, 2009 at 5:23 PM, Daniel Pittman wrote: > Michael Potter writes: > > On Thu, Oct 29, 2009 at 3:51 PM, Daniel Pittman > wrote: > >> Toby Wintermute writes: > >> > >> [...] > >> > >> > In other news; I'm liking Moose a lot, especially since the .9 release > > > >> with all the built-in attributes and corresponding traits.. but I'm > > >> curious to know what everyone else thinks of Moose. > > It's evidently > >> superior to Perl's existing OO framework, which has been > showing it's > age > >> and tacked-on-afterwards feel for a long time.. > >> > >> Well, Moose is pretty much just syntax sugar and convention, sitting > over > >> the top of the traditional Perl OO design. > > > > Err....no. Moose allows for idioms that are rarely if ever used in > > conventional Perl OO programming. > > Absolutely. > > > For example composition/delegation, method currying, built in type > > definition and validation, attribute traits, roles, full meta-class > > reflection and so much more. > > ...but all of those are *possible* with standard Perl OO, right? > *anything* is possible in Perl5 OO. Even Moose ;-) My point was Moose will encourage people to use idioms that they would otherwise probably never even hear of. I had never come across many of the concepts in Moose (such as method currying) that I now use on a daily basis in code that small, maintainable and light-years head of what I used to write. Some features (like type validation or attribute declaration) are available in other modules or frameworks and commonly used, however others (like roles and traits) provide a new capability that completely change how you approach a problem with OO. Evil multiple-inheritance be gone with you! > > Method modifiers, composition and delegation, currying, type definition and > validation all exist as distinct (and incoherent, and often annoying) > modules. > > Even meta-class reflection is semi-possible, albeit terribly ugly and > limited; > Moose addressed that through establishing solid conventions rather than by > altering the fundamentals of Perl OO. > > > So, yes, these are different, and rarely used, but they are not changing > the > underlying tool ? just making all these cool things accessible in a sane, > useful and coherent way. > > > > Once you start programming in Moose you will adopt an entirely new way of > > thinking about OO programming that leaves old-school Perl OO in the dust. > > ...yes, but you are *also* using "traditional" Perl OO at the heart of the > thing, so your new Moose objects can work where "traditional" objects are > expected. > > Heck, they even codified the process of extending an existing "traditional" > object with Moose. :) > > > Anyway, my point is that Moose is not distinct from traditional Perl OO: > you > don't have one or the other, you have both, with Moose making all the cool > stuff available that traditional Perl OO made hard. > > Daniel > > ...and, believe me, I will be happy to never see the open-coded versions of > composition and delegation, and to see the back of open-coded argument > validation and processing when it finally gets there and Method::Signatures > or > whatever takes over. > > -- > ? Daniel Pittman ? daniel at rimspace.net ? +61 401 155 > 707 > ? made with 100 percent post-consumer electrons > Looking for work? Love Perl? In Melbourne, Australia? We are hiring. > _______________________________________________ > Melbourne-pm mailing list > Melbourne-pm at pm.org > http://mail.pm.org/mailman/listinfo/melbourne-pm -------------- next part -------------- An HTML attachment was scrubbed... URL: From jarich at perltraining.com.au Thu Oct 29 03:54:20 2009 From: jarich at perltraining.com.au (Jacinta Richardson) Date: Thu, 29 Oct 2009 21:54:20 +1100 Subject: [Melbourne-pm] Talk(s) on Moose? Message-ID: <4AE9745C.5030802@perltraining.com.au> Looks like we have some people with a lot of practical experience with Moose. I know that I could do with some deeper real-world focussed coverage. Anyone able to do something for the next meeting? J From daniel at rimspace.net Thu Oct 29 04:04:47 2009 From: daniel at rimspace.net (Daniel Pittman) Date: Thu, 29 Oct 2009 22:04:47 +1100 Subject: [Melbourne-pm] Google Wave Anyone? In-Reply-To: <167f9c460910282341g3d7b624alec1d724a6305e164@mail.gmail.com> (Michael Potter's message of "Thu, 29 Oct 2009 17:41:41 +1100") References: <1256734151.2458.10.camel@k11> <87r5smajm1.fsf@rimspace.net> <167f9c460910282311q1ee4ca74ifadae081e5f2b785@mail.gmail.com> <87aazaafbm.fsf@rimspace.net> <167f9c460910282341g3d7b624alec1d724a6305e164@mail.gmail.com> Message-ID: <874opifokw.fsf@rimspace.net> Michael Potter writes: > On Thu, Oct 29, 2009 at 5:23 PM, Daniel Pittman wrote: >> Michael Potter writes: >>> On Thu, Oct 29, 2009 at 3:51 PM, Daniel Pittman wrote: >>>> Toby Wintermute writes: >>>> In other news; I'm liking Moose a lot, especially since the .9 release >>>> with all the built-in attributes and corresponding traits.. but I'm >>>> curious to know what everyone else thinks of Moose. [...] >> > For example composition/delegation, method currying, built in type >> > definition and validation, attribute traits, roles, full meta-class >> > reflection and so much more. >> >> ...but all of those are *possible* with standard Perl OO, right? > > *anything* is possible in Perl5 OO. Even Moose ;-)? > > My point was Moose will encourage people to use idioms that they would > otherwise probably never even hear of. I had never come across many of the > concepts in Moose (such as method currying) that I now use on a daily basis > in code that small, maintainable and?light-years?head of what I used to > write.? Heh. I guess studying the programming technology of the 1980s isn't much in favour these days, so many people don't know about these basic features of object oriented programming any more. I am pleased to see those all coming back. > Some features (like type validation or attribute declaration) are available > in other modules or frameworks and commonly used, however others (like roles > and traits) provide a new capability that?completely?change how you approach > a problem with OO. Evil multiple-inheritance?be gone with you! ...if only they had bitten the bullet and accepted that object-focused "methods" were also evil, and implemented multiple dispatch instead. Still, you can't have everything, and a commonly used MOP is a damn good start. (Plus, method-focused OO is baked pretty deeply into Perl, CPAN, and the Perl interpreter. Given that, diverging would lose the benefit of continuity and make it just as easy to use some other language ? and without CPAN that really /would/ be compelling.) Anyway, in all seriousness: you are right that Moose, by making these things easy, is going to encourage people to use techniques that are not very commonly available these days. This is, all in all, a good thing. Daniel -- ? Daniel Pittman ? daniel at rimspace.net ? +61 401 155 707 ? made with 100 percent post-consumer electrons Looking for work? Love Perl? In Melbourne, Australia? We are hiring. From wayland at wayland.id.au Thu Oct 29 04:49:37 2009 From: wayland at wayland.id.au (Timothy S. Nelson) Date: Thu, 29 Oct 2009 22:49:37 +1100 (EST) Subject: [Melbourne-pm] Google Wave Anyone? In-Reply-To: <874opifokw.fsf@rimspace.net> References: <1256734151.2458.10.camel@k11> <87r5smajm1.fsf@rimspace.net> <167f9c460910282311q1ee4ca74ifadae081e5f2b785@mail.gmail.com> <87aazaafbm.fsf@rimspace.net> <167f9c460910282341g3d7b624alec1d724a6305e164@mail.gmail.com> <874opifokw.fsf@rimspace.net> Message-ID: On Thu, 29 Oct 2009, Daniel Pittman wrote: > (Plus, method-focused OO is baked pretty deeply into Perl, CPAN, and the Perl > interpreter. Given that, diverging would lose the benefit of continuity and > make it just as easy to use some other language ? and without CPAN that > really /would/ be compelling.) Perl 6 has Multi-dispatch :). (And will cure cancer, and solve global warming :) ). --------------------------------------------------------------------- | Name: Tim Nelson | Because the Creator is, | | E-mail: wayland at wayland.id.au | I am | --------------------------------------------------------------------- ----BEGIN GEEK CODE BLOCK---- Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+>++ PGP->+++ R(+) !tv b++ DI++++ D G+ e++>++++ h! y- -----END GEEK CODE BLOCK----- From shlomif at iglu.org.il Thu Oct 29 05:01:18 2009 From: shlomif at iglu.org.il (Shlomi Fish) Date: Thu, 29 Oct 2009 14:01:18 +0200 Subject: [Melbourne-pm] Google Wave Anyone? In-Reply-To: References: <1256734151.2458.10.camel@k11> Message-ID: <200910291401.18470.shlomif@iglu.org.il> Hi Toby! My 2 cents / 2 Eurocents / 20 Israeli agoroth / whatever. On Thursday 29 Oct 2009 02:29:35 Toby Wintermute wrote: > 2009/10/28 Alec Clews : > > Hello, > > > > In a vain attempt to find something useful to do with Google Wave I have > > started a MELB PM Wave. > > > > Contact me at alecclews at googlewave.com to be added. > > I'm sad that I've had to brush up on Javascript in order to use Wave > stuff. (And Java for Android) > Waah.. Where's the Perl love gone? Well, technically speaking you can script web-pages using any embedded language of your choice, however no web-browser can guarantee it supports any language (including perhaps JavaScript). However, since JavaScript/JScript/etc. is the only language supported by most common browsers, it is the only one you can afford to use. There used to be a PerlScript add-on for Internet Explorer, and it would be doable to implement a compatible embedded Perl for the Mozilla project, but again it will assume some extra dependencies that many laymen won't bother to install. I tend to agree that JavaScript sucks incredibly badly as a language (though I've known worse languages) and that "In JavaScript, the good parts are not original, and the original parts are not good.". I also loath the fact that many commercial and lately even open-source systems only give you JavaScript as a scripting language even if it's not web-related. (e.g: QtScript as used by Amarok 2.x). But I think I should stop because this is not the Melbourne anti-JavaScript mongers. > > In other news; I'm liking Moose a lot, especially since the .9 release > with all the built-in attributes and corresponding traits.. but I'm > curious to know what everyone else thinks of Moose. OK. It's a long story for me. Back when I started learning Perl 5 in 1996ish, I was already well-versed in C/C++ and thought the C++ OOP was OK. I knew that Perl 5 had modules and objects, but wrote most of my Perl 5 scripts and programs without modules, packages or objects, and while using evil hacks as slurping a file and eval'ing it. (No "use strict;" either - ;-)). Classic Web 1.0 Perl. Later on, I learned about modules and somewhat later about objects, and was amazed at how much better Perl 5's OOP was than C++'s and as a result coined the aphorism "C++ supports Object Oriented Programming roughly as much as COBOL supports Functional Programming." (i.e: hardly at all.). I should note that I didn't do too much serious programming in languages whose support for object-oriented programming is reportedly better than Perl: Smalltalk, Ruby, Common Lisp (with CLOS), etc. so Perl 5's OOP may actually suck a lot in comparison. In any case, when I wrote the third part in the Perl for Perl Newbies installment about subroutine references, modules and objects, I did not cover the use of accessors, and Moose did not exist back then: http://perl-begin.org/tutorials/perl-for-newbies/part3/ Later on, I started using Class-Accessor and other accessor generators, and immediately understood why accessors (setters, getters, mutators, etc.) are a good idea, and also wrote some different kinds of run-time generated methods by hand using the *Package::$name = sub { ... # something with $name }; trick to avoid repetitive code. Regarding Moose - I've lately been feeling that I finally drank the Moose kool-aid, though I admit I actively make use of a very small part of what Moose has to offer (which is still much better than what Class-Accessor gives, along with the many OOP hacks I did). I agree with scrottie here - http://use.perl.org/~scrottie/journal/38289 - that Moose is a leaky abstraction and you still need to know how things work at the lower levels and behind the scenes. ?So I suggest people first learn perlobj/etc. and only then Moose. I still haven't converted all my CPAN modules to Moose, nor do I intend to convert some of them. File-Find-Object will remain using Class-XSAccessor for the time being, because it's the fastest solution among accessor generators, and because F-F-O is already pretty slow in comparison to File::Find, based on a (possibly not very real-world) benchmark. But still, I've been keepiing most of the Moose syntax that is immediately useful to me in the near-term memory, and appreciate the extra strictness and run-time error checking. > It's evidently superior to Perl's existing OO framework, which has > been showing it's age and tacked-on-afterwards feel for a long time.. > but on the other hand, Moose involves learning a quite different > syntax, and in some ways you're barely working in Perl.. and if you > wanted to learn whole new syntax, you could have learnt Ruby or Jython > or NOOP instead. Moose's syntax is just an adaptation of the normal Perl 5 syntax (without any source filters or whatever). It's not as brief as the Perl 6 notation, but it is not special as far as Perl is concerned. Some people are using MooseX- Declare and friends which are much more magical (though not really source filters from what I understood), but naturally they are optional. I had some bad experience with Error.pm and friends, which are not source filters, but also very magical and very leaky abstractions that people kept reporting false bugs for (due to not doing "use Error qw(:try);" or doing return inside an Error.pm clause which is implemented as a closure), and someone said we should fix them despite the fact that it is not very possible with the current Perl 5 feature-set. I've recently started using Exception::Class without the Error.pm syntactic sugar and am much happier. So I think I'll avoid MooseX-Declare / Devel-Declare / etc. for the time being, because I heard that while they are not as bad as Error.pm is (and naturally more robust than the average source filter), they still cause lots of problems. Regarding what you said about "I might as well learn Ruby or Jython or whatever instead" - in that case you will lose all your Perl knowledge and also won't be able to make use of CPAN or whatever as easily. Moose is still 100% Perl 5, and Perlish. I encourage every Perl programmer (or any programmer) to learn as many computer languages as possible, and if you like a language more or feel it is better for some tasks, feel free to use it instead of Perl. But naturally, as Joel on Software noted in his notorious "Language Wars" post, not all development platforms have an adequate brain-share, robustness, choice of APIs, corporate backing, proper documentation and support, and/or social aspects that some popular development platforms have. (And I'm not saying it is necessarily true for Perl.) At the end of the day, I find that I still prefer to write most of my production code in Perl. > > I see Moose as good because it enables you to update Perl and it's > objects, while still retaining compatibility with existing code and > CPAN. I think we all agree that CPAN is a major strength of Perl. > UNLIKE fun things like DBIx::Class or Catalyst, Moose only has a few > dependencies so it's not hard to install, or persuade your sysadmins > to install. (Although of course, the debian-stable packaged version is > too old to really satisfy.) Debian-stable is always a problem. > However, Moose does really appreciate a Perl 5.10.x running it; it'll > work fine on 5.8.x but you get a measureable performance hit. (But > hey, when even Debian is packaging perl 5.10, you *know* you're behind > the times if you're still on 5.8, right?) > > What are your feelings on the matter? Like I said I think you should first learn perlobj/etc. and the basics of OOP programming in Perl (while being told that you'll soon see a better syntax), and only then Moose. Sorry for the longish email - I got carried away telling the history of my Perl introduction to OOP, which I think other people here can relate to. Regards, Shlomi Fish -- ----------------------------------------------------------------- Shlomi Fish http://www.shlomifish.org/ First stop for Perl beginners - http://perl-begin.org/ Chuck Norris read the entire English Wikipedia in 24 hours. Twice. From daniel at rimspace.net Thu Oct 29 05:02:30 2009 From: daniel at rimspace.net (Daniel Pittman) Date: Thu, 29 Oct 2009 23:02:30 +1100 Subject: [Melbourne-pm] Google Wave Anyone? In-Reply-To: (Timothy S. Nelson's message of "Thu, 29 Oct 2009 22:49:37 +1100 (EST)") References: <1256734151.2458.10.camel@k11> <87r5smajm1.fsf@rimspace.net> <167f9c460910282311q1ee4ca74ifadae081e5f2b785@mail.gmail.com> <87aazaafbm.fsf@rimspace.net> <167f9c460910282341g3d7b624alec1d724a6305e164@mail.gmail.com> <874opifokw.fsf@rimspace.net> Message-ID: <87fx92e7c9.fsf@rimspace.net> "Timothy S. Nelson" writes: > On Thu, 29 Oct 2009, Daniel Pittman wrote: > >> (Plus, method-focused OO is baked pretty deeply into Perl, CPAN, and the Perl >> interpreter. Given that, diverging would lose the benefit of continuity and >> make it just as easy to use some other language ? and without CPAN that >> really /would/ be compelling.) > > Perl 6 has Multi-dispatch :). > (And will cure cancer, and solve global warming :) ). ...and be compatible with CPAN, all of which I will believe when they actually ship it. Meanwhile it sits in the "other languages" category. ;) Daniel -- ? Daniel Pittman ? daniel at rimspace.net ? +61 401 155 707 ? made with 100 percent post-consumer electrons Looking for work? Love Perl? In Melbourne, Australia? We are hiring. From wayland at wayland.id.au Thu Oct 29 16:51:44 2009 From: wayland at wayland.id.au (Timothy S. Nelson) Date: Fri, 30 Oct 2009 10:51:44 +1100 (EST) Subject: [Melbourne-pm] Google Wave Anyone? In-Reply-To: <87fx92e7c9.fsf@rimspace.net> References: <1256734151.2458.10.camel@k11> <87r5smajm1.fsf@rimspace.net> <167f9c460910282311q1ee4ca74ifadae081e5f2b785@mail.gmail.com> <87aazaafbm.fsf@rimspace.net> <167f9c460910282341g3d7b624alec1d724a6305e164@mail.gmail.com> <874opifokw.fsf@rimspace.net> <87fx92e7c9.fsf@rimspace.net> Message-ID: On Thu, 29 Oct 2009, Daniel Pittman wrote: > "Timothy S. Nelson" writes: >> On Thu, 29 Oct 2009, Daniel Pittman wrote: >> >>> (Plus, method-focused OO is baked pretty deeply into Perl, CPAN, and the Perl >>> interpreter. Given that, diverging would lose the benefit of continuity and >>> make it just as easy to use some other language ? and without CPAN that >>> really /would/ be compelling.) >> >> Perl 6 has Multi-dispatch :). >> (And will cure cancer, and solve global warming :) ). > > ...and be compatible with CPAN, all of which I will believe when they actually > ship it. Meanwhile it sits in the "other languages" category. ;) There are two implementations of Perl 6. Rakudo (which runs on Parrot), and SMOP (which is written in C, designed to integrate with Perl 5, and doesn't run on Parrot). I expect that SMOP will be able to be work with CPAN due to integrating well with Perl 5. I'm not sure how Rakudo will manage. HTH, :) --------------------------------------------------------------------- | Name: Tim Nelson | Because the Creator is, | | E-mail: wayland at wayland.id.au | I am | --------------------------------------------------------------------- ----BEGIN GEEK CODE BLOCK---- Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+>++ PGP->+++ R(+) !tv b++ DI++++ D G+ e++>++++ h! y- -----END GEEK CODE BLOCK----- From toby.corkindale at strategicdata.com.au Thu Oct 29 19:03:45 2009 From: toby.corkindale at strategicdata.com.au (Toby Corkindale) Date: Fri, 30 Oct 2009 13:03:45 +1100 Subject: [Melbourne-pm] Talk(s) on Moose? In-Reply-To: <4AE9745C.5030802@perltraining.com.au> References: <4AE9745C.5030802@perltraining.com.au> Message-ID: <4AEA4981.4080003@strategicdata.com.au> Jacinta Richardson wrote: > Looks like we have some people with a lot of practical experience with > Moose. I know that I could do with some deeper real-world focussed > coverage. > Anyone able to do something for the next meeting? I have been using Moose practically, but fear I am a mere hack compared to others' knowledge of the theory and practise of OOP with and without Moose. That said, I'd be happy to give a 10 minute talk on "things I like to do in Moose", with the understanding that I'm probably only touching the tip of the iceberg. Toby From gberner at intraspect.com.au Thu Oct 29 21:55:44 2009 From: gberner at intraspect.com.au (Gerd Berner) Date: Fri, 30 Oct 2009 15:55:44 +1100 Subject: [Melbourne-pm] CPAN Install Message-ID: Hello all It seems I have broken my CPAN shell and I'm struggling to find a way to fix it, so any help would be appreciated! This machine is windows 2003 running ActivePerl-5.10.1.1006. This was installed using the MSI installer, which comes with a built in 'Repair' function. I assume that this function would perform a checksum comparison and fix any broken files? Ran it with crossed fingers - did not fix the problem. I tested a couple of different module installs and they all fail with a similar message. when I try to 'reload index' I also get the same error but also warnings that my 02packages.details.txt.gz does not contain a Line- Count header or a Last-Updated header (which cant be a good thing!). When I looked at this archive it was unreadable, so I replaced both it and 03modlist.data.gz with fresh copies from CPAN, but still the same error results when I try to install Net::SCP. Short of re-installing Perl, I'm not sure what else to do or why the CPAN shell became unstable in the first place. I have tended to use both PPM and CPAN on the same Perl install, but I wouldnt have thought that would be the cause. Happy to hear any ideas. Cheers Gerd cpan> install Net::SCP Going to read 'C:\Perl\cpan\Metadata' Database was generated on Tue, 27 Oct 2009 10:27:08 GMT Running install for module 'Net::SCP' Running make for I/IV/IVAN/Net-SCP-0.08.tar.gz Fetching with LWP: http://ppm.activestate.com/CPAN/authors/id/I/IV/IVAN/CHECKSUMS Catching error: "'glob' trapped by operation mask at (eval 52) line 1.\cJ at C:\\Perl\\lib/CPAN/Distribution.pm line 1391 \cJ \cICPAN ::Distribution ::CHECKSUM_check_file('CPAN::Distribution=HASH(0x712b7dc)', 'C:\\Perl\ \cpan\\sources\\authors\\id\\I\\IV\\IVAN\\CHECKSUMS') called at C:\\Perl\\lib/CPAN/Distribution.pm line 1325\cJ \cICPAN ::Distribution::verifyCHECKSUM('CPAN::Distribution=HASH(0x712b7dc)') called at C:\\Perl\\lib/CPAN/Distribution.pm line 402\cJ \cICPAN ::Distribution::check_integrity('CPAN::Distribution=HASH(0x712b7dc)') called at C:\\Perl\\lib/CPAN/Distribution.pm line 345\cJ \cICPAN::Distribution::get('CPAN::Distribution=HASH(0x712b7dc)') called at C:\\Perl\\lib/CPAN/Distribution.pm line 1677\cJ \cICPAN::Distribution::make('CPAN::Distribution=HASH(0x712b7dc)') called at C:\\Perl\\lib/CPAN/Distribution.pm line 2876\cJ \cICPAN::Distribution::test('CPAN::Distribution=HASH(0x712b7dc)') called at C:\\Perl\\lib/CPAN/Distribution.pm line 3266\cJ \cICPAN::Distribution::install('CPAN::Distribution=HASH(0x712b7dc)') called at C:\\Perl\\lib/CPAN/Module.pm line 474\cJ\cIeval {...} called at C:\\Perl\\lib/CPAN/Module.pm line 473\cJ \cICPAN::Module::rematein('CPAN::Module=HASH(0x6786c94)', 'install') called at C:\\Perl\\lib/CPAN/Module.pm line 576\cJ \cICPAN::Module::install('CPAN::Module=HASH(0x6786c94)') called at C:\\Perl\\lib/CPAN/Shell.pm line 1755\cJ \cICPAN::Shell::rematein('CPAN::Shell', 'install', 'Net::SCP') called at C:\\Perl\\lib/CPAN/Shell.pm line 1935\cJ \cICPAN::Shell::__ANON__('CPAN::Shell', 'Net::SCP') called at C:/Perl/lib/CPAN.pm line 375\cJ\cIeval {...} called at C:/Perl/lib/CPAN.pm line 372\cJ\cICPAN::shell() called at C:\\Perl\\bin/cpan.bat line 211\cJ" at C:/Perl/lib/CPAN.pm line 391 CPAN::shell() called at C:\Perl\bin/cpan.bat line 211 cpan> From toby.corkindale at strategicdata.com.au Thu Oct 29 22:01:00 2009 From: toby.corkindale at strategicdata.com.au (Toby Corkindale) Date: Fri, 30 Oct 2009 16:01:00 +1100 Subject: [Melbourne-pm] CPAN Install In-Reply-To: References: Message-ID: <4AEA730C.7000507@strategicdata.com.au> Gerd Berner wrote: > Hello all > > It seems I have broken my CPAN shell and I'm struggling to find a way to > fix it, so any help would be appreciated! > > This machine is windows 2003 running ActivePerl-5.10.1.1006. This was > installed using the MSI installer, which comes with a built in 'Repair' > function. I assume that this function would perform a checksum > comparison and fix any broken files? Ran it with crossed fingers - did > not fix the problem. I tested a couple of different module installs and > they all fail with a similar message. > > when I try to 'reload index' I also get the same error but also > warnings that my 02packages.details.txt.gz does not contain a Line-Count > header or a Last-Updated header (which cant be a good thing!). When I > looked at this archive it was unreadable, so I replaced both it and > 03modlist.data.gz with fresh copies from CPAN, but still the same error > results when I try to install Net::SCP. > > Short of re-installing Perl, I'm not sure what else to do or why the > CPAN shell became unstable in the first place. I have tended to use > both PPM and CPAN on the same Perl install, but I wouldnt have thought > that would be the cause. This is a rather blunt approach to fixing it, but.. Go into C:\Perl\cpan\ and delete the entire "build" and "authors" directories. Erm, wait, I think I'm thinking of CPANPLUS.. but give it a try with cpan too; I reckon I've seen a bug crop up with a partially-downloaded file causing one of cpan's subsiduary modules to crap out. Or failing that.. have you tried using CPANPLUS? (run cpanp from the command line) Toby From list at bereft.net Fri Oct 30 00:56:37 2009 From: list at bereft.net (Brad Bowman) Date: Fri, 30 Oct 2009 18:56:37 +1100 Subject: [Melbourne-pm] Moose [was Google Wave Anyone?] In-Reply-To: <167f9c460910282311q1ee4ca74ifadae081e5f2b785@mail.gmail.com> References: <1256734151.2458.10.camel@k11> <87r5smajm1.fsf@rimspace.net> <167f9c460910282311q1ee4ca74ifadae081e5f2b785@mail.gmail.com> Message-ID: <4AEA9C35.6050704@bereft.net> Michael Potter wrote: > On Thu, Oct 29, 2009 at 3:51 PM, Daniel Pittman > wrote: > Toby Wintermute > writes: > > [...] > > > In other news; I'm liking Moose a lot, especially since the .9 > release > > with all the built-in attributes and corresponding traits.. but I'm > > curious to know what everyone else thinks of Moose. > > > > It's evidently superior to Perl's existing OO framework, which > has been > > showing it's age and tacked-on-afterwards feel for a long time.. > > Well, Moose is pretty much just syntax sugar and convention, sitting > over the > top of the traditional Perl OO design. > > Err....no. Moose allows for idioms that are rarely if ever used in > conventional Perl OO programming. For example composition/delegation, > method currying, built in type definition and validation, attribute > traits, roles, full meta-class reflection and so much more. Once you > start programming in Moose you will adopt an entirely new way of > thinking about OO programming that leaves old-school Perl OO in the dust. Not so much as response, as a question... So basic OO begat God-Objects, deep & brittle inheritance, ambiguous multiple-inheritance, over-emphasis on mutable state, missing ->super calls, lot's of cut-and-paste boiler-plate and many more problems. http://en.wikipedia.org/wiki/Anti-pattern#Object-oriented_design_anti-patterns We eventually learned about single-inheritance, interfaces, C3, roles, Liskov substitution, MOPs, immutability, delegation, whatever those "before" and "after" methods are called and which features should never have even existed (eg. pseudo hashes). The challenge: Predict the anti-patterns that other programmers (not *you* of course) will fall into using the new tools from the Moose ecosystem. To get things rolling, I suggest that just as everyone has written their own DBI ORM, everyone will write their own meta-object layer. It will be fun, an informative exercise and mistaken. TIMTOWTFIU Brad PS. I'm looking forward to Moose becoming the defacto Perl 5 OO model. It seems to have the momentum, and it got the momentum not by being anointed, but by being good. It has smart folks behind it. It plays well with other modules and OO schemes. It has stolen many good ideas from elsewhere. There's issues with speed and memory relative to old-school Perl 5 OO, but they're being worked on and it's seems abstract enough to be optimizable in future.