»ö« | perl6.org/ | nopaste: paste.lisp.org/new/perl6 | evalbot usage: 'perl6: say 3;' or rakudo: / pugs: / std: , or /msg p6eval perl6: ... | irclog: irc.pugscode.org/ | UTF-8 is our friend!
Set by wolfe.freenode.net on 30 October 2009.
00:05 kensanata left 00:13 payload1 left 00:43 Chillance joined
colomon ng: say (0 + 1i)**2 00:50
p6eval ng 3f06c7: You can only coerce a Complex to Num if the imaginary part is zero␤current instr.: 'perl6;Perl6Exception;throw' pc 12510 (src/builtins/Code.pir:110)␤
01:00 pmurias left 01:05 cognominal left, cognominal joined 01:13 rgrau_ left 01:17 dugg joined
pugs_svn r29514 | diakopter++ | [sprixel] fix lots o' bugs and begin work on a parser-generator-generator 01:23
r29515 | diakopter++ | [sprixel] there went two hours. but I finally found the real bug. 01:27
01:28 mj41_ joined 01:33 mj41 left 01:34 mj41_ is now known as mj41 01:48 Tarquin joined, Tarquin left 01:50 dugg left
pugs_svn r29516 | diakopter++ | [sprixel] implemented positive lookahead 02:00
02:14 ihrd joined, ihrd left, ihrd joined 02:15 ihrd left 02:18 orafu left, orafu joined 02:22 agentzh joined, astinus left 02:23 astinus joined
diakopter looking at Regex/P6Regex/Grammar.pm 02:27
in nqp-rx
I don't get what this does (in token atom): \w [ \w+! <?before \w> ]?
TimToady think about foo* 02:36
02:37 jferrero left
diakopter I don't see how <?before \w> would ever match 02:38
TimToady ! is not ratchet, it's greedy
02:38 ashizawa joined
diakopter nqp: say('hihi' ~~ / \w [ \w+! <?before \w> ]? /) 02:41
p6eval nqp: hih␤
TimToady don't need the ! in that, since :ratchet isn't on
diakopter oh. 02:43
I keep misremembering :ratchet as 'does backtrack' (as in ratchet-back).
but now that I realize the link with 'ratchet wrench', I get it. 02:44
TimToady bbl # delayed family christmas...ho ho ho 02:46
02:56 ashizawa left
diakopter ponders how to unify the notions of ratchet mode and LTM mode 02:58
02:59 ashizawa joined 03:02 agentzh left 03:06 ashizawa left, tylerni7 left, simcop2387 left, Exodist left, Khisanth left, pugs_svn left, bloonix left, mdxi left, Infinoid left, LionMadeOfLions left, hugme left, kcwu left, gju left, cj left, Tene left, RichiH left, mj41 left, am0c left, elmex left, nbrown left, cotto_work left, renormalist left, zamolxes left, go|dfish left, dukelet0 left, mtve left, akl left 03:08 mj41 joined, am0c joined, elmex joined, nbrown joined, cotto_work joined, renormalist joined, zamolxes joined, go|dfish joined, mtve joined, akl joined, dukelet0 joined, RichiH joined, Tene joined, ashizawa joined, tylerni7 joined, gju joined, simcop2387 joined, Exodist joined, Khisanth joined, bloonix joined, LionMadeOfLions joined, cj joined, kcwu joined, mdxi joined, Infinoid joined, pugs_svn joined, hugme joined, irc.freenode.net sets mode: +ovv Tene pugs_svn hugme 03:13 sunnavy joined 03:25 cognominal left, cognominal joined 03:39 InfiniteLoop joined 03:41 InfiniteLoop left 03:45 lest_away is now known as lestrrat 03:47 jaldhar joined 03:55 skingsbu joined 04:11 Baggiokwok joined
pugs_svn r29517 | diakopter++ | [sprixel] implemented protoregexes and negative lookahead. Translated 04:19
r29517 | about half of pmichaud's src/Regex/P6Regex/Grammar.pm from today's nqp-rx.
r29517 | It takes around 50ms to compile the P6Regex grammar to JavaScript, and
r29517 | another 50ms to run the first parse (I assume V8 is JITing it then), and
r29517 | 2-5ms for each parse thereafter (of a 13-char test input).
diakopter extremely unoptimized (since it's all fully-backtracking, no ratchet mode or LTM) 04:21
heh. the resulting parser function in JS is 71766 chars long. 04:23
04:24 tylerni7 left
diakopter perl6.pastebin.com/m6f6196b3 04:26
if JavaScript had a proper 'goto', there wouldn't be all those 'break' statements. :D 04:27
alllllllrighty then. 04:30
04:31 tylerni7 joined 04:39 dbrock left 04:53 hercynium left 05:00 hiye joined, hiye left 05:02 mberends left 05:05 gfx joined 05:10 cognominal left 05:11 yves left
Patterner Rakudo was added to Gentoo :) 05:11
05:12 jaldhar left 05:17 galf joined 05:18 mberends joined
mberends wow, diakopter's been busy 05:21
05:21 justatheory left, justatheory joined 05:22 Pzt left 05:24 Baggiokwok left 05:26 Baggiokwok joined
saschi moin 05:41
05:41 jaldhar joined
diakopter brain 05:43
05:45 mberends left 05:54 PZt joined
diakopter parrot 2.0 in 6 days 05:54
saschi nice 05:57
05:58 yves joined 06:00 jaldhar left 06:04 jack___ joined
jack___ test 06:04
06:05 jaldhar joined 06:07 Chillance_ joined 06:17 dj joined, dbrock joined 06:19 dj left 06:23 Chillance left 06:36 jack___ left 06:52 kaare joined 06:53 kaare is now known as Guest17584 06:54 Chillance_ left 07:14 Intensity joined 07:24 mberends joined 07:44 soupdragon joined 07:48 justatheory left 07:51 gfx left 08:10 iblechbot joined 08:15 agentzh joined 08:25 Baggiokwok left 08:27 Baggiokwok joined 08:39 Baggiokwok left 08:51 soupdragon left 08:56 colomon___ joined, colomon left, colomon___ is now known as colomon 09:05 Baggiokwok joined 09:10 dakkar joined 09:16 meppl joined 09:20 nadim left 09:22 renormalist left 09:23 renormalist joined 09:24 Chazz is now known as zz_Chazz 09:28 PZt left
jnthn Morning, #perl6 09:32
09:32 Mantis joined
mathw o/ jnthn 09:36
09:36 mathw sets mode: +o jnthn
mathw has barely even thought about Perl 6 lately :( 09:37
Mantis any php heads in here?
mathw hides 09:38
Mantis no answers in the channel
figured i'd ask here
pretty basic question, you probably dont need an expert understanding 09:39
jnthn mathw: Same, needed a break. :-)
mathw Well I can try...
I used to be a PHP head, but I've been trying to forget about it 09:40
jnthn: Sometimes you need a break... sometimes you're busy learning to knit. I went for the latter.
jnthn mathw: Knitting would seem a useful skill with currently weather conditions...
mathw jnthn: I made myself a scarf, a hat for my sister, and then a dice bag for me 09:41
My sister said she liked the hat, but that it lacked a pompom on the top
Fortunately although she's not a very good knitter she is perfectly capable of making pompoms 09:42
Tene you need the pompom
mathw I haven't seen the result, but I believe that it would have improved that hat significantly
It's the kind which demands a pompom
Mantis well im just trying to figure out where the URL variables come from on this certain website, (they look like &var=value, usually come from a post or get invocation) they dont seem to show up in the actual page source 09:43
mathw Mantis: those parameters show up in global associative arrays usually
unless register_globals is on, which it shouldn't be
Mantis but i dont think i can view that php script 09:44
it must be somewhere else
well, the array isnt in the page source
i can tell you that much
mathw the page source being the PHP script, or what gets sent to the browser? Because it won't be in the latter... 09:46
Mantis the source in the browser 09:48
yeah i forget that php is server side sometimes
mathw: so all hope is lost?
all i want to do is go over all the results and scrape with a perl script
szabgab ideone.com/
Mantis just return 1 page and ill be happy 09:49
szabgab anyone knows if there is a chance to package Rakudo for Gentoo ?
Then we could have Perl 6 support on the web IDE
09:53 xinming_ left 09:56 Mantis left 10:07 Su-Shee joined
Su-Shee good morning 10:07
10:08 JohnDoe365 joined 10:15 jferrero joined 10:24 fukawi2 joined
fukawi2 moritz_ - may I PM you about ilbot? 10:25
10:26 ezito joined 10:30 ezito left
moritz_ good morning 10:34
fukawi2: sure
jnthn morning, moritz_
10:39 ezito joined 10:41 ezito is now known as ezito_ 10:42 ezito_ left 10:44 fukawi2 left 10:45 Baggiokwok left 10:58 pleasurer joined 10:59 ezito_ joined 11:00 rgrau left 11:03 nadim joined 11:04 agentzh left 11:08 jogla_ joined, jogla_ left 11:09 jogla joined 11:10 jogla left 11:11 jogla joined, Baggiokwok joined
IllvilJa Hello all! o/ 11:12
11:17 patspam left, Baggiokwok left 11:23 riffraff joined, rgrau joined 11:40 Baggiokwok joined
Su-Shee time for the third coffee! 11:45
11:48 xinming joined 11:56 SmokeMachine joined
moritz_ std: :!foo<bar> 11:56
p6eval std 29517: ===SORRY!===␤Argument not allowed on negated pair at /tmp/sDNORSbCgG line 1:␤------> :!foo<⏏bar>␤FAILED 00:01 106m␤
12:06 pmurias joined 12:07 Baggiokwok left 12:08 Baggiokwok joined, galf left 12:14 JohnDoe365 left 12:20 bluescreen joined, PZt joined 12:23 pleasurer left 12:26 Baggiokwok left 12:40 ezito_ left 12:43 pmurias left 12:44 ruoso joined 12:47 drbean left 12:54 colomon left 12:56 ignacio_ joined 12:57 rgrau left 13:04 colomon_ joined 13:05 plainhao joined 13:06 vorner joined 13:11 takadonet joined
takadonet morning all 13:11
moritz_ tach 13:13
13:15 cognominal joined
colomon_ o/ 13:24
13:27 bluescreen left, bluescreen joined
dalek kudo/ng: f790e5a | (Solomon Foster)++ | src/Perl6/Grammar.pm:
Make exponentiation right associative, as per STD.pm.
13:28
takadonet colomon_++ 13:29
moritz_ colomon_++ indeed
colomon_ blushes 13:30
13:36 iblechbot left 13:58 ruoso left 14:03 Exodist left 14:04 pmurias joined 14:05 SmokeMachine left 14:07 cognominal left, cognominal joined 14:11 ruoso joined 14:20 payload joined 14:32 colomon__ joined, colomon_ left 14:46 colomon_ joined, colomon__ left 14:52 Guest17584 left 14:53 lestrrat is now known as lest_away 14:54 payload left 14:58 payload joined 15:03 kensanata joined 15:07 PacoLinux joined, rblasch joined 15:08 KyleHa joined
diakopter szabgab: someone said yesterday that rakudo was already packaged/included in gentoo 15:08
Patterner: ^^ 15:10
vorner Hm, I guess it wouldn't in the official portage (can't test now), but it might be in some layman repository 15:11
diakopter gentoo-portage.com/dev-lang/rakudo/Dep#ptabs 15:12
15:12 Psyche^ joined
vorner hm, nice one, I no longer need to compile it manually :-) 15:13
diakopter packages.gentoo.org/package/dev-lang/rakudo 15:14
15:15 tlb joined 15:17 rgrau joined
slavik is debian/ubuntu getting any love? 15:19
diakopter packages.debian.org/experimental/rakudo 15:20
slavik sweet 15:26
now, which rakudo is it? ng or the older one?
diakopter older
slavik k 15:27
15:27 iblechbot joined
szabgab diakopter, are you using Gentoo then? 15:28
diakopter szabgab: never have
I'm Feeling Lucky, though
15:29 rgrau left, Patterner left, Psyche^ is now known as Patterner
szabgab someone should talk to these people ideone.com/ who has more understanding of Rakudo than I do 15:29
to make it available on their ineterface
s/should/it would be nice if/ 15:30
15:35 bigmill joined 15:36 bigmill left
diakopter works on giving grammars access to their own IR so they can mutate 15:40
o wait, they already have it.
diakopter goes back to translating pmichaud's nqp-rx grammars
mberends goes to the train to de-commute 15:41
15:42 mberends left
pugs_svn r29518 | diakopter++ | [sprixel] more nqp-rx grammar translation. halfway through g.addPattern('cclass_elem') 15:55
diakopter commute&
pugs_svn r29519 | kyle++ | [t/spec] Test for RT 71958: array type constraint leaks 15:58
moritz_ could somebody please tell me the IP of svn.pugscode.org? 16:01
I can't resolve it here
16:02 uniejo joined
jnthn moritz_: fwiw, it ain't just you :-( 16:02
takadonet jnthn!! 16:03
jnthn hi, takadonet :-)
16:04 nihiliad joined
KyleHa svn.pugscode.org has address 193.200.132.135 16:04
BinGOs Looks like the DNS1.NAME-SERVICES.COM 16:05
erm
those DNS servers aren't responding.
16:05 soupdragon joined
moritz_ KyleHa: thanks 16:05
BinGOs: right; good that some DNS servers have it cached 16:06
16:08 meneldor joined 16:11 justatheory joined 16:15 SmokeMachine joined 16:17 alester joined
pugs_svn r29520 | kyle++ | [t/spec] Test for RT 71754: callsame used in multi sub 16:24
16:26 vorner left
KyleHa commits crud to the test suite. 16:27
moritz_ KyleHa: you learned that from me :-) 16:28
KyleHa I learn from the best. 8-)
moritz_ bows 16:29
16:29 uniejo left
moritz_ oh wait - you couldn't have meant me :-) 16:29
16:30 riffraff left 16:31 riffraff joined
KyleHa Pretty sure that's who I meant. 16:32
16:32 cdarroch joined
KyleHa The last couple of weeks, I've done phone interviews with Yahoo! that eventually went nowhere because it turns out I don't want to move to California. 16:33
I talked to people from four different departments. Every one of them brought up the "Perl 6" on my resume.
moritz_ wow 16:34
what did they ask?
Su-Shee KyleHa: yeah, in what way did they bring it up? ;)
KyleHa It came up various ways.
"I guess there aren't too many of those." "Actually, the AUTHORS file is pretty big..."
One guy said he'd been reading the P6 Advent Calendar, and it seems like a whole different language. I confirmed, it's a different language in the same family, based on the same concepts. 16:35
Su-Shee here it was mostly "ah, read about it - it still exists?! No we already switched to java.."
16:36 riffraff left
KyleHa Anyway, I thought I'd share that I think it has or would pay off to be part of the project here. 16:36
16:37 REPLeffect_ joined
KyleHa I wasn't sure how to list it in my experience, but a friend said I should put it on like any other paid position, so that's what I did. It's at the top, right above my current paying job. 16:38
moritz_ I have a whole section "Open Source" in my CV 16:39
KyleHa Maybe someday I'll be able to do that. 8-) 16:40
moritz_ actually it's not that impressive
Perl 6 test suite, specs, Rakudo, parrot, CPAN 16:41
16:41 riffraff joined
dalek kudo/ng: a4d72c7 | moritz++ | t/spectest.data:
enable 3 more tests in t/spectest.data
16:41
16:46 SmokeMachine left
KyleHa rakduo: say (grep { $^a == $^b }, (1, 1, 2, 3, 4, 4)).perl; 16:48
rakudo: say (grep { $^a == $^b }, (1, 1, 2, 3, 4, 4)).perl; 16:49
p6eval rakudo 3867ff: Not enough positional parameters passed; got 1 but expected 2␤in Main (file src/gen_setting.pm, line 324)␤
KyleHa rakudo: say (map { $^a == $^b }, (1, 1, 2, 3, 4, 4)).perl;
p6eval rakudo 3867ff: [Bool::True, Bool::False, Bool::True]␤
moritz_ ng: say (grep { $^a == $^b }, 1, 1, 2, 3, 4, 4).perl; 16:50
p6eval ng a4d72c: Null PMC access in get_string()␤current instr.: 'perl6;Perl6Role;perl' pc -1 ((unknown file):-1)␤
KyleHa RT 71544 calls it a bug that grep doesn't work the way map does. I'm wondering what the grep should return in that case.
Maybe it returns (1, 1, 4, 4) ? 16:51
16:53 ignacio_ left
moritz_ either it has arity DWIM built-in, then it retunrs (1, 1, 4, 4) 16:53
or not, then it returns a friendly error
KyleHa OK.
I'll test toward the first one.
16:53 SmokeMachine joined 16:58 ignacio_ joined 16:59 colomon_ left, colomon__ joined 17:00 meneldor left
pugs_svn r29521 | kyle++ | [t/spec] Test for RT 71754: grep arity sensitivity different from map 17:01
17:05 uniejo joined 17:11 nihiliad left 17:12 tylerni7 left 17:15 tylerni7 joined 17:18 nihiliad joined 17:21 rblasch left 17:23 gbacon joined 17:27 skingsbu left 17:35 alester left 17:36 jackyf joined 17:37 payload left 17:42 pmurias left 17:45 uniejo left 17:50 rblasch joined 17:52 ashizawa left 17:53 cognominal left 17:54 cognominal joined 17:57 stephenlb joined 18:00 Chillance joined 18:04 dakkar left 18:05 Slug1 joined 18:08 Chillance left, riffraff left 18:10 Chillance joined 18:12 cottoo joined 18:14 c0tt0 joined, cotto left 18:19 ive joined, uniejo joined 18:20 kensanata left 18:23 IllvilJa left 18:26 cottoo left, gbutler__ joined 18:28 Slug1 left 18:34 hercynium joined 18:37 gbutler__ left 18:40 IllvilJa joined 18:44 bluescreen left 18:45 bluescreen joined 18:50 skingsbu joined 18:53 ShaneC joined
pugs_svn r29522 | kyle++ | [t/spec] fix mislabeled fudge 18:54
18:58 kst joined 19:09 rgrau joined 19:21 rblasch_ joined 19:22 Tene left
KyleHa Hmmm. Exception.pod is a lot shorter than I expected. 19:27
19:28 payload joined
jnthn KyleHa: In a "looks like it's missing stuff" kinda way? 19:34
jnthn gropes his way around Rakudo
ng: sub foo(::T) { say T }; foo(Int) 19:36
p6eval ng a4d72c: Lexical 'T' not found␤current instr.: '&foo' pc 111 (EVAL_1:50)␤
PerlJam Hmm. What does it say about me that I thought 2 things when I read jnthn's message just now: "oh no! jnthn has been struck blind!" and "jnthn: get a room!"
diakopter ng: sub foo(::T) { say ::T }; foo(Int) 19:37
p6eval ng a4d72c: Lexical 'T' not found␤current instr.: '&foo' pc 111 (EVAL_1:50)␤
19:38 Tene joined
jnthn PerlJam: I didn't mean *that* kind of groping. :-P 19:38
19:38 rblasch left
PerlJam IRC has insufficient bandwith to make such distinctions without extra verbosity :) 19:39
19:39 rblasch_ left
huf alternatively, we just type/read too slow compared to how fast we do IO via speech/facial expressions/gestures 19:39
jnthn You could have just gone on my normal completely innocent nature...erm...maybe... 19:40
Type parametricism...what a nice easy point to dig back into Rakudo after a break. 19:41
19:41 lmc joined, cherio joined 19:42 cherio left
KyleHa jnthn: I'd say it's incomplete. 19:50
19:57 ash_ joined 20:01 Exodist joined 20:05 Z3vil joined
Z3vil hi! 20:05
KyleHa Hello, Z3vil.
Z3vil how are you? 20:07
i have a Question! if you want ?
KyleHa Feel free to ask.
Z3vil thank you ^_^, i have reading in rakudo.org about Perl6 and in Parrot web site, but i want know if any one can join Perl6 project ? and what's skill needed ? 20:09
20:09 lmc left
PerlJam Z3vil: writing is a good skill 20:10
Z3vil: programming in Perl (either 5 or 6) is a good skill
Z3vil: programming in Parrot is a good, but less needed lately skill
jnthn And yes, anyone who is interested can join the fun. :-) 20:11
PerlJam Z3vil: indeed, all are welcome 20:12
cognominal ho, jnthn is back, lately there was no bus factor but clearly an eggnog factor 20:13
Z3vil PerlJam: thank you very mush
jnthn: yes,i have reading Perl 6 is my MMORPG
jnthn cognominal: Yes, I needed some rest. :-)
20:13 jferrero left
Z3vil PerlJam: if we want to join you, what's us roles, and wha'ts tasks or mission we can do it ? etc ... (without docs writing) 20:18
jnthn Z3vil: It depends on your skills and interests. Many people start out by hacking on the test suite, others by working on Perl 6 modules and in the course of working on those finding/reporting bugs, there are also opportunities for digging into helping with an implementation (e.g. Rakudo). All of these are valuable tasks. 20:22
Really, it's finding something you'll enjoy and working on it. :-) 20:23
20:23 rachelBROWN left
Z3vil yes, ok! 20:26
Tene Z3vil: another significant help is identifying and categorizing failures and filing bugs, if that's interesting to you.
jnthn ng: say 4.2 ~~ Num 20:27
p6eval ng a4d72c: 0␤
jnthn ng: say 4.2 ~~ Rat
p6eval ng a4d72c: 1␤
20:28 arnsholt left
pugs_svn r29523 | jnthn++ | [t/spec] s/Num/Rat/ in a test that got behind with the spec. 20:29
dalek kudo/ng: 4639926 | jonathan++ | src/Perl6/ (2 files):
Fix up type captures in signatures, which is one step on the way to getting parametric roles working again.
Z3vil thx! 20:30
ash_ so, jnthn i have a question about ng/src/Perl6/Actions.pm method_def, so, it parses the method name with specials (! ^) but currently does do anything with the '^' special, when you add methods with a ^ should it just grab the HOW of the current object and add it to that instead of the current object that being defined?
s/does do/does not do/
jnthn ash_: Sort of. 20:31
ash_ well, it wouldn't know the HOW of the object till it actually finishes making the object
but the basic concept i guess is what I am asking
jnthn ash_: Right, it's a bit...tricky...I can't remember exactly how I did it in master.
20:31 uniejo left
jnthn I think it's something like though... 20:31
a kind of mix-in to the meta-object. 20:32
I think that's the cleanest way to support it, and what I ended up doing.
And we should be able to do it cleaner in ng too, thanks to the metamodel being saner. :-) 20:33
20:33 plainhao left, payload left
jnthn I think I viewed it as collecting the ^foo methods into an anonymous role and then arranging for that to get mixed into the metaclass though. 20:33
ash_ shouldn't you be able to do Foo.HOW.HOW.add_method(...) 20:34
20:34 solarion joined
jnthn Maybe. 20:34
You're adding a method to the metaclass of the metaclass then though.
ash_ does each class get its own instance of the metaclass? (IE Foo.HOW !== Bar.HOW) 20:35
jnthn Which will implement the HOW API, but probably will not be a ClassHOW.
Well, that's up to an individual metaclass really.
In Rakudo's implementation of ClassHOW though, the answer is a certainly yes.
Same for GrammarHOW, RoleHOW, etc.
ash_ I would think that should be speced out somewhere, is it talked about in your ng/docs/metamodel.pod? 20:36
20:36 uniejo joined
jnthn Depends which "that" you're talking about? 20:36
:-)
The "it's up to the metaclass" I think is.
The "what happens with method ^foo" I'm almost certain isn't.
But we can make it so. :-)
ash_ well ClassHOW, GrammarHOW, and RoleHOW since those are standard meta objects i think that are in the perl 6 spec 20:37
any other i would assume is up to whoever implements the metamodel
jnthn Right.
Only concern is that I'm not sure if the smop folks share my view on the "metaclass instance per class" thing. 20:40
OTOH, Rakudo's metamodel proposal already diverges from theirs a bit in some other areas (especially the approach to roles).
20:40 mariano__ joined
jnthn I think we do what makes sense for now and look to unify them further down the line when things are a bit more concrete. 20:40
ash_ how has it diverged? do they not have a meta instance perl class object? 20:41
jnthn *per? 20:42
ash_ yeah, per sorry
jnthn I'm not completely sure, my impression is that they are somehow storing the class info inside the objects or something though.
And treating it in a much more prototype-ish way.
That doesn't make much sense to me though. 20:43
20:43 japhb left
jnthn I mean, yes, knowhows should be prototype based. 20:43
And we should certainly allow for prototype OO implementations to happen.
20:44 soupdragon left
jnthn But S12 describes the standard model as being class based, and having a metaclass instance holding the knowledge about the class feels rather more natural to me. 20:44
Which points to instances.
20:44 soupdragon joined
jnthn Smalltalk creates an actual separate derived metaclass per class and has instances of those, and handles our method ^foo style "meta-methods" that way, fwiw. 20:45
I guess the "put 'em in a role and mix it in" approach is more along the lines of only doing that on demand. :-)
20:47 bluescreen left
ash_ i know ruby follows the instance approach to class meta methods, ruby is kinda my fallback language as i know it better than most other programming languages 20:47
PerlJam smalltalk > ruby
ash_ vim <=> emacs ? 20:48
rw!
cognominal yi implements vim and emacs so it is better than both :) 20:49
ash_ *bows down to my new yi masters* 20:50
PerlJam padre is written in perl by perl people for perl code. padre is best ;)
cognominal padre padrone
ash_ but it uses wx, which is in c, and perl 5 is written in c, does c win? </rhetorical> 20:51
so, if perl 6 is supposed to let you role your own prototype based OO system, would a single instance ClassHOW get in the way of that? 20:52
jnthn
.oO( I could declare my love for Visual Studio, and at least then everyone else can unite against me rather than having a vi/emacs war ;-) )
ash_: No, but it does cause you issues with method ^foo
PerlJam ew, gross
jnthn mwaha. 20:53
ash_ hmm yes, if the parser is singling out ^methods then i can see issues there
jnthn Well it's more about when you mix in.
If it's a singleton and you mix into it...well hey, you just gave that meta-method to every class. :-)
Which I think is Do Not Want. 20:54
20:54 arnsholt joined
jnthn ng: sub foo(::T $x) { say T }; foo(Int); foo(42); 20:54
p6eval ng 463992: Int()␤Int()␤
PerlJam would just look to the Moose/CMOP people for prior art and do whatever they do :) 20:55
jnthn PerlJam: Heh, I did that for roles, amongst other things. :-)
PerlJam then it must be correct! :)
20:57 mariano__ left
jnthn eek, getting all of S06-signature/type-capture.t to pass again is...tricky. 20:57
ash_ well, does Moose/CMOP properly implement things according to the perl6 spec? that, i am not sure of :P, finding a way for class based OO to not interfere with prototype based oo sounds tricky to me 20:58
jnthn I think that method ^foo will always be a bit funky for those doing prototype OO. 20:59
But I don't think it's a huge deal. 21:00
PerlJam ash_: since I don't know the answer to that question, I'd read the docs and probably go have a conversation with the folks on irc.perl.org:#moose (if I were jnthn :)
jnthn PerlJam: Oh, I've talked some with (moose folks)++ :-)
That's been helpful.
PerlJam jnthn: I know. But maybe ash_ needs to now :) 21:01
jnthn Moose is a good guide - it doesn't do everything the same way (traits are quite different).
ash_ jnthn: would it make sense to delegate the adding of '^' methods to the add_method method? or is that silly? 21:03
21:04 cotto_work left
ash_ it could easily check if it has a '^' and if not send it off to the current object's HOW 21:04
cognominal just got tripped by naming a instance variable by the same name as a method. rakudo says the method signature is wrong instead of pointing to the problem. I don't know what rakudo-ng does
jnthn cognominal: Got a small example? 21:06
ash_: No, I don't think add_method should have to deal with this. 21:07
Off hand anyway.
cognominal I guess I can produce one.
jnthn It's really syntactic sugar, imo, so should reduce down to something we already have.
cognominal ...but I prefer you to work on rakudo-ng :)
21:07 japhb joined
jnthn cognominal: It may already be fixed in ng. ;-) 21:07
moritz_ ng: class A { has $.b; method b($x) { } }; 21:08
p6eval ng 463992: A method named 'b' already exists in class 'A'. It may have been supplied by a role.␤current instr.: 'perl6;Perl6;Metamodel;ParrotBackend;add_method' pc 3108 (src/gen/Attribute.pir:441)␤
cognominal (grammar { has $a; method a { say 'a'; } }).new.a 21:09
hum wrong example
ash_ the only reason i'd leave it up to the add_method method is if you were rolling your own OO object you can define an add_method and have it handle what you need, having all methods pass through that one method might be nice 21:10
jnthn Maybe we should have add_meta_method as well as add_method. 21:12
That feels cleaner, if we're going to go down the "metaclass decides" route.
Which I guess may be good.
ash_ is it currently syntactic sugar for say: class A { method ^foo { ... }} === class A::HOW { method foo { ... }} ?
jnthn Then a prototype model could just outright bad it.
ash_: I think it makes a forwarder too. 21:13
It's not quite that
It's more like
A.HOW does anon role { method foo { ... } }
ash_ okay, i see what you mean, so thats an anon role not an augment? (is there a difference between those btw?) 21:15
pugs_svn r29524 | kyle++ | [t/spec] Test for RT 71112: Cannot assign to readonly variable. 21:16
jnthn does is an infix operator there.
The anon role is it's right hand side argument.
A.HOW is its LHS
It's the same as $foo does SomeRole
For mixing in.
I figure that add_meta_method may be the neatest way to go though.
I prefer it over adding a flag to add_method 21:17
21:17 cotto_work joined
jnthn And metaclasses that want to be singletons can say "no can do" easily if they like by throwing an exception in that method. 21:17
And ClassHOW can still just do it as a metaclass mix-in. Should be quite easy to implement. 21:18
And cleaner I guess than doing it elsewhere, and more control for the meta-programmer.
So I'm kinda leaning towards that.
ash_ sorry, i was confusing adding methods to an instance vs adding methods to a class
jnthn Yes, does operator mixes in to the instance.
does trait mod composes a role into a class. 21:19
Anyway, maybe let's try having method ^foo call add_meta_method instead of add_method
ash_ whats the difference in doing: augment class Foo vs Foo does A_Role; ?
jnthn The first adds methods to the class, and all instances get them. 21:20
ash_ or even, Foo does anon role { ... }
jnthn The second mixes in to the type object, so only the type object gets the methods in A_Role.
Same for that.
Foo is a type object, not a class object.
21:21 cognominal_ joined, ruoso left
jnthn There's no class object; just the type object which is the "empty instance" and the meta-object. 21:21
cognominal_ (class { has $.a is rw ; method a($/) { say 'a' } ; method b() { $.a++ } }).new.b; # Not enough positional parameters passed; got 1 but expected 2
jnthn So mixing into a type object is just like mixing into any other object - it only affects that one object.
cognominal_ jnthn, does not even complain if I omit the $.a++ 21:22
21:22 cognominal left
jnthn cognominal_: oh, interesting :-) 21:22
ng: class Foo { has $.a is rw ; method a($/) { say 'a' } } 21:23
ash_ jnthn: so, to add stuff after the class is instantiated you'd have to go through the meta object or augment the class?
p6eval ng 463992: A method named 'a' already exists in class 'Foo'. It may have been supplied by a role.␤current instr.: 'perl6;Perl6;Metamodel;ParrotBackend;add_method' pc 3108 (src/gen/Attribute.pir:441)␤
jnthn ash_: Correct.
the does infix operator is always about individual objects.
ash_ got ya, I am used to ruby's OO system where I can just grab the object instance and mess with it and it updates all instances of the object
cognominal_ mng rules :) 21:24
PerlJam ash_: with Perl you have that as an option :)
jnthn If you want that, you need to twiddle the meta-object.
ash_ s/object instance/class object instance/
jnthn But yes, I think we're understanding it the smae-ish now :-)
ash_ yeah 21:25
21:34 Mantis joined
ash_ i guess, add_meta_method would live in the ParrotBackend.pir ? 21:37
jnthn No 21:39
In ClassHOW.pir
IMO
ParrotBackend.pir will likely vanish soon - I think only ClassHOW uses it now. 21:40
Or at least, it will be, I think.
Mantis paste.lisp.org/+1ZYH 21:41
its perl5 sorry im banned from #perl
PerlJam Mantis: why are you banned from #perl? Have you tried #perlhelp? 21:42
21:42 Su-Shee left
ash_ jnthn: RoleHOW still uses it 21:42
Mantis well i asked for help and they decided to be smartasses
21:42 jackyf left
jnthn ash_: Ah, OK 21:42
ash_ GrammarHOW is based off ClassHOW so it doesn't directly use it
jnthn ash_: I couldn't quite remember how far I'd got with RoleHOW's divorce from Parrot roles. :-) 21:43
Mantis and theres only 1 person in #perlhelp
21:43 ignacio_ left
jnthn ash_: Most of the way though. :-) 21:43
ash_ jnthn: no worries, just trying to help some if i can figure this out
Mantis i was just wondering if thats a correct way to iterate over a website
21:44 SmokeMachine left
Mantis the $n variable controls the page counter in the url 21:44
moritz_ Mantis: maybe you're in the #perlhelp on the wrong server
PerlJam Mantis: #perl is *always* full of smartasses. Just don't antagonize them and you'll eventually get help
Mantis well i've been banned every since
moritz_ there's irc.perl.org and irc.freenode.org
jnthn ash_: Feel free to tweak method_def.
ash_: So method ^foo calls add_meta_method instead of add_method
ash_ so, should, eventually, they not use ParrotBackend? it only seems to contain 1 method of worth, the add_method method, and an init
jnthn ash_: That'll be a nice start.
ash_: Oh, it's just that *one*?! 21:45
21:45 Mantis left
ash_ yup, thats all thats in it 21:45
github.com/rakudo/rakudo/blob/ng/sr...Backed.pir
jnthn ash_: In that case, copy it into ClassHOW and RoleHOW, then toss it, I think.
ash_ sure, i'll do that 21:46
jnthn We'll likely end up with less lines of code, and RoleHOW's add_method will need to change in the future.
ash_++
Then feel free to have a crack at implementing add_meta_method. I guess start off with a "not yet implemented" stub.
And make sure it's getting called when you write a class Foo { method ^bar() { } } 21:47
cognominal_ > (grammar { token TOP { $<s>=s }; }).parse('s'); say $/<s>
s
> (grammar { token TOP { $<s>= s }; }).parse('s'); say $/<s>
Use of uninitialized value
should the results any different?
ash_ i'm working on it as we speak, i'll email a patch to the bug tracker
jnthn Thanks, and feel free to bug me about applying that if I don't spot it.
moritz_ std: /$<a>= 3/ 21:48
p6eval std 29524: ok 00:01 109m␤
cognominal_ rakudo-ng: (grammar { token TOP { $<s>=s }; }).parse('s'); say $/<s>
moritz_ cognominal_: I think it's an error
cognominal_: (try just ng:)
cognominal_ oops
moritz_ because you don't have a capture
try $<s>=(s)
cognominal_ moritz_, I have a capture in the first case 21:49
moritz_ and I think that's wrong
PerlJam idly wonders if putting all of the stuff that does Q:PIR and pir::foo into Perl6::Backend::Parrot would be useful when we want Perl6::Backend::Javascript or Perl6::Backend::Lisp or Perl6::Backend::LLVM or Perl6::Backend::mono or <use your imagination>
jnthn ng: my Int $x = "lol"
p6eval ng 463992: ( no output )
cognominal_ I don't :)
21:49 patspam joined
cognominal_ I think the second line should behave as the first 21:50
parentheses should be necessary of one want to capture many atoms
jnthn PerlJam: I'm very open to Rakudo evolving towards multi-backend, though ng has priority for me for now. :-)
cognominal_ *if
ash_ jnthn: i emailed 1 patch already: its in the bug tracker, ticket #71554 21:51
sjohnson hi
jnthn hi sjohnson 21:52
cognominal_ ng: (grammar { token TOP { $<s>=s }; }).parse('s'); say $/<s>
p6eval ng 463992: Method 'isa' not found for invocant of class 'Undef'␤current instr.: 'perl6;Perl6;Actions;_block956' pc 144909 (src/gen/perl6-actions.pir:34)␤
jnthn ash_: Thanks, just got that up in my browser. :-)
21:53 uniejo left 21:54 Z3vil left
ash_ jnthn: just thought i'd bring it up, its only a small patch so no big deal 21:54
dalek kudo/ng: cc5d534 | jonathan++ | src/Perl6/Actions.pm:
Need to thunk in things like sub foo(::T $x, T $y) { ... }. This gets all but one of type-capture.t passing (which only fails now due to lack of variable type checking).
21:55
21:58 soupdragon left 22:00 mberends joined
sjohnson yo jnthn 22:01
22:01 payload joined 22:02 Chillance left
sjohnson jnthn: do you use Windows 7 for your Windows desktop use? i've switched from XP, and am kind of happy with it 22:03
jnthn sjohnson: On my desktop, no.
sjohnson: My new laptop that I got last month came with Windows 7. 22:04
And I like it.
Tempted to switch my desktop at some point...when I can be bothered with the hassle. :-)
cognominal_ jnthn, are you happy of your new laptop? 22:05
jnthn cognominal_: Aye, it's faster, probably about a kilo lighter once the lighter power supply is facotred in, and I can get the best part of six hours out of the battery.
22:06 wayland76 joined
sjohnson jnthn: ya i used XP since 2000 ! pretty decent win32 OS 22:06
or 2001, whichever year it was out
jnthn Yeah, XP is fine. Vista I avoided. 22:07
Big mess.
OK, scalar assignment type checking seems to work again locally. \o/
sjohnson agreed 22:08
jnthn And all of S06-signature/type-capture.t passes now. :-)
Oh gah, a test is has a fail...
not ok 41 - can assign string "2" to Int variable
22:08 zaphar_ps joined
jnthn ...um. 22:08
moritz_ um. 22:09
22:09 Mantis joined
KyleHa Did I write that? It kinda looks like my crud. 22:10
jnthn lol
S03-operators\numeric-context.rakudo
The comment is worse than the test. :-) Phew!
KyleHa Yup, I wrote that. 22:11
moritz_ this looks so b0rked
wait 22:12
not quite
jnthn wait, is this failing already?
Or did I break it just by putting in the type checking?
moritz_ I can't remember that it ever worked
jnthn Because the error ain't a type check fail.
Ah
In that case I guess I'll commit away then. :-) 22:13
moritz_ ng: say (+"2").WHAT
p6eval ng 463992: Num()␤
moritz_ perl6: say (+"2").WHAT
p6eval rakudo 3867ff: Num()␤
..pugs: Num␤
..elf 29524: Str␤
moritz_ elf is ... creative
KyleHa I can't assign an integer Num to an Int just because other values of Num can't be Int? 22:14
jnthn KyleHa: In that case, I think prefix:<+> should be handing back an Int. 22:15
moritz_ you can't assign Num to Int because Num !~~ Int
jnthn iirc anyway...
moritz_ right, what jnthn said
that's the real problem
KyleHa So Int ~~ Num and Num !~~ Int. and (my Int $x) = (my Num $y) = 3 is impossible? 22:17
jnthn I forget if Int ~~ Num by spec now.
I kinda lost track of the numerical shake-up.
moritz_ it used to be
but it isn't anymore
jnthn Aye, I knew it used to be... 22:18
moritz_ Int ~~ Numeric and Num ~~ Numeric
jnthn Aha.
Where Numeric is a role?
dalek kudo/ng: 73bcc80 | jonathan++ | src/ (2 files):
Get type checking on scalar assignments working again.
kudo/ng: f9eb8e2 | jonathan++ | t/spectest.data:
S06-signature/type-capture.t now fully passes.
moritz_ so if you want a numeric value, use Numeric, not Num as type constraint
jnthn: yes
KyleHa Maybe Num could have a Int method that returns failure if the Num happens to have a non-Int in it.
moritz_ that's very error-prone due to floating point precision limits 22:19
PerlJam truncation to Int is generally popular
22:20 Exodist left, ash_ left 22:21 Exodist joined
jnthn OK, I didn't get parametric roles back in today, but I'd forgotten I needed to fix type captures. 22:21
So, para roles tomorrow, with some luck. :-)
22:23 ash_ joined
ash_ jnthn: well... i have a conundrum. Its parsing and calling add_meta_method now, but i am sorta of confused how to add the method to the instance ClassHow 22:23
jnthn ash_: :-)
dalek kudo/ng: f2d5c76 | jonathan++ | src/builtins/ (3 files):
Another s/Object/Mu/.
jnthn ash_++ for getting this far though 22:24
ash_: My suggestion is that you do something like this:
1) Add a hash attribute called something like %!metamethods to the metaclass. 22:25
2) add_meta_method just makes an entry in here.
22:25 KyleHa left
jnthn 3) In the final compose, check if that hash contains anything. If so, create an anonymous role (equiv of my $mr = RoleHOW.new; for %!metamethods.kv -> $name, $code { $mr.add_method($name, $code) }; my $r = $mr.compose; self does $r;) 22:26
erm, create an anoymous role *and mix it in to the current metaclass instance*, I meant. 22:27
That's what the pseudo-ish code I shows does, only thing is you'll ned to write it in PIR since the rest of ClassHOW also is for the moment. :-/
But essentially, you can construct the anonymous role using RoleHOW and then use the does operator to do the mixing in for you. 22:28
ERm, I probably meant meta rather than self in the does statement there.
pugs_svn r29525 | moritz++ | fudge numeric-context.t for ng; correct some test descriptions
jnthn In PIR it'd be like '&infix:<does>'(meta, r) where r is the constructed role.
You could OTOH do it "immediately" in add_meta_method. 22:29
But then if there's loads of methods, you end up doing loads of generated roles and mix-ins...
Not that that's likely, but still...
Anyway, that's what I'd do as a first cut. 22:30
We can take any forwarding method that we need to generate later on after getting this bit working, anyways.
ash_ i did 1 and 2, but for 3 i added a method to classhow, add_meta_method and did was trying to implement it in pir, but i see your approach, i'll changed it to construct an anon role 22:31
in the package finalize
jnthn That will do what master does, I guess. 22:32
And it feels rightish.
ash_ here, one sec, i can show you what I am doing, let me make a gitpatch
jnthn ok
Though I need to go rest in a little bit. :-) 22:33
ash_ jnthn: thats fine, if your busy i can do this later 22:35
jnthn ash_: Feel free to paste it now.
ash_ gist.github.com/274680 is a copy of my current patch btw
22:35 rachelBROWN joined
jnthn It's not that I'm busy, just a tiny bit under the weather. 22:35
<- walked around in beautiful Prague for 5 hours on Saturday while it was snowing, and has a much slighter cold that he deserves for doing so. 22:36
mathw lucky you
ash_ jnthn: well, if you need to rest, thats perfectly understandable
jnthn mathw: After spending the previous week in Sweden, and the previous month in the UK, I was excited to be back in central Europe again. :-) 22:37
ash_: Looking now.
ash_ so, my problem is that functions right, it calls add_meta_method right, but within meta_method, i am trying to figure out how to add it to the meta model properly, line 109 of my patch, or line 437 of ClassHOW.pir if you apply the patch 22:38
jnthn ash_: + #p6meta.'compose_role'(classhowproto, parrotbacked)
Don't comment, just rip out. ;-)
ash_ this, btw, is not making an anon role, so you know
well, i was going to before i submited it to the bug tracker :P
this is a rough patch 22:39
mathw -> bed
ash_ i'll clean it up before really submitting it
jnthn ash_: OK, yeah. So in .sub 'add_meta_method' :method you want to be adding the methods to a hash attribute. 22:40
What you've done in Package.pm looks very right though.
For now, don't worry about add_meta_method for roles - I'm not quite sure what that means yet... 22:41
ash_ k
jnthn (Just die with some Not supported...)
ash_ will do 22:42
jnthn Anyway, it looks like you're going in the right direction. :-)
Thanks for hacking on this. It's nice to have help on metamodel bits. :-)
ash_ no worries, i'll try to get it functional 22:43
PerlJam ash_++ 22:44
22:44 pmurias joined 22:48 am0c left 22:51 Mantis left 22:52 ive left, thowe joined 23:05 skingsbu left 23:07 tlb left
cj any utf-8 heros here? I want to add both a caron and an accent to a c... how do I? 23:11
ash_ çÇ ?
no, lol, on my keyboard i just hit alt + character, if thats not it i have no idea 23:12
moritz_ rakudo: say "\c[COMBINING ACCENT ACUTE]\c[LATIN SMALL LETTER C WITH CARON]" 23:14
p6eval rakudo 3867ff: perl6regex parse error: Unrecognized character name COMBINING ACCENT ACUTE at offset 18, found 'C'␤in Main (file <unknown>, line <unknown>)␤
23:14 iblechbot left
moritz_ rakudo: say "\c[COMBINING ACUTE ACCENT]\c[LATIN SMALL LETTER C WITH CARON]" 23:14
p6eval rakudo 3867ff: ́č␤
ash_ thats awesome 23:15
moritz_++
moritz_ rakudo: say "\c[COMBINING ACUTE ACCENT]\c[COMBINING CARON]c"
p6eval rakudo 3867ff: ́̌c␤
moritz_ both firefox and xterm mess that up 23:16
cj my gnome-terminal has been broken WRT utf-8 for a couple weeks. woe.
moritz_ would be lost without a working terminal 23:17
ash_ i haven't really had issues with unicode on OS X, since in OS X's objective C all strings default to utf-8, most programs don't screw it up, unless they try to do freaky things with strings internally, which isn't really happened to me yet 23:18
although i have heard some crazy bug repots, like in Colloquy, an IRC client, if you put unicode in your name and join a channel it crashes colloquy in the current beta of the next version, so something weirds happening there 23:20
cj hurm... gedit didn't combine both chars with the c... oh, well... 23:21
23:23 dbrock left
diakopter rakudo: say "c\c[COMBINING ACUTE ACCENT]\c[COMBINING CARON]" 23:26
rakudo: say "C\c[COMBINING ACUTE ACCENT]\c[COMBINING CARON]"
p6eval rakudo 3867ff: c􏿽xCC􏿽x81􏿽xCC􏿽x8C􏿽xE2􏿽x90􏿽xA4
rakudo 3867ff: C􏿽xCC􏿽x81􏿽xCC􏿽x8C􏿽xE2􏿽x90􏿽xA4
ash_ woot, i got it working, but it working with the HOW object, but its not being forwarded from the instance objects 23:27
ie: Foo.HOW.bar works, but Foo^bar doesn't
diakopter cj: ^^
ash_ s/Foo^bar/Foo.^bar/ 23:28
sjohnson yo dia
cj diakopter: looks like it might look right on a terminal other than mine ;) 23:29
cj checks his gnome-terminal preferences
diakopter sjohnson: hi 23:31
TimToady moritz_: combining chars always come after in Unicode 23:32
23:38 mberends left
ash_ jnthn: i got it working for all of my primitive examples, i am going to look through S12 to see if it has any more tests i can run to make sure this is working 23:41
diakopter hum. I wonder what funky stickmen can be formed with all these combining chars
probably all kinds of scenes
ash_ so... Foo.^bar is sugar for Foo.HOW.bar(Foo); right? 23:47
so, what happens when you do Foo.bar; that calls the forwarder, correct? but won't bar still be expecting 1 param at least?
diakopter rakudo: say ".\c[COMBINING GREEK YPOGEGRAMMENI]" 23:48
p6eval rakudo 3867ff: .ͅ␤
ash_ well my changes didn't make rakudo fail any tests, hopefully i can find some new tests it passes 23:51
23:52 pmurias left