Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6-dev, 2017-05-21

| Channels | #perl6-dev index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
01:09 Ven joined #perl6-dev
01:49 ilbot3 joined #perl6-dev
01:49 Topic for #perl6-dev is now Perl 6 language and compiler development 2.0 | Logs at http://irclog.perlgeek.de/perl6-dev/today | For toolchain/installation stuff see #perl6-toolchain | For MoarVM see #moarvm
02:23 astj joined #perl6-dev
03:33 BenGoldberg joined #perl6-dev
03:43 geekosaur joined #perl6-dev
07:49 pmurias joined #perl6-dev
07:50 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
08:40 lizmat Files=1192, Tests=58639, 211 wallclock secs (12.71 usr  4.79 sys + 1241.04 cusr 119.38 csys = 1377.92 CPU)
08:49 Zoffix pmurias: how recently? I see last one merged was 10d ago
08:50 Zoffix which means it would've made it into release
08:50 Zoffix m: my num $x = my str $ = 'Infinity'; dd $x
08:50 camelia rakudo-moar d28540: OUTPUT: «Inf␤»
08:50 Zoffix and it still works
09:02 Geth ¦ rakudo/nom: 15a6f773e6 | (Elizabeth Mattijsen)++ | 2 files
09:02 Geth ¦ rakudo/nom: Move functioning grab from Setty to SetHash
09:02 Geth ¦ rakudo/nom:
09:02 Geth ¦ rakudo/nom: - feels more logical
09:02 Geth ¦ rakudo/nom: - no need to burden Set with candidates it won't ever use
09:02 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/15a6f773e6
09:20 Geth ¦ rakudo/nom: 67292a1e9e | (Elizabeth Mattijsen)++ | src/core/SetHash.pm
09:20 Geth ¦ rakudo/nom: Make SetHash.grab(N) about 3.5x faster
09:20 Geth ¦ rakudo/nom:
09:20 Geth ¦ rakudo/nom: - based on grabbing all from a 26 elem SetHash
09:20 Geth ¦ rakudo/nom: - also fix some object signatures
09:20 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/67292a1e9e
09:22 Geth ¦ rakudo/nom: 1456669fb1 | (Elizabeth Mattijsen)++ | 2 files
09:22 Geth ¦ rakudo/nom: Move functioning grabpairs from Setty to SetHash
09:22 Geth ¦ rakudo/nom:
09:22 Geth ¦ rakudo/nom: - feels more logical
09:22 Geth ¦ rakudo/nom: - no need to burden Set with candidates it won't ever use
09:22 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/1456669fb1
09:39 Geth ¦ rakudo/nom: 0e9ee0d197 | (Elizabeth Mattijsen)++ | src/core/SetHash.pm
09:39 Geth ¦ rakudo/nom: Make SetHash.grabpairs(N) about 3.5x faster
09:39 Geth ¦ rakudo/nom:
09:39 Geth ¦ rakudo/nom: - using the same logic as SetHash.grab(N)
09:39 Geth ¦ rakudo/nom: - except for returning a Pair with the object instead of object itself
09:39 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0e9ee0d197
10:11 Geth ¦ rakudo/nom: e6192ca85d | (Elizabeth Mattijsen)++ | src/core/Setty.pm
10:11 Geth ¦ rakudo/nom: Make Setty.roll about 11x faster
10:11 Geth ¦ rakudo/nom:
10:11 Geth ¦ rakudo/nom: By using R:Q.ROLL, which prevents having to build lists.
10:11 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e6192ca85d
10:26 Ven joined #perl6-dev
10:29 Zoffix "if $dirname.match( /^<$slash>$/ ) && $file.match( /^<$slash>$/ )"
10:29 Zoffix I see in 2013 people were a lot more optimistic about our performance :)
10:32 jnthn More like "make stuff work" :)
10:32 Zoffix :)
10:36 pmurias joined #perl6-dev
10:48 Ven_ joined #perl6-dev
11:04 Geth ¦ rakudo/nom: 18dd07411c | (Elizabeth Mattijsen)++ | src/core/Setty.pm
11:04 Geth ¦ rakudo/nom: Make Setty.roll(N) about 2x as fast
11:04 Geth ¦ rakudo/nom:
11:04 Geth ¦ rakudo/nom: - on a 26 elem Set
11:04 Geth ¦ rakudo/nom: - use list of keys to select from
11:04 Geth ¦ rakudo/nom: - also fix handling of < 1, -Inf and NaN cases for N
11:04 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/18dd07411c
11:12 [Tux] This is Rakudo version 2017.05-9-ge6192ca85 built on MoarVM version 2017.05-9-g37460c7a
11:12 [Tux] csv-ip5xs        2.839
11:12 [Tux] test            14.488
11:12 [Tux] test-t           4.560 - 4.607
11:12 [Tux] csv-parser      12.982
11:12 [Tux] oops?
11:12 lizmat that feels like an huh?
11:25 AlexDaniel joined #perl6-dev
11:27 Zoffix buggable: speed 6
11:27 buggable Zoffix, ▂▂▁▁▇▇ data for 2017-05-19–2017-05-21; range: 4.225s–4.607s; 8% slower
11:28 * Zoffix wonders how come all of lizmat's commits are now accountless... says "Elizab..." instead of "lizmat..." and is unclickable
11:32 lizmat I have *no* idea
11:32 lizmat still logged in now
11:34 Zoffix back to normal now... github glitch I guess
11:34 lizmat yeah, guess so
11:42 Geth ¦ rakudo/nom: 10e9c8ba6f | (Elizabeth Mattijsen)++ | src/core/Setty.pm
11:42 Geth ¦ rakudo/nom: Make Setty.pick about 2x as fast
11:42 Geth ¦ rakudo/nom:
11:42 Geth ¦ rakudo/nom: - by just calling .roll, as that's the same for 1 pick
11:42 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/10e9c8ba6f
11:43 lizmat love it when I can make things faster by mostly just removing code
11:47 dogbert17 m: my $b = BagHash.new; say $b.grabpairs(*)
11:47 camelia rakudo-moar 18dd07: OUTPUT: «()␤»
11:47 dogbert17 commit: 2016.12 my $b = BagHash.new; say $b.grabpairs(*)
11:47 committable6 dogbert17, ¦2016.12: «[]»
11:47 dogbert17 lizmat: why the difference?
11:47 dogbert17 improvement or ...
11:48 lizmat ah, yes, it's lazy now
11:48 lizmat it returns a Seq now
11:48 lizmat (as it always should have, in my opinion  :-)
11:48 dogbert17 cool, some doc updates are necessary though
11:49 * 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
11:49 camelia rakudo-moar 18dd07: OUTPUT: «b => 2␤BagHash $bh = ("a"=>1,"c"=>3).BagHash␤»
11:49 lizmat dogbert17++
11:52 dogbert17 I suspect stuff like 'multi method pickpairs(Baggy:D: $count --> List:D)' needs some tweaking
11:56 Zoffix buggable: speed 4
11:56 buggable Zoffix, ▁▁▇▇ data for 2017-05-20–2017-05-21; range: 4.225s–4.607s; 9% slower
11:56 Zoffix No idea why the slowdown. Based on ^ those dates, these would be the suspect commits: https://github.com/rakudo/rakudo/compare/4ae7c69...HEAD
11:57 Zoffix And I don't see any +> usages, and the only two Bag usages actually got a bit faster
11:57 Zoffix c: 4ae7c69,HEAD my @z = 'aa'..'zz'; for ^1000 { $ = @z.Bag{eager 'a' .. 'z'}:kv }; say now - INIT now
11:57 committable6 Zoffix, ¦4ae7c69: «2.216103» ¦HEAD(e6192ca): «2.1721509»
11:57 Zoffix c: 4ae7c69,HEAD my @z = 'aa'..'zz'; for ^1000 { $ = @z.Bag.elems }; say now - INIT now
11:57 committable6 Zoffix, ¦4ae7c69: «2.06034145» ¦HEAD(e6192ca): «2.07377413»
11:57 Zoffix c: 4ae7c69,HEAD my @z = 'aa'..'zz'; for ^1000 { $ = @z.Bag.elems }; say now - INIT now
11:57 committable6 Zoffix, ¦4ae7c69: «2.0483119» ¦HEAD(e6192ca): «1.9952146»
12:00 Zoffix maybe +> / +< used by core stuff that's used by CSV
12:00 * Zoffix shrugs
12:02 Zoffix Oh wait, the +> / <+ stuff isn't in the suspect list.. (unless there timezone diffs :/)
12:03 * Zoffix gives up
12:03 * lizmat hopes for an artefact on Tux's machine
12:04 lizmat anyways, all of our benchmarks depending on for ^1000 have been sorta scr%wed since January  :-(
12:05 lizmat over time, I mean
12:05 lizmat 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
12:05 lizmat :-(
12:22 Geth ¦ rakudo/nom: 071c88cbb7 | (Elizabeth Mattijsen)++ | src/core/Setty.pm
12:22 Geth ¦ rakudo/nom: Make Setty.pick(N) about 30% faster
12:22 Geth ¦ rakudo/nom:
12:22 Geth ¦ rakudo/nom: - more importantly, also fix <1 -Inf and NaN handling
12:22 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/071c88cbb7
12:23 Zoffix the .WHAT gives the type object it doesn't "show" anything and .gist on a type object returns a short name
12:24 Zoffix m: IO::Socket::INET.WHAT.say
12:24 camelia rakudo-moar 10e9c8: OUTPUT: «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␤␤»
12:24 Zoffix screw you
12:24 Zoffix m: '.'.WHAT.say
12:24 camelia rakudo-moar 10e9c8: OUTPUT: «(Str)␤»
12:24 Zoffix m: '.'.IO.WHAT.say
12:24 camelia rakudo-moar 10e9c8: OUTPUT: «(Path)␤»
12:24 Zoffix m: '.'.IO.^name.say
12:24 camelia rakudo-moar 10e9c8: OUTPUT: «IO::Path␤»
12:24 lizmat Zoffix--  # wordage  :-)
12:24 Zoffix wordage?
12:27 Zoffix lizmat-- # unexplained --
12:29 lizmat wording?
12:30 Zoffix What wording?
12:31 lizmat the "screw you"  :-)
12:31 jnthn Apparently screw is a bad word now? Screw it, guess we should switch to f... :P
12:32 lizmat ok, then I'll just screw along with the rest  :-)
12:32 * lizmat trying to not be more catholic than the pope
12:32 jnthn One'd have to have a screw loose to do that...
12:33 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:34 MasterDuke jnthn: any idea about that bindattr_i business from yesterday?
12:36 * 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 )
12:37 jnthn MasterDuke: What is the type of $value at the point it's being used with bindattr?
12:38 MasterDuke untyped i guess https://github.com/perl6/nqp/blob/master/src/QAST/IVal.nqp#L7
12:38 jnthn Is there some implicit conversion going on there?
12:38 jnthn heh, nothing is untyped...
12:38 jnthn $value.HOW.name($value) should tell you
12:39 jnthn Hmmm
12:39 jnthn I wonder what the code-gen for that is
12:39 jnthn Can you try replacing it with nqp::unbox_i($value) ?
12:41 MasterDuke BOOTInt
12:41 jnthn OK
12:41 jnthn Try the nqp::unbox_i($value)
12:44 MasterDuke this representation (P6num) cannot unbox to a native int (for type BOOTNum)
12:44 MasterDuke when building nqp
12:44 jnthn hah, so we're somewhere passing a num into that code
12:45 jnthn May be wise to try and track down and fix those spots, then we can stick an int type constraint on :$value
12:45 jnthn In the signature
12:48 MasterDuke i can try to track that down, but why was it still messing up when it got the BOOTInt?
12:50 jnthn I suspect 'cus it generates smrt_numify and then int-coerces that
12:51 lizmat m: dd <a b>.Bag (<) <a b b>.Bag   # this feels wrong to me
12:51 camelia rakudo-moar 071c88: OUTPUT: «Bool::False␤»
12:51 MasterDuke hm, would i see that in the --target=mast output?
12:51 lizmat m: dd <a b>.Bag.Set (<) <a b b>.Bag.Set   # is what happens
12:51 camelia rakudo-moar 071c88: OUTPUT: «Bool::False␤»
12:52 jnthn Yeah, though you'll probably find it much more readable to get a .moarvm bytecode file and then look at moar --dump
12:56 MasterDuke how do i specify the file for --target=mbc?
13:03 lizmat MasterDuke: afaik, you can't ?
13:06 jnthn --output=foo.moarvm
13:06 lizmat TIL  :-)
13:07 jnthn You can actually do it with --target=ast too if you want to shove it in a file :)
13:07 jnthn (or optimize, or parse)
13:09 Geth ¦ rakudo/nom: e3695b1640 | (Elizabeth Mattijsen)++ | src/core/Setty.pm
13:09 Geth ¦ rakudo/nom: Add Setty.pickpairs
13:09 Geth ¦ rakudo/nom:
13:09 Geth ¦ rakudo/nom: We have SetHash.grabpairs, and Baggy.pickpairs, so why not on Setty?
13:09 Geth ¦ rakudo/nom: Feels like an oversight now corrected.  Needless to say, there were
13:09 Geth ¦ rakudo/nom: no tests for it.
13:09 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e3695b1640
13:13 lizmat .tell masak judging from https://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.
13:16 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.
13:32 Geth ¦ roast: c4c10d506d | (Elizabeth Mattijsen)++ | 2 files
13:32 Geth ¦ roast: Add tests for empty Set(|Hash).roll handling
13:32 Geth ¦ roast: review: https://github.com/perl6/roast/commit/c4c10d506d
13:36 Geth ¦ roast: 4dfee69397 | (Elizabeth Mattijsen)++ | 2 files
13:36 Geth ¦ roast: Add tests for empty Set(|Hash).pick handling
13:36 Geth ¦ roast: review: https://github.com/perl6/roast/commit/4dfee69397
13:41 dogbert17 m: my $breakfast = bag <eggs bacon>; my $h = $breakfast.hash; say $h.WHAT;
13:41 camelia rakudo-moar e3695b: OUTPUT: «(Hash[Any,Any])␤»
13:41 dogbert17 commit: 2016.12 my $breakfast = bag <eggs bacon>; my $h = $breakfast.hash; say $h.WHAT;
13:41 committable6 dogbert17, ¦2016.12: «(Hash[Any,Any])»
13:41 dogbert17 commit: 2016.08 my $breakfast = bag <eggs bacon>; my $h = $breakfast.hash; say $h.WHAT;
13:41 committable6 dogbert17, ¦2016.08: «(Hash[Any,Any])»
13:41 dogbert17 commit: 2016.05 my $breakfast = bag <eggs bacon>; my $h = $breakfast.hash; say $h.WHAT;
13:41 committable6 dogbert17, ¦2016.05: «(Hash)»
13:42 Zoffix New one is right
13:42 lizmat m: my $breakfast = bag <eggs bacon>; my $h = $breakfast.Hash; say $h.WHAT
13:42 camelia rakudo-moar e3695b: OUTPUT: «(Hash[Any,Any])␤»
13:42 dogbert17 Zoffix: thx, is updating Baggy.pod6 atm
13:42 lizmat dogbert17: note the difference between .hash and .Hash
13:43 lizmat hmmm... shouldn't that be [Any,UInt] ?
13:44 Zoffix maybe, though that'd probably slow stuff down, wouldn't it? Since UInt is a subset
13:44 Zoffix m: dd set.hash
13:44 camelia rakudo-moar e3695b: OUTPUT: «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 …»
13:44 Zoffix *sigh*
13:44 Zoffix m: dd set().hash
13:44 camelia rakudo-moar e3695b: OUTPUT: «(my Bool %{Any})␤»
13:45 Zoffix m: dd bag().hash
13:45 camelia rakudo-moar e3695b: OUTPUT: «(my Any %{Any})␤»
13:45 dogbert17 lizmat: what is the difference between hash and Hash?
13:45 lizmat .Hash coerces to a Hash, .hash returns something hashy
13:46 lizmat just like .List returns a List, and .list returns something listy
13:46 dogbert17 hmm
13:46 dogbert17 'hash' is doc'ed as 'Returns a Hash where the elements of the invocant are the keys and their respective weights the values;'
13:46 lizmat yeah
13:47 lizmat m: dd set().Hash
13:47 camelia rakudo-moar e3695b: OUTPUT: «(my Bool %{Any})␤»
13:48 lizmat arguably, set().hash should be my Any %{Any}
13:50 Geth ¦ roast: b1bf6923fc | (Elizabeth Mattijsen)++ | S02-types/set.t
13:50 Geth ¦ roast: Add tests for Set.grab(N)
13:50 Geth ¦ roast:
13:50 Geth ¦ roast: They should all die!
13:50 Geth ¦ roast: review: https://github.com/perl6/roast/commit/b1bf6923fc
13:53 * dogbert17 is running 'make xtest' in the doc repo and it is indeed slooow
13:53 dogbert17 lizmat: should I whip up some doc for Setty.pickpairs?
13:54 lizmat dogbert17: yes please  :-)
13:55 dogbert17 on it
14:14 dogbert17 lizmat: https://gist.github.com/dogbert17/4bcbc10b4843d64b6cb14987f766b013
14:15 lizmat s/version/candidate/  ?
14:16 lizmat dogbert17: perhaps refer to grabpairs if you *do* want to have it affect the SetHash ?
14:17 dogbert17 fixed the version candidate thingy and will add a blurb about grabpairs
14:56 cognominal joined #perl6-dev
14:56 lizmat afk&
15:14 BenGoldberg joined #perl6-dev
15:26 AlexDaniel joined #perl6-dev
15:44 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:45 Geth ¦ rakudo/nom: 7d6fa73952 | (Zoffix Znet)++ | src/core/IO/Spec/Win32.pm
15:45 Geth ¦ rakudo/nom: [io grant] Make IO::Spec::Win32.catpath 47x faster
15:45 Geth ¦ rakudo/nom:
15:45 Geth ¦ rakudo/nom: Indirectly used by IO::Path.add/.child/.parent/.sibling
15:45 Geth ¦ rakudo/nom: and multi-part form of .new
15:45 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/7d6fa73952
15:45 Zoffix ZofBot: yeeeeaaah boiii. That's how we roll! (•_•)           ( •_•)>⌐■-■          (⌐■_■)
15:45 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 {
15:48 Zoffix "A single NOT NULL column could not be changed to allow nulls very easily, it being a 600GB table" http://blogs.perl.org/users/preaction/2017/05/2017-perl-toolchain-summit.html
15:49 Zoffix 600GB wow, CPANTesters is a serious business :o
15:58 Zoffix .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: https://github.com/zoffixznet/perl6-IRC-Client/commit/4f3d80a0d05d02658dec32ec079d94261ea48d08  but I've just tried this and it works fine, as doing using a try + block +_ require: https://twitter.com/zoffix/status/866322013912170496
15:58 yoleaux Zoffix: I'll pass your message to nine.
15:59 Ven joined #perl6-dev
16:01 eater They could've used percona tools, I've done changes on bigger databases :s
16:02 Zoffix The name's `preaction`; hangs in #perl if you wanted to talk to them
16:03 eater Zoffix: I've been doing ::($package-name) ~~ Failure all this time
16:03 Geth ¦ rakudo/nom: 81221c5f99 | usev6++ | src/core/Int.pm
16:03 Geth ¦ rakudo/nom: Apply workaround for RT #131306 for MoarVM only
16:03 Geth ¦ rakudo/nom:
16:03 Geth ¦ rakudo/nom: It busted spectest on JVM (and isn't needed there)
16:03 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/81221c5f99
16:03 synopsebot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=131306
16:03 Zoffix eater: that's wrong now. See http://rakudo.org/2017/03/18/lexical-require-upgrade-info/
16:03 eater so it was wrong :')
16:03 eater ack
16:08 Zoffix To be more precise, it's wrong if you compile-time require that symbol (last example on that upgrade info page)
16:08 Zoffix or symbol is compile time
16:08 Zoffix ZofBot: one of those things
16:08 ZofBot Zoffix, Horizontal whitespace is defined as anything matching "\s" that doesn't also match "\v"
16:10 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?
16:10 ZofBot nine, WHAT
16:10 nine Zoffix: no idea. Maybe a side effect of my lexical require work?
16:10 eater :')
16:10 Zoffix ZofBot++
16:16 eater Zoffix: was there a diff between join and catpath in the end?
16:16 eater at least a notable difference
16:16 Zoffix join has a couple of special cases
16:16 Zoffix I don't know why
16:18 eater weird
16:24 patrickz joined #perl6-dev
16:39 Geth ¦ rakudo/nom: 494659a1c7 | (Zoffix Znet)++ | src/core/IO/Spec/Win32.pm
16:39 Geth ¦ rakudo/nom: [io grant] Make IO::Spec::Win32.join 26x faster
16:39 Geth ¦ rakudo/nom:
16:39 Geth ¦ rakudo/nom: Used by IO::Path.add/.child/.parent/.sibling
16:39 Geth ¦ rakudo/nom: and multi-part form of .new
16:39 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/494659a1c7
16:40 Zoffix m: say 26*47
16:40 camelia rakudo-moar 81221c: OUTPUT: «1222␤»
16:40 * Zoffix shrugs
16:40 Zoffix Well, join uses catpath, so that 26x is *on top* of .catpath improvement == hopefully a nice boost on windows for the mentioned routines
16:46 AlexDaniel ZofBot: can you write some code?
16:46 ZofBot AlexDaniel, They will compile the modules in depth first order of the dependency tree
16:47 Ven joined #perl6-dev
17:07 Ven_ joined #perl6-dev
17:24 Ven_ joined #perl6-dev
17:28 cono joined #perl6-dev
17:29 cono Zoffix: I changed it to rw, as it won't let me change it when it binds
17:29 cono you can look to this simple example of how to get first unused port from the system: https://gist.github.com/cono/69e2ba8396171c017d5a531f0610e6d0
17:29 cono I've implemented the same here
17:32 cono https://pastebin.com/ExpjSeLn
17:32 Zoffix Right, but it doesn't have to be done through overwriting an already existing attribute
17:33 Zoffix And making it `rw` from the user's point of view
17:34 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`
17:35 Zoffix like, without making it `rw`
17:35 Zoffix m: class { has $.x; method bar { $!x = 42 } }.new.bar
17:35 camelia rakudo-moar 494659: ( no output )
17:36 cono should return $self
17:37 Ven_ joined #perl6-dev
17:40 cono Zoffix: yeah, it works, thanks a lot! :)
17:40 cono what about opcode?
17:40 cono I'm really concerned about it, but don't know how to make in another way
17:40 cono not so deep in the code yet
17:41 Zoffix cono: don't know anything about that area. You may want to try catching timotimo or jnthn about it
17:42 cono got it. Thanks a lot got help
17:42 cono for*
17:43 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 :)
17:44 cono will do :)
18:01 timotimo hey cono
18:04 timotimo i don't think it's a bad idea to make your suggested feature an opcode
18:06 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:08 Zoffix dogbert17: it does look to be a shortcut, but the link it makes doesn't work on individual routine pages, like this one: https://docs.perl6.org/routine/close-stdin
18:10 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:14 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:53 * Zoffix spots an inconsistency
18:53 Zoffix IO::Handle.put/.print take *@ args, but &put, &print, &say, and IO::Handle.say all take **@ args
19:10 awwaiid pmurias: awesome!
19:42 Geth ¦ nqp/master: 11 commits pushed by pmurias++
19:42 Geth ¦ nqp/master: review: https://github.com/perl6/nqp/compare/af678371e2...3e98b7e19c
19:52 Geth ¦ rakudo/js: 4 commits pushed by pmurias++
19:52 Geth ¦ rakudo/js: dc8663a1ce | [js] Make js-clean cleanup better
19:52 Geth ¦ rakudo/js: cd62aee008 | [js] Cleanup more things in js-clean
19:52 Geth ¦ rakudo/js: 786c51143e | [js] Fill in the dependencies for the setting correctly
19:52 Geth ¦ rakudo/js: 68974ea505 | [js] Enable stuff for precompilation
19:52 Geth ¦ rakudo/js: review: https://github.com/rakudo/rakudo/compare/ab85d0a9d7...68974ea505
20:01 dogbert17 Zoffix: yes, I can fix it but it should be noted that this shortcut is quite prevalent in the docs ...
20:02 Zoffix so fix the thing that generates the final URL
20:08 dogbert17 that is one possibility, I believe that there's even an issue about that in the doc repo
20:15 Ben_Goldberg joined #perl6-dev
20:36 Geth ¦ rakudo/nom: 06cd0bc3f4 | (Elizabeth Mattijsen)++ | 3 files
20:36 Geth ¦ rakudo/nom: Streamline QuantHash.(hash|Hash)
20:36 Geth ¦ rakudo/nom:
20:36 Geth ¦ rakudo/nom: - .Hash returns an object hash with value limited to QuantHash meaning
20:36 Geth ¦ rakudo/nom:   Setty -> Bool, Baggy -> UInt, Mixy -> Real
20:36 Geth ¦ rakudo/nom: - .hash returns an object hash without value limits (Any)
20:36 Geth ¦ rakudo/nom: - makes Baggy/Mixy.(hash|Hash) about 2.5x as fast (on a 26 elem Bag/Mix)
20:36 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/06cd0bc3f4
20:40 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:46 * jnthn glances backlog
20:46 jnthn Hmm...yeah, that's unfortunate timing. ;)
20:47 jnthn 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 jnthn But less fortunate in that I've already got branches that rip it all up.
20:48 jnthn May not be too bad though
20:50 Ben_Goldberg joined #perl6-dev
20:53 MasterDuke jnthn: after long delay, back at that nqp thing. if i change here https://github.com/perl6/nqp/blob/master/src/NQP/Actions.nqp#L1576-L1583 to explicitly create an int variable from $<integer>.ast (and then pass that to IVal.new), it get the wrong value
20:54 jnthn So, method integer in HLL::Actions needs attention, I guess
20:55 MasterDuke method integer($/) { make $<VALUE>.made; }
20:56 jnthn Yeah, which leads to decint, which leads to nqp::radix...
20:58 MasterDuke nqp: say(nqp::radix(10, "100000000000000009", 0, 0)[0]))
20:58 camelia nqp-moarvm: OUTPUT: «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…»
20:59 MasterDuke nqp: say(nqp::radix(10, "100000000000000009", 0, 0)[0])
20:59 camelia nqp-moarvm: OUTPUT: «100000000000000009␤»
21:03 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:04 timotimo bytecode dump is moar --dump?
21:04 MasterDuke yeah
21:04 timotimo the wrong value shows up in execution?
21:05 MasterDuke yeah
21:05 timotimo ok, so not a bug in the dumper at least
21:05 MasterDuke nqp: my int $a := 100000000000000009; say($a)
21:05 camelia nqp-moarvm: OUTPUT: «100000000000000016␤»
21:05 cono jnthn: I can rework this already to syscalls
21:05 cono instead of uv
21:06 cono just this piece I guess
21:06 cono atleast can try :D
21:06 MasterDuke nqp: say(100000000000000009)
21:06 camelia nqp-moarvm: OUTPUT: «100000000000000016␤»
21:07 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)
21:08 jnthn sync-socket-no-uv is the MoarVM branch
21:08 jnthn And refactor-socket-encoding the Rakudo one
21:08 cono k, will branch from it
21:08 cono nqp ?
21:09 jnthn No nqp branch
21:09 cono btw, is k
21:10 cono 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
21:10 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
21:11 jnthn I didn't change the spectests, and at least on Friday my branch was passing them :)
21:11 jnthn It's possible I'm missing stuff from nom by now though
21:11 cono I see that Distro parses lsb_releases
21:12 timotimo MasterDuke: what a fascinating bug
21:12 cono which is fine for Distro.name but not fine for distinguishing linux vs win32
21:12 timotimo m: say +"100000000000000009"
21:12 camelia rakudo-moar 06cd0b: OUTPUT: «100000000000000009␤»
21:12 cono which is VM.osname IMHO
21:12 jnthn cono: I don't think anybody will object to tidying that up in IO-Socket-INET.t
21:12 cono got it :D
21:13 cono thanks
21:14 jnthn Thanks for working on these bits :0
21:14 jnthn *:)
21:14 MasterDuke timotimo: yeah, seems to only happen in pure nqp land
21:15 cono I was thinking about it since YAPC::EU in Kyiv but haven't enough time to dig deeper :) Finally found some
21:16 jnthn That was a little while ago. :)
21:16 cono yeah :D
21:18 MasterDuke jnthn, timotimo: any suggestions for what to try next?
21:19 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:20 timotimo we can't bisectable nqp, right?
21:21 MasterDuke nope
21:22 timotimo i'll sprinkle some debug statements
21:23 timotimo turning a string to int: 100000000000000009 10
21:23 timotimo result is 100000000000000009
21:23 timotimo ^- this is string_to_int
21:24 MasterDuke MVM_radix gets "100000000000000009"
21:24 timotimo right
21:25 Geth ¦ rakudo/nom: 1c16bf2e08 | (Zoffix Znet)++ | src/core/Pair.pm
21:25 Geth ¦ rakudo/nom: Fix Pair.new w/ wrong args giving factually incorrect error
21:25 Geth ¦ rakudo/nom:
21:25 Geth ¦ rakudo/nom: Fixes RT#131339: https://rt.perl.org/Ticket/Display.html?id=131339
21:25 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/1c16bf2e08
21:25 synopsebot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=131339
21:26 Geth ¦ roast: a523aef60a | (Zoffix Znet)++ | S02-types/pair.t
21:26 Geth ¦ roast: Test Pair.new does not give error from Mu.new
21:26 Geth ¦ roast:
21:26 Geth ¦ roast: Rakudo fix: https://github.com/rakudo/rakudo/commit/1c16bf2e08
21:26 Geth ¦ roast: RT#131339: https://rt.perl.org/Ticket/Display.html?id=131339
21:26 Geth ¦ roast: review: https://github.com/perl6/roast/commit/a523aef60a
21:26 synopsebot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=131339
21:29 timotimo it asplodes inside bindattr_i
21:29 MasterDuke yep
21:30 Zoffix wonder why we have two of these .new in Pair, their bodies are identical are they not? https://github.com/rakudo/rakudo/blob/nom/src/core/Pair.pm#L6-L17
21:30 timotimo maybe another bindattr is overwriting it for some reason
21:30 timotimo nah
21:31 MasterDuke Zoffix: isn't that (a separate Mu candidate) usually for handling Junctions?
21:31 Zoffix Ah. MasterDuke++
21:31 Zoffix Um wait
21:32 Zoffix MasterDuke: well yeah, Junctions fit into Mu, but why have a Cool:D candidate too?
21:32 * Zoffix does an experiment
21:33 Zoffix 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 rakudo-moar 1c16bf: OUTPUT: «here␤Bool::True␤there␤»
21:33 MasterDuke timotimo: i added an fprintf inside P6opaque's bind_attribute, it has the wrong value at that point
21:33 Zoffix ah, ok
21:33 Zoffix m: dd [Pair.new: 42, <a b c>.all]
21:33 camelia rakudo-moar 1c16bf: OUTPUT: «[42 => all("a", "b", "c")]␤»
21:33 Zoffix m: dd [Pair.new: <42 a b>.all, <a b c>.all]
21:33 camelia rakudo-moar 1c16bf: OUTPUT: «[(all(IntStr.new(42, "42"), "a", "b")) => all("a", "b", "c")]␤»
21:34 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 rakudo-moar 1c16bf: OUTPUT: «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␤»
21:34 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')) } }
21:34 camelia nqp-moarvm: ( no output )
21:34 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()
21:34 camelia nqp-moarvm: OUTPUT: «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…»
21:34 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)
21:34 camelia nqp-moarvm: OUTPUT: «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/…»
21:34 Zoffix Yeah, I'm not following it.
21:34 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)
21:34 camelia nqp-moarvm: OUTPUT: «100000000000000009␤»
21:34 BenGoldberg joined #perl6-dev
21:35 Zoffix Deleted comment here says "this candidate optimizes": https://github.com/rakudo/rakudo/commit/b00d92de142f0d9b8514ca9985dc43a4b7d7625e
21:36 Zoffix .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? https://github.com/rakudo/rakudo/commit/b00d92de142f0d9b8514ca9985dc43a4b7d7625e
21:36 yoleaux Zoffix: I'll pass your message to lizmat.
21:36 MasterDuke timotimo: fun, isn't it?
21:37 timotimo maybe only when you derive from another class, too?
21:39 timotimo you know what, i'll use a conditional breakpoint with the int value.
21:40 MasterDuke timotimo: but you didn't derive from a class in your example?
21:40 dct joined #perl6-dev
21:40 timotimo yeah, i made another example locally and still got 9 at the end
21:42 timotimo need an unoptimized moarvm for this
21:44 timotimo interesting, bindattr_i is already being called with 1000...00016 in the i64 register
21:46 * timotimo installs rr
21:48 MasterDuke is that the time-reversible debugger?
21:50 timotimo yup
21:51 timotimo oh damn
21:51 timotimo crap.
21:52 timotimo $498 = 1.0000000000000002e+17
21:52 timotimo we're running a coerce_ni here
21:52 MasterDuke jnthn did say nqp does some float stuff when it shouldn't
21:53 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
21:54 MasterDuke and added int constraints
21:54 MasterDuke but i don't think i did everywhere, just where it was happening a lot
22:00 timotimo i'll try some code
22:00 timotimo just have to trick the code gen to do our bidding
22:01 MasterDuke can the code gen be distracted with cookies perhaps?
22:02 timotimo can't know until we try
22:07 * BenGoldberg waves some delicious chocolate chip cookies in front of the code gen to see what happens.
22:08 dogbert17_ joined #perl6-dev
22:09 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.
22:10 timotimo okay, here's your FPGA dev board
22:11 MasterDuke heh, there was that guy who posted on the Perl 6 facebook group asking about creating a MoarHM
22:14 timotimo as soon as you give it an "int" annotation, it'll go via a num
22:14 MasterDuke where?
22:15 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:16 MasterDuke yeah, i tried that
22:19 timotimo bleeehhhhh, the objprimspec is 1, so it knows it's an int at run time
22:19 MasterDuke timotimo: https://gist.github.com/MasterDuke17/01ce055d4860e58681c63c637f271c7a an edit i made to method number
22:20 MasterDuke prints `v: 100000000000000009 int: 100000000000000016` for `./nqp-m -e 'say(100000000000000009)'`
22:20 timotimo haha, i did the same thing
22:20 MasterDuke great minds...
22:21 timotimo "make the same mistakes"? ;)
22:22 MasterDuke apparently
22:29 timotimo nqp's floaty typing is really not so good
22:29 timotimo i don't have the brain to dig into the code gen or whatever needs changing
22:31 MasterDuke do you know where the change is needed?
22:32 timotimo no, i'm not sure why it generates these coercions
22:32 timotimo there's a central function that makes coercions, but it itself is probably not to blame directly

| Channels | #perl6-dev index | Today | | Search | Google Search | Plain-Text | summary