From mark at senn.us Tue Jan 3 09:30:45 2017 From: mark at senn.us (Mark Senn) Date: Tue, 03 Jan 2017 12:30:45 -0500 Subject: [Purdue-pm] an example Perl 6 program Message-ID: Following my signature is an example Perl 6 program. I call it month, typing month 2017-01 causes 2017-01-01 Sun 2017-01-02 Mon 2017-01-03 Tue ... to be printed. Typing month --help causes the USAGE message to be printed. Mark Senn, Systems Programmer, Engineering Computer Network, Purdue University #!/home/pier/e/mark/src/rakudo-star-2016.11/install/bin/perl6 sub MAIN($year-month, Bool :$help) { ($help) and USAGE; my ($year, $month) = $year-month.split('-'); (($year ~~ /^^\d\d\d\d$$/) && ($month ~~ /^^\d\d$$/)) or USAGE; my $date = Date.new(year => $year, month => $month, day => 1); my $dow = $date.day-of-week; my $days = $date.days-in-month; # Forty-two days is more than enough. my @weekday = flat('', ('Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun') xx 6); for (1..$days) -> $day { printf "%4s-%2s-%02d %s\n", $year, $month, $day, @weekday[$dow++]; } } sub USAGE() { say q:to 'END'; Usage: month yyyy-mm Example: month 2017-01 END exit 1; } From jacoby.david at gmail.com Mon Jan 9 09:53:31 2017 From: jacoby.david at gmail.com (Dave Jacoby) Date: Mon, 9 Jan 2017 12:53:31 -0500 Subject: [Purdue-pm] Meeting Reminder - Google Test Message-ID: Our January meeting will this Wednesday, January 11, at 5:30 in EE 317, where Derrick will present on Google's test framework for C++, Google Test. https://www.meetup.com/hacklafayette/events/235576112/ After, we will be going to Lafayette Brewing Company for HackLafayette Open Source Food & Chat. Please tell your C++ using friends about this, and RSVP. -- Dave Jacoby jacoby.david at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: