pmurias Zoffix: re liberal string to num conversions, I was removing all the usage of those from the Rakudo code itself, a recently merged MoarVM PR will actually disable them 07:50
lizmat Files=1192, Tests=58639, 211 wallclock secs (12.71 usr 4.79 sys + 1241.04 cusr 119.38 csys = 1377.92 CPU) 08:40
Zoffix pmurias: how recently? I see last one merged was 10d ago 08:49
which means it would've made it into release 08:50
m: my num $x = my str $ = 'Infinity'; dd $x
camelia Inf
Zoffix and it still works
Geth rakudo/nom: 15a6f773e6 | (Elizabeth Mattijsen)++ | 2 files
Move functioning grab from Setty to SetHash

  - feels more logical
  - no need to burden Set with candidates it won't ever use
09:02
rakudo/nom: 67292a1e9e | (Elizabeth Mattijsen)++ | src/core/SetHash.pm
Make SetHash.grab(N) about 3.5x faster

  - based on grabbing all from a 26 elem SetHash
  - also fix some object signatures
09:20
rakudo/nom: 1456669fb1 | (Elizabeth Mattijsen)++ | 2 files
Move functioning grabpairs from Setty to SetHash

  - feels more logical
  - no need to burden Set with candidates it won't ever use
09:22
rakudo/nom: 0e9ee0d197 | (Elizabeth Mattijsen)++ | src/core/SetHash.pm
Make SetHash.grabpairs(N) about 3.5x faster

  - using the same logic as SetHash.grab(N)
  - except for returning a Pair with the object instead of object itself
09:39
rakudo/nom: e6192ca85d | (Elizabeth Mattijsen)++ | src/core/Setty.pm
Make Setty.roll about 11x faster

By using R:Q.ROLL, which prevents having to build lists.
10:11
Zoffix "if $dirname.match( /^<$slash>$/ ) && $file.match( /^<$slash>$/ )" 10:29
I see in 2013 people were a lot more optimistic about our performance :)
jnthn More like "make stuff work" :) 10:32
Zoffix :)
Geth rakudo/nom: 18dd07411c | (Elizabeth Mattijsen)++ | src/core/Setty.pm
Make Setty.roll(N) about 2x as fast

  - on a 26 elem Set
  - use list of keys to select from
  - also fix handling of < 1, -Inf and NaN cases for N
11:04
[Tux] This is Rakudo version 2017.05-9-ge6192ca85 built on MoarVM version 2017.05-9-g37460c7a 11:12
csv-ip5xs 2.839
test 14.488
test-t 4.560 - 4.607
csv-parser 12.982
oops?
lizmat that feels like an huh?
Zoffix buggable: speed 6 11:27
buggable Zoffix, ā–‚ā–‚ā–ā–ā–‡ā–‡ data for 2017-05-19ā€“2017-05-21; range: 4.225sā€“4.607s; 8% slower
Zoffix wonders how come all of lizmat's commits are now accountless... says "Elizab..." instead of "lizmat..." and is unclickable 11:28
lizmat I have *no* idea 11:32
still logged in now
Zoffix back to normal now... github glitch I guess 11:34
lizmat yeah, guess so
Geth rakudo/nom: 10e9c8ba6f | (Elizabeth Mattijsen)++ | src/core/Setty.pm
Make Setty.pick about 2x as fast

  - by just calling .roll, as that's the same for 1 pick
11:42
lizmat love it when I can make things faster by mostly just removing code 11:43
dogbert17 m: my $b = BagHash.new; say $b.grabpairs(*) 11:47
camelia ()
dogbert17 commit: 2016.12 my $b = BagHash.new; say $b.grabpairs(*)
committable6 dogbert17, Ā¦2016.12: Ā«[]Ā»
dogbert17 lizmat: why the difference?
improvement or ...
lizmat ah, yes, it's lazy now 11:48
it returns a Seq now
(as it always should have, in my opinion :-)
dogbert17 cool, some doc updates are necessary though
dogbert17 can deal with them a bit later 11:49
lizmat m: my $bh = <a b b c c c>.BagHash; for $bh.grabpairs(*) { .say; last }; dd $bh
camelia b => 2
BagHash $bh = ("a"=>1,"c"=>3).BagHash
lizmat dogbert17++
dogbert17 I suspect stuff like 'multi method pickpairs(Baggy:D: $count --> List:D)' needs some tweaking 11:52
Zoffix buggable: speed 4 11:56
buggable Zoffix, ā–ā–ā–‡ā–‡ data for 2017-05-20ā€“2017-05-21; range: 4.225sā€“4.607s; 9% slower
Zoffix No idea why the slowdown. Based on ^ those dates, these would be the suspect commits: github.com/rakudo/rakudo/compare/4ae7c69...HEAD
And I don't see any +> usages, and the only two Bag usages actually got a bit faster 11:57
c: 4ae7c69,HEAD my @z = 'aa'..'zz'; for ^1000 { $ = @z.Bag{eager 'a' .. 'z'}:kv }; say now - INIT now
committable6 Zoffix, Ā¦4ae7c69: Ā«2.216103Ā» Ā¦HEAD(e6192ca): Ā«2.1721509Ā»
Zoffix c: 4ae7c69,HEAD my @z = 'aa'..'zz'; for ^1000 { $ = @z.Bag.elems }; say now - INIT now
committable6 Zoffix, Ā¦4ae7c69: Ā«2.06034145Ā» Ā¦HEAD(e6192ca): Ā«2.07377413Ā»
Zoffix c: 4ae7c69,HEAD my @z = 'aa'..'zz'; for ^1000 { $ = @z.Bag.elems }; say now - INIT now
committable6 Zoffix, Ā¦4ae7c69: Ā«2.0483119Ā» Ā¦HEAD(e6192ca): Ā«1.9952146Ā»
Zoffix maybe +> / +< used by core stuff that's used by CSV 12:00
Zoffix shrugs
Oh wait, the +> / <+ stuff isn't in the suspect list.. (unless there timezone diffs :/) 12:02
Zoffix gives up 12:03
lizmat hopes for an artefact on Tux's machine
anyways, all of our benchmarks depending on for ^1000 have been sorta scr%wed since January :-( 12:04
over time, I mean 12:05
but also internally, as there's a lot more being allocated in the ^1000 loop now, so that has effects on number of GC's
:-(
Geth rakudo/nom: 071c88cbb7 | (Elizabeth Mattijsen)++ | src/core/Setty.pm
Make Setty.pick(N) about 30% faster

  - more importantly, also fix <1 -Inf and NaN handling
12:22
Zoffix the .WHAT gives the type object it doesn't "show" anything and .gist on a type object returns a short name 12:23
m: IO::Socket::INET.WHAT.say 12:24
camelia IO::Socket::INET is disallowed in restricted setting
in sub restricted at src/RESTRICTED.setting line 1
in method gist at src/RESTRICTED.setting line 33
in block <unit> at <tmp> line 1
Zoffix screw you
m: '.'.WHAT.say
camelia (Str)
Zoffix m: '.'.IO.WHAT.say
camelia (Path)
Zoffix m: '.'.IO.^name.say
camelia IO::Path
lizmat Zoffix-- # wordage :-)
Zoffix wordage?
lizmat-- # unexplained -- 12:27
lizmat wording? 12:29
Zoffix What wording? 12:30
lizmat the "screw you" :-) 12:31
jnthn Apparently screw is a bad word now? Screw it, guess we should switch to f... :P
lizmat ok, then I'll just screw along with the rest :-) 12:32
lizmat trying to not be more catholic than the pope
jnthn One'd have to have a screw loose to do that...
lizmat and that was just me thinking it were all those Ikea Billy's that are falling apart causing these loose screws on the floor 12:33
MasterDuke jnthn: any idea about that bindattr_i business from yesterday? 12:34
jnthn did find a loose screw a few days back and hasn't been able to figure out where on earth it might have come from 12:36
lizmat oO( Uh Oh )
jnthn MasterDuke: What is the type of $value at the point it's being used with bindattr? 12:37
MasterDuke untyped i guess github.com/perl6/nqp/blob/master/s...Val.nqp#L7 12:38
jnthn Is there some implicit conversion going on there?
heh, nothing is untyped...
$value.HOW.name($value) should tell you
Hmmm 12:39
I wonder what the code-gen for that is
Can you try replacing it with nqp::unbox_i($value) ?
MasterDuke BOOTInt 12:41
jnthn OK
Try the nqp::unbox_i($value)
MasterDuke this representation (P6num) cannot unbox to a native int (for type BOOTNum) 12:44
when building nqp
jnthn hah, so we're somewhere passing a num into that code
May be wise to try and track down and fix those spots, then we can stick an int type constraint on :$value 12:45
In the signature
MasterDuke i can try to track that down, but why was it still messing up when it got the BOOTInt? 12:48
jnthn I suspect 'cus it generates smrt_numify and then int-coerces that 12:50
lizmat m: dd <a b>.Bag (<) <a b b>.Bag # this feels wrong to me 12:51
camelia Bool::False
MasterDuke hm, would i see that in the --target=mast output?
lizmat m: dd <a b>.Bag.Set (<) <a b b>.Bag.Set # is what happens
camelia Bool::False
jnthn Yeah, though you'll probably find it much more readable to get a .moarvm bytecode file and then look at moar --dump 12:52
MasterDuke how do i specify the file for --target=mbc? 12:56
lizmat MasterDuke: afaik, you can't ? 13:03
jnthn --output=foo.moarvm 13:06
lizmat TIL :-)
jnthn You can actually do it with --target=ast too if you want to shove it in a file :) 13:07
(or optimize, or parse)
Geth rakudo/nom: e3695b1640 | (Elizabeth Mattijsen)++ | src/core/Setty.pm
Add Setty.pickpairs

We have SetHash.grabpairs, and Baggy.pickpairs, so why not on Setty? Feels like an oversight now corrected. Needless to say, there were no tests for it.
13:09
lizmat .tell masak judging from en.wikipedia.org/wiki/Multiset , it looks like we could have Baggy semantics for (<) and (<=), do you agree ? 13:13
yoleaux lizmat: I'll pass your message to masak.
lizmat .tell masak aka, "say <a b>.Bag (<) <a b b>.Bag" would be True rather than False (as it is now) 13:16
yoleaux lizmat: I'll pass your message to masak.
Geth roast: c4c10d506d | (Elizabeth Mattijsen)++ | 2 files
Add tests for empty Set(|Hash).roll handling
13:32
roast: 4dfee69397 | (Elizabeth Mattijsen)++ | 2 files
Add tests for empty Set(|Hash).pick handling
13:36
dogbert17 m: my $breakfast = bag <eggs bacon>; my $h = $breakfast.hash; say $h.WHAT; 13:41
camelia (Hash[Any,Any])
dogbert17 commit: 2016.12 my $breakfast = bag <eggs bacon>; my $h = $breakfast.hash; say $h.WHAT;
committable6 dogbert17, Ā¦2016.12: Ā«(Hash[Any,Any])Ā»
dogbert17 commit: 2016.08 my $breakfast = bag <eggs bacon>; my $h = $breakfast.hash; say $h.WHAT;
committable6 dogbert17, Ā¦2016.08: Ā«(Hash[Any,Any])Ā»
dogbert17 commit: 2016.05 my $breakfast = bag <eggs bacon>; my $h = $breakfast.hash; say $h.WHAT;
committable6 dogbert17, Ā¦2016.05: Ā«(Hash)Ā»
Zoffix New one is right 13:42
lizmat m: my $breakfast = bag <eggs bacon>; my $h = $breakfast.Hash; say $h.WHAT
camelia (Hash[Any,Any])
dogbert17 Zoffix: thx, is updating Baggy.pod6 atm
lizmat dogbert17: note the difference between .hash and .Hash
hmmm... shouldn't that be [Any,UInt] ? 13:43
Zoffix maybe, though that'd probably slow stuff down, wouldn't it? Since UInt is a subset 13:44
m: dd set.hash
camelia 5===SORRY!5=== Error while compiling <tmp>
Function "set" may not be called without arguments (please use () or whitespace to denote arguments, or &set to refer to the function as a noun, or use .set if you meant to call it as a method on $_)
at ā€¦
Zoffix *sigh*
m: dd set().hash
camelia (my Bool %{Any})
Zoffix m: dd bag().hash 13:45
camelia (my Any %{Any})
dogbert17 lizmat: what is the difference between hash and Hash?
lizmat .Hash coerces to a Hash, .hash returns something hashy
just like .List returns a List, and .list returns something listy 13:46
dogbert17 hmm
'hash' is doc'ed as 'Returns a Hash where the elements of the invocant are the keys and their respective weights the values;'
lizmat yeah
m: dd set().Hash 13:47
camelia (my Bool %{Any})
lizmat arguably, set().hash should be my Any %{Any} 13:48
Geth roast: b1bf6923fc | (Elizabeth Mattijsen)++ | S02-types/set.t
Add tests for Set.grab(N)

They should all die!
13:50
dogbert17 is running 'make xtest' in the doc repo and it is indeed slooow 13:53
lizmat: should I whip up some doc for Setty.pickpairs?
lizmat dogbert17: yes please :-) 13:54
dogbert17 on it 13:55
lizmat: gist.github.com/dogbert17/4bcbc10b...87f766b013 14:14
lizmat s/version/candidate/ ? 14:15
dogbert17: perhaps refer to grabpairs if you *do* want to have it affect the SetHash ? 14:16
dogbert17 fixed the version candidate thingy and will add a blurb about grabpairs 14:17
lizmat afk& 14:56
Zoffix ZOFVM: Files=1242, Tests=135654, 113 wallclock secs (21.21 usr 3.05 sys + 2310.40 cusr 129.26 csys = 2463.92 CPU) 15:44
Geth rakudo/nom: 7d6fa73952 | (Zoffix Znet)++ | src/core/IO/Spec/Win32.pm
[io grant] Make IO::Spec::Win32.catpath 47x faster

Indirectly used by IO::Path.add/.child/.parent/.sibling and multi-part form of .new
15:45
Zoffix ZofBot: yeeeeaaah boiii. That's how we roll! (ā€¢_ā€¢) ( ā€¢_ā€¢)>āŒā– -ā–  (āŒā– _ā– )
ZofBot Zoffix, Assuming each of the following statements is the final statement in a block, "sunk" loops such as these may be indicated: for LIST {
Zoffix "A single NOT NULL column could not be changed to allow nulls very easily, it being a 600GB table" blogs.perl.org/users/preaction/2017...ummit.html 15:48
600GB wow, CPANTesters is a serious business :o 15:49
.ask nine there used to be an issue with precomp + require in mainline. Is that fixed now or am I just lucky? Here's an old commit fixing the issue: github.com/zoffixznet/perl6-IRC-Cl...261ea48d08 but I've just tried this and it works fine, as doing using a try + block +_ require: twitter.com/zoffix/status/866322013912170496 15:58
yoleaux Zoffix: I'll pass your message to nine.
eater They could've used percona tools, I've done changes on bigger databases :s 16:01
Zoffix The name's `preaction`; hangs in #perl if you wanted to talk to them 16:02
eater Zoffix: I've been doing ::($package-name) ~~ Failure all this time 16:03
Geth rakudo/nom: 81221c5f99 | usev6++ | src/core/Int.pm
Apply workaround for RT #131306 for MoarVM only

It busted spectest on JVM (and isn't needed there)
synopsebot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=131306
Zoffix eater: that's wrong now. See rakudo.org/2017/03/18/lexical-requi...rade-info/
eater so it was wrong :')
ack
Zoffix To be more precise, it's wrong if you compile-time require that symbol (last example on that upgrade info page) 16:08
or symbol is compile time
ZofBot: one of those things
ZofBot Zoffix, Horizontal whitespace is defined as anything matching "\s" that doesn't also match "\v"
eater yeah after reviewing I did it right :') I'm loading modules at runtime 16:10
nine ZofBot: no idea. Maybe a side effect of my lexical require work?
ZofBot nine, WHAT
nine Zoffix: no idea. Maybe a side effect of my lexical require work?
eater :')
Zoffix ZofBot++
eater Zoffix: was there a diff between join and catpath in the end? 16:16
at least a notable difference
Zoffix join has a couple of special cases
I don't know why
eater weird 16:18
Geth rakudo/nom: 494659a1c7 | (Zoffix Znet)++ | src/core/IO/Spec/Win32.pm
[io grant] Make IO::Spec::Win32.join 26x faster

Used by IO::Path.add/.child/.parent/.sibling and multi-part form of .new
16:39
Zoffix m: say 26*47 16:40
camelia 1222
Zoffix shrugs
Well, join uses catpath, so that 26x is *on top* of .catpath improvement == hopefully a nice boost on windows for the mentioned routines
AlexDaniel ZofBot: can you write some code? 16:46
ZofBot AlexDaniel, They will compile the modules in depth first order of the dependency tree
cono Zoffix: I changed it to rw, as it won't let me change it when it binds 17:29
you can look to this simple example of how to get first unused port from the system: gist.github.com/cono/69e2ba8396171...1f0610e6d0
I've implemented the same here
pastebin.com/ExpjSeLn 17:32
Zoffix Right, but it doesn't have to be done through overwriting an already existing attribute
And making it `rw` from the user's point of view 17:33
cono if I renew it and return in initialize, would it help? 17:34
Zoffix cono: you can just assign to `$!localport` instead of `$.localport`
like, without making it `rw` 17:35
m: class { has $.x; method bar { $!x = 42 } }.new.bar
camelia ( no output )
cono should return $self 17:36
Zoffix: yeah, it works, thanks a lot! :) 17:40
what about opcode?
I'm really concerned about it, but don't know how to make in another way
not so deep in the code yet
Zoffix cono: don't know anything about that area. You may want to try catching timotimo or jnthn about it 17:41
cono got it. Thanks a lot got help 17:42
for*
Zoffix or make a PR and wait for people to comment :) 17:43
awwaiid pmurias: Are there any instructions for running rakudo.js yet? I'm looking forward to others (maybe me!) being able to randomly help get things passing; and especially looking forward to rakudo in the browser :)
cono will do :) 17:44
timotimo hey cono 18:01
i don't think it's a bad idea to make your suggested feature an opcode 18:04
cono yay, ok. Cleaning up a mess a bit and preparing a PR. Found that I made some warning during compilation, looks like should implement in the way of io_bind 18:06
Zoffix dogbert17: it does look to be a shortcut, but the link it makes doesn't work on individual routine pages, like this one: docs.perl6.org/routine/close-stdin 18:08
timotimo but yeah, using "is rw" there doesn't seem like a good idea, it's not like you can actually change the local port on the fly 18:10
pmurias awwaiid: I'll write up some instructions tommorow (too tired atm to write instructions that can be trusted today and I'll cleanup some unneeded and obnoxious installation hack) 18:14
Zoffix spots an inconsistency 18:53
IO::Handle.put/.print take *@ args, but &put, &print, &say, and IO::Handle.say all take **@ args
awwaiid pmurias: awesome! 19:10
Geth nqp/master: 11 commits pushed by pmurias++
review: github.com/perl6/nqp/compare/af678...3e98b7e19c
19:42
rakudo/js: 4 commits pushed by pmurias++ 19:52
dogbert17 Zoffix: yes, I can fix it but it should be noted that this shortcut is quite prevalent in the docs ... 20:01
Zoffix so fix the thing that generates the final URL 20:02
dogbert17 that is one possibility, I believe that there's even an issue about that in the doc repo 20:08
Geth rakudo/nom: 06cd0bc3f4 | (Elizabeth Mattijsen)++ | 3 files
Streamline QuantHash.(hash|Hash)

  - .Hash returns an object hash with value limited to QuantHash meaning
   Setty -> Bool, Baggy -> UInt, Mixy -> Real
  - .hash returns an object hash without value limits (Any)
  - makes Baggy/Mixy.(hash|Hash) about 2.5x as fast (on a 26 elem Bag/Mix)
