»ö« | 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 moderator on 20 October 2009.
00:05 frew joined 00:26 ihrd joined, ihrd left 00:44 mikehh joined 00:55 OuLouFu joined 00:56 mikehh joined
carlin Does the RSS Feed on rakudo.org not update? 00:56
01:01 kent\\n joined 01:09 mikehh joined 01:28 mikehh joined 01:34 s1n_mini joined 01:35 Schwern joined 01:40 mikehh joined 01:46 titeflat joined
titeflat perl6: say 3; 01:47
p6eval elf 28893, pugs, rakudo 49e62f: OUTPUT«3␤»
titeflat perl6: say "hello Bob"; 01:48
p6eval elf 28893, pugs, rakudo 49e62f: OUTPUT«hello Bob␤»
markmont spec tests added (as promised) to rt.perl.org/rt3/Ticket/Display.html?id=70011 01:49
Hopefully it's ready to go.
01:51 mikehh joined
titeflat perl6: my a = 1; 01:52
p6eval rakudo 49e62f: OUTPUT«Malformed declaration at line 2, near "a = 1;"␤in Main (file <unknown>, line <unknown>)␤»
..elf 28893: OUTPUT«Undefined subroutine &GLOBAL::prefix__61 called at (eval 124) line 3.␤ at ./elf_h line 5881␤»
..pugs: OUTPUT«*** ␤ Unexpected "="␤ expecting ":" or "("␤ at /tmp/D4EzpW7U3B line 1, column 6␤»
titeflat my a : 1 01:53
perl6: my a : 1;
p6eval elf 28893: OUTPUT«Undefined subroutine &GLOBAL::a called at (eval 125) line 3.␤ at ./elf_h line 5881␤»
..pugs: OUTPUT«*** ␤ Unexpected " 1"␤ expecting "("␤ at /tmp/i34inCn5Rs line 1, column 7␤»
..rakudo 49e62f: OUTPUT«Malformed declaration at line 2, near "a : 1;"␤in Main (file <unknown>, line <unknown>)␤»
s1n_mini titeflat: did you mean $a? 01:54
titeflat yes!
s1n_mini rakudo: my $a = 1; say $a; 01:55
p6eval rakudo 49e62f: OUTPUT«1␤»
01:57 _jaldhar joined
titeflat perl6: my $a = 1, 2, 2 02:06
p6eval elf 28893: OUTPUT«Useless use of a constant in void context at (eval 121) line 3.␤»
..pugs, rakudo 49e62f: ( no output )
titeflat perl6: my $a = 1..Inf ; say $a[5] 02:07
p6eval pugs: OUTPUT«Stack space overflow: current size 8388608 bytes.␤Use `+RTS -Ksize' to increase it.␤»
..rakudo 49e62f: TIMED_OUT
..elf 28893: OUTPUT«Can't call method "postcircumfix__91_32_93" without a package or object reference at (eval 124) line 4.␤ at ./elf_h line 5881␤»
titeflat perl6: my $a = 1..4 ; say $a[5] 02:10
p6eval rakudo 49e62f: OUTPUT«Use of uninitialized value␤␤»
..pugs: OUTPUT«␤»
..elf 28893: OUTPUT«Can't call method "postcircumfix__91_32_93" without a package or object reference at (eval 124) line 4.␤ at ./elf_h line 5881␤»
titeflat perl6: my @a = 1..Inf ; say @a[5] 02:18
p6eval pugs: OUTPUT«Stack space overflow: current size 8388608 bytes.␤Use `+RTS -Ksize' to increase it.␤» 02:19
..rakudo 49e62f: TIMED_OUT
..elf 28893: OUTPUT«Can't call method "postcircumfix__91_32_93" without a package or object reference at (eval 124) line 4.␤ at ./elf_h line 5881␤»
pnate ;-[ 02:20
dalek p-rx: a669f19 | pmichaud++ | build/ (2 files):
Clean up Makefile a bit, bump PARROT_REVISION.
02:23
p-rx: 920efd9 | pmichaud++ | src/PAST/Compiler-Regex.pir:
[regex]: Add 'pastnode' type for PAST::Regex.
02:34 eternaleye joined 02:46 mikehh joined 02:49 snarkyboojum_ joined 02:55 tak11 joined 02:57 KyleHa joined
KyleHa std: my %h = a => 1; say %h<a>:delete; 02:58
p6eval std 28893: OUTPUT«ok 00:01 110m␤»
KyleHa rakudo: my %h = a => 1; say %h<a>:delete; 02:59
p6eval rakudo 49e62f: OUTPUT«Confused at line 2, near ":delete;"␤in Main (file <unknown>, line <unknown>)␤»
03:24 agentzh joined, eternaleye joined 03:27 eternaleye joined 03:37 xp_prg joined
jsut what is the equivilent of eval "require $package" in perl6? 03:40
or eval "use $package" for that matter
carlin rakudo: eval("use Foobar"); say $!; 03:41
p6eval rakudo 49e62f: TIMED_OUT
pugs_svn r28894 | kyle++ | [t/spec] Test for RT #68482 03:42
carlin (that worked locally). Not sure if `try { use Foo }` should work as well (doesn't at the moment at least).
pugs_svn r28895 | kyle++ | [t/spec] Test for RT 68714
jsut try { require $package } at least threw an error
yeah, locally for me it doesn't set $!, but i can't then actually instantiate objects of that class 03:43
which makes me think i'm either dones something wrong, i'm approaching it wrong, or it's a bug
Null PMC access in get_string() 03:45
maybe the problem is $class.new(...) doesn't work actually 03:46
KyleHa "Null PMC access" is always a bug. It's like a segmentation fault.
jsut ah
03:48 markmont left 04:05 astrojp left 04:12 frew joined 04:16 frew joined 04:18 charsbar_ joined 04:19 baest_ joined 04:20 frew joined 04:21 kcwu left 04:22 cxreg joined, frew_ joined, huf joined 04:25 justatheory joined 04:26 Helios- joined 04:27 kcwu joined, mikehh joined 04:30 Woodi joined 04:34 araujo joined, Jedai joined 04:35 ruoso joined 04:55 eternaleye joined 04:58 eternaleye joined
diakopter looks around 05:01
05:01 envi^office joined 05:06 justatheory joined 05:09 envi^office joined 05:10 mberends joined
mberends saw diakopter looking around 05:10
05:15 mikehh joined
dalek p-rx: 63139fe | pmichaud++ | (3 files):
Refactor the build/bootstrap build process to avoid cross-stage conflicts.
05:29
p-rx: 1a369e2 | pmichaud++ | (6 files):
More build process cleanups. Add :PIR{{...}} modifier for inlined PIR
mberends if carlin++'s patch to setting/IO/Socket.pm fixes the recv() method as expected, many network client projects that were "hung" will now be fixed. carlin++ ! 05:36
patch in rt.perl.org/rt3/Public/Bug/Display.html?id=70017 05:37
05:39 envi^home joined
dalek p-rx: 4039648 | pmichaud++ | build/Makefile.in:
Improve "make clean" target a bit.
05:41
05:47 eternaleye_ joined 05:52 rhr joined 05:54 mikehh joined 05:58 quux joined 05:59 quux joined 06:09 JimmyZ joined 06:18 colomon joined 06:26 cotto joined 06:41 rfordinal joined 06:43 Bzek joined 06:59 xabbu42 joined 07:13 desertm4x joined 07:18 desertm4x_ joined 07:19 Su-Shee joined
Su-Shee good morning. :) 07:19
07:32 KatrinaTheLamia joined
moritz_ oh hai 07:32
pugs_svn r28896 | jimmy++ | [zh-cn/syn/S02-bits.pod] added a bit translations on Built-In Data Types 07:37
07:39 iblechbot joined 08:14 mariuz joined, tuxdna joined 08:18 envi^office joined 08:25 KatrinaTheLamia joined 08:36 rfordinal joined 08:39 dakkar joined 08:49 eternaleye_ joined
carlin S32-io talks about a socket.get function that returns data up to the first occurrence of a specific value (eg "\\n"). Would it be worth writing a patch to implement that? (given how up in the air anything in S32-io is) 09:03
moritz_ carlin: yes
09:04 pnate2 joined, tuxdna joined
carlin alright :-) 09:06
carlin gets to work
moritz_ if a HTTP server can read line by line, that's certainly helpful :-)
09:14 rgrau joined 09:24 xenoterracide joined 09:49 snarkyboojum_ joined 09:50 masak joined, tuxdna joined 09:51 zamolxes joined
jnthn oh morning 09:52
A new week is upon us.
moritz_ it is 09:53
mathw oh hai
moritz_ jnthn: how was your trip to italy?
masak mornin' 09:54
moritz_ masak: I'm disappointed you didn't make the ticket with number 70000 :-)
jnthn moritz_: Trip was nice.
moritz_: getting up at 4:30am for the flight home was less so. 09:55
masak moritz_: heh.
moritz_: I was pretty knocked out yesterday. 09:56
moritz_ carlin: might I ask you to also write some tests for RT #70017? that would be really awesome
masak: hope you feel better now 09:57
carlin moritz_: sure, I had intended to do it earlier but got distracted 09:58
masak moritz_: a little. I need to recover, is all. 09:59
moritz_ carlin: \\o/
luckily the DST -> non-DST switch bought me an hour back 10:02
so my sleep cycle automatically became a tad more normal
masak nod.
10:03 donaldh joined
moritz_ wow, apache's log file for perl6.org has grown considerably 10:04
let's see if rakudo makes it through without a segfault :)
10:07 KatrinaTheLamia joined
carlin rakudo: my $foo-bar = 'quux'; 'quux' ~~ / $foo-bar /; 10:10
p6eval rakudo 49e62f: OUTPUT«Confused at line 2, near "bar /;"␤in Main (file <unknown>, line <unknown>)␤»
carlin Is it possible to write that in a way that works? 10:11
moritz_ with eval
10:11 daemon joined
masak carlin: with... what moritz_ said. 10:11
10:11 xinming_ joined
moritz_ moritz.faui2k3.org/tmp/access.svg # updated access statistics for perl6.org 10:15
it'll be interesting to know how it looks like in April or May 2010 :-) 10:16
masak indeed.
carlin: it's possible to get quite close to the real syntax with a bit of trickery. 10:17
rakudo: sub r($rx, &c) { my $s = c($rx); return c("/$s/") }; my $foo-bar = "quux"; my &c = { eval($_) }; say "quux" ~~ r(q/ $foo-bar /, &c)
p6eval rakudo 49e62f: TIMED_OUT
masak p6eval: you're very slow, you know that?
10:17 pmurias joined
carlin I'm writing it in the setting, would eval be alright there or it would it be better to alias the variable to a name without hyphens? 10:18
10:18 KatrinaTheLamia joined
moritz_ carlin: are you sure you can't work with index() or rindex() or split or so instead? 10:19
carlin Indeed, index() will work. Thanks 10:23
moritz_ found a nice real-world use for rindex last weekend
$/.from - $/.orig.rindex("\\n", $/.from) # column at which the match starts 10:24
10:24 tuxdna joined 10:42 tuxdna joined 10:47 rfordinal left 11:03 tuxdna joined, szabgab joined
masak yes, rindex is occasionally very useful. 11:13
11:24 pmurias joined
pmurias diakopter: hi 11:24
dalek ok: acc87f8 | moritz++ | docs/TODO:
[docs] add TODO file which holds a list of technical TODOs
11:38
ok: fa5f59c | moritz++ | docs/TODO:
[docs] one more technical TODO
11:44
11:47 synth joined
moritz_ devwhy.blogspot.com/2009/10/loss-of-zfs.html "pioneers are the ones with arrows in their back" 11:50
11:54 lichtkind joined 12:04 takadonet joined
takadonet morning all 12:05
moritz_ \\o/ 12:07
colomon morning!
12:11 astrojp joined 12:21 zloyrusskiy joined 12:29 SmokeMachine joined 12:31 envi^home joined 12:32 Bzek joined 12:34 mikehh joined 12:40 jsut joined 12:42 lichtkind_ joined
PerlJam good morning #perl6 12:56
moritz_ good morning PerlJam 12:57
jnthn morning, PerlJam
masak oh hai PerlJam
moritz_ PerlJam: do you have an estimate of how much time you spent for the release? 12:58
PerlJam moritz_: 2-3 hours, most of that time was waiting for the spectests
moritz_ PerlJam: ok, that roughly matches my experience 13:00
13:01 mikehh joined 13:05 frederico joined 13:14 meppl joined 13:17 mikehh joined
masak carlin++ # recv patch 13:23
13:23 iblechbot joined
jnthn Did it get applied yet? 13:25
masak dunno.
moritz_ no
masak: feel free to apply though
masak oki. 13:26
13:53 Schwern joined 14:00 alester joined 14:06 nihiliad joined 14:19 KyleHa joined 14:22 frew joined 14:26 KatrinaTheLamia joined
lisppaste3 jsut pasted "should this work? (constructor delegating to subclass)" at paste.lisp.org/display/89294 14:26
moritz_ oh ouch 14:27
you need to pre-declare SubThing before you can use it 14:28
but that's not yet implemented in rakudo
the best thing you can do for now is probably to have a subroutine instead 14:29
which calls the appropriate constructor for you
masak rakudo: class Thing {}; class SubThing is Thing {}; class Thing is also { method new() { return SubThing.new() } }; Thing.new 14:30
p6eval rakudo 49e62f: TIMED_OUT
moritz_ p6eval--
14:31 p6eval joined
jsut|work in the actual implementation i intend to also create the subclasses name dynamically, and attempting to load it 14:31
moritz_ rakudo: class Thing {}; class SubThing is Thing {}; class Thing is also { method new() { return SubThing.new() } }; Thing.new
p6eval rakudo 49e62f: TIMED_OUT
jsut|work there is lots of other stuff i can fool around with and not worry about that for now.
moritz_ doesn't udnerstand that
jsut|work in p5 there is URI, and URI::http etc etc 14:32
URI.pm doesn't actually have use ... for all of them
it just requires the ones it needs when you try to create an instance of them.
so URI.new('lolol.org') would return an instance of URI::http 14:33
moritz_ jsut|work: my not understanding was about evalbot not working, not about your things
jsut|work ahhh
ok ;)
on the cl that gives me: maximum recursion depth exceeded ... 14:35
moritz_ that would explain the timeout :-) 14:36
jnthn jsut|work: Isn't that correct, though?
jsut|work: new is normally inherited from Object
Here you've put in the parent class another new method
And thus subclasses of the parent will see that new method.
And thus you're doing a recursive call.
So I think Rakudo is correct here. 14:37
14:37 ryan\\n\\n joined
jsut|work that's an error in my simplification i think. 14:38
but maybe it's messed up in the other version too, i'll de simplify 14:39
moritz_ rakudo: for 1..100 { }; say "alive"
p6eval rakudo 49e62f: OUTPUT«alive␤» 14:40
moritz_ rakudo: for 1..1000 { }; say "alive"
p6eval rakudo 49e62f: OUTPUT«alive␤»
moritz_ rakudo: for 1..10000 { }; say "alive"
p6eval rakudo 49e62f: OUTPUT«alive␤»
lisppaste3 jsut annotated #89294 "untitled" at paste.lisp.org/display/89294#1
moritz_ rakudo: for 1..1e5 { }; say "alive"
jsut|work added a constructor to the slass that just calls bless, still blows up.
p6eval rakudo 49e62f: TIMED_OUT
moritz_ jsut|work: you still need to pre-declare SubThing, as masak++ demonstrated above 14:41
rakudo: class Thing {}; class SubThing is Thing { method new() { bless(*) }}; class Thing is also { method new() { return SubThing.new() } }; Thing.new
masak but I also agree with jnthn++ that you should actually be getting an infinite loop from that. 14:42
p6eval rakudo 49e62f: TIMED_OUT
jsut|work if i use moritz's is also, then it works
jnthn You probably menat return SubThing.bless(*)
14:42 payload joined
jnthn Well, probably wanted... :-) 14:42
jsut|work i have no idea what i mean, i just try stuff ;)
jnthn ;-)
Talking of trying stuff...let's get Rakudo building on latest Parrot again. :-) 14:43
jnthn makes a branch
masak jnthn++
jnthn oh, ouch
we actually...fail at building Parrot.
lisppaste3 jsut annotated #89294 "This ond doesn't blow up" at paste.lisp.org/display/89294#2
14:44 justatheory joined
jsut|work i don't know if that actually helps with with what i was actually trying to do or not. 14:44
it does actually result it me getting a SubThing object though :D
moritz_ that looks pretty much like what you wanted, no? 14:45
jsut|work yeah
now i just need to get it to work where i'm dynamically creating the class name of the subclass
but i should probably do some work work and save that for later 14:46
my most recent floundering (from yesterday) is in here: github.com/jsut/URI.p6
moritz_ jsut|work: do you want that project added to proto, our prototype package installer? 14:47
14:48 payload joined
jsut|work it's not in any state where it'd make sense to install, but if you mean package it up so you can make; make test; make install; sure :D 14:48
masak that particular part is up to the project dev(s), I fear. :) 14:49
jsut|work i looked at what the had for Web.pm. then looked away cause it didn't seem like fun to play with
masak tell me more.
pugs_svn r28897 | carlin++ | [t/spec/S32-io] Add (fudged) tests for recv with a parameter
jsut|work i just wanted to be able to run tests, which i did liberate from your Makefile
masak :)
jsut|work i was just looking at the infrastructure, not actually into it's guts 14:50
masak ihrd++ has a project called uri in projects.list already.
jsut|work: that something you're familiar with?
jsut|work nope
masak github.com/ihrd/uri
jsut|work i was just using this as a way to learn a bit of p6
masak jsut|work: usually when people do the same thing independently, we investigate whether they can merge their efforts in some way. 14:51
but right now ihrd is pretty much MIA. he comes in here occasionally, but that's all.
14:52 zaphar_ps joined
jsut|work his implementation looks at first glance to be very http specific 14:52
masak ok. I'm no expert myself. 14:53
jsut|work: if you believe your project has some advantage to ihrd's uri project, we'd definitely want to see it in proto's projects.list eventually.
jsut|work i say that just cause in the base URI.pm he's got authority, and query, which don't exist in all URI's.
masak and preferably some collaboration, but that's up to you and ihrd.
jsut|work: I see. yes, that would make it HTTP-specific. 14:54
jsut|work this is mostly just a way to for me to learn some stuff, i have no great hopes for it to be the definative uri package or anything
moritz_ jsut|work: some day we'll be able to have multiple packages called URI, disambiguated by an "authority" specification 14:55
jsut|work: so there can be many URI.pm's
jsut|work that could be fun to manage ;)
moritz_ fsvo "fun" :-) 14:56
jsut|work ;) 14:57
15:01 eternaleye joined 15:06 PacoLinux joined
masak are labels slated for April? 15:13
moritz_ labels? 15:14
masak I don't find anything about 'label' in docs/ROADMAP
moritz_ as in, foo: thing?
masak as in those, yes.
primarily useful in deeply nested loops.
KyleHa I miss labels sometimes. 15:15
moritz_ maybe ask Tene++ about it, he sometimes does exception stuff like that
masak good idea.
15:15 nihiliad joined
moritz_ though it might be related to "D. Parrot context and return continuation handling" 15:15
pugs_svn r28898 | kyle++ | [t/spec] Test from Jason Cole 15:16
masak possibly.
[particle] what is the scope of a label? 15:17
15:17 Psyche^ joined
masak [particle]: my approach to implementing it (regardless of what the spec says) would be to make it have the smallest possible scope that's still practically usable. 15:20
KyleHa I thought Perl 5 labels were file scoped, but I didn't find a doc to back me up. 15:21
masak e.g. a label sitting on a for loop can only be next/last/redo'ed from within that for loop.
Tene masak: I have a plan for how to implement that; I just haven't done the work on it.
masak Tene: \\o/
jnthn That greatly increases the chances of Rakudo * supporting it. :-)
masak Tene: I'm starting to feel the need for some of my more complicated programs.
15:22 eternaleye joined
moritz_ masak: you can certainly help by writing some tests for it :-) 15:23
Tene masak: if you're blocking on it, first go make sure there are good tests for it, then come harass me again
masak :)
I might get to it tonight. I'm leaving myself a note.
moritz_ phenny: tell masak: mind the tests! 15:24
phenny moritz_: I'll pass that on when masak is around.
moritz_ :-)
masak phenny: you don't need to, I have my own...
phenny masak: 15:24Z <moritz_> tell masak mind the tests!
masak ...system right here.
moritz_ masak: now you just have to stay quiet ... too late :-)
masak I think I could produce a dozen tests or so quite easily for this. 15:26
and now that I know that Tene could have a use for them, I have the motivation. :)
just need to wait for the work day to end. :P
TimToady is back after a weekend sanity break 15:33
[particle] wonders about a label on a gather statement
TimToady er, that's a break *for* sanity, not a break *of* sanity
PerlJam TimToady: heh, I was about to ask :)
masak [particle]: well, since a gather is classified as a loop... 15:34
moritz_ sanity++
masak oh wait, that's 'given'.
TimToady the whole point of gather is to be orthogonal to control flow
masak nod. 15:35
[particle] so, labels on gather probably won't do what you mean
TimToady 'course, one could make a case for labeled gathers anyway, but maybe those are rare enough one should just push to named arrays 15:36
[particle] and that's fine. probably deserves mention, though.
mathw yeah that sort of scares me 15:37
TimToady KyleHa: labels don't have to be in the same file in Perl 5, though you can get warnings for leaving subs to search for a label outside that 15:38
KyleHa So a Perl 5 label is totally global? 15:39
TimToady global gives entirely the wrong idea
it's totally dynamic
mathw it just searches outwards until it finds it?
TimToady yes
and goto even searches back down some if it needs to
moritz_ that sounds not very efficient 15:40
TimToady intentionally :)
moritz_ :-)
mathw there are other priorities than the efficiency of goto... 15:41
like, the efficiency of all the structures you can use without getting eaten by the code quality velociraptor
15:41 mikehh joined
moritz_ raptor-driven design :-) 15:42
TimToady for Perl 6 I'd probably hoist goto-able labels up into a set of visible labels for each dynamic scope, and do the descending goto as a separate operation from scanning outward for a known label
15:42 ruoso joined 15:43 payload joined
TimToady since visible labels can be statically known, I suspect 15:44
goto can go up dynamic scopes, but only really goes back down lexical scopes
but certainly goto is not required for rakudo *, unless someone gets up the gumption 15:45
15:46 gbacon joined
jnthn suspects his gumption for implementing goto is pretty far down :-) 15:47
TimToady that's the "whatever" part of R*
hmm, that could be confused with the metaop, so maybe r* 15:48
15:50 masak joined
mathw suspects there are easier and more worthwhile things to implement in rakudo before r* 15:51
PerlJam mathw: like anything that extirpates "Null PMC Access" messages. That's a jihad I could get behind :) 15:53
KyleHa Hmm. I think of loop labels as pretty basic. I don't care if 'goto' works, but I really want to 'next' an outer loop sometimes. 15:54
Like here: perlmonks.org/?node_id=610246 15:56
15:59 fax joined
TimToady sure, that's just a control exception to a location that is known at compile time 16:00
KyleHa rakudo: 'aa' ~~ /(.)$1/; say 'alive';
p6eval rakudo 49e62f: OUTPUT«Null PMC access in get_string()␤in Main (file src/gen_setting.pm, line 295)␤»
KyleHa Is that supposed to die with a better error message, or is it supposed to live and match?
TimToady I think that, unlike with P5, P6 will distinguish syntax for static vs dynamic scope-leaving
so next FOO requires FOO to be a visible label 16:01
PerlJam KyleHa: die with a better message
KyleHa PerlJam: Thanks.
TimToady but next "FOO" does not, and doesn't warn
PerlJam KyleHa: it certainly doesn't match because $! didn't get set anywhere.
er, $1
16:01 masak joined
KyleHa PerlJam: I thought it might match since $1 is empty, and (.) does match. 16:02
TimToady rakudo: 'aa' ~~ /(.)$0/; say 'alive'
p6eval rakudo 49e62f: OUTPUT«alive␤»
PerlJam KyleHa: Hmm. good point. But then I'd expect it to be a "use of initialized value" warning or something
KyleHa In Perl 5, "aa" =~ /(.)$2/ matches and warns. 16:03
TimToady it means something else in Pelr 5
moritz_ KyleHa: note that in Perl 5 the $2 is interpolated before the match starts 16:04
TimToady: so "die with a nice error message" is the right thing to do?
TimToady I think it's arguable that an undefined variable never matches in P6
moritz_ std: /(.)$0/
p6eval std 28898: OUTPUT«ok 00:01 106m␤»
16:05 solarion joined
TimToady moritz_: die is almost never the right thing to do in Perl 6, because exceptions screw with parallel processing 16:06
moritz_ TimToady: well, that's something that can be detected at compile time, no? 16:07
TimToady: or would it use a $0 from the outer scope if the match object doesn't provide one?
TimToady not in the general case of undefined $foo
in the specific case it could deduce that it will be undef 16:08
certainly Perl 5 does something similar in deciding what \\10 means
moritz_ well, fail()ing or warn()ing certainly works for me 16:09
KyleHa thinks 10 means "too many captures".
TimToady thinks 10 means "bad language design" :)
moritz_ well,l probably both :-) 16:10
TimToady but Perl 1 had to make many compromises to include as much Unix-hood as possible
KyleHa OK, I think I'll write the test so that 'aa' ~~ /(.)$1/ lives. Maybe I'll even test what it does. 16:11
moritz_ you can just test nok 'aa' ~~ /(.)$1/; 16:12
KyleHa Good. Thank you, moritz++
moritz_ and maybe include a link to this discussion (about undef not matching) 16:13
PerlJam TimToady: so $0 vars mentioned in a regex always refer to the $/ of that match and not previous matches?
TimToady: to get the other thing you have pass them through a lexical or something that'll save state? 16:14
moritz_ there's always $OUTER::0 or OUTER::<$0> or whatever it's called :-) 16:15
PerlJam What makes $0 and friends different is that they aren't explicitly declared, so OUTER doesn't make as much sense to me 16:19
pugs_svn r28899 | lwall++ | [S05] spec that /$var/ warns and fails if $var is undefined
moritz_ PerlJam: maybe CALLER:: then? 16:21
that doesn't rely on explicit declaration, iirc
TimToady the actual lexical variable involved is $/, and may be accessed either via OUTER or CALLER as appropriate 16:22
lisppaste3 masak pasted "What would this script print in a Perl 6 implementation with a lazy gather?" at paste.lisp.org/display/89300 16:23
moritz_ masak: that's pretty much undefined, since the laziness is not guarantued by current spec 16:24
masak moritz_: will 'C' be in @a at all? 16:25
moritz_ masak: chances are that it'll not be
TimToady gather is dynamic, not lexical
moritz_ masak: and the you get a "take without gather" warning
erm, yes
PerlJam TimToady: I still don't have a good mental model of things. When is $/ declared? 16:26
moritz_ so regardless of laziness 'C' will not be in @a
TimToady PerlJam: it's not
every block automatically gets $_, $/, and $!
I suppose you could call that "declared" 16:27
PerlJam TimToady: so, $alpha ~~ /foo/; $beta ~~ /bar/; utilize the same $/ ?
TimToady yes, the regex is setting CALLER::<$/> in either case 16:28
which it can, since $/ is implicitly contextual
PerlJam okay, I got it now.
previously I think I was suffering some p5ism or something because I thought of each /regex/ as creating a new $/ 16:29
KyleHa So when 'aa' ~~ /(.)$1/ "fails", does that mean it does not match, or it produces a Failure object like fail()? 16:33
KyleHa is not firing on all cylinders today. 16:34
PerlJam KyleHa: it's a monday
16:34 broquaint left
KyleHa PerlJam: Not only that, I lost a couple of hours of sleep last night to my sick child. 16:35
Not complaining, more apologizing.
PerlJam KyleHa: I think you and I have the same problem but for different reasons. I went to bed around midnight last night, but couldn't go to sleep. Finally, sometime after 3:00am, I fell asleep to be awoken at 4:30am by my 3 year old son crawling into bed with us. 16:38
and then I got up at 6:00am for work.
16:41 simcop238 joined, icwiener joined
KyleHa If it were taking me that long to fall asleep, I'd chew some melatonin. 16:43
Su-Shee I read a book and drink milk with nutmeg, vanilla, cinnamon and honey. ;) 16:44
KyleHa That sounds yummy!
Su-Shee well if I can't sleep, I better have a relaxed, cosy hour instead. 16:45
PerlJam Su-Shee: warm or cold milk? 16:47
Su-Shee hot. 16:49
if you want to make it easy, use one of those "chai" mixes and just add nutmeg. 16:50
(works as hot chocolate as well ;) 16:51
16:51 cdarroch joined
TimToady KyleHa: in the context of a regex, "fail" just means "doesn't match" 16:51
masak mmm.
KyleHa TimToady: Thank you!
moritz_ TimToady: when things like '(' ~ ')' $stuff fails, does it set $!? 16:52
16:55 hercynium joined
pugs_svn r28900 | kyle++ | [t/spec] Tests for RT #70007 16:58
r28901 | moritz++ | [t/spec] unfudge IO tests which now pass 16:59
dalek kudo: 22ded10 | (Carlin Bingham)++ | src/setting/IO/Socket.pm:
Change IO::Socket.recv() to accept a parameter specifying the number of bytes which will be received
17:00 ejs joined
moritz_ carlin+++ 17:02
carlin++ even ;-)
17:02 pmurias joined, stephenlb joined 17:05 simcop2387 joined 17:10 xp_prg joined
masak moritz_: sorry I didn't apply that one. I was on my way, but got sidetracked by git reporting worrying problems related to object consistency. 17:11
moritz_++ # for applying the ticket
pmurias how can i make Inline::CPP stop including iostream.h during it's test suit (seems to result in an error on my system)? 17:12
masak swimming & 17:14
17:15 rfordinal joined
xp_prg I heart perl6 17:19
dalek p-rx: 09880e0 | pmichaud++ | src/NQP/ (2 files):
Refactor scope and variable declarators.
17:20
p-rx: 9f56d59 | pmichaud++ | src/Regex/Cursor-protoregex-peek.pir:
[regex]: Building a tokrx hash can result in the protoregex hash

