Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2009-05-04

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:35 bacek__ joined #perl6
00:50 dalek joined #perl6
00:56 s1n moritz_: i read some of S12's handles delegates and that's not what i really wanted to do
00:57 s1n moritz_: if i read that correctly, it's like associating a scalar to a coderef of another object, i kinda wanted to do that within the class i'm delagating to
01:02 s1n it kinda sounds like i might be able to morph delegates into what i want, but it's not clear to me
01:24 hcchien joined #perl6
01:36 bacek joined #perl6
01:57 pugs_svn r26653 | ron++ | note association of test with RT #61838
01:57 Kyosuke_Kiryu joined #perl6
03:14 pugs_svn r26654 | lwall++ | [lift.t] identifiers must be alphanumeric
03:36 pugs_svn r26655 | lwall++ | [S04] clarify parsing of statement controls
03:36 pugs_svn r26656 | lwall++ | [STD] parse try {...} as originally intended, moritz++
03:36 pugs_svn r26656 | lwall++ | [STD] start playing with YOU_ARE_HERE stub
03:36 pugs_svn r26656 | lwall++ | [STD] don't complain on :keepall etc.
03:39 pugs_svn r26657 | lwall++ | [S02] random minor cleanup
03:42 pugs_svn r26658 | lwall++ | [Callable] defined defined on Code
03:42 pugs_svn r26658 | lwall++ | [Containers] de-List routines that should return Capture instead, like pick
03:42 pugs_svn r26658 | lwall++ | [Containers] define :delete and :exists as normative
03:42 pugs_svn r26658 | lwall++ | [Containers] explicate (some of) the relationship of junctions to sets
03:50 alester_ joined #perl6
03:56 pugs_svn r26659 | lwall++ | incomplete plural to singular tranformation on key tests
03:57 pugs_svn r26660 | lwall++ | [S04] previous patch confused statement prefixes with statement controls
04:01 justatheory joined #perl6
04:21 pugs_svn r26661 | lwall++ | [keepall.t] missing semi
04:29 pugs_svn r26662 | lwall++ | [S14] syntax category declarations need symbol in brackets
04:30 pugs_svn r26663 | lwall++ | [basic.t] s/:is/:<is>/ etc.
04:49 alester_ joined #perl6
05:13 dalek joined #perl6
05:22 minazo joined #perl6
05:30 minazo left #perl6
05:35 szabgab joined #perl6
06:01 iblechbot joined #perl6
06:08 DemoFreak joined #perl6
06:12 eMaX joined #perl6
06:13 agentzh joined #perl6
06:15 moritz_ TimToady++
06:16 pmichaud good morning
06:17 jeremiah_ joined #perl6
06:18 cognominal joined #perl6
06:19 moritz_ good morning
06:24 moritz_ pmichaud: it seems your changes to join broke some spectest
06:25 pmichaud yes, I have the fix in my local commit.
06:25 pmichaud I'm spectesting now, then will push.
06:26 moritz_ great
06:26 pmichaud But it also found a bug in slurpy @_.
06:26 pmichaud So I'm pushing that as well.
06:26 moritz_ even better
06:26 moritz_ I remember at least one ticket for buggy @_;
06:27 moritz_ rakudo: sub a { say @_.perl }; a(2, 3, 4)
06:27 p6eval rakudo cddb16: OUTPUT«[2, 3, 4]␤»
06:27 pmichaud yes, that's the one.
06:27 moritz_ but not that ;-)
06:27 pmichaud rakudo:  sub a { say @_[2]; }   a(2, 3, 4)
06:27 p6eval rakudo cddb16: OUTPUT«Statement not terminated properly at line 1, near "a(2, 3, 4)"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:86)␤»
06:27 pmichaud rakudo:  sub a { say @_[2]; };   a(2, 3, 4)
06:27 p6eval rakudo cddb16: OUTPUT«4␤»
06:27 moritz_ rakudo: sub a { say @_.elems }; a(2, 3, 4)
06:27 p6eval rakudo cddb16: OUTPUT«3␤»
06:27 pmichaud rakudo:  sub a { say @_[2]; };   a(2 p5=> 3, 4 p5=> 6)
06:28 p6eval rakudo cddb16: OUTPUT«Use of uninitialized value␤␤»
06:28 pmichaud (should've been '4' there.)
06:29 * moritz_ agrees
06:29 moritz_ do you happen to know how I can convert a timestamp to RFC822 format in Perl 5?
06:29 pmichaud 822?!
06:30 pmichaud egads.
06:30 pmichaud I'd use strftime, but that is probably locale-dependent.
06:30 moritz_ the thing that RSS feeds need
06:30 moritz_ well, I'll try google ;-)
06:37 payload joined #perl6
06:43 pmichaud oooh, passed a todo, also.  :-)
06:47 pmichaud oops, failing some.
06:47 pmichaud (failing different ones now)
06:49 patmat joined #perl6
06:49 patmat hello :)
06:50 pmichaud good morning
06:52 mikehh joined #perl6
06:55 payload left #perl6
07:13 smtms joined #perl6
07:15 Tene finally home from con...
07:15 Tene time to update sources and see what's been happening.
07:30 kidd joined #perl6
07:40 payload joined #perl6
07:45 dalek rakudo: r3c95282 | pmichaud++ | src/parser/actions.pm:
07:45 dalek rakudo: Refactor handling of nodes to !add_param, fixing implicit slurpy array.
07:45 dalek rakudo: t/spec/S03-operators/p5arrow.t passes again.
07:45 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/3​c952821eb24dc7a7019462164d58cf13c814685
07:45 dalek rakudo: r020fd49 | pmichaud++ | src/setting/Any-list.pm:
07:45 dalek rakudo: Make sure .join flattens lists.
07:45 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/0​20fd49e0ce247d05b7db87924fdaa0b71fac232
07:45 dalek rakudo: r0588e8c | pmichaud++ | src/setting/Any-list.pm:
07:45 dalek rakudo: Change .join flattening a bit.
07:45 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/0​588e8c10e2d1567fa8edeb3929f4f9524826563
07:46 pugs_svn r26664 | pmichaud++ | [t/spec]:  Unfudge a passing todo, add some implicit slurpy param tests.
08:02 payload1 joined #perl6
08:06 agentzh joined #perl6
08:20 eMaX joined #perl6
08:23 jhuni joined #perl6
08:31 riffraff joined #perl6
08:58 meppl joined #perl6
09:06 Jedai joined #perl6
09:13 hatseflats joined #perl6
09:13 hatseflats morning everyone
09:14 masak joined #perl6
09:15 masak felicitations on the new week.
09:16 hatseflats sounds like someone has a case of 'mondays' :)
09:16 masak hatseflats: :)
09:19 hatseflats so, roles in Perl6 need not be abstract, right?
09:19 masak hatseflats: right.
09:20 masak in fact, in the common case they aren't, IIUC.
09:20 hatseflats that makes them different from traits, correct?
09:20 masak hatseflats: the term "traits" means different things to different people.
09:20 hatseflats right
09:21 masak if you would supply the context in which you're using the word... :)
09:21 hatseflats well, if I believe what wikipedia tells me, traits are purely abstract classes that an be used within a class or object but not add to the inheritence chain
09:22 masak apart from the 'purely abstract' part, it sounds a lot like Perl 6 roles.
09:22 hatseflats right
09:23 hatseflats iiuc, roles are at least derived from the idea of traits
09:23 masak aye.
09:24 moritz_ to add to the confusion, Perl 6 also has the concept for traits
09:24 moritz_ in which case traits are roles that are mixed in by a special mechanism
09:24 moritz_ that provides nice syntactic sugar
09:24 hatseflats the context is this, I have a schol project where I need to design my own language, and I want to add something extra for a bit of extra credit, and I figured I'd go for traits, but 'you perl people' seem to be the only ones out there that have a decent grasp over the subject
09:25 moritz_ heh :-)
09:25 payload joined #perl6
09:25 moritz_ hatseflats: what kind of language? and do you also have to implement it?
09:26 hatseflats I have to implement it up to the AST, and I'm just grabbing parts from languages I like. Right now I'm thinking about the object / class system I will want to use
09:27 masak hatseflats: you should check Ovid's blog posts. he has blogged a lot about roles recently.
09:27 masak hatseflats: also, possibly, the Moose documentation.
09:27 moritz_ http://use.perl.org/~ovid/
09:27 lumi joined #perl6
09:27 moritz_ http://use.perl.org/~Ovid/journal/ to be more precise
09:28 hatseflats that's useful, thanks :)
09:28 hatseflats right now, I'm here syntactically: http://dpaste.com/40747/
09:29 hatseflats and I figured that if roles / traits can be non abstract I might as well just implement them as classes themselves
09:29 hatseflats perhaps with a guard, but nothing more than that
09:29 hatseflats pure abstract roles could be implemented through a interface class, and be used as a role
09:29 moritz_ somehow that reminds of javascript, syntactically
09:30 hatseflats I took the associative array thingy synta from js
09:30 moritz_ lunch^
09:30 moritz_ lunch& acutally
09:31 wollmers joined #perl6
09:32 hatseflats perhaps I should also just apply some cluebrick and build the thing for Parrot at the same time
09:32 masak hatseflats: yes, do that.
09:32 masak hatseflats: PCT.
09:32 hatseflats pct?
09:33 masak hatseflats: Parrot Compiler Toolkit.
09:33 masak hatseflats: I'm sure I could dig up a decent tutorial for you somewhere.
09:33 masak hatseflats: you won't regret the choice.
09:33 hatseflats oh, yes. I've hear dgood things about it, and since it is a dynamic language, should work out just fine
09:34 hatseflats at the same time, it'll give me a decent insight in how to build up to the AST for my own stuff, I will still need to write a parser etc from scratch for the assignment
09:34 masak start by watching this: http://www.youtube.com/watch?v=DzpSREpLJY8
09:34 hatseflats saw that
09:35 hatseflats good stuff :)
09:35 masak ok :)
09:38 eternaleye joined #perl6
09:40 jnthn H H
09:40 masak O AI
09:41 masak O   AI
09:42 jnthn Teamwork. :-)
09:42 jnthn hatseflats: Parrot provides some support for roles out-of-the-box too. :-)
09:43 hatseflats nice
09:43 jnthn hatseflats: Though it's not that widely used and in fact the language heavily using it (Rakudo) then layers a bunch of parametric polymorphism on top of it all too.
09:44 jnthn So it's not the easiest example. :-)
09:44 hatseflats parametric polymorphism... I'll have to look that one up.
09:45 jnthn hatseflats: It's the fancy academic word for generics, if that means more to you.
09:46 hatseflats that's Java's name for C++'s templates, right?
09:46 jnthn lol
09:46 jnthn Yes. :-)
09:47 jnthn I should probably start these conversations by asking people what languages they know. :-)
09:47 masak hatseflats: though Java's generics are somewhat more limited than C++'s templates.
09:47 jnthn Yeah.
09:47 hatseflats masak: not to say that C++'s templates are all the rage
09:47 masak hatseflats: dunno, haven't used them.
09:48 masak hatseflats: they do seem powerful indeed.
09:48 masak I've seen people execute algorithms at compile-time with them.
09:48 jnthn Perl 6 goes ever further and lets you parameterize on just plain old values rather than types, though Perl 6 has a kinda interesting idea about what you can pass off as a type too.
09:48 hatseflats hmm, will have to read into that.
09:48 masak use.perl.org getting more flak: http://use.perl.org/~jarich/journal/38920
09:49 hatseflats but I don't want to implement generics just quite yet, so I'm safe for the speciics :)
09:49 hatseflats * specifics
09:50 masak :)
09:50 hatseflats masak: I don't see what's wrong with that specific ad at all...
09:50 masak hatseflats: I didn't at first either.
09:50 masak hatseflats: but, quoting the blog post, "My entry was about the challenges of getting more women into Perl and IT in general; not about picking up women from a dating site."
09:51 masak I can see how that can send the wrong signals...
09:51 hatseflats masak: I read that yes, nothing wrong with that ad so far ;-)
09:51 * jnthn expects he doesn't have to go read this post to guess what has happened.
09:51 masak jnthn: right. the above summarizes it.
09:51 jnthn It's probably a bit like the ads on my Ukraine photos page on my travel site. *sigh*
09:51 hatseflats no, but seriously, you can hardly blame any adbot for not understanding the context of the page
09:52 masak hatseflats: true. on the other hand, the message of the main content can be coloured by the message of ads in a bad way.
09:52 masak hatseflats: regardless of whether there's any intention behind it or not.
09:53 masak here's another example: http://www.aprilwinchell.com/2009​/04/18/unfortunate-ad-placement/
09:53 hatseflats oh there are plenty examples
09:54 masak &
09:54 hatseflats but would you want people who get 'offended' or put off by such coincidental circumstances to enter a community
10:00 wollmers pmichaud: ping
10:00 eternaleye joined #perl6
10:02 araujo joined #perl6
10:02 jnthn wollmers: It's a little early for pm yet, I expect. :-)
10:03 wollmers jnthn: Where in the source tree of rakudo can I find the tokenizer/lexxer of rakudo?
10:03 masak hatseflats: it's a difficult question. I'm not sure it's always unreasonable of people to be offended by a tasteless combination of content and ads, even though the connection is 'all in the mind'.
10:05 jnthn wollmers: The grammar itself is part of the Rakudo source tree, but the compiler for the grammar is in Parrot.
10:05 jnthn http://github.com/rakudo/rakudo # rakudo source
10:05 jnthn https://svn.parrot.org/parrot/trunk/ # parrot source, see compilers/pge/
10:06 wollmers jnthn: Have these here locally, but where exactly?
10:07 jnthn src/parser/ for the Rakudo one, and compilers/pge/ in the Parrot one.
10:08 hatseflats masak: at some point I stopped looking at it as grey area, anyone suspecting malice over coincidence or ignorance should apply, or get applied, some cluebrick
10:08 wollmers jnthn: Seems that identifiers/names use the wrong Unicode character class - throws an error if Hindi vowel signs are used.
10:09 masak hatseflats: you're certainly entitled to that opinion.
10:09 jnthn That's probably something to look at in the compilers/pge/ bit I'd guess.
10:09 wollmers jnthn: thx, will look into it.
10:09 hatseflats masak: my main issue with my opinion is offending someone ;)
10:09 masak hatseflats: aye.
10:09 jnthn hatseflats: That'd probably be fine if humans were rationale. Apart from they kinda aren't.
10:09 masak meta-offense.
10:10 hatseflats trapped again in that ever circular reference loop of metalevel abstraction
10:11 iblechbot joined #perl6
10:15 jnthn http://www.jnthn.net/images/google_fail.png # Google Translate fails it again...
10:16 masak :)
10:16 jnthn (The text on the left is Slovak for "In beautiful Bratislava". Quite how they manage to translate the name of one European capital to the name of another is beyond me.)
10:17 masak jnthn: http://itre.cis.upenn.edu/~myl/l​anguagelog/archives/005494.html
10:32 jnthn masak: Interesting.
10:35 masak Language Log rocks.
10:36 wollmers STD: my $दूसर = 2;
10:36 moritz_ std: my $दूसर = 2;
10:36 p6eval std 26664: OUTPUT«ok 00:02 36m␤»
10:37 wollmers rakudo: my $दूसर = 2;
10:37 p6eval rakudo 0588e8: OUTPUT«Statement not terminated properly at line 1, near "\u0942\u0938\u0930 = 2;"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:86)␤»
10:38 wollmers rakudo: my $दूस = 2;
10:38 p6eval rakudo 0588e8: OUTPUT«Statement not terminated properly at line 1, near "\u0942\u0938 = 2;"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:86)␤»
10:39 wollmers rakudo: my $दस = 2;
10:39 p6eval rakudo 0588e8:  ( no output )
10:40 Morpheus_PL joined #perl6
10:45 * jnthn continues his trawl through the world of smop
10:49 payload joined #perl6
10:54 Morpheus_PL joined #perl6
11:04 masak I plan to blog about this hobby hacking later in the day: http://gist.github.com/106418
11:04 masak it's about finding numbers with only Langford pairs in them.
11:04 masak I wrote one brute-force attempt, and one slightly smarter attempt when the first one took way too much time and memory.
11:05 masak working blog post title: "Et tu, brute-force?"
11:05 jnthn nice
11:05 jnthn masak++
11:05 masak the problem is really nice, and can be tackled in a few minutes:
11:06 masak given some numbers 1..$n repeated twice, let's say 1,1,2,2,3,3
11:06 masak find an ordering such that for the pair of numbers $i, there are exactly $i numbers between the two numbers
11:07 hatseflats 1 2 1 3 2 3 <-- but not the last three
11:07 hatseflats 3 1 2 1 3 2
11:08 hatseflats right? yeah
11:08 masak yup.
11:08 masak and that's the only solution, modulo mirroring, for $n == 3.
11:08 moritz_ masak: you could safe lots of runtime and memory by calling .uniq earlier in the recursion of all-possible-orderings
11:09 masak moritz_: nice idea. patches welcome.
11:09 hatseflats reminds me of the golomb ruler problem
11:09 masak moritz_: you'll get an honourable mention in the blog post. :)
11:10 jnthn OK, I think I've worked out how we'll fix up BUILD/BUILDALL and do attribute traits...
11:10 hatseflats hmm
11:10 hatseflats ...cant.... read.... perl
11:10 hatseflats darn
11:10 * masak awaits a real BUILD with anticipation
11:11 masak hatseflats: can I help you, sir?
11:11 moritz_ setting attributes in BUILD well be a real boost
11:11 hatseflats masak: no, I'm trying to read the logic in your langford sub, but I can't read perl well enough to understand it ;:)
11:11 hatseflats * :)
11:11 masak moritz_: that did not parse.
11:12 masak hatseflats: that might be because I didn't strive for readability.
11:12 masak hatseflats: I wrote those as one-liners, and preferred one-character var names.
11:12 hatseflats I noticed
11:12 hatseflats I take pride in writing oneliners in other languages, but perl is a bit too obscure just yet
11:12 moritz_ s/well/will/
11:12 masak hatseflats: but that's why I asked, because the last thing you need is to be thrown off by Perl 6 syntax on top of that.
11:12 hatseflats "obfuscated perl contest"
11:12 hatseflats yay
11:13 masak hatseflats: for example, the '->' arrows might be new for you.
11:13 hatseflats no, I love the challange
11:13 hatseflats *challenge
11:13 hatseflats err....
11:13 hatseflats english-fail
11:13 masak hatseflats: also, those ^..^ things :)
11:14 agentzh joined #perl6
11:14 hatseflats I'd imagine .. is a range operator of kind
11:14 hatseflats but the ^'s in there
11:14 masak hatseflats: they mean, "up until, but not including"
11:14 hatseflats hmm, okay.
11:15 hatseflats makes perfect sense to have that
11:15 masak alternative blog post title: "my undying love for .kv on lists"
11:16 moritz_ masak: my first attempt of early .uniq didn't work out, and I'm not motivated to debug right now :/
11:16 masak moritz_: understandable.
11:16 masak moritz_: I might mention you anyhow. :)
11:17 masak anyway, the first attempt was a dead end.
11:18 masak .uniq in the right place might speed it up slightly, but the second one is (a) less code, (b) much more efficient
11:18 masak also note the exquisite use of param defaults and referring to prior params in the second one :P
11:19 masak that feature rocks.
11:19 moritz_ but is @a = [...] actually right?
11:19 moritz_ doesn't that assign an array to the first item?
11:19 masak moritz_: where do you see that?
11:20 masak and, yes it does.
11:20 moritz_ and is "@slots.grep: { !$_ };" the same as  "none(@slots)"?
11:20 moritz_ @slots = [0 xx 2*@candidates]
11:20 lambdabot Unknown command, try @list
11:20 masak moritz_: ooh, nice.
11:20 masak moritz_: oh.
11:20 masak I will try without it and see if it works.
11:20 masak (peer review)++
11:20 masak rakudo: my @a = [1,2,3]; say @a.elems
11:21 p6eval rakudo 0588e8: OUTPUT«1␤»
11:21 moritz_ and 'unless none(...)' should be the same as 'if all(...)', no?
11:21 masak rakudo: sub foo(@a = [1,2,3]) { say @a.elems }; foo
11:21 p6eval rakudo 0588e8: OUTPUT«3␤»
11:21 masak moritz_: seems different rules apply for param assignments.
11:22 moritz_ maybe it's more like binding?
11:22 LadyLunacy joined #perl6
11:22 masak rakudo: say "OH HAI" unless none(1,2,3)
11:22 p6eval rakudo 0588e8: OUTPUT«OH HAI␤»
11:22 masak rakudo: say "OH HAI" unless none(1,2,3,0)
11:22 p6eval rakudo 0588e8: OUTPUT«OH HAI␤»
11:22 * masak 's head spins
11:22 masak rakudo: say "OH HAI" if all(1,2,3)
11:22 p6eval rakudo 0588e8: OUTPUT«OH HAI␤»
11:22 masak rakudo: say "OH HAI" if all(1,2,3,0)
11:23 p6eval rakudo 0588e8:  ( no output )
11:23 masak moritz_: no, 'unless none' and 'if all' aren't the same.
11:23 moritz_ right
11:23 masak 'if all' seems to be the behaviour I want.
11:23 moritz_ unless none = if any, I think
11:23 masak aye.
11:24 hatseflats why the *bliep* is rakudo outputting so many crapchars?
11:24 moritz_ what are crapchars?
11:24 hatseflats non-ascii chars
11:24 hatseflats sorry
11:24 masak hatseflats: are you thinking of the ␤ characters?
11:24 hatseflats and others
11:24 moritz_ that's the translation of a newline character
11:24 masak that's a feature, not a bug. we want to see the newlines in the output.
11:25 hatseflats 13:22 < p6eval> rakudo 0588e8: OUTPUT�OH HAI␤�
11:25 hatseflats that's what I see
11:25 masak hatseflats: please update your client. :)
11:25 hatseflats to something utf8 capable?
11:25 moritz_ hatseflats: this channel is utf-8 only :-)
11:25 masak hatseflats: aye.
11:25 hatseflats ah
11:25 hatseflats yes
11:25 hatseflats that works better
11:25 hatseflats my screen session was still in non-utf8
11:25 masak we're practically non-utf-8-intolerant in here.
11:25 masak and proud of it.
11:26 Topic for #perl6is now http://perl6-projects.org/ | nopaste: http://sial.org/pbot/perl6 | evalbot: 'perl6: say 3;' | irclog: http://irc.pugscode.org/ | UTF-8 is your friend!
11:26 hatseflats well, sure, but my config broke and now screen doesn't default to utf8 anymore :(
11:26 masak (UTF-8 is in the set of things you'd rather stay friends with.)
11:27 moritz_ ASCII just hasn't enough characters for us
11:27 masak neither does Latin-1 :)
11:28 hatseflats how about EBCDIC?
11:28 hatseflats is that good enough?
11:28 moritz_ did you mean to say "is that bad enough"?
11:28 hatseflats only if the other question will get me banned
11:29 moritz_ we're not so quick with bans in here :-)
11:30 hatseflats no, I know :)
11:30 masak especially not for something so simple as an opinion. :)
11:31 moritz_ right, there's nothing wrong with EBCDIC as long as I don't have to deal with it
11:32 masak indeed.
11:32 masak &
11:35 hatseflats :)
11:48 DemoFreak joined #perl6
12:05 ruoso joined #perl6
12:14 c9s joined #perl6
12:16 PhatEddy joined #perl6
12:17 PhatEddy rakudo: UnManagedStruct.new
12:17 p6eval rakudo 0588e8: OUTPUT«Null PMC access in getprop()␤current instr.: 'parrot;Perl6;Grammar;is_type' pc 172191 (src/gen_grammar.pir:34726)␤»
12:17 PhatEddy rakudo: UnManagedStructz.new
12:17 p6eval rakudo 0588e8: OUTPUT«Could not find non-existent sub UnManagedStructz␤current instr.: '_block14' pc 53 (EVAL_16:43)␤»
12:17 PhatEddy rakudo: File.new
12:17 p6eval rakudo 0588e8: OUTPUT«Null PMC access in getprop()␤current instr.: 'parrot;Perl6;Grammar;is_type' pc 172191 (src/gen_grammar.pir:34726)␤»
12:18 jnthn That's leakage from Parrot; we have a ticket on that, and I expect HLL use will solve it...
12:18 jnthn (Which there has been quite a bit of work towards)
12:20 PhatEddy (One of?) the ticket(s) is RT #62156 - and your last comment on the ticket seems to indicate some confusion as to where the "File class" is defined ...
12:23 zamolxes joined #perl6
12:26 azawawi joined #perl6
12:28 masak joined #perl6
12:31 iblechbot joined #perl6
12:31 jnthn ruoso: ping
12:33 ruoso jnthn, pong
12:33 hatseflats pang!
12:34 jnthn ruoso: Hi! I'm wanting to try and get the meta-class/representation stuff straightened out some in Rakudo.
12:34 jnthn I've spent a couple of hours looking through smop stuff.
12:34 ruoso jnthn, cool
12:34 jnthn I have a couple of questions, if you have time.
12:35 ruoso well... ask them... then I'll see if I have the time to answer now ;)
12:35 jnthn :-)
12:35 jnthn On the representation stuff.
12:36 jnthn The spec talks about being able to use things like a Hash or a Cstruct and so forth as an alternative representation.
12:36 ruoso right
12:36 jnthn However, I also notice that you define a representation API.
12:36 ruoso yes
12:37 jnthn The things you list in there are not operations that, say, a hash will have out of the box.
12:37 jnthn In this case, what exactly is going on, and how do we get from a plain old Hash to something that supports this API?
12:37 ruoso you need to get the implementation of hash-based OO
12:37 ruoso and that is in the representation
12:38 ruoso I basically split the OO in two parts
12:38 ruoso one is how the things are stored
12:38 ruoso and other is what they mean
12:38 ruoso so, it wouldn't really be a regular hash
12:38 jnthn OK, so the first is the representation, the second is the meta-class?
12:38 ruoso yes
12:38 ruoso ok... but I have to run now... bbl
12:39 jnthn OK, thanks for that...would like to discuss more, grab me when there's a good time for you. :-)
12:47 payload joined #perl6
12:51 skids joined #perl6
12:55 jnthn skids++ # your patch just got applied :-)
12:56 pmurias joined #perl6
12:58 exodist joined #perl6
13:06 dalek joined #perl6
13:07 pugs_svn r26665 | azawawi++ | [S:H:P6] version 0.50 includes the latest STD.pm
13:07 DemoFreak joined #perl6
13:13 masak sometimes I wonder if the solution to this whole strict casting business shouldn't be to have a lenient 'scalar mode' in which the distinction between Str and different kinds of Num was intentionally blurred...
13:13 rindolf joined #perl6
13:13 masak type theorists will probably be able to tell me why this is a bad idea. :)
13:13 masak but often that feels like what I want.
13:14 rindolf rakudo: 1|2
13:14 hatseflats so, in perl6 I can bind roles to object instances, not only classes, right?
13:14 p6eval rakudo 0588e8:  ( no output )
13:14 rindolf rakudo: (1|2).say
13:14 p6eval rakudo 0588e8: OUTPUT«12␤»
13:14 masak hatseflats: right. and that's when they're called 'traits'.
13:14 masak (IIRC)
13:14 hatseflats masak: iiuc, that's not true, at least , them being called traits.
13:15 masak rindolf: it's strange that you only get one newline from that.
13:15 masak hatseflats: in Perl 6, you mean?
13:15 hatseflats if memorhy serves me, traits are on a class level abstraction, not object level
13:15 masak hatseflats: in Perl 6, you mean?
13:15 hatseflats well, that, of course, I woudln't know
13:15 masak hatseflats: recall that vocabularies differ between communities.
13:16 hatseflats yeah... that sucks
13:16 hatseflats okay
13:16 masak hatseflats: that's what makes it slightly difficult to talk about, at least until you qualify your terms.
13:16 wollmers std: my $Ⓐ;
13:16 p6eval std 26665: OUTPUT«##### PARSE FAILED #####␤Syntax error (two terms in a row?) at /tmp/4MXGA5NIAl line 1:␤------> [32mmy $[31mⒶ;[0m␤    expecting any of:␤     POST␤   infix or meta-infix␤        infix stopper␤    postfix␤        postfix_prefix_meta_operator␤       shape definition␤       standard
13:16 p6eval ..stopper␤ statement modifier loop␤...
13:16 hatseflats so, syntactically, how do I bind a 'trait' into an Perl 6 object?
13:16 masak hatseflats: S12.
13:16 hatseflats ok
13:17 masak http://perlcabal.org/syn/S12.html
13:17 wollmers rakudo: my $Ⓐ;
13:17 p6eval rakudo 0588e8: OUTPUT«Malformed declaration at line 1, near "$\u24b6;"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:86)␤»
13:17 rindolf rakudo: ((2&3) > 1).say
13:17 p6eval rakudo 0588e8: OUTPUT«1␤»
13:17 rindolf Shouldn't it be a boolean?
13:17 masak rindolf: ideally, yes.
13:17 skids traits are compile time.  When they are runtime they are "properties"
13:17 masak there's an RT ticket about it.
13:18 masak skids: oh, right. that's it.
13:18 masak and they're not really related to roles.
13:20 * jnthn figures he should clear up the terminology a bit here...
13:20 masak rakudo: class A {}; class B hides A {}
13:20 jnthn When you write a role, and you do class Foo does MyRole { } that's compile time compositon into a class.
13:20 p6eval rakudo 0588e8: OUTPUT«Unable to parse class definition at line 1, near "hides A {}"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:86)␤»
13:20 * masak submits TODO rakudobug
13:20 jnthn wtf is hides?
13:20 masak jnthn: S12 :)
13:21 masak "the synopsis that never ended"
13:21 jnthn std: class A {}; class B hides A {}
13:21 awarefish joined #perl6
13:21 p6eval std 26665: OUTPUT«##### PARSE FAILED #####␤Unable to parse class definition at /tmp/bQiRwqAhhZ line 1:␤------> [32mclass A {}; class B [31mhides A {}[0m␤    expecting trait␤FAILED 00:02 35m␤»
13:21 masak huh.
13:21 jnthn I was pretty sure I'd not seen STD parsing that.
13:21 jnthn Anyway, continuing
13:21 hatseflats rakudo: while(1);
13:21 p6eval rakudo 0588e8: OUTPUT«Could not find non-existent sub while␤current instr.: '_block14' pc 60 (EVAL_17:47)␤»
13:21 jnthn When you take an existing object and add a role to that, it's called a mix-in.
13:21 masak S12:1716
13:22 masak TimToady: ^ bug in STD?
13:22 jnthn A trait is something applied at compile time, and trait names are often introduced as roles, and if they set a property that'll be handled by roles too.
13:22 jnthn So there can be (and often will be) a relationship between traits and roles, but there doesn't have to be.
13:23 hatseflats aha
13:23 masak hatseflats: keywords like 'while' are whitespace-significant.
13:23 masak hatseflats: also, please be gentle with p6eval :)
13:23 jnthn (I did read the traits paper. What Perl 6 calls traits is not really what that paper talks about. What Perl 6 calls roles is much closer.)
13:23 hatseflats masak: aye, will do. :)
13:23 masak rakudo: $*IN.lines(1).say
13:24 p6eval rakudo 0588e8: OUTPUT«Land der Berge, Land am Strome,␤»
13:24 masak \o/
13:24 jnthn rakudo: $*IN.lines.pick
13:24 p6eval rakudo 0588e8:  ( no output )
13:24 jnthn rakudo: say $*IN.lines.pick
13:24 p6eval rakudo 0588e8: OUTPUT«Einig laß in Brüderchören,␤»
13:24 patmat lol
13:24 masak rakudo: say $*IN.lines.pick.flip
13:24 p6eval rakudo 0588e8: OUTPUT«!hcierretsÖ setfürpegleiv␤»
13:24 PerlJam what's on p6evals' $*IN?
13:25 patmat lol
13:25 jnthn The Austrian national anthem.
13:25 masak PerlJam: the Austrian national anthem.
13:25 PerlJam ah
13:26 moritz_ joined #perl6
13:26 les joined #perl6
13:26 samlh joined #perl6
13:26 cj joined #perl6
13:26 presh joined #perl6
13:26 antiphase joined #perl6
13:27 masak rakudo: say $*IN.lines.pick.split.sort.join
13:27 p6eval rakudo 0588e8: OUTPUT«too few arguments passed (1) - 4 params expected␤current instr.: 'parrot;Any;split' pc 41571 (src/gen_setting.pir:6342)␤»
13:27 masak rakudo: say $*IN.lines.pick.split('').sort.join
13:27 p6eval rakudo 0588e8: OUTPUT«␤»
13:27 masak hm.
13:28 masak rakudo: say $*IN.lines.pick.split('').sort.join
13:28 p6eval rakudo 0588e8: OUTPUT«   ,Hddeeeefhiiilmmnrsttttuuwß␤»
13:28 masak :)
13:28 LylePerl joined #perl6
13:28 PerlJam masak: sort the letters in the whole thing by frequency  :)
13:29 sri_kraih joined #perl6
13:29 pmurias joined #perl6
13:29 masak PerlJam: nice idea. which letter comes out on top. betcha it's 'e'.
13:29 masak s:2nd/\./?/
13:35 masak rakudo: ++%*h{$_} for $*IN.slurp.split(""); say .key, "\t", .value for %*h.pairs.sort({ -.value })[^10]
13:36 p6eval rakudo 0588e8: OUTPUT«e  88␤      60␤r     47␤i      41␤n      37␤t    36␤s      27␤d      24␤h     24␤␤     23␤»
13:36 masak craziest one-liner I've ever written.
13:36 jnthn ...wow!
13:36 PerlJam -.value is neat
13:37 * masak bows
13:37 PerlJam (I would've just used reverse)
13:46 PerlJam rakudo: say "{.key}\t{.value}" for (do { my %h; %h{$_}++ for $*IN.lines.split(''); %h }).pairs.sort({.value}).reverse[^10];
13:46 p6eval rakudo 0588e8: OUTPUT«e  88␤      83␤r     47␤i      41␤n      37␤t    36␤s      27␤h      24␤d     24␤g     20␤»
13:46 PerlJam (just cause  :-)
13:46 masak PerlJam++
13:51 PerlJam hey ... how come the number of spaces is different between mine and yours?
13:52 PerlJam (I assume the second thing is spaces)
13:52 presh joined #perl6
13:52 moritz_ aren't these tabs?
13:52 PerlJam oh, maybe
13:53 masak oh, wait.
13:53 masak rakudo: say (do { my %h; %h{$_}++ for $*IN.lines.split(''); %h }).pairs.sort({.value}).reverse[^10].perl;
13:53 p6eval rakudo 0588e8: OUTPUT«["e" => 88, " " => 83, "r" => 47, "i" => 41, "n" => 37, "t" => 36, "s" => 27, "h" => 24, "d" => 24, "g" => 20]␤»
13:54 masak rakudo: say (do { my %h; %h{$_}++ for $*IN.lines.split(''); %h }).pairs.sort({.value}).reverse[^10];
13:54 p6eval rakudo 0588e8: OUTPUT«e  88      83r     47i     41n     37t     36s     27h     24d     24g     20␤»
13:54 masak rakudo: .say for (do { my %h; %h{$_}++ for $*IN.lines.split(''); %h }).pairs.sort({.value}).reverse[^10];
13:55 p6eval rakudo 0588e8: OUTPUT«e  88␤      83␤r     47␤i      41␤n      37␤t    36␤s      27␤h      24␤d     24␤g     20␤»
13:55 masak ah, there you go.
13:59 * PerlJam prepares for a mandatory "training" on dysfunctional teams
14:12 mizioumt joined #perl6
14:16 awarefish joined #perl6
14:16 pmurias ruoso: i can work on p6opaque right now? (you don't have uncommited stuff?)
14:19 pugs_svn r26666 | pmurias++ | [re-smop] exposed symbols needed for p6opaque
14:20 mberends joined #perl6
14:21 masak mberends: good afternoon, good sir.
14:21 mberends good afternoon to you too, sirrah.
14:22 masak mberends: how's that OO-ification of proto coming?
14:23 mberends there is a Sockets test working locally. Sorry, the promised tuits for proto were stolen. Today looks good, however.
14:23 masak ok.
14:24 masak mberends: I'm holding back so I don't start micromanaging you. :)
14:24 masak mberends: better to give you free hands and then discuss the result, methinks.
14:25 jnthn If I create a local branch in git, it stays local unless/until I push the branch at some point, right?
14:25 * masak is trying to learn efficient teamwork
14:25 mberends heh, micromanaging me doesn't work. each attempt makes future ones less likely to succeed.
14:25 masak jnthn: aye.
14:26 mberends masak: could you help me with some OS X networking input?
14:26 masak mberends: possibly.
14:26 masak what do you need?
14:27 jnthn pmichaud: ping me when you're about :-)
14:28 mberends some netstat arguments and the resulting output. in Linux the command 'netstat --tcp --listen --numeric' works for the test. How would OS X so something similar?
14:28 mberends *do
14:29 mberends BSD is unlikely to support the GNU long option names, I fear.
14:30 mberends re: the micromanaging, I do expect you to refactor my refactoring ;)
14:31 masak me too, but that's not micromanaging.
14:31 masak that's just pedantry :)
14:32 mberends :) let's go back to calling it teamwork
14:32 masak http://gist.github.com/106487
14:32 masak mberends: fair enough.
14:32 masak mberends: oh, and that gist url was for thee, sir.
14:33 mberends gotit, thank you kindly
14:33 minazo joined #perl6
14:35 frew|work joined #perl6
14:36 [particle] joined #perl6
14:40 ejs1 joined #perl6
14:42 broquaint joined #perl6
14:45 mberends masak: pray wouldst thou perform this command on thy shell, and dispatch the result unto me: netstat -f inet -p tcp -a -n
14:46 masak mberends: I shall gladly comply, good sir.
14:47 masak what strikest me is a long list of addresses of some kind, fashioned in six different columns.
14:47 masak ah, and the word "Proto" is topmost! :)
14:47 mberends that be goode
14:47 mberends hah!
14:47 mberends lol
14:49 mberends proto is everywhere, just as we planned ;)
14:49 masak world domination by default. :)
14:50 alester joined #perl6
14:52 mberends Could you send a gist of the netstat output? It seems to be the right data.
14:53 masak well, what exactly would I be sending.
14:53 moritz_ http://www.catalyzed.org/2009/05/th​e-perl-community-the-difference-bet​ween-ignorance-and-stupidity.html very much to the point IMHO
14:53 masak I don't want to compromise the security of my university.
14:55 mberends rather let's not risk anything. If I knew exactly what the data contained, I would probably not be asking for this trial, so I cannot promise that it is safe.
14:55 masak moritz_: nice post.
14:56 masak mberends: I'll email you.
14:56 mberends masak: good workaround :)
14:57 masak there, sent.
14:58 alester I don't like the implied message that it's OK that we scorn people and are hostile.
14:58 alester "If you come to us and do X, we will be hostile, and we're OK with that."
15:00 moritz_ I think it's a very good description of the current state of the perl community, wether we like it or not
15:00 alester It is a description, but I don't see you damning it.
15:00 alester left #perl6
15:00 alester joined #perl6
15:00 alester left #perl6
15:01 mizioumt1 joined #perl6
15:01 eternaleye joined #perl6
15:01 payload joined #perl6
15:01 moritz_ that's probably because I can very much understand the reasons
15:02 moritz_ and damning something which I understand and maybe even did a few times myself would make me a hypocrite
15:04 hudnix joined #perl6
15:05 nihiliad joined #perl6
15:07 _REPLeffect joined #perl6
15:07 mberends masak: thanks, the netstat layout is very different than the Linux equivalent, but our good friend regex will find the values required :)
15:07 masak mberends: I hope there will come a day when such workarounds are no longer needed. :)
15:08 mberends when Apple and Microsoft follow Novell and switch to Linux, that day will come ;)
15:09 masak I was referring more to being able to do these things natively in Perl 6. but YKWIM. :)
15:09 * moritz_ wonders if Debian/GNU FreeBSD will be usable at the time of the next release :-)
15:10 icwiener joined #perl6
15:15 alester joined #perl6
15:15 alester back, sorry.
15:15 justatheory joined #perl6
15:18 alester moritz_: The way I read that posting, it sounds like you're OK with the state of affairs as it is now.  I'd rather we (as members of a commenuity) explicitly disapprove of it.
15:19 moritz_ alester: first of all, I didn't write it.
15:19 alester OK, it sounded like someone else said you did.
15:19 alester but mea culpa.
15:19 moritz_ no problem
15:19 masak well, I said "nice post".
15:20 masak because I liked it when I read it.
15:20 moritz_ I do not like hostility, but I think before we explicitly disapprove of it, we should offer other behavioural patterns
15:20 alester I don't see that there needs to be an order.
15:21 alester The other behavioral pattern is "Don't be hostile."
15:21 moritz_ ie what to do instead, when somebody acts if #perl$something was a support channel
15:21 moritz_ alester: no, that's not a pattern
15:21 moritz_ "not a circle" is also not a geometric figure
15:21 alester I disagree.
15:22 moritz_ I made the experience that telling people what to do can work far better than telling people what not do to
15:22 moritz_ if you tell an addict "don't smoke", that will help nothing.
15:23 moritz_ if you tell him what he can do in order to stop smoking, you might help him.
15:23 alester Are we hostility addicts?  Interesting idea.
15:23 masak if someone comes to me and wants to know how to program something, but is unwilling to learn the required background knownledge for being able to do the task, I might decide that it's not an efficient use of my time to continue helping that person.
15:23 alester masak: Nobody's suggesting otherwise.
15:23 moritz_ alester: not addicts, but many are surely caught in behavioural patterns
15:24 moritz_ (including me)
15:24 masak alester: that's all I got out of that post. the "ok, you can go away now" part is when everyone on a channel reaches that conclusion.
15:24 alester Yes, but one need not say it.
15:24 masak indeed.
15:25 moritz_ and many learned that if somebody didn't invest any effort, a quick way to get rid of them is to offend them, so that channel is clear for more efficient talk
15:25 masak and most people probably don't.
15:25 moritz_ not because they have fun offending somebody, but because it's a very easy solution
15:25 alester I think they DO have fun offending people
15:25 alester or showing superiority.
15:26 masak alester: that would definitely be a part of it, yeah.
15:26 masak alester: that's what happens when a group forms.
15:26 masak it gets an inside and an outside.
15:26 alester Somewhere in my blog-posts-to-write list is "You don't always have to be better than everyone else."
15:26 moritz_ alester: there may be some of those, but you'd have trouble convining them of anything else
15:26 masak and some people seem to like to patrol the border.
15:27 alester I'm less concerned with the hardcore jerks than I am those who are leaning that way and may not realize it.
15:27 mberends This channel is noted for the patience and helpfulness of its members, trying to encourage more people to join it. Other channels are a bit more exclusive and intolerant. The members here should consciously avoid drifting in that direction as Perl 6 becomes reality.
15:27 moritz_ alester: and I think that those can be helped by showing them other options.
15:27 FurnaceBoy joined #perl6
15:27 alester moritz_: I'm not saying not to show them.
15:28 moritz_ alester: good :-)
15:28 masak I think we should consciously promote kindness and helpfulness, recognising it in people and picking up patterns we like.
15:28 moritz_ alester: I just believe that it'll be much more efficient than telling them what not to do
15:28 moritz_ masak++
15:28 pmichaud jnthn: I'm about
15:29 jnthn pmichaud: Hi :-)
15:29 pmichaud good morning, #perl6
15:29 jnthn Good weekend?
15:29 pmichaud yes, reasonably good weekend.  I finally got my office cleaned up, which is good because apparently something in the office was triggering an allergy.
15:29 jnthn Wow!
15:29 jnthn Was it an old lolcat? ;-)
15:30 alester moritz_: OTOH, there are things where it is not possible to provide an alternative.
15:30 Tene Good morning Perl 6!
15:30 moritz_ alester: sure
15:30 masak pmichaud, Tene: o/
15:31 Tene I'm very busy teaching and pbx-ing this week, but I should still be around occasionally.
15:31 Tene Just hilight me or leave a msg with purl.
15:31 * Tene AFK, teaching.
15:31 masak or phenny++.
15:31 jnthn pmichaud: I've been doing a lot of thinking about object stuff, and want to discuss some ideas I have for changes.
15:31 pmichaud jnthn: okay.
15:32 pmichaud I was thinking of fixing arrays today.
15:32 pmichaud (has-a vs. isa)
15:32 jnthn Nice!
15:33 pmichaud What sorts of changes are you thinking of?  Or do you wish to discuss them some other time?
15:33 jnthn Now is fine with me if it is for you.
15:33 jnthn I've got very little on my schedule at the moment, and knowing if the things I'm looking to pursue are along the right lines would unblock me.
15:34 jnthn Anyway, the easy-ish one first.
15:35 jnthn Summary: I think we need to take the changes you are planning for Parrot's lexpads and apply them to objects too.
15:35 jnthn That is, we'd create an instance of the object with the containers set up and traits applied once.
15:35 jnthn To get a new instance, we'd clone this.
15:36 pmichaud We'd still have to do something with their initial values.
15:36 masak literal++ # for his p6l thinking on docstrings
15:36 jnthn That means we can do traits on attributes just look on any other container, should be a bit more efficient, and will clean up the bugs we currently have where you override BUILD and get a null PMC access.
15:37 pmichaud well, I totally understand the problem with BUILD -- it just needs a rewrite.
15:37 jnthn Initial values are done at BUILD time rather than being traits.
15:37 jnthn We'd still do that lot at build time.
15:37 pmichaud is there any way we could use the protoobject as the copy?
15:37 jnthn It's not about initial values, it's about initial containers.
15:38 jnthn And the traits being applied to them at compile time (or once).
15:38 jnthn Well, that's kinda the next and bigger thing I wanted to talk about.
15:38 pmichaud go ahead.  :-)
15:38 jnthn I've been thinking a lot about the metaclass/representation/instance thing.
15:39 jnthn I've spent a few hours looking at smop to see what's going on there too.
15:39 jnthn I think that in places we can learn from them. I really, really don't see us following their representation API because it doesn't map well onto Parrot.
15:40 jnthn Anyway, to summarize...
15:41 jnthn 1) PMCs are representations. A representation does now how to provide storage of methods, attributes, a parent list and so on. It also should point to a meta-class, however.
15:41 alester moritz_: One benefit of being jerks, though.
15:41 jnthn 2) Our REPR API is basically part of the PMC vtable interface.
15:41 alester I've abandoned two projects recently that I wanted to help contribute to because my welcome was so hostile, so I'm back to working on Parrot splint targets.
15:42 jnthn 3) The meta-class instance should be a singleton. It doesn't actually hve any state itself, so is not per-class. But rather, the it uses the representation API to get at the data it needs.
15:44 [particle] alester: glad to see we're at the bottom (now top) of your todo list :P
15:44 jnthn 4) We would create a P6opaque PMC, which will subclass Object. Unlike Object, it can be instantiated and it basically is our proto-object. It provides all of the add_method etc interface through vtables. However, it creates a Parrot class behind the scenese and is really delegating there.
15:44 alester not ranked.  Just two other projects I use more.
15:44 alester and that I hadn't looked at at all.
15:45 jnthn The first time we instantiate it, it would create an initial instance and set up the containers (we'd intercept set_attribute perhaps).
15:45 jnthn Then for future instantiations we'd clone this one.
15:46 jnthn So yes, it is a lot like cloning the proto-object. It could almost *be* cloning the proto-object apart from it's awkward because we don't know our storage layout until we have fully defined the class.
15:47 kimtaro joined #perl6
15:48 jnthn 5) We'd have a cheat-like-hell version of P6Opaque too, or maybe just the same one that cheats if it sees our meta-class is the default one, that doesn't have to delegate anything at all to the meta-class.
15:48 jnthn (so we can be fast)
15:49 jnthn 6) find_method will do some magic too...like handing back a P6Invocation PMC instead of just the method. This knows how to get a whole candidate list. On the first invocation it acts like invoking the first candidate, but it also stashes itself in that candidate's lexpad, which is how callwith and callsame and that lot would work (as we discussed a bit in Oslo).
15:50 jnthn (p6opaque's find_method on the non-default meta-class would have to delegate to ^can in order to get the candidate list...)
15:51 jnthn That's about it. Basically though it means we move to something that looks a bit more prototype based.
15:51 * skids is going to have to study up just to understand all that :-)
15:52 pmichaud Okay, here are my initial reactions
15:52 pmichaud overall, it's probably a good idea
15:52 jnthn However, we're mostly staying class-based under the hood.
15:52 * jnthn stops talking and listens :-)
15:52 pmichaud it's certainly a good idea from a potential-compatibility-with-smop perspective
15:54 pmichaud As far as singleton metaclass instance goes, we're actually pretty close to that now.  We could make P6metaclass into a singleton -- I simply had it creating separate instances because it provided an easy place to stick the name and protoobject attributes.  Those could probably be properties on the Class PMCs, though, in which case we don't need separate P6metaclass objects.
15:54 pmichaud I do see some big advantages to that.
15:54 jnthn (class PMCs already have a name slot and a namespace slot that we could well just re-use, btw)
15:54 pmichaud I'm not sure that's a good idea.
15:55 pmichaud Parrot's idea of name and namespace might not exactly match Perl 6's idea of name and namespace.
15:55 jnthn Yes, that's true.
15:55 pmichaud indeed, they often don't match.
15:55 jnthn I'm happy to keep those separate.
15:55 pmichaud we also want to be sure we do something smartish with anonymous classes.
15:56 pmichaud anyway, continuing on...
15:56 pmichaud I'm not sure that add_method needs to be done through a vtable interface, or why having it go through the vtable interface is important or an advantage.
15:57 jnthn It's not about the vtable interface, it's about needing to call add_method on the meta-class.
15:57 jnthn For when people have custom ones and want to do something funky with it.
15:57 pmichaud right, so it could just be an add_method method, but not necessarily a vtable function.
15:57 jnthn OK, to clarify...
15:57 pmichaud (we've already been working to move away from vtable functions for class manipulation)
15:58 jnthn I'm proposing that we stick to vtable methods for our _represenation_ interface, not our meta-class one.
15:58 pmichaud why?
15:58 pmichaud or what's the important distinction?
15:58 jnthn Because our representation = our object instance.
15:59 pmichaud you'll need to qualify "object" there.
15:59 pmichaud (in order for me to understand)
15:59 jnthn Let me try and give an example.
16:00 jnthn class Foo { }; my $x = Foo.new;
16:00 jnthn $x here is an instance, and Foo is too (just the proto-object)
16:00 jnthn erm, type object ;-)
16:00 Psyche^ joined #perl6
16:01 jnthn Representations are just the underlying storage for an instance.
16:01 pmichaud just storage, not methods?
16:01 jnthn p6opaque is really just Parrot's Object PMC.
16:01 jnthn Well, here's where smop is very prototype-ish.
16:01 japhb joined #perl6
16:02 jnthn In the smop world, so far as I can follow anyway, they're all stored on the object.
16:02 pmichaud ("object"?)
16:02 jnthn I can only guess that in a clone they don't actually clone the method list.
16:02 jnthn as in, the instance
16:02 jnthn In the Parrot world, every instance points back to a class which is the storage of the methods, etc.
16:02 pmichaud okay.
16:02 jnthn smop conflates the two much more.
16:03 pmichaud In the Parrot world, every instance points back to a class which is also the schema for its attributes.  But not the attributes themselves.
16:03 jnthn There's no separate thing representing the commonalities between objects of the same class.
16:03 jnthn Right.
16:03 pmichaud Got it.
16:03 jnthn What I'm proposing is that we have a sinlge type, P6opaque, that we deal with directly for doing everything.
16:04 barney joined #perl6
16:04 jnthn The fact that it does have a Parrot class behind the scenes is something that we shouldn't need to care about.
16:04 pmichaud okay, that gets to another question... would P6opaque go into Parrot, or just be Rakudo-specific?
16:05 arnsholt A priori, that should be distinct from Parrot, no?
16:05 pmichaud arnsholt: if so, that causes major issues for PGE, PCT, and NQP.
16:05 pmichaud all of which are built on a Perl 6 class model.
16:05 hcchien joined #perl6
16:05 jnthn I'm undecided on that. Part of it depends on whether you see PGE, PCT, NQP etc adopting this in place of P6Object.
16:06 pmichaud well, P6object was intended to be Parrot's version of P6opaque.
16:06 arnsholt Ah, right. In that case, I think making it a(nother) Parrot library would be a solution
16:07 pmichaud I do know that we have to keep the two compatible somehow, or else we'll end up with some serious tool breakage.  We'd then be left with the undesirable choice of maintaining separate object models for PGE versus rakudo (and papering over the differences where we can), or making PGE Rakudo-specific.
16:08 pmichaud my intent has always been that PGE, PCT, NQP, etc. use the same object model as whatever Perl 6 (Rakudo) is using.
16:08 jnthn I guess what I'm proposing sort of supplants a lot of the work P6object is doing, and tries to do it in a more "native"-ish way.
16:08 pmichaud where "native" means...?
16:09 jnthn native is probably the wrong word.
16:10 jnthn It's possible that refactoring P6Object into a different shape may get us where we want to go too.
16:10 TimToady can parrot be supplied with tools compiled under rakudo without needing to include rakudo?
16:10 pmichaud TimToady: with difficulty.  It depends on how much those tools depend on the Perl 6 runtime.
16:11 TimToady well, if we want to distribute bare rakudo applications to run on parrot...
16:11 japhb Speaking of native versus Rakudo object models ... IIRC, native typed structs are way down the line on the Rakudo roadmap.  But I need to be able to create some simple {Un,}ManagedStruct wrappers for use with OpenGL.  How should I represent them?  With a Perl 6 class that has-a member that is-a ManagedStruct PMC?
16:11 pmichaud TimToady: then yes, a Perl 6 runtime would need to be available.  Of course, if it has 'eval' or if any of the components are P6 source then we'd need the compiler.
16:12 jnthn But I think actually trying to have some kinda p6opaque PMC that knows how to be prototype-ish rather than some of the stuff we do in P6Object today (creating anonymous subclass etc) could be cleaner/more performant etc.
16:12 pmichaud jnthn: perhaps I should provide a little background
16:12 pmichaud first, I'm not at all opposed to what you're proposing, nor am I trying to argue for the status quo.  I agree with you that a lot of things could be cleaner.
16:13 pmichaud when creating P6object (late 2007!), I was hoping that it would point the way to a more prototype-based model for Parrot's object system
16:14 pmichaud indeed, I was hoping that eventually Parrot itself would move to a model more like P6object instead of the one it has now.
16:14 pmichaud And the reason I chose "P6object" as the name (as opposed to "P6opaque") was to explicitly recognize that it might not be exactly what we need.
16:14 jnthn *nod*
16:15 pugs_svn r26667 | lwall++ | [STD] add trait_auxiliary:<hides>, masak++
16:15 masak :)
16:15 jnthn I guess that part of what I want to do is to bring the prototype stuff a bit "closer to the metal" as it were.
16:15 pmichaud what I found in writing the compiler tools was that Parrot's existing OO metamodel wasn't well suited for writing the tools.
16:15 pmichaud so I created P6object as an abstraction latyer between them.
16:15 pmichaud *layer
16:16 iblechbot joined #perl6
16:16 jnthn P6object is serving pretty well in doing that. I just really feel we need to - soon - sort out exactly what our alternative meta-classes and our representation interface is going to look like.
16:17 pmichaud I'm totally okay with refactoring/replacing P6object to do that.  But I'm not okay with the tools and Rakudo maintaining closely-parallel-but-not-quite-identical metamodels.
16:18 jnthn And we need to address the current mis-match in Perl 6 dispatch semantics and Parrot ones, so we can get one Perl 6 method call to actually be - in the p6opaque-with-no-custom-metaclass case - just a single Parrot method call in the common case. At least so far as the dispatch goes.
16:18 jnthn Yes, your point on the tooling is spot on.
16:19 pmichaud If we find ourselves having to go that direction (separate models), then I'd probably prefer to just focus on Rakudo and let someone else take over the design/maintenance of the other tools entirely.
16:19 pmichaud (and rakudo would keep its own set.)
16:19 pmichaud But that's not a very tasty answer.
16:19 jnthn I don't think we'll have to.
16:19 pmichaud Agreed.
16:20 jnthn In fact, I think we could even keep P6object looking the same on the outside.
16:20 pmichaud well, that was P6object's purpose.
16:20 jnthn And change the way it does stuff on the inside.
16:20 jnthn Right, I guessed as much. :-)
16:21 pmichaud as an intermediate step, can we see about simply refactoring p6object to look how we want, before worrying about making it into a PMC ?
16:21 pmichaud I agree that as a PMC it could be much faster.
16:22 jnthn Well, here's the other issue.
16:22 jnthn I kinda *need* to subclass Parrot's Object anyway.
16:22 pmichaud Because ... ?
16:22 jnthn Because I want to override find_method.
16:22 jnthn So I can get us down to jsut emitting $P0.'foo'() for method calls
16:23 pmichaud That sounds slightly different (more)
16:23 jnthn And so I can hand back a P6Invocation to wrap the stuff.
16:24 jnthn I agree I maybe could work my way around all of this in various ways. But I'd much rather just try and deal with the bigger picture while I've got a pile of time without the distractions, and the problems in my head.
16:24 pmichaud Oh, I agree.
16:25 pmichaud I'm trying to get to a final model that doesn't involve workarounds.  Or, to the extent that we do have workarounds, they're workarounds we plan to live with for a very long time.
16:25 jnthn Right. And I'm getting nervous about the current pile.
16:26 jnthn I know that this alternative-representation-and-metaclass stuff sounds like advanced features that most people don't need.
16:26 pmichaud would the override for find_method be found in Rakudo or in Parrot ?
16:26 clkao joined #perl6
16:26 jnthn But in reality, we've already done most of the common parts of S12. :-)
16:26 pmichaud I'm not at all arguing against it.  I'm particularly not saying "we really don't need it".
16:27 pmichaud I'm simply trying to see where all of the pieces will end up going.
16:27 jnthn I'm thinking that we'd probably want to not have p6opaque in Parrot, but something else that p6opaque would subclass.
16:27 pmichaud can that something else be "Object PMC"?
16:27 jnthn Not if we want it to act as Just Another Representation.
16:28 jnthn It'd be a subclass ob the Object PMC.
16:28 jnthn *of
16:28 jnthn It'd not even override find_method there.
16:28 pmichaud I don't understand.
16:29 pmichaud I don't understand why we need the intermediate class.  (I'm weak on the "representation" aspects of the model)
16:29 jnthn Maybe it's best if I compare how it looks now with how I see it looking afterwards.
16:30 jnthn Basically imagining the program: class Foo { }; Foo.new
16:31 jnthn We: 1) Create a Parrot class object to represent Foo. 2) Set it up with attributes and methods. 3) Create a subclass of it to serve as our proto-object. 4) Instantiate that and install it in the namespace. 5) Use that proto-object to find the actually Parrot level class and instantiate that to get our instnace of Foo.
16:31 jnthn *actual
16:33 pmichaud japhb: just to note that your question didn't get overlooked -- it's on the stack.
16:34 jnthn I'm proposing that this becomes: 1) Create our p6opaque or whatever we call the Parrot version. 2) Through the metaclass, add the methods and attributes. The metaclass is implemented in terms of calling v-table methods on p6opaque. 3) Install that into the namespace; it *is* our proto-object. 4) Look up the proto-object in the namespace and just (if it's in $P0 say) do $P0.'new'() on it to get our instance.
16:34 pmichaud better would be    new $P0
16:34 jnthn Notice that we never create, nor touch, a Parrot Class. WE are always dealing with a single proto-object, which behind the scnees is dealing with a class object for us.
16:34 jnthn That would work too.
16:35 abra joined #perl6
16:35 jnthn The real work would be done in the instantiate v-table method.
16:35 pugs_svn r26668 | hinrik++ | [S07] fix the year in Last Modified date
16:35 jnthn The reason that we need to use the v-table methods as our repr API is because it's essentially "out of band".
16:35 pmichaud what you're proposing is where I wanted to get with P6object, yes.
16:36 cosimo joined #perl6
16:36 pmichaud i.e., that the user of P6object wouldn't ever touch a Parrot class.
16:36 hercynium joined #perl6
16:36 jnthn If you look at smop, they have a different (but not so different as I was expecting...or maybe I just don't grok it) mechanism where there is another bunch of methods, like our vtable ones, that operate on the representation, that are invisible from normal method dispatch.
16:37 literal I see that Synopses 20 (Introspection) and 30 (Standard Perl library) are marked "Draft" on perlcabal.org/syn. Is that true? Are there drafts somewhere?
16:37 pmichaud You were just running ahead of me in terms of adding object capabilities to Perl 6.
16:37 pmichaud So we decided that we'd prototype things in Rakudo and then (hopefully) unify it with P6object.
16:38 pmichaud I.e., I didn't want P6object changes to bottleneck your work.  It sounds like we're at the unification step :-)
16:38 jnthn Sure. I think we might be at the point of wanting to unify now.
16:38 jnthn oh, agreement!
16:38 jnthn :-)
16:38 moritz_ literal: I never heard of these two
16:39 pmichaud I've never been entirely happy that Rakudo does as much Parrot-level class manipulation as it does.
16:39 pmichaud at least we now have it abstracted into guts.pir instead of in actions.pm :-)
16:39 jnthn Yes. :-)
16:40 eMaX joined #perl6
16:40 ElectricHeavyLan left #perl6
16:40 pmichaud does the existing Parrot vtable API have all of the operations we'd need?
16:40 jnthn Well, I was still trying to figure PCT out when I put the very first cut of OO support in. :-)
16:40 jnthn Yes, I think so, because I think I made sure of that when I was involved in doing Parrot OO stuff before.
16:41 moritz_ don't forget to write a deprecation notice for P6object if you want to change some interfaces
16:41 pmichaud we can preserve the existing interfaces, no problem.
16:41 jnthn moritz_: I'm hoping we'll avoid interface changes.
16:41 moritz_ ok
16:41 pmichaud the whole point of P6object was to make it look like you had a Perl 6 HLL interface.
16:41 pmichaud (to the extent that we knew what that was in November 2007))
16:42 pmichaud Returning to...
16:42 pmichaud 16:34 <jnthn> I'm proposing that this becomes: 1) Create our p6opaque or whatever we call the Parrot version...
16:43 pmichaud Is the adding of methods, attributes, etc. done through normal method calls or through vtables?
16:43 jnthn both ;-)
16:43 pmichaud I mean user-level API.
16:43 jnthn You call methods on the meta-class.
16:43 pmichaud Sorry.
16:43 jnthn user-level API for adding stuff to a class is "talk to the meta-class"
16:44 pmichaud which would be  metaclass.'foo'(...)  ?
16:44 pmichaud and not     foo_opcode metaclass, ...
16:44 jnthn Right.
16:44 pmichaud okay.
16:44 jnthn Oh yes, the meta-class provides a completely method interface.
16:44 jnthn And the uses the representation API (e.g. vtable stuff)
16:45 pmichaud it uses a vtable interface behind the scenes, but the standard programmer (the one creating classes and methods) never actually sees it
16:45 pmichaud (sees the vtable interface)
16:45 jnthn Correct.
16:45 pmichaud Good.
16:45 pmichaud Last question.
16:45 pmichaud What do we do about Int, Str, and Num ?
16:45 pmichaud since those are outside of P6object.
16:46 ejs joined #perl6
16:46 pmichaud (I should say  "Integer", "String", and "Float")
16:46 pmichaud and Complex.
16:46 pmichaud and Exception.
16:46 jnthn Good question. We currently cheat massively on those.
16:46 pmichaud Yes, primarily for performance reasons.
16:46 pmichaud I didn't want to write wrappers for them.
16:46 jnthn The thing is that from what I can follow Int is meant to be a role.
16:47 pmichaud I'm fine with Int being a role and a punned class.  At the time this was all going together we didn't have a clearly defined Parrot Role implemenetation.
16:47 jnthn for sure.
16:47 pmichaud so I didn't see how to make that work.
16:47 jnthn I think the way it's maybe meant to work is something like...
16:47 jnthn role Int { has int $.Int }
16:47 jnthn Note lowercase int in there
16:48 jnthn That is, it has a natively typed attribute.
16:48 [particle] you're talking about parrot hll classes here, not perl 6 classes
16:48 pmichaud bigints.
16:48 pmichaud role Int must handle bigints.
16:48 jnthn Ah, true.
16:48 [particle] it's hll integration at that point
16:48 pugs_svn r26669 | hinrik++ | [p6-proj] point to the SVN::Web interface for t/spec link
16:49 pmichaud I guess my question is, do we rewrite custom pmcs for Int/Num/Str/Complex/other in Rakudo, or do we re-use what Parrot already provides (or both?)
16:49 jnthn So today are we subclassing Parrot's Integer?
16:49 pmichaud Today we subclass Parrot's Integer, yes.
16:49 jnthn OK, nothing I'm suggesting takes away our ability to subclass Parrot classes.
16:49 pmichaud except those subclasses are instances of Object PMC
16:50 pmichaud (those subclasses create instances of Object PMC)
16:50 jnthn At the moment we just do
16:50 pmichaud I don't know that subclassing Integer would give us something that uses P6opaque
16:50 jnthn intproto = p6meta.'new_class'('Int', 'parent'=>'parrot;Integer Any')
16:50 jnthn That would jsut become something like:
16:51 jnthn (well, it'd stay exactly the same, I mean, it would inside P6Object do something like...)
16:51 jnthn $P0 = new 'P6opaque'
16:51 jnthn p6metaclass.'add_parent'($P0, ...pmcproxy for parrot;Integer here)
16:53 jnthn Remember P6Opaque is just a subclass of Object. The only difference is that it's creating a kind of Class PMC (or a subclass of that) behind the scenes.
16:53 pmichaud that's kind of my point.
16:53 pmichaud we don't do that now.
16:53 jnthn And it knows how to handle add_method and forward it.
16:53 jnthn We can't?
16:53 pmichaud right now what we do is more like
16:53 pmichaud $P0 = new 'Class'
16:53 pmichaud p6metaclass.'add_parent'($P0, ...pmcproxy for parrot;Integer)
16:53 pmichaud we can't currently 'add_parent' on an Object.
16:54 pmichaud (yes, I know you're saying that we do that)
16:54 cdarroch joined #perl6
16:54 jnthn Right, that's what I'm proposing p6opaque would give us the ability to do.
16:54 pmichaud right, I understand that.
16:54 pmichaud thinking.
16:54 jnthn Behind the scenes it will boil down to a call on a Parrot Class object.
16:55 pmichaud so, when I want to create a new Int instance, how does that happen?
16:56 pmichaud start with Int.new
16:56 pmichaud which becomes     intproto.'new'()
16:56 pmichaud intproto is a P6opaque, yes?
16:56 jnthn Correct.
16:57 DemoFreak joined #perl6
16:57 pmichaud so here's where I lose the details.
16:57 pmichaud what happens next?
16:57 [particle] heh, the opaque part works.
16:57 jnthn So we call .new. .new calls intproto.CREATE, which in turn calls intproto.^CREATE
16:57 jnthn Which then goes to the representation API and does new intproto
16:58 jnthn That calls VTABLE_instantiate.
16:58 jnthn On p6proto
16:58 pmichaud (also, I wonder if protoobject-ness should just be a mixin role :-)
16:58 jnthn This will then manufacture and return a new instance (with the pre-initialized containers from a clone stuff happening)
16:58 jnthn No no no, that's what you've missed! :-)
16:59 jnthn We don't do a protoobjectness mix-in any more.
16:59 pmichaud how does 'defined' work, then?
16:59 pmichaud or stringification?
17:00 jnthn defined goes on "do we have any instance data? if not, we must be the undefined proto"
17:00 jnthn Though that is a choice of the metaclass (the default one does that, though...)
17:00 pmichaud s/the undefined proto/an undefined proto/
17:00 jnthn Yes, an.
17:00 pmichaud there can be more than one undefined proto.
17:01 jnthn Right, exactly. Dog{ :name<Fido> } for example.
17:01 pmichaud In the case of Int, what does "do we have any instance data" mean?
17:01 jnthn Remember that when we subclass a PMC, we (currently, and this seems unlikely to change anytime soon in Parrot) end up with a proxy instance of Integer.
17:02 jnthn So there's just an Integer PMC sat in the instance data store.
17:02 pmichaud but you're saying that Int (the type object) wouldn't be a proxy instance
17:02 pmichaud yes?
17:02 pmichaud s/but/so/
17:02 jnthn It isn't today.
17:02 pmichaud Today it is, yes.
17:02 jnthn Today it _looks_ like it is.
17:02 pmichaud rakudo:   say Int.does('Integer');
17:03 p6eval rakudo 0588e8: OUTPUT«1␤»
17:03 jnthn But actually it's creating an instance of the Integer PMC.
17:03 [particle] rakudo: say Int.PARROT()
17:03 p6eval rakudo 0588e8: OUTPUT«␤»
17:03 jnthn It's the reason you can say things like $P0 = getattribute my_rakudo_int, [ 'Integer' ], 'proxy'
17:03 patmat http://www.pastie.org/467035
17:03 pmichaud .PARROT doesn't help here, because it's an anonymous class
17:03 patmat can someone tell me whats wrong with that?
17:04 patmat I'm a programming newbie in general, i cant find an error :( and the interpreter tells me crap
17:04 pmichaud jnthn: yes, but I can do get_attribute of the 'proxy' on the protoobject.
17:04 pmichaud (currently)
17:04 patmat Statement not terminated properly at line 25, near "say 'Moech"
17:04 jnthn Right. With what I'm suggesting here, the proto-object wouldn't have any storage.
17:04 literal patmat: there's no semicolon at the end of line 24
17:04 pmichaud patmat:  "my $antwort" is missing a semi
17:04 patmat ooops sorry
17:04 moritz_ also this:
17:05 moritz_ if ($antwort == 'j') { $i == True;
17:05 moritz_ you probably meant '$i = True;'
17:05 jnthn and probably eq 'j' :-)
17:05 pmichaud you probably meant   $i = ($antwort == 'j');    :-)
17:05 pmichaud you probably meant   $i = ($antwort eq 'j');    :-)
17:05 literal and '$i = False;'
17:05 moritz_ oh, when you ask "what's wrong?", please also tell us why you think that something's wrong
17:06 moritz_ or what error you observe
17:06 rafl joined #perl6
17:06 pmichaud moritz_: he did do that
17:06 moritz_ oh
17:06 patmat :P
17:06 pmichaud 17:04 <patmat> Statement not terminated properly at line 25, near "say 'Moech"
17:06 jnthn pmichaud: That is, the pointer the RPA that currently provides the storage hangs off would just be a PMCNULL.
17:06 moritz_ yes, I see
17:06 jnthn (In the proto)
17:06 patmat excuse accepted! :PP
17:07 moritz_ "#perl6 is too busy today" ;-)
17:07 jnthn pmichaud: Your point on stringification is a harder one. Hmm.
17:07 pmichaud jnthn: okay, I can see that it would work.
17:07 pmichaud jnthn: isn't it just the same as defined?
17:07 pmichaud "am I the protoobject, if yes, stringify this way -- else delegate to my class/proxy"
17:07 jnthn Oh, yes, that would work.
17:08 pmichaud it might still have some rough edges, though.
17:08 * moritz_ understoot at most half of what jnthn and pmichaud wrote in the last hour ;-)
17:08 jnthn Sure.
17:08 moritz_ *understood
17:08 pmichaud okay, now for the big question.
17:08 pmichaud the really big question. :-)
17:09 jnthn ...i can haz cheezburger?
17:09 pmichaud this feels to me like a refactor that is at least as big as the parameter refactor we did at the beginning of the year.
17:09 patmat hm i really have a problem with this... easy ... program
17:09 jnthn pmichaud: It's non-small, for certain.
17:09 pmichaud a bit more so, because it also impacts all of the tools.
17:09 jnthn pmichaud: But I don't think we have to do it all in one chunk like that one.
17:10 ruoso jnthn, I'm back
17:10 jnthn e.g. phase 1 - fill out the meta-class stuff and make sure everything is using that, not twiddling with class objects.
17:10 pmichaud jnthn: you think we can do it in pieces, given the amount of parrot-class specific stuff that is .... ah, you want to get rid of rakudo's fiddling with class objects.
17:10 jnthn I think that might be a good first step.
17:11 jnthn If it is doing everything through the meta-class then the next steps become easier.
17:11 pmichaud agreed.
17:11 jnthn ruoso: hi
17:11 pmichaud and I'm happier at any rate.
17:11 pmichaud because I much prefer it to be doing things via the meta-class than manipulating classes and roles directly as it does now.
17:11 jnthn Agree.
17:11 ruoso jnthn, I should be around for a while now... after a all-morning meeting
17:12 pmichaud How hard would it be for us to write up the interface before doing the code?
17:12 jnthn ruoso: OK. I figured out a few more answers to my questions.
17:12 pmichaud i.e., kinda of like a design document?
17:12 pmichaud actually, it would be worthwhile for Parrot to have a P6object PDD.
17:13 jnthn pmichaud: Well, I was pondering as a first cut we'd try following the HOW API in http://www.perlfoundation.org​/perl6/index.cgi?smop_oo_api
17:13 pmichaud I've been trying to follow that as closely as I can already.
17:13 pmichaud so that's a good way to go.
17:13 jnthn Right, so we should be in decent shape then.
17:13 pmichaud does this mean that BUILD/CREATE/etc. would move into Parrot, or at least a version of them?
17:14 patmat http://www.pastie.org/467824
17:14 patmat no error, but it doesnt work right
17:14 jnthn That's a question I had for ruoso. It appears that smop has BUILD/CREATE in Object delegating to the metaclass.
17:14 patmat same with $i = True und $i = False
17:14 jnthn That may be right, but it wasn't entirely clear to me if it should in S12.
17:14 jnthn Oh, wait,
17:14 jnthn CREATE has to.
17:14 pmichaud For now I'm fine if it does mean that...
17:15 moritz_ patmat: in what way does it not work?
17:15 jnthn Because it deals with the representation API.
17:15 pmichaud Right.
17:15 patmat moritz_ the questoin "Willst du noch einmal..."
17:15 patmat question.. pops up
17:15 pmichaud Although perhaps it can do so internally in P6object (Parrot), and we just expose it in Rakudo.
17:15 patmat then then
17:15 moritz_ patmat: ... but you never assign anything to $answer
17:16 patmat Use of uninitialized value
17:16 moritz_ erm, $antwort
17:16 patmat and then the game starts again
17:16 moritz_ my $antwort = prompt('Möchtest du noch einmal spielen?[j/n]';
17:16 moritz_ my $antwort = prompt('Möchtest du noch einmal spielen?[j/n]');
17:16 moritz_ that would work
17:16 moritz_ but as it is currently, $antwort is never filled with a value
17:17 jnthn True, though .new is defined in terms of CREATE, bless, BUILD, etc.
17:17 pmichaud jnthn: well, we can have a cheating .new in P6object and a "real" new for Rakudo.
17:17 pmichaud or something like that.
17:17 jnthn True. :-)
17:18 patmat ah oops it works
17:18 pmichaud and I'm not opposed to having CREATE/bless/BUILD in P6object anyway.  We already have .new .
17:18 jnthn OK.
17:18 jnthn So I think we could maybe do something like:
17:18 jnthn 1) Fill out the metaclass some more.
17:18 pmichaud I'm just trying to not bring too much of Perl 6 into Parrot (because I think we'll get some resistance)
17:18 jnthn 2) Get everything using that that currenlty muddles with classes directly.
17:19 patmat i even forgot the $*IN.get; first moritz_
17:19 patmat for $antwort... because I was so angry!! :P
17:19 clintongormley joined #perl6
17:19 jnthn 3) profit
17:19 jnthn erm
17:19 jnthn :-)
17:20 pmichaud I'm fine with this.
17:20 pmichaud Except in #2, it should be "Get everything _in Rakudo_ ..."
17:20 pmichaud other languages still need to work for 8 months.
17:20 jnthn True. We do need to be careful not to break other stuff.
17:21 jnthn I wonder if we need to have a new flag "use p6opaque" or whatever we call it for a while.
17:21 nbrown_ joined #perl6
17:21 ruoso you are both aware of the pseudo implementations in src-s1p. right? pmichaud, jnthn...
17:21 jnthn ClassHOW.pm and Object.pm?
17:21 literal is the perlcabal.org stuff (CSS and such) not in pugs svn?
17:21 ruoso yes
17:21 jnthn Yes, I've read them both, multiple times.
17:22 jnthn Today. :-)
17:22 pmichaud I've read them once or twice.
17:22 moritz_ literal: the css could be on perl.org, not sure
17:22 pmichaud jnthn: I don't think we need the flag.
17:22 jnthn pmichaud: No, I hope not.
17:22 pmichaud jnthn: I'd say we just get started on it and see where we run into roadblocks.
17:22 moritz_ literal: docs/feather/index.hml loads the css from http://search.cpan.org/s/style.css
17:22 ruoso if everything is right, no flag is needed
17:23 patmat moritz_: you still have the '=*IN;
17:23 pmichaud ruoso: we're having to coordinate with other Parrot projects that might not have the same ideas.
17:23 patmat ' in your tutorial
17:23 pmichaud (thus the possible need for the flag)
17:23 jnthn ruoso: .^! is your syntax for "call this on the repr API"?
17:23 moritz_ patmat: ah, forgot one file
17:23 literal moritz_: I'm wondering where the CSS used for S26.html is
17:24 wollmers std: my $a1'a;
17:24 p6eval std 26669: OUTPUT«ok 00:02 36m␤»
17:24 ruoso jnthn, yes... .^! is the calls the the repr is supposed to intercept
17:24 jnthn ruoso: OK.
17:24 wollmers rakudo: my $a1'a;
17:24 p6eval rakudo 0588e8:  ( no output )
17:24 jnthn ruoso: And do you mostly only deal with the repr API in the meta-class in smop?
17:24 moritz_ literal: docs/feather/perl.css, presumably
17:24 ruoso jnthn, yes... I try to keep it private to the meta-class implementations
17:25 wollmers rakudo: my $a1'a = 'c', say $a1'a;
17:25 p6eval rakudo 0588e8: OUTPUT«Use of uninitialized value␤␤»
17:25 ruoso but just for encapsulation sake
17:25 jnthn ruoso: OK, good - sounds consistent with where I'm wanting to go with Rakudo on this.
17:25 ruoso no coding limit, actually
17:25 [particle] wollmers: s/,/;/
17:25 pmichaud rakudo:  my $a1'a = 'c'; say $a1'a;
17:25 p6eval rakudo 0588e8: OUTPUT«c␤»
17:25 wollmers rakudo: my $a1'a = 'c'; say $a1'a;
17:25 p6eval rakudo 0588e8: OUTPUT«c␤»
17:25 pmichaud Rakudo doesn't parse item assignment yet.
17:26 literal moritz_: ah, yes
17:26 pmichaud (The comma is valid Perl 6, Rakudo gets it wrong.)
17:27 mberends moritz_: about to add a socket test to pugs, could you please look at it (and try it out)?
17:27 moritz_ mberends: I have to run now, but I can try it in about 3hrs
17:27 moritz_ mberends: feel free to commit right away
17:27 jnthn pmichaud: OK, sounds like I have my work cut out for me. :-)
17:27 mberends ok, that's fine.
17:28 pmichaud jnthn: well, I'm hoping it's more our/us than you/you
17:28 pmichaud i.e., I'd like to closely follow what's going on.
17:28 pmichaud (because it impacts so many of the tools and other language items)
17:28 jnthn Oh, for sure. :-)
17:29 jnthn I didn't say you hadn't got your work cut out for you too. :-)
17:29 pugs_svn r26670 | mberends++ | [t/spec/S32-io/IO-Socket-INET.t] shell script forks client and server
17:29 pmichaud in all of this, does P6object learn to deal with roles, too?
17:30 jnthn It'll get a compose_role method on the meta-class. I think we'll end up with a RoleHOW as well as a ClassHOW.
17:30 pmichaud Excellent.
17:30 jnthn I think we'll keep things fairly minimal though (enough but not too much).
17:30 pmichaud I want it to be role-aware also.
17:30 jnthn No way do we want to drag the parametricism into P6object.
17:31 pmichaud Agreeed.
17:31 pmichaud okay, time for lunch here.
17:31 pmichaud I've lost much of the morning I was planning to work on Lists, though :-)
17:31 pmichaud but for good reason.
17:31 jnthn Sorry!
17:32 jnthn I feel unblocked now though. :-)
17:32 pmichaud good.
17:32 pmichaud okay, I'll bbiah
17:33 pugs_svn r26671 | hinrik++ | [docs] comment out .TITLE in css (not used anywhere afaik), this should make S26's Title look right again
17:39 pugs_svn r26672 | mberends++ | [IO-Socket-INET.t] remove developer scaffolding
17:41 M_o_C joined #perl6
17:49 kimtaro joined #perl6
17:51 amoc joined #perl6
17:57 pyrimidine joined #perl6
18:00 mizioumt joined #perl6
18:23 pmurias ruoso: hi
18:24 pyrimidine_ joined #perl6
18:27 ruoso hi pmurias
18:28 pmurias ruoso: what does ^!is_container do?
18:30 ruoso pmurias, it's just something to check if p6opaque should intercept FETCH
18:34 kimtaro joined #perl6
18:36 ruoso pmurias, I'm not sure it should really stay there... but it was a necessary hack at that point...
18:39 pmurias ruoso: removing it and waiting till it bites us again is an option
18:40 ruoso pmurias, well... I know why it bites us
18:42 ruoso it solves an infinite loop, because at some point, the HOW might end up calling FETCH on the p6opaque when implementing the FETCH
18:45 pmichaud back from lunch
18:47 pmurias ruoso: want we have to face the problem when dealing with object which define FETCH?
18:55 PacoLinux joined #perl6
18:58 payload joined #perl6
18:59 abra joined #perl6
19:00 ElectricHeavyLan joined #perl6
19:03 wollmers pmichaud: couldn't locate the problem with Hindi characters in identifiers in rakudo/src/parser
19:03 dalek rakudo: r2e5607d | pmichaud++ | docs/spectest-progress.csv:
19:03 dalek rakudo: spectest-progress.csv update: 379 files, 10999 passing, 11 failing
19:03 dalek rakudo: (Failing tests have already been fixed at time of this commit.)
19:03 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/2​e5607d2bcfddf34e523c1dbdb16efede23a0878
19:04 wollmers pmichaud: they contain VOWEL SIGNS which are alphabetic but not letters
19:05 pmichaud wollmers: it's likely that Parrot's idea of alphabetic isn't purely unicode.
19:06 wollmers pmichaud: specs are also confusing - see my post at p6l
19:07 pmichaud I'll leave the specs for TimToady to figure out.  :-)
19:08 pmichaud at any rate, unless there's a strong immediate need for it, I'm not likely to worry too much about getting the alphabetics exactly right until Parrot cleans up its string handling a bit.
19:08 jnthn We passed 3,000!
19:09 jnthn wtf
19:09 pmichaud 3000?
19:09 jnthn We passed 11,000!
19:09 jnthn .oO( yeah, I really do need my dinner... )
19:09 pmichaud well,   3 == 0b11
19:09 pmichaud and right now we would appear to be at 11010  which looks nicely binary :-)
19:09 jnthn I haven't the slightest idea where I got the number 3,000 from. :-)
19:10 pmichaud well, your statement wasn't false.  :-)
19:10 jnthn On the up side, my dinner is about ready. :-)
19:10 jnthn lol
19:10 jnthn I've found one small issue.
19:10 pmichaud only one?  ;-)
19:10 jnthn Meta-class methods should really take the current object as the first parameter.
19:10 jnthn Often though they're taking it as the named to=>
19:10 pmichaud in p6object, or in what we're trying to move to?
19:10 jnthn Which probably was done before the "object as first parameter" thing was spec, to be fair.
19:11 jnthn In p6object.
19:11 pmichaud I don't mind if that changes.  It's very unlikely anyone is using it.
19:11 pmichaud wait, let me rephrase that.
19:11 pmichaud I suggest using a different method name for now to get things working/correct.
19:11 pmichaud We can then deprecate the old names and update later.
19:12 pmichaud similar to the changes happening in Match for .text, .ast, etc.
19:12 jnthn I might just be able to have both as multi-variants with the same name too.
19:12 pmichaud that's fine also.
19:12 jnthn I didn't check yet.
19:12 jnthn That'd be best but yes, different names...
19:12 jnthn OK, my nom is ready. bbiab
19:20 literal moritz_: there's something wrong with the urls in your blog posts, see for example http://perlgeek.de/blog-en/perl-​6/blackjack-and-perl-6.writeback
19:20 literal I am referring to the "posts in this category" links
19:21 fridim_ joined #perl6
19:23 ejs joined #perl6
19:43 fridim_ joined #perl6
19:47 pmichaud pugs:  say List ~~ Array;
19:47 p6eval pugs: OUTPUT«␤»
19:47 pmichaud pugs:  say Array ~~ List;
19:47 p6eval pugs: OUTPUT«1␤»
19:48 jnthn That's same as Rakudo, right?
19:48 pmichaud yes, I was just verifying.
19:48 jnthn :-)
19:50 * pmichaud prepares to rip out src/classes/List.pir .
19:50 * pmichaud looks for something to distract him.
19:50 * jnthn removes everything but List.pir from pmichaud's view
20:03 pmichaud oops.
20:03 pmichaud I pushed to the wrong branch.
20:03 japhb pmichaud: I believe my question is still on your stack ...?  Re: proper way to use {Un,}ManagedStruct from Rakudo?
20:03 japhb ouch
20:03 pmichaud shouldn't be a problem, though.
20:03 pmichaud Yes, the question is still on the stack.  The answer is likely that we don't know the answer yet.
20:04 pmichaud at least, I'm sure that I don't.
20:04 pmichaud and my best guesses are likely to change in May.
20:05 japhb pmichaud: OK, thanks.
20:05 dalek rakudo: r1c0ac16 | pmichaud++ | perl6.pir:
20:05 dalek rakudo: Convert several internal Lists to Arrays.
20:05 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/1​c0ac16d72b955f6d52feb471d83d8384983e84b
20:13 ejs joined #perl6
20:14 aindilis joined #perl6
20:29 kimtaro joined #perl6
20:46 PacoLinux joined #perl6
20:49 kimtaro joined #perl6
21:00 TimToady pmichaud: note that for the self ticket, the phrase in question is a has initializer, which runs in BUILD context, and hence does have an obvious instance self, so this isn't really about binding self to the class
21:02 moritz_ did you reach any conclusions if want() is going to stay?
21:04 pmichaud TimToady: okay, thanks.
21:04 pmichaud So we definitely can't leave self as being a plain lexical, unless we're making use of 'lift' somehow.
21:05 pmichaud or otherwise attach the context to self... which we have to do anyway.  I'll have to think about it a bit more.
21:05 jnthn The thing on the RHS of the = is made a closure already; we just need to make it an anonymous method.
21:05 pmichaud That works for me.
21:05 jnthn (and remember to pass self in too)
21:06 pmichaud well, the closure has to be invoked on the newly built object, I suspect.
21:06 jnthn yes
21:07 pmichaud okay, I'll update the ticket.
21:08 pmichaud in the general case, though, is 'self' available in the body of a class declaration?
21:08 pmichaud (as opposed to within initializers, as the ticket case shows)
21:08 jnthn No.
21:08 pmichaud (ticket updated)
21:08 TimToady I don't see what it buys us that $?CLASS does give us better
21:09 TimToady or some reasonable fascimile
21:09 TimToady self in the class seems to be confusion waiting to happen
21:09 pmichaud good for me
21:09 pmichaud more ticket updating.  :-)
21:10 TimToady moritz_: given how lazy Captures are, I don't see much use for want any more
21:10 pmichaud DO NOT WANT want()
21:11 pmichaud should we start excising it from the spec and test suite?
21:11 TimToady and while an optimizer or type inferencer may be able to conclude what the eventual context will be, I hate to have user code relying on the optimizer
21:11 Tene I still like my evil continuation-based want(). :)
21:11 TimToady Tene: feel free to write one, and advertise it on E-Bay
21:12 TimToady hacking good continuation support into all the VMs on which Perl 6 will run will be a good side benefit
21:12 jnthn TimToady: Agree self in the class is just confusion waiting to happen.
21:12 pmichaud I think we all agree that there's no self in the class declaration.  Good.
21:13 * moritz_ wonders if all those tests in assign.t can be written without want() in a meaningful way, and who will do that
21:13 moritz_ (not me)
21:13 pmichaud moritz_: I'm sure they can.  I think they were misdiagnosed as needing want() in the first place.
21:14 moritz_ it's not a misdiagnose that they need want() right now ;-)
21:15 pmichaud I'm not even sure the tests are correct according to the current spec.
21:16 moritz_ feel free to rip them out, only leaving a list of cases that could be tested
21:16 moritz_ I'm not at all into the list/item assignment business :/
21:17 PacoLinux joined #perl6
21:17 pmichaud I'll see about cleaning them up after I've refactored List/Array, I think.
21:18 Tene does the 'return a capture' thing work well enough in rakudo to replace the uses of want() ?
21:18 jnthn pmichaud: How are you finding the refactor?
21:18 pmichaud jnthn: interruptions around the house, so I think I'll do it tonight when there should be fewer of those.
21:18 jnthn kk
21:18 pmichaud (we had various deliveries, kids are home, wife is home soon, etc.)
21:18 jnthn I tired to start on it once and found it painful.
21:19 pmichaud I think the trick is going to be that RPA maps to Array and not List.
21:19 jnthn Yes, but that still leaves isa => hasa.
21:19 pmichaud I don't see that as being a big problem.
21:19 pmichaud so far the few things I've modified have gone okay.
21:20 jnthn ok, nice.
21:20 pmichaud it does want a major rewrite of src/classes/List.pir, but that's not too big a deal.  I've only rewritten that file three times previously :-)
21:20 pmichaud s/rewritten/written/
21:20 pugs_svn r26673 | moritz++ | [t/spec] made Socket test a bit more robust
21:20 pmichaud (rewritten it twice previously)
21:21 jnthn Yeah, if there's anyone who's suited to the job, it's you. :-)
21:21 pmichaud For the first cut I'm also going to leave List as eager -- just want to get the isa/hasa done first.
21:21 pmichaud Then I'll fix up postcircumfix:<[ ]> and proxies.
21:21 pmichaud then we can work on laziness.
21:21 jnthn Sure, I wasn't expecting laziness to be tackled in with this just yet. :-)
21:22 pmichaud no, but it shouldn't be too difficult to add once this is done.
21:23 jnthn Indeed.
21:23 jnthn And also they can become roles. Woo.
21:23 pmichaud it might be more important to do parametric roles before tackling laziness.
21:23 jnthn ?
21:24 jnthn Oh, you mean just to make them parametric.
21:24 pugs_svn r26674 | lwall++ | [S12] clarify has = semantics
21:24 pmichaud right.
21:24 jnthn In theory, that'll be easy.
21:24 jnthn (Since I've done all the hard bits...)
21:25 pmichaud TimToady++ # S12 clarification looks great
21:28 Whiteknight joined #perl6
21:29 TimToady narcolepsis &
21:29 pmichaud afk for a bit
21:36 masak joined #perl6
21:36 masak oh hai. don't mind me.
21:36 masak rakudo: class A { has $.a is rw }; A.a = 5; say "alive"
21:36 p6eval rakudo 1c0ac1: OUTPUT«Null PMC access in getprop()␤current instr.: 'infix:=' pc 14678 (src/builtins/assign.pir:20)␤»
21:36 masak rakudo: say [].perl
21:36 p6eval rakudo 1c0ac1: OUTPUT«[]␤»
21:37 masak ah. the latter bug has already been fixed since my local revision.
21:37 * masak submits rakudobug for the Null PMC access
21:39 jnthn masak: We already have at least one ticket for the "omg I tried to access state on a proto and it didn't work out too well for me" issue. :-)
21:39 masak jnthn: "what's a proto?" :P
21:40 jnthn I dunno, but Austria is grateful for it.
21:40 masak :)
21:40 masak jnthn: I think you're right. I'll leave it there in RT anyway, in case this was a yet-unfound case.
21:40 jnthn I'll just be able to close two. :-)
21:41 jnthn When I fix it.
21:41 masak exactly.
21:41 masak the statistics look better. everybody's happy.
21:42 * jnthn finds an entire file in Rakudo that appears unused
21:42 pmichaud back
21:43 moritz_ jnthn: docs/ROADMAP? /me ducks and runs for cover
21:43 pmichaud yeah yeah
21:44 jnthn lol
21:46 pmichaud which file unused?
21:46 jnthn src/builtins/traits.pir
21:47 jnthn (we moved everything it did to guts.pir)
21:47 jnthn (ages ago)
21:47 jnthn running spectests anyway just to make sure it really can die.
21:47 pmichaud I think src/pmc/perl6array.pmc is also unused.
21:49 jnthn same
21:49 jnthn will check and clear that one up too
21:50 jnthn heh, not even compiled
22:18 rdice joined #perl6
22:22 mizioumt1 joined #perl6
22:44 skids joined #perl6
23:10 jnthn Infinoid: I fear dalek is now giving me karma^W^W^Wreporting commits at the moment. :-S
23:14 Infinoid jnthn: It worked 3 hours ago, did it break since then?
23:15 jnthn Infinoid: I've commited several things recently.
23:15 jnthn (last hour or so)
23:15 Infinoid To the "master" branch?
23:16 jnthn * master
23:16 jnthn yes
23:16 jnthn And I'm doing git push origin master
23:17 jnthn Infinoid: see http://github.com/rakudo/rakudo/commits/master
23:17 dalek rakudo: r5ea5aad | jnthn++ | build/Makefile.in:
23:17 dalek rakudo: Add P6Invocation to makefile.
23:17 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/5​ea5aadbb7d6d1911e8c6cef5ffc9f82178091f8
23:17 jnthn ok, it got that one...there were a few before that it missed htough.
23:17 jnthn *though
23:18 Infinoid I think pmichaud's (apparently non-branch?) 1c0ac16 may have confused it
23:18 DemoFreak joined #perl6
23:18 Infinoid or maybe the review link looks weird now that it's not the most recent, I dunno.
23:19 jnthn Yeah, I think pmichaud accidentally comitted to the wrong place earlier.
23:20 Infinoid Ok.  There is a known issue with dalek's github parser with non-linear history.  That'll affect non-rebase branch merges, it needs to keep a hash of already-seen revisions to solve that one
23:21 Infinoid but dalek++ for at least outputting *something*
23:21 Infinoid I don't know whether you're seeing is that or something else
23:21 Infinoid ^what
23:21 jnthn OK, no biggie.
23:21 pmichaud I pushed to the master branch on accident, but it was a harmless change.
23:22 pmichaud (I've already run spectests to verify :-)
23:22 Infinoid No biggie, that shouldn't have broken dalek then
23:22 jnthn pmichaud: I don't have ICU here, but I just comitted something that affects your ICU code. It looks completely sane (just adds a cast).
23:22 jnthn pmichaud: Was a patch from NotFound++ for C++ building.
23:23 jnthn (in perl6.ops)
23:23 pmichaud checking.
23:23 dalek rakudo: rd86c014 | jnthn++ | src/ (2 files):
23:23 dalek rakudo: Fixes to let us build on C++. Patch courtesy of NotFound++.
23:23 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/d​86c014f20a2f2fe97e175b93a5a600db3e9d4f3
23:23 pmichaud github++ for making this easy.
23:23 jnthn It didn't occur to me until after I'd checked it built etc that this code would be ifdef'd out for me.
23:24 pmichaud there's also a change there that gets rid of a 'const' declarator...?
23:24 jnthn pmichaud: Apparently it upsets the C++ build. I dunno the specifics, ask NotFound on #parrot. I do know that he's done a lot of Parrot C++ stuff, so was inclined to trust his patch.
23:25 pmichaud same here.
23:25 jnthn I have about zero C++ experience.
23:25 jnthn Happy someone who does is helping out though. :-)
23:26 skids jnthn: well, no wonder you get work done, then :-)
23:26 jnthn I've also tossed in a stub of another PMC I'm gonna need. Not finished yet...
23:26 jnthn skids: ;-)
23:27 pmichaud ah, that section of code probably shouldn't be using strwhich at all.
23:28 pmichaud (it's improperly typed)
23:28 jnthn Ah.
23:28 jnthn C++ ftw then. :-)
23:28 jnthn well
23:28 jnthn C++ compiler. Not the language.
23:31 pmichaud testing fix.
23:31 simcop2387 joined #perl6
23:55 jnthn Wow. Parrot's startup time just improved, it would seem. :-)
23:55 * jnthn tries it

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo