MasterDuke oh well, nobody's perfect 00:00
i may bug you tomorrow though, if you don't mind
timotimo you can certainly try :) 00:01
MasterDuke excellent, prepare to be bugged in ~16h 00:02
timotimo i'll try to be awake at that time 00:03
Zoffix notices for the first time newio branch isn't using $*SPEC 00:28
.ask lizmat so we blow up $*SPEC? I'm in. Can we easily treat Windows same as *nix though? On Linux, C:/foo is a relative path, but on Windows it's absolute (can't create a dir with `:` in its name). 00:32
yoleaux2 Zoffix: I'll pass your message to lizmat.
Zoffix Did 2015.03 Rakudo had some sort of different installation instructions? I'm having trouble finding a newio commit that builds. Build dies with "Unhandled exception: While looking for 'ModuleLoader.moarvm': no such file or directory" 00:51
hehe 01:05
Was thinking: should write tests for all the combinations of IO::Handle.open's args...
$ perl6 -e 'IO::Handle.^lookup("open").signature.params.combinations.elems.say'
1048576
:) heavy 01:06
Geth roast: 091931a717 | (Zoffix Znet)++ | S32-io/open.t
[io grant] Expand &open tests

Add tests for argument combinations:
  - :r
  - :a
  - :ra
  - :append
... (5 more lines)
02:52
rakudo/nom: 4032953a00 | (Zoffix Znet)++ | src/core/IO/Handle.pm
[io grant] Make IO::Handle.open 75% faster
04:08
rakudo/nom: 8370e8471a | (Zoffix Znet)++ | src/core/IO/Spec/Unix.pm
Remove trailing whitespace
06:17
rakudo/nom: 55abc6d1bc | (Zoffix Znet)++ | 2 files
[io grant] Improve IO::Path.child perf on *nix

  - make IO::Path.child 2.1x faster on *nix
  - make IO::Spec::Unix.join 8.5x faster
  - make IO::Spec::Unix.catpath 9x faster