we get the complete list of method names from the protoregex hash before we start building tokrx.
p-rx: 18624fc | pmichaud++ | build/ (2 files):
Bump PARROT_REVISION to get Parrot -t fixes, and fix build sequence
p-rx: 45d5132 | pmichaud++ | src/stage0/P6 (2 files):
Update bootstrap versions of P6Regex/P6Grammar.
moritz_ oh wow, pmichaud++ was productive again 17:21
jnthn Yeah!
Seems there's really Nice progress towards having NQP running fully again on the new infrastructure. 17:22
moritz_ phenny: tell markmont I've sent you a pugs commit bit, so that you can apply patches to the spectests yourself (for future patches ;-) 17:23
phenny moritz_: I'll pass that on when markmont is around.
17:24 Bzek joined
pmichaud actually, most of that was less "productive" and more "bugfix" 17:24
but I am about to add subs into nqp-rx
17:25 pnate joined
jnthn :-) 17:25
I'm going to eat dinner, hope I stop feeling so ill, and all being well try and get a bit further on the updates to run on Parrot trunk. 17:26
I've hit a segfault in the stage 1 so far though, which is like...gah.
pmichaud I've also decided that (like Perl 6) subs in nqp-rx will be lexical subs 17:29
(unless declared 'our')
japhb pmichaud, can I make an nqp-rx sub and invoke request?
pmichaud sure
japhb 1. slurpy args + flatten for call
2. optional params (positional is good enough) 17:30
pmichaud we already do optional params
(in NQP)
japhb pmichaud, really? I thought that wasn't working, hmmm. Probably error on my part.
But #1 still stands. Plumage's code has much ugliness to get around that.
pmichaud do you need flattened named args? 17:31
I'm likely to do both, but it'll be syntactical
i.e., |$foo probably won't work, but |@$foo will
japhb Not doing any named args yet ... mostly because all the places I would have wanted them, I'd also want flatten and/or slurpy. 17:32
pmichaud okay
17:32 NorwayGeek joined
pmichaud anyway, noted, likely to be added, yes. 17:32
japhb thank you
pmichaud ultimately I want to be able to use NQP to implement nearly all of PAST, and that will require argument flattening
moritz_ pmichaud: speaking of nqp-rx... just tell me when you think it's worthy to include it in p6eval
pmichaud moritz_: oh, good thinking! 17:33
japhb ... and I can get rid of ugly hacks like 'call_flattened'
pmichaud moritz_: it's almost ready now, I think.
jnthn japhb: I've used named params recently.
(in nqp)
And they worked for what i was doing. :-) 17:34
japhb jnthn, I meant, for the cases I had in Plumage's code.
pmichaud the piece that might be missing at the moment is that the default "make" doesn't yet build the nqp binary
I could add that I suppose.
anyway, time for lunch here. 17:35
bbiaw
17:36 payload joined 17:37 mikehh joined
TimToady moritz_: I don't think regex failure ever sets $! unless something goes seriously wrong 17:41
17:42 payload joined
moritz_ TimToady: so how does the caller find about the improved error messages that :dba and ~ are supposed to generate? 17:42
$/.err or so would wfm 17:43
TimToady well, .panic is something seriously wrong :)
moritz_ wfm too
TimToady std doesn't really give a way to capture that from a .parse yet 17:44
moritz_ well, it would be nice to have something in the spec, so that I can bother pmichaud to implement it, and use it in the book ;-) 17:46
(it's useful otherwise too... ;-)
17:50 tuxdna joined 17:53 Bzek_ joined 17:55 rfordinal left, stepnem joined
pugs_svn r28902 | kyle++ | [t/spec] Test for RT 69172 18:00
18:03 Util joined
Util rakudo: say $*KERNEL 18:04
p6eval rakudo 49e62f: OUTPUT«Contextual $*KERNEL not found␤␤»
18:04 payload joined
Util perl6" say $*KERNEL 18:04
perl6: say $*KERNEL
p6eval rakudo 49e62f: OUTPUT«Contextual $*KERNEL not found␤␤»
..elf 28902, pugs: OUTPUT«␤»
Util perl6: say $*OSNAME 18:06
p6eval rakudo 49e62f: OUTPUT«Contextual $*OSNAME not found␤␤»
..elf 28902, pugs: OUTPUT«␤»
pmichaud in nqp-rx, I've found it's helpful to have an extra parameter to .parse that specifies the starting rule 18:08
e.g. -- my $match = SomeGrammar.parse($text, 'integer'); 18:09
i.e., something other than TOP
moritz_ I wouldn't mind having that in the spec ;-)
TimToady that's :rule in STD
pmichaud so
my $match = SomeGrammar.parse($text, :rule<integer> ); # ??
if so, wfm. 18:10
TimToady see method initparse's args
pmichaud TimToady: did you see my question some time ago about the meaning of / abc <OtherGrammar::xyz> def / ? 18:11
i.e., is the "xyz" subrule called with a new cursor of type OtherGrammar, or ... ?
TimToady no, still backlogging while sitting in a Jiffy Lube with a TV blaring in my year :)
pmichaud okay
this was probably over a week ago :)
TimToady oh, well, in that case, I missed it 18:12
pmichaud np
I expect I'll come up with a fair number of small "how does this work" sorts of questions over the next couple of weeks.
I'm thinking I may just number them so we can refer to them (and you'll know if you've missed any :-)
TimToady #37 is 'no' 18:13
pmichaud got it. (for those who are curious, question #37 is apparently "have you answered all of my questions yet?")
actually, maybe I should keep the questions (and answers) as a file in a repo somewhere. pugs, I guess? 18:16
TimToady car done, biab &
avar pmichaud: +1 for writing it down, then other people could perhaps try to answer too.. 18:22
pugs_svn r28903 | pmichaud++ | Add a file "pm.txt" that records miscellaneous questions Pm has
r28903 | about the spec/implementation so we can keep a history of them
r28903 | and refer to them easily on #perl6.
avar looks like you agree:)
pmichaud svn.pugscode.org/pugs/misc/pm.txt
ummmm, how do I signal svn and/or the svn.pugscode.org server that the file is a .txt file? 18:23
(so that it doesn't try to send/download it as binary)
avar svn propset svn:mime-type text/plain pm.txt ? 18:24
but perhaps the server won't obey it
pugs_svn r28904 | pmichaud++ | Set svn:mime-type property on pm.txt.
pmichaud that did it. 18:25
avar++
avar whee
pmichaud TimToady: feel free to answer directly in the file or here on #perl6 :) 18:26
whichever is eaiest
*easiest 18:27
(if answered on #perl6, I'll move the answer into the file)
dalek kudo: fc56071 | markmont++ | src/ (3 files):
make $! always be a Perl object instead of sometimes being a Parrot Exception PMC.
18:28
pugs_svn r28905 | moritz++ | [t/spec] more tests for $!, patch courtesy of markmont++
18:33 beggars joined 18:35 broquaint joined 18:39 broquain1 joined 18:43 SmokeMachine joined
dalek kudo: 657d55c | (Kyle Hasselbacher)++ | src/setting/ (2 files):
[setting] make !% work with Whatever
18:45
18:46 __ash__ joined
__ash__ is anyone else having problems building rakudo? 18:47
KyleHa __ash__: What problem are you having?
__ash__ with the latest pull, anyway
various error: ‘struct parrot_interp_t’ has no member named ‘current_args’ problems
KyleHa I'll rebuild from scratch and see what happens... 18:48
__ash__ i just updated parrot to the latest, then built it, and then updated rakudo
it might be the version of parrot i am using?
KyleHa I think Rakudo still wants to use the released 1.7.0 Parrot. 18:49
jnthn __ash__: That means your Parrot is too new.
__ash__: Please use the Parrot noted in build/PARROT_REVISION.
__ash__ okay, i'll undo my parrot update
jnthn Rakudo needs significant updates to work with latest Parrot.
__ash__ major parrot changes? 18:50
jnthn Right.
I'm working on the udpates in the branch pccupdate
pugs_svn r28906 | kyle++ | [t/spec] unfudge passing test
18:52 glurks joined
KyleHa pmichaud++ # labeling low hanging fruit (LHF) 18:53
18:54 rgrau` joined
TSa HaloO 18:54
jnthn TSa: oh hai 18:55
colomon Is there a canonical Perl 6 way to remove duplicate strings from a list / array of them? 18:58
japhb rakudo: say ?undef; 18:59
p6eval rakudo 49e62f: OUTPUT«0␤»
japhb rakudo: say ?1
p6eval rakudo 49e62f: OUTPUT«1␤»
TimToady colomon: do you care about ordering on either input or output?
colomon TimToady: nope
Juerd @array.=uniq; would be nice to have :) 19:00
lambdabot Unknown command, try @list
Juerd lambdabot: I'd rather not :)
TimToady perl6: ('a'..'z').pick(20,:repl).uniq 19:01
p6eval elf 28906: OUTPUT«Can't call method "pick" without a package or object reference at (eval 126) line 3.␤ at ./elf_h line 5881␤»
..pugs: OUTPUT«*** No compatible multi variant found: "&pick"␤ at /tmp/Yio0HCJOP7 line 1, column 1 - line 2, column 1␤»
..rakudo 49e62f: ( no output )
colomon rakudo: ('a'..'z').pick(20,:repl).uniq.perl.say
p6eval rakudo 49e62f: OUTPUT«["x", "m", "j", "o", "r", "t", "u", "c", "a", "p", "n", "w", "e", "s"]␤»
jnthn rakudo: my @array = <a a b b b c d c a b>; say @array.uniq
p6eval rakudo 49e62f: OUTPUT«abcd␤»
colomon woo-hoo!
So why didn't I find .uniq in S32 Containers? Where should I have looked? 19:02
PerlJam rakudo: my @array = <a a b b b c d c a b>; @array.=uniq; @array.say;
p6eval rakudo 49e62f: OUTPUT«abcd␤»
TimToady colomon: you seem to assume that you should be reading the spec rather than writing it. :) 19:04
colomon TimToady: I have admit that of the spec, the spectests, rakudo's source, and the book, I'm of the opinion the last thing I should be writing is the spec. :) 19:05
TimToady lol
PerlJam Hmm. I could have sworn .uniq was already in the spec, but a quick ack proves me wrong. 19:06
19:12 pmurias joined
Juerd Hm, so this is implemented but not yet specced? 19:13
PerlJam Apparently
TimToady I'll wager it's only implemented for strings thus far 19:16
PerlJam rakudo: my @array = (1,2,3,4,2,3,1,5,1,3,3); @array.uniq.say
p6eval rakudo 49e62f: OUTPUT«12345␤»
PerlJam rakudo: my @array = (1,2,3,4,2,3,1,5,1,3,3); @array.uniq.say; say @array[0].WHAT; 19:17
p6eval rakudo 49e62f: OUTPUT«12345␤Int()␤»
TimToady where types that uniquely map to string hash keys also happen to work
PerlJam could be 19:18
colomon uniq, line 350 in classes/List.pir
First comment: TODO Rewrite it. It's too naive.
TimToady should really be based on %seen{Object} though, to get .WHICH semantics
colomon looks like it uses infix:eq by default for comparison? 19:19
PerlJam colomon: that's some low hanging fruit I think. uniq could be written in perl 6 :)
colomon PerlJam: I'm pretty sure I could do a naive Perl 6 version... 19:20
ah, see, this is what I get for looking at the spec rather than the spectests -- there's already a S32-list/uniq.t. 19:22
PerlJam That might be why I thought it was in the spec already.
19:25 lmc joined
colomon rakudo: my $a = "ab<alpha>cd"; say "abzcd" ~~ rx/ $a /; say $0; 19:32
p6eval rakudo 49e62f: OUTPUT«Null PMC access in get_string()␤in Main (file src/gen_setting.pm, line 295)␤»
colomon Known?
KyleHa I think so. I'm looking for it... 19:33
TimToady bad code
colomon TimToady: what's the right way to write it? 19:34
TimToady rakudo: my $a = "ab<alpha>cd"; say "abzcd" ~~ rx/ <$a> /; say $/
p6eval rakudo 49e62f: OUTPUT«Confused at line 2, near "$a> /; say"␤in Main (file <unknown>, line <unknown>)␤»
PerlJam Well, it shouldn't be a "Null PMC access". It should just not match.
colomon figured he was wrong, but "Null PMC is always a bug."
PerlJam (the original)
dalek p-rx: caa7f04 | pmichaud++ | src/cheats/hll-compiler.pir:
[hll]: Remove obsolete emulation of old grammar+action setup.
p-rx: 4c4a0e2 | pmichaud++ | (3 files):
[nqp] Initial subroutine declaration code (still missing params).
19:35 nnunley joined 19:39 Schwern joined
colomon std: my $a = "ab<alpha>cd"; say "abzcd" ~~ rx/ <$a> /; say $/ 19:39
p6eval std 28906: OUTPUT«ok 00:02 114m␤»
19:39 nihiliad joined
pmichaud rakudo/pge doesn't know variable interpolation in regexes yet. 19:39
(coming in the nqp-rx version, though) 19:40
colomon Huh, I thought I remembered doing that months ago.
\\o/
That's the right way to do it, though? rx/ <$a> / ? Creates a regex object using the contents of $a? 19:42
pmichaud yes. 19:43
colomon Danke. 19:44
jnthn Latest pccupdate branch sees us make it through the build.
Completely now.
However, not through startup yet.
pmichaud one can also do
my $a = /ab<alpha>cd/; say "abzcd" ~~ rx/ $a /; say $/; 19:45
(rakudo doesn't support that form yet, either)
colomon pmichaud: what exactly is $a in that example? 19:49
19:51 tuxdna joined
pmichaud it's a regex 19:51
just like if I do
my $b = { say 'hello'; };
then $b is a block/closure
colomon What's the difference between $a = /blah/ and $a = rx/blah/, then? 19:52
pmichaud "rx" gives you a place to add modifiers
pugs_svn r28907 | Util++ | [S32] Formatting - separated roots() from rand()
colomon ha! :)
dalek p-rx: 4c594ad | pmichaud++ | src/NQP/ (2 files):
[nqp]: Add simple parameters to signatures.
19:58
20:08 zamolxes joined 20:18 __ash__ joined 20:22 simcop238 joined
dalek p-rx: 8d35cab | pmichaud++ | src/Regex/P6Grammar/ (2 files):
[p6grammar]: Allow names of form category:sym�foo� .
20:23
p-rx: c4b8459 | pmichaud++ | (4 files):
[nqp]: Add relational ops, prefix ops.
pmichaud std: say(3,,4,); 20:25
p6eval std 28907: OUTPUT«[31m===[0mSORRY![31m===[0m␤Preceding context expects a term, but found infix , instead at /tmp/1K4tMwRQVr line 1:␤------> [32msay(3,,[33m⏏[31m4,);[0m␤FAILED 00:01 108m␤»
20:25 desertm4x joined
pmichaud std: say(3,4,) 20:25
p6eval std 28907: OUTPUT«ok 00:03 106m␤»
20:26 rfordinal3643 joined
dalek ok: faa1cec | duff++ | src/regexes.pod:
[regex] Added some text about character classes

  * Use the word 'anchor' consistently
  * minor grammatical and other textual changes
  * Mention :sigspace on rules
20:27
ok: 8f9db94 | (Solomon Foster)++ | src/regexes.pod:
Fix typo: s/subrle/subrule/
20:39
diakopter std: say ,1 20:42
p6eval std 28907: OUTPUT«[31m===[0mSORRY![31m===[0m␤Preceding context expects a term, but found infix , instead at /tmp/wpLK0oqBY5 line 1:␤------> [32msay ,[33m⏏[31m1[0m␤FAILED 00:01 104m␤»
20:45 ugs joined 20:46 baest joined
dalek p-rx: d38591b | pmichaud++ | (2 files):
[nqp]: Complete subroutine declarations (positionals only),
20:46
20:57 payload joined 21:02 hercynium joined 21:06 zloyrusskiy joined 21:13 zloyrusskiy joined 21:17 Whiteknight joined
moritz_ rakudo: say (* !% *)(5, 2) 21:27
p6eval rakudo 49e62f: OUTPUT«invoke() not implemented in class 'Boolean'␤in Main (file src/gen_setting.pm, line 295)␤»
moritz_ rakudo: say (5 !% 2)
p6eval rakudo 49e62f: OUTPUT«0␤»
KyleHa That Whatever !% thing not working as it ought, still? 21:34
21:34 hcchien joined 21:37 Su-Shee left
moritz_ right 21:40
at least not with two whatevers
rakudo: say (* !% 2)(5)
p6eval rakudo 49e62f: OUTPUT«invoke() not implemented in class 'Boolean'␤in Main (file src/gen_setting.pm, line 295)␤»
moritz_ rakudo: say (5 !% *)(2)
p6eval rakudo 49e62f: OUTPUT«invoke() not implemented in class 'Boolean'␤in Main (file src/gen_setting.pm, line 295)␤»
moritz_ wait
that's an older rakudo
from Oct 22 21:41
svn: Working copy '.' locked 21:42
that was the culprit
dalek p-rx: 64e2c87 | pmichaud++ | (3 files):
[nqp]: Add infix:<||>, infix:<&&>, and infix:<//>.
21:44
p-rx: ccd1d5b | pmichaud++ | (3 files):
[nqp]: More operators and tests.
21:45 ugs left
pugs_svn r28908 | kyle++ | [t/spec] Test for RT 65668, List.reduce: &infix:<+> 21:48
r28909 | kyle++ | [t/spec] Tests for RT #65672, multi does Callable
r28910 | kyle++ | [t/spec] Test for RT 65700, subtyped attributes in instantiation
21:56 zamolxes joined
moritz_ rakudo: 1 22:08
p6eval rakudo 657d55: ( no output )
moritz_ rakudo: say (* !% 2)(5)
p6eval rakudo 657d55: OUTPUT«0␤»
moritz_ rakudo: say (* !% *)(5, 2)
p6eval rakudo 657d55: OUTPUT«too many arguments passed (2) - 1 param expected␤in Main (file src/gen_setting.pm, line 295)␤»
moritz_ ha! 22:09
jnthn Ahh...I may have finally made some progress...
(on getting us running on Parrot trunk) 22:10
jnthn had been blocked on the same issue for a couple of hours
Aye, we survive startup again now. 22:13
Unfortunately, we appear to fail most of the sanity tests, though. :-(
oh, no wonder 22:14
Given that adding two numbers together is broken. 22:15
dalek ok: c0f92ed | moritz++ | src/regexes.pod:
[RX] more nit-picking, trailing spaces
22:24
p-rx: 190f5e9 | pmichaud++ | (3 files):
[nqp]: Add while/until/repeat_while/repeat_until .
22:25
p-rx: 01986c7 | pmichaud++ | t/nqp/14-while.t:
[nqp]: Add tests for "repeat [while|until] <xblock>" form.
22:28 Whiteknight joined 22:32 gbacon joined, Raugturi joined
pugs_svn r28911 | Util++ | [S32] Corrections for typos, mis-formatting, cut-and-paste errors, and other minor offences. 22:37
22:39 [particle] joined 22:44 constant joined
diakopter pmurias: ponghi 22:54
pmurias diakopter: hi 22:56
diakopter: i'm thinking we should release V8 on cpan 22:57
jnthn OK, good news and bad news. 23:16
diakopter pmurias: sure
jnthn: first the bad news?
moritz_ wants just the good news 23:17
23:17 quietfanatic joined
dalek p-rx: d9b2cc4 | pmichaud++ | (3 files):
[nqp]: Add 'for' statement and tests.
23:18
jnthn Good news: I've now got Rakudo running on Rakudo trunk. We pass all sanity tests. The benchmarks don't slow a huge slow-down.
pmichaud outstanding!
jnthn++
jnthn And so far I'm down to t\\spec\\S02-names_and_variables\\fmt and no sign of problems.
pmichaud I'm about halfway through nqp's test suite
23:18 rfordinal joined
jnthn The bad news: the spectests are running *really* slowly. 23:18
I don't know how much slower, but I can feel the difference.
My guess (wild guess) since the benchmarks that exercise various runtime things and especially binding lots of signatures didn't lose all that much, is that it must be a compile-time cost. 23:19
I'm fearing PGE and/or other things have gotten way slower.
pmichaud: Meh, not so outstanding: it's taken me over six hours to get us to this point. 23:20
And there's still one thing I know I gotta put back. 23:21
pmichaud I wonder if all of those :slurpy :named arguments in PGE are slowing us down :-|
jnthn pmichaud: I dunno.
pmichaud I think six hours is pretty good, considering the calling convention world changed :-)
I would've been guessing a day or two
fwiw, I would count the six hours as a vienna rakudo day
jnthn Well, this is the "just get it running again" patch.
pmichaud: oh, I counted it in on my signatures grant. 23:22
pmichaud fair enough
jnthn pmichaud: I've spent a lot of time on it, but not more than I was expecting really to get to this point.
pmichaud even better, ten
*then
jnthn pmichaud: Nested signatures are going to be not too much pain, since I already stubbed in a bunch of what I needed for them. 23:23
pmichaud I've spent a bit more time than expected on the nqp/regex stuff, but I'm very happy with the results and how much more easily things go together
nqp itself looks much cleaner now.
jnthn pmichaud: Which means my biggest concern is going to be the multiple returns.
pmichaud within the next day or two I expect I can be self-hosting nqp
er, nqp-rx
jnthn Yes, I've been glancing at your commits now and then and I'm liking it a lot.
pmichaud entirely self-hosted 23:24
moritz_ pmichaud: what are the plans for LTM?
pmichaud moritz_: work on them when I need them.
moritz_ ok
pmichaud I don't know that I'll get to them before december
that said, the protoregexes already know how to do a primitive form of ltm
they can do ltm for constant prefixes
they don't know how to do ltm for quantified character classes, such as \\w* 23:25
moritz_ well, it's a start.
jnthn I figure constant prefix LTM is still going to be a decent win.
pmichaud: Is that all of the "peek" stuff you've been putting in?
pmichaud jnthn: yes
just a sec, I'll dump a table 23:26
jnthn pmichaud: OK. I looked, but didn't understand it. ;-)
23:26 rfordinal joined
pmichaud gist.github.com/219139 # example of peek tables in action 23:28
whenever the parser is asked to parse a noun, if the next set of characters match any of those prefixes it knows immediately what rule(s) to check 23:29
and doesn't bother to attempt any of the others
(same for statement_control)
moritz_ so what does the empty string (first line of that hash) mean here?
pmichaud that hold rules that don't have a constant prefix 23:30
moritz_ ok
pmichaud i.e., it's the rules that get checked if none of the bigger-than-empty prefixes matched
jnthn Should be a win. 23:31
moritz_ and if one with a constant prefix and another one both could match, the one with constant prefix wins because of LTM rules?
pmichaud yes.
the longer prefixes win.
moritz_ finally thinks he understood some things
pmichaud for example, "qq" will win over "q" 23:32
gotta run to dinner -- bbl
moritz_ and both will win over \\w+?
pmichaud no
moritz_ guten appetit!
pmichaud I think \\w+ wins over q/qq if it happens to be longer
but qq would win over q\\w+
(assuming it was matching 'qq' literally)
that's the part that gets trickier 23:33
jnthn :-)
moritz_ so it's TODO
pmichaud it's easy to code constant strings -- full LTM patterns will take more doing
gone to dinner
moritz_ finds the thought of implementing full LTM pretty scary
jnthn moritz_: Yeah, me too.
moritz_ figuring out the LTM boundaries 23:34
then inline all the subrules, building a DFA
jnthn Yeah, that will be hard.
moritz_ (eliminating recursion along the way)
jnthn I'd not know where to start on that.
moritz_ the run the DFA
somehow track which branch matched
re-parse that to get the right captures 23:35
moritz_ shudders
diakopter TimToady: what do you think about making an option for std so it uses cached .ast (as well as cached .syml)... maybe not long term, but maybe so...
jnthn is glad he picked the easier bits of Rakudo to work on :-)
Whee. We're down to S05 and only S03-junctions/autothreading.t fails (and I knew it would, because I didn't actually put that part back yet). 23:36
moritz_ well, there are also scary corners in MMD
jnthn Well, yes. :-)
Those don't make my brain go quite so explodey though. :-) 23:37
"easier" != "easy" :-)
23:38 wknight8111 joined
moritz_ rakudo: say ?("easier" != "easy") # SCNR 23:38
p6eval rakudo 657d55: OUTPUT«0␤»
23:39 Nekonulo joined 23:40 nbrown joined
jnthn :-P 23:40
Nekonulo Erm... excuse me, I'm a relative perl6 newbie. Everything runs fine, but for just messing around, I was hoping to find a way to turn stict off. I've tried google searching, and haven't been able to find anything... 23:45
moritz_ Nekonulo: that's not yet implemented in Rakudo 23:46
Nekonulo OK, thank you.
23:46 ihrd joined, ihrd left
moritz_ welcome to Perl 6 by the way 23:46
and if you build something cool, let us know ;-) 23:47
(and if not, tell us where you hit problems, that's valuable to know)
TimToady: in S05 "we define token patterns as those patterns that can be matched without potential side effects or self-reference" - that rules out both backreferences and recursion, right? 23:49
diakopter yes 23:50
moritz_ diakopter: thanks 23:51
wow, the LTM section in S05 is short and tough 23:53
23:53 tak11 joined
jnthn Ooh. Tests are into S12 and still only 1 fail. 23:54
moritz_ just a sanity check - LTM matches might still involve backtracking, right?
when you have two tokens t1 { <a> <.ws> <rest1> } and t2 { <b> <.ws> <rest2> }
then <t1>|<t2> perform a LTM of <a> | <b> 23:55
and the longer one (say <a>) wins
but then if <rest1> doesn't match
the engine will still try to match <t2>
pmichaud yes, they still allow for backtracking, to the degree that ratcheting allows it 23:56
moritz_ so in general (with more than two alternatives) it has to backtrack into the LTM to find the second-longest match
pmichaud correct
moritz_ ok, now I feel I have a pretty good hand-waving understanding of LTM
maybe I should write that up into a blog post or so 23:57
23:57 snarkyboojum_ joined
moritz_ and try to see if that shakes out some new uncertainties on my behalf 23:57
23:58 Chillance joined
jnthn would enjoy reading that 23:58
moritz_ but now it's time for sleep, maybe I'll get to it tomorrow or on Wednesday