20:36
timotimo cono: i totally forgot to mention, jnthn is working to throw out libuv use for synchronous sockets, so it'll perhaps need to be re-implemented when that happens 20:40
jnthn glances backlog 20:46
Hmm...yeah, that's unfortunate timing. ;)
Or fortunate in that I'll have that area of the code in my head so can look at a PR touching it. 20:47
But less fortunate in that I've already got branches that rip it all up.
May not be too bad though 20:48
MasterDuke jnthn: after long delay, back at that nqp thing. if i change here github.com/perl6/nqp/blob/master/s...1576-L1583 to explicitly create an int variable from $<integer>.ast (and then pass that to IVal.new), it get the wrong value 20:53
jnthn So, method integer in HLL::Actions needs attention, I guess 20:54
MasterDuke method integer($/) { make $<VALUE>.made; } 20:55
jnthn Yeah, which leads to decint, which leads to nqp::radix... 20:56
MasterDuke nqp: say(nqp::radix(10, "100000000000000009", 0, 0)[0])) 20:58
camelia Confused at line 2, near "say(nqp::r"
at gen/moar/stage2/NQPHLL.nqp:768 (/home/camelia/rakudo-m-inst-1/share/nqp/lib/NQPHLL.moarvm:panic)
from gen/moar/stage2/NQP.nqp:919 (/home/camelia/rakudo-m-inst-1/share/nqp/lib/nqp.moarvm:comp_unit)
from gen/moā€¦
MasterDuke nqp: say(nqp::radix(10, "100000000000000009", 0, 0)[0]) 20:59
camelia 100000000000000009
MasterDuke oh, and the only thing that looks relevant to me in the bytecode dump is `00017 const_i64 loc_5_int, 100000000000000016`, which is the wrong value 21:03
timotimo bytecode dump is moar --dump? 21:04
MasterDuke yeah
timotimo the wrong value shows up in execution?
MasterDuke yeah 21:05
timotimo ok, so not a bug in the dumper at least
MasterDuke nqp: my int $a := 100000000000000009; say($a)
camelia 100000000000000016
cono jnthn: I can rework this already to syscalls
instead of uv
just this piece I guess 21:06
atleast can try :D
MasterDuke nqp: say(100000000000000009)
camelia 100000000000000016
jnthn cono: Yeah, re-working the other socket bits from libuv to syscalls is my goal for tomorrow; I did all the preparatory refactors last week 21:07
MasterDuke heh, the ast for just saying it: - QAST::Op(call &say) 100000000000000009 - QAST::IVal(100000000000000016)
jnthn sync-socket-no-uv is the MoarVM branch 21:08
And refactor-socket-encoding the Rakudo one
cono k, will branch from it
nqp ?
jnthn No nqp branch 21:09
cono btw, is k
btw, are the spec tests from: git://github.com/perl6/roast.git intact? 21:10
jnthn The rakudo one tidies up what's in the IO::Socket role and what's not, and then switches it to use the streaming decoder, so it only does byte-level I/O with the VM
cono as for S32-io/IO-Socket-INET.t it uses $*DISTRO.name which gives on my machine gentoo. I assume $*VM.osname should be used instead
jnthn I didn't change the spectests, and at least on Friday my branch was passing them :) 21:11
It's possible I'm missing stuff from nom by now though
cono I see that Distro parses lsb_releases
timotimo MasterDuke: what a fascinating bug 21:12
cono which is fine for Distro.name but not fine for distinguishing linux vs win32
timotimo m: say +"100000000000000009"
camelia 100000000000000009
cono which is VM.osname IMHO
jnthn cono: I don't think anybody will object to tidying that up in IO-Socket-INET.t
cono got it :D
thanks 21:13
jnthn Thanks for working on these bits :0 21:14
*:)
MasterDuke timotimo: yeah, seems to only happen in pure nqp land
cono I was thinking about it since YAPC::EU in Kyiv but haven't enough time to dig deeper :) Finally found some 21:15
jnthn That was a little while ago. :) 21:16
cono yeah :D
MasterDuke jnthn, timotimo: any suggestions for what to try next? 21:18
jnthn MasterDuke: I'm a little tired for smart suggestions...I'd probably annotate the entire code path up from radix with debug output to see where things get bust 21:19
timotimo we can't bisectable nqp, right? 21:20
MasterDuke nope 21:21
timotimo i'll sprinkle some debug statements 21:22
turning a string to int: 100000000000000009 10 21:23
result is 100000000000000009
^- this is string_to_int
MasterDuke MVM_radix gets "100000000000000009" 21:24
timotimo right
Geth rakudo/nom: 1c16bf2e08 | (Zoffix Znet)++ | src/core/Pair.pm
Fix Pair.new w/ wrong args giving factually incorrect error

