| Time |
S |
Nick |
Message |
| 03:22 |
|
|
snarkyboojum joined #perl6book |
| 10:22 |
|
|
mubot joined #perl6book |
| 12:55 |
|
|
masak joined #perl6book |
| 14:22 |
|
|
PerlJam joined #perl6book |
| 18:17 |
|
|
lichtkind joined #perl6book |
| 18:23 |
|
jnthn |
40 mins to meeting? |
| 18:23 |
|
moritz_ |
right |
| 18:23 |
|
jnthn |
'k |
| 18:38 |
|
moritz_ |
my report for this week: |
| 18:38 |
|
moritz_ |
about two typo fixes |
| 18:38 |
|
moritz_ |
read the awesome diffs from chromatic++ |
| 18:38 |
|
moritz_ |
that's about it |
| 18:43 |
|
dalek |
book: 30057bc | masak++ | src/basics.pod: |
| 18:43 |
|
dalek |
book: [basics] more minor fixes |
| 18:43 |
|
dalek |
book: review: http://github.com/perl6/book/c[…]c99cc433bfdff91b2 |
| 18:43 |
|
dalek |
book: a6cee3d | masak++ | : |
| 18:43 |
|
dalek |
book: Merge branch 'master' of github.com:perl6/book |
| 18:43 |
|
dalek |
book: Conflicts: |
| 18:43 |
|
dalek |
book: src/basics.pod |
| 18:43 |
|
dalek |
book: review: http://github.com/perl6/book/c[…]182e6af3dcf0b138b |
| 19:00 |
|
dalek |
book: 25e3c18 | masak++ | src/classes-and-objects.pod: |
| 19:00 |
|
dalek |
book: [OO] added three questions |
| 19:00 |
|
dalek |
book: These questions could eventually be incorporated as exercises (if we decide |
| 19:00 |
|
dalek |
book: to have exercises), or they could perhaps be incorporated in the text itself. |
| 19:00 |
|
dalek |
book: I plan to write full answers to these three questions as well. |
| 19:01 |
|
dalek |
book: review: http://github.com/perl6/book/c[…]68e86d658740c8035 |
| 19:01 |
|
|
pmichaud joined #perl6book |
| 19:02 |
|
PerlJam |
greeble |
| 19:02 |
|
pmichaud |
hola |
| 19:02 |
|
moritz_ |
oh hai |
| 19:02 |
|
jnthn |
oh hai |
| 19:04 |
|
moritz_ |
please see the question in /topic |
| 19:04 |
|
moritz_ |
exercises yes/no? |
| 19:05 |
|
* moritz_ |
votes for "yes, where appropriate" |
| 19:05 |
|
PerlJam |
I wouldn't call them "exercises", but I vote yes too |
| 19:06 |
|
jnthn |
I'm happy enough to have them, yes. |
| 19:06 |
|
jnthn |
(more) |
| 19:06 |
|
moritz_ |
PerlJam: how would you call them? |
| 19:06 |
|
PerlJam |
I'd say "things to try" rather than "exercises". |
| 19:06 |
|
PerlJam |
the latter seems less fun than the former |
| 19:06 |
|
jnthn |
I wonder if we could somehow make them relate to the examples too. |
| 19:07 |
|
jnthn |
Like, "grab the example code for this chapter, and then extend it to do X" |
| 19:07 |
|
* moritz_ |
has lots of ideas for "things to try" for the first chapter |
| 19:07 |
|
jnthn |
Maybe that won't always be appropriate though. |
| 19:07 |
|
pmichaud |
I think "things to try", "exercises", or "What next?" would be a good thing to have |
| 19:08 |
|
moritz_ |
on noes |
| 19:08 |
|
moritz_ |
netsplit |
| 19:08 |
|
* moritz_ |
can't see jnthn anymore |
| 19:10 |
|
PerlJam |
you know what he looks like :) |
| 19:10 |
|
moritz_ |
ok, so we have no objections to excercises |
| 19:12 |
|
moritz_ |
any other things we want to discuss? |
| 19:14 |
|
PerlJam |
Where to focus? |
| 19:14 |
|
PerlJam |
Do we want to try to polish a particular chapter? |
| 19:14 |
|
PerlJam |
or still just "write stuff"? |
| 19:14 |
|
moritz_ |
writing the subs chapter |
| 19:14 |
|
moritz_ |
or extending the basics |
| 19:15 |
|
moritz_ |
would be my suggestion |
| 19:18 |
|
|
mberends joined #perl6book |
| 19:18 |
|
dalek |
book: 5a61748 | masak++ | src/classes-and-objects.pod: |
| 19:18 |
|
dalek |
book: [OO] added answer to the first question |
| 19:18 |
|
dalek |
book: review: http://github.com/perl6/book/c[…]f5a60230aa0e7209c |
| 19:22 |
|
|
masak joined #perl6book |
| 19:23 |
|
masak |
sorry I'm late. I got logged off and didn't realize it. |
| 19:24 |
|
masak |
PerlJam: "things to try" works for me. |
| 19:24 |
|
masak |
I find I have lots of extensions to write about for the OO chapter, whose example I created, |
| 19:29 |
|
moritz_ |
anything else we want to discuss? |
| 19:31 |
|
masak |
people are welcome to read and comment on the exercises I just committed. |
| 19:31 |
|
masak |
that also forms the whole of my report for this week. :) |
| 19:32 |
|
moritz_ |
ok, then let's adjourn what remains of this meeting ;-) |
| 19:33 |
|
* mberends |
skims masak++'s OO chapter |
| 19:34 |
|
masak |
well, it's my example. jnthn++ wrote most of the explanations. :) |
| 19:34 |
|
mberends |
masak: Q: doesn't it say somewhere that roles should be the primary container for methods? |
| 19:34 |
|
masak |
mberends: never heard of such a thing. |
| 19:35 |
|
mberends |
"behaviors" as S12 puts it |
| 19:35 |
|
masak |
how could that be a practical rule-of-thumb? |
| 19:35 |
|
mberends |
dunno, just read it sometime |
| 19:35 |
|
masak |
I guess I'd still treat such roles as classes, using punning. |
| 19:35 |
|
moritz_ |
that doesn't work if you teach about classes (but not roles yet) |
| 19:35 |
|
* mberends |
consults S12 |
| 19:36 |
|
masak |
even apart from that, I personally believe that Task should be a class. |
| 19:36 |
|
masak |
YMMV. |
| 19:38 |
|
mberends |
masak: S12:87 |
| 19:38 |
|
* masak |
reads |
| 19:38 |
|
masak |
mberends: funny, I read that totally differen.t |
| 19:38 |
|
mberends |
nobody seems to follow that advice yet |
| 19:39 |
|
masak |
s/\.t/t./ |
| 19:39 |
|
masak |
mberends: 'factor out common code' as in avoid re-defining the same method in various places in a complicated class hierarchy. |
| 19:39 |
|
masak |
not as in putting all methods, evar, in roles. |
| 19:40 |
|
mberends |
the implication is: people, you're often using classes when you *should* be using roles |
| 19:40 |
|
masak |
aye, sure. |
| 19:40 |
|
masak |
cf. Ovid's blog posts. |
| 19:40 |
|
mberends |
right |
| 19:41 |
|
mberends |
hence my Q: is there an opportunity for the OO chapter to mention roles? |
| 19:42 |
|
masak |
that's a different Q :) |
| 19:42 |
|
mberends |
heh |
| 19:42 |
|
masak |
I don't see why not. |
| 19:42 |
|
masak |
but so far I've only been writing stuff for which I have good examples. |
| 19:42 |
|
masak |
jnthn++ has been thinking a bit about parametric roles, I know. |
| 19:42 |
|
masak |
so I leave it to him, for now. |
| 19:43 |
|
mberends |
ok, whatever jnthn++ writes will be good. guaranteed. |
| 19:45 |
|
mberends |
masak: I'll try to think of a different example to add to the OO chapter, involving inheritance and/or roles. |
| 19:47 |
|
|
dukeleto joined #perl6book |
| 19:48 |
|
|
carlin joined #perl6book |
| 19:48 |
|
|
hicx174 joined #perl6book |
| 19:48 |
|
|
japhb joined #perl6book |
| 19:48 |
|
PerlJam |
I think the OO chapter should mention roles *before* inheritance. |
| 19:48 |
|
masak |
mberends: the chapter is currently called classes-and-methods. arguably, roles should sit in a different chapter, or the chapter should be renamed. |
| 19:49 |
|
|
jnthn joined #perl6book |
| 19:49 |
|
PerlJam |
roles should be given prominence as the preferred mechanism of code reuse. |
| 19:49 |
|
jnthn |
uff. That netsplit is a pain. |
| 19:50 |
|
jnthn |
Been reading in the log. :-) |
| 19:50 |
|
jnthn |
On the roles thing... |
| 19:50 |
|
mberends |
masak: it would be nice to mention roles alongside classes |
| 19:50 |
|
masak |
jnthn: welcome back! |
| 19:51 |
|
jnthn |
tbh, while I think roles are great and their use should be encouraged, I also think there's a place for classes too. |
| 19:51 |
|
masak |
mberends: nod. patches welcome. :) |
| 19:51 |
|
masak |
jnthn: aye. |
| 19:51 |
|
jnthn |
There's 2 aspects to draw out here. |
| 19:51 |
|
jnthn |
imho anyway |
| 19:51 |
|
mberends |
masak: patch should only take a couple off weebs ;) |
| 19:51 |
|
masak |
:P |
| 19:52 |
|
jnthn |
The first is that does and isa are different relationships, fitting different situations. |
| 19:52 |
|
masak |
there's something to be said for teaching classes first, and then layering on roles. |
| 19:52 |
|
mberends |
aye |
| 19:52 |
|
jnthn |
The second is that classes *still* are the thing in Perl 6 that handles instance management. |
| 19:52 |
|
mberends |
ayaye |
| 19:52 |
|
mberends |
although you can "new" a role and it gets punned |
| 19:53 |
|
masak |
mberends: yes, but that's still a class being instantiated. |
| 19:53 |
|
dalek |
book: 5992bee | masak++ | src/classes-and-objects.pod: |
| 19:53 |
|
dalek |
book: [OO] added answer to the second question |
| 19:53 |
|
dalek |
book: review: http://github.com/perl6/book/c[…]1ef087c9376ebb6ab |
| 19:54 |
|
* masak |
is having too much fun writing these answers |
| 19:54 |
|
jnthn |
So I think the valuable question is probably something like, "does the example in the OO chapter show something that's a reusable chunk of functionality, or is it more related to management of data related to an instance of something"? |
| 19:54 |
|
|
dalek joined #perl6book |
| 19:54 |
|
jnthn |
Of course, that's a blury line. :-) |
| 19:55 |
|
mberends |
yes it is |
| 19:55 |
|
jnthn |
I think ideally... |
| 19:56 |
|
jnthn |
* Classes are presented first if only because they're so much more familiar to people. That means we can introduce the has/method keywords without having just thrown the concept of roles at the reader. |
| 19:56 |
|
jnthn |
* If we can manage it, the example that presents classes is something that is not so much an obviously reusable chunk of functionality |
| 19:57 |
|
jnthn |
On punning - yes, but it makes a class that does the role, and instantiates that. I'm not quite sure we can explain punning without explaining what a class is first. :-) |
| 19:57 |
|
moritz_ |
agreed |
| 19:58 |
|
jnthn |
What I'd like to avoid is to introduce roles by saying "well, in the previous example, we used a class, but really it was a bad example and we shoulda done it as a role" |
| 19:58 |
|
mberends |
and I'm confused by combining two guidelines: 1. you should use roles for behavior inheritance 2. you can use roles punned into classes for instance management. Mistaken conclusion: do everything with role definitions, you'll get punned classes whenever it seems to be necessary. |
| 19:59 |
|
mberends |
the keyword 'class' appears to be redundant |
| 19:59 |
|
|
Topic for #perl6bookis now http://irclog.perlgeek.de/perl6book/today | source: http://github.com/perl6/book/ |
| 20:00 |
|
jnthn |
mberends: I'd s/inheritance/composition/ in there. |
| 20:01 |
|
jnthn |
I can see the temptation to come to that conclusion. |
| 20:01 |
|
* mberends |
is blissfully confused, and not bothered by that |
| 20:02 |
|
jnthn |
I kind of see classes as still representing entities, and roles as being building blocks of functionality. |
| 20:03 |
|
jnthn |
I guess the other distinction is about mutability. |
| 20:04 |
|
jnthn |
(Roles are immutable, classes not) |
| 20:05 |
|
mberends |
but the class created by punning a role is a class, therefore mutable |
| 20:05 |
|
jnthn |
But I'd like to hpoe that one doesn't come into play too often. :-) |
| 20:05 |
|
masak |
my third answer prompted an interesting follow-up question about thread safety. |
| 20:05 |
|
dalek |
book: 55a54bc | masak++ | src/classes-and-objects.pod: |
| 20:05 |
|
dalek |
book: [OO] added answer to the third question |
| 20:05 |
|
dalek |
book: review: http://github.com/perl6/book/c[…]06f83e12e19283c6a |
| 20:05 |
|
masak |
but overall, I really like how those three questions show the extensibility of the example. |
| 20:05 |
|
jnthn |
masak: It's safe 'cus we didn't implement threads yet. |
| 20:05 |
|
jnthn |
;-) |
| 20:05 |
|
masak |
(and the versatility of Perl 6) |
| 20:05 |
|
masak |
jnthn: :) |
| 20:06 |
|
jnthn |
mberends: That doesn't change the fact that if the role is done, it's still the unchanged role that you're doing. |
| 20:07 |
|
jnthn |
mberends: It's basically like: $pun = class :: does R { } |
| 20:09 |
|
mberends |
jnthn: if a misguided programmer (me, for example) tries to uses 'role' everywhere, at what point does that approach fail? |
| 20:11 |
|
jnthn |
mberends: In a sense, it probably does not. |
| 20:11 |
|
jnthn |
mberends: In another sense the system now doesn't distinguish chunks of functionality from entities. |
| 20:12 |
|
jnthn |
I guess that's a "documentation" point. |
| 20:13 |
|
mberends |
nom & |
| 20:13 |
|
jnthn |
:-) |
| 20:24 |
|
PerlJam |
mberends: Ask Ovid. :) |
| 21:41 |
|
|
japhb joined #perl6book |
| 23:02 |
|
|
mubot joined #perl6book |
| 23:31 |
|
mberends |
oh. the meeting is over. goodbye. |
| 23:31 |
|
|
mberends left #perl6book |