06:18
[TuxCM] This is Rakudo version 2017.03-36-g55abc6d1b built on MoarVM version 2017.03-25-ga8448142 06:37
csv-ip5xs 2.985
test 12.326
test-t 4.876 - 4.907
csv-parser 12.690
Zoffix buggable: speed 06:38
buggable Zoffix, ▁▁▁▁▂▁▂▂▂▂▂▂▂▁▂▁▁▃▂▂▂▂▂▁▁█▂▂▃▁▁▁▁▁▁▁▁▁▁▁▁▁▂▁▁▁▂▂▁▁ data for 2017-03-02–2017-03-26; range: 4.829s–7.664s
Zoffix What's the difference between `callwith` and `samewith`? 07:12
ZzZombo samewith calls same named multi as the current one. 07:14
Zoffix seems effects-wise, samewith throws X::NoMulti if it can't find any more candidates, whereas nextwith silently ignores that case. 07:26
The speculations say samewith uses same dispatcher, but next* redispatches... so what does that mean in English?
Geth nqp: skids++ created pull request #349:
Fixes for Perl6 FOREIGN_LANG
07:29
Zoffix Hm.. "Cannot auto-generate a proto method for 'BUILD' in the setting" 07:31
Yet, I gave it a proto :/
Geth rakudo: skids++ created pull request #1047:
Fix SEGV in FOREIGN_LANG after nqp fixes in nqp PR#349
07:33
Zoffix seems it wants proto method, not proto submethod 07:39
Woodi timotimo: chop @array to N pieces, put them on N threads, burn CPU, join. but I seriously have no experience with efficient parallel things. what jnthn++ proposed looks like v2.0 implementation for v1.0 :) 07:49
I think that in future, when async and parallel things will be standard" (hopefully), we should mark sequencial code same as we mark reentrant functions atm. in case someone want instruct computer to do work without RPC ar async features... 07:54
Zoffix m: class Foo { multi method new (Str $x) {}; multi method new (Str(Cool) $x) {} }.new: 'x' 07:57
camelia Ambiguous call to 'new'; these signatures all match:
:(Foo $: Str $x, *%_)
:(Foo $: Cool $x, *%_)
in block <unit> at <tmp> line 1
Zoffix Except they don't? 07:58
RabidGravy Hmm 08:04
m: (1,2,3).invert 08:05
camelia Type check failed in invert; expected Pair but got Int (Int)
in block <unit> at <tmp> line 1
Zoffix Known.
RabidGravy I know 08:06
I'm looking at the test
trying to work out why changing "role Associative" to "my role Associative[::TValue = Mu, ::TKey = Mu]" turns it into a failure rather than an exception 08:07
Zoffix What about my role Associative[Mu ::TValue = Mu, Mu ::TKey = Mu] 08:08
RabidGravy (the reason for changing it is to fix introspection of "class C { has Str %.foo{subset :: of Str}; }) 08:09
nine Zoffix: but they do? Str is Cool, so both Str and Str(Cool) match 'x' 08:10
Zoffix nine: they aren't ambiguous. Str is narrower.
m: class Foo { multi method new (Str $x) {}; multi method new (Cool $x) {} }.new: 'x'
camelia ( no output )
RabidGravy this is odd, the .invert is returning the exception expected, *in a Seq* 08:30
RabidGravy takes the change out to see if this was otherwise broken 08:34
Oh it was pre-broken 08:37
so am I right in saying that (1,2,3).invert *doesn't throw* in head? 08:42
HEAD
ah yes 7ea0f66189c03b27c9815966b274638dcaa4989e 08:43
as you were 08:44
Zoffix SDFA sdfa bv 08:49
v afsd
v asdf
va sdf
b asfdg
b asfd
nine That's a strange dialect 08:55
moritz cat-on-they-keyboard-ish 08:56
nine It's been a while since I've had a cat. Maybe I'm just a bit rusty. 08:57
s/had/served/ # you see?
Zoffix It's "spend 1.5hours trying to squeeze 7% out of a method and failing compilations for stupid reasons..."
nine Your cat is optimizing rakudo? :) 08:59
Zoffix heh 09:00
Geth rakudo/nom: ae5e510fd0 | (Zoffix Znet)++ | src/core/IO/Path.pm
Make IO::Path.new 7% faster when creating from Str

