Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6-dev, 2017-02-04

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

All times shown according to UTC.

Time Nick Message
00:00 lizmat good night, #perl6-dev
00:00 jnthn 'night lizmat
00:00 samcv Alphabetic =  Lowercase + Uppercase + Lt + Lm + Lo + Nl + Other_Alphabetic
00:01 samcv but our <alpha> is not like that
00:01 samcv that is intended
00:01 samcv ?
00:03 samcv j: say so '🅐' ~~ /<alpha>/
00:03 camelia rakudo-jvm fb4f16: OUTPUT«False␤»
00:06 jnthn Not sure... :)
00:06 jnthn Bed time for me...'night
00:07 samcv this is weird. we make it way more complicated than it needs to be....
00:07 samcv no wonder it' slower
00:08 samcv there is an alphabetic property we can just check :P
00:08 samcv we check Lo, Ll, Lu, Lt, Lm
00:08 samcv so that does seem like an error
00:10 samcv i can make a lot of our things like \d and \w a lot faster
00:17 samcv i guess it doesn't make it much faster here because we hold onto the property values between queries
00:17 samcv alpha can def get faster tho. but \d is gonna stay the same
00:20 pyrimidine joined #perl6-dev
00:23 pyrimidine joined #perl6-dev
00:33 geekosaur joined #perl6-dev
00:58 samcv are we getting failures in Inline::perl5?
00:59 pyrimidine joined #perl6-dev
01:02 samcv .ask TimToady aside from <alpha> also matching underscore, is it intentionally different from Unicode property Alphabetic?
01:02 yoleaux2 samcv: I'll pass your message to TimToady.
01:04 samcv .ask TimToady at the moment it does not cover all of Unicode property Alphabetic in MVM it only covers some of them (Lo, Ll, Lu, Lt, Lm)  Per Unicode spec: Alphabetic =  Lowercase + Uppercase + Lt + Lm + Lo + Nl + Other_Alphabetic
01:04 yoleaux2 samcv: I'll pass your message to TimToady.
01:05 pyrimidine joined #perl6-dev
01:37 geekosaur joined #perl6-dev
01:47 TimToady I'm sure all those distinctions didn't exist when we started. :)
01:47 yoleaux2 01:02Z <samcv> TimToady: aside from <alpha> also matching underscore, is it intentionally different from Unicode property Alphabetic?
01:47 yoleaux2 01:04Z <samcv> TimToady: at the moment it does not cover all of Unicode property Alphabetic in MVM it only covers some of them (Lo, Ll, Lu, Lt, Lm)  Per Unicode spec: Alphabetic =  Lowercase + Uppercase + Lt + Lm + Lo + Nl + Other_Alphabetic
01:47 samcv ah ok
01:47 samcv yeah i thought
01:47 samcv that was likely
01:47 pyrimidine joined #perl6-dev
01:48 TimToady and when bootstrapping, we were doing everything by enumeration; c.f. the brackets and such
01:48 samcv though 'fixing it' breaks Nl's
01:48 samcv because i guess it assumes they won't match <alpha>
01:50 TimToady I doubt there are many people using P6 on roman numerals yet
01:52 samcv yeah
01:59 samcv u: { my $chr = .chr; ($chr ~~ /\s/).Bool != ($chr ~~ /<:ws>/).Bool }
02:00 unicodable6 samcv, U+0009 <control-0009> [Cc] (control character)
02:00 unicodable6 samcv, U+000A <control-000A> [Cc] (control character)
02:09 KDr2 joined #perl6-dev
02:34 pyrimidine joined #perl6-dev
02:54 Geth ¦ nqp: fe0dd2f24d | (Samantha McVey)++ | src/QRegex/P6Regex/Grammar.nqp
02:54 Geth ¦ nqp: Make <ws> ~4% faster
02:54 Geth ¦ nqp:
02:54 Geth ¦ nqp: We don't need the `+` on the \s because we already have a * on the group.
02:54 Geth ¦ nqp: review: https://github.com/perl6/nqp/commit/fe0dd2f24d
02:58 MasterDuke samcv++
02:58 samcv BLAZING FAST
02:58 brokenchicken Sweet. That doesn't affect Rakudo though, does it?
02:59 MasterDuke samcv *= 1.04
02:59 samcv probably
02:59 brokenchicken Awesome.
02:59 samcv brokenchicken, https://github.com/rakudo/rakudo/blob/nom/src/Perl6/Grammar.nqp#L598-L617 is this using <ws>
02:59 samcv but yeah it affects <ws. in regex generally
02:59 samcv not sure what we do in that link ^
03:00 brokenchicken samcv: don't we override it here? https://github.com/rakudo/rakudo/blob/nom/src/Perl6/Grammar.nqp#L595-L617
03:00 samcv i just linked that :p
03:00 brokenchicken Oh you linked to same page :)
03:00 samcv not sure what we do there. also not convinced that would be faster than just <ws>
03:01 brokenchicken m: for ^100000 { if 0 { 1 } else { 5 } }; say now - INIT now
03:01 camelia rakudo-moar f799a0: OUTPUT«WARNINGS for <tmp>:␤Useless use of constant integer 1 in sink context (line 1)␤Useless use of constant integer 5 in sink context (line 1)␤0.0612390␤»
03:01 brokenchicken m: for ^3000000 { if 0 { $ = 1 } else { $ = 5 } }; say now - INIT now
03:01 camelia rakudo-moar f799a0: OUTPUT«2.642503␤»
03:01 samcv well i went from 135.97s to 130s compile time
03:01 brokenchicken m: for ^3000000 { 0 ?? $ = 1 !! $ = 5 }; say now - INIT now
03:01 camelia rakudo-moar f799a0: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Precedence of = is too loose to use inside ?? !!; please parenthesize␤at <tmp>:1␤------> 3for ^3000000 { 0 ?? $7⏏5 = 1 !! $ = 5 }; say now - INIT now␤    expecting any of:␤        infix␤     …»
03:01 samcv just one test of each tho;ugh
03:01 brokenchicken m: for ^3000000 { 0 ?? ($ = 1) !! ($ = 5) }; say now - INIT now
03:01 camelia rakudo-moar f799a0: OUTPUT«1.50586049␤»
03:02 pyrimidi_ joined #perl6-dev
03:02 brokenchicken m: say 2.64/1.5
03:02 camelia rakudo-moar f799a0: OUTPUT«1.76␤»
03:02 brokenchicken samcv: ^ seems changing the if/else in method ws to a ternary gives a win
03:02 samcv nice
03:03 samcv i'll change that and then bench again :)
03:05 samcv wow
03:06 samcv down to 105 seconds compile time!
03:06 samcv actually dunno if i did a make clean
03:06 samcv gonna make clean and then time it
03:13 samcv ok 128s
03:13 samcv so i'm seeing about 5% improvement in compile times
03:15 MasterDuke awesome!
03:21 japhb m: say 1.05 ** 10
03:21 camelia rakudo-moar f799a0: OUTPUT«1.628894626777441␤»
03:22 Geth ¦ rakudo/nom: 0bb7c20637 | (Samantha McVey)++ | tools/build/NQP_REVISION
03:22 Geth ¦ rakudo/nom: Bump NQP to get a 4% speed increase for <ws>
03:22 Geth ¦ rakudo/nom:
03:22 Geth ¦ rakudo/nom: perl6/nqp@fe0dd2f2
03:22 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0bb7c20637
03:22 Geth ¦ rakudo/nom: version bump brought these changes: https://github.com/perl6/nqp/compare/2017.01-67-gafab417...2017.01-68-gfe0dd2f2
03:22 Geth ¦ rakudo/nom: d5262e6c44 | (Samantha McVey)++ | src/Perl6/Grammar.nqp
03:22 Geth ¦ rakudo/nom: Use ternary operator for method ws to get speed boost
03:22 Geth ¦ rakudo/nom:
03:22 Geth ¦ rakudo/nom: With the NQP bump and this change I am seeing a 5% decrease in Rakudo compile times.
03:22 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d5262e6c44
03:22 samcv \o/
03:22 Geth ¦ rakudo/nom: version bump brought these changes: https://github.com/perl6/nqp/compare/2017.01-67-gafab417...2017.01-68-gfe0dd2f2
03:22 gfldex joined #perl6-dev
03:24 MasterDuke i'll try to profile another build
03:32 japhb Why is it useful for token unsp to recurse?
03:32 japhb TimToady: ^^
03:43 pyrimidine joined #perl6-dev
03:52 pyrimidine joined #perl6-dev
04:00 MasterDuke TimToady, japhb: FWIW, a rakudo built with this line ( https://github.com/rakudo/rakudo/blob/nom/src/Perl6/Grammar.nqp#L620 ) commented out passes spectest
04:04 pyrimidi_ joined #perl6-dev
04:04 samcv MasterDuke, nice
04:05 samcv MasterDuke, does it make it any faster though?
04:06 MasterDuke not noticeably
04:07 samcv yeah that's what i thought
04:07 samcv s/thought/guessed
04:11 MasterDuke newest --profile-compile of a rakudo build sorted by exclusive time: https://gist.github.com/MasterDuke17/b694b8b535b5eeb4090ef020bcb71392
04:13 samcv u: { (.chr ~~ /\v/).Bool }
04:13 unicodable6 samcv, U+000A <control-000A> [Cc] (control character)
04:13 unicodable6 samcv, U+000B <control-000B> [Cc] (control character)
05:05 pyrimidine joined #perl6-dev
05:25 japhb .tell jnthn Just submitted RT #130716, LTA behavior of unbounded supply {} + react/whenever.  This is blocking my progress on treating raw terminal input (an unbounded source) as a supply, because any calling code that uses react/whenever instead of .act will appear to hang.  :-(
05:25 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=130716
05:25 yoleaux2 japhb: I'll pass your message to jnthn.
05:47 pyrimidine joined #perl6-dev
05:48 pyrimidi_ joined #perl6-dev
06:50 pyrimidine joined #perl6-dev
06:51 lizmat Files=1175, Tests=55871, 166 wallclock secs (10.13 usr  4.17 sys + 967.04 cusr 103.78 csys = 1085.12 CPU)
07:11 AlexDaniel joined #perl6-dev
07:47 lizmat joined #perl6-dev
07:52 pyrimidine joined #perl6-dev
07:56 samcv u: { .uniprop('Upper') and .uniprop ne 'Lu' }
07:56 unicodable6 samcv, U+2160 ROMAN NUMERAL ONE [Nl] (Ⅰ)
07:56 unicodable6 samcv, U+2161 ROMAN NUMERAL TWO [Nl] (Ⅱ)
07:56 unicodable6 samcv, https://gist.github.com/e499976aa394f0f7aa06aa864327c9bd
08:07 samcv j: say 'Ⅱ' ~~ /<alpha>/
08:07 camelia rakudo-jvm fb4f16: OUTPUT«「Ⅱ」␤ alpha => 「Ⅱ」␤»
08:07 samcv m: say 'Ⅱ' ~~ /<alpha>/
08:07 camelia rakudo-moar d5262e: OUTPUT«Nil␤»
08:08 samcv so i think i am going to change Character Class Alpha === Unicode property Alphabetic
08:08 samcv since jvm it already does that
08:09 samcv gotta make sure nothing breaks first though
08:10 samcv if we really want the old functionality we can use <:L> instead
08:10 samcv m: say 'Ⅱ' ~~ /<:L>/
08:10 camelia rakudo-moar d5262e: OUTPUT«Nil␤»
08:13 samcv i think <:Letter> == <:L> as well
08:14 samcv @TimToady, in case you wanted to know what I have decided
08:24 samcv m: sub Ⅱ { }
08:24 camelia rakudo-moar d5262e: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:1␤------> 3sub7⏏5 Ⅱ { }␤    expecting any of:␤        new name to be defined␤»
08:25 samcv j: sub Ⅱ { }
08:25 camelia rakudo-jvm fb4f16: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:1␤------> 3sub7⏏5 Ⅱ { }␤    expecting any of:␤        new name to be defined␤»
08:33 pyrimidine joined #perl6-dev
08:46 samcv say "ⅷ".Int
08:46 samcv m: say "ⅷ".Int
08:46 camelia rakudo-moar d5262e: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5ⅷ' (indicated by ⏏)␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
08:46 samcv m: say "ⅷ".Num
08:46 camelia rakudo-moar d5262e: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5ⅷ' (indicated by ⏏)␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
08:46 samcv m: say ⅷ
08:46 camelia rakudo-moar d5262e: OUTPUT«8␤»
08:51 samcv j: say "Ⓐ" ~~ /<alpha>/
08:51 camelia rakudo-jvm fb4f16: OUTPUT«「Ⓐ」␤ alpha => 「Ⓐ」␤»
08:58 RabidGravy joined #perl6-dev
09:03 dogbert2 joined #perl6-dev
09:04 Geth ¦ roast: c029e7f258 | (Samantha McVey)++ | S15-unicode-information/uniprop.t
09:04 Geth ¦ roast: Add some more tests for East_Asian_Width
09:04 Geth ¦ roast:
09:04 Geth ¦ roast: Now that East_Asian_Width has been added in MoarVM, add some tests
09:04 Geth ¦ roast: which currently pass and allow us to return the abbreviated property values but
09:04 Geth ¦ roast: also add tests which want the full property value.
09:04 Geth ¦ roast: review: https://github.com/perl6/roast/commit/c029e7f258
09:20 KDr2 joined #perl6-dev
09:27 lizmat joined #perl6-dev
10:20 lizmat joined #perl6-dev
10:28 dogbert17 joined #perl6-dev
10:49 pyrimidine joined #perl6-dev
11:50 pyrimidine joined #perl6-dev
11:51 timotimo i actually thought giving \s a + inside the []* was a performance optimization
11:57 timotimo MasterDuke: https://gist.github.com/timo/43777e12adc6a47ce5e0c1cccc5c698a
12:08 pyrimidine joined #perl6-dev
12:10 jnthn m: say (-42)\  \  .abs
12:10 camelia rakudo-moar d5262e: OUTPUT«42␤»
12:10 yoleaux2 05:25Z <japhb> jnthn: Just submitted RT #130716, LTA behavior of unbounded supply {} + react/whenever.  This is blocking my progress on treating raw terminal input (an unbounded source) as a supply, because any calling code that uses react/whenever instead of .act will appear to hang.  :-(
12:10 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=130716
12:10 jnthn MasterDuke: I think eval above is why <.unsp> recurses
12:11 jnthn And the various places <.unsp> is called don't quantify it
12:11 jnthn So looks like a case of missing spectest
12:13 timotimo i think what japhb is running into is that there's no whenever at all inside the supply block and so it ... doesn't finish? but it *does* finish in the first example …
12:14 timotimo i mean, the supply block is supposed to run to completion before it creates the supply, right?
12:15 RabidGravy yeah
12:15 jnthn There's a misunderstanding at line 12, but that probably doesn't affect things
12:15 MasterDuke timotimo++, did you get that fancy formatting just by making it a tsv?
12:15 jnthn (A role is not a closure)
12:15 timotimo yes
12:16 timotimo i just replaced all | with \t, and then replaced a bunch of \t back to | when they were inside < >
12:16 RabidGravy a roll is not brioche
12:16 jnthn Oh, also
12:16 jnthn Spot the other bug on line 29
12:16 jnthn I suspect it meant to call $s2.done
12:16 timotimo oooh s1 :)
12:17 RabidGravy can you lot type bigger please, I'm not getting my new glasses until tomorrow :)
12:17 timotimo normally, you'd put a QUIT { } in place where japhb is using the "method done" trick, right?
12:18 MasterDuke timotimo: nice, i'll figure out how to get sqlite to use \t as the delimiter
12:18 jnthn CLOSE, perhaps
12:19 jnthn Though even more likely is a `last` in the whenever block
12:19 jnthn Even with the issues fixed, there's still the original reported issue, however.
12:19 timotimo _      _   _    _      _         _   _
12:19 timotimo (_)___ | |_| |_ (_)___ | |__  ___| |_| |_ ___ _ _
12:19 timotimo | (_-< |  _| ' \| (_-< | '_ \/ -_)  _|  _/ -_) '_|
12:19 timotimo |_/__/  \__|_||_|_/__/ |_.__/\___|\__|\__\___|_|
12:20 timotimo MasterDuke: sqlite> .mode csv
12:20 timotimo also, .output test.csv
12:20 MasterDuke timotimo++
12:20 timotimo you may also want .headers on
12:21 jnthn It's a bit of a tricky issue in general, in so far as supply/react aren't really meant to introduce concurrency on their own, but they are meant to offer mutual exclusion
12:21 timotimo apparently there's also .once which will turn .output back to what it was directly after running your next sql statement
12:21 RabidGravy timotimo, perfect! cheers!
12:22 MasterDuke yeah, i was using .once so that just the next query i ran would get output to a file
12:23 jnthn Could I get a sorted-by-inclusive-time version of that gist also?
12:23 MasterDuke jnthn: `say (-42)\  \  .abs` still works with that line commented out
12:23 MasterDuke jnthn: sure, i'll put it up in a min
12:24 jnthn Ah, that may not be a good example
12:24 timotimo i'm surprised the github tsv/csv viewer won't let you sort stuff
12:25 jnthn m: $*OUT.say\   \   (42)
12:25 camelia rakudo-moar d5262e: OUTPUT«42␤»
12:25 jnthn MasterDuke: That one might be more upset with it commented out :)
12:25 jnthn The thing one ends up in <.ws> I guess
12:25 * jnthn didn't finish his coffee yet :)
12:26 MasterDuke `No such method 'CALL-ME' for invocant of type 'Bool'`
12:27 timotimo m: $*OUT.say (42)
12:27 camelia rakudo-moar d5262e: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3$*OUT.say7⏏5 (42)␤    expecting any of:␤        infix␤        infix stopper␤        statement end␤        statement modifier␤        statement mod…»
12:27 timotimo i wonder how it gets that
12:30 jnthn So, that gets us our spectest that needs it to recurse, I guess :-)
12:31 AlexDaniel joined #perl6-dev
12:33 MasterDuke jnthn: https://gist.github.com/MasterDuke17/dad51253e45526d59c9258519123da8b
12:34 MasterDuke jnthn: should i add `$*OUT.say\   \   (42)` to roast?
12:37 jnthn MasterDuke: Yes, lets
12:37 jnthn Well, not that precise example
12:37 jnthn But something of that form
12:37 jnthn Interesting, compile_in_context is actually less of a time sink than I expected
12:38 MasterDuke didn't dogbert17++ ask about some error in libuv? was it with uv_fs_scandir_next?
12:39 jnthn He did, I don't *think* it was that function
12:39 jnthn < dogbert17_> o/ has anyone seen ever this message? moar: 3rdparty/libuv/src/unix/stream.c:1499: uv_read_start: Assertion `((stream)->io_watcher.fd) >= 0' failed.
12:40 jnthn Was that
12:40 MasterDuke i just noticed that libuv updated on my machine, looks like the current version is `2017.02.02, Version 1.11.0 (Stable)`, but MoarVM has `2015.12.15, Version 1.8.0 (Stable)`
12:41 MasterDuke ah, ok, i just noticed in their changelog something about a bug fix for uv_fs_scandir_next and thought it looked familiar
12:46 MasterDuke m: use Test; is "a".parse-base\   \   (16), 10
12:46 camelia rakudo-moar d5262e: OUTPUT«ok 1 - ␤»
12:46 MasterDuke i get `Too few positionals passed; expected 2 arguments but got 1`
12:46 MasterDuke better for roast?
12:50 jnthn Yes :)
12:59 MasterDuke jnthn: `unspace can recurse`, is that a sufficient and correct test description?
13:04 jnthn Yeah, I'd say so
13:09 Geth ¦ roast: cf59588ddb | (Daniel Green)++ | S02-lexical-conventions/unspace.t
13:09 Geth ¦ roast: Add a test that unspace can recurse
13:09 Geth ¦ roast:
13:09 Geth ¦ roast: Some discussion a little before and after here:
13:09 Geth ¦ roast: https://irclog.perlgeek.de/perl6-dev/2017-02-04#i_14042069
13:09 Geth ¦ roast: review: https://github.com/perl6/roast/commit/cf59588ddb
13:10 pyrimidine joined #perl6-dev
13:46 pyrimidine joined #perl6-dev
14:13 KDr2 joined #perl6-dev
14:47 pyrimidine joined #perl6-dev
15:11 jnthn https://rt.perl.org/Ticket/Display.html?id=130716 ended up with a meaty answer, fwiw
15:13 jnthn away for a bit
15:17 pyrimidine joined #perl6-dev
15:25 dogbert17 MasterDuke: as jnthn wrote, it pops up when I run spectest with HARNESS_TYPE=6.
15:31 dogbert17 jnthn, timotimo: does the following gist give any clues wrt the spectest failure (HARNESS_TYPE=6)? https://gist.github.com/dogbert17/069bf4c7614f5467850370e3a1a9293a
15:52 timotimo doesn't ring a bell
16:19 pyrimidine joined #perl6-dev
16:27 Geth ¦ roast: 1d5e4c25aa | (Daniel Green)++ | S02-lexical-conventions/unspace.t
16:27 Geth ¦ roast: Whoops, add missing semi-colon
16:27 Geth ¦ roast: review: https://github.com/perl6/roast/commit/1d5e4c25aa
16:35 robertle joined #perl6-dev
16:45 pyrimidine joined #perl6-dev
16:48 pyrimidine joined #perl6-dev
16:57 pyrimidine joined #perl6-dev
17:01 brokenchicken .ask [Coke] BTW is it just a typo on this grant approval page that it says "Test2 Manual" http://news.perlfoundation.org/2017/01/january-2017-grant-votes.html ? I just thought... what if that vote was actually for Test2 Manual
17:01 yoleaux2 brokenchicken: I'll pass your message to [Coke].
17:01 brokenchicken Which is done by someone else for Perl 5's Test2
17:12 IOninja :)
17:14 MasterDuke oooh, should we expect some IO+line coverage related commits soon?
17:40 IOninja In 3-5 weeks.
17:42 Geth ¦ rakudo: jonathanstowe++ created pull request #1012: Sort the binaries by version
17:42 Geth ¦ rakudo: review: https://github.com/rakudo/rakudo/pull/1012
17:51 RabidGravy that had me scratching my head for a few minutes
17:53 RabidGravy there's still the possibility that the script  might get the wrong version of the module but I think that's least surprising
17:55 IOninja Kinda overelaborate code... .sort(-> $a { $a<ver> }).reverse[0] -> .sort(*<ver>).[*-1]
17:58 RabidGravy right
17:59 pyrimidine joined #perl6-dev
18:01 RabidGravy amended thusly
18:01 IOninja RabidGravy++
18:01 IOninja I know nothing of that area of the code, so I'll wait for someone who does to review and merge :)
18:06 TimToady jnthn: putting $*W into the braid worked okay for nqp, but for rakudo turned into a complete mess, so that's gonna stay out for now
18:06 TimToady there are just too many routines that have no access to the current cursor
18:11 TimToady though I suppose some of them could still get at it through some node or other
18:12 TimToady but it was getting awful cluttery, so it needs a bit of a rethink on how to access world from anywhere if we eventually go that route
18:24 timotimo maybe eliminating half the lookups via $*W would already help performance a bit?
18:25 TimToady there are a lot of routines that could benefit from my $W := $*W, though why do that when we should fix the dynvar cache?
18:27 TimToady not to mention, the compiler should eventually figure out if a routine has multiple refs to the same dynvar as cache its own copy
18:27 TimToady *and cache
18:30 TimToady I mean, that's another possible cache approach, just automatically cache a dynvar in the lexpad of where its used such that multiple uses in this lexpad or in calls further down find this one instead of using up precious frame cache
18:31 TimToady though, again, with this scheme we'd probably have to outlaw rebinding of dynvars
18:31 agentzh joined #perl6-dev
18:31 TimToady (or invalidate the cache on a rebind, anyway)
18:34 TimToady I'm guessing we've been lucky not to have been bitten by that in nqp, where we can only rebind...and we just kind of assume that the dynvar cache will catch up at some point
18:35 TimToady it's rebinding from deep down that is dangerous, and we avoid that currently by making %*LANG its own namespace
18:44 pyrimidine joined #perl6-dev
18:49 pyrimidi_ joined #perl6-dev
18:51 TimToady in other words, %*LANG gets away with it by passing itself around as a container
18:53 agentzh joined #perl6-dev
18:56 jnthn TimToady: Rebinds work OK wiht the current cache, because we cache the pointer to the register where the lexical is stored
18:57 jnthn TimToady: So we hold it an extra level of indirection off from the bound value, to rebinds work OK
18:57 jnthn We'd be in bother with various things if not :)
18:57 jnthn OK on leaving $*W out for now
18:57 TimToady okay, thanks for the clarification
18:58 TimToady we could presumably do something similar if we cached in the lexpad of a dynvar user at compile time
19:00 TimToady then you could force a shallower level of caching just by mentioning a dynvar
19:00 TimToady and a routine would automatically share all its refs to $*W
19:01 TimToady and the frame cache could be reserved for situations where the lexpad cache doesn't help
19:05 TimToady so basically the compiler would throw in a my $*FOO := CALLERS::<$*FOO> at the top of such a routine, only with the extra indirection beyond := (if that's possible)
19:10 TimToady (wouldn't need the indirection for SSAish (SSBish?) dynvars, if we ever get 'em)
19:49 jnthn I suspect most folks call what we call binding assignment.
19:50 jnthn I'm just a tad uneasy about the extra declaration in so far as it'll probably be introspectable...and yeah, how to handle the LoI
19:50 jnthn It does make neat use of lexical storage though
19:50 jnthn And pre-allocates the space
19:51 pyrimidine joined #perl6-dev
19:54 MasterDuke .ask lizmat given your recent work with .tail(), are there any circumstances where it isn't faster than [*-1]? if not, should we replace all [*-1] in the settings with .tail()?
19:54 yoleaux2 MasterDuke: I'll pass your message to lizmat.
19:58 jnthn MasterDuke: Be careful of the small semantic difference when doing so (of course, cases where it's [*-1]:delete or so are clear, but indexing will cache a Seq, while .tail I believe will not)
19:58 jnthn (That may mean .tail is a memory improvement in some of those places)
19:59 jnthn Which is double reason to do it where we can
19:59 MasterDuke jnthn: is that the only difference?
20:00 jnthn I think there's also a difference when the thing is empty
20:00 jnthn m: dd (gather {}).tail
20:00 camelia rakudo-moar d5262e: OUTPUT«Nil␤»
20:00 jnthn m: dd (gather {})[*-1]
20:00 camelia rakudo-moar d5262e: OUTPUT«Failure.new(exception => X::OutOfRange.new(what => "Effective index", got => -1, range => "0..^Inf", comment => Any), backtrace => Backtrace.new)␤»
20:01 jnthn m: my @a = 1,2,3; @a[*-1] = 42; say @a
20:01 camelia rakudo-moar d5262e: OUTPUT«[1 2 42]␤»
20:01 jnthn m: my @a = 1,2,3; @a.tail = 42; say @a
20:01 camelia rakudo-moar d5262e: OUTPUT«[1 2 42]␤»
20:01 jnthn Seems those two work out the same.
20:01 * dogbert17 thinks he knows why './perl6-m -Ilib t/harness6 --fudge --tests-from-file=t/spectest.data' fails on his machine
20:01 jnthn m: my @a = 1,2,3; @a.head = 42; say @a
20:01 camelia rakudo-moar d5262e: OUTPUT«[42 2 3]␤»
20:01 jnthn Good that's consistent at least :)
20:02 jnthn m: my @a = 1,2,3; @a.head(2) = 42, 43; say @a
20:02 camelia rakudo-moar d5262e: OUTPUT«Cannot modify an immutable Seq␤  in block <unit> at <tmp> line 1␤␤»
20:02 jnthn m: my @a = 1,2,3; @a.head(2).list = 42, 43; say @a
20:02 camelia rakudo-moar d5262e: OUTPUT«[42 43 3]␤»
20:02 jnthn m: my @a = 1,2,3; @a.tail(2).list = 42, 43; say @a
20:02 camelia rakudo-moar d5262e: OUTPUT«[1 42 43]␤»
20:02 jnthn All looks fine :)
20:02 MasterDuke cool
20:03 jnthn Can't think of anything else :)
20:03 AlexDaniel joined #perl6-dev
20:03 MasterDuke there are only ~12 instances of *-1 in the setting anyway, should be easy to test
20:04 jnthn :)
20:04 dogbert17 .oO (spam warning)
20:04 dogbert17 [pid 26813] socketpair(PF_LOCAL, SOCK_STREAM|SOCK_CLOEXEC, 0, [1021, 1022]) = 0
20:04 dogbert17 [pid 26813] pipe2(0xb5036b18, O_CLOEXEC) = -1 EMFILE (Too many open files)
20:04 dogbert17 [pid 26813] close(1021)                 = 0
20:04 dogbert17 [pid 26813] close(1022)                 = 0
20:04 dogbert17 [pid 26813] write(2, "moar: 3rdparty/libuv/src/unix/st"..., 111) = 111
20:04 dogbert17 [pid 26813] mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7250000
20:04 dogbert17 [pid 26813] rt_sigprocmask(SIG_UNBLOCK, [ABRT], NULL, 8) = 0
20:04 dogbert17 [pid 26813] tgkill(24455, 26813, SIGABRT) = 0
20:04 dogbert17 [pid 26813] --- SIGABRT {si_signo=SIGABRT, si_code=SI_TKILL, si_pid=24455, si_uid=1000} ---
20:04 dogbert17 [pid 26813] +++ killed by SIGABRT +++
20:05 jnthn Think the second line is the money shot... :)
20:05 jnthn Wonder if we're failing to close something somewhere :)
20:05 jnthn That's useful info, anyways
20:05 jnthn dogbert17++
20:06 dogbert17 did you see my gist above?
20:06 dogbert17 might possibly contain more clues
20:07 jnthn Yes, I was a bit confused by it
20:07 jnthn Because it looks like it's synchronously reading a pipe
20:07 jnthn But I thought TAP::Harness used Proc::Async everywhere
20:08 jnthn So will have to dig a bit deeper into that
20:10 agentzh joined #perl6-dev
20:10 jnthn oops, forgot something for lunch tomorrow
20:11 jnthn grocery hunting &
20:11 timotimo we're also clearly not passing on the EMFILE error
20:12 timotimo or does it immediately fail thereafter with that assertion and we can't get our foot in between those events?
20:14 dogbert17 it looks like this on stdout:
20:14 dogbert17 t/spec/S32-num/unpolar.t .......................................... ok
20:14 dogbert17 moar: 3rdparty/libuv/src/unix/stream.c:1499: uv_read_start: Assertion `((stream)->io_watcher.fd) >= 0' failed.
20:14 dogbert17 Aborted
20:16 MasterDuke timotimo: there have been several libuv releases since the version we're using, maybe upgrading that would help?
20:18 timotimo could help, but too many open files is a problem that you can't fix just by updating your library :)
20:22 MasterDuke maybe version n+1 comes with a small gremlin to count your open files and close some when it thinks you have too many? could have sworn i saw that in the changelog
20:24 timotimo haha
20:25 * MasterDuke eyes his coffee. could it be too good/strong? is that even a thing?
20:44 pyrimidine joined #perl6-dev
20:49 dogbert17 looking at /proc/$PID/fd it seems as if the number of open sockets grows larger the longer the spectest continues
20:50 dogbert17 the seem to be opened like this (spam warning)
20:50 dogbert17 ==31826== Open AF_UNIX socket 27: <unknown>
20:50 dogbert17 ==31826==    at 0x45D6A47: socketpair (socket.S:63)
20:50 dogbert17 ==31826==    by 0x42004AD: uv__make_socketpair (process.c:122)
20:50 pyrimidine joined #perl6-dev
20:50 dogbert17 ==31826==    by 0x4200719: uv__process_init_stdio (process.c:203)
20:50 dogbert17 ==31826==    by 0x4200E66: uv_spawn (process.c:428)
20:50 dogbert17 ==31826==    by 0x4137A0C: MVM_proc_spawn (procops.c:309)
20:50 dogbert17 ==31826==    by 0x40EB403: MVM_interp_run (interp.c:3821)
20:50 dogbert17 ==31826==    by 0x410C6DC: start_thread (threads.c:77)
20:50 dogbert17 ==31826==    by 0x4206895: uv__thread_start (thread.c:49)
20:50 dogbert17 ==31826==    by 0x46E4F71: start_thread (pthread_create.c:312)
20:50 dogbert17 ==31826==    by 0x45D4F8D: clone (clone.S:129)
21:00 geekosaur something to keep in mind: "socketpair" is BSDese for "pipe"
21:01 dogbert17 geekosaur: thx, didn't know that
21:10 timotimo hm, so we spawn all the processes and we never close their shit?
21:12 Geth ¦ rakudo: MasterDuke17++ created pull request #1013: Don't constant fold x op when the result is big
21:12 Geth ¦ rakudo: review: https://github.com/rakudo/rakudo/pull/1013
21:13 MasterDuke with that PR, `my str $a = "a" x 2**29; say $a.chars` goes from 9s to 0.14s for me
21:16 RabidGravy cool
21:19 MasterDuke heh, and max rss (according to time -v) went from 1116364 to 67576
21:21 timotimo maybe someone needs to .slurp-rest(:close) :P
21:23 MasterDuke timotimo++
21:23 MasterDuke afk again
21:24 Ven joined #perl6-dev
21:27 timotimo just kidding, though
21:28 timotimo if that were the case, failing tests wouldn't be noticed, or do we just rely on tap parsing for that?
21:28 Geth ¦ rakudo: AlexDaniel++ created pull request #1014: Better error message for invalid “return” trait mod
21:28 Geth ¦ rakudo: review: https://github.com/rakudo/rakudo/pull/1014
21:29 AlexDaniel oh. That's very nice of you, Geth
21:33 agentzh joined #perl6-dev
21:42 dogbert17 dogbert@dogbert-VirtualBox ~/repos/rakudo $ ls -l /proc/32112/fd/ | wc -l
21:42 dogbert17 1022  [seconds before it aborts]
21:45 pyrimidine joined #perl6-dev
21:46 timotimo hahaha
21:50 IOninja AlexDaniel: did you run spectest?
21:50 AlexDaniel IOninja: yes. Is there something wrong with it?
21:51 Geth ¦ rakudo/nom: acae345d73 | (Aleks-Daniel Jakimenko-Aleksejev)++ | src/Perl6/Grammar.nqp
21:51 Geth ¦ rakudo/nom: Better error message for invalid “return” trait mod
21:51 Geth ¦ rakudo/nom:
21:51 Geth ¦ rakudo/nom: Previously it either complained about a missing block or spewed some
21:51 Geth ¦ rakudo/nom: internal gibberish. Now it suggests “returns”.
21:51 Geth ¦ rakudo/nom:
21:51 Geth ¦ rakudo/nom: Resolves RT #130712
21:51 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=130712
21:51 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/acae345d73
21:51 Geth ¦ rakudo/nom: 661a1b3bb2 | (Zoffix Znet)++ | src/Perl6/Grammar.nqp
21:51 Geth ¦ rakudo/nom: Merge pull request #1014 from AlexDaniel/lta-returns
21:51 Geth ¦ rakudo/nom:
21:51 Geth ¦ rakudo/nom: Better error message for invalid “return” trait mod
21:51 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/661a1b3bb2
21:51 IOninja AlexDaniel: just wasn't sure whether `return` option would start matching anything that isn't even a trait mod
21:54 AlexDaniel to be honest I'm surprised that trait mods are parsed this way
21:54 AlexDaniel m: my $x returns Nil;
21:54 camelia rakudo-moar d5262e: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Cannot resolve caller trait_mod:<returns>(Variable, Nil); none of these signatures match:␤    (Routine:D $target, Mu:U $type)␤at <tmp>:1␤»
21:54 Geth ¦ rakudo/nom: 8878af83fe | (Daniel Green)++ | src/Perl6/Optimizer.nqp
21:54 Geth ¦ rakudo/nom: Don't constant fold x op when the result is big
21:54 Geth ¦ rakudo/nom:
21:54 Geth ¦ rakudo/nom: If the resulting string is very large, it can take a long time to encode
21:54 Geth ¦ rakudo/nom: it on the string heap and then decode it when needed.
21:54 Geth ¦ rakudo/nom:
21:54 Geth ¦ rakudo/nom: Some discussions:
21:54 Geth ¦ rakudo/nom: https://irclog.perlgeek.de/perl6/2017-02-04#i_14040978
21:54 Geth ¦ rakudo/nom: https://irclog.perlgeek.de/perl6/2017-02-04#i_14042387
21:54 Geth ¦ rakudo/nom:
21:54 Geth ¦ rakudo/nom: Fixes RT #127972, https://rt.perl.org/Public/Bug/Display.html?id=127972
21:54 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=127972
21:54 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/8878af83fe
21:54 Geth ¦ rakudo/nom: cea6a93990 | (Zoffix Znet)++ | src/Perl6/Optimizer.nqp
21:54 Geth ¦ rakudo/nom: Merge pull request #1013 from MasterDuke17/dont_constant_fold_infix_x_when_result_is_big
21:54 Geth ¦ rakudo/nom:
21:54 Geth ¦ rakudo/nom: Don't constant fold x op when the result is big
21:54 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/cea6a93990
21:55 AlexDaniel note that in the snippet above it generally accepts it, but blows up later
22:01 raiph joined #perl6-dev
22:04 raiph .ask samcv Have you read https://github.com/apple/swift/blob/master/docs/StringManifesto.md?
22:04 yoleaux2 raiph: I'll pass your message to samcv.
22:36 agentzh joined #perl6-dev
22:50 pyrimidine joined #perl6-dev
23:07 Geth ¦ rakudo: MasterDuke17++ created pull request #1015: Convert [*-1] to the faster .tail
23:07 Geth ¦ rakudo: review: https://github.com/rakudo/rakudo/pull/1015
23:19 pyrimidine joined #perl6-dev
23:22 lizmat joined #perl6-dev
23:39 Geth ¦ rakudo/nom: ed4ef3b582 | (Daniel Green)++ | 5 files
23:39 Geth ¦ rakudo/nom: Convert [*-1] to the faster .tail
23:39 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ed4ef3b582
23:39 Geth ¦ rakudo/nom: f325eebcd9 | (Zoffix Znet)++ | 5 files
23:39 Geth ¦ rakudo/nom: Merge pull request #1015 from MasterDuke17/replace_whatever-1_with_tail
23:39 Geth ¦ rakudo/nom:
23:39 Geth ¦ rakudo/nom: Convert [*-1] to the faster .tail
23:39 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/f325eebcd9
23:51 ugjka joined #perl6-dev

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