Geth nqp: 0c2d2e7fc3 | (Samantha McVey)++ | 6 files
Update qregex tests to allow backend specific todo's

Previously :pge<comment> would todo under all backends. This has been changed to :any<comment>. It will also allow todoing under specific backends as well
  (jvm and moar currently supported).
01:10
nqp: 1e4c6099ff | (Samantha McVey)++ | 2 files
01-qregex.t add ability to todo a specified number

Also todo some JVM tests related to :i with ligatures.
nqp: 22fda51d60 | (Samantha McVey)++ | 6 files
Merge pull request #348 from samcv/qregex_tests

Update qregex tests to allow backend specific todo's
samcv so is it ok for me to remove all of the # todo :pugs<feature> in the nqp tests or no? 01:12
timotimo yeah, pugs has been gone for so long, it's safe 01:18
Geth nqp: bb04e11bdb | (Samantha McVey)++ | 5 files
Remove references of pugs from qregex tests

Concensus seems that this is sufficiently old that we can remove these TODO's for these tests. Also of note is that even if pugs was running, the tests would not actually TODO under pugs.
04:40
nqp: 9f65489d6b | (Samantha McVey)++ | t/moar/09-concat.t
[moar] Add a test for concat returns correct NFG string

Also test that it returns the correct charcount.
This was added to increase coverage as well as to get better testing for concat functions that concat two strings which change under normalization.
Such as \r\n and a + diacritic
samcv timotimo, ok started to add some concat tests involving \r\n as well as diacritics
Geth nqp: 17212d2101 | (Samantha McVey)++ | tools/build/MOAR_REVISION
Bump MoarVM to get concat speed + more than 30% with some jobs

Speed up concatenation with control character at the joining ends of the string.
477e023b Optimize MVM_nfg_is_concat_stable to speed up concatenation of strings cac2a57c Do not set use rpath if installing into proper system locations
07:26
¦ nqp: version bump brought these changes: github.com/MoarVM/MoarVM/compare/2...-g029d1218
rakudo/nom: 027aa544e8 | (Samantha McVey)++ | tools/build/NQP_REVISION
Bump NQP/Moar to get concat speed + more than 30% with some jobs

Speed up concatenation with control character at the joining ends of the string, plus the other commits that have happened since.
17212d21 Bump MoarVM to get concat speed + more than 30% with some jobs 9f65489d [moar] Add a test for concat returns correct NFG string ... (8 more lines)
07:30
¦ rakudo/nom: version bump brought these changes: github.com/perl6/nqp/compare/2017....-g17212d21
nqp: 4e2ee32303 | (Samantha McVey)++ | .travis.yml
Travis CI JVM passes so don't ignore failures anymore

JVM testing has been fixed from one of my previous commits, so it is okay for us to remove the `allow_failures` line for JVM.
07:40
[Tux] This is Rakudo version 2017.03-20-g027aa544e built on MoarVM version 2017.03-7-g029d1218 07:57
csv-ip5xs 3.167
test 12.509
test-t 4.975 - 5.091
csv-parser 12.726
samcv is that less than it was before [Tux] ? 07:59
heh did the version bump to try and get my speed improvement in there. may have no change depending on the code
hmm looks about the same. numbers seem to fluctuate a bit around 4.9 08:00
[Tux] same within noise
huggable: speed
huggable [Tux], tux.nl/Talks/CSV6/speed4.html
samcv speeds up JSON::Fast 30% on a document with \r\n line endings at least 08:01
and probably speeds up the concatenatieon even more than that in certain cases
[Tux] tux.nl/Talks/CSV6/images/test-t-6.png 08:02
Geth roast: 8eff4844f3 | (Elizabeth Mattijsen)++ | S05-modifier/ignorecase.t
Don't need to test 'st' case twice
08:56
gfldex m: class C {}; use MONKEY; augment class C { has $.baggage; }; my C $s .= new(baggage => 'foo'); 09:38
camelia P6opaque: no such attribute '$!baggage' in type C when trying to get a value
in block <unit> at <tmp> line 1
gfldex this should either warn (in the augment block) or work
IOninja buggable: speed 10:02
buggable IOninja, ▁▁▂▁▂▁▁▁▁▁▂▁▂▂▂▂▂▂▂▁▂▁▁▃▂▂▂▂▂▁▁█▂▂▃▁▁▁▁▁▁▁▁▁▁▁▁▁▂▁ data for 2017-02-28–2017-03-22; range: 4.829s–7.664s
lizmat gfldex: if you BEGIN the augment ? 10:08
IOninja irclog.perlgeek.de/perl6-dev/2017-...i_14303344 10:11
Actually, indeed that would've been the case but that line of code had TWO bugs. Second one is the assumption Proc.Bool is `$!exitcode`, when it's actually `$!exitcode == 0` 10:12
So the already-broken result was always inverted
dogbert17 o/ 11:35
anyone, |Tux| in particular ever seen this before: 'Deprecated use of %*LANG<MAIN> assignment detected in use; module should export syntax using $*LANG.define_slang("MAIN",<grammar>,<actions>) instead 11:36
(value in braid: Perl6::Grammar, value in %*LANG: Perl6::Grammar+{Tuxic})
lizmat maybe you should update your Slang::Tuxic ? 11:39
I seem to recall FROGGS fixing it to support the new slang API 11:40
or was it TimToady ?
dogbert17 tries 'zef install --force Slang::Tuxic' 11:41
Installing: Slang::Tuxic:ver('0.0.1'):auth('github:FROGGS') ... 11:42
and the warning still shows up
lizmat :-( 11:43
please file an issue :-)
dogbert17 will do
lizmat and/or a PR :-)
the change should be fairly small
dogbert17 hmm :) 11:44
lizmat: doing any cool optimizations atm? 11:45
lizmat gist.github.com/lizmat/1c80d2210ae...18fca7e575
dogbert17 that look hypercool :) 11:52
*looks
so that code works even before jnthn has fixed up race and hyper? 11:54
lizmat it's another approach to it
dogbert17 ah
lizmat it would need to make .hyper and .race act more like macro's 11:55
dogbert17 so you're waiting for comments from jnthn
timotimo you can still do that kind of API with just making the methods "intelligent"
dogbert17 o/ timotimo 11:56
timotimo o/
dogbert17 lizmat: is harness6 still working for you?
lizmat dogbert17: yes, waiting for comments :-) 11:57
lizmat checks
timotimo i.e. .hyper would return a HyperMethodSponge that will soak up methods called on it until something that's supposed to go from hyper to eager semantics happens
at that point it'll recall what methods with what arguments were called and set up a pipeline from those
DrForr A .squeeze method would be apporpriate there :) 11:58
*appropriate 11:59
timotimo don't appropriate that method 12:00
lizmat timotimo: how would you do that ?
I mean, how can a method know which methods it gets called on it ? 12:01
moritz has anybody considered an approach where we separate the storage of the lists/seqs from the evaluation methods?
timotimo let me whip up a one-line eval real quick
lizmat moritz: isn't that what I'm doing ?
moritz lizmat: dunno, I didn't backlog enough :/ 12:02
lizmat dogbert17: at first try, works fine by me
moritz: check out my gist: gist.github.com/lizmat/1c80d2210ae...18fca7e575
timotimo m: class Sponge { has @.calls; has $.target; method !newsponge($meth, $args) { my @newcalls = @calls[]; @newcalls.push($meth => $args); Sponge.new(calls => @newcalls, :$.target }; method map(&block) { self!newsponge("map", \(&block)); }; method grep($matcher) { self!newsponge("grep", \($matcher)) } }; my $bucket = "Hello"; Sponge( target => $bucket).map("hi").grep("lol").map("transform!!").perl.say 12:04
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '@calls' is not declared. Did you mean '@!calls'?
at <tmp>:1
------> 3ewsponge($meth, $args) { my @newcalls = 7⏏5@calls[]; @newcalls.push($meth => $args)
timotimo m: class Sponge { has @.calls; has $.target; method !newsponge($meth, $args) { my @newcalls = @.calls[]; @newcalls.push($meth => $args); Sponge.new(calls => @newcalls, :$.target }; method map(&block) { self!newsponge("map", \(&block)); }; method grep($matcher) { self!newsponge("grep", \($matcher)) } }; my $bucket = "Hello"; Sponge( target => $bucket).map("hi").grep("lol").map("transform!!").perl.say
camelia 5===SORRY!5=== Error while compiling <tmp>
Unable to parse expression in argument list; couldn't find final ')'
at <tmp>:1
------> 3ponge.new(calls => @newcalls, :$.target 7⏏5}; method map(&block) { self!newsponge("
timotimo m: class Sponge { has @.calls; has $.target; method !newsponge($meth, $args) { my @newcalls = @.calls[]; @newcalls.push($meth => $args); Sponge.new(calls => @newcalls, :$.target) }; method map(&block) { self!newsponge("map", \(&block)); }; method grep($matcher) { self!newsponge("grep", \($matcher)) } }; my $bucket = "Hello"; Sponge( target => $bucket).map("hi").grep("lol").map("transform!!").perl.say
camelia Cannot coerce to Sponge with named arguments
in block <unit> at <tmp> line 1
timotimo oh yes
m: class Sponge { has @.calls; has $.target; method !newsponge($meth, $args) { my @newcalls = @.calls[]; @newcalls.push($meth => $args); Sponge.new(calls => @newcalls, :$.target) }; method map(&block) { self!newsponge("map", \(&block)); }; method grep($matcher) { self!newsponge("grep", \($matcher)) } }; my $bucket = "Hello"; Sponge.new( target => $bucket).map("hi").grep("lol").map("transform!!").perl.say
camelia Type check failed in binding to '&block'; expected Callable but got Str ("hi")
in method map at <tmp> line 1
in block <unit> at <tmp> line 1
timotimo right 12:05
lizmat updated the gist to handle cases where a worker would produce an empty list
timotimo m: class Sponge { has @.calls; has $.target; method !newsponge($meth, $args) { my @newcalls = @.calls[]; @newcalls.push($meth => $args); Sponge.new(calls => @newcalls, :$.target) }; method map(&block) { self!newsponge("map", \(&block)); }; method grep($matcher) { self!newsponge("grep", \($matcher)) } }; my $bucket = "Hello"; Sponge.new( target =>
camelia 5===SORRY!5=== Error while compiling <tmp>
Preceding context expects a term, but found infix => instead
at <tmp>:1
------> 3$bucket = "Hello"; Sponge.new( target =>7⏏5<EOL>
timotimo $bucket).map({"hi"}).grep("lol").map({"transform!!"}).perl.say
dang
it split it across two lines
jnthn lizmat: fwiw, I was already handling that without any macro-ish stuff needed in github.com/rakudo/rakudo/blob/nom/...yperSeq.pm and github.com/rakudo/rakudo/blob/nom/...terator.pm and so forth 12:06
yoleaux2 09:36Z <lizmat> jnthn: I left some comments with gist.github.com/lizmat/b76e88519b7...0941bb6e6a
11:18Z <lizmat> jnthn: a new gist: gist.github.com/lizmat/1c80d2210ae...18fca7e575
11:19Z <lizmat> jnthn: this version created R:It.(Hyper|Race)Actions iterators, that take a list of method => capture pairs to execute: so no special casing needed anymore
11:21Z <lizmat> jnthn: from where I sit, we only need to fix the syntactic sugar for transforming .hyper.map(foo).grep(bar) to R:It.HyperActions( , (map => \(foo), grep => \(bar) )
jnthn I don't think it should be done as syntax sugar
Doubly so when I already showed it can be done without. :P
timotimo m: gist.github.com/timo/d176e52ae8ef1...63e370a7b9 12:07
camelia Sponge.new(calls => [:map(\(-> ;; $_? is raw { #`(Block|62564352) ... })), :grep(\("lol")), :map(\(-> ;; $_? is raw { #`(Block|62565144) ... }))], target => "Hello")
timotimo have a sponge
lizmat timotimo: but that would involve needing to support all methods in the world in the sponge, or provide a FALLBACK I suppose 12:08
timotimo right
we have to differentiate what a method would do anyway
for example a .eager would kick us out of a hyper pipeline
and .list and .Supply and what have you, those all need to go out of sponge mode directly 12:09
and methods that aren't supposed to exist in the first place should throw exceptions immediately
in the case of the hyperseq thing, HyperSeq would be Sponge, btw
lizmat timotimo: but how can you know?
timotimo BBIAB
lizmat ack
timotimo HyperSeq knows
Sponge is just a demonstration of the pattern
lizmat yeah, got that 12:10
timotimo also, as jnthn said just now, it wouldn't even have to do the thing with the @.calls, just copy his impl of HyperSeq and HyperIterator "and so forth" i guess
lizmat timotimo: but my approach is very different from jnthn's 12:11
although I could see HyperSeq actiing like a Sponge :-) 12:12
jnthn Yeah, I need to look properly at what lizmat++ is proposing and figure out the advantages/disadvantages compared to what I was originally planning 12:13
Though to me, a model where requesting the .iterator is the point that you fall out of the parallel pipeline and actually make work happen is nice in that it naturally handles a bunch of questions 12:14
[TuxCM] dogbert17, github.com/FROGGS/p6-Slang-Tuxic/pull/3 12:15
jnthn And everything that works in terms of .cache or .list will, in that model, simply work using the sequential iterator
So we don't need to special-case stuff like .eager and .perl and so on
[TuxCM] github.com/FROGGS/p6-Slang-Tuxic/c...e9b1985709
jnthn lunch; bbi20 12:16
dogbert17 [TuxCM]: doesn't that mean the the problem shouldn't show up? 12:24
lizmat perhaps it still installed the old version ? 12:25
zef update or something maybe ? 12:26
dogbert17 lizmat: maybe I'm stupid but it seems to use both approaches no? github.com/FROGGS/p6-Slang-Tuxic/b...xic.pm#L49 12:27
lizmat perhaps we need a quietly in there ? 12:28
quietly try ...
m: try warn "foo"
camelia foo
in code at <tmp> line 1
lizmat m: quietly try warn "foo"
camelia ( no output )
dogbert17 ah, so a quietly on the first/old approach then 12:29
lizmat yup :-) 12:32
[Coke] ugexe: (Zef not zef) - ok, still a bug I think that you end up with a bunch of "Nil in string context" errors. 12:33
yoleaux2 21 Mar 2017 22:21Z <IOninja> [Coke]: I built 2017.02 Rakudo and old (a507fbb) zef commit and it still has those warnings. It makes me think there's something bustified in the ecosystem JSON
21 Mar 2017 22:47Z <IOninja> [Coke]: re warnings in zef: irclog.perlgeek.de/perl6-dev/2017-...i_14303217
timotimo is anybody running a 4.10 linux kernel? 13:01
tadzik I will when I reboot :P 13:02
timotimo i wonder if i should just grab a kernel of that version from a testing repo or a copr, or heck build it myself
because 4.10 has perf c2c 13:03
i've been itching to try that out for a while now
lizmat m: sub a(\method) { dd method } # grin 13:07
camelia 5===SORRY!5=== Error while compiling <tmp>
Missing block
at <tmp>:1
------> 3sub a(\method) { dd method 7⏏5} # grin
lizmat m: sub a(\sub) { dd sub } # grin 13:08
camelia 5===SORRY!5=== Error while compiling <tmp>
Missing block
at <tmp>:1
------> 3sub a(\sub) { dd sub 7⏏5} # grin
expecting any of:
new name to be defined
lizmat I guess method and sub are hardcoded in the grammar :-)
timotimo sure 13:09
we might want to warn about that ...
but you can work around it, of course
m: sub a(\sub) { dd ::('sub') } 13:10
camelia ( no output )
lizmat yeah, no problem
timotimo m: sub a(\sub) { dd ::('sub') }; a({ say "woop" })
camelia -> ;; $_? is raw { #`(Block|39092024) ... }
lizmat just use another name or sigili it
m: sub a($sub) { dd $sub } # fine
camelia ( no output )
timotimo well, you can get the same behavior as the \ sigil with "is raw", but my point is you don't need to do that
unless
you refer to ::(' as a sigil ')
lizmat yeah, it was just unexpected :-) 13:11
a bit of a wat :-)
nothing I can't work around :-)
timotimo we can put a piece of code into the part that generates that error
and check if there's a lexical variable with that name around 13:12
lizmat no worries... am in a flow to get hyper and race working well :-)
using a sponge :-) 13:13
timotimo: a ^add_method causes a global deopt, right ? 13:14
also: can I safely do an existskey on a hash from several threads if one of the threads may be adding to it ? 13:15
timotimo not sure 13:19
existskey might be safe
lizmat and atkey ? 13:20
I'll just wrap the whole logic into a protect block to be on the safe side
timotimo oh wait
if one of the threads is adding to it, then you're toast
lizmat yeah, ok, wrapping it completely then :-) 13:21
timotimo in the future we'll have a plan that won't crash you when you do that 13:25
you'll just get out-of-date data
lizmat cool, but I'll just protect that code now :-) 13:27
timotimo yup
lizmat is enjoying herself :-) 13:34
ugexe [Coke]: thats not a pattern unique to zef. try doing `use Distribution-Name-Without-Matching-Module-Name` (`use zef`, `use Net::HTTP`) 13:35
you'll get the same error right from rakudo
[Coke] sure, but as a user of zef, I shouldn't be exposed to that. 13:36
ugexe should any user be exposed to those Nil errors if they `use Some::Module`? 13:37
[Coke] ... and let me back track that immediately and ask nine to fix it. :)
m: use barf 13:38
camelia ===SORRY!===
Could not find barf at line 1 in:
/home/camelia/.perl6
/home/camelia/rakudo-m-inst-1/share/perl6/site
/home/camelia/rakudo-m-inst-1/share/perl6/vendor
/home/camelia/rakudo-m-inst-1/share/perl6
CompUnit::Reposi
[Coke] ugexe: looks like the errors only come when you try to print the result. 13:39
(e.g. in the REPL) - so what is zef doing with the result of a use that is triggering the Nil error?
m: say { use barf } 13:40
camelia ===SORRY!===
Could not find barf at line 1 in:
/home/camelia/.perl6
/home/camelia/rakudo-m-inst-1/share/perl6/site
/home/camelia/rakudo-m-inst-1/share/perl6/vendor
/home/camelia/rakudo-m-inst-1/share/perl6
CompUnit::Reposi
[Coke] m: BEGIN say { use barf }
camelia ===SORRY!===
Could not find barf at line 1 in:
/home/camelia/.perl6
/home/camelia/rakudo-m-inst-1/share/perl6/site
/home/camelia/rakudo-m-inst-1/share/perl6/vendor
/home/camelia/rakudo-m-inst-1/share/perl6
CompUnit::Reposi
ugexe zef install Net::HTTP && perl6 -e 'use Net::HTTP'
or just `use zef;`
[Coke] (get the bad error locally with ' perl6 -e 'say {use zef}' ')
ugexe: ok, but "perl6 -e 'use zef'" doesn't generate that error. 13:41
ugexe it does for me
[Coke] ah. there is a difference locally between:
'use zef' and 'use barf' - zef gives the error, barf does not.
ugexe `Use of Nil in string context` is what you mean right?
[Coke] barf gives the useful error.
zef gives the "Use of Nil" error. 13:42
ZEF also gives the useful error
ugexe but yeah, barf is properly ignored. `zef` is not because it matches a distribution name (it doesnt get checked if it actually provides a zef.pm that can be used)
from rakudos perspective
[Coke] (distribution name) ah, that's the key point. danke. 13:44
ugexe yeah, it happens with Net::HTTP because thats *only* its distribution name - it provides no Net::HTTP module (just Net::HTTP::*)
[Coke] ugexe: RT #131041 13:46
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=131041
[Coke] (my initial efforts at gathering data were confused by me using zef in one place and barf in another and expecting them to be the same. :) 13:47
.ask nine if he can look at rt.perl.org/rt3//Public/Bug/Displa...?id=131041 13:49
yoleaux2 [Coke]: I'll pass your message to nine.
[Coke] synopsebot6: owner? 13:50
synopsebot6: code?
synopsebot6: help
synopsebot6: .
bah
timotimo it me 14:06
what's wrong with it?
[Coke]: what's wrong with synopsebot6? 14:33
Zoffix_ lizmat, is there stuff from newio you think we still can and should bring back to 6.d? Since 6.d is additive to 6.c, looks like most of that stuff can't be transfered? There's one thing that I think is a wrong way to go and lots of stuff hinges on it: IO::Pathy's assumption that (or caching of info that) if an object exists that it'll continue to exist, yet it can be deleted by other programs or even 16:09
another IO::Pathy. So this means `.e` on IO::File, IO::Dir, and IO::Local (what does ::Local represent?) will lie and just give the cached result. Is IO::Huh meant to play a role in this? (I tried a few commits but can't find one that doesn't have merge conflicts and compiles, so I can't play with the a newio rakudo). Basically, I don't know the masterplan behind here; you do. What should I and can bring
to 6.d?
.tell lizmat some questions: irclog.perlgeek.de/perl6-dev/2017-...i_14307060 16:10
yoleaux2 Zoffix_: I'll pass your message to lizmat.
ugexe i think IO::Huh was meant to allow something like IO::File.new(uri => ...) to work, which intended to let you supply your own reader/writer essentially 16:20
all i remember from newio stuff was IO::File.new(uri => ...) and how I thought that would have been cool
lizmat Zoffix_: I'm pretty burned out on newio: take of it what you like, or dump the whole thing 16:24
yoleaux2 16:10Z <Zoffix_> lizmat: some questions: irclog.perlgeek.de/perl6-dev/2017-...i_14307060
lizmat sometimes the journey is more important than reaching the goal
Zoffix_ Noted. 16:27
ugexe the other IO thing i'd really like to see is IO::Socket to be IO::Handle 16:29
or at least an IO interface for dealing with a a file handle *or* socket data
jdv79 its all about the journey
Zoffix_ IO::Socket* stuff is out of scope of the grant. 16:30
A lot of people requested Unix sockets too 16:31
lizmat .tell jnthn almost completely functional .hyper / .race: gist.github.com/lizmat/6256f191369...95e7f5b5f2
yoleaux2 lizmat: I'll pass your message to jnthn.
ugexe for $900 I figure everything you're doing is out of scope lol 16:32
lizmat .tell jnthn had to call it hijper / rees because you can't augment a role
yoleaux2 lizmat: I'll pass your message to jnthn.
jnthn lizmat: Please can we *not* write concurrent code in nqp::ops?
yoleaux2 16:31Z <lizmat> jnthn: almost completely functional .hyper / .race: gist.github.com/lizmat/6256f191369...95e7f5b5f2
16:32Z <lizmat> jnthn: had to call it hijper / rees because you can't augment a role
jnthn It's hard enough as it is :) 16:33
lizmat jnthn: is it ok if I keep the processing inside a worker in nqp? 16:34
jnthn Sure, hot path bits are fine
It's just that nqp:: ops makde stuff quite hard to follow
lizmat ok, will rewrite in HLL :-) 16:35
jnthn I'm looking forward to getting our code-gen sorted out enough that we can undo some of them in CORE.setting :)
lizmat as am I :-)
jnthn (Yes, for now it's a decent trade-off.) 16:36
I'm kinda coming around to having both a HyperSeq and RaceSeq 16:37
Since while in some cases the difference will be pretty small (just order retention), in others they're very different
(Such as with .reduce)
And it'd be kinda nice to just let multi-dispatch resolve those.
I wonder if HyperSeq and RaceSeq should also just inherit from Seq also 16:39
Which would save us the FALLBACK 16:40
lizmat hmmm... I've solved that with 2 different iterators internally, with different pull-one/push-all but same sink-all 16:41
[Coke] timotimo: extra / in the URL (rt3//) 17:25
timotimo [Coke]: i'll have a look 17:52
RT #12345 17:55
RT #18401
synopsebot6 Link: rt.perl.org/rt3/Public/Bug/Display...l?id=18401
timotimo it's gone
Zoffix_ m: gist.github.com/zoffixznet/e6dd979...e53700cfb4 18:20
camelia WARNINGS for <tmp>:
Useless use of () in sink context (line 30)
(0 => ("a", "b", "c"), 1 => 4, 2 => 5, 3 => 6).Seq
(0 => ("a", "b", "c"),).Seq
Zoffix_ That's whacked. The only difference between the two methods is the semicolon on line 30
And warning is bogus 18:21
Oh
Right. It's inside the nqp::if() duh. NEVERMIND
nine By now nqp:: ops are probably more natural to lizmat than the Dutch language. 18:32
yoleaux2 13:49Z <[Coke]> nine: if he can look at rt.perl.org/rt3//Public/Bug/Displa...?id=131041
Zoffix_ ZOFVM: Files=1228, Tests=132905, 121 wallclock secs (21.52 usr 3.42 sys + 2343.52 cusr 271.72 csys = 2640.18 CPU) 18:44
Geth rakudo/nom: 5927186d31 | (Zoffix Znet)++ | src/core/Any-iterable-methods.pm
Make Any.maxpairs/.minpairs use `cmp` and return Seq

  ...instead of numeric comparison. Per:
  irclog.perlgeek.de/perl6-dev/2017-...i_14275808
Make them return a Seq instead of an Array, to maintain consistency with Setty.maxpairs/.minpairs and other similar methods that all return Seqs
18:50
roast: 3eff8196a8 | (Zoffix Znet)++ | S29-any/minpairs-maxpairs.t
Add tests for Any.maxpairs/.minpairs

Rakudo fix: github.com/rakudo/rakudo/commit/5927186d31
18:51
rakudo/nom: 8d06b8a13c | (Zoffix Znet)++ | t/spectest.data
Run S29-any/minpairs-maxpairs.t test file
18:52
lizmat nine: very true 18:55
hmmm... how can I find out how "for @a { .say }" is codegenned ? 19:12
hmmm... looks like @a.map: { .say } 19:14
timotimo does it have some kind of magic for single-arg-rule stuff?
lizmat no, if I have something like: for @a.map( ~* ).grep( * %% 2 ) 19:15
it gets codegenned like: for @a.map( ~* ).grep( * %% 2 ).map ... 19:16
jnthn At the moment, yes
lizmat the last .map should serialize, but since it is called on the sponge, it gets parallelized :-(
jnthn I think it passes a :item too
lizmat ah, ok, lemme check :-) 19:17
jnthn The last map should serialize? Really?
jnthn had it as `hyper for @a { }` desugaring to `for @a.hyper { }` fwiw
I think the "for is map" goes deep enough that if the thing you're iterating over is a HyperSeq or RaceSeq then your loop runs in parallel 19:18
Zoffix_ Wondering how to judge what to document and what is an impl. detail. Setty role implements maxpairs/minpairs, but it's just an optimization for Any.maxpairs/.minpairs 19:19
m: class Foo does Setty { method maxpairs { say "hi" } }.new.maxpairs 19:21
camelia 5===SORRY!5=== Error while compiling <tmp>
Cannot have a multi candidate for 'maxpairs' when an only method is also in the package 'Foo'
at <tmp>:1
Zoffix_ m: class Foo { method maxpairs { say "hi" } }.new.maxpairs
camelia hi
Zoffix_ documents it...
lizmat jnthn: sorry, the code would be: for @a.hyper.map( *++ ).grep( * %% 2 ) { ... } 19:24
the implicit .map at the end should serialize, no ?
jnthn lizmat: No, I don't think so
lizmat ah?
we;re talking hyper, not race, right ?
jnthn Either 19:25
I mean, we can decide it should go back to serial mode
lizmat my @a = ^10; for @a.hyper.map( *++ ).grep( * %% 2 ) { .say } # so this shoudn't 0 2 4 6 8 ?
jnthn Depends how we decide to call it. 19:27
If we want to say "for desugars to map, and at statement list level will always .sink" then it would follow that any hyper/race that map chains onto would be contaigous. 19:28
The alternative would be to say that for is not defined in terms of .map, but in terms of .iterator (which is always sequential) 19:29
But then we'd need to decide what `hyper for x { }` and `race for x { }` will mean :)
I didn't give `for` a separate entry in my sheet because I'd just assumed it fell under map 19:30
But it is worth considering if that's really wise, given it feels like an imperative construct
lizmat hyper for x { } should be like for x.hyper { }
jnthn It could be. 19:31
It's worth considering in with this if we *want* to force implementations to desugar `for` into a call to `map` 19:32
Or if (non-hyper/race) would just directly code-gen something that deals with the iterator API
Which would get us a decent speed-up
Though maybe not in the longer term once we get better at optimizing higher-order stuff 19:33
lizmat yeah, I mean, in profiles you don't see the map methods themselves, but the blocks of the iterators 19:34
jnthn Aye
Geth roast: 11626cb3e2 | (Zoffix Znet)++ | S29-any/minpairs-maxpairs.t
Test Setty.maxpairs/.minpairs

  irclog.perlgeek.de/perl6-dev/2017-...i_14307973
jnthn Anyway, seems I can argue `for` more than one way without it sounding unreasonable, so that will need more pondering :) 19:35
The contaigion approach worries me just a bit because of somebody doing `for something() { ...mutate a ton of stuff... }` 19:36
And landing in bother if the something() turns out to return a HyperSeq or RaceSeq
If you're just calling .map on something, well, you have to be open to the fact that it can interpret that method call however it wants 19:37
lizmat perhaps we need an .iterate :-)
jnthn But a `for` gaining parallel semantics might be a bit too muscular
This also makes we wonder if HyperSeq ~~ Seq is really a good idea 19:38
Because then you can't type-constrain on "this is serial"
lizmat from what I see so far, its not
jnthn There are significant commonalities that we'd share between the two, mind 19:39
Maybe we need a Seqqy role :P
lizmat ok, will HLLizing my prototype, I found some issues with for, which I've now fixed in the nqp version
migrating to HLL now and then gisting again
jnthn OK 19:40
jnthn ended up sleeping badly then waking up to a minor bombshell in $other-project, and realized that this just wouldn't be a productive day to try and work on Perl 6 stuffs... 19:41
So shuffled my Perl 6 time tomorrow :)
*to tomorrow 19:42
lizmat oki 19:43
dogbert17 .seen broken-robot 19:57
yoleaux2 I haven't seen broken-robot around.
dogbert17 .seen brokenrobot
yoleaux2 I saw BrokenRobot 13 Jul 2016 15:41Z in #perl6-dev: <BrokenRobot> Challenge accepted! :)
dogbert17 m: say S:g:ii:nth(2) /m/g/ given "Lörem Ipsum Dolor Sit Amet"
camelia P6opaque: no such attribute '$!reified' in type List when trying to get a value
in block <unit> at <tmp> line 1
Geth rakudo/nom: 6a77cda335 | (Stefan Seifert)++ | src/core/CompUnit/Repository/Installation.pm
Give a somewhat more helpful message

When loading a non-existing module that matches a distribution name, we found the distribution but failed to recognize that it doesn't contain a module of that name. We now throw a proper exception in that case. The code is not pretty and could use some re-structuring, but at least works...
19:58
nine [Coke]: ^^^ 19:59
dogbert17 is the syntax used above invalid or is this a regression? 20:02
timotimo i didn't know you can put a space between S and the regexen 20:03
also, how do :g and :nth interact?
m: say S:g:ii:nth(2)/m/g/ given "Lörem Ipsum Dolor Sit Amet"
camelia P6opaque: no such attribute '$!reified' in type List when trying to get a value
in block <unit> at <tmp> line 1
timotimo m: say S:ii:nth(2)/m/g/ given "Lörem Ipsum Dolor Sit Amet"
camelia Lörem Ipsug Dolor Sit Amet
timotimo m: say S:ii:g/m/g/ given "Lörem Ipsum Dolor Sit Amet"
camelia Löreg Ipsug Dolor Sit Aget
timotimo either works, but not both 20:04
dogbert17 timotimo: stole the example from here: perl6.party/post/Perl-6-S---Substi...n-Operator
was trying to educate myself a bit 20:05
perhaps it's simply a typo 20:06
timotimo P6opaque: no such attribute '$
bisectable6 timotimo, On both starting points (old=2015.12 new=6a77cda) the exit code is 1 and the output is identical as well
P6opaque: no such attrib
timotimo er, where did that come from
dogbert17 :)
bisectable: say S:g:ii:nth(2) /m/g/ given "Lörem Ipsum Dolor Sit Amet" 20:07
bisectable6 dogbert17, Bisecting by exit code (old=2015.12 new=6a77cda). Old exit code: 0
timotimo thanks
bisectable6 dogbert17, bisect log: gist.github.com/6c7d160f99cb5e5874...030219c8da
dogbert17, (2017-02-01) github.com/rakudo/rakudo/commit/97...5febb6a547
samcv good * perl6 20:08
dogbert17 I believe the commit is by the author of the article I was reading
o/ samcv
perhaps the intrepid IOninja has an idea or two 20:10
dogbert17 continues reading 20:11
[Coke] nine++ 20:13
quick turnaround time, thanks!
samcv u: { .uniprop('NFG_QC') eq 'M' } 20:15
unicodable6 samcv, Found nothing!
samcv u: { .uniprop('NFG_QC') eq 'N' } 20:20
unicodable6 samcv, U+0000 <control-0000> [Cc] (control character) 20:21
samcv, U+0001 <control-0001> [Cc] (control character)
Zoffix_ m: say WHAT 'mmmmmmm'.match: :ii, :g, /m/ 20:32
camelia (List)
Zoffix_ m: say WHAT 'mmmmmmm'.match: :ii, :2nd, :g, /m/
camelia (Match)
timotimo interesting 20:33
so one part of the code expects ":g means we get a list"
another part of the code says "we have :2nd, so i'll give you just a single match"
and the one part just says nqp::getattr($obj, List, '$!reified)
and bam, end of the world 20:34
Zoffix_ I'd expect the :g with :2nd to continue giving every 2nd match, like CSS's :nth-child
timotimo interesting. and :nd(1, 2, 3) acts like rotor, then?
i mean :nd(1, 2, 3):g
Zoffix_ That just be a regular :g I guess 20:35
Oh wait
Nevermind
I got confused
timotimo oh, right, :nd(1, 2, 3) is a no-op
Zoffix_ Nevermind the "I'd expect" bit
timotimo so would :nd(2, 3) match triples, then give only the 2nd and 3rd of each triplet?
Zoffix_ Seems overengineered? 20:36
:g + :nth should throw maybr?
timotimo *shrug*, if you expect :2nd:g to give every 2nd, how would :g + :nth(,,,) behave? 20:37
Zoffix_ But I then said nevermind that :)
timotimo that's fair
Zoffix_ Cause I was first thinkibg of CSS, but now I remember you use literal `n` in the selector to specify the formula 20:39
timotimo literal n in css you mean?
Zoffix_ Yeah, like :nth-child(2*n) 20:47
:nth-child(2*n+10), etc
timotimo ah, ok
:nth-child(n.is-prime) :P
Zoffix_ Actually, no need for throwage in .match. The options don't really conflict, so I'll change the S/// to not choke on this combination 20:48
timotimo cool
Zoffix_ m: say WHAT 'mmmmmmm'.match: :2nd /m/ 20:50
camelia 5===SORRY!5===
Regex not terminated.
at <tmp>:1
------> 3say WHAT 'mmmmmmm'.match: :2nd /m/7⏏5<EOL>
Regex not terminated.
at <tmp>:1
------> 3say WHAT 'mmmmmmm'.match: :2nd /m/7⏏5<EOL>
Couldn't find terminator / (correspon…
Zoffix_ oops
wc
Side effect of me learning that: if you can't copy-paste a code you tried in #zofbot, prefix the line with /msg #perl6-dev instead :) 20:51
(copy-paste on the phone)
m: S:nth(1, 2)/m/g/ with 'mmmm'; dd WHAT $/ 20:54
camelia Match
Zoffix_ Also wrong, needs to be List
m: 'mmmmmmm'.subst: :nth(1, 2, 3), /m/, 'g'; say WHAT $/ 20:56
camelia (Match)
Zoffix_ hm that too
Ah, that's part of m: 'mmmmmmm'.subst: :nth(1, 2, 3), /m/, 'g'; say WHAT $/
I mean part of rt.perl.org/Ticket/Display.html?id...et-history
timotimo by being crappy to work with, smartphones destroy billions of dollars every year 20:58
dogbert17 Zoffix_: are you hacking Rakudo on your phone :) 21:12
Zoffix_ I could if I had to, as I have an ssh client on my phone. But... now I'm home, so no need to. 21:14
Will fix the S/// bug after dinner.
That's how I talk on IRC from the phone: ssh to server pop open the screen with weechat 21:15
dogbert17 Zoffix_++ cool, I stumbled upon it when reading your article about S///
timotimo Zoffix_: Glowing Bear is a pretty nice weechat frontend, maybe it'll suit your needs at least a little bit 21:16
Zoffix_ bans Penetrate Offensive on Facebook 21:24
Those two posts look really fishy. Like a bot scrapped them, one of them is about Perl 5 not perl6, and all have tracker URLs in videos :/
samcv: do you have a racing car as the home pic on Facebook? There's a Samantha McVey in the banlist.... 21:25
samcv banlist?
yeah that's me. why am i banned 21:26
Zoffix_ dunno, gonna unban you
samcv basically never go on fb
kk
Zoffix_ done
This is the Perl6 FB group fwiw: www.facebook.com/groups/1595443877388632/
samcv yeah i remember going there one day and not being able to get in
without even interacting at all with it
many months ago like a few days after i joined it 21:27
Zoffix_ maybe someone clicked a wrong button...
samcv so somebody banned me >:o
timotimo no paper trail available on facebook? 21:30
Zoffix_ looks 21:32
Nadim Khemir declined Samantha McVey's request to join the group. 21:33
Nov 17, 2016 3:37am
Nadim Khemir blocked Samantha McVey from the group.
Nov 17, 2016 3:37am
Geth roast: 142d6d1946 | (Samantha McVey)++ | S05-modifier/ignorecase.t
Correct typo in todo description for S05-modifier/ignorecase.t
21:36
samcv rude!
Zoffix_ :)
lizmat jnthn et al: updated gist for .race/.hyper prototype: gist.github.com/lizmat/4369e28d6c8...81c4df07af 21:37
this time with more comments and documentation :-) 21:38
and more HLL code :-)
timotimo so much code %) 21:40
did you end up adapting the sponge metaphor?
i see a fallback in there 21:41
hm. good question: what happens if we deopt globally. do we do that properly in a multithreaded context, too? 21:42
lizmat I have *no* idea, but ^add_method in a class from multiple threads feels like a recipe for disaster 21:43
jnthn The FALLBACK and so on shenanigans are fine for prototyping, but shouldn't make it into the real thing :) 21:44
timotimo and i thought fallback always adds methods by itself 21:45
just by virtue of you returning a method object
lizmat jnthn: so you're rather have an ^add_method instead ?
jnthn I'd rather just write methods :P
lizmat ok, fair enough 21:46
jnthn Or rather, find a factoring where we don't need this
lizmat and as it's not needed for prototyping anymore, I'll remove it
timotimo that worked out quick! :D
jnthn I think if HyperSeq is not a kind of Seq, then we'll want a place to put the sequential commonalities they share 21:47
I don't really understand why gist/perl/Str end up in the concurrent chain at all 21:48
timotimo it's very hard to make a .perl that will roundtrip :D
jnthn Though probably 'cus I didn't read enough of it yet :)
I'd really like the serial methods to just work off .iterator though 21:49
lizmat timotimo: if I don't provide a .perl, all I get is ConcurrenChain.new in .perl
as it is not a subclass of Seq
jnthn Oh, wait, it's not putting them into the concurrent chain
Yeah, and it is doing self.iterator in there 21:50
lizmat yup
jnthn So I think it is doing what I expected
OK, good
timotimo ah, right 21:51
lizmat hmmm... should we handle hypering .grep( :kv ) ? 21:55
jnthn Yes, that and a long list of other things become...terribly good fun :P 21:57
timotimo doesn't immediately see it
lizmat the k's from kv would be relative to the chunk
jnthn lizmat: Does it handle .repeated across buffer boundaries, and .unique across buffers? 21:58
(If so, I didn't figure out where)
lizmat jnthn: simplest way would be to serialize those methods for now 21:59
we would need to special case those 22:01
jnthn I fear in reality we actually ahve to special-case *all* of them
Even map and grep (consider the LAST phaser) 22:02
And use, sequential fallback in order to get correct results is of course an important strategy :)
*And yes
lizmat ok, so if we know that the block doesn't have a LAST phaser :-)
jnthn I'll continue looking tomorrow, otherwise I fear I'll lay awake all night thinking about this :-) 22:03
lizmat yeah, know the feeling :-) 22:04
for .unique it would be nice if we had a ConcBlockingHash repr, then we'd only need to plug that in 22:14
timotimo it'd be neat if we could pre-size hashes 22:15
but concurrent additions to a hash aren't safe either way
so ... it'd end up actually useless
lizmat wrt to LAST phaser, I don't really see a solution to that 22:18
due to the nature of iterators, when we fill a buffer completely, we cannot know whether the last value in the buffer was the last value produced by the iterator or not 22:19
timotimo can the coordinator give that info out to the worker that gets the buffer that was grabbed from the end?
Zoffix m: dd WHAT 'abcd'.match: /./, :3x; dd WHAT 'abcd'.match: /./, :1x; dd WHAT 'abcd'.match: /./, :th(1,2,3); 22:22
camelia List
List
List
Zoffix m: dd WHAT 'abcd'.match: /./, :th(1);
camelia Match
Zoffix That's a bit inconsistent :/
The :1x case returning a List, I mean. 22:23
Zoffix_ s: 'abcd'.match, \(/./, :1x) 22:24
SourceBaby Zoffix_, Something's wrong: ␤ERR: Cannot resolve caller match(Str: ); none of these signatures match:␤ (Any:U $: | is raw)␤ (Cool:D $: $target, *%adverbs)␤ (Str $: Cool:D $pattern, |c is raw)␤ (Str $: Regex:D $pattern, :continue(:$c)!, *%_)␤ (Str $: Regex:D $pattern, :pos(:$p)!, *%_)␤ (Str $: Regex:D $pattern, :global(:$g)!, *%_)␤ (Str $: Regex:D $pattern, :overlap(:$ov)!, *%_)␤ (Str $: Regex:D $pa
Zoffix_ s: 'abcd', 'match', \(/./, :1x)
SourceBaby Zoffix_, Sauce is at github.com/rakudo/rakudo/blob/6a77...r.pm#L1027
lizmat m: my @a = ^10; dd @a[5].WHAT; dd @a[5,].WHAT
camelia Int
List
22:25
lizmat Zoffix_ # ^^ similar situation
specification of the :th parameter implies returning a List
Zoffix_ lizmat: you mean :x? Because if :th is an int, it returns 1 Match 22:27
lizmat ah, I was confused 22:28
that could be a bug :-)
Zoffix_ Looks like a simple fix though. Just a [0] here? github.com/rakudo/rakudo/blob/6a77...tr.pm#L914
.[0] on the return value
s: 'abcd', 'match', \(/./, :x(1e200)) 22:29
SourceBaby Zoffix_, Sauce is at github.com/rakudo/rakudo/blob/6a77...r.pm#L1027
Zoffix_ m: 'abcd'.match(/./, :x(1e200) 22:30
camelia 5===SORRY!5=== Error while compiling <tmp>
Unable to parse expression in argument list; couldn't find final ')'
at <tmp>:1
------> 3'abcd'.match(/./, :x(1e200)7⏏5<EOL>
Zoffix_ m: 'abcd'.match(/./, :x(1e200))
camelia Cannot unbox 665 bit wide bigint into native integer
in block <unit> at <tmp> line 1
Zoffix_ hehe
Oh, no I'm wrong. 22:31
If x == 1 then do it
Eh, not a priority
Zoffix_ goes back to writing tests for S///
m: dd 'abcd'.subst: /./, *.uc, :2nd, :3rd; 22:32
camelia "abCd"
Zoffix_ can totally see someone writing that :(
lizmat: which did you mean was the bug? That :1x returns a List or that, say, :2nd returns a Match instead of a List? 22:33
lizmat x always implies a List 22:34
Zoffix_ OK. Then there's no bug. 22:35
lizmat :th always implies a single element
so, indeed, no bug, I don't think
Zoffix_ :th(1, 2, 3) is a List tho
gah, netsplit... 22:59
Geth kudo/nom: 43e09022b8 | (Zoffix Znet)++ | src/Perl6/Actions.nqp
Fix List-$/ adverb handling in S/// and s///

The code makes the assumption that only :g/:global adverbs can cause a List return value from Str.match. However, :th(1, 2, 3) and :x(5) adverbs return a list, and :g mixed with :42nd returns just 1 Match. The first two cause incorrect results in $/. The last one causes a crash when we try to treat a Match object as a List. ... (6 more lines)
roast: 3846dc460a | (Zoffix Znet)++ | S05-substitution/subst.t
Test List/Match-$/ adverbs on S/// and s///

Rakudo fix: github.com/rakudo/rakudo/commit/43e09022b8 Bug find: irclog.perlgeek.de/perl6-dev/2017-...i_14308172
23:00
Zoffix dogbert17: ^ that should fix your issue 23:01
Zoffix is a bit scared fix compiled and worked right the first time... 23:02
dogbert17 Zoffix++, agree that things working first time is a bit scary 23:04
lizmat m: dd ^10 .grep: { LAST say "byebye"; $_ %% 2 } # oops, apparently we don't have LAST support in grep ? 23:12
camelia (0, 2, 4, 6, 8).Seq
lizmat updated gist.github.com/lizmat/1c80d2210ae...18fca7e575 some more 23:14
now also handles .map with LAST phasers, and also grep (if that bug would be fixed)
good night, #perl6-dev!
Zoffix night 23:16
s: ^10, 'grep', \({ LAST say "byebye"; $_ %% 2 })
SourceBaby Zoffix, Sauce is at github.com/rakudo/rakudo/blob/6a77...s.pm#L1018
lizmat oops I meant gist.github.com/lizmat/4369e28d6c8...81c4df07af
really sleep&
Zoffix the bug's 'cause .grep calls sequential-map using a made up block without any phasers, so it goes through the no-phasers fast-loop 23:22
hehe, we actually already had `redo` broken in grep :) in rt.perl.org/Ticket/Display.html?id=130529 and fixed in github.com/rakudo/rakudo/commit/362f674 23:23
which is where the new bug got introduced 23:24
Zoffix tries a fix
hm, broken here too: 23:26
m: say ^10 .grep: -> $a, $b { LAST say "byebye"; $a %% 2 }
camelia ((0 1) (2 3) (4 5) (6 7) (8 9))
Zoffix Is there some sort of... &one-block.users-phasers-from(&other-block) sort of thing? 23:42
hm, my phaser kung-fu is no good 23:43
.tell lizmat here's my naive attempt at fixing the phasers in grep(Callable), but I don't know how phasers are handled and so it didn't work (now that I look at it; I don't know why expected it to work in the first place >_<): gist.github.com/zoffixznet/17b8c6b...a766a3c738 23:45
yoleaux2 Zoffix: I'll pass your message to lizmat.