From tony at metracom.com Sun Oct 1 22:39:21 2017 From: tony at metracom.com (Tony) Date: Sun, 1 Oct 2017 22:39:21 -0700 Subject: [Oc-pm] OC Perl Mongers meeting October 30th @ 7pm. Learning Perl 6 - meeting 1 of 6 Message-ID: <8cacd4da-801b-7903-0b57-a909694b7d35@metracom.com> OC Perl Mongers, The group has decided that it would like to focus the next six meetings on leaning the new Perl 6 programming language. As a group we will cover 1 - 2 chapters each meeting from a Perl 6 book. It is highly advised that your bring your laptop with Perl 6 installed. WIFI is available, so you can also connect to an external resource if needed. Please make sure you have a Perl 6 environment to use. We will be writing and testing code examples from the book. Everyone is welcome to attend our meetings. Our meeting location is located off the 73 freeway in Irvine. See the map on the website for directions. The meeting room has air-conditioning, comfortable chairs and large wall projector. Plenty of FREE parking. Vending machines are available. See you on Monday the 30th, http://oc.pm.org Tony From bobmath11 at icloud.com Mon Oct 9 11:35:11 2017 From: bobmath11 at icloud.com (Bob Mathews) Date: Mon, 09 Oct 2017 11:35:11 -0700 Subject: [Oc-pm] iss Message-ID: It was fun seeing the ISS at last month's meeting. There is, of course, a perl module that can tell you when the station and other satellites are visible. use strict; use warnings; use Astro::App::Satpass2; my $sat = Astro::App::Satpass2->new( latitude => 33.637566, longitude => -117.848459, height => 43, ); $sat->spacetrack(qw{ spaceflight -all }); print $sat->location(); print $sat->pass(); -------------- next part -------------- An HTML attachment was scrubbed... URL: From tony at metracom.com Sun Oct 29 22:20:31 2017 From: tony at metracom.com (Tony) Date: Sun, 29 Oct 2017 22:20:31 -0700 Subject: [Oc-pm] Reminder: OC Perl Mongers meeting October 30th @ 7pm. Learning Perl 6 - meeting 1 of 6 Message-ID: OC Perl Mongers, The group has decided that it would like to focus the next six meetings on leaning the new Perl 6 programming language. As a group we will cover 1 - 2 chapters each meeting from a Perl 6 book. It is highly advised that your bring your laptop with Perl 6 installed. WIFI is available, so you can also connect to an external resource if needed. Please make sure you have a Perl 6 environment to use. We will be writing and testing code examples from the book. Everyone is welcome to attend our meetings. Our meeting location is located off the 73 freeway in Irvine. See the map on the website for directions. The meeting room has air-conditioning, comfortable chairs and large wall projector. Plenty of FREE parking. Vending machines are available. See you on Monday the 30th, http://oc.pm.org Tony From bobmath11 at icloud.com Tue Oct 31 10:05:46 2017 From: bobmath11 at icloud.com (Bob Mathews) Date: Tue, 31 Oct 2017 10:05:46 -0700 Subject: [Oc-pm] spaces in perl6 Message-ID: <157AFC63-1A50-400E-B8F6-BF84CFC39122@icloud.com> It seems that space-before-paren is still significant in Perl6. The first two statements print a 1 immediately followed by a 2... > say 1, 2 12 > say(1,2) 12 > say (1,2) (1 2) ...and the third prints a tuple containing one and two. -bob -------------- next part -------------- An HTML attachment was scrubbed... URL: From erickfjordan at gmail.com Tue Oct 31 11:28:52 2017 From: erickfjordan at gmail.com (Erick Jordan) Date: Tue, 31 Oct 2017 18:28:52 +0000 Subject: [Oc-pm] spaces in perl6 In-Reply-To: <157AFC63-1A50-400E-B8F6-BF84CFC39122@icloud.com> References: <157AFC63-1A50-400E-B8F6-BF84CFC39122@icloud.com> Message-ID: You're right. Horribly inconsistent. > printf ("%d + %d = %d\n", 4,5,1) Your printf-style directives specify 3 arguments, but no argument was supplied > printf("%d + %d = %d\n", 4,5,1) 4 + 5 = 1 Something changed. On Tue, Oct 31, 2017 at 10:05 AM Bob Mathews wrote: > It seems that space-before-paren is still significant in Perl6. The first > two statements print a 1 immediately followed by a 2... > > > say 1, 2 > 12 > > say(1,2) > 12 > > say (1,2) > (1 2) > > ...and the third prints a tuple containing one and two. > > -bob > > _______________________________________________ > Oc-pm mailing list > Oc-pm at pm.org > http://mail.pm.org/mailman/listinfo/oc-pm > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mvr707 at gmail.com Tue Oct 31 11:43:31 2017 From: mvr707 at gmail.com (Ramana V Mokkapati) Date: Tue, 31 Oct 2017 11:43:31 -0700 Subject: [Oc-pm] spaces in perl6 In-Reply-To: References: <157AFC63-1A50-400E-B8F6-BF84CFC39122@icloud.com> Message-ID: I did not see any inconsistency ... for me,... "say (1,2)" is same as "say((1,2))" since we are passing a tuple to the subroutine. "printf (1,2)" and printf(1,2)" are different - in the former, we are passing only one parameter as input. On Tue, Oct 31, 2017 at 11:28 AM, Erick Jordan wrote: > You're right. Horribly inconsistent. > > > printf ("%d + %d = %d\n", 4,5,1) > Your printf-style directives specify 3 arguments, but no argument was > supplied > > > printf("%d + %d = %d\n", 4,5,1) > 4 + 5 = 1 > > Something changed. > > On Tue, Oct 31, 2017 at 10:05 AM Bob Mathews wrote: > >> It seems that space-before-paren is still significant in Perl6. The first >> two statements print a 1 immediately followed by a 2... >> >> > say 1, 2 >> 12 >> > say(1,2) >> 12 >> > say (1,2) >> (1 2) >> >> ...and the third prints a tuple containing one and two. >> >> -bob >> >> _______________________________________________ >> Oc-pm mailing list >> Oc-pm at pm.org >> http://mail.pm.org/mailman/listinfo/oc-pm >> > > _______________________________________________ > Oc-pm mailing list > Oc-pm at pm.org > http://mail.pm.org/mailman/listinfo/oc-pm > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bobmath11 at icloud.com Tue Oct 31 11:50:44 2017 From: bobmath11 at icloud.com (Bob Mathews) Date: Tue, 31 Oct 2017 11:50:44 -0700 Subject: [Oc-pm] spaces in perl6 In-Reply-To: References: <157AFC63-1A50-400E-B8F6-BF84CFC39122@icloud.com> Message-ID: <5EB0A773-C50B-40B1-A983-D27713A29B93@icloud.com> > On Oct 31, 2017, at 11:43 AM, Ramana V Mokkapati wrote: > I did not see any inconsistency ... It seems to be consistently stupid. This bites other postfix operators as well. Take the example at the end of chapter 4. sub postfix:($n) { [*] 1..$n } say 5Factorial; # 120 You can't put a space between 5 and Factorial. (You can put a backslash and then a space, if you want.) The part that amuses me is that this is prefaced by the statement: > There is no intention in Perl 6 design to make user-defined operators cryptic. -bob -------------- next part -------------- An HTML attachment was scrubbed... URL: From erickfjordan at gmail.com Tue Oct 31 15:33:09 2017 From: erickfjordan at gmail.com (Erick Jordan) Date: Tue, 31 Oct 2017 22:33:09 +0000 Subject: [Oc-pm] spaces in perl6 In-Reply-To: <5EB0A773-C50B-40B1-A983-D27713A29B93@icloud.com> References: <157AFC63-1A50-400E-B8F6-BF84CFC39122@icloud.com> <5EB0A773-C50B-40B1-A983-D27713A29B93@icloud.com> Message-ID: I found this explanation on the perl6 website: https://docs.perl6.org/language/5to6-nutshell#Whitespace On Tue, Oct 31, 2017 at 11:51 AM Bob Mathews wrote: > On Oct 31, 2017, at 11:43 AM, Ramana V Mokkapati wrote: > I did not see any inconsistency ... > > > It seems to be consistently stupid. This bites other postfix operators as > well. Take the example at the end of chapter 4. > > sub postfix:($n) { > [*] 1..$n > } > say 5Factorial; # 120 > > You can't put a space between 5 and Factorial. (You can put a backslash > and then a space, if you want.) > > The part that amuses me is that this is prefaced by the statement: > > There is no intention in Perl 6 design to make user-defined operators > cryptic. > > > -bob > > _______________________________________________ > Oc-pm mailing list > Oc-pm at pm.org > http://mail.pm.org/mailman/listinfo/oc-pm > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mvr707 at gmail.com Tue Oct 31 17:40:14 2017 From: mvr707 at gmail.com (Ramana V Mokkapati) Date: Tue, 31 Oct 2017 17:40:14 -0700 Subject: [Oc-pm] spaces in perl6 In-Reply-To: References: <157AFC63-1A50-400E-B8F6-BF84CFC39122@icloud.com> <5EB0A773-C50B-40B1-A983-D27713A29B93@icloud.com> Message-ID: syntactical significance of whitespace is probably related to ability to override reserved words; typically higher order scripting languages allow this - more to simulate natural languages where context determines the meaning (and the ensuing ambiguity gives rise to beautiful poetry too). E.g. if we don't permit "if" to be a subroutine, "if(a>b)" is ok, but if we allow subroutine name by name "if", we do need to set them apart. Probably the need to allow override of reserved words is related to number of reserved words - larger set of reserved words drives the need to override, again, akin to natural languages. In these cases punctuation is very critical, but that does not make the language less useful, in fact, it makes it more colorful. E.g. An English professor wrote on the board: A woman without her man is nothing. The class was then asked to punctuate the sentence. The men wrote: "A woman, without her man, is nothing." The women wrote: "A woman: without her, man is nothing." :-) On Tue, Oct 31, 2017 at 3:33 PM, Erick Jordan wrote: > I found this explanation on the perl6 website: > > https://docs.perl6.org/language/5to6-nutshell#Whitespace > > > > On Tue, Oct 31, 2017 at 11:51 AM Bob Mathews wrote: > >> On Oct 31, 2017, at 11:43 AM, Ramana V Mokkapati >> wrote: >> I did not see any inconsistency ... >> >> >> It seems to be consistently stupid. This bites other postfix operators as >> well. Take the example at the end of chapter 4. >> >> sub postfix:($n) { >> [*] 1..$n >> } >> say 5Factorial; # 120 >> >> You can't put a space between 5 and Factorial. (You can put a backslash >> and then a space, if you want.) >> >> The part that amuses me is that this is prefaced by the statement: >> >> There is no intention in Perl 6 design to make user-defined operators >> cryptic. >> >> >> -bob >> >> _______________________________________________ >> Oc-pm mailing list >> Oc-pm at pm.org >> http://mail.pm.org/mailman/listinfo/oc-pm >> > > _______________________________________________ > Oc-pm mailing list > Oc-pm at pm.org > http://mail.pm.org/mailman/listinfo/oc-pm > > -------------- next part -------------- An HTML attachment was scrubbed... URL: