|
brainstorming lists: gist.github.com/203173 paste.lisp.org/display/88288 IRC logs: irclog.perlgeek.de/perl6book/today source: github.com/perl6/book/ Set by moderator on 20 October 2009. |
|||
|
07:40
colomon joined
09:01
pmichaud_ joined
09:02
dukeleto joined,
jnthn_ joined,
dalek joined
11:14
jnthn left,
jnthn joined
12:12
masak joined
13:55
colomon joined
14:26
lichtkind joined
|
|||
| moritz_ | question | 16:06 | |
| do we want to offer exercises? | |||
| masak | I've wondered the same. | ||
| jnthn | 10 press-ups! | ||
| masak | maybe. | ||
| those 'variants' I've been considering for Task could be posed as exercises, with answers. | |||
| moritz_ | nopaste.snit.ch/18497 somehow I epically failed at making that simple | 16:27 | |
| masak | @names.sort({ %games{$^a} <=> %games{$^b} || %sets{$a} <=> %sets{$b}}) | 16:33 | |
| could be written | |||
| @names.sort({ %sets{$_}).sort({ %games{$_ }) | |||
| otherwise, I think it looks like a nice script. | 16:34 | ||
| moritz_ | but is it simple enough for the first example in the book? | 16:35 | |
| anyway, I like your sort rewrite | |||
| masak | it certainly has many of the characteristics we're looking for. | ||
| moritz_ | yes | ||
| I wrote it with that in mind | |||
| masak | arrays, hashes, for loops, if statements... | ||
| are you sure you want to do 'open' without 'or die'? | 16:36 | ||
| moritz_ | not sure at all | ||
| rakudo's open() dies all by itself | |||
| masak | ah. | ||
| right. | |||
| moritz_ | not right, I believe | 16:37 | |
| masak | ah. | ||
| then I'd add an 'or die'. | |||
| moritz_ | I'd rather have a 'use fatal;' | 16:38 | |
| jnthn | Note if you actually use the filehandle it will expode then. | ||
| my $fh = open 'lol I don't exist'; | |||
| if $fh { ... } # ok | |||
| moritz_ | then the .get dies | ||
| masak | then I'd rather do | 16:39 | |
| if open($file) -> $fh { ... } | 16:40 | ||
| moritz_ | nooo | ||
| I think leaving it as-is is fine | 16:41 | ||
| both with current rakudo and spec semantic it dies with a helpful error message | |||
| masak | I don't have any strong opinions either way. | 16:42 | |
|
16:46
lichtkind joined
16:50
mj41 joined
17:22
colomon joined
17:27
chromatic joined
17:55
hugme joined
|
|||
| dalek | ok: d7fbc55 | moritz++ | (2 files): example for chapter 1 back-and-forth reference, and it's already warning |
20:12 | |
|
20:17
Util joined
|
|||
| Util | moritz_: Bug in nopaste 18497, line 38: s/for @names/for @sorted/; | 20:19 | |
| moritz_ | Util: fixed in the pod | ||
| Util: thanks anyway ;-) | |||
| Util | yw | 20:20 | |
|
22:06
hugme joined,
japhb joined,
lichtkind joined,
carlin joined,
TimToady joined
22:09
colomon joined
|
|||