»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by masak on 12 May 2015.
pink_mist I'm unsure how to get async access to stdin though :/ 00:07
dalek ast: 673167c | skids++ | S13-overloading/typecasting-long.t:
Add tests (with 2 fudges) for RT#114026 (aka RT#115850 aka RT#112642)
00:08
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=114026
00:16 laouji joined 00:17 yqt left
BenGoldberg Why does class Any posses 'sub exit' ? Is this really the best place for it? 00:32
00:32 mathw left 00:34 mathw joined, esh joined, Gruber joined, Grrrr left 00:36 rurban left 00:39 laouji left, laouji joined 00:41 dnmfarrell left 00:44 laouji left 00:46 laouji joined 00:47 schmoost1r joined 00:50 CurtisPoe left 00:53 jsimonet left, telex left
dalek osystem/multipart-parser: d15d490 | (Tokuhiro Matsuno)++ | META.list:
Add HTTP::MultiPartParser
00:54
00:54 telex joined
dalek osystem: d15d490 | (Tokuhiro Matsuno)++ | META.list:
Add HTTP::MultiPartParser
00:56
osystem: bb40224 | colomon++ | META.list:
Merge pull request #59 from perl6/multipart-parser

Add HTTP::MultiPartParser
00:57 CurtisOvidPoe joined 01:01 thou joined, mattprelude left 01:02 colomon left, colomon joined 01:04 jsimonet joined, jack_rabbit_ joined 01:07 kanishka joined
dalek kudo-star-daily: 9a0791f | coke++ | log/ (9 files):
today (automated commit)
01:08
01:09 thou left 01:11 jack_rabbit_ left 01:15 jack_rabbit_ joined 01:20 _28_ria left, jack_rabbit_ left 01:23 rurban joined 01:33 rurban left 01:38 kid51 left 01:44 noganex left 01:46 aborazmeh joined, aborazmeh left, aborazmeh joined 01:50 noganex joined 01:51 adu joined, noganex left 01:52 noganex joined 01:53 rurban joined 02:10 noganex left 02:13 noganex joined 02:15 zakharyas joined 02:31 kanishka left, tokuhiro_ joined 02:43 noganex_ joined 02:45 noganex left
tokuhiro_ m: "".split(/\n/) 02:51
camelia ( no output )
tokuhiro_ m: "".split(/\n/).perl.say 02:52
camelia rakudo-moar 88c191: OUTPUT«("",).Seq␤»
tokuhiro_ hm. this behaviour cause `for $str.split(/\n/) { .say }` prints empty line when $str is empty string. 02:56
03:02 kaare_ joined 03:17 rurban left 03:31 BenGoldberg left 03:37 baest_ joined 03:39 baest left 03:40 fling joined 04:15 rindolf joined 04:26 rjattrill joined, rmgk_ joined, rmgk left, rmgk_ is now known as rmgk 04:45 khw left 04:48 [Sno] left 04:53 adu left 05:12 jack_rabbit_ joined 05:16 cognominal joined 05:19 aborazmeh left 05:23 baest_ is now known as baest 05:25 sivoais joined 05:30 chenryn joined 05:33 Ven joined, sivoais left 05:34 Ven left 05:35 sivoais joined 05:36 aborazmeh joined, aborazmeh left, aborazmeh joined 05:42 sivoais left 05:45 sivoais joined 05:53 skids left 05:54 adu joined 05:59 araujo_ left 06:01 araujo joined, araujo left 06:02 araujo joined 06:04 araujo left 06:05 araujo joined 06:07 araujo left 06:08 araujo joined, makapa joined 06:10 araujo left, diana_olhovik joined 06:11 araujo joined, [Sno] joined 06:13 araujo left 06:14 araujo joined, FROGGS[mobile] joined
FROGGS[mobile] I know why that happens 06:14
it used to return Nil pre-GLR 06:15
06:15 makapa left
FROGGS[mobile] I made it to return an empty list 06:15
perhaps it should return Empty?
but, hmmm, maybe it wasnt me, I patched the Str matcher case I think 06:17
pro tip: change and spectest it 06:18
ShimmerFairy m: say "foobar".split("\n").perl 06:20
camelia rakudo-moar 88c191: OUTPUT«("foobar",).Seq␤»
TimToady '' seems like a pretty good result
ShimmerFairy FROGGS[mobile]: fwiw I think returning a one-element list of the whole string in this case is reasonable
06:21 aborazmeh left
FROGGS[mobile] okay :o) 06:21
dalek kudo/nom: 9257a86 | TimToady++ | src/core/ (2 files):
redo is-lazy on zips and crosses, more one-arging

Turns out zip should set is-lazy only if *all* it's inputs are lazy.
  (Otherwise it's finite, limited to the shortest list.) Unlike zip,
roundrobin should run till all sources are exhausted, so any lazy source propagates as a lazy result.
kudo/nom: f89dc23 | TimToady++ | src/core/List.pm:
can now use multis to distinguish zip/cross-with
ast: a4e24d2 | TimToady++ | S0 (3 files):
more GLRious tests for X and Z lazy propagation
06:22
[Tux] test 50000 35.240 35.139 06:23
test-t 50000 35.534 35.432
nine nine@sphinx:~> perl -E 'for my $line (split /\n/, "") { say "line: $line"; }'
nine@sphinx:~> perl -E 'for my $line (split /\n/, "foo") { say "line: $line"; }'
line: foo
Perl 5 seems to special case the empty string there. Wonder about the reasoning behind this.
06:25 aiacob joined
nine Python's split returns [''] 06:26
06:35 domidumont joined 06:36 FROGGS joined 06:37 FROGGS[mobile] left 06:39 domidumont left 06:40 domidumont joined
moritz nine: perl 5's split removes empty, trailing strings 06:46
nine: unless you explicit specify a limit of -1 or so 06:47
nine: perl 6's split is not supposed to do that
FROGGS say join ",", split "\n", "foo\n\n" # P5: "foo", P6: "foo,," - I like P6's output better 06:50
06:50 Ven joined
FROGGS I can suppress empty string on my own, thanks 06:50
strings*
06:51 RabidGravy joined
Ven TimToady++ # laziness greatness :D 06:57
07:05 abraxxa joined 07:10 adu left 07:12 Ven left 07:13 vytas left 07:17 Ven joined, vytas joined
tokuhiro_ i see. i understood a behaviour, thanks! 07:17
07:18 xinming left, Ven left 07:22 Ven joined 07:25 larion left 07:30 kanishka joined
dalek ast: 4ec6f97 | TimToady++ | S04-statements/for.t:
unfudge passing test on optional param
07:32
ast: 73db4fc | TimToady++ | S04-statements/gather.t:
self-ref inside gather seems to be GLR-proof now
07:32 [Sno] left 07:33 [Sno] joined 07:42 pdcawley joined 07:45 xinming joined 07:46 brrt joined
brrt \o #perl6 07:46
i have a challenge for you
lizmat good *, #perl6 07:47
brrt o/
brrt based on the fact that the panda jit bug only appeared in conjunction with inlining
07:47 Ven left
brrt and that there are actually not that many spaces where inlining interacts with the jit 07:47
i now hypothesize that this problem comes from a mis-caught exception of sorts
so my question is if anybody can help me golf this down 07:48
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
actually, now that i think of it
that's a pretty decent template for any jit test
07:50 Ven joined, ][Sno][ joined
brrt just have 'm say ok in a loop, and plan up to $loop-idx number of tests 07:51
nb: the problem may also lie in 'lexotic' exceptions and control exceptions 07:53
07:53 [Sno] left 07:54 adu joined 08:02 dakkar joined, xinming left 08:09 darutoko joined
lizmat brrt: sorry, was afk for a bit 08:20
08:21 Ven left
lizmat and am about to be more afk for a few hours 08:21
meanwhile, S04-statements/gather.t hangs for me in test 29
08:22 Ven joined
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␤»
lizmat m: my $cat; my @a := gather for 1..3 { take $_; $cat ~= ~@a }.list; +@a
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␤»
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 08:28 Ven left 08:37 Ven joined 08:41 luiz_lha left 08:42 luiz_lha joined, luiz_lha is now known as Guest1829
brrt np lizmat :-) 08:44
maybe jnthn has some ideas about this. iirc he handled this case some time ago 08:45
but there may be something that has been missed
for one thing, i do collect inline information in the jit, and then proceed not to use it
08:47 xfix joined 08:49 Ven left 08:51 Ven joined 08:52 larion joined 08:58 adu left 09:01 mattprelude joined
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?
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
23 Sep 2015 21:09Z <lizmat> jnthn: thinking about something like class A is reaped {} to make objects run their DESTROY at global destruction
brrt no, it's not a golf, it is a hypothesis :-) 09:07
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.
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 ;)
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:14 eternaleye left
jnthn Well, EXPORTHOW::COMPOSE was one of my creations :) 09:16
And I only tend to put stuff into the design docs that I already figured how to implement :)
brrt: So the best reproduction technique is still "try to build/use panda"? 09:17
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:18
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:24
ShimmerFairy
.oO(We need to compose various ideas about the phaser into a coherent design, but we don't have the phaser...)
09:25
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?
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.
brrt aye :-( 09:29
brrt is sorry about that 09:30
ShimmerFairy After all, there are those aforementioned ^parameterize methods that do just what I mentioned :)
09:30 telex left
jnthn brrt: So here, panda's bootstrap.pl ran to completion 09:32
09:32 telex joined
jnthn brrt: Do I have to try installing something? 09:32
brrt i think timotimo has put in a temporary fix?
jnthn Oh
brrt lemecheck
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
jnthn reverted it
...and it still bootstraps
brrt what
you have to be... 09:34
:-(
this on windows?
jnthn ah, but panda install Grammar::Debugger dies with
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
That's the error, yes?
09:35 xinming joined
jnthn OK, and it goes away with JIT disabled *or* inline disabled. 09:37
09:38 jack_rabbit_ left
jnthn So, it is reproducable for me also. 09:38
That means we can rule out platform specific JIT oddness, at least... :)
Nearly everything that gets inlined is part of the compiler, it seems... 09:41
09:41 helloworldlang joined
helloworldlang p6: say 3; 09:42
camelia rakudo-moar f89dc2: OUTPUT«3␤»
helloworldlang p6: say $*PERL;
camelia rakudo-moar f89dc2: OUTPUT«Perl 6 (6.Advent)␤»
helloworldlang p6: dd $*PERL;
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…»
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 Ven left
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␤␤»
helloworldlang p6: dir;
camelia ( no output )
helloworldlang p6: Nil;
camelia ( no output )
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␤␤»
helloworldlang p6: loop { say 123 }; 09:47
p6: say 123;
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
rakudo-moar f89dc2: OUTPUT«123␤»
helloworldlang p6: say 123;
camelia rakudo-moar f89dc2: OUTPUT«123␤»
helloworldlang p6: loop { say 123 };
p6: say 123;
FROGGS helloworldlang: the output won't change if you do it again fwiw
sergot :)
camelia will be angry
tho
FROGGS she's a bot, she won't be angry 09:49
brrt aye jnthn, that's the error
sergot I know, just kidding :)))
FROGGS :o)
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…»
rakudo-moar f89dc2: OUTPUT«123␤»
sergot helloworldlang: who are you? :) 09:50
helloworldlang p6: use JSON::Tiny
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…»
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␤»
psch oh
$/ isn't populated correctly
09:52 kanishka left 09:54 TEttinger left
dakkar FROGGS: I was looking at your LibXML bindings… when do you free memory? 09:56
FROGGS dakkar: I don't.... yet... 09:57
dakkar ah, that's why I couldn't find it :)
FROGGS :o)
dakkar I would have thought to call the xmlFree* functions in a submethod DESTROY, but: 09:58
- destroy may or may not be called, and I'm not clear on when
FROGGS aye
dakkar - free-ing a node returned by .find is almost certainly wrong, because the document still owns it 09:59
so, navigation/find methods have to return objects that let Perl know that they shouldn't be destroyed yet
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)
FROGGS which may or may not work out well
dakkar yes, but if you return copies, mutating methods won't have any useful effect on them
$doc.find($some_xpath).set-attribute(...)
nice no-op you haev there :)
FROGGS yeah
10:00 helloworldlang left 10:01 larion left, Ven joined 10:02 larion joined
FROGGS dakkar: if you don't get near a solution, perhaps add a test as a reminder? 10:03
10:03 brrt left
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
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*
FROGGS jnthn: that should work
dakkar a document owns nodes; but nodes can be moved between documents
also, nodes can belong to fragments 10:06
FROGGS a node has a doc attribute where we could stick the doc object in
after a little refactoring
oh
dakkar mutable data structures are *messy* 10:07
10:08 g4 joined
dakkar jnthn: how would one test object destruction? 10:12
jnthn dakkar: If I really wanted to test what my DESTROY method did, I'd just call it 10:15
(in the test)
dakkar oh, right, submethods are visible, just not inherited; I get confused with subs in classes
jnthn Trying to "make" the GC trigger it is going to be very fraught
10:16 Ven left
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?)
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?
jnthn using (acquire resource) { ...use in scope... } // .Dispose() called at scope exit
dakkar that still leaks implementation details… 10:18
jnthn Well, it relies on objects implementing a particular interface, whereas "will leave" makes you specify the method to call on leaving
dakkar it requires the caller to know that the object requires disposing
which is, in many cases, not something the caller should care about 10:19
(native objects, caches that need saving, internal sockets that need notifying…)
lizmat messages?
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
lizmat jnthn: maybe the wording of COMPOSE is wrong 10:20
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
lizmat: "into the namesapce of a class" is kinda meaningless...
lizmat: If you want to have "is foo" add an action to do at composition time, that's already possible today 10:22
10:22 aiacob left
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
jnthn: do you have an example of that?
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 :-)
jnthn is, meanwhile, trying to chase the inlining+JIT panda issue down 10:24
It's as hard as everyone else's failed attempts suggest :/
Simply removing the "return" statement and having it be an implicit return makes things work, for example 10:25
10:35 espadrine_ joined 10:36 espadrine_ is now known as espadrine
psch 3 files with StackOverflowError, one OutOfMemoryError, and three with NullPointerException... 10:38
so the other 43 failing test files are apparently failing a bit higher than the jvm
...i also got failures in baghash.t 10:44
tests 121 and 122, which is lines 259 and 260 i think
and i kind of want to doubt the tests... 10:45
10:47 FROGGS_ joined, FROGGS left
psch eh, it's consistent, so i guess i'm just misunderstanding statistics 10:47
10:50 FROGGS_ is now known as FROGGS 10:52 wollmers joined
wollmers m: my uint64 $z = +^0;say sprintf("%064b",$z); 10:52
camelia rakudo-moar f89dc2: OUTPUT«00000000000000000000000000000000000000000000000000000000000000-1␤»
psch oh, just didn't look closely enough, it's something about roll(*) actually
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"]␤»
..rakudo-moar f89dc2: OUTPUT«["a", "b", "a", "b", "a"]␤»
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␤»
Zefram_Fysh m: say Mu.new ~~ Mu # is it intentional that this ACCEPTS method is limited to Any on the lhs?
camelia rakudo-moar f89dc2: OUTPUT«X::Multi::NoMatch exception produced no message␤ in block <unit> at /tmp/nTdpZm8cal:1␤␤»
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:55
camelia rakudo-moar f89dc2: OUTPUT«1␤1␤1␤Ḍ̇␤»
psch m: say Any ~~ Mu 10:56
camelia rakudo-moar f89dc2: OUTPUT«True␤»
wollmers m: my Uint64 $z = +^0;say sprintf("%064b",$z);
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␤------> …»
Zefram_Fysh m: say Any.new ~~ Mu
camelia rakudo-moar f89dc2: OUTPUT«True␤»
Zefram_Fysh m: say Mu ~~ Mu
camelia rakudo-moar f89dc2: OUTPUT«True␤»
psch Zefram_Fysh: no, it should dispatch to Mu.ACCEPTS(Mu \topic)
Zefram_Fysh: but i suspect the topicalization messes that up 10:57
Zefram_Fysh it's actually multi method ACCEPTS(Mu:U: Any \topic)
psch yeah, i shorthanded it :)
Zefram_Fysh but the class ~~ class case is multi method ACCEPTS(Mu:U: Mu:U \topic)
psch i also saw the .new
jnthn m: say any(1, 2, 3) ~~ 3
camelia rakudo-moar f89dc2: OUTPUT«any(False, False, True)␤»
jnthn If you make it accept Mu, that wouldn't work out
psch *Mu.new 10:58
m: say Mu.new.defined
camelia rakudo-moar f89dc2: OUTPUT«True␤»
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... :)
jnthn ShimmerFairy: The point of Junction !~~ Any is precisely to avoid special cases for it all over the palce. 10:59
*place
11:00 FROGGS left
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␤---…»
wollmers m: my uint64 $z = 0 +| (1 +< 63);say sprintf("%064b",$z);
camelia rakudo-moar f89dc2: OUTPUT«-1000000000000000000000000000000000000000000000000000000000000000␤»
11:01 aiacob joined
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:01
wollmers m: my uint64 $z = 0 +| (1 +< 62);say sprintf("%064b",$z); 11:02
camelia rakudo-moar f89dc2: OUTPUT«0100000000000000000000000000000000000000000000000000000000000000␤»
jnthn ShimmerFairy: Yes, there's a reason Any is the default base class :) 11:04
11:04 AlexDaniel joined
wollmers m: my uint64 $z = 0 +| (1 +< 63);say sprintf("%064b",$z);say $z; 11:04
camelia rakudo-moar f89dc2: OUTPUT«-1000000000000000000000000000000000000000000000000000000000000000␤-9223372036854775808␤»
wollmers m: my uint64 $z = 0 +| (1 +< 62);say sprintf("%064b",$z);say $z; 11:05
camelia rakudo-moar f89dc2: OUTPUT«0100000000000000000000000000000000000000000000000000000000000000␤4611686018427387904␤»
wollmers m: my uint64 $z = 0 +| (1 +< 62);say sprintf("%064b",$z);say $z;say ($z > 0);
camelia rakudo-moar f89dc2: OUTPUT«0100000000000000000000000000000000000000000000000000000000000000␤4611686018427387904␤True␤»
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␤»
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␤»
wollmers Hmm ... where can I submit a bug? 11:08
m: my uint64 $z = +^0;say sprintf("%064b",$z);say $z;say ($z > 0);say $z.lsb,' ',$z.msb; 11:10
camelia rakudo-moar f89dc2: OUTPUT«00000000000000000000000000000000000000000000000000000000000000-1␤-1␤False␤0 0␤»
11:11 brrt joined
wollmers uint64 does not behave unsigned 11:12
Zefram_Fysh wollmers: [email@hidden.address]
jnthn wollmers: If it's not already in RT (rt.perl.org/rt3/) then by sending mail to [email@hidden.address] and put [BUG] at the start
wollmers: Yeah, it's not really implemented yet
wollmers: I think the only places that really pay attention to it are native calls
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
camelia rakudo-moar f89dc2: OUTPUT«0-1␤»
wollmers jnthn: then bitops would not work correctly
11:29 pmurias joined 11:34 rurban joined 11:38 Ven joined
brrt what's the current 'best' perl6 syntax-highlighting mode for emacs? 11:38
pmurias has anyone tried making an editor syntax-highlight with an actual Perl 6 grammar? 11:43
moritz brrt: when you find out, please document in on github.com/perl6/faq 11:44
brrt moritz: i find this github.com/hinrik/perl6-mode
moritz pmurias: iirc azawawi did that with STD.pm6
brrt: since hinrik also maintains the vim perl6 plugin, it sounds like a good place to start
jdv79 .tell patrickz i am slowly working on cpan stuff 11:46
yoleaux jdv79: I'll pass your message to patrickz.
11:46 chenryn left 11:47 Guest1829 is now known as luiz_lha
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:…»
jnthn m: class C { has $.a; has $.b; }; sub foo() { return C.new(a => 1, b => 2) }; for ^100 { foo }
camelia ( no output )
jnthn m: class C { has $.a; has $.b; }; sub foo() { return C.new(a => 1, b => 2) }; for ^1000 { foo }
camelia ( no output )
11:49 rjattrill left
jnthn m: class C { has $.a; has $.b; }; sub foo() { return C.new(a => 1, b => 2) }; for ^2000 { foo } 11:49
camelia ( no output )
jdv79 and it may be "done" by xmas, btw. 11:51
.tell patrickz and it may be "done" by xmas, btw 11:52
yoleaux jdv79: I'll pass your message to patrickz.
dalek pan style="color: #395be5">perl6-examples: 6ee4669 | (Steve Mynott)++ | categories/ (3 files):
GLR fixes such that prob009-gerdr-feeds.pl, sseq-grondilu.pl and subs-grondilu.pl pass
11:53
[Coke] RT: 1,020: [GLR] - 4; testneeded - 9; xmas: 103
[Coke] ponders adding: masak: 217 there. :P 11:56
moritz so few? :-) 11:59
12:00 hernanGOA joined
[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, Ven left
[Coke] ^^ RT #124568, looks like it needs adjusting post GLR. 12:03
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=124568
[Coke] at some point, that was expected to leave a gap in the resulting list.
lizmat jnthn: is it correct that nqp::readlinefh only supports LF and CRLF, but no bare CR ?
12:04 chenryn left
jdv79 [Coke]: i am doing metacpan atm 12:12
jdv79 just finished backlogging 12:13
since when does a long distance train not have outlets:(
moritz old trains don't 12:14
and sometimes they are well hidden
(at least in .de)
12:14 hernanGOA left 12:15 hernanGOA joined
jdv79 im on a munich to berlin so maybe ill hunt around 12:16
brrt in .nl, trains don't have outlets, period 12:18
[Coke] jdv79++
brrt in fact, in .nl, the catering guys rent powerpacks (batteries) for recharging your iDevice
El_Che brrt: there are no long distances in .nl :)
[Coke] even the old crappy line between NYC and albany has power! ;)
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)
RabidGravy the London suburban trains have power sockets which are intended for the cleaners, sometimes they leave them on and sometimes not.
just behind the partition between the doors and the seats 12:20
Zefram_Fysh www.techtimes.com/articles/68594/20...ricity.htm 12:26
_itz I think that was a case of someone who was told not to plug in getting stroppy 12:27
brrt lizmat: i've never seen it. but i never travel first class 12:28
lizmat it was one of my prerequisites :-) 12:29
to allow me to work on the train
(2h45m commute either way)
pink_mist most trains here in sweden have power outlets by every seat afaik ... unless it's an older train
brrt hmmm.... i should get myself into a position wherein i can prerequisite things like that 12:30
[Coke] m: leave;
camelia rakudo-moar f89dc2: OUTPUT«leave not yet implemented. Sorry. ␤ in block <unit> at /tmp/0UIA7hoZJ3:1␤␤»
brrt travelling without a power plug is an interesting experience
dalek pan style="color: #395be5">perl6-examples: 6503bbe | (Steve Mynott)++ | categories/rosalind/ (3 files):
GLR fixes for cons-grondilu.pl, itwv-grondilu.pl and mprt-grondilu.pl
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)
_itz I was confused by the Swiss sockets and had a special stack of UK -> Europe -> Swiss converters 12:31
12:31 abraxxa left, abraxxa joined
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 :)
[Coke] m: { LEAVE { say 1 } ; say 2} ; 12:37
camelia rakudo-moar f89dc2: OUTPUT«2␤1␤»
[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:38
12:40 abraxxa left, abraxxa joined
lizmat [Coke]: afaik, it's SMOP, but it is also an extra exception that needs to be handled 12:42
12:47 thou joined 12:48 AlexDaniel left
[Coke] my RT sense is tingling. 12:49
lizmat I don't think leave is in nope
so things might not be so bad after all :-)
[Coke] tries to parse what zefram wants in his most recent ticket. Code helps. 12:50
12:50 Psyche^ joined
moritz m: .say for 1, 2, IterationEnd, 3, 4, 5 12:50
camelia rakudo-moar f89dc2: OUTPUT«1␤2␤»
moritz [Coke]: I think Zefram_Fysh++ wants documentation for this kind of behavior 12:51
12:51 skids joined
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.
jdv79 moritz++ # hidden under seat 12:52
moritz jdv79: glad you found it :-)
12:54 laouji left 12:55 Psyche^_ left
[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."
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.
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
[Coke] m: say (3.Real).WHAT
camelia rakudo-moar f89dc2: OUTPUT«(Int)␤»
jnthn [Coke]: Real is a role 12:57
[Coke]: Other numeric types do it
Zefram_Fysh: That's already covered by my description; the code that passed it in was wrong to do so.
Though it's also fairly hard to pass it around too 12:58
m: sub foo($x) { }; foo(IterationEnd)
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␤␤»
jnthn Since it's Mu, not Any
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
what about code that processes code, where the subject code might be using IterationEnd in the approved way?
jnthn *sigh 13:00
ShimmerFairy The fact that this issue has yet to come up is a good indicator of how likely it is :)
jnthn Zefram_Fysh: Do you want to go re-design the Perl 6 iterator API? If not, please stop being a nuisance.
Zefram_Fysh I'd be happy to suggest alternatives to the sentinel in the API, if you're willing to listen
moritz is willing to listen 13:01
13:01 Ven joined
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:02
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?
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
moritz no, to a call
dalek kudo/nom: 1b55e5f | lizmat++ | src/core/IO/Handle.pm:
lines (push-all) should add lines seen, not set it

