Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2008-12-13

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:19 azawawi joined #perl6
00:30 pugs_svn r24321 | jnthn++ | [t/spec] todo a test that we don't pass in the rakudoreg branch, but that I'm not sure matches the spec anyway.
00:34 pugs_svn r24322 | jnthn++ | [t/spec] If B is a regex, 'abc' ~~ B is surely not the way to match against it, since that's like B() on the RHS. Change it to &B (we were getting away with this before registering symbols - in the branch of Rakudo that now does this, we stop accidentally passing this test as it
00:34 pugs_svn ..was.)
00:42 |mjk| when perl6 release?
00:44 Eevee joined #perl6
00:48 pugs_svn r24323 | azawawi++ | [Syntax::Highlight::Perl6] Removed META.yml and Makefile.PL now generates it with
00:48 pugs_svn r24323 | azawawi++ | [Syntax::Highlight::Perl6] with the correct license
00:54 xinming joined #perl6
00:57 pugs_svn r24324 | azawawi++ | [Syntax::Highlight::Perl6] Bumped version to 0.022
00:57 pugs_svn r24324 | azawawi++ | [Syntax::Highlight::Perl6] removed archived releases
00:58 pmichaud which release?
01:00 slavik joined #perl6
01:06 slavik joined #perl6
01:34 |mjk| perl6ʲôʱ��������ʽ������
01:34 slavik english?
01:43 |mjk| When will perl6 be ready?
01:48 jnthn Depends on your definition of ready.
01:48 jnthn Ready enough that you can play with it and start to learn it - people are already doing this.
01:48 jnthn Ready to use in production - don't know yet.
01:48 meppl good night
01:49 slavik jnthn: what about mod_php or something and mod-rewrite to have php call proper p6 scripts?
01:49 slavik instead of  mod_perl6
01:50 jnthn slavik: Why?
01:50 jnthn You'd likely get better performance out of using mod_perl6.
01:50 slavik since i can't get mod_parrot to work
01:50 jnthn Ah.
01:50 jnthn Yes, I did manage...after 2 hours.
01:51 slavik I get segfaults when apache tries to start
01:51 slavik err ...
01:51 jnthn But it's not so trivial.
01:51 jnthn Oh, I didn't mange to make it segfault. Congrats... :-)
01:51 jnthn Any luck getting a backtrace though?
01:52 jnthn I'm sure jhorwitz would be interested to see that.
01:53 slavik no
01:54 jnthn OK. It'd be helpful to know why mod_parrot explodes for you.
01:54 slavik I know
01:54 jnthn A backtrace would maybe help to determine why, if it happens insdie something we have built a debug version of.
01:54 slavik but jhorwitz never saw it segfault ... maybe I'll checkout a new version mod_parrot and try again
01:54 jnthn Try latest, yes.
01:55 jnthn But if there's still a bug, a bt would be worth trying for.
01:57 xinming_ joined #perl6
01:58 bacek joined #perl6
02:09 ron_ joined #perl6
02:11 ron_ rakudo: my $x; say $x, 2; my $y = undef; say $y, 2;
02:11 p6eval rakudo 33843: OUTPUT[2␤Use of uninitialized value␤2␤]
02:11 ron_ Why is the second output different from the first?
02:13 buubot joined #perl6
02:14 jnthn ron_: Because we initialize to Object, but undef sticks a Failure object in there, I guess.
02:17 ron_ rakudo: my @a; @a[ 1 ] = 'b'; say @a;
02:17 p6eval rakudo 33843: OUTPUT[Null PMC access in get_string()␤current instr.: 'print' pc 15491 (src/builtins/io.pir:22)␤]
02:18 ron_ rakudo: my @a = (undef, "b"); say @a;
02:18 p6eval rakudo 33843: OUTPUT[Use of uninitialized value␤b␤]
02:18 jnthn Why on earth the error...
02:18 jnthn rakudo: my @a; @a[1] = 'b'; say @a;
02:18 p6eval rakudo 33843: OUTPUT[Null PMC access in get_string()␤current instr.: 'print' pc 15491 (src/builtins/io.pir:22)␤]
02:19 jnthn rakudo: my @a; @a[1] = 'b'; say @a[0];
02:19 p6eval rakudo 33843: OUTPUT[Use of uninitialized value␤␤]
02:20 ron_ rakudo: my @a; @a(2) = 'c'; say @a.perl;
02:20 p6eval rakudo 33843: OUTPUT[invoke() not implemented in class 'ResizablePMCArray'␤current instr.: '_block11' pc 38 (EVAL_12:22)␤]
02:20 ron_ rakudo: my @a; @a[2] = 'c'; say @a.perl;
02:20 p6eval rakudo 33843: OUTPUT[Null PMC access in find_method()␤current instr.: 'parrot;List;perl' pc 3508 (src/classes/List.pir:191)␤]
02:20 pmichaud ah, the other elements aren't coming back as undef in the array.
02:21 pmichaud so it's not able to do the string stuff because @a[0] and @a[1] are null.
02:21 jnthn Aye.
02:21 pmichaud (and that forces the exception)
02:21 pmichaud yeah, I can fix that.
02:21 ron_ Code is in List.class I think ...
02:21 jnthn I figure it's probably an easy fix while you've got that bunch of stuff in your head.
02:21 ron_ List.pir
02:21 pmichaud I think I can put together a quick fix -- the real fix is to get Nil working properly.
02:22 pmichaud and Failure as a Role.
02:22 ron_ OK ... I'll go look for something also to hack at :) ...
02:22 jnthn Oh, yes, we need to do Nil.
02:22 pmichaud I have a simple version in place, but it's still very simple.
02:22 jnthn I'll stick it in next week on Rakudo day.
02:22 jnthn Oh, OK.
02:22 jnthn Did you make return; use it?
02:23 pmichaud not yet.
02:23 pmichaud but that's on my list also, unless you beat me to it.
02:23 jnthn Maybe on Rakudo day. It'll be a ticket to close if I do it. :-)
02:23 pmichaud I just needed it for some of the Positional stuff.
02:23 jnthn And we've some way over 150 right now.
02:23 pmichaud my $a;   should initialize $a to ... ?
02:23 jnthn We agreed Object last time we discussed this.
02:24 jnthn I do ponder though
02:24 pmichaud the proto?
02:24 jnthn Now Failure is a role
02:24 jnthn Yes, the proto
02:24 jnthn Object with Failure role mixed in?
02:24 pmichaud I'm thinking it should be an empty instance of Object
02:24 pmichaud yes, with Failure mixed in.
02:24 jnthn Right. That'd give us the uninit warning?
02:24 pmichaud yes.
02:24 jnthn Great.
02:24 pmichaud the tricky part is that I'm not sure that    my $a;  say $a;   # "Object"?
02:25 jnthn Doesn't Failure mix something in to deal with that?
02:25 jnthn Oh, probably not...
02:25 pmichaud Oh, probably yes, actually.  Good point.
02:25 jnthn It does?
02:25 jnthn OK, good.
02:25 pmichaud well, it should in this case.
02:25 jnthn I guess it's a warning and an empty string.
02:25 pmichaud right.
02:25 pmichaud my $a;  should be pretty close to my $a = undef;
02:26 pmichaud so, whatever undef() returns, that's probably what my $a; shold initialize to.
02:26 pmichaud ...which just means we have to figure out what undef() returns.  :-)
02:26 pmichaud because for    my @a; @a[2] = 'b';     that's what @a[0] and @a[1] should return :-P
02:27 jnthn :-)
02:27 jnthn I think it may be more interesting for typed vars.
02:28 pmichaud well, in the case of typed vars we know that it initializes to the proto
02:28 jnthn I'm sure if this is correct, but at one point I thought my Int $x; ... $x = undef;
02:28 jnthn ...yes, exactly.
02:28 pmichaud my Int $a;  say $a "Int" doesn't bother me.
02:28 jnthn But for $a = undef; later on
02:28 pmichaud it still keeps the type constraint.
02:28 jnthn Is it the Int proto with the Failure role mixed in?
02:28 pmichaud it's just not an Int.
02:28 pmichaud I think it's just whatever undef returns.
02:29 jnthn Because Int proto with Failure mixed in was what I thought it would be.
02:29 jnthn Ah.
02:29 jnthn That wouldn't be sensitive to the type at all.
02:29 pmichaud correct.
02:29 pmichaud that's the way I read the spec at the moment.
02:29 jnthn OK, in that case I must have been wrong.
02:29 jnthn The two don't really hang together
02:29 pmichaud The theory being that any sort of Exception coming back from an operation can be successfully stored in the variable.
02:29 jnthn *nod*
02:29 pmichaud (without being immediately thrown, or causing a typemismatch)
02:30 jnthn Right. Failure is always acceptable.
02:30 jnthn .oO( Don't quote that one out of context... )
02:30 pmichaud so I would expect:   my Int $a;   $a = undef;   $a .= new;   to throw an exception or something.
02:30 jnthn Yes.
02:30 jnthn Probably a MissingMethodException.
02:31 jnthn Erm, that's .Net. D'oh. :-)
02:31 pmichaud MissingDotNetExcep... hey wait, that's a bonus!
02:31 * jnthn spent quite a few days in .Net internals
02:32 pmichaud so, does Object+Failure need to be a mixin?
02:32 pmichaud and don't mixins (currently) create a new class for each mixin?
02:32 jnthn Yeah.
02:32 pmichaud that's not good.
02:32 jnthn Can we not get away with just creating one?
02:32 pmichaud that's why I was thinking about Nil
02:33 pmichaud Nil has Failure properties
02:33 jnthn OK, we don't _have_ to create a new class every time.
02:33 jnthn We can optimize it to not do that.
02:33 jnthn I just counted it as an optimization and didn't bother with it yet.
02:34 pmichaud oh, I agree(d) with that approach.
02:34 pmichaud still do.
02:34 pmichaud I'm just working out the Failure modes.
02:34 jnthn ;-)
02:34 ron_ Is there anything I can do to save you all time in terms of filing a perlbug for these issues.  (presumably just one perlbug)
02:34 jnthn Pun Win.
02:35 pmichaud ron:  put the example you came up with in an email to rakudobug@perl.org
02:35 pmichaud that way it won't be forgotten, and someone will turn it into a test.
02:35 pmichaud or, if you want to turn it into a test, that'd be great also.  :-)
02:35 ron_ ok ... will do tomorrow .. good night
02:35 pmichaud (it might actually be fixed by tomorrow :-)
02:36 jnthn ron_: Night and thanks for flagging up the bug.
02:37 pmichaud okay, time for me to work on getting everyone to bed.
02:37 pmichaud Don't go there.
02:37 pmichaud :-)
02:37 jnthn ...
02:37 pmichaud bbiaw
03:02 slavik joined #perl6
03:04 Psyche^ joined #perl6
03:14 hercynium joined #perl6
03:28 apeiron_ joined #perl6
03:31 simcop2387 joined #perl6
03:51 pmichaud @tell jnthn you're correct, assigning a Failure object to a typed container causes it to take on the type of the container.  S02:871.
03:51 lambdabot Consider it noted.
04:02 elmex_ joined #perl6
04:05 armagad joined #perl6
04:57 Tene So, about spectests... when they rely on other behavior not relevant to the specific features being tested, should I rewrite them to only test that specific behavior?
05:00 PerlJam Tene: I souwould
05:01 PerlJam er, I would
05:01 PerlJam (weird laggy effects here)
05:43 slavik rakudo: say soemthing
05:43 p6eval rakudo 33844: OUTPUT[Could not find non-existent sub soemthing␤current instr.: '_block11' pc 13 (EVAL_13:13)␤]
05:43 apeiron joined #perl6
05:44 apeiron joined #perl6
05:45 slavik pmichaud: any chance for perl on symbian?
05:46 kcwu_ joined #perl6
06:15 lambdabot joined #perl6
06:18 azawawi joined #perl6
06:23 slavik now it core dumps
06:24 japhb joined #perl6
06:49 adc_penner joined #perl6
06:59 iblechbot joined #perl6
07:01 azawawi hi there
07:03 Entonian joined #perl6
07:31 eternaleye joined #perl6
07:32 DemoFreak joined #perl6
07:42 araujo joined #perl6
07:43 justatheory joined #perl6
08:20 kanru joined #perl6
09:00 apeiron joined #perl6
09:16 maerzhase joined #perl6
09:17 japhb joined #perl6
09:27 schmalbe joined #perl6
09:32 pugs_svn r24325 | moritz++ | [S29] List.sort with a unary or nullary code object does a Schwartzian
09:32 pugs_svn r24325 | moritz++ | Transform. (Feel free to improve the wording)
09:34 moritz_ rakudo: say (a => 3, c => 1, b => 2).sort({ .value}).perl
09:34 p6eval rakudo 33846: OUTPUT[[("c" => 1), ("b" => 2), ("a" => 3)]␤]
09:41 azawawi moritz_: what is stored in the "lex" directory that is generated when using STD.pm?
09:42 moritz_ azawawi: the lexing cache
09:43 moritz_ azawawi: bascially digraphs and the rules that they match
09:43 * azawawi documents it in his module... thx ;-)
09:44 azawawi is there an option in STD.pm to switch caching off?
09:45 moritz_ no
09:46 azawawi what about the foo.pl.log file that is created when using it?
09:59 pbuetow joined #perl6
10:02 pmurias joined #perl6
10:04 pmurias ruoso: do you think using MooseX::Declare in mildew is sane?
10:04 pugs_svn r24326 | azawawi++ | [Syntax::Highlight::Perl6] POD fixes, diagrams, ..etc
10:04 pugs_svn r24326 | azawawi++ | [Syntax::Highlight::Perl6] Removed a unicode wide-char
10:04 pugs_svn r24326 | azawawi++ | [Syntax::Highlight::Perl6] parse_trees() method now returns the correct array of records
10:06 sri_kraih joined #perl6
10:08 alexn_org joined #perl6
10:22 pugs_svn r24327 | azawawi++ | [Syntax::Highlight::Perl6] Bumped version to 0.023
10:22 pugs_svn r24327 | azawawi++ | [Syntax::Highlight::Perl6] More POD fixes
10:38 hanekomu_ joined #perl6
10:50 rakudo_svn r33850 | bernhard++ | [codinstd] remove trailing space
10:56 ejs joined #perl6
11:09 jferrero joined #perl6
11:17 schmalbe joined #perl6
11:27 pugs_svn r24328 | azawawi++ | [Syntax::Highlight::Perl6] added 4 tests
11:27 pugs_svn r24328 | azawawi++ | [Syntax::Highlight::Perl6] update Changes
11:29 Ehtyar joined #perl6
11:33 alexn_org joined #perl6
11:33 vixey joined #Perl6
11:33 meppl joined #perl6
11:35 perl7 joined #perl6
11:35 pmurias perl6: class Foo { method foo {say "bar";return &self;}};my $foo = Foo.new;my $bar = $foo.foo;
11:35 p6eval elf 24328: OUTPUT[/home/evalenv/pugs/misc/elf/elf_f_src/STD_red/match.rb:141:in `block in to_dump0': undefined method `to_dump0' for true:TrueClass (NoMethodError)␤     from /home/evalenv/pugs/misc/elf/elf_f_src/STD_red/match.rb:140:in `each'␤       from
11:35 p6eval ../home/evalenv/pugs/misc/elf/elf_f_src/STD_red/match.r...
11:35 p6eval ..pugs, rakudo 33851: OUTPUT[bar␤]
11:35 pmurias perl6: class Foo { method foo {say "bar";return &self;}};my $foo = Foo.new;my $bar = $foo.foo;$bar().foo
11:35 p6eval pugs: OUTPUT[bar␤*** Undeclared variable: ("$__SELF__",MkPad (padToList [("$_",PELexical {pe_type = (mkType "Scalar"), pe_proto = <Scalar:0xb62e4cc9>, pe_flags = MkEntryFlags {ef_isContext = True}, pe_store = <ref:0xb62fc6a1>}),("@_",PELexical {pe_type = (mkType "Array"), pe_proto = <Array:0x...
11:35 p6eval ..elf 24328: OUTPUT[/home/evalenv/pugs/misc/elf/elf_f_src/STD_red/match.rb:141:in `block in to_dump0': undefined method `to_dump0' for true:TrueClass (NoMethodError)␤     from /home/evalenv/pugs/misc/elf/elf_f_src/STD_red/match.rb:140:in `each'␤       from
11:35 p6eval ../home/evalenv/pugs/misc/elf/elf_f_src/STD_red/match.r...
11:35 p6eval ..rakudo 33851: OUTPUT[bar␤invoke() not implemented in class 'Undef'␤current instr.: '_block11' pc 95 (EVAL_13:35)␤]
11:37 pmurias is self a function or a keyword? the spec is unclear
12:01 pugs_svn r24329 | azawawi++ | [Syntax::Highlight::Perl6] tests cover every public method (23 tests in total)
12:05 Guest51662 joined #perl6
12:05 alanhaggai joined #perl6
12:08 lumi joined #perl6
12:11 iblechbot joined #perl6
12:12 pugs_svn r24330 | azawawi++ | [Syntax::Highlight::Perl6] Fixed a typo in test description
12:12 pugs_svn r24330 | azawawi++ | [Syntax::Highlight::Perl6] Updated the Changes file to 'svn log'... Releasing 0.023
12:13 stigtsp joined #perl6
12:28 ruoso @tell pmurias MooseX::Declare is a cool module, it certainly could be used
12:28 lambdabot Consider it noted.
12:42 pmurias joined #perl6
12:42 pmurias ruoso: hi
12:42 lambdabot pmurias: You have 1 new message. '/msg lambdabot @messages' to read it.
12:44 ruoso hi pmurias
12:45 pmurias ruoso: do you think it is sane to treat self as a keyword?
12:46 ruoso unfortunally, it isn't one
12:46 ruoso but there's a simple way of making it work
12:46 ruoso we just need to add &self := { $capture.invocant } in the AdhocSignature for methods
12:48 pmurias how far is a &say in the prelude in the ROADMAP?
12:49 rindolf joined #perl6
12:50 ruoso pmurias, I didn't want to implement &say before having multi sub implemented
12:51 masak joined #perl6
12:52 pmurias ok
12:53 pmurias i'm getting annoyed by $OUT.print and was thinking a placeholder sub say($arg) {$OUT.print($arg.FETCH)} would be nice
13:00 ejs left #perl6
13:00 alech joined #perl6
13:23 justatheory joined #perl6
13:28 ruoso pmurias, yeah... maybe we could just have something that would be replaced later
13:33 pmurias ruoso: so it's more of a question when will we have a prelude
13:33 pmurias ruoso: self is handled by term:self so maybe it's a keyword after all
13:34 pmurias You may always access the
13:34 pmurias current invocant using the keyword C<self>.
13:34 pmurias S12:164
13:36 pmurias S12:188 mentions it's a function
13:36 pmurias TimToady: is self a keyword or a function, in other words is &self legal?
13:48 ruoso hmm
13:49 ruoso that makes me think... if self is not a function, we might need to store the invocant in a different variable
13:49 ruoso and self would mean accessing that variable
13:49 ruoso is there a twigil for runtime-specific variables?
13:50 ruoso $¿var as opposed to $?var :D
13:51 pmurias seems sane
13:52 ruoso so $¿invocant ?
13:52 pmurias yes... ;)
13:56 ruoso pmurias, are you aware that " ¿ statement ? " is the way to ask a question in written spanish
13:56 ruoso ?
13:56 ruoso that make $¿invocant? funny
13:56 pmurias no
13:56 pmurias i wasn't aware of that
14:01 ruoso we need to declare '$¿invocant := $capture.invocant' in the AdhocSignature for methods
14:02 pmurias should it be invocant or self?
14:02 ruoso hmm... $¿self might make more sense
14:03 masak is that a new twigil?
14:03 pmurias yes
14:03 SamB huh -- " ¿ statement ? " doesn't look good here
14:03 masak ¿what does it mean?
14:04 SamB because ¿ and ? don't seem to be in the same font ...
14:04 * pmurias changes to $¿invocant to $¿self
14:04 pmurias masak: evil runtime variable
14:04 SamB too bad the text renderer can't just transform the glyph for ? to get the one for ¿ ...
14:04 masak pmurias: ah. because there wasn't enough evil in Perl 6?
14:05 ruoso we needed a way to implement self
14:05 masak I've always seen it as a keyword, fwiw
14:05 SamB but Self has only been implemented ONCE
14:05 ruoso masak, yes... it is a keyword, $¿self is how we're going to implement that keyword in mildew
14:06 masak ruoso: ok.
14:06 SamB in C++ that depends heavily on the way the compiler lays out classes with vtables!
14:06 SamB hmm, mildew does not sound good somehow
14:07 pmurias masak: there seems to be a serious deficiency of evil in Perl 6 ;)
14:08 masak pmurias: yes, no-one has addressed that satisfactorily so far.
14:08 masak so, good work. :)
14:09 pugs_svn r24331 | pmurias++ | [mildew] self support
14:09 pugs_svn r24331 | pmurias++ | [m0ld] pcl is linked in so --exec works again
14:16 pmurias ruoso: p6opaque should implement ^!clone?
14:16 ruoso yes, it should
14:18 pmurias SamB: re vtables mildew is a very naive compiler now as we attempt to layer stuff to aim for a faster bootstrap instead of trying to compile down to the metal
14:19 SamB pmurias: btw I was actually speaking of the Self language ;-P
14:22 drbean joined #perl6
14:25 pmurias ruoso: i should add an ^!instance_storage method to p6opaque?
14:29 ruoso yeah... it makes sense
14:53 sri_kraih joined #perl6
15:06 pugs_svn r24332 | mj41++ | [Synopses] - some formating
15:10 pugs_svn r24333 | mj41++ | util/PaP6-testing - README fix
15:16 vixey joined #Perl6
15:29 azawawi joined #perl6
15:29 azawawi hi
15:30 pmichaud oh cooooooool
15:30 pmichaud sort { .whatever } @list   is *already* in the synopses
15:30 jnthn (knowing a block's arity)++
15:31 * jnthn is happy to see this added
15:31 pmichaud it's in Synopsis 3, under the file test operators  :-)
15:31 pmichaud The advantage of the method form is that it can be used in places that
15:31 pmichaud require tighter precedence than C<~~> provides:
15:31 pmichaud sort { $^a.M <=> $^b.M }, @files
15:31 pmichaud though that's a silly example since you could just write:
15:31 pmichaud sort { .M }, @files
15:31 masak pmichaud: you should write that to the current thread in p6l :)
15:31 pmichaud I am.
15:31 masak pmichaud++
15:32 azawawi moritz_: plz take a look at http://search.cpan.org/perldoc?Syntax::Highlight::Perl6
15:32 jnthn Either way, it's worth a mention in S29.
15:32 pmichaud that's how I found it -- I was about to write to the thread saying "this is how we would do the -M example now", only to discover it's already in S03
15:32 masak jnthn: moritz_++ put it in already.
15:33 jnthn Aha, great.
15:33 * pmichaud adds the comment to his post as well.
15:39 jhorwitz joined #perl6
15:39 azawawi @tell TimToady I've documented the bugs i encountered so far in http://search.cpan.org/perldoc?Syntax::Highlight::Perl6 . Can we dump Moose.pm dependency for STD.pmc? Moose seems not to work correctly on my strawberry win32. Thx. TimToady++
15:39 lambdabot Consider it noted.
15:44 mj41 hi, is "=begin code :allow<B>" valid POD syntax?
15:44 pmichaud perl 6 pod?   yes, I think so -- I haven't reviewed the spec lately.  It might not be implemented yet.
15:45 mj41 it is used inside S26-documentation.pod .. line 73, ...
15:46 pmichaud I know that S26 is up for some more revision, but whatever appears in S26-documentation.pod is currently our best guess at things.
15:47 mj41 and I can't use Pod::Simple::Wiki to generate S26 on http://perl6.cz/wiki/Synopses/en
15:47 pmichaud well, note that Perl 6 pod is different from Perl 5 pod
15:48 pmichaud I don't know if Pod::Simple::Wiki supports p6pod
15:49 mj41 I know. So we are using Perl 6 POD or Perl 5 POD to write Synopses?
15:49 pmichaud S26 is written in Perl 6 POD
15:49 pmichaud the others may still be p5pod, if only because we don't have a p6pod formatter yet.
15:49 pmichaud eventually they will become p6pod
15:49 * jnthn tries to work out what http://perl6.cz/wiki/Jonathan_Worthington says about him.
15:51 mj41 pmichaud Thanks.
15:52 masak is there a way to limit the number of allowed parameters to a code block argument in a signature?
15:53 jnthn Implemented, or just at all?
15:53 masak just at all.
15:53 masak this is #perl6, after all :)
15:53 jnthn well
15:53 jnthn there's always
15:53 jnthn the (probably working)
15:54 jnthn sub foo(&code_block where { 1 <= .arity <= 2 }) { ... }
15:54 masak I was thinking somthing like that.
15:54 * masak goes away to try that
15:54 jnthn Mwahaha. I just realized. If that works you can multi-dispatch on the arity of the block you're passed. :-)
15:54 pmichaud oh!
15:55 masak jnthn: yes :)
15:55 pmichaud that answers a few other questions I had as well.
15:55 pmichaud cool.
15:55 jnthn pmichaud: It should even work in Rakudo today.
15:55 masak rakudo: sub foo(&code_block where { 1 <= .arity <= 2 }) { say "OH HAI" }; foo(1)
15:55 p6eval rakudo 33858: OUTPUT[Method 'arity' not found for invocant of class 'Int'␤current instr.: '_block23' pc 417 (EVAL_14:163)␤]
15:55 masak what does Int have to do with it?
15:55 pmichaud masak: you didn't pass a code block.
15:55 jnthn Int?
15:55 jnthn Oh!
15:55 jnthn Yes. :-)
15:55 pmichaud you sent it an Int.
15:56 masak oh.
15:56 jnthn we should fail with "Doesn't do Callable".
15:56 masak jnthn: rakudobug?
15:56 jnthn If you like.
15:56 pmichaud no, we should fail with "no matching sub found"
15:56 * masak files
15:56 pmichaud (if multi sub)
15:56 jnthn It wasn't a multi
15:56 pmichaud right
15:56 * masak expects more bugs from this
15:56 jnthn It'd be parameter type check failed in sub foo at the moment
15:56 pmichaud right.
15:57 pmichaud that's what I meant.
15:57 pmichaud really.
15:57 jnthn But I'm certainly up for more explanation of *why*.
15:57 pmichaud :-)
15:57 jnthn multis are now quite good about this
15:57 jnthn If you get an ambiguous dispatch it gives you .perl on the signatures of the ambiguous candidates.
15:57 mberends joined #perl6
16:00 maerzhase joined #perl6
16:02 maerzhase joined #perl6
16:02 masak rakudo: multi foo(&c where { .arity == 1 }) { say "One." }; multi foo(&c where { .arity == 2 }) { say "Two." }; foo({ $^a }); foo({$^a + $^b})
16:02 p6eval rakudo 33858: OUTPUT[One.␤Two.␤]
16:02 masak wow, it works!
16:02 jnthn .oO( Phew! )
16:03 masak jnthn++
16:04 jnthn notmasakbug++ ;-)
16:04 masak rakudo: multi foo(&c where { .arity == 1 }) { say "One." }; multi foo(&c where { .arity == 2 }) { say "Two." }; foo({$^a + $^b + $^c })
16:04 p6eval rakudo 33858: OUTPUT[Ambiguous dispatch to multi 'foo'. Ambiguous candidates had signatures:␤:(Any c where all({ ... }))␤:(Any c where all({ ... }))␤␤current instr.: '_block11' pc 35 (EVAL_14:19)␤]
16:04 masak that's wrong, though.
16:04 masak as far as I can see.
16:05 masak why is the dispatch ambiguous?
16:05 pmichaud because none of them matched.
16:05 pmichaud "ambiguous" is probably the wrong word.
16:05 masak yes.
16:05 masak it really is.
16:05 jnthn That's...interesting. :-S
16:06 pmichaud change it to be "Failed dispatch to ..."
16:06 * masak submits rakudobug
16:06 jnthn It's not just wording. It really did think it was an ambiguity.
16:06 masak exactly.
16:06 jnthn rakudo: multi sub foo(Int $x) { }; foo("OH HAI")
16:06 p6eval rakudo 33858: OUTPUT[No applicable candidates found to dispatch to for 'foo'␤current instr.: '_block11' pc 31 (EVAL_14:17)␤]
16:06 jnthn *nod*
16:06 pmichaud okay.
16:07 jnthn Interesting bug.
16:07 jnthn Shouldn't be too hard to fix.
16:08 masak jnthn++
16:09 jnthn masak++ # finding these
16:09 jnthn These will make good test cases.
16:10 masak it's a pleasure. and it's good both for me and for Rakudo.
16:13 kcwu joined #perl6
16:20 masak what's the easiest way to make an object with attributes that cannot be (easily) changed after the object's instantiation?
16:20 pugs_svn r24334 | azawawi++ | [Syntax::Highlight::Perl6] Added perl6.vim to the module (Text::VimColor support)
16:21 pmichaud you mean "not easily changed, even by the object itself"?
16:21 masak pmichaud: no, I'm the class author, so I control the object.
16:21 pmichaud isn't that just a private attribute, then?
16:21 masak pmichaud: a private attribute can still be initialized on creation?
16:21 pmichaud yes.
16:21 masak goodie.
16:21 masak thanks.
16:23 adc_penner joined #perl6
16:24 jhorwitz pmichaud: i have an issue with list assignment, though it might have something to do with the implementation of "split"
16:24 jhorwitz i shall nopaste
16:24 jhorwitz nopaste?
16:26 pasteling "jhorwitz" at 96.245.16.64 pasted "pmichaud: list assignment fail" (28 lines, 894B) at http://sial.org/pbot/33663
16:27 pmichaud ah, list assignment needs generate Failure objects for the things that don't get assigned.
16:27 pmichaud or throw an exception.
16:28 jhorwitz want me to open a ticket?
16:28 pmichaud sure
16:28 pmichaud I'm going to clean up failures this morning, and then I'll do that.
16:29 pmichaud then I'm going to work on tickets for a while.
16:29 jhorwitz excellent.  :)
16:29 pmichaud I'll probably do parameter stuff tomorrow-ish.
16:29 pmichaud oh, I also need to do PGE assertions.
16:29 spx2 joined #perl6
16:29 pmichaud maybe I should stick this stuff in my hiveminder queue :-)
16:29 jhorwitz don't forget world peace
16:29 jnthn pmichaud probably saw how I hacked around lack of PGE assertions and has been horrified into doing them. ;-)
16:30 pmichaud I haven't seen it yet, no.
16:30 jnthn You probably don't want to. ;-)
16:30 pmichaud but as soon as you mentioned <?{{...}}> yesterday I knew how to do it.
16:30 pmichaud the horror for me generally starts when jonathan++ says "I think I'll implement <some cool feature that looks really hard to Pm>"
16:30 pmichaud :-)
16:31 pmichaud but it's a nice sort of horror, because... well -- see "passing spectests"  :-)
16:32 pugs_svn r24335 | azawawi++ | [Syntax::Highlight::Perl6] Added vim_html() for Text::VimColor & perl6.vim
16:32 pugs_svn r24335 | azawawi++ | [Syntax::Highlight::Perl6] Bumped version to 0.025
16:32 pugs_svn r24335 | azawawi++ | [Syntax::Highlight::Perl6] Added tests for vim_html and remove version from README
16:34 jnthn Our inability to agree on what the hard bits are continues to serve Rakudo well. :-)
16:35 pmichaud afk, grocery shopping
17:06 jhorwitz pmichaud: fyi, list assignment bug w/ split is RT #61336
17:13 Hinrik mj41: the only Perl 6 Pod translator I've seen is Perl6::Perldoc, you might want to take a look
17:14 xinming joined #perl6
17:16 pugs_svn r24336 | hinrik++ | [util/perl6.vim] small replace %\(\s\|$) with \_s
17:17 azawawi hinrik: im nearly done with the vim_html() method in Syntax::Highlight::Perl6; This will use perl6.vim if you installed it in $HOME/.vim/syntax
17:17 Hinrik ok
17:20 Hinrik hm, from S02: "Unlike in Perl 5, if a sigil is followed by comma, semicolon, colon, or any kind of bracket or whitespace (including Unicode brackets and whitespace), it will be taken to be a sigil without a name rather than a punctuational variable. This allows you to use sigils as coercion operators"
17:21 Hinrik a colon? but a colon is a twigil, right?
17:21 jnthn $:named_placeholder_param, IIRC.
17:22 jnthn Hinrik: What context are we in here though? Signatures?
17:22 jnthn Oh, probably not, reading that. Hmm.
17:22 Hinrik It's under the Names heading in S02
17:23 jnthn Maybe LTM decides it?
17:23 jnthn Or not even that
17:24 jnthn $:@foo # can't be a variable name (though I'm not sure what it means)
17:24 jnthn $:foo # named palceholder
17:24 jnthn $: foo # can't be a variable name, becuse of the sapce, so calls foo
17:24 TimToady $: used to be a list operator, but now it's just $ args
17:24 lambdabot TimToady: You have 3 new messages. '/msg lambdabot @messages' to read them.
17:24 jnthn Is $: foo meaning anythng now?
17:25 TimToady btw, can someone tell me which hemisphere I'm in today?
17:25 jnthn Probably northern?
17:25 TimToady $:foo is the twigil now
17:25 jnthn Copenhagen?
17:25 TimToady maybe Many Worlds?
17:25 ejs1 joined #perl6
17:25 Hinrik is "$: $foo" an error?
17:26 TimToady should be
17:26 jnthn Not always, probably
17:26 Hinrik ok
17:26 jnthn sub foo($: $foo) { ... } # we take some scalar invocant...
17:26 jnthn Where : here is the invocant separator in a signature.
17:27 TimToady yes, STD thinks it's an error (as rvalue)
17:27 Hinrik hm, how could you have a non-scalar invocant?
17:28 jnthn When you call eg %hash.keys
17:28 TimToady hmm, currently STD requires a space between $ and : in a sig
17:28 alanhaggai joined #perl6
17:28 Hinrik ah
17:29 jnthn TimToady: What about sub foo($self: $foo) { ... }
17:29 jnthn ?
17:29 jnthn No space there?
17:29 TimToady that seems fine to STD
17:30 TimToady might just be the bare sigil form of parameter is too picky
17:31 TimToady well, can't really look at it right now--don't even have time to backlog yet...
17:31 TimToady bbl &
17:40 pugs_svn r24337 | azawawi++ | [Syntax::Highlight::Perl6] Support for Text::VimColor is now complete
17:40 pugs_svn r24337 | azawawi++ | [Syntax::Highlight::Perl6] You have to install perl6.vim by yourself
17:40 pugs_svn r24337 | azawawi++ | [Syntax::Highlight::Perl6] Separated vim_html() test to 01-vim.t
17:41 pugs_svn r24338 | hinrik++ | [util/perl6.vim] updated todo list
17:45 pugs_svn r24339 | azawawi++ | [Syntax::Highlight::Perl6] vim_html will generate inlined full html
17:51 pugs_svn r24340 | azawawi++ | [Syntax::Highlight::Perl6] Updated Changes... Releasing 0.024 soon.
17:54 pugs_svn r24341 | azawawi++ | [Syntax::Highlight::Perl6] last min pod fix...
18:02 alech joined #perl6
18:05 hercynium joined #perl6
18:40 ejs2 joined #perl6
18:47 pugs_svn r24342 | lwall++ | [t/spec] fix syntax errors found by STD
18:50 pugs_svn r24343 | lwall++ | [STD] report non-associative errors correctly
18:50 pugs_svn r24343 | lwall++ | [Cursor,gimme5] cleanup of logging, some small speedups
18:50 rakudo_svn r33861 | pmichaud++ | [rakudo]: spectest-progress.csv update: 240 files, 5005 passing, 0 failing
18:50 yahooooo joined #perl6
18:52 ejs2 left #perl6
18:54 ejs1 joined #perl6
18:56 jan_ joined #perl6
19:04 DemoPhreak joined #perl6
19:06 azawawi moritz_, hinrik: should we submit perl6.vim to www.vim.org/scripts/ for inclusion?
19:21 pugs_svn r24344 | azawawi++ | [Syntax::Highlight::Perl6] Renamed Actions package to Syntax::Highlight::Perl6::Actions
19:26 Hinrik azawawi: hm, maybe when I finish a few more things :P
19:26 Hinrik some(most?) of the regex/rule stuff in perl6.vim is broken, for example, I haven't touched it yet
19:34 azawawi Hinrik: cool
19:38 azawawi Hinrik: i've already included perl6.vim support in my highlighter package... fyi
19:38 pugs_svn r24345 | azawawi++ | [Syntax::Highlight::Perl6] STD_syntax_highlight is now using this package
19:55 bacek joined #perl6
20:10 rakudo_svn r33863 | pmichaud++ | [rakudo]:  Remove unused global lookup.
20:12 Hinrik ok, cool
20:17 pugs_svn r24346 | hinrik++ | [util/perl6.vim] add todo item
20:20 rakudo_svn r33864 | pmichaud++ | [rakudo]:  Fix problem with null elements passed to print (partial fix RT #61324).
20:48 eternaleye joined #perl6
21:05 Hinrik rakudo: say <a b # comment>.perl
21:05 p6eval rakudo 33864: OUTPUT[["a", "b", "#", "comment"]␤]
21:05 Hinrik rakudo: say «a b # comment».perl
21:05 p6eval rakudo 33864: OUTPUT[Statement not terminated properly at line 1, near "\x{ab}a b # com"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤]
21:06 justatheory joined #perl6
21:07 jnthn Ah, that might just be our unicode parsing bug.
21:07 Hinrik rakudo: say <<a b # comment>>.perl
21:08 p6eval rakudo 33864: OUTPUT[["a", "b", "#", "comment"]␤]
21:08 Hinrik hm
21:09 Hinrik S02 says that «» allows comments
21:09 Hinrik pugs: say <<a b # comment>>.perl
21:09 p6eval pugs: OUTPUT[("a", "b", "#", "comment")␤]
21:10 spx2 joined #perl6
21:12 c9s_ joined #perl6
21:13 Hinrik that should fail because the comment should consume the >>
21:15 Hinrik perl6: say <<a b #[comment] c d>>.perl
21:15 p6eval rakudo 33864: OUTPUT[["a", "b", "#[comment]", "c", "d"]␤]
21:15 p6eval ..elf 24346: OUTPUT[["a"]␤]
21:15 p6eval ..pugs: OUTPUT[("a", "b", "#[comment]", "c", "d")␤]
21:20 rakudo_svn r33865 | pmichaud++ | [rakudo]:  Fix initialization of $/, $0, etc. (RT #57758)
21:20 rakudo_svn r33865 | pmichaud++ | * undef objects now return undef when subscripted
21:20 rakudo_svn r33865 | pmichaud++ | * reorganized Failure.pir methods
21:32 pugs_svn r24347 | hinrik++ | [util/perl6.vim] expect an identifier as a :key, allow comments and escaped # chars in double angles, fix problem with nested angles in some Pod formatting codes
21:33 ejs1 joined #perl6
21:35 mncharity joined #perl6
21:42 pugs_svn r24348 | hinrik++ | [util/perl6.vim] made operator matching less greedy, which fixes a few problems
21:49 AzaTht joined #perl6
21:56 pugs_svn r24349 | putter++ | [elf_h] EmitSimpleP5: postcircumfix {} [] special cases dropped.  Match: fields renamed, and array field added.
22:04 pugs_svn r24350 | putter++ | [rx_on_re] Use elf_h's Match.
22:04 pugs_svn r24350 | putter++ | t_baseline.result: some error messages changed.
22:04 pugs_svn r24350 | putter++ | t/re_tests.pl, t/rx.pl: don't use overloading to access Match (embedded code tests still use overloaded bool - todo?).
22:08 pugs_svn r24351 | hinrik++ | [util/perl6.vim] highlight $<match> more like a variable with a special sigil
22:15 simcop2387 joined #perl6
22:26 pugs_svn r24352 | hinrik++ | [util/perl6.vim] highlight punctuation and numeric variables, adjust highlighting of twigils
22:29 Limbic_Region joined #perl6
22:30 adc_penner2 joined #perl6
22:43 pugs_svn r24353 | hinrik++ | [util/perl6.vim] enhance [] reduce matching a bit
22:49 pugs_svn r24354 | putter++ | [elf_h] Fix regression bug, and avoid dialect expansion.
22:49 pugs_svn r24354 | putter++ | [STD_blue] Sync with elf_h.
22:50 mncharity on_sbcl still works.
22:55 jferrero joined #perl6
23:03 mncharity @tell TimToady  Just a reminder, since STD was touched - STD_blue elf broke on r24080, and has stopped tracking head, staying with r24067.  I've been considering r24080, with little thought, a probable STD regression, given the presence of "Unknown routines: sub called at " messages, which seemed at least some sort of STD bug.
23:03 lambdabot Consider it noted.
23:06 TimToady joined #perl6
23:06 alech joined #perl6
23:06 drbean joined #perl6
23:06 [particle] joined #perl6
23:06 rhr_ joined #perl6
23:06 smg joined #perl6
23:06 zostay joined #perl6
23:06 lizsac joined #perl6
23:06 dalek joined #perl6
23:07 rakudo_svn joined #perl6
23:07 pugs_svn joined #perl6
23:07 moritz_ joined #perl6
23:07 cookys joined #perl6
23:07 rafl joined #perl6
23:07 ilogger2 joined #perl6
23:07 Helios- joined #perl6
23:07 krunen joined #perl6
23:08 rakudo_svn joined #perl6
23:13 mncharity next task for me: fleshing out STD_blue-based regex-source->IR parsing, with a target milestone of the rx_on_re test suite passing(*) using STD_blue-based parsing.  (*) To the extent possible given STD bugs parsing rx and re... not a great milestone, but oh well.  :/  Then either migrate to the pugs t/ rx and re tests, or start working through STD.pm, not sure which.
23:13 mncharity g'night all &
23:18 mncharity left #perl6
23:20 ejs joined #perl6
23:30 rakudo_svn r33869 | pmichaud++ | [rakudo]:  Remove spurious :subid tag from enums.pir.
23:38 ewilhelm joined #perl6

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

Perl 6 | Reference Documentation | Rakudo