Since a lot of IO::Paths are created from strings, avoiding the hitting the coercer gives a minor boost.
Also fixes failure to detect empty path when using .new: :basename… form.
09:03
timotimo Woodi: do you know that chopping an array into N pieces, putting them into M threads, burning CPU, then joining is what hyper and race do? 09:10
well, the numbers work differently; it's "into pieces of size N" 09:11
Geth rakudo/nom: 4eef6dbf37 | (Zoffix Znet)++ | src/core/IO/Spec/Unix.pm
Make IO::Spec::Unix.is-absolute about 4.4x faster
09:40
RabidGravy Wondering if it is better to make Associative a multi rather than having the two parameters with a default 10:01
Geth rakudo/nom: dcf1bb200e | (Zoffix Znet)++ | src/core/IO/Spec/Unix.pm
[io grant] Make IO::Spec::Unix.rel2abs 35% faster
10:27
rakudo/nom: d90c6bfb6c | (Elizabeth Mattijsen)++ | src/core/Rakudo/Iterator.pm
Fix error message
lizmat Files=1181, Tests=55992, 196 wallclock secs (11.67 usr 4.42 sys + 1162.56 cusr 109.48 csys = 1288.13 CPU) 10:28
yoleaux2 00:32Z <Zoffix> lizmat: so we blow up $*SPEC? I'm in. Can we easily treat Windows same as *nix though? On Linux, C:/foo is a relative path, but on Windows it's absolute (can't create a dir with `:` in its name).
lizmat .tell Zoffix I would welcome blowing up $*SPEC 10:29
yoleaux2 lizmat: I'll pass your message to Zoffix.
lizmat in the newio branch, a path basically consisted of 3 parts: volume (always '' on *nix), directory and basename
RabidGravy In order to pass the tests it needs to be "my role Associative[::TValue = Mu, ::TKey = Str(Any)]" which doesn't feel right, but I'll PR anyway 10:30
lizmat Zoffix: the combination of volumen and directory determined whether something was relative or absolute
to my recollection, even on Win, one must have a root slash to make something absolute: C:foo is a relative dir 10:31
ah, so really starts-with('/') is what makes a path absolute 10:32
timotimo unless it starts with D:/?
Zoffix How is C:/foo not an absolute path on Windows?
yoleaux2 10:29Z <lizmat> Zoffix: I would welcome blowing up $*SPEC
lizmat C:/foo is absolute, C:foo isn't
Zoffix Ah, I see what you mean 10:33
timotimo that doesn't starts-with('/') though :P
lizmat if you always split up a path in volume, dir and basename
Zoffix lizmat: you said IO is over-engineered. Is that just the $*SPEC stuff or is there more?
timotimo OK
lizmat then volume takes the drive letter
or the network designation
timotimo but but but
you said "starts-with('/') is what makes a path absolute" 10:34
but then you said you have to split it up into volume, dir, and basename
lizmat sorry, "/" on the directory part of a path :-)
timotimo :D
i had fun yesterday when the json standard (the one that i looked at, out of the many there are) used "codepoint" and "character" interchangably 10:35
lizmat
.oO( that's not quite out of character )
m: say { LEAVE say "bye"; 42 }() 10:42
camelia bye
42
lizmat m: say { 42; LEAVE say "bye" }() # position of LEAVE in block *does* matter wrt to return value 10:43
camelia WARNINGS for <tmp>:
Useless use of constant integer 42 in sink context (line 1)
bye
Nil
lizmat I think this is a bug, but I also vaguely recall there's a ticket for it already
Geth rakudo: jonathanstowe++ created pull request #1048:
Fix the introspection of attributes with explicitly typed keys
timotimo ooooh 10:48
good catch
lizmat yeah, running / testing that now :-)
Zoffix always assumed that was by design... 10:50
Same with any phaser and CATCH block too
m: say { 42; CATCH {} }() 10:51
camelia WARNINGS for <tmp>:
Useless use of constant integer 42 in sink context (line 1)
Nil
lizmat Zoffix: what would be the usability idea behind that behaviour? 10:55
I mean, if it doesn't matter where you put a phaser in a block, why does it matter if you put them at the end ?
arguably, it's easy to work around, once you know it. But it still is a bit of a WAT 10:56
Geth rakudo/nom: a6ba994d39 | (Jonathan Stowe)++ | src/core/Associative.pm
Fix the introspection of attributes with explicitly typed keys

This was reported as github.com/jonathanstowe/JSON-Class/issues/3
It appears that when the "BOOTSTRAP" Associative is made for the attributes type it has two parameters but when it is materialised to call 'of' on it, it fails because the Associative only has one ... (22 more lines)
10:58
Zoffix Don'
Geth rakudo/nom: dd271e18c1 | lizmat++ | src/core/Associative.pm
Merge pull request #1048 from jonathanstowe/fully-shaped-associative

