Perl 6 - the future is here, just unevenly distributed

IRC log for #6macros, 2016-06-18

| Channels | #6macros index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
01:30 cognominal joined #6macros
01:48 ilbot3 joined #6macros
01:54 vendethiel joined #6macros
07:17 FROGGS joined #6macros
10:27 FROGGS joined #6macros
21:27 vendethiel tracks, huh?
21:27 vendethiel masak: so, you've embraced Python? :P
21:35 masak that's perhaps exaggerating a bit
21:36 masak but I've been teaching it a bit recently, so I decided to try my hand at writing the same small search in both Perl 6, Perl 5 and Python 3
21:36 masak without a doubt, Perl 6 has the fewest frustrations for me. I know that's subjective, but I'd like to think it's also partly not :)
21:41 masak vendethiel: just as a small example, in Python 3:
21:41 masak RIGHT_DIRECTIONS = LEFT_DIRECTIONS[-1:] + LEFT_DIRECTIONS[:-1]
21:41 masak I believe this is quite idiomatic Python
21:42 masak now, the corresponding line of Perl 6, directly translated would've been `constant RIGHT_DIRECTIONS = LEFT_DIRECTIONS[-1], flat LEFT_DIRECTIONS[0..*-2];`
21:42 masak which loses in so many ways
21:43 masak but idiomatic Perl 6 is just `constant RIGHT_DIRECTIONS = LEFT_DIRECTIONS.rotate(-1);` \o/
21:43 masak er, LEFT_DIRECTIONS[*-1], of course
21:44 vendethiel doesn't itertools have something in the bag for you?
21:44 vendethiel (pun intended)
21:45 masak not as far as I know
21:45 masak though I do agree that itertools is a big help in many cases
21:59 * vendethiel doesn't know much about Python

| Channels | #6macros index | Today | | Search | Google Search | Plain-Text | summary