Found when writing tests for IO::Handle.lines
moritz and last is, to the best of my knowledge, a control exception, which also isn't all that cheap 13:06
tadzik poland is so funny <3 13:07
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"
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
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
tadzik I say "I'm not looking for a job, I just came here for the healthcare thing" 13:08
"oh, but we're not a healthcare provider, we're here to help you find a job" 13:09
".......oh"
moritz :-)
tadzik it's just so, so often exploited that even other government officials recommend that method
lizmat tadzik: fwiw, that's how it more or less works in NL as well
moritz and .de
you're not getting benefits for being unemployed, your new job is to get a job, damnit!
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
tadzik it does make sense now that I think about it
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
tadzik since this is what the entire country uses it for
I'm so proud of my nationality
lizmat Zefram_Fysh: but thank you for considering 13:12
13:12 Zefram_Fysh left
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:15
timotimo is this about malicious code perhaps putting StopIteration into well-behaved routines? 13:17
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:19
13:19 skids left
ShimmerFairy wonders if you could get away with calling Mu a "semi-metaobject" in some sense :P 13:20
13:21 Loren joined
Loren evening #perl6 . 13:21
tadzik hello Loren 13:24
Loren o/ 13:25
13:25 khw joined 13:29 Ven left
masak afternoon, #perl6 13:31
evening, Loren
dalek kudo/nom: faffea9 | lizmat++ | src/core/IO/Handle.pm:
lines (push-all) should add lines seen (part 2)
13:32
Loren o/, I'm study S12 now. 13:33
masak let us know if you have any questions.
dalek pan style="color: #395be5">perl6-examples: dbb1158 | (Steve Mynott)++ | categories/rosalind/grph-grondilu.pl:
GLR fix for grph-grondilu.pl
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
camelia rakudo-moar 1b55e5: OUTPUT«OO in Perl 6 is awesome!␤»
13:35 aborazmeh joined, aborazmeh left, aborazmeh joined
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!␤»
lizmat no need for {} :-) 13:36
masak indeed not.
13:36 Ven joined
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
masak (a) for consistency, because sometimes I *do* need {}
jnthn $.quality should interpolate :)
So looks correct 13:37
masak yes, it's a scalar
(b) for visual-pill-ness
timotimo visual pills contain carrots
masak (c) because it makes me remember not to use {} in qq strings when I mean literal {} 13:38
though (c) is the weakest reason, to me that trap is also the biggest weakness with the current factoring of qq strings
lizmat m: my @a = a=>42, b=> 666; for @a -> :$key, :$value { dd $key, $value } # shouldn't that just work ? 13:39
camelia rakudo-moar 1b55e5: OUTPUT«Too many positionals passed; expected 0 arguments but got 1␤ in block <unit> at /tmp/viIDIn58eJ:1␤␤»
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 {}
Ven waves around
masak m: my @a = a=>42, b=> 666; for @a -> (:$key, :$value) { dd $key, $value }
camelia rakudo-moar 1b55e5: OUTPUT«Str $key = "a"␤Int $value = 42␤Str $key = "b"␤Int $value = 666␤»
ilmari m: class C { method foo { say $ =:= self } }; C.new.foo
camelia rakudo-moar 1b55e5: OUTPUT«False␤»
masak lizmat: ^
Ven: *wave* 13:40
lizmat masak++
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.
ilmari m: class C { method foo { say $; say self } }; C.new.foo
camelia rakudo-moar 1b55e5: OUTPUT«(Any)␤C.new␤»
Ven don't we use % (:(..)) for hash destructuring, usually?
masak ilmari: $.foo means self.foo, but $ doesn't mean self 13:41
ilmari: similarly, *-2 means { $_ - 2 }, but * doesn't mean { $_ }
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⏏052)(2)␤ expecting any of:␤ infix␤ infix stopper␤ statement end␤ statement modifier␤ …»
ilmari m: say (* * 2)(2)
camelia rakudo-moar 1b55e5: OUTPUT«4␤»
13:42 tokuhiro_ left
Ven
.oO( then it must mean { $_ } - 2. In perl6, lambdas substract you! )
13:42
JimmyZ m: say (* *2)(2) 13:43
camelia rakudo-moar 1b55e5: OUTPUT«4␤»
13:43 FROGGS joined 13:50 Ven left 13:51 sufrostico joined
dalek p: 6b3c7b0 | jnthn++ | src/QRegex/P6Regex/Actions.nqp:
Factor out repetitive rx literal code.
13:52
lizmat m: say (* ** 2)(2) 13:53
camelia rakudo-moar 1b55e5: OUTPUT«4␤»
lizmat :-)
jnthn m: constant $x = 'ab'; say ('ab' ~~ / a | b | $x /).Str
camelia rakudo-moar 1b55e5: OUTPUT«a␤»
jnthn (ab locally :))
13:54 TimToady left
masak jnthn++ 13:55
FROGGS jnthn++ # :o)
masak was that an RT or sump'n?
it feels familiar.
jnthn Yes, RT
Also one of the RTs on my "fix before 6.christmas"
masak \o/
masak checks his watch 13:56
13:56 TimToady joined
masak you did it! :D 13:56
jnthn :P
masak ...ship it! :P
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
timotimo damn, users
cant live with them, cant live without them 13:58
13:58 travis-ci joined
travis-ci NQP build passed. jnthn 'Factor out repetitive rx literal code.' 13:58
travis-ci.org/perl6/nqp/builds/81969022 github.com/perl6/nqp/compare/71909...3c7b0e2092
13:58 travis-ci left
masak not embarassoids, but compatitudes. 13:58
[Coke] ./perl6 -e 'Real.new.gist' hangs; ./perl6 --profile -e 'Real.new.gist' segfaults.
ilmari m: (1,2,3,IterationEnd,5,6).perl.say 13:59
camelia rakudo-moar faffea: OUTPUT«(1, 2, 3)␤»
ilmari wut
PerlJam ilmari: seems reasonable to me.
ilmari m: (1,2,3,IterationEnd,5,6).elems 14:00
camelia ( no output )
PerlJam (unless we want *another* end token for .perl output)
ilmari m: (1,2,3,IterationEnd,5,6).elems.say
camelia rakudo-moar faffea: OUTPUT«6␤»
ilmari m: (1,2,3,IterationEnd,5,6)[4]
camelia ( no output )
ilmari m: (1,2,3,IterationEnd,5,6)[4].say
camelia rakudo-moar faffea: OUTPUT«5␤»
ilmari m: (1,2,3,IterationEnd,5,6)[3].say
camelia rakudo-moar faffea: OUTPUT«␤»
ilmari PerlJam: I thought .perl was supposed to return a string that evaluated to the same value? 14:01
ilmari meetings
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.
timotimo for things we're currently very cheap about
[Coke] the 5,6 at the end of that is unreachable.
timotimo m: my $foo = (1, 2, 3, IterationEnd, 5, 6); say $foo.perl 14:03
camelia rakudo-moar faffea: OUTPUT«$(1, 2, 3)␤»
timotimo now how do i ...
14:03 zacts left
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)␤»
timotimo m: say IterationEnd.perl 14:05
camelia rakudo-moar faffea: OUTPUT«Mu.new␤»
timotimo oh
it's just an instance of Mu
gotcha.
[Coke] m: say IterationEnd.WHAT, IterationEnd.perl; 14:06
camelia rakudo-moar faffea: OUTPUT«(Mu)Mu.new␤»
timotimo so IterationEnd is only special because some places check for identity on it
so there's no reason for it to .perl to "IterationEnd" 14:07
just like my Mu $foobar := Mu.new; has no need to .perl to "$foobar"
moritz right
timotimo so ... problem solved?
moritz which problem? :-) 14:08
timotimo "people could expect IterationEnd to ... " ... actually i have no idea? 14:09
i realize zefram was just fuzzing ...
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 :)
timotimo ugh, that sounds terrible 14:10
jnthn PerlJam: Please lets not encourage that :P
timotimo we've already said the behavior of IterationEnd is implementation defined ...
i'd really rather you just put a role on the instance or something …
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"
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:12
timotimo don't allow user-provided input to evaluate to IterationEnd somehow ... 14:13
14:13 kanishka joined
jnthn timotimo: I've now idea how that could ever happen :) 14:13
timotimo me neither
[Coke] m: (1,2,3,Mu,6,7).perl.say;
camelia rakudo-moar faffea: OUTPUT«(1, 2, 3, Mu, 6, 7)␤»
dalek p: 2111ca0 | (Pawel Murias)++ | src/vm/js/nqp-runtime/runtime.js:
[js] add a helper to dump objects to json for debugging purposes
14:15
p: 23d57af | (Pawel Murias)++ | src/vm/js/nqp-runtime/ (2 files):
[js] Move obj prototype creation into the REPR.
p: bea9d2d | (Pawel Murias)++ | src/vm/js/ (3 files):
[js] Work on object serialization
p: 3616d0a | (Pawel Murias)++ | src/vm/js/ (3 files):
[js] Round trip a P6int containing a small integer correctly.
14:17 Ven joined
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␤␤»
jnthn Anyone else seeing failure in S04-statements/for.t?
masak Loren: that looks to me like it should've worked. 14:19
Loren yeah, i copy it from S12.indirect_notation.t
jnthn sees that gather.t hang too 14:20
14:20 rurban left
lizmat jnthn: I've reported that this morning 14:21
jnthn Yeah, the for.t was a TimToady unfudge from 24th also 14:22
Thought it wasn't likely my regex constant LTM fix was to blame for that one... :)
lizmat jnthn: yeah, confirmed
X::Multi::NoMatch exception produced no message
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␤»
lizmat hmmm... 14:24
masak looks like I would expect. 14:25
lizmat m: say 42 * Mu # golfed
camelia rakudo-moar faffea: OUTPUT«X::Multi::NoMatch exception produced no message␤ in block <unit> at /tmp/F2NUBh9TQC:1␤␤»
14:25 cosimo left
FROGGS ohh nice 14:26
that message showed up on the jvm often
dalek kudo/nom: 8a38466 | jnthn++ | / (2 files):
Constant scalars in regexes participate in LTM.
14:27
ast: d08ab51 | jnthn++ | S05-metasyntax/longest-alternative.t:
Unfudge tests for RT #113884.
14:28
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=113884
masak Loren: yeah, I see the test you copied now. seems it's Not-Yet-Implemented in Rakudo. 14:29
Loren: there's even an (empty) RT ticket saying so: rt.perl.org/Ticket/Display.html?id=124844 14:30
14:30 zacts joined
Loren Oh, got it, masak 14:30
14:31 cosimo joined, brrt left
dalek p: 24662cb | (Pawel Murias)++ | src/vm/js/ (3 files):
[js] box_n/unbox_n, serializing the P6num repr
14:32
14:32 Ven left
jnthn m: "foo" ~~ /foo/; say "What kind of $()l am I?" 14:33
camelia rakudo-moar faffea: OUTPUT«What kind of fool am I?␤»
FROGGS m: constant $x = 'ab'; say ('ab' ~~ / a | b | $x /).Str
camelia rakudo-moar faffea: OUTPUT«a␤»
FROGGS m: constant $x = 'ab'; say ('ab' ~~ / $x /).Str 14:34
camelia rakudo-moar faffea: OUTPUT«ab␤»
14:34 Ven joined
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␤␤»
jnthn FROGGS: Don't think camelia is updated yet
FROGGS m: constant $x = 'AB'; say ('ab' ~~ /:i $x /).Str
camelia rakudo-moar faffea: OUTPUT«ab␤»
jnthn "foo" ~~ / foo {make "foo"} /; say "What kind of $()l am I?"
m: "foo" ~~ / foo {make "foo"} /; say "What kind of $()l am I?"
camelia rakudo-moar faffea: OUTPUT«What kind of fool am I?␤»
pmurias [Coke]: did you have any luck with the sleep node.js problem?
JimmyZ jnthn: about $() : github.com/perl6/specs/issues/98
jnthn m: say(('foo' ~~ / foo { make 'foo' }/).ast) 14:35
camelia rakudo-moar faffea: OUTPUT«foo␤»
FROGGS jnthn: I'm just concerned that !LITERAL does not know about :i and :m
jnthn FROGGS: Hm
FROGGS jnthn: or will that be handled by the outer nodes?
jnthn rt.perl.org/Ticket/Display.html?id=76278 looks to me like it's fixed now
Ven pmurias: is P6num a huge perf. impact?
jnthn FROGGS: Maybe not...
m: my $x = 'ab'; say 'Ab' ~~ /$x/ 14:36
camelia rakudo-moar faffea: OUTPUT«Nil␤»
jnthn m: my $x = 'ab'; say 'Ab' ~~ /:i $x/
camelia rakudo-moar faffea: OUTPUT«「Ab」␤»
jnthn m: my Str $x = 'ab'; say 'Ab' ~~ /:i $x/
camelia rakudo-moar faffea: OUTPUT«「Ab」␤»
14:36 travis-ci joined
travis-ci NQP build failed. Pawel Murias '[js] box_n/unbox_n, serializing the P6num repr' 14:36
travis-ci.org/perl6/nqp/builds/81976120 github.com/perl6/nqp/compare/3616d...662cb01fc8
14:36 travis-ci left
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...
moritz who cares about oldIE? :-) 14:37
jnthn JimmyZ: The ticket is really about make rather than $()
Ven moritz: well, oldIE and a lot of other browsers, iirc
JimmyZ jnthn: Ok, I thought it is :)
jnthn It used $() but the ticket is really about make in a closure in a regex, which I think is long fixed 14:38
14:38 wollmers left
jnthn m: say(('foo' ~~ / foo { make 'foo' }/).ast) # this is the core issue 14:38
camelia rakudo-moar faffea: OUTPUT«foo␤»
jnthn m: say(('foo' ~~ / foo { make 'foobar' }/).ast) # this is the core issue
camelia rakudo-moar faffea: OUTPUT«foobar␤»
jnthn Yeah, looks good to me
pmurias Ven: native nqp numbers are stored as javascript numbers 14:39
Ven I feel relieved already :). pmurias ++
14:40 kanishka left
jnthn And we already have tests to cover them. 14:40
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
dalek ast: 6350193 | jnthn++ | S05-match/make.t:
Tag tests covering RT #76278.
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...l?id=76278
pmurias Ven: I don't depend on that heavily so it should be easy to fix that once it's a problem 14:42
old browser support isn't really a priority untill nqp-js has users depending on that 14:43
14:43 tokuhiro_ joined
dalek pan style="color: #395be5">perl6-examples: e599966 | (Steve Mynott)++ | categories/rosalind/orf-grondilu.pl:
[rosalind] orf-grondilu.pl fix under GLR
14:45
14:47 tokuhiro_ left
Ven pmurias: fair enough then :-) keep up the great work 14:49
14:49 sufrostico left 14:50 rurban joined 14:51 adu joined
dalek pan style="color: #395be5">perl6-examples: 2a8b315 | (Steve Mynott)++ | categories/rosalind/fibd-grondilu.pl:
[rosalind] flatten the Fibonacci Rabbits
14:52
ilmari m: ("foo", IterationEnd, "bar")[2]
camelia ( no output )
ilmari m: ("foo", IterationEnd, "bar")[2].say
camelia rakudo-moar faffea: OUTPUT«bar␤»
ilmari [Coke]: doesn't look unreachable to me ^^
you can't _iterate_ to it, but you can get at it directly 14:54
m: ("foo", IterationEnd, "bar").elems.say 14:55
camelia rakudo-moar 8a3846: OUTPUT«3␤»
_itz that's what I would expect TBH
ilmari m: ("foo", IterationEnd, "bar").perl.say
camelia rakudo-moar 8a3846: OUTPUT«("foo")␤»
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
timotimo imagine we would kick off an iteration every time we want to access an element of an array ..
FROGGS m: constant $x = 'AB'; say ('ab' ~~ /:i a | b | $x /).Str
camelia rakudo-moar 8a3846: OUTPUT«ab␤»
FROGGS nice
timotimo very good
FROGGS m: constant $x = 'ÄB'; say ('ab' ~~ /:m a | b | $x /).Str 14:57
camelia rakudo-moar 8a3846: OUTPUT«a␤»
FROGGS not so much
timotimo ;(
FROGGS m: constant $x = 'ÄB'; say ('ab' ~~ /:m $x /).Str
camelia rakudo-moar 8a3846: OUTPUT«Use of Nil in string context in block <unit> at /tmp/SL87Qbtdjr:1␤␤»
FROGGS m: constant $x = 'ÄB'; say ('ab' ~~ /:i:m $x /).Str
camelia rakudo-moar 8a3846: OUTPUT«ab␤»
FROGGS m: constant $x = 'ÄB'; say ('ab' ~~ /:i:m a | b | $x /).Str
camelia rakudo-moar 8a3846: OUTPUT«ab␤»
Ven oh, you forgot that :i :P
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.
Ven that's... nice... but it complexifies the rule a bit, I guess..?
timotimo maybe we should hide that behind "use IWantToMakeAnIterator"
14:58 xfix left
FROGGS no 14:58
it is fine as it is now
14:59 Ven left 15:00 TEttinger joined
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:00
timotimo %) 15:01
FROGGS is going to store IterationEnd into a mysql database because he might need it later
actually, that would be fun
15:01 g4 left
timotimo and hard to do 15:02
FROGGS mysql injection via putting IterationEnd as the username and it won't check the password :D
hoelzro o/ #perl6
FROGGS hi hoelzro
dalek pan style="color: #395be5">perl6-examples: fed05e1 | (Steve Mynott)++ | categories/rosalind/fib-grondilu.pl:
[rosalind] GLR fix for fib-grondilu.pl
hoelzro o/ FROGGS
timotimo terrible thoughts are being thoughed
FROGGS ... but no cat was harmed 15:03
15:03 abraxxa left 15:05 Loren_ joined 15:08 Loren left 15:10 aiacob left
pmurias hoelzro: hi 15:11
15:11 adu left
dalek p: cf7b3a1 | (Pawel Murias)++ | src/vm/js/ (4 files):
[js] Implement box_s/unbox_s. Serializing a P6str.
15:11
hoelzro o/ pmurias
15:19 apotheon left, skids joined
dalek ast: 252ecba | lizmat++ | S16-io/lines.t:
First stab at comprehensive IO::Handle.lines tests

Unfortunately, a skip was already needed. :-(
15:20
pan style="color: #395be5">perl6-examples: ccf0ebe | (Steve Mynott)++ | categories/rosalind/mrna-grondilu.pl:
[rosalind] flatten some mRNA whatever that might be
15:22
kudo/nom: b6c4d20 | lizmat++ | t/spectest.data:
Add IO::Handle.lines tests
ast: 0957cce | TimToady++ | S04-statements/gather.t:
Revert "self-ref inside gather seems to be GLR-proof now"

This reverts commit 73db4fcfd74616e0828f9b2b1747b43e456e1aa9.
  (Fooled myself with a residual .rakudo.moar.)
15:24 diana_olhovik left 15:25 apotheon joined
dalek rl6-roast-data: 2e6ad72 | coke++ | / (9 files):
today (automated commit)
15:25
[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;␤»
[Coke] pmurias: no.
lizmat jnthn: I'm seeing quite some spectest failures :-(
they seem LTM related 15:27
:-(
jnthn The error?
[Coke] m: my $p = start Real.new.gist; await Promise.anyof($p, Promise.in(1)); say $p.result;
camelia rakudo-moar 8a3846: OUTPUT«Memory allocation failed; could not allocate 640 bytes␤»
[Coke] Was trying to be clever and get a stacktrace of where Real.new.gist was going. :) 15:28
ah well.
FROGGS m: my $p = start { Real.new.gist }; await Promise.anyof($p, Promise.in(1)); say $p.result;
camelia rakudo-moar 8a3846: OUTPUT«Memory allocation failed; could not allocate 640 bytes␤»
dalek kudo/nom: 1a5873b | jnthn++ | src/Perl6/Metamodel/BOOTSTRAP.nqp:
Fix indento.
kudo/nom: d7ff0bb | jnthn++ | src/Perl6/Metamodel/BOOTSTRAP.nqp:
Collect rw-ness info for multi-dispatcher to use.

No semantic changes yet.
kudo/nom: 855512f | jnthn++ | src/Perl6/Metamodel/BOOTSTRAP.nqp:
Something with "is rw" is narrower than without.

Provided types match. However, since we do not yet actually enforce being passed a mutable thing with "is rw" in signatures, this alone is not enough for actually differentiating the two.
15:29 FROGGS left
dalek ast: 685e548 | TimToady++ | S04-statements/for.t:
only test what we're supposed to be testing
15:29
15:29 hernanGOA left
lizmat jnthn: ===SORRY!=== 15:29
Cannot find method 'apply_literal_modifiers'
NQP bump missing ?
jnthn lizmat: Huh, I pushed the NQP bump...
It looks correct
2015.09.1-13-g6b3c7b0
lizmat ah, then I didn't reconfig
jnthn Ah :)
15:30 hernanGOA joined
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
just hit the same issue
[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
jnthn TimToady: At the moment we don't enforce anything at all, just behave as if it was "is raw"
TimToady jnthn: it's a kind of constraint, so we should enforce it the same way as a type :P
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:34 hernanGOA left 15:35 cognominal left
jnthn "either of those"? 15:35
TimToady Int *args or *args is rw
well, with @ 15:36
jnthn Ah
ilmari m: sub foo(Int *@args) { }
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␤»
jnthn Well, nqp::iscont(...) is easy to check for on '$foo is rw'
And that's the main use of "is rw"
So I could see us disallowing it on anything but Scalars in 6.christmas
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
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…»
jnthn lizmat: Oh? Strange, it passes unfudged for me here, thanks to adding print/graph yesteray (again in NQP)
ilmari m: sub foo(Int @args) { @args.say }; foo((1,2,3))
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␤␤»
lizmat let me nuke install to be sure...
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.
m: sub foo(Int @args) { @args.say }; foo(Array[Int].new(1,2,3))
camelia rakudo-moar 8a3846: OUTPUT«[1 2 3]␤»
dalek pan style="color: #395be5">perl6-examples: 944e941 | (Steve Mynott)++ | categories/rosalind/iprb-grondilu.pl:
[rosalind] .cache something genetic for GLR
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.
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
JimmyZ m: sub foo(Int @args) { @args.say } foo(my @ = 1,2,3)
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␤ …»
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)
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␤ …»
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␤------> 03427⏏5<EOL>␤ expecting any of:␤ infix␤ infix stopper␤ statement…»
jnthn Wow, I didn't see "across lines" before
TimToady just added it a few days ago :)
jnthn ah, I musta not paid that patch much attention when reviewing :)
TimToady it was reporting Bogus postfix before that 15:43
jnthn
.oO( Bogus Bogus postfix )
hm 15:44
\a is rw
That's a curious construct :)
15:44 tokuhiro_ joined
jnthn Since it asks for raw *and* rw which kinda...conflicts. 15:45
I suspect we ignore the rw there
JimmyZ and +arg is rw?
TimToady is raw
+arg does not guarantee containers, which is what rw is for 15:46
15:46 hernanGOA joined
lizmat cycling& 15:46
TimToady is pretty happy with how +args turned out 15:47
15:47 zakharyas left
jnthn We have tons of "is rw" return values that probably want to be "is raw" too... 15:48
15:48 adu joined
TimToady or that should enforce containerness 15:48
timotimo doesn't know what the difference between is rw and is raw is for return values 15:49
15:49 tokuhiro_ left
TimToady same as a parameter, 'rw' is enforce container, 'raw' is don't do anything one way or the other wrt containers 15:50
it is different insofar as raw prevents containerization on the way in and decontainerization on the way out, I guess 15:51
15:51 aborazmeh left
timotimo mhm 15:52
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
jnthn timotimo: How is it failing to work right? 15:53
15:53 Ven left
TimToady gather defaults to eager, right? 15:54
lazy would be a problem
jnthn Yes
Well, not so much defaults to eager as isn't marked as lazy 15:55
But assigning a Seq into a Scalar doesn't cause evaluation.
In `my @a = gather ...` it's the list assignment that is eager until a marked lazy thing
timotimo this is for json_fast; it endless-loops or something
TimToady I've wondered whether .Str should eagerize
or try to... 15:56
moritz timotimo: how does JSON::Fast detect Arrays vs. non-Arrays?
timotimo it used to $thing ~~ Array, which is obviously wrong
but ~~ Positional doesn't seem to help 15:57
moritz try $thing ~~ Iterable (but after the check against Hash or EnumMap)
yes, Seq isn't Positional
timotimo and then it iterates over $obj.keys
TimToady m: my $a = gather for 1..5 { take $_ }; say $a
camelia rakudo-moar 855512: OUTPUT«(1 2 3 4 5)␤»
TimToady m: my $a = gather for 1..5 { take $_ }; say $a.Str 15:58
camelia rakudo-moar 855512: OUTPUT«1 2 3 4 5␤»
timotimo and when it $obj{$ke
$obj{$key} it infini-recurses
dalek pan style="color: #395be5">perl6-examples: 1d0e3ae | (Steve Mynott)++ | categories/rosalind/nwck-grondilu.pl:
[rosalind] nwck-grondilu.pl GLR fix and rosalind.t passes
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 …»
TimToady m: my $a = gather for 1..50000000 { take $_ }; say $a.Str
camelia rakudo-moar 855512: OUTPUT«(timeout)»
16:03 pmurias left 16:04 domidumont left
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␤»
colomon m: my $a = gather for 1..50000000 { take $_ }; say $a[10000000] 16:06
16:06 espadrine left
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)»
rakudo-moar 855512: OUTPUT«True␤»
timotimo is this the positional bind failover thing at work?
TimToady yes 16:07
timotimo i'd have to go via a function signature to make this work properly?
or special-case "Seq"?
TimToady you can always .cache explicitly 16:08
or implicitly via .[]
16:08 Loren_ left
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
m: say 42.cache
camelia rakudo-moar 855512: OUTPUT«(42)␤»
timotimo is it because Any implements it? 16:09
TimToady well, I guess it listifies
timotimo that's not so good
TimToady surely you detect iterables already somehow?
or it, if not you... 16:10
timotimo it sends me a text message and i decide :P 16:11
16:11 pullphinger joined 16:12 hernanGOA left
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
16:12 hernanGOA joined
dalek kudo/rw-cleanup: 0743bf4 | jnthn++ | src/core/ (5 files):
Clean up various `is rw` misuses.

It's meaningless on non-Scalars. In some places, drop bogus `is rw`, and in others switch to using scalars over \foo.
16:15
16:15 skids left
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:16
16:17 AlexDaniel joined 16:18 AlexDaniel left 16:19 hernanGO1 joined 16:23 xinming left 16:24 abaugher left, hernanGOA left, abaugher joined, xinming_ joined, hernanGO1 left, agentzh_ joined, nightfro` joined, nightfro` is now known as nightfrog 16:27 hernanGOA joined
jnthn dinner & 16:35
16:36 Possum left 16:43 Possum joined
moritz did anybody test the R* release candidate? 16:47
TimToady too busy breaking the next one... :) 16:49
16:50 captain-adequate joined, yqt joined 17:01 larion left 17:03 konnar joined
konnar salut 17:03
aurevoir 17:04
17:04 konnar left 17:13 espadrine joined
moritz t/spec/S05-mass/stdrules.t fails some tests here; is that expected? 17:19
17:20 cognominal joined
moritz m: sub f() { }; &CORE::none := &f; say &none =:= &f 17:22
camelia rakudo-moar 855512: OUTPUT«True␤»
moritz is that supposed to work?
17:22 patrickz joined
moritz I mean, shouldn't &CORE be read-only once its compilation is finished? 17:22
17:23 Peter_R joined, dakkar left 17:24 xinming_ left 17:25 xinming joined
dalek ast: cecbb2a | TimToady++ | S06-advanced/return.t:
bare return should not default to slip

