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 9 October 2009.
02:00 p6eval joined 03:20 pmichaud joined 04:43 dalek joined
dalek ok: 4fe7f7b | moritz++ | src/multi-dispatch.pod:
[MMD] give the proto the right arity
08:44
08:47 masak joined
dalek ok: 507c553 | masak++ | src/classes-and-objects.pod:
[OO] dot is a twigil, not a sigil
11:53
11:56 pmurias joined
jnthn masak: ooh, nice catch. 12:00
masak the dot is a cute sigil, but in this context I think we'll stick with 'twigil' :P
jnthn :-)
moritz_ actually it's even misleading to call the dot a twigil here 12:01
in some sense
but I guess we can get away with it
masak the dot has that ambiguity over it.
moritz_ oh, and (peer review)++
jnthn It's fair enough in the declaration, which is what this is. 12:02
masak I think it's a lie worth risking.
jnthn In a usage, I agree it's a tougher call.
But in a declaration, it really isn't anything much deeper.
moritz_ s/tougher/method/ :-)
pmurias should the book describe writing a custom constructor?
jnthn :-P
masak I think calling it a twigil across the board helps understanding.
jnthn pmurias: It does.
pmurias it's an advanced and not very usefull topic
jnthn: i'm proposing it shouldn't
jnthn ...not very useful?
pmurias yes 12:03
jnthn Not sure I'd agree with that.
masak let me respectfully disagree too.
moritz_ it is something you might want to do in about half or a third of your classes
pmurias writing a BUILD method is the thing you should do
jnthn No, they fill different niches.
BUILD methods are for doing initialization tasks. 12:04
moritz_ and since masak++ has probably written the most real-world Perl 6 code out there, I tend to agree with him
jnthn A custom constructor is for providing an alternative interface to object instantiation.
I'd say it'd be nice to have an example of a BUILD method too, to show this. 12:05
And try and show when to use which one of them. 12:06
moritz_ but probably not in the same class
jnthn No
I don't think it'd fit well into this example.
masak: I'm a little bothered about the typed slurpy param.
moritz_ if we dwell deeply in object construction we could use something like perlgeek.de/images/creation.png 12:07
jnthn I think pmichaud speculated that those maybe could not work.
masak jnthn: ok. I meant to discuss that with you.
jnthn The thing is that your life then gets awkward if you want a typed array.
I'm still trying to decide what I think about typed slurpies.
moritz_ I agree, it's safer to leave out the type check
jnthn My current feeling is, let's get laziness in first, and see how that plays with slurpies, and then try and make a call on this one. 12:08
masak jnthn: nod.
moritz_ because typed arrays don't just require all elements to be of the declared type, but they need to be actually declared with that type
pmurias moritz_: when have you last seen a custom new in a Moose using program?
moritz_ and you don't do that in the example
masak jnthn: I also saw that you preferred a scalar as an argument to Task.push rather than an array.
jnthn The problem is that if something untyped and infinite is passed in that, in list context, will expand, then we run into issues.
moritz_ pmurias: I haven't really seen any moose programs at all 12:09
jnthn masak: I thought having to make an array to call the method was a tad odd.
masak: But my plan was actually to make it a multi-method later on.
masak jnthn: I meant to have a slurpy array there too.
jnthn masak: Not in the top example.
But to show how you could provide different ways of adding a new task through some multis. 12:10
As a kind of way we could extend the example.
masak jnthn: but right now we don't call that .push method anywhere, so I can argue either way about it. :)
moritz_ would reallly love to see 'has Task @!dependencies handles (push => 'add-dependency')
jnthn :-)
masak moritz_: aye. that'd be really nice.
jnthn Yeah, we need to, erm, get a chunk of the spec ripped out first.
masak moritz_: feels like one of those things one could show as 'variants'. 12:11
moritz_ masak: aye
let's convince TimToady when he shows up next :-)
masak I haven't said it yet, but showing how Task could be made to do threading would be a great variant.
jnthn I was going to do number-of-dependencies forwarding to elems.
masak: I was considering doing a subclass Task::ParalellDependencies
To show inheritance and then >>.
masak jnthn: the naming is a bit enterprisey, but otherwise ACK. :) 12:12
jnthn well, ParallelTask felt wrong 12:14
Because it's not the task itself that's done in a parallel way, but its dependencies. 12:15
I don't like Task::ParalellDependencies much either, fwiw.
I just didn't think of a better one yet that captures what I think the functionality is.
masak Task::Parallel? 12:17
moritz_ the task isn't parallel
masak that is right, but the naming scheme doesn't necessarily indicate that it is. 12:20
in Pod::Parser, it is not indicated that Pod is a parser.
in Test::Harness, it is not indicated that the Test is a harness. 12:21
etc.
jnthn True. 12:23
I tend to suck at naming things anyway. :-) 12:24
moritz_ "When he awoke, Taborlin the Great found himself locked in a high tower. They had taken his sword and stripped him of his tools: key, coin, and candle were all gone. [...] But Taborlin knew the names of all things, and so all things were his to command. He said to the stone: 'Break!' and the stone broke. The wall tore like a piece of paper, and through that hole Taborlin could see the sky and breathe the sweet spring air. He stepped to the edge, looked dow 12:27
oh, that was probably too long
looked down, and without a second thought he stepped out into the open air. So Taborlin fell, but he did not despair. For he knew the name of the wind, and so the wind obeyed him. He spoke to the wind and it cradled and caressed him. It bore him to the ground as gently as a puff of thistledown and set him on his feet softly as a mother's kiss." 12:28
from "The Name of the Wind"
somehow that came to my mind when I thought about naming things :-)
masak very nice. 12:29
jnthn d00d he has 1337 skillz!
masak why does he even have a sword and tools in the first place? :P 12:30
jnthn A coin is a tool? :-)
moritz_ masak: because he's a learned man, and knows about style :-)
masak :) 12:31
jnthn
.oO( next time airport security ask why the sword, say I know about style )
moritz_ and reference "Kill Bill Vol. 1"
jnthn ;-)
masak yeah, airport security are notoriously touchy about swords.
moritz_ did you try it? 12:32
masak not as such, no.
carlin idle.slashdot.org/article.pl?sid=09...30/0435250
jnthn yeah, I did once...they actually didn't care much about the sword though.
But man were they pissed about the bottle of water!
masak :D
jnthn oh gee...what on _earth_ is going on in .wrap :-/ 12:33
moritz_ heh, didn't we have an xkcd about that one? :-)
erm, today?
jnthn moritz_: orly?
oh, wow!
timely!
moritz_ anyway, "The Name of the Wind" is a rather nice read if you like fantasy books 12:34
too bad the sequel isn't out yet
17:27 dalek joined
jnthn aww. poor dalek 21:45
moritz_ jnthn: was that you? ;-) 21:46
jnthn No!
I feel bad 'cus I'm about to cause the same to happen again though!
moritz_ well, it's going to restart and autorejoin 21:47
21:49 dalek joined