Geth roast/newer-cat-handle: 6 commits pushed by (Zoffix Znet)++, (Elizabeth Mattijsen)++, usev6++ 00:00
rakudo/newer-cat-handle: 5 commits pushed by (Zoffix Znet)++, (Elizabeth Mattijsen)++
roast/newer-cat-handle: 93e335aa57 | (Zoffix Znet)++ | S32-io/io-cathandle.t
Change spec of .chomp/.nl-in behaviour on cathandle

While original idea of leaving the already opened handles with whatever mode and attributes they were in seemed neat, we run into issues with binary/non-binary operations that might cross from a binary handle to non-binary handle.
Spec the default to be: change mode/attrs of all handles to what the cathandle was instantiated with. We still have room to add an option to swap to preserving behaviour if we ever end up needing it.
00:31
rakudo/newer-cat-handle: ce17a2f871 | (Zoffix Znet)++ | src/core/IO/CatHandle.pm
Refactor cathandle attribute handling

  - Match attribute paradigm to that of new IO::Handle encoding refactor
  - Re-set attributes and mode on already opened handles to that of the
   CatHandle's attrs
  - Re-allow instantiation with empty list of handles; no need to make the
   rocket explode if we have no sensors to read from ;)
00:34
rakudo/newer-cat-handle: 60129a1943 | (Zoffix Znet)++ | 2 files
Fix IO::CatHandle.slurp-rest exception args
00:45
MasterDuke timotimo: did you see jnthn's comment earlier about atpos and ]\? do you have any idea why [] isn't compiling down to the same thing as atpos? 00:52
*atpos and [] 00:53
Zoffix ===SORRY!=== 01:10
Failed to rename 'C:\rakudo-git\install\share\perl6\precomp\C6A98BBB719A4A7942B8DB22D62510D812B345FA.1495846969.20647\C5\C57EBB9F7A3922A4DA48EE8FCF34A4DC55942942.tmp' to 'C:\rakudo-git\install\share\perl6\precomp\C6A98BBB719A4A7942B8DB22D62510D812B345FA.1495846969.20647\C5\C57EBB9F7A3922A4DA48EE8FCF34A4DC55942942': Failed to rename file: operation not permitted
in block <unit> at tools/build/install-core-dist.pl line 27
Fresh clone on Windows10 :/
MasterDuke timotimo, jnthn: if i put a print in the moarvm VMArray.at_pos function, i see its output when i do nqp::atpos, but not when i do [] 01:11
Zoffix: your branch?
Zoffix nom
huh, and a bunch of .dll.a in the checkout: gist.github.com/zoffixznet/ac938eb...1004343d13 01:12
MasterDuke whoops
Zoffix Wonder if that's normal :\
hm, and there IS a file named that in that dir... 01:14
and if I delete it and try to gmake install; it gets recreated and same error happens :\ 01:15
.ask jnthn did your encoding rework affect precomp stuff? I'm getting file-rename errors on Win10, and I had no build issues on 2017.05 release, so it's something new: rt.perl.org/Ticket/Display.html?id=131378 01:20
yoleaux Zoffix: I'll pass your message to jnthn.
ugexe windows does some shit where you have to do some shit like wait for io to actually complete 01:21
maybe a handle is left open somewhere?
a naive solution could sleep after the spawned precomp processes (which open files) to give things time to catch up 01:24
Zoffix Well, we didn't need any sleeps a week ago...
c: 2017.04 with '/tmp/foo999'.IO { .spurt: Buf.new: 200; dd .open.slurp }
committable6 Zoffix, Ā¦2017.04: Ā«""Ā»
Zoffix m: with '/tmp/foo999'.IO { .spurt: Buf.new: 200; dd .open.slurp }
camelia ""
Zoffix This seems busted
m: Buf.new(200).decode 01:25
camelia Malformed termination of UTF-8 string
in block <unit> at <tmp> line 1
Zoffix I'd expected ^ throwage
ugexe ive gotten that error intermitently before but i dont think reproducable
Zoffix I remember we had that error when we busted mkdir on windows 01:26
(I mean the file rename one)
m: with '/tmp/foo999'.IO { .spurt: Buf.new: 200, 200; dd .open.slurp } 01:27
camelia Malformed UTF-8
in block <unit> at <tmp> line 1
ugexe but it seems to be ok on appveyor
Zoffix this does crash :/
ugexe install-core-dist.pl that is 01:28
Zoffix hm, indeed. That gives me hope
Wonder what sort of windows appveyor uses
another inconsistency: IO::Handle's .open takes `enc` but .new takes `encoding` -_- 01:35
ugexe os: Visual Studio 2013/2015 use Server 2012 R2 and 2017 uses Server 2016 01:37
Zoffix notes that on the ticket 01:39
cpan@perlbuild4~/CPANPRC/rakudo (newer-cat-handle)$ ./perl6 -e 'IO::CatHandle.new(:encoding<utf8-c8>).encoding.say' 01:41
Nil
I'm blind or what. I don't get why it ends up unset: github.com/rakudo/rakudo/blob/newe...pm#L10-L25
ugexe its not named? 01:46
n/m looking at wrong method hurr
Zoffix adds debug print statements
ZofBot: time for a coffee break!
ZofBot Zoffix, The "flunk()" function marks a test as not passed
Zoffix Then I don't get why my slurp is trying to use utf8 01:51
grrrr 01:52
It's the enc vs encoding inconsistency that bit me twice now... 1st time was when I've used `enc` to .new() and now that my code is passing it as :$!encoding to open 01:53
$original-designer--
.encoding method should take the encoding as a named :enc arg. Just to mess with people 01:54
ugexe rename them all :encoding(:$enc) 01:55
Zoffix good plan
Geth rakudo/newer-cat-handle: 7ebc386d31 | (Zoffix Znet)++ | src/core/IO/CatHandle.pm
[io grant] Implement IO::CatHandle.slurp
02:00
Zoffix hesitates at the last minute, seeing as .open's args are overengineered as hell as it is :) 02:02
Geth roast/newer-cat-handle: bacfd9fd6e | (Zoffix Znet)++ | S32-io/io-cathandle.t
[io grant] Test IO::CatHandle.slurp

1 fudged test for newly discovered bug in IO::Handle:
  rt.perl.org/Ticket/Display.html?id=131379
02:05
Zoffix That's 2 bugs found thanks to IO::CatHandle \o/
BenGoldberg Why does IO::CatHandle have methods whose bodies are '{}' instead of, say, '{...}' ? 02:08
Zoffix Didn't think of ... 02:10
BenGoldberg :) 02:11
m: sub foo { }; dd foo;
camelia Nil
BenGoldberg If I call .read and get back Nil instead of a failure or an exception, I'd be a bit unhappy.
Geth rakudo/newer-cat-handle: 97aced9825 | (Zoffix Znet)++ | src/core/IO/CatHandle.pm
Stub unimplemented cathandle methods; BenGoldberg++

Instead of having them empty
02:12
BenGoldberg I just thought of something *really* clever: multi trait_mod:<is>(Routine $r, :$unimplemented!), which would cause any sub/method it's applied to, to fail with an X::NYI object 02:18
Because lets face it, an error message "stub code executed" is always a LTA error message.
Zoffix heh 02:19
Geth rakudo/newer-cat-handle: 52b34b759e | (Zoffix Znet)++ | src/core/IO/CatHandle.pm
[io grant] Implement IO::CatHandle.comb/.split
02:23
roast/newer-cat-handle: e78e3c0c6c | (Zoffix Znet)++ | S32-io/io-cathandle.t
[io grant] Test IO::CatHandle.comb/.split
Zoffix Another inconsistency: .read requires a size to read, while .readchars defaults to $*DEFAULT-READ-ELEMS 02:26
Another inconsistency: .readchars takes the optional size as a positional, while .Supply takes it as named :$size arg
ZofBot: are you writing these down?
ZofBot Zoffix, attr()", since that terminates the entire interpolation
Zoffix hehe... I'm testing a "non-binary cat" 02:44
genderfluid kitty :P
Geth rakudo/newer-cat-handle: beaa92593d | (Zoffix Znet)++ | src/core/IO/CatHandle.pm
[io grant] Implement IO::CatHandle.read
02:50
roast/newer-cat-handle: f1c112509d | (Zoffix Znet)++ | S32-io/io-cathandle.t
[io grant] Test IO::CatHandle.read
Zoffix calls it a day
Time to play EVERSPACEā„¢
m: my %h is Positional; %h := <a b c>; .say for %h 02:55
camelia a
b
c
Zoffix TIL we can do that
m: my %h is Positional; %h := {}; .say for %h
camelia Type check failed in binding; expected Positional but got Hash (${})
in block <unit> at <tmp> line 1
Zoffix crazy
m: my %h is Positional; say %h.^roles
camelia ((Positional))
Zoffix m: my %h is Positional is Associative; say %h.^roles
camelia ((Associative))
Zoffix m: my %h dopes Positional does Associative; say %h.^roles 02:56
camelia 5===SORRY!5=== Error while compiling <tmp>
Two terms in a row
at <tmp>:1
------> 3my %h7ā5 dopes Positional does Associative; say
expecting any of:
infix
infix stopper
statement end
statementā€¦
Zoffix m: my %h does Positional does Associative; say %h.^roles
camelia ((Associative) (Positional) (Associative) (Iterable))
Zoffix hah
samcv hmm did something change with Pairs? 03:17
Data::Dump is failing tests
Cannot resolve caller new(Pair: ); none of these signatures match: 03:18
(Pair $: Cool:D \key, Mu \value, *%_)
(Pair $: Mu \key, Mu \value, *%_)
(Pair $: Mu :$key!, Mu :$value!, *%_)
really weird. investigating
and it's not giving me a location of where the error is occuring 03:20
m: sub thing ($a) { say $a }; thing(Pair.new) 03:23
camelia Cannot resolve caller new(Pair: ); none of these signatures match:
(Pair $: Cool:D \key, Mu \value, *%_)
(Pair $: Mu \key, Mu \value, *%_)
(Pair $: Mu :$key!, Mu :$value!, *%_)
in block <unit> at <tmp> line 1
samcv wtfff
bisectable6, sub thing ($a) { say $a }; thing(Pair.new)
bisectable6 samcv, Bisecting by exit code (old=2015.12 new=094e77a). Old exit code: 0
samcv, bisect log: gist.github.com/90c4e91480234c6597...3e872cac9f
samcv, (2017-05-22) github.com/rakudo/rakudo/commit/85...b5dd1ee88a
samcv oh. oops. looks like Pair.new is what's erroring not the sub 03:24
so do we not want you to be able to do Pair.new anymore? 03:27
Zoffix samcv: you can, but you need to specify the key/value 03:37
samcv ok that is fine. :)
Zoffix star: dd Pair.new
camelia (Mu) => Mu
Zoffix star: dd Pair.new: 42
camelia Default constructor for 'Pair' only takes named arguments
in block <unit> at <tmp> line 1
Zoffix star: dd Pair.new: :meows
camelia (Mu) => Mu
samcv ah 03:38
i can see why we wanted to do that
Zoffix Basically the only reason it worked is it was hitting the Mu.new constructor and the key/value attributes ended up unset
m: dd Pair.new: Mu, Mu
camelia (Mu) => Mu
Zoffix ^ way to do it now
m: dd Pair.new: :key(Mu) :value(Mu) # or this 03:39
camelia (Mu) => Mu
Zoffix m: use nqp; dd nqp::create(Pair) 03:40
camelia (Any) => Any
Zoffix heh
samcv yeah kinda odd it created Mu in the first place heh 03:43
also odd that this test tested that.
ok PR sent for that. onto what i was doing beforehand :) 03:56
Geth roast: f3ef06fbd4 | usev6++ | 2 files
[JVM] Skip hanging tests
07:42
samcv the hell travis-ci.org/samcv/rakudo-appimag...4151#L1234 08:28
i've been getting this for the last 3 days 08:29
and happens before any of my special code happens. only happens during build of rakudo 08:31
[Tux] This is Rakudo version 2017.05-133-g094e77a2c built on MoarVM version 2017.05-25-g62bc54e9 08:40
csv-ip5xs 2.811
test 13.270
test-t 4.439
csv-parser 13.161
- 4.640
lizmat Files=1197, Tests=59939, 209 wallclock secs (12.75 usr 4.88 sys + 1256.99 cusr 118.00 csys = 1392.62 CPU) 10:39
bartolin_ r: .say for lines() 10:40
camelia Ā»Wann treffen wir drei wieder zusamm?Ā«
Ā»Um die siebente Stundā€˜, am BrĆ¼ckendamm.Ā«
Ā»Am Mittelpfeiler.Ā«
Ā»Ich lƶsche die Flamm.Ā«
Ā»Ich mitĀ«

Ā»Ich komme vom Norden her.Ā«
Ā»Und ich vom SĆ¼den.Ā«ā€¦
10:41





















































































ā€¦
bartolin_ r-j seems to keep reading newlines from stdin. it works fine with something like for "file".IO.lines { .say } 10:42
jnthn, Zoffix: ^^ do you have a quick idea where to look for that, perhaps? it seems to be behind some newly hanging spectests on jvm 10:43
jnthn bartolin_: 34835cc672a5444 in the nqp repo fixed a bug that caused that, maybe it needs doing in some other place? 10:49
yoleaux 10:39Z <brrt> jnthn: that is a pretty good idea, i think; we could use a separate section for that
jnthn (It caused it on file handles)
I'd have thought $*IN woulda had the same read code but maybe somehow not... 10:50
I also had some oddness when trying to test the JVM build; some tests just spit out "No subtests run" in make test or make spectest under the harness, but all of those I tried worked when I ran them individually 10:52
bartolin_ jnthn: ah, thanks. I'd seen that commit, but didn't consider that stdin could be handle separately. 10:53
jnthn Yeah...it really matters now that nqp::eoffh works
We can probably go on a Java code deleting spree at some point after this work too 10:54
Since the VM level I/O stuff will only have to care about bytes
Zoffix . 10:55
yoleaux 10:02Z <jnthn> Zoffix: Hm, I can reproduce it also, though I have no idea at all what could have caused it. As nine++ mentioned on the RT, it's pretty much always about a missing .close
bartolin_ jnthn: regarding test files complaining about 'No subtests run': I seem to remember similiar glitches (always worked when run standalone), but lately (say last two weeks) I didn't encounter them 10:59
Zoffix ugh... why is gabor spamming me with slack Bailador requests and now emailed with "I think Zoffix is not on the Bailador Slack channel so let me try this way." yeah, there's a reason, bruh. Take a hint. I'm not a fan of Failador 11:04
ZofBot: ready the coffee!
ZofBot Zoffix, }* at every block entry time, repeats on loop blocks
tadzik Zoffix: hah, I thought it'd end with "I'm not a fan of Slack" 11:10
Zoffix Neither am I a fan of slack 11:11
Since pitching in to gabor's book, I received a survey from indiegogo, an invite to slack Bailador, a REMINDER of slack Bailador, and now a personal spam from gabor about something in Bailador. I thought I was supporting a book, not signing up to be a Bailador maintainer. 11:14
Anyway... 11:16
Zoffix tries to degrump by hunting that precomp bug
bartolin_ jnthn: adding 'eof = true' after this while loop seems to avoid the issue with reading newlines from stdin: github.com/perl6/nqp/blob/88d5c68e...e.java#L44 11:28
I'll investigate further (unless someone else beats me to it) 11:29
MasterDuke i also sometime get those "no subtests run" during jvm spectests. have never detected a rhyme or reason, i just restart and hope they run the next time (or i'll run them individually if it's only a couple) 11:34
Zoffix holy crap! I did it! 11:47
lizmat
.oO( the rain in spain stays mainly in the plain )
11:48
bartolin_ oh, now I remember: sometimes during 'make spectest' all remaining test files started to fail (I *think* it was with 'no subtests run'). I suspect it is a problem with the eval server. maybe a memory leak, since I sucessfully worked around it by increasing Xmx for the eval server 11:49
jnthn bartolin_: That may be a tad over-aggressive (try some examples with prompt, or very long input) 11:59
bartolin_: Just 'cus we can't read more now doesn't mean we can't ever read more
MasterDuke jnthn: i'm back thinking aabout atpos again. if i put a print in the moarvm VMArray.c at_pos function, i see its output when i do nqp::atpos, but not when i do [] 12:01
bartolin_ jnthn: noted, thanks! (but at least that seems to be the area where some adjustment is needed)
Zoffix ZOFVM: Files=1247, Tests=136915, 105 wallclock secs (18.24 usr 3.11 sys + 2110.41 cusr 178.33 csys = 2310.09 CPU) 12:11
jnthn MasterDuke: What was your benchmark again? 12:13
MasterDuke well, i just tried with a single access to see if the print happened 12:14
Geth rakudo/nom: 0c5fe56cc9 | (Zoffix Znet)++ | src/core/CompUnit/PrecompilationRepository.pm
Close unit's file handle after reading in the bytecode

