Zoffix Awww :( The thing that puts all the files into the setting strips some comments and that's messing up my awesome module for locating source code. 00:12
jdv79 this one even aborts and segfaults
even more fun!
Zoffix Doesn't seem to strip all of them. Looks to be looking for /^'#' <+\s+\w>+
So much for my awesome plan :/ 00:13
jdv79 do the comments cause problems?
Zoffix I wouldn't think so
Hah, I was close: github.com/rakudo/rakudo/blob/15ee...at.nqp#L42 00:16
Zoffix contemplates to argue to print the comments too 00:17
Actually, that won't solve my problem, because the `#?if` stuff would interfere with github repo count anyway.... 00:18
Well, if at first you don't succeed.... Go crazy and setup a webservice that will know how to adjust line numbers to make them correct on any commit ^_^ 00:19
Or just fetch the github page and process it. 00:20
\o/ it works :D 00:57
$ perl6 -Ilib -MCoreHackers::Sourcery -e 'say &unival.sourcery'
src/core/Str.pm:2354 github.com/rakudo/rakudo/blob/15ee...r.pm#L2419
OMG and Atom supports opening to a specific line number with `atom src/core/Str.pm:2419` sexy! 01:00
Are there any cases where .cando can return more than one thing? 03:51
curious as to why it returns a list
llfourn Zoffix: I think it returns candidates 04:04
Zoffix llfourn, sure, but there's only ever going to be one or none candidates
llfourn oh right "cando" not "can" 04:05
"cando" returns them in their order narrowness
ie all the methods with signatures that match the capture in order of narrowness 04:06
Zoffix m: multi foo ($) {}; multi foo (Int) {}; say &foo.cando: \(42) 04:07
camelia rakudo-moar 4693a5: OUTPUTĀ«(sub foo (Int $) { #`(Sub|59011240) ... } sub foo ($) { #`(Sub|59011392) ... })ā¤Ā»
Zoffix Ah, thanks, llfourn++
llfourn :)
[Tux] This is Rakudo version 2016.07.1-124-g4693a52 built on MoarVM version 2016.07-16-g85b6537 05:41
test 15.374
test-t 8.358
csv-parser 16.811
class Foo does Iterable does Positional does Associative { 06:23
what method should I use to check the number of elements in there ? .elems ? 06:24
Woodi Tux: reimplement Foo from scrath with separate responsibilities... but technically (and in Perl) .elems should just work :) 06:47
btw. that was interesting backlog from the evening :) 06:48
nine Zoffix: are there any editors used for programming that don't support jumping directly to a line? 07:11
.tell jnthn I'm somewhat skeptical of the plan to have await detach from the thread. I guess the point would be to free the ThreadPool's threads to do actual processing on the CPU. But the point of the limited thread pool size is that it doesn't help to run much more threads than available CPU cores. 07:18
yoleaux2 nine: I'll pass your message to jnthn.
nine .tell jnthn However, that limit is only useful for actively processing threads. Blocked threads should not enter into it. And threads can be blocked not only by await but also by I/O. So unless we want to have plain (network) I/O detach from the thread, too, it seems to be easier to have the thread pool differentiate between active and inactive threads and make sure it does have an appropriate number of threads for active processing available.
yoleaux2 nine: I'll pass your message to jnthn.
moritz nine: the max thread pool size is also a question of memory usage 07:26
nine moritz: threads are supposed to be "lightweight" processes. I sure hope they are not as heavy as in Perl 5 :) 07:32
moritz nine: lightweight is relative. Would you spawn a million threads? 07:33
nine: but maybe it's easier to have two limits (one for total threads, one for running threads) than to do a non-blocking await 07:34
nine A million threads would mean about a million pending I/O requests or awaits. If you do that much work, you probably have enough hardware to do it... 07:36
moritz but how would that work? Can a thread then not wake up until there is a free slot for a running thread again?
that would still cause very surprising behavior, I fear 07:37
[Tux] gist.github.com/anonymous/d791314f...509d869985 <= Help?
nine moritz: I imagine it as the Scheduler just trying to keep (CPU cores + blocked) threads available and other than that keep the current system. 07:38
psch m: say { $^row.first: *.defined && * ~~ m/\S/ }("foo") 07:43
camelia rakudo-moar 4693a5: OUTPUTĀ«Method 'match' not found for invocant of class 'Any'ā¤ in block at <tmp> line 1ā¤ in block <unit> at <tmp> line 1ā¤ā¤Ā»
psch m: say { $^row.first: *.defined && * ~~ /\S/ }("foo")
camelia rakudo-moar 4693a5: OUTPUTĀ«fooā¤Ā»
psch [Tux]: ^^^
[Tux] thanks. isn't that just a tiny bit counterintuitive? 07:44
psch as i understand it, m// is always an immediate match, so you're smartmatching against a Match result 07:46
[Tux] will try to remember
lizmat [Tux]: are you checking for a non-empty Str ? 07:50
if so, ?* should do the trick 07:51
[Tux] no, for a string that is defined and neither empty of spaces-only
s/of/or/
Woodi I didn't wanted to spam here so here is link: gist.github.com/slunski/a50ecbaf49...df0f2c31a2
I imagine job inside VM as something that can be put into memory and resumed... if that thing don't make side effects then all is good... 07:53
[Tux] lizmat: " " should NOT match 07:54
[Tux] has started porting the changes/additions to Text::CSV_XS over to perl6. In this ccase, predefined filters 07:55
lizmat moritz: I just noticed that dalek is still logged into #p6dev, that seems unneccessary ? 08:08
dalek kudo/nom: 1488b39 | lizmat++ | src/core/IO/ (2 files):
Streamline some nqp::readfh related code

  - don't use a named buf8 if we don't need to
  - return directly out of the loop instead of lasting and then returning