Added tests to make sure bare return yields Nil, and that explicit Slip/Empty returns do correctly interpolate nothing into lists.
  (RT #126049 rejected)
17:29
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=126049
17:33 domidumont joined 17:34 hernanGOA left 17:37 AlexDaniel joined 17:38 duncan_dmg left 17:46 tokuhiro_ joined, yqt left
jnthn moritz: (stdrules.t) I don't understand why it'd fail; it passes fine here 17:50
I did unfudge things yesterday after implementing things
Please can you send me the test output you're seeing?
17:50 tokuhiro_ left 17:55 rjt_pl joined
dalek ast: 95a6e77 | (Stefan Seifert)++ | S02-names-vars/perl.t:
Tests for say on self-referencing object RT #124242
17:55
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=124242
17:55 sufrostico joined
rjt_pl Hello p6 gang! Looking for some help for an easy way to type in the hyperoperator characters in vim 17:56
(I know I can use >> and <<, but I prefer the unicode chars) 17:57
moritz rjt_pl: Ctrl+k << and Ctrl+k >>
nine .tell [Coke] I would CC perl6-compiler if I had the permission to do that in RT.
yoleaux nine: I'll pass your message to [Coke].
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
moritz jnthn: hack.p6c.org/~moritz/stdrules.txt test output
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
like on the irc channel :)
moritz also my keyboard layout has AltGr+x pre-configured for « and AltGr+y for » 18:01
[Coke] nine: are you a bug admin?
yoleaux 17:57Z <nine> [Coke]: I would CC perl6-compiler if I had the permission to do that in RT.
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
I typically use the windows key for that 18:03
nine [Coke]: I can at least close bugs
18:03 FROGGS joined, larion joined
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:03
It's...frustrating because I know very well what RT is capable of, as we're using it heavily at work. 18:04
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:05
18:06 sufrostico left
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␤␤»
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
ilmari ah, moritz said that alredy
+a
TimToady I also use gnome's ctrl/shift u to input things like ␤
that one has an easy number to remember, 2424 18:09
ilmari what's the code point for that/
ilmari adds it to ~/.XCompose as n l 18:10
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.
FROGGS o7
TimToady why are you shading your eyes? 18:12
schmoost1r ~o¬
FROGGS TimToady: I guess you'd know that I'd not tell the truth if I said 'sunlight' :o) 18:13
18:14 xfix joined
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:15
I think it's the former, but not 100% 18:16
FROGGS rjt_pl: it is a noop in rakudo atm at least
rjt_pl: later you might do 'use v6.1' and it will have an effect, but we're not there yet 18:17
or whatever version scheme we end up having
rjt_pl Right, ok that makes sense.
FROGGS picks an RT ticket and tries to solve it
jnthn moritz: d'oh, somehow I forgot to update MOAR_REVISION 18:19
FROGGS hmmm, how hard can it be to make this work... "abc" ~~ m/@<chars>=(.)+/ 18:20
18:20 larion left
FROGGS std: "abc" ~~ m/@<chars>=(.)+/ 18:20
camelia std 28329a7: OUTPUT«ok 00:00 139m␤»
18:21 tokuhiro_ joined
FROGGS std: "abc" ~~ m/%<chars>=[ <first=.> <second=.> <third=.> ]/ 18:21
camelia std 28329a7: OUTPUT«ok 00:00 140m␤»
FROGGS m: "abc" ~~ m/%<chars>=[ <first=.> <second=.> <third=.> ]/
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=.> ]/␤»
lizmat massages? 18:22
18:22 vendethiel joined
FROGGS m: "abc" ~~ m/%<chars>=[ <first=[.]> <second=[.]> <third=[.]> ]/ 18:22
camelia ( no output )
FROGGS m: "abc" ~~ m/%<chars>=[ <first=[.]> <second=[.]> <third=[.]> ]/; say %<chars>
camelia rakudo-moar 855512: OUTPUT«␤»
lizmat jnthn: re S16-io/lines.t: weird I assume this is on Win ? 18:23
18:24 leont joined 18:25 tokuhiro_ left 18:27 rurban left
jnthn lizmat: yes 18:28
lizmat it's basically unlink $foo; $foo.IO.spurt($bar)
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
&
18:31 larion joined 18:32 rurban joined 18:38 xfix left
rjt_pl m: say (1, 1, *+* ...^ * > 50); 18:39
camelia rakudo-moar 855512: OUTPUT«(1 1 2 3 5 8 13 21 34)␤»
rjt_pl So I get that outputs fibonacci numbers below 50, but where can I find documentation on how *+* ...^ works? 18:40
18:40 larion left
FROGGS rjt_pl: maybe search for WhateverCode? 18:40
rjt_pl Okay, thanks, that helps. The punctuation is hard to google. 18:41
[Coke] rjt_pl: try docs.perl6.org and enter the punctuation in thesearch 18:43
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:44
dalek ast: a9f090c | (Stefan Seifert)++ | S02-names-vars/perl.t:
Test for .perl on mutually referencing objects

