jdv79 cognominal: youre very bouncy 00:06
dalek kudo/nom: 35a7f15 | TimToady++ | src/Perl6/Actions.nqp:
Factor out repeated comparisions from unwanted

Just logic reorg, should be no semantic change.
02:10
kudo/nom: 1b3a009 | TimToady++ | src/Perl6/ (2 files):
Add warning for useless use of sequence

The sequence operator (...) is not really a pure operator for purposes of constant folding, so it's not marked pure, but we're going to carp about using a sequence only for its side effects anyway, since it catches common errors of the form: b286048 | lizmat++ | src/core/ThreadPoolScheduler.pm: Apply delay to all cues, instead of just the first
Spotted by jnthn++
lizmat Files=1155, Tests=53921, 200 wallclock secs (11.26 usr 4.66 sys + 1193.47 cusr 126.92 csys = 1336.31 CPU) 08:39
yoleaux2 14 Dec 2016 21:17Z <jnthn> lizmat: Is it accidental that `$*SCHEDULER.cue: :in(1), :times(2), { say now }` only applies the "in" to the first time? (It's actually setting the delay to 0 after scheduling the first one...)
moritz jnthn: I think if you want delays after the first one, you need to pass in :every(2) 08:40
cue docs.perl6.org/routine/cue :-) 08:41
lizmat jnthn: what moritz said :-)
moritz suddenly feels competent :-) 08:42
lizmat at least, that's always been my interpretation of combining "in" with "times"
moritz though we might want to declare it as :$in, :$every = $in 08:43
lizmat huh? 08:44
that's quite a semantic change
from non-repeating to repeating ??
moritz oh, does :every imply repetition, even if :times isn't set? 08:48
then we shouldn't do that 08:49
lizmat yup
:times is just a limiter on :every, really
jnthn This isn't about :every 09:55
This is about when you *don't* have every and you use time 09:56
*times
My expectation was that :in(2), :times(3) would, in 2 seconds, schedule it 3 times
m: $*SCHEDULER.cue: :in(2), :times(3), { say now }; sleep 4; 09:57
camelia rakudo-moar 1b3a00: OUTPUT«Instant:1481795869.916905␤Instant:1481795869.923777␤Instant:1481795871.917595␤»
jnthn But notice how two of them are run at 0 seconds, and only one of them at 2 seconds
I'd expect those 3 say statements to spit out a `now` value that is pretty close 09:58
lizmat jnthn: ah, indeed, that's what I would have expected as well 10:01
hmmm...
jnthn Yeah, discovered when I was implementing Test::Scheduler last night for my advent post :) 10:02
lizmat ah, *now* I understand your question 10:05
looks like the $delay=0 is a thinko on my part
looks like the first one scheduled is the last one to execute, because it is the only one that has a $delay 10:06
jnthn lizmat: Yes, that's the line that felt bogus to me :) 10:08
If it weren't there it'd do what I'd expected, I think :)
lizmat runs a spectest without t 10:09
jnthn wonders if lizmat has cff instead of t today... :) 10:15
lizmat :-) i
jnthn \o/ 10:26
Glad I held off writing tests for that in Test::Scheduler before we discussed it :)
lizmat m: loop { last without index("a","foo") } # feels to me this shouldn't hang ? 10:56
camelia rakudo-moar b28604: OUTPUT«(timeout)»
lizmat m: loop { print "foo" without index("a","foo") } # feels to me this shouldn't hang ?
camelia rakudo-moar b28604: OUTPUT«(timeout)foofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoof…» 10:57
lizmat brb
jnthn m: say index("a","foo") 11:07
camelia rakudo-moar b28604: OUTPUT«Nil␤»
jnthn m: say index("a","foo").defined
camelia rakudo-moar b28604: OUTPUT«False␤»
jnthn m: say index("a","foo").DEFINITE
camelia rakudo-moar b28604: OUTPUT«False␤»
jnthn Yeah, looks busted and I'm not sure why :)
lizmat m: say ?index("a","foo")
camelia rakudo-moar b28604: OUTPUT«False␤»
lizmat ok, will submit a ticket
brb 11:08
jnthn without should care about .defined fwiw
lizmat m: loop { last not with index("a","foo") } # also odd?
camelia rakudo-moar b28604: OUTPUT«===SORRY!=== Error while compiling <tmp>␤Undeclared routine:␤ with used at line 1␤␤»
lizmat brb 11:09
dalek p: 04e1ab2 | (Pawel Murias)++ | src/vm/js/Operations.nqp:
[js] Implement nqp::with and nqp::without ops.
11:15
p: c01e27a | (Pawel Murias)++ | t/ (2 files):
Test with and without ops.
lizmat m: FOO:loop { last FOO without index("a","foo") } # this works 11:49
camelia rakudo-moar b28604: OUTPUT«===SORRY!=== Error while compiling <tmp>␤Undeclared names:␤ FOO used at line 1␤ FOO:loop used at line 1␤␤»
lizmat m: FOO: loop { last FOO without index("a","foo") } # this works
camelia ( no output )
lizmat RT #130354 12:13
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=130354
dalek p: 507b6df | (Pawel Murias)++ | src/vm/js/Operations.nqp:
[js] Remove a TODO, nqp::while no longer has a return value as that was just a hindrance.
13:29
[Coke] www.reddit.com/r/perl/comments/557...s/d8aokjq/ - I assume his claim here is true? 13:33
lizmat [Coke]: yes, I'm proofreading the last 30+ pages at the moment 13:34
assuming you mean Laurent Rosenfeld's claim?
commute to NR.pm meeting & 13:36
[Coke] lizmat: aye. Thanks! 13:39
[Coke] guessed on pronoun there. 13:40
lizmat m: sub a() {}; dd a 14:44
camelia rakudo-moar b28604: OUTPUT«Nil␤»
lizmat m: sub a( return 42 if 0 ) {}; dd a 14:45
camelia rakudo-moar b28604: OUTPUT«===SORRY!=== Error while compiling <tmp>␤Invalid typename 'return' in parameter declaration.␤at <tmp>:1␤------> sub a( return⏏ 42 if 0 ) {}; dd a␤»
lizmat m: sub a( return 42 if 0 {}; dd a
camelia rakudo-moar b28604: OUTPUT«===SORRY!=== Error while compiling <tmp>␤Invalid typename 'return' in parameter declaration.␤at <tmp>:1␤------> sub a( return⏏ 42 if 0 {}; dd a␤»
lizmat argh
m: sub a() { return 42 if 0 }; dd a
camelia rakudo-moar b28604: OUTPUT«slip()␤»
lizmat I wonder which behaviour is correct 14:46
jnthn Which?
They're both correct, no?
if does that in order that you can write list comprehensions with it 14:47
lizmat m: sub a() {}; dd a # shouldn't this be slip() then as well ?
camelia rakudo-moar b28604: OUTPUT«Nil␤»
jnthn No 14:48
The slip originates from the if/unless
lizmat ah, ok...
jnthn And since it's the last thing in the sub the usual "value of last statement" rule applies
lizmat yup 14:49
ok
jnthn I understand what you were surprised/confused by now though :)
dalek kudo/nom: 3b5c954 | Altai-man++ | src/Perl6/Metamodel/RoleToClassApplier.nqp:
Show all roles that have missing method.
14:50
kudo/nom: 0e79613 | (Zoffix Znet)++ | src/Perl6/Metamodel/RoleToClassApplier.nqp:
Merge pull request #957 from Altai-man/rt130211-improvement

Show all roles that have missing method in error message
ZoffixW Hello. Is there a neat-looking trick for a loop that doesn't react to last/next/redo (and instead passes them further up the food chain)? 14:52
I tried a bunch of stuff with CONTROL {} but I'm either breaking take/warn or getting "MoarVM panic: Trying to unwind over wrong handler" as a sideeffect
m: gist.github.com/zoffixznet/9acb9b7...d70b10e9a4 14:53
camelia rakudo-moar b28604: OUTPUT«meow␤warning␤ in block at <tmp> line 2␤MoarVM panic: Trying to unwind over wrong handler␤»
ZoffixW
.oO( a goto would be handy.... )
14:56
lizmat
.oO( well volunteered :-)
jnthn ZoffixW: You can't just use labeled loops?
Not aware of a way to skip the handlers though 14:57
ZoffixW Nope.
jnthn I can't see CONTROL helping as the handlers are code-gen'd around the loop 14:58
ZoffixW hm
jnthn So there's nowhere to put a CONTROL that will bypass them
ZoffixW OK. Maybe there's a different way. 14:59
jnthn Could just throw an exception of some kind
ZoffixW m: loop { last without Any }
camelia rakudo-moar b28604: OUTPUT«(timeout)»
ZoffixW That ^ hangs because `without` thunks the `last` and calls `notandthen` which uses a loop of its own to process args. So when it calls that thunk with the `last` the last aborts `notandthen`'s loop and not the original loop 15:00
So somehow I was thinking of making it stop doing that.
lizmat arriving in Cologne& 15:01
jnthn ZoffixW: Hmm
Oh
There is iirc a :nohandler thingy if you use nqp::while
ZoffixW looks into that
jnthn git grep nohandler 15:02
Shows up a bunch of examples
So yeah, there is a way, if you use nqp:: ops :)
dalek p: 841de09 | (Pawel Murias)++ | src/vm/js/Operations.nqp:
[js] Implement 3 argument nqp::while.
p: f914dc4 | (Pawel Murias)++ | t/nqp/047-loop-control.t:
Test 3 argument nqp::while.
ZoffixW Awesome. Thanks, jnthn++
dalek rakudo/nom: 9a3c350 | (Zoffix Znet)++ | src/core/operators.pm: 15:52
rakudo/nom: Fix failure of loop controls via `without`/`with`
rakudo/nom:
rakudo/nom: The statements of `without`/`with` statement modifiers get thunked
rakudo/nom: and fed to `notandthen`/`andthen` infix operators. Those operators
rakudo/nom: use loops to process arguments. So when THOSE loops execute a thunk
rakudo/nom: with a loop control statement, the thrown control exception controls
rakudo/nom: the argument processing loop of those operators instead of the loop
rakudo/nom: intended.
rakudo/nom:
rakudo/nom: Fix by using nqp loops with :nohandler modifer. jnthn++ for the tip.
rakudo/nom:
ast: fc0d82a | (Zoffix Znet)++ | S04-statements/loop.t:
Test loop controls work them triggered with `without`/`with`

RT#130354: rt.perl.org/Ticket/Display.html?id=130354 Rakudo fix: github.com/rakudo/rakudo/commit/9a3c35013e25f69
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=130354
jnthn Nice! :) 15:54
[Coke] ZoffixW++ 15:57
perlpilot Perl 6 needs some sort of award like the White Camel. I can easily think of a few people who would have already received such an award. 16:11
[Coke] perlpilot: I think we're eligible for the actual white camel, no? 16:13
jnthn Surely. :) 16:14
perlpilot Indeed. 16:15
But there are "unsung heroes" to the Perl 6 community that the Perl community at-large wouldn't consider. 16:16
jnthn Did you try nominating them? :) 16:17
|Tux| This is Rakudo version 2016.11-248-g0e79613b6 built on MoarVM version 2016.11-60-g21abc2a1 16:26
csv-ip5xs 3.068
test 13.233
test-t 6.072
csv-parser 13.968
better late than never, and certainly with nice values like this
dalek p: b195a1e | (Pawel Murias)++ | src/vm/js/Operations.nqp:
[js] Implement while ... -> $cond {...}
16:52
p: ce34625 | (Pawel Murias)++ | t/nqp/014-while.t:
Test while ... -> $cond {...}
ast: a9fd375 | Altai-man++ | integration/error-reporting.t:
A test for #130211 (#196)

  * A test for #130211
  * Better test
  * Test message was returned
  * Whitespace is removed
