Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6-dev, 2016-07-17

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

All times shown according to UTC.

Time Nick Message
00:03 travis-ci joined #perl6-dev
00:03 travis-ci Rakudo build passed. Elizabeth Mattijsen 'Make Str.rindex about 30% faster
00:03 travis-ci https://travis-ci.org/rakudo/rakudo/builds/145277854 https://github.com/rakudo/rakudo/compare/fd1be327fe52...fcfe3c04ed47
00:03 travis-ci left #perl6-dev
00:10 gfldex I used to work for a former subsidiary for Lufthansa and we had one gentleman who was still working for Lufthansa proper as a manager. He used to carry the name Süß but after having to travel a lot to northern america he changed his name to Suess. At times he was even on lists because of his uncomputable name.
00:11 gfldex s/was/wasn't/
00:24 gfldex m: say "in Massen".fc ~~ "in Maßen".fc
00:24 camelia rakudo-moar 980f49: OUTPUT«True␤»
00:24 gfldex :-/
00:25 gfldex that means that "a lot" is the same as "in moderation"
00:26 Zoffix $ perl -wlE 'say fc "in Massen" eq fc "in Maßen" ? "Yeah" : "Nope"'
00:26 Zoffix Nope
00:26 Zoffix m: "ß".fc.say
00:26 camelia rakudo-moar 980f49: OUTPUT«ss␤»
00:26 Zoffix m: "ß".fc.uninames.say
00:26 camelia rakudo-moar 980f49: OUTPUT«(LATIN SMALL LETTER S LATIN SMALL LETTER S)␤»
00:27 Zoffix Oh, nm, I forgot use utf8 in Perl 5. It also says the two are equal.
00:28 gfldex that means it's wrong in Perl 5 in the same way
00:29 gfldex that also means that for german texts you have to scan for ß and special case it
00:30 Zoffix m: say "in Massen".fc ~~ "in Maẞen".fc
00:30 camelia rakudo-moar 980f49: OUTPUT«True␤»
00:36 gfldex m: say "ẞ".uninames.say
00:36 camelia rakudo-moar 980f49: OUTPUT«(LATIN CAPITAL LETTER SHARP S)␤True␤»
00:36 travis-ci joined #perl6-dev
00:36 travis-ci Rakudo build passed. Zoffix Znet '.polymod with a lazy list must not lose mods if the list runs out
00:36 travis-ci https://travis-ci.org/rakudo/rakudo/builds/145282087 https://github.com/rakudo/rakudo/compare/fcfe3c04ed47...980f496fa8be
00:36 travis-ci left #perl6-dev
00:36 Zoffix shush
00:37 gfldex m: say "ẞ".uninames.say # called "Versaleszetts" in german
00:37 camelia rakudo-moar 980f49: OUTPUT«(LATIN CAPITAL LETTER SHARP S)␤True␤»
00:38 gfldex m: say "Haßloch".fc
00:38 camelia rakudo-moar 980f49: OUTPUT«hassloch␤»
00:38 gfldex context: https://de.wikipedia.org/wiki/Ha%C3%9Floch
00:39 gfldex i wouldn't want to live in hatehole
00:42 Zoffix Jesus swift's docs are shit
00:42 Zoffix Can't find a list of methods on a String
00:45 Zoffix (╯°□°)╯︵ ┻━┻
00:45 Zoffix Wanted to see what it gives for "in Massen".fc ~~ "in Maẞen".fc but I can't even find a .foldcaseString method
00:47 gfldex Zoffix: maybe https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toLocaleLowerCase
01:08 Zoffix Well, there's stringByFoldingWithOptions but I've no idea how to use it.
01:09 Zoffix And I can't even find one working example of swift code.... Either that or https://glot.io/new/swift is busted.
01:09 * Zoffix chucks Swift into "annoying languages" bin
01:09 Zoffix .uppercaseString ~_~ who thought of such a verbose name
01:20 Zoffix So basically "in Massen".fc ~~ "in Maẞen".fc => True makes sense. Since it erases case, there's no little s or big S, there's no case so both of them are the same
01:21 Zoffix m: dd 'ß'.fc, 'ẞ'.fc, 'SS'.fc, 'ss'.fc
01:21 camelia rakudo-moar 980f49: OUTPUT«"ss"␤"ss"␤"ss"␤"ss"␤»
01:22 Zoffix m: say so 'assen' ~~ 'aẞen'
01:22 camelia rakudo-moar 980f49: OUTPUT«False␤»
01:22 Zoffix m: say so 'assen' ~~ 'aẞen'.fc
01:22 camelia rakudo-moar 980f49: OUTPUT«True␤»
01:31 FROGGS_ joined #perl6-dev
02:19 Zoffix m: say 2.Rat.polymod: 0
02:19 camelia rakudo-moar 980f49: OUTPUT«Attempt to divide 2 by zero using polymod␤  in any  at /home/camelia/rakudo-m-inst-2/share/perl6/runtime/CORE.setting.moarvm line 1␤  in block <unit> at <tmp> line 1␤␤»
02:23 dalek rakudo/nom: 7976fe9 | (Zoffix Znet)++ | src/core/ (2 files):
02:23 dalek rakudo/nom: .polymod with zero divisor must not reference guts in error
02:23 dalek rakudo/nom:
02:23 dalek rakudo/nom: Fixes RT#128646
02:23 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/7976fe96d6
02:23 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=128646
02:23 dalek roast: c61b572 | (Zoffix Znet)++ | S32-num/polymod.t:
02:23 dalek roast: .polymod with zero divisor does not reference guts in error
02:23 dalek roast:
02:23 dalek roast: RT#128646
02:23 dalek roast: review: https://github.com/perl6/roast/commit/c61b572e10
02:23 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=128646
04:01 skids joined #perl6-dev
05:01 [Tux] joined #perl6-dev
05:56 stmuk_ joined #perl6-dev
06:43 stmuk joined #perl6-dev
07:59 AlexDaniel joined #perl6-dev
08:00 tomboy64 joined #perl6-dev
10:04 RabidGravy joined #perl6-dev
10:22 lizmat bisectable: good=2015.12 bad=HEAD my int $i = 10; say Buf.new($i +& 0xFF)
10:22 bisectable lizmat: No build for 'bad' revision
10:23 lizmat bisectable: good=2015.12 bad=b06a99ebdd79393ce109cc214a6019ada5a0218a my int $i = 10; say Buf.new($i +& 0xFF)
10:23 bisectable lizmat: bisect log: https://gist.github.com/c8804ae8cbbe7200f73542cfd72517d0
10:23 bisectable lizmat: (2016-07-11) https://github.com/rakudo/rakudo/commit/de5d9e7
10:23 lizmat ok, so what's weird about this is that the error message actually states:
10:23 lizmat "expected uint8 but got Int"
10:25 lizmat which means that this:
10:25 lizmat m: use nqp; say nqp::istype(uint8,Int)
10:25 camelia rakudo-moar 7976fe: OUTPUT«1␤»
10:25 lizmat returned 0 instead of 1
10:38 psch m: for &infix:<+&>.candidates -> $cand { try say Buf.new($cand(my int $ = 10, 255)).WHAT if \(my int $, 0) ~~ $cand.signature }
10:38 camelia rakudo-moar 7976fe: OUTPUT«(Buf)␤(Buf)␤(Buf)␤»
10:38 psch m: for &infix:<+&>.candidates -> $cand { try say Buf.new($cand(my int $ = 10, 255)) if \(my int $, 0) ~~ $cand.signature }
10:38 camelia rakudo-moar 7976fe: OUTPUT«Buf:0x<0a>␤Buf:0x<0a>␤Buf:0x<0a>␤»
10:39 psch oh, that just sinks the 255 'cause the my gobbles it i think
10:39 psch m: for &infix:<+&>.candidates -> $cand { try say Buf.new($cand((my int $ = 10), 255)) if \(my int $, 0) ~~ $cand.signature }
10:39 camelia rakudo-moar 7976fe: OUTPUT«Buf:0x<0a>␤Buf:0x<0a>␤Buf:0x<0a>␤»
10:39 psch hm, maybe not.  i don't get it :S
10:40 psch i guess it could use a different candidate for infix:<+&> for some reason..?
10:40 nine lizmat: $i +& 0xFF returns an Int, even if both arguments are ints
10:41 lizmat yes, which *should* make nqp::istype($a,Int) return a 1, instead of a 0
10:42 lizmat so, this is something *really* weird
10:58 Ven joined #perl6-dev
13:17 Zoffix__ joined #perl6-dev
14:23 dalek star: 69c56ad | (Steve Mynott)++ | docs/announce/2016.07.md:
14:23 dalek star: roll in some of the rakudo changelog from 2016.07
14:23 dalek star: review: https://github.com/rakudo/star/commit/69c56ad3b0
14:24 timotimo we still have "none-multi's" in there
14:27 dalek star: 9c3b904 | (Steve Mynott)++ | docs/announce/2016.07.md:
14:27 dalek star: tweak formating
14:27 dalek star: review: https://github.com/rakudo/star/commit/9c3b904030
14:31 dalek star: 52be35f | (Steve Mynott)++ | modules/ (10 files):
14:31 dalek star: bump submodule versions
14:31 dalek star: review: https://github.com/rakudo/star/commit/52be35f152
14:42 dalek rakudo/nom: c889250 | (Zoffix Znet)++ | docs/ChangeLog:
14:42 dalek rakudo/nom: Fix typo
14:42 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/c889250975
14:43 Zoffix timotimo, I saw you mentioning it in #perl6, which made no sense: http://irclog.perlgeek.de/perl6/2016-07-15#i_12847397
14:43 Zoffix I didn't even realize you were talking about the Rakudo's ChangeLog
14:56 [TuxCM] joined #perl6-dev
14:56 dalek star: a2e2f2c | (Steve Mynott)++ | docs/announce/2016.07.md:
14:56 dalek star: changelog for submodules
14:56 dalek star: review: https://github.com/rakudo/star/commit/a2e2f2c038
14:59 Zoffix Does anyone know the story of why diag() prints to STDERR? It does so in Perl 5 too, but I'm reading https://testanything.org/tap-specification.html and it has no mention of STDERR and in fact, states "A harness must only read TAP output from standard output and not from standard error."
15:00 dalek rakudo/nom: 20a648a | niner++ | src/core/CompUnit/PrecompilationRepository.pm:
15:00 dalek rakudo/nom: Don't die generating a debug message if source file is unavailable
15:00 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/20a648aff7
15:00 dalek rakudo/nom: d1604b5 | niner++ | tools/build/install-core-dist.pl:
15:00 dalek rakudo/nom: Fix make DESTDIR not finding CompUnit::Repository::Staging
15:00 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d1604b5c8e
15:05 nine Zoffix: maybe diag() is not considered TAP?
15:06 nine Zoffix: it's purpose is to communicate something to the user after all and not to the harness
15:06 Zoffix Ah
15:06 mst exactly what I just said when he cross-spammed the question to #perl
15:06 Zoffix Sorry
15:06 mst in this case, I think getting the same answer twice is no bad thing
15:07 mst note also that #perl-qa is the best channel for this sort of question, followed by #toolchain
15:08 dalek star: e9effe0 | (Steve Mynott)++ | / (3 files):
15:08 dalek star: bump to 2016.07
15:08 dalek star: review: https://github.com/rakudo/star/commit/e9effe098f
15:10 nine If packagers notice an issue with the Staging repo, please advise them to include commit d1604b5c8e
15:14 dalek star: 90934e5 | (Steve Mynott)++ | tools/star/Makefile:
15:14 dalek star: bump rakudo, nqp and moarvm versions to 2016.07
15:14 dalek star: review: https://github.com/rakudo/star/commit/90934e55ce
15:30 [TuxCM] This is Rakudo version 2016.07-11-gd1604b5 built on MoarVM version 2016.07
15:30 [TuxCM] test            15.184
15:30 [TuxCM] test-t           8.047
15:30 [TuxCM] csv-parser      16.043
15:30 [TuxCM] 8.NUL!
15:32 [TuxCM] FWIW CSV::Parser also went down from 35 in May to 16 today
15:32 [TuxCM] Well done!
15:33 Zoffix :o
15:40 dalek star: b1629bf | (Steve Mynott)++ | .gitmodules:
15:40 dalek star: use same lpw-simple upstream as panda with recent test fix
15:40 dalek star: review: https://github.com/rakudo/star/commit/b1629bf789
15:46 dalek star: e93c762 | (Steve Mynott)++ | modules/perl6-lwp-simple:
15:46 dalek star: correct commit sha for new upstream lwp-simple
15:46 dalek star: review: https://github.com/rakudo/star/commit/e93c762bb0
16:11 dalek rakudo/nom: 9d0055c | (Zoffix Znet)++ | / (3 files):
16:11 dalek rakudo/nom: Do not lose diag()'s output at start of test file or during TODO tests
16:11 dalek rakudo/nom:
16:11 dalek rakudo/nom: diag() is internally used for many types of messages, including TODO test
16:11 dalek rakudo/nom: outputs. It uses todo and test run counts to decide whether to place output
16:11 dalek rakudo/nom: into STDOUT or STDERR. This creates a problem when diag() is explicitly used
16:11 dalek rakudo/nom: by a module's user at the start of the test files or in the middle of a set
16:11 dalek rakudo/nom: of TODO runs.
16:11 dalek rakudo/nom:
16:11 dalek rakudo/nom: To avoid that, we use an internal _diag() internally and export a diag() that
16:11 dalek rakudo/nom: will ask _diag() to always place user's messages into STDERR.
16:11 dalek rakudo/nom:
16:11 dalek rakudo/nom: Fixes RT#128098 nine++ mst++
16:11 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=128098
16:11 Zoffix https://github.com/rakudo/rakudo/commit/9d0055c
16:26 Zoffix >_< I'm dumb
16:26 dalek rakudo/nom: 480d8c0 | (Zoffix Znet)++ | / (3 files):
16:26 dalek rakudo/nom: Revert "Do not lose diag()'s output at start of test file or during TODO tests"
16:26 dalek rakudo/nom:
16:26 dalek rakudo/nom: This reverts commit 9d0055cfd27460817e2fe2b86b9fa5884a93e592.
16:26 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/480d8c0416
16:30 Ven joined #perl6-dev
16:46 RabidGravy joined #perl6-dev
16:50 Ven joined #perl6-dev
16:55 dalek rakudo/nom: 68b66c2 | (Zoffix Znet)++ | / (3 files):
16:55 dalek rakudo/nom: Unrevert "Do not lose diag()'s output at start of test file or during TODO tests""
16:55 dalek rakudo/nom:
16:55 dalek rakudo/nom: This unreverts commit 9d0055cfd27460817e2fe2b86b9fa5884a93e592 and fixes a
16:55 dalek rakudo/nom: bug in its code (incorrect precedence of conditional when assigning
16:55 dalek rakudo/nom: to $is_todo in _diag())
16:55 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/68b66c2f71
16:56 Zoffix Well, this was embarrassingly messy. :/
17:01 stmuk http://pl6anet.org/drop/rakudo-star-2016.07-RC0.tar.gz
17:06 gfldex m: (join('', "un" xx 10) ~ "revert").tc.say
17:06 camelia rakudo-moar 480d8c: OUTPUT«Ununununununununununrevert␤»
17:06 gfldex Zoffix: ^^^ Perl 6 can help you with that! :->
17:08 ugexe joined #perl6-dev
17:10 Ven joined #perl6-dev
17:29 Ven joined #perl6-dev
17:36 ugexe lizmat: https://gist.github.com/ugexe/7ce08d3ad4cfd36f275c437ba9713471 This points at the commit `Add "push-all" to sequential-map "normal"`
17:44 skids joined #perl6-dev
18:24 raiph joined #perl6-dev
18:25 psch r: sub f { loop { print $++; last } };f;f;f;f;
18:25 camelia rakudo-jvm cd19db: OUTPUT«0123»
18:25 camelia ..rakudo-moar 68b66c: OUTPUT«0000»
18:25 raiph joined #perl6-dev
18:25 psch that's #126528
18:25 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=126528
18:26 b2gills joined #perl6-dev
18:28 raiph joined #perl6-dev
18:28 psch r: sub f { loop { state $x; print $x++; last } };f;f;f;f;
18:28 camelia rakudo-jvm cd19db: OUTPUT«0123»
18:28 camelia ..rakudo-moar 68b66c: OUTPUT«0000»
18:29 Ven joined #perl6-dev
18:30 raiph left #perl6-dev
18:41 psch which looks to me like either we do state vars wrong on jvm, or the loop block doesn't get its own call frame on jvm
18:44 bartolin . o O ( or both )  # SCNR
18:45 ugexe joined #perl6-dev
18:47 psch yes, or that :)
18:48 Zoffix Isn't the JVM version the correct one?
18:48 psch Zoffix: well, if it is our Perl 6 level implementation of HYPER is wrong
18:49 Zoffix r: my $x; sub f { loop { print $x++; last } };f;f;f;f;
18:49 camelia rakudo-moar 68b66c, rakudo-jvm cd19db: OUTPUT«0123»
18:49 psch r: sub f { state $x; loop { state $y; say $x++, $y++ } };f;f;f;f
18:50 psch oh duh
18:50 psch didn't last >_>
18:50 camelia rakudo-moar 68b66c: OUTPUT«(timeout)00␤11␤22␤33␤44␤55␤66␤77␤88␤99␤1010␤1111␤1212␤1313␤1414␤1515␤1616␤1717␤1818␤1919␤2020␤2121␤2222␤2323␤2424␤2525␤2626␤2727␤2828␤2929␤3030␤3131␤3232␤3333␤3434␤3535␤3636␤3737␤3…»
18:50 camelia ..rakudo-jvm cd19db: OUTPUT«00␤11␤22␤33␤44␤55␤66␤77␤88␤99␤1010␤1111␤1212␤1313␤1414␤1515␤1616␤1717␤1818␤1919␤2020␤2121␤2222␤2323␤2424␤2525␤2626␤2727␤2828␤2929␤3030␤3131␤3232␤3333␤3434␤3535␤3636␤3737␤3838␤3939…»
18:50 psch now *that* is interesting
18:51 psch 'cause moar changes its tune when there's a state in the sub block
18:51 psch also, i hope the jvm just didn't tell us that it timed out and isn't still running :S
18:51 Zoffix m: state $x; say print $x
18:51 camelia rakudo-moar 68b66c: OUTPUT«Use of uninitialized value $x of type Any in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.  in block <unit> at <tmp> line 1␤True␤»
18:51 Zoffix m: state $x; say print $x++
18:51 camelia rakudo-moar 68b66c: OUTPUT«0True␤»
18:52 Zoffix The '0000' is wrong. state $x keeps $x around, so those ++ should keep increasing the same variable and growing its values. So JVM's version is the correct one.
18:52 Zoffix m: state $x; say $x; say $x++
18:52 camelia rakudo-moar 68b66c: OUTPUT«(Any)␤0␤»
18:53 Zoffix This kinda iffy IMO, 'cause the value ++ returns is different than the original
18:53 psch Zoffix: right, which means moar erroneously binds to the loop block instead of the sub block
18:54 Zoffix m: my $x = class {}; say $x; say $x++
18:54 camelia rakudo-moar 68b66c: OUTPUT«(<anon|63429520>)␤0␤»
18:55 psch well, i suppose that means we can retag the ticket to [moarvm] and then rewrite &HYPER
18:56 Zoffix joined #perl6-dev
18:57 psch i suppose the rewrite could limit itself to using a lexical instead of a state var in the loop in &HYPER
19:00 Zoffix .tell stmuk not sure if it affects R* release, but FYI the 2016.07 release seems to have issues with custom DESTDIR that I think are fixed in HEAD: https://rt.perl.org/Ticket/Display.html?id=128652
19:00 yoleaux2 Zoffix: I'll pass your message to stmuk.
19:02 Zoffix m: my $x = Str but role { method gist { 'speshul' } }; say $x++
19:02 camelia rakudo-moar 68b66c: OUTPUT«0␤»
19:02 Zoffix m: my $x = 0 but role { method gist { 'speshul' } }; say $x++
19:02 camelia rakudo-moar 68b66c: OUTPUT«speshul␤»
19:02 Zoffix ¯\_(ツ)_/¯ probably OK.
19:03 tadzik joined #perl6-dev
19:04 psch r: sub f { state $x; loop { state $y; say $x++, $y++; last } };f;f;f;f
19:04 camelia rakudo-jvm cd19db: OUTPUT«00␤11␤22␤33␤»
19:04 camelia ..rakudo-moar 68b66c: OUTPUT«00␤10␤20␤30␤»
19:04 psch there, i was wrong
19:04 psch not lasting obviously changes the behavior
19:05 psch because, well, we loop contiuously so none of the state vars get reset
19:05 psch i really don't know if a loop block tracks its state var seperately from the next outer
19:06 psch m: sub f { state $x; say $x++, (state $y)++ for ^1 }; f;f;f;f;
19:06 camelia rakudo-moar 68b66c: OUTPUT«00␤11␤22␤33␤»
19:06 psch r: sub f { state $x; say $x++, (state $y)++ for ^1 }; f;f;f;f;
19:06 camelia rakudo-moar 68b66c, rakudo-jvm cd19db: OUTPUT«00␤11␤22␤33␤»
19:07 Zoffix m: sub f { state $x; for ^4 { state $y; dd [$x++, $y++]; last if $_ > 2} };f;f;f;f
19:07 camelia rakudo-moar 68b66c: OUTPUT«[0, 0]␤[1, 1]␤[2, 2]␤[3, 3]␤[4, 0]␤[5, 1]␤[6, 2]␤[7, 3]␤[8, 0]␤[9, 1]␤[10, 2]␤[11, 3]␤[12, 0]␤[13, 1]␤[14, 2]␤[15, 3]␤»
19:07 psch that is clearly correct, statement mod if doesn't block scope, so yeah
19:07 psch m: sub f { state $x; g($x++) }; sub g($x) { state $y; say $x, $y++ };f;f;f;f;
19:07 camelia rakudo-moar 68b66c: OUTPUT«00␤11␤22␤33␤»
19:08 psch ...are loop block that different to new subs?
19:08 Zoffix hm?
19:08 psch Zoffix: well, my last example prints the same that the loop example does on jvm
19:09 Zoffix I'm not sure what you mean by 'clearly correct'. The output in my eval is buggy. The numbers should be increasing the same. `last` seems to re-init state
19:09 psch Zoffix: i wasn't talking about your code
19:09 Zoffix Ah. Sorry
19:09 psch Zoffix: i was talking about mine, the statement level if
19:10 Zoffix m: sub f { state $x; for ^4 { state $y; dd [$x++, $y++]; next if $_ > 2} };f;f;f;f
19:10 camelia rakudo-moar 68b66c: OUTPUT«[0, 0]␤[1, 1]␤[2, 2]␤[3, 3]␤[4, 0]␤[5, 1]␤[6, 2]␤[7, 3]␤[8, 0]␤[9, 1]␤[10, 2]␤[11, 3]␤[12, 0]␤[13, 1]␤[14, 2]␤[15, 3]␤»
19:10 psch i actually kind of want to assume moar does right
19:10 psch mostly ad authoritam, though :P
19:11 psch which is annoying, 'cause it means another icky bug on nqp-j
19:13 [Coke] joined #perl6-dev
19:13 lucs joined #perl6-dev
19:13 raydiak joined #perl6-dev
19:13 tailgate joined #perl6-dev
19:14 Zoffix I don't think we need to make any assumptions. Initialization of state happens just once. That isn't the case on MoarVM.
19:14 Zoffix Here's Perl 5's version too: $ perl -E 'sub f { state $x; for (1..4) { state $y; print $x++ . "  " . $y++ . " | "; last if $_ > 2} };f;f;f;f'
19:14 Zoffix 0  0 | 1  1 | 2  2 | 3  3 | 4  4 | 5  5 | 6  6 | 7  7 | 8  8 | 9  9 | 10  10 | 11  11 |
19:15 psch right, i was mostly complaining about exactly that assumption :)
19:15 psch *of mine
19:20 ugexe m: my $s := (^5).rotor(3, :partial).map: -> $c { slip(@$c) }; my $buf = Buf.new($s || 0); say $buf.perl # lizmat: this is the golf
19:20 camelia rakudo-moar 68b66c: OUTPUT«Buf.new(0,3,4)␤»
19:20 ugexe its always index 1 and 2
19:21 lizmat ugexe: it's really weird
19:21 ugexe seems related to rotor somehow
19:21 lizmat I'm looking at !push-list in src/core/Buf
19:21 lizmat and it's getting a BOOTInt (no .WHAT associated with that)
19:21 cognominal joined #perl6-dev
19:22 lizmat which makes the nqp::istype fail, which in turn makes it croak
19:22 lizmat now, an int +& 0xFF should create an Int, so no idea *how* it becomes a native
19:24 ugexe m: my $s := (^5).rotor(3, :partial).map: -> $c { slip(@$c) }; my $buf = Buf.new($s); say $buf.perl
19:24 camelia rakudo-moar 68b66c: OUTPUT«Buf.new(0,1,2,3,4)␤»
19:25 psch lizmat: maybe inlining?
19:25 psch i mean, it sounds like it could be from not-guarded-enough inlining
19:25 lizmat yeah, feels like that, because it's also a Heisenbug: adding debug text to infix:<+&> fixes the problem it seems  :-(
19:26 ugexe m: my $s := (^5).rotor(3, :partial).map: -> $c { slip(@$c) }; say $s.elems; my $buf = Buf.new($s || 0); say $buf.perl
19:26 camelia rakudo-moar 68b66c: OUTPUT«5␤Buf.new(0,1,2,3,4)␤»
19:27 dalek roast: 2fb0068 | usev6++ | S32-list/combinations.t:
19:27 dalek roast: Skip test on JVM that started to die recently
19:27 dalek roast: review: https://github.com/perl6/roast/commit/2fb0068ad4
19:32 lizmat ugexe: I just fixed the problem by adding an nqp::say to the +& candidate that is *not* being called  :-(
19:33 timotimo oh lord :(
19:34 ugexe m: my $s := (^5).rotor(3).map: -> $c { slip(@$c) }; say $s.elems; my $buf = Buf.new($s || 0); say $buf.perl
19:34 camelia rakudo-moar 68b66c: OUTPUT«3␤Buf.new(0,1,2)␤»
19:34 ugexe m: my $s := (^5).rotor(3).map: -> $c { slip(@$c) }; my $buf = Buf.new($s || 0); say $buf.perl # oops
19:34 camelia rakudo-moar 68b66c: OUTPUT«Buf.new(0)␤»
19:34 lizmat ugexe: I'm focusing on:
19:34 lizmat m: my int $i = 10; say Buf.new($i +& 0xFF)
19:34 camelia rakudo-moar 68b66c: OUTPUT«Type check failed in initializing element #0 to Buf; expected uint8 but got Int (10)␤  in any  at gen/moar/m-Metamodel.nqp line 1736␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in any  at gen/moar/m-Metamodel.nqp line 3055␤  in any…»
19:36 lizmat j: my int $i = 10; say Buf.new($i +& 0xFF)
19:36 camelia rakudo-jvm cd19db: OUTPUT«Type check failed in initializing element #0 to Buf; expected uint8 but got Int (10)␤  in any  at gen/jvm/Metamodel.nqp line 1725␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in any  at gen/jvm/Metamodel.nqp line 3044␤  in any  at ge…»
19:36 lizmat hmmm... so it is actually consistent across backends!
19:46 lizmat I'm starting to feel this is something related to the method caching algorithm
19:47 lizmat somehow confusing (Int:D \a, Int:D \b) with (int $a, int $b)
19:47 ugexe lizmat: when I first ran into this I manually iterated through commits and got the method caching commit from around the same time
19:48 lizmat if I remove the infix:<+&>( int $a, int $b ) candidate altogether, it's ok  :-(
19:51 dalek roast: a1c52ba | usev6++ | S04-phasers/in-loop.t:
19:51 dalek roast: Add test for RT #126001
19:51 dalek roast: review: https://github.com/perl6/roast/commit/a1c52bacd3
19:51 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=126001
19:57 AlexDaniel joined #perl6-dev
19:57 ugexe my int $i = 10; say Buf.new($i +& 0xFF) works with --optimize=0 or 1
19:58 timotimo that's a good tip. so maybe it's compile-time-deciding what candidate to use for +& there?
20:00 lizmat the profile for the above code is bizarre
20:01 lizmat ugexe++
20:02 ugexe fwiw https://gist.github.com/ugexe/baa168a641894a0731595c812724f76d (after-after.pm6) would "always fails first time after `rm -rf lib/.precomp` with a segfault but always passes all subsequent runs"
20:17 lizmat ok, it's definitely some kind of mixup between candidates
20:17 lizmat if I add an nqp::null to the int/int candidate, all is fine
20:18 lizmat if I add a "nqp::say("foo") to the Int:D/Int:D candidate, it does *not* get executed, and I get the error
20:18 dalek roast: 47b646c | (Zoffix Znet)++ | S24-testing/line-numbers.t:
20:18 dalek roast: Use `like` instead of ok() with smartmatch
20:18 dalek roast: review: https://github.com/perl6/roast/commit/47b646c587
20:18 lizmat so it looks like it is calling the int/int candidate with incorrect parameters
20:18 timotimo i wonder if the thing you're adding is preventing the static optimizer from setting the inline info on the sub?
20:19 lizmat could well be
20:20 lizmat I mean, an nqp::null in sink context... what could it do? :-)
20:20 timotimo hm, we should be able to grab the node attribute out of the qast when we do the "add inline info" and build a little "report" about all the things that do get inline info
20:20 lizmat timotimo: how?
20:21 lizmat another way to fix the issue, is to add an .Int to the result of the nqp::bitand_i in the int/int candidate
20:21 lizmat so at least it gets the right type of return value (for this case)
20:22 timotimo well, we should be able to just print out "code object named 'foobar' on line 1234 got inline info" or "failed to make inline info for reason $foo" and parse that with a tiny script
20:23 lizmat m: say Buf.new(12354352413543265165462154654261546573625765389836927693761897681768271768726187623876876812763876128366524165465241 +& 0xFF)
20:23 camelia rakudo-moar 68b66c: OUTPUT«Buf:0x<99>␤»
20:23 lizmat m: say Buf.new(1235435241354326516546215465426154657362576538983692769376189768176827176872618762387687302909283098210983209820139803126812763876128366524165465241 +& 0xFF)
20:24 camelia rakudo-moar 68b66c: OUTPUT«Buf:0x<99>␤»
20:24 lizmat always 0x99, seems odd ?
20:24 lizmat timotimo: ok, where do I add this debug info ?
20:25 timotimo i think the method is in Actions somewhere?
20:25 timotimo literally "add_inline_info"
20:25 timotimo actually, i think it has "try" in its name
20:25 lizmat add_inlining_info_if_possible
20:26 dalek roast: 49ef2b1 | usev6++ | S11-modules/require.t:
20:26 dalek roast: Change back to dir that contains executable
20:26 dalek roast:
20:26 dalek roast: When this testfile was run before 'make install'
20:26 dalek roast: it blowed up on rakudo-j because executable './perl6-j'
20:26 dalek roast: was not found in 't/packages/packages'. Probably
20:26 dalek roast: a precompilation process was started in that dir.
20:26 dalek roast: review: https://github.com/perl6/roast/commit/49ef2b1712
20:26 timotimo that's it
20:26 timotimo it's not straightforward to get the line number out of a node attribute, i believe
20:27 timotimo you have to go through the compiler object i think?
20:27 timotimo there's other places that should show you how it's done
20:29 Ven joined #perl6-dev
20:31 lizmat timotimo: so the plan is to actually prevent it from being inlined ?
20:31 timotimo er, maybe?
20:31 lizmat if so, that feels wrong to me, as the inlining is just exposing the bug
20:31 timotimo i'm not so sure
20:31 timotimo i thought that report thing would be a debug help
20:31 lizmat we have an Int:D/Int:D and an int/int candidate
20:32 lizmat it calls the int/int candidate with the Int:D/Int:D parameters
20:32 lizmat *that* is the issue, as far as I can see
20:32 lizmat which smells like a method cache issue
20:32 lizmat to me
20:32 timotimo but don't we generate code in that case to make it still work right?
20:32 timotimo i dunno :(
20:32 timotimo i think we used to have - or maybe still do have - trouble picking the native candidates properly in the static optimizer? i'm not sure any more what that was about :(
20:35 dalek roast: 35eaee5 | (Zoffix Znet)++ | S04-statements/for.t:
20:35 dalek roast: [TODO FUDGE] ("{$_}") inside for loop has correct value
20:35 dalek roast:
20:35 dalek roast: RT#128054
20:35 dalek roast: review: https://github.com/perl6/roast/commit/35eaee507f
20:35 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=128054
20:40 timotimo my suggestions may be absolutely useless :|
20:55 tbrowder left #perl6-dev
21:13 lizmat fwiw, RT #128655
21:13 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=128655
21:15 dalek rakudo/nom: 242baf2 | lizmat++ | src/core/Int.pm:
21:15 dalek rakudo/nom: Temporary fix for RT #128655
21:15 dalek rakudo/nom:
21:15 dalek rakudo/nom: By removing the int/int candidates for now, we can at least ensure
21:15 dalek rakudo/nom: correct functionality.
21:15 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=128655
21:15 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/242baf256a
21:19 RabidGravy joined #perl6-dev
21:23 raiph joined #perl6-dev
21:28 dalek roast: e0330b7 | lizmat++ | S03-operators/buf.t:
21:28 dalek roast: Add tests for RT #128655
21:28 dalek roast: review: https://github.com/perl6/roast/commit/e0330b72af
21:28 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=128655
21:29 raiph psch: Zoffix: Aiui: state vars are init'd per "closure clone". `sub ...` creates a closure clone each time the declaration is called. usually once in a program. `loop ...` creates and loops a closure clone each time it's called. Or something like that. I think moar's output is correct.
21:29 lizmat hope jnthn has some insights tomorrow
22:04 lizmat good night, #perl6-dev!
22:04 timotimo gnite liz
22:05 Zoffix raiph, and Perl 5 is wrong? And state is pretty much useless? I disagree.
22:06 Zoffix In fact, your reasoning is flawed in that `state` works fine in the loop, it's the last/next that break it, not the loop.
23:36 Madcap^Jake^ joined #perl6-dev

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