Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-09-24

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:07 pink_mist I'm unsure how to get async access to stdin though :/
00:08 dalek roast: 673167c | skids++ | S13-overloading/typecasting-long.t:
00:08 dalek roast: Add tests (with 2 fudges) for RT#114026 (aka RT#115850 aka RT#112642)
00:08 dalek roast: review: https://github.com/perl6/roast/commit/673167c51f
00:08 synbot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=114026
00:16 laouji joined #perl6
00:30 BenGoldberg Why does class Any posses 'sub exit' ?  Is this really the best place for it?
00:33 mathw joined #perl6
00:33 esh joined #perl6
00:34 Gruber joined #perl6
00:39 laouji joined #perl6
00:46 laouji joined #perl6
00:47 schmoost1r joined #perl6
00:54 dalek ecosystem/multipart-parser: d15d490 | (Tokuhiro Matsuno)++ | META.list:
00:54 dalek ecosystem/multipart-parser: Add HTTP::MultiPartParser
00:54 dalek ecosystem/multipart-parser: review: https://github.com/perl6/ecosystem/commit/d15d490100
00:54 telex joined #perl6
00:56 dalek ecosystem: d15d490 | (Tokuhiro Matsuno)++ | META.list:
00:56 dalek ecosystem: Add HTTP::MultiPartParser
00:56 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/d15d490100
00:56 dalek ecosystem: bb40224 | colomon++ | META.list:
00:56 dalek ecosystem: Merge pull request #59 from perl6/multipart-parser
00:56 dalek ecosystem:
00:56 dalek ecosystem: Add HTTP::MultiPartParser
00:56 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/bb40224d18
00:57 CurtisOvidPoe joined #perl6
01:01 thou joined #perl6
01:02 colomon joined #perl6
01:04 jsimonet joined #perl6
01:04 jack_rabbit_ joined #perl6
01:07 kanishka joined #perl6
01:08 dalek rakudo-star-daily: 9a0791f | coke++ | log/ (9 files):
01:08 dalek rakudo-star-daily: today (automated commit)
01:08 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/9a0791f53e
01:15 jack_rabbit_ joined #perl6
01:23 rurban joined #perl6
01:46 aborazmeh joined #perl6
01:46 aborazmeh joined #perl6
01:50 noganex joined #perl6
01:51 adu joined #perl6
01:52 noganex joined #perl6
01:53 rurban joined #perl6
02:13 noganex joined #perl6
02:15 zakharyas joined #perl6
02:31 tokuhiro_ joined #perl6
02:43 noganex_ joined #perl6
02:51 tokuhiro_ m: "".split(/\n/)
02:51 camelia rakudo-moar 88c191: ( no output )
02:52 tokuhiro_ m: "".split(/\n/).perl.say
02:52 camelia rakudo-moar 88c191: OUTPUT«("",).Seq␤»
02:56 tokuhiro_ hm. this behaviour cause `for $str.split(/\n/) { .say }` prints empty line when $str is empty string.
03:02 kaare_ joined #perl6
03:37 baest_ joined #perl6
03:40 fling joined #perl6
04:15 rindolf joined #perl6
04:26 rjattrill joined #perl6
04:26 rmgk_ joined #perl6
05:12 jack_rabbit_ joined #perl6
05:16 cognominal joined #perl6
05:25 sivoais joined #perl6
05:30 chenryn joined #perl6
05:33 Ven joined #perl6
05:35 sivoais joined #perl6
05:36 aborazmeh joined #perl6
05:36 aborazmeh joined #perl6
05:45 sivoais joined #perl6
05:54 adu joined #perl6
06:01 araujo joined #perl6
06:02 araujo joined #perl6
06:05 araujo joined #perl6
06:08 araujo joined #perl6
06:08 makapa joined #perl6
06:10 diana_olhovik joined #perl6
06:11 araujo joined #perl6
06:11 [Sno] joined #perl6
06:14 araujo joined #perl6
06:14 FROGGS[mobile] joined #perl6
06:14 FROGGS[mobile] I know why that happens
06:15 FROGGS[mobile] it used to return Nil pre-GLR
06:15 makapa left #perl6
06:15 FROGGS[mobile] I made it to return an empty list
06:15 FROGGS[mobile] perhaps it should return Empty?
06:17 FROGGS[mobile] but, hmmm, maybe it wasnt me, I patched the Str matcher case I think
06:18 FROGGS[mobile] pro tip: change and spectest it
06:20 ShimmerFairy m: say "foobar".split("\n").perl
06:20 camelia rakudo-moar 88c191: OUTPUT«("foobar",).Seq␤»
06:20 TimToady '' seems like a pretty good result
06:20 ShimmerFairy FROGGS[mobile]: fwiw I think returning a one-element list of the whole string in this case is reasonable
06:21 FROGGS[mobile] okay :o)
06:21 dalek rakudo/nom: 9257a86 | TimToady++ | src/core/ (2 files):
06:21 dalek rakudo/nom: redo is-lazy on zips and crosses, more one-arging
06:21 dalek rakudo/nom:
06:21 dalek rakudo/nom: Turns out zip should set is-lazy only if *all* it's inputs are lazy.
06:21 dalek rakudo/nom: (Otherwise it's finite, limited to the shortest list.)  Unlike zip,
06:21 dalek rakudo/nom: roundrobin should run till all sources are exhausted, so any lazy
06:21 dalek rakudo/nom: source propagates as a lazy result.
06:21 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/9257a86727
06:21 dalek rakudo/nom: f89dc23 | TimToady++ | src/core/List.pm:
06:21 dalek rakudo/nom: can now use multis to distinguish zip/cross-with
06:21 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/f89dc23dd8
06:22 dalek roast: a4e24d2 | TimToady++ | S0 (3 files):
06:22 dalek roast: more GLRious tests for X and Z lazy propagation
06:22 dalek roast: review: https://github.com/perl6/roast/commit/a4e24d2596
06:23 [Tux] test             50000    35.240    35.139
06:23 [Tux] test-t           50000    35.534    35.432
06:23 nine nine@sphinx:~> perl -E 'for my $line (split /\n/, "") { say "line: $line"; }'
06:23 nine nine@sphinx:~> perl -E 'for my $line (split /\n/, "foo") { say "line: $line"; }'
06:23 nine line: foo
06:23 nine Perl 5 seems to special case the empty string there. Wonder about the reasoning behind this.
06:25 aiacob joined #perl6
06:26 nine Python's split returns ['']
06:35 domidumont joined #perl6
06:36 FROGGS joined #perl6
06:40 domidumont joined #perl6
06:46 moritz nine: perl 5's split removes empty, trailing strings
06:46 moritz nine: unless you explicit specify a limit of -1 or so
06:47 moritz nine: perl 6's split is not supposed to do that
06:50 FROGGS say join ",", split "\n", "foo\n\n" # P5: "foo", P6: "foo,," - I like P6's output better
06:50 Ven joined #perl6
06:50 FROGGS I can suppress empty string on my own, thanks
06:50 FROGGS strings*
06:51 RabidGravy joined #perl6
06:57 Ven TimToady++ # laziness greatness :D
07:05 abraxxa joined #perl6
07:17 Ven joined #perl6
07:17 vytas joined #perl6
07:17 tokuhiro_ i see. i understood a behaviour, thanks!
07:22 Ven joined #perl6
07:30 kanishka joined #perl6
07:32 dalek roast: 4ec6f97 | TimToady++ | S04-statements/for.t:
07:32 dalek roast: unfudge passing test on optional param
07:32 dalek roast: review: https://github.com/perl6/roast/commit/4ec6f9799e
07:32 dalek roast: 73db4fc | TimToady++ | S04-statements/gather.t:
07:32 dalek roast: self-ref inside gather seems to be GLR-proof now
07:32 dalek roast: review: https://github.com/perl6/roast/commit/73db4fcfd7
07:32 [Sno] joined #perl6
07:42 pdcawley joined #perl6
07:45 xinming joined #perl6
07:46 brrt joined #perl6
07:46 brrt \o #perl6
07:46 brrt i have a challenge for you
07:46 lizmat good *, #perl6
07:47 lizmat brrt o/
07:47 brrt based on the fact that the panda jit bug only appeared in conjunction with inlining
07:47 brrt and that there are actually not that many spaces where inlining interacts with the jit
07:47 brrt i now hypothesize that this problem comes from a mis-caught exception of sorts
07:48 brrt so my question is if anybody can help me golf this down
07:50 brrt the basic template is, i think, something like sub foo() { Some-Exception.throw }; sub bar() { try { foo(); CATCH { default { say "ok"; }} }}; for ^1000 { bar(); }
07:50 brrt actually, now that i think of it
07:50 brrt that's a pretty decent template for any jit test
07:50 Ven joined #perl6
07:50 ][Sno][ joined #perl6
07:50 brrt just have 'm say ok in a loop, and plan up to $loop-idx number of tests
07:52 brrt nb: the problem may also lie in 'lexotic' exceptions and control exceptions
07:54 adu joined #perl6
08:02 dakkar joined #perl6
08:09 darutoko joined #perl6
08:20 lizmat brrt: sorry, was afk for a bit
08:21 lizmat and am about to be more afk for a few hours
08:21 lizmat meanwhile, S04-statements/gather.t hangs for me in test 29
08:22 Ven joined #perl6
08:22 lizmat m: my @a := gather for 1..3 { take $_; $cat ~= ~@a }.list;  +@a
08:22 camelia rakudo-moar f89dc2: OUTPUT«5===SORRY!5=== Error while compiling /tmp/cUMEWjOoxg␤Variable '$cat' is not declared␤at /tmp/cUMEWjOoxg:1␤------> 3my @a := gather for 1..3 { take $_; 7⏏5$cat ~= ~@a }.list;  +@a␤»
08:22 lizmat m: my $cat; my @a := gather for 1..3 { take $_; $cat ~= ~@a }.list;  +@a
08:22 camelia rakudo-moar f89dc2: OUTPUT«WARNINGS:␤Useless use of "+" in expression "+@a" in sink context (line 1)␤Memory allocation failed; could not allocate 52112 bytes␤»
08:23 lizmat .tell TimToady seems self ref inside gather is not GLR-proof now
08:23 yoleaux lizmat: I'll pass your message to TimToady.
08:27 duncan_dmg joined #perl6
08:36 Ven joined #perl6
08:42 luiz_lha joined #perl6
08:44 brrt np lizmat :-)
08:45 brrt maybe jnthn has some ideas about this. iirc he handled this case some time ago
08:45 brrt but there may be something that has been missed
08:45 brrt for one thing, i do collect inline information in the jit, and then proceed not to use it
08:47 xfix joined #perl6
08:51 Ven joined #perl6
08:52 larion joined #perl6
09:01 mattprelude joined #perl6
09:06 jnthn brrt: Is the thing you posted a golf of the Panda issue?
09:06 yoleaux 23 Sep 2015 21:06Z <lizmat> jnthn: should the COMPOSE phaser be in nope or not?
09:06 yoleaux 23 Sep 2015 21:07Z <lizmat> jnthn: or maybe some way to export something into a class that will get run when a class is "finalized" at compile time
09:06 yoleaux 23 Sep 2015 21:09Z <lizmat> jnthn: thinking about something like class A is reaped {} to make objects run their DESTROY at global destruction
09:07 brrt no, it's not a golf, it is a hypothesis :-)
09:08 jnthn .tell lizmat I'm not clear on what folks expect COMPOSE to do or when it runs. For roles, for example, the body of the role always runs at the time that role is being composed into the class, and has access to the target class through ::?CLASS
09:08 yoleaux jnthn: I'll pass your message to lizmat.
09:13 ShimmerFairy jnthn: to be honest, I'm not sure what COMPOSE is exactly supposed to do myself :)  The only hints I've gotten are that a couple ^parameterize functions in classes like Hash mention something like # XXX should be done at COMPOSE time
09:13 jnthn ShimmerFairy: Yes, those confused me too ;)
09:13 ShimmerFairy (the spec is unfortunately totally silent on what the COMPOSE phaser is supposed to be; it has more documentation on that module ::COMPOSE thingy!)
09:16 jnthn Well, EXPORTHOW::COMPOSE was one of my creations :)
09:16 jnthn And I only tend to put stuff into the design docs that I already figured how to implement :)
09:17 jnthn brrt: So the best reproduction technique is still "try to build/use panda"?
09:18 ShimmerFairy jnthn: sure, not commenting on the EXPORTHOW thing itself, just noting the fact that it gave a lot of false positives (and that essentially all the positives were false) when trying to find _something_ on the COMPOSE phaser in the specs :)
09:24 jnthn ShimmerFairy: Well, then maybe the COMPOSE phaser is mis-named, but given I've yet to see anyone precisely define the semantics they want it to have, it's impossible to know :P
09:25 ShimmerFairy .oO(We need to compose various ideas about the phaser into a coherent design, but we don't have the phaser...)
09:26 ShimmerFairy jnthn: I'd suggest just taking it out of S04 (and related), and see how long it takes for someone to notice, since nobody seems to know what it is :P
09:26 JimmyZ chicken and egg?
09:28 ShimmerFairy Random thought: is it theoretically possible that the COMPOSE phaser was dreamt up long before the metamodel, and that maaaaaaybe the metamodel does what COMPOSE wanted to do? I feel like you could mess with the metamodel to do your own stuff "at compose time"
09:28 jnthn Well, sure, it's a common MOP module technique to override the compose method.
09:29 brrt aye :-(
09:30 * brrt is sorry about that
09:30 ShimmerFairy After all, there are those aforementioned ^parameterize methods that do just what I mentioned :)
09:32 jnthn brrt: So here, panda's bootstrap.pl ran to completion
09:32 telex joined #perl6
09:32 jnthn brrt: Do I have to try installing something?
09:32 brrt i think timotimo has put in a temporary fix?
09:32 jnthn Oh
09:32 brrt lemecheck
09:33 ShimmerFairy jnthn: I couldn't install panda until I added a  my $ =  to the failing line
09:33 jnthn Yeah, I see timo's patch
09:33 * jnthn reverted it
09:33 jnthn ...and it still bootstraps
09:33 brrt what
09:34 brrt you have to be...
09:34 brrt :-(
09:34 brrt this on windows?
09:34 jnthn ah, but panda install Grammar::Debugger dies with
09:34 jnthn Default constructor for 'Panda::Ecosystem' only takes named arguments in method throw at C:\consulting\MoarVM\install/share/perl6/runtime/CORE.setting. in sub make-default-ecosystem at C:\consulting\MoarVM\install\share\perl6\site\li
09:34 jnthn That's the error, yes?
09:35 xinming joined #perl6
09:37 jnthn OK, and it goes away with JIT disabled *or* inline disabled.
09:38 jnthn So, it is reproducable for me also.
09:38 jnthn That means we can rule out platform specific JIT oddness, at least... :)
09:41 jnthn Nearly everything that gets inlined is part of the compiler, it seems...
09:41 helloworldlang joined #perl6
09:42 helloworldlang p6: say 3;
09:42 camelia rakudo-moar f89dc2: OUTPUT«3␤»
09:42 helloworldlang p6: say $*PERL;
09:42 camelia rakudo-moar f89dc2: OUTPUT«Perl 6 (6.Advent)␤»
09:42 helloworldlang p6: dd $*PERL;
09:42 camelia rakudo-moar f89dc2: OUTPUT«Perl Perl 6 = Perl.new(compiler => Compiler.new(release => "", codename => "", name => "rakudo", auth => "The Perl Foundation", version => Version.new('2015.9.102.gf.89.dc.23'), signature => Blob, desc => Str), name => "Perl 6", auth => "The Perl Foundatio…»
09:43 helloworldlang p6: qx{ls /};
09:43 camelia rakudo-moar f89dc2: OUTPUT«qx, qqx is disallowed in restricted setting␤  in sub restricted at src/RESTRICTED.setting:1␤  in sub QX at src/RESTRICTED.setting:11␤  in block <unit> at /tmp/tmpfile:1␤␤»
09:43 helloworldlang p6: qx{dir};
09:43 camelia rakudo-moar f89dc2: OUTPUT«qx, qqx is disallowed in restricted setting␤  in sub restricted at src/RESTRICTED.setting:1␤  in sub QX at src/RESTRICTED.setting:11␤  in block <unit> at /tmp/tmpfile:1␤␤»
09:43 helloworldlang p6: dir;
09:43 camelia rakudo-moar f89dc2: ( no output )
09:43 helloworldlang p6: Nil;
09:43 camelia rakudo-moar f89dc2: ( no output )
09:46 helloworldlang p6: xxxx;
09:46 camelia rakudo-moar f89dc2: OUTPUT«5===SORRY!5=== Error while compiling /tmp/tmpfile␤Undeclared routine:␤    xxxx used at line 1␤␤»
09:47 helloworldlang p6: loop { say 123 };
09:47 helloworldlang p6: say 123;
09:47 camelia rakudo-moar f89dc2: OUTPUT«(timeout)123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤1…»
09:48 camelia rakudo-moar f89dc2: OUTPUT«123␤»
09:48 helloworldlang p6: say 123;
09:48 camelia rakudo-moar f89dc2: OUTPUT«123␤»
09:48 helloworldlang p6: loop { say 123 };
09:48 helloworldlang p6: loop { say 123 };
09:48 helloworldlang p6: loop { say 123 };
09:48 helloworldlang p6: loop { say 123 };
09:48 helloworldlang p6: say 123;
09:48 FROGGS helloworldlang: the output won't change if you do it again fwiw
09:48 sergot :)
09:48 sergot camelia will be angry
09:48 sergot tho
09:49 FROGGS she's a bot, she won't be angry
09:49 brrt aye jnthn, that's the error
09:49 sergot I know, just kidding :)))
09:49 FROGGS :o)
09:49 camelia rakudo-moar f89dc2: OUTPUT«(timeout)123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤1…»
09:49 camelia rakudo-moar f89dc2: OUTPUT«(timeout)123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤1…»
09:49 camelia rakudo-moar f89dc2: OUTPUT«(timeout)123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤1…»
09:49 camelia rakudo-moar f89dc2: OUTPUT«(timeout)123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤123␤1…»
09:49 camelia rakudo-moar f89dc2: OUTPUT«123␤»
09:50 sergot helloworldlang: who are you? :)
09:50 helloworldlang p6: use JSON::Tiny
09:50 camelia rakudo-moar f89dc2: OUTPUT«===SORRY!===␤Could not find JSON::Tiny in any of:␤  file#/home/camelia/.perl6/2015.09-102-gf89dc23/lib␤  inst#/home/camelia/.perl6/2015.09-102-gf89dc23␤  file#/home/camelia/rakudo-inst-1/share/perl6/lib␤  file#/home/camelia/rakudo-inst-1/share/pe…»
09:51 psch m: my @a = <a b c>; for @a { s/(.)/{ $0.uc }/; .say }; # ...what's with the Nil there?
09:51 camelia rakudo-moar f89dc2: OUTPUT«Use of Nil in string context  in block  at /tmp/PNWkzOZ6km:1␤␤A␤B␤»
09:51 psch oh
09:51 psch $/ isn't populated correctly
09:56 dakkar FROGGS: I was looking at your LibXML bindings… when do you free memory?
09:57 FROGGS dakkar: I don't.... yet...
09:57 dakkar ah, that's why I couldn't find it :)
09:57 FROGGS :o)
09:58 dakkar I would have thought to call the xmlFree* functions in a submethod DESTROY, but:
09:58 dakkar - destroy may or may not be called, and I'm not clear on when
09:58 FROGGS aye
09:59 dakkar - free-ing a node returned by .find is almost certainly wrong, because the document still owns it
09:59 dakkar so, navigation/find methods have to return objects that let Perl know that they shouldn't be destroyed yet
10:00 FROGGS or find has to return copies...
10:00 dakkar but then if we destroy the document, those objects are no longer valid (and will segfault if we look at them)
10:00 FROGGS which may or may not work out well
10:00 dakkar yes, but if you return copies, mutating methods won't have any useful effect on them
10:00 dakkar $doc.find($some_xpath).set-attribute(...)
10:00 dakkar nice no-op you haev there :)
10:00 FROGGS yeah
10:01 Ven joined #perl6
10:02 larion joined #perl6
10:03 FROGGS dakkar: if you don't get near a solution, perhaps add a test as a reminder?
10:03 FROGGS like: new doc, obtain node, somehow free doc, continue to use node
10:03 dakkar the p5 bindings seem to handle it via proxy objects, manual ref-counting, and lots of tree traversal to keep the counts correct
10:04 FROGGS would be nice if we find a more elegant way
10:04 jnthn Is there some way to make sure that any object you hand back to userspace also references the CStruct or whatever for the document, so then you just keep it alive through "normal" GC reachability?
10:05 dakkar jnthn: *nearly*
10:05 FROGGS jnthn: that should work
10:05 dakkar a document owns nodes; but nodes can be moved between documents
10:06 dakkar also, nodes can belong to fragments
10:06 FROGGS a node has a doc attribute where we could stick the doc object in
10:06 FROGGS after a little refactoring
10:06 FROGGS oh
10:07 dakkar mutable data structures are *messy*
10:08 g4 joined #perl6
10:12 dakkar jnthn: how would one test object destruction?
10:15 jnthn dakkar: If I really wanted to test what my DESTROY method did, I'd just call it
10:15 jnthn (in the test)
10:15 jnthn Trying to "make" the GC trigger it is going to be very fraught
10:15 dakkar oh, right, submethods are visible, just not inherited; I get confused with subs in classes
10:16 jnthn ("Do a GC run now" is a little hard to define on VMs when GC is concurrent and so running all the time... :))
10:16 dakkar (how do JVM/CLR people test these things?)
10:17 jnthn dakkar: CLR people (at least, the C# ones) don't use the GC for resource management, but using blocks instead. :)
10:17 dakkar which would be equivalent to "will leave" in p6?
10:17 jnthn using (acquire resource) { ...use in scope... } // .Dispose() called at scope exit
10:18 jnthn Well, it relies on objects implementing a particular interface, whereas "will leave" makes you specify the method to call on leaving
10:18 dakkar that still leaks implementation details…
10:18 dakkar it requires the caller to know that the object requires disposing
10:19 dakkar which is, in many cases, not something the caller should care about
10:19 dakkar (native objects, caches that need saving, internal sockets that need notifying…)
10:19 lizmat messages?
10:19 yoleaux 09:08Z <jnthn> lizmat: I'm not clear on what folks expect COMPOSE to do or when it runs. For roles, for example, the body of the role always runs at the time that role is being composed into the class, and has access to the target class through ::?CLASS
10:20 lizmat jnthn: maybe the wording of COMPOSE is wrong
10:20 lizmat what I would like to see is some way a module cane export something into the namespace of a class, and have it run when the class is finalized / composed / whatever you call it that happens when the closing } is found
10:21 jnthn dakkar: We just don't tend to consider it a problem in the C# world; objects that need disposing implement IDisposable, linting tools can pick out places you shoulda done a using, and fianlizers (our DESTROY) act as a fallback for when people forget
10:21 jnthn lizmat: "into the namesapce of a class" is kinda meaningless...
10:22 jnthn lizmat: If you want to have "is foo" add an action to do at composition time, that's already possible today
10:22 lizmat that would allow a module to implement sometthing like "use final-destruction", which would wrap the .new of the class causing the objects to be saved in an array, to be run by an END block at global destruction
10:22 lizmat jnthn: do you have an example of that?
10:23 jnthn lizmat: I think the AOP example I did in one of my MOP talks did it
10:23 lizmat ok, will chase that down then  :-)
10:24 * jnthn is, meanwhile, trying to chase the inlining+JIT panda issue down
10:24 jnthn It's as hard as everyone else's failed attempts suggest :/
10:25 jnthn Simply removing the "return" statement and having it be an implicit return makes things work, for example
10:35 espadrine_ joined #perl6
10:38 psch 3 files with StackOverflowError, one OutOfMemoryError, and three with NullPointerException...
10:38 psch so the other 43 failing test files are apparently failing a bit higher than the jvm
10:44 psch ...i also got failures in baghash.t
10:44 psch tests 121 and 122, which is lines 259 and 260 i think
10:45 psch and i kind of want to doubt the tests...
10:47 FROGGS_ joined #perl6
10:47 psch eh, it's consistent, so i guess i'm just misunderstanding statistics
10:52 wollmers joined #perl6
10:52 wollmers m: my uint64 $z = +^0;say sprintf("%064b",$z);
10:52 camelia rakudo-moar f89dc2: OUTPUT«00000000000000000000000000000000000000000000000000000000000000-1␤»
10:52 psch oh, just didn't look closely enough, it's something about roll(*) actually
10:53 psch r: my $b = BagHash.new("a", "b", "b"); my @a = $b.roll(*)[^5]; say @a.perl # vOv
10:53 camelia rakudo-jvm f89dc2: OUTPUT«["a"]␤»
10:53 camelia ..rakudo-moar f89dc2: OUTPUT«["a", "b", "a", "b", "a"]␤»
10:54 wollmers m: my $a = Uni.new(0x0044, 0x0323).Str; my $b = Uni.new(0x0307).Str; my $c = $a ~ $b;say $a.chars;say $b.chars;say $c.Str.chars;
10:54 camelia rakudo-moar f89dc2: OUTPUT«1␤1␤1␤»
10:54 Zefram_Fysh m: say Mu.new ~~ Mu # is it intentional that this ACCEPTS method is limited to Any on the lhs?
10:54 camelia rakudo-moar f89dc2: OUTPUT«X::Multi::NoMatch exception produced no message␤  in block <unit> at /tmp/nTdpZm8cal:1␤␤»
10:54 wollmers m: my $a = Uni.new(0x0044, 0x0323).Str; my $b = Uni.new(0x0307).Str; my $c = $a ~ $b;say $a.chars;say $b.chars;say $c.Str.chars;say $c;
10:54 camelia rakudo-moar f89dc2: OUTPUT«1␤1␤1␤Ḍ̇␤»
10:56 psch m: say Any ~~ Mu
10:56 camelia rakudo-moar f89dc2: OUTPUT«True␤»
10:56 wollmers m: my Uint64 $z = +^0;say sprintf("%064b",$z);
10:56 camelia rakudo-moar f89dc2: OUTPUT«5===SORRY!5===␤Type 'Uint64' is not declared. Did you mean any of these?␤    UInt64␤    uint64␤    int64␤␤at /tmp/aN7XMeTAzC:1␤------> 3my Uint647⏏5 $z = +^0;say sprintf("%064b",$z);␤Malformed my␤at /tmp/aN7XMeTAzC:1␤------> …»
10:56 Zefram_Fysh m: say Any.new ~~ Mu
10:56 camelia rakudo-moar f89dc2: OUTPUT«True␤»
10:56 Zefram_Fysh m: say Mu ~~ Mu
10:56 camelia rakudo-moar f89dc2: OUTPUT«True␤»
10:56 psch Zefram_Fysh: no, it should dispatch to Mu.ACCEPTS(Mu \topic)
10:57 psch Zefram_Fysh: but i suspect the topicalization messes that up
10:57 Zefram_Fysh it's actually multi method ACCEPTS(Mu:U: Any \topic)
10:57 psch yeah, i shorthanded it :)
10:57 Zefram_Fysh but the class ~~ class case is multi method ACCEPTS(Mu:U: Mu:U \topic)
10:57 psch i also saw the .new
10:57 jnthn m: say any(1, 2, 3) ~~ 3
10:57 camelia rakudo-moar f89dc2: OUTPUT«any(False, False, True)␤»
10:57 jnthn If you make it accept Mu, that wouldn't work out
10:58 psch *Mu.new
10:58 psch m: say Mu.new.defined
10:58 camelia rakudo-moar f89dc2: OUTPUT«True␤»
10:58 ShimmerFairy jnthn: arguably that should be a special case for Junction anyway, no? Not that I expect Mu.new ~~ (or other non-Any types) to occur all that often, though... :)
10:59 jnthn ShimmerFairy: The point of Junction !~~ Any is precisely to avoid special cases for it all over the palce.
10:59 jnthn *place
11:00 wollmers m: my Uint64 $z = 0 +| (1 +< 63);say sprintf("%064b",$z);
11:00 camelia rakudo-moar f89dc2: OUTPUT«5===SORRY!5===␤Type 'Uint64' is not declared. Did you mean any of these?␤    UInt64␤    uint64␤    int64␤␤at /tmp/SGY_L59p4l:1␤------> 3my Uint647⏏5 $z = 0 +| (1 +< 63);say sprintf("%064b"␤Malformed my␤at /tmp/SGY_L59p4l:1␤---…»
11:00 wollmers m: my uint64 $z = 0 +| (1 +< 63);say sprintf("%064b",$z);
11:00 camelia rakudo-moar f89dc2: OUTPUT«-1000000000000000000000000000000000000000000000000000000000000000␤»
11:01 aiacob joined #perl6
11:01 ShimmerFairy jnthn: I see. And if I thought people would often derive from Mu instead of the default Any, I'd still suggest having 'Mu' and 'Junction' multis instead of just 'Any' :)
11:02 wollmers m: my uint64 $z = 0 +| (1 +< 62);say sprintf("%064b",$z);
11:02 camelia rakudo-moar f89dc2: OUTPUT«0100000000000000000000000000000000000000000000000000000000000000␤»
11:04 jnthn ShimmerFairy: Yes, there's a reason Any is the default base class :)
11:04 AlexDaniel joined #perl6
11:04 wollmers m: my uint64 $z = 0 +| (1 +< 63);say sprintf("%064b",$z);say $z;
11:04 camelia rakudo-moar f89dc2: OUTPUT«-1000000000000000000000000000000000000000000000000000000000000000␤-9223372036854775808␤»
11:05 wollmers m: my uint64 $z = 0 +| (1 +< 62);say sprintf("%064b",$z);say $z;
11:05 camelia rakudo-moar f89dc2: OUTPUT«0100000000000000000000000000000000000000000000000000000000000000␤4611686018427387904␤»
11:05 wollmers m: my uint64 $z = 0 +| (1 +< 62);say sprintf("%064b",$z);say $z;say ($z > 0);
11:05 camelia rakudo-moar f89dc2: OUTPUT«0100000000000000000000000000000000000000000000000000000000000000␤4611686018427387904␤True␤»
11:06 wollmers m: my uint64 $z = 0 +| (1 +< 63);say sprintf("%064b",$z);say $z;say ($z > 0);
11:06 camelia rakudo-moar f89dc2: OUTPUT«-1000000000000000000000000000000000000000000000000000000000000000␤-9223372036854775808␤False␤»
11:07 wollmers m: my uint64 $z = 0 +| (1 +< 63);say sprintf("%064b",$z);say $z;say ($z > 0);say $z.lsb,' ',$z.msb;
11:07 camelia rakudo-moar f89dc2: OUTPUT«-1000000000000000000000000000000000000000000000000000000000000000␤-9223372036854775808␤False␤63 63␤»
11:08 wollmers Hmm ... where can I submit a bug?
11:09 wollmers m: my uint64 $z = +^0;say sprintf("%064b",$z);say $z;say ($z > 0);say $z.lsb,' ',$z.msb;
11:09 camelia rakudo-moar f89dc2: OUTPUT«00000000000000000000000000000000000000000000000000000000000000-1␤-1␤False␤0 0␤»
11:11 brrt joined #perl6
11:11 wollmers uint64 does not behave unsigned
11:12 Zefram_Fysh wollmers: rakudobug@perl.org
11:12 jnthn wollmers: If it's not already in RT (https://rt.perl.org/rt3/) then by sending mail to "rakudobug@perl.org" and put [BUG] at the start
11:12 jnthn wollmers: Yeah, it's not really implemented yet
11:12 jnthn wollmers: I think the only places that really pay attention to it are native calls
11:13 ShimmerFairy I noticed things like int4 don't play nice either; I'm guessing it's the fact that it's less than a byte? :)
11:13 Zefram_Fysh m: say sprintf("%03b", -1) # this on its own is buggy
11:13 camelia rakudo-moar f89dc2: OUTPUT«0-1␤»
11:13 wollmers jnthn: then bitops would not work correctly
11:29 pmurias joined #perl6
11:34 rurban joined #perl6
11:38 Ven joined #perl6
11:38 brrt what's the current 'best' perl6 syntax-highlighting mode for emacs?
11:43 pmurias has anyone tried making an editor syntax-highlight with an actual Perl 6 grammar?
11:44 moritz brrt: when you find out, please document in on https://github.com/perl6/faq
11:44 brrt moritz: i find this https://github.com/hinrik/perl6-mode
11:44 moritz pmurias: iirc azawawi did that with STD.pm6
11:44 moritz brrt: since hinrik also maintains the vim perl6 plugin, it sounds like a good place to start
11:46 jdv79 .tell patrickz i am slowly working on cpan stuff
11:46 yoleaux jdv79: I'll pass your message to patrickz.
11:48 jnthn m: class C { has $.a; has $.b; }; sub foo() { return C.new(a => 1, b => 2 }; for ^100 { foo }
11:48 camelia rakudo-moar f89dc2: OUTPUT«5===SORRY!5=== Error while compiling /tmp/WcQgXgQPw2␤Unable to parse expression in argument list; couldn't find final ')' ␤at /tmp/WcQgXgQPw2:1␤------> 3sub foo() { return C.new(a => 1, b => 2 7⏏5}; for ^100 { foo }␤    expecting any of:…»
11:48 jnthn m: class C { has $.a; has $.b; }; sub foo() { return C.new(a => 1, b => 2) }; for ^100 { foo }
11:48 camelia rakudo-moar f89dc2: ( no output )
11:48 jnthn m: class C { has $.a; has $.b; }; sub foo() { return C.new(a => 1, b => 2) }; for ^1000 { foo }
11:48 camelia rakudo-moar f89dc2: ( no output )
11:49 jnthn m: class C { has $.a; has $.b; }; sub foo() { return C.new(a => 1, b => 2) }; for ^2000 { foo }
11:49 camelia rakudo-moar f89dc2: ( no output )
11:51 jdv79 and it may be "done" by xmas, btw.
11:52 jdv79 .tell patrickz and it may be "done" by xmas, btw
11:52 yoleaux jdv79: I'll pass your message to patrickz.
11:53 dalek perl6-examples: 6ee4669 | (Steve Mynott)++ | categories/ (3 files):
11:53 dalek perl6-examples: GLR fixes such that prob009-gerdr-feeds.pl, sseq-grondilu.pl and subs-grondilu.pl pass
11:53 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/6ee4669f27
11:53 [Coke] RT: 1,020: [GLR] - 4; testneeded - 9; xmas: 103
11:56 * [Coke] ponders adding: masak: 217 there. :P
11:59 moritz so few? :-)
12:00 hernanGOA joined #perl6
12:01 [Coke] m: my $l = (for ^5 { 41; next if $_ == 2; $_; }); use Test; is $l[2].perl, "()", "for loop iteration with value-less 'next' gives ()";
12:01 camelia rakudo-moar f89dc2: OUTPUT«not ok 1 - for loop iteration with value-less 'next' gives ()␤␤# Failed test 'for loop iteration with value-less 'next' gives ()'␤# at /tmp/9C0r8Ekg33 line 1␤# expected: '()'␤#      got: '3'␤»
12:02 chenryn joined #perl6
12:03 [Coke] ^^ RT #124568, looks like it needs adjusting post GLR.
12:03 synbot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=124568
12:03 [Coke] at some point, that was expected to leave a gap in the resulting list.
12:03 lizmat jnthn: is it correct that nqp::readlinefh only supports LF and CRLF, but no bare CR ?
12:12 jdv79 [Coke]: i am doing metacpan atm
12:13 * jdv79 just finished  backlogging
12:13 jdv79 since when does a long distance train not have outlets:(
12:14 moritz old trains don't
12:14 moritz and sometimes they are well hidden
12:14 moritz (at least in .de)
12:15 hernanGOA joined #perl6
12:16 jdv79 im on a munich to berlin so maybe ill hunt around
12:18 brrt in .nl, trains don't have outlets, period
12:18 [Coke] jdv79++
12:18 brrt in fact, in .nl, the catering guys rent powerpacks (batteries) for recharging your iDevice
12:18 El_Che brrt: there are no long distances in .nl :)
12:18 [Coke] even the old crappy line between NYC and albany has power! ;)
12:19 moritz jdv79: it's sometimes between and below two seats
12:19 lizmat brrt: when I used to commute to Amsterdam regularly, the 1st class compartments *did* have power (I seem to recall)
12:19 RabidGravy the London suburban trains have power sockets which are intended for the cleaners, sometimes they leave them on and sometimes not.
12:20 RabidGravy just behind the partition between the doors and the seats
12:26 Zefram_Fysh http://www.techtimes.com/articles/68594/20150714/british-man-who-charged-iphone-on-train-is-arrested-for-abstracting-electricity.htm
12:27 _itz I think that was a case of someone who was told not to plug in getting stroppy
12:28 brrt lizmat: i've never seen it. but i never travel first class
12:28 lizmat it was one of my prerequisites  :-)
12:29 lizmat to allow me to work on the train
12:29 lizmat (2h45m commute either way)
12:29 pink_mist most trains here in sweden have power outlets by every seat afaik ... unless it's an older train
12:29 brrt hmmm.... i should get myself into a position wherein i can prerequisite things like that
12:30 [Coke] m: leave;
12:30 camelia rakudo-moar f89dc2: OUTPUT«leave not yet implemented. Sorry. ␤  in block <unit> at /tmp/0UIA7hoZJ3:1␤␤»
12:30 brrt travelling without a power plug is an interesting experience
12:30 dalek perl6-examples: 6503bbe | (Steve Mynott)++ | categories/rosalind/ (3 files):
12:30 dalek perl6-examples: GLR fixes for cons-grondilu.pl, itwv-grondilu.pl and mprt-grondilu.pl
12:30 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/6503bbe390
12:30 brrt (which was by the way the only major thing i thought could be improved at yapc::eu this year. last year had lots of powerplugs everywhere)
12:31 _itz I was confused by the Swiss sockets and had a special stack of UK -> Europe -> Swiss converters
12:31 abraxxa joined #perl6
12:35 DrForr Yeah, I went to charge my laptop during a talk and looked for the outlet, and couldn't find one.
12:35 _itz I was even surprised that the Swiss seemed to encourage people to buy knives before flying :)
12:37 [Coke] m: { LEAVE { say 1 } ; say 2} ;
12:37 camelia rakudo-moar f89dc2: OUTPUT«2␤1␤»
12:38 [Coke] If that already works, and leave is already stubbed to emit NYI in the 3 places it's needed... how hard is it to exit the loop and invoke LEAVE at that point? SMOP?
12:40 abraxxa joined #perl6
12:42 lizmat [Coke]: afaik, it's SMOP, but it is also an extra exception that needs to be handled
12:47 thou joined #perl6
12:49 [Coke] my RT sense is tingling.
12:49 lizmat I don't think leave is in nope
12:49 lizmat so things might not be so bad after all  :-)
12:50 * [Coke] tries to parse what zefram wants in his most recent ticket. Code helps.
12:50 Psyche^ joined #perl6
12:50 moritz m: .say for 1, 2, IterationEnd, 3, 4, 5
12:50 camelia rakudo-moar f89dc2: OUTPUT«1␤2␤»
12:51 moritz [Coke]: I think Zefram_Fysh++ wants documentation for this kind of behavior
12:51 skids joined #perl6
12:51 moritz "Don't use IterationEnd for anything except low-level Iterator API; otherwise you'll shoot yourself in the foot, neck or any other body part that is exposed"
12:51 [Coke] ok. there is one doc ticket, one spec ticket, and two rejected related tickets.
12:52 jdv79 moritz++ # hidden under seat
12:52 moritz jdv79: glad you found it :-)
12:55 [Coke] how do you create a literal Real ?
12:55 jnthn Yes, I'd document IterationEnd as "The only valid use of this sentinel value in a program is identity comparison (using `=:=`) with the result of a method in the Iterator API. Any other behavior is undefiend and implementation dependent."
12:55 Zefram_Fysh I was thinking on the lines of ".map can't be applied to the IterationEnd value", and "the reduction metaoperator can't be applied where the list of values includes the IterationEnd value", etc.
12:56 jnthn Zefram_Fysh: No, I thinnk the right way is to whitelist what you *can* do with it, not blacklist the hundreds of other cases.
12:56 Zefram_Fysh the code that would get bitten by this isn't code that uses IterationEnd explicitly, it's code that thinks it can handle *any* value and gets IterationEnd passed in from somewhere else
12:56 [Coke] m: say (3.Real).WHAT
12:56 camelia rakudo-moar f89dc2: OUTPUT«(Int)␤»
12:57 jnthn [Coke]: Real is a role
12:57 jnthn [Coke]: Other numeric types do it
12:57 jnthn Zefram_Fysh: That's already covered by my description; the code that passed it in was wrong to do so.
12:58 jnthn Though it's also fairly hard to pass it around too
12:58 jnthn m: sub foo($x) { }; foo(IterationEnd)
12:58 camelia rakudo-moar f89dc2: OUTPUT«X::TypeCheck::Binding exception produced no message␤  in sub foo at /tmp/4Ei1my9UFi:1␤  in block <unit> at /tmp/4Ei1my9UFi:1␤␤»
12:58 jnthn Since it's Mu, not Any
12:59 Zefram_Fysh so what about code that calls arbitrary caller-specified methods and stores the result?  what if it's asked to call .pull-one on an iterator?
12:59 Zefram_Fysh what about code that processes code, where the subject code might be using IterationEnd in the approved way?
13:00 jnthn *sigh
13:00 ShimmerFairy The fact that this issue has yet to come up is a good indicator of how likely it is :)
13:00 jnthn Zefram_Fysh: Do you want to go re-design the Perl 6 iterator API? If not, please stop being a nuisance.
13:00 Zefram_Fysh I'd be happy to suggest alternatives to the sentinel in the API, if you're willing to listen
13:01 * moritz is willing to listen
13:01 Ven joined #perl6
13:02 Zefram_Fysh I rather like the pattern where the caller to .pull-one or equivalent passes in a thunk, which will be tail-called upon exhaustion of the value stream.  that thunk may return a simple sentinel, if the caller is happy with that.  but alternatively it may execute a flow control operator such as last
13:03 Zefram_Fysh by this means, end of stream can be handily distinguished from any actual value at all
13:03 jnthn Zefram_Fysh: And...how do you propose we make that fast?
13:04 jnthn I wish people would stop letting the perfect be the enemy of the good.
13:04 Zefram_Fysh invoking the thunk amounts to a jump.  those can be quite cheap
13:04 moritz no, to a call
13:04 dalek rakudo/nom: 1b55e5f | lizmat++ | src/core/IO/Handle.pm:
13:04 dalek rakudo/nom: lines (push-all) should add lines seen, not set it
13:04 dalek rakudo/nom:
13:04 dalek rakudo/nom: Found when writing tests for IO::Handle.lines
13:04 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/1b55e5ff8a
13:06 moritz and last is, to the best of my knowledge, a control exception, which also isn't all that cheap
13:07 tadzik poland is so funny <3
13:07 tadzik go to one office and ask how to get government healthcare when unemployed, and they say "well, you can either pay ~400 monthly or go to the Job Office, register as unemployed and get it for free"
13:08 tadzik so I go there and register as unemployed, and wonder why on earth do they need documents about my entire job experience seven years backwards
13:08 tadzik then I'm informed that they'll arrange for job appointments for me and I need to go there every month
13:08 _sri joined #perl6
13:08 tadzik I say "I'm not looking for a job, I just came here for the healthcare thing"
13:09 tadzik "oh, but we're not a healthcare provider, we're here to help you find a job"
13:09 tadzik ".......oh"
13:09 moritz :-)
13:09 tadzik it's just so, so often exploited that even other government officials recommend that method
13:09 lizmat tadzik: fwiw, that's how it more or less works in NL as well
13:09 moritz and .de
13:09 moritz you're not getting benefits for being unemployed, your new job is to get a job, damnit!
13:10 timotimo yeah, if you're unemployed and you're not actually looking for a job, the government (or rather, the organs that are supposed to deal with these things) will shit all over you as much as they can
13:10 Zefram_Fysh if the decision is that general-purpose language constructs can't be applied in general, I don't think I can take Perl 6 seriously
13:10 tadzik it does make sense now that I think about it
13:11 tadzik but it amuses me to no end that I lived for a quarter of a century associating "Job Office" with "where you go to get unemployment benefits"
13:11 lizmat Zefram_Fysh: that's entirely your right
13:11 tadzik since this is what the entire country uses it for
13:11 tadzik I'm so proud of my nationality
13:12 lizmat Zefram_Fysh: but thank you for considering
13:15 ShimmerFairy I think the misunderstanding was wanting to write code that handles "*any* value", and not realizing that that is what Any is for :) .
13:17 timotimo is this about malicious code perhaps putting StopIteration into well-behaved routines?
13:19 ShimmerFairy Maybe, but I think the actual issue was thinking Mu is what you had to support to support any value, when in reality not-Any stuff tends to be weird and special compared to the kinds of objects you usually use.
13:20 * ShimmerFairy wonders if you could get away with calling Mu a "semi-metaobject" in some sense :P
13:21 Loren joined #perl6
13:21 Loren evening #perl6 .
13:24 tadzik hello Loren
13:25 Loren o/
13:25 khw joined #perl6
13:31 masak afternoon, #perl6
13:31 masak evening, Loren
13:32 dalek rakudo/nom: faffea9 | lizmat++ | src/core/IO/Handle.pm:
13:32 dalek rakudo/nom: lines (push-all) should add lines seen (part 2)
13:32 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/faffea9147
13:33 Loren o/, I'm study S12 now.
13:33 masak let us know if you have any questions.
13:33 dalek perl6-examples: dbb1158 | (Steve Mynott)++ | categories/rosalind/grph-grondilu.pl:
13:33 dalek perl6-examples: GLR fix for grph-grondilu.pl
13:33 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/dbb1158a00
13:34 Loren masak, ok, thank you .
13:34 masak m: role R { method quality { ... }; method brag { say "OO in Perl 6 is {self.quality}!" } }; class C does R { method quality { "awesome" } }; .brag given C.new
13:34 camelia rakudo-moar 1b55e5: OUTPUT«OO in Perl 6 is awesome!␤»
13:35 aborazmeh joined #perl6
13:35 aborazmeh joined #perl6
13:35 lizmat m: role R { method quality { ... }; method brag { say "OO in Perl 6 is $.quality!" } }; class C does R { method quality { "awesome" } }; .brag given C.new
13:35 camelia rakudo-moar 1b55e5: OUTPUT«OO in Perl 6 is awesome!␤»
13:36 lizmat no need for {}  :-)
13:36 masak indeed not.
13:36 Ven joined #perl6
13:36 masak though I've come to use {} more and more in qq strings
13:36 lizmat not sure that's a feature or a bug, though
13:36 masak (a) for consistency, because sometimes I *do* need {}
13:36 jnthn $.quality should interpolate :)
13:37 jnthn So looks correct
13:37 masak yes, it's a scalar
13:37 masak (b) for visual-pill-ness
13:37 timotimo visual pills contain carrots
13:38 masak (c) because it makes me remember not to use {} in qq strings when I mean literal {}
13:38 masak though (c) is the weakest reason, to me that trap is also the biggest weakness with the current factoring of qq strings
13:38 lizmat m: my @a = a=>42, b=> 666; for @a -> :$key, :$value { dd $key, $value }  # shouldn't that just work ?
13:38 camelia rakudo-moar 1b55e5: OUTPUT«Too many positionals passed; expected 0 arguments but got 1␤  in block <unit> at /tmp/viIDIn58eJ:1␤␤»
13:39 masak it's far to easy to, say, paste some test into a qq string, not realizing that some of it will be interpolated because it contains {}
13:39 * Ven waves around
13:39 masak m: my @a = a=>42, b=> 666; for @a -> (:$key, :$value) { dd $key, $value }
13:39 camelia rakudo-moar 1b55e5: OUTPUT«Str $key = "a"␤Int $value = 42␤Str $key = "b"␤Int $value = 666␤»
13:39 ilmari m: class C { method foo { say $ =:= self } }; C.new.foo
13:39 camelia rakudo-moar 1b55e5: OUTPUT«False␤»
13:39 masak lizmat: ^
13:39 masak Ven: *wave*
13:39 lizmat masak++
13:40 masak lizmat: as I understand it, it would've been "more correct" if those () parentheses could be {} object braces -- but that clashes with the block syntax.
13:40 ilmari m: class C { method foo { say $; say self } }; C.new.foo
13:40 camelia rakudo-moar 1b55e5: OUTPUT«(Any)␤C.new␤»
13:40 Ven don't we use % (:(..)) for hash destructuring, usually?
13:41 masak ilmari: $.foo means self.foo, but $ doesn't mean self
13:41 masak ilmari: similarly, *-2 means { $_ - 2 }, but * doesn't mean { $_ }
13:42 JimmyZ m: say (**2)(2)
13:42 camelia rakudo-moar 1b55e5: OUTPUT«5===SORRY!5=== Error while compiling /tmp/LS7zhXIvmN␤Two terms in a row␤at /tmp/LS7zhXIvmN:1␤------> 3say (**7⏏2)(2)␤    expecting any of:␤        infix␤        infix stopper␤        statement end␤        statement modifier␤  …»
13:42 ilmari m: say (* * 2)(2)
13:42 camelia rakudo-moar 1b55e5: OUTPUT«4␤»
13:42 Ven .oO( then it must mean { $_ } - 2. In perl6, lambdas substract you! )
13:43 JimmyZ m: say (* *2)(2)
13:43 camelia rakudo-moar 1b55e5: OUTPUT«4␤»
13:43 FROGGS joined #perl6
13:51 sufrostico joined #perl6
13:52 dalek nqp: 6b3c7b0 | jnthn++ | src/QRegex/P6Regex/Actions.nqp:
13:52 dalek nqp: Factor out repetitive rx literal code.
13:52 dalek nqp: review: https://github.com/perl6/nqp/commit/6b3c7b0e20
13:53 lizmat m: say (* ** 2)(2)
13:53 camelia rakudo-moar 1b55e5: OUTPUT«4␤»
13:53 lizmat :-)
13:53 jnthn m: constant $x = 'ab'; say ('ab' ~~ / a | b | $x /).Str
13:53 camelia rakudo-moar 1b55e5: OUTPUT«a␤»
13:53 jnthn (ab locally :))
13:55 masak jnthn++
13:55 FROGGS jnthn++ # :o)
13:55 masak was that an RT or sump'n?
13:55 masak it feels familiar.
13:55 jnthn Yes, RT
13:55 jnthn Also one of the RTs on my "fix before 6.christmas"
13:55 masak \o/
13:55 * masak checks his watch
13:55 TimToady joined #perl6
13:56 masak you did it! :D
13:56 jnthn :P
13:56 masak ...ship it! :P
13:57 jnthn The things on that list aren't really about "how much will it suck if a user hits this" but "if we don't fix the semantics of this now will we end up with people depending on them"
13:57 masak aye
13:57 timotimo damn, users
13:58 timotimo cant live with them, cant live without them
13:58 travis-ci joined #perl6
13:58 travis-ci NQP build passed. jnthn 'Factor out repetitive rx literal code.'
13:58 travis-ci https://travis-ci.org/perl6/nqp/builds/81969022 https://github.com/perl6/nqp/compare/7190914a1985...6b3c7b0e2092
13:58 travis-ci left #perl6
13:58 masak not embarassoids, but compatitudes.
13:58 [Coke] ./perl6 -e 'Real.new.gist' hangs; ./perl6 --profile -e 'Real.new.gist' segfaults.
13:59 ilmari m: (1,2,3,IterationEnd,5,6).perl.say
13:59 camelia rakudo-moar faffea: OUTPUT«(1, 2, 3)␤»
13:59 ilmari wut
13:59 PerlJam ilmari: seems reasonable to me.
14:00 ilmari m: (1,2,3,IterationEnd,5,6).elems
14:00 camelia rakudo-moar faffea: ( no output )
14:00 PerlJam (unless we want *another* end token for .perl output)
14:00 ilmari m: (1,2,3,IterationEnd,5,6).elems.say
14:00 camelia rakudo-moar faffea: OUTPUT«6␤»
14:00 ilmari m: (1,2,3,IterationEnd,5,6)[4]
14:00 camelia rakudo-moar faffea: ( no output )
14:00 ilmari m: (1,2,3,IterationEnd,5,6)[4].say
14:00 camelia rakudo-moar faffea: OUTPUT«5␤»
14:00 ilmari m: (1,2,3,IterationEnd,5,6)[3].say
14:00 camelia rakudo-moar faffea: OUTPUT«␤»
14:01 ilmari PerlJam: I thought .perl was supposed to return a string that evaluated to the same value?
14:01 * ilmari meetings
14:02 timotimo in theory, we could instantiate IterationEnd and pass it on to the recipient of the thing, but that'll cause GC churn. a lot of it.
14:02 [Coke] ilmari: yes. it did.
14:02 timotimo for things we're currently very cheap about
14:02 [Coke] the 5,6 at the end of that is unreachable.
14:03 timotimo m: my $foo = (1, 2, 3, IterationEnd, 5, 6); say $foo.perl
14:03 camelia rakudo-moar faffea: OUTPUT«$(1, 2, 3)␤»
14:03 timotimo now how do i ...
14:04 moritz m: class Protector { has Mu $.x handles * }; say (1, 2, 3, Protector.new(x => IterationEnd), 5, 6).perl
14:04 camelia rakudo-moar faffea: OUTPUT«(1, 2, 3, Protector.new(x => Mu.new), 5, 6)␤»
14:05 timotimo m: say IterationEnd.perl
14:05 camelia rakudo-moar faffea: OUTPUT«Mu.new␤»
14:05 timotimo oh
14:05 timotimo it's just an instance of Mu
14:05 timotimo gotcha.
14:06 [Coke] m: say IterationEnd.WHAT, IterationEnd.perl;
14:06 camelia rakudo-moar faffea: OUTPUT«(Mu)Mu.new␤»
14:06 timotimo so IterationEnd is only special because some places check for identity on it
14:07 timotimo so there's no reason for it to .perl to "IterationEnd"
14:07 timotimo just like my Mu $foobar := Mu.new; has no need to .perl to "$foobar"
14:07 moritz right
14:07 timotimo so ... problem solved?
14:08 moritz which problem? :-)
14:08 timotimo "people could expect IterationEnd to ... " ... actually i have no idea?
14:09 timotimo i realize zefram was just fuzzing ...
14:09 PerlJam Sticking an IterationEnd in your array could be a way of having out-of-band data at the end of your array  (i.e., a useful hack :)
14:10 timotimo ugh, that sounds terrible
14:10 jnthn PerlJam: Please lets not encourage that :P
14:10 timotimo we've already said the behavior of IterationEnd is implementation defined ...
14:10 timotimo i'd really rather you just put a role on the instance or something …
14:11 PerlJam Whether I encourage it or not, that's how someone will use it at some point.  It's a Murphy's Law kind of thing.
14:11 timotimo "everything happens"
14:12 lizmat "Don't use IterationEnd for anything except low-level Iterator API; otherwise you'll shoot yourself in the foot, neck or any other body part that is exposed"   (moritz++)
14:13 timotimo don't allow user-provided input to evaluate to IterationEnd somehow ...
14:13 kanishka joined #perl6
14:13 jnthn timotimo: I've now idea how that could ever happen :)
14:13 timotimo me neither
14:13 [Coke] m: (1,2,3,Mu,6,7).perl.say;
14:13 camelia rakudo-moar faffea: OUTPUT«(1, 2, 3, Mu, 6, 7)␤»
14:15 dalek nqp: 2111ca0 | (Pawel Murias)++ | src/vm/js/nqp-runtime/runtime.js:
14:15 dalek nqp: [js] add a helper to dump objects to json for debugging purposes
14:15 dalek nqp: review: https://github.com/perl6/nqp/commit/2111ca0d3c
14:15 dalek nqp: 23d57af | (Pawel Murias)++ | src/vm/js/nqp-runtime/ (2 files):
14:15 dalek nqp: [js] Move obj prototype creation into the REPR.
14:15 dalek nqp: review: https://github.com/perl6/nqp/commit/23d57af3b0
14:15 dalek nqp: bea9d2d | (Pawel Murias)++ | src/vm/js/ (3 files):
14:15 dalek nqp: [js] Work on object serialization
14:15 dalek nqp: review: https://github.com/perl6/nqp/commit/bea9d2dd30
14:15 dalek nqp: 3616d0a | (Pawel Murias)++ | src/vm/js/ (3 files):
14:15 dalek nqp: [js] Round trip a P6int containing a small integer correctly.
14:15 dalek nqp: review: https://github.com/perl6/nqp/commit/3616d0a52f
14:17 Ven joined #perl6
14:18 Loren m: class T { our method m1() {'m1'}; our method m2() {'m2'}; }; my @x = (&T::m1, &T::m2); my $t = T.new; say $t.@x();
14:18 camelia rakudo-moar faffea: OUTPUT«Invocant requires a type object of type Array, but an object instance was passed.  Did you forget a 'multi'?␤  in block <unit> at /tmp/2EFqGiBo2K:1␤␤»
14:18 jnthn Anyone else seeing failure in S04-statements/for.t?
14:19 masak Loren: that looks to me like it should've worked.
14:19 Loren yeah, i copy it from S12.indirect_notation.t
14:20 * jnthn sees that gather.t hang too
14:21 lizmat jnthn: I've reported that this morning
14:22 jnthn Yeah, the for.t was a TimToady unfudge from 24th also
14:22 jnthn Thought it wasn't likely my regex constant LTM fix was to blame for that one... :)
14:22 lizmat jnthn: yeah, confirmed
14:22 lizmat X::Multi::NoMatch exception produced no message
14:23 lizmat m: for 1..5 -> $x, $y? { dd $x, $y }
14:23 camelia rakudo-moar faffea: OUTPUT«Int $x = 1␤Int $y = 2␤Int $x = 3␤Int $y = 4␤Int $x = 5␤Mu $y = Mu␤»
14:24 lizmat hmmm...
14:25 masak looks like I would expect.
14:25 lizmat m: say 42 * Mu    # golfed
14:25 camelia rakudo-moar faffea: OUTPUT«X::Multi::NoMatch exception produced no message␤  in block <unit> at /tmp/F2NUBh9TQC:1␤␤»
14:26 FROGGS ohh nice
14:26 FROGGS that message showed up on the jvm often
14:27 dalek rakudo/nom: 8a38466 | jnthn++ | / (2 files):
14:27 dalek rakudo/nom: Constant scalars in regexes participate in LTM.
14:27 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/8a384660d0
14:27 dalek roast: d08ab51 | jnthn++ | S05-metasyntax/longest-alternative.t:
14:27 dalek roast: Unfudge tests for RT #113884.
14:27 dalek roast: review: https://github.com/perl6/roast/commit/d08ab51a0a
14:27 synbot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=113884
14:29 masak Loren: yeah, I see the test you copied now. seems it's Not-Yet-Implemented in Rakudo.
14:30 masak Loren: there's even an (empty) RT ticket saying so: https://rt.perl.org/Ticket/Display.html?id=124844
14:30 zacts joined #perl6
14:30 Loren Oh, got it, masak
14:31 cosimo joined #perl6
14:32 dalek nqp: 24662cb | (Pawel Murias)++ | src/vm/js/ (3 files):
14:32 dalek nqp: [js] box_n/unbox_n, serializing the P6num repr
14:32 dalek nqp: review: https://github.com/perl6/nqp/commit/24662cb01f
14:33 jnthn m: "foo" ~~ /foo/; say "What kind of $()l am I?"
14:33 camelia rakudo-moar faffea: OUTPUT«What kind of fool am I?␤»
14:33 FROGGS m: constant $x = 'ab'; say ('ab' ~~ / a | b | $x /).Str
14:33 camelia rakudo-moar faffea: OUTPUT«a␤»
14:33 FROGGS m: constant $x = 'ab'; say ('ab' ~~ / $x /).Str
14:33 camelia rakudo-moar faffea: OUTPUT«ab␤»
14:34 Ven joined #perl6
14:34 FROGGS m: constant $x = 'AB'; say ('ab' ~~ / $x /).Str
14:34 camelia rakudo-moar faffea: OUTPUT«Use of Nil in string context  in block <unit> at /tmp/3q1g_4RC2n:1␤␤»
14:34 jnthn FROGGS: Don't think camelia is updated yet
14:34 FROGGS m: constant $x = 'AB'; say ('ab' ~~ /:i $x /).Str
14:34 camelia rakudo-moar faffea: OUTPUT«ab␤»
14:34 jnthn "foo" ~~ / foo {make "foo"} /; say "What kind of $()l am I?"
14:34 jnthn m: "foo" ~~ / foo {make "foo"} /; say "What kind of $()l am I?"
14:34 camelia rakudo-moar faffea: OUTPUT«What kind of fool am I?␤»
14:34 pmurias [Coke]: did you have any luck with the sleep node.js problem?
14:34 JimmyZ jnthn: about $() : https://github.com/perl6/specs/issues/98
14:35 jnthn m: say(('foo' ~~ / foo { make 'foo' }/).ast)
14:35 camelia rakudo-moar faffea: OUTPUT«foo␤»
14:35 FROGGS jnthn: I'm just concerned that !LITERAL does not know about :i and :m
14:35 jnthn FROGGS: Hm
14:35 FROGGS jnthn: or will that be handled by the outer nodes?
14:35 jnthn https://rt.perl.org/Ticket/Display.html?id=76278 looks to me like it's fixed now
14:35 Ven pmurias: is P6num a huge perf. impact?
14:35 jnthn FROGGS: Maybe not...
14:36 jnthn m: my $x = 'ab'; say 'Ab' ~~ /$x/
14:36 camelia rakudo-moar faffea: OUTPUT«Nil␤»
14:36 jnthn m: my $x = 'ab'; say 'Ab' ~~ /:i $x/
14:36 camelia rakudo-moar faffea: OUTPUT«「Ab」␤»
14:36 jnthn m: my Str $x = 'ab'; say 'Ab' ~~ /:i $x/
14:36 camelia rakudo-moar faffea: OUTPUT«「Ab」␤»
14:36 travis-ci joined #perl6
14:36 travis-ci NQP build failed. Pawel Murias '[js] box_n/unbox_n, serializing the P6num repr'
14:36 travis-ci https://travis-ci.org/perl6/nqp/builds/81976120 https://github.com/perl6/nqp/compare/3616d0a52fd8...24662cb01fc8
14:36 travis-ci left #perl6
14:36 Ven pmurias: also, isn't Function.prototype.name something you can't change in oldIE/old some browsers?
14:36 jnthn FROGGS: That's the code path I'd expect to fail but it seems not to...
14:37 moritz who cares about oldIE? :-)
14:37 jnthn JimmyZ: The ticket is really about make rather than $()
14:37 Ven moritz: well, oldIE and a lot of other browsers, iirc
14:37 JimmyZ jnthn: Ok, I thought it is  :)
14:38 jnthn It used $() but the ticket is really about make in a closure in a regex, which I think is long fixed
14:38 jnthn m: say(('foo' ~~ / foo { make 'foo' }/).ast) # this is the core issue
14:38 camelia rakudo-moar faffea: OUTPUT«foo␤»
14:38 jnthn m: say(('foo' ~~ / foo { make 'foobar' }/).ast) # this is the core issue
14:38 camelia rakudo-moar faffea: OUTPUT«foobar␤»
14:38 jnthn Yeah, looks good to me
14:39 pmurias Ven: native nqp numbers are stored as javascript numbers
14:39 Ven I feel relieved already :). pmurias ++
14:40 jnthn And we already have tests to cover them.
14:41 pmurias Ven: re Function.prototype.name in old browsers I haven't really tested that
14:41 Ven pmurias: I know we had to do away with it in coffee
14:41 dalek roast: 6350193 | jnthn++ | S05-match/make.t:
14:41 dalek roast: Tag tests covering RT #76278.
14:41 dalek roast: review: https://github.com/perl6/roast/commit/6350193ef4
14:41 synbot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=76278
14:42 pmurias Ven: I don't depend on that heavily so it should be easy to fix that once it's a problem
14:43 pmurias old browser support isn't really a priority untill nqp-js has users depending on that
14:43 tokuhiro_ joined #perl6
14:45 dalek perl6-examples: e599966 | (Steve Mynott)++ | categories/rosalind/orf-grondilu.pl:
14:45 dalek perl6-examples: [rosalind] orf-grondilu.pl fix under GLR
14:45 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/e599966ccf
14:49 Ven pmurias: fair enough then :-) keep up the great work
14:50 rurban joined #perl6
14:51 adu joined #perl6
14:52 dalek perl6-examples: 2a8b315 | (Steve Mynott)++ | categories/rosalind/fibd-grondilu.pl:
14:52 dalek perl6-examples: [rosalind] flatten the Fibonacci Rabbits
14:52 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/2a8b315b09
14:52 ilmari m: ("foo", IterationEnd, "bar")[2]
14:52 camelia rakudo-moar faffea: ( no output )
14:52 ilmari m: ("foo", IterationEnd, "bar")[2].say
14:52 camelia rakudo-moar faffea: OUTPUT«bar␤»
14:52 ilmari [Coke]: doesn't look unreachable to me ^^
14:54 ilmari you can't _iterate_ to it, but you can get at it directly
14:55 ilmari m: ("foo", IterationEnd, "bar").elems.say
14:55 camelia rakudo-moar 8a3846: OUTPUT«3␤»
14:55 _itz that's what I would expect TBH
14:55 ilmari m: ("foo", IterationEnd, "bar").perl.say
14:55 camelia rakudo-moar 8a3846: OUTPUT«("foo")␤»
14:56 Ven you're doing nasty stuff... Except nasty results...
14:56 ilmari _itz: yes, I'm arguing the .perl output is wrong, not .elems and array access
14:56 timotimo imagine we would kick off an iteration every time we want to access an element of an array ..
14:56 FROGGS m: constant $x = 'AB'; say ('ab' ~~ /:i a | b | $x /).Str
14:56 camelia rakudo-moar 8a3846: OUTPUT«ab␤»
14:56 FROGGS nice
14:56 timotimo very good
14:57 FROGGS m: constant $x = 'ÄB'; say ('ab' ~~ /:m a | b | $x /).Str
14:57 camelia rakudo-moar 8a3846: OUTPUT«a␤»
14:57 FROGGS not so much
14:57 timotimo ;(
14:57 FROGGS m: constant $x = 'ÄB'; say ('ab' ~~ /:m $x /).Str
14:57 camelia rakudo-moar 8a3846: OUTPUT«Use of Nil in string context  in block <unit> at /tmp/SL87Qbtdjr:1␤␤»
14:57 FROGGS m: constant $x = 'ÄB'; say ('ab' ~~ /:i:m $x /).Str
14:57 camelia rakudo-moar 8a3846: OUTPUT«ab␤»
14:57 FROGGS m: constant $x = 'ÄB'; say ('ab' ~~ /:i:m a | b | $x /).Str
14:57 camelia rakudo-moar 8a3846: OUTPUT«ab␤»
14:57 Ven oh, you forgot that :i :P
14:58 FROGGS nvm, *I* was wrong
14:58 jnthn ilmari: IterationEnd is a sentinel value that means something to the iterator API, and is only visible at all in user space so people can implement said API.
14:58 Ven that's... nice... but it complexifies the rule a bit, I guess..?
14:58 timotimo maybe we should hide that behind "use IWantToMakeAnIterator"
14:58 FROGGS no
14:58 FROGGS it is fine as it is now
15:00 TEttinger joined #perl6
15:00 jnthn Well, yeah, the evidence from poeple actually implementing/consuming iterators so far is that the API is understandable and accessible. Which is much more useful than "ooh look, if I put the iteration end sentinel into a list the iteration ends!"
15:01 timotimo %)
15:01 * FROGGS is going to store IterationEnd into a mysql database because he might need it later
15:01 FROGGS actually, that would be fun
15:02 timotimo and hard to do
15:02 FROGGS mysql injection via putting IterationEnd as the username and it won't check the password :D
15:02 hoelzro o/ #perl6
15:02 FROGGS hi hoelzro
15:02 dalek perl6-examples: fed05e1 | (Steve Mynott)++ | categories/rosalind/fib-grondilu.pl:
15:02 dalek perl6-examples: [rosalind] GLR fix for fib-grondilu.pl
15:02 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/fed05e194a
15:02 hoelzro o/ FROGGS
15:02 timotimo terrible thoughts are being thoughed
15:03 FROGGS ... but no cat was harmed
15:05 Loren_ joined #perl6
15:11 pmurias hoelzro: hi
15:11 dalek nqp: cf7b3a1 | (Pawel Murias)++ | src/vm/js/ (4 files):
15:11 dalek nqp: [js] Implement box_s/unbox_s. Serializing a P6str.
15:11 dalek nqp: review: https://github.com/perl6/nqp/commit/cf7b3a1f3d
15:11 hoelzro o/ pmurias
15:19 skids joined #perl6
15:20 dalek roast: 252ecba | lizmat++ | S16-io/lines.t:
15:20 dalek roast: First stab at comprehensive IO::Handle.lines tests
15:20 dalek roast:
15:20 dalek roast: Unfortunately, a skip was already needed.  :-(
15:20 dalek roast: review: https://github.com/perl6/roast/commit/252ecba653
15:22 dalek perl6-examples: ccf0ebe | (Steve Mynott)++ | categories/rosalind/mrna-grondilu.pl:
15:22 dalek perl6-examples: [rosalind] flatten some mRNA whatever that might be
15:22 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/ccf0ebe037
15:22 dalek rakudo/nom: b6c4d20 | lizmat++ | t/spectest.data:
15:22 dalek rakudo/nom: Add IO::Handle.lines tests
15:22 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b6c4d20293
15:22 dalek roast: 0957cce | TimToady++ | S04-statements/gather.t:
15:22 dalek roast: Revert "self-ref inside gather seems to be GLR-proof now"
15:22 dalek roast:
15:22 dalek roast: This reverts commit 73db4fcfd74616e0828f9b2b1747b43e456e1aa9.
15:22 dalek roast: (Fooled myself with a residual .rakudo.moar.)
15:22 dalek roast: review: https://github.com/perl6/roast/commit/0957cce1c7
15:25 apotheon joined #perl6
15:25 dalek perl6-roast-data: 2e6ad72 | coke++ | / (9 files):
15:25 dalek perl6-roast-data: today (automated commit)
15:25 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/2e6ad720c2
15:26 [Coke] m: my $p = start Real.new.gist; await Promise.anyof($p, Promise.in(1)); say $p1.result;
15:26 camelia rakudo-moar 8a3846: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ifUMCajatD␤Variable '$p1' is not declared␤at /tmp/ifUMCajatD:1␤------> 3t Promise.anyof($p, Promise.in(1)); say 7⏏5$p1.result;␤»
15:26 [Coke] pmurias: no.
15:26 lizmat jnthn: I'm seeing quite some spectest failures :-(
15:27 lizmat they seem LTM related
15:27 lizmat :-(
15:27 jnthn The error?
15:27 [Coke] m: my $p = start Real.new.gist; await Promise.anyof($p, Promise.in(1)); say $p.result;
15:27 camelia rakudo-moar 8a3846: OUTPUT«Memory allocation failed; could not allocate 640 bytes␤»
15:28 [Coke] Was trying to be clever and get a stacktrace of where Real.new.gist was going. :)
15:28 [Coke] ah well.
15:28 FROGGS m: my $p = start { Real.new.gist }; await Promise.anyof($p, Promise.in(1)); say $p.result;
15:28 camelia rakudo-moar 8a3846: OUTPUT«Memory allocation failed; could not allocate 640 bytes␤»
15:28 dalek rakudo/nom: 1a5873b | jnthn++ | src/Perl6/Metamodel/BOOTSTRAP.nqp:
15:28 dalek rakudo/nom: Fix indento.
15:28 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/1a5873b99a
15:28 dalek rakudo/nom: d7ff0bb | jnthn++ | src/Perl6/Metamodel/BOOTSTRAP.nqp:
15:28 dalek rakudo/nom: Collect rw-ness info for multi-dispatcher to use.
15:28 dalek rakudo/nom:
15:28 dalek rakudo/nom: No semantic changes yet.
15:28 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d7ff0bb08b
15:28 dalek rakudo/nom: 855512f | jnthn++ | src/Perl6/Metamodel/BOOTSTRAP.nqp:
15:28 dalek rakudo/nom: Something with "is rw" is narrower than without.
15:28 dalek rakudo/nom:
15:28 dalek rakudo/nom: Provided types match. However, since we do not yet actually enforce
15:28 dalek rakudo/nom: being passed a mutable thing with "is rw" in signatures, this alone
15:28 dalek rakudo/nom: is not enough for actually differentiating the two.
15:28 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/855512faec
15:29 dalek roast: 685e548 | TimToady++ | S04-statements/for.t:
15:29 dalek roast: only test what we're supposed to be testing
15:29 dalek roast: review: https://github.com/perl6/roast/commit/685e54832c
15:29 lizmat jnthn: ===SORRY!===
15:29 lizmat Cannot find method 'apply_literal_modifiers'
15:29 lizmat NQP bump missing ?
15:29 jnthn lizmat: Huh, I pushed the NQP bump...
15:29 jnthn It looks correct
15:29 jnthn 2015.09.1-13-g6b3c7b0
15:29 lizmat ah, then I didn't reconfig
15:29 jnthn Ah :)
15:30 hernanGOA joined #perl6
15:30 jnthn Phew...was wondering how I'd managed to fail copy/pasting git describe output :)
15:30 TimToady would be nice if there was a detector for that
15:30 TimToady just hit the same issue
15:31 * [Coke] vaguely wants ./Configure.pl for rakudo to take -j so it can call "make -j" on nqp. (and then for nqp to do that with moar)
15:31 jnthn TimToady: Question on "is rw" on parameters. Is it allowed on non-Scalar parameters, and if so what should it mean? :)
15:32 pmurias [Coke]: I should propably pick and mention in the README one good way of getting a none-broken node.js installed
15:32 jnthn TimToady: At the moment we don't enforce anything at all, just behave as if it was "is raw"
15:32 TimToady jnthn: it's a kind of constraint, so we should enforce it the same way as a type :P
15:34 jnthn TimToady: That tells me everything and nothing :P
15:34 TimToady and if we're not going to enforce either of those, maybe we should disallow them till we do
15:35 jnthn "either of those"?
15:35 TimToady Int *args or *args is rw
15:36 TimToady well, with @
15:36 jnthn Ah
15:36 ilmari m: sub foo(Int *@args) { }
15:36 camelia rakudo-moar 8a3846: OUTPUT«5===SORRY!5=== Error while compiling /tmp/SIqH0IIpH_␤Slurpy positionals with type constraints are not supported.␤at /tmp/SIqH0IIpH_:1␤------> 3sub foo(Int *@args7⏏5) { }␤    expecting any of:␤        constraint␤»
15:36 jnthn Well, nqp::iscont(...) is easy to check for on '$foo is rw'
15:36 jnthn And that's the main use of "is rw"
15:36 jnthn So I could see us disallowing it on anything but Scalars in 6.christmas
15:37 TimToady *@args is rw should do the same on each incoming arg, eventually, but maybe not this year
15:37 lizmat only t/spec/S05-mass/stdrules.t (still) failing for me now
15:38 ilmari m: sub foo(Int @args) { @args.say } foo((1,2,3))
15:38 camelia rakudo-moar 8a3846: OUTPUT«5===SORRY!5=== Error while compiling /tmp/I_nEAzMC6X␤Strange text after block (missing semicolon or comma?)␤at /tmp/I_nEAzMC6X:1␤------> 3sub foo(Int @args) { @args.say }7⏏5 foo((1,2,3))␤    expecting any of:␤        infix␤        inf…»
15:38 jnthn lizmat: Oh? Strange, it passes unfudged for me here, thanks to adding print/graph yesteray (again in NQP)
15:38 ilmari m: sub foo(Int @args) { @args.say }; foo((1,2,3))
15:38 camelia rakudo-moar 8a3846: OUTPUT«Type check failed in binding @args; expected 'Positional[Int]' but got 'List'␤  in sub foo at /tmp/bPeUcRIqJe:1␤  in block <unit> at /tmp/bPeUcRIqJe:1␤␤»
15:38 lizmat let me nuke install to be sure...
15:39 TimToady ilmari: we're just worried about slurpies mostly
15:39 jnthn ilmari: Types in Perl 6 are nominal, not structural, if you're wondering why that refuses to bind.
15:39 jnthn m: sub foo(Int @args) { @args.say }; foo(Array[Int].new(1,2,3))
15:39 camelia rakudo-moar 8a3846: OUTPUT«[1 2 3]␤»
15:40 dalek perl6-examples: 944e941 | (Steve Mynott)++ | categories/rosalind/iprb-grondilu.pl:
15:40 dalek perl6-examples: [rosalind] .cache something genetic for GLR
15:40 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/944e941afa
15:40 jnthn TimToady: Yeah. OK, so I'll go with nqp::iscont for `$foo is rw`, forbid it on others, and see what the fallout is.
15:40 TimToady we could, conceivably, have a 'narrow' listop that tries to figure out a narrower array type that could be bound to either a positional or a slurpy
15:40 JimmyZ m: sub foo(Int @args) { @args.say } foo(my @ = 1,2,3)
15:40 camelia rakudo-moar 8a3846: OUTPUT«5===SORRY!5=== Error while compiling /tmp/5zE83ZivcI␤Strange text after block (missing semicolon or comma?)␤at /tmp/5zE83ZivcI:1␤------> 3sub foo(Int @args) { @args.say }7⏏5 foo(my @ = 1,2,3)␤    expecting any of:␤        infix␤      …»
15:41 * jnthn loves when it exactly nails the position of the missing ; :)
15:41 JimmyZ m: sub foo(Int @args) { @args.say } foo(my Int @ = 1,2,3)
15:41 camelia rakudo-moar 8a3846: OUTPUT«5===SORRY!5=== Error while compiling /tmp/VzkGpadOhy␤Strange text after block (missing semicolon or comma?)␤at /tmp/VzkGpadOhy:1␤------> 3sub foo(Int @args) { @args.say }7⏏5 foo(my Int @ = 1,2,3)␤    expecting any of:␤        infix␤  …»
15:42 TimToady m: 42␤43
15:42 camelia rakudo-moar 8a3846: OUTPUT«5===SORRY!5=== Error while compiling /tmp/9AmeXOxAtR␤Two terms in a row across lines (missing semicolon or comma?)␤at /tmp/9AmeXOxAtR:2␤------> 427⏏5<EOL>␤    expecting any of:␤        infix␤        infix stopper␤        statement…»
15:42 jnthn Wow, I didn't see "across lines" before
15:42 TimToady just added it a few days ago :)
15:42 jnthn ah, I musta not paid that patch much attention when reviewing :)
15:43 TimToady it was reporting Bogus postfix before that
15:43 jnthn .oO( Bogus Bogus postfix )
15:44 jnthn hm
15:44 jnthn \a is rw
15:44 jnthn That's a curious construct :)
15:44 tokuhiro_ joined #perl6
15:45 jnthn Since it asks for raw *and* rw which kinda...conflicts.
15:45 jnthn I suspect we ignore the rw there
15:45 JimmyZ and +arg is rw?
15:45 TimToady is raw
15:46 TimToady +arg does not guarantee containers, which is what rw is for
15:46 hernanGOA joined #perl6
15:46 lizmat cycling&
15:47 * TimToady is pretty happy with how +args turned out
15:48 jnthn We have tons of "is rw" return values that probably want to be "is raw" too...
15:48 adu joined #perl6
15:48 TimToady or that should enforce containerness
15:49 * timotimo doesn't know what the difference between is rw and is raw is for return values
15:50 TimToady same as a parameter, 'rw' is enforce container, 'raw' is don't do anything one way or the other wrt containers
15:51 TimToady it is different insofar as raw prevents containerization on the way in and decontainerization on the way out, I guess
15:52 timotimo mhm
15:52 timotimo perl6 -MJSON::Fast -e 'my $a = gather for 1..5 { take $_ }; $a.WHAT.say; to-json $a'  -  how best to make this work right?
15:53 Ven joined #perl6
15:53 jnthn timotimo: How is it failing to work right?
15:54 TimToady gather defaults to eager, right?
15:54 TimToady lazy would be a problem
15:54 jnthn Yes
15:55 jnthn Well, not so much defaults to eager as isn't marked as lazy
15:55 jnthn But assigning a Seq into a Scalar doesn't cause evaluation.
15:55 jnthn In `my @a = gather ...` it's the list assignment that is eager until a marked lazy thing
15:55 timotimo this is for json_fast; it endless-loops or something
15:55 TimToady I've wondered whether .Str should eagerize
15:56 TimToady or try to...
15:56 moritz timotimo: how does JSON::Fast detect Arrays vs. non-Arrays?
15:56 timotimo it used to $thing ~~ Array, which is obviously wrong
15:57 timotimo but ~~ Positional doesn't seem to help
15:57 moritz try $thing ~~ Iterable (but after the check against Hash or EnumMap)
15:57 moritz yes, Seq isn't Positional
15:57 timotimo and then it iterates over $obj.keys
15:57 TimToady m: my $a = gather for 1..5 { take $_ }; say $a
15:57 camelia rakudo-moar 855512: OUTPUT«(1 2 3 4 5)␤»
15:58 TimToady m: my $a = gather for 1..5 { take $_ }; say $a.Str
15:58 camelia rakudo-moar 855512: OUTPUT«1 2 3 4 5␤»
15:58 timotimo and when it $obj{$ke
15:58 timotimo $obj{$key} it infini-recurses
15:58 dalek perl6-examples: 1d0e3ae | (Steve Mynott)++ | categories/rosalind/nwck-grondilu.pl:
15:58 dalek perl6-examples: [rosalind] nwck-grondilu.pl GLR fix and rosalind.t passes
15:58 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/1d0e3ae27c
15:59 TimToady m: my $a = gather for 1..50000000 { take $_ }; say $a
15:59 camelia rakudo-moar 855512: OUTPUT«(1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 …»
15:59 TimToady m: my $a = gather for 1..50000000 { take $_ }; say $a.Str
15:59 camelia rakudo-moar 855512: OUTPUT«(timeout)»
16:05 timotimo m: my $a = gather for 1 .. 10 { take $_ }; sub test($yarr) { say $yarr ~~ Positional }; test($a)
16:05 camelia rakudo-moar 855512: OUTPUT«False␤»
16:06 colomon m: my $a = gather for 1..50000000 { take $_ }; say $a[10000000]
16:06 timotimo m: my $a = gather for 1 .. 10 { take $_ }; sub test(@yarr) { say @yarr ~~ Positional }; test($a)
16:06 camelia rakudo-moar 855512: OUTPUT«(timeout)»
16:06 camelia rakudo-moar 855512: OUTPUT«True␤»
16:06 timotimo is this the positional bind failover thing at work?
16:07 TimToady yes
16:07 timotimo i'd have to go via a function signature to make this work properly?
16:07 timotimo or special-case "Seq"?
16:08 TimToady you can always .cache explicitly
16:08 TimToady or implicitly via .[]
16:08 timotimo but not if i don't know if it's an object or array
16:08 TimToady .cache is a no-op on anything else
16:08 TimToady m: say 42.cache
16:08 camelia rakudo-moar 855512: OUTPUT«(42)␤»
16:09 timotimo is it because Any implements it?
16:09 TimToady well, I guess it listifies
16:09 timotimo that's not so good
16:09 TimToady surely you detect iterables already somehow?
16:10 TimToady or it, if not you...
16:11 timotimo it sends me a text message and i decide :P
16:11 pullphinger joined #perl6
16:12 jnthn lizmat: I get "Failed to open file C:\consulting\rakudo\t\spec\S16-io\lines.testing" in lines.t after test 85
16:12 hernanGOA joined #perl6
16:15 dalek rakudo/rw-cleanup: 0743bf4 | jnthn++ | src/core/ (5 files):
16:15 dalek rakudo/rw-cleanup: Clean up various `is rw` misuses.
16:15 dalek rakudo/rw-cleanup:
16:15 dalek rakudo/rw-cleanup: It's meaningless on non-Scalars. In some places, drop bogus `is rw`,
16:15 dalek rakudo/rw-cleanup: and in others switch to using scalars over \foo.
16:15 dalek rakudo/rw-cleanup: review: https://github.com/rakudo/rakudo/commit/0743bf4c2a
16:16 jnthn In a branch for now 'cus I regress 2 tests in roast (because we throw an untyped exception somewhere that expects the typed RO one)
16:17 AlexDaniel joined #perl6
16:19 hernanGO1 joined #perl6
16:21 abaugher joined #perl6
16:23 xinming_ joined #perl6
16:24 agentzh_ joined #perl6
16:24 nightfro` joined #perl6
16:27 hernanGOA joined #perl6
16:35 jnthn dinner &
16:43 Possum joined #perl6
16:47 moritz did anybody test the R* release candidate?
16:49 * TimToady too busy breaking the next one... :)
16:50 captain-adequate joined #perl6
16:50 yqt joined #perl6
17:03 konnar joined #perl6
17:03 konnar salut
17:04 konnar aurevoir
17:13 espadrine joined #perl6
17:19 moritz t/spec/S05-mass/stdrules.t fails some tests here; is that expected?
17:20 cognominal joined #perl6
17:22 moritz m: sub f() { }; &CORE::none := &f; say &none =:= &f
17:22 camelia rakudo-moar 855512: OUTPUT«True␤»
17:22 moritz is that supposed to work?
17:22 patrickz joined #perl6
17:22 moritz I mean, shouldn't &CORE be read-only once its compilation is finished?
17:23 Peter_R joined #perl6
17:25 xinming joined #perl6
17:29 dalek roast: cecbb2a | TimToady++ | S06-advanced/return.t:
17:29 dalek roast: bare return should not default to slip
17:29 dalek roast:
17:29 dalek roast: Added tests to make sure bare return yields Nil, and that explicit
17:29 dalek roast: Slip/Empty returns do correctly interpolate nothing into lists.
17:29 dalek roast: (RT #126049 rejected)
17:29 dalek roast: review: https://github.com/perl6/roast/commit/cecbb2a9a7
17:29 synbot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=126049
17:33 domidumont joined #perl6
17:37 AlexDaniel joined #perl6
17:38 duncan_dmg left #perl6
17:46 tokuhiro_ joined #perl6
17:50 jnthn moritz: (stdrules.t) I don't understand why it'd fail; it passes fine here
17:50 jnthn I did unfudge things yesterday after implementing things
17:50 jnthn Please can you send me the test output you're seeing?
17:55 rjt_pl joined #perl6
17:55 dalek roast: 95a6e77 | (Stefan Seifert)++ | S02-names-vars/perl.t:
17:55 dalek roast: Tests for say on self-referencing object RT #124242
17:55 dalek roast: review: https://github.com/perl6/roast/commit/95a6e7723f
17:55 synbot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=124242
17:55 sufrostico joined #perl6
17:56 rjt_pl Hello p6 gang! Looking for some help for an easy way to type in the hyperoperator characters in vim
17:57 rjt_pl (I know I can use >> and <<, but I prefer the unicode chars)
17:57 moritz rjt_pl: Ctrl+k << and Ctrl+k >>
17:57 nine .tell [Coke] I would CC perl6-compiler if I had the permission to do that in RT.
17:57 yoleaux nine: I'll pass your message to [Coke].
17:58 moritz rjt_pl: :help digraphs for more info on that feature
17:58 rjt_pl Oh yeah! That just sparked up some dusty old axons. Thanks moritz. I've been using :iab <<< « which has its faults
17:58 moritz jnthn: http://hack.p6c.org/~moritz/stdrules.txt test output
18:00 TimToady rjt_pl: long term you might want to steal one of your keys for Compose, then you can generate many of these characters outside your editor as well
18:00 TimToady like on the irc channel :)
18:01 moritz also my keyboard layout has AltGr+x pre-configured for « and AltGr+y for »
18:01 [Coke] nine: are you a bug admin?
18:01 yoleaux 17:57Z <nine> [Coke]: I would CC perl6-compiler if I had the permission to do that in RT.
18:02 rjt_pl Ah, unfortunately I'm using a special keyboard that lacks such features (but has many other features that I need)
18:02 moritz you can configure any key you want to be your compose key
18:03 moritz I typically use the windows key for that
18:03 nine [Coke]: I can at least close bugs
18:03 FROGGS joined #perl6
18:03 larion joined #perl6
18:03 nine [Coke]: but that seems to be all the permissions I have. Cannot even search for tickets other than by id with my user.
18:04 nine It's...frustrating because I know very well what RT is capable of, as we're using it heavily at work.
18:05 rjt_pl Good idea... I'll give that a shot. Would be nice for other symbols as well. I miss the simplicity of ASCII, but not the character set. :-)
18:07 TimToady m: sub foo(--> Nil) { 42 }; foo
18:07 camelia rakudo-moar 855512: OUTPUT«Type check failed for return value; expected 'Any' but got 'Int'␤  in sub foo at /tmp/79XihQ4N8S:1␤  in block <unit> at /tmp/79XihQ4N8S:1␤␤»
18:08 ilmari rjt_pl: depending on your OS and/or keyboard layout, altgr-z and altgr-x mightdo the trick
18:08 TimToady working on a fix for that Any
18:08 ilmari ah, moritz said that alredy
18:08 ilmari +a
18:08 TimToady I also use gnome's ctrl/shift u to input things like ␤
18:09 TimToady that one has an easy number to remember, 2424
18:09 ilmari what's the code point for that/
18:10 * ilmari adds it to ~/.XCompose as n l
18:11 TimToady alas, I've so far been unable to get custom compose to work with my 日本語 input method
18:11 schmoost1r oh is that why my Ctrl+Shift+u was doing nothing the other day. gnome not present at the time. ta.
18:11 FROGGS o7
18:12 TimToady why are you shading your eyes?
18:12 schmoost1r ~o¬
18:13 FROGGS TimToady: I guess you'd know that I'd not tell the truth if I said 'sunlight' :o)
18:14 xfix joined #perl6
18:15 rjt_pl 2nd question: Is the recommended "use v6;" there only to guard against accidentally running under perl5, or does it actually affect the execution under perl6 in some way?
18:16 rjt_pl I think it's the former, but not 100%
18:16 FROGGS rjt_pl: it is a noop in rakudo atm at least
18:17 FROGGS rjt_pl: later you might do 'use v6.1' and it will have an effect, but we're not there yet
18:17 FROGGS or whatever version scheme we end up having
18:17 rjt_pl Right, ok that makes sense.
18:17 * FROGGS picks an RT ticket and tries to solve it
18:19 jnthn moritz: d'oh, somehow I forgot to update MOAR_REVISION
18:20 FROGGS hmmm, how hard can it be to make this work...  "abc" ~~ m/@<chars>=(.)+/
18:20 FROGGS std: "abc" ~~ m/@<chars>=(.)+/
18:20 camelia std 28329a7: OUTPUT«ok 00:00 139m␤»
18:21 tokuhiro_ joined #perl6
18:21 FROGGS std: "abc" ~~ m/%<chars>=[ <first=.> <second=.> <third=.> ]/
18:21 camelia std 28329a7: OUTPUT«ok 00:00 140m␤»
18:21 FROGGS m: "abc" ~~ m/%<chars>=[ <first=.> <second=.> <third=.> ]/
18:21 camelia rakudo-moar 855512: OUTPUT«5===SORRY!5=== Error while compiling /tmp/mNVmLU2VyM␤Unable to parse expression in metachar:sym<assert>; couldn't find final '>' ␤at /tmp/mNVmLU2VyM:1␤------> 3"abc" ~~ m/%<chars>=[ <first=.7⏏5> <second=.> <third=.> ]/␤»
18:22 lizmat massages?
18:22 vendethiel joined #perl6
18:22 FROGGS m: "abc" ~~ m/%<chars>=[ <first=[.]> <second=[.]> <third=[.]> ]/
18:22 camelia rakudo-moar 855512: ( no output )
18:22 FROGGS m: "abc" ~~ m/%<chars>=[ <first=[.]> <second=[.]> <third=[.]> ]/; say %<chars>
18:22 camelia rakudo-moar 855512: OUTPUT«␤»
18:23 lizmat jnthn: re S16-io/lines.t: weird   I assume this is on Win ?
18:24 leont joined #perl6
18:28 jnthn lizmat: yes
18:28 lizmat it's basically unlink $foo; $foo.IO.spurt($bar)
18:29 jnthn dinner prep taking lots of attention and it's about to be nomming time; feel free to do the Moar revbump to fix stdrules or I'll do it after dinner
18:29 jnthn &
18:31 larion joined #perl6
18:32 rurban joined #perl6
18:39 rjt_pl m: say (1, 1, *+* ...^ * > 50);
18:39 camelia rakudo-moar 855512: OUTPUT«(1 1 2 3 5 8 13 21 34)␤»
18:40 rjt_pl So I get that outputs fibonacci numbers below 50, but where can I find documentation on how *+* ...^ works?
18:40 FROGGS rjt_pl: maybe search for WhateverCode?
18:41 rjt_pl Okay, thanks, that helps. The punctuation is hard to google.
18:43 [Coke] rjt_pl: try docs.perl6.org and enter the punctuation in thesearch
18:44 rjt_pl [Coke]: Thanks for that as well. WhateverCode was definitely the ticket this time, but that'll help next time I am bereft of  keywords :-)
18:45 dalek roast: a9f090c | (Stefan Seifert)++ | S02-names-vars/perl.t:
18:45 dalek roast: Test for .perl on mutually referencing objects
18:45 dalek roast:
18:45 dalek roast: RT #122286
18:45 dalek roast: review: https://github.com/perl6/roast/commit/a9f090cc42
18:45 synbot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=122286
18:46 diana_olhovik joined #perl6
18:46 dalek rakudo/nom: 397e221 | (Stefan Seifert)++ | src/core/Mu.pm:
18:46 dalek rakudo/nom: Fix .perl on mutually referencing object structures
18:46 dalek rakudo/nom:
18:46 dalek rakudo/nom: Port the fix from List to Mu for wider applicability.
18:46 dalek rakudo/nom: Fixes RT #122286
18:46 synbot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=122286
18:46 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/397e221b4e
18:46 dnmfarrell joined #perl6
18:52 krunen joined #perl6
18:53 diana_olhovik_ joined #perl6
18:54 lizmat .tell jnthn just a reminder: if we start chomping on PIO level, we need eoffh to be reliable, otherwise we won't see the difference between an empty line and EOF
18:54 yoleaux lizmat: I'll pass your message to jnthn.
18:57 yqt joined #perl6
18:59 * jnthn sometimes wants to make a thingy where you paste in Perl 6 code and it highlights it and links all the pieces to the docs :)
18:59 yoleaux 18:54Z <lizmat> jnthn: just a reminder: if we start chomping on PIO level, we need eoffh to be reliable, otherwise we won't see the difference between an empty line and EOF
19:00 rjt_pl jnthn: Count me in for that feature :-)
19:00 FROGGS lizmat: I don't think that this can ever work
19:01 jnthn .oO( wtfisthis.perl6.org :) )
19:01 lizmat why?  It's just a matter of reading one byte more than requested and keeping that for the next read?
19:01 [Coke] jnthn: like https://regex101.com/, but for perl 6. :)
19:01 jnthn lizmat: People don't expect asking if we're at the eof to block generally :)
19:01 rjt_pl jnthn: LMAO
19:01 lizmat http://perl5.to.perl6.org
19:02 [Coke] lizmat: http://sucks.perl6.org/
19:02 lizmat well, then we still have an issue though
19:02 FROGGS lizmat: I tried exactly that and failed... for parrot and jvm
19:02 spider-mario joined #perl6
19:02 [Coke] btw, it would be great if P6 regexes worked at the regex site. :)
19:03 lizmat FROGGS  :-(
19:03 lizmat ok, I will need to adapt (and slow down) the lines code
19:03 kanishka joined #perl6
19:04 lizmat *or* start slurping blocks and use Str.lines instead
19:04 dalek rakudo/rw-cleanup: ab042e1 | jnthn++ | src/core/ (24 files):
19:04 dalek rakudo/rw-cleanup: Cleanup of `is rw` usage on subs/methods.
19:04 dalek rakudo/rw-cleanup:
19:04 dalek rakudo/rw-cleanup: Most of them wanted to be "is raw".
19:04 dalek rakudo/rw-cleanup: Some didn't want anything at all.
19:04 dalek rakudo/rw-cleanup: In some places "rw" stayed.
19:04 dalek rakudo/rw-cleanup: Commit poem! Oh, LOL! Well played.
19:04 dalek rakudo/rw-cleanup: review: https://github.com/rakudo/rakudo/commit/ab042e1c90
19:06 telex joined #perl6
19:08 * FROGGS still wonders what the 'wt' is about in 'wtfisthis.perl6.org'
19:09 [Coke] RT: 1,015; GLR: 4; testneeded: 9; xmas: 98
19:09 [Coke] FROGGS: What the
19:09 * rjt_pl is reminded of the bash.org entry "What the f--- does WTF stand for?"
19:09 [Coke] WtfIsThis
19:09 dalek nqp: dadb7bc | jnthn++ | tools/build/MOAR_REVISION:
19:09 dalek nqp: Bump MOAR_REVISION for CCLASS_PRINTING fixes.
19:09 dalek nqp: review: https://github.com/perl6/nqp/commit/dadb7bc4bf
19:09 FROGGS [Coke]: well, then it might just me reading it as WtFistHis :P
19:09 * [Coke] can't tell if FROGGS was just trolling. :)
19:09 jnthn Woo, xmas is < 100 tickets away :)
19:10 simcop2387 joined #perl6
19:10 [Coke] jnthn: close 3, open 2.
19:11 vendethiel is raw = no container, that's it?
19:11 jnthn vendethiel: "is raw" means "exactly as it is"
19:11 FROGGS do not containerize on the way, do not decont on the way out
19:11 dalek rakudo/nom: 33afeb1 | jnthn++ | tools/build/NQP_REVISION:
19:11 dalek rakudo/nom: Bump NQP_REVISION for working <.print>.
19:11 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/33afeb15ca
19:12 FROGGS do not containerize on the way in, do not decont on the way out
19:12 jnthn Those bumps should fix the stdrules fails
19:13 larion joined #perl6
19:13 travis-ci joined #perl6
19:13 travis-ci NQP build passed. jnthn 'Bump MOAR_REVISION for CCLASS_PRINTING fixes.'
19:13 travis-ci https://travis-ci.org/perl6/nqp/builds/82025634 https://github.com/perl6/nqp/compare/cf7b3a1f3db3...dadb7bc4bf53
19:13 travis-ci left #perl6
19:13 skids joined #perl6
19:13 * TimToady is trying to figure out how to allow an attribute to default to Nil...
19:14 * FROGGS just implemented wantarray in nqp
19:15 lizmat TimToady: tried that before as well, to no avail
19:15 lizmat m: my Nil $a = 42;   # also doesn't work ?
19:15 camelia rakudo-moar 855512: OUTPUT«Type check failed in assignment to '$a'; expected 'Any' but got 'Int'␤  in block <unit> at /tmp/kPSMJ59OMk:1␤␤»
19:15 lizmat m: my $a is defauilt(Nil) = 42;   # also doesn't work ?
19:16 camelia rakudo-moar 855512: OUTPUT«5===SORRY!5=== Error while compiling /tmp/w0zHR5oTXY␤Can't use unknown trait 'is defauilt' in a variable declaration.␤at /tmp/w0zHR5oTXY:1␤------> 3my $a is defauilt(Nil)7⏏5 = 42;   # also doesn't work ?␤    expecting any of:␤        Ty…»
19:16 TimToady well, the Any comes from the .got attribute
19:16 lizmat m: my $a is default(Nil) = 42;   # also doesn't work ?
19:16 camelia rakudo-moar 855512: ( no output )
19:16 TimToady that works
19:16 TimToady but has $.got is default(Nil) doesn't
19:16 lizmat m: my $a is default(Nil); say $a
19:16 camelia rakudo-moar 855512: OUTPUT«Nil␤»
19:16 lizmat m: my $a is default(Nil); $a = 42; $a = Nil; say $a
19:16 camelia rakudo-moar 855512: OUTPUT«Nil␤»
19:16 lizmat *phew*
19:16 dalek roast: 485cfa4 | usev6++ | S06-multi/proto.t:
19:16 dalek roast: Replace some eval-dies-ok in S06-multi/proto.t with throws-like
19:16 dalek roast:
19:16 dalek roast: also remove duplicate test for RT #68242
19:16 dalek roast: review: https://github.com/perl6/roast/commit/485cfa467b
19:16 synbot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=68242
19:17 TimToady so we'd need a way to clone a default into the object's attribute
19:17 TimToady I thought someone had a branch to do something like that once
19:17 dalek rakudo/nom: f326ee5 | lizmat++ | src/core/IO/Handle.pm:
19:17 dalek rakudo/nom: Fix premature closing on pull-exactly
19:17 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/f326ee5b1d
19:17 lizmat not me
19:18 diana_olhovik joined #perl6
19:18 dalek roast: fc8cdc6 | lizmat++ | S16-io/lines.t:
19:18 dalek roast: Unfudge / fix lines slice test
19:18 dalek roast: review: https://github.com/perl6/roast/commit/fc8cdc6bf5
19:25 FROGGS is S32-num/power.t known to fail a test?
19:25 jnthn It does for me also
19:25 FROGGS k
19:26 FROGGS ENOTMYFAULT then
19:28 FROGGS and t/spec/S02-names-vars/perl.rakudo.moar hangs after test 77
19:28 jnthn I think that's a recently added test that wasn't fudged
19:28 * jnthn just got it also and looked into the log
19:30 lizmat FROGGS: doesn't hang for me, but has one test too few in the plan
19:31 FROGGS hmm
19:31 FROGGS it seem https://github.com/rakudo/rakudo/commit/397e221b4e205d0257ba2284f3792f07735c9c6d does not fix test 78
19:31 lizmat did for me..
19:32 lizmat 2015.09-112-gf326ee5 on 2015.09-35-gd15a446
19:32 dalek roast: 3f529a7 | FROGGS++ | S02-names-vars/perl.t:
19:32 dalek roast: change ok(Str) to pass(Str)
19:32 dalek roast: review: https://github.com/perl6/roast/commit/3f529a7b02
19:33 FROGGS lizmat: ohh, I might be behind...
19:33 lizmat no change for me, even with above fix
19:34 dalek roast: f8f05e7 | lizmat++ | S02-names-vars/perl.t:
19:34 dalek roast: Adjust plan
19:34 dalek roast: review: https://github.com/perl6/roast/commit/f8f05e7634
19:34 lizmat that file clean for me now
19:36 dalek nqp: ada83f2 | FROGGS++ | src/QRegex/P6Regex/ (2 files):
19:36 dalek nqp: implement wantarray, so /@<foo>=./ is about arrays
19:36 dalek nqp:
19:36 dalek nqp: Now $<foo> will contain an Array of Match objects, as if it had a quantifier
19:36 dalek nqp: applied on it. This is useful if you want to have consistant match structures
19:36 dalek nqp: for different inputs.
19:36 dalek nqp: review: https://github.com/perl6/nqp/commit/ada83f2089
19:37 dalek rakudo/nom: da382ed | FROGGS++ | tools/build/NQP_REVISION:
19:37 dalek rakudo/nom: bump nqp revision for /@<foo>=./ fix
19:37 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/da382ed30c
19:37 xfix joined #perl6
19:37 xfix joined #perl6
19:37 lizmat jnthn: I'm considering porting the code from Supply.lines to IO::Handle.lines
19:38 PerlJam FROGGS: you scared me there for a second with "implement wantarray"  :)
19:38 lizmat 2 reasons: it already supports a bare CR as eol
19:38 lizmat 2nd reason: implementing an arbitrary string as an EOL should be trivial
19:38 FROGGS PerlJam: that was my intention :o)
19:39 jnthn haha
19:39 jnthn FROGGS++
19:39 lizmat jnthn: disadvantage: mixing $handle.lines and $handle.getline/getc will give weird results
19:39 jnthn lizmat: Any downsides?
19:39 jnthn Oh...
19:39 jnthn Wait, what's .getline?
19:39 jnthn Or did you just mean .get?
19:39 lizmat oops, I meant: .get indeed
19:39 jnthn Oh
19:40 jnthn I'm...not sure we can do that...
19:40 jnthn As in, it'll almost certainly lead to problems
19:40 lizmat ok, the alternative would be that I put the buffer inside IO::Handle
19:40 jnthn But...
19:40 lizmat and make getc/get  work on that as well
19:40 jnthn We *already* have IO buffering in the VM
19:41 jnthn And it's not all that easy to get right
19:41 lizmat so far I seem to have got it right for Supply.lines
19:41 lizmat at least for supporting CR / LF / CRLF transparently
19:42 jnthn FROGGS: Didn't you at some point have a Moar branch for doing arbitrary line endings in I/O that we somehow forgot about?
19:42 FROGGS jnthn: aye
19:42 FROGGS jnthn: branch sepsis
19:43 lizmat oh, advantage for doing it in P6: a new VM doesn't need to support it  :-)
19:44 lizmat but anyways, I'll stop this line of thought for now
19:44 pink_mist is there any way to read from stdin in an async manner? react { whenever $*IN.asyncget { ... } }?
19:44 jnthn pink_mist: Not yet
19:44 pink_mist ah, bummer .. guess I gotta wait =)
19:44 jnthn (It's on my mental list of IO issues to worry about)
19:47 dalek rakudo/rw-cleanup: eacdc8d | jnthn++ | src/Perl6/Metamodel/BOOTSTRAP.nqp:
19:47 dalek rakudo/rw-cleanup: Only allow `is rw` on Scalar parameters.
19:47 dalek rakudo/rw-cleanup: review: https://github.com/rakudo/rakudo/commit/eacdc8de60
19:48 dnmfarrell hey jnthn, instead of async, is there a way to check if a socket will block before reading from it, like Perl 5's "select"?
19:48 jnthn dnmfarrell: No
19:48 dnmfarrell thanks for confirming
19:49 jnthn Well, you may be able to get the I/O descriptor and call the OS level select using native call, so technically there perhaps is "a way", but that's a bit roundabout :)
19:49 dnmfarrell aha, right. Well P5 socket functions do look ALOT like the C equivalents eh :)
19:49 jnthn Is there a reason you need to go that way over using the async socket stuff?
19:49 FROGGS m: my $foo; "foo" ~~ /$foo=./
19:49 camelia rakudo-moar 397e22: ( no output )
19:50 FROGGS m: my $foo; "foo" ~~ /$foo=./; say $foo
19:50 camelia rakudo-moar 397e22: OUTPUT«(Any)␤»
19:50 dalek roast: f6f656b | usev6++ | S06- (7 files):
19:50 dalek roast: Replace some eval-dies-ok in S06-* with throws-like
19:50 dalek roast: review: https://github.com/perl6/roast/commit/f6f656bdec
19:50 dnmfarrell I was thinking about multiplexers
19:51 lizmat_ joined #perl6
19:51 dalek roast: c90270e | jnthn++ | integration/advent2010-day11.t:
19:51 dalek roast: Remove an `is rw` on an @ parameter.
19:51 dalek roast: review: https://github.com/perl6/roast/commit/c90270ee71
19:52 jnthn ^^ was the only spectest that got unhappy with the banning of "is rw" in non-Scalar params, so hopefully there'll be equally little fallout elsewhere
19:53 pmurias joined #perl6
19:56 jnthn dnmfarrell: As in, dealing with hundreds/thousands of connections using just one/a handful of threads?
19:57 jnthn Or something more specific?
20:01 FROGGS m: my $foo; say "foo" ~~ /$<>=./;
20:01 camelia rakudo-moar da382e: OUTPUT«5===SORRY!5===␤Unrecognized regex metacharacter < (must be quoted to match literally)␤at /tmp/ag2VfPiMMM:1␤------> 3my $foo; say "foo" ~~ /$<7⏏5>=./;␤Unable to parse regex; couldn't find final '/'␤at /tmp/ag2VfPiMMM:1␤------> 3my $fo…»
20:03 jnthn Enough for today... Guess the rw-cleanup goes on tomorrow :)
20:04 lizmat_ joined #perl6
20:04 FROGGS jnthn: gnight
20:04 masak 'night, jnthn
20:05 lizmat_ gnight jnthn
20:05 pink_mist nn jnthn
20:09 sufrostico joined #perl6
20:16 dnmfarrell jnthn: I don't have a specific use-case, but yeah I was thinking about managing multiple sockets from a single thread. Nothing urgent or important, just curious. Good night!
20:22 tokuhiro_ joined #perl6
20:22 _dolmen_ joined #perl6
20:28 dalek roast: a851e2d | usev6++ | S06-signature/errors.t:
20:28 dalek roast: Fix test for RT #109064
20:28 dalek roast:
20:28 dalek roast: test died for the wrong reason (missing block)
20:28 dalek roast: review: https://github.com/perl6/roast/commit/a851e2d461
20:28 synbot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=109064
20:28 dalek roast: 8361bcd | usev6++ | S0 (4 files):
20:28 dalek roast: Replace some more eval-dies-ok with throws-like
20:28 dalek roast: review: https://github.com/perl6/roast/commit/8361bcd244
20:28 dalek roast: 8f437db | usev6++ | S05-metasyntax/changed.t:
20:28 dalek roast: Fix test for obsolete /m modifier
20:28 dalek roast:
20:28 dalek roast: test died for the wrong reason, m:m is very much alive
20:28 dalek roast: (see S05-modifier/ignoremark.t)
20:28 dalek roast: review: https://github.com/perl6/roast/commit/8f437dbccc
20:36 rindolf joined #perl6
20:39 * [Coke] opens tickets for 2 flapping tests.
20:41 lizmat which ones?
20:42 [Coke] S17-lowlevel/lock.t and S17-supply/watch-path.t
20:42 [Coke] die under high load often, but seem to always be fine when run standalone.
20:44 hoelzro lock.t is flapping again? =(
20:45 nine unfortunately
20:45 hoelzro [Coke]: does it segfault, or what's the error?
20:45 lizmat pretty sure it's timing in the test, though
20:46 lizmat for the watch-path case I'm pretty sure
20:46 lizmat the lock case, less so  :-)
20:47 [Coke] I already threw out the run.... one sec.
20:47 hoelzro iirc, the lock test had some funny business going on with join vs finish
20:51 [Coke] with TEST_JOBS=40, lock dies with: (Wstat: 6 Tests: 22 Failed: 0) Non-zero wait status: 6
20:51 [Coke] Parse errors: Bad plan.  You planned 23 tests but ran 22.
20:52 hoelzro oooh SIGABRT
20:52 hoelzro my favorite signal
20:52 hoelzro (not really)
20:52 hoelzro [Coke]: is that on hack? or locally?
21:02 [Coke] locally.
21:02 [Coke] the daily runs for hack are still one test at a time.
21:07 dalek roast: cfdc4ba | usev6++ | S05-metasyntax/ (3 files):
21:07 dalek roast: Replace some more eval-dies-ok with throws-like
21:07 dalek roast: review: https://github.com/perl6/roast/commit/cfdc4ba602
21:07 dalek roast: abae977 | usev6++ | S05-mass/rx.t:
21:07 dalek roast: Remove duplicate tests and use throws-like for unique tests
21:07 dalek roast:
21:07 dalek roast: looks like the duplicates resulted from commit a179684d
21:07 dalek roast: review: https://github.com/perl6/roast/commit/abae977e3f
21:09 lizmat my $h = open("file"); for $h.words { .say; last }; for $h.words { .say; last }  # can we expect this to work?
21:09 lizmat in the sense that if the file consisted of "one two", the second for would say "two"
21:13 hoelzro that seems like it should work to me
21:13 PerlJam lizmat: I would expect it to work.
21:13 lizmat PerlJam: but how?
21:14 lizmat note that these are 2 Seq
21:14 PerlJam magic :)
21:14 lizmat ah, ok
21:15 lizmat I'm inclined to disallow $handle.words for now, until we fix this
21:15 lizmat $file.IO.words is fine
21:15 hoelzro what about $h.lines?
21:15 hoelzro same idea, right?
21:15 hoelzro would you remove that too?
21:15 lizmat that's fine too: the current line pointer matches the file pointer
21:15 lizmat .words reads in 64K batches
21:16 masak to be honest, I wouldn't expect .words on a file handle in the first place.
21:16 lizmat indeed, my point  :-)
21:16 masak I can understand reading bytes/characters/lines from a file handle.
21:16 masak words? not so much.
21:17 PerlJam masak: just think of .words like .lines where the eol char is a space :)
21:17 masak *if* we supported it, then I'd expect the second for loop to say "two" (through magic or whatever)
21:17 masak PerlJam: :P
21:17 masak PerlJam: well, except that's not true either. because that'd return an empty word for "foo  bar"
21:18 PerlJam details, details.
21:18 lizmat ??? masak: you mean "foo bar" being 1 word ??
21:19 masak no, I mean I put in two spaces between the two words, which (under PerlJam's rule) would come out as a middle empty word
21:19 masak second way it wouldn't work: "\t" is whitespace, but would count as part of a word if we just have eol=" "
21:20 lizmat well, if PerlJam thinks about it as the eol being \s+ , then he'd be right  :-)
21:20 masak aye.
21:20 masak that presupposes eol being able to be a regex, tho' :)
21:21 PerlJam These are the types of features that Perl is known for.
21:21 * masak .oO( eol = / <?after "line break, and I mean it"> n / )
21:22 masak PerlJam: ok, given eol = /\s+/, and given that such a feature exists, I agree with you.
21:23 PerlJam lizmat: so ... your inclination to disallow it for now sounds right.   It's not something we really need for 6.christmas though it would be nice to have eventually.
21:24 TimToady joined #perl6
21:26 masak +1
21:29 dalek rakudo/nom: 26cf7ae | lizmat++ | src/core/IO/Handle.pm:
21:29 dalek rakudo/nom: Make $handle.words(:!close) a NYI for now
21:29 dalek rakudo/nom:
21:29 dalek rakudo/nom: See http://irclog.perlgeek.de/perl6/2015-09-24#i_11271535
21:29 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/26cf7ae0bc
21:30 dalek roast: ef0b15f | usev6++ | S05-mass/rx.t:
21:30 dalek roast: Replace more eval-dies-ok with throws-like
21:30 dalek roast:
21:30 dalek roast: also remove two more duplicate tests
21:30 dalek roast: review: https://github.com/perl6/roast/commit/ef0b15f19d
21:31 dnmfarrell "6mas" heh
21:41 skids .oO(is RT#123766 the "fixmas list" then?)
21:41 synbot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=123766
21:42 [Sno] joined #perl6
21:44 [Coke] Util++ is going to check out the parrot-nqp failures.
21:44 [Coke] skids++
21:44 dalek roast: 5bb81e8 | lizmat++ | S16-io/words.t:
21:44 dalek roast: First stab at IO::Handle.words tests
21:44 dalek roast: review: https://github.com/perl6/roast/commit/5bb81e8e80
21:45 dalek rakudo/nom: 4653d98 | lizmat++ | t/spectest.data:
21:45 dalek rakudo/nom: Add IO::Handle.words tests
21:45 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4653d987ff
21:51 * leont is trying to detect double entries in a list of pairs (before making a hash out of it).
21:51 leont Is @pairs.classify(*.key).grep(*.value.elems > 1).map(*.key) a sensible way to do that?
21:51 masak looks like.
21:52 lizmat leont: so you're not interested in unique pairs, but the ones that are seen more than once?
21:52 leont Yes
21:53 leont It's an error condition in my case
21:53 lizmat feels like a flag to .unique should to the trick  ;-)
21:53 lizmat or maybe a not-unique ?
21:54 masak this also works:
21:54 masak m: my @a = foo => 1, bar => 2, foo => 3; say so any((my %).push(@a).values) ~~ Array
21:54 camelia rakudo-moar 26cf7a: OUTPUT«True␤»
21:54 masak but I guess it's a bit risky if you actually have Array values in your pairs.
21:54 patrickz What happened to zef? Last commit looks like lots of frustration...
21:54 yoleaux 11:46Z <jdv79> patrickz: i am slowly working on cpan stuff
21:54 yoleaux 11:52Z <jdv79> patrickz: and it may be "done" by xmas, btw
21:55 patrickz jdv79++ (persistence on CPAN work)
21:55 masak lizmat: definitely not a flag on .unique ;)
21:55 lizmat masak: yeah, I realised that too
21:56 masak and .not-unique sounds like a not-optimal name... hm.
21:56 masak something like .repeats
21:56 leont A way to count may be more general purpose
21:56 masak oh! Bag!
21:56 masak we have this already.
21:56 lizmat leont: indeed, that's a bag
21:56 masak leont++ # jogging my brain into the right direction
21:56 masak yeah, we should work at making all possible coerces work right, and then all this'll fall out
21:57 masak m: my @a = foo => 1, bar => 2, foo => 3; say so any(@a>>.key.Bag.values) > 1
21:57 camelia rakudo-moar 26cf7a: OUTPUT«True␤»
21:57 leont I hadn't thought of a bag, but that kind of makes sense
21:57 masak leont: ^ shorter solution, using Bag
21:58 masak note >>.key -- because .keys would get me the indices of @a (0 1 2), whereas I want the keys of the element pairs.
21:59 thou joined #perl6
22:00 lizmat leont: would a => "foo" and a => "bar" be the same in this scheme, or not ?
22:01 leont Yes, it's about the keys not the values
22:01 lizmat aka, is the key what determines repeats, or the whole pair ?
22:01 leont fg
22:01 lizmat then a bag is not what you want
22:01 abaugher joined #perl6
22:02 lizmat something like .repeat(:as(*.key)) might
22:02 masak a Bag is still what you want, if you do the pre-filtering on keys as I did above.
22:03 lizmat do you need to know the values of the repeat keys ?
22:03 ShimmerFairy masak's bag solution only considers the keys
22:03 masak and if we do get an opposite of .unique in the core, then I would prefer the name ".repeats" (which is clearly noun-y) over ".repeat" (which sounds more like an instruction)
22:04 masak but maybe ++TimToady would like to weigh in on the naming.
22:04 ShimmerFairy masak: I'd suggest  .dups  , though considering how insistent everyone was on renaming  .uniq  for some reason... :P
22:04 masak maybe we'll end up with ".reps" or something :)
22:04 masak ShimmerFairy: I'd be fine with ".dups", too.
22:04 masak or maybe it Huffman-deserves the longer ".duplicates"
22:04 lizmat implementation wise it would be a cat license of .unique
22:05 lizmat *cat license job
22:05 masak figure/ground, yes
22:05 ShimmerFairy (and yes, fwiw I don't think the reasoning behind .uniq -> .unique is _that_ strong for the renaming)
22:05 leont Current solution is @pairs».key.Bag.grep(*.value > 1)».key;
22:05 masak lizmat: much like .split and .comb, which are two different methods
22:05 masak leont: ah, you were interested in which ones, too? cool.
22:06 ShimmerFairy cat license?
22:06 leont Being able to give helpful error messages is always a good thing
22:06 lizmat ShimmerFairy: https://www.youtube.com/watch?v=pnq96W9jtuw
22:07 ShimmerFairy ah :)
22:08 masak ShimmerFairy: frankly, I think the reason ".grep" as a name has survived as far as it has in Perl is that it got entrenched early and Perl people kind of like the quirkiness of it. objectively, either ".filter" or ".retain" are more at-sight self-explanatory.
22:09 ShimmerFairy masak: for .uniq, I don't think I ever thought of the unix tool (unlike .grep), I just thought it was a really clever way to "de-French" the spelling a bit, as it were :P
22:10 AlexDaniel joined #perl6
22:10 masak ShimmerFairy: ".grep" is up to 75% wrong as a description. it doesn't print the result ("p") and it's only occasionally a regex ("re") you'd use as a matcher. it does globally ("g") treat the whole input, though.
22:12 ShimmerFairy masak: then we clearly need to figure out what to put in place of "re" and "p" :P  .oO(Globally match against SOmething and Return the list -- .gsor ? :P)
22:12 * pink_mist always thought of it as a https://sv.wikipedia.org/wiki/Grep ... which can be used to get things out of haystacks
22:12 * leont was surprised by Bag.grep returning a Seq, though it's kind of making sense
22:12 lizmat m: 1.grep.WHAT>say
22:12 camelia rakudo-moar 26cf7a: OUTPUT«5===SORRY!5===␤Argument to "say" seems to be malformed␤at /tmp/yoHokbb9n1:1␤------> 1.grep.WHAT>say7⏏5<EOL>␤Other potential difficulties:␤    Unsupported use of bare "say"; in Perl 6 please use .say if you meant $_, or use an explicit…»
22:12 lizmat m: 1.grep.WHAT.say
22:12 camelia rakudo-moar 26cf7a: OUTPUT«Cannot call grep(Int: ); none of these signatures match:␤    ($: Bool:D $t, *%_)␤    ($: Regex:D $test, *%_)␤    ($: $test, *%_)␤    ($: Mu $test, *%_)␤  in block <unit> at /tmp/9BKSomrinK:1␤␤»
22:12 lizmat m: (1).grep.WHAT.say
22:12 camelia rakudo-moar 26cf7a: OUTPUT«Cannot call grep(Int: ); none of these signatures match:␤    ($: Bool:D $t, *%_)␤    ($: Regex:D $test, *%_)␤    ($: $test, *%_)␤    ($: Mu $test, *%_)␤  in block <unit> at /tmp/DeD_qXiXET:1␤␤»
22:13 lizmat m: (1,).grep.WHAT.say  # grrr
22:13 camelia rakudo-moar 26cf7a: OUTPUT«Cannot call grep(List: ); none of these signatures match:␤    ($: Bool:D $t, *%_)␤    ($: Regex:D $test, *%_)␤    ($: $test, *%_)␤    ($: Mu $test, *%_)␤  in block <unit> at /tmp/aGqP7t4Dgs:1␤␤»
22:13 leont m: (1,).grep(* ==1).WHAT.say
22:13 camelia rakudo-moar 26cf7a: OUTPUT«(Seq)␤»
22:13 lizmat m: 1.grep(*>1).WHAT.say
22:13 camelia rakudo-moar 26cf7a: OUTPUT«(Seq)␤»
22:13 lizmat there you go  :-)
22:14 masak leont: all of the key/value data types pretend to be lists of pairs when you want to do something as iterative/sequential as .grep on them
22:16 masak leont: and, dually, a sequential type starts talking about its numerical indices if you ask it about its keys.
22:16 masak it's all quite nice and consistent :)
22:16 leont It is consistent, I'm not saying it's wrong, it's just that I had to readjust my expectations
22:16 lizmat sleep&
22:19 masak though sometimes, as in the above @pairs».key.Bag.grep(*.value > 1)».key, I feel important implicit information is getting carried in key/value combinations, and it feels a bit, hm, "poor-man's" to be doing it that way.
22:19 masak I sometimes feel the same way about the Swartzian transform.
22:19 masak and also about people abusing complex numbers as poor-man's pairs.
22:20 masak the problem specification, "all the duplicate keys in this array of pairs", does mention keys but doesn't do the dance with filtering on values and then extracting on keys.
22:21 masak so it feels like there's something inessential introduced in the solution, short as it may be.
22:24 tokuhiro_ joined #perl6
22:28 masak 'night, #perl6
22:45 kid51 joined #perl6
22:49 rurban joined #perl6
23:01 adu joined #perl6
23:07 rurban joined #perl6
23:10 DarthGandalf joined #perl6
23:12 raiph joined #perl6
23:14 japhb m: my @p = foo => 6, bar => 8, foo => 7; @p».key.Bag».pred.Bag.keys
23:14 camelia rakudo-moar 4653d9: ( no output )
23:14 japhb m: my @p = foo => 6, bar => 8, foo => 7; @p».key.Bag».pred.Bag.keys.say
23:14 camelia rakudo-moar 4653d9: OUTPUT«(foo)␤»
23:14 japhb No grep needed.  :-)
23:17 joshin_ joined #perl6
23:18 BenGoldberg joined #perl6
23:25 tokuhiro_ joined #perl6
23:48 thou joined #perl6
23:59 khw joined #perl6

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

Perl 6 | Reference Documentation | Rakudo