»ö« | 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 10 October 2009.
00:02 lumi joined 00:37 ihrd joined
pugs_svn r28767 | Util++ | [u4x] Fixed 3 typos in 3 files. 01:03
01:09 lumi joined 01:10 rhr joined
pugs_svn r28768 | carlin++ | [Spec/S29-functions.pod] Added some details about die and fail 01:15
01:16 orafu joined, rhr_ joined 01:17 zaphar_ps joined
pugs_svn r28769 | carlin++ | [Spec/S16-io.pod] Use Z<> to escape %*ENV<PATH>. Accidentally commited the last change. carlin-- 01:19
01:30 zaphar_ps joined 01:38 tak11 joined 01:40 envi^home joined 01:44 lumi_ joined 01:46 KyleHa joined 01:48 tak11 joined 02:06 eternaleye joined 02:08 s1n_mini joined
pugs_svn r28770 | kyle++ | [t/spec] another short form test in nesting.t 02:29
02:47 cj left 02:50 synth joined 02:52 rhr joined 02:58 _jaldhar joined
cotto which synopsis covers * as a term? 03:02
PerlJam cotto: S02 I think 03:11
03:18 rhr joined
cotto PerlJam, thanks. It's there, though it'll take a couple readings to understand it. 03:21
03:29 __ash__ joined 03:37 envi^office joined 03:43 cj joined 03:49 lumi joined 04:09 eternaleye joined 04:15 payload joined 04:29 masak joined
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)␤»
masak rakudo: my $a given $a 05:01
p6eval rakudo d749d9: ( no output )
masak rakudo: my $a = 4 given $a
p6eval rakudo d749d9: ( no output )
masak rakudo: my $a = 4 given $a; say $a
p6eval rakudo d749d9: OUTPUT«4␤»
05:02 eternaleye joined 05:11 orafu joined 05:28 JimmyZ joined 05:33 Bzek joined 05:38 zloyrusskiy joined 05:39 Bzek joined 05:40 TiMBuS joined 05:56 ihrd left
masak you know what I would like? a debugger that could go backwards in time. 05:57
usually I notice an error in some piece of state, and I want to go -back- and check what caused it. 06:02
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:03
basically, I want to have the whole program run on a sort of videotape, where I can ▶▶ and ◀◀ at will. 06:05
06:08 jrtayloriv joined
JimmyZ that's an ideal debugger. 06:11
masak let's build it! :)
06:13 eternaleye joined
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." tinyurl.com/yl4bhvj 06:27
06:33 lumi joined
moritz_ good morning 06:39
masak waves happily
oh, and "go back to the point where this variable was last changed" would be nice, too. 06:42
06:47 szabgab joined
masak apparently gdb 7.0 is getting (or wioll haven be getting) reverse debugging: www.gnu.org/software/gdb/news/reversible.html 06:49
07:37 NorwayGeek joined 07:38 NorwayGeek joined, mariuz joined
Matt-W masak: That's kind of scary and brain-bending, but it could be very cool 07:57
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:58
Matt-W Mmm, that would seem plausible 07:59
08:09 jogla_ joined
jnthn stumbles into the channel 08:27
Getting out of bed. Some days it's hard. 08:28
masak yayitzjnthn!
moritz_ lays out a matrass so jnthn falls softly
08:29 NorwayGeek joined
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?
masak I could tell you, but I'd have to kill you. :) 08:30
moritz_ you didn't happen to watch Jhonny English lately? :-)
masak no, it's just a meme floating around. :)
I'm not sure I should re-watch Johnny English. I remember it as being very bad in spots. 08:31
moritz_ it is
I started watching it yesterday night, and quickly stopped again 08:32
masak probably wise.
watch the SICP lectures instead. they have an eternal quality about them.
or if it's entertainment you want, watch "Sita Sings the Blues" and "The Hunt for Gollum". both favourably licensed. 08:33
moritz_ remembers learning a single Finnish word by watching "Star Wrek - In the Pirkinning" 08:38
jnthn møøse?
masak that's Swedish, not Finnish :P 08:39
moritz_ "now" - it sounds something like "njyt" in Finnish
jnthn aww
08:39 carlin joined
jnthn It still bit my sister though. 08:40
masak 'nyt', according to translate.google.com
jnthn: come see our loveli lakes. and our excellent telephone system. 08:41
jnthn nearly snorts his coffee over the keyboard
.Net framework is doing STM. kskky.info/wiki/STM.NETInFramework4 08:42
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)␤»
carlin rakudo: Exception.rethrow
p6eval rakudo d749d9: OUTPUT«Not a throwable object␤in Main (file src/gen_setting.pm, line 206)␤»
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 08:49 pmurias joined 08:54 NorwayGeek joined 09:00 NorwayGeek joined
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)␤»
carlin rakudo: my $x = Exception.new; $x + 2;
p6eval rakudo d749d9: OUTPUT«Method 'Num' not found for invocant of class 'Perl6Exception'␤in Main (file src/gen_setting.pm, line 206)␤»
carlin Why is Exception different from $!?
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)␤»
moritz_ that's an auld one
carlin: the whole Exception business is Very Rough and Very Wrong
carlin Okay. Just seems odd that $! would know its an Exception but not have any of Exception's methods 09:08
pugs_svn r28771 | moritz++ | [t/spec] fix a test in pick.t, was trying to call ok() with three arguments 09:19
09:33 jogla joined 09:36 mariuz joined 09:41 ihrd joined, ihrd left 09:49 NorwayGeek joined 09:53 NorwayGeek_ joined 09:59 NorwayGeek joined 10:05 donaldh joined 10:10 agentzh joined
pugs_svn r28772 | carlin++ | [Spec/S29-functions.pod] Fixed mistake with 'die'. carlin--, masak++ 10:11
10:16 icwiener joined, lumi joined
jnthn \\o/ Nice cold weather is coming. :-) 10:17
10:31 pmurias joined 10:41 meppl joined
pugs_svn r28773 | pmurias++ | [mildew-js] add a --server option to run as App::Persistent server 10:41
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>)␤»
pmurias what's wrong with that?
perl6: token foo { {say "hi"}} 10:54
p6eval pugs: ( no output )
..rakudo d749d9: OUTPUT«Confused at line 2, near "say \\"hi\\"}}"␤in Main (file <unknown>, line <unknown>)␤»
..elf 28773: OUTPUT«Can't locate object method "cb__RegexDef" via package "EmitSimpleP5" at ./elf_h line 2312.␤»
moritz_ pmurias: closures in regexes are NYI
jnthn pmurias: nyi
pmurias :(
11:17 payload joined
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:27
moritz_ rakudo++ 11:28
masak better test coverage and an Emmentaler-like nightly smoke woulda caught that. now I discovered it manually instead. :/
moritz_ in case you need computing power for the nightly smokes... 11:29
I can hand out access to a server with 4 cores, and 4 GB RAM
masak nice!
moritz_ it's the successor of the server on which p6eval used to live
masak I was going to default to bogging feather down during some low-activity time of day. 11:30
but a dedicated server sounds even better, of course. :)
Juerd You could of course run it on feather any time of day, with "nice" 11:32
There isn't really a predeterminable low-activity time of day on feather :) 11:33
masak good point.
Juerd It's idle most of the time, but you never know when, in advance :)
pmurias moritz_: having mildew nightly smokes would be great 11:34
moritz_ password sent by private message. Just be "nice" to everyone :-) 11:39
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 :-)
masak well, sure. I'd love to.
I'll see when I get around to that, too.
moritz_ blames diakopter++ for giving mberends++ a shiny toy to play with 11:43
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.
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 :-)
masak but I suffer from chronic taking-people-serious-itis.
s/ous/ously/
I'm finishing up a Web.pm week, by the way. this week I'm determined to finally put Druid on the Web. 11:49
colomon \\o/ 11:50
masak: is the proto work that needs to be done something mere mortals could do?
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.
hold on, I'll find it for you.
moritz_ hugme: show proto
hugme moritz_: the following people have power over 'proto': PerlJam, TimToady, [particle], masak, moritz_, pmichaud. URL: github.com/masak/proto/
masak colomon: github.com/masak/proto/raw/installe...ules/proto 11:52
bottom part of that file.
colomon That's perl 5!
masak oops. we're found out. :P 11:53
very little of proto is actually Perl 5.
colomon I see the TODO now.
masak only enough to bootstrap in the case of no Rakudo.
colomon woah, every todo I've looked at so far is done... 11:55
masak mberends++
viklund++ 11:56
colomon seems like it's 75% done, at least. 11:57
masak aye.
12:03 tylerni7 joined
masak I can now make moves locally on a Druid board in my browser. 12:05
the moves show, but they don't stick. time to add persistence.
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 :-)
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 :-)
masak perl6.org went on to become the biggest Perl 6 publicity stunt to date.
just go to #perl and see. they're still admiring the butterfly over there. :) 12:09
moritz_ oh, are they? :-)
masak in very explicit praise.
they laud the specific associations the mascot conjures up, and how well the connotations harmonize with the average corporate environment. 12:10
at least they did when I was there a few days ago. 12:11
maybe they don't have #perl6 visitors often, and felt like talking about it. :)
jnthn
.oO( the average corporate environment sings gay? ;-) )
12:15
jnthn was kinda bemused - and often amused - by the comments on perl6.org 12:17
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:19
12:20 hirschnase joined 12:21 NorwayGeek joined
Matt-W :) 12:21
That's a pretty good outlook 12:22
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.
carlin If they didn't have the butterfly they would find something else to whinge about 12:24
moritz_ moritz.faui2k3.org/tmp/access.svg # perl6.org has a steady stream of about 300 to 400 visitors per day
masak \\o/
Matt-W even if they're only going to whinge, they're at least seeing it 12:25
PERL 6 EXISTS
\\/
\\o/
\\oo//
masak :) 12:26
12:26 JimmyZ joined
BinGOs it must be Christmas. 12:27
masak perl6: my @a; say @a.perl; @a = eval(@a.perl); say @a.perl
p6eval rakudo d749d9: OUTPUT«[]␤[[]]␤»
..pugs: OUTPUT«[]␤[[],]␤»
..elf 28773: OUTPUT«[]␤[]␤»
moritz_ "Perl 6 - A bit more Christmas every day"
masak is there supposed to be an invariance principle involved in using .perl and then eval?
moritz_ masak: yes, in scalar context there is invariance 12:28
masak because Rakudo currently coats arrays with an extra layer of... array.
I like elf's reply better.
moritz_ rakudo is correct according to the spec
masak moritz_: oh, scalar context. gotcha.
moritz_ perl6: my @a = 1, [2, [3]]; say @a.perl; @a = eval(@a.perl); say @a.perl
masak so I have to compensate specifically for arrays somehow... 12:29
p6eval pugs: OUTPUT«[1, [2, [3,]]]␤[[1, [2, [3,]]],]␤»
..rakudo d749d9: OUTPUT«[1, [2, [3]]]␤[[1, [2, [3]]]]␤»
..elf 28773: OUTPUT«[1,[2,[3]]]␤[1,[2,[3]]]␤»
moritz_ and hashes.
masak aye.
don't have any hash attributes in Druid::Game, though.
\\o/ persistence works! I'm playing against myself in the browser. 12:38
it all has serious potential for improvement, but it's still kinda cool to see it work. 12:39
moritz_ URL? :-) 12:40
masak 127.0.0.1:8888/ # though that's probably not what you meant 12:41
you'll just have to wait for today's blog post like everyone else.
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.
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
cognominal what is the way to generate a yaml tree from a p6 program with gimme5? 13:00
apparently gimme5 processes STD.pm to generate a p5 program using moose 13:01
moritz_ maybe you want STD5_dump_match instead of gimme5 13:02
or I think you can simply use STD; my $r = STD->parsefile($file, actions => 'Actions')->{'_ast'} 13:03
and then use YAML to dump $r
cognominal thx
moritz_ see ./viv for an (albeit more elaborate) example
cognominal perl STD5_dump_match STD.pm 13:06
Odd number of elements in hash assignment at STD.pm line 180.
Byte order is not compatible at ../../lib/Storable.pm (autosplit into ../../lib/auto/Storable/_retrieve.al) line 380, at Cursor.pm line 1611
...asking for the impossible :)
moritz_ sounds like you need a 'make clean' and then 'make' again
is $_ supposed to be a context var? 13:07
sub a { .say }; $_ = 4; a()
rakudo: sub a { .say }; $_ = 4; a() 13:08
p6eval rakudo d749d9: OUTPUT«Use of uninitialized value␤␤»
moritz_ www.perlmonks.org/?node_id=800592 # nearly fully off-topic, but still worth a read, because it's written rather nicely 13:12
jnthn gah, I was debugging some web service stuff and my tea went cold... :-/ 13:16
On the upside, it's fixed now, and I can hack on Rakudo again. \\o/
moritz_ \\o/
Matt-W somebody get jnthn a fresh cup of tea! 13:17
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:18
masak (things even vaguely pretending to work)++ 13:19
Matt-W :) 13:20
jnthn lolsegv 13:26
masak I've had one "Bus error" today.
moritz_ awesome swedish transport facilities?
masak :P 13:27
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...
Matt-W a lolsegv 13:32
is that a more cheerful kind of segv than the usual kind?
masak must be. 13:33
it's the IM IN UR RAKUDO, SEG'IN UR V kind. 13:34
mdxi 0x101C47
masak :)
moritz_ :-)
13:34 synth joined
Matt-W haha 13:35
mdxi++
jnthn lol 13:36
bwah, we didn't even make it into the new binder before segfaulting.
Matt-W well
there's still the chance that code is thus perfect 13:37
nestled amidst bugs that have nothing whatsoever to do with it
masak right...
returning to your regularly scheduled reality...
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
it'll be a bug in the test suite
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
moritz_ as long as they work in November :-)
jnthn Matt-W: Close. There's an exception. If it's rained during the day, it's OK.
Matt-W :) 13:40
13:48 payload joined
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
...and my inability to call substr with the correct parameters.
gist.github.com/208396 # whee
13:52 Chillance joined
masak \\o/ 13:52
jnthn It's a PIR example, but it's basically implementing the Perl 6:
sub foo($a, $b) { say $a; say $b; } 13:53
foo(42, 69);
foo(69, a => 42);
foo(42, b => 69);
foo(a => 42, b => 69);
Matt-W so how does bind_signature know about $a and $b 13:54
jnthn Matt-W: See the :load :init block below
Matt-W: Which sets up the signature object.
Matt-W Aaah
jnthn set_signature_elem signature, 0, "$a", 128, $P1, $P0, $P0, $P0, $P0, $P0
set_signature_elem signature, 1, "$b", 128, $P1, $P0, $P0, $P0, $P0, $P0
Those two are the important lines.
Matt-W And in the sub 'foo' itself, the .lex lines set up places for the bound values to go? 13:55
jnthn Correct.
So our binder will bind straight into the lexpad.
This will get even better when Parrot gives us the raw CallSignature object.
Matt-W nice
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.
moritz_ and I guess the various $P0, $P0 etc. are slurpy, optional, applied traits etc?
jnthn moritz_: No, actually the "128" there is setting up a bit field that carries most of those things.
moritz_: They're for things like:
constraint type
type captures we need to bind
names if it's a named parameter
Actually, the binder supports (in theory) named parameters with multiple names out of the box too. 13:57
Matt-W: Yes, in some senses that's a win. But there are bigger ones that we'll get out of this refactor.
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
jnthn Here we do it all in one.
13:59 KyleHa joined
jnthn Matt-W: No, really, that's not the huge win out of this. 13:59
The huge win is from not repeatedly doing things we do a lot of times now.
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
That can stop happening shortly.
moritz_ so the new binder will have an option that it tells if certain checks have already been performed? 14:01
jnthn Right.
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.
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.
Matt-W hmm that sounds unpleasant
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.
Yes.
Now, we'll actually do all of the binding, and if it works out we'll just keep around the lexpad.
And then run.
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?
Matt-W mmm
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.
masak ah, yes.
Matt-W and almost every multi call will be faster
14:05 icwiener_ joined
masak and if I want an Int instead of a Rat? 14:05
rakudo: my @a = <a b c>; say @a[4/3] 14:06
moritz_ you use div
jnthn (Since the multi-dispatcher only wants to know, will it blend^Wbind, or not.)
p6eval rakudo d749d9: OUTPUT«get_integer() not implemented in class 'Rat'␤in Main (file src/gen_setting.pm, line 206)␤»
moritz_ rakudo: say 5 div 2
p6eval rakudo d749d9: OUTPUT«2␤»
masak submits rakudobug
moritz_: thanks.
moritz_ rakudo: say (-3/4).Num.Int
p6eval rakudo d749d9: OUTPUT«0␤»
moritz_ rakudo: say (-3/4).Num 14:07
p6eval rakudo d749d9: OUTPUT«-0.75␤»
dalek p-rx: a8a7999 | pmichaud++ | src/ (4 files):
Code to create and capture submatches; Match objects built lazily.
14:12
p-rx: a0c9610 | pmichaud++ | (8 files):
Refactor subrule matching a bit.

  <alpha> matches underscore.