Fixes RT#131339: rt.perl.org/Ticket/Display.html?id=131339
21:25
synopsebot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=131339
Geth roast: a523aef60a | (Zoffix Znet)++ | S02-types/pair.t
Test Pair.new does not give error from Mu.new

Rakudo fix: github.com/rakudo/rakudo/commit/1c16bf2e08 RT#131339: rt.perl.org/Ticket/Display.html?id=131339
21:26
synopsebot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=131339
timotimo it asplodes inside bindattr_i 21:29
MasterDuke yep
Zoffix wonder why we have two of these .new in Pair, their bodies are identical are they not? github.com/rakudo/rakudo/blob/nom/....pm#L6-L17 21:30
timotimo maybe another bindattr is overwriting it for some reason
nah
MasterDuke Zoffix: isn't that (a separate Mu candidate) usually for handling Junctions? 21:31
Zoffix Ah. MasterDuke++
Um wait
MasterDuke: well yeah, Junctions fit into Mu, but why have a Cool:D candidate too? 21:32
Zoffix does an experiment
m: multi foo (Cool:D, Mu) { say "here" }; multi foo (Mu, Mu) { say "there" }; dd foo 42, <a b c>.all; foo <a b c>.all, <z d g>.all 21:33
camelia here
Bool::True
there
MasterDuke timotimo: i added an fprintf inside P6opaque's bind_attribute, it has the wrong value at that point
Zoffix ah, ok
m: dd [Pair.new: 42, <a b c>.all]
camelia [42 => all("a", "b", "c")]
Zoffix m: dd [Pair.new: <42 a b>.all, <a b c>.all]
camelia [(all(IntStr.new(42, "42"), "a", "b")) => all("a", "b", "c")]
timotimo m: class test { has int $!foo; method new($inval) { my $thing := nqp::create(self); nqp::bindattr_i(self, test, '$!foo', 100000000000000009 - 7); note(nqp::getattr_i(self, test, '$!foo')) } } 21:34
camelia 5===SORRY!5=== Error while compiling <tmp>
Could not find nqp::create, did you forget 'use nqp;' ?
at <tmp>:1
------> 3$inval) { my $thing := nqp::create(self)7ā5; nqp::bindattr_i(self, test, '$!foo', 1
timotimo nqp-m: class test { has int $!foo; method new($inval) { my $thing := nqp::create(self); nqp::bindattr_i(self, test, '$!foo', 100000000000000009 - 7); note(nqp::getattr_i(self, test, '$!foo')) } }
camelia ( no output )
timotimo nqp-m: class test { has int $!foo; method new($inval) { my $thing := nqp::create(self); nqp::bindattr_i(self, test, '$!foo', 100000000000000009 - 7); note(nqp::getattr_i(self, test, '$!foo')) } }; test.new()
camelia Too few positionals passed; expected 2 arguments but got 1
at <tmp>:1 (<ephemeral file>:new)
from <tmp>:1 (<ephemeral file>:<mainline>)
from gen/moar/stage2/NQPHLL.nqp:1588 (/home/camelia/rakudo-m-inst-1/share/nqp/lib/NQPHLL.moarvm:eval)
from geā€¦
timotimo nqp-m: class test { has int $!foo; method new($inval) { my $thing := nqp::create(self); nqp::bindattr_i(self, test, '$!foo', 100000000000000009 - 7); note(nqp::getattr_i(self, test, '$!foo')) } }; test.new(1)
camelia Cannot bind attributes in a test type object
at <tmp>:1 (<ephemeral file>:new)
from <tmp>:1 (<ephemeral file>:<mainline>)
from gen/moar/stage2/NQPHLL.nqp:1588 (/home/camelia/rakudo-m-inst-1/share/nqp/lib/NQPHLL.moarvm:eval)
from gen/moar/stage2/ā€¦
Zoffix Yeah, I'm not following it.
timotimo nqp-m: class test { has int $!foo; method new($inval) { my $thing := nqp::create(self); nqp::bindattr_i($thing, test, '$!foo', 100000000000000009 - 7); note(nqp::getattr_i($thing, test, '$!foo')) } }; test.new(1)
camelia 100000000000000009
Zoffix Deleted comment here says "this candidate optimizes": github.com/rakudo/rakudo/commit/b0...a4b7d7625e 21:35
.ask lizmat any idea if the Cool:D and Mu candidates can be merged together? I see the comment about optimization was deleted... do we still need to candidates with identical bodies? github.com/rakudo/rakudo/commit/b0...a4b7d7625e 21:36
yoleaux Zoffix: I'll pass your message to lizmat.
MasterDuke timotimo: fun, isn't it?
timotimo maybe only when you derive from another class, too? 21:37
you know what, i'll use a conditional breakpoint with the int value. 21:39
MasterDuke timotimo: but you didn't derive from a class in your example? 21:40
timotimo yeah, i made another example locally and still got 9 at the end
need an unoptimized moarvm for this 21:42
interesting, bindattr_i is already being called with 1000...00016 in the i64 register 21:44
timotimo installs rr 21:46
MasterDuke is that the time-reversible debugger? 21:48
timotimo yup 21:50
oh damn 21:51
crap.
$498 = 1.0000000000000002e+17 21:52
we're running a coerce_ni here
MasterDuke jnthn did say nqp does some float stuff when it shouldn't
timotimo yup 21:53
MasterDuke i remember at one point i was going through places where that (or maybe smart_numify) was being called on what was obviously ints
and added int constraints 21:54
but i don't think i did everywhere, just where it was happening a lot
timotimo i'll try some code 22:00
just have to trick the code gen to do our bidding
MasterDuke can the code gen be distracted with cookies perhaps? 22:01
timotimo can't know until we try 22:02
BenGoldberg waves some delicious chocolate chip cookies in front of the code gen to see what happens. 22:07
timotimo a QAST::Cookie falls out 22:09
BenGoldberg Personally, I think we should get rid of these 'num' things entirely, and switch to infinite precision continued fractions.
timotimo okay, here's your FPGA dev board 22:10
MasterDuke heh, there was that guy who posted on the Perl 6 facebook group asking about creating a MoarHM 22:11
timotimo as soon as you give it an "int" annotation, it'll go via a num 22:14
MasterDuke where?
timotimo for example, if i give IVal's .new an int annotation for :$value, it complains it can't unbox a num for that 22:15
MasterDuke yeah, i tried that 22:16
timotimo bleeehhhhh, the objprimspec is 1, so it knows it's an int at run time 22:19
MasterDuke timotimo: gist.github.com/MasterDuke17/01ce0...637f271c7a an edit i made to method number
prints `v: 100000000000000009 int: 100000000000000016` for `./nqp-m -e 'say(100000000000000009)'` 22:20
timotimo haha, i did the same thing
MasterDuke great minds...
timotimo "make the same mistakes"? ;) 22:21
MasterDuke apparently 22:22
timotimo nqp's floaty typing is really not so good 22:29
i don't have the brain to dig into the code gen or whatever needs changing
MasterDuke do you know where the change is needed? 22:31
timotimo no, i'm not sure why it generates these coercions 22:32
there's a central function that makes coercions, but it itself is probably not to blame directly