08:13
nine Woodi: Perl 6 does indeed focus on high level semantics for parallelization. It does however also give you low level tools in case the high level ones are not fit for your job. 08:30
lizmat afk& 08:31
moritz lizmat: thanks, I've removed it from the config. It'll be gone after the next restart 10:06
jnthn nine: Consider folks writing divide/conquer style code, which can easily lead to a tree of awaits despite being overall CPU bound. This today can exhaust the thread pool. "Just add more CPU threads and let them just be blocked" doesn't really cut it; every one costs some memory, costs a little extra every GC run, hurts CPU caches in context switches, etc. 10:26
yoleaux2 07:18Z <nine> jnthn: I'm somewhat skeptical of the plan to have await detach from the thread. I guess the point would be to free the ThreadPool's threads to do actual processing on the CPU. But the point of the limited thread pool size is that it doesn't help to run much more threads than available CPU cores.
07:18Z <nine> jnthn: However, that limit is only useful for actively processing threads. Blocked threads should not enter into it. And threads can be blocked not only by await but also by I/O. So unless we want to have plain (network) I/O detach from the thread, too, it seems to be easier to have the thread pool differentiate between active and inactive threads and make sure it does have an appropriate number of threads for active processing available.
Zoffix nine, it's the first time I hear about foo:42 syntax for jumping to a specific line. Sublime Text 2 seems to support it too, but not pico 10:27
nine Zoffix: pico supports "pico foo +42" same as vim 10:57
Zoffix: there's also a vim plugin to support :42
Zoffix ah 10:58
psch 'vim foo +42' goes to line 42
and :42 as normal mode command seems to work in debian stock vim
jnthn doesn't remember having a vim that didn't support :42 10:59
timotimo doesn't remember having a vim that supports :42 11:02
stmuk_ remembers having a real ex/vi which supported :42 11:16
timotimo i must be doing it terribly wrong, then 11:21
mine have only ever supported +42 and it took me a long time to find out about that
stmuk_ its in command mode of the editor itself rather than a command line arg 11:22
timotimo ā€¦
but this discussion was about command lines only, i thought
psch well, i did say "as normal mode command" for :42 :S 11:26
so maybe there's a plugin for :42 as vim argument 11:27
but that seems kind of redundant, because +42 works there already
although it might make sense for scripts that use $EDITOR
nine psch: I already said, that there is a plugin for supporting foo:42 (note the missing space) which does still make sense as lots of compilers print file/line information in this format 11:28
psch nine: oh, i missed the lack of space! that clears it up :)
stmuk_ ^W^F jumps to file:line within a text file without a plugin 11:31
I was a bit horrified to find vim even supports ^X^F within insert mode recently :) 11:32
psch stmuk_: here ^X is "decrement next number on the current line" and ^F is "scroll down one page"..? 11:33
stmuk_ insert mode not command mode 11:34
psch oh
right, not reading well
i read "without"
dalek kudo/nom: 02fdcf9 | lizmat++ | src/core/IO/Path.pm:
Fix for RT #128840