17:03
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=130211
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=130211
ast: e45c0ad | (Zoffix Znet)++ | integration/error-reporting.t:
Fix error in test

Test in previous commit accidentally used wrong role names.
  - Fix formatting to be of shorter line length.
  - Fix test message, since we're no longer testing order
17:14
gfldex writing bug reports works! \o/ 17:46
AlexDaniel gfldex: well, that's not news to me :) 17:58
lizmat m: /./ # matching Any, but who cares 20:02
camelia ( no output )
lizmat m: m/./ # should be the same but isn't
camelia rakudo-moar 9a3c35: OUTPUT«No such method 'match' for invocant of type 'Any'␤ in block <unit> at <tmp> line 1␤␤»
MasterDuke jnthn: around for a QAST question? 21:03
or anyone? 21:05
what does p6capturelex do? 21:06
moritz MasterDuke: I don't know, and can only speculate 21:12
MasterDuke well, i'll explain what i'm running into, maybe at this point any other set of eyes will help 21:14
still working on turning -n's "for lines() { $code }" into "while ($_ := get()).DEFINITE { $code }"
i've got it to loop the same number of times as lines in test files, so i assume that part's working 21:15
but i can't ever get the $code to execute
moritz MasterDuke: want to nopaste a patch, or push a branch or something? 21:16
MasterDuke: and maybe a --target=ast dump of small examle code
MasterDuke well, this has some already gist.github.com/MasterDuke17/6e09e...2a0348ef7b 21:17
timotimo p6capturelex is just capturelex with an indirection through the invocation spec of an object
MasterDuke if i take p6capturelex out entirely, -ne '.say' just prints a bunch of (Mu)s 21:18
timotimo "given the specified code object, sets its outer to the current scope"
MasterDuke if i leave it in, -ne '.say' doesn't print anything at all 21:19
if instead i docegen "while ($_ := get()).DEFINITE { say $foobar; $code }", and then do -ne 'BEGIN my $foobar = <something>; .say' i get <something> printed for every line
*codegen 21:20
jnthn This code never actually calls the block
moritz right
jnthn Which is perfect for "for"
moritz it's the equivalent of while ($_ := for()) { &codeobj }
jnthn Since you want to pass it off to map
timotimo ooooh
jnthn $while.push(QAST::Op.new( :op('call'), $body )); # probably does it 21:21
Think I missed that when I last looked at it... :)
moritz or use a different helper function than make_topic_block_ref
jnthn Though even better is to find a way to make it an immediate block
MasterDuke ah, if you reload the gist you'll see a new ast
i added a QAST::Block.new(:blocktype<immediate>), is that what you meant? 21:24
rebuilding now 21:25
moritz MasterDuke: can't you leave out the call to make_topic_block_ref entirely? 21:26
MasterDuke don't know, it was there before
moritz $code is probably already the AST for an immediate block, and make_topic_block_ref turns it into an QAST that returns a code ref 21:27
which is what map wants
but not what :op<while> wants
MasterDuke something didn't work, now trying without make_topic_block_ref 21:28
ah ha! much closer. now it printed the first line and then died with "Cannot find method 'Nil' on object of type List" 21:31
moritz pr\o/gress
MasterDuke died here: github.com/rakudo/rakudo/blob/nom/....nqp#L2974 21:33
gist.github.com/MasterDuke17/a19a5...2f048db905 21:53
so that's the AST and diff for removing make_topic_block_ref, and call()ing the result of p6capturelex inside an immediate block 21:54
it's printing the first line, but then seems to be executing the result of the say 21:56
yep, because "-ne 'sub { say "hi" }'" prints "hi" for every line in the file i give it 21:59
moritz MasterDuke: what if you remove the whole my $body := QAST::Block.new(...) and stick $code straight into the :op<while>?
MasterDuke building that now 22:02
MasterDuke would buy a beverage of choice to whoever brings the build down to less than a minute 22:03
moritz++ 22:04
u: trumpet
unicodable6 MasterDuke, U+1F3BA TRUMPET [So] (🎺)
MasterDuke 🎺🎺🎺🎺🎺🎺
jnthn++ and timotimo++ also 22:09
moritz MasterDuke: did it work? 22:12
dalek kudo/nom: acece7b | TimToady++ | src/Perl6/Actions.nqp:
Generalize useless use to other list infixes