Update specialized dump_str method to check for new Match objects.
p-rx: 7155d02 | pmichaud++ | src/Regex/P6Regex/Actions.pm:
Add first (incomplete) version of <+subrule>.
p-rx: 90293e5 | pmichaud++ | (2 files):
Add some more built-in regexes (char classes, word boundaries, etc.).
masak pmichaud! \\o/ 14:13
14:13 Psyche^ joined
jnthn whow 14:13
14:14 edgar joined 14:15 am0c joined
Matt-W pmichaud++ 14:16
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)␤»
masak Junctions. Bah.
I don't see what people get so excited about. They suck. :P 14:22
jnthn Just 'cus you know you've already ticketed that one... :P 14:23
masak hm, maybe... :) 14:24
I'll grant that junctions in hash/array assignments are problematic. 14:25
what's the difference between & and | in that case, for one thing?
14:26 timbunce joined
jnthn The type of junction you get back, presumably. 14:26
moritz_ aye 14:27
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
(I'm in Moscow updating my PerlMyths talk again before I present it later)
moritz_ pmichaud.com/2009/pres/ somwhere probably? 14:29
timbunce I'm already digging in there... :) 14:30
moritz_ and as always, updated charts are on rakudo.de 14:31
timbunce Ought to be in www.pmichaud.com/2009/pres/oscon-ra...lide1.html somewhere but I've not found it yet.
moritz_: thanks!
jnthn timbunce: How's Moscow? 14:32
jnthn didn't make it to Russia this year :-( 14:33
timbunce jnthn: wet, grey, cold. The natives are friendly though :)
jnthn timbunce: Such is autumn. But yes, the natives are great fun. :-)
14:40 ejs joined 14:44 abra_ joined
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 15:30 shinobi-cl joined
shinobi-cl perl6 : my ($val1, $val2) = (1, 2); say $val1~','~$val2; 15:31
perl6: my ($val1, $val2) = (1, 2); say $val1~','~$val2;
p6eval pugs, rakudo d749d9: OUTPUT«1,2␤»
..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␤»
shinobi-cl perl6: my ($val1, $val2) is constant = (1, 2); say $val1~','~$val2; 15:32
p6eval rakudo d749d9: OUTPUT«1,2␤»
..pugs: OUTPUT«*** ␤ Unexpected "is"␤ expecting operator␤ at /tmp/CLAoeknE1t line 1, column 19␤»
..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␤»
shinobi-cl perl6: my ($val1, $val2) is constant = (1, 2); say $val1~','~$val2; $val1 = 0;
p6eval rakudo d749d9: OUTPUT«1,2␤»
..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␤»
..pugs: OUTPUT«*** ␤ Unexpected "is"␤ expecting operator␤ at /tmp/mkTE5lOksz line 1, column 19␤»
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)␤»
..pugs: OUTPUT«1 2␤»
..elf 28773: OUTPUT«Unknown rule: scope_declarator:constant␤It needs to be added to ast_handlers.␤ at ./elf_h line 2850␤»
moritz_ ouch, that looks like a rakudobug
rakudo: constant $a = 3; say $a
p6eval rakudo d749d9: OUTPUT«3␤»
shinobi-cl i was trying to define many constants in a compact way
moritz_ masak: care to submit? :-) 15:34
masak cares to submit
moritz_ std: constant ($a, $b) = 1, 2; say "$a $b"
p6eval std 28773: OUTPUT«ok 00:02 115m␤»
shinobi-cl constant ($ERR_A, $ERR_B, $ERR_C) = (1..3); say "$ERR_A $ERR_B $ERR_C"; 15:35
rakudo: constant ($ERR_A, $ERR_B, $ERR_C) = (1..3); say "$ERR_A $ERR_B $ERR_C";
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";
p6eval rakudo d749d9: OUTPUT«No applicable methods.␤in Main (file src/gen_setting.pm, line 206)␤»
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␤»
shinobi-cl is that a bug? 15:38
std: constant ($ERR_A, $ERR_B, $ERR_C) = 1..3; say "$ERR_A $ERR_B $ERR_C";
p6eval std 28773: OUTPUT«ok 00:02 112m␤»
moritz_ yes
TimToady /e 15:39
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>)␤»
masak Juerd: ping
shinobi-cl rakudo: constant ($ERR_A, $ERR_B) = 1,2; $ERR_A = 2;
p6eval rakudo d749d9: OUTPUT«No applicable methods.␤in Main (file src/gen_setting.pm, line 206)␤»
15:41 nihiliad joined
Juerd masak: pong 15:43
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
thing is, it's not running Apache.
Juerd What problem(s) are you running into?
masak basically that I don't know what to do for the script to start running when I hit a given URL. 15:45
I know (approximately) how to do it with Apache.
moritz_ uhm
if you don't have a web server
it needs to run all the time
masak aye.
moritz_ and act as a web server itself
masak that's what it does.
moritz_ so you just start a screen session
masak that's the job of bin/web-druid 15:46
moritz_ inside the screen session you start bin/web-druid
then you detach
=> the script continues running
masak and I can try this out without screen, of course?
masak tries
moritz_ sure 15:47
masak g'ah, it's very hard to use a not-installed perl6 binary! :/ 15:50
moritz_ well, install it!
masak how? 15:52
shinobi-cl a little off topic, but .. is there a 'standard' perl6 way to develop with i18n in mind? 15:53
moritz_ masak: make install 15:54
masak without being root?
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.
shinobi-cl: just have extensibility in mind, I guess.
moritz_: oki. I'll try that.
later.
shinobi-cl of all the i18n libs for perl 5 , what, in your opinion, is the best? (open question) 16:00
16:00 sparc left 16:01 NorwayGeek joined 16:02 envi^home joined
shinobi-cl for example, there is this one search.cpan.org/~audreyt/i18n-0.10/lib/i18n.pm 16:03
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 16:11 parduncia joined 16:12 pmichaud_ joined
jnthn Arrrgh!!! 16:15
Parrot bites.
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 :)
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?
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: tell masak that it's now runtime/parrot/library/PGE/Perl6Grammar.pir (and yes, it's being superceded by nqp-rx)
phenny pmichaud: I'll pass that on when masak is around.
jnthn pmichaud: Heh, just when I thought things were going well. :-/
*sigh* 16:18
.lex "$a", $P25
.lex "$b", $P26
TimToady Are you getting confused between virtual registers and real registers?
jnthn TimToady: Well, apparently Parrot is... 16:19
pmichaud jnthn: that code looks okay to me.
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.
pmichaud: Yes, I'm not initalizing $P25 and $P26 atm. Maybe doing that will fix it.
:-/
pmichaud the register allocator is doing that?
i.e., giving two virtual registers the same real register? 16:20
I thought the allocator had been disabled, mostly.
jnthn pmichaud: It appears to be, just confirming
pmichaud: Meh, yes 16:21
Looking up $a, it gives me reg 2.
And same for $b. 16:22
pmichaud checks
16:22 shinobi-cl joined
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?
TimToady except for bare blocks, which cheat with a signature of -> $_ is rw = OUTER::<$_> {...} 16:24
jnthn pmichaud: Calling VTABLE_set_pmc_keyed_str on the lexpad. 16:26
pmichaud: Which is looking in the hash...and handing back the same register number the second time around. 16:27
(e.g. the same one for both $a and $b)
pmichaud icky.
jnthn Indeed.
It's really odd.
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
jnthn *sigh*
TimToady perl6: say 0 ** 0 16:29
p6eval elf 28773, pugs, rakudo d749d9: OUTPUT«1␤»
TimToady yay 16:30
perl 6: say [*] 0 xx 0
perl6: say [*] 0 xx 0 16:31
p6eval pugs, rakudo d749d9: OUTPUT«1␤»
..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'␤
..STD_red/std.rb:210:in `…
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␤»
..pugs: OUTPUT«Inf␤»
..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␤»
TimToady I guess nobody implements rat literals yet...
jnthn pmichaud: Heh. Turns out giving it an initial value works...
pmichaud jnthn: oh, yes.
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) { }.
;-)
TimToady std: foo($a = $b, $b) { }
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
..stopper␤ term…
TimToady std sub foo($a = $b, $b) { }
std: sub foo($a = $b, $b) { }
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:␤
..Variable $b is not p…
jnthn hands TimToady a new set of fingers 16:38
TimToady WANT BRANES!!!
jnthn TimToady: fine
TimToady: There are other ways to break it. ;-)
std: sub foo($a = $b, $b?) { }
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␤»
jnthn std: sub foo($a = eval('$b'), $b?) { }
p6eval std 28773: OUTPUT«ok 00:02 108m␤»
jnthn bwaha 16:39
:-)
TimToady but yeah, lexicals need to be born coredump proof for CATCH too
but perhaps we should say that depending on any body lexicals in the signature is erroneous and apt to explode 16:41
so we don't have to init all pad lexicals every time we try to bind
16:41 tak11 joined, stephenlb joined 16:42 abra joined
TimToady alternately, pad lookups need to be guarded not to run off the end of where we've initted to 16:42
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;
..…
TimToady good
though your eval finesses that already 16:44
16:44 eMaX joined
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
I guess it's officially busted at the moment... 16:46
diakopter hee
moritz_ I think diakopter removed the sprixel target from p6eval temporarily
TimToady moritz_: did you see my not re: $_? 16:47
*note
16:49 linguini joined
jnthn in my ($foo, $bar) = ... 16:52
The ($foo, $bar) here is a signature, yes?
moritz_ TimToady: yes
thank you
16:53 parduncia joined
slavik pmichaud++ 16:53
:)
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
If so, how does this happen?
pmichaud that's a list assignment, not a binding.
jnthn pmichaud: OK, but it's parsed as a signature. 16:55
pmichaud sure, no problem.
jnthn As far as I can tell
pmichaud when evaluated, it becomes a list (parcel) of the declared variables.
jnthn OK, so what does it actually mean?
Aha.
pmichaud and then it's just a normal list assignment.
jnthn So really we just ask the signature, "what variables are declared within you"?
pmichaud we just have it return the variables
jnthn (at compile time)
OK
So is something like 16:56
my (:$a, :$b) = 1,2;
16:56 zloyrusskiy joined
jnthn No more interesting? 16:56
pmichaud I wouldn't make it any more interesting, now.
*no.
jnthn That is, we just pull out the variable names, declare them, and do a list assignment?
pmichaud I'm not sure about the "pull out the variables names" part. 16:57
but yes, the result should be a list consisting of ($a, $b)
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
pmichaud: That is, a compile-time signature object.
16:58 NorwayGeek joined
pmichaud I'm thinking the clean solution is for it to evaluate into a list of variables 16:58
or is the signature no longer available at runtime?
jnthn pmichaud: Oh, it would.
pmichaud: I'm just thinking that the signature action always builds us a (compile time) signature object.
pmichaud the phrase "ask it to give us the variable declarations" sounds weird.
jnthn Which can be turned into the code to create a runtime signature object.
pmichaud I think "ask it to give us the variables" 16:59
16:59 payload1 joined
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
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
and @ and % assume slurpiness
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
Note, at compile time.
So the PAST we generate would just then be a bunch of variable declarations. 17:02
pmichaud ....why *declarations*?
jnthn Made into a list, and then it's all the same as today.
pmichaud you keep saying that word.
($a, $b) is not a list of variable declarations.
jnthn pmichaud: ($a, $b) isn't parsed as a signature either.
pmichaud: I'm talking about e.g. my ($a, $b)
pmichaud oh, I see
jnthn :-)
pmichaud you're saying that my Int $a; isn't a signature
jnthn Right.
But my ($a, $b) is parsed as a signature. 17:03
(the $a, $b bit between the parens)
17:03 nihiliad joined
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.
Because otherwise, once we get into nested signatures, the code in scoped is gonna get nastier.
pmichaud anyway, unwrapping the signature into a list of variable declarations at compile time is fine with me. 17:05
that's essentially what we do now. 17:06
jnthn pmichaud: Well, kinda.
pmichaud: The thing at the moment is that the signature action method is rather tied up with blocks too.
pmichaud: Which I think it's kinda not meant to be.
pmichaud it is and isn't. 17:07
the "declarator" method in actions.pm turns off the tie to the blocks 17:08
jnthn pmichaud: ah, yes 17:09
pmichaud of course, when we have contextuals in place we can have signature dtrt at the outset
instead of patching it up after the fact
jnthn pmichaud: Yeah. 17:10
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. :-)
*but
erm, can't
*sigh* 17:11
pmichaud afk, $otherjob calls
jnthn kk
Thanks for input.
cognominal is impressed by nqp-rx. pmichaud++
pmichaud it's about to get better, thanks :)
but the regex engine should be much more efficient, since we don't create match objects until we need them 17:12
in particular, we end up not creating the match objects for <.foo>, <?foo>, and <!foo> assertions :-)
(including all of their nested subrule calls) 17:13
jnthn ooh, nice
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.
moritz_ reminds pmichaud to update docs/progress-graph.csv
pmichaud and we don't create the match objects for branches of the parse that ultimately fail
jnthn (less objects created in parse)++ 17:14
17:14 tak11 joined
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.
cognominal grammars are what convinced me that perl 6 will rock.
pmichaud perl6 assertions will work soon, though.
17:15 nihiliad joined
cognominal if nqp-rx is here to stay, I will be motivated to do the long charclass ranges. 17:16
pmichaud the tricky part is being able to decompose something like <[abc\\s\\x100..\\xffffzyx]> 17:17
the tricky part is being able to decompose something like <[abc \\s \\x100..\\xffff zyx]>
because it has to represent a set of at least three different node types 17:18
all of which might be inverted by '-'
17:18 NorwayGeek joined
moritz_ -me fails to see how abc and \\x100..\\xffff are different, conceptually 17:18
s{-}{/} ;-) 17:19
irssi user fail ;-)
pmichaud right now the engines (both PGE and nqp-rx) build up a list of characters in the range
so 0..9 becomes "0123456789"
but that's not practical for \\x100..\\xfff
moritz_ right
pmichaud so we have to have a special "match a character in this range" ndoe. 17:20
*node.
"abc" isn't a "match a character in this range" node, it's a "match a character in this list" node.
moritz_ which inversion lists could unify with simple enumerations (maybe)
anyway, off to play some table tennis 17:21
TTFN
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 17:40 crythias joined, Confield left 17:41 Confield joined 17:52 kaiadev joined
TimToady a full bitmap for a Unicode class is only 140K :) 17:57
I'd just process them all with full bitmaps and then compile down to a binary decision tree or some such 17:59
18:04 FOAD_ joined
cognominal how does perl5? 18:27
18:27 NorwayGeek joined, am0c joined
jnthn whoa...where did 5 hours go?! 18:29
jnthn figures it's time for a break...and dinner.
am0c OH HAI 18:31
jnthn am0c: hi! 18:32
18:39 iblechbot joined, meppl joined
pmichaud (binary decision tree) -- I'll let someone else come up with that. :) 18:42
18:43 Bzek joined
jnthn delegation for the win :-) 18:43
18:46 masak joined
jnthn lolitsmasakwhoblogged 18:50
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)
masak thought so
18:53 jrockway joined 18:58 szabgab joined 19:06 rfordinal joined, rfordinal left
jnthn should blog soon, but wants to reach a point where he feels he's made some progress worth blogging about. 19:07
Ooh, actually the signature introspection could is probably bloggable now. :-) 19:08
19:19 lumi joined
cognominal Cold case, c'est FBI porté disparu, sauf que les ficelles sont plus grosses :( 19:22
oops, wrong channel 19:23
jnthn, I can't wait to read you 19:24
19:40 szabgab_ joined 19:45 japhb joined 19:55 ShaneC joined
dalek p-rx: a1f5fa1 | pmichaud++ | src/ (2 files):
Initial code for detecting capture arrays.
19:56
p-rx: 8a90013 | pmichaud++ | src/ (2 files):
Fully handle arrayed subcaptures.
jnthn whee
pmichaud: Seems to be coming along rather nicely. :-) 19:57
pmichaud so far so good, yes.
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?
pmichaud it's a fairly big list
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?
pmichaud bit of both.
jnthn Oh, hmm. :-)
That could make for an interesting switch...
pmichaud the challenge is that the new regex engine has a totally different (protoregex-based) operator precedence parser than PGE
so all of the token definitions in grammar-oper.pg have no real equivalent. 19:59
jnthn Ah
pmichaud that also affects the metaops.
jnthn Ah.
This sounds...painful. :-)
pmichaud you can see why I haven't been in a hurry to do it.
the change to protoregex-based stuff was a big one.
(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
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.
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.
pmichaud right
jnthn ah, yes, that :-)
pmichaud I'll have a much better idea after rebuilding nqp using the new tools
jnthn Sure. We can late-bind that one.
pmichaud in some ways I'm a big fan of the start-with-a-fresh-grammar approach
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.
jnthn If fairly quickly means a couple of weeks, I'd probably agree.
pmichaud yes, I think so.
20:04 flip621 joined
jnthn It will be quite some upheaval. 20:04
pmichaud sure, but I think it'll also be fun.
There will be a lot of places where we can say "oh, this is so much easier!" :)
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.
flip621 Has someone looked at CFFI/swig for importing arbitrary library functions?
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 :)
flip621 jnthn: was that meant for me, ie. that you'll trying to do this in the near future?
jnthn flip621: No, for pm, sorry :-)
pmichaud if not, it won't hurt to occur in the early part of the next release cycle.
jnthn pmichaud: Well, I've hit just now the usual Horrible Point when doing anything of this nature.
pmichaud are you likely to block on grammar/regex needs very soon? 20:06
jnthn No
pmichaud okay, good.
we have a few horrible points to deal with over the next 4-5 weeks, I think. :-/
20:06 stephenlb joined
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.
pmichaud right.
jnthn It's really, really tricky for the current stuff I'm doing.
Because it turns out one of the things that exercises multi-dispatch most is...trait application.
Which we do at startup.
But of course, if it won't start, it won't run the test suite. :-) 20:08
So, some "fun" to track down what's up.
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:09
Oh, and figuring out where to put the binder. :-/ 20:10
(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.
)
Anyway, on with the Month Of Pain. 20:11
flip621 moritz: are you available for bot restarts? 20:20
20:20 shinobi-cl joined
jnthn oh, ouch, I suck 20:21
jnthn deleted an important line of code instead of moving it... 20:22
pmichaud well, deleting counts as moving :-) 20:23
it just moved somewhere unfortunate :)
jnthn :-P
It was the line that told the multi-dispatcher "no, you can't cache this result"
Meaning it did some...interesting...dispatches.
20:26 lumi joined
pmichaud afk for a bit 20:30
20:32 payload joined 20:38 gyyrog joined
gyyrog does anyone have a minute to help me with a perl question? 20:39
pmichaud perl 5, or perl 6? 20:40
moritz_ re 20:44
which bot(s) need restart?
20:47 payload joined 20:50 colomon left, colomon joined
colomon \\ 20:52
jnthn o/
colomon my son typed that with his head
jnthn skill! 20:53
Another "o" and then it's a nice waving person.
Tene gyyrog: Perl 5, or Perl 6? 20:54
jnthn oh wow, we survive startup.
TimToady ship it!
Tene jnthn: what startup?
20:54 NorwayGeek joined
colomon \\o/ 20:54
jnthn Tene: Rakudo startup, with the new signature binder.
oh heh, but say doesn't work :-/
Win some lose some... 20:55
TimToady unshipt it!
colomon yeah, "say" is likely to be one of those commands people actually try out.... 20:56
jnthn colomon: Eh, I only broke every method call, it's fine. 20:57
;-)
20:57 shinobi-cl joined
TimToady as long as .HOW works, we can probably workaround it 20:57
colomon well hey, then you can still call subs, right? ;)
jnthn colomon: Yeah, but say then re-dispatches to $*OUT.say ;-) 20:58
TimToady: Alternatively, I might just be willing to consider fixing it. ;-)
colomon all you need is a small change to the setting to fix that...
TimToady after all, Perl 5 gets along perfectly well without any method primitives 20:59
jnthn: I don't really care whether you're willing to consider fixing it, as long as you fix it. :) 21:00
it's also okay to consider it even if you're unwilling... 21:01
jnthn Smartass. :-P 21:02
I've about figured out what's wrong, anyways. I think. :-) 21:03
21:04 lumi joined
jnthn \\o/ say works 21:04
pmichaud say("no it doesn't"); 21:05
jnthn We also almost manage the sanity tests.
cognominal jnthn FTW 21:08
21:08 Whiteknight joined
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.
lisppaste3 gyyrog pasted "first time using a hash" at paste.lisp.org/display/88552
gyyrog can anyone help? 21:10
i am getting really frustrated
moritz_ gyyrog: for perl 5 questions I recommend perlmonks.org/
21:11 zamolxes joined
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
pmichaud there's a lot there.
21:12 rfordinal joined
jnthn S05 is *huge*. 21:12
colomon hasn't even cracked open S05 yet. 21:14
TimToady it's still smaller than a Saturn V 21:15
I wonder if quietly should also suppress compile-time warnings, or whether we should add a QUIETLY for that... :) 21:22
21:23 tak11 joined
colomon rakudo: say (1, 2, 3); 21:26
p6eval rakudo d749d9: OUTPUT«123␤»
pmichaud and the more emphatic form is "SHUT UP"? 21:27
or perhaps just "SILENCE!!!"
colomon I think you need a few postfix:<!> there.
21:27 rfordinal3643 joined
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:33
21:36 i-blis joined
jnthn For anyone interested in the data, gist.github.com/208776 21:37
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
jnthn i-blis: I believe so, yes. 21:38
i-blis pugs: 1..Inf[0]
p6eval pugs: ( no output )
jnthn I guess implementing in haskell helped. ;-) 21:39
i-blis 1..Inf leads to stack overflow :(
moritz_ no, it was only implemented in one particular backend
funnily it was not the haskell backend (but PIL/JS) 21:40
i-blis ha, ok
jnthn oh rly?
jnthn had thought Pugs had done laziness.
i-blis is there some list laziness in rakudo already?
moritz_ pugs: my @a = 1 .. Inf; say @a[3] 21:41
i-blis or should one implement streams
moritz_ i-blis: no
21:41 shinobi-cl left
p6eval pugs: OUTPUT«Stack space overflow: current size 8388608 bytes.␤Use `+RTS -Ksize' to increase it.␤» 21:41
moritz_ no laziness yet
i-blis thks 21:42
21:43 lumi joined
jnthn Ah, and the other thing in resig that deserves a mention is... 21:50
> sub foo($a, $b) { say $a + $b } > foo(4, a => 38) 42
oops
> sub foo($a, $b) { say $a + $b }
> foo(4, a => 38)
42
This should win us some spectests when it lands. :-)
moritz_ aye
jnthn I'll have a better estimate of ETA for that tomorrow. 21:51
colomon wait, that should work?! :O
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.
colomon: Yes. 21:52
colomon: Positionals can also be passed by name.
colomon I know that, but I didn't know that made their position "go away"
jnthn colomon: We have probably quite a few tests waiting on this. :-)
colomon: Oh, you can still pass them by position too.
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.
jnthn pmichaud: Sort of ish.
pmichaud or, phrased better: positional parameters not explicitly bound by name are taken from the positional arguments
jnthn pmichaud: That's a better way to say it. :-)
pmichaud: While we may source things from the nameds, we still have to bind them in signature order, not the passed order. 21:54
colomon: \\o/
pmichaud: You didn't imply otherwise, but I just think it's a nice clarification to have. :-) 21:55
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.
In Rakudo today :foo($bar) works, but not :foo(:bar($baz)) 21:56
pmichaud right
coming soon to a grammar near you :)
jnthn Now the binder can handle the second of those too, as many levels deep as you need.
So will just be a grammar tweak later on. :-)
21:56 i-blis left
jnthn Also, there's a stub for building nested signatures later on. 21:57
cognominal I can't way for deep signature matching... :) 22:02
jnthn cognominal: Later this month, or early next month. 22:03
All being well.
jnthn is looking forward to that too
cognominal I recently did a presentation on pattern matching with example in haskell and Perl 6 (as per the spec) 22:05
*examples.
22:18 synth joined 22:31 Limbic_Region joined
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
but the ! forces backtracking in other non-backtracking regexes 22:36
rakudo: say 'aab' ~~ /:ratchet a+ ab/
p6eval rakudo d749d9: OUTPUT«␤»
moritz_ rakudo: say 'aab' ~~ /:ratchet a+! ab/
p6eval rakudo d749d9: OUTPUT«aab␤»
cognominal ok 22:37
moritz_ I only learned that a few days ago ;-)
jnthn I only learned that a few seconds ago... 22:38
pmichaud I have a question about that, though. 22:40
given a token like 22:41
token { <foo>+ }
does that act like
regex { <foo>+ }
oops
does that act like
regex { <foo>+: }
or does it act like
regex { [ <foo>: ]+: } 22:42
std: token { <foo>! }
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␤
..ws␤FAILED 00:01 105m␤»
pmichaud std: token { <foo>:! }
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␤
..terminator␤ ws␤FAILED 00:01 103m␤»
pmichaud i.e., suppose I want to allow backtracking into a subpattern or subrule... how do I do that? 22:43
moritz_ [ :!ratchet <foo> ] 22:44
pmichaud I guess that would work 22:47
22:47 lumi joined
pmichaud seems like one should be able to do a postfix !, too, though. 22:47
oh, wait, that doesn't work. 22:48
it would have to be
:!ratchet <foo> :ratchet
instead of
[ :!ratchet <foo> ]
(the latter doesn't allow backtracking into <foo>)
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
moritz_ aye
pmichaud and if you didn't want that atom to backtrack, you'd turn ratcheting on again 22:51
which gives
:!ratchet <foo> :ratchet <atom>
22:51 rfordinal joined
pmichaud i.e., [ :!ratchet <foo> ] <atom> # not sufficient 22:51
because there's no backtracking into the brackets 22:52
moritz_ right
jnthn decides to try and fit that one into his head another day 22:54
oh, wait, I think I see it...
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>
because ratcheting is turned off at that point
jnthn Ah, the racheting is turned back on after then, so doesn't affect <foo> but does affect <atom>
pmichaud right
but with 22:56
[ :!ratchet <foo> ] <atom>
there's an implied ":" after the brackets
[ :!ratchet <foo> ]: <atom>
which means when <atom> fails, we don't backtrack into the brackets
jnthn Right, that :!rachet is scoped within the brackets?
pmichaud correct.
jnthn OK, got it.
Are all modifiers inside bracketing constructs scoped within them?
pmichaud scoped from the point of the modifier to the end of the "group"
where a "group" is brackets or parens 22:57
jnthn So /[ :i big ] cheese/ matches "BIGcheese" but not "bigCHEESE"?
pmichaud correct.
jnthn Nice. :-)
Seems like a good consistent rule. 22:58
moritz_ welcoem to the wonderful world of perl regexes ;-)
jnthn Oh, I was convinced it's a wonderful world already. :-)
I just have some of the wonders to learn yet. :-)
pmichaud afk, fetching dinner
22:58 rhr_ joined
pugs_svn r28774 | moritz++ | [t/spec] more ratchet tests after discussion with pmichaud++ 23:14
moritz_ (rakudo doesn't run them because it can't parse :!ratchet yet) 23:15
23:19 tak11 joined
pugs_svn r28775 | moritz++ | [t] set svn props 23:22
23:25 lumi joined 23:39 PZt joined 23:47 rhr joined