A file is left open on Windows, so it prevents it from being worked on.
Fixes RT#131378: rt.perl.org/Ticket/Display.html?id=131378
synopsebot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=131378
jnthn MasterDuke: I think that there's something in QAST compiler that deletes QAST::Var in sink context
(with some caveats on the 'scope')
MasterDuke nqp: sub a() { my $l := nqp::list(1, 3, 5); my int $i := 0; my $s := nqp::time_n(); while ++$i < 100_000_000 { $l[0] }; say(nqp::time_n() - $s) }; a()
camelia 0.303999185562134
Zoffix .ask nine would you double check this commit? It fixes my Windows gmake install bug, but I'm not 100% sure if the close is in the right place: github.com/rakudo/rakudo/commit/0c5fe56cc9
yoleaux Zoffix: I'll pass your message to nine.
MasterDuke nqp: sub a() { my $l := nqp::list(1, 3, 5); my int $i := 0; my $s := nqp::time_n(); while ++$i < 100_000_000 { nqp::atpos($l, 0) }; say(nqp::time_n() - $s) }; a() 12:15
camelia 0.674409627914429
MasterDuke those ^^^ were the benchmarks
jnthn Try assigning the result of th lookup somewhere
*the
MasterDuke nqp: sub a() { my $l := nqp::list(1, 3, 5); my int $i := 0; my $s := nqp::time_n(); mt int $a; while ++$i < 100_000_000 { $a := nqp::atpos($l, 0) }; say($a); say(nqp::time_n() - $s) }; a() 12:16
camelia Unable to parse expression in blockoid; couldn't find final '}' at line 2, near "mt int $a;"
at gen/moar/stage2/NQPHLL.nqp:768 (/home/camelia/rakudo-m-inst-1/share/nqp/lib/NQPHLL.moarvm:panic)
from gen/moar/stage2/NQPHLL.nqp:775 (/home/camelia/rakudo-ā€¦
MasterDuke nqp: sub a() { my $l := nqp::list(1, 3, 5); my int $i := 0; my $s := nqp::time_n(); my int $a; while ++$i < 100_000_000 { $a := nqp::atpos($l, 0) }; say($a); say(nqp::time_n() - $s) }; a()
camelia 1
2.32188773155212
MasterDuke nqp: sub a() { my $l := nqp::list(1, 3, 5); my int $i := 0; my $s := nqp::time_n(); my int $a; while ++$i < 100_000_000 { $a := $l[0] }; say($a); say(nqp::time_n() - $s) }; a()
camelia 1
2.51248073577881
MasterDuke hm, much closer
jnthn Yeah, I think your sink context $l[0] got optimized out entirley 12:17
Which'd explain what you saw :)
MasterDuke heh. doing nothing is faster than doing something quickly
jnthn Right ;)
MasterDuke do you have an opinion on converting radix, split, etc. to BOOT(Int|Str)Arrays? 12:18
lizmat afk for rest of te day& 12:19
jnthn m: use nqp; my \x = nqp::split('abcbe', 'b'); say nqp::atpos(x, 0).WHAT
camelia (Str)
jnthn If we do that then a Perl 6 use of nqp::split would have to box stuff itself 12:20
And create a new array to do so
And it'll create confusion in NQP too by busting my @a := nqp::split(...); @a[0]
Since [...] expects an object array 12:21
MasterDuke yeah, i did it for radix as a test and then converted all [] to atpos in nqp and rakudo
which was annoying, so i didn't want to do any more unless there would be an overall benefit 12:22
jnthn I don't think there's a huge benefit to be honest 12:24
MasterDuke heh, kind of relieved, converting split would have meant way more [] to turn into atpos 12:25
jnthn Uses of nqp::radix show up at compile time 12:26
And while of course faster compilation is nice...I suspect this is a case of being a drop in the ocean.
MasterDuke would split have more impact? 12:27
jnthn As mentioned, it'd make the op *less* useful for Perl 6
MasterDuke yeah, but might effect compilation more than radix 12:29
jnthn Maybe but...do we really do split a lot in compilation?
Given we're parsing, the grammar has usually already got things broken up into pieces for us
MasterDuke looks like it's used some, but probably not worth the pain 12:30
jnthn My guess would be not
Zoffix buggable: speed 6 12:35
buggable Zoffix, ā–‚ā–ƒā–ā–†ā–‡ā–ƒ data for 2017-05-25ā€“2017-05-27; range: 4.286sā€“4.640s; 3% slower
Geth rakudo/newer-cat-handle: ccc90fd118 | (Zoffix Znet)++ | src/core/IO/CatHandle.pm
[io grant] Implement IO::CatHandle.readchars
12:36
roast/newer-cat-handle: e9e78e103b | (Zoffix Znet)++ | S32-io/io-cathandle.t
[io grant] Test IO::CatHandle.readchars
timotimo in theory [] could have compiled into atposref, but that seems quite unlikely 12:38
in nqp i mean
MasterDuke timotimo: now that nqp question has been laid to rest, do you remember where we were with the int/num bug? 13:23
timotimo oooh 13:24
it got optimized out
that's fun
we were where as soon as you grab the int object out of the array with atpos and store it into a my int $foo it'll be smrt_numify-ed, then coerced from num to int
instead of unbox_i being called on it
timotimo AFK
MasterDuke ah, right. and the sequence that's generated (decont -> smrt_numify -> coerce_ni) is in QAST::MASTOperations.add_hll_unbox, but that function isn't actually being called in our case 13:29
Zoffix # expected: $["????xC8????xC8????xC8????xC8*F"] 13:38
# got: $["????xC8????xC8????xC8????xC8*F"]
Zoffix wonders what's up there... :/
MasterDuke ugh. i wanted to test whether making radix return a BOOTIntArray changed that at all, but got distracted and didn't test. and of course i forgot to do all those changes in a branch and just tossed them
Zoffix Tossed them how? I recall timotimo telling me about some git command that can restore reset changes 13:40
(I forget what it was tho)
MasterDuke i didn't commit anything because i wasn't in a branch. did `git reset --hard HEAD` 13:43
pretty sure you can't recover anything after doing that
and why wasn't i in a branch!? no idea, i usually experiment in them 13:44
if i had committed the changes and then done the reset, then yeah, think there's a way to restore 13:45
Zoffix c: 7c8b705b33755 my $f1 = "/tmp/foo121212".IO; $f1.spurt: "foā™„"; $f1.open.readchars(2).say 13:53
committable6 Zoffix, Ā¦7c8b705: Ā«foā™„Ā»
Zoffix c: 7c8b705b33755~1 my $f1 = "/tmp/foo121212".IO; $f1.spurt: "foā™„"; $f1.open.readchars(2).say
committable6 Zoffix, Ā¦7c8b705b33755~1: Ā«foĀ»
Zoffix Hm. Looks like encoding refactor should've squashed that bug 13:59
Zoffix tries a hacketyhack
Ah, no; was looking at the wrong thing. 14:02
dogbert17 jnthn, timotimo, anoyone around? 14:03
dogbert17 suspects they're out getting a suntan 14:04
Zoffix .ask samcv would you have an idea about the bug in this ticket? The bug behaviour feels a lot like that case-insensitive regex match issue we had: rt.perl.org/Ticket/Display.html?id=131383 14:08
yoleaux Zoffix: I'll pass your message to samcv.
dogbert17 is looking a bit at RT #131375 14:15
synopsebot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=131375
dogbert17 what's the size limit, element wise, for an array in Perl 6?
is there some hard limit or is it dependent on the amount of memory 14:17
the 'offending' code is here: github.com/MoarVM/MoarVM/blob/mast...ray.c#L344 14:19
this code ('my int @a = 1..18_000_000') fails because ssize (18_000_000) is larger than '(1UL << (8 * sizeof(size_t) - repr_data->elem_size))' which evaluates to 16777216 14:21
Geth rakudo/newer-cat-handle: 40f4dc93c8 | (Zoffix Znet)++ | src/core/IO/CatHandle.pm
[io grant] Implement IO::CatHandle.Supply
14:32
roast/newer-cat-handle: 04790878c9 | (Zoffix Znet)++ | S32-io/io-cathandle.t
[io grant] Test IO::CatHandle.Supply