RT #122286
18:45
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=122286
18:46 diana_olhovik joined
dalek kudo/nom: 397e221 | (Stefan Seifert)++ | src/core/Mu.pm:
Fix .perl on mutually referencing object structures

Port the fix from List to Mu for wider applicability. Fixes RT #122286
18:46
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=122286
18:46 dnmfarrell joined 18:52 krunen joined 18:53 diana_olhovik_ joined, diana_olhovik left
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
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
rjt_pl jnthn: Count me in for that feature :-) 19:00
FROGGS lizmat: I don't think that this can ever work
jnthn 19:01
lizmat why? It's just a matter of reading one byte more than requested and keeping that for the next read?
[Coke] jnthn: like regex101.com/, but for perl 6. :)
jnthn lizmat: People don't expect asking if we're at the eof to block generally :)
rjt_pl jnthn: LMAO
lizmat perl5.to.perl6.org
[Coke] lizmat: sucks.perl6.org/ 19:02
lizmat well, then we still have an issue though
FROGGS lizmat: I tried exactly that and failed... for parrot and jvm
19:02 spider-mario joined
[Coke] btw, it would be great if P6 regexes worked at the regex site. :) 19:02
lizmat FROGGS :-( 19:03
ok, I will need to adapt (and slow down) the lines code
19:03 kanishka joined
lizmat *or* start slurping blocks and use Str.lines instead 19:04
dalek kudo/rw-cleanup: ab042e1 | jnthn++ | src/core/ (24 files):
Cleanup of `is rw` usage on subs/methods.

Most of them wanted to be "is raw". Some didn't want anything at all. In some places "rw" stayed. Commit poem! Oh, LOL! Well played.
19:05 telex left 19:06 simcop2387 left, telex joined
FROGGS still wonders what the 'wt' is about in 'wtfisthis.perl6.org' 19:08
[Coke] RT: 1,015; GLR: 4; testneeded: 9; xmas: 98 19:09
FROGGS: What the
rjt_pl is reminded of the bash.org entry "What the f--- does WTF stand for?"
[Coke] WtfIsThis
dalek p: dadb7bc | jnthn++ | tools/build/MOAR_REVISION:
Bump MOAR_REVISION for CCLASS_PRINTING fixes.
FROGGS [Coke]: well, then it might just me reading it as WtFistHis :P
[Coke] can't tell if FROGGS was just trolling. :)
jnthn Woo, xmas is < 100 tickets away :) 19:10
19:10 simcop2387 joined
[Coke] jnthn: close 3, open 2. 19:10
vendethiel is raw = no container, that's it? 19:11
jnthn vendethiel: "is raw" means "exactly as it is"
FROGGS do not containerize on the way, do not decont on the way out
dalek kudo/nom: 33afeb1 | jnthn++ | tools/build/NQP_REVISION:
Bump NQP_REVISION for working <.print>.
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, travis-ci joined
travis-ci NQP build passed. jnthn 'Bump MOAR_REVISION for CCLASS_PRINTING fixes.' 19:13
travis-ci.org/perl6/nqp/builds/82025634 github.com/perl6/nqp/compare/cf7b3...db7bc4bf53
19:13 travis-ci left, skids joined
TimToady is trying to figure out how to allow an attribute to default to Nil... 19:13
FROGGS just implemented wantarray in nqp 19:15
lizmat TimToady: tried that before as well, to no avail
m: my Nil $a = 42; # also doesn't work ?
camelia rakudo-moar 855512: OUTPUT«Type check failed in assignment to '$a'; expected 'Any' but got 'Int'␤ in block <unit> at /tmp/kPSMJ59OMk:1␤␤»
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…»
TimToady well, the Any comes from the .got attribute
lizmat m: my $a is default(Nil) = 42; # also doesn't work ?
camelia ( no output )
TimToady that works
but has $.got is default(Nil) doesn't
lizmat m: my $a is default(Nil); say $a
camelia rakudo-moar 855512: OUTPUT«Nil␤»
lizmat m: my $a is default(Nil); $a = 42; $a = Nil; say $a
camelia rakudo-moar 855512: OUTPUT«Nil␤»
lizmat *phew*
dalek ast: 485cfa4 | usev6++ | S06-multi/proto.t:
Replace some eval-dies-ok in S06-multi/proto.t with throws-like

also remove duplicate test for RT #68242
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...l?id=68242
TimToady so we'd need a way to clone a default into the object's attribute 19:17
I thought someone had a branch to do something like that once
dalek kudo/nom: f326ee5 | lizmat++ | src/core/IO/Handle.pm:
Fix premature closing on pull-exactly
lizmat not me
19:18 diana_olhovik joined, domidumont left
dalek ast: fc8cdc6 | lizmat++ | S16-io/lines.t:
Unfudge / fix lines slice test
19:18
19:18 diana_olhovik_ left
FROGGS is S32-num/power.t known to fail a test? 19:25
jnthn It does for me also
FROGGS k 19:26
ENOTMYFAULT then
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
jnthn just got it also and looked into the log
lizmat FROGGS: doesn't hang for me, but has one test too few in the plan 19:30
FROGGS hmm 19:31
it seem github.com/rakudo/rakudo/commit/39...07735c9c6d does not fix test 78
lizmat did for me..
2015.09-112-gf326ee5 on 2015.09-35-gd15a446 19:32
dalek ast: 3f529a7 | FROGGS++ | S02-names-vars/perl.t:
change ok(Str) to pass(Str)
FROGGS lizmat: ohh, I might be behind... 19:33
lizmat no change for me, even with above fix
dalek ast: f8f05e7 | lizmat++ | S02-names-vars/perl.t:
Adjust plan
19:34
lizmat that file clean for me now
dalek p: ada83f2 | FROGGS++ | src/QRegex/P6Regex/ (2 files):
implement wantarray, so /@<foo>=./ is about arrays

Now $<foo> will contain an Array of Match objects, as if it had a quantifier applied on it. This is useful if you want to have consistant match structures for different inputs.
19:36
kudo/nom: da382ed | FROGGS++ | tools/build/NQP_REVISION:
bump nqp revision for /@<foo>=./ fix
19:37
19:37 kanishka left, xfix joined, xfix left, xfix joined
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" :)
lizmat 2 reasons: it already supports a bare CR as eol
2nd reason: implementing an arbitrary string as an EOL should be trivial
FROGGS PerlJam: that was my intention :o)
jnthn haha 19:39
FROGGS++
lizmat jnthn: disadvantage: mixing $handle.lines and $handle.getline/getc will give weird results
jnthn lizmat: Any downsides?
Oh...
Wait, what's .getline?
Or did you just mean .get?
lizmat oops, I meant: .get indeed
jnthn Oh
I'm...not sure we can do that... 19:40
As in, it'll almost certainly lead to problems
lizmat ok, the alternative would be that I put the buffer inside IO::Handle
jnthn But...
lizmat and make getc/get work on that as well
jnthn We *already* have IO buffering in the VM
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
at least for supporting CR / LF / CRLF transparently
19:42 pdcawley left
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
jnthn: branch sepsis
lizmat oh, advantage for doing it in P6: a new VM doesn't need to support it :-) 19:43
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 { ... } }?
jnthn pink_mist: Not yet
pink_mist ah, bummer .. guess I gotta wait =)
jnthn (It's on my mental list of IO issues to worry about)
dalek kudo/rw-cleanup: eacdc8d | jnthn++ | src/Perl6/Metamodel/BOOTSTRAP.nqp:
Only allow `is rw` on Scalar parameters.
19:47
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
dnmfarrell thanks for confirming
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 :)
jnthn Is there a reason you need to go that way over using the async socket stuff?
FROGGS m: my $foo; "foo" ~~ /$foo=./
camelia ( no output )
FROGGS m: my $foo; "foo" ~~ /$foo=./; say $foo 19:50
camelia rakudo-moar 397e22: OUTPUT«(Any)␤»
dalek ast: f6f656b | usev6++ | S06- (7 files):
Replace some eval-dies-ok in S06-* with throws-like
dnmfarrell I was thinking about multiplexers
19:51 lizmat_ joined, lizmat left
dalek ast: c90270e | jnthn++ | integration/advent2010-day11.t:
Remove an `is rw` on an @ parameter.
19:51
19:51 lizmat_ is now known as lizmat
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:52
19:53 pmurias joined
jnthn dnmfarrell: As in, dealing with hundreds/thousands of connections using just one/a handful of threads? 19:56
Or something more specific? 19:57
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:01 ][Sno][ left
jnthn Enough for today... Guess the rw-cleanup goes on tomorrow :) 20:03
20:04 lizmat_ joined
FROGGS jnthn: gnight 20:04
masak 'night, jnthn
lizmat_ gnight jnthn 20:05
pink_mist nn jnthn
20:06 lizmat left 20:07 lizmat_ is now known as lizmat 20:08 darutoko left 20:09 sufrostico joined 20:14 thou left
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:16
20:22 tokuhiro_ joined, _dolmen_ joined 20:27 tokuhiro_ left
dalek ast: a851e2d | usev6++ | S06-signature/errors.t:
Fix test for RT #109064

test died for the wrong reason (missing block)
20:28
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=109064
dalek ast: 8361bcd | usev6++ | S0 (4 files):
Replace some more eval-dies-ok with throws-like
ast: 8f437db | usev6++ | S05-metasyntax/changed.t:
Fix test for obsolete /m modifier