Fix the introspection of attributes with explicitly typed keys
Zoffix Don't know about usability, but it fits with the "returns the last stament" thing...
lizmat even so, one might expect it to return the thunk / block then ? 10:59
I would prefer the view that phasers are invisible until you fire them :-) 11:00
until they get fired
sneaky, I know, but in a Klingon world :-)
Zoffix :)
lizmat m: class A { method a(--> True) { } }; my $now = now; for ^1000000 { A.a }; say now - $now 11:05
camelia 0.774548
lizmat m: class A { method a() { True } }; my $now = now; for ^1000000 { A.a }; say now - $now
camelia 0.799003
lizmat m: class A { method a(--> True) { } }; my $now = now; for ^1000000 { A.a }; say now - $now
camelia 0.77053339
lizmat m: class A { method a() { True } }; my $now = now; for ^1000000 { A.a }; say now - $now
camelia 0.78772686
nine I wonder if I shouldn't just get it over with and include CompUnit::Repository::Staging in the setting. 11:06
lizmat nine: what does it do ? :-)
nine It's meant for packaging modules. You use e.g. /tmp/vendor as staging area to install the module that you want to package into. You can then just package the files generated there. On installation, all you have to do is to unpack those files into /usr/share/perl6/vendor 11:09
lizmat I would be +1 on that 11:10
nine Right now we treat the Staging repo as a custom repo, i.e. it gets loaded when resolving RAKUDOLIB. We specifically exclude such repos from a precomp file's dependency chain. But that fails if the generated precomp file references the repo in any way. Say through the CompUnit's .repo property. 11:11
The process already works when installing the CORE dist, but failed on the first module I've tried to package :/ 11:13
Looks like the issue is connected to %?RESOURCES 11:53
Geth nqp/master: 4 commits pushed by (Pawel Murias)++ 11:58
rakudo/nom: 4fdebc9702 | (Zoffix Znet)++ | src/core/IO/Spec/Unix.pm
[io grant] Make IO::Spec::Unix.split 36x Faster

  - Affects IO::Path's .parent, .parts, .volume, .dirname, and .basename
  - Measurement of first call to .basename shows it's now 6x-10x faster
