jnthn Yeah but then you need a way of saying what's in the ro interface. 00:00
TimToady so we can mix in the type officially and still override the method to be just value
in the case of True or 42
jnthn Mixing in the type officially still doesn't give us a method Num that does the right thing. 00:01
TimToady which takes me back to the notion that Bool is really two different roles...
jnthn Plus a "mix in my name without by stuff" feels horrible.
*my stuff
TimToady well, what's the general way to make an immutable value out of an mutable type? 00:02
jnthn Define how it responds to .WHICH.
pmichaud just as a side note, it feels to me that stringification, numification, boolification, listification, and hashification really want to be one step removed from .Str, .Num/.Int/.Rat, .Bool, .List, .Hash
jnthn pmichaud: That thought had occured to me too.
pmichaud then .list/.hash continue to "feel right"
TimToady maybe, but prefix:<~> isn't the answer 00:03
pmichaud agreed, prefix:<~> isn't the answer.
jnthn That prefix:<+> is kinda hand-wavey.
TimToady at bottom, the primitives have to be single dispatch on an object, since the object decides what it means, not the language 00:04
except maybe for really primitive functions that don't do MMD
but those are very rare
pmichaud it would be okay to me if "object stringification" delegated to .Str by default, but I'm not sure that it should *be* .Str 00:05
similar arguments for "numification" and .Int/.Num/.Rat and "boolification"
jnthn I guess it's the .list vs .List/.Array/.Range distinction.
TimToady oops, gotta run off 00:06
jnthn One is "give me something I can do list-y things with", the other is "give me exactly this type"
TimToady will backlog
pmichaud Yes, exactly.
TimToady bbl &
pmichaud I suspect conversation will close here for a while, as it's late where jnthn is, I have to fix a broken Rakudo build.
jnthn Aye.
pmichaud and we could all use time to ruminate on today's discussions
jnthn Sure.
I think "what do we tell people to override" plays into this as well. "Should I override .Num or .Int?" etc 00:07
pmichaud exactly.... I'm kinda thinking "neither"
I'm thinking there's some other numification interface
just like we currently override .list to get the list-version of an object. 00:08
even if that list-version isn't a List
jnthn There's already some other itemification, listification, and hashificiation interface.
Since we seem to have picked numification, stringification and boolificiation as our value-based "ifications", I guess following the same kind of approach as we do in container space might be the way to go. 00:09
But that sitll doesn't solve us the "what about $x but 42".
pmichaud I kinda think we can't really think about "$x but 42" until we decide what numification really means. 00:10
jnthn Yes.
pmichaud just like we can't really do "$x but True" until we decide what boolification really means.
jnthn *sigh* 00:11
Just when I thought we had an answer...
pmichaud Sorry.
00:12 orafu left, OuLouFu joined
jnthn No, they're all good counter-points. 00:12
00:12 OuLouFu is now known as orafu
pmichaud Well, I'm only half sorry. I figure pain today may avoid larger pain tomorrow. 00:12
and thinking of ~(Int.WHAT) as "CORE::Int" was a bit of an eye-openrer. 00:13
*opener
jnthn Doing anything by name is messy.
pmichaud *"CORE::Int()"
(sigh)
jnthn I was under the impression seen Foo($x) co-ercing to $x as becoming $x.Foo 00:14
And that's how a class said "here's how I become a Foo"
If that's the case, then we have a *much* wider problem of how to do co-ercion, than just what the "$x but 42" has exposed.
pmichaud oh, I think that may still be true; I'm just not sure that stringification is directly .Str, nor numification is directly .Num 00:15
jnthn I mean the namespacing problem.
What does Foo::Bar($x) call?
pmichaud depends on whether method Bar is export
jnthn Or CORE::Int($x)
pmichaud but yes, if it's a type...
jnthn I meant co-ercion.
pmichaud well, coercions are a bit syntactically special, yes. 00:16
but yes, it's not clear what method would define a coercion to a Foo::Bar
jnthn Right, which is the *real* problem we have here.
pmichaud that sounds very useful, yes.
(the identification of the problem, that is) 00:17
oh, switching tracks slightly
jnthn Or at least the same one that does underly the "what Int" in $x but $y where $y maybe is an Int or a My::Int.
pmichaud the other day we were talking about how PMC types keep their mros as string values... could they be type ints?
instead of strings? the type ints are somewhat guaranteed to be unique, yes?
although I guess that wouldn't work for dynpmcs 00:18
jnthn Yes apart from type IDs are meant to be going away.
dynpmcs get a type ID too.
pmichaud well, they still hang around internally
jnthn They don't know it up front.
pmichaud when type IDs disappear they'll just become pointers, I suspect.
jnthn I think there's some kinda idea that one day we'll be free of type IDs.
pmichaud I think we'll be free of "type ID as int"
I think we'll still have an ID, it'll just be an address.
jnthn When I re-wrote Parrot's object system initially, we were free of integer type IDs and everything was about pointers. 00:19
pmichaud I doubt it will be a string. At least I hope it won't be that :-)
unless we start to guarantee string uniqueness :-)
jnthn Then it was made to mesh into existing Parrot rather than existing Parrot made to mesh into it.
pmichaud Understood.
and I know the feeling. :->
okay, I _think_ I've fixed the build... testing now. 00:20
jnthn Heh, what was it?
Anyway, type IDs would be an improvement on strings. 00:23
pmichaud oh, I'm refactoring things to enable .HLL mapping
jnthn But we'd just have to get it past the "type IDs are dead" mentality.
pmichaud but apparently I forgot to add a file to the repo
jnthn (As in, they are alive and kicking internally for the foreseeable future) 00:24
pmichaud and "git status" didn't show my unadded file
jnthn Oh. Odd.
pmichaud (which I'm a little surprised about)
jnthn Yeah, same.
I found git add a weird beast.
pmichaud I think the death of type IDs has been exaggerated.
jnthn Aye, same. 00:25
I think anyone who really understands the issues knows they aren't going to disappear internally for quite a whioe.
*while
pmichaud right.
anyway, if mro could use type ids (even temporarily) instead of strings, that might be a huge win.
speed-wise, too.
jnthn Yes. 00:26
Wonder how hard it'd be...
Maybe let's suggest it at the next #parrotsketch?
pmichaud sure
it's an internals change, so wouldn't require deprecation.
jnthn Yeah, it's VTABLE structure, and I hope people aren't mucking in there too much. 00:27
pmichaud okay, I have to join family for dinner (belatedly, since rakudo appears fixed). see you tomorrow
jnthn Yeah, I sleep soon...enjoy dinner.
00:43 orafu left, OuLouFu joined, OuLouFu is now known as orafu 00:44 fridim_ left 00:47 bacek_ joined 00:49 eternaleye joined 00:54 orafu left, orafu joined 00:59 exodist left, shillo joined, shillo left 01:01 Whiteknight left 01:04 orafu left 01:05 orafu joined 01:13 ZuLuuuuuu left 01:15 orafu left 01:16 orafu joined 01:27 orafu left, orafu joined 01:31 Limbic_Region left 01:37 ben left 01:45 DemoFreak left 01:47 hercynium left 02:11 orafu left, orafu joined 02:13 orafu left 02:14 OuLouFu joined, OuLouFu is now known as orafu, orafu left 02:21 orafu joined 02:25 PacoLinux left 02:26 PacoLinux joined 02:28 sri_kraih_ joined 02:31 orafu left, orafu joined 02:42 sephee joined 02:47 sri_kraih left 02:50 orafu left, orafu joined 02:58 payload left 02:59 orafu left, orafu joined 03:17 orafu left, orafu joined 03:28 nbrown joined 03:37 orafu left, orafu joined 03:43 minazo joined 04:01 alester joined 04:06 SamB left
skids more fun with printf in Parrot: total has accesses by key type for rakudo '1.say' 04:10
04:10 mankash joined
skids reads: tot 380000 I 0 CS 12130 S 367852 PMC 18 ptr 0 04:11
writes: tot 92000 I 0 CS 904 S 91096 PMC 0 ptr 0
mankash how \Q works
skids in perl5?
mankash yes
skids \Qstuff\E, but go to channel #perl 04:12
mankash $rtr=\Q$snmpget .1.3.6.1.4.1.9.2.1.3.0\Q
here \Q not working for me
skids use \E at the end not \Q
mankash ok
thx
skids np
mankash giving compilation error 04:14
$snmpget is a command 04:15
skids inside quotes 04:16
'1.say' hash number of elements % operations (0 to 8, then 63+)
reads: 0.28 64.50 13.50 3.51 0.46 0.20 0.19 0.37, 12.72
writes: 14.23 9.03 6.18 4.40 3.58 2.96 2.39 2.18, 29.80
use quotes: $rtr="\Q$snmpget .1.3.6.1.4.1.9.2.1.3.0\Q" 04:17
use quotes: $rtr="\Q$snmpget .1.3.6.1.4.1.9.2.1.3.0\E"
even
mankash now it is not giving any compilation error but add \ all the places 04:19
04:35 alester left, alester joined 04:39 skids left 04:43 minazo left, c9s_ is now known as c9s 04:56 km2 joined 05:03 alanhaggai joined 05:21 bkeeler left 05:31 alester left 05:38 nbrown left 06:17 [particle]- left 06:18 justatheory left 06:41 alanhaggai_ joined 06:43 alanhaggai left, alanhaggai_ is now known as alanhaggai 07:00 nbrown joined 07:05 eMaX joined 07:06 eMaX left, eMaX_ joined 07:25 nbrown left 07:35 iblechbot joined 07:42 jnthn left, zev left, buu left, Maddingue left, IRSeekBot left 07:43 jnthn joined, zev joined, IRSeekBot joined, Maddingue joined, buu joined, irc.freenode.net sets mode: +o jnthn 07:48 |Jedai| joined 07:59 bacek_ left 08:14 bacek_ joined 08:19 pmurias joined 08:39 abra joined, bacek_ left 08:41 alanhaggai left 08:48 mikehh joined
mikehh rakudo (b83a0b0) builds on parrot r38415 - make test PASS / make spectest (pugs r26582) FAIL 08:51
t/spec/S09-subscript_slice/slice.rakudo - (Wstat: 11 Tests: 27 Failed: 0) 08:52
t/spec/S12-class/basic.rakudo - TODO passed: 30 08:53
./perl6 t/spec/S09-subscript_slice/slice.rakudo handles all the tests then has a Segmentation fault 08:54
08:54 smtms left, smtms joined 08:55 masak joined
mikehh thats on Kubunt Jaunty (9.04) AMD64 08:55
masak merry Friday, disruptive techies.
mberends good rakudoday, masak 08:58
masak \o/ 08:59
08:59 lumi left
masak and, presto, Rakudo builds today. 09:03
pmichaud++
mberends @seen presto ;) 09:04
lambdabot I haven't seen presto.
09:07 lumi joined 09:09 DemoFreak joined
pugs_svn r26593 | azawawi++ | [S:H:P6] updated to v0.49 which contains the latest STD. 09:20
jnthn H H 09:29
O AI
mberends O AI # did you drop something?
masak !IAH HO
mberends rakudo: "!IAH HO".flip.say 09:30
p6eval rakudo b83a0b: OUTPUT«OH HAI!␤»
masak rakudo: subset FooStr of Str where /^foo/; multi method trim(FooStr $self:) { return "OH HAI" }; say "foo".trim 09:31
p6eval rakudo b83a0b: OUTPUT«OH HAI␤»
masak that's just... so cool.
I can haz dispatch on subtyped invocant! \o/ 09:32
rakudo: subset FooStr of Str where /^foo/; multi method trim(FooStr $self:) { return "OH HAI" }; say "bar".trim
p6eval rakudo b83a0b: OUTPUT«No applicable candidates found to dispatch to for 'trim'␤current instr.: 'parrot;P6metaclass;dispatch' pc 243371 (src/gen_actions.pir:0)␤»
masak jnthn: how come that doesn't work, though?
jnthn masak: Because "bar" ~~ /^foo/ is false? 09:33
masak I know that.
my question is more along the lines of: why don't I get the ordinary .trim there? 09:34
jnthn oh hang on...
masak it seems an applicable candidate to me...
jnthn You're deifning methods outside of a class...
masak is that naughty?
basement cat told me to do it! 09:35
anyway, got to change locations again. please discuss appropriateness of defining methods outside of classes until I get back. :P 09:36
jnthn Well, not sure, but we do also have a ticket somewhere along the lines of "you can define methods outside of a class", I'm sure...
09:36 masak left 09:38 xinming left, xinming joined
jnthn pulls latest Rakudo 09:39
09:40 les joined
jnthn I think this ticket can be closed? rt.perl.org/rt3/Public/Bug/Display.html?id=57444 09:43
Since :Trig tag is working...
09:48 M_o_C joined 09:50 pmurias left 10:00 masak joined
masak jnthn: re RT ticket about declaring methods outside of classes: no, I find no such ticket. at least not one matching the string 'method' in the subject line. 10:04
jnthn Hmm, OK, I thought I'd seen one. 10:05
masak jnthn: anyway... why doesn't the "bar" version dispatch to Str.trim?
10:06 dalek left, pmurias joined, dalek joined
masak more importantly, is it something I should tell RT about? 10:07
jnthn masak: I'm not entirely sure how/why the first one works. 10:08
masak :)
it felt amazing that it did, to be sure.
jnthn rakudo: "foo".trim
p6eval rakudo b83a0b: ( no output )
jnthn OK, so there is something there
masak I mean, who needs monkeypatching when you can dispatch on subtyped invocants?
jnthn Well, you're essentially monkey-patching without the monkey.
masak *lol* 10:09
sounds like a good name for a blog post.
jnthn Does it work if you do monkey-patch the method in? 10:11
masak how do you mean?
rakudo: subset FooStr of Str where /^foo/; multi method trim(FooStr $self:) { return "OH HAI" }; class Str is also { multi method trim() { return "CHEEZBURGER" } }; say "foo".trim; say "bar".trim 10:12
p6eval rakudo b83a0b: OUTPUT«CHEEZBURGER␤CHEEZBURGER␤»
jnthn I meant put the FooStr one inside the is also too. 10:13
masak tries
jnthn omfg how many enums tickets do we have... 10:14
masak so, enums day today? :)
putting the subset decl inside the 'is also' decl brings back the "No applicable candidates" message.
jnthn Yeah, I think it might finally be time to bite the bullet and sort out enums. 10:17
masak tries to understand why a line in a November test uses .WHAT for type equivalence 10:18
ah, it was probably because smartmatching against the Match type object failed. 10:20
seems to work now. 10:21
rakudo: say ("foo" ~~ /foo/) ~~ Match
p6eval rakudo b83a0b: OUTPUT«1␤»
10:21 cognominal left 10:25 rblasch joined
jnthn masak: On subset decl issue, already there is 64098[BUG] MMD on subset types fails for short name 10:28
masak oh, ok. 10:29
not the same issue, I'd say. 10:31
problem is, I don't really know what the issue should be with the monkey-sans-monkey-patching.
is it that the original method is hidden?
or that dispatching on subset types of the invocant shouldn't be allowed at all?
jnthn I don't know that writing a method outside a class like that is allowed (other than having heard various references to some Main class...) 10:33
(and either way, Main is not Any)
My guess is that you're ending up augmenting the exported trim 10:34
masak is there a place in the spec that mentions declaring methods outside of their class scope?
jnthn And we didn't clone the multi that the class exported, and thus why it looked like it affectd the class.
Anonlymous ones yes, named ones I can't recall one. 10:35
But there are I think references to a class Main.
masak jnthn: should I report it as a bug saying that the Str.trim should still work?
jnthn has a fix for both a masakbug and an ilyabug
There's *something* wrong that your example reveals.
I'm not completely sure what it is yet.
masak me neither. 10:36
jnthn I'm pretty sure that you should not have been able to affect the Str class though.
masak I didn't! :)
jnthn We might be missing some cloning in the exported.
*in the exporter
masak hesitantly submits a rakudobug
jnthn Well, I mean that a method with a Str invocant declared out of class Str or not monkey-patched into it should not affect instances of Str. 10:37
I think that might be the real wtf here.
masak jnthn: aye. 10:38
feels like monkey-patching from the outside.
jnthn moritz_: In rt.perl.org/rt3/Ticket/Display.html?id=65238 you mention a t/spec/integration/packages.t but I can't find it?
masak -> store 10:39
jnthn moritz_: oh, I fail it, I didn't svn up
10:44 fridim_ joined
jnthn moritz_: ping 10:49
10:59 nihiliad joined 11:05 pmurias left 11:07 cognominal joined
pugs_svn r26594 | jnthn++ | [t/spec] eval should eval things into the namespace of its caller; correct a test that assumed otherwise, and fails under the corrected behavior. 11:11
masak jnthn++
pugs_svn r26595 | jnthn++ | [t/spec] Unfudge a test for eval/namespaces. 11:12
jnthn That's two tickets. 11:13
(both masak++ and ihrd++ had reported it)
11:21 kane_ left
masak guess it bugged us both. :) 11:23
11:24 mizioumt joined 11:25 zamolxes joined 11:26 zamolxes left, zamolxes joined 11:29 zamolxes left 11:35 IRSeekBot left 11:38 mizioumt left 11:57 |Jedai| is now known as Jedai, Jedai is now known as |Jedai| 12:00 |Jedai| is now known as Jedai, Jedai is now known as |Jedai|, |Jedai| is now known as Jedai 12:04 minazo joined 12:16 eMaX_ left 12:17 eMaX joined
LylePerl is still working on Camelia and should have something ready for evaluation later today 12:19
12:22 eMaX left 12:35 eMaX joined 12:42 eMaX left 12:43 eMaX joined 12:45 masak left 12:55 eMaX left 12:59 eMaX joined 13:05 SamB joined
pugs_svn r26596 | ron++ | added implicit topic match tests RT #61662 13:06
13:12 minazo left 13:13 rblasch_ joined, DemoFreak left 13:14 rblasch left, DemoFreak joined 13:18 DemoFreak left
PerlJam rakudo: role R { has $.x is rw; } ; role S does R { } ; class C does S does R {} ; 13:18
13:18 DemoFreak joined
p6eval rakudo 44e1ca: OUTPUT«A conflict occurred during role composition due to method 'x'.␤current instr.: '!meta_compose' pc -94773 ((unknown file):-1)␤» 13:18
PerlJam bug?
13:20 km2 left
jnthn Yes. 13:21
Parrot and Rakudo have different ideas about roles composed from other roles. 13:22
erm, Parrot and Perl 6.
PerlJam ah, there's already a ticket for it too 13:25
13:27 c9s left 13:36 Southen joined
Matt-W Hello! 13:41
jnthn hi, Matt-W 13:42
13:56 skids joined 13:59 mberends left 14:02 km2 joined 14:04 nihiliad left
jnthn > say True 14:07
0
> say False
1
.oO( There's more than one way to screw it up... )
fridim_ oO 14:08
14:11 alester joined
Matt-W hah 14:12
that's the shell programmer's true :)
jnthn :-) 14:13
We make it through the sanity tests now, which is nice. :-)
(With the re-write of enums that I'm working on.) 14:14
also class Foo does MyEnum { } and MyEnum.pick work.
Matt-W yay
jnthn Still got a bunch of functionality left to add in though.
Matt-W what's the status of using enums defined in other modules?
jnthn Didn't look at that just yet. 14:15
Nor export.
Matt-W okay
because I'm sure that behaviour changed recently
jnthn In the spec, or in Rakudo?
Matt-W In Form I seem to be able to say EnumName::value and get an enum defined in a module I'm using 14:16
whereas before I had to redefine the enum
neither seems right
in Rakudo
jnthn I think there's at least one ticket on such things.
14:17 c9s joined
Matt-W okay 14:20
I'll worry about it if it's weird after your enum rewrite anyway
14:21 exodist joined
LylePerl Ok, we've worked really hard on the logo 14:26
I think we've come up with something everyone will be happy with:-
www.perlportal.com/logo/4.png
14:27 kane_ joined, abra left
LylePerl Thoughts on it? :) 14:28
jnthn lol :-)
...are the wings big enough to actually get the camel off the ground?
Matt-W hmm does the O'Reilly trademark cover winged camels?
jnthn When is a camel not a camel. :-) 14:29
LylePerl jnthn: yeah, they flap really fast :)
Matt-W I assume the camel has internal modifications to make it lighter
LylePerl TimToady said about a Camel with wings, maybe I could sell this to O'Reilly? 14:30
But seriously, here are the ones we've done:-
www.perlportal.com/logo/camelia.html
Camelia has never looked so good :) Actually we got her looking better than we initially thought we'd be able to ;) 14:31
LylePerl watches tumble weed blow past... 14:39
Matt-W oooh shiny camelia 14:41
LylePerl The posts pmichaud pointed me to said about Tux, so we tried to style her a bit more that way 14:43
jnthn quite likes some of the ones towards the bottom 14:44
5, 7 and 8 are perhaps my favorites
LylePerl I guess it all depends on whether TimToady likes it... 14:45
jnthn ('cus they better capture the colorfulness of the original suggestion, but are a bit simplified/sylistic)
Matt-W It doesn't really seem right to me though
pmichaud fwiw, there is no more "Main" 14:46
(from scrollback)
Matt-W as in module Main? 14:47
pmichaud correct.
Matt-W interesting
what is ther einstead
pmichaud It's now GLOBAL
or, more precicely, CORE::GLOBAL
LylePerl Matt-W: Not right in what way? 14:48
jnthn pmichaud: Is there a class GLOBAL or just a module?
14:49 _REPLeffect joined
pmichaud module, I think. 14:49
14:50 _REPLeffect is now known as REPLeffect
jnthn pmichaud: OK, so non-anonymous methods outside of a class/role/grammar probably ought to be an error. 14:50
pmichaud my first thought is "yes", but I'm never certain of such things :-) 14:53
jnthn pmichaud: You'll be glad to know that enum_declarator in actions.pm has taken a serious gutting. 14:54
pmichaud You're correct, I'm very glad to know that. :-)
jnthn As has enum.pir.
Which probably as a tenth as much code.
*has
pmichaud that feels more correct. 14:55
pugs_svn r26597 | jnthn++ | [t/spec] Reviewed an enums test; don't see anywhere in the spec that says you can cheat on enum values other than with the special cheating-allowed syntax, so correct the test in line with that. 14:56
jnthn Of course, the infamous guts.pir gets longer. ;-)
I notice a bunch of stuff got broken out into src/parrot/ too.
pmichaud that's okay, I prefer guts (once) to output of actions.pm (many) 14:57
(src/parrot/) yes, in order to help with .HLL mapping I decided we should break out the parrot hll stuff into its own section
jnthn Makes sense.
Our additions to Parrot's role.pir may not stand. 14:58
pmichaud and in some sense, src/parrot/ may end up being "well, we really oughtn't to be doing this... but here's where we're doing things outside our sandbox."
jnthn (Might well subclass it to add what we need.)
pmichaud IM IN YR HLL NAMESPACE, MESSIN WITH YR CLASSES AND ROLEZ
anyway, it was an attempt to reduce the number of .HLL directives to two. 14:59
14:59 nihiliad joined
pmichaud (one at the beginning, one to switch back to 'parrot') 14:59
jnthn Sure. Also it is good to know where we're messing with Parrot.
Or doing stuff that will have effects wider than just Rakudo. 15:00
15:01 Psyche^ joined
pmichaud ah, looks like one of my YAPC::EU talks was accepted! :-) 15:01
jnthn Yeah, looks like one of mine too. :-) 15:02
pmichaud now I just have to figure out how to get there. :-| 15:04
jnthn doesn't recommend swimming 15:05
15:07 amoc joined
Matt-W yay! 15:08
Hire a boat and sail there
15:16 ZuLuuuuuu joined, minazo joined 15:17 Patterner left, Psyche^ is now known as Patterner
jnthn Both Portugal and Texas are coastal. Sounds feasible. :-) 15:18
pmichaud well, I'm a pretty good distance from the coast at the moment
500 km 15:19
jnthn "My state is SO big that..." 15:21
rakudo: say True.WHAT; say True.perl; say True.name; 15:22