Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2009-10-12

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:02 lumi joined #perl6
00:37 ihrd joined #perl6
01:03 pugs_svn r28767 | Util++ | [u4x] Fixed 3 typos in 3 files.
01:09 lumi joined #perl6
01:10 rhr joined #perl6
01:15 pugs_svn r28768 | carlin++ | [Spec/S29-functions.pod] Added some details about die and fail
01:16 orafu joined #perl6
01:16 rhr_ joined #perl6
01:17 zaphar_ps joined #perl6
01:19 pugs_svn r28769 | carlin++ | [Spec/S16-io.pod] Use Z<> to escape %*ENV<PATH>. Accidentally commited the last change. carlin--
01:30 zaphar_ps joined #perl6
01:38 tak11 joined #perl6
01:40 envi^home joined #perl6
01:44 lumi_ joined #perl6
01:46 KyleHa joined #perl6
01:48 tak11 joined #perl6
02:06 eternaleye joined #perl6
02:08 s1n_mini joined #perl6
02:29 pugs_svn r28770 | kyle++ | [t/spec] another short form test in nesting.t
02:50 synth joined #perl6
02:52 rhr joined #perl6
02:58 _jaldhar joined #perl6
03:02 cotto which synopsis covers * as a term?
03:11 PerlJam cotto: S02 I think
03:18 rhr joined #perl6
03:21 cotto PerlJam, thanks.  It's there, though it'll take a couple readings to understand it.
03:29 __ash__ joined #perl6
03:37 envi^office joined #perl6
03:43 cj joined #perl6
03:49 lumi joined #perl6
04:09 eternaleye joined #perl6
04:15 payload joined #perl6
04:29 masak joined #perl6
04:50 masak rakudo: say $x; my $x=4
04:50 p6eval rakudo d749d9: OUTPUT«Null PMC access in type()␤in Main (file src/gen_setting.pm, line 206)␤»
05:01 masak rakudo: my $a given $a
05:01 p6eval rakudo d749d9:  ( no output )
05:01 masak rakudo: my $a = 4 given $a
05:01 p6eval rakudo d749d9:  ( no output )
05:01 masak rakudo: my $a = 4 given $a; say $a
05:01 p6eval rakudo d749d9: OUTPUT«4␤»
05:02 eternaleye joined #perl6
05:11 orafu joined #perl6
05:28 JimmyZ joined #perl6
05:33 Bzek joined #perl6
05:38 zloyrusskiy joined #perl6
05:39 Bzek joined #perl6
05:40 TiMBuS joined #perl6
05:56 ihrd left #perl6
05:57 masak you know what I would like? a debugger that could go backwards in time.
06:02 masak usually I notice an error in some piece of state, and I want to go -back- and check what caused it.
06:03 masak at that point, rolling back the entire program makes a whole lot more sense than restarting it and trying to make it stop slightly before the last breakpoint.
06:05 masak basically, I want to have the whole program run on a sort of videotape, where I can ▶▶ and ◀◀ at will.
06:08 jrtayloriv joined #perl6
06:11 JimmyZ that's an ideal debugger.
06:11 masak let's build it! :)
06:13 eternaleye joined #perl6
06:27 masak "One drawback of trace based debugging approaches is performance. If every evaluation is logged, then a very large amount of information must be recorded. Not only does the recording of such information take time - it also takes space." http://tinyurl.com/yl4bhvj
06:33 lumi joined #perl6
06:39 moritz_ good morning
06:39 * masak waves happily
06:42 masak oh, and "go back to the point where this variable was last changed" would be nice, too.
06:47 szabgab joined #perl6
06:49 masak apparently gdb 7.0 is getting (or wioll haven be getting) reverse debugging: http://www.gnu.org/software/gdb/news/reversible.html
07:37 NorwayGeek joined #perl6
07:38 NorwayGeek joined #perl6
07:38 mariuz joined #perl6
07:57 Matt-W masak: That's kind of scary and brain-bending, but it could be very cool
07:58 masak Matt-W: I've done some research. seems there are two approaches, and that a combination of the two is sometimes employed: (1) fork / copy-on-write, (2) saving everything about a given snapshot.
07:59 Matt-W Mmm, that would seem plausible
08:09 jogla_ joined #perl6
08:27 * jnthn stumbles into the channel
08:28 jnthn Getting out of bed. Some days it's hard.
08:28 masak yayitzjnthn!
08:28 * moritz_ lays out a matrass so jnthn falls softly
08:29 NorwayGeek joined #perl6
08:29 masak I couldn't sleep tonight. I spent the 03-05 hours coding, and then decided I might as well start the next day.
08:29 moritz_ what did you code on?
08:30 masak I could tell you, but I'd have to kill you. :)
08:30 moritz_ you didn't happen to watch Jhonny English lately? :-)
08:30 masak no, it's just a meme floating around. :)
08:31 masak I'm not sure I should re-watch Johnny English. I remember it as being very bad in spots.
08:31 moritz_ it is
08:32 moritz_ I started watching it yesterday night, and quickly stopped again
08:32 masak probably wise.
08:32 masak watch the SICP lectures instead. they have an eternal quality about them.
08:33 masak or if it's entertainment you want, watch "Sita Sings the Blues" and "The Hunt for Gollum". both favourably licensed.
08:38 * moritz_ remembers learning a single  Finnish word by watching "Star Wrek - In the Pirkinning"
08:38 jnthn møøse?
08:39 masak that's Swedish, not Finnish :P
08:39 moritz_ "now" - it sounds something like "njyt" in Finnish
08:39 jnthn aww
08:39 carlin joined #perl6
08:40 jnthn It still bit my sister though.
08:40 masak 'nyt', according to translate.google.com
08:41 masak jnthn: come see our loveli lakes. and our excellent telephone system.
08:41 * jnthn nearly snorts his coffee over the keyboard
08:42 jnthn .Net framework is doing STM. http://kskky.info/wiki/STM.NETInFramework4
08:44 carlin rakudo: try { die 'foo'; }; $!.rethrow
08:44 p6eval rakudo d749d9: OUTPUT«Method 'rethrow' not found for invocant of class 'Exception'␤in Main (file src/gen_setting.pm, line 206)␤»
08:44 carlin rakudo: Exception.rethrow
08:44 p6eval rakudo d749d9: OUTPUT«Not a throwable object␤in Main (file src/gen_setting.pm, line 206)␤»
08:45 moritz_ rakudo: Exception.new.rethrow
08:45 p6eval rakudo d749d9: OUTPUT«Not a throwable object␤in Main (file src/gen_setting.pm, line 206)␤»
08:48 jrtayloriv joined #perl6
08:49 pmurias joined #perl6
08:54 NorwayGeek joined #perl6
09:00 NorwayGeek joined #perl6
09:03 carlin rakudo: try { die 'foo'; }; $! + 2;
09:03 p6eval rakudo d749d9: OUTPUT«get_number() not implemented in class 'Exception'␤in Main (file src/gen_setting.pm, line 206)␤»
09:03 carlin rakudo: my $x = Exception.new; $x + 2;
09:03 p6eval rakudo d749d9: OUTPUT«Method 'Num' not found for invocant of class 'Perl6Exception'␤in Main (file src/gen_setting.pm, line 206)␤»
09:03 carlin Why is Exception different from $!?
09:04 moritz_ rakudo: say ? try { die 'foo' }
09:04 p6eval rakudo d749d9: OUTPUT«Null PMC access in get_bool()␤in Main (file src/gen_setting.pm, line 206)␤»
09:04 moritz_ that's an auld one
09:04 moritz_ carlin: the whole Exception business is Very Rough and Very Wrong
09:08 carlin Okay. Just seems odd that $! would know its an Exception but not have any of Exception's methods
09:19 pugs_svn r28771 | moritz++ | [t/spec] fix a test in pick.t, was trying to call ok() with three arguments
09:33 jogla joined #perl6
09:36 mariuz joined #perl6
09:41 ihrd joined #perl6
09:41 ihrd left #perl6
09:49 NorwayGeek joined #perl6
09:53 NorwayGeek_ joined #perl6
09:59 NorwayGeek joined #perl6
10:05 donaldh joined #perl6
10:10 agentzh joined #perl6
10:11 pugs_svn r28772 | carlin++ | [Spec/S29-functions.pod] Fixed mistake with 'die'. carlin--, masak++
10:16 icwiener joined #perl6
10:16 lumi joined #perl6
10:17 jnthn \o/ Nice cold weather is coming. :-)
10:31 pmurias joined #perl6
10:41 meppl joined #perl6
10:41 pugs_svn r28773 | pmurias++ | [mildew-js] add a --server option to run as App::Persistent server
10:53 pmurias rakudo: token foo { {say "hi"}}
10:53 p6eval rakudo d749d9: OUTPUT«Confused at line 2, near "say \"hi\"}}"␤in Main (file <unknown>, line <unknown>)␤»
10:53 pmurias what's wrong with that?
10:54 pmurias perl6: token foo { {say "hi"}}
10:54 p6eval pugs:  ( no output )
10:54 p6eval ..rakudo d749d9: OUTPUT«Confused at line 2, near "say \"hi\"}}"␤in Main (file <unknown>, line <unknown>)␤»
10:54 p6eval ..elf 28773: OUTPUT«Can't locate object method "cb__RegexDef" via package "EmitSimpleP5" at ./elf_h line 2312.␤»
10:54 moritz_ pmurias: closures in regexes are NYI
10:54 jnthn pmurias: nyi
10:54 pmurias :(
11:17 payload joined #perl6
11:27 masak hah, there was a case of `Callable &var` in a signature in Web::Handler::Daemon, which broke when Rakudo got its param handling straight. :)
11:28 moritz_ rakudo++
11:28 masak better test coverage and an Emmentaler-like nightly smoke woulda caught that. now I discovered it manually instead. :/
11:29 moritz_ in case you need computing power for the nightly smokes...
11:29 moritz_ I can hand out access to a server with 4 cores, and 4 GB RAM
11:29 masak nice!
11:29 moritz_ it's the successor of the server on which p6eval used to live
11:30 masak I was going to default to bogging feather down during some low-activity time of day.
11:30 masak but a dedicated server sounds even better, of course. :)
11:32 Juerd You could of course run it on feather any time of day, with "nice"
11:33 Juerd There isn't really a predeterminable low-activity time of day on feather :)
11:33 masak good point.
11:33 Juerd It's idle most of the time, but you never know when, in advance :)
11:34 pmurias moritz_: having mildew nightly smokes would be great
11:39 moritz_ password sent by private message. Just be "nice" to everyone :-)
11:42 masak I'll see when I'll get around to Emmentaler. I keep telling myself I need the proto branch to land first.
11:42 moritz_ then make it land :-)
11:42 masak well, sure. I'd love to.
11:42 masak I'll see when I get around to that, too.
11:43 * moritz_ blames diakopter++ for giving mberends++ a shiny toy to play with
11:44 masak oh, no need to blame. distraction is an allowed part of the -Ofun game. :)
11:44 moritz_ I hope that people don't take me serious when I say such things.
11:45 masak the karma plusses were a tip-off, I guess.
11:45 moritz_ I'm fully aware of all the implactions that come with voluntueer effort, -Ofun, interfering real-life, health, and the KitchenSink :-)
11:45 masak but I suffer from chronic taking-people-serious-itis.
11:45 masak s/ous/ously/
11:49 masak I'm finishing up a Web.pm week, by the way. this week I'm determined to finally put Druid on the Web.
11:50 colomon \o/
11:50 colomon masak: is the proto work that needs to be done something mere mortals could do?
11:51 moritz_ I think mere mortals who figure out Complex.pm rewrites in rakudo are welcome in pretty much every Perl 6 project :-)
11:51 masak colomon: oh, I should think so. locate the branch and read the TODO list in the proto script.
11:51 masak hold on, I'll find it for you.
11:51 moritz_ hugme: show proto
11:51 hugme moritz_: the following people have power over 'proto': PerlJam, TimToady, [particle], masak, moritz_, pmichaud. URL: http://github.com/masak/proto/
11:52 masak colomon: http://github.com/masak/proto/raw/installed-modules/proto
11:52 masak bottom part of that file.
11:52 colomon That's perl 5!
11:53 masak oops. we're found out. :P
11:53 masak very little of proto is actually Perl 5.
11:53 colomon I see the TODO now.
11:53 masak only enough to bootstrap in the case of no Rakudo.
11:55 colomon woah, every todo I've looked at so far is done...
11:55 masak mberends++
11:56 masak viklund++
11:57 colomon seems like it's 75% done, at least.
11:57 masak aye.
12:03 tylerni7 joined #perl6
12:05 masak I can now make moves locally on a Druid board in my browser.
12:05 masak the moves show, but they don't stick. time to add persistence.
12:07 masak oh, and for people who might be getting their hopes up: it's an ASCII board, and the available moves are a heap of hyperlinks along the bottom of the page. :)
12:07 moritz_ heh :-)
12:08 masak I was hoping if I showed an appalling lack of taste, people might volunteer to help. :)
12:08 moritz_ just like I designed perl6.org :-)
12:08 masak perl6.org went on to become the biggest Perl 6 publicity stunt to date.
12:09 masak just go to #perl and see. they're still admiring the butterfly over there. :)
12:09 moritz_ oh, are they? :-)
12:09 masak in very explicit praise.
12:10 masak they laud the specific associations the mascot conjures up, and how well the connotations harmonize with the average corporate environment.
12:11 masak at least they did when I was there a few days ago.
12:11 masak maybe they don't have #perl6 visitors often, and felt like talking about it. :)
12:15 jnthn .oO( the average corporate environment sings gay? ;-) )
12:17 * jnthn was kinda bemused - and often amused - by the comments on perl6.org
12:19 masak I think it was TimToady++ who said "I haven't seen anyone jolted yet who couldn't use a good bit of jolting"
12:20 hirschnase joined #perl6
12:21 NorwayGeek joined #perl6
12:21 Matt-W :)
12:22 Matt-W That's a pretty good outlook
12:23 masak yeah, but I'd say judging by some comments on #perl, some people get jolted and stay that way. :)
12:23 jnthn People are people.
12:24 carlin If they didn't have the butterfly they would find something else to whinge about
12:24 moritz_ http://moritz.faui2k3.org/tmp/access.svg # perl6.org has a steady stream of about 300 to 400 visitors per day
12:24 masak \o/
12:25 Matt-W even if they're only going to whinge, they're at least seeing it
12:25 Matt-W PERL 6 EXISTS
12:25 Matt-W \/
12:25 Matt-W \o/
12:25 Matt-W \oo//
12:26 masak :)
12:26 JimmyZ joined #perl6
12:27 BinGOs it must be Christmas.
12:27 masak perl6: my @a; say @a.perl; @a = eval(@a.perl); say @a.perl
12:27 p6eval rakudo d749d9: OUTPUT«[]␤[[]]␤»
12:27 p6eval ..pugs: OUTPUT«[]␤[[],]␤»
12:27 p6eval ..elf 28773: OUTPUT«[]␤[]␤»
12:27 moritz_ "Perl 6 - A bit more Christmas every day"
12:27 masak is there supposed to be an invariance principle involved in using .perl and then eval?
12:28 moritz_ masak: yes, in scalar context there is invariance
12:28 masak because Rakudo currently coats arrays with an extra layer of... array.
12:28 masak I like elf's reply better.
12:28 moritz_ rakudo is correct according to the spec
12:28 masak moritz_: oh, scalar context. gotcha.
12:28 moritz_ perl6: my @a = 1, [2, [3]]; say @a.perl; @a = eval(@a.perl); say @a.perl
12:29 masak so I have to compensate specifically for arrays somehow...
12:29 p6eval pugs: OUTPUT«[1, [2, [3,]]]␤[[1, [2, [3,]]],]␤»
12:29 p6eval ..rakudo d749d9: OUTPUT«[1, [2, [3]]]␤[[1, [2, [3]]]]␤»
12:29 p6eval ..elf 28773: OUTPUT«[1,[2,[3]]]␤[1,[2,[3]]]␤»
12:29 moritz_ and hashes.
12:29 masak aye.
12:29 masak don't have any hash attributes in Druid::Game, though.
12:38 masak \o/ persistence works! I'm playing against myself in the browser.
12:39 masak it all has serious potential for improvement, but it's still kinda cool to see it work.
12:40 moritz_ URL? :-)
12:41 masak http://127.0.0.1:8888/ # though that's probably not what you meant
12:41 masak you'll just have to wait for today's blog post like everyone else.
12:42 * moritz_ sulks :)
12:42 masak if I'm very brave, I'll put up a running application on feather, and people can play each other under -very- controlled circumstances.
12:42 masak the webapp doesn't even have the concept of users yet, so anyone can make a move in the ongoing game...
12:59 abra joined #perl6
13:00 cognominal what is the way to generate a yaml tree from a p6 program with gimme5?
13:01 cognominal apparently  gimme5 processes STD.pm to generate a p5 program using moose
13:02 moritz_ maybe you want STD5_dump_match instead of gimme5
13:03 moritz_ or I think you can simply use STD; my $r = STD->parsefile($file, actions => 'Actions')->{'_ast'}
13:03 moritz_ and then use YAML to dump $r
13:03 cognominal thx
13:03 moritz_ see ./viv for an (albeit more elaborate) example
13:06 cognominal perl STD5_dump_match  STD.pm
13:06 cognominal Odd number of elements in hash assignment at STD.pm line 180.
13:06 cognominal Byte order is not compatible at ../../lib/Storable.pm (autosplit into ../../lib/auto/Storable/_retrieve.al) line 380, at Cursor.pm line 1611
13:06 cognominal ...asking for the impossible :)
13:06 moritz_ sounds like you need a 'make clean' and then 'make' again
13:07 moritz_ is $_ supposed to be a context var?
13:07 moritz_ sub a { .say }; $_ = 4; a()
13:08 moritz_ rakudo: sub a { .say }; $_ = 4; a()
13:08 p6eval rakudo d749d9: OUTPUT«Use of uninitialized value␤␤»
13:12 moritz_ http://www.perlmonks.org/?node_id=800592 # nearly fully off-topic, but still worth a read, because it's written rather nicely
13:16 jnthn gah, I was debugging some web service stuff and my tea went cold... :-/
13:16 jnthn On the upside, it's fixed now, and I can hack on Rakudo again. \o/
13:16 moritz_ \o/
13:17 Matt-W somebody get jnthn a fresh cup of tea!
13:18 jnthn Righty. Now I've hacked up a first attempt at this signature binder, time to see if it will even vaguely pretend to work.
13:19 masak (things even vaguely pretending to work)++
13:20 Matt-W :)
13:26 jnthn lolsegv
13:26 masak I've had one "Bus error" today.
13:26 moritz_ awesome swedish transport facilities?
13:27 masak :P
13:27 masak but that's to be expected -- I'm higher on the abstraction stack than ever. running Druid which uses Web.pm which uses http-daemon...
13:32 Matt-W a lolsegv
13:32 Matt-W is that a more cheerful kind of segv than the usual kind?
13:33 masak must be.
13:34 masak it's the IM IN UR RAKUDO, SEG'IN UR V kind.
13:34 mdxi 0x101C47
13:34 masak :)
13:34 moritz_ :-)
13:34 synth joined #perl6
13:35 Matt-W haha
13:35 Matt-W mdxi++
13:36 jnthn lol
13:36 jnthn bwah, we didn't even make it into the new binder before segfaulting.
13:36 Matt-W well
13:37 Matt-W there's still the chance that code is thus perfect
13:37 Matt-W nestled amidst bugs that have nothing whatsoever to do with it
13:37 masak right...
13:37 masak returning to your regularly scheduled reality...
13:38 * moritz_ is quite confident that the test suite is large enough to catch at least one bug in the new binder :-)
13:38 Matt-W nah
13:38 Matt-W it'll be a bug in the test suite
13:39 moritz_ chances are that there'll be those, too :(
13:39 Matt-W somewhere in the spec it must say that you can't have multis called foo with Str, Int on Mondays in October
13:39 moritz_ as long as they work in November :-)
13:39 jnthn Matt-W: Close. There's an exception. If it's rained during the day, it's OK.
13:40 Matt-W :)
13:48 payload joined #perl6
13:52 jnthn OK, so my bugs were a missing sanity check that a PMC was of the right type (my test case was broken...)...
13:52 jnthn ...and my inability to call substr with the correct parameters.
13:52 jnthn http://gist.github.com/208396 # whee
13:52 Chillance joined #perl6
13:52 masak \o/
13:52 jnthn It's a PIR example, but it's basically implementing the Perl 6:
13:53 jnthn sub foo($a, $b) { say $a; say $b; }
13:53 jnthn foo(42, 69);
13:53 jnthn foo(69, a => 42);
13:53 jnthn foo(42, b => 69);
13:53 jnthn foo(a => 42, b => 69);
13:54 Matt-W so how does bind_signature know about $a and $b
13:54 jnthn Matt-W: See the :load :init block below
13:54 jnthn Matt-W: Which sets up the signature object.
13:54 Matt-W Aaah
13:54 jnthn set_signature_elem signature, 0, "$a", 128, $P1, $P0, $P0, $P0, $P0, $P0
13:54 jnthn set_signature_elem signature, 1, "$b", 128, $P1, $P0, $P0, $P0, $P0, $P0
13:54 jnthn Those two are the important lines.
13:55 Matt-W And in the sub 'foo' itself, the .lex lines set up places for the bound values to go?
13:55 jnthn Correct.
13:55 jnthn So our binder will bind straight into the lexpad.
13:55 jnthn This will get even better when Parrot gives us the raw CallSignature object.
13:55 Matt-W nice
13:56 Matt-W is that good for speed, because it feels like it should be
13:56 jnthn For now, we work off Parrot giving us the positionals and nameds.
13:56 moritz_ and I guess the various $P0, $P0 etc. are slurpy, optional, applied traits etc?
13:56 jnthn moritz_: No, actually the "128" there is setting up a bit field that carries most of those things.
13:56 jnthn moritz_: They're for things like:
13:56 jnthn constraint type
13:56 jnthn type captures we need to bind
13:56 jnthn names if it's a named parameter
13:57 jnthn Actually, the binder supports (in theory) named parameters with multiple names out of the box too.
13:57 jnthn Matt-W: Yes, in some senses that's a win. But there are bigger ones that we'll get out of this refactor.
13:58 jnthn Matt-W: For one, we only process each parameter once, rather than having Parrot do them, and then going over them again ourselves to do the type checks and advanced stuff.
13:58 Matt-W jnthn: You're always saying that, while backhandedly delivering a 10% startup time boost
13:58 jnthn Here we do it all in one.
13:59 KyleHa joined #perl6
13:59 jnthn Matt-W: No, really, that's not the huge win out of this.
13:59 jnthn The huge win is from not repeatedly doing things we do a lot of times now.
14:00 jnthn For example, in multi-dispatch today, even if the multi-dispatcher has decided that the nominal types mean we can bind - sometimes quickly from a cache - the sub still does all of the type checks while binding the signature anyway.
14:00 jnthn That can stop happening shortly.
14:01 moritz_ so the new binder will have an option that it tells if certain checks have already been performed?
14:01 jnthn Right.
14:01 jnthn The other thing we do very, very badly at the moment is a multi-dispatch when we have to do a bindability check rather than just going on nominal types.
14:02 Matt-W So when there are constraints
14:02 jnthn Because in that case, today we're doing an invocation of a bind checker, which attempts to invoke the sub, and uses an exception based mechanism to track success or failure, which it then goes back to the multi-dispatcher with.
14:02 Matt-W hmm that sounds unpleasant
14:03 Matt-W Was it a 'let's do this and make it work quickly' choice of implementation?
14:03 jnthn Yeah, but it gets worse - if it's OK, the multi-dispatcher then says "OK, let's invoke this one", and we do the binding work over again with all the checks.
14:03 jnthn Yes.
14:03 jnthn Now, we'll actually do all of the binding, and if it works out we'll just keep around the lexpad.
14:03 jnthn And then run.
14:04 jnthn This should help with startup time, because traits like "is export" are dispatched based on a named parameter, which implies a bindability check.
14:04 masak ok, so when I do ($a + $b) / 2 nowadays, I get a Rat?
14:04 Matt-W mmm
14:05 moritz_ masak: if ($a + $b) is an Int, yes
14:05 jnthn The other thing I've done is had the binder take a STRING **error. If that pointer is null, it won't bother spending time creating an error message about why it failed.
14:05 masak ah, yes.
14:05 Matt-W and almost every multi call will be faster
14:05 icwiener_ joined #perl6
14:05 masak and if I want an Int instead of a Rat?
14:06 masak rakudo: my @a = <a b c>; say @a[4/3]
14:06 moritz_ you use div
14:06 jnthn (Since the multi-dispatcher only wants to know, will it blend^Wbind, or not.)
14:06 p6eval rakudo d749d9: OUTPUT«get_integer() not implemented in class 'Rat'␤in Main (file src/gen_setting.pm, line 206)␤»
14:06 moritz_ rakudo: say 5 div 2
14:06 p6eval rakudo d749d9: OUTPUT«2␤»
14:06 * masak submits rakudobug
14:06 masak moritz_: thanks.
14:06 moritz_ rakudo: say (-3/4).Num.Int
14:06 p6eval rakudo d749d9: OUTPUT«0␤»
14:07 moritz_ rakudo: say (-3/4).Num
14:07 p6eval rakudo d749d9: OUTPUT«-0.75␤»
14:12 dalek nqp-rx: a8a7999 | pmichaud++ | src/ (4 files):
14:12 dalek nqp-rx: Code to create and capture submatches; Match objects built lazily.
14:12 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/a8a79998c9def1bae4f54f4d31d92424df2a8925
14:12 dalek nqp-rx: a0c9610 | pmichaud++ |  (8 files):
14:12 dalek nqp-rx: Refactor subrule matching a bit.
14:12 dalek nqp-rx: Correct Cursor-builtins to use new !cursor_pass method.
14:12 dalek nqp-rx: <alpha> matches underscore.
14:12 dalek nqp-rx: Update specialized dump_str method to check for new Match objects.
14:12 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/a0c96100455f3e1a337b5589914bfa5b30d13f88
14:12 dalek nqp-rx: 7155d02 | pmichaud++ | src/Regex/P6Regex/Actions.pm:
14:12 dalek nqp-rx: Add first (incomplete) version of <+subrule>.
14:12 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/7155d023e7910364ca45bc871ce60ee111be0f10
14:12 dalek nqp-rx: 90293e5 | pmichaud++ |  (2 files):
14:12 dalek nqp-rx: Add some more built-in regexes (char classes, word boundaries, etc.).
14:12 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/90293e5e44d0e7a95911acf05ff9e059b79e7614
14:13 masak pmichaud! \o/
14:13 Psyche^ joined #perl6
14:13 jnthn whow
14:14 edgar joined #perl6
14:15 am0c joined #perl6
14:16 Matt-W pmichaud++
14:21 masak rakudo: my @a = 5, 5, 5; if @a[ 0 & 1 & 2 ] == 5 { say "OH HAI" }
14:21 p6eval rakudo d749d9: OUTPUT«get_integer() not implemented in class 'Junction'␤in Main (file src/gen_setting.pm, line 206)␤»
14:21 masak Junctions. Bah.
14:22 masak I don't see what people get so excited about. They suck. :P
14:23 jnthn Just 'cus you know you've already ticketed that one... :P
14:24 masak hm, maybe... :)
14:25 masak I'll grant that junctions in hash/array assignments are problematic.
14:25 masak what's the difference between & and | in that case, for one thing?
14:26 timbunce joined #perl6
14:26 jnthn The type of junction you get back, presumably.
14:27 moritz_ aye
14:28 timbunce Anyone got a link to pmichaud's talk (I think it was, another would do) where he demonstrates the fibonacci series in perl6 using ...?
14:28 timbunce (I'm in Moscow updating my PerlMyths talk again before I present it later)
14:29 moritz_ http://pmichaud.com/2009/pres/ somwhere probably?
14:30 timbunce I'm already digging in there... :)
14:31 moritz_ and as always, updated charts are on rakudo.de
14:31 timbunce Ought to be in http://www.pmichaud.com/2009/pres/oscon-rakudo/slides/slide1.html somewhere but I've not found it yet.
14:31 timbunce moritz_: thanks!
14:32 jnthn timbunce: How's Moscow?
14:33 * jnthn didn't make it to Russia this year :-(
14:33 timbunce jnthn: wet, grey, cold. The natives are friendly though :)
14:33 jnthn timbunce: Such is autumn. But yes, the natives are great fun. :-)
14:40 ejs joined #perl6
14:44 abra_ joined #perl6
15:06 jnthn Nice.
15:06 * jnthn is now happy enough that the binder is sane enough to make an initial attempt to switch over to it
15:08 rdice joined #perl6
15:30 shinobi-cl joined #perl6
15:31 shinobi-cl perl6 : my ($val1, $val2) = (1, 2); say $val1~','~$val2;
15:31 shinobi-cl perl6: my ($val1, $val2) = (1, 2); say $val1~','~$val2;
15:31 p6eval pugs, rakudo d749d9: OUTPUT«1,2␤»
15:31 p6eval ..elf 28773: OUTPUT«syntax error at (eval 124) line 3, at EOF␤syntax error at (eval 124) line 6, near "}␤ ="␤ at ./elf_h line 5881␤»
15:32 shinobi-cl perl6: my ($val1, $val2) is constant = (1, 2); say $val1~','~$val2;
15:32 p6eval rakudo d749d9: OUTPUT«1,2␤»
15:32 p6eval ..pugs: OUTPUT«*** ␤    Unexpected "is"␤    expecting operator␤    at /tmp/CLAoeknE1t line 1, column 19␤»
15:32 p6eval ..elf 28773: OUTPUT«syntax error at (eval 124) line 3, at EOF␤syntax error at (eval 124) line 6, near "}␤ ="␤ at ./elf_h line 5881␤»
15:32 shinobi-cl perl6: my ($val1, $val2) is constant = (1, 2); say $val1~','~$val2; $val1 = 0;
15:32 p6eval rakudo d749d9: OUTPUT«1,2␤»
15:32 p6eval ..elf 28773: OUTPUT«syntax error at (eval 124) line 3, at EOF␤syntax error at (eval 124) line 6, near "}␤ ="␤ at ./elf_h line 5881␤»
15:32 p6eval ..pugs: OUTPUT«*** ␤    Unexpected "is"␤    expecting operator␤    at /tmp/mkTE5lOksz line 1, column 19␤»
15:33 moritz_ perl6: constant ($a, $b) = 1, 2; say "$a $b"
15:33 p6eval rakudo d749d9: OUTPUT«No applicable methods.␤in Main (file src/gen_setting.pm, line 206)␤»
15:33 p6eval ..pugs: OUTPUT«1 2␤»
15:33 p6eval ..elf 28773: OUTPUT«Unknown rule: scope_declarator:constant␤It needs to be added to ast_handlers.␤ at ./elf_h line 2850␤»
15:33 moritz_ ouch, that looks like a rakudobug
15:33 moritz_ rakudo: constant $a = 3; say $a
15:33 p6eval rakudo d749d9: OUTPUT«3␤»
15:33 shinobi-cl i was trying to define many constants in a compact way
15:34 moritz_ masak: care to submit? :-)
15:34 * masak cares to submit
15:34 moritz_ std: constant ($a, $b) = 1, 2; say "$a $b"
15:34 p6eval std 28773: OUTPUT«ok 00:02 115m␤»
15:35 shinobi-cl constant ($ERR_A, $ERR_B, $ERR_C) = (1..3); say "$ERR_A $ERR_B $ERR_C";
15:35 shinobi-cl rakudo: constant ($ERR_A, $ERR_B, $ERR_C) = (1..3); say "$ERR_A $ERR_B $ERR_C";
15:36 p6eval rakudo d749d9: OUTPUT«No applicable methods.␤in Main (file src/gen_setting.pm, line 206)␤»
15:36 shinobi-cl rakudo: constant ($ERR_A, $ERR_B, $ERR_C) = 1..3; say "$ERR_A $ERR_B $ERR_C";
15:36 p6eval rakudo d749d9: OUTPUT«No applicable methods.␤in Main (file src/gen_setting.pm, line 206)␤»
15:37 shinobi-cl rakudo: my ($ERR_A, $ERR_B, $ERR_C) = 1..3; say "$ERR_A $ERR_B $ERR_C";
15:37 p6eval rakudo d749d9: OUTPUT«1 2 3␤»
15:38 shinobi-cl is that a bug?
15:38 shinobi-cl std: constant ($ERR_A, $ERR_B, $ERR_C) = 1..3; say "$ERR_A $ERR_B $ERR_C";
15:38 p6eval std 28773: OUTPUT«ok 00:02 112m␤»
15:38 moritz_ yes
15:39 TimToady /e
15:40 shinobi-cl rakudo: constant $ERR_A = 1; $ERR_A = 2;
15:40 p6eval rakudo d749d9: OUTPUT«Cannot assign to readonly variable.␤in Main (file <unknown>, line <unknown>)␤»
15:40 masak Juerd: ping
15:40 shinobi-cl rakudo: constant ($ERR_A, $ERR_B) = 1,2; $ERR_A = 2;
15:40 p6eval rakudo d749d9: OUTPUT«No applicable methods.␤in Main (file src/gen_setting.pm, line 206)␤»
15:41 nihiliad joined #perl6
15:43 Juerd masak: pong
15:44 masak Juerd: I'm thinking whether it'd be possible to set up a live demo app of Druid in my home folder on feather.
15:44 masak thing is, it's not running Apache.
15:44 Juerd What problem(s) are you running into?
15:45 masak basically that I don't know what to do for the script to start running when I hit a given URL.
15:45 masak I know (approximately) how to do it with Apache.
15:45 moritz_ uhm
15:45 moritz_ if you don't have a web server
15:45 moritz_ it needs to run all the time
15:45 masak aye.
15:45 moritz_ and act as a web server itself
15:45 masak that's what it does.
15:45 moritz_ so you just start a screen session
15:46 masak that's the job of bin/web-druid
15:46 moritz_ inside the screen session you start bin/web-druid
15:46 moritz_ then you detach
15:46 moritz_ => the script continues running
15:46 masak and I can try this out without screen, of course?
15:46 * masak tries
15:47 moritz_ sure
15:50 masak g'ah, it's very hard to use a not-installed perl6 binary! :/
15:50 moritz_ well, install it!
15:52 masak how?
15:53 shinobi-cl a little off topic, but .. is there a 'standard' perl6 way to develop with i18n in mind?
15:54 moritz_ masak: make install
15:54 masak without being root?
15:55 moritz_ masak: if you built with --gen-parrot, it will install in rakudo/parrot_install/
15:55 masak shinobi-cl: that's not off topic. no, not that I know.
15:55 masak shinobi-cl: just have extensibility in mind, I guess.
15:55 masak moritz_: oki. I'll try that.
15:55 masak later.
16:00 shinobi-cl of all the i18n libs for perl 5 , what, in your opinion, is the best? (open question)
16:00 sparc left #perl6
16:01 NorwayGeek joined #perl6
16:02 envi^home joined #perl6
16:03 shinobi-cl for example, there is this one http://search.cpan.org/~audreyt/i18n-0.10/lib/i18n.pm
16:03 shinobi-cl i like the simplicity of it... but, i have 0 experience with i18n previously, so maybe there is a better one
16:04 NorwayGeek joined #perl6
16:11 parduncia joined #perl6
16:12 pmichaud_ joined #perl6
16:15 jnthn Arrrgh!!!
16:15 jnthn Parrot bites.
16:16 jnthn Assigning the same register to two lexical variables. Fail.
16:16 pmichaud also can't assign the same lexical var to more than one register :)
16:16 phenny pmichaud: 11 Oct 13:47Z <masak> tell pmichaud that compilers/pge/README.pod states "It also includes the "pgc.pir" grammar compiler, which can convert an entire grammar specification into the appropriate PIR code for execution." -- sounds cool, where's that file?
16:17 pmichaud phenny tell masak that it's now runtime/parrot/library/PGE/Perl6Grammar.pir  (and yes, it's being superceded by nqp-rx)
16:17 pmichaud phenny: tell masak that it's now runtime/parrot/library/PGE/Perl6Grammar.pir  (and yes, it's being superceded by nqp-rx)
16:17 phenny pmichaud: I'll pass that on when masak is around.
16:17 jnthn pmichaud: Heh, just when I thought things were going well. :-/
16:18 jnthn *sigh*
16:18 jnthn .lex "$a", $P25
16:18 jnthn .lex "$b", $P26
16:18 TimToady Are you getting confused between virtual registers and real registers?
16:19 jnthn TimToady: Well, apparently Parrot is...
16:19 pmichaud jnthn: that code looks okay to me.
16:19 jnthn TimToady: I was under the impression that if you said a register was going to be used to store a lexical variable, it'd reserve it.
16:19 jnthn pmichaud: Yes, I'm not initalizing $P25 and $P26 atm. Maybe doing that will fix it.
16:19 jnthn :-/
16:19 pmichaud the register allocator is doing that?
16:20 pmichaud i.e., giving two virtual registers the same real register?
16:20 pmichaud I thought the allocator had been disabled, mostly.
16:20 jnthn pmichaud: It appears to be, just confirming
16:21 jnthn pmichaud: Meh, yes
16:21 jnthn Looking up $a, it gives me reg 2.
16:22 jnthn And same for $b.
16:22 * pmichaud checks
16:22 shinobi-cl joined #perl6
16:23 TimToady moritz_: yes, $_ is contextual, but every block gets its own, so you never get the caller's $_ unless you say CALLER::<$_>
16:23 pmichaud jnthn: how are you doing the lookup?
16:24 TimToady except for bare blocks, which cheat with a signature of -> $_ is rw = OUTER::<$_> {...}
16:26 jnthn pmichaud: Calling VTABLE_set_pmc_keyed_str on the lexpad.
16:27 jnthn pmichaud: Which is looking in the hash...and handing back the same register number the second time around.
16:27 jnthn (e.g. the same one for both $a and $b)
16:27 pmichaud icky.
16:27 jnthn Indeed.
16:27 jnthn It's really odd.
16:28 jnthn In my test PIR script similar to this one, it doesn't appear to do this. :-S
16:28 pmichaud not from where I've been it isn't odd.  I lost weeks because of register allocator issues.  :-S
16:28 jnthn *sigh*
16:29 TimToady perl6: say 0 ** 0
16:29 p6eval elf 28773, pugs, rakudo d749d9: OUTPUT«1␤»
16:30 TimToady yay
16:30 TimToady perl 6: say [*] 0 xx 0
16:31 TimToady perl6: say [*] 0 xx 0
16:31 p6eval pugs, rakudo d749d9: OUTPUT«1␤»
16:31 p6eval ..elf 28773: OUTPUT«Parse error in: /tmp/8YX6Z5oPIr␤panic at line 1 column 0 (pos 0): Can't understand next input--giving up␤WHERE: say [*] 0 xx 0␤WHERE:/\<-- HERE␤  STD_red/prelude.rb:99:in `panic'␤  STD_red/std.rb:76:in `scan_unitstopper'␤  STD_red/std.rb:224:in `comp_unit'␤
16:31 p6eval ..STD_red/std.rb:210:in `…
16:36 TimToady perl6: say 3/4.WHAT
16:36 p6eval elf 28773: OUTPUT«Argument "\x{49}\x{6e}..." isn't numeric in division (/) at (eval 123) line 3.␤Illegal division by zero at (eval 123) line 3.␤ at ./elf_h line 5881␤»
16:36 p6eval ..pugs: OUTPUT«Inf␤»
16:36 p6eval ..rakudo d749d9: OUTPUT«Use of type object as value␤Use of type object as value␤Use of type object as value␤Use of type object as value␤Use of type object as value␤»
16:36 TimToady I guess nobody implements rat literals yet...
16:36 jnthn pmichaud: Heh. Turns out giving it an initial value works...
16:36 pmichaud jnthn: oh, yes.
16:37 pmichaud and if you use the register at all in PIR, then the allocator won't re-allocate
16:37 jnthn pmichaud: Which we need to do anyway so we don't explode when masak tries sub foo($a = $b, $b) { }.
16:37 jnthn ;-)
16:37 TimToady std: foo($a = $b, $b) { }
16:37 p6eval std 28773: OUTPUT«[31m===[0mSORRY![31m===[0m␤Unexpected block in infix position (two terms in a row, or previous statement missing semicolon?) at /tmp/BNlo23FLjj line 1:␤------> [32mfoo($a = $b, $b) [33m⏏[31m{ }[0m␤    expecting any of:␤    bracketed infix␤  infix stopper␤    standard
16:37 p6eval ..stopper␤ term…
16:37 TimToady std sub foo($a = $b, $b) { }
16:37 TimToady std: sub foo($a = $b, $b) { }
16:37 p6eval std 28773: OUTPUT«[31m===[0mSORRY![31m===[0m␤Can't put required parameter after optional parameters at /tmp/ZJscl7hFVK line 1:␤------> [32msub foo($a = $b, $b[33m⏏[31m) { }[0m␤    expecting any of:␤   constraint␤       parameter␤       trait␤   whitespace␤Other potential difficulties:␤
16:37 p6eval ..Variable $b is not p…
16:38 * jnthn hands TimToady a new set of fingers
16:38 TimToady WANT BRANES!!!
16:38 jnthn TimToady: fine
16:38 jnthn TimToady: There are other ways to break it. ;-)
16:38 jnthn std: sub foo($a = $b, $b?) { }
16:38 p6eval std 28773: OUTPUT«Potential difficulties:␤  Variable $b is not predeclared at /tmp/apjFn6475i line 1:␤------> [32msub foo($a = $b[33m⏏[31m, $b?) { }[0m␤ok 00:01 108m␤»
16:38 jnthn std: sub foo($a = eval('$b'), $b?) { }
16:38 p6eval std 28773: OUTPUT«ok 00:02 108m␤»
16:39 jnthn bwaha
16:39 jnthn :-)
16:39 TimToady but yeah, lexicals need to be born coredump proof for CATCH too
16:41 TimToady but perhaps we should say that depending on any body lexicals in the signature is erroneous and apt to explode
16:41 TimToady so we don't have to init all pad lexicals every time we try to bind
16:41 tak11 joined #perl6
16:41 stephenlb joined #perl6
16:42 abra joined #perl6
16:42 TimToady alternately, pad lookups need to be guarded not to run off the end of where we've initted to
16:43 TimToady std: my $b; sub foo($a = $b, $b) { }
16:43 p6eval std 28773: OUTPUT«[31m===[0mSORRY![31m===[0m␤Lexical symbol $b (from line 1) is already bound to an outer scope implicitly␤  and must therefore be rewritten explicitly as OUTER::<$b> before you can␤  unambiguously declare a new $b in the same scope at /tmp/o6vpUPsPaK line 1:␤------> [32mmy $b;
16:43 p6eval ..…
16:43 TimToady good
16:44 TimToady though your eval finesses that already
16:44 eMaX joined #perl6
16:45 jnthn Ah, fun. So now I've got the stage 1 compiler using the new binder. But then we generate invalid PIR for the setting. :-/
16:45 TimToady sprixel: say 3/4.WHAT
16:46 TimToady I guess it's officially busted at the moment...
16:46 diakopter hee
16:46 moritz_ I think diakopter removed the sprixel target from p6eval temporarily
16:47 TimToady moritz_: did you see my not re: $_?
16:47 TimToady *note
16:49 linguini joined #perl6
16:52 jnthn in my ($foo, $bar) = ...
16:52 jnthn The ($foo, $bar) here is a signature, yes?
16:52 moritz_ TimToady: yes
16:52 moritz_ thank you
16:53 parduncia joined #perl6
16:53 slavik pmichaud++
16:53 slavik :)
16:54 jnthn So does that mean what we really should be doing here is creating a signature and then binding it against what's on the right?
16:54 jnthn If so, how does this happen?
16:54 pmichaud that's a list assignment, not a binding.
16:55 jnthn pmichaud: OK, but it's parsed as a signature.
16:55 pmichaud sure, no problem.
16:55 jnthn As far as I can tell
16:55 pmichaud when evaluated, it becomes a list (parcel) of the declared variables.
16:55 jnthn OK, so what does it actually mean?
16:55 jnthn Aha.
16:55 pmichaud and then it's just a normal list assignment.
16:55 jnthn So really we just ask the signature, "what variables are declared within you"?
16:55 pmichaud we just have it return the variables
16:55 jnthn (at compile time)
16:55 jnthn OK
16:56 jnthn So is something like
16:56 jnthn my (:$a, :$b) = 1,2;
16:56 zloyrusskiy joined #perl6
16:56 jnthn No more interesting?
16:56 pmichaud I wouldn't make it any more interesting, now.
16:56 pmichaud *no.
16:56 jnthn That is, we just pull out the variable names, declare them, and do a list assignment?
16:57 pmichaud I'm not sure about the "pull out the variables names" part.
16:57 pmichaud but yes, the result should be a list consisting of ($a, $b)
16:58 jnthn pmichaud: Since we actually have a signature object now, I'm thinking the clean solution here is to ask it to give us the variable declarations.
16:58 jnthn pmichaud: That is, a compile-time signature object.
16:58 NorwayGeek joined #perl6
16:58 pmichaud I'm thinking the clean solution is for it to evaluate into a list of variables
16:58 pmichaud or is the signature no longer available at runtime?
16:58 jnthn pmichaud: Oh, it would.
16:58 jnthn pmichaud: I'm just thinking that the signature action always builds us a (compile time) signature object.
16:58 pmichaud the phrase "ask it to give us the variable declarations" sounds weird.
16:58 jnthn Which can be turned into the code to create a runtime signature object.
16:59 pmichaud I think "ask it to give us the variables"
16:59 payload1 joined #perl6
16:59 jnthn Or it can instead be turnd into a list of variables.
16:59 TimToady I think the syntax is a signature, but the semantics are not, so perfectly fine to rewrite the syntax into a list of variables when assigned
17:00 TimToady or maybe it's more like "for" binding, where each variable gets a shot at carving what it wants off the whole list
17:00 TimToady and @ and % assume slurpiness
17:01 jnthn pmichaud: What I'm thinking for here is for the signature action method always makes a Perl6::Compiler::Signature, and just have everything else use that - either by doing .ast to generate the code to build a signature, in the case of subs and signature literals, or by instead asking it to produce a list of variables declared within it.
17:01 jnthn Note, at compile time.
17:02 jnthn So the PAST we generate would just then be a bunch of variable declarations.
17:02 pmichaud ....why *declarations*?
17:02 jnthn Made into a list, and then it's all the same as today.
17:02 pmichaud you keep saying that word.
17:02 pmichaud ($a, $b)   is not a list of variable declarations.
17:02 jnthn pmichaud: ($a, $b) isn't parsed as a signature either.
17:02 jnthn pmichaud: I'm talking about e.g. my ($a, $b)
17:02 pmichaud oh, I see
17:02 jnthn :-)
17:02 pmichaud you're saying that    my Int $a;   isn't a signature
17:02 jnthn Right.
17:03 jnthn But my ($a, $b) is parsed as a signature.
17:03 jnthn (the $a, $b bit between the parens)
17:03 nihiliad joined #perl6
17:04 pmichaud just a sec, checking grammar
17:04 jnthn I'd just rather encapsulate the "what variables are named in this signature" into the Perl6::Compiler::Signature object.
17:04 jnthn Because otherwise, once we get into nested signatures, the code in scoped is gonna get nastier.
17:05 pmichaud anyway, unwrapping the signature into a list of variable declarations at compile time is fine with me.
17:06 pmichaud that's essentially what we do now.
17:06 jnthn pmichaud: Well, kinda.
17:06 jnthn pmichaud: The thing at the moment is that the signature action method is rather tied up with blocks too.
17:06 jnthn pmichaud: Which I think it's kinda not meant to be.
17:07 pmichaud it is and isn't.
17:08 pmichaud the "declarator" method in actions.pm turns off the tie to the blocks
17:09 jnthn pmichaud: ah, yes
17:09 pmichaud of course, when we have contextuals in place we can have signature dtrt at the outset
17:09 pmichaud instead of patching it up after the fact
17:10 jnthn pmichaud: Yeah.
17:10 jnthn pmichaud: I'm aware I can get us now to be exactly doing what STD is, put I'm trying to at least make it easier to get there later. :-)
17:10 jnthn *but
17:10 jnthn erm, can't
17:11 jnthn *sigh*
17:11 pmichaud afk, $otherjob calls
17:11 jnthn kk
17:11 jnthn Thanks for input.
17:11 * cognominal is impressed by nqp-rx. pmichaud++
17:11 pmichaud it's about to get better, thanks :)
17:12 pmichaud but the regex engine should be much more efficient, since we don't create match objects until we need them
17:12 pmichaud in particular, we end up not creating the match objects for  <.foo>,  <?foo>, and <!foo>  assertions :-)
17:13 pmichaud (including all of their nested subrule calls)
17:13 jnthn ooh, nice
17:13 cognominal i guess it will fix my two pet and mundane complaints about PGE,  lack of intelligent long char class ranges and lack of perl6 assertions.
17:13 * moritz_ reminds pmichaud to update docs/progress-graph.csv
17:13 pmichaud and we don't create the match objects for branches of the parse that ultimately fail
17:14 jnthn (less objects created in parse)++
17:14 tak11 joined #perl6
17:14 jnthn Less memory usage / GC pressure / time spent creating throw-away objects.
17:14 pmichaud I'm not sure if/when long charclass ranges will be fixed, it's not high on the list.
17:14 cognominal grammars are what convinced me that perl 6 will rock.
17:14 pmichaud perl6 assertions will work soon, though.
17:15 nihiliad joined #perl6
17:16 cognominal if nqp-rx is here to stay, I will be motivated to do the long charclass ranges.
17:17 pmichaud the tricky part is being able to decompose something like    <[abc\s\x100..\xffffzyx]>
17:17 pmichaud the tricky part is being able to decompose something like    <[abc \s \x100..\xffff zyx]>
17:18 pmichaud because it has to represent a set of at least three different node types
17:18 pmichaud all of which might be inverted by '-'
17:18 NorwayGeek joined #perl6
17:18 moritz_ -me fails to see how abc and \x100..\xffff are different, conceptually
17:19 moritz_ s{-}{/} ;-)
17:19 moritz_ irssi user fail ;-)
17:19 pmichaud right now the engines (both PGE and nqp-rx) build up a list of characters in the range
17:19 pmichaud so 0..9 becomes  "0123456789"
17:19 pmichaud but that's not practical for \x100..\xfff
17:19 moritz_ right
17:20 pmichaud so we have to have a special "match a character in this range" ndoe.
17:20 pmichaud *node.
17:20 pmichaud "abc" isn't a "match a character in this range" node, it's a "match a character in this list" node.
17:20 moritz_ which inversion lists could unify with simple enumerations (maybe)
17:21 moritz_ anyway, off to play some table tennis
17:21 moritz_ TTFN
17:21 pmichaud it'd be much easier (and more efficient) to keep separate nodes for character lists and ranges than it would be to try to create an inversion list for the entire unicode range of codepoints, though.
17:22 ejs joined #perl6
17:40 crythias joined #perl6
17:40 Confield left #perl6
17:41 Confield joined #perl6
17:52 kaiadev joined #perl6
17:57 TimToady a full bitmap for a Unicode class is only 140K  :)
17:59 TimToady I'd just process them all with full bitmaps and then compile down to a binary decision tree or some such
18:04 FOAD_ joined #perl6
18:27 cognominal how does perl5?
18:27 NorwayGeek joined #perl6
18:27 am0c joined #perl6
18:29 jnthn whoa...where did 5 hours go?!
18:29 * jnthn figures it's time for a break...and dinner.
18:31 am0c OH HAI
18:32 jnthn am0c: hi!
18:39 iblechbot joined #perl6
18:39 meppl joined #perl6
18:42 pmichaud (binary decision tree)  -- I'll let someone else come up with that.  :)
18:43 Bzek joined #perl6
18:43 jnthn delegation for the win :-)
18:46 masak joined #perl6
18:50 jnthn lolitsmasakwhoblogged
18:52 masak :)
18:52 phenny masak: 16:17Z <pmichaud> tell masak that it's now runtime/parrot/library/PGE/Perl6Grammar.pir  (and yes, it's being superceded by nqp-rx)
18:52 * masak thought so
18:53 jrockway joined #perl6
18:58 szabgab joined #perl6
19:06 rfordinal joined #perl6
19:06 rfordinal left #perl6
19:07 * jnthn should blog soon, but wants to reach a point where he feels he's made some progress worth blogging about.
19:08 jnthn Ooh, actually the signature introspection could is probably bloggable now. :-)
19:19 lumi joined #perl6
19:22 cognominal Cold case, c'est FBI porté disparu, sauf que les ficelles sont plus grosses :(
19:23 cognominal oops, wrong channel
19:24 cognominal jnthn, I can't wait to read you
19:40 szabgab_ joined #perl6
19:45 japhb joined #perl6
19:55 ShaneC joined #perl6
19:56 dalek nqp-rx: a1f5fa1 | pmichaud++ | src/ (2 files):
19:56 dalek nqp-rx: Initial code for detecting capture arrays.
19:56 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/a1f5fa1864dc69cc97eb87b97a2b2fdf2f6329cd
19:56 dalek nqp-rx: 8a90013 | pmichaud++ | src/ (2 files):
19:56 dalek nqp-rx: Fully handle arrayed subcaptures.
19:56 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/8a90013d0f81fa6b780eb1ff877e84073263670a
19:56 jnthn whee
19:57 jnthn pmichaud: Seems to be coming along rather nicely. :-)
19:57 pmichaud so far so good, yes.
19:57 jnthn pmichaud: What are the Huge Things left to do before you can parse Rakudo's grammar today? Or is it like, a huge list?
19:57 pmichaud it's a fairly big list
19:58 pmichaud and I haven't decided if I'm going to even aim to parse rakudo's grammar today.
19:58 jnthn Features to build on current infrastructure, or more infrastructure?
19:58 pmichaud bit of both.
19:58 jnthn Oh, hmm. :-)
19:58 jnthn That could make for an interesting switch...
19:58 pmichaud the challenge is that the new regex engine has a totally different (protoregex-based) operator precedence parser than PGE
19:59 pmichaud so all of the token definitions in grammar-oper.pg have no real equivalent.
19:59 jnthn Ah
19:59 pmichaud that also affects the metaops.
19:59 jnthn Ah.
19:59 jnthn This sounds...painful. :-)
19:59 pmichaud you can see why I haven't been in a hurry to do it.
19:59 pmichaud the change to protoregex-based stuff was a big one.
20:00 pmichaud (in the spec/design)
20:00 jnthn Yeah...I hadn't realized how deep the OPP stuff changed until like, in the last week.
20:00 lumi joined #perl6
20:01 pmichaud I may see if I can shim in something that is reasonably close to the old grammar-oper.pg stuff
20:01 jnthn That could be one way to approach it.
20:02 pmichaud but at some point it may just be easier to rebuild large portions of rakudo's grammar from scratch
20:02 jnthn Another could be starting with a fresh grammar and actiosn file and building up again.
20:02 pmichaud right
20:02 jnthn ah, yes, that :-)
20:02 pmichaud I'll have a much better idea after rebuilding nqp using the new tools
20:02 jnthn Sure. We can late-bind that one.
20:02 pmichaud in some ways I'm a big fan of the start-with-a-fresh-grammar approach
20:03 jnthn It's attractive, if a little intimidating at first.
20:03 pmichaud we could do it in a branch, with the two of us (and anyone else that wants to help!) we could knock it out fairly quickly.  I mean, we have the old version to work from.
20:03 jnthn If fairly quickly means a couple of weeks, I'd probably agree.
20:03 pmichaud yes, I think so.
20:04 flip621 joined #perl6
20:04 jnthn It will be quite some upheaval.
20:04 pmichaud sure, but I think it'll also be fun.
20:04 pmichaud There will be a lot of places where we can say "oh, this is so much easier!"  :)
20:04 jnthn I'm working a lot on my grant at the moment, and that plus my vacation means I'm going to have a good cache of Rakudo days.
20:04 flip621 Has someone looked at CFFI/swig for importing arbitrary library functions?
20:05 jnthn (I really, really want to land this sig refactor ahead of the next release.)
20:05 pmichaud that will be excellent, if you can make it :)
20:05 flip621 jnthn: was that meant for me, ie. that you'll trying to do this in the near future?
20:05 jnthn flip621: No, for pm, sorry :-)
20:05 pmichaud if not, it won't hurt to occur in the early part of the next release cycle.
20:05 jnthn pmichaud: Well, I've hit just now the usual Horrible Point when doing anything of this nature.
20:06 pmichaud are you likely to block on grammar/regex needs very soon?
20:06 jnthn No
20:06 pmichaud okay, good.
20:06 pmichaud we have a few horrible points to deal with over the next 4-5 weeks, I think.  :-/
20:06 stephenlb joined #perl6
20:07 pmichaud but unless someone else has a new strategic direction for us to move in, I think we just have to bear through them.
20:07 jnthn The Horrible Point I refer to is the "I can finish the build but don't survive startup" point.
20:07 pmichaud right.
20:07 jnthn It's really, really tricky for the current stuff I'm doing.
20:07 jnthn Because it turns out one of the things that exercises multi-dispatch most is...trait application.
20:07 jnthn Which we do at startup.
20:08 jnthn But of course, if it won't start, it won't run the test suite. :-)
20:08 jnthn So, some "fun" to track down what's up.
20:09 jnthn Once I get past that point, the sanity tests probably will Just Run, and it'll be on to tracking down stuff in the spectests.
20:10 jnthn Oh, and figuring out where to put the binder. :-/
20:10 jnthn (I think in with the dynpmcs, but an op needs to be able to call into it to. At the moment I've got it as a library of its own, but that ain't going to really work out.
20:10 jnthn )
20:11 jnthn Anyway, on with the Month Of Pain.
20:20 flip621 moritz: are you available for bot restarts?
20:20 shinobi-cl joined #perl6
20:21 jnthn oh, ouch, I suck
20:22 * jnthn deleted an important line of code instead of moving it...
20:23 pmichaud well, deleting counts as moving :-)
20:23 pmichaud it just moved somewhere unfortunate :)
20:23 jnthn :-P
20:23 jnthn It was the line that told the multi-dispatcher "no, you can't cache this result"
20:23 jnthn Meaning it did some...interesting...dispatches.
20:26 lumi joined #perl6
20:30 pmichaud afk for a bit
20:32 payload joined #perl6
20:38 gyyrog joined #perl6
20:39 gyyrog does anyone have a minute to help me with a perl question?
20:40 pmichaud perl 5, or perl 6?
20:44 moritz_ re
20:44 moritz_ which bot(s) need restart?
20:47 payload joined #perl6
20:50 colomon left #perl6
20:50 colomon joined #perl6
20:52 colomon \
20:52 jnthn o/
20:52 colomon my son typed that with his head
20:53 jnthn skill!
20:53 jnthn Another "o" and then it's a nice waving person.
20:54 Tene gyyrog: Perl 5, or Perl 6?
20:54 jnthn oh wow, we survive startup.
20:54 TimToady ship it!
20:54 Tene jnthn: what startup?
20:54 NorwayGeek joined #perl6
20:54 colomon \o/
20:54 jnthn Tene: Rakudo startup, with the new signature binder.
20:54 jnthn oh heh, but say doesn't work :-/
20:55 jnthn Win some lose some...
20:55 TimToady unshipt it!
20:56 colomon yeah, "say" is likely to be one of those commands people actually try out....
20:57 jnthn colomon: Eh, I only broke every method call, it's fine.
20:57 jnthn ;-)
20:57 shinobi-cl joined #perl6
20:57 TimToady as long as .HOW works, we can probably workaround it
20:57 colomon well hey, then you can still call subs, right?  ;)
20:58 jnthn colomon: Yeah, but say then re-dispatches to $*OUT.say ;-)
20:58 jnthn TimToady: Alternatively, I might just be willing to consider fixing it. ;-)
20:58 colomon all you need is a small change to the setting to fix that...
20:59 TimToady after all, Perl 5 gets along perfectly well without any method primitives
21:00 TimToady jnthn: I don't really care whether you're willing to consider fixing it, as long as you fix it.  :)
21:01 TimToady it's also okay to consider it even if you're unwilling...
21:02 jnthn Smartass. :-P
21:03 jnthn I've about figured out what's wrong, anyways. I think. :-)
21:04 lumi joined #perl6
21:04 jnthn \o/ say works
21:05 pmichaud say("no it doesn't");
21:05 jnthn We also almost manage the sanity tests.
21:08 cognominal jnthn FTW
21:08 Whiteknight joined #perl6
21:09 colomon \o/
21:09 jnthn I haven't optimized this yet, or even enabled fully enabled the performance wins this can give us, but a run of tools/benchmarks.pl shows some benchmarks running 2 times faster, others 4 times.
21:09 lisppaste3 gyyrog pasted "first time using a hash" at http://paste.lisp.org/display/88552
21:10 gyyrog can anyone help?
21:10 gyyrog i am getting really frustrated
21:10 moritz_ gyyrog: for perl 5 questions I recommend http://perlmonks.org/
21:11 zamolxes joined #perl6
21:11 jnthn Startup only won minorly, but I'd already shaved 30% or so off that in the last week anyway. ;-)
21:11 cognominal reading pmichaud code, I still discover stuff in S05 I did not know
21:11 pmichaud there's a lot there.
21:12 rfordinal joined #perl6
21:12 jnthn S05 is *huge*.
21:14 * colomon hasn't even cracked open S05 yet.
21:15 TimToady it's still smaller than a Saturn V
21:22 TimToady I wonder if quietly should also suppress compile-time warnings, or whether we should add a QUIETLY for that...  :)
21:23 tak11 joined #perl6
21:26 colomon rakudo: say (1, 2, 3);
21:26 p6eval rakudo d749d9: OUTPUT«123␤»
21:27 pmichaud and the more emphatic form is "SHUT UP"?
21:27 pmichaud or perhaps just "SILENCE!!!"
21:27 colomon I think you need a few postfix:<!> there.
21:27 rfordinal3643 joined #perl6
21:33 jnthn Enabling the "multi-dispatcher said types are OK so don't re-check them" in cases where we can cache the dispatch outcome helps too (something we couldn't do with the previous binder).
21:36 i-blis joined #perl6
21:37 jnthn For anyone interested in the data, http://gist.github.com/208776
21:38 jnthn Anyway, tomorrow I'll work on getting us passing the couple of sanity tests we have issues with (I know why, should be easy to fix), and dig into getting the spectest triage. :-)
21:38 i-blis isn't laziness implemented in pugs?
21:38 rfordinal joined #perl6
21:38 jnthn i-blis: I believe so, yes.
21:38 i-blis pugs: 1..Inf[0]
21:38 p6eval pugs:  ( no output )
21:39 jnthn I guess implementing in haskell helped. ;-)
21:39 i-blis 1..Inf leads to stack overflow :(
21:39 moritz_ no, it was only implemented in one particular backend
21:40 moritz_ funnily it was not the haskell backend (but PIL/JS)
21:40 i-blis ha, ok
21:40 jnthn oh rly?
21:40 * jnthn had thought Pugs had done laziness.
21:40 i-blis is there some list laziness in rakudo already?
21:41 moritz_ pugs: my @a = 1 .. Inf; say @a[3]
21:41 i-blis or should one implement streams
21:41 moritz_ i-blis: no
21:41 shinobi-cl left #perl6
21:41 p6eval pugs: OUTPUT«Stack space overflow: current size 8388608 bytes.␤Use `+RTS -Ksize' to increase it.␤»
21:41 moritz_ no laziness yet
21:42 i-blis thks
21:43 lumi joined #perl6
21:50 jnthn Ah, and the other thing in resig that deserves a mention is...
21:50 jnthn > sub foo($a, $b) { say $a + $b } > foo(4, a => 38) 42
21:50 jnthn oops
21:50 jnthn > sub foo($a, $b) { say $a + $b }
21:50 jnthn > foo(4, a => 38)
21:50 jnthn 42
21:50 jnthn This should win us some spectests when it lands. :-)
21:50 moritz_ aye
21:51 jnthn I'll have a better estimate of ETA for that tomorrow.
21:51 colomon wait, that should work?!  :O
21:51 jnthn I'm actually quite surprised that I'm at the point of being able to run sanity tests and benchmarks with the new binder today.
21:52 jnthn colomon: Yes.
21:52 jnthn colomon: Positionals can also be passed by name.
21:52 colomon I know that, but I didn't know that made their position "go away"
21:52 jnthn colomon: We have probably quite a few tests waiting on this. :-)
21:52 jnthn colomon: Oh, you can still pass them by position too.
21:53 pmichaud the positionals get filled by whatever arguments weren't bound by name
21:53 colomon jnthn: Oh sure, there are probably a thousand or so trig tests that we can stop skipping once passing positionals by name works.
21:53 jnthn pmichaud: Sort of ish.
21:53 pmichaud or, phrased better:  positional parameters not explicitly bound by name are taken from the positional arguments
21:53 jnthn pmichaud: That's a better way to say it. :-)
21:54 jnthn pmichaud: While we may source things from the nameds, we still have to bind them in signature order, not the passed order.
21:54 jnthn colomon: \o/
21:55 jnthn pmichaud: You didn't imply otherwise, but I just think it's a nice clarification to have. :-)
21:55 jnthn The other thing we can't do syntactically yet in Rakudo, but that is supported out of the box, is having many different names for a named parameter.
21:56 jnthn In Rakudo today :foo($bar) works, but not :foo(:bar($baz))
21:56 pmichaud right
21:56 pmichaud coming soon to a grammar near you :)
21:56 jnthn Now the binder can handle the second of those too, as many levels deep as you need.
21:56 jnthn So will just be a grammar tweak later on. :-)
21:56 i-blis left #perl6
21:57 jnthn Also, there's a stub for building nested signatures later on.
22:02 cognominal I can't way for deep signature matching... :)
22:03 jnthn cognominal: Later this month, or early next month.
22:03 jnthn All being well.
22:03 * jnthn is looking forward to that too
22:05 cognominal I recently did a presentation on pattern matching with example in haskell and Perl 6 (as per the spec)
22:05 cognominal *examples.
22:18 synth joined #perl6
22:31 Limbic_Region joined #perl6
22:35 cognominal the ! in perl 6 is the equivalent of the + greedy modifier in perl 5?
22:35 moritz_ well, in perl 6 + also defaults to greedy
22:36 moritz_ but the ! forces backtracking in other non-backtracking regexes
22:36 moritz_ rakudo: say 'aab' ~~ /:ratchet a+ ab/
22:36 p6eval rakudo d749d9: OUTPUT«␤»
22:36 moritz_ rakudo: say 'aab' ~~ /:ratchet a+! ab/
22:36 p6eval rakudo d749d9: OUTPUT«aab␤»
22:37 cognominal ok
22:37 moritz_ I only learned that a few days ago ;-)
22:38 jnthn I only learned that a few seconds ago...
22:40 pmichaud I have a question about that, though.
22:41 pmichaud given a token like
22:41 pmichaud token { <foo>+ }
22:41 pmichaud does that act like
22:41 pmichaud regex {  <foo>+ }
22:41 pmichaud oops
22:41 pmichaud does that act like
22:41 pmichaud regex { <foo>+: }
22:41 pmichaud or does it act like
22:42 pmichaud regex { [ <foo>: ]+: }
22:42 pmichaud std:   token { <foo>! }
22:42 p6eval std 28773: OUTPUT«[31m===[0mSORRY![31m===[0m␤Unable to parse regex; couldn't find right brace at /tmp/6ROXqAr1cG line 1:␤------> [32mtoken { <foo>[33m⏏[31m! }[0m␤    expecting any of:␤ infix stopper␤    quantifier␤       regex atom␤     regex_infix␤      standard stopper␤   terminator␤
22:42 p6eval ..ws␤FAILED 00:01 105m␤»
22:42 pmichaud std:   token { <foo>:! }
22:42 p6eval std 28773: OUTPUT«[31m===[0mSORRY![31m===[0m␤Unable to parse regex; couldn't find right brace at /tmp/ONvNew4PfL line 1:␤------> [32mtoken { <foo>:[33m⏏[31m! }[0m␤    expecting any of:␤        infix stopper␤    quantifier␤       regex atom␤     regex_infix␤      standard stopper␤
22:42 p6eval ..terminator␤     ws␤FAILED 00:01 103m␤»
22:43 pmichaud i.e., suppose I want to allow backtracking into a subpattern or subrule... how do I do that?
22:44 moritz_ [ :!ratchet <foo> ]
22:47 pmichaud I guess that would work
22:47 lumi joined #perl6
22:47 pmichaud seems like one should be able to do a postfix !, too, though.
22:48 pmichaud oh, wait, that doesn't work.
22:48 pmichaud it would have to be
22:48 pmichaud :!ratchet <foo> :ratchet
22:48 pmichaud instead of
22:48 pmichaud [ :!ratchet <foo> ]
22:48 pmichaud (the latter doesn't allow backtracking into <foo>)
22:50 moritz_ well, doesn't it need an atom after it that might trigger the backtracking?
22:50 pmichaud yes, but the atom would have to be inside of the brackets to do taht
22:50 moritz_ aye
22:51 pmichaud and if you didn't want that atom to backtrack, you'd turn ratcheting on again
22:51 pmichaud which gives
22:51 pmichaud :!ratchet <foo> :ratchet <atom>
22:51 rfordinal joined #perl6
22:51 pmichaud i.e.,    [ :!ratchet <foo> ] <atom>    # not sufficient
22:52 pmichaud because there's no backtracking into the brackets
22:52 moritz_ right
22:54 * jnthn decides to try and fit that one into his head another day
22:54 jnthn oh, wait, I think I see it...
22:55 moritz_ it's not obvious to me why :!ratchet <foo> :ratchet <atom> would cause a failing <atom> to force <foo> to do backtracking
22:55 pmichaud because there's no implied ":' after <foo>
22:55 pmichaud because ratcheting is turned off at that point
22:55 jnthn Ah, the racheting is turned back on after then, so doesn't affect <foo> but does affect <atom>
22:55 pmichaud right
22:56 pmichaud but with
22:56 pmichaud [ :!ratchet <foo> ] <atom>
22:56 pmichaud there's an implied ":" after the brackets
22:56 pmichaud [ :!ratchet <foo> ]: <atom>
22:56 pmichaud which means when <atom> fails, we don't backtrack into the brackets
22:56 jnthn Right, that :!rachet is scoped within the brackets?
22:56 pmichaud correct.
22:56 jnthn OK, got it.
22:56 jnthn Are all modifiers inside bracketing constructs scoped within them?
22:56 pmichaud scoped from the point of the modifier to the end of the "group"
22:57 pmichaud where a "group" is brackets or parens
22:57 jnthn So /[ :i big ] cheese/ matches "BIGcheese" but not "bigCHEESE"?
22:57 pmichaud correct.
22:57 jnthn Nice. :-)
22:58 jnthn Seems like a good consistent rule.
22:58 moritz_ welcoem to the wonderful world of perl regexes ;-)
22:58 jnthn Oh, I was convinced it's a wonderful world already. :-)
22:58 jnthn I just have some of the wonders to learn yet. :-)
22:58 pmichaud afk, fetching dinner
22:58 rhr_ joined #perl6
23:14 pugs_svn r28774 | moritz++ | [t/spec] more ratchet tests after discussion with pmichaud++
23:15 moritz_ (rakudo doesn't run them because it can't parse :!ratchet yet)
23:19 tak11 joined #perl6
23:22 pugs_svn r28775 | moritz++ | [t] set svn props
23:25 lumi joined #perl6
23:39 PZt joined #perl6
23:47 rhr joined #perl6

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

Perl 6 | Reference Documentation | Rakudo