Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-01-14

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:00 masak lue: let's just say I'm glad I'm not facing that choice ;)
00:00 lue :)
00:03 Gruber joined #perl6
00:07 nyuszika7h_ joined #perl6
00:07 jantore joined #perl6
00:07 masak__ joined #perl6
00:09 leont joined #perl6
00:10 davido_ joined #perl6
00:11 woshty joined #perl6
00:12 wtw joined #perl6
00:14 avar joined #perl6
00:14 avar joined #perl6
00:18 dalek rakudo/nom: 4cd1668 | hoelzro++ | src/Perl6/Grammar.nqp:
00:18 dalek rakudo/nom: Recommend attributes in addition to similar lexicals
00:18 dalek rakudo/nom:
00:18 dalek rakudo/nom: We currently have a mechanism for suggesting similarly named lexical
00:18 dalek rakudo/nom: variables if someone mistypes a variable name:
00:18 dalek rakudo/nom:
00:18 dalek rakudo/nom:     my $name = 'Rob';
00:18 dalek rakudo/nom:     say "Hello, $nam!";
00:18 dalek rakudo/nom:
00:18 dalek rakudo/nom:     # output: Variable '$nam' is not declared. Did you mean '$name'?
00:18 dalek rakudo/nom:
00:18 dalek rakudo/nom: I personally often make the mistake of typing '$name' when I mean to
00:18 dalek rakudo/nom: refer to the member of an object '$!name'.  This commit adds $!name
00:18 dalek rakudo/nom: as a suggestion if you're in a context that has member variables
00:18 dalek rakudo/nom: and has a member variable $name.
00:18 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4cd1668cfd
00:18 masak ooh, nice :)
00:20 clkao joined #perl6
00:24 Mouq m: ole Bar { method foo {...} }; class Foo does Bar { has $.foo }; my Bar @a = Foo.new(foo => 5); say @a # :D
00:24 camelia rakudo-moar e2c18c: OUTPUT«Useless declaration of a has-scoped method in mainline (did you mean 'my method foo'?)�[31m===[0mSORRY![31m===[0m Error while compiling /tmp/HSZ5T9Sc2l�Invalid typename�at /tmp/HSZ5T9Sc2l:1�------> [32mar { method foo {...} }; class Foo does …»
00:24 Mouq m: role Bar { method foo {...} }; class Foo does Bar { has $.foo }; my Bar @a = Foo.new(foo => 5); say @a # :D
00:24 camelia rakudo-moar e2c18c: OUTPUT«Foo.new(foo => 5)␤»
00:24 Mouq m: role Bar { method foo {...} }; class Foo does Bar { has $.foo }; my @a = [Foo.new(foo => 5), Foo.new(foo => 42)], [Foo.new(foo => 12), Foo.new(foo => 73)]; @a.map(-> Bar @f { say @f }) # :(
00:24 camelia rakudo-moar e2c18c: OUTPUT«Unhandled exception: Type check failed in binding @f; expected 'Positional[Bar]' but got 'Array'␤   at <unknown>:1  (/home/camelia/rakudo-inst-2/languages/perl6/runtime/CORE.setting.moarvm:throw:4294967295)␤ from src/gen/m-CORE.setting:13899  (/home/ca…»
00:24 Mouq m: role Bar { method foo {...} }; class Foo does Bar { has $.foo }; my @a = $(my Bar @ = Foo.new(foo => 5), Foo.new(foo => 42)), $(my Bar @ = Foo.new(foo => 12), Foo.new(foo => 73)); @a.map(-> Bar @f { say @f }) # :/
00:24 camelia rakudo-moar e2c18c: OUTPUT«Foo.new(foo => 5) Foo.new(foo => 42)␤Foo.new(foo => 12) Foo.new(foo => 73)␤»
00:25 Mouq Would 6pe fix that middle example?
00:25 Mouq *Is the goal of 6pe...
00:28 masak lue: here's my solution, commented: https://gist.github.com/masak/db655cb7ab27454cf15c
00:28 masak lue: it's slow. takes a few hours to run.
00:29 * Mouq has a totally different idea for a solution, but has been taking a 'dialectical' approach to writing the program, so still hasn't actually gotten there
00:30 masak lue: I'm secretly proud of my idea to "melt" walls. my original impulse was to "flood-fill" cells, but melting is shorter to implement.
00:30 lue Looks nice and compact :) .
00:31 masak I kind of iterated my way there.
00:35 kurahaupo joined #perl6
00:35 clkao joined #perl6
00:36 ggherdov joined #perl6
00:37 lue Yeah, I still have that weird duplicate entry issue with an updated rakudo. Hmm...
00:41 Spot__ joined #perl6
00:41 lue Huh, I got something interesting running ».WHICH on the set I create.
00:42 lue It comes back as ("Parcel|(Int|0)(Scalar|81064920)", "Parcel|(Int|0)(Int|1)", "Parcel|(Int|0)(Int|2)", "Parcel|(Int|2)(Scalar|81064920)", "Parcel|(Int|2)(Int|1)", ...
00:43 lue (well, .keys».WHICH I should say)
00:46 Mouq masak: Oh wait. Looking at your comments, your algorithm is exactly what I was going to do. I don't actually want to read the code it since I consider that cheating :P
00:47 Mouq masak: Though we're definitely going about the algorithm in different ways
00:51 bbkr joined #perl6
00:51 ggherdov joined #perl6
00:53 berekuk_ joined #perl6
00:55 lue Oh, I think those Scalar| things come from having return statements like  return ($row, $col; $row, $col + 1);  Anyone know how to deal with that?
00:58 Mouq +$row, +$col?
00:58 lue Yep, adding + 0 after every bare variable in those kinds of returns works, like I thought. (So the two C<$row>s and one C<$col> in that example line). That's... really bad.
00:58 dayangkun joined #perl6
00:59 lue Mouq: they're assigned things like  my $row = +$1 % $GRID_SIZE;  I don't think converting them to numeric is going to help.
00:59 lue Oh, +$var works too. But still, that's terrible.
01:00 dayangkun joined #perl6
01:01 adu hi lue
01:01 lue o/
01:01 lue I'm leaving them all as  $var + 0  though, because that makes it more obviously that there's something really wrong happening.
01:01 dayangkun joined #perl6
01:01 lue *obvious
01:02 timotimo joined #perl6
01:03 dayangkun joined #perl6
01:07 avalenn joined #perl6
01:15 hoelzro m: sub greet($name) { say "hello $name" } ; greet 'Rob'
01:15 camelia rakudo-moar e2c18c: OUTPUT«hello Rob␤»
01:15 hoelzro er
01:15 hoelzro m: sub greet($name) { say "hello $nam" } ; greet 'Rob'
01:15 camelia rakudo-moar e2c18c: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/aCVKDKpy38â�¤Variable '$nam' is not declaredâ�¤at /tmp/aCVKDKpy38:1â�¤------> [32msub greet($name) { say "hello $nam[33mâ��[31m" } ; greet 'Rob'[0mâ�¤    expecting any of:â�¤        postfixâ�¤Â»
01:15 hoelzro there we go
01:16 hoelzro I'm trying to get that to other $name as a suggestion, but the suggestion code is trying to "force a value" out of $name, and it can't
01:16 hoelzro I'm guessing because it doesn't have a value until that sub is called?
01:19 yeahnoob joined #perl6
01:19 TimToady the compiler shouldn't care about that
01:20 TimToady m: sub greet($namename) { say "hello $namenam" }
01:20 camelia rakudo-moar e2c18c: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/qjHdSawVYoâ�¤Variable '$namenam' is not declaredâ�¤at /tmp/qjHdSawVYo:1â�¤------> [32mb greet($namename) { say "hello $namenam[33mâ��[31m" }[0mâ�¤    expecting any of:â�¤        postfixâ�¤Â»
01:20 TimToady m: sub greet($namename) { say "hello ", $namenam }
01:20 camelia rakudo-moar e2c18c: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/kWpJ7h8lv6â�¤Variable '$namenam' is not declaredâ�¤at /tmp/kWpJ7h8lv6:1â�¤------> [32mreet($namename) { say "hello ", $namenam[33mâ��[31m }[0mâ�¤    expecting any of:â�¤        postfixâ�¤Â»
01:20 moritz m: my $namename; say $namenam
01:20 camelia rakudo-moar e2c18c: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/nW8qUlUwNxâ�¤Variable '$namenam' is not declared. Did you mean '$namename'?â�¤at /tmp/nW8qUlUwNx:1â�¤------> [32mmy $namename; say $namenam[33mâ��[31m<EOL>[0mâ�¤    expecting any of:â�¤        p…»
01:21 TimToady well, that wouldn't be the only thing disabled inside subs
01:21 TimToady m: 42; 43;
01:21 camelia rakudo-moar e2c18c: OUTPUT«WARNINGS:␤Useless use of constant integer 42 in sink context (line 1)␤»
01:21 TimToady sub foo { 42; 43 }
01:21 masak 'night, #perl6
01:21 TimToady m: sub foo { 42; 43 }
01:21 camelia rakudo-moar e2c18c: ( no output )
01:21 moritz huh.
01:21 moritz bug.
01:22 * TimToady wonders if it's related
01:23 moritz hoelzro: what do you mean by "but the suggestion code is trying to "force a value" out of $name,"? where is that code?
01:23 hoelzro moritz: walk_symbols in Perl6::Word
01:23 hoelzro *World
01:26 moritz hoelzro: yes, that looks wrong-ish
01:28 dalek joined #perl6
01:28 moritz hoelzro: fun fact: the value is being passed to the sub returned from make_lefenshtein_evaluator...
01:28 moritz hoelzro: ... which promptly ignores it.
01:28 moritz hoelzro: are you going to throw that out, or should I?
01:29 adu m: role R {}; enum E does R < e1 e2 >; my R $x = E::e1; say $x
01:29 camelia rakudo-moar e2c18c: OUTPUT«Type check failed in assignment to '$x'; expected 'R' but got 'E'␤  in block <unit> at /tmp/nI8ZG_ZR5D:1␤␤»
01:29 lumimies joined #perl6
01:30 adu so I can't specify enum roles
01:38 TimToady why would you expect a trait on the enum type to distribute to its mappings?
01:38 TimToady I guess I can kinda see it...
01:40 TimToady m: role R {}; enum E (e1 => (0 but R), e2 => (1 but R)); my R $x = E::e1; say $x
01:40 camelia rakudo-moar 4cd166: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/hhazmEp9w_�Type error in enum. Got 'Int+{R}' Expected: 'Int+{R}'�at /tmp/hhazmEp9w_:1�------> [32mnum E (e1 => (0 but R), e2 => (1 but R))[33m�[31m; my R $x = E::e1; say $x[0m�»
01:40 [particle] joined #perl6
01:40 TimToady weird
01:41 timotimo joined #perl6
01:41 TimToady m: role R {}; enum E does R < e1 e2 >; E::e1.WHAT.say
01:41 camelia rakudo-moar 4cd166: OUTPUT«(E)␤»
01:42 TimToady m: role R {}; enum E < e1 e2 >; my R $x = E::e1 but R; say $x
01:42 camelia rakudo-moar 4cd166: OUTPUT«No such method 'mixin' for invocant of type 'Perl6::Metamodel::EnumHOW'␤  in sub infix:<but> at src/gen/m-CORE.setting:19575␤  in block <unit> at /tmp/u7fr2FDFvj:1␤␤»
01:42 TimToady enums are kind of an odd corner of the language
01:45 TimToady they're really just a way to declare a bunch of constants, and don't unify easily with any other types of types
01:49 moritz hoelzro: ok, getting rid of the value entirely a bit trickier, because suggest_typename relies on the value to check if something is a type or not
01:50 moritz hoelzro: a possible solution is to first check if $name starts with a sigil. If yes, it's not a type
01:51 moritz hoelzro: and in the second step, check if there is a compile time value. If yes, check if it's concrete. If no, it's not a type
01:54 moritz nqp-m: say(nqp::substr('', 0, 1))
01:54 camelia nqp-moarvm: OUTPUT«␤»
02:04 BenGoldberg joined #perl6
02:05 BenGoldberg joined #perl6
02:08 moritz I have a local patch that does that, but it doesn't make the parameter appear in the "did you mean" :(
02:10 moritz erm wait, I messed it up
02:10 moritz no wonder
02:10 moritz but now, sleep again&
02:12 dalek rakudo/suggestion-cleanup: 239985e | moritz++ | src/Perl6/World.nqp:
02:12 dalek rakudo/suggestion-cleanup: Try to include parameters in "did you mean"-suggestions for mis-spelled lexicals
02:12 dalek rakudo/suggestion-cleanup: review: https://github.com/rakudo/rakudo/commit/239985e047
02:18 araujo joined #perl6
02:21 Mouq joined #perl6
02:29 hoelzro moritz: I went to go exercise, I was going to see if passing symbols w/o a value would work anyway
02:29 hoelzro thanks for putting the work in!
02:36 adu joined #perl6
02:41 Rounin joined #perl6
02:47 kurahaupo joined #perl6
02:49 woolfy joined #perl6
02:51 [Tux] joined #perl6
02:52 Spot__ joined #perl6
02:54 eternaleye joined #perl6
02:55 dalek rakudo/suggestion-cleanup: 2aebe70 | hoelzro++ | src/Perl6/World.nqp:
02:55 dalek rakudo/suggestion-cleanup: Get lexical suggestions to include parameters
02:55 dalek rakudo/suggestion-cleanup: review: https://github.com/rakudo/rakudo/commit/2aebe703c6
02:55 hoelzro moritz: I worked with your change to get parameters to be included in suggestions
02:56 hoelzro I'm not sure how correct my change is, so I'd like you and others to vet it
02:56 * hoelzro starts work on Mojo::DOM
02:57 integral joined #perl6
02:57 integral joined #perl6
02:57 hobbs joined #perl6
03:00 colomon joined #perl6
03:02 lsm-desktop joined #perl6
03:05 tadzik heh. Couldn't sleep, started thinking about fosdem talk. "I'll just write down some thoughts I have so I don't forget about them overnight"
03:05 tadzik Turned into a 1100+ word essay :o
03:05 hoelzro heh
03:05 Juerd joined #perl6
03:06 adu can I specify roles on roles?
03:07 hoelzro adu: do you mean to ask if roles can consume other roles?
03:08 adu like "role A does B does C { ... }"
03:08 hoelzro yeah, you can
03:11 hobbs joined #perl6
03:13 mephinet joined #perl6
03:17 yogan joined #perl6
03:18 hoelzro if you make $obj; in your actions, that becomes the return value for Grammar.parse, right?
03:20 tadzik .parse.ast I think
03:20 flussence joined #perl6
03:20 adu I give up on ASTs
03:22 adu there are only 2 AST structures that seem to make sense, 1 or more classes for every production in the grammar, and the other is just using Op for everything, which reminds me too much of S-expressions
03:24 woolfy joined #perl6
03:26 noganex_ joined #perl6
03:27 skids I think .ast is useful for pre-pruning to remove uneeded levels of the grammar tree mostly.
03:28 skids But yeah you pretty much have to have an action for every rule.
03:29 skids Some way to ameliorate that would be nice.
03:29 clkao_ joined #perl6
03:30 adu skids: I think the default Match builder is pretty awsome
03:34 Juerd joined #perl6
03:39 adu hoelzro: kinda
03:40 adu hoelzro: I don't remember when I learned, or why, but I have method TOP($/) { make $/.values.[0].ast; } at the top of all of my Actions classes
03:42 timotimo joined #perl6
03:42 hoelzro ah, yes
03:42 hoelzro thanks
04:03 hobbs joined #perl6
04:15 colomon joined #perl6
04:15 yogan joined #perl6
04:34 hobbs joined #perl6
04:36 yoleaux joined #perl6
04:37 kaleem joined #perl6
04:40 lumimies joined #perl6
04:41 Alina-malina joined #perl6
04:43 integral joined #perl6
04:43 integral joined #perl6
04:46 mephinet joined #perl6
05:30 hobbs joined #perl6
05:42 sirdancealot joined #perl6
05:53 mephinet joined #perl6
05:55 dj_goku joined #perl6
05:55 dj_goku joined #perl6
06:00 konsolebox joined #perl6
06:08 telex joined #perl6
06:13 Rounin joined #perl6
06:13 hobbs joined #perl6
06:27 mephinet- joined #perl6
06:28 adu_ joined #perl6
06:40 mr-foobar joined #perl6
06:47 nyuszika7h_ joined #perl6
06:52 Alina-malina joined #perl6
06:59 IllvilJa joined #perl6
07:00 dayangkun joined #perl6
07:02 moritz \o
07:11 Psyche^ joined #perl6
07:21 yeahnoob joined #perl6
07:22 yeahnoob joined #perl6
07:26 anaeem1 joined #perl6
07:29 kaleem joined #perl6
07:29 gfldex joined #perl6
07:37 kaleem joined #perl6
07:41 grondilu joined #perl6
07:42 grondilu m: use MONKEY_TYPING; augment class Mu { method foo { } }; Mu.foo
07:42 camelia rakudo-moar 4cd166: ( no output )
07:43 Juerd joined #perl6
07:44 * grondilu got a weird error trying to something like, but can't reproduce it.  Nevermind.
07:44 * grondilu meant "trying somthing like that"
07:44 FROGGS joined #perl6
07:44 konsolebox joined #perl6
07:45 grondilu oh I see
07:45 grondilu m: use MONKEY_TYPING; augment role Mu { method foo { } }; Mu.foo
07:45 camelia rakudo-moar 4cd166: OUTPUT«===SORRY!===␤Cannot find method 'set_body_block'␤»
07:46 grondilu ^I wrote "role" instead of "class"
07:46 FROGGS m: use MONKEY_TYPING; augment role Int { method foo { } }; Int.foo
07:46 camelia rakudo-moar 4cd166: OUTPUT«===SORRY!===␤Cannot find method 'set_body_block'␤»
07:46 FROGGS nice :o)
07:47 jnthn augment role is meant to just say you canät
07:48 FROGGS jnthn: you've got a german keyboard O.o
07:48 jnthn no, Swedish dammit
07:48 FROGGS *g*
07:48 * jnthn maps the keyboard with a UK layout so today's live coding demos will actually work out :)
07:49 FROGGS is the saying 'old Swede' something that works outside of Germany too?
07:50 jnthn I don't know it :)
07:50 FROGGS k :o)
07:51 FROGGS dict.cc translates it to "Gosh!" :D
07:51 FROGGS masak: so in Germany you've got to say "Alter Schwede!" instead of "Gosh!" :o)
07:52 [Sno] joined #perl6
07:58 Alina-malina joined #perl6
08:09 IllvilJa joined #perl6
08:15 mvuets joined #perl6
08:19 kjs_ joined #perl6
08:20 darutoko joined #perl6
08:30 kaleem joined #perl6
08:31 rurban joined #perl6
08:38 djanatyn joined #perl6
08:48 zakharyas joined #perl6
09:04 andreoss joined #perl6
09:06 andreoss are traits are supposed to be used with destructuring signatures?
09:07 andreoss m: multi car($x, [$y, @ys] where  $x == $y) {1}; say car 1, [1,2,3];
09:07 camelia rakudo-moar 4cd166: OUTPUT«Cannot call 'infix:<==>'; none of these signatures match:␤:(Any $?)␤:(Any \a, Any \b)␤:(Real \a, Real \b)␤:(Int:D \a, Int:D \b)␤:(int $a, int $b)␤:(Num:D \a, Num:D \b --> Bool)␤:(num $a, num $b --> Bool)␤:(Rational:D \a, Rational:D \b)␤:(…»
09:07 kjs_ joined #perl6
09:10 rindolf joined #perl6
09:20 dakkar joined #perl6
09:26 fhelmberger joined #perl6
09:26 mvuets joined #perl6
09:44 dalek rakudo/nom: b78ed35 | (Yun SangHo)++ | src/core/IO/Socket/Async.pm:
09:44 dalek rakudo/nom: It should be a Blob
09:44 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b78ed3519e
09:44 dalek rakudo/nom: d694913 | jnthn++ | src/core/IO/Socket/Async.pm:
09:44 dalek rakudo/nom: Merge pull request #352 from foollbar/nom
09:44 dalek rakudo/nom:
09:44 dalek rakudo/nom: It should be a Blob
09:44 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d6949132a9
09:50 virtualsue joined #perl6
09:57 moritz joined #perl6
10:02 Ovid joined #perl6
10:03 CurtisOvidPoe Morning all.
10:06 mr-foobar joined #perl6
10:07 lumimies joined #perl6
10:13 abraxxa joined #perl6
10:22 moritz \o
10:22 tadzik 'morning
10:23 sergot hi o/
10:27 Juerd joined #perl6
10:31 kjs_ joined #perl6
10:36 kjs_ joined #perl6
10:38 Ugator joined #perl6
10:44 dalek rakudo/nom: 239985e | moritz++ | src/Perl6/World.nqp:
10:44 dalek rakudo/nom: Try to include parameters in "did you mean"-suggestions for mis-spelled lexicals
10:44 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/239985e047
10:44 dalek rakudo/nom: 2aebe70 | hoelzro++ | src/Perl6/World.nqp:
10:44 dalek rakudo/nom: Get lexical suggestions to include parameters
10:44 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/2aebe703c6
10:44 dalek rakudo/nom: 5943c82 | moritz++ | src/Perl6/World.nqp:
10:44 dalek rakudo/nom: Merge branch 'suggestion-cleanup' into nom
10:44 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/5943c8226e
10:44 FROGGS ohh nice
10:44 moritz .tell hoelzro I merged branch suggestion-cleanup. Thanks for the nice collaboration.
10:44 yoleaux moritz: I'll pass your message to hoelzro.
10:50 moritz hoelzro++ did most of the debugging and tracing, I just refactored a bit
10:50 andreoss m: multi car($x, [$y, @ys] where  $x == $y) {1}; say car 1, [1,2,3];
10:50 camelia rakudo-moar d69491: OUTPUT«Cannot call 'infix:<==>'; none of these signatures match:␤:(Any $?)␤:(Any \a, Any \b)␤:(Real \a, Real \b)␤:(Int:D \a, Int:D \b)␤:(int $a, int $b)␤:(Num:D \a, Num:D \b --> Bool)␤:(num $a, num $b --> Bool)␤:(Rational:D \a, Rational:D \b)␤:(…»
10:50 andreoss could that be a bug?
10:51 moritz m: say 1 == [1, 2, 3]
10:51 camelia rakudo-moar d69491: OUTPUT«False␤»
10:52 moritz m: multi car($x, [$y, *@ys] where  $x == $y) {1}; say car 1, [1, 2, 3]
10:52 camelia rakudo-moar d69491: OUTPUT«Cannot call 'infix:<==>'; none of these signatures match:␤:(Any $?)␤:(Any \a, Any \b)␤:(Real \a, Real \b)␤:(Int:D \a, Int:D \b)␤:(int $a, int $b)␤:(Num:D \a, Num:D \b --> Bool)␤:(num $a, num $b --> Bool)␤:(Rational:D \a, Rational:D \b)␤:(…»
10:52 moritz m: multi car($x, [$y, *@ys] where { $x == $y }) {1}; say car 1, [1, 2, 3]
10:52 camelia rakudo-moar d69491: OUTPUT«Cannot call 'infix:<==>'; none of these signatures match:␤:(Any $?)␤:(Any \a, Any \b)␤:(Real \a, Real \b)␤:(Int:D \a, Int:D \b)␤:(int $a, int $b)␤:(Num:D \a, Num:D \b --> Bool)␤:(num $a, num $b --> Bool)␤:(Rational:D \a, Rational:D \b)␤:(…»
10:52 moritz huh
10:52 moritz m: multi car($x, [$y, *@ys] where { say (:$x, :$y).perl;  $x == $y }) {1}; say car 1, [1, 2, 3]
10:52 camelia rakudo-moar d69491: OUTPUT«("x" => 1, "y" => Mu)␤Cannot call 'infix:<==>'; none of these signatures match:␤:(Any $?)␤:(Any \a, Any \b)␤:(Real \a, Real \b)␤:(Int:D \a, Int:D \b)␤:(int $a, int $b)␤:(Num:D \a, Num:D \b --> Bool)␤:(num $a, num $b --> Bool)␤:(Rational:D…»
10:53 moritz m: multi car($x, @ [$y, *@ys] where { say (:$x, :$y).perl;  $x == $y }) {1}; say car 1, [1, 2, 3]
10:53 camelia rakudo-moar d69491: OUTPUT«("x" => 1, "y" => Mu)␤Cannot call 'infix:<==>'; none of these signatures match:␤:(Any $?)␤:(Any \a, Any \b)␤:(Real \a, Real \b)␤:(Int:D \a, Int:D \b)␤:(int $a, int $b)␤:(Num:D \a, Num:D \b --> Bool)␤:(num $a, num $b --> Bool)␤:(Rational:D…»
10:53 anaeem1__ joined #perl6
10:54 moritz m: sub f($x, [$y, *@ys]) { say (:$x, :$y, :@ys).perl }; f 1, [2, 3, 4]
10:54 camelia rakudo-moar d69491: OUTPUT«("x" => 1, "y" => 2, "ys" => [3, 4])␤»
10:55 moritz m: sub f($x, [$y, *@ys] where { say $y.perl } ) { say (:$x, :$y, :@ys).perl }; f 1, [2, 3, 4]
10:55 camelia rakudo-moar d69491: OUTPUT«Cannot call method 'perl' on a null object␤  in sub f at /tmp/UT7XBanYbi:1␤  in block <unit> at /tmp/UT7XBanYbi:1␤␤»
10:55 anaeem1__ joined #perl6
10:55 moritz andreoss: seems like variables extracted from subsignatures aren't available in where-blocks
10:55 moritz andreoss: and yes, that's a bug
10:56 FROGGS m: multi car($x, [$y, @ys] where $x == 1) {1}; say car 1, [1, [2, 3]];
10:56 camelia rakudo-moar d69491: OUTPUT«1␤»
10:56 FROGGS m: multi car($x, [$y, @ys] where $x == $y) {1}; say car 1, [1, [2, 3]];
10:56 camelia rakudo-moar d69491: OUTPUT«Cannot call 'infix:<==>'; none of these signatures match:␤:(Any $?)␤:(Any \a, Any \b)␤:(Real \a, Real \b)␤:(Int:D \a, Int:D \b)␤:(int $a, int $b)␤:(Num:D \a, Num:D \b --> Bool)␤:(num $a, num $b --> Bool)␤:(Rational:D \a, Rational:D \b)␤:(…»
10:57 moritz who want's to rakudobug it?
10:57 FROGGS I can
10:58 moritz FROGGS++
11:08 masak good noon, #perl6
11:08 [Tux] what is p6' view on %ENV? do I need to declare it?
11:08 lizmat %*ENV
11:09 lizmat it's a dynamic variable, per scope overridable
11:09 [Tux] ok, thnx
11:09 lizmat m: say %*ENV<HOME>
11:09 camelia rakudo-moar d69491: OUTPUT«/home/camelia␤»
11:10 masak FROGGS: never heard about "Alter Schwede!" before.
11:14 moritz you didn't? alter Schwede!
11:19 denis_boyun_ joined #perl6
11:20 FROGGS *g*
11:21 dalek rakudo/nom: f1dec12 | lizmat++ | src/core/array_slice.pm:
11:21 dalek rakudo/nom: Documentation to prevent trying to opt (again)
11:21 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/f1dec12c53
11:24 kaare__ joined #perl6
11:25 kjs_ joined #perl6
11:28 CurtisOvidPoe Is grep supposed to generate a lazy list by default?
11:28 lizmat yes
11:29 kjs_ joined #perl6
11:29 CurtisOvidPoe m: my @primes = grep { .is-prime }, 1 .. Inf; say @primes[^20]
11:29 CurtisOvidPoe That hangs on my box.
11:29 CurtisOvidPoe What am I missing?
11:29 camelia rakudo-moar d69491: OUTPUT«(timeout)»
11:29 tadzik a colon :)
11:29 lizmat m: my @primes := grep { .is-prime }, 1 .. Inf; say @primes[^20]  # a colon
11:29 camelia rakudo-moar d69491: OUTPUT«2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71␤»
11:30 CurtisOvidPoe And here I was just about to ask where to insert my colon. Glad I thought better of it.
11:30 CurtisOvidPoe Could someone point me to the docs on that so I can read up?
11:30 lizmat assignment is eager, therefore it will try to fill the array first
11:31 psch S07:The laziness of some common operations
11:31 synopsebot Link: http://perlcabal.org/syn/S07.html#The_laziness_of_some_common_operations
11:32 psch hm, binding isn't common :)
11:32 andreoss joined #perl6
11:32 lizmat S02:2184
11:32 synopsebot Link: http://perlcabal.org/syn/S02.html#line_2184
11:32 anaeem1 joined #perl6
11:35 [Tux] m: $+="0";s{^(\d+)$}=sprintf "%3d -",$_
11:35 camelia rakudo-moar d69491: OUTPUT«Cannot call 'subst-mutate'; none of these signatures match:␤  in method subst-mutate at src/gen/m-CORE.setting:4177␤  in block <unit> at /tmp/txz3CVzXV_:1␤␤»
11:35 CurtisOvidPoe psch: those docs read that assignment via ‘=‘ “will eagerly evaluate the return value from foo() to place elements into @a, stopping only when encountering something that is "known infinite" “
11:35 CurtisOvidPoe Except that I would think 1..Inf is known infinite :)
11:35 [Tux] m: $_="0";s{^(\d+)$}=sprintf "%3d -",$_
11:35 camelia rakudo-moar d69491: ( no output )
11:36 CurtisOvidPoe A doc error, or do I just not understand it?
11:36 [Tux] m: $_=0;s{^(\d+)$}=sprintf "%3d -",$_
11:36 camelia rakudo-moar 5943c8: OUTPUT«Cannot call 'subst-mutate'; none of these signatures match:␤  in method subst-mutate at src/gen/m-CORE.setting:4177␤  in block <unit> at /tmp/loCjFTpO5G:1␤␤»
11:37 [Tux] that one. It obviously is numeric
11:37 andreoss rakudobug is working?
11:37 andreoss it seems abandoned
11:37 lizmat andreoss: huh?  I saw one appear just now?
11:38 andreoss lizmat: it was mentioned above
11:38 [Tux] am i forced to stringify?
11:40 lizmat m: $_="0";s{^(\d+)$}=sprintf "%3d -",$_; .say
11:40 camelia rakudo-moar 5943c8: OUTPUT«  0 -␤»
11:40 lizmat what was your plan with $+  ??
11:40 andreoss lizmat: i mean the utility, is it working?
11:41 lizmat andreoss: ah, that, no idea
11:41 [Tux] $+ was a typo
11:41 lizmat well, that's a case of LTA error then
11:41 [Tux] i had a 0 instead of a "0" and got that error
11:42 [Tux] and /me was surprised
11:42 psch CurtisOvidPoe: you're right, i think we don't really have the "mostly *" levels yet
11:44 lizmat [Tux]: looks like a bug, care to rakudobug it?
11:44 CurtisOvidPoe psch: thanks!
11:45 [Tux] don't know: $_ was of type int
11:45 [Tux] hoiw do I rakudobug that?
11:47 CurtisOvidPoe mailto:rakudobug@perl.org
11:48 [Tux] mailed
11:48 lizmat [Tux]++
11:52 [Tux] what is perl6' version of caller ()?
11:55 lizmat m: sub a { say callframe(1) }; a
11:55 camelia rakudo-moar 5943c8: OUTPUT«CallFrame.new(level => 3, annotations => ("line" => "1", "file" => "/tmp/sIx8TFLJag").hash, my => EnumMap.new("\$!", Nil, "\$/", Nil, "\$_", Nil, "GLOBALish", GLOBAL, "EXPORT", EXPORT, "\$?PACKAGE", GLOBAL, "::?PACKAGE", GLOBAL, "\&a", sub a () { #`(Sub|75…»
11:56 lizmat [Tux]: if you just want access to the scope:
11:56 lizmat m: sub a { say CALLER::.keys }; a
11:56 camelia rakudo-moar 5943c8: OUTPUT«$! $/ $_ GLOBALish EXPORT $?PACKAGE ::?PACKAGE &a $=pod !UNIT_MARKER␤»
11:56 lizmat m: my $a = "foo"; sub a { say CALLER::.keys }; a
11:56 camelia rakudo-moar 5943c8: OUTPUT«$a $! $/ $_ GLOBALish EXPORT $?PACKAGE ::?PACKAGE &a $=pod !UNIT_MARKER␤»
11:56 colomon joined #perl6
11:58 lizmat m: my $a = "foo"; sub a { say OUTER::<$a> }; a   # if you're interested in the outer scope, not the callers
11:58 camelia rakudo-moar 5943c8: OUTPUT«foo␤»
11:58 lizmat m: my $a = "foo"; sub a { say CALLER::<$a> }; a   # can only access dynamic vars
11:58 camelia rakudo-moar 5943c8: OUTPUT«Cannot access '$a' through CALLER, because it is not declared as dynamic␤  in method at_key at src/gen/m-CORE.setting:10974␤  in sub postcircumfix:<{ }> at src/gen/m-CORE.setting:3049␤  in sub a at /tmp/rjm0cWzow4:1␤  in block <unit> at /tmp/rjm0cW…»
11:58 lizmat m: my $a is dynamic = "foo"; sub a { say CALLER::<$a> }; a   # can only access dynamic vars
11:58 camelia rakudo-moar 5943c8: OUTPUT«foo␤»
12:04 dalek rakudo/nom: db3656f | lizmat++ | src/core/Str.pm:
12:04 dalek rakudo/nom: Remove unneeded stub
12:04 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/db3656faa7
12:18 kjs_ joined #perl6
12:22 [Tux] sorry to keep bothering. How do I do «@ch[$i..$#ch].perl» (@ch elements $i (int) to last)
12:23 [Tux] lizmat, I wanted the line number of the caller: my $line = callframe (1).annotations<line>;
12:24 lizmat $i .. *-1
12:24 lizmat [Tux]:  ^^
12:28 andreoss sub foo(@xs as [$x,$y,$z]).. can i do something like this?
12:31 yeahnoob joined #perl6
12:34 jnthn Note that destructuring happens *after* where clauses are applied
12:34 jnthn If you want to do a where on the destructured values, put it *inside* the sub-signature
12:35 jnthn It's not a bug; it would be weird if we destructured data that failed to meet type constraints on the thing being destructured. So the current ordering is intended.
12:36 jnthn andreoss: Why the as? Just write @xs [$x, $y, $z]
12:37 andreoss thanks
12:39 leont joined #perl6
12:40 lizmat jnthn: I was under the impression that using \a in a signature in $a would be faster always
12:40 lizmat jnthn: am I wrong?  (looking at a benchmark here that says otherwise :-(
12:44 lizmat jnthn: please scratch that thought  :-)
12:46 grondilu joined #perl6
12:49 mr-foobar joined #perl6
12:56 timotimo iirc \a would not force a new Scalar to be created if something not in a scalar was passed OSLT
12:59 lizmat I'm, looking at optimizing postcircumfix:<[ ]>( \SELF, Int $pos )
13:00 lizmat I see a ~20% loss in performance if I change the $pos to \pos
13:00 lizmat benchmark: my @a = ^10; my int $a=@a.end; for ^1000000 { @a[$a] }
13:01 lizmat I guess I should profile the different code  :-)
13:03 moritz lizmat: you should use a loop with a native int counter for benchmarking
13:03 moritz lizmat: otherwise you're really benchmarking 'for' iteration, not the array access
13:06 lizmat well, yes, but if the code is identical otherwise, the diff should be caused by the access, no?
13:07 FROGGS only the percentage improvement will be different for int vs. Int I'd say
13:08 FROGGS (in case int and Int have the same at_pos candidate)
13:08 lizmat they do
13:08 lizmat it doesn't change when I use a native int as the index, it does when I use Int
13:09 * lizmat is going to take out the <0 check to see if that makes the diff
13:09 colomon joined #perl6
13:12 ab6tract joined #perl6
13:13 lizmat yup, it's the combination with the <0 check
13:27 dayangkun joined #perl6
13:32 hoelzro o/ #perl6
13:32 yoleaux 10:44Z <moritz> hoelzro: I merged branch suggestion-cleanup. Thanks for the nice collaboration.
13:33 hoelzro moritz: thanks for the merge, and the help!
13:39 [TuxCM] joined #perl6
13:40 [TuxCM] debugging seems very very costly. removing the «$opt_v and progress (arguments);» lines gains me 30%!!!
13:40 jnthn lizmat: The $ sigil can help performance in some cases.
13:41 ab6tract has anyone seen this error during a moar build? "Can't compile simple gcc probe, so something is badly wrong"
13:41 jnthn lizmat: iirc, it knows it's doing a Scalar assignment.
13:41 jnthn lizmat: And produces better code for that.
13:43 lizmat ok
13:50 ab6tract jnthn: i've found the code which emits that error, but i haven't figured out what might be missing
13:50 ab6tract gcc works in normal operations, perl5 compiles fine for instance
13:57 [TuxCM] do we have something like Test::More already?
13:57 lizmat m: use Test; ok 1, "foo"
13:57 camelia rakudo-moar db3656: OUTPUT«ok 1 - foo␤»
13:57 eiro TuxCM, Test
13:57 eiro it has the basic at least
13:58 [TuxCM] the basic should do for a start :)
13:58 [TuxCM] expect new bug discoveries
13:58 lizmat [TuxCM]: keep them coming!   :-)
14:01 [TuxCM] Whooooooah, no __END__ :/
14:01 [TuxCM] how do I mark "All and beyond is comment". use =for something ?
14:01 tadzik it's =END or so
14:01 FROGGS it needs to have a matching =end though
14:02 FROGGS ohh
14:02 FROGGS m: say 42␤=END␤hurz␤
14:02 camelia rakudo-moar db3656: OUTPUT«42␤»
14:02 FROGGS nice
14:02 hoelzro [TuxCM]: =finish
14:02 FROGGS O.o
14:02 FROGGS m: say 42␤=finish␤hurz␤
14:02 camelia rakudo-moar db3656: OUTPUT«42␤»
14:02 FROGGS both?
14:03 tadzik possibly both
14:03 lizmat .oO( there is more than one way to end it )
14:03 [TuxCM] =finish WFM. thanks
14:03 FROGGS m: say 42␤=swedish␤hurz␤
14:03 camelia rakudo-moar db3656: OUTPUT«42␤»
14:03 tadzik =finish is new, relatively, iirc
14:03 tadzik :D
14:03 FROGGS wth
14:03 tadzik well
14:03 tadzik you did start a pod block
14:03 tadzik it's going to last until an empty line
14:03 tadzik an abbreviated block like that
14:03 FROGGS ahh
14:03 FROGGS I see
14:03 FROGGS m: say 42␤=swedish␤hurz␤␤␤␤
14:03 camelia rakudo-moar db3656: OUTPUT«42␤»
14:03 FROGGS m: say 42␤=swedish␤hurz␤␤say 'ohh noes'␤␤
14:03 camelia rakudo-moar db3656: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/XN6h9QEihcâ�¤Two terms in a rowâ�¤at /tmp/XN6h9QEihc:5â�¤------> [32m<BOL>[33mâ��[31msay 'ohh noes'[0mâ�¤    expecting any of:â�¤        infix stopperâ�¤        infix or meta-infixâ�¤        pos…»
14:04 FROGGS m: say 42␤=finish␤hurz␤␤say 'ohh noes'␤␤
14:04 [TuxCM] I included the old perl5 test file, and will move test by test from past =END to working test code in perl6
14:04 camelia rakudo-moar db3656: OUTPUT«42␤»
14:04 FROGGS m: say 42␤=END␤hurz␤␤say 'ohh noes'␤␤
14:04 camelia rakudo-moar db3656: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/V_7ZLfuKQDâ�¤Two terms in a rowâ�¤at /tmp/V_7ZLfuKQD:5â�¤------> [32m<BOL>[33mâ��[31msay 'ohh noes'[0mâ�¤    expecting any of:â�¤        infix stopperâ�¤        infix or meta-infixâ�¤        pos…»
14:04 ggoebel111111117 joined #perl6
14:04 FROGGS okay, so only '=finish' then
14:05 tadzik istr there being spectests for it, can't find them now
14:10 xinming joined #perl6
14:16 anaeem1_ joined #perl6
14:16 lizmat jnthn: looking at [] handling, I'm getting to the point that I tihink tha at_pos/bind_pos/exists_pos/assign_pos methods should do the <0 check
14:17 lizmat jnthn: and *not* postcircumfix:<[ ].
14:17 xfix joined #perl6
14:17 xfix joined #perl6
14:17 lizmat especially on shaped arrays in the future, we want that check to be as low as possible, I would think
14:18 lizmat and that would mean on the at_pos of a shaped array, not on the postcircumfix
14:20 lizmat m: m: my @a = <one two>; @a[*-3,*-4]   # <0 error not caught
14:20 camelia rakudo-moar db3656: ( no output )
14:20 lizmat m: m: my @a = <one two>; say @a[*-3,*-4]   # argh,   :)
14:20 camelia rakudo-moar db3656: OUTPUT«Calculated index (-1) is negative, but Array allows only 0-based indexing␤  in method gist at src/gen/m-CORE.setting:13984␤  in method gist at src/gen/m-CORE.setting:7995␤  in sub say at src/gen/m-CORE.setting:16749␤  in block <unit> at /tmp/WGlQck…»
14:24 anaeem1_ joined #perl6
14:26 [TuxCM] $c.foo (...); class c { method foo () { for @arg -> $arg { ... }}}
14:26 [TuxCM] how to loop over all arguments in method, where any of the optional arguments can be anything
14:27 lizmat m: sub a { .say for @_ }; a(1,2,3,4)
14:27 camelia rakudo-moar db3656: OUTPUT«1␤2␤3␤4␤»
14:27 [TuxCM] @_ it is
14:27 lizmat the oldy but goody  :-)
14:27 pecastro joined #perl6
14:28 xfix joined #perl6
14:28 xfix joined #perl6
14:30 [TuxCM] m: class c { has @\!find; method f () { for @_ -> $f {}}} c.new.f()
14:30 camelia rakudo-moar db3656: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/2Mp5LFtpGkâ�¤Cannot declare an anonymous attributeâ�¤at /tmp/2Mp5LFtpGk:1â�¤------> [32mclass c { has @[33mâ��[31m\!find; method f () { for @_ -> $f {}}} [0mâ�¤    expecting any of:â�¤        co…»
14:30 [TuxCM] m: class c { has @!find; method f () { for @_ -> $f {}}} c.new.f()
14:30 camelia rakudo-moar db3656: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/DnBkgxJ94D�Placeholder variables cannot be used in a method�at /tmp/DnBkgxJ94D:1�------> [32ms @!find; method f () { for @_ -> $f {}}[33m�[31m} c.new.f()[0m�»
14:31 timotimo m: class c { has @!find; method f { for @_ -> $f {}}} c.new.f()
14:31 camelia rakudo-moar db3656: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/k_5syOZxqD�Placeholder variables cannot be used in a method�at /tmp/k_5syOZxqD:1�------> [32m has @!find; method f { for @_ -> $f {}}[33m�[31m} c.new.f()[0m�»
14:31 timotimo interesting, perhaps that's because of the invocant?
14:31 timotimo m: class c { has @!find; method f(|arguments) { for arguments.list -> $f {}}} c.new.f()
14:31 camelia rakudo-moar db3656: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/eBD9ihWOMBâ�¤Two terms in a rowâ�¤at /tmp/eBD9ihWOMB:1â�¤------> [32muments) { for arguments.list -> $f {}}} [33mâ��[31mc.new.f()[0mâ�¤    expecting any of:â�¤        infix stopperâ�¤        inf…»
14:32 timotimo m: class c { has @!find; method f(|arguments) { for arguments.list -> $f {} } }; c.new.f()
14:32 camelia rakudo-moar db3656: ( no output )
14:32 timotimo m: class c { has @!find; method f(|arguments) { for arguments.list -> $f { say $f.perl } } }; c.new.f(1, 2, 3, "hi")
14:32 camelia rakudo-moar db3656: OUTPUT«1␤2␤3␤"hi"␤»
14:32 [TuxCM] :) - why didn't I think of that?
14:34 timotimo because you didn't know about captures? :)
14:34 * [TuxCM] doesn't know about quite a lot still
14:36 timotimo m: class c { has @!find; method f(*@args) { for @args -> $f { say $f.perl } } }; c.new.f(1, 2, 3, "hi")
14:36 camelia rakudo-moar db3656: OUTPUT«1␤2␤3␤"hi"␤»
14:36 timotimo ^- even simpler
14:38 lizmat m: class c { has @!find; method f { for @_ -> $f { say $f.perl } } }; c.new.f(1, 2, 3, "hi")  # simpler still
14:38 camelia rakudo-moar db3656: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/lArmUyquRwâ�¤Placeholder variables cannot be used in a methodâ�¤at /tmp/lArmUyquRw:1â�¤------> [32mthod f { for @_ -> $f { say $f.perl } } [33mâ��[31m}; c.new.f(1, 2, 3, "hi")  # simpler sti[0mâ�¤Â»
14:38 lizmat hmmm... I guess not  :-)
14:38 timotimo tux already tried that
14:38 lizmat ah, ok...
14:38 * lizmat shuts up for now
14:39 [TuxCM] I am not perl6-clever yet, but I'm not that stupid either
14:39 lizmat still I don't get why that wouldn't/shouldn't work
14:39 lizmat I mean, why can't we generate a (self,*@_) signature for methods without signature ?
14:40 timotimo you mean (self: *@_)
14:40 lizmat ah, duh, yeah, you got the idea
14:42 timotimo :)
14:48 telex joined #perl6
14:55 [Coke] did github change their colorization of perl6 in the last day or so?
14:55 [Coke] https://github.com/rakudo/rakudo/commit/b4a936e0926e033c50c0523021a1441568807a7d looks a lot bluer than I remember.
14:56 dalek roast: 5228076 | lizmat++ | S02-types/lists.t:
14:56 dalek roast: Make sure we throw a Failure
14:56 dalek roast: review: https://github.com/perl6/roast/commit/5228076d18
14:57 PerlJam huh ... it does look bluer
14:58 lizmat yeah, quite annoying, actually
14:58 xfix joined #perl6
14:58 xfix joined #perl6
14:59 [TuxCM] if a method has no return, is $self returned implicitely so one can chain?
14:59 brrt joined #perl6
15:00 arnsholt Any block returns the value of the last thing in it
15:00 lizmat [TuxCM]: only if you make "self" the last statement in the method
15:00 xinming joined #perl6
15:00 [TuxCM] ok
15:04 davido_ joined #perl6
15:13 skids joined #perl6
15:18 sven_123 joined #perl6
15:28 dalek rakudo/nom: 8d5d246 | lizmat++ | src/core/array_slice.pm:
15:28 dalek rakudo/nom: Streamline postcircumfix:<[ ]>
15:28 dalek rakudo/nom:
15:28 dalek rakudo/nom: This seems the optimal situation right now.  Several other streamlinings caused
15:28 dalek rakudo/nom: spectest failures, that would need quite some deeper investigation to fix :-(
15:28 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/8d5d246371
15:35 jnthn ab6tract: Did you figure out what's going on with teh failure? I haven't seen it happen with GCC. Very occasionally on Windows, it fails and then immediately re-running Configure works...
15:35 jnthn And I never could see what's racing
15:36 ab6tract unfortunately not :(
15:36 ab6tract i am trying it on a digital ocean droplet
15:37 ab6tract 3.13.0-43-generic #72-Ubuntu
15:38 lizmat m: say (Int)[0]:exists  # brain-teaser
15:38 camelia rakudo-moar db3656: OUTPUT«False␤»
15:39 brrt` joined #perl6
15:40 ab6tract i checked to make sure it has the Perl 5 lib dependencies, that seems to be fine
15:49 kaleem joined #perl6
15:57 psch caching for interop dispatch is slower than not in most cases, at least the way i tried :/
15:57 psch but i fixed more marshaling bugs \o/
15:57 FROGGS \o/
15:57 FROGGS psch++
15:58 psch also added tests for them, because i shouldn't have broken it in the first place... :)
15:59 FROGGS good boy :o)
16:01 psch https://github.com/peschwa/rakudo/blob/jvminterop/src/vm/jvm/runtime/org/perl6/rakudo/RakudoJavaInterop.java#L74 i'm not particularly happy with this bit, but it works and i don't see a cleaner way... :/
16:01 psch starting from the line below, the two deconts actually
16:02 dalek rakudo/nom: e86ece1 | lizmat++ | src/core/array_slice.pm:
16:02 dalek rakudo/nom: @a[X] where X is an instantiated object
16:02 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e86ece106e
16:02 dalek rakudo/nom: d3f7649 | lizmat++ | src/core/array_slice.pm:
16:02 dalek rakudo/nom: Handle @a[Int] seperately, giving nice fail
16:02 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d3f7649b52
16:02 lizmat m: my @a; @a[Int]
16:02 camelia rakudo-moar db3656: OUTPUT«Invocant requires an instance, but a type object was passed␤  in method Bridge at src/gen/m-CORE.setting:4946␤  in sub infix:<<> at src/gen/m-CORE.setting:4869␤  in sub postcircumfix:<[ ]> at src/gen/m-CORE.setting:2767␤  in block <unit> at /tmp/R9…»
16:02 lizmat $ 6 'my @a; @a[Int]; 1'
16:02 lizmat Index requires an instance, but a type object was passed
16:02 lizmat in block <unit> at -e:1
16:04 jnthn Indexing, maybe?
16:04 anaeem1 joined #perl6
16:05 lizmat jnthn: any opinions on moving the < 0 check to at_pos and friends, instead of postciircumfix{} ?
16:06 lizmat *[]
16:06 jnthn lizmat: I seem to remember I pondered that before and...I can't remember what happeend next
16:06 lizmat ok, then I'll take it to the next  :-)  and see what happens
16:07 lizmat it's inconsistent atm
16:07 lizmat m: <a b c>[*-4]
16:07 camelia rakudo-moar db3656: OUTPUT«Unhandled exception: Calculated index (-1) is negative, but Parcel allows only 0-based indexing␤   at <unknown>:1  (/home/camelia/rakudo-inst-2/languages/perl6/runtime/CORE.setting.moarvm:throw:4294967295)␤ from src/gen/m-CORE.setting:13992  (/home/cam…»
16:07 lizmat m: say <a b c>.at_pos(-1)
16:07 camelia rakudo-moar db3656: OUTPUT«Nil␤»
16:09 Mouq joined #perl6
16:11 jnthn decommute &
16:17 virtualsue joined #perl6
16:19 lizmat $ 6 'my @a; @a[Int]; 1'
16:19 lizmat Indexing requires an instance, tried to do: @a[ Int ]
16:19 TimToady maybe @a[ (Int) ]
16:19 dalek rakudo/nom: 373e39d | lizmat++ | src/core/array_slice.pm:
16:19 dalek rakudo/nom: Improve @a[Int] fail message, jnthn++ for inspiration
16:19 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/373e39d05d
16:20 TimToady since that's how we gistify Int
16:20 dalek rakudo-star-daily: d92831b | coke++ | log/ (9 files):
16:20 dalek rakudo-star-daily: today (automated commit)
16:20 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/d92831bf92
16:20 dalek perl6-roast-data: 4dfe387 | coke++ | / (5 files):
16:20 dalek perl6-roast-data: today (automated commit)
16:20 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/4dfe38762c
16:21 Mso150 joined #perl6
16:23 dalek rakudo/nom: fd703e3 | lizmat++ | src/core/array_slice.pm:
16:23 dalek rakudo/nom: An even better fail message, TimToady++
16:23 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/fd703e3c98
16:24 treehug88 joined #perl6
16:25 lizmat although thinking about this more, maybe we need to move that check to at_pos after all
16:26 lizmat so that a class can actually do something else with @a[ Int ] if they would like to
16:26 lizmat well, something to keep in mind maybe
16:26 PerlJam What would they do with @a[ Int ]  ?
16:27 dalek rakudo/nom: 5832a10 | peschwa++ | src/vm/jvm/runtime/org/perl6/rakudo/RakudoJavaInterop.java:
16:27 dalek rakudo/nom: Call decont() before checking for {int,num,str}-ness.
16:27 dalek rakudo/nom:
16:27 dalek rakudo/nom: This will likely need changing again later on, if isint() semantics on jvm are
16:27 dalek rakudo/nom: brought in line with moar and parrot.
16:27 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/5832a109f0
16:27 dalek rakudo/nom: ec4a351 | peschwa++ | / (2 files):
16:27 dalek rakudo/nom: Another fix for marshalling towards Java.
16:27 dalek rakudo/nom:
16:27 dalek rakudo/nom: This reacts to the semantic fix of NQP commit aeaf16b9 and correctly checks for
16:27 dalek rakudo/nom: boxed and native types.
16:27 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ec4a35111c
16:27 dalek rakudo/nom: 54026e5 | peschwa++ | / (2 files):
16:27 dalek rakudo/nom: Fix marshalling back to Perl 6 and test it.
16:27 dalek rakudo/nom:
16:27 dalek rakudo/nom: Apparently restructuring broke marshalling of Numeric types in some
16:27 dalek rakudo/nom: circumstances for interop-multis.
16:27 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/54026e5452
16:27 dalek rakudo/nom: 2bd1170 | FROGGS++ | / (2 files):
16:27 dalek rakudo/nom: Merge pull request #353 from peschwa/jvminterop
16:27 dalek rakudo/nom:
16:27 dalek rakudo/nom: Jvminterop
16:27 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/2bd1170c18
16:27 lizmat PerlJam: well, I dunno
16:27 lizmat a random index ?
16:30 * TimToady doesn't think we have to go that far out of our way to support cork-brained people
16:30 PerlJam m: my @a; @a['foo'] = 5;
16:30 camelia rakudo-moar db3656: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏foo' (indicated by ⏏)␤  in method Int at src/gen/m-CORE.setting:13980␤  in method Int at src/gen/m-CORE.setting:6272␤  in sub postcircumfix:<[ ]> at src/gen/…»
16:31 Celelibi joined #perl6
16:36 PerlJam m: my $a = Int;  my @a;  @a[$a] = 5;
16:36 camelia rakudo-moar d3f764: OUTPUT«Cannot call 'postcircumfix:<[ ]>'; none of these signatures match:␤:(Any \SELF, Any:U $)␤:(Any \SELF, int $pos)␤:(Any \SELF, int $pos, \assignee)␤:(Any \SELF, int $pos, :BIND($BIND)!)␤:(Any \SELF, int $pos, Any :SINK($SINK)!, *%other)␤:(Any \SE…»
16:37 PerlJam Will that one give the same error as if they'd used a bare Int as the index?
16:37 lizmat PerlJam: that shouldn't happen, investigating
16:40 PerlJam In looking at "@a[ (Int) ]" as part of an error message, it looks to me like (Int) indicates a class of objects rather than a type object.  e.g., my @a['foo'] example above could have said something like "Got @a[ (Str) ] but expected @a[ (Int) ]" and it would have made sense (but not talking about type objects)
16:42 lizmat Perhaps without the parens?
16:42 lizmat Got @a[ Str ] but expected @a[ Int ]"
16:46 lizmat PerlJam: I'm not sure why it doesn't find the \Self, Any:U candidate for @a[$a]
16:48 Ugator joined #perl6
16:51 lizmat *click* I know why
16:51 rurban joined #perl6
16:56 kjs_ joined #perl6
16:58 spider-mario joined #perl6
16:59 lizmat dinner&
16:59 FROGGS joined #perl6
17:00 [Coke] don't leave us hanging, 'brah.
17:01 spider-mario joined #perl6
17:01 masak "However, this will come at the cost of alienating its biggest group of adopters." and "I don’t think Angular will survive the rewrite." -- interesting. http://www.quirksmode.org/blog/archives/2015/01/the_problem_wit.html
17:01 masak (relevance: second systems.)
17:04 flussence I've always thought of client-side JS templates as a solution in need of a better solution
17:08 masak yeah, it does feel like a bit of a waste of my mobile's battery.
17:09 flussence on the other hand, the only other client-side option until HTML Templates gets into stable browsers is... XSLT. Eww.
17:09 CurtisOvidPoe Sounds like Angular has a similar problem as Mason: it’s so easy to do stuff at the template level that people push the business logic too far up the stack.
17:11 muraiki "I’d say Angular is mostly being used by people from a Java background because its coding style is aimed at them." that's the impression I got
17:12 andreoss left #perl6
17:12 jdv79 mason is more like php than angular i think
17:16 masak even before I read that article "great for that first prototype" is exactly how I think about AngularJS these days.
17:17 ab6tract jnthn: i will poke some more at this weird error and see if i can find anything useful for you
17:17 ab6tract but: later
17:17 masak wielding AngularJS as a brush to draw up a working prototype is quite an empowering feeling.
17:18 [Tux] BTW thanks for all the help I get here. I feel welcome :)
17:21 Mso150_h joined #perl6
17:23 hoelzro [Coke]: I didn't realize that syntax highlighting for Perl 6 was working on GH since the linguist migration to use textmate bundles
17:24 [Tux] lizmat, bestaande test.pl 0m53.642s - nieuwe test-t.pl (Tuxic + combine met debug verwijderd) 0m37.764s
17:25 [Tux] remember that that was 72+ in november
17:28 japhb What's the current state of Pod and .WHY support in Rakudo?  Is it complete enough to go reread the spec and start updating my libraries accordingly, and expect users to be able to introspect the docs?
17:31 ugexe is there a way to write something like 'sub go(URI|Str $target) { say $target.perl }; my $url = "http://github.com"; go(URI.new($url)); go($url);' without a second (multi) subroutine?
17:31 [Tux] $ grep PERL6 test-t.pl
17:31 [Tux] my $opt_v = %*ENV<PERL6_VERBOSE> // 1;
17:31 [Tux] $ time env PERL6_VERBOSE=0 perl6 test-t.pl < /tmp/hello.csv
17:31 [Tux] 50000
17:31 [Tux] 61.760u 0.060s 1:01.79 100.0%   0+0k 0+0io 0pf+0w
17:31 [Tux] $ perl -pe's/^ ?(?=\s*.opt_v)/#/' test-t.pl > test-x.pl
17:31 [Tux] $ time env PERL6_VERBOSE=0 perl6 test-t.pl < /tmp/hello.csv
17:31 [Tux] 50000
17:31 [Tux] 61.650u 0.053s 1:01.67 100.0%   0+0k 0+0io 0pf+0w
17:32 [Tux] $ time env PERL6_VERBOSE=0 perl6 test-x.pl < /tmp/hello.csv
17:32 [Tux] 50000
17:32 [Tux] 37.431u 0.072s 0:37.48 100.0%   0+0k 0+0io 0pf+0w
17:33 [Tux] $ grep 'opt_v and' test-t.pl|head -1
17:33 [Tux] $opt_v and progress (.perl) for $csv_parser.parse ($test);
17:33 [Tux] $ grep 'opt_v and' test-x.pl | head -1
17:33 [Tux] #   $opt_v and progress (.perl) for $csv_parser.parse ($test);
17:33 hoelzro hmm...
17:33 [Tux] I find the gain for easy statements like that incredible
17:34 [Tux] gain/loss
17:34 hoelzro m: sub go($target where URI|Str) { say $target.perl } ; go('http://dgg.gg')
17:34 camelia rakudo-moar d3f764: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/QlgTmaTcZuâ�¤Undeclared name:â�¤    URI used at line 1â�¤â�¤Â»
17:34 hoelzro grr
17:34 hoelzro m: sub go($target where Int|Str) { say $target.perl } ; go('http://dgg.gg')
17:34 camelia rakudo-moar d3f764: OUTPUT«"http://dgg.gg"␤»
17:34 hoelzro m: sub go($target where Int|Str) { say $target.perl } ; go(3)
17:34 camelia rakudo-moar d3f764: OUTPUT«3␤»
17:34 hoelzro [Tux]: that seems to do it
17:34 ugexe thanks hoelzro
17:35 hoelzro er, ugexe
17:35 hoelzro that's who I meant to talk to =P
17:36 psch so i've tried fixing RT #122229, and the works for all the files in S17-supply
17:36 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=122229
17:36 psch but i get a failure in S14-traits/attribute.t
17:36 psch which clearly means "it doesn't really work"
17:36 hoelzro [Coke]: it seems that some of the rakudo source files are identified as Prolog by GH
17:36 psch and then i added some debug output to jvm and mvm binders
17:37 psch and for an golfed case that fails on jvm and doesn't moar there's almost factor 100 more binder calls on jvm...
17:37 psch i was surprised at that
17:37 treehug88 joined #perl6
17:37 jnthn psch: On Moar we compile a lot of simple signatures down to VM ops; on the JVM we still always use the full binder.
17:38 molaf joined #perl6
17:38 psch jnthn: oh, i suppose that's partly thanks to sixmodel being part of moar?
17:39 rurban joined #perl6
17:41 rmgk_ joined #perl6
17:42 jdv79 ugexe: just fyi - i upgraded to openssl-1.0.1k and now i get an old bug - https://github.com/sergot/io-socket-ssl/issues/4
17:43 jnthn psch: Not really; it should be relatively do-able on JVM too, but I think I ran into something that made it not entirely trivial.
17:43 jnthn And then left it for 'ron.
17:43 jdv79 is it possible the openssl mgmt is missing some legacy-ish parts?  Note that p5 seems to be fine with all openssl vers i've tried so far.
17:49 Ugator left #perl6
17:50 gfldex joined #perl6
17:52 CurtisOvidPoe Wondering if anyone would be kind enough to comment on the *rough draft* of my “Perl 6 for Mere Mortals” talk?
17:53 psch jnthn: i suppose that kind of opt is outside of my scope atm then.  i'll try figuring out where the hangup with this case is, which i think needs more golfing first anyway
17:54 hoelzro CurtisOvidPoe: I'm no expert, but I'll look at it
17:54 CurtisOvidPoe heolzro: https://www.dropbox.com/s/ggt2gdp6d3qcmld/perl6mortals.pdf?dl=0
17:54 CurtisOvidPoe hoelzro, even :)
17:55 hoelzro =)
17:56 skids japhb: A good portion of the new POD stuff is functional.  Last I looked rakodo-p does not serialize the pod in compiled units but the other two do.  If you have a hand-tuned layout some of the .WHYs may present in ways that disrupt the final layout.
17:58 hoelzro CurtisOvidPoe: TIMTOWTEY? never seen it spelled that way!
17:59 CurtisOvidPoe Bah! Ignore those comparisons to other languages. Those are hidden slides which will probably be removed, but for some reason, Powerpoint included them in the PDF.
17:59 flussence I just got a spectest to finish a whole 2(!) seconds faster by having the harness run them in reverse order. There was one long-running test at the normal end holding things up :)
17:59 CurtisOvidPoe hoelzro: “There is more than one way to embarrass yourself” (relating to how Perl 5 handles function arguments)
17:59 hoelzro ahhhhh
17:59 hoelzro very nice =)
18:00 CurtisOvidPoe Thank you :)
18:00 CurtisOvidPoe I really do dump on Perl 5 a bit in that talk, but only in relationship to Perl 6.
18:01 hoelzro CurtisOvidPoe: is that _travel_to_* stuff from Veure?
18:01 CurtisOvidPoe Yes.
18:01 hoelzro cool
18:01 hoelzro I'm looking forward to it!
18:01 CurtisOvidPoe Cheers :)
18:02 CurtisOvidPoe The code is shortened for the slide, but it’s structurally the same. The comment is taken verbatim :)
18:02 jnthn m: say 1/(.1 + .2 - .3)
18:02 camelia rakudo-moar 2bd117: OUTPUT«Divide by zero␤  in method Numeric at src/gen/m-CORE.setting:14018␤  in sub infix:<-> at src/gen/m-CORE.setting:4692␤  in method Str at src/gen/m-CORE.setting:11496␤  in method gist at src/gen/m-CORE.setting:4527␤  in sub say at src/gen/m-CORE.se…»
18:02 jnthn CurtisOvidPoe: Slide 32 may want an update now we fixed the weird error. :)
18:02 hoelzro hehe
18:03 CurtisOvidPoe m: say 1/(.1 + .2 - .3)
18:03 camelia rakudo-moar 2bd117: OUTPUT«Divide by zero␤  in method Numeric at src/gen/m-CORE.setting:14018␤  in sub infix:<-> at src/gen/m-CORE.setting:4692␤  in method Str at src/gen/m-CORE.setting:11496␤  in method gist at src/gen/m-CORE.setting:4527␤  in sub say at src/gen/m-CORE.se…»
18:03 CurtisOvidPoe Yay!
18:03 CurtisOvidPoe Back soon. Need to take out the rubbish.
18:03 hoelzro CurtisOvidPoe: very nice talk
18:03 hoelzro wish I could be there to see it =/
18:05 jnthn CurtisOvidPoe: On 56, (yes, this is nitpick) there's maybe a space missing after teh var name and before the {
18:07 CurtisOvidPoe Back.
18:07 CurtisOvidPoe jnthn: Will fix that.
18:08 jnthn CurtisOvidPoe: Nice talk. Look forward to seeing it. :)
18:09 El_Che if someone here hasn't yet sent the needed info for his fosdem talk to wendy, please do so the info makes it to the printed booklet
18:09 CurtisOvidPoe Thanks. Hope it goes over well. hoelzro: I’m sure it will be online at some point :)
18:09 tgt joined #perl6
18:10 CurtisOvidPoe The  “lazy list” stuff was fun to write, but it also doesn’t fit where it currently is. Not yet sure how to blend that smoothly.
18:10 hoelzro CurtisOvidPoe: ah, that's true!
18:11 * hoelzro misses FOSDEM being a short-ish train ride away
18:11 b2gills [Coke]: GitHub thinks that src/core/List.pm is in prolog ( if that's what <div class="blob-wrapper data type-prolog"> means )
18:11 hoelzro b2gills: I saw that as well
18:13 jnthn El_Che: When it the actual deadline for that?
18:13 FROGGS_ joined #perl6
18:13 jnthn El_Che: If it's like "tomorrow" I'll try and take care of it tonight, but I'm full of cold and can't think straight :/
18:14 [Coke] CurtisOvidPoe++ # presentation
18:14 * jnthn away for a bit
18:14 [Coke] b2gills++ hoelzro++
18:14 El_Che jnthn: it's friday, but we need to get in to their system first
18:14 dalek rakudo/nom: aa37175 | lizmat++ | src/core/array_slice.pm:
18:14 dalek rakudo/nom: Fix @a[Int] for assignment and binding
18:14 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/aa37175734
18:15 El_Che jnthn: if you can, send the definitive title. I can recycle your bio from last time
18:15 jnthn El_Che: OK, will see what I can do
18:15 lizmat [Coke]: sorry fhe delay
18:15 jnthn away for a bit...
18:15 El_Che jnthn: thx!
18:17 vendethiel psch: https://github.com/rakudo/rakudo/pull/353/files#diff-32d43875a3f796653e7e85552f82deddR417 loss of precision, isn't it?
18:18 psch vendethiel: in.getClass() is either float or Float in that case, casting to native float doesn't lose precision from either of those i hope
18:19 vendethiel psch: yes but float to double means 4 bytes loss of precision
18:20 psch vendethiel: the only thing i can find is this http://stackoverflow.com/questions/916081/
18:21 psch vendethiel: i'm not really good with ieee 754... :)
18:21 vendethiel psch: dunno, a java dev friend of mine is telling me it's a bug :p
18:21 psch vendethiel: ask him what he suggests instead please :)
18:21 b2gills hoelzro: I wonder if there is something that can be added to the code that will force GH to highlight as Perl6
18:21 pyrimidine CurtisOvidPoe: slides are pretty nice!
18:22 hoelzro b2gills: use v6 would probably do it
18:22 CurtisOvidPoe pyrimidine: thank you. They’re very rough, but I’m hoping it will help mitigate the whole “p6 is too complicated” complaint.
18:22 vendethiel psch: actually, he said he misread and it should be okay >.> sorry for that! keep up the great work!
18:23 hoelzro but although it could be detected as Perl 6, it wouldn't highlight, because they switched how they highlight stuff a few months ago
18:23 psch vendethiel: no problem, thanks for the feedback and encouragement :)
18:23 CurtisOvidPoe Silly question: but why do we see “use v6” in so many examples. My code runs fine without it. Is it just to stop Perl 5 from accidentally trying to run it?
18:23 hobbs float to double never loses data, there's an injective mapping of floats onto doubles
18:23 vendethiel psch: you have no idea how many javaers I know that would *love* to write their parsing stuff in p6 instead of java :D
18:23 hoelzro hahaha
18:24 pyrimidine CurtisOvidPoe: The 'Perl6 versus...' slides really drive the point home on that.
18:24 hoelzro you know what's causing it to be treated as Prolog?
18:24 vendethiel psch: I don't know where you're at with it, though (like, can I extend a java class from p6 code, or the opposite?)
18:24 hobbs it just exposes the lack of precision that the original float already had. The original float was the closest float to (some decimal number) so it prints as that
18:24 hoelzro List.pm:452  my @seen;  # should be Mu, but doesn't work in settings :-(
18:24 vendethiel hobbs: right.
18:24 hoelzro because to linguist, :- -> Prolog
18:24 hobbs The double that represents *exactly the same number* as that float is no longer the closest double to that decimal, so it prints something else with more places.
18:25 hoelzro CurtisOvidPoe: it's redundant, but it's a declaration that the code is indeed Perl 6 to things like Vim, pygments, linguist, etc
18:25 psch vendethiel: https://gist.github.com/peschwa/7e1d97732f4583438bed e.g. works
18:25 [Coke] m: 6; say $a;
18:25 camelia rakudo-moar 2bd117: OUTPUT«(Any)␤»
18:25 [Coke] m: use v6; say $a;
18:25 camelia rakudo-moar 2bd117: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/cUhbvwmROaâ�¤Variable '$a' is not declaredâ�¤at /tmp/cUhbvwmROa:1â�¤------> [32muse v6; say $a[33mâ��[31m;[0mâ�¤    expecting any of:â�¤        postfixâ�¤Â»
18:26 [Coke] m: say $a;
18:26 camelia rakudo-moar 2bd117: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/zpf2WznOb8â�¤Variable '$a' is not declaredâ�¤at /tmp/zpf2WznOb8:1â�¤------> [32msay $a[33mâ��[31m;[0mâ�¤    expecting any of:â�¤        postfixâ�¤Â»
18:26 vendethiel psch: yes, this part is in the tests (and it's great!), I know you can *use* classes, but not sure you can extend them
18:26 vendethiel (or have them extended)
18:26 vendethiel psch: (shouldn't that be :from<Java>?)
18:26 [Tux] push @f, $f.text.subst (/( $!quo | $!esc )/, "$esc$1", :g);
18:27 psch vendethiel: the gist was created just now from code that i wrote ~4 weeks ago... :)
18:27 vendethiel yes, I saw that "2 minutes ago" :)
18:27 psch vendethiel: extending a java class in perl6 currently doesn't work at all
18:27 [Tux] push @f, $f.text.subst (/( $!quo | $!esc )/, "$!esc$1", :g);
18:27 [Tux] Type check failed in binding var; expected 'Any' but got 'int'
18:27 [Tux] in method INTERPOLATE at src/gen/m-CORE.setting:14284
18:27 [Tux] in method match at src/gen/m-CORE.setting:6841
18:27 vendethiel and neither does extending a p6 one from java, I get?
18:27 psch vendethiel: i have something half-baked for add_method on the java class in perl6
18:28 psch vendethiel: afaik perl6 -> java doesn't work at all currently,
18:28 psch where the arrow means "using perl6 objects in java at a high-ish level"
18:30 vendethiel alright.
18:30 vendethiel do you think it'll be possible to map "$a.visible = True" in p6 to "$a.setVisible(true)"? I can kind-of see it being done with add_fallback checkins attributes
18:30 vendethiel but I'm not sure how the setter should work
18:31 psch https://gist.github.com/peschwa/4237f155e5fe6596f114 is how i thought of doing it, but i'm not sure how to get that into the Metamodel
18:31 moritz uhm, aren't attributes statically known?
18:31 moritz if so, fallbacks are the wrong solution
18:32 vendethiel moritz: I don't want attributes
18:32 vendethiel I want to fake attributes to map to java getters.
18:32 hoelzro vendethiel: you can return a Proxy that invokes the getters/setters
18:33 vendethiel right.
18:33 psch vendethiel: that snippet works with a branch that i have lying around and using a java class instead of Testing
18:33 psch (the branch is behind nom in other features though, although merging should work automatically)
18:34 psch aside from that, what we currently get anyway (and probably will always get) is explicit getters and setter of the form "set_$fieldname" and "get_$fieldname" respectively
18:34 psch and of course the corresponding longname
18:35 vendethiel right, ofcourse
18:35 [Tux] http://www.xs4all.nl/~hmbrand/t.pl <= anybody care to explain what goes wrong?
18:36 lizmat [Tux]: looking
18:37 [Tux] ah, same scoping issue still exists «/ $!x | $!y /» => «my ($X, $Y) = ($!x, $!Y); /$X | $Y/» fixes the issue
18:37 lizmat [Tux]: I get 3"4"5
18:37 [Tux] now you do
18:37 lizmat :-)
18:38 [Tux] I think it is the 615'th time this bit me
18:38 * [Tux] looks like a donkey
18:39 [Sno] joined #perl6
18:48 psch vendethiel: extending is a blocker for your friends then?
18:48 psch vendethiel: or was that just example?
18:48 psch *an
18:52 lizmat m: say <a b c>[1]:exists  # feels wrong
18:52 camelia rakudo-moar 2bd117: OUTPUT«False␤»
18:53 lizmat m: say <a b c>[1]:pair   # also wrong
18:53 camelia rakudo-moar 2bd117: OUTPUT«b␤»
18:54 lizmat m: say <a b c>[1]:p   # also wrong
18:54 camelia rakudo-moar 2bd117: OUTPUT«␤»
18:54 lizmat m: say <a b c>[0]:p   # only element 0 works
18:54 camelia rakudo-moar 2bd117: OUTPUT«0 => a␤»
19:01 [Tux] m: my Str $x=<1:2>;my$e=":";my$q="-";my$t=$x.subst(/($e|$q)/,"$e$1",:g);$t.say
19:01 camelia rakudo-moar 2bd117: OUTPUT«1:2␤»
19:01 * [Tux] expects 1::2
19:02 lizmat m: my Str $x=<1:2>;my$e=":";my$q="-";my$t=$x.subst(/($e|$q)/,"$e$1",:g);$t.perl.say
19:02 camelia rakudo-moar 2bd117: OUTPUT«"1:2"␤»
19:02 lizmat m: my Str $x=<1:2>;my$e=":";my$q="-";my$t=$x.subst(/($e|$q)/,"$e$0",:g);$t.perl.say
19:02 camelia rakudo-moar 2bd117: OUTPUT«"1:2"␤»
19:03 anaeem1 joined #perl6
19:03 lizmat [Tux]: not sure what you're getting at
19:04 psch isn't $/ still broken in subst?
19:05 psch m: say "abc".subst(/(.)/, $0.uc)
19:05 camelia rakudo-moar 2bd117: OUTPUT«bc␤»
19:05 psch m: say "abc" ~~ s/(.)/$0.uc/
19:05 camelia rakudo-moar 2bd117: OUTPUT«Cannot assign to an immutable value␤  in method subst-mutate at /home/camelia/rakudo-inst-1/languages/perl6/runtime/CORE.setting.moarvm:1␤  in method subst-mutate at src/gen/m-CORE.setting:4216␤  in block <unit> at /tmp/dBhwKdL0XH:1␤␤»
19:05 psch m: $_ = "abc"; $_ ~~ s/(.)/$0.uc/; .say
19:05 camelia rakudo-moar 2bd117: OUTPUT«a.ucbc␤»
19:07 psch m: my Str $x=<1:2>;my$e=":";my$q="-";$x ~~ s:g/($e|$q)/"$e$0"/;$x.say
19:07 camelia rakudo-moar 2bd117: OUTPUT«1"::"2␤»
19:07 lizmat m: say <a b>.at_pos(1); say <a b>.at_pos(2); say <a b>.at_pos(3)   # off-by-one error in 2
19:07 camelia rakudo-moar 2bd117: OUTPUT«b␤(Mu)␤Nil␤»
19:07 masak psch: in your first eval, it would take a miracle (of the kind we don't tend to perform) to get $/ to have the right value.
19:07 masak psch: arguments are evaluated before a call is made.
19:08 psch masak: ah, right, not a block
19:08 psch masak++
19:08 psch m: say "abc".subst(/(.)/, { $0.uc })
19:08 camelia rakudo-moar 2bd117: OUTPUT«Abc␤»
19:09 psch m: my Str $x=<1:2>;my$e=":";my$q="-";my$t=$x.subst(/($e|$q)/,{"$e$1"},:g);$t.say
19:09 camelia rakudo-moar 2bd117: OUTPUT«use of uninitialized value of type Any in string context  in block <unit> at /tmp/d0uhOY58gm:1␤␤1:2␤»
19:09 psch m: my Str $x=<1:2>;my$e=":";my$q="-";my$t=$x.subst(/($e|$q)/,{"$e$0"},:g);$t.say
19:09 camelia rakudo-moar 2bd117: OUTPUT«1::2␤»
19:09 psch that was the actual problem then, and $/ works in just fine in subst...
19:09 masak yeah.
19:09 b2gills CurtisOvidPoe: Why didn't you show the Fibonacci lazy list `my @fib := 0, 1, * + * ... Inf`
19:10 [Tux] lizmat, I want perl5-like «$x =~ s{($e|$q)}{$e$1}g;»
19:11 lizmat [Tux]: that would be $0 in any case, in Perl6 positional captures start at 0
19:11 [Tux] I read that between the lines, but I still don't see what I expected
19:11 masak because $0 is really short for $/[0]
19:11 lizmat ah, duh  :-)
19:11 [Tux] (though it makes the undefined warning disappear :)
19:12 dalek rakudo/nom: 4825fdc | lizmat++ | src/core/Parcel.pm:
19:12 dalek rakudo/nom: Fix off by one error in Parcel.at_pos
19:12 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4825fdc5e2
19:14 mvuets joined #perl6
19:18 [Tux] http://tux.nl/Files/20150114201804.png :) :)
19:18 lizmat [Tux]++
19:18 [Tux] but the code gets uglier and uglier as I have to work around known problems
19:19 [Tux] enough for today
19:19 lizmat [Tux]: have a nice evening!
19:24 dalek gtk-simple: bcb4355 | (Andrew Egeler)++ | lib/GTK/Simple.pm6:
19:24 dalek gtk-simple: Fix subsignatures; remove (debugging?) say
19:24 dalek gtk-simple: review: https://github.com/perl6/gtk-simple/commit/bcb43553ea
19:24 dalek rakudo/nom: ddea6ce | lizmat++ | src/core/Any.pm:
19:24 dalek rakudo/nom: Streamline Any.exists_pos with fallback methods
19:24 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ddea6ceb5a
19:24 dalek rakudo/nom: 6dbfd54 | lizmat++ | src/core/List.pm:
19:24 dalek rakudo/nom: Create separate List.at_pos(int/Int:D) candidates
19:24 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6dbfd5438e
19:24 dalek rakudo/nom: 5036fbb | lizmat++ | src/core/Parcel.pm:
19:24 dalek rakudo/nom: Make <a b>[1] work by Parcel.exists_pos candidates
19:24 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/5036fbb950
19:29 vendethiel psch: well, he's just wondering at that point
19:37 denis_boyun_ joined #perl6
19:38 moritz lizmat: Parcel.exists_pos(int) looks inverted to me
19:39 moritz say (1, 2).exists_pos(-1) # True
19:39 moritz really?
19:39 lizmat masak: good catch!
19:39 moritz it looks like it needs a negation in the output
19:39 Sqirrel joined #perl6
19:40 lizmat no, stupid copy-pasto
19:40 moritz ah, you took that from the Nil case of at_pos
19:40 moritz same for the Int:D variant
19:41 lizmat yup
19:41 lizmat commit coming up, moritz++ masak++
19:41 lizmat oddly enough, this did not cause any spectest breakage  :-(
19:43 moritz I guess we don't use exists_pos much on arrays?
19:44 moritz though grepping for ]:exists in roast does turn up some hits
19:44 lizmat yeah, but not on parcels
19:45 lizmat looks like we don't have any tests on Parcel[] with adverbs
19:45 psch vendethiel: well, real-world use cases and feedback are definitely welcome
19:45 vendethiel psch: his use case is parsing a string with Perl6 and using the results in javaland
19:45 psch i think ab5tract++ was thinking about getting us Processing bindings
19:45 dalek rakudo/nom: e26d8bf | lizmat++ | src/core/Parcel.pm:
19:45 dalek rakudo/nom: Fix copy-pasto spotted by masak++ moritz++
19:45 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e26d8bf1b3
19:47 psch vendethiel: i think the easiest way to do that is borrowing from the eval server currently
19:47 anaeem1 joined #perl6
19:47 lizmat hmmm.  spectest breakage after all ?
19:48 moritz dunno, haven't tried it
19:48 moritz just read the diff and wondered
19:49 psch vendethiel: org.perl6.nqp.tools.EvalServer that is. marshaling can probably be borrowed from my interop code
19:49 vendethiel that seems a tad slow, though?
19:49 moritz t/spec/S02-types/parcel.t Failed 2/52 subtests
19:50 psch vendethiel: well, that's a general jvm problem we have :/
19:51 PerlJam CurtisOvidPoe++ (perl 6 for mortals)
19:51 CurtisOvidPoe b2gills: just saw your question about the Fibonacci sequence. The talk is intended to show how easy Perl 6 can be, so I deliberately chose many examples that were very clear and easy to explain.
19:52 CurtisOvidPoe PerlJam: thanks.
19:52 PerlJam CurtisOvidPoe: I especially liked the P6 v. * near the end  and that bit of math near the beginning  :)
19:53 CurtisOvidPoe I’ll probably dump most of the P6 v. * slides, though they do show the expressiveness of P6 (and subsets in particular).
19:53 lizmat moritz masak: I thought Parcels were to be considered immutable ?
19:54 moritz lizmat: parcels themselves are, but if they contain containers, those are still writable
19:54 PerlJam CurtisOvidPoe: "Perl 6 versus" sounds like a good website gimick.  Kind of like rosettacode, but bent a little more competitively.  :)
19:55 CurtisOvidPoe Like “Am I Hot Or Not”, but for code? :)
19:55 lizmat moritz: S02:2220 makes me think otherwise
19:55 synopsebot Link: http://perlcabal.org/syn/S02.html#line_2220
19:56 jnthn lizmat: If the containers within a Parcel were not writable, we could not do list assignment...
19:56 lizmat ah, ok, good point  :-)
19:58 masak lizmat: it's not Parcels themselves that are immutable. it's that if you just put immutable stuff in them, they'll play very well wrt .WHICH and hashing.
19:58 masak lizmat: in that sense, they're the closest we have to a tuple type.
19:58 masak or maybe s/immutable stuff/value object stuff/
19:58 ingy what's a good term for "nothing"? ie if DASH means '-', ???? means ''
19:59 ingy an obvious #p6 query!
19:59 PerlJam ingy: EMPTY_STRING  :)
19:59 moritz ingy: "nothing" is a good term for "nothing"
19:59 ingy NOTHING_TO_SEE_HERE
19:59 jnthn nowt
19:59 masak ingy: ε
19:59 moritz ingy: maybe you want to give some context to your question?
19:59 ingy how about 4 letters
20:00 ingy NADA
20:00 PerlJam NONE
20:00 moritz
20:00 moritz RIEN
20:00 masak EMPT
20:00 PerlJam OOPS
20:00 ingy MU
20:00 ingy what is a MU?
20:00 lizmat Mostly Undefined
20:00 ingy :)
20:00 ingy
20:00 TimToady CurtisOvidPoe: I'd leave the other languages in and just zip through just for the dazzle effect, and to demonstrate that you're not just picking on Perl 5
20:00 ingy
20:00 moritz ingy: https://en.wikipedia.org/wiki/Mu_%28negative%29
20:01 TimToady CurtisOvidPoe: there's a "$point.3" typo in there somewhere
20:01 TimToady also dunno if the misspelling Deprecatation was intentional
20:01 masak Deprecapitation!
20:02 PerlJam lizmat: S99:Mu could mention that idea of Mu too
20:02 synopsebot Link: http://perlcabal.org/syn/S99.html#Mu_could_mention_that_idea_of_Mu_too
20:02 CurtisOvidPoe The misspelling was not intentional :)
20:02 PerlJam heh
20:02 ingy was it intenational?
20:03 CurtisOvidPoe At least it’s not “depreciation”. I get tired of correcting that in other people’s code :)
20:03 * masak .oO( and they do not depreciate being corrected much? ) :P
20:03 TimToady yes, that word isn't as valuable as it used to be...
20:03 lizmat PerlJam: why copy S02:The Mu Type
20:03 PerlJam you work with people who think they are bankers?
20:03 synopsebot Link: http://perlcabal.org/syn/S02.html#The_Mu_Type
20:03 ingy I depreciate that remark
20:04 masak I reverberate that remark
20:04 PerlJam lizmat: oh, then maybe a link from S99 to S02 is in order?
20:04 TimToady I just semble that remark
20:04 ingy masak: You are a revertabrate
20:05 CurtisOvidPoe TimToady: I don’t see the .3 bug you’re referring to.
20:05 dalek rakudo/nom: 5a6f2d1 | lizmat++ | src/core/Parcel.pm:
20:05 dalek rakudo/nom: Fix ($foo,)[0] = 42 breakage
20:05 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/5a6f2d1425
20:05 TimToady sec
20:05 moritz m: say 1 / (0.3 - 0.1 -0.2 )
20:05 camelia rakudo-moar aa3717: OUTPUT«Divide by zero␤  in method Numeric at src/gen/m-CORE.setting:14018␤  in sub infix:<-> at src/gen/m-CORE.setting:4692␤  in method Str at src/gen/m-CORE.setting:11496␤  in method gist at src/gen/m-CORE.setting:4527␤  in sub say at src/gen/m-CORE.se…»
20:05 lizmat PerlJam: not sure how to link that, actiually
20:06 masak ingy: well, I do try to be the "spina" in people's side... :)
20:06 moritz CurtisOvidPoe: ^^ see above, bug fix
20:06 ingy ok this conversation is going muwhere. o/
20:06 CurtisOvidPoe mortitz: jnth told me about that earlier. The slides already fixed :)
20:06 PerlJam ingy: one more suggestion for "nothing" ...  WAT   ;)
20:06 masak ingy: VOID
20:06 moritz CurtisOvidPoe++
20:06 moritz ingy: what's your context?
20:07 masak ingy: GONE
20:07 ingy moritz: fun
20:07 masak ingy: POOF
20:07 TimToady CurtisOvidPoe: was on the bottom of the first "And as you learn more" slide
20:07 ingy actually a grammar token for empy string in pegex
20:07 lizmat WOW   (as in Way Out West)
20:07 ingy EMPY!
20:08 ingy EMPTY is fine
20:08 masak ingy: STR0
20:08 lizmat .oO( no more tea :-( )
20:08 TimToady CurtisOvidPoe: #67
20:08 CurtisOvidPoe TimToady: got it. Cheers.
20:09 ingy EMPTY is what I had before I came here
20:09 ingy You guys are FULL of it
20:09 masak ingy: EMPTY sounds like the perfect name for the empty string.
20:09 ingy xo/
20:09 CurtisOvidPoe I have to say that the C89 negative integer division issue really surprised the heck out of me.
20:09 * moritz still like "rien", but in the "you think this is cute today" way
20:10 lizmat PUTD (as in Pushing Up The Daisies)
20:10 masak moritz: no, because tomorrow you'd just go "je ne regrette rien"! :P
20:10 brrt joined #perl6
20:10 moritz masak: lol
20:10 masak :P
20:15 ingy https://github.com/ingydotnet/pegex-pm/blob/master/lib/Pegex/Grammar/Atoms.pm#L18 already have ALWAYS for empty string, but that's a different semantic all together.
20:16 zakharyas joined #perl6
20:17 lizmat m: my $b = Buf.new(1,2,3,4,5); say $b[0]:p; say $b[1]:p   # adverbs don't work on elems > 0
20:17 camelia rakudo-moar aa3717: OUTPUT«0 => 1␤␤»
20:17 brrt perl devroom for fosdem is still pretty empty
20:18 El_Che brrt: the schedule is pretty full :)
20:18 El_Che brrt: waiting on some info from the speaers, but I'll start putting in data tomorrow morning
20:18 brrt awesome
20:18 El_Che probably with temporary times
20:19 El_Che everythings needs to be definitive friday to get into the printed booklets
20:19 dalek rakudo/nom: 7d29f45 | lizmat++ | src/core/Buf.pm:
20:19 dalek rakudo/nom: Make adverbs work on Buf, like Buf.new(1,2,3)[2]:p
20:19 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/7d29f4573b
20:19 El_Che those are pretty important, even in these smart phone days
20:20 * brrt agrees
20:24 nnmap joined #perl6
20:24 El_Che putting the first talk online? jnthn's :)
20:24 El_Che the title at least :)
20:25 jnthn Wait, what, I came up wiht a title? :P
20:25 * jnthn is sat here trying to think of one :)
20:25 nnmap hi can you give me a link to an article or something describing the current state of perl 6?
20:26 jnthn Though if you know what I'm going to think of, I'd love to know :P
20:26 * masak wishes that he had gotten further with the isperl6readyforproduction site...
20:27 lizmat nnmap: https://perl6advent.wordpress.com/2014/12/24/day-24-seeing-wrong-right/
20:27 masak nnmap: http://perl6.org/compilers/features , perhaps?
20:27 nnmap thanks
20:27 masak nnmap: you can also ask here -- we like to give nuanced abswers. :)
20:28 jnthn https://perl6advent.wordpress.com/2014/12/01/the-state-of-perl-6-in-2014/ is also pretty recent.
20:28 nnmap for the longest time i heard that p6 was slow. is it still slow? (compared to 5). is it crashy?
20:28 El_Che jnthn: I put the one of last year :)
20:28 El_Che for now
20:28 jnthn El_Che: argh
20:28 El_Che it's a great title
20:29 El_Che Perl 6 development: past, current and future
20:29 masak nnmap: it's still slower, but it used to be *much* slower. whether it's worth it now depends on how much you like the new features.
20:29 PerlJam nnmap: We don't have an implementation that comparable to Perl 5 for most tasks yet, but we're getting there
20:29 masak nnmap: it's not so crashy anymore. I'm doing long-running things with Rakudo/Moar these days, and it's delightfully stable.
20:29 El_Che jnthn: you can add some Dickens references :)
20:29 PerlJam nnmap: And I second masak's assessment of "delightfully stable"  :)
20:29 masak nnmap: to the point where I could actually recommend people to do web stuff with it, and do so with a straight face.
20:30 nnmap http://perlgeek.de/en/article/5-to-6 - are these articles still valid?
20:30 masak yes.
20:30 masak and when they're not, let us know. :)
20:30 masak but I believe moritz++ keeps them up-to-date.
20:30 nnmap i think i'll give a try then. thanks.
20:30 moritz nnmap: I've updated them about one or two months ago
20:30 masak nnmap: good luck!
20:30 masak nnmap: again, let us know the minute we can help with something.
20:33 jnthn .oO( What the dickens... )
20:34 El_Che jnthn: I am putting the speakers into the fosdem system. So while I am doing that I don't shock anyone with placeholder titles :)
20:35 El_Che if someone want his nick in the author field (or use that as a public name) let me know
20:36 PerlJam .oO( what kind of audio does the fosdem system have?!? )
20:36 moritz stereo, I hope!
20:38 kjs_ joined #perl6
20:40 El_Che DJ ambitions?
20:42 kaare__ joined #perl6
20:44 leont Is there a list form of qx? Like there is run for system?
20:45 moritz leont: not yet
20:45 leont Or better yet, a proper capture function that also handles stderr properly
20:49 jack_rabbit joined #perl6
20:51 lizmat leont: there's Prox::Async with proper capture capabilities, no?
20:51 lizmat *Proc
20:52 leont Yes, I'm trying to write a synchronous parser, also because Proc::Async is still a bit buggy
20:52 * moritz finally fixed using forwarded ssh agents in tmux
20:52 leont But also because I don't expect all VMs to implement P::A yet
20:56 telex joined #perl6
21:01 Mouq joined #perl6
21:02 brrt joined #perl6
21:14 * masak got bitten by the fact that `next` binds to for loops even when they're statement_mod
21:14 masak though I guess that makes sense. `next` binds to things like &map as well, so...
21:14 masak also, easily fixed by the judicious use of labels.
21:16 moritz the OTRS codebase has a policy to only use next and last with labels
21:16 jnthn masak: I could just as easily imagine getting bitten by it not doing so... :)
21:16 silug joined #perl6
21:17 moritz and you can't give a statement-modifying for loop a label, right?
21:17 masak m: FOO: .say and last FOO for 1..10
21:17 camelia rakudo-moar 5a6f2d: OUTPUT«1␤»
21:17 masak moritz: seems you can :)
21:18 jnthn Yes, I was pretty sure that'd work. :)
21:18 masak moritz: I think I like that policy.
21:18 jnthn (Mostly 'cus I read the label code a couple of days ago to fix the missing redecl error)
21:19 lizmat hhmmm... in src/core/Buf, I see 2 assign_pos in the same role: one with Buf:D and one with Blob:D
21:20 lizmat is that intentional, jnthn  ?
21:20 moritz uhm, Blob:D shouldn't have an assign_pos
21:20 moritz because Blob themselves are immutable
21:20 jnthn What moritz said
21:20 lizmat ok, so that should be Buf then  :-)
21:20 lizmat ok
21:20 aborazmeh joined #perl6
21:20 moritz I thought I fixed that some time ago, but it seems my fix wasn't thorough enough
21:20 lizmat no pb  :-)
21:21 lizmat jnthn: should assign_pos be rw ?
21:21 dwarring joined #perl6
21:22 lizmat feels wrong
21:22 jnthn lizmat: Isn't it for Array?
21:22 moritz it is
21:23 lizmat ok, I'll check later if that makes a difference
21:23 moritz probably not yet
21:23 jnthn Isn't that needed so @a[0] = @b[1] = 'dugong' works?
21:23 jnthn oh, wait, no
21:23 jnthn Noticacle in my $x := @b[1] = 'dugong' though :)
21:24 jnthn *able
21:25 moritz jnthn: what are those hidden parent classes in Metamodel::MultipleInheritance about?
21:26 timotimo thank you, retupmoca
21:26 jnthn moritz: Excluded or hidden?
21:26 moritz jnthn: hidden
21:26 jnthn moritz: For hidden, look for "hides" in S12
21:26 jnthn For exlcuded, it's about .^methods vs. .^methods(:all)
21:26 timotimo did i miss something nice today?
21:27 ugexe sergot: ping
21:27 jnthn moritz: But it's about deferal and hiding things from that.
21:29 moritz jnthn: but the 'hides' trait is something completely different, right?
21:29 kjs_ joined #perl6
21:30 moritz m: class A { method x() { 'A' } }; class B is A is hidden { method x() { 'B' } }; class C is B { method x() { say 'C'; nextsame } }; say C.x; say B.x; say A.x
21:30 camelia rakudo-moar 5a6f2d: OUTPUT«C␤A␤B␤A␤»
21:30 jnthn moritz: No; is hidden hides the curernt class, while hides Base achieves that effect from the derived class, iirc
21:31 jnthn Yeah, it's under Interface Consistency
21:31 dalek rakudo/nom: bcfa81b | lizmat++ | src/core/Any.pm:
21:31 dalek rakudo/nom: Add fallback methods in Any for .assign_pos
21:31 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/bcfa81b6d5
21:31 dalek rakudo/nom: e59d40d | lizmat++ | src/core/Array.pm:
21:31 dalek rakudo/nom: Streamline Array.assign_pos, 7% faster for Int:D
21:31 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e59d40d172
21:31 dalek rakudo/nom: b64afd0 | lizmat++ | src/core/Buf.pm:
21:31 dalek rakudo/nom: Streamline Buf.assign_pos
21:31 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b64afd0807
21:31 jnthn # Are any of the parents hidden?
21:31 jnthn has @!hides;
21:31 jnthn
21:31 jnthn # Is this class hidden?
21:31 vendethiel "is hidden"?
21:31 jnthn has $!hidden;
21:32 jnthn @!hides corresponds to "hides Base" and $!hidden to "is hidden"
21:32 moritz m: class A { method x() { 'A' } }; class B hides A { }; say A.^hidden
21:32 camelia rakudo-moar 5a6f2d: OUTPUT«0␤»
21:33 * moritz wonders if there are good uses cases for that
21:33 jnthn moritz: It doesn't mutate A
21:33 jnthn It affects the mro of B
21:34 jnthn m: class A { method x() { 'A' } }; class B hides A { }; say B.^mro
21:34 camelia rakudo-moar 5a6f2d: OUTPUT«(B) (A) (Any) (Mu)␤»
21:34 jnthn um, or should...
21:35 moritz m: class A { method x() { 'A' } }; class B { method x { 'B' } }; class C hides B { method x { say 'C'; nextsame } }; say C.x
21:35 camelia rakudo-moar 5a6f2d: OUTPUT«C␤Nil␤»
21:35 moritz I'd expect that to print C\nA\n
21:35 moritz but seems I'm wrong :-)
21:35 virtualsue joined #perl6
21:36 moritz m: class A { method x() { 'A' } }; class B { method x { 'B' } }; class C is B hides B { method x { say 'C'; nextsame } }; say C.x
21:36 camelia rakudo-moar 7d29f4: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/sv4cMha19P�Package 'C' already has parent 'B'�at /tmp/sv4cMha19P:1�------> �»
21:36 jnthn m: class A { method x() { 'A' } }; class B hides A { }; say B.^mro_unhidden
21:36 camelia rakudo-moar 7d29f4: OUTPUT«(B) (Any) (Mu)␤»
21:36 jnthn Ah
21:36 jnthn And I think the deferral thing uses that
21:36 * timotimo has never heard of this mechanism before
21:36 timotimo but i can see why that would be interesting to have
21:36 masak timotimo: you and me both.
21:36 jnthn I think I implemented it and then mostly forgot about it :)
21:37 timotimo does that remove the given BUILD from the buildallplan?
21:37 * masak .oO( World's Least Memorable Feature )
21:38 lizmat m: my $a; ($,$a)[2] = 42   # LTA error
21:38 camelia rakudo-moar 7d29f4: OUTPUT«Attempted to STORE to Nil.␤  in method STORE at src/gen/m-CORE.setting:8204␤  in method assign_pos at src/gen/m-CORE.setting:2070␤  in sub postcircumfix:<[ ]> at src/gen/m-CORE.setting:2837␤  in block <unit> at /tmp/uftfaVqIZo:1␤␤»
21:39 moritz what would be a more awesome error?
21:40 lizmat something with index out of range, expected 0..1 ?
21:40 timotimo "out of range in a non-WHICH-able structure"
21:40 moritz "Attempt to assign to element 2 of a Parcel, which is beyond the end"?
21:40 moritz timotimo: that's terrible :-)
21:40 lizmat X::OutOfRange.new(:what<Index>, :got(pos), :range(0..N))
21:41 moritz what's a non-WHICH-able structure?
21:41 masak m: my $a; ($,$a)[-1] = 42
21:41 camelia rakudo-moar 7d29f4: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/rWV3Ftl3s8�Unsupported use of a negative -1 subscript to index from the end; in Perl 6 please use a function such as *-1�at /tmp/rWV3Ftl3s8:1�------> [32mmy $a; ($,$a)[-1][33m�[31m = 42[…»
21:41 timotimo Parcel for example
21:41 timotimo anythign that can't autovivify
21:41 masak m: my $a; ($,$a)[*-1] = 42; say $a
21:41 camelia rakudo-moar 7d29f4: OUTPUT«42␤»
21:41 moritz timotimo: and why can't it autovivify?
21:41 timotimo hmm, are parcels mutable?
21:41 moritz bingo!
21:42 * PerlJam is having a sense of deja vu
21:42 moritz ok, there are baseically two possible approaches:
21:42 moritz 1) out of range
21:42 timotimo oh, you mean it should be that message rather than "non-which-able"
21:42 timotimo it was only a very rough idea, i must admit :)
21:42 moritz 2) trying to autovivify an element in a container that can't autovivify (and why)
21:43 moritz 3) catching that very specific error separately
21:45 moritz uhm, returning True or False from meta model roles isn't possible/easy, right?
21:47 jnthn No, 'cus Bool doesn't exist yet.
21:48 dalek doc: 470b94a | moritz++ | lib/ (5 files):
21:48 dalek doc: Clean up / unify meta model docs
21:48 dalek doc:
21:48 dalek doc: * move several methods in the appropriate classes
21:48 dalek doc: * avoid duplicate descriptions between Language/objects and type docs
21:48 lizmat m: my $a; my $b = $a<a>; $a[0] = 42; $b = 63; say $a.perl; say $b.perl   # shouldn't this error out on assigning to $b ?
21:48 dalek doc: * document several more methods
21:48 dalek doc: review: https://github.com/perl6/doc/commit/470b94a0c8
21:48 camelia rakudo-moar 7d29f4: OUTPUT«[42]␤63␤»
21:49 moritz lizmat: did you mean to bind $b?
21:50 lizmat yeah
21:50 moritz m: my $a; my $b := $a<a>; $a[0] = 42; $b = 63;  say $a.perl; say $b.perl
21:50 camelia rakudo-moar 7d29f4: OUTPUT«[42]␤63␤»
21:50 lizmat m: my $a; my $b := $a<a><b>; $b = 63; $a[0] = 42; say $a.perl; say $b.perl   # reversing the order
21:50 camelia rakudo-moar 7d29f4: OUTPUT«Odd number of elements found where hash initializer expected␤  in method STORE at src/gen/m-CORE.setting:10477␤  in method assign_pos at src/gen/m-CORE.setting:2070␤  in sub postcircumfix:<[ ]> at src/gen/m-CORE.setting:2837␤  in block <unit> at /t…»
21:50 moritz and yes, IMHO it should die
21:51 moritz sleepy time here, TTFN
21:51 lizmat good night, moritz
21:52 masak 'night, moritz
21:59 ugexe weird. let say i have 'method new(*%args)', and i accidently call it via '$obj.new($key-only)' in test.t. if i run that test with 'perl6 -Ilib t/test.t' it somehow works. but if i do 'prove -e "perl6 -Ilib" t/test.t' i get the default constructor only takes named arguments error
22:00 ugexe im guessing one of them is running the installed version of the module im working on?
22:05 PerlJam ugexe: care to share the code?
22:10 colomon joined #perl6
22:10 colomon o/
22:10 masak \o
22:10 lizmat colomon \o
22:12 hobbs joined #perl6
22:13 ugexe PerlJam: well i was about to, but after reinstalling the module it correctly gives the consturctor error for both
22:14 denis_boyun_ joined #perl6
22:20 anaeem1_ joined #perl6
22:28 dalek rakudo/nom: 7af6a8b | lizmat++ | src/core/Parcel.pm:
22:28 dalek rakudo/nom: Make sure Parcel assignments are bounds checked
22:28 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/7af6a8b963
22:38 dalek Heuristic branch merge: pushed 30 commits to rakudo/newio by lizmat
22:39 akela joined #perl6
22:40 raydiak \o #perl6
22:40 raydiak m: class C { method m { %_.values } }; my @results = C.m :a(1), :b(2); @results.perl.say;
22:40 camelia rakudo-moar b64afd: OUTPUT«Array.new(1, "b" => 2)␤»
22:41 raydiak the mistake there is forgetting the invocant colon on the method call
22:41 raydiak I don't suppose there's any way we could make it more obvious?
22:42 kjs_ joined #perl6
22:42 raydiak m: class C { method m { %_.values } }; my $results = C.m :a(1), :b(2); $results.perl.say; # also, should this give "useless use of ..." ?
22:42 camelia rakudo-moar b64afd: OUTPUT«WARNINGS:␤Useless use of "," in expression "my $results = C.m :a(1), :b(2)" in sink context (line 1)␤(1,).list.item␤»
22:42 colomon joined #perl6
22:42 raydiak oh, it does, cool
22:47 BenGoldberg joined #perl6
22:47 lizmat good night, #perl6!
22:47 CurtisOvidPoe If I have notes about roles in Perl 6, is it appropriate to list them as an issue on https://github.com/perl6/specs/blob/master/S14-roles-and-parametric-types.pod?
22:47 CurtisOvidPoe Good night lizmat!
22:48 jnthn CurtisOvidPoe: Issue as in GitHub Issue, or note them in the doc?
22:48 CurtisOvidPoe As a github issue (though there are some docs notes which are also appropriate)
22:48 jnthn CurtisOvidPoe: Yeah, go for it, and then poke me about it when I have a not-cold-infested brane if you like. :)
22:48 CurtisOvidPoe OK :)
22:49 * jnthn gets some rest
22:53 masak 'night, jnthn
23:00 lue masak: here's my longer maze solution (finished it yesterday): https://gist.github.com/lue/b8b63922aa6914a18081
23:03 * masak looks
23:04 masak wow. 441 lines :)
23:04 masak a lot of comments, but still.
23:06 Mouq joined #perl6
23:06 lue If I'm not trying to golf it, then I tend to give code quite a bit of space :P .
23:07 masak lue: "free walls" are not a fail condition, IMO.
23:08 masak lue: see the original problem specification. the only requirement was that all cells were reachable through a unique path. free walls can coexist with that criterion.
23:08 lue I was thinking that, with a free wall, there can be multiple paths between two squares, thus not unique.
23:09 masak I don't know how you arrive at that conclusion.
23:09 masak your diagram at https://gist.github.com/lue/b8b63922aa6914a18081#file-mazes-p6-L378 has unique paths.
23:09 masak and is thus a good counterexample to your claim :)
23:10 masak oh wait.
23:10 masak no, I see what you mean.
23:10 masak yeah, everything needs to be rooted in the external walls.
23:10 masak hm.
23:11 masak oh, I think my algorithm indirectly prohibits free walls for various reasons.
23:11 masak lue: I have three programs now. I've been tweaking them during the evening after finding some bugs. still running them. https://gist.github.com/masak/db655cb7ab27454cf15c
23:14 masak lue: thank you for sharing your solution. it's very interesting to compare our respective approaches.
23:14 lue you're welcome :)
23:15 lue Admittedly I haven't run my program for the entirety of 4x4 grids yet, but at least with 3x3 it takes just about 10 minutes.
23:15 masak 4x4 is a beast.
23:15 lue The kind of beast I'd ponder multithreading for :) .
23:15 masak my program has been running for just over an hour now. it might be halfway.
23:15 Mouq For reference, what is the # for 3x3?
23:16 lue Number of solutions? Uh, I don't tally that up :P . Just a second.
23:16 lue (or rather 10 minutes)
23:17 Mouq Well, what's the magnitude?
23:17 lue my rough guess would be in the hundreds.
23:18 masak I'm writing a short script now to find out.
23:19 Mouq Okay. I had something that I thought was pretty solid, returning 68 for 3x3, and then I implemented an optimization, and it comes out to 86 and I'm like O_O… turns out code isn't doing what I think it is :P
23:19 Mouq *my code
23:20 lue Mouq: a closer guess for me would be around 100, so you know. I just scrolled up the output and went with what I felt like the magnitude was :) .
23:21 Mouq Okay :)
23:21 Mouq I hope we can at least agree that 2x2 yeilds 4 :P
23:21 * Mouq has to go to class
23:21 jercos Mouq: you're thinking of 2+2, or 2²
23:24 colomon m: say 2x2
23:24 camelia rakudo-moar b64afd: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/mufW5q4Q1R�Confused�at /tmp/mufW5q4Q1R:1�------> [32msay 2[33m�[31mx2[0m�»
23:25 colomon that's not a 4
23:25 masak Mouq: yes, 2x2 has 4 solutions, if we don't eliminate symmetric ones.
23:26 lue Number of solutions: 192  (for 3x3, not bothering to eliminate symmetric ones of course)
23:27 * masak stares at some bug his 3x3 script has
23:31 retupmoca joined #perl6
23:31 jtpalmer joined #perl6
23:31 masak ah. off-by one.
23:32 masak here, I am getting 217 solutions (before removing symmetric ones).
23:32 masak for 3x3.
23:34 Mouq joined #perl6
23:36 masak 34, after removing symmteric ones.
23:36 lue It's quite possible that I messed up somewhere (or that perhaps I'm strict enough that I get false negatives)
23:37 masak I'll post a gist of them, and if your algo finds any that mine doesn't, we'll know mine is wrong :)
23:38 masak hm. some of these look malformed :(
23:41 lue I'm not sure how one would prove my conjecture, that a NxN maze requires exactly (N-1)² internal walls... (or, alternatively, (N+1)² total walls)
23:42 masak lue: "For a connected graph with V vertices, any spanning tree will have V − 1 edges" -- https://en.wikipedia.org/wiki/Spanning_tree
23:42 masak lue: edges in the spanning tree correspond to missing walls in the maze.
23:43 masak lue: 16 vertices => 15 edges => 24 - 15 == 9 walls
23:43 masak lue: that's where I get 15 and 9 from in this line: https://gist.github.com/masak/db655cb7ab27454cf15c#file-01-mazes-p6-L2
23:44 lue I wonder how much faster my program would go if there was an initial "number of internal walls" check.
23:44 masak or, do like me, and just traverse the bitstrings with the correct number of 1s.
23:45 masak even cheaper than checking all the time is never straying from the path :)
23:45 Mouq 686 O_o
23:45 Mouq Ohh, another bug
23:45 Mouq Geez
23:45 dj_goku joined #perl6
23:45 dj_goku joined #perl6
23:46 masak you and me both, pal.
23:46 Mouq This is a pain in the butt. Well, I at least generated them all, many times, in 36 seconds (for 3x3) :P
23:48 masak ok, this time it looks much better.
23:48 masak for 3x3: 160, counting all positions. 24, removing symmetries.
23:48 masak gisting the mazes.
23:49 masak here: https://gist.github.com/masak/c17a7c473bf6f6ad83a5
23:52 vendethiel masak: changed = False then ++ ?
23:56 lue O_o  Time before "number of walls" check: real    9m16.350s    Time after implementing check: real    2m13.235s
23:57 masak m: say False.succ
23:57 camelia rakudo-moar 7af6a8: OUTPUT«True␤»
23:57 masak m: my $b = False; $b++; $b++; say $b
23:57 camelia rakudo-moar 7af6a8: OUTPUT«True␤»
23:57 masak vendethiel: don't know if that's explanation enough...
23:58 masak vendethiel: `$changed++` to me means "set this boolean"

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

Perl 6 | Reference Documentation | Rakudo