test died for the wrong reason, m:m is very much alive
  (see S05-modifier/ignoremark.t)
20:33 rindolf left 20:34 kaare_ left 20:36 rindolf joined
[Coke] opens tickets for 2 flapping tests. 20:39
lizmat which ones? 20:41
[Coke] S17-lowlevel/lock.t and S17-supply/watch-path.t 20:42
die under high load often, but seem to always be fine when run standalone.
hoelzro lock.t is flapping again? =( 20:44
nine unfortunately 20:45
hoelzro [Coke]: does it segfault, or what's the error?
lizmat pretty sure it's timing in the test, though
for the watch-path case I'm pretty sure 20:46
the lock case, less so :-)
[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
[Coke] with TEST_JOBS=40, lock dies with: (Wstat: 6 Tests: 22 Failed: 0) Non-zero wait status: 6 20:51
Parse errors: Bad plan. You planned 23 tests but ran 22.
hoelzro oooh SIGABRT 20:52
my favorite signal
(not really)
[Coke]: is that on hack? or locally?
20:56 rjt_pl left, FROGGS left 21:01 pullphinger left
[Coke] locally. 21:02
the daily runs for hack are still one test at a time.
21:04 xfix left
dalek ast: cfdc4ba | usev6++ | S05-metasyntax/ (3 files):
Replace some more eval-dies-ok with throws-like
21:07
ast: abae977 | usev6++ | S05-mass/rx.t:
Remove duplicate tests and use throws-like for unique tests

looks like the duplicates resulted from commit a179684d
lizmat my $h = open("file"); for $h.words { .say; last }; for $h.words { .say; last } # can we expect this to work? 21:09
in the sense that if the file consisted of "one two", the second for would say "two"
21:11 sufrostico left
hoelzro that seems like it should work to me 21:13
PerlJam lizmat: I would expect it to work.
lizmat PerlJam: but how?
note that these are 2 Seq 21:14
PerlJam magic :)
lizmat ah, ok
I'm inclined to disallow $handle.words for now, until we fix this 21:15
$file.IO.words is fine
hoelzro what about $h.lines?
same idea, right?
21:15 diana_olhovik left
hoelzro would you remove that too? 21:15
lizmat that's fine too: the current line pointer matches the file pointer
.words reads in 64K batches
masak to be honest, I wouldn't expect .words on a file handle in the first place. 21:16
lizmat indeed, my point :-)
masak I can understand reading bytes/characters/lines from a file handle.
words? not so much.
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)
PerlJam: :P
PerlJam: well, except that's not true either. because that'd return an empty word for "foo bar"
PerlJam details, details. 21:18
lizmat ??? masak: you mean "foo bar" being 1 word ??
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
second way it wouldn't work: "\t" is whitespace, but would count as part of a word if we just have eol=" "
lizmat well, if PerlJam thinks about it as the eol being \s+ , then he'd be right :-) 21:20
masak aye.
that presupposes eol being able to be a regex, tho' :)
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 / )
PerlJam: ok, given eol = /\s+/, and given that such a feature exists, I agree with you. 21:22
21:23 TimToady left
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:23
21:24 TimToady joined
masak +1 21:26
dalek kudo/nom: 26cf7ae | lizmat++ | src/core/IO/Handle.pm:
Make $handle.words(:!close) a NYI for now

See irclog.perlgeek.de/perl6/2015-09-24#i_11271535
21:29
ast: ef0b15f | usev6++ | S05-mass/rx.t:
Replace more eval-dies-ok with throws-like

also remove two more duplicate tests
21:30
dnmfarrell "6mas" heh 21:31
21:41 vendethiel left
skids
.oO(is RT#123766 the "fixmas list" then?)
21:41
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=123766
21:42 [Sno] joined
[Coke] Util++ is going to check out the parrot-nqp failures. 21:44
skids++
21:44 adu left
dalek ast: 5bb81e8 | lizmat++ | S16-io/words.t:
First stab at IO::Handle.words tests
21:44
kudo/nom: 4653d98 | lizmat++ | t/spectest.data:
Add IO::Handle.words tests
21:45
leont is trying to detect double entries in a list of pairs (before making a hash out of it). 21:51
Is @pairs.classify(*.key).grep(*.value.elems > 1).map(*.key) a sensible way to do that?
masak looks like.
lizmat leont: so you're not interested in unique pairs, but the ones that are seen more than once? 21:52
leont Yes
It's an error condition in my case 21:53
lizmat feels like a flag to .unique should to the trick ;-)
or maybe a not-unique ?
masak this also works: 21:54
m: my @a = foo => 1, bar => 2, foo => 3; say so any((my %).push(@a).values) ~~ Array
camelia rakudo-moar 26cf7a: OUTPUT«True␤»
masak but I guess it's a bit risky if you actually have Array values in your pairs.
patrickz What happened to zef? Last commit looks like lots of frustration...
yoleaux 11:46Z <jdv79> patrickz: i am slowly working on cpan stuff
11:52Z <jdv79> patrickz: and it may be "done" by xmas, btw
patrickz jdv79++ (persistence on CPAN work) 21:55
masak lizmat: definitely not a flag on .unique ;)
lizmat masak: yeah, I realised that too
masak and .not-unique sounds like a not-optimal name... hm. 21:56
something like .repeats
leont A way to count may be more general purpose
masak oh! Bag!
we have this already.
lizmat leont: indeed, that's a bag
masak leont++ # jogging my brain into the right direction
yeah, we should work at making all possible coerces work right, and then all this'll fall out 21:57
m: my @a = foo => 1, bar => 2, foo => 3; say so any(@a>>.key.Bag.values) > 1
camelia rakudo-moar 26cf7a: OUTPUT«True␤»
21:57 AlexDaniel left
leont I hadn't thought of a bag, but that kind of makes sense 21:57
masak leont: ^ shorter solution, using Bag
note >>.key -- because .keys would get me the indices of @a (0 1 2), whereas I want the keys of the element pairs. 21:58
21:58 pmurias left, _dolmen_ left 21:59 thou joined, patrickz left
lizmat leont: would a => "foo" and a => "bar" be the same in this scheme, or not ? 22:00
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 abaugher left
leont fg 22:01
lizmat then a bag is not what you want
22:01 abaugher joined
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.
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 rindolf left
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:03
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 thou left
masak maybe we'll end up with ".reps" or something :) 22:04
ShimmerFairy: I'd be fine with ".dups", too.
or maybe it Huffman-deserves the longer ".duplicates"
lizmat implementation wise it would be a cat license of .unique
*cat license job 22:05
masak figure/ground, yes
ShimmerFairy (and yes, fwiw I don't think the reasoning behind .uniq -> .unique is _that_ strong for the renaming)
leont Current solution is @pairs􏿽xBB.key.Bag.grep(*.value > 1)􏿽xBB.key;
22:05 synbot6 left
masak lizmat: much like .split and .comb, which are two different methods 22:05
leont: ah, you were interested in which ones, too? cool.
ShimmerFairy cat license? 22:06
leont Being able to give helpful error messages is always a good thing
lizmat ShimmerFairy: www.youtube.com/watch?v=pnq96W9jtuw
ShimmerFairy ah :) 22:07
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:08
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:09
22:10 AlexDaniel joined
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:10
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 sv.wikipedia.org/wiki/Grep ... which can be used to get things out of haystacks
leont was surprised by Bag.grep returning a Seq, though it's kind of making sense
lizmat m: 1.grep.WHAT>say
camelia rakudo-moar 26cf7a: OUTPUT«5===SORRY!5===␤Argument to "say" seems to be malformed␤at /tmp/yoHokbb9n1:1␤------> 031.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…»
lizmat m: 1.grep.WHAT.say
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␤␤»
lizmat m: (1).grep.WHAT.say
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␤␤»
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␤␤»
leont m: (1,).grep(* ==1).WHAT.say
camelia rakudo-moar 26cf7a: OUTPUT«(Seq)␤»
lizmat m: 1.grep(*>1).WHAT.say
camelia rakudo-moar 26cf7a: OUTPUT«(Seq)␤»
lizmat there you go :-)
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:14
leont: and, dually, a sequential type starts talking about its numerical indices if you ask it about its keys. 22:16
it's all quite nice and consistent :)
leont It is consistent, I'm not saying it's wrong, it's just that I had to readjust my expectations
lizmat sleep&
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
I sometimes feel the same way about the Swartzian transform.
and also about people abusing complex numbers as poor-man's pairs.
22:20 cognominal left
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:20
so it feels like there's something inessential introduced in the solution, short as it may be. 22:21
22:23 rurban left 22:24 tokuhiro_ joined 22:28 tokuhiro_ left
masak 'night, #perl6 22:28
22:29 RabidGravy left 22:34 dnmfarrell left 22:45 kid51 joined 22:50 rurban joined 22:59 rurban left 23:01 adu joined 23:07 rurban joined 23:10 DarthGandalf joined 23:12 raiph joined
japhb m: my @p = foo => 6, bar => 8, foo => 7; @p».key.Bag».pred.Bag.keys 23:14
camelia ( no output )
japhb m: my @p = foo => 6, bar => 8, foo => 7; @p».key.Bag».pred.Bag.keys.say
camelia rakudo-moar 4653d9: OUTPUT«(foo)␤»
japhb No grep needed. :-)
23:17 joshin_ joined 23:18 BenGoldberg joined 23:25 tokuhiro_ joined 23:27 [particle] left 23:29 tokuhiro_ left 23:32 AlexDaniel left 23:35 joshin_ left 23:39 spider-mario left 23:48 thou joined 23:52 thou left 23:56 espadrine left, khw left 23:59 khw joined