This is probably due to some unixism where "-" was considered to be STDIN. Removing this test doesn't cause any spectest breakage.
14:38
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=128840
Tux__ The upcoming timing is mainly faster because of optimizations *inside* Text::CSV (lizmat++) 14:46
This is Rakudo version 2016.07.1-124-g4693a52 built on MoarVM version 2016.07-16-g85b6537
test 15.315
test-t 7.590
csv-parser 17.896
[Coke] nice. 14:47
Tux__ alternating regexes => or'd eq's
$a ~~ / foo || bar / ā†’ $a eq "foo" || $a eq "bar" 14:48
[Coke] that might be shorter written as $a eq "foo"|"bar", and might eval down to very similar code.
Tux__ tests 14:50
[Coke] looks like 4 more lines of AST output without junc, not that that is a measure of anything helpful. :) 14:51
Tux__ looks like the junction being *a lot* slower: 9.857 14:53
[Coke] yikes. ok, nevermind. :) 14:54
Tux__ reproducable
room for the optimizer? 14:55
- !! ($chunk eq "\r\n" || $chunk eq "\n" || $chunk eq "\r")) {
+ !! $chunk eq "\r\n"|"\n"|"\r") {
the second is more pleasing to the eye
unmatched} benchable: my $a = "meow"; for ^10000 { my $x = $a eq "foo"|"bar" } 14:56
benchable unmatched}: Ā¦Ā«myĀ»:Cannot find this revision
unmatched} benchable: HEAD my $a = "meow"; for ^10000 { my $x = $a eq "foo"|"bar" }
benchable unmatched}: Ā¦Ā«HEADĀ»:0.4471
unmatched} benchable: HEAD my $a = "meow"; for ^100000 { my $x = $a eq "foo"|"bar" }
benchable unmatched}: Ā¦Ā«HEADĀ»:3.3595
unmatched} benchable: HEAD my $a = "meow"; for ^100000 { my $x = $a eq "foo" || $a eq "bar" }
benchable unmatched}: Ā¦Ā«HEADĀ»:0.1431
unmatched} benchable: HEAD my $a = "meow"; for ^100000 { my $x = $a āˆˆ <foo bar> } 14:57
benchable unmatched}: Ā¦Ā«HEADĀ»:10.0068 14:58
unmatched} benchable: HEAD my $a = "meow"; for ^100000 { my $x = $a āˆˆ set <foo bar> } 14:59
benchable unmatched}: Ā¦Ā«HEADĀ»:10.0066 15:00
Tux__ benchable: HEAD my $a = "meow"; for ^10000 { my $x = $a ~~ /^ foo | bar $/ }
benchable Tux__: Ā¦Ā«HEADĀ»:0.2321
unmatched} benchable: HEAD my $a = "meow"; for ^10000 { my $x = $a ~~ /^ [foo | bar] $/ } 15:01
benchable unmatched}: Ā¦Ā«HEADĀ»:0.1958
Tux__ (one less 0)
benchable: HEAD my $a = "meow"; for ^100000 { my $x = $a ~~ /^ foo | bar $/ }
benchable Tux__: Ā¦Ā«HEADĀ»:1.1280
unmatched} MasterDukeWork: slacker! :) 15:03
MasterDukeWork bench: releases my $a = "meow"; for ^100000 { my $x = $a ~~ /^ foo | bar $/ }
pretty much
would people be interested in benchable being able to return timings for multiple code snippets? 15:04
benchable MasterDukeWork: gist.github.com/2f66b0ae3ff2df5449...e977acd4b2 15:05
unmatched} Probably. The point of interest for me is percentages actually. Above we have 3.3595, 0.1431, 10.0068... I think showing how much faster/slower is a piece of code is compared to another piece would be more palatable
bench: releases my $a = "meow"; for ^100000 {
oops 15:06
MasterDukeWork i can't restart it from here
unmatched} :(
MasterDukeWork .tell AlexDaniel are you available to restart benchable? 15:07
yoleaux2 MasterDukeWork: I'll pass your message to AlexDaniel.
AlexDaniel .
yoleaux2 15:07Z <MasterDukeWork> AlexDaniel: are you available to restart benchable?
AlexDaniel sure
MasterDukeWork but i'll create an issue to see about adding support for multiple pieces codes and differences between them to benchable 15:08
and i'm outa here
AlexDaniel ;)
unmatched} bench: releases my $a = "meow"; for ^100000 {} 15:11
benchable unmatched}: gist.github.com/bda16671b759bef4db...e3b4f20374
AlexDaniel bench: e98b114..f59b910 my $a = "meow"; for ^100000 {} 15:17
benchable AlexDaniel: Ā¦Ā«f59b910Ā»:0.1192ā¤Ā¦Ā«e98b114Ā»:0.2352
AlexDaniel bench: f59b910..e98b114 my $a = "meow"; for ^100000 {} 15:18
benchable AlexDaniel: Ā¦
AlexDaniel MasterDuke: ā†‘ are ranges broken or why can't it do a couple of commits in between? 15:19
TimToady psch: note that *.defined && * ~~ /\S/ cannot possibly be doing what you think it's doing, since you can't use * twice to mean the same argument
* is not $_
Tux__ listens 15:20
TimToady sometimes you just have to use curlies 15:21
m: say (* + *).count
camelia rakudo-moar 02fdcf: OUTPUTĀ«{ ... }ā¤Ā»
TimToady m: say .count given (* + *)
camelia rakudo-moar 02fdcf: OUTPUTĀ«2ā¤Ā»
TimToady m: say .count given *.defined && * ~~ /\S/ 15:22
camelia rakudo-moar 02fdcf: OUTPUTĀ«1ā¤Ā»
unmatched} m: say (* + *)(2, 10)
camelia rakudo-moar 02fdcf: OUTPUTĀ«12ā¤Ā»
unmatched} m: say (* + * + *)(2, 10, 100)
camelia rakudo-moar 02fdcf: OUTPUTĀ«112ā¤Ā»
Tux__ my %predef-hooks =
not_blank => { $^row.elems > 1 or $^row[0].defined && $^row[0] ne "" or $^row[0].is-quoted },
not_empty => { $^row.first: { $_.defined && $_ ne "" }},
filled => { $^row.first: { $_.defined && $_ ~~ /\S/ }};
better? 15:23
TimToady though $_ ~~ is redundant now
Tux__ or would I use a currued $^x
TimToady and in fact you can say { .defined && /\S/ }
as long as you use braces 15:24
Tux__ Method 'match' not found for invocant of class 'CSV::Field'
so it *is* different. /me starts digging 15:25
TimToady well, maybe it needs coercion to string, though I didn't think ~~ would provide coercion
unmatched} Tux__: rx/S/
m: class Foo { method Str { "bar " } }; say Foo ~~ /.+/
camelia rakudo-moar 02fdcf: OUTPUTĀ«ļ½¢bar ļ½£ā¤Ā»
unmatched} m: class Foo { method Str { "bar " } }; say Foo ~~ m/.+/
camelia rakudo-moar 02fdcf: OUTPUTĀ«Method 'match' not found for invocant of class 'Foo'ā¤ in block <unit> at <tmp> line 1ā¤ā¤Ā»
unmatched} m: class Foo { method Str { "bar " } }; say Foo ~~ rx/.+/
camelia rakudo-moar 02fdcf: OUTPUTĀ«ļ½¢bar ļ½£ā¤Ā»
Tux__ && /\S/ ā†’ FAIL, $_ ~~ /\S/ ā†’ PASS
TimToady m// is never delayed 15:26
but it should still work
obviously something is calling .Str in one case and not the ohter 15:27
Tux__ filled => { $^row.first: { .defined && rx/\S/ }} ā†’ Method 'match' not found for invocant of class 'CSV::Field'
unmatched} :o
Tux__ so I do need the $_
jdv79 huh, someone just reported some segfaults. seems similar to the ones i found. hopefully its something simple. 15:28
TimToady try { .defined && so /\S/
to force it into boolean context 15:29
Tux__ Method 'match' not found for invocant of class 'CSV::Field'
(with so)
TimToady well, there definitely seems to be something not quite dwimmy going on here 15:32
m: class Foo { method Str { "bar " } }; say Foo.new ~~ m/.+/ 15:33
camelia rakudo-moar 02fdcf: OUTPUTĀ«Method 'match' not found for invocant of class 'Foo'ā¤ in block <unit> at <tmp> line 1ā¤ā¤Ā»
TimToady m: class Foo { method Str { "bar " } }; say Foo.new.Str ~~ m/.+/
camelia rakudo-moar 02fdcf: OUTPUTĀ«ļ½¢bar ļ½£ā¤Ā»
TimToady hopes backlogging #perl6 will be a little less confuzzling 15:39
Tux__ m: my$f="a"; given $f { when "a"|"b"|Callable { say 1; }} 15:54
camelia rakudo-moar 02fdcf: OUTPUTĀ«1ā¤Ā»
Tux__ m: my$f={say "Hi"}; given $f { when "a"|"b"|Callable { say 1; }}
camelia rakudo-moar 02fdcf: OUTPUTĀ«Block object coerced to string (please use .gist or .perl to do that) in block at <tmp> line 1ā¤Block object coerced to string (please use .gist or .perl to do that) in block at <tmp> line 1ā¤1ā¤Ā»
Tux__ that hurts
psch you're doing "a" ~~ $f there
Tux__ not $f ~~ "a" ? 15:55
psch oh, right
Tux__ now re-read
TimToady a string on the RHS is *always* going to coerce to string
psch m: say { $a } ~~ "a"
camelia rakudo-moar 02fdcf: OUTPUTĀ«===SORRY!=== Error while compiling <tmp>ā¤Variable '$a' is not declaredā¤at <tmp>:1ā¤------> say { ā$a } ~~ "a"ā¤Ā»
psch m: say { $^a } ~~ "a"
camelia rakudo-moar 02fdcf: OUTPUTĀ«Block object coerced to string (please use .gist or .perl to do that) in block <unit> at <tmp> line 1ā¤Falseā¤Ā»
psch nothing to re-read, except for confusing the operands it's still the exact same problem
Tux__ puts Callable at the start. problem solved 15:56
psch ...Junctions short-circuit 15:57
?
TimToady m: my$f={say "Hi"}; given $f.gist { when "a"|"b"|Callable { say 1; }}
camelia ( no output )
TimToady EMOARCOFFEE 15:58
psch m: say { $^a } ~~ Callable|"a"
camelia rakudo-moar 02fdcf: OUTPUTĀ«Trueā¤Ā»
Tux__ m: my$f={say "Hi"}; given $f { when Callable|"a"|"b" { say 1; }}
camelia rakudo-moar 02fdcf: OUTPUTĀ«1ā¤Ā»
psch that feels really weird
Tux__ m: my$f="Hi"; given $f { when Callable|"a"|"b" { say 1; }}
camelia ( no output )
TimToady well, it's relying on ordering that's not guaranteed
psch m: my \junc = Callable|"a"; say { $^a } ~~ junc
camelia rakudo-moar 02fdcf: OUTPUTĀ«Trueā¤Ā»
Tux__ oh my
psch m: my \junc = Callable|"a"; say { $^a } ~~ all(junc) 15:59
camelia rakudo-moar 02fdcf: OUTPUTĀ«Trueā¤Ā»
psch m: my \junc = Callable|"a"; say all({ $^a } ~~ junc)
camelia rakudo-moar 02fdcf: OUTPUTĀ«all(True)ā¤Ā»
TimToady m: my$f={say "Hi"}; given $f { quietly when "a"|"b"|Callable { say 1; }}
camelia rakudo-moar 02fdcf: OUTPUTĀ«1ā¤Ā»
psch Junctions are apparently weirder than i was aware :)
Tux__ my $s = { $_ + 2 }; for @l { $_ = $s($_) } 16:04
is there a more perl6ish way to write that second part?
jnthn @l .= map($s) maybe? 16:06
unmatched} Speaking of DWIMMing and regex matches: 16:10
m: $*PERL.compiler.version ~~ /g/
camelia ( no output )
unmatched} m: say $*PERL.compiler.version ~~ /g/
camelia rakudo-moar 02fdcf: OUTPUTĀ«ļ½¢gļ½£ā¤Ā»
unmatched} oh
m: say /"g"/ ?? .parts.join.split("g")[*-1] !! .Str given $*PERL.compiler.version 16:11
camelia rakudo-moar 02fdcf: OUTPUTĀ«Method 'match' not found for invocant of class 'Version'ā¤ in block <unit> at <tmp> line 1ā¤ā¤Ā»
unmatched} I guess it's the same issue as with an arbitrary class and not Version-specific. Nevermind :P
psch m: my $s = { $_ + 2 }; my @a = ^5; $_ .= $s for @a; say @a.perl 16:12
camelia rakudo-moar 02fdcf: OUTPUTĀ«[2, 3, 4, 5, 6]ā¤Ā»
psch jnthn++ 16:13
map looks better there i'd say
TimToady I would not have expected that .= to work 16:14
m: my $f = * + 2; say 42 . $f
camelia rakudo-moar 02fdcf: OUTPUTĀ«===SORRY!=== Error while compiling <tmp>ā¤Unsupported use of . to concatenate strings; in Perl 6 please use ~ā¤at <tmp>:1ā¤------> my $f = * + 2; say 42 .ā $fā¤Ā»
TimToady because that
psch m: my $f = * + 2; say ($ = 42) .= $f 16:15
camelia rakudo-moar 02fdcf: OUTPUTĀ«44ā¤Ā»
psch well, dotty op and single dot do different things is all i can say
i have no idea how well that fits with the language design perspective
as in, the assigny bit matters..? vOv 16:16
i mean, we probably could have infix:sym<.=> do a similar check to methodop, the latter being where we throw that error 16:20
timotimo my first optimomization was to make $foo eq "a" | "b" compile to the same code as $foo eq "a" || $foo eq "b" (except not evaluating $foo twice) 16:29
and that's apparently been broken since the release? :( 16:30
Tux__ beeps like a canary 16:58
enough perl6 for today. have to go home now
timotimo :) 17:15
thank you for canary-zing, tux
jdv79 what happened in the coal mine? were there fatalities? 17:18
timotimo no, see, the canary is still beeping
tadzik are canaries supposed to beep? :o
timotimo they beep when things are still fine 17:19
jdv79 that means nothing is wrong
tadzik . o O ( "Does this helmet protect me from falling bricks?" "Sure, look: he took a brick to the head 2 years ago and smiles ever since" )
timotimo ugh
tadzik I've never seen a bird that beeps :o 17:20
b2gills There appears to be a bug in Test::proclaim where $desc is 0.Int ( or any false value that isn't a Str )
jdv79 maybe a chirp could be construed as a beep
b2gills Maybe the canary was actually a road runner 17:21
jdv79 isn't that meep?
timotimo yeah, he goes "meep meep" 17:23
jdv79 sorry, just drank a 1/2 pot of coffee. was a bit too much.
mst people keep talking about this 'too much coffee' thing 17:28
I'm still not convinced I believe them
[Coke] my 100 resting heart rate thinks there might be something to it 17:29
arnsholt My personal threshold for too much is when I start to get visible jitters in my hands
But in theory, I'm with mst; no such thing as too much coffee =)
timotimo ... i don't drink coffee ...
arnsholt Clearly not enough =) 17:35
[Tux] tweet tweet 18:49
dalek kudo/nom: 552d9cb | lizmat++ | src/core/Scalar.pm:
We don't do no Scalar.new
21:48