From madcityzen at gmail.com Thu May 7 22:10:45 2015 From: madcityzen at gmail.com (Doug Bell) Date: Fri, 8 May 2015 00:10:45 -0500 Subject: [Chicago-talk] Meeting May 28 - Getting Into Perl 6 Message-ID: You may have heard that Perl 6[1] is making its debut this Christmas; This is the perfect time to get involved and help the team get through the last mile. Rob Hoelz[2] will walk through making a change to the Rakudo compiler [3], which will make it easier to make your own changes and help out! A brief rundown of the evening: * A quick intro to Perl 6 for newbies * A brief overview of the Perl 6 ecosystem * A tour of the Rakudo compiler's source * Going through the compiler and making the change Join us on Thursday, May 28 at 7:00 PM. RSVP on the Chicago.PM Meetup page: http://www.meetup.com/ChicagoPM/events/222390262/ If you've got Perl problems, questions, or just want to meet fellow Perl programmers, come to Office Hours on Thursday, May 14. RSVP for Office Hours on the Chicago.PM Meetup page: http://www.meetup.com/ChicagoPM/events/221766093/ [1]: Perl 6: http://perl6.org [2]: Rob Hoelz: http://hoelz.ro [3]: The Rakudo Perl 6 project: http://rakudo.org Doug Bell madcityzen at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcmertens.perl at gmail.com Fri May 8 05:31:32 2015 From: dcmertens.perl at gmail.com (David Mertens) Date: Fri, 8 May 2015 08:31:32 -0400 Subject: [Chicago-talk] Meeting May 28 - Getting Into Perl 6 In-Reply-To: References: Message-ID: Any chance this can be recorded and posted on youtube? :-) On Fri, May 8, 2015 at 1:10 AM, Doug Bell wrote: > You may have heard that Perl 6[1] is making its debut this Christmas; This > is the perfect time to get involved and help the team get through the last > mile. Rob Hoelz[2] will walk through making a change to the Rakudo compiler > [3], which will make it easier to make your own changes and help out! A > brief rundown of the evening: > > * A quick intro to Perl 6 for newbies > * A brief overview of the Perl 6 ecosystem > * A tour of the Rakudo compiler's source > * Going through the compiler and making the change > > Join us on Thursday, May 28 at 7:00 PM. RSVP on the Chicago.PM Meetup > page: http://www.meetup.com/ChicagoPM/events/222390262/ > > If you've got Perl problems, questions, or just want to meet fellow Perl > programmers, come to Office Hours on Thursday, May 14. > > RSVP for Office Hours on the Chicago.PM Meetup page: > http://www.meetup.com/ChicagoPM/events/221766093/ > > [1]: Perl 6: http://perl6.org > [2]: Rob Hoelz: http://hoelz.ro > [3]: The Rakudo Perl 6 project: http://rakudo.org > > Doug Bell > madcityzen at gmail.com > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk at pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > -- "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." -- Brian Kernighan -------------- next part -------------- An HTML attachment was scrubbed... URL: From joel.a.berger at gmail.com Fri May 8 06:02:27 2015 From: joel.a.berger at gmail.com (Joel Berger) Date: Fri, 08 May 2015 13:02:27 +0000 Subject: [Chicago-talk] Meeting May 28 - Getting Into Perl 6 In-Reply-To: References: Message-ID: That might be arranged On Fri, May 8, 2015 at 7:31 AM David Mertens wrote: > Any chance this can be recorded and posted on youtube? :-) > > On Fri, May 8, 2015 at 1:10 AM, Doug Bell wrote: > >> You may have heard that Perl 6[1] is making its debut this Christmas; >> This is the perfect time to get involved and help the team get through the >> last mile. Rob Hoelz[2] will walk through making a change to the Rakudo >> compiler [3], which will make it easier to make your own changes and help >> out! A brief rundown of the evening: >> >> * A quick intro to Perl 6 for newbies >> * A brief overview of the Perl 6 ecosystem >> * A tour of the Rakudo compiler's source >> * Going through the compiler and making the change >> >> Join us on Thursday, May 28 at 7:00 PM. RSVP on the Chicago.PM Meetup >> page: http://www.meetup.com/ChicagoPM/events/222390262/ >> >> If you've got Perl problems, questions, or just want to meet fellow Perl >> programmers, come to Office Hours on Thursday, May 14. >> >> RSVP for Office Hours on the Chicago.PM Meetup page: >> http://www.meetup.com/ChicagoPM/events/221766093/ >> >> [1]: Perl 6: http://perl6.org >> [2]: Rob Hoelz: http://hoelz.ro >> [3]: The Rakudo Perl 6 project: http://rakudo.org >> >> Doug Bell >> madcityzen at gmail.com >> >> _______________________________________________ >> Chicago-talk mailing list >> Chicago-talk at pm.org >> http://mail.pm.org/mailman/listinfo/chicago-talk >> > > > > -- > "Debugging is twice as hard as writing the code in the first place. > Therefore, if you write the code as cleverly as possible, you are, > by definition, not smart enough to debug it." -- Brian Kernighan > _______________________________________________ > Chicago-talk mailing list > Chicago-talk at pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk -------------- next part -------------- An HTML attachment was scrubbed... URL: From joel.a.berger at gmail.com Fri May 8 06:03:01 2015 From: joel.a.berger at gmail.com (Joel Berger) Date: Fri, 08 May 2015 13:03:01 +0000 Subject: [Chicago-talk] Meeting May 28 - Getting Into Perl 6 In-Reply-To: References: Message-ID: btw I got a new go-pro-alike that should suffice On Fri, May 8, 2015 at 8:02 AM Joel Berger wrote: > That might be arranged > > On Fri, May 8, 2015 at 7:31 AM David Mertens > wrote: > >> Any chance this can be recorded and posted on youtube? :-) >> >> On Fri, May 8, 2015 at 1:10 AM, Doug Bell wrote: >> >>> You may have heard that Perl 6[1] is making its debut this Christmas; >>> This is the perfect time to get involved and help the team get through the >>> last mile. Rob Hoelz[2] will walk through making a change to the Rakudo >>> compiler [3], which will make it easier to make your own changes and help >>> out! A brief rundown of the evening: >>> >>> * A quick intro to Perl 6 for newbies >>> * A brief overview of the Perl 6 ecosystem >>> * A tour of the Rakudo compiler's source >>> * Going through the compiler and making the change >>> >>> Join us on Thursday, May 28 at 7:00 PM. RSVP on the Chicago.PM Meetup >>> page: http://www.meetup.com/ChicagoPM/events/222390262/ >>> >>> If you've got Perl problems, questions, or just want to meet fellow Perl >>> programmers, come to Office Hours on Thursday, May 14. >>> >>> RSVP for Office Hours on the Chicago.PM Meetup page: >>> http://www.meetup.com/ChicagoPM/events/221766093/ >>> >>> [1]: Perl 6: http://perl6.org >>> [2]: Rob Hoelz: http://hoelz.ro >>> [3]: The Rakudo Perl 6 project: http://rakudo.org >>> >>> Doug Bell >>> madcityzen at gmail.com >>> >>> _______________________________________________ >>> Chicago-talk mailing list >>> Chicago-talk at pm.org >>> http://mail.pm.org/mailman/listinfo/chicago-talk >>> >> >> >> >> -- >> "Debugging is twice as hard as writing the code in the first place. >> Therefore, if you write the code as cleverly as possible, you are, >> by definition, not smart enough to debug it." -- Brian Kernighan >> _______________________________________________ >> Chicago-talk mailing list >> Chicago-talk at pm.org >> http://mail.pm.org/mailman/listinfo/chicago-talk > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hal.wigoda at gmail.com Fri May 8 10:04:35 2015 From: hal.wigoda at gmail.com (Hal Wigoda) Date: Fri, 8 May 2015 12:04:35 -0500 Subject: [Chicago-talk] Meeting May 28 - Getting Into Perl 6 In-Reply-To: References: Message-ID: How long has Perl 6 been in development? Over 10 years? On Fri, May 8, 2015 at 7:31 AM, David Mertens wrote: > Any chance this can be recorded and posted on youtube? :-) > > On Fri, May 8, 2015 at 1:10 AM, Doug Bell wrote: > >> You may have heard that Perl 6[1] is making its debut this Christmas; >> This is the perfect time to get involved and help the team get through the >> last mile. Rob Hoelz[2] will walk through making a change to the Rakudo >> compiler [3], which will make it easier to make your own changes and help >> out! A brief rundown of the evening: >> >> * A quick intro to Perl 6 for newbies >> * A brief overview of the Perl 6 ecosystem >> * A tour of the Rakudo compiler's source >> * Going through the compiler and making the change >> >> Join us on Thursday, May 28 at 7:00 PM. RSVP on the Chicago.PM Meetup >> page: http://www.meetup.com/ChicagoPM/events/222390262/ >> >> If you've got Perl problems, questions, or just want to meet fellow Perl >> programmers, come to Office Hours on Thursday, May 14. >> >> RSVP for Office Hours on the Chicago.PM Meetup page: >> http://www.meetup.com/ChicagoPM/events/221766093/ >> >> [1]: Perl 6: http://perl6.org >> [2]: Rob Hoelz: http://hoelz.ro >> [3]: The Rakudo Perl 6 project: http://rakudo.org >> >> Doug Bell >> madcityzen at gmail.com >> >> _______________________________________________ >> Chicago-talk mailing list >> Chicago-talk at pm.org >> http://mail.pm.org/mailman/listinfo/chicago-talk >> > > > > -- > "Debugging is twice as hard as writing the code in the first place. > Therefore, if you write the code as cleverly as possible, you are, > by definition, not smart enough to debug it." -- Brian Kernighan > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk at pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > -- ----------------- Hal Wigoda Chicago -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcmertens.perl at gmail.com Fri May 8 10:41:46 2015 From: dcmertens.perl at gmail.com (David Mertens) Date: Fri, 8 May 2015 13:41:46 -0400 Subject: [Chicago-talk] Meeting May 28 - Getting Into Perl 6 In-Reply-To: References: Message-ID: 15 years, actually: http://en.wikipedia.org/wiki/Perl_6#History It started with Larry's State of the Onion in July, 2000. On Fri, May 8, 2015 at 1:04 PM, Hal Wigoda wrote: > How long has Perl 6 been in development? > Over 10 years? > > On Fri, May 8, 2015 at 7:31 AM, David Mertens > wrote: > >> Any chance this can be recorded and posted on youtube? :-) >> >> On Fri, May 8, 2015 at 1:10 AM, Doug Bell wrote: >> >>> You may have heard that Perl 6[1] is making its debut this Christmas; >>> This is the perfect time to get involved and help the team get through the >>> last mile. Rob Hoelz[2] will walk through making a change to the Rakudo >>> compiler [3], which will make it easier to make your own changes and help >>> out! A brief rundown of the evening: >>> >>> * A quick intro to Perl 6 for newbies >>> * A brief overview of the Perl 6 ecosystem >>> * A tour of the Rakudo compiler's source >>> * Going through the compiler and making the change >>> >>> Join us on Thursday, May 28 at 7:00 PM. RSVP on the Chicago.PM Meetup >>> page: http://www.meetup.com/ChicagoPM/events/222390262/ >>> >>> If you've got Perl problems, questions, or just want to meet fellow Perl >>> programmers, come to Office Hours on Thursday, May 14. >>> >>> RSVP for Office Hours on the Chicago.PM Meetup page: >>> http://www.meetup.com/ChicagoPM/events/221766093/ >>> >>> [1]: Perl 6: http://perl6.org >>> [2]: Rob Hoelz: http://hoelz.ro >>> [3]: The Rakudo Perl 6 project: http://rakudo.org >>> >>> Doug Bell >>> madcityzen at gmail.com >>> >>> _______________________________________________ >>> Chicago-talk mailing list >>> Chicago-talk at pm.org >>> http://mail.pm.org/mailman/listinfo/chicago-talk >>> >> >> >> >> -- >> "Debugging is twice as hard as writing the code in the first place. >> Therefore, if you write the code as cleverly as possible, you are, >> by definition, not smart enough to debug it." -- Brian Kernighan >> >> _______________________________________________ >> Chicago-talk mailing list >> Chicago-talk at pm.org >> http://mail.pm.org/mailman/listinfo/chicago-talk >> > > > > -- > ----------------- > Hal Wigoda > Chicago > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk at pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > -- "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." -- Brian Kernighan -------------- next part -------------- An HTML attachment was scrubbed... URL: From joel.a.berger at gmail.com Fri May 8 12:26:07 2015 From: joel.a.berger at gmail.com (Joel Berger) Date: Fri, 08 May 2015 19:26:07 +0000 Subject: [Chicago-talk] Meeting May 28 - Getting Into Perl 6 In-Reply-To: References: Message-ID: Nobody has edited that history to include the non-announcement announcement yet. Lack of interest or lack of confidence? On Fri, May 8, 2015 at 12:41 PM David Mertens wrote: > 15 years, actually: http://en.wikipedia.org/wiki/Perl_6#History > > It started with Larry's State of the Onion in July, 2000. > > On Fri, May 8, 2015 at 1:04 PM, Hal Wigoda wrote: > >> How long has Perl 6 been in development? >> Over 10 years? >> >> On Fri, May 8, 2015 at 7:31 AM, David Mertens >> wrote: >> >>> Any chance this can be recorded and posted on youtube? :-) >>> >>> On Fri, May 8, 2015 at 1:10 AM, Doug Bell wrote: >>> >>>> You may have heard that Perl 6[1] is making its debut this Christmas; >>>> This is the perfect time to get involved and help the team get through the >>>> last mile. Rob Hoelz[2] will walk through making a change to the Rakudo >>>> compiler [3], which will make it easier to make your own changes and help >>>> out! A brief rundown of the evening: >>>> >>>> * A quick intro to Perl 6 for newbies >>>> * A brief overview of the Perl 6 ecosystem >>>> * A tour of the Rakudo compiler's source >>>> * Going through the compiler and making the change >>>> >>>> Join us on Thursday, May 28 at 7:00 PM. RSVP on the Chicago.PM Meetup >>>> page: http://www.meetup.com/ChicagoPM/events/222390262/ >>>> >>>> If you've got Perl problems, questions, or just want to meet fellow >>>> Perl programmers, come to Office Hours on Thursday, May 14. >>>> >>>> RSVP for Office Hours on the Chicago.PM Meetup page: >>>> http://www.meetup.com/ChicagoPM/events/221766093/ >>>> >>>> [1]: Perl 6: http://perl6.org >>>> [2]: Rob Hoelz: http://hoelz.ro >>>> [3]: The Rakudo Perl 6 project: http://rakudo.org >>>> >>>> Doug Bell >>>> madcityzen at gmail.com >>>> >>>> _______________________________________________ >>>> Chicago-talk mailing list >>>> Chicago-talk at pm.org >>>> http://mail.pm.org/mailman/listinfo/chicago-talk >>>> >>> >>> >>> >>> -- >>> "Debugging is twice as hard as writing the code in the first place. >>> Therefore, if you write the code as cleverly as possible, you are, >>> by definition, not smart enough to debug it." -- Brian Kernighan >>> >>> _______________________________________________ >>> Chicago-talk mailing list >>> Chicago-talk at pm.org >>> http://mail.pm.org/mailman/listinfo/chicago-talk >>> >> >> >> >> -- >> ----------------- >> Hal Wigoda >> Chicago >> >> _______________________________________________ >> Chicago-talk mailing list >> Chicago-talk at pm.org >> http://mail.pm.org/mailman/listinfo/chicago-talk >> > > > > -- > "Debugging is twice as hard as writing the code in the first place. > Therefore, if you write the code as cleverly as possible, you are, > by definition, not smart enough to debug it." -- Brian Kernighan > _______________________________________________ > Chicago-talk mailing list > Chicago-talk at pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk -------------- next part -------------- An HTML attachment was scrubbed... URL: From hal.wigoda at gmail.com Fri May 8 18:35:22 2015 From: hal.wigoda at gmail.com (Hal Wigoda) Date: Fri, 8 May 2015 20:35:22 -0500 Subject: [Chicago-talk] Meeting May 28 - Getting Into Perl 6 In-Reply-To: References: Message-ID: <6536B606-BD09-4B20-9813-C147F33E9702@gmail.com> I was at that open source conference of oreilly. I remember than speech. Sent from my iPad > On May 8, 2015, at 2:26 PM, Joel Berger wrote: > > Nobody has edited that history to include the non-announcement announcement yet. Lack of interest or lack of confidence? > >> On Fri, May 8, 2015 at 12:41 PM David Mertens wrote: >> 15 years, actually: http://en.wikipedia.org/wiki/Perl_6#History >> >> It started with Larry's State of the Onion in July, 2000. >> >>> On Fri, May 8, 2015 at 1:04 PM, Hal Wigoda wrote: >>> How long has Perl 6 been in development? >>> Over 10 years? >>> >>>> On Fri, May 8, 2015 at 7:31 AM, David Mertens wrote: >>>> Any chance this can be recorded and posted on youtube? :-) >>>> >>>>> On Fri, May 8, 2015 at 1:10 AM, Doug Bell wrote: >>>>> You may have heard that Perl 6[1] is making its debut this Christmas; This is the perfect time to get involved and help the team get through the last mile. Rob Hoelz[2] will walk through making a change to the Rakudo compiler [3], which will make it easier to make your own changes and help out! A brief rundown of the evening: >>>>> >>>>> * A quick intro to Perl 6 for newbies >>>>> * A brief overview of the Perl 6 ecosystem >>>>> * A tour of the Rakudo compiler's source >>>>> * Going through the compiler and making the change >>>>> >>>>> Join us on Thursday, May 28 at 7:00 PM. RSVP on the Chicago.PM Meetup page: http://www.meetup.com/ChicagoPM/events/222390262/ >>>>> >>>>> If you've got Perl problems, questions, or just want to meet fellow Perl programmers, come to Office Hours on Thursday, May 14. >>>>> >>>>> RSVP for Office Hours on the Chicago.PM Meetup page: http://www.meetup.com/ChicagoPM/events/221766093/ >>>>> >>>>> [1]: Perl 6: http://perl6.org >>>>> [2]: Rob Hoelz: http://hoelz.ro >>>>> [3]: The Rakudo Perl 6 project: http://rakudo.org >>>>> >>>>> Doug Bell >>>>> madcityzen at gmail.com >>>>> >>>>> _______________________________________________ >>>>> Chicago-talk mailing list >>>>> Chicago-talk at pm.org >>>>> http://mail.pm.org/mailman/listinfo/chicago-talk >>>> >>>> >>>> >>>> -- >>>> "Debugging is twice as hard as writing the code in the first place. >>>> Therefore, if you write the code as cleverly as possible, you are, >>>> by definition, not smart enough to debug it." -- Brian Kernighan >>>> >>>> _______________________________________________ >>>> Chicago-talk mailing list >>>> Chicago-talk at pm.org >>>> http://mail.pm.org/mailman/listinfo/chicago-talk >>> >>> >>> >>> -- >>> ----------------- >>> Hal Wigoda >>> Chicago >>> >>> _______________________________________________ >>> Chicago-talk mailing list >>> Chicago-talk at pm.org >>> http://mail.pm.org/mailman/listinfo/chicago-talk >> >> >> >> -- >> "Debugging is twice as hard as writing the code in the first place. >> Therefore, if you write the code as cleverly as possible, you are, >> by definition, not smart enough to debug it." -- Brian Kernighan >> _______________________________________________ >> Chicago-talk mailing list >> Chicago-talk at pm.org >> http://mail.pm.org/mailman/listinfo/chicago-talk > _______________________________________________ > Chicago-talk mailing list > Chicago-talk at pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk -------------- next part -------------- An HTML attachment was scrubbed... URL: From lembark at wrkhors.com Mon May 11 16:42:02 2015 From: lembark at wrkhors.com (Steven Lembark) Date: Mon, 11 May 2015 18:42:02 -0500 Subject: [Chicago-talk] Meeting May 28 - Getting Into Perl 6 In-Reply-To: References: Message-ID: <20150511184202.1a0be0cf.lembark@wrkhors.com> On Fri, 8 May 2015 00:10:45 -0500 Doug Bell wrote: > You may have heard that Perl 6[1] is making its debut this Christmas; > This is the perfect time to get involved and help the team get > through the last mile. Rob Hoelz[2] will walk through making a change > to the Rakudo compiler [3], which will make it easier to make your > own changes and help out! A brief rundown of the evening: Suggestion: at the NYC hackathon we went through the P6 core tests, opening RT requetsts for failing tests and adding the RT bug numbers to skip's for the failing tests. Nice thing is that it involves minimal P6 knowedge to trace through where these fail and does a good job of helping the developers. If you can get some people willing to blow a few beers fixing test bugs I can dig up some doc's on how to add the bugs via email and add the skips. enjoi -- Steven Lembark 3646 Flora Pl Workhorse Computing St Louis, MO 63110 lembark at wrkhors.com +1 888 359 3508 From amead2 at alanmead.org Tue May 19 11:02:27 2015 From: amead2 at alanmead.org (Alan Mead) Date: Tue, 19 May 2015 13:02:27 -0500 Subject: [Chicago-talk] Two Perl curiosities Message-ID: <555B7AB3.1060904@alanmead.org> I have two odd Perl things I've noticed recently. I'm using the stock Centos 6.6 perl (v5.10.1 + whatever black magic Red Hat added). Curiosity #1: I can't post the entire program code but I have a long script: #!/usr/bin/perl use strict; use warnings; [... about 150 lines omitted, including the beginning of a loop in a subroutine] my $a = $$pars{'alpha'}; my $delta = $$pars{'delta'}; my $taus = $$pars{'taus'}; print $fh join("\t", ($a, >>$b<<, 0, @$taus)), "\n" # >> << is my emphasis I meant to type "delta" but I typed "b". Shouldn't Perl throw an error because of the strict pragma or at least a warning? I get no warnings when I "perl -c" and when running, all the warning I get is that $b is uninitialized. When I create a small test script with this kind of error, I get a warning: "Name "main::b" used only once: possible typo at ./test.pl line 11." Curiosity #2: Also, I converted a program from Pascal to Perl and I forgot one assignment operator (e.g., something like my $a := 1;) and Perl never complained. What does := do in Perl? It's hard to google ops. In a test program, it looks like it's a valid assignment operator? $ cat test.pl #!/usr/bin/perl use strict; use warnings; my $a := 42; print "$a\n"; $ ./test.pl 42 -Alan -- Alan D. Mead, Ph.D. President, Talent Algorithms Inc. science + technology = better workers +815.588.3846 (Office) +267.334.4143 (Mobile) http://www.alanmead.org Announcing the Journal of Computerized Adaptive Testing (JCAT), a peer-reviewed electronic journal designed to advance the science and practice of computerized adaptive testing: http://www.iacat.org/jcat From andy at petdance.com Tue May 19 11:12:27 2015 From: andy at petdance.com (Andy Lester) Date: Tue, 19 May 2015 13:12:27 -0500 Subject: [Chicago-talk] Two Perl curiosities In-Reply-To: <555B7AB3.1060904@alanmead.org> References: <555B7AB3.1060904@alanmead.org> Message-ID: <8370E660-D191-4525-8632-87B0BCFC0210@petdance.com> > I meant to type "delta" but I typed "b". Shouldn't Perl throw an error > because of the strict pragma or at least a warning? I get no warnings > when I "perl -c" and when running, all the warning I get is that $b is > uninitialized. When I create a small test script with this kind of > error, I get a warning: "Name "main::b" used only once: possible typo at > ./test.pl line 11." $a and $b are always declared behind the scenes because they are special variables with special meaning to the sort() function. You can have custom comparison functions for sort() and those functions use $a and $b for the two items to compare. Like this: my @names = qw( Moe Larry Curly ); my @sorted_names = sort &case_insensitive @names; sub case_insensitive { return lc($a) cmp lc($b); } $a and $b aren?t passed in to the function. They just exist. So that?s why your typo didn?t fire a warning. -- Andy Lester => www.petdance.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From amead2 at alanmead.org Tue May 19 11:13:12 2015 From: amead2 at alanmead.org (Alan Mead) Date: Tue, 19 May 2015 13:13:12 -0500 Subject: [Chicago-talk] Two Perl curiosities In-Reply-To: <8370E660-D191-4525-8632-87B0BCFC0210@petdance.com> References: <555B7AB3.1060904@alanmead.org> <8370E660-D191-4525-8632-87B0BCFC0210@petdance.com> Message-ID: <555B7D38.9070901@alanmead.org> On 5/19/2015 1:12 PM, Andy Lester wrote: > $a and $b aren?t passed in to the function. They just exist. So > that?s why your typo didn?t fire a warning. Ah. That makes sense. -- Alan D. Mead, Ph.D. President, Talent Algorithms Inc. science + technology = better workers +815.588.3846 (Office) +267.334.4143 (Mobile) http://www.alanmead.org Announcing the Journal of Computerized Adaptive Testing (JCAT), a peer-reviewed electronic journal designed to advance the science and practice of computerized adaptive testing: http://www.iacat.org/jcat From madcityzen at gmail.com Tue May 19 11:15:49 2015 From: madcityzen at gmail.com (Doug Bell) Date: Tue, 19 May 2015 13:15:49 -0500 Subject: [Chicago-talk] Two Perl curiosities In-Reply-To: <555B7AB3.1060904@alanmead.org> References: <555B7AB3.1060904@alanmead.org> Message-ID: <6596510165772636101@unknownmsgid> > On May 19, 2015, at 1:08 PM, Alan Mead wrote: > > Curiosity #1: I can't post the entire program code but I have a long script: > > #!/usr/bin/perl > > use strict; > use warnings; > > [... about 150 lines omitted, including the beginning of a loop in a > subroutine] > > my $a = $$pars{'alpha'}; > my $delta = $$pars{'delta'}; > my $taus = $$pars{'taus'}; > print $fh join("\t", ($a, >>$b<<, 0, @$taus)), "\n" # >> << > is my emphasis > > I meant to type "delta" but I typed "b". Shouldn't Perl throw an error > because of the strict pragma or at least a warning? I get no warnings > when I "perl -c" and when running, all the warning I get is that $b is > uninitialized. When I create a small test script with this kind of > error, I get a warning: "Name "main::b" used only once: possible typo at > ./test.pl line 11." $b always exists as a global variable, because it's used by sort(). It's why people tend to avoid using $a and $b in examples or ever, because they could be clobbered by a sort() at any time. > Curiosity #2: Also, I converted a program from Pascal to Perl and I > forgot one assignment operator (e.g., something like my $a := 1;) and > Perl never complained. What does := do in Perl? It's hard to google > ops. In a test program, it looks like it's a valid assignment operator? > > $ cat test.pl > #!/usr/bin/perl > use strict; > use warnings; > my $a := 42; > print "$a\n"; > $ ./test.pl > 42 The : in variable declarations would allow you to set a variable's attributes, which is rarely used. In that syntax, Perl just thinks you've set no attributes. From joel.a.berger at gmail.com Tue May 19 11:16:39 2015 From: joel.a.berger at gmail.com (Joel Berger) Date: Tue, 19 May 2015 18:16:39 +0000 Subject: [Chicago-talk] Two Perl curiosities In-Reply-To: <555B7AB3.1060904@alanmead.org> References: <555B7AB3.1060904@alanmead.org> Message-ID: On Tue, May 19, 2015 at 1:08 PM Alan Mead wrote: > > Curiosity #2: Also, I converted a program from Pascal to Perl and I > forgot one assignment operator (e.g., something like my $a := 1;) and > Perl never complained. What does := do in Perl? It's hard to google > ops. In a test program, it looks like it's a valid assignment operator? > > $ cat test.pl > #!/usr/bin/perl > use strict; > use warnings; > my $a := 42; > print "$a\n"; > $ ./test.pl > 42 > To investigate, I ran it through B::Deparse and got this interesting nugget: perl -MO=Deparse -E 'my $x := 42; say $x' Use of := for an empty attribute list is not allowed at -e line 1. So what it is trying to do is apply an empty attribute list. Using attributes on variables is a very rare thing, so perhaps few people know it exists, read more here: https://metacpan.org/pod/attributes A possibly useful example is that this fails: perl -E 'my $x :Int = 42.2; say $x' but generally, I think variable attributes are best avoided. Joel Berger > > > -Alan > > > -- > > Alan D. Mead, Ph.D. > President, Talent Algorithms Inc. > > science + technology = better workers > > +815.588.3846 (Office) > +267.334.4143 (Mobile) > > http://www.alanmead.org > > Announcing the Journal of Computerized Adaptive Testing (JCAT), a > peer-reviewed electronic journal designed to advance the science and > practice of computerized adaptive testing: http://www.iacat.org/jcat > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk at pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > -------------- next part -------------- An HTML attachment was scrubbed... URL: From amead2 at alanmead.org Tue May 19 11:23:40 2015 From: amead2 at alanmead.org (Alan Mead) Date: Tue, 19 May 2015 13:23:40 -0500 Subject: [Chicago-talk] Two Perl curiosities In-Reply-To: <6596510165772636101@unknownmsgid> References: <555B7AB3.1060904@alanmead.org> <6596510165772636101@unknownmsgid> Message-ID: <555B7FAC.8020105@alanmead.org> On 5/19/2015 1:15 PM, Doug Bell wrote: > $b always exists as a global variable, because it's used by sort(). > It's why people tend to avoid using $a and $b in examples or ever, > because they could be clobbered by a sort() at any time. I was not aware that a sort would clobber $a and $b, that's good to know. > The : in variable declarations would allow you to set a variable's > attributes, which is rarely used. In that syntax, Perl just thinks > you've set no attributes. Ah, I see. -- Alan D. Mead, Ph.D. President, Talent Algorithms Inc. science + technology = better workers +815.588.3846 (Office) +267.334.4143 (Mobile) http://www.alanmead.org Announcing the Journal of Computerized Adaptive Testing (JCAT), a peer-reviewed electronic journal designed to advance the science and practice of computerized adaptive testing: http://www.iacat.org/jcat From amead2 at alanmead.org Tue May 19 11:24:22 2015 From: amead2 at alanmead.org (Alan Mead) Date: Tue, 19 May 2015 13:24:22 -0500 Subject: [Chicago-talk] Two Perl curiosities In-Reply-To: References: <555B7AB3.1060904@alanmead.org> Message-ID: <555B7FD6.1070601@alanmead.org> On 5/19/2015 1:16 PM, Joel Berger wrote: > Using attributes on variables is a very rare thing, so perhaps few > people know it exists, read more here: https://metacpan.org/pod/attributes Interesting. I certainly didn't. Thanks! -- Alan D. Mead, Ph.D. President, Talent Algorithms Inc. science + technology = better workers +815.588.3846 (Office) +267.334.4143 (Mobile) http://www.alanmead.org Announcing the Journal of Computerized Adaptive Testing (JCAT), a peer-reviewed electronic journal designed to advance the science and practice of computerized adaptive testing: http://www.iacat.org/jcat