8 tests are fudged due to newly discovered IO::Handle.readchars bug:
  rt.perl.org/Ticket/Display.html?id=131383
14:33
Zoffix 3 bugs now found by cathandle :) I love that class \o/
oh wow, I'm done with all the read methods. That was fast.. 14:35
dogbert17 is impressed 14:36
MasterDuke dogbert17: from MoarVM/src/6model/reprs/VMArray.h: `struct MVMArrayBody { /* number of elements (from user's point of view) */ MVMuint64 elems;` 14:53
dogbert17 MasterDuke: so it should be able to take more than 16777216 elements
Zoffix m: with "/tmp/foo2121".IO { .spurt: "foā™„o"; with .open(:enc<ascii>) { say .slurp } } 14:54
camelia MoarVM panic: MVM_nfg_get_synthetic_info called with out-of-range synthetic
MasterDuke dogbert17: that line you pointed out seems to suggest there's also a total memory used limit
dogbert17 seems a bit low of that is the case ... 14:55
MasterDuke i agree
dogbert17 I mean, the following code does not break 'my int @a[40_000_000];'
dogbert17 on my machine that is
MasterDuke sorry, afk & 14:56
dogbert17 on my 32-bit machine 'sizeof(size_t)' equals 4 14:57
Zoffix Filed as rt.perl.org/Ticket/Display.html?id=131384 15:01
Geth rakudo/newer-cat-handle: 0c9aea7495 | (Zoffix Znet)++ | src/core/IO/CatHandle.pm
[io grant] Implement IO::CatHandle.encoding
15:10
roast/newer-cat-handle: 71953e3de3 | (Zoffix Znet)++ | S32-io/io-cathandle.t
[io grant] Test IO::CatHandle.encoding
rakudo/newer-cat-handle: 4afa612621 | (Zoffix Znet)++ | src/core/IO/CatHandle.pm
Remove .path attribute from cat handle
15:13
rakudo/newer-cat-handle: 529ed390d0 | (Zoffix Znet)++ | src/core/IO/CatHandle.pm
Use consistent invocant type-constraint on CatHandle.encoding
timotimo MasterDuke: if you ever "git add"ed your changes, you can use git fsck --unreachable and git cat-file those things to hopefully get your stuff back 15:41
dogbert17 timotimo: you're back 15:44
do you have time to backlog a screenful, i.e. the discussion about RT #131375 15:45
synopsebot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=131375
Geth rakudo/newer-cat-handle: ee1e185d1d | (Zoffix Znet)++ | src/core/IO/CatHandle.pm
[io grant] Implement IO::CatHandle.eof
15:52
roast/newer-cat-handle: db4847e7ec | (Zoffix Znet)++ | S32-io/io-cathandle.t
[io grant] Test IO::CatHandle.eof
15:53
timotimo dogbert17: this could probably be golfed very far down to a short c program with a single calloc 15:54
dogbert17 timotimo: I did run it in gdb 15:55
does this line do the right thing? github.com/MoarVM/MoarVM/blob/mast...ray.c#L344 15:56
timotimo m: say (20_000_000 * 8) / 1024 / 1024 15:57
camelia 152.587891
timotimo so it'd only be about 150 megs?
dogbert17 yup 15:58
also, I'm on 32 bit but the original reporter is on 64 bit Win 10
for me ssize = 20_000_000, sizeof(size_t) = 4 and repr_data->elem_size = 8 16:00
timotimo weird 16:01
dogbert17 indeed
timotimo we could first try to calloc and if that fails we malloc and memset
can you see if replacing calloc there with malloc qnd memset? 16:02
dogbert17 where do you see the calloc? 16:03
timotimo i assumed it had one 16:05
since it spoke of elements
my laptop ran out of battery 16:06
dogbert17 oops
Zoffix It took 229MB on my Linux and didn't have any issues 16:07
dogbert17 what is 'ssize > (1UL << (8 * sizeof(size_t) - repr_data->elem_size))' actually trying to accomplish? 16:08
Zoffix: try it on you 32 bit system if you have it handy 16:09
s/you/your/
timotimo dogbert, i thnk thats for growing. initially we double everytime we need more, but at one point we only add little bunches 16:11
Zoffix I don't have that box ATM 16:13
dogbert17 then it thinks that it can't grow enough when 1UL << (8 * sizeof(size_t) - repr_data->elem_size) hits 2**24 16:14
at least in my case
timotimo hm? 16:16
dogbert17 m: my int @a[40_000_000]
camelia ( no output )
dogbert17 that works on my system as well
m: my int @a=1..20_000_000 # this fails on my system 16:17
camelia ( no output )
Geth rakudo/newer-cat-handle: 80686a7040 | (Zoffix Znet)++ | src/core/IO/CatHandle.pm
[io grant] Implement IO::CatHandle.t/.path/.IO/.native-descriptor
16:36
roast/newer-cat-handle: 175ba458e2 | (Zoffix Znet)++ | S32-io/io-cathandle.t
[io grant] Test IO::CatHandle.t/.path/.IO/.native-descriptor
Zoffix calls it a day 16:47
Also: gonna add a hook to execute a chunk of code when switching handles in Cat Handle, so it's no longer impossible to get behaviour of Perl 5's `$.` variable. And gonna make `LN` module that'll let one use `perl6 -MLN -ne 'say $*LN' foo bar ber; and $*LN will be like Perl 5's $. 16:48
Zoffix &
MasterDuke timotimo: unfortunately i'd never done anything with those changes and git 18:24
oh, wait, they may still be in my stash list 18:26
timotimo OK 18:35
MasterDuke timotimo: re int bug, thoughts on what to try? i've pretty much exhausted my ideas 18:49
Geth rakudo/js: fb4b636c47 | pmurias++ | 4 files
[js] Support taking nqp-js from --with-nqp
19:36
rakudo/js: 456b08e35e | pmurias++ | 2 files
[js] Compile in the path to the nqp runtime
rakudo/js: aa14457ba3 | pmurias++ | 4 files
[js] perl Configure --backends=js --with-nqp=/path/to/nqp-js;make now works

