Perl 6 - the future is here, just unevenly distributed

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

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

All times shown according to UTC.

Time Nick Message
00:06 BenGoldberg joined #perl6-dev
00:30 japhdc joined #perl6-dev
00:41 MasterDuke_ m: subset uint15 of uint16 where 0 < * <= 32775; my uint15 $b = 1
00:41 camelia rakudo-moar ba0581: OUTPUT: «Type check failed in assignment to $b; expected uint15 but got Int (1)␤  in block <unit> at <tmp> line 1␤␤»
00:42 MasterDuke_ m: subset uint15 of uint16 where 0 < * <= 32775; my uint16 $b = 1; my uint15 $c = $b
00:42 camelia rakudo-moar ba0581: OUTPUT: «Type check failed in assignment to $c; expected uint15 but got Int (1)␤  in block <unit> at <tmp> line 1␤␤»
00:42 MasterDuke_ i guess that's all just part of native uints not really working
00:44 MasterDuke_ but i've actually run into it while doing some coding for fun
00:53 timotimo today i learned that you can right-click-copy, right-click-paste partitions across disks in gparted and it'll clone stuff for you, and you can resize it as well directly afterwards
00:57 MasterDuke_ sounds convenient
01:16 japhdc 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:03 japhdc joined #perl6-dev
02:40 * Zoffix is having trouble finding good hacking music today :(*
03:10 Zoffix .tell dogbert17 if you're interested. Got a segfault with some of my code; possibly something to do with native typed attributes:  zef update; zef install Testo; cd $(mktemp -d); git clone https://github.com/zoffixznet/perl6-IO-Dir .; git checkout 70f8502; perl6 t/01-operation.t
03:10 yoleaux Zoffix: I'll pass your message to dogbert17.
03:16 Zoffix .tell dogbert17 actually it was trying to read a close dir handle. Filed as: https://rt.perl.org/Ticket/Display.html?id=131301
03:16 yoleaux 03:11Z <skids> Zoffix: yeah that module is really bitrotten, and won't be worked on again until RT#126819 is resolved.
03:16 synopsebot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=126819
03:16 yoleaux Zoffix: I'll pass your message to dogbert17.
03:33 Zoffix m: say (1,).Seq ~~ (1,).Seq
03:33 camelia rakudo-moar ba0581: OUTPUT: «False␤»
03:34 Zoffix m: say (1,) ~~ (1,)
03:34 camelia rakudo-moar ba0581: OUTPUT: «True␤»
03:38 Zoffix Filed as https://rt.perl.org/Ticket/Display.html?id=131302
04:24 stmuk joined #perl6-dev
05:48 japhdc joined #perl6-dev
05:56 lizmat joined #perl6-dev
05:57 lizmat Files=1192, Tests=58580, 188 wallclock secs (11.57 usr  4.43 sys + 1092.96 cusr 111.08 csys = 1220.04 CPU)
05:57 yoleaux 12 May 2017 22:56Z <Zoffix> lizmat: FWIW the ba0581d75b fix now gives False for cases that are, say `Int ∋ Int`; Perhaps Set:U.Set should return set(Set) as it does for other type objects?
05:58 lizmat .tell Zoffix well, I guess that boils down to: is Set.Set Set or set(Set) ?
05:58 yoleaux lizmat: I'll pass your message to Zoffix.
06:16 [TuxCM] joined #perl6-dev
06:43 japhdc joined #perl6-dev
07:18 lizmat joined #perl6-dev
07:21 [TuxCM] joined #perl6-dev
07:50 pmurias joined #perl6-dev
08:01 brrt joined #perl6-dev
08:05 samcv joined #perl6-dev
08:19 Geth ¦ rakudo/nom: 407bce1dc2 | (Elizabeth Mattijsen)++ | 13 files
08:19 Geth ¦ rakudo/nom: Handle QuantHash:U coercion differently
08:19 Geth ¦ rakudo/nom:
08:19 Geth ¦ rakudo/nom: This should fix some issues with set operators (RT ##131300).
08:19 Geth ¦ rakudo/nom:
08:19 synopsebot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=131300
08:19 Geth ¦ rakudo/nom: Before this, Set.Set would return Set.  Now it returns set(Set).  So
08:19 Geth ¦ rakudo/nom: instead of not coercing a QuantHash type object, we now coerce it into
08:19 Geth ¦ rakudo/nom: a defined QuantHash object with the type object as its member.
08:19 Geth ¦ rakudo/nom:
08:19 Geth ¦ rakudo/nom: This is consistent with e.g. Int.Set, which already coerced to set(Int).
08:19 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/407bce1dc2
08:45 japhdc joined #perl6-dev
08:48 lizmat 🦋🐪  # just because I can
08:53 samcv joined #perl6-dev
09:02 japhdotcom joined #perl6-dev
09:07 Geth ¦ rakudo/nom: 50d5ac3276 | (Elizabeth Mattijsen)++ | src/core/set_operators.pm
09:07 Geth ¦ rakudo/nom: Revert "Partial fix for RT #131300"
09:07 Geth ¦ rakudo/nom:
09:07 Geth ¦ rakudo/nom: The partial fix was wrong.  That should teach me to not commit
09:07 Geth ¦ rakudo/nom: anything when tired after a long day and an evening out.
09:07 synopsebot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=131300
09:07 Geth ¦ rakudo/nom:
09:07 Geth ¦ rakudo/nom: This reverts commit ba0581d75bdd560ec81c0528f22e574107f05420.
09:07 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/50d5ac3276
09:10 tadzik Zoffix: ping
09:23 ugexe Zoffix: RakudoPrereq test fails on osx (http://testers.p6c.org/reports/145831.html needs a few minutes until it shows up)
09:23 ugexe passes on linux however
09:27 dogbert17 joined #perl6-dev
09:38 dogbert17 m: say 1 ∈ (SetHash) ?? "present" !! "not present"
09:38 camelia rakudo-moar 50d5ac: OUTPUT: «not present␤»
09:38 dogbert17 this used to be 'Invocant of method 'Set' must be an object instance of type 'SetHash', not a type object of type 'SetHash'.  Did you forget a '.new'?'
09:39 ugexe Zoffix: er, the test report didn't get all the info you would need on the failure. see instead: https://gist.github.com/ugexe/5d2ced2d461215c0bb8477d8af89adbd
09:46 lizmat m: 1 ∈ SetHash   # golfed
09:46 camelia rakudo-moar 50d5ac: OUTPUT: «WARNINGS for <tmp>:␤Useless use of "∈" in expression "1 ∈ SetHash" in sink context (line 1)␤»
09:46 lizmat m: say 1 ∈ SetHash   # golfed more silently
09:46 camelia rakudo-moar 50d5ac: OUTPUT: «False␤»
09:49 dogbert17 cool, so the new behaviour makes sense
09:55 lizmat yeah, think so
09:55 lizmat m: dd Set.Set
09:55 camelia rakudo-moar 50d5ac: OUTPUT: «set(Set)␤»
09:55 lizmat m: dd set().Set
09:55 camelia rakudo-moar 50d5ac: OUTPUT: «set()␤»
09:57 AlexDaniel joined #perl6-dev
09:59 dogbert17_ joined #perl6-dev
10:09 [TuxCM] This is Rakudo version 2017.04.3-238-g50d5ac327 built on MoarVM version 2017.04-64-g6d5ea042
10:09 [TuxCM] csv-ip5xs        2.493
10:09 [TuxCM] test            12.472
10:09 [TuxCM] test-t           4.215 - 4.221
10:09 [TuxCM] csv-parser      12.756
10:14 dogbert17 m: say bag(<a a b c a d>) (-) bag(<a a b c c>) == bag(<a d>) # hmm
10:14 camelia rakudo-moar 50d5ac: OUTPUT: «P6opaque: get_boxed_ref could not unbox for the representation '20' of type Scalar␤  in block <unit> at <tmp> line 1␤␤»
10:15 AlexDaniel mch: say bag(<a a b c a d>) (-) bag(<a a b c c>) == bag(<a d>) # hmm
10:15 committable6 AlexDaniel, ¦2015.12: «True» ¦HEAD(50d5ac3): «P6opaque: get_boxed_ref could not unbox for the representation '20' of type Scalar␤  in block <unit> at /tmp/TEGGspRhMN line 1␤ «exit code = 1»»
10:15 AlexDaniel bisect: say bag(<a a b c a d>) (-) bag(<a a b c c>) == bag(<a d>) # hmm
10:15 bisectable6 AlexDaniel, Bisecting by exit code (old=2015.12 new=50d5ac3). Old exit code: 0
10:15 bisectable6 AlexDaniel, bisect log: https://gist.github.com/ea9b1f5cafac02e57b9a7d2d3eb01b8c
10:15 bisectable6 AlexDaniel, (2017-05-11) https://github.com/rakudo/rakudo/commit/788e6de6dc6b90e2938451afbf80e31a591b1550
10:15 AlexDaniel commit: 788e6de6dc6^,788e6de6dc6 say bag(<a a b c a d>) (-) bag(<a a b c c>) == bag(<a d>) # hmm
10:15 committable6 AlexDaniel, ¦788e6de6dc6^: «True» ¦788e6de: «P6opaque: get_boxed_ref could not unbox for the representation '20' of type Scalar␤  in block <unit> at /tmp/AWnAlMSsyj line 1␤ «exit code = 1»»
10:16 AlexDaniel dogbert17: ticket it
10:16 dogbert17 will do, just my luck that lizmat decided to take a nap, that's was her computer says anyway :-)
10:17 dogbert17 guess she wants a ticket as well
10:17 AlexDaniel of course :)
10:18 dogbert17 I was investigating this broken example in the docs: 'bag(<a a b c a d>) (-) bag(<a a b c c>) = bag(<a d>)'
10:18 AlexDaniel I wonder what is 20
10:19 jnthn A representation ID
10:19 jnthn It could be a code-gen bug
10:19 jnthn But given a load of code is written with nqp:: ops, it's most likely a missing nqp::decont
10:20 jnthn Not quite sure why it puts the 20 there instead of P6bigint...maybe thinko in the error generation code
10:20 jnthn Oh, or maybe we only have the ID there
10:21 Zoffix .
10:21 yoleaux 05:58Z <lizmat> Zoffix: well, I guess that boils down to: is Set.Set Set or set(Set) ?
10:21 Zoffix tadzik: pong
10:21 Zoffix ugexe: that looks like your Linux Rakudo version is not the same as OSX version
10:25 Zoffix It's kinda ironic the module I made to avoid buggy Rakudos fails tests because it's hitting a Rakudo bug :P
10:26 tadzik Zoffix: I was wondering why does https://github.com/perl6/modules.perl6.org/blob/master/lib/ModulesPerl6/DbBuilder/Dist/PostProcessor/METAChecker.pm#L17 return
10:27 tadzik just to not do the GET, or does the return value matter?
10:27 ugexe Zoffix: happens on 2017.04.3 on either system
10:28 dogbert17 AlexDaniel: done, RT #131303
10:28 synopsebot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=131303
10:28 Zoffix ugexe: OK that makes more sense :) Pushed a fix that I'm pretty confident fixes the issue
10:29 AlexDaniel .tell lizmat you may be interested: RT #131303
10:29 yoleaux AlexDaniel: I'll pass your message to lizmat.
10:29 synopsebot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=131303
10:31 japhdc joined #perl6-dev
10:33 Zoffix tadzik: yes, it returns to avoid the GET; since if we were able to fetch the meta in the first place and URL mathes, then it's correct. That return should probably be `return 1`, since we did not fail the meta check. Although its value is currently unused, I usually use the truthy/falsy returns to indicate success/failure even if currently unused:
10:33 Zoffix https://github.com/perl6/modules.perl6.org/blob/master/lib/ModulesPerl6/DbBuilder/Dist.pm#L57
10:34 AlexDaniel .tell samcv hello! I've just noticed that I had this ticket bookmarked for some reason RT #128875. Looks exactly like something you may be interested in :)
10:34 synopsebot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=128875
10:34 yoleaux AlexDaniel: I'll pass your message to samcv.
10:34 samcv hey
10:34 yoleaux 10:34Z <AlexDaniel> samcv: hello! I've just noticed that I had this ticket bookmarked for some reason RT #128875. Looks exactly like something you may be interested in :)
10:34 synopsebot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=128875
10:34 samcv will look.
10:34 Zoffix m: dd Array.Array
10:34 camelia rakudo-moar 50d5ac: OUTPUT: «[Array,]␤»
10:34 Zoffix m: dd Array.List
10:34 camelia rakudo-moar 50d5ac: OUTPUT: «(Array,)␤»
10:34 AlexDaniel m: dd Array.list
10:34 camelia rakudo-moar 50d5ac: OUTPUT: «(Array,)␤»
10:34 samcv I'm having a problem using NativeCall under Sabyon (gentoo based) it seems to be trying to open a dummy readline lib file
10:35 tadzik Zoffix: alrighty, thanks
10:35 jnthn samcv: Maybe it's trying to load a linker script or some such?
10:35 samcv i guess gentoo's libraries are complex
10:35 jnthn (Which won't work well)
10:35 samcv yeah it is jnthn
10:35 samcv anyway we can do anything. the file has the name of the actual .so in the text
10:35 tadzik Zoffix: I move things around and exposed problems with dists on the webui in the 'problems' branch, if you want to take a look :)
10:36 tadzik it moves some stuff from Source.pm to METAChecker as well
10:36 jnthn Yeah, it'll need to be pointed at the real .so instead I guess
10:36 samcv i'm trying to think how this can be solved for gentoo type distros
10:36 samcv other than manually doing it
10:38 Zoffix .tell lizmat I think Set.Set makes sense to be set(Set) because we do that already for List.List, Array.Array, Bag.Bag, and Mix.Mix; I think that's all the things that can contain themselves (all by themselves)? So basically there *is* a meaning for the coercer to return a proper Set I can call methods on, so it makes sense to do that instead of just returning the type object that makes stuff hang and
10:38 yoleaux Zoffix: I'll pass your message to lizmat.
10:38 jnthn Manually being looking in the file and then hardcoding that?
10:38 Zoffix can't call many methods on
10:38 Zoffix .tell lizmat can't call many methods on
10:38 yoleaux Zoffix: I'll pass your message to lizmat.
10:38 jnthn I guess linker scripts are text files so we could "interpret" simple ones...
10:39 jnthn Though that may be icky :)
10:40 samcv yeah i mean. i will check into it. the files i've seen have a refernce to the real .so in the thing
10:42 samcv h/o gotta bring my website back up :o
10:43 Zoffix tadzik: TIP. Add the new routes you added to site tips; so people know about them. The tips are 1-per-line, and you have to escape your markup, if needed: https://github.com/perl6/modules.perl6.org/blob/master/site-tips.txt
10:43 tadzik oh, right :)
10:43 jnthn Yeah, afaiu linker scripts can do all kinds of magic but we probably only need to handle a tiny subset of it to be useful
10:45 lizmat joined #perl6-dev
10:50 ugexe Zoffix: confirmed it works on osx now
10:50 samcv brb gonna reboot the server...
10:51 samcv joined #perl6-dev
10:52 samcv eek. no wonder. my ipv6 addresses aren't showing up anymore..
10:52 samcv nginx wouldn't start
10:59 samcv jnthn, this is the libreadline.so file fyi https://cry.nu/p/m1c1/
11:03 samcv so looks like GROUP has .so's and there can be more than one. but if we find that section it should be at least not too hard to do it.
11:05 AlexDaniel dogbert17: as you can see, she is not asleep :)
11:07 dogbert17 lizmat: we found a bug for you :)
11:09 dogbert17 ah, now I got the mail with her comment
11:10 Zoffix joined #perl6-dev
11:10 samcv AlexDaniel, RE that RT .o0( i always thought the code for :i:m in nqp looked like it didn't work... hehe )
11:10 dogbert17 at least the broken examples on the SetBagMix page have been fixed
11:10 samcv hadn't poked that section yet
11:11 samcv put it on my list to categorize tomorrow
11:11 AlexDaniel \o/
11:13 dogbert17 the amount of code examples on the SetBagMix page is quite limited, perhaps I should add a few
11:15 * dogbert17 decides to do that after lunch
11:26 Geth ¦ rakudo/nom: 4c813666df | (Elizabeth Mattijsen)++ | 2 files
11:26 Geth ¦ rakudo/nom: Actually decontainerize when changing (Bag|Mix)Hash
11:26 Geth ¦ rakudo/nom:
11:26 Geth ¦ rakudo/nom: This fixes RT #131303, dogbert17++ for spotting
11:26 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4c813666df
11:26 synopsebot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=131303
11:40 dogbert17 lizmat++
11:57 pmurias joined #perl6-dev
12:11 vendethiel joined #perl6-dev
12:17 lizmat so how do we do this in Perl 6:
12:17 yoleaux 10:29Z <AlexDaniel> lizmat: you may be interested: RT #131303
12:17 synopsebot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=131303
12:17 yoleaux 10:38Z <Zoffix> lizmat: I think Set.Set makes sense to be set(Set) because we do that already for List.List, Array.Array, Bag.Bag, and Mix.Mix; I think that's all the things that can contain themselves (all by themselves)? So basically there *is* a meaning for the coercer to return a proper Set I can call methods on, so it makes sense to do that instead of just returning the type object that makes stuff hang and
12:17 yoleaux 10:38Z <Zoffix> lizmat: can't call many methods on
12:17 lizmat m: require Test; ok 1
12:17 camelia rakudo-moar 4c8136: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤    ok used at line 1␤␤»
12:18 lizmat m: require Test; ::("ok") 1
12:18 camelia rakudo-moar 4c8136: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3require Test; ::("ok")7⏏5 1␤    expecting any of:␤        infix␤        infix stopper␤        statement end␤        statement modifier␤        s…»
12:18 Zoffix m: require Test <&ok>; ok 1
12:18 camelia rakudo-moar 4c8136: OUTPUT: «ok 1 - ␤»
12:18 lizmat ah
12:18 lizmat ok
12:18 lizmat Zoffix++
12:19 lizmat m: require Test; ::("ok")(1)
12:19 camelia rakudo-moar 4c8136: OUTPUT: «No such symbol 'ok'␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤WARNING: unhandled Failure detected in DESTROY. If you meant to ignore it, you can mark it as handled by calling .Bool, .so, .not, or .defined methods. The Failure was:␤…»
12:20 lizmat m: require Test; ::("&ok")(1)
12:20 camelia rakudo-moar 4c8136: OUTPUT: «No such symbol '&ok'␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
12:20 lizmat just checking :-)
12:22 Zoffix m: require Test; ::("Test::EXPORT::DEFAULT::&ok")(1)
12:22 camelia rakudo-moar 4c8136: OUTPUT: «ok 1 - ␤»
12:23 Zoffix m: require Test; Test::EXPORT::DEFAULT::ok(1)
12:23 camelia rakudo-moar 4c8136: OUTPUT: «ok 1 - ␤»
12:54 committable6 joined #perl6-dev
13:02 lizmat joined #perl6-dev
13:16 Zoffix ZOFVM: Files=1242, Tests=135556, 113 wallclock secs (22.47 usr  3.20 sys + 2355.60 cusr 131.13 csys = 2512.40 CPU)
13:17 Geth ¦ rakudo/nom: aa72bdefe4 | (Zoffix Znet)++ | src/core/IO/Path.pm
13:17 Geth ¦ rakudo/nom: [io grant] Remove dir's :absolute and :Str; make up to 23% faster
13:17 Geth ¦ rakudo/nom:
13:17 Geth ¦ rakudo/nom: - Remove `:absolute` argument and control absoluteness fully via invocant
13:17 Geth ¦ rakudo/nom: - Remove `:Str` argument; a performance hack is sole reason for this arg
13:17 Geth ¦ rakudo/nom:     - Anyone in dire need of it can use IO::Dir module
13:17 Geth ¦ rakudo/nom: - Neither arg is roasted, documented, or appears to be ecosystem-used
13:17 Geth ¦ rakudo/nom: - Fix JVM bug of not accounting invocant's absoluteness when creating
13:17 Geth ¦ rakudo/nom: <…commit message has 7 more lines…>
13:17 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/aa72bdefe4
13:18 Geth ¦ roast: 98917dcaeb | (Zoffix Znet)++ | S32-io/dir.t
13:18 Geth ¦ roast: [io grant] Test IO::Path.dir's absoluteness behaviour
13:18 Geth ¦ roast:
13:18 Geth ¦ roast: Per impl in https://github.com/rakudo/rakudo/commit/aa72bdefe4
13:18 Geth ¦ roast: review: https://github.com/perl6/roast/commit/98917dcaeb
13:21 committable6 joined #perl6-dev
13:41 dogbert17_ joined #perl6-dev
13:54 pink_mist joined #perl6-dev
13:55 pink_mist [Tux]: are you HMBRAND on cpan? your Text-CSV release was caught by at least 2 different perl5 monitoring solutions as a perl5 dist :/
14:00 pink_mist [Tux]: it seems you missed putting things in the Perl 6 directory, if I'm not misunderstanding various comments from others (I've no idea myself)
14:01 tadzik pink_mist: fwiw, I did the same for Acme::Meow, and it was kinda intentional, and andk-approved to see if pause will react correctly or not
14:01 nine pink_mist: it really was a test of how PAUSE would react, because it's supposed to handle Perl 6 dists correctly. ANDYK approved of the test and is currently fixing PAUSE
14:02 nine s/ANDYK/ANDK/g
14:02 Zoffix Yeah, in PAUSE you need to choose "Perl 6" in target directory from the dropdown
14:02 pink_mist aha, got it
14:05 Geth ¦ nqp: a695300ae9 | (Elizabeth Mattijsen)++ | src/HLL/Compiler.nqp
14:05 Geth ¦ nqp: Revert "Allow for extra config info to be shown from HLL"
14:05 Geth ¦ nqp:
14:05 Geth ¦ nqp: We should change the subclass Perl6::Compiler, rather than mess
14:05 Geth ¦ nqp: with HLL::Compiler.
14:05 Geth ¦ nqp:
14:05 Geth ¦ nqp: This reverts commit 736835d80aff12494991137564a966d1c3dd456c.
14:05 Geth ¦ nqp: review: https://github.com/perl6/nqp/commit/a695300ae9
14:06 lizmat Zoffix pink_mist I disagree
14:06 lizmat PAUSE *should* put a Perl 6 distro in the Perl6 directory automatically
14:07 lizmat otherwise we allow the user of PAUSE to do the wrong thing
14:08 Zoffix lizmat: yeah, if it can. I was describing the current process as I last used it.
14:09 Zoffix Anyone really good with bit shift stuff? Can you check if we have some problems with bitshifting uint32 types? There's this issue, but I can't repro any concrete problems: https://github.com/grondilu/libdigest-perl6/issues/18
14:19 Zoffix Ah, a spesh bug
14:23 MasterDuke_ huh, wasn't that a recent breakage for libdigest? i didn't think spesh was touched recently?
14:27 Zoffix Filed as https://rt.perl.org/Ticket/Display.html?id=131306
14:27 Zoffix MasterDuke_: it wasn't but rakudo changes exposed it
14:31 MasterDuke_ ah, i just read the issue thread
14:34 timotimo uh oh, spesh does bit ops wrong?
14:35 timotimo is it really spesh, or just jit?
14:37 japhdc joined #perl6-dev
14:39 Ven joined #perl6-dev
14:40 Zoffix timotimo: no idea. I don't know the difference
14:40 Zoffix MVM_SPESH_DISABLE=1 fixes the bug
14:41 timotimo and MVM_JIT_DISABLE=1?
14:41 timotimo because disabling spesh also disables the jit
14:44 pink_mist left #perl6-dev
14:45 Zoffix MVM_JIT_DISABLE=1 still has the bug
14:48 Zoffix c: ef29bb9f41aa5d~1 use nqp; sub rotr(uint32 $n, uint32 $b) { nqp::bitshiftr_I(nqp::decont($n), nqp::unbox_i($b), Int) +| $n +< (32 - $b) }; say rotr 1652322944, 18; my $x; for ^1000 { $x = rotr 1652322944, 18 }; say $x
14:48 committable6 Zoffix, ¦ef29bb9f41aa5d~1: «27071659120799␤27071659120799»
14:49 Zoffix And looks like it's solely the NEW moarvm right shift off that caused it, 'cause if I do the Rakudo's fix above the bug isn't there (when using old MoarVM op)
14:49 Zoffix s/off/op/;
14:50 Zoffix This one: https://github.com/MoarVM/MoarVM/commit/362277b79fef8bfa45ad44a4062a05785187ddfe
14:51 Geth ¦ rakudo/nom: cbff7110eb | (Elizabeth Mattijsen)++ | 2 files
14:51 Geth ¦ rakudo/nom: Change Perl6::Compiler rather than HLL::Compiler
14:51 Geth ¦ rakudo/nom:
14:51 Geth ¦ rakudo/nom: This bumbs NQP_REVISION to make sure we get the original, unadulterated
14:51 Geth ¦ rakudo/nom: HLL::Compiler.verbose-config method.
14:51 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/cbff7110eb
14:51 Geth ¦ rakudo/nom: 83b7acd265 | (Elizabeth Mattijsen)++ | src/core/Compiler.pm
14:51 Geth ¦ rakudo/nom: Run the Perl6::Compiler.verbose-config when sinking
14:51 Geth ¦ rakudo/nom:
14:51 Geth ¦ rakudo/nom: Providing a runtime way to trigger "perl6 -V" output.  This probably
14:51 Geth ¦ rakudo/nom: needs some bikeshedding still.
14:51 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/83b7acd265
14:56 Zoffix Actually, no. If I checkout pre-fix MoarVM, it still has that bug :S
14:56 timotimo spesh doesn't actually do anything to bitshift ops
14:58 timotimo is the bug still there when you set only MVM_SPESH_INLINE_DISABLE?
14:59 Ven_ joined #perl6-dev
14:59 timotimo which number is the wrong one, now? one that ends in 6?
14:59 Zoffix c: ef29bb9f41aa5d~1 say $*VM.version; use nqp; sub rotr(uint32 $n, uint32 $b) { nqp::bitshiftr_I(nqp::decont($n), nqp::unbox_i($b), Int) +| $n +< (32 - $b) }; say rotr 1652322944, 18; my $x; for ^1000 { $x = rotr 1652322944, 18 }; say $x
14:59 MasterDuke_ no bug with INLINE_DISABLE
14:59 committable6 Zoffix, ¦ef29bb9f41aa5d~1: «v2017.04.56.g.8.ad.18.b.84␤27071659120799␤27071659120799»
15:00 Zoffix timotimo: yeah, the short one
15:00 Zoffix Right answer is 27071659120799
15:00 Zoffix ok, so ^ no bug there, but if I build 2017.04 MoarVM, I get the bug
15:00 Zoffix I suspect this might be some nqp changes...
15:00 Zoffix c: ef29bb9f41aa5d say $*VM.version; use nqp; sub rotr(uint32 $n, uint32 $b) { nqp::bitshiftr_I(nqp::decont($n), nqp::unbox_i($b), Int) +| $n +< (32 - $b) }; say rotr 1652322944, 18; my $x; for ^1000 { $x = rotr 1652322944, 18 }; say $x
15:00 committable6 Zoffix, ¦ef29bb9: «v2017.04.56.g.8.ad.18.b.84␤27071659120799␤27071659120799»
15:01 Zoffix uhhhh
15:01 timotimo well, if it's a spesh bug it will only appear if you run the code multiple times
15:01 Zoffix bisect: use nqp; sub rotr(uint32 $n, uint32 $b) { nqp::bitshiftr_I(nqp::decont($n), nqp::unbox_i($b), Int) +| $n +< (32 - $b) }; say rotr 1652322944, 18; my $x; for ^1000 { $x = rotr 1652322944, 18 }; say $x
15:01 bisectable6 Zoffix, Bisecting by output (old=2015.12 new=83b7acd) because on both starting points the exit code is 0
15:01 Zoffix I am. I'm running it 1000 times
15:01 timotimo oh
15:01 bisectable6 Zoffix, bisect log: https://gist.github.com/0f933bff181e59e9c963d837e7cdd436
15:01 bisectable6 Zoffix, (2017-05-10) https://github.com/rakudo/rakudo/commit/6409ee582ee5870af576e178c5b3c668243f0115
15:01 timotimo there is
15:01 timotimo right
15:01 Zoffix Oh, I was looking at the wrong op all this time
15:02 Zoffix brb
15:08 Zoffix Check it:
15:08 Zoffix m:  use nqp; sub rotr(uint32 $n, uint32 $b) { nqp::bitshiftr_I(nqp::decont($n), nqp::unbox_i($b), Int) +| $n +< (32 - $b) }; say rotr 1652322944, 18; my $x; for ^1000 { $x = rotr 1652322944, 18 }; say $x
15:08 camelia rakudo-moar aa72bd: OUTPUT: «27071659120799␤235679␤»
15:08 Zoffix Bug, eh?
15:08 Zoffix m: use fatal; use nqp; sub rotr(uint32 $n, uint32 $b) { nqp::bitshiftr_I(nqp::decont($n), nqp::unbox_i($b), Int) +| $n +< (32 - $b) }; say rotr 1652322944, 18; my $x; for ^1000 { $x = rotr 1652322944, 18 }; say $x
15:08 camelia rakudo-moar aa72bd: OUTPUT: «27071659120799␤27071659120799␤»
15:08 Zoffix No bug :)
15:09 timotimo fixed your readdir crash bug just now btw
15:10 Zoffix sweet
15:10 Ven_ joined #perl6-dev
15:13 * timotimo grabs all latest nqp and rakudo
15:14 * Zoffix tries to refocus on IO
15:25 Geth ¦ roast: 00f6420096 | (Zoffix Znet)++ | S32-io/io-handle.t
15:25 Geth ¦ roast: Spec value of IO::Handle.encoding on unopened handle
15:25 Geth ¦ roast: review: https://github.com/perl6/roast/commit/00f6420096
15:38 [TuxCM] joined #perl6-dev
15:50 brrt joined #perl6-dev
15:57 Zoffix ZofBot: sing it with me \o\ |o| /o/  https://www.youtube.com/watch?v=0GMFT9Dph8M
15:57 ZofBot Zoffix, (Contextual variable searches do; $*PID will eventually locate $PROCESS::PID if not hidden by an inner callframe's $*PID
16:05 tadzik ...wat
16:12 Geth ¦ roast: 71eebc77f3 | (Zoffix Znet)++ | S32-io/io-spec-unix.t
16:12 Geth ¦ roast: [io grant] Test IO::Spec::Unix.extension
16:12 Geth ¦ roast: review: https://github.com/perl6/roast/commit/71eebc77f3
16:15 Zoffix m: $PROCESS::PID = 42; sub foo { say $*PID }; foo; { my $*PID = 72; foo }
16:15 camelia rakudo-moar 83b7ac: OUTPUT: «42␤72␤»
16:16 Zoffix Beat my head for a bit about this:
16:16 Zoffix m: $PROCESS::PID = 42; sub foo { say $*PID }; foo; my $*PID = 72; foo
16:16 camelia rakudo-moar 83b7ac: OUTPUT: «(Any)␤72␤»
16:16 Zoffix wonder if it's a DITWIDT or should warn
16:21 TimToady .oO(twinges? tickles? twerks?)
16:25 Zoffix :)
16:28 dogbert17 TimToady: did your cap repair succeed or did you (F)ry everything?
16:31 lizmat Zoffix: feels wrong to me
16:35 Zoffix m: my $x = 72; { sub foo { say $x }; foo ; my $x = 42; say $x }
16:35 camelia rakudo-moar 83b7ac: OUTPUT: «(Any)␤42␤»
16:35 Zoffix Affects this case too
16:37 TimToady should probably get the "already bound to outer symbol" warning
16:37 TimToady m: my $x = 72; { say $x; my $x = 42; say $x }
16:37 camelia rakudo-moar 83b7ac: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Lexical symbol '$x' is already bound to an outer symbol;␤the implicit outer binding must be rewritten as OUTER::<$x>␤before you can unambiguously declare a new '$x' in this scope␤at <tmp>:1␤------>…»
16:38 TimToady like that one
16:39 TimToady dogbert17: got the 5v line work, but the 12v line is still like 9±3v, so thinking I need to replace the main cap too
16:39 TimToady *working
16:41 Zoffix Filed as https://rt.perl.org/Ticket/Display.html?id=131307
16:42 dogbert17 TimToady: I guess you have an ESR meter
16:43 TimToady well, I can just watch it finding random voltages for a while :)
16:44 TimToady anyway, it seems like too much AC is leaking through somehow
16:45 Geth ¦ rakudo/nom: 85230d0603 | (Elizabeth Mattijsen)++ | 3 files
16:45 Geth ¦ rakudo/nom: Streamline verbose configuration reporting
16:45 Geth ¦ rakudo/nom:
16:45 Geth ¦ rakudo/nom: - perl -V now sorts its output
16:45 Geth ¦ rakudo/nom: - moved all of the logic for -V to Perl 6 land
16:45 Geth ¦ rakudo/nom: - new Compiler.verbose-config method returns hash by default
16:45 Geth ¦ rakudo/nom: - will nqp::say it when passed a :say
16:45 Geth ¦ rakudo/nom: - removes the $*SAY-ADDITIONAL-CONFIG-INFO abomination
16:45 Geth ¦ rakudo/nom: - and the Compiler.new.sink abomination
16:45 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/85230d0603
16:46 dogbert17 caps are not very good at stopping AC though :)
16:50 BenGoldberg joined #perl6-dev
17:01 AlexDaniel “Piping several commands is easy” our docs say. Except when you forget to .close the pipe between your processes
17:02 lizmat dinner&
17:02 AlexDaniel what do you think? Is it my misunderstanding, or is it a bug? https://github.com/perl6/whateverable/commit/96ccddccd
17:03 Zoffix Is there a way for it to auto-detect when to close a pipe?
17:04 AlexDaniel well, if the process over, sure enough it's time to close it? I'm not sure how it works internally
17:08 committable6 joined #perl6-dev
17:14 geekosaur if the process is over there can still be unread data. in general you can make things that autoclose so simple cases are simpler, but you end up making complex cases impossible
17:15 geekosaur sufficiently clever compile time analysis could say "you have a dangling pipe end you never do anything with, did you forget to either close it or use it?"
17:15 geekosaur ...usually.
17:16 geekosaur oh, this is one you use, you read, yopu just forgot to close? (looking at commit msg in other channel)
17:17 geekosaur that one is a bit more annoying, but one could probably set a flag on the handle at creation time saying "autoclose after EOF is read"... provided you aren't on an old system where it's not possible to distinguish nonblocking read with no data from EOF
17:18 geekosaur but I don't think rakudo can be built on such systems
17:18 geekosaur (for historical reasons I think POSIX still allows that though...)
17:18 Zoffix man this WannaCry thing is crazy https://gist.github.com/rain-1/989428fa5504f378b993ee6efbc0b168
17:19 * Zoffix wonders if he'll still have work to go to on Tuesday :)
17:23 Ven joined #perl6-dev
17:29 AlexDaniel I'm still waiting for this kind of thing for linux
17:30 AlexDaniel get your files encrypted, run around in panic trying to find your backups, search the internet for a way to decrypt it without paying anything… sounds like a lot of fun :)
17:31 Zoffix AlexDaniel: I'm sure there'll be some when it's market share will be more than a pimple on a flee
17:32 AlexDaniel Zoffix: well yes, maybe, but…
17:32 nine Actually there already are ones for Linux. Or at least one. But it demands a ridiculously high sum because Linux users seem to have the money.
17:32 AlexDaniel if you manage to infect something, what are the chances that it is some server?
17:33 Zoffix I dunno, pretty good?
17:33 AlexDaniel nine: what's the name?
17:33 Zoffix HeartBlead anyone? It doesn't need to be an infection
17:33 nine AlexDaniel: sorry, don't know anymore
17:33 AlexDaniel maybe https://en.wikipedia.org/wiki/Linux.Encoder.1
17:34 Zoffix And really, this is more about people using ancient, unsupported software than anything else.
17:34 Zoffix My home box isn't affected, but 3 other Windows boxes I checked even had Windows updates turned off and didn't receive anything since 2015 -_-
17:40 Zoffix Hm, IO::Handle.flush is untested... wonder how I'm supposed to test it :/ Since IIRC we don't currenly buffer anything?
17:41 Zoffix guess I'll see what sort of thing Perl 5 buffers and do a test to cover that case and when we start buffering we'll write more tests.
17:46 geekosaur used to be everything by the same rules as C (so you will find older programs setting $| for sockets); eventually sockets started defaulting nonbuffered because buffering is almost always wrong
17:47 geekosaur that said I was under the impression that buffering is transparently managed by libuv (and currently there is no mechanism in either moarvm or rakudo to change it)
17:47 Zoffix oh
17:47 Zoffix there's IO::Handle.flush that uses nqp::flushfh op
17:48 Zoffix I think I'll go the other way and un-document it and leave it unspecced...
17:48 geekosaur yeh, I think that call is the sole interface to libuv buffering
17:49 geekosaur you can't do the equivalent of C's setvbuf :/
17:49 geekosaur (and NativeCall does not help as it does not tell *libuv* what to do)
17:55 dogbert11 joined #perl6-dev
18:05 Ven_ joined #perl6-dev
18:10 Zoffix ZOFFLOP: t/spec/S11-modules/nested.t
18:10 Geth ¦ rakudo/nom: b43ed18f50 | (Zoffix Znet)++ | 2 files
18:10 Geth ¦ rakudo/nom: [io grant] Make IO::Handle.flush fail with typed exceptions
18:10 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b43ed18f50
18:11 Geth ¦ roast: 4495615281 | (Zoffix Znet)++ | S32-io/io-handle.t
18:11 Geth ¦ roast: [io grant] Test IO::Handle.flush
18:11 Geth ¦ roast: review: https://github.com/perl6/roast/commit/4495615281
18:23 Zoffix m:  .skip xx 10000 and .head.say with grep *.is-prime, ^∞
18:23 camelia rakudo-moar 85230d: OUTPUT: «Method 'pull-one' must be implemented by Iterator because it is required by roles: Iterator.␤  in block  at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
18:29 BenGoldberg One reason why it's not possible (in the general case) to know when to automatically close a pipe is that the process might have spawned a child of it's own, and that grandchild process might have a copy of the read end of the pipe.
18:31 AlexDaniel BenGoldberg: you mean the write end?
18:31 AlexDaniel or hm…
18:31 AlexDaniel 🤷
18:32 AlexDaniel well, all I know is that my code was broken, and I see no easy way to prevent myself from doing the same mistake again
18:32 AlexDaniel I'm stupid, I know, but you probably can't fix that…
18:33 AlexDaniel I have created a doc issue to make the situation a bit better: https://github.com/perl6/doc/issues/1304
18:33 AlexDaniel but documenting the trap doesn't really solve the problem…
18:33 AlexDaniel 🤷
18:34 Zoffix Well... programmers do need do a bit of thinking. We can't eliminate it entirely :)
18:35 Zoffix You work with IO::Handles; it's your job to ensure to close them, if relying on GC taking care of that isn't an option
18:37 Zoffix ZofBot: blame the user for everything!
18:37 ZofBot Zoffix, and shouldn't add short method to Mu
18:38 * geekosaur suggests 'perldoc perlipc'. some things CANNOT be fixed in the language. the programmer must deal; the computer will never be able to do so
18:38 geekosaur not via the language, not via the OS, not via magical fairies
18:39 geekosaur IPC is rife with these
18:39 * AlexDaniel cries in the corner
18:44 * Zoffix wonders when the traps page will be large enough to be published as a standalone book :)
18:44 Zoffix ZOFVM: Files=1242, Tests=135559, 114 wallclock secs (22.22 usr  3.20 sys + 2379.55 cusr 126.34 csys = 2531.31 CPU)
18:44 AlexDaniel Zoffix: I don't see many contributions to it
18:44 AlexDaniel it's just me creating issues…
18:48 Zoffix I added constants precompilation recently to it
18:49 AlexDaniel \o/
18:51 AlexDaniel is this one outdated? https://docs.perl6.org/language/traps#BUILD_prevents_automatic_attribute_initialization_from_constructor_arguments
18:51 AlexDaniel because you can do TWEAK now
18:52 Zoffix probably
18:52 Zoffix s/probably/definitely/;
18:54 Zoffix dammit
18:55 Zoffix I copied that link while I had a CD key for a game in my copypaste buffer and I need it now and I've no idea how to make steam tell it to me again, 'cause I said "don't show again" :(
18:55 AlexDaniel sorry!
18:55 AlexDaniel no clipboard manager?
18:55 Zoffix Ah, there's "CD KEY" link on the game's page
18:55 Zoffix Clipboard manager?
18:56 Zoffix Never heard of 'em. Also, this is windows
18:57 MasterDuke_ Zoffix: there are 3rd-party clipboard managers for windows
18:57 BenGoldberg Windows managers exist for windows: ClipboardFusion, Ditto, ClipCube, Ethervane Echo, ShapeShifter, Save.me, ...
18:57 BenGoldberg Just a random few :)
18:59 AlexDaniel interestingly, I never needed one… but I also don't have a trash bin :)
18:59 AlexDaniel (you press Delete and poof! The file is gone)
19:16 * Zoffix reads https://6guts.wordpress.com/2017/05/12/looking-for-perl-6-rakudo-and-moarvm-development-funding/
19:17 Zoffix And I recall snide replies to AlexDaniel on bdfoy's grant, about there being tons of money at TPF and everyone should just apply :/
19:28 moritz speaking of that project, was there a schedule for it?
19:28 Zoffix moritz: there were, but it wasn't funded
19:29 moritz Zoffix: ah right, I actually meant the kickstarter
19:29 Zoffix I vaguelly recall summer being somewhere around the time, but I don't see any specific timelines on the Kickstarter page
19:30 Zoffix Ah, "Final e-version: "ESTIMATED DELIVERY
19:30 Zoffix Jun 2017
19:31 Zoffix "Print book only, fulfilled by O'Reilly: Jun 2017"
19:33 Zoffix And looking at April's working copy of the book, I'd say Jun is overly optimistic; maybe Sept or so
19:33 Zoffix ugh. wish I didn't look at it
19:33 Zoffix try { chdir $*SPEC.catfile( $*HOME, @*ARGS[0] ) }
19:33 Zoffix if $! { put $! }
19:34 MasterDuke_ m: say \(1) ~~ :(Str(Int))
19:34 camelia rakudo-moar b43ed1: OUTPUT: «True␤»
19:34 MasterDuke_ m: say \(1) ~~ :(Str(int))
19:34 camelia rakudo-moar b43ed1: OUTPUT: «False␤»
19:35 Zoffix And several other convoluted examples with dumb handling of Failures
19:36 AlexDaniel nah, it's ok, looks fine here
19:36 * AlexDaniel doesn't have the access
19:36 MasterDuke_ m: say \(1) ~~ :(Int(int))
19:36 camelia rakudo-moar b43ed1: OUTPUT: «False␤»
19:36 MasterDuke_ m: say \(1) ~~ :(Int(Int))
19:36 camelia rakudo-moar b43ed1: OUTPUT: «True␤»
19:36 MasterDuke_ m: say \(1) ~~ :(int(int))
19:36 camelia rakudo-moar b43ed1: OUTPUT: «False␤»
19:36 MasterDuke_ m: say \(1) ~~ :(int(Int))
19:36 camelia rakudo-moar b43ed1: OUTPUT: «False␤»
19:37 Zoffix AlexDaniel: no regular user code should have a $*SPEC in it
19:37 * timotimo wonders if nier: automata's soundtrack is good for coding
19:37 AlexDaniel Zoffix: what code? No code!
19:37 Zoffix AlexDaniel: the one I pasted above
19:37 timotimo Zoffix: failures r rly hard
19:37 MasterDuke_ m: say \(1) ~~ :(int)
19:37 camelia rakudo-moar b43ed1: OUTPUT: «True␤»
19:38 MasterDuke_ m: say \(1) ~~ :(Int)
19:38 camelia rakudo-moar b43ed1: OUTPUT: «True␤»
19:38 Zoffix In fact, catfile doesn't handle nul bytes, so unless chdir coerces to IO path somewhere along the way that code has a security bug in it
19:38 Zoffix s: &chdir
19:38 SourceBaby Zoffix, Sauce is at https://github.com/rakudo/rakudo/blob/b43ed18/src/core/io_operators.pm#L134
19:39 Zoffix s: $*CWD, 'chdir', \('foo')
19:39 SourceBaby Zoffix, Sauce is at https://github.com/rakudo/rakudo/blob/b43ed18/src/core/IO/Path.pm#L414
19:39 Zoffix Nah, it's fine.
19:42 timotimo is $*SPEC tested explicitly in roast?
19:42 Zoffix Oh yeah
19:42 timotimo mhm
19:43 timotimo we don't really tell people that $*SPEC isn't meant for user code
19:43 timotimo or do we?
19:43 Zoffix But it's all low-level bits, so unless you're writing your own IO module, you shouldn't use it.
19:43 Zoffix We didn't, but do now.
19:44 Zoffix Well, and all pre-IO-grant IO docs were kinda meh and sparse and I think used $*SPEC too. I'm still working on improving them but the end goal is to have $*SPEC only as a "you're making your own IO lib" thing and everything else is handled by IO::Path
19:46 Zoffix One exception is splitting/joining path into/from path bits. You can join with just .join('/') and IO::Path will do the right thing with it, but it's still kinda iffy and splitting... *shrug*. I've seen one usage of that in the ecosystem, but I don't know what the actual problem being solved was. It might've been solvable by just calling the .add method instead of splitting/joining
19:49 ugexe splitting paths is often used to find some common substring/path-part between X number of paths
19:55 Zoffix What for?
19:55 Ven joined #perl6-dev
20:04 ugexe usually to keep some relative path structure while extending its parent some number of levels with the common prefix
20:04 ugexe i used to do it when we had to handle blib/lib and lib
20:06 ugexe except it could be anything, just neccesarily blib
20:06 ugexe just not^
20:26 bisectable6 joined #perl6-dev
20:26 committable6 joined #perl6-dev
20:26 evalable6 joined #perl6-dev
20:26 bloatable6 joined #perl6-dev
20:26 quotable6 joined #perl6-dev
20:26 unicodable6 joined #perl6-dev
20:26 benchable6 joined #perl6-dev
20:26 statisfiable6 joined #perl6-dev
21:00 pmurias joined #perl6-dev
21:00 pmurias /&foo/ should be illegal?
21:02 Geth ¦ nqp/master: 4 commits pushed by pmurias++
21:02 Geth ¦ nqp/master: c12153c3af | [js] Add a package.json to avoid the ugly 'mkdir node_modules'
21:02 Geth ¦ nqp/master: bc2ac2ff2c | When testing regex for errors surround the error with []
21:02 Geth ¦ nqp/master: 8618640c2a | [js] Make our qregex test mangling work
21:02 Geth ¦ nqp/master: 1c7f0344e8 | Untodo tests that pass just with different errors
21:02 Geth ¦ nqp/master: review: https://github.com/perl6/nqp/compare/a695300ae9...1c7f0344e8
21:05 Geth ¦ rakudo/nom: 4298dd5e2c | (Stefan Seifert)++ | tools/install-dist.pl
21:05 Geth ¦ rakudo/nom: Support building the dist in install-dist.pl
21:05 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4298dd5e2c
21:11 pmurias not sure if I should make / & a & a/ throw an error or get rid of the todo test for that
21:14 jnthn m: / & a & a/
21:14 camelia rakudo-moar 4298dd: ( no output )
21:14 jnthn m: say 'a' ~~ / & a & a/
21:14 camelia rakudo-moar 4298dd: OUTPUT: «Nil␤»
21:14 jnthn m: say 'a' ~~ / a & a/
21:14 camelia rakudo-moar 4298dd: OUTPUT: «Nil␤»
21:14 jnthn m: say 'a' ~~ / a && a/
21:14 camelia rakudo-moar 4298dd: OUTPUT: «「a」␤»
21:14 jnthn m: say 'a' ~~ /&& a && a/
21:14 camelia rakudo-moar 4298dd: OUTPUT: «「a」␤»
21:14 jnthn Hm, curious
21:15 jnthn /&a&a/ is pretty odd, in that the first & falls under the same rule that lets you put a lone | before an alternation in order to let things line up nicely
21:15 jnthn But that only is allowed at the start of a group (or top level)
21:16 jnthn And I susepct the &b later is swallowed up by the variable rule since it's a longer token
21:16 jnthn (And there isn't an LTM competition at the start, thus why the first & is handled the way it is)
21:16 jnthn I thougth that & compiled the same as && though, so not sure why the difference
21:24 pmurias jnthn: so /& a & a/ should be legal and works as /a & a/?
21:26 jnthn pmurias: I believe so, yes
21:27 jnthn The grammar intentionally, iirc, matches a lone |, ||, &, and && at the start of a statement
21:28 pmurias m: say('a' ~~ / a && a  /)
21:28 camelia rakudo-moar 4298dd: OUTPUT: «「a」␤»
21:28 pmurias m: say('a' ~~ / a & a  /)
21:28 camelia rakudo-moar 4298dd: OUTPUT: «Nil␤»
21:28 pmurias nqp-m: say('a' ~~ / a & a  /)
21:28 camelia nqp-moarvm: OUTPUT: «a␤»
21:31 ugexe buffer 2
21:32 Geth ¦ nqp: a5f1b80080 | pmurias++ | 5 files
21:32 Geth ¦ nqp: Remove TODO regex test
21:32 Geth ¦ nqp:
21:32 Geth ¦ nqp: A null regex to the left of & seems to be legal.
21:32 Geth ¦ nqp: review: https://github.com/perl6/nqp/commit/a5f1b80080
22:05 dogbert17 does anyone know what nqp::setelems does?
22:07 AlexDaniel dogbert17: you mean, besides this? https://github.com/perl6/nqp/blob/master/docs/ops.markdown#setelems
22:09 timotimo well, i can point you to the code inside moarvm
22:10 dogbert17 AlexDaniel++, I was thinking of documenting Buf.reallocate which looks like this 'method reallocate(Buf:D: Int $elements) { nqp::setelems(self,$elements) }'
22:10 timotimo VMArray.c:448 and MultiDimArray.c:698
22:10 timotimo (and buf is a VMArray on the inside)
22:11 dogbert17 timotimo: thx, is it then safe to assume that if the VMArray is enlarged, the 'new' elements are set to zero?
22:11 timotimo should be, yeah
22:12 timotimo hm
22:12 timotimo arrays can have a type for the slots
22:12 timotimo somehow "is default" has to work
22:12 timotimo i guess it's set to null so that existspos returns 0 for that part?
22:13 dogbert17 interesting
22:14 dogbert17 I'll cobble something together which you can rip to shreds later :)
22:14 timotimo documentation's fine
22:16 timotimo one important thing to know about moarvm's dynamic arrays is that they don't shrink, ever.
22:20 dogbert17 so what happens to the seemingly freed space then?
22:21 timotimo it's just memory that can be re-used at any point by adding more entries to the array
22:24 dogbert17 is there a way to clear the Buf, i.e. set all elements to a defult value, e.g. zero
22:24 timotimo yeah, setelems to 0 and back
22:25 dogbert17 but then we're in nqp land aren't we?
22:27 dogbert17 m: my $buf = Buf.new([1, 2, 3, 4, 5]); say $buf; $buf.reallocate(3); $buf.reallocate(6); say $buf;
22:27 camelia rakudo-moar 4298dd: OUTPUT: «Buf:0x<01 02 03 04 05>␤Buf:0x<01 02 03 04 05 00>␤»
22:27 timotimo then just assign Empty
22:29 dogbert17 my $buf = Buf.new([1, 2, 3, 4, 5]); say $buf; $buf = Empty; say $buf.WHAT; # obviously not like this
22:29 dogbert17 m: my $buf = Buf.new([1, 2, 3, 4, 5]); say $buf; $buf = Empty; say $buf.WHAT; # obviously not like this
22:29 camelia rakudo-moar 4298dd: OUTPUT: «Buf:0x<01 02 03 04 05>␤(Slip)␤»
22:32 timotimo haha
22:32 timotimo no, it has to be an array assignment
22:32 timotimo m: my $buf = Buf.new([1, 2, 3, 4, 5]); say $buf; @$buf = Empty; say $buf.perl
22:32 camelia rakudo-moar 4298dd: OUTPUT: «Buf:0x<01 02 03 04 05>␤Cannot modify an immutable Seq␤  in block <unit> at <tmp> line 1␤␤»
22:32 MasterDuke_ that looks like the ghost array behavior from a couple days ago
22:32 timotimo oh, oops
22:33 timotimo that's not how i expected tthat
22:33 timotimo m: my @buf := Buf.new([1, 2, 3, 4, 5]); say @buf; @buf = Empty; say @buf.perl
22:33 camelia rakudo-moar 4298dd: OUTPUT: «Buf:0x<01 02 03 04 05>␤Cannot modify an immutable Buf␤  in block <unit> at <tmp> line 1␤␤»
22:33 MasterDuke_ wouldn't you expect that reallocating down and then back up would put 0s?
22:33 timotimo i don't understand what i'm doing wrong there
22:34 timotimo m: say (@(Buf.new(1, 2, 3, 4)) = Empty)
22:34 camelia rakudo-moar 4298dd: OUTPUT: «Cannot modify an immutable Seq␤  in block <unit> at <tmp> line 1␤␤»
22:41 MasterDuke_ nqp: my @a := nqp::list_i(0, 2, 4, 6); nqp::setelems(@a, 2); for @a { say($_) }; say("reset @a"); nqp::setelems(@a, 4); for @a { say($_) }
22:41 camelia nqp-moarvm: OUTPUT: «0␤2␤reset @a␤0␤2␤4␤6␤»
22:42 MasterDuke_ what was it that was just fixed?
22:44 dogbert17 2016.12 behaves the same
22:45 MasterDuke_ m: my @a = ^4; @a.pop; @a[5] = 99; say @a
22:45 camelia rakudo-moar 4298dd: OUTPUT: «[0 1 2 (Any) (Any) 99]␤»
22:45 MasterDuke_ c: 2017.04 my @a = ^4; @a.pop; @a[5] = 99; say @a
22:45 committable6 MasterDuke_, ¦2017.04: «[0 1 2 3 (Any) 99]»
22:45 MasterDuke_ ah, that was it
22:48 MasterDuke_ ok. so is is expected that nqp::setelems keeps values around?
22:49 timotimo that is kind of bad
22:49 timotimo could crash when GC has happened in between making it small and making it big
22:50 timotimo nqp: my @a := nqp::list_i(0, 2, 4, 6); nqp::setelems(@a, 2); for @a { say($_) }; say("reset @a"); nqp::force_gc(); nqp::setelems(@a, 4); for @a { say($_) }
22:50 camelia nqp-moarvm: OUTPUT: «0␤2␤reset @a␤0␤2␤4␤6␤»
22:50 timotimo oh, list_i
22:50 timotimo that doesn't have that problem, of course
22:51 timotimo nqp: my @a := nqp::list(0, 2, 4, 6); nqp::setelems(@a, 2); for @a { say($_) }; say("reset @a"); nqp::force_gc(); nqp::setelems(@a, 4); for @a { say($_) }
22:51 camelia nqp-moarvm: OUTPUT: «0␤2␤reset @a␤0␤2␤4␤6␤»
22:51 MasterDuke_ set_elems() does call set_size_internal(), which in turn does call zero_slots()
22:51 timotimo why doesn't that crash?
22:52 timotimo nqp: my @a := nqp::list(0, 2, 4, 6); nqp::setelems(@a, 2); for @a { say($_) }; say("reset @a"); nqp::force_gc(); nqp::force_gc(); nqp::setelems(@a, 4); for @a { say($_) }
22:52 camelia nqp-moarvm: OUTPUT: «0␤2␤reset @a␤0␤2␤4␤6␤»
22:52 MasterDuke_ why would it?
22:53 MasterDuke_ nqp: my @a := nqp::list(); nqp::setelems(@a, 2); for @a { say($_) };
22:53 camelia nqp-moarvm: OUTPUT: «␤␤»
22:53 MasterDuke_ nqp: my @a := nqp::list_i(); nqp::setelems(@a, 2); for @a { say($_) };
22:53 camelia nqp-moarvm: OUTPUT: «0␤0␤»
22:54 timotimo because the slots in the list point at objects, but the slots that are "outside" the valid region aren't visited by the gc
22:54 timotimo so they should point at memory in invalid places
22:55 timotimo nqp: my @a := nqp::list(nqp::rand_n(1), nqp::rand_n(1), nqp::rand_n(1), nqp::rand_n(1)); nqp::setelems(@a, 2); for @a { say($_) }; say("reset @a"); nqp::force_gc(); nqp::force_gc(); nqp::setelems(@a, 4); for @a { say($_) }
22:55 camelia nqp-moarvm: OUTPUT: «(signal SEGV)0.632658301795547␤0.275444088306517␤reset @a␤0.632658301795547␤0.275444088306517␤»
22:55 timotimo there you go
22:55 timotimo we should really be nulling these slots when resizing the array
22:56 timotimo i think i'll go to bed early today
22:56 MasterDuke_ so is there some sort of 'off by n' error in set_size_internal and/or zero_slots
22:57 [TuxCM] joined #perl6-dev
22:59 timotimo yeah
22:59 timotimo we need to grab "elems" before we resize the thing
22:59 timotimo hmm
22:59 timotimo we sort of do
23:02 timotimo i'd have to step through it or something, but i'll go to bed early today, which is ... now?
23:03 MasterDuke_ later...
23:05 timotimo good luck with this :)
23:05 timotimo your mission, should you choose to accept it ... :)
23:06 timotimo are you a bad enough dude to zero the slots?
23:07 MasterDuke_ we'll see. also trying to implement a VM in perl 6
23:07 timotimo a perl6 vm in perl6? :)
23:07 MasterDuke_ which i don't think i've ever done before
23:08 MasterDuke_ heh, i'm not certifiable
23:08 MasterDuke_ but no, just started this https://challenge.synacor.com/
23:10 lizmat joined #perl6-dev
23:10 timotimo neat.
23:11 MasterDuke_ friend of mine did it in rust, so now i have to show how much better perl 6 is
23:12 timotimo i hope you find a few things to improve in moar and rakudo along the way :)
23:12 timotimo but not too much :D
23:14 MasterDuke_ well, i tried to make a uint15 subset of uint16, but that doesn't work. showed the error here earlier
23:15 timotimo right
23:15 MasterDuke_ m: subset uint15 of uint16 where 0 <= * <= 32775; my uint15 $a = 1
23:15 camelia rakudo-moar 4298dd: OUTPUT: «Type check failed in assignment to $a; expected uint15 but got Int (1)␤  in block <unit> at <tmp> line 1␤␤»
23:16 MasterDuke_ seems like a bug to me
23:16 timotimo do we do subsets of natives at all? anywhere?
23:16 MasterDuke_ but i don't know if subsetting natives is even allowed
23:18 MasterDuke_ m: subset uint15 of uint16 where 0 <= * <= 32775; my uint16 $a = 1; my uint15 $b = $a
23:18 camelia rakudo-moar 4298dd: OUTPUT: «Type check failed in assignment to $b; expected uint15 but got Int (1)␤  in block <unit> at <tmp> line 1␤␤»
23:19 MasterDuke_ i would think it should either work or error when i try to create the subset of the native type
23:21 MasterDuke_ a quick grep in roast shows nothing for subset of native types
23:22 timotimo perhaps an NYI exception would be in order
23:22 timotimo can you find anything in perl6-all-modules?
23:23 MasterDuke_ nothing there either
23:23 timotimo good
23:23 timotimo so nobody found a way to make it work
23:25 MasterDuke_ i'll rakudobug it so it doesn't slip through the cracks
23:26 MasterDuke_ any thought's on whether it should or shouldn't be allowed?
23:27 timotimo it'd be cool if we could
23:27 timotimo it might be a SMOP
23:28 MasterDuke_ i don't think i have any idea how subsets are currently implemented
23:30 timotimo look at SubsetHOW is my guess
23:30 timotimo (if that exists?)
23:30 timotimo also i expect the signature lowerer has a little bit for that kind of thing
23:34 MasterDuke_ RT #131310
23:34 synopsebot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=131310

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