12:07
Zoffix 8am... time to go to bed.
Zoffix &
nine Or not :/ A minimal distribution still works just fine. Even if it's using NativeCall with its own helper library. But Inline::Perl5 will not even though that's just more of the same. 12:09
Ah, my test was just faulty! Due to timestap issues with the installed file it ended up re-compiling the minimal test module and thus not trigger the error. 12:27
Looks like using NativeCall in the module triggers the error while using Test does not.
Dpendency chains! Using NativeCall::Compiler::GNU fails while using NativeCall::Types and then NativeCall::Compiler::GNU (which depends on Types) succeeds. 12:31
lizmat Zoffix++ # slurp vs bare nqp now only 15x slower, as opposed to 19x before 13:41
m: use nqp; for ^10000 { my $PIO := nqp::open("ten","r"); my $slurped = nqp::readallfh($PIO); nqp::closefh($PIO) }; say now - INIT now 13:42
camelia Failed to open file ten: no such file or directory
in block <unit> at <tmp> line 1
lizmat hmmm
$ 6 'use nqp; for ^10000 { my $PIO := nqp::open("ten","r"); my $slurped = nqp::readallfh($PIO); nqp::closefh($PIO) }; say now - INIT now' 13:43
0.0995450
$ 6 'for ^10000 { my $slurped = "ten".IO.slurp }; say now - INIT now'
1.3552516
afk again&
Zoffix vis-a-vis "Interp / Spesh / JIT"; judging by colour in the profile, the red is bad, but what makes it red? What usually interferes with it being speshed/jitted? 17:53
lizmat code not being specific enough, I think 17:57
e.g. =:=
MasterDuke number of times it's called i believe, i.e., even a function that could be jitted might not be if it's only called a couple times 17:59
Zoffix It's called enough number of times. 18:01
samcv good * 18:06
Zoffix \o
MasterDuke have you tried offering brrt a small sacrifice?
samcv MasterDuke, how small?
MasterDuke couldn't say, don't know his tastes. maybe a box of thin mints per function to be jitted? 18:08
Zoffix: what function is it?
Zoffix secret 18:09
samcv :O 18:10
MasterDuke are you testing it in isolation? i ran into a problem when testing getting nqp::radix jitted where things in the mainline don't get jitted when run in nqp
e.g., `nqp-m -e 'nqp::op() for ^1000000` wasn't getting jitted, but `nqp-m -e 'sub a() {nqp::op() for ^1000000}; a()` was 18:11
Geth rakudo/nom: 0111f10933 | (Zoffix Znet)++ | src/core/IO/Spec/Unix.pm
[io grant] Make IO::Spec::Unix.catdir 3.9x Faster
18:16
rakudo/nom: b4d80c06d7 | (Elizabeth Mattijsen)++ | src/core/IO/Path.pm
Make .IO.slurp about 2x as fast

If you don't specify any named parameters. Would be 5x as fast if we didn't have to do self.abspath.
18:19
lizmat Zoffix: sorry 18:22
couldn't resist :-)
Zoffix heh :) lizmat++
.ask jnthn what are your thoughts on removing $*SPEC and all the IO::Spec* in v6.d? We'd treat all the OSes as mostly-same rather than mostly-differn. e.g. we'd use "/" as path separator on all OS's 18:24
yoleaux2 Zoffix: I'll pass your message to jnthn.
Zoffix .ask TimToady what are your thoughts on removing $*SPEC and all the IO::Spec* in v6.d? We'd treat all the OSes as mostly-same rather than mostly-differn. e.g. we'd use "/" as path separator on all OS's
yoleaux2 Zoffix: I'll pass your message to TimToady.
lizmat is looking forward to those answers :-)
Zoffix: fwiw, I think we need a PIO class: this would be used for all situations where we need a handle, but do not need to expose it 18:29
so it would not carry any attributes for line ending, encoding and what not: these would be set at creation on the PIO, but would not be HLL introspectable 18:30
chansen_ Im aware of the existence of nqp; But replacing large parts of Perl6 Core with nqp equivalent code only shows the lack of a performant VM 18:38
lizmat chansen_: agree 18:39
chansen_ Why is a majority part of Perl6 Core being rewritten in NQP? 18:45
AlexDaniel chansen_: because it gives Nx speedups today 18:47
Zoffix chansen_: lack of a sufficient number of humans capable of making the VM more performant. 18:48
chansen_ ok, thanks for the honest answers 18:52
mst and nqp is way more accessible than C 18:58
chansen_ mst: accessible? 18:59
mst chansen_: fast, safe C is *hard* for most of us
chansen_ The comparison is somewhat flawed, but yeah 19:02
lizmat m: role A[::T = Int] { method a(--> T) {} }; class B does A { }; dd B.a # feels like a bug 19:03
camelia Nil
lizmat m: role A[::T = Int] { method a() { T } }; class B does A { }; dd B.a # needs to be in method body 19:04
camelia Int
Zoffix m: role A[::T = Int] { method a(--> Int) {} }; class B does A { }; dd B.a # feels like a bug
camelia Nil
Zoffix Seems isn't?
'cause it's a type and not a constant.
lizmat ?? 19:05
Zoffix Is it?
heh, OK nevermind then
lizmat m: role A[::T = Int] { method a(--> T) {} }; class B does A[Str] { }; dd B.a
camelia Nil
lizmat somehow it loses the value, or is codegenned at the wrong time 19:07
Zoffix But how come you say it's a value, instead of a type? Like a type-constraint on the method 19:09
m: role A[::T = Int] { method a(--> T) {'X'} }; class B does A[Str] { }; dd B.a 19:10
camelia X::TypeCheck::Return exception produced no message
in method a at <tmp> line 1
in block <unit> at <tmp> line 1
Zoffix m: role A[::T = Int] { method a(--> T) {42} }; class B does A[Str] { }; dd B.a
camelia X::TypeCheck::Return exception produced no message
in method a at <tmp> line 1
in block <unit> at <tmp> line 1
Zoffix shrugs
lizmat "loses the type value" is what I meant 19:12
mst chansen_: certainly, even though I don't know nqp yet, I'd be much more confident I could patch nqp code without breaking everything 19:27
Geth rakudo/nom: c3c849ed95 | (Elizabeth Mattijsen)++ | 16 files
Use a(--> Foo) {} instead of a() { Foo } where possible

Because it is about 20% faster. No sure whether this will cause any noticeable speedups, but every little bit helps. And I think it actually reads better. And should provide some better optimization options.
19:50
lizmat afk again&]
chansen_ mst: How would the intermediate representation, NQP protect you from stupidity? 19:52
mst: the analogy for NQP in Perl5 is XS/C 19:53
timotimo nqp has simpler semantics, and far, far fewer builtins - be it functions or classes 19:57
mst chansen_: if you're going to insist on that analogy then you've completely missed the point.
timotimo i've heard jnthn muse a few times that some things that are currently nqp:: ops implemented in C inside moarvm should at some point be moved closer towards nqp 19:59
chansen_ mst: please educate me! 20:02
mst chansen_: nah, we're just going to go round in circles like we always do because you're too good at C to be able to imagine people who aren't 20:03
samcv gonna ask her so may get more varied answers
m: 99999999.chr.say
camelia Error encoding UTF-8 string: could not encode codepoint 99999999
in block <unit> at <tmp> line 1
samcv draft new error message is: "Error encoding UTF-8 string: could not encode codepoint 199999999, codepoint out of bounds. Cannot encode higher than 1114111" 20:04
should i say "Highest unicode codpoint is XXX" or just simply say cannot encode higher than that number?
AlexDaniel 1114111 :S
I wonder if it should say 0x10FFFF
samcv that's 0x10FFFF in decimal
well the current error gives the codepoint they *tried* to encode using demical 20:05
AlexDaniel yea, that would be weird if one was in hex… meh
samcv which is why i'm bringing it up here what it should say. maybe show both forms for optimum info?
AlexDaniel I'm just thinking that I've seen 0x10FFFF so many times, but 1114111 does not tell me anything… Unless I convert it to hex to figure out what it is. 20:06
samcv k 20:07
AlexDaniel m: (-55).chr.say
camelia chr codepoint cannot be negative
in block <unit> at <tmp> line 1
samcv Error encoding UTF-8 string: could not encode codepoint 199999999 (0xBEBC1FF), codepoint out of bounds. Cannot encode higher than 1114111 (0x10FFFF) 20:08
how about this?
AlexDaniel I think it is awesome 20:10
I wonder if it should be somewhat similar to this: 20:11
m: say ‘hello’.substr(40)
camelia Start argument to substr out of range. Is: 40, should be in 0..5; use *-40 if you want to index relative to the end
in block <unit> at <tmp> line 1

Actually thrown at:
in block <unit> at <tmp> line 1
AlexDaniel probably not
nine chansen_: I've found nqp to actually be quite close to Perl 5 in terms of functionality. It feels like Perl 5 with the arcane cruft removed but without the magical features of Perl 6 added. 20:24
chansen_: that makes it quite accessible to me. You can hardly do anything subtly wrong in nqp. It either works or doesn't. 20:25
timotimo you can always forget to decont 20:31
nine But then it will probably break quite well
Also there must be the exception to the rule :) 20:32
timotimo i forget where that usually happens, but forgetting to decont stuff can cause subtler bugs than "does not work at all"
*shrug* of course :)
nine Practically nothing to what you have to remember when writing XS. Like forgetting SPAGAIN; and it will work always, except when the callback into Perl 5 runs a database query that returns more than 4000 rows. 20:33
Funny things like that.
Took me two full days to catch that one. Will never forget this experience.
timotimo ouch? 20:34
Geth rakudo: AlexDaniel++ created pull request #1049:
Remove $.pid from Proc
20:45
rakudo/nom: 5b8d4c2f42 | (Aleks-Daniel Jakimenko-Aleksejev)++ | src/core/Proc.pm
Remove $.pid from Proc

Not that we should not have it, but as of today it does nothing at all (making users assume that there is something wrong with their code).
  See irclog.perlgeek.de/perl6/2017-03-25#i_14323473
Spectest clean.
21:07
rakudo/nom: ca2a77eee3 | (Zoffix Znet)++ | src/core/Proc.pm
Merge pull request #1049 from AlexDaniel/there-is-no-pid

Remove $.pid from Proc
rakudo/nom: fa9aa47652 | (Zoffix Znet)++ | src/core/Rakudo/Internals.pm
[io grant] Make R::I::SET_LINE_ENDING_ON_HANDLE 4.1x Faster
21:54