Change the way stuff is built to make it work.
nqp/master: 7 commits pushed by pmurias++
nqp: a35860aefb | pmurias++ | Configure.pl
Fix typo in error message
19:55
AlexDaniel does anybody remember if there were any commits in history that made the make process get stuck? 20:57
I had to unbust whateverable for some ā‰ˆ2014.04 commits and now ā‰ˆ2014.11 20:58
I'm thinking, is it an error on my side or this actually happened? 20:59
OK, yes 21:03
nevermind
samcv taking a look at rt.perl.org/Public/Bug/Display.html?id=131383 21:07
jnthn samcv+ 21:08
samcv++ even :)
jnthn wonders if stuff is hanging around in the normalization buffer for a while longer than might be expected... 21:10
AlexDaniel samcv++ # I ā™„ Unicode-related fixes :)
samcv hehe
MasterDuke ah ha! a wild jnthn appears! does the wild jnthn have any pointers for where to track down that nqp int bug?
jnthn MasterDuke: I think we did track it down, at least to the degree that $!int-attr := $boxed-thing was generating undesirable code? 21:11
MasterDuke sounds right. i just don't know what generates that code or where 21:12
jnthn MasterDuke: Probably somewhere in github.com/perl6/nqp/blob/master/s...T.nqp#L380 21:13
Or a codepath leading from it 21:14
MasterDuke i've put a note() in there before, no dice
jnthn github.com/perl6/nqp/blob/master/s....nqp#L1807 most likely 21:15
Could tyr replacing
push_op($il, 'smrt_numify', $a, $dc);
push_op($il, 'coerce_ni', $b, $a);
that will probably also cause huge breakage
We've been sloppy on numeric types so far, I suspect
The equivalent for Rakudo *is* just an unbox_i 21:16
MasterDuke so the coercion() codepath gets hit, but after the bind has already happened. and adding a note() after QASTOperationsMAST.nqp#L1807 never prints anything 21:18
Geth rakudo/js: 0e10dff33c | pmurias++ | tools/build/NQP_REVISION
Update NQP dep.
21:19
rakudo/js: 977b04aab9 | pmurias++ | tools/lib/NQP/Configure.pm
Use correct postfix when using --gen-nqp with the js backend
jnthn MasterDuke: OK, then no idea that code path it's taking 21:21
MasterDuke heh, likewise
jnthn nqp:: ops that map directly to VM ops are handled in github.com/perl6/nqp/blob/master/s...T.nqp#L161 21:23
oh, though bindattr is a special case: github.com/perl6/nqp/blob/master/s....nqp#L2542
The value obtained by 2545 21:24
Which calls as_mast, which calls coerce here if passed a $want: github.com/perl6/nqp/blob/master/s...T.nqp#L621 21:25
And that in turn calls coercion, which is where I started
MasterDuke i have a note() in QASTOperationsMAST.nqp#L2542, doesn't get hit either 21:26
jnthn The $!foo = ... goes via github.com/perl6/nqp/blob/master/s....nqp#L1828 however
Which also ends up calling as_mast 21:27
I presume when you say "not getting hit", you aren't expecting it is going to get hit when you run the say(whatever that number is) program, right? 21:28
MasterDuke i assume not all, but i'm not 100% on which will/won't 21:29
jnthn Yeah but, we already established the problem is in code inside of the compiler being mis-compiled
Rather than the program in question
I think github.com/perl6/nqp/blob/master/s...Val.nqp#L7 is the prime suspect 21:30
'cus $value is untyped there 21:31
MasterDuke yeah. it's the correct value, and then $!value is wrong immediately after that bind
jnthn Right, because we end up compiling it in such a way that we go via a float 21:32
The things I've been pointing at are the code paths I'm pretty sure we take when compiling IVal.nqp#L7
MasterDuke it's calling smrt_numify->coerce_ni->bind_attribute->smrt_numify
jnthn *nod* 21:33
And that matches closely to github.com/perl6/nqp/blob/master/s....nqp#L1807
MasterDuke i just tried changing QASTOperationsMAST.nqp#L1807 from `push_op($il, 'smrt_numify', $a, $dc); push_op($il, 'coerce_ni', $b, $a);`to unbox_i, but that dies early in the nqp comile 21:34
jnthn Yeah
I don't think there's a way out of this without tidying up our numerics hanlding in general :S
*handling 21:35
MasterDuke hm, then maybe i should just create a ticket and call it a day
jnthn But I suspect the set of cleanups needed to be able to add an int type constraint to the QAST::IVal constructor are much more manageable
And I think that would also help deal with it
MasterDuke hm, tried that, don't remember where it died 21:36
jnthn It will probably die in a lot less places than the bigger change...
NQP originally did all numeric operations as floating point, though, because it doesn't have multiple dispatch 21:37
This was one of the simplifications
MasterDuke dies in the nqp compile
jnthn In hindsight, we mighta been better saying NQP is all integers unless you write nqp::add_n and use num typed variables
I mean, it's a compiler, when do you actually *want* floating point? 21:38
So that might another way out for us.
I suspect that we'd get quite a speedup and we'd have a very small amount of code to fix 21:39
MasterDuke that sounds promising
jnthn After all, NQP exists to write NQP and Rakudo in primarily, and other compilers secondarily, and I isn't aimed at general purpose programming much at all. 21:40
s/I//
Zoffix . 21:41
jnthn I guess changing + to emit add_i instead of add_n and similar for the other mathops in src/NQP/Grammar.nqp would be the place to start experimenting... 21:42
MasterDuke hm, maybe i'll see what happens 21:43
jnthn NQP carries quite an amount of historical baggage, and since it suffers from being "the thing we use to build the product" rather than "the product" it's generally not been tended to so well. 21:47
It's only now that I'm giving it a proper IO handle object because it's about to get really awkward for it not to have that, for example... 21:48
MasterDuke btw. `my $pass_mark := 1; # NQP has no constant table yet` ... `$!match := $pass_mark;`. better than a literal? 21:49
jnthn I believe that's still the case, yes 21:50
Though
For 1 it's not so bad as it was
Because there's a box cache
MasterDuke yeah, i thought someone (timotimo?) did some sort of caching of small int awhile ago 21:52
jnthn Yeah, think it was timotimo 21:53
MasterDuke nqp builds with some converted to _i, but doesn't test clean 21:58
dogbert17 jnthn: have you seen RT #131375? The problem line seems to be github.com/MoarVM/MoarVM/blob/mast...ay.c#L344, can you see anything wrong with it? 21:59
synopsebot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=131375
Geth rakudo/newer-cat-handle: 993de50dac | (Zoffix Znet)++ | 2 files
[io grant] Implement IO::CatHandle.gist/.Str/.opened/.open
22:24
timotimo did my int cache b0rk something?
dogbert17 Zoffix: thought you called it a day :)
Geth roast/newer-cat-handle: 44265902e3 | (Zoffix Znet)++ | S32-io/io-cathandle.t
Make at least one IO::Handle

