perl6-projects.org/ | nopaste: sial.org/pbot/perl6 | evalbot: 'perl6: say 3;' | irclog: irc.pugscode.org/ | UTF-8 is your friend!
Set by moritz_ on 4 May 2009.
00:02 clkao joined, hcchien joined 00:04 clkao left 00:07 clkao joined 00:10 clkao left
jnthn -> sleep, night all 00:10
00:12 clkao joined 00:17 clkao left, clkao joined 00:22 hcchien_ joined, hcchien left 00:35 amoc joined 00:40 c9s joined 00:54 agentzh joined 01:02 Whiteknight left 01:08 meppl joined 01:10 jaye joined, cdarroch left 01:14 kimtaro joined 01:36 bacek joined, jaye left 01:38 eternaleye joined 01:42 hcchien_ is now known as hcchien 01:52 japhb left 02:02 lichtkind_ left 02:38 meppl left 02:40 justatheory joined 02:53 justatheory left 02:57 japhb joined 03:05 hercynium left
s1n moritz_: i'm utterly shocked that someone read my blog 03:19
btw, i wasn't hating on p6 :)
03:20 donaldh left 03:21 donaldh joined 03:32 _REPLeffect joined 03:42 `alpha joined
`alpha hello 03:43
a little question:
will perl6 be faster than perl5 ?
03:44 orafu joined
eternaleye Hm, I just had an interesting insight. The comparative operators are specced as chain precedence, but Rakudo dispatches them to dyadic PIR subroutines. It there any way to write a variadic/slurpy sub in PIR? If so, that might be a way to make stuff like 5 < 3|8 < 4 DWIM (that is, be false), since the sub would autothread over all of the chained arguments, instead of doing it by pairs. 03:46
`alpha also this is rather funny that rakudo.org is running drupal 03:47
eternaleye `alpha: Perl 6 is a language specifications, rather than a single official interpreter like Perl 5 is. There are several implementations, the two most advanced being Rakudo (based on parrot, emphasis on regexes and sort-of emphasis on speed, based on Parrot, actively developed), and Pugs (emphasis on fun and neat ideas, written in haskell, currently unmaintained). Pugs is kinda slow ind somewhat outdated, Rakudo still has bottle 03:54
but is being improved. Also, the general consensus from several People Who Almost Definitely Know This Better Than Me is that the Perl 5 interpreter does some scary and crazy things with regard to parsing and execution, which may not be a good idea to carry out in any of the Perl 6 implementations.
s:2nd/based on [pP]arrot, //
... And I forgot the angle brackets on my self-correction. 03:55
`alpha uh ok 03:56
so that means no ?
or yes?
or dont know?
eternaleye `alpha: It means 'There will be more than one implementation, some of which may be faster, slower, or the same, with the faster ones likely making tradeoffs in other areas' 03:57
`alpha ok 03:58
04:05 justatheory joined, justatheory left 04:16 donaldh left, skids left, stepnem left, japhb left, amoc left, fridim left, kimtaro left, dalek left, aindilis left, simcop2387 left, frodwith left 04:17 kimtaro joined, dalek joined, aindilis joined, simcop2387 joined, frodwith joined, jhorwitz joined, cavelife^ joined, spx2 joined, pdc303 joined, dukeleto joined, silug joined, rewt joined, avar joined, allbery_b joined, donaldh joined, japhb joined, amoc joined, fridim joined, stepnem joined, PacoLinux joined, frew|work joined, estrabd_ joined, Helios joined, baest joined, r0bby joined, xinming joined, Khisanth joined, cj joined, PZt joined, [particle] joined, Aisling joined, Infinoid joined, rhr joined, ascent_ joined, ingy joined, gfldex joined 04:18 `alpha left 04:19 xinming_ joined 04:24 xinming left 05:01 frew left 05:30 jhuni joined 05:34 mberends joined, jan joined 05:35 jan is now known as Guest89223 06:05 amoc left 06:18 LadyLuna1y joined, LadyLunacy left 06:20 Maghnus joined 06:22 fridim left 06:23 Maghnus left 06:24 Maghnus joined 06:36 mberends left 06:37 wollmers joined 06:45 Maghnus left 06:47 iblechbot joined
pugs_svn r26797 | lwall++ | [t/spec] unspace.t had extra } 06:49
r26798 | lwall++ | [STD] parse =for paragraphs 06:51
r26798 | lwall++ | [STD] correctly recognize invocant marker after block+unspace
moritz_ jnthn: re env.t, feel free to remove it from spectest.data, or fix it for windows (if that works somehow) 06:53
TimToady: feel free to remove more evals in unspace.t, if you want to use them to test STD.pm 06:55
pugs_svn r26799 | lwall++ | [STD] degrade "can't augment" to a warning for now 06:57
r26800 | lwall++ | [t/spec] open_closed.t missing { 06:58
TimToady moritz_: actually more worried about macros and slangs at the moment, since there are a couple failing tests from those 07:01
in particular, though, ../../t/spec/S14-traits/basic.t is bogus, since the macro def can't go outside its block to change the parsing of "implements"
moritz_ maybe the multi needs to be exported? 07:02
TimToady well, but it's in the same file
we don't have a policy about in-file imports 07:03
moritz_ right
but that's a problem with the other tests too, no? 07:04
just not a syntax problem
because they reuse `is'
TimToady but the parser already knows about trait_auxiliary:<is>, so there's no problem 07:05
moritz_ that's what I meant with "just not a syntax problem" 07:07
but if you'd actually run the code, you wouldn't get a proper dispatch to multi trait_auxiliary:<is> 07:08
in the first test, for example
TimToady that's correct, it wouldn't be in the candidate list 07:09
07:16 DemoFreak joined 07:20 donaldh left, donaldh joined
TimToady zzz & 07:21
07:30 sri_kraih joined 07:43 ejs joined 07:51 payload joined 07:52 payload left 07:53 payload joined 07:56 payload1 joined, payload left 08:06 payload1 left
Matt-W Good morning 08:26
wollmers Matt-W: Guten Morgen 08:30
08:33 masak joined 08:35 H1N1[S] left 08:36 H1N1[S] joined 08:39 jferrero joined
masak ahoj, pumpkins. 08:41
lambdabot masak: You have 1 new message. '/msg lambdabot @messages' to read it.
masak @messages
lambdabot TimToady said 15h 58m 46s ago: no, 'augment' only requires MONKEY_PATCHING when you're modifying something global, and a sublanguage is by definition lexically scoped
masak aye. makes sense.
@clear 08:42
lambdabot Messages cleared.
08:42 H1N1[S] is now known as H1N1
pugs_svn r26801 | wollmers++ | [t/spec] added test 09:02
masak wollmers: in commit comments, it's often a good thing to say what test you added, and where. 09:04
09:04 H1N1[A] joined
jnthn H H 09:07
moritz_ good morning jnthn 09:08
masak salutations, jnthn.
jnthn wow, backlog was short today 09:10
moritz_ aye
but with an unsolved problem nonetheless 09:11
masak o rly?
masak backlogs
jnthn env.t on Windows
I'll take a look. 09:12
and see what I can do
moritz_ meant the problem with the trait_auxiliary subs not being exported 09:13
masak that must have been from yesterday.
moritz_ irclog.perlgeek.de/perl6/2009-05-12#i_1135510
(it's not a Rakudo problem right now)
but it will be once jnthn++ implements traits 09:14
09:14 payload joined
masak ok. 09:14
TimToady: for what it's worth, I like the 'OK $foo, &[==], $bar, "message";' syntax better than the ':ok<message>' syntax. I think testing mostly works already in Perl, so I prefer reforms rather than revolutions. 09:18
moritz_ agrees fully
rakudo: &[==]
p6eval rakudo feca3f: OUTPUTĀ«Syntax error at line 1, near "&[==]"ā¤ā¤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:86)ā¤Ā» 09:19
masak std: &[==]
p6eval std 26801: ( no output )
masak no output? is that good or bad?
moritz_ masak: care to submit as a TODO bug?
masak: it means that something's wrong on the server side 09:20
masak moritz_: TODO bug -- you got it.
moritz_ s/bug/(ticket|masak)/ :-)
masak aye, the (ticket|masak) meme.
moritz_ std: 1 09:21
p6eval std 26801: OUTPUTĀ«ok 00:02 35mā¤Ā»
09:21 H1N1 left
moritz_ std: [==] 09:21
masak for aeons to come, people will automatically ask "masak? wasn't that the ticket guy?"
p6eval std 26801: OUTPUTĀ«##### PARSE FAILED #####ā¤Unable to parse array composer; couldn't find final ']' at /tmp/ifwjhyWuvj line EOF:ā¤------> ā¤ expecting nounā¤FAILED 00:02 37mā¤Ā»
moritz_ std: [==] 1, 2
p6eval std 26801: OUTPUTĀ«ok 00:03 38mā¤Ā»
moritz_ std: &[==]
p6eval std 26801: OUTPUTĀ«ok 00:03 49mā¤Ā»
moritz_ masak: it was just temporary load on the server, or STD.pm rebuild or so
masak ack. 09:22
moritz_ sh: line 1: 1274 CPU time limit exceeded /usr/bin/perl tryfile ..
jnthn moritz_: I think I need more coffee before I understand the traits issue. :-) 09:23
pugs_svn r26802 | wollmers++ | [t/spec] added charcter and grapheme tests
09:23 Fuad joined, mberends joined
Fuad mberends:hello,my friend 09:24
Hello folks
masak bows elaborately
Fuad waves at masak
mberends Fuad, camel-butterflies: good morning one and all. 09:25
moritz_ jnthn: I can try to explain... traits are specified by multi subs, so 'my $x is foo' does a multi dispatch on trait_auxiliary:<is>. So that means that the multi that defines the new trait has to be in the candidate list at the point of the trait application
masak mberends: let me just implement the recursion thing, then I'll let go of the pumpkin, ok? :)
moritz_ jnthn: however in the test files, the multi only lives in the namespace of the role, and thus isn't part of the candidate list
mberends masak: :) go for it! having a go at S32-Temporal and time.t, fighting with infix: 09:26
masak sounds nice.
for anyone who's interested, I made a couple of significant updates to pun yesterday. it again has no known bugs. 09:27
mberends git-pulls pun
masak anyone who'd care to implement prefix .= would make me very happy. 09:28
oh, do we have a ticket for that, by the way?
I think we only discussed it during NPW...
09:30 explorer__ joined, explorer__ left
jnthn moritz_: I'd guess you'd have to write 'is export' on it; that said, I guess the next issue is "yeah but what imports it?" 09:30
09:30 jferrero left, jferrero joined
moritz_ jnthn: right 09:31
maybe we have to call role_name.IMPORT() or something?
jnthn Maybe that. 09:32
09:32 payload1 joined
mberends masak: the RAKUDO comments in perl6n and perl6p should be removed now that perl6x contains the refactored $*IN.eof 09:33
masak mberends: oh! right.
thanks.
mberends nit, nit
masak pushed. 09:34
mberends updated. make.log complains about a non-existent projects dir 09:36
masak that's been a problem with proto for over a month. 09:37
same for all projects.
mberends will look, a bit later
masak what's worse, proto doesn't pick it up as a build failure, but reports success.
mberends :( had that a few times, yes, it's related 09:38
we do not get child process status back from run()
masak correct. 09:39
mberends bash knows the status as $? afair, we could echo that into Yet Another Temp File 09:40
09:40 payload left
masak bleuch, but yes. 09:40
mberends bleuch indeed. Rakudo backtick would be so nice...
moritz_ they'd be spelled qx/.../ or qqx/.../ 09:41
mberends oh, that would not get status either :(
jnthn rakudo: class A { method m { say "hai" } }; class B is A { method m { say "oh "; nextsame() } }; my $x = B.new; my @c = $x.WALK(:name<m>); $x.@c();
p6eval rakudo feca3f: OUTPUTĀ«oh ā¤haiā¤Ā»
masak shouldn't run() return the status?
mberends moritz_: RAKUDO CAN HAZ QX//? W00T! 09:42
moritz_ mberends: I said that *would* be spelled...
mberends gasps
moritz_ mberends: which implies "if it were implemented"
there are no backticks in Perl 6
mberends gulps
masak writes evil code 09:43
I'm using a trick I call return-eval-sprintf-do-given.
makes for fairly compact code.
moritz_ (g++)++ # giving me index-out-of-bounds warnings at compile time 09:44
mberends moritz_, who is g? 09:45
@karma g
lambdabot g has a karma of 58
masak gotta love that g. 09:46
jnthn @karma c
lambdabot c has a karma of 1
masak c--
jnthn g is a much better letter than g.
masak c--
jnthn erm
than c
masak jnthn: they used to be the same letter.
moritz_ @karma g++
lambdabot g++ has a karma of 0
jnthn orly?
mberends @karma (g++)
lambdabot (g++) has a karma of 1
moritz_ g++++ 09:47
@karma g++
lambdabot g++ has a karma of 1
masak jnthn: en.wikipedia.org/wiki/C#History
jnthn: hence 'aleph, beth, gimel...'
jnthn Heh, wehn I said the "Classical Greek 09:48
Gamma"
I saw a Russian char before I read it was the Greek one. :)
masak oh, right.
jnthn: there is a certain similarity, yes. :)
jnthn erm, when it said...
masak: Also I'm used to seeing Russian much more than Greek. :-) 09:49
mberends @karma charlie
lambdabot charlie has a karma of 0
mberends @karma golf
lambdabot golf has a karma of 0
mberends slightly surprised 09:50
masak jnthn: me too.
but the Greek alphabet fascinates me.
it doesn't seem _that_ hard to learn.
jnthn Nah, probably not.
I found the Russian alphabet pretty easy to leanr. 09:51
mberends when you lose your way in Athens, you learn fast
masak that was certainly true for Venice.
jnthn The rest of the language is proving less easy though. :-)
09:52 Fuad left 09:54 payload1 left
masak mberends: this page about Kwalitee has a lot of similarities to how I imagine WTOP might work. cpants.perl.org/kwalitee.html 10:04
10:11 eternaleye left 10:12 eternaleye joined
mberends recalls kwalitee discussions by audreyt and others several years ago 10:12
10:12 spx2_ joined
mberends then along came Perl Best Practices and its policeman, Perl::Critic 10:13
mberends prefers perldoc perlstyle, particularly the last sentence. 10:15
masak :)
mberends programming under Devel::Cover and Perl::Critic felt almost like writing in Java :S 10:18
masak some people are drawn towards being bossed around.
there's a thin border between giving advice and making rules. 10:19
mberends submissive types don't frequent this channel, methinks
masak they might be lurkers here :)
mberends lurkers: hi 10:23
masak lunches 10:24
10:24 spx2 left 10:36 alexn_org joined 10:41 jhuni left
Matt-W I think this channel is generally full of people who like to argue their opinions 10:50
jnthn No it's not. 10:51
10:51 rjc_ joined
jnthn ;-) 10:51
sbp yes it is 10:52
Matt-W ...plus a few people who are just contrary for the sake of it
jnthn \o/
sbp cue Buttons 10:53
10:53 wollmers left
mberends I would contend that There Is More Than One Way To... 10:54
Matt-W argue about Perl 6? Of course
mberends cue John Cleese 10:56
11:01 rjc left 11:05 eternaleye left, eternaleye joined 11:08 bacek__ left 11:20 donaldh left, donaldh joined 11:21 jhorwitz left 11:33 meppl joined
jnthn -> die Nomplatz, bbiab 11:41
masak so, is there a platz actually called "die Nomplatz", or was that a metaphor of some kind?
11:42 kimtaro left
mberends hopes it's a German 'die', not an English one 11:42
masak the platz where nom goes to die...? 11:43
mberends jnthn, come back! it's a trap! 11:45
11:49 payload joined
masak std: "foo" ~~ /foo $/[0] $/ 11:50
p6eval std 26802: OUTPUTĀ«##### PARSE FAILED #####ā¤Syntax error (two terms in a row?) at /tmp/QsA5HOGXgj line 1:ā¤------> "foo" ~~ /foo $/[0] $/ā¤ expecting any of:ā¤ infix or meta-infixā¤ infix stopperā¤ standard stopperā¤ statement modifier loopā¤ terminatorā¤FAILED 00:04 36mā¤Ā»
masak is there any way to refer to $/ within a regex? 11:51
moritz_ std: "foo" ~~ m{ foo $/[0] } 11:52
p6eval std 26802: ( no output )
moritz_ of course you can use $0 in this case
std: "foo" ~~ m{ foo $/[0] }
p6eval std 26802: OUTPUTĀ«ok 00:04 38mā¤Ā»
masak I'm not 100% clear on why LTM doesn't solve this for me, making it possible to refer to $/ even within a /.../-style regex. 11:53
moritz_ masak: because the /^...$/ pattern is too common 11:54
masak: iirc TimToady actually hard-coded that somehow
masak moritz_: aye.
he discovered it when running STD on November.
11:59 rjc_ is now known as rjc, amoc joined
masak moritz_: but "because the /^...$/ pattern is too common" has nothing to do with the abstract workings of the LTM. 11:59
jnthn survived die Nomplatz. ;-) 12:00
(yes, it was an attempt at loldeutsch)
masak my question was more in the line of, if this wasn't special-cased, wouldn't the LTM allow me to refer to $/ without ambiguity?
jnthn std: "foo" ~~ /foo $/[0] / 12:01
p6eval std 26802: OUTPUTĀ«##### PARSE FAILED #####ā¤Can't understand next input--giving up at /tmp/754cBhmBzD line EOF:ā¤------> ā¤ expecting prefix or nounā¤FAILED 00:04 36mā¤Ā»
12:01 Lolwat joined
jnthn Hmm. 12:01
12:02 Lolwat is now known as NatureX 12:03 NatureX left
dalek kudo: b6c0eaf | jnthn++ | src/ (2 files):
A couple of minor fixes to get wrappers working a bit better. Wins us +20 tests we never passed before in wrap.t.
12:03
kudo: 0bfbc44 | jnthn++ | src/builtins/guts.pir:
Make sure we hand back return values when invoking with a candidate list.
pugs_svn r26803 | jnthn++ | [t/spec] Unfudge multiple wrapping tests, which we now pass. 12:04
r26804 | jnthn++ | [t/spec] Correct tests for $foo.@candidates, which made wrong assumptions about the deferal mechanism, and unfudge it. 12:06
r26805 | jnthn++ | [t/spec] Unfudge test for .signature on a sub that had been stored in an array, now that bug is fixed. 12:07
jnthn Well, that's 27 more passes at least... 12:08
12:08 _REPLeffect left
masak jnthn++ 12:09
dalek kudo: 1df5839 | jnthn++ | src/ (3 files):
Factor sub cloning stuff into a macro so we don't have to spread it everywhere; also added it to array stores, so @a = &foo will now work properly.
jnthn rakudo: sub foo() { return 42 }; my %h = a => &foo; say %h<a> 12:10
p6eval rakudo feca3f: OUTPUTĀ«fooā¤Ā»
moritz_ masak: you're right
masak moritz_: which particular case where I'm right are you referring to? :P 12:11
jnthn rakudo: my @foo; @foo>>.bar;
p6eval rakudo feca3f: OUTPUTĀ«Statement not terminated properly at line 1, near ">>.bar;"ā¤ā¤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:86)ā¤Ā»
jnthn std: my @foo; @foo>>.bar;
p6eval std 26805: OUTPUTĀ«ok 00:02 36mā¤Ā»
moritz_ masak: LTM and $/ 12:12
12:17 abra joined
pmichaud good morning, #perl6 12:17
jnthn morning pmichaud 12:18
std: my @foo; @foo>>>>.bar; 12:19
p6eval std 26805: OUTPUTĀ«ok 00:02 36mā¤Ā»
jnthn std: my @foo; @foo>>>>>>.bar; # oh rly? 12:20
p6eval std 26805: OUTPUTĀ«ok 00:02 36mā¤Ā»
12:21 abra left 12:22 abra joined 12:23 lichtkind joined 12:24 abra left 12:25 abra joined
moritz_ oh hai pmichaud 12:25
12:26 ejs1 joined
masak morn', pmichaud. 12:28
12:32 finanalyst joined
jnthn moritz_: On env.t 12:33
It appears to run OK not under the harness. 12:34
Under the harness we fail
ok 7 - Environment gets propagated to child.
ok 10 - Environment gets propagated to child.
12:35 ejs left 12:36 fridim joined
masak pmichaud, jnthn: I'm thinking of writing a Hague grant application. have two drafts and no real way to choose between them. would be interesting to get your feedback. gist.github.com/110397 12:38
moritz_ jnthn: my $command = qq!$*EXECUTABLE_NAME -e "\%*ENV.perl.say" $redir $tempfile!; 12:39
jnthn: can you check if $command is something that runs on windows?
jnthn moritz_: That's *exactly* the line I'm looking at.
moritz_: My current suspicion is that $*EXECUTABLE_NAME comes out different under the harness.
in t/harness we have 12:40
$ENV{'HARNESS_PERL'} = './perl6';
Do you know how that gets used?
Is there any way that $*EXECUTABLE_NAME could be ending up with ./perl6 in it?
If so, that'll be the problem... 12:41
moritz_ jnthn: just insert an $*ERR.say($command) and run it through the harness
pmichaud my guess is that Test::Harness is taking the "./perl6" and switching it to a backslash. 12:43
jnthn moritz_: This patch fixes it.
gist.github.com/110460
pmichaud Whereas Rakudo's run() function doesn't.
12:43 payload left, payload joined
jnthn pmichaud: Actually, it seems the problem is that Test::Harness was *not* switching it. :-) 12:43
Though arguably Rakudo (probably Parrot though) coulda fixed it too... 12:44
pmichaud Note Test::Harness, not t/harness
jnthn oh
t/harness
I patched t/harness
pmichaud if Test::Harness didn't switch it, then either (1) "./perl6" would be valid, or (2) the programs wouldn't run at all.
I'm fine with jnthn++'s patch 12:45
jnthn pmichaud: It's somehow managing to do (2), but end up putting ./perl6 as the name the program thinks it is run under.
pmichaud oh, wait.
jnthn Erm, it's managing to not fail (2)
pmichaud that's..... odd.
jnthn Yeah, I know.
moritz_ masak: there are teses for typed hashes in the test suite 12:46
masak moritz_: oh, ok.
fixing.
jnthn masak: reading
pmichaud masak: which set of features would you envision as being more immediately useful to people writing Perl 6 programs ?
masak pmichaud: good question. 12:47
moritz_ masak: I think your first proposal is more likely to be accepted (because it's actual implementation, not "just" tests)
pmichaud Whichever that is, that's the one we should prioritize first.
masak the Set/Bag/etc thing has a lot of potential, but hard to say what exactly. Buf would be immediately useful in Web.pm.
moritz_ masak: and IMHO in the first one you should also mention the relation and conversion between Buf and Str 12:48
masak the S09 stuff could easily attract people to Perl 6 by its relative coolness.
moritz_ ie decoding a Buf becomes a Str, and the ohter way round
masak moritz_: indeed. I'll add that.
moritz_ things like sized arrays mostly give you speed benefit
but whoever wants speed now won't pick rakudo. 12:49
masak moritz_: I also agree that the second one is more difficult to sell. I didn't add implementation, because I didn't want to take work away from jnthn :)
jnthn masak: Take it! Take it!
masak :)
pmichaud at least for Rakudo, the second one is significantly more difficult to implement, I think.
masak aye.
the former one is relatively easy work.
ok, that settles it.
jnthn masak: Having read through S09, there's a lot more than "reasonably complicated syntactic sugar" going on there too. :-) 12:50
masak I'll flesh out the first one, and maybe come back to the second one if no-one beats me to it.
jnthn: aye, that might have been an unfortunate way of putting it... :)
jnthn masak: I'd say your first proposal looks like a more realistic and sensible one.
masak but to me most of S09 actually seems like sugar, in a very wide sense. 12:51
masak goes with the first one
moritz_, jnthn, pmichaud: thanks for your feedback. it was just what I needed.
jnthn masak: Some of S09 basically will be, but there's a lot of really hard stuff in there too.
masak indubitably. 12:52
12:52 wollmers joined
pmichaud compact structs and adverb-adorned indexes come to mind as being challenging. 12:52
masak even the 1..* slice problem is hard :)
pmichaud as will native sized types 12:53
jnthn masak: It's interesting you mention the Java collection types. I remember playing with some of those years ago and quite liking having a Set-ish type available.
compact structs will be really hard.
masak rakudo: my @a = <0 1 2 3>; say @a[1..*].perl
p6eval rakudo 1df583: OUTPUTĀ«["1", "2", "3", undef]ā¤Ā»
jnthn masak: Ah, I think we know how to fix that one. :-)
pmichaud did we ever nail that down, precisely? 12:54
masak jnthn: I really like the Java collections, especially after reading that tutorial.
pmichaud anyway, yes, we have good ideas about how to deal with the 1..* ranges.
masak not saying Perl should mimic Java in any big way, just that there are neat ideas in there.
jnthn pmichaud: IIRC, 1..* goes to multi infix:<..>(Int $start, Whatever) { ... }
And constructs a range object.
That is, it does _not_ generate a closure { 1..$_ } 12:55
Which is what *-1 does.
pmichaud jnthn: I was thinking of the 1..(*-1) case
jnthn pmichaud: Oh, that one is harder. 12:56
pmichaud :-)
aha! I know how we can finish Perl 6! Let's just skip the "harder" cases! :-P
jnthn pmichaud: I think this ended with TimToady pondering that we may need a different type for Whatever-Closures.
pmichaud jnthn: right. Which worries me just a bit, because often when things are left with TimToady ponderances, we come back with complete refactors of what has already been done. :-)
jnthn True. :-| 12:57
It is the downside of finding edge cases.
12:57 jferrero left
pmichaud Today I feel like working on operator overloading. 12:58
Matt-W Wooooooooo
jnthn Yay!!! :-D
moritz_ a worthy goal.
pmichaud or at least defining Rakudo operators in Perl 6.
Matt-W likes operator overloading
jnthn pmichaud: BTW, we now pass all of wrap.t (including the annoying closure-y tests we failed before) apart from the bits that relate to temp.
masak dang, I never got far enough to faking them. :P
pmichaud jnthn: \o/ 12:59
Matt-W jnthn++
moritz_ deal: you give me custom operator and lazy lists, and I'll implement infix:<...>, the coolest Perl 6 operator ever :-)
afk&
pmichaud I still need to fix @_ and %_.... but I think I'll do operators first (slightly more -Ofun)
jnthn Yes, do. :-)
I'm procrastinating the p6object refactor too.
pmichaud I'm fine with procrastinating p6object for as long as you want :-) 13:00
jnthn By doing parallel dispatch...
Matt-W That is slightly disturbing
jnthn pmichaud: OK, but I either do it, or need another hack in Rakudo.
13:00 ruoso joined
jnthn pmichaud: Where said hack involves a dynop that v-table-swaps every object we create. 13:00
...so I might just do the refactor. :-) 13:01
ruoso HellO! 13:02
lichtkind ruoso: moin
masak moritz_: I might regret asking, but what does infix:<...>, the coolest Perl 6 operator ever, do? 13:05
dalek kudo: 7cc0b68 | jnthn++ | src/parser/grammar.pg:
Parse @foo>>.bar in a pretty STD.pm-ish kinda way.
13:07
kudo: 85e5b9c | jnthn++ | t/harness:
Twiddle the test harness patch to perl6 on Win32 so env.t works under the harness. I'm still a little bewildered how we ever managed to run any tests...
kudo: 7d6bc0a | pmichaud++ | docs/spectest-progress.csv:
spectest-progress.csv update: 387 files, 11187 passing, 0 failing
13:25
13:47 skids joined 13:48 exodist joined 13:51 alester joined 13:54 iblechbot left, amoc left
masak frew|work: I can't help thinking that the Dallas.p6m are more on-topic on p6u than on p6l... I'm not bothered though, just pointing it out. 14:00
s/p6m/p6m announcements/
14:01 mizioumt joined 14:03 nihiliad joined 14:10 drbean left
moritz_ masak: it constructs lists accordiing to closures (or magic) 14:11
14:11 alexn_org left
moritz_ masak: 1, 1 ... { $^a + $^b} # fibonacci numbers 14:12
masak oh, right.
jnthn scary :-)
jnthn looks forward to operator overloading 14:13
masak too
I've promised to make a set operations module for Rakudo when that happens. 14:15
jnthn :-)
frew|work masak: p6u? 14:17
ah
users
got it
I didn't even know there was such a thing 14:18
masak frew|work: the p6l is mostly for language discussion.
frew|work yeah, I understand
someone did complain, so I removed p6l from the list
14:18 LadyLunacy joined, payload left
frew|work what we need to do is set up the actual web space (dallas.p6m.org) but we haven't had the chance 14:19
masak frew|work: great work with getting the p6m going, by the way. it'll be fun to follow the fruits of that group.
frew|work it's been fun
14:20 drbean joined
masak frew|work: get people to publish the things they write, so we can look at them, and add them to the growing list of projects! 14:20
frew|work definitely
most of the people who came last time didn't know hardly anything about p6
masak I understand.
sometimes I feel that way, too. :)
frew|work but yeah, I'm sure that as things progress we'll do our best to publish stuff
jnthn What, you mean if I attend I'll get to understand Perl 6? 14:21
:-)
frew|work s1n's working on something, but he doesn't really want to announce it yet it seems
jnthn: I didn't say we'd make you understand it; just that most people don't :-) 14:22
masak frew|work: a module that confuses subs with methods, perhaps? :)
frew|work hahaha
jnthn harsh!
:-)
masak hm, that was a bit mean. I don't wish to be mean. ;)
sorry, s1n. :) 14:23
frew|work I can see where he's coming from with that argument
masak me too.
moritz_ that reminds me, I wanted to write a blog post about the differences between subs and methods
frew|work it makes sense for a java dev; but to me, a p5 dev, I'm glad to have the differentiation
btw are any of you in the iron man list? because if not and you already blog you might as well join 14:24
14:24 payload joined, meppl left
frew|work (www.shadowcat.co.uk/blog/matt-s-trout/iron-man/) 14:24
masak is on the list
moritz_ frew|work: I tried, but they took my RSS feed out because it had no dates in it; then I implemented dates in the RSS feed, and mst stopped responding to my mails 14:25
masak moritz_: did your mails have dates in them? :)
moritz_ masak: I think so :-)
frew|work haha, weird 14:26
he is in Perl/#dbix-class all day
14:26 LadyLuna1y left
frew|work so if you really want to talk to him he won't ignore you there 14:26
masak he's on #catalyst all day as well. 14:27
frew|work is glad he can use IRC at work
jnthn aw, ffs, why won't the unicode version of the parallel dispatch op parse... 14:31
Matt-W Hmm blogging about Perl 6, eh
I should do that again
frew|work the more people to do it the better really
we need more....perlvangelists?
masak indeed.
14:31 ejs1 left
Matt-W Well I do evangelism at work 14:31
for Perl 5 and Perl 6
but that's only one office 14:32
14:32 ruoso left
jnthn rakudo: token sigh { 'Ā»' }; say ('$fooĀ».bar' ~~ /<sigh>/) 14:34
p6eval rakudo 7d6bc0: OUTPUTĀ«Ā»ā¤Ā»
jnthn hmm
rakudo: token sigh { 'Ā»' | '>>' }; say ('$fooĀ».bar' ~~ /<sigh>/)
p6eval rakudo 7d6bc0: OUTPUTĀ«Ā»ā¤Ā»
jnthn :-S 14:35
masak looks fine to me.
jnthn yeah, until I do the same in grammar.pg...
masak :-S
jnthn oh
I think my editor screwed up my copy-paste of it from S12. 14:36
14:36 kimtaro joined
masak wisely suppresses snarky comments that might start an editor war 14:36
jnthn ah, yes
masak: Oh, it's visual studio, bring it on! 14:37
masak jnthn: nah. too easy. :P
jnthn I mean, uh, uh, it was emacs!
;-)
masak jnthn: now you're just making stuff up. :)
frew|work well, I think for p6 evangelism should be to people who care
jnthn yeah (really (really really (I am)))
frew|work not at work
14:45 rjc left
mberends t/spec/S32-Temporal/time.t tests a times() function, presumably Pugs has it, but Rakudo doesn't, and S32-Temporal doesn't spec it. Fudge, Skip or Delete times() test? 14:47
moritz_ mberends: delete. 14:49
mberends :) thanks moritz_
14:55 [particle]1 joined, [particle]1 is now known as [particle]- 14:56 jferrero joined 15:07 nbrown_ joined 15:09 eternaleye left 15:11 ejs joined 15:13 [1]nbrown joined 15:16 pmurias joined 15:17 kimtaro left
pugs_svn r26806 | jnthn++ | [t/spec] Unfudge some parallel dispatch tests in S03-operators/hyper.t and remove a stray :todo. 15:17
15:18 nihiliad left
pugs_svn r26807 | jnthn++ | [t/spec] Fix up syntax (wrong type of indirect dispatch) in parallel-dispatch.t and fudge it for Rakudo. 15:18
15:20 donaldh left
moritz_ jnthn: sorry about those, I had my mind elsewhere it seems 15:20
dalek kudo: ee9d917 | jnthn++ | src/parser/grammar.pg:
Fix parsing of parallel dispatch unicode form.
kudo: 65102d2 | jnthn++ | src/ (2 files):
Implement parallel dispatch (>>. and unicode variant). Handles most cases.
15:20 iblechbot joined
jnthn moritz_: No worries, wasn't a big deal. :-) 15:20
15:20 donaldh joined
jnthn Thanks for writing the tests! 15:20
We pass all but six. 15:21
2 are for reasons unreated to parallel dispatch.
moritz_ is grammar.pg actually latin-1? 15:22
jnthn moritz_: I ain't sure...
moritz_: I just did what worked. :-) 15:23
15:23 nbrown left, [1]nbrown is now known as nbrown
jnthn I think it's meant to be UTF-8... 15:23
dalek kudo: f3d2dab | jnthn++ | t/spectest.data:
Add S12-methods/parallel-dispatch.t to spectest.data.
15:26
kudo: b670f01 | jnthn++ | t/spectest.data:
Add missing #icu to various tests that now need it.
15:26 nbrown_ left
pmurias jnthn: i don't think latin-1 should be used in the test suit except when explicitly testing latin-1 decoding/encoding 15:29
lambdabot pmurias: You have 1 new message. '/msg lambdabot @messages' to read it.
moritz_ pmurias: the changes were in rakudo, not in the test suite 15:30
15:30 M_o_C joined
moritz_ 0xc2 0xab -> 0xbb 15:30
that looks very much like UTF-8 -> Latin1 to me
jnthn moritz_: I think it's consistent with what's elsewhere in grammar.pg - or at least, what works. 15:31
moritz_ rakudo: say chr(:16('bb'))
p6eval rakudo 7d6bc0: OUTPUTĀ«Ā»ā¤Ā»
moritz_ jnthn: I don't mind, I was just surprised
15:31 mhsparks joined
jnthn moritz_: I didn't know either way, tbh. 15:31
boo, >>.= doesn't work. 15:32
moritz_ rakudo: say <a bc defg>>>.chars
p6eval rakudo 7d6bc0: OUTPUTĀ«9ā¤Ā» 15:33
moritz_ rakudo: say (<a bc defg>)>>.chars
p6eval rakudo 7d6bc0: OUTPUTĀ«9ā¤Ā»
moritz_ rakudo: say (<a bc defg>)>>.chars.perl
p6eval rakudo 7d6bc0: OUTPUTĀ«9ā¤Ā»
jnthn > say <a bc defg>>>.chars
moritz_ ERAKUDOTOOOLD
jnthn 124
lambdabot Not in scope: `say'Not in scope: `bc'Not in scope: `defg'Not in scope: `>>>...
jnthn Yeah 15:34
moritz_ rakudo: say (<a bc defg>)>>.chars.perl 15:37
p6eval rakudo b670f0: OUTPUTĀ«[1, 2, 4]ā¤Ā» 15:38
moritz_ it's so nice to be root :-)
jnthn Also locally now 15:39
> $_ = -1; .=abs; .say;
1
lambdabot <no location info>: parse error on input `$'
jnthn I think somebody even asked for that recently...
moritz_ masak++ did
jnthn masak++ may be happy then :-)
moritz_ rakudo: my @a = <b a c>; say @a.=sort; 15:40
jnthn rakudo: my @a = { say 1 }, { say 2 }; @a>>.();
p6eval rakudo b670f0: OUTPUTĀ«abcā¤Ā»
rakudo b670f0: ( no output )
masak is that .= I see? 15:41
\o/
moritz_ bug!
jnthn masak: No
masak oh. :/
jnthn masak: well yes, but nothing new
rakudo: $_ = -1; .=abs; .say; # is what you wanted, no?
p6eval rakudo b670f0: OUTPUTĀ«Syntax error at line 1, near ".=abs; .sa"ā¤ā¤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:86)ā¤Ā»
masak yes...
jnthn yes, that works locally now.
spectesting.
Also @a>>.=abs for example works. 15:42
masak \o/
jnthn my @a = [1,2,3],[4,5,6]; say (@a>>.[1]).perl
rakudo: my @a = [1,2,3],[4,5,6]; say (@a>>.[1]).perl
p6eval rakudo b670f0: OUTPUTĀ«Unimplemented or invalid use of parallel dispatch at line 1, near ").perl"ā¤ā¤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:86)ā¤Ā»
jnthn Guessed so. 15:43
moritz_ rakudo: say <a b c>>>.+uc.perl 15:45
p6eval rakudo b670f0: OUTPUTĀ«["A", "A", "A", "B", "B", "B", "C", "C", "C"]ā¤Ā»
moritz_ should that flatten?
I don't think so 15:46
15:46 Psyche^ joined
moritz_ oh, and why do we have two matching 'uc' multis? 15:46
jnthn moritz_: No, I don't think it should.
moritz_ rakudo: say <a b c>>>.+ucfirst.perl
p6eval rakudo b670f0: OUTPUTĀ«["A", "A", "A", "B", "B", "B", "C", "C", "C"]ā¤Ā»
moritz_ rakudo: say <a b c>>>.+chars.perl
jnthn moritz_: Which is why the tests relating to that are still fudged in parallel-dispatch.t. :_)
p6eval rakudo b670f0: OUTPUTĀ«[1, 1, 1, 1, 1, 1, 1, 1, 1]ā¤Ā»
moritz_ jnthn: ah.
15:47 Psyche^ is now known as Patterner
jnthn Huh? Why are we calling so many methods... 15:47
rakudo: 'a'.WALK(:name<chars>).perl.say
p6eval rakudo b670f0: OUTPUTĀ«Null PMC access in find_method()ā¤current instr.: 'parrot;P6metaclass;parents' pc 251324 (src/gen_actions.pir:0)ā¤Ā»
jnthn rakudo: 'a'.WALK(:name<chars>)
p6eval rakudo b670f0: OUTPUTĀ«Null PMC access in find_method()ā¤current instr.: 'parrot;P6metaclass;parents' pc 251324 (src/gen_actions.pir:0)ā¤Ā»
moritz_ is it .WALK or .^WALK?
jnthn rakudo: 42.WALK(:name<chars>) 15:48
p6eval rakudo b670f0: ( no output )
moritz_ afk
jnthn rakudo: 42.WALK(:name<abs>).perl.say
moritz_: .WALK.
p6eval rakudo b670f0: OUTPUTĀ«invoke() not implemented in class 'ResizablePMCArray'ā¤current instr.: 'parrot;P6metaclass;dispatch' pc 251618 (src/gen_actions.pir:23173)ā¤Ā»
jnthn According to S12
masak mberends: gist.github.com/110547 # look ma, recursive dependencies
jnthn masak: nice! 15:49
15:49 mikehh left 15:50 mikehh joined
masak jnthn: proto is getting pretty decent. :) 15:51
jnthn masak: Working up to another nobel prize? :-)
masak I keep telling you folks, that prize was due to an unfortunate misunderstanding! 15:52
jnthn Well, there could always be another one.
;-)
masak hm, Economy perhaps... 15:53
15:54 mncharity joined 15:55 mikehh left
mncharity rakudo: sub postfix:<km> ($n) {3}; say 4 km; 15:55
p6eval rakudo b670f0: OUTPUTĀ«Malformed routine definition at line 1, near "postfix:<k"ā¤ā¤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:86)ā¤Ā»
15:55 mikehh joined
mncharity sub postfix:km ($n) {3}; say 4 km; 15:56
jnthn std: sub postfix:km ($n) {3}; say 4 km;
TimToady std: sub postfix:<km> ($n) {3}; say 4\km
p6eval std 26807: OUTPUTĀ«##### PARSE FAILED #####ā¤Syntax error (two terms in a row?) at /tmp/OSwupQmts1 line 1:ā¤------> sub postfix:km ($n) {3}; say 4 km;ā¤ expecting any of:ā¤ infix or meta-infixā¤ infix stopperā¤ standard stopperā¤ statement modifier loopā¤ terminatorā¤FAILED
..00:02 37mā¤Ā»
std 26807: OUTPUTĀ«ok 00:03 44mā¤Ā»
jnthn :-)
TimToady absolute rule, postfixes may not have whitespace without \
std: sub postfix:<km> ($n) {3}; say 4\ km 15:57
p6eval std 26807: OUTPUTĀ«ok 00:03 44mā¤Ā»
masak ok, heading home. there'll be a November hackathon tonight. see y'all then.
TimToady rakudo: say 1\i
p6eval rakudo b670f0: OUTPUTĀ«Statement not terminated properly at line 1, near "\\i"ā¤ā¤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:86)ā¤Ā»
15:57 masak left
TimToady rakudo: say 1\ i 15:57
p6eval rakudo b670f0: OUTPUTĀ«0+1iā¤Ā»
TimToady okay, rakudo doesn't allow \-only yet
jnthn rakudo: say 1i
p6eval rakudo b670f0: OUTPUTĀ«0+1iā¤Ā»
TimToady yes, but $xi doesn't work 15:58
15:58 justatheory joined
TimToady std: $x\i 15:58
p6eval std 26807: OUTPUTĀ«Potential difficulties:ā¤ Variable $x is not predeclared at /tmp/DG6NBBPxLV line 1:ā¤------> $x\iā¤ok 00:02 36mā¤Ā»
jnthn TimToady: Oooh, I was in the bit of the grammar that might need tweaking for Rakudo to handle that not long ago...
TimToady at the same time we decided that $x.i was just a method call, not postfix:<i> 15:59
jnthn *nod*
rakudo: 1.i
p6eval rakudo b670f0: OUTPUTĀ«Method 'i' not found for invocant of class 'Int'ā¤current instr.: 'parrot;P6metaclass;dispatch' pc 251808 (src/gen_actions.pir:0)ā¤Ā»
jnthn Yay. :-)
TimToady rakudo: 1.1.i
p6eval rakudo b670f0: OUTPUTĀ«Method 'i' not found for invocant of class 'Num'ā¤current instr.: 'parrot;P6metaclass;dispatch' pc 251808 (src/gen_actions.pir:0)ā¤Ā»
TimToady rakudo: 1.1.1.i # :) 16:00
p6eval rakudo b670f0: OUTPUTĀ«Statement not terminated properly at line 1, near ".1.i # :)"ā¤ā¤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:86)ā¤Ā»
mncharity re absolute rule, any idea how much breaks if a module tweaks the grammar to permit a space? "3 km" is SI, "3\km" not so much.
TimToady std: 1.1.1.i # :)
jnthn std: 1.1.1.i
p6eval std 26807: OUTPUTĀ«##### PARSE FAILED #####ā¤Number contains two decimal points (missing 'v' for version number?) at /tmp/A1lSldHkIG line 1:ā¤------> 1.1.1.i # :)ā¤FAILED 00:02 35mā¤Ā»
std 26807: OUTPUTĀ«##### PARSE FAILED #####ā¤Number contains two decimal points (missing 'v' for version number?) at /tmp/syclKJd3wj line 1:ā¤------> 1.1.1.iā¤FAILED 00:02 35mā¤Ā»
TimToady there you go :)
jnthn std is such a show-off in the errors department. :-) 16:01
mncharity lol
TimToady :D
16:01 xinming_ is now known as xinming 16:02 ruoso joined
TimToady but that absolute rule is based on the absolute rule that Perl 6 always knows whether it's expecting a term or an infix, and there is ambiguity betwen prefixes and postfixes there 16:03
16:03 _mg_ joined
ruoso back from lunch 16:03
TimToady (if you allow space before postfix)
it's very important to extensibility and error reporting 16:04
16:04 finanalyst left
TimToady it's the way in which the Perl 6 syntax is "self clocking" 16:04
like a good barcode
it's like there's a parity check built right into the syntax 16:05
postfixes have to be affixed, not wandering :) 16:06
(we're not so picky about prefixes, admittedly) 16:07
jnthn un doubtably.
std: sub prefix:<un>($what) { }; un $dead; 16:08
p6eval std 26807: OUTPUTĀ«Potential difficulties:ā¤ Variable $dead is not predeclared at /tmp/sE01VKpLHp line 1:ā¤------> sub prefix:<un>($what) { }; un $dead;ā¤ok 00:03 41mā¤Ā»
ruoso std: sub prefix:<un>($what) { }; sub un { }; un $dead; 16:09
p6eval std 26807: OUTPUTĀ«Potential difficulties:ā¤ Variable $dead is not predeclared at /tmp/EcXJKiSSOQ line 1:ā¤------> ix:<un>($what) { }; sub un { }; un $dead;ā¤ok 00:03 41mā¤Ā»
ruoso std: sub un { }; un $dead; 16:11
16:11 justatheory left
p6eval std 26807: OUTPUTĀ«Potential difficulties:ā¤ Variable $dead is not predeclared at /tmp/nmppEfp2tK line 1:ā¤------> sub un { }; un $dead;ā¤ok 00:02 36mā¤Ā» 16:11
ruoso TimToady, I guess there should be some checking to avoid declaring a sub name that would clash with a prefix...
mncharity re postfix, ok, thanks. i'll wait for grammar mod'ing, then get back to doing SI. 16:12
rakudo: sub postfix:<ā“> ($n){3}; say 2ā“; 16:18
p6eval rakudo b670f0: OUTPUTĀ«Malformed routine definition at line 1, near "postfix:<\u2074"ā¤ā¤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:86)ā¤Ā»
mncharity std: sub postfix:<ā“> ($n){3}; say 2ā“; 16:19
p6eval std 26807: OUTPUTĀ«ok 00:03 43mā¤Ā»
mncharity rakudo: sub infix:<āˆ™> ($a,$b) {3}; sub m (){4}; sub s (){5}; say māˆ™s; 16:20
p6eval rakudo b670f0: OUTPUTĀ«Malformed routine definition at line 1, near "infix:<\u2219> "ā¤ā¤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:86)ā¤Ā»
jnthn mncharity: Operator overloading is still being implemented in Rakudo. 16:21
mncharity overloading?
16:21 abra left
jnthn well, overloading/defining a new operator...it's similar enough. 16:21
mncharity ah, ok. thanks 16:22
jnthn Just that one already has an entry in the tokenizer and the other doesn't. :-)
But either way it's a new multi candidate.
mncharity well, not with sub, but nod.
jnthn Ah, yes, true. 16:23
mncharity delights to look forward to. :)
jnthn std: sub postfix:< km>($n) { }; 4 km;
p6eval std 26807: OUTPUTĀ«ok 00:03 43mā¤Ā» 16:24
jnthn LOL!!
TimToady gah
mncharity lol :)
jnthn Well, that's one way to do it. :-)
mncharity it works! :)
16:24 payload left
moritz_ amused 16:25
mncharity rakudo: macro foo () returns Str {"3"}; say foo;
p6eval rakudo b670f0: OUTPUTĀ«Statement not terminated properly at line 1, near "returns St"ā¤ā¤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:86)ā¤Ā»
moritz_ no macros in rakudo.
mncharity ah, ok. thanks
TimToady okay, it's because the add_macro cheater method turns < km> into qr/ km/ 16:27
well, qr< km> actually
jnthn TimToady: Awww...you mean you're going to break^Wfix it? 16:28
;-)
TimToady actually, just q< km>
you bet I am
it's antithetical to the spirit of <...> 16:29
moritz_ at the very least it shoould be something like macro postfix:sym<km> is parsed { \s+ <sym } ...
TimToady I'd do \s? <sym> myself 16:30
as long as I was cheating that badly
moritz_ ok ;-)
mncharity re macro postfix:sym<km> is parsed, ah, nifty. 16:35
TimToady of course, nobody implements that yet :) 16:36
mncharity not sure how STD will implement that, but nm
nod
TimToady thinking about macros for STD, but really need to convert gimme5 to viv first so I can compile bits of code back to perl 5 more easily 16:37
moritz_ is STD.pm purely recursively descending? or does it also use an optable parser (like rakudo/PGE)? 16:38
pmichaud moritz_: EXPR is STD.pm's optable parser 16:39
moritz_ pmichaud: ah, thought so (but wasn't sure)
16:39 moritz_ sets mode: +o pmichaud, moritz_ sets mode: +o mncharity 16:41 gbacon joined 16:44 jferrero left
pmichaud grammar.pg really ought to be utf8, not latin-1. Fixing. 16:45
pugs_svn r26808 | jnthn++ | [t/spec] Test parallel dispatch to privates and mutating parallel dispatch. 16:48
jnthn pmichaud: ooh, I just pushed to it...
pmichaud: So you'll probably need to grab latest.
pmichaud now grabbed latest. I'm getting a build error. 16:49
(so trying again without local changes)
jnthn can haz info?
ah, ok
I thought you meant straight from the repo. 16:50
moritz_ git-stash ftw
jnthn yeah
I use that quite a bit. :-)
moritz_ (for trying a clean checkout if you haven't committed yet)
pmichaud what's a good test file for the Ā». syntax?
jnthn But I hate to imagine by now what's sat in my stash.
pmichaud: S12-methods/parallel-dispatch.t
pmichaud okay, thanks.
jnthn Erm, it's got a few fudges in it. 16:51
So the .rakudo
pmichaud oh, I just do "make t/spec/S12-methods/parallel-dispatch.t"
which handles any fudging needed.
jnthn lucky you
not on Windows it doesn't!
't\spec\S12-methods\parallel-dispatch.t' is up-to-date 16:52
dalek kudo: 89539a9 | jnthn++ | src/ (3 files):
Implement parsing of $foo.=bar to work as STD.pm does, rather than falling back to infix:<.=> as we did before. This means that .=foo alone is now a mutating call on $_ and also that >>.= now works.
pmichaud on windows, perhaps: make t\spec\S12-methods\parallel-dispatch.t ?
jnthn ok, I did that.
(assumed I'd need to)
never tried it without that actually...
moritz_ # Run a single test
t/*.t t/*/*.t t/*/*/*.t: all Test.pir
jnthn No, same issue with forward slashes too. 16:53
moritz_ maybe all those / need to be replaced with \ on windows?
16:53 mizioumt1 joined
jnthn moritz_: maybe 16:53
pmichaud they aren't already?
I thought the makefile generation replaced / with \
moritz_ dunno, I can't test it
jnthn moritz_: oh, they are
t\\*.t t\\*\\*.t t\\*\\*\\*.t: all Test.pir @$(HARNESS_WITH_FUDGE) --verbosity=1 $@ 16:54
16:54 PewPew joined
pmichaud oops! 16:54
moritz_ is double backslashes right?
pmichaud I bet those need to be single slashes.
16:54 PewPew left
pmichaud $otherfix FAIL 16:54
$maketext =~ s{\\\*}{\\\\*}g;
jnthn pmichaud: Just tried makign them single in the makefile 16:55
and it doesn't help either.
pmichaud okay, possibly not worth worrying about then.
jnthn no, it's not bothered me so far.
masak can haz .=foo now :-)
Now, does we have any tests...
moritz_ not really :( 16:56
ack '\s\.=\w' t/spec/
finds one in a test description :/
jnthn moritz_: Is S03-operators\inplace.t a sensible place?
I can add one.
moritz_ jnthn: it is indeed
16:56 alester left 16:57 alester joined
moritz_ I can simplify some of tests in there 16:57
and add it to spectest.data
jnthn oh, it's not in spectest.data? 16:58
it's fudged...
moritz_ that doesn't mean we run it ;-)
jnthn heh, you're right too!
oh, and it has parse errors... 16:59
16:59 mhsparks left
jnthn moritz_: I'll ci a test and leave the rest for you. :-) 16:59
moritz_ jnthn: ok.
pugs_svn r26809 | jnthn++ | [t/spec] Test for .= on $_. 17:00
jnthn Thanks. moritz++ :-)
rakudo: class A { method m { 1 } }; class B is A { method m { 2 } }; B.new.*m.perl.say 17:01
p6eval rakudo b670f0: OUTPUTĀ«[2, 1]ā¤Ā»
jnthn rakudo: class A { method m { 1 } }; class B is A { method m { 2 } }; B.new.*m.WHAT.say
p6eval rakudo b670f0: OUTPUTĀ«List()ā¤Ā»
jnthn Is List correct or should it be Array?
moritz_ it says "List" in the spec 17:02
jnthn ah, yes, I misseed that
OK
moritz_ (at least it did when last I looked ;-)
jnthn So when we do >>.* for example we need to .Scalar what comes back from .+ perhaps. 17:03
Yeah, it does say list...just found it.
erm, from .*
moritz_ sounds sensible
17:03 payload joined
jnthn At the moment it's flattening into the results which isn't what's meant to happen, as far as I can see (and as far as what the tests want). 17:03
pmichaud Oh, ick! 17:04
jnthn pmichaud: ick? 17:05
mberends jnthn: re: Windows directory separator, Microsoft insists that '/' is equivalent to '\' nowadays, so some of the worrying above is unnecessary. I cannot prove that, but you could give it a try and perhaps save lots of hassle.
17:06 araujo joined
jnthn mberends: I think it's not just about / and \, I played with that a bit. 17:06
pmichaud switching the file to utf8 encoding is messing up all of the infix:Ā«>Ā» etc. definitions
jnthn :-(
pugs_svn r26810 | moritz++ | [t/spec] some inplace.t hacking/fudging 17:08
pmichaud oh my
okay, I'm a bit confused.
src/parser/grammar.pg is latin-1 (after jnthn++'s latest changes). src/parser/grammar-oper.pg is utf8. 17:09
how in the world could that have even worked!??!
(since those two files are compiled as a set)
moritz_ ugh.
TimToady in fact, .* should probably even be lazy
moritz_ TimToady: should it return a list of lists, or a list of captures? 17:10
currently the former is specced
TimToady list of capture, I'd think
they're just ordinary returns, only more of 'em
and in the absence of a return declaration return always returns Capture 17:11
moritz_ jnthn: I'm a bit confused... $f .= uc parses, $b .= WHAT doesn't
17:11 rocket_guatemala joined
pmichaud WHAT isn't a method. 17:11
pugs_svn r26811 | rocket++ | Added more smartlinks. 17:12
moritz_ rakudo: class A { method WHAT { "foo" } }; A.new.WHAT.say
p6eval rakudo 89539a: OUTPUTĀ«fooā¤Ā»
moritz_ pmichaud: that looks very much like a method to me, at least in Rakudo
pmichaud that's a rakudobug.
yes, the parse also shows a discrepancy there.
17:13 spooneybarger joined
pugs_svn r26812 | moritz++ | [t/spec] further inplace.t improvements 17:13
pmichaud I suspect that .= is being misparsed. 17:14
moritz_ anyway, if you look at inplace.t, the first block of tests is also skipped
because it doesn't parse right
17:14 spooneybarger left
jnthn moritz_: Hmm. I'm getting the right thing back from @aĀ».+mul(2) 17:14
pmichaud proto infix:<.=> is equiv(infix:<:=>) { ... }
jnthn moritz_: But then the .map({ .sort }) is flattening it.
pmichaud needs to be removed.
jnthn pmichaud: From? 17:15
pmichaud oh wait, no.
17:15 mizioumt left
moritz_ jnthn: feel free to change that to .map({[.sort]}) 17:15
pmichaud never mind.
moritz_ jnthn: I'm not sure what the right semantics are
pmichaud I'm misreading stuff.
pugs_svn r26813 | moritz++ | [t/spec] corrected a test description 17:16
jnthn pmichaud: It's kinda fun because .= gets parsed in two different ways.
pmichaud jnthn: right, I was confusing term/infix
jnthn pmichaud: We only parsed it one way until this afternoon, which is why >>.= and .= as mutating $_ didn't work before now. 17:17
pmichaud Yes. I worked on this at NPW (but got distracted on other tasks) 17:18
we only had infix .= until now.
jnthn *nod*
jnthn is on a crusade to implement all of the section Parallel dispatch 17:19
17:19 nbrown_ joined
jnthn One which seems to be over now. Yay. :-) 17:19
(Only tests skipped now are interaction of .*/.+ with callsame)
(in parallel-dispatch.t)
17:19 cdarroch joined
TimToady .* and .+ are not parallel dispatch; they're serial dispatch 17:20
jnthn TimToady: >>.+ 17:21
TimToady >>. is parallel dispatch
right
pmichaud waaaaaah. imcc FAIL
jnthn TimToady: But the issue is that the method being called with .+ then goes and does a callsame.
moritz_ do .+ and .* guarantuee order?
jnthn TimToady: Which I know is nothing to do with the list of candidates the .+ operator is going thorugh.
moritz_: yes
moritz_ jnthn: then you can get rid of the .sort altogether 17:22
jnthn moritz_: The sort is needed because .+ is ordered, but the >> bit of >>.+ is not.
moritz_ jnthn: but it sorts the inner array, not the outer 17:23
jnthn moritz_: Ah.
TimToady yes, >> doesn't guarantee order evaluation, but it does guarantee order of return
moritz_ and what TimToady said
jnthn TimToady: Oh, yes.
TimToady s/ / of /
jnthn OK, you're right.
pmichaud jnthn: nopaste.snit.ch/16527 imcc FAIL 17:24
moritz_ (except that he typed faster than me ;-)
jnthn moritz_: I'll yank the sort out then. Thanks. :-)
pmichaud: oh noes why show me?! ;-)
pmichaud jnthn: so you can comiserate. :-)
I don't expect a fix.
jnthn pmichaud: Unfortunately, you managed to nopaste it somewhere that, at least for me, doesn't display the chars properly! 17:25
TimToady biab &
jnthn Well, unicode fail all around.
pmichaud well, the point is simply that <<'XYZ' parses "malformed strings", while "..." doesn't
17:26 nihiliad joined
jnthn They should both give an error? 17:26
pmichaud probably
moritz_ aren't both heredocs?
moritz_ no clue
pmichaud No
only the first is a heredoc
Oh, I see, it's the difference between ' and " here
IMCC accepts 'Ā«' but treats it as two latin-1 chars, it appears. 17:28
$S0 = 'Ā«'
$I0 = length $S0
say $I0
2
jnthn $S0 = unicode:'Ā«' # would work though?
Or something like that.
pmichaud Sure.
But the problem is that Perl6Grammar has been getting it wrong from the start
jnthn oh
pmichaud so that grammar-oper.pg, which contains utf8 chars that have been read as latin-1 17:29
jnthn so it's consistnetly wrong everywhere and thus seemed right?
17:29 mizioumt1 left
pmichaud will now fail if I tell Perl6Grammar to read unicode 17:29
er, utf8
because that rule is incorrect
17:29 rocket_guatemala left
pmichaud in other words, I now have to modify Perl6Grammar so that it understands Ā« both when it's encoded as utf8 and when it's mis-encoded as two latin-1 bytes. 17:30
jnthn Ugh.
Nasty.
btw #ps is in 1 hour, right?
pmichaud yes
jnthn OK, I'm going to take dinner before it then. 17:31
moritz_ pmichaud: why not convert everything to UTF-8, and work with thatƟ
s/Ɵ/?/
mncharity moritz_: re +o, tnx 17:33
17:34 nbrown left, nbrown_ is now known as nbrown 17:35 mncharity left
pugs_svn r26814 | jnthn++ | [t/spec] Parallel dispatch test tweak and unfudge for Rakudo. 17:37
dalek kudo: 62773e0 | jnthn++ | src/builtins/guts.pir:
Make sure we don't get unwanted flattening going on when forming the result list from a parallel dispatch.
17:38
moritz_ rakudo: say [].WHAT === [].WHAT 17:39
p6eval rakudo 89539a: OUTPUTĀ«1ā¤Ā»
jnthn -> pizzeria to nom a pizza and beer, be back for #ps 17:43
17:45 M_o_C left
pmichaud moritz_: I have to deal with Parrot deprecation cycles. 17:45
moritz_ pmichaud: eek
pmichaud there are likely to be other languages that are relying on the existing misbehavior.
17:47 pmurias left 17:52 sri_kraih left, sri_kraih joined 18:03 skids left 18:05 meppl joined 18:06 masak joined
mberends masak: reading cpants.perl.org/kwalitee.html and not taking it too literally, we should consider each of its points for WTOP. 18:08
masak mberends: nod. 18:09
mberends do you like the idea of a 'conformance rating'? I'm not sure.
masak mberends: I think I'll be doing a disfactor of Installer.pm soon that'll enable WTOP to piggyback on it.
mberends: I haven't read it that closely. I don't know what conformance rating is. 18:10
mberends: to be honest, I'm not 100% sure what I want WTOP to accomplish, community-wise.
it should definitely not have opinions on code style, as we talked about before today. 18:11
moritz_ it would be quite cool if it could judge the consistency of code style, without judging the actual style
masak it should have advise of the kind 'if you're doing A, it is in your best interest to do B. here's why: ...'
mberends interface style is most valuable, internal style does not have to be laid down
masak for example: 'if you have a lib/ dir with .pm modules, it is in your best interest to have a build system. here's why: when you precompile your modules, they start faster' 18:12
18:12 viklund joined
masak (proto currently fails that one) 18:13
18:13 barney joined
masak mberends: good news. :) 18:15
18:16 mikehh left
masak mberends: a guy forked ihrd's uri... so now there are two projects called 'uri'... 18:16
proto explicitly doesn't support this.
mberends :auth<ihrd> hrrrmmm. 18:17
proto being dragged out of YAGNI mode 18:18
masak quoting from the README: "It is not a full-fledged module installation system."
mberends but it's adapt or die
masak :)
I like your attitude. :P 18:19
we might be in luck. maybe this fork is consistently better than ihrd's, so there's no reason to keep the old one.
mberends moritz_: there are metrics for code clarity, I don't remember where. Things like number of functions versus lines of code, comment density etc. Know anything about those? 18:20
moritz_ mberends: not really. The only good quality metric I know is "WTFs per minute", and afaik it's not automatically measurable
18:21 nbrown left
mberends :) 18:21
masak mberends: viklund deems that the uri fork is significantly better. I say we take the easy way out.
mberends only this time. let's plan a bit for future forks. 18:22
masak aye.
but no extra features!
:P
jnthn back 18:23
mberends S11 Versioning is the endgame for this.
masak sure, sure. but proto has already resigned in that battle. 18:24
it's just a prototype.
mberends pmichaud++ indicated an August timeframe, so around YAPC::EU time.
masak again, as the readme says: "Proto -- making your life slightly easier". not solving all your worries. :)
mberends if it was a prototype car, with a free clone option, I'd run it into the ground 18:25
moritz_ masak: there's no reason why a prototype shouldn't evolve into a fully fledged solver-all-your-problems solution ;-)
jnthn mberends/masak: What is WTOP?
jnthn tries to keep on top of his Perl 6 acronyms 18:26
pmichaud I'm not sure what I indicated, but I think my intent was to give an August timeframe to begin planning its implementation, not to complete it.
masak jnthn: World-Takeov... I mean Well-Thought-Out Practices.
mberends World Tak^H^
jnthn :-D
masak moritz_: ack. but I'll cross that bridge when I have to, not sooner. 18:27
ruoso posts his daily nag asking about contextual variables .... ;)
moritz_ ruoso: can't you just work around them for now? 18:28
jnthn ruoso: Shhh...don't spoil our potential to get operator overloading!
ruoso moritz_, not really
moritz_ ruoso: "not really" is a "yes", right? ;-)
masak ruoso: what jnthn said :)
ruoso moritz_, it would require me to pass them over though all the calls
moritz_ "them" can easily reduced to "one"
where one is a hash holding them all
ruoso nah... 18:29
maybe the workaround would be to use them as rakudo think they are now
i.e.: globals
ruoso try something...
masak ruoso++ # working around
pmichaud ruoso: contextuals are still high on my list, yes.
ruoso: I needed to get a few other variable-handling things correct yesterday, and I still need to get @_ and %_ working properly. 18:30
ruoso pmichaud, thanks (I know... I am boring...)
18:30 jhorwitz joined
pmichaud no, not boring, nor annoying. I'm eager to see them implemented as well. :-) 18:30
mberends btw, the time.t spectests are so out of sync with the S32 that it's probably better to scrap them and begin again.
moritz_ mberends: feel free. 18:31
mberends :)
18:31 mikehh joined 18:32 nsh joined
ruoso yay... the workaround works 18:33
jnthn
.oO( remember to join #ps on the correct server )
ruoso I'll just use context vars as globals in the meanwhile... 18:34
moritz_ s1n: perlgeek.de/blog-en/perl-6/subs-vs-....writeback hope this is of interest for you 18:36
pmichaud: your #ps reports seem to have a decreasing number of parrot and PGE reports... which looks like a good thing to me ;-) 18:39
pmichaud moritz_: that will change when I get heavily into LTM and protoregexes, though. 18:40
moritz_ pmichaud: I know
pmichaud I'm satisfied as long as we're making good progress in the areas where we need progress. :-)
jnthn pmichaud: We need progress everywhere! ;-)
pmichaud Well, one person's "gotta have it" is often someone else's "gratuitous feature" :-P 18:41
18:46 justatheory joined 18:52 jferrero joined 18:59 payload left 19:05 [particle]1 joined 19:06 payload joined 19:08 PZt left 19:09 [particle]- left 19:15 [particle]1 is now known as [particle]- 19:18 ZuLuuuuuu joined 19:20 donaldh left, donaldh joined 19:23 nbrown joined 19:25 eMaX joined 19:30 bacek left
masak rakudo: sub foo(Str $s where { $s eq "foo" }) { say "OH HAI" }; foo("foo") 19:39
p6eval rakudo 62773e: OUTPUTĀ«OH HAIā¤Ā» 19:40
masak oh, I didn't know one could refer to the param by name inside the closure.
jnthn masak: Just don't try it in a multi in Rakudo. :-)
masak: I've tended to discourage the practice because it doesn't work there atm and it's hard to fix. ;-)
masak jnthn: oh, that's what we did!
rakudo: multi sub foo(Str $s where { $s eq "foo" }) { say "OH HAI" }; foo("foo") 19:41
p6eval rakudo 62773e: OUTPUTĀ«Null PMC access in get_string()ā¤current instr.: 'infix:eq' pc 16396 (src/builtins/cmp.pir:88)ā¤Ā»
masak jnthn: is this in RT?
jnthn surely
masak ok, good. 19:42
jnthn I've known about this for months.
I'm sure it's come up before.
masak rakudo: multi sub foo(Str $s where { $_ eq "foo" }) { say "OH HAI" }; foo("foo")
p6eval rakudo 62773e: OUTPUTĀ«OH HAIā¤Ā»
masak jnthn: don't worry, it's workaroundable.
hence not urgent.
jnthn Right, that's what I figured. :-)
pmichaud it should be much more fixable now than before.
after the refactors I did yesterday. 19:43
rakudo: multi sub foo(Str $s where $s eq "foo" ) { say "OH HAI" }; foo("foo")
p6eval rakudo 62773e: OUTPUTĀ«Unable to parse multisig; couldn't find final ')' at line 1, near "eq \"foo\" )"ā¤ā¤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:86)ā¤Ā»
pmichaud where requires a term? okay. 19:44
jnthn pmichaud: No, no, it's a hard fix. 19:45
pmichaud: It's the "we don't bind positionals inside the multi-dispatcher" one.
pmichaud jnthn: right -- which means that SIGNATURE_BIND throws a "no, not me" exception, yes? 19:46
19:46 kbrandt joined
jnthn pmichaud: We never get there yet. 19:46
masak hah! found a bug in Match.ast :) 19:47
pmichaud okay.
masak rakudo: class I {}; grammar G { regex TOP { <foo> }; regex foo { foo {*} } }; class A { method foo($/) { make I.new } }; my $result = G.parse("foo", :action(A.new)); say $result.perl; sub t(Match $m) { say $m.ast.perl }; t($result)
jnthn We aren't running the candidates in the multi-dispatcher.
p6eval rakudo 62773e: OUTPUTĀ«Match.new(ā¤ # WARNING: this is not working perl codeā¤ # and for debugging purposes onlyā¤ ast => "foo",ā¤ Str => "foo",ā¤ from => 0,ā¤ to => 3,ā¤ named => {ā¤ 'foo' => Match.new(ā¤ ast => I.new(),ā¤ Str => "foo",ā¤ from => 0,ā¤ to => 3,ā¤ ),ā¤ },ā¤)ā¤"foo"ā¤Ā»
pmichaud I'm simply saying that when we do, things will be easier now than they were previously. :-)
masak that's not consistent. :)
masak submits rakudobug
jnthn pmichaud: OK. I'm holding off until I see what the bigger picture on signature binding will be, tbh.
pmichaud fair enough 19:48
jnthn And that depends on Parrot.
pmichaud I just eliminated all of the special handling that was on the where blocks
so that it's identical to other circumfix:<{ }> expressions.
jnthn What special handling did we have?
pmichaud about 100 lines worth :-)
jnthn Oh, about $_ as a parameter?
pmichaud it was checking for a parameter, .... yes
jnthn How does it handle this now? 19:49
pmichaud the same as circumfix:<{ }>
or any other block
the problem is that circumfix:<{ }> wasn't getting a .signature
jnthn Ah, so it works in general now. OK. The code for where blocks to handle it specially probably pre-dated that. :-)
pmichaud s/is/was/
moritz_ masak: what exactly is inconsequent about that? 19:51
masak moritz_: .ast is shown twice in that code, yes?
and it's different from one time to another.
moritz_ masak: each sub match has its own .ast
masak moritz_: yes. 19:52
moritz_ ... and?
masak oh, I see what you mean now.
yes, that example does not show our bug.
masak goes to make a new attempt
we're experiencing _something_ here... 19:54
jnthn The Force. 19:57
19:58 nbrown left
masak jnthn: a disturbance in it, possibly... 19:59
rakudo: my $m = "foo" ~~ /foo/; $m<greeting> = "OH HAI"; say $m.perl
p6eval rakudo 62773e: OUTPUTĀ«Method '!_perl' not found for invocant of class 'Str'ā¤current instr.: 'parrot;P6metaclass;dispatch' pc 251857 (src/gen_actions.pir:0)ā¤Ā»
masak ok, so that's another bug, but still. 20:00
masak submits rakudobug
jnthn !_perl ?
masak it's an internal method, IIRC. 20:01
in the setting.
20:01 _mg_ left, eMaX left
moritz_ masak: assigning to a Match object is evil, and should be an error 20:02
masak moritz_: well, it isn't. :)
moritz_ masak: in TimToady's head, Matches are immutable
mberends Gisle Aas replied today that he himself has no plans make a Perl 6 version of LWP and does not object if someone else does. He did suggest using a different name if necessary to avoid confusion, and that names like HTTP::Daemon are quite obvious in a generic sense. It will be a nice project to migrate LWP(5) applications to a new LWP6, and report the results at YAPC::EU. 20:03
masak moritz_: we're toying around with ways to pass around information in the hitomi draft.
moritz_ masak: IMHO the way to go is to transform .chunks to arrays of chunks... 20:05
masak moritz_: I'm not familiar enough with .chunks to understand what that meant.
moritz_ masak: and chunks are either strings (literals), arrays or objects with special behavioiur
masak moritz_: you might be right. I'll keep it in mind.
moritz_ masak: .chunks is just a list of pairs of both Match objects and strings, in the order they appear in the matched text 20:06
masak moritz_: I'm not sure we need to traverse .chunks that much.
moritz_ rakudo: "abc" ~~ m/a(.)./ && say $/.chunks.perl 20:07
masak we're operating more on the XML structure built by the tree of Match objects.
p6eval rakudo 62773e: OUTPUTĀ«["~" => "a", 0 => Match.new(ā¤ # WARNING: this is not working perl codeā¤ # and for debugging purposes onlyā¤ ast => "b",ā¤ Str => "b",ā¤ from => 1,ā¤ to => 2,ā¤), "~" => "c"]ā¤Ā»
moritz_ masak: if you give a copy of your current code, I can try to come up with something simple to illustrate my ideas 20:08
rakudo: "abc" ~~ m/a(.)./ && say $/.chunks.map(*.value).WHAT; say $/.chunks.map({~.value})
p6eval rakudo 62773e: OUTPUTĀ«List()ā¤abcā¤Ā»
masak moritz_: it's on viklund's computer. not sure it's in a committable state right now... 20:09
moritz_ rakudo: "abc" ~~ m/a(.)./ && say $/.chunks.map({.value.WHAT}); say $/.chunks.map({~.value})
p6eval rakudo 62773e: OUTPUTĀ«Str()Match()Str()ā¤abcā¤Ā»
moritz_ masak: a nopaste would do
masak viklund: if you please...
viklund 'ere you go: gist.github.com/110712 20:11
moritz_ and I assume the example input file is the one from the web repo? 20:12
viklund moritz_: currently there's only the string $str 20:13
moritz_ ok
masak aye, script is self-contained.
20:13 barney left
masak we basically threw everything out and started again with actions. 20:13
20:15 eMaX joined 20:25 ejs left 20:27 nbrown joined
dalek kudo: 19490ae | pmichaud++ | (3 files):
Get src/parser/grammar.pg to be utf8 again. This involves bumping
20:30
20:32 ZuLuuuuuu left 20:33 ejs joined 20:36 minazo joined 20:37 minazo left
moritz_ masak, viklund: gist.github.com/110725 20:37
bug ridden, but it has a nice feature
if you change method node($/) to be just like the other action methods, traverse() will reproduce the original XML exactly 20:38
masak moritz_++
we also reached some kind of result recently.
moritz_ $/.ast.perl will give you a tree made up of arrays, strings and If object
note that rule node should allow <xmlcontent>* (not <xmlcontent>+) 20:42
20:42 pmurias joined
pmurias ruoso: hi 20:42
ruoso hi pmurias 20:43
moritz_ gist.github.com/110725 # updated
pmurias ruoso: what causes the infinite recurssion in tests?
moritz_ now with an example that shows how a non- "pl:if" tag is completely reproduced
ruoso pmurias, that is fixed already... it was a mispelling in p6opaque
pmurias ruoso: you are using the standard svn client? 20:46
ruoso iyes
dalek kudo: fcf5d97 | pmichaud++ | src/parser/grammar.pg:
Clean up some places where latin1->utf8 conversion did the wrong thing.
20:48
pmurias ruoso: i can't see the commit in the repository...
ruoso hmmm...
interesting...
wait...
you're right... sorry... comitting 20:49
pugs_svn r26815 | ruoso++ | [re-smop/p6opaque] fix mispelling that causes infinite loops
pmurias ruoso++ # no infinite loops in make test 20:53
ruoso which is the p6 equivalent for the p5 reges /^ ([^\?])* \? (.+) $/ ? 20:54
moritz_ (<-[\=]>*) \? (.+) $ /
/ ^ (<-[\=]>*) \? (.+) $ /
actually
(I think you meant (...*), not (...)*) 20:55
ruoso yes... indeed
moritz_ the latter doesn't make much sense in Perl 5
pmurias shouldn't it be ^^ and $$?
20:55 masak left
moritz_ only if you want to match line endings 20:56
ruoso moritz_, why do you have \= inside the brackets, if '?' is the one I want to negate?
is that just a typo?
pmurias moritz_: but that's the default in p5
moritz_ pmurias: no.
ruoso: [^\?] in perl 5 also exclude the backslash
pmichaud /^ (<-[?]>)* '?' (.+) $/ 20:57
moritz_ buubot: eval: '\\' =~ /[^\?]/
buubot moritz_: 1
moritz_ oops.
ruoso --
moritz_ ok, then without the \ in the char class ;-)
20:57 payload left 20:58 payload joined
pmurias buubot: print "bar\nfoo\n" =~ /^foo/; 20:58
buubot: eval: print "bar\nfoo\n" =~ /^foo/; 20:59
buubot pmurias: 1
20:59 eMaX_ joined, eMaX left
moritz_ surprised agian 21:00
pmurias buubot: eval: print "there",("bar\nfoo\n" =~ /^foo/);
buubot pmurias: there1
pmurias buubot: eval: print "there",("bar\nfoo\n" =~ /^foo/),"x"; 21:01
buubot pmurias: therex1
PerlJam having perl 5 code on a perl 6 channel is sometimes confusing :)
pmurias moritz_: so ^ is ^^ in perl5 21:02
PerlJam p6 ^ == p5 \A, p6 $ == p5 \z 21:03
moritz_ I can't reproduce that result locally
[particle]- pmurias: in p5, ^ depends on context
moritz_ $perl -wE 'say "foo\nbar" ~~ /^bar/'
# empty line
with /m, it says 1
[particle]- er, context isn't the right word... on regex modifiers 21:04
21:04 jferrero left
pmurias [particle]-: i knew that 21:04
PerlJam moritz_: what's the result you're trying to reproduce?
moritz_ PerlJam: that /m is the default (see pmurias's eval's above) 21:06
PerlJam /m is not the default.
moritz_ "bar\nfoo\n" =~ /^foo/ matched in buubot
PerlJam no it didn't.
the 1 is the return value of print
moritz_ ah 21:07
ruoso rakudo: my &rx1 = / ^ /; my &rx2 = / \/ $ /; '/' ~~ / <rx1> <rx2> /; say $/.perl
p6eval rakudo fcf5d9: OUTPUTĀ«Unable to find regex 'rx1'ā¤Null PMC access in invoke()ā¤current instr.: 'parrot;PGE;Grammar;' pc 684 (EVAL_21:276)ā¤Ā»
ruoso rakudo: our &rx1 = / ^ /; our &rx2 = / \/ $ /; '/' ~~ / <rx1> <rx2> /; say $/.perl
p6eval rakudo fcf5d9: OUTPUTĀ«Match.new(ā¤ # WARNING: this is not working perl codeā¤ # and for debugging purposes onlyā¤ ast => "/",ā¤ Str => "/",ā¤ from => 0,ā¤ to => 1,ā¤ named => {ā¤ 'rx1' => Match.new(ā¤ ast => "",ā¤ Str => "",ā¤ from => 0,ā¤ to => 0,ā¤ ),ā¤ 'rx2' => Match.new(ā¤ ast =>
.."/",ā¤ ...
moritz_ ruoso: try to construct regexes with rx/..../
PerlJam buubot: eval: [ "bar\nfoo\n" =~ /^foo/ ]
buubot PerlJam: []
PerlJam buubot: eval: [ "bar\nfoo\n" =~ /^foo/m ]
buubot PerlJam: [1]
ruoso rakudo: our &rx1 = / ^ /; our &rx2 = / \/ $ /; '/' ~~ / <rx1> <rx2> /; say $/ 21:08
p6eval rakudo fcf5d9: OUTPUTĀ«/ā¤Ā»
ruoso hmm...
pmichaud rakudo: my &rx1 = / ^ /; my &rx2 = / \/ $/; '/' ~~ token / <rx1> <rx2> /; say $/.perl;
p6eval rakudo fcf5d9: OUTPUTĀ«Malformed regex definition at line 1, near "/ <rx1> <r"ā¤ā¤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:86)ā¤Ā»
pmichaud rakudo: my &rx1 = / ^ /; my &rx2 = / \/ $ /; '/' ~~ token { <rx1> <rx2> }; say $/.perl; 21:09
p6eval rakudo fcf5d9: OUTPUTĀ«Match.new(ā¤ # WARNING: this is not working perl codeā¤ # and for debugging purposes onlyā¤ ast => "/",ā¤ Str => "/",ā¤ from => 0,ā¤ to => 1,ā¤ named => {ā¤ 'rx1' => Match.new(ā¤ ast => "",ā¤ Str => "",ā¤ from => 0,ā¤ to => 0,ā¤ ),ā¤ 'rx2' => Match.new(ā¤ ast =>
.."/",ā¤ ...
21:09 mberends left
ruoso somehow a very similar regex is failing in Faz 21:09
pmichaud using 'token' or not? 21:10
I know that lexical regexes will fail for non-tokens
because we lose the outer scope chain
ruoso no... not failing in finding the closures ,no...
failing in matching...
the workarounds you showed me are indeed workign
PerlJam hadn't considered that ~~ would immediately eval token/rule/regex before. 21:12
pmichaud ~~ against any Regex does a smart match of the regex. :-) 21:13
21:13 raiph joined
PerlJam aye, until just a minute ago, I'd only been thinking in terms of ~~ // or ~~ m// or ~~ $some_regex 21:14
it just never occured to me to put a token decl on the RHS of ~~
21:22 jhorwitz left
raiph hi all. i'm trying to build rakudo on feather. make fails with "virtual memory exhausted". this has been the case for all git clones/pulls for the last month or so. i'd really appreciate help... :) 21:23
moritz_ raiph: that's probably due to pbc_to_exe eating up lots of memory during complilation... 21:24
raiph: the parrot folks are working on a fix for that
(actually that had one, but it didn't work with MSVC)
pmichaud maybe we should have completely separate pbc_to_exe; one for unix, one for MSVC 21:25
moritz_ that's what I tried to suggest at #ps 21:26
but I think Util misunderstood me
21:27 Whiteknight joined, ejs left
pmichaud well, I kinda of -1'd it, but I think I'd +1 it now 21:28
I didn't realize rakudo wasn't building on *feather*. That's kinda bad.
[particle]- well, you can up the memory on the vm 21:29
21:29 ejs joined
moritz_ that's only fixing the symptoms, not the problem 21:29
raiph ulimit -v --> 524288 21:30
[particle]- yep
pmichaud is that blocks or bytes? 21:31
must be blocks
moritz_ looks like kB
[particle]- kB
raiph kbytes
pmichaud 524 meg ought to be enough. But yes, there's gcc-bug that gets triggered, I think.
[particle]- too bad there's no lcache for linking 21:32
pugs_svn r26816 | pmurias++ | [re-smop] fix PrototypeHOW.lookup_fail - idconsts don't always have a NULL
raiph thanks for responses. do you think it's worth asking juerd to up vmem for me to X for a while? or wait Y weeks? or...? 21:35
pmichaud asking on #parrot 21:36
21:36 ejs left
ruoso pmichaud, ohkay... I think I had hit some weird bug that is really hard to reproduce... 21:37
pmichaud, let me push to github...
pmichaud ruoso: I'm leaving in about 3 mins, alas.
(have to take daughter to fencing lesson)
moritz_ raiph: I'm root on feather as well, let me see if I can do anything for you
pmichaud does p6eval get additional space for compiling or something? 21:38
Or is that not on feather?
moritz_ it's not on feather
pmichaud okay.
ruoso pmichaud, ok...
pmichaud, github.com/ruoso/faz/blob/6db6cb42f...example.pl
moritz_ now if only I could remember where it's configured 21:39
dalek kudo: 3412a2f | pmichaud++ | src/parser/grammar.pg:
Enable parsing and limited processing of ōæ½xAB quotes ōæ½xBB .
raiph afk 5 mins
ruoso pmichaud, if I run that script the way it is, one of the regex fail... if I comment line 47, the other one fails...
it seems that there's some kind of caching
moritz_ raiph: I've temporarily increased your vm limit... 21:40
raiph: please log in again and re-try 21:41
pmichaud the only caching that PGE does is of embedded PIR closures
ruoso pmichaud, that's it then
pmichaud but I can't imagine that would make much of a difference.
ruoso I use pir closures
it does
pmichaud Because the code should compile the same regardless.
21:41 mib_sfmrne joined
ruoso because my closures are acessing lexical variables 21:41
mib_sfmrne oioi lads
ruoso that are only valid at that specific run 21:42
pmichaud you're doing set_outer, or ... ?
ruoso no... actually... it's not a PIR closure...
pmichaud then there's no caching.
ruoso I'm accessing lexical subs
mib_sfmrne how do u make your own chanle
ruoso with <foo>
pmichaud only PIR closures are cached.
raiph exit
ruoso pmichaud, doesn't it cache references to subs or something like that? 21:43
pmichaud no.
mib_sfmrne HOW DO YOU MAKE YOUR OWN CHANLE ?
moritz_ mib_sfmrne: don't shout please
pmichaud mib_sfmrne: /join #new_channel_and_now_go_away_please
mib_sfmrne well answer me
ruoso like in: my &sub = sub { 1; }; return token { <sub> }; 21:44
pmichaud, doesn't the above cause any kind of caching?
mib_sfmrne it dnt work
21:44 mib_sfmrne was kicked by jnthn (jnthn))
moritz_ jnthn++ thanks 21:44
pmichaud ruoso: caching, no.
jnthn Gotta use the op for something.
21:44 chav joined, chav left
ruoso pmichaud, any possible cause for weirdness? 21:44
pmichaud however, any lexicals inside of &sub will have been captured at the point of the assignment 21:45
raiph pmichaud: bingo
21:45 chaav123 joined
chaav123 hii 21:45
ruoso pmichaud, it looks like the fact that I run some regexes alter the result of others...
pmichaud ruoso: I suspect it has to do with captured lexical environments, yes.
but no, PGE itself doesn't do any caching here. 21:46
ruoso pmichaud, I couldn't get the problem narrowed down...
raiph chaav123: hey
chaav123 gota do wot i do nd stay a cruckid nigga 2 u cnt fuck with the crew
2 pac owns
21:46 pmichaud sets mode: +b *!*=569ac30c@gateway/web/ajax/mibbit.com/x-d8bb3e6339e73579, chaav123 was kicked by pmichaud (pmichaud)), mibit567 joined
ruoso pmichaud, but I think the script I sent (you probably need to clone the repo) show odd behavior... 21:47
21:47 mibit567 left
ruoso when you enable one of the regexes, others stop working 21:47
21:47 john15 joined
ruoso I must say that I do generate a lot of closures in a sub 21:47
so I guess it can be related to that
john15 hi
ruoso I generate the closures in a loop... 21:48
pmichaud ruoso: alas, I have to leave now.
ruoso pmichaud, the relevant part is in lib/Faz/Dispatcher.pm at method register-action
john15 has any1 been in a canale caled gamerdna
pmichaud I'll backlog and look at it a bit later
ruoso i'd appreciate that 21:49
github.com/ruoso/faz/ fwiw
pmurias john15: hi
self in a sub is a compile tim error?
ruoso pmichaud, sorry... actually method compile... 21:50
jnthn pmurias: If it's a sub enclosed in a method, I guess it'd find the self of the method. 21:51
I figure if we know there's no outer method at all we can flag an error at compile time just fine though.
jnthn bbiab
john15 how do you join other chat rooms on this or is this the only chanle 21:52
pmurias lol 21:53
jnthn john15: I think you're looking in the wrong place.
john15 wot u meen 21:54
by that
jnthn This is not a place to find a chat room.
john15 isnt dis a chat room
PerlJam wonders how john15 got here of all places with so little knowledge of thing. 21:55
john15: /join #some_other_channel
jnthn Not if you want to talk about anything other than the topic of the channel...
...or lolcats...
john15 what is the topic of this chanle
jnthn perl6
john15 wich is ? 21:56
antiphase You mean I'm not in #swingers?
meppl good night
jnthn antiphase: /join #swingers for that
[particle]- jnthn: don't feed trolls, /ignore them
jnthn antiphase: Erm, if it exists. ;-)
antiphase :)
ruoso but you still can join if it doesn't 21:57
jnthn It'll be a lonely swing.
ruoso until someone else tries to join the same non-existant channel
john15 so igranant :(
21:58 meppl left
ruoso decommute & 21:58
21:58 ruoso left
john15 is anyone from england? 21:58
22:01 bacek joined, john15 left 22:03 LadyLuna1y joined 22:04 iblechbot left 22:11 LadyLunacy left 22:13 lichtkind_ joined 22:14 eMaX_ left 22:17 nsh left
raiph john15: i'm from there, but been here (usa) for 17 year 22:18
22:19 hercynium joined 22:23 wknight8111 joined, Whiteknight left 22:26 alester left 22:29 nbrown left 22:31 lichtkind left 22:42 PhatEddy joined 22:58 wknight8111 is now known as whiteknight 23:06 skids joined 23:08 exodist left, nbrown joined, lichtkind_ left
s1n moritz_: i will respond to your writeback after our p6m meeting tonight 23:17
23:20 donaldh left 23:21 donaldh joined
s1n moritz_: the last paragraph is telling, i see now where we differ on understanding. i think this may be more a matter of miscommunication (for the most part, i'm in agreement with the idea, just not the implementation), i'll explain later tonight 23:21
skids Wow, who do we karma for the 40% rakudo runtime speedup? 23:24
23:27 frew joined 23:41 pmurias left, nihiliad left 23:58 meppl joined