Add warnings to other forms of sequence operator too.
Except for variations of assignment, the Xop, Zop, and [op] metaops should also encourage side-effect-free behavior by carping when in sink context. (You can always use 'eager' to override.)
22:16
MasterDuke moritz: yep 22:19
now to figure out how to tweak_loop it. just blindly calling tweak_loop($while) dies with "===SORRY!=== Cannot look up attributes in a NQPMu type object" 22:20
i think the NQPMu is the $code from this line: my $code := $loop[1].ann('code_object'); 22:25
jnthn MasterDuke++ # progress 22:26
Sorry, too tired to really help any more tonight
jnthn goes to sleep
MasterDuke goes to dinner
RabidGravy woah 22:36
#0 0x00007ffff741001b in malloc_consolidate () from /lib64/libc.so.6
No symbol table info available.
#1 0x00007ffff7412f0f in _int_malloc () from /lib64/libc.so.6
No symbol table info available.
#2 0x00007ffff7414f74 in malloc () from /lib64/libc.so.6
No symbol table info available.
#3 0x00007ffff78dea7b in MVM_fixed_size_alloc () from //home/jonathan/.rakudobrew/moar-nom/install/lib/libmoar.so
not sure I'll be able to golf that 22:38
geekosaur possibly install glibc debug symbols, rebuild moarvm with debug enabled... and ask in #moarvm. (also, use valgrind --- which will also benefit from debug mode) 22:42
RabidGravy or just go to bed and ignore it 22:47
AlexDaniel There's a new bot, check it out: irclog.perlgeek.de/perl6/2016-12-15#i_13749780 23:58