Even when we're making fewer than 3 files altogether
22:25
Zoffix dogbert17: I did. I already slept and started a new day.
Geth roast/newer-cat-handle: c6cc66a909 | (Zoffix Znet)++ | S32-io/io-cathandle.t
[io grant] Test IO::CatHandle.gist/.Str/.opened/.open
MasterDuke timotimo: no, just mentioning it makes something like `my $pass_mark := 1; # NQP has no constant table yet` not so needed anymore 22:26
timotimo ah 22:27
you could try building a program with a crapton of statements like that and compare speed and memory usage with vs without the box cache 22:28
it should be sort of easy to turn on/off
jnthn MasterDuke: It's a big enough change that I'm sure there'll be best fallout in NQP's test suite; we're essentially redefining the language :) 22:30
MasterDuke for just infix + and -, the only failed tests are some sprintf ones and `ok(nqp::neginf()+123 == nqp::neginf()-123, "nqp::neginf() doesn't change after adding or substracting");` 22:32
timotimo cool 22:33
MasterDuke nqp: say(nqp::neginf()+123 == nqp::neginf()-123); say(nqp::neginf()+123) 22:34
camelia 1
-Inf
MasterDuke and rakudo passed a spectest with infix + and - changed
Geth roast/newer-cat-handle: 367f9e1f7b | (Zoffix Znet)++ | S32-io/io-cathandle.t
Make `make-files` sub stuff Str objects too
MasterDuke with my change `say(nqp::neginf()+123)` prints -9223372036854775685 22:36
timotimo hah
jnthn If we make this chance you'd have to re-write that as nqp::add_n(nqp::neginf(), 123); that's the trade-off 22:37
MasterDuke yeah, is the test "wrong"?
and i think there are a bunch of places where a prefix + (or - i guess) would have to be nqp::numify() 22:38
jnthn Well, we'll probably have to re-decide what prefix:<+> means in our new world too :) 22:42
timotimo that'd be nice 22:43
jnthn And a number of other things.
timotimo "number" 22:49
jnthn ;) 22:50
should rest; 'night, #perl6-dev 22:54
MasterDuke RT #131385 is the NQP int/float bug 23:16
synopsebot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=131385
Geth roast/newer-cat-handle: bb85065b7d | (Zoffix Znet)++ | S32-io/lock.t
Test .unlock actually removes the lock
23:23
Zoffix What I hate about SeekFromBegining is I can never remember how to spell Begining.... 23:27
.oO( SeekFromStart )
beginning 23:28
geekosaur next will be the complain that it's not Seq... 23:35
timotimo it should just be Seek and Kees 23:36
Zoffix :) 23:39
Geth rakudo/newer-cat-handle: 677c4ea6e0 | (Zoffix Znet)++ | src/core/IO/CatHandle.pm
[io grant] Implement IO::CatHandle.lock/.unlock/.seek/.tell
23:41
roast/newer-cat-handle: dcdac1a01d | (Zoffix Znet)++ | 2 files
[io grant] Test IO::CatHandle.lock/.unlock/.seek/.tell
23:45
roast/newer-cat-handle: 34dc4acc23 | (Zoffix Znet)++ | S32-io/io-cathandle.t
Remove placeholder blocks for some attribute tests

  - These are already tested under "foo method" subtests
  - nl-out throws NYI and is tested in Rakudo's suite
23:48
MasterDuke m: say :10[12,9,4] 23:51
camelia 1294
MasterDuke should values in the list >= the base be allowed? 23:52