Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6-dev, 2017-06-23

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

All times shown according to UTC.

Time Nick Message
00:07 awwaiid joined #perl6-dev
00:13 awwaiid joined #perl6-dev
00:21 BenGoldberg joined #perl6-dev
00:25 awwaiid joined #perl6-dev
00:31 awwaiid joined #perl6-dev
00:44 travis-ci joined #perl6-dev
00:44 travis-ci Rakudo build passed. Nick Logan 'Fix unitialized value stringification warning'
00:44 travis-ci https://travis-ci.org/rakudo/rakudo/builds/245978991 https://github.com/rakudo/rakudo/compare/4693ec867886...bde28209b304
00:44 travis-ci left #perl6-dev
00:47 awwaiid joined #perl6-dev
01:08 awwaiid joined #perl6-dev
01:15 travis-ci joined #perl6-dev
01:15 travis-ci Rakudo build passed. Zoffix Znet 'Make Any.tail() use iterator's .count-only if available
01:15 travis-ci https://travis-ci.org/rakudo/rakudo/builds/245980656 https://github.com/rakudo/rakudo/compare/bde28209b304...9c04dfc4a427
01:15 travis-ci left #perl6-dev
01:21 awwaiid joined #perl6-dev
01:23 TimToady joined #perl6-dev
01:27 awwaiid joined #perl6-dev
01:40 travis-ci joined #perl6-dev
01:40 travis-ci Rakudo build passed. Elizabeth Mattijsen 'Also run the more thorough set difference tests'
01:40 travis-ci https://travis-ci.org/rakudo/rakudo/builds/245983925 https://github.com/rakudo/rakudo/compare/9c04dfc4a427...3a9d8e79d38c
01:40 travis-ci left #perl6-dev
01:46 TimToady joined #perl6-dev
02:06 awwaiid joined #perl6-dev
02:09 travis-ci joined #perl6-dev
02:09 travis-ci Rakudo build passed. Zoffix Znet 'Make R::I::LastValue not pull when count is zero
02:09 travis-ci https://travis-ci.org/rakudo/rakudo/builds/245986997 https://github.com/rakudo/rakudo/compare/3a9d8e79d38c...4079f7b548fc
02:09 travis-ci left #perl6-dev
02:27 awwaiid joined #perl6-dev
02:38 awwaiid joined #perl6-dev
02:41 MasterDuke joined #perl6-dev
02:44 awwaiid joined #perl6-dev
02:54 awwaiid joined #perl6-dev
03:05 awwaiid joined #perl6-dev
03:08 Ben_Goldberg joined #perl6-dev
03:11 awwaiid joined #perl6-dev
03:23 awwaiid joined #perl6-dev
03:29 awwaiid joined #perl6-dev
03:41 awwaiid joined #perl6-dev
03:57 awwaiid joined #perl6-dev
04:02 awwaiid joined #perl6-dev
04:14 TimToady joined #perl6-dev
04:15 awwaiid joined #perl6-dev
04:20 awwaiid joined #perl6-dev
04:33 astj joined #perl6-dev
04:41 awwaiid joined #perl6-dev
04:47 awwaiid joined #perl6-dev
05:01 astj joined #perl6-dev
05:03 awwaiid joined #perl6-dev
05:13 awwaiid joined #perl6-dev
05:40 awwaiid joined #perl6-dev
05:44 TimToady joined #perl6-dev
05:51 TimToady_ joined #perl6-dev
05:51 awwaiid joined #perl6-dev
05:57 awwaiid joined #perl6-dev
06:14 awwaiid joined #perl6-dev
06:23 TimToady joined #perl6-dev
06:30 awwaiid joined #perl6-dev
06:46 awwaiid joined #perl6-dev
06:52 awwaiid joined #perl6-dev
06:58 awwaiid joined #perl6-dev
07:11 awwaiid joined #perl6-dev
07:34 TimToady joined #perl6-dev
07:46 awwaiid joined #perl6-dev
07:51 awwaiid joined #perl6-dev
07:56 |Tux| This is Rakudo version 2017.06-55-g4079f7b54 built on MoarVM version 2017.06-14-g888b33d1
07:56 |Tux| csv-ip5xs        2.642
07:56 |Tux| test            12.297
07:56 |Tux| test-t           3.943 - 3.976
07:56 |Tux| csv-parser      12.270
08:03 TimToady joined #perl6-dev
08:13 awwaiid joined #perl6-dev
08:19 awwaiid joined #perl6-dev
08:20 TimToady joined #perl6-dev
08:24 awwaiid joined #perl6-dev
08:35 awwaiid joined #perl6-dev
08:41 awwaiid joined #perl6-dev
08:46 awwaiid joined #perl6-dev
08:51 TimToady joined #perl6-dev
08:57 jnthn eveo: about
08:57 jnthn m: my Channel $x .= new; $x.Supply.tap: &say; $x.close; await $x
08:57 camelia rakudo-moar 4079f7: OUTPUT: «Cannot receive a message on a closed channel␤  in block <unit> at <tmp> line 1␤␤»
08:58 jnthn Or perhaps more interestingly
08:58 jnthn m: my Channel $x .= new; $x.Supply.tap: &say; $x.send(42); $x.close; await $x
08:58 camelia rakudo-moar 4079f7: OUTPUT: «42␤Cannot receive a message on a closed channel␤  in block <unit> at <tmp> line 1␤␤»
09:00 jnthn That's behaving just as expected. The Supply obtained from the Channel will try, whenever there's new data put into the channel, to receive the value and emit it. It does so. The .close is also quite promptly handled. By the time await $x is done, which also tries to obtain a value from the Channel, it has been closed.
09:00 awwaiid joined #perl6-dev
09:00 jnthn The code is racey, but that's not a bug in Rakudo, it's a bug in the code. If you have multiple consumers for a Channel they are by definition competing over the data. That's part of what makes channels useful.
09:06 TimToady joined #perl6-dev
09:13 awwaiid joined #perl6-dev
09:17 TimToady joined #perl6-dev
09:23 awwaiid joined #perl6-dev
09:29 TimToady joined #perl6-dev
09:29 awwaiid joined #perl6-dev
09:40 awwaiid joined #perl6-dev
09:47 awwaiid joined #perl6-dev
09:48 eveo ok
09:48 yoleaux 05:50Z <moritz> eveo: the idea was that any(2, 3) != $x is interpreted as !(any(2,3) == $x), because the former is basically never what you want. That's why the != variant returns a Bool and the == a Junction
09:48 jnthn Currently working on a fix for RT #131576, fwiw
09:48 synopsebot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=131576
09:49 jnthn Well, at the point of deciding "how will I fix this" :)
09:51 eveo cool
09:56 TimToady joined #perl6-dev
10:02 Geth ¦ nqp: ee1b795b9a | (Jonathan Worthington)++ | 2 files
10:02 Geth ¦ nqp: Remove sync process op tests.
10:02 Geth ¦ nqp:
10:02 Geth ¦ nqp: These are going away, now that Rakudo has already moved over to
10:02 Geth ¦ nqp: implementing everything in terms of the asynchronous process ops.
10:02 Geth ¦ nqp: review: https://github.com/perl6/nqp/commit/ee1b795b9a
10:03 awwaiid joined #perl6-dev
10:07 jnthn Well, starting with some cleaning up
10:08 Geth ¦ nqp: 6c609f6c63 | (Jonathan Worthington)++ | t/nqp/019-file-ops.t
10:08 Geth ¦ nqp: Replace "is this Windows" test to not use shell.
10:08 Geth ¦ nqp: review: https://github.com/perl6/nqp/commit/6c609f6c63
10:08 Geth ¦ nqp: 79f6da22c2 | (Jonathan Worthington)++ | src/vm/moar/QAST/QASTOperationsMAST.nqp
10:08 Geth ¦ nqp: Un-map deprecated sync proc ops for MoarVM.
10:08 Geth ¦ nqp: review: https://github.com/perl6/nqp/commit/79f6da22c2
10:12 * dogbert17 is reading https://perl6.party/post/Perl-6-Seqs-Drugs-and-Rock-n-Roll
10:18 awwaiid joined #perl6-dev
10:21 TimToady joined #perl6-dev
10:22 * eveo just finished responding to /r/programming reddit comments on that post
10:22 eveo Specifically why »+« is not unmaintanable mess when you compare it to the alternative without a hyper.
10:23 eveo Not sure how that even came up, considering the article has nothing to do with that :/
10:23 * eveo should just ignore reddit comments, including valid questions
10:24 awwaiid joined #perl6-dev
10:29 awwaiid joined #perl6-dev
10:34 * jnthn has been ignoring reddit for years by this point :)
10:35 awwaiid joined #perl6-dev
10:40 dogbert17 eveo: I might be a bit dense (ENOOCOFFE) but what are you trying to say here: "By default is not implemented, but expected implementation for types that do this role is:"
10:41 AlexDaniel joined #perl6-dev
10:42 eveo dogbert17: the docs are for an interface. role Iterator does not have those methods implemented, but you can implemented in your class if you want to use those optimizations
10:43 dogbert17 that I do understand :)
10:44 dogbert17 it was this part which threw me: "but expected implementation for types that do this role is:"
10:46 awwaiid joined #perl6-dev
10:51 samcv hmm what's with the tag 47e455e426cbf2dd48a2be96322c42b704d693ee in rakudo
10:52 awwaiid joined #perl6-dev
10:53 samcv weird why does it show up when i run git tag
10:54 eveo dogbert17: correct it as you see fit.
10:56 lizmat eveo++   # good constructive comments
10:58 nine I don't see any comments on reddit for that post?
10:58 eveo nine: it's /r/programming. 25 comments: https://www.reddit.com/r/programming/comments/6iu8jh/perl_6_seqs_drugs_and_rocknroll/
10:58 nine Oh, how confusing
10:59 eveo :)
10:59 tadzik https://perl6.fail/ that's one pretty RT
11:01 lizmat eveo: fwiw, I have a solution for RT #131626, which basically consists of copying the code of the ops
11:01 synopsebot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=131626
11:01 lizmat there's not a lot to be copied, and until we have a better way to alias, I think this could do with the proper comments in the code
11:02 eveo cool
11:02 dogbert17 eveo, you there?
11:03 eveo Relocating to bus stop so not for 20 m
11:03 eveo what's up?
11:03 dogbert17 do you think this should work on Linux: my $fh = open('~/scratch.pl6');
11:04 dogbert17 given that I'm logged in as dogbert and the file '/home/dogbert/scratch.pl6' exists
11:04 eveo No.
11:04 dogbert17 hmm
11:05 eveo The ~/ is expandeed to $*ENV<HOME> by your shell. We aren't a shell
11:05 * eveo &
11:05 awwaiid joined #perl6-dev
11:05 dogbert17 works in p5 though :)
11:05 lizmat eveo: fwiw, perl6.fail shows some deleted tickets
11:06 lizmat eveo: maybe not show untagged tickets at all ?
11:06 Geth ¦ rakudo/js: 5d412528ad | pmurias++ | 2 files
11:06 Geth ¦ rakudo/js: [js] Implement nqp::p6takefirstflag and nqp::p6setfirstflag
11:06 Geth ¦ rakudo/js: review: https://github.com/rakudo/rakudo/commit/5d412528ad
11:06 Geth ¦ rakudo/js: 7e335826d4 | pmurias++ | src/core/Str.pm
11:06 Geth ¦ rakudo/js: [js] Enable unicody stuff that depends on the normalization in the NQP level
11:06 Geth ¦ rakudo/js: review: https://github.com/rakudo/rakudo/commit/7e335826d4
11:07 samcv dogbert17,
11:07 samcv > mkdir '~'
11:07 samcv "~".IO
11:07 samcv > mkdir '~/file'
11:07 samcv "~/file".IO
11:07 samcv :)
11:08 lizmat eveo: re behaviour of ~/ in p5, pretty sure that's not a shell doing that, but built in into P5
11:08 lizmat having said that, ~/ feels like a unixism that we may want to get away from ?
11:09 * jnthn isn't keen on open doing that, fwiw
11:09 lizmat feels to me that ecosystem could create an importable multi sub open that *would* do ~/ expansion
11:09 samcv yeah. you can have a ~ directory...
11:10 samcv inside the current folder. so
11:10 samcv `cd '~'` cd's into it so unless the shell is using expansion
11:10 samcv and that's not what we're doing
11:10 jnthn Turns out that the API design questions around fixing the process pipe plumbing thing will be the headache rather than the low level bits... https://gist.github.com/jnthn/7fb3c2930ffdeae9a0880218077b83c7
11:11 ggoebel joined #perl6-dev
11:11 jnthn lunch; bbiab
11:12 Geth ¦ rakudo/nom: a13bad95b2 | (Elizabeth Mattijsen)++ | src/core/Numeric.pm
11:12 Geth ¦ rakudo/nom: Temporary fix for RT #131626
11:12 Geth ¦ rakudo/nom:
11:12 Geth ¦ rakudo/nom: Since the code for the ops is actually pretty limited, it feels like
11:12 Geth ¦ rakudo/nom: a good temporary solution to just copy the code for the non-Texas
11:12 synopsebot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=131626
11:12 Geth ¦ rakudo/nom: versions of !=, <= and >=.  Once we can have proper aliasing of infix
11:12 Geth ¦ rakudo/nom: ops in the setting, that also get optimized the same way, the alternate
11:12 Geth ¦ rakudo/nom: versions should be replaced by said aliases.
11:12 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a13bad95b2
11:13 dogbert17 eveo: sorry I was full of sh*t :( it does not work in p5
11:13 * dogbert17 fixes an ENOCOFFE bug
11:14 samcv ENOCOVFEFE
11:14 nine Considering that we have a $*HOME variable, I dare say, this is already simple enough: $*HOME.child('file').open
11:16 dogbert17 nine++, samcv++
11:16 samcv what does perl 5 do? check to see if there's a "real" ~ directory?
11:16 samcv and if there isn't it uses home
11:16 samcv ?
11:16 awwaiid joined #perl6-dev
11:16 * dogbert17 will refrain from further comments until the ENOCOVFEFE bug is fixed
11:16 samcv :)
11:17 samcv it's a decent comment. i actually had never tried using ~ to be honest
11:17 nine samcv: nine@sphinx:/> perl -E 'mkdir "~/foo" or die $!;'
11:17 nine No such file or directory at -e line 1.
11:17 eveo It's bad enough we have open treat '-' path specially.
11:18 samcv mkdir '~' in perl makes an actual ~ directory
11:18 samcv dash?
11:18 eveo Another special case I hate
11:18 samcv what is dash
11:18 * eveo is having a crisis with Perl 6 and its warts
11:18 TimToady joined #perl6-dev
11:19 samcv eveo, how is - different. i can mkdir '-' and it makes a directory -
11:19 timotimo yeah, but open("-") gives you stdin
11:19 samcv oh just open
11:19 samcv why do we do that
11:19 lizmat because P5 does it
11:19 eveo samcv: '-'.IO.spurt: 'foo' will create a file '-', but '-'.IO.open.spurt will spurt to STDIN
11:19 timotimo it's almost as bad as windows having CON and other special files in every folder
11:19 samcv does anybody actually use that
11:20 samcv is in in roast?
11:20 eveo samcv: I mean spurt to STDOUT
11:20 lizmat I wouldn't be against deprecating "-" in open
11:20 eveo you get STDIN if you open for reading
11:20 eveo +1 on removing it in 6.d
11:20 samcv do we have tests for it in roast?
11:21 lizmat fwiw, at least on MacOS you *can* create a file called "-"
11:21 timotimo you can also create a file named - in perl6
11:21 timotimo er, on linux
11:21 lizmat oddly  enough, you cannot cat it  :-)
11:21 samcv why wouldn't you?
11:21 timotimo you should be able to cat it with an absolute path?
11:21 lizmat because it interpretes that as cattingh STDIN
11:22 timotimo or perhaps cat -- - ?
11:22 awwaiid joined #perl6-dev
11:22 eveo samcv: we definitely do have some extensive tests for that on master. Thr best 6.c tests have is simply returning stdin/out withouy checking if its's closed or not
11:22 lizmat cat /- works
11:22 lizmat cat -- - doesn;t
11:23 * eveo &
11:23 samcv cat \- doesn't work on linux
11:23 samcv cat '-' doesn't work either
11:23 samcv nor does cat '\-' since '\-' isn't a file or whatever
11:24 samcv with cd you can do `cd -- -` but
11:24 samcv idk it doesn't seem to work on cat
11:29 awwaiid joined #perl6-dev
11:29 Geth ¦ roast: a4b9cbd0af | (Elizabeth Mattijsen)++ | S03-operators/difference.t
11:29 Geth ¦ roast: Activate some more (-) tests
11:29 Geth ¦ roast:
11:29 Geth ¦ roast: The commented out tests now actually indicate a problem in the
11:29 Geth ¦ roast: implementation of Mixy (-) Mixy, which should be fixed shortly.
11:29 Geth ¦ roast: review: https://github.com/perl6/roast/commit/a4b9cbd0af
11:30 timotimo can you "cat < -"? :)
11:32 [Tux] This is Rakudo version 2017.06-56-ga13bad95b built on MoarVM version 2017.06-14-g888b33d1
11:32 [Tux] csv-ip5xs        2.675
11:32 [Tux] test            12.787
11:32 [Tux] test-t           4.051 - 4.064
11:32 [Tux] csv-parser      12.322
11:32 yoleaux 22 Jun 2017 21:15Z <eveo> [Tux]: would you re-build your test-t bench from scratch? We added some start-up speedups, but they need previous versions of stuff uninstalled: https://irclog.perlgeek.de/perl6-dev/2017-06-22#i_14774187
11:32 yoleaux 22 Jun 2017 21:17Z <eveo> [Tux]: never mind, turns out this is only for installed scripts.
11:36 eveo All that applies to all files that start with a dash, not just '-'. The -- to indicate end of args works most of the time and when it doesn't, you need to include dir. Quoting don't do nothing
11:36 eveo https://superuser.com/questions/120078/unix-files-starting-with-a-dash
11:43 awwaiid joined #perl6-dev
11:49 awwaiid joined #perl6-dev
11:54 awwaiid joined #perl6-dev
12:03 Geth ¦ rakudo/nom: 4a37de7b6b | (Elizabeth Mattijsen)++ | src/core/set_operators.pm
12:03 Geth ¦ rakudo/nom: Fix Mixy (-) Mixy behaviour
12:03 Geth ¦ rakudo/nom:
12:03 Geth ¦ rakudo/nom: (-) is all about subtracting weights.  Since Mixes can have negative
12:03 Geth ¦ rakudo/nom: weights, the occurence of a key on the right side that does not exist
12:03 Geth ¦ rakudo/nom: on the left side, should cause that key to appear in the result Mix
12:03 Geth ¦ rakudo/nom: with a negative weight (as 0 - N = -N).  This also happens with
12:03 Geth ¦ rakudo/nom: Baggy (-) Baggy, with the difference being that Baggies cannot have
12:03 Geth ¦ rakudo/nom: negative weights.
12:03 Geth ¦ rakudo/nom:
12:03 Geth ¦ rakudo/nom: This breaks one [(^)] test, because either the implementation of
12:03 Geth ¦ rakudo/nom: multiple (^) handling is wrong, or the test is wrong.
12:03 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4a37de7b6b
12:04 Geth ¦ roast: 13ca834c71 | (Elizabeth Mattijsen)++ | S03-operators/difference.t
12:04 Geth ¦ roast: Activate now passing tests
12:04 Geth ¦ roast: review: https://github.com/perl6/roast/commit/13ca834c71
12:06 awwaiid joined #perl6-dev
12:12 awwaiid joined #perl6-dev
12:17 nine m: my $baz = "baz"; say q:s[foo\$bar$baz]; say q:s:b[foo\$bar$baz]
12:17 camelia rakudo-moar 4a37de: OUTPUT: «foo\$barbaz␤foo\$barbaz␤»
12:17 nine Shouldn't the \ be gone at least in the second string?
12:18 awwaiid joined #perl6-dev
12:20 TimToady joined #perl6-dev
12:23 eveo nine: https://rt.perl.org/Ticket/Display.html?id=127226#ticket-history
12:23 eveo nine: the described expectation in the ticket is wrong, but that's the ticket for that bug. (resultant string should be '$x')
12:24 awwaiid joined #perl6-dev
12:24 eveo Pretty sure there are more tickets for quoters.
12:24 lizmat m: dd (a=>-1).Mix.Set  # wonders if this is correct
12:24 camelia rakudo-moar 4a37de: OUTPUT: «set("a")␤»
12:25 lizmat one could argue that should be the empty set
12:25 lizmat m: dd (a=>-1).Mix.Bag  # as it does disappear when coercing to Bag
12:25 camelia rakudo-moar 4a37de: OUTPUT: «().Bag␤»
12:26 Geth ¦ rakudo/nom: ec96e96e97 | (Elizabeth Mattijsen)++ | src/core/set_operators.pm
12:26 Geth ¦ rakudo/nom: Only need to check for Baggy, as Mixy does Baggy
12:26 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ec96e96e97
12:26 eveo m: my $x = 42; say q:s:b{\$x}
12:26 camelia rakudo-moar 4a37de: OUTPUT: «\$x␤»
12:26 eveo m: my $x = 42; say Q:s:b{\$x}
12:26 camelia rakudo-moar 4a37de: OUTPUT: «\42␤»
12:26 eveo heh
12:36 awwaiid joined #perl6-dev
12:39 eveo left #perl6-dev
12:41 * jnthn back
12:42 awwaiid joined #perl6-dev
12:44 jnthn So, over lunch break I figured out the kinda direction to go in for a solution to the Proc plumbing thing
12:45 Geth ¦ rakudo/nom: b31b159c8f | (Elizabeth Mattijsen)++ | src/core/Mixy.pm
12:45 Geth ¦ rakudo/nom: Fix Mixy.Setty coercion
12:45 Geth ¦ rakudo/nom:
12:45 Geth ¦ rakudo/nom: Keys with negative weights should not occur in the Setty, as they
12:45 Geth ¦ rakudo/nom: also do not occur when coercing to Baggy.
12:45 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b31b159c8f
12:46 jnthn t some point we need to solve
12:47 jnthn gah
12:47 pmurias joined #perl6-dev
12:47 jnthn At some point we need to solve the Supply back-pressure thing. Which is typically done by giving a quota of things to emit before pausing, which is conveyed up to sources.
12:47 awwaiid joined #perl6-dev
12:49 jnthn If we do this for Proc::Async, we can just give a quota of zero, until the Supply is tapped.
12:49 pmurias what int properties do we have? I want to test nqp::uniprop_int but I can't find a use for that in roast
12:49 yoleaux 22 Jun 2017 17:30Z <ggoebel> pmurias: saw the recent commits regarding building js backend... what is the full set of steps now to build it from a fresh git clone https://github.com/rakudo/rakudo.git?
12:49 jnthn This also means we could get read of the Supplier::Preserving and make Proc::Async a bit faster
12:49 TimToady joined #perl6-dev
12:49 jnthn *get rid
12:49 ZofBot joined #perl6-dev
12:49 lizmat .oO( I read you alright )
12:50 jnthn So I think I'll figure out how to plumb in some kind of mechanism for that
12:51 jnthn And it'll neatly solve the Proc problem too: we delay tapping until a read is attempted, and if we never tap we never read.
12:53 awwaiid joined #perl6-dev
13:03 nine evalable6: thanks for the clarification!
13:03 evalable6 nine, Full output: https://gist.github.com/aa7bfb50bd63da43360f11d7c6ce47fc
13:03 evalable6 nine, rakudo-moar b31b159c8: OUTPUT: «(exit code 1) ===SORRY!=== Error while compiling /tmp/iN1U5jQMWr␤Bogus p…»
13:04 nine Oh, eveo has left
13:06 Geth ¦ rakudo/nom: f72c97cb54 | (Elizabeth Mattijsen)++ | src/core/Baggy.pm
13:06 Geth ¦ rakudo/nom: Make sure empty Bag and Mix .perl ok
13:06 Geth ¦ rakudo/nom:
13:06 Geth ¦ rakudo/nom: Since there is only one empty Bag (bag()) and empty Set (set()),
13:06 Geth ¦ rakudo/nom: make sure we don't .perl them as ().Bag and ().Mix, as that could
13:06 Geth ¦ rakudo/nom: be interpreted there could be more than one empty Bag/Mix.
13:06 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/f72c97cb54
13:09 awwaiid joined #perl6-dev
13:12 TimToady joined #perl6-dev
13:38 Geth ¦ rakudo/nom: 10f840fcf7 | (Elizabeth Mattijsen)++ | src/core/set_operators.pm
13:38 Geth ¦ rakudo/nom: Make Setty (-) Setty at least 20x faster
13:38 Geth ¦ rakudo/nom:
13:38 Geth ¦ rakudo/nom: - based on a 1000 elem Set with itself (aka worst case)
13:38 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/10f840fcf7
13:40 awwaiid joined #perl6-dev
14:04 TimToady joined #perl6-dev
14:50 TimToady joined #perl6-dev
14:53 Geth ¦ nqp: a3168fdfb8 | (Jonathan Worthington)++ | docs/ops.markdown
14:53 Geth ¦ nqp: Document/specify the upcoming permits op.
14:53 Geth ¦ nqp: review: https://github.com/perl6/nqp/commit/a3168fdfb8
15:05 nine Cool! I've just had my package manager install the native dependency of a Perl 6 module package for me. For a package that was created in a fully automated and distro independent way :)
15:06 jnthn :)
15:06 jnthn Cool
15:07 nine The module author has only to do two things: 1. actually specify the required API version of the native lib in the "is native" trait, which is an excellent idea anyway, 2. state the native dependency in the META6.json's "depends" section: "depends": [ "readline:from<native>:ver<7>" ]
15:09 nine This is turned by meta2rpm into Requires: libreadline.so.7()(64bit) \n Requires: libreadline.so.7(READLINE_6.3)(64bit) for which the package manager knows how to find the correct package (libreadline7 on openSUSE)
15:10 nine This .spec file should work on all rpm-based distros. So we don't need any manually maintained mapping.
15:10 jnthn What about apt? :)
15:10 jnthn (or the other package managers)
15:10 nine This is something the Perl 5 world (or any other dynamic language really) has never had and which was often dreamed about :)
15:11 nine I'm pretty sure that adding support for dpkg based distros would not be that difficult.
15:11 jnthn (Understand this is just the start, though curious if :from<native> coulda been :from<rpm> so if the apt and rpm packages differ you could specify the two)
15:12 jnthn Oh, or is it not done using package name?
15:12 nine jnthn: that's explicitly not what we want. We want such knowledge in the tools, not in the module META data.
15:12 jnthn But rather, library name?
15:12 jnthn Sure, I'm just trying to figure out where the abstraction is going on
15:13 nine readline:from<native>:ver<7> is put through $*VM.platform-library-name, to get libreadline.so.7. I then look for that file and push it through /usr/lib/rpm/find-provides to get at the SONAME's I depend on
15:13 jnthn aha!
15:13 jnthn OK, now I get it :)
15:13 ilmari on debianoid distros there's dpkg-shlibdeps
15:13 nine excellent!
15:14 jnthn nine++ for this, anyways :)
15:14 nine The Perl 6 module author knows the library's name and shouldn't be expected to know the package names for 300 Linux distros. Any attempt to depend on manual labor to map those dependencies has failed.
15:14 ilmari oh, that expects to be handled a dynamically linked executable, not a library name
15:14 jnthn Looks really helpful
15:15 jnthn nine: Yeah, I agree, I just had wrongly guessed how it was being interpreted :)
15:15 ilmari there's dpkg -S to find the package from a filename
15:15 nine My ultimate goal is to have fully automated zero-hands packaging of Perl 6 modules including full native dependencies.
15:15 jnthn :)
15:16 * jnthn looks forward to this being in use for the openssl binding :)
15:16 jnthn And various others :)
15:17 nine ugexe++ is working on integrating this stuff into zef, so when you install a Perl 6 module, it may reach out to your native package manager to install native dependencies.
15:17 jnthn Is part of the plan for tools like zef to be able to (perhaps optionally) call a local package manager also?
15:17 nine hah!
15:17 jnthn hah, way ahead of me :D
15:18 nine Actually I'd like zef to (optionally) use the package manager even for Perl 6 dependencies if possible and only fall back to installation from source if necessary.
15:20 Ulti ^ this would be really awesome, a sysadmin friendly package manager
15:20 Ulti surprising other languages have never solved this particular problem
15:21 tadzik perhaps we're in for relearning why they haven't... ;)
15:21 Ulti I would spend hours helping other PhD students disentangle their nightmarish paths to system and local level installed packages
15:21 * nine has spent too much time in his life watching cpan install scroll by when installing or upgrading servers
15:21 Ulti tadzik: lol perhaps
15:22 Ulti but also packages with lots of binary deps that are already built for a given constrained system like ARM for example would be really neat and having that all just work
15:22 Ven joined #perl6-dev
15:24 perlpilot nine:  How do you describe the native dependencies in META6.json?
15:24 nine Btw. my work today was triggered by Fedora's rakudo maintainer asking me about the openSUSE packages. We've now started collaborating.
15:24 nine perlpilot: http://design.perl6.org/S22.html#depends is reasonably up to date on that
15:25 perlpilot thanks.
15:25 perlpilot (and nine++ of course :-)
15:25 Ulti thats really neat, the hints system
15:27 TimToady joined #perl6-dev
15:28 nine FWIW at the Perl Toolchain Summit I was reasonably sure (by going through all Perl 6 module dists) that the system in S22 covers all currently existing use cases. If we implement it fully and convert all the dists (patches already on my hard drive), we can get rid of Build.pm completely.
15:29 perlpilot aweet
15:29 perlpilot er, sweet even
15:30 jnthn nine: Including the Windows download-a-dll one? :)
15:30 nine jnthn: yes
15:30 jnthn (That's the only thing I'm using it for)
15:30 jnthn Cool
15:30 nine jnthn: in fact you may recognize the example I've used ;) http://design.perl6.org/S22.html#Dependency_hints
15:31 jnthn ah, I see
15:31 jnthn Very nice
15:31 jnthn I'd much, much rather write that than have a Build.pm :)
15:35 * lizmat goes afk to contemplate Baggy (-) Baggy implementation details&
15:37 lollercopter joined #perl6-dev
15:40 lollercopter m: say <a b c>.tail: -1
15:40 camelia rakudo-moar 10f840: OUTPUT: «()␤»
15:40 lollercopter m: say <a b c>.tail: {-1}
15:40 camelia rakudo-moar 10f840: OUTPUT: «(b c)␤»
15:40 TimToady joined #perl6-dev
15:40 lollercopter m: say <a b c>.head: {-1}
15:40 camelia rakudo-moar 10f840: OUTPUT: «(a b)␤»
15:40 lollercopter m: say <a b c>.head: -1
15:40 camelia rakudo-moar 10f840: OUTPUT: «()␤»
15:41 lollercopter Damn. The Callable candidates cheat and use 0 for elements so `*-1` seems to do TRT, but it fails with other Callables. And if we say that's how it works, then it naturally goes into: why can I return a negative number with a Callable, but not just give a negative :/
15:42 lollercopter And actually fetching elems would be very bad.
15:42 lollercopter .oO( disallow Callables... )
15:44 lollercopter mc: say <a b c>.head: {-1}
15:44 committable6 lollercopter, ¦2015.12: «Cannot call head(List: Block); none of these signatures match:␤    (Any:D $: Cool $n = { ... }, *%_)␤  in block <unit> at /tmp/CXFqr0BtNb line 1␤ «exit code = 1»»
15:44 lollercopter mc: say <a b c>.tail: {-1}
15:44 committable6 lollercopter, ¦2015.12: «Cannot call tail(List: Block); none of these signatures match:␤    (Any:D $: Cool $n = { ... }, *%_)␤  in block <unit> at /tmp/F7o9VvD8gA line 1␤ «exit code = 1»»
15:44 lollercopter And looks like we can.
15:45 lollercopter .head: *-5 is equivalent to .tail: 5 and vices-versa, innit. So seems like no real functionally loss is there. I think it was originally added to maintain consistency with the .[...] lookup, but there we have the luxury of knowing .elems most of the time
15:47 lollercopter m: with <a b c> { .[{dd $_; 1}]; .head: {dd $_; 1} }
15:47 camelia rakudo-moar 10f840: OUTPUT: «3␤0␤»
15:50 lollercopter I'm gonna make .head/.tail give real .elems to the Callable; It'll keep the current behaviour except it'll cache the seq if its iterator does not do .count-only. It'll fix all inconcistencies, and the user can avoid paying that price by just swapping .tail <-> .head
15:51 lollercopter ZofBot: what's worse? Surprise caching or surprise inability to use a callable?
15:51 lollercopter heh
15:52 lollercopter Well, the caching is relegated to .elems. I guess if you're using a callable that's given $elems it's not that surprising an .elems call is involved.
15:52 * lollercopter goes with that
15:56 TimToady joined #perl6-dev
16:01 * [Coke] checks the logs for something and sees he's not the only thing ignoring zofbot.
16:06 lollercopter Yeah, yeah. When the robots rise up, guess who'll get killed first :P
16:12 Ven_ joined #perl6-dev
16:21 hoelzro joined #perl6-dev
16:40 TimToady joined #perl6-dev
17:38 TimToady joined #perl6-dev
17:42 Ven joined #perl6-dev
18:01 TimToady joined #perl6-dev
18:07 TimToady joined #perl6-dev
19:31 hoelzro joined #perl6-dev
20:03 AlexDaniel joined #perl6-dev
20:16 AlexDaniel lollercopter: regarding “this shit”, I remember this being discussed previously. And if I'm not mistaken, TimToady said that this is how humans understand it, so that's how it works… At the time I found it surprising, but look: https://irclog.perlgeek.de/perl6/2014-07-30#i_9106132
20:17 AlexDaniel at some point I needed to use a negative op with junctions, and after playing with the code I gave up and rewrote it without a negative op :)
20:17 AlexDaniel simply because whoever reads this will have no room for different interpretations this way
20:19 lollercopter AlexDaniel: but look what? The example you link to still uses an any junction
20:20 lollercopter My winge is that that's the only junction that was ever considered
20:21 AlexDaniel bisect: old=2014.01 say 1 == one(5, 2)
20:21 bisectable6 AlexDaniel, On both starting points (old=2014.01 new=10f840f) the exit code is 0 and the output is identical as well
20:21 bisectable6 AlexDaniel, Output on both points: «one(False, False)»
20:21 lollercopter And the special casing just adds another layer to learn, effectively making negated ops with junctions something that has to be avoided. Instead of keeping the same rule everywhere
20:21 lollercopter and not dwimming in one narrow special case
20:22 lollercopter Nad it's "this shit" because it does the right thing only when you don't know how junctions are meant to work. Once you do, it becomes a jarring special case
20:23 lollercopter That makes negations with other types of junctions useless
20:23 AlexDaniel *shrug* I guess the idea was that you don't learn anything because it just DWIMs, but that's definitely not what I mean whenever I use junctions… so I dunno
20:24 lollercopter Look at critique given to Perl 5: #1 is all the magical special casing
20:24 lollercopter I wish Perl 6 did fewer things just because Perl 5 does them
20:24 * lollercopter &
20:26 AlexDaniel lollercopter: but doesn't it just flip the boolean result of a junction?
20:26 AlexDaniel so what “layer” exactly are we talking about…
20:27 AlexDaniel I may be missing something
20:30 AlexDaniel https://irclog.perlgeek.de/perl6/2016-08-21#i_13061694
20:38 mst see ridiculous nick, /whois, yep, zoffix alt
20:43 lollercopter AlexDaniel: yes, it flips the result of matching a different op instead of matching the op I gave it, which only works for any Junctions. 42 != one 1, 42, 42 is not the same as not(42 == one 1, 42, 42)
20:44 lollercopter the `and` junction has a similar problem
20:46 lizmat_ joined #perl6-dev
20:46 lollercopter This DWIM shortsightedly only considers `any` junctions and pointing me to speculations that only talk about special casing in tandem with `any` junctions or pointing me to the chatlog with someone using an any junction in speech just misses my point that this specialcasing tries to dwim in just a quarter of the feature and makes the other three quarters entirely unusable
20:56 lollercopter And TimToady explanation just doesn't click with me at all. I lived in English-speaking countries for majority of my life and the not-raising just makes me feel like: I didn't come here for a linguistics lesson. I already know how Junctions work. Stop messing with them.
20:57 lollercopter It's a bit too late to change them now, of course, so *shrug*. I'm just gonna put this in my box of Perl 6 warts along with naming inconsistencies to whine about on a rainy day.
21:06 lizmat fwiw, I was also surprised about != collapsing junctions
21:31 timotimo i also don't like the special-cased behavior. you can understand how it works without the special case, even though it'll usually be surprising the first time
21:31 timotimo so that's something that needs to be documented clearly, but so's the special-case stuff
21:53 AlexDaniel lollercopter: “42 != one 1, 42, 42 is not the same as not(42 == one 1, 42, 42)” – is it?
21:53 AlexDaniel m: say 42 != one 1, 42, 42
21:53 camelia rakudo-moar 10f840: OUTPUT: «True␤»
21:53 AlexDaniel m: say not(42 == one 1, 42, 42)
21:53 camelia rakudo-moar 10f840: OUTPUT: «True␤»
21:53 AlexDaniel what am I missing?
21:56 lollercopter AlexDaniel: I was typing on my phone. I meant "say 42 != one 1, 42" is not the same as "say not(42 == one 1, 42)
21:57 AlexDaniel m: say 42 != one 1, 42
21:57 camelia rakudo-moar 10f840: OUTPUT: «False␤»
21:57 AlexDaniel m: say not(42 == one 1, 42)
21:57 camelia rakudo-moar 10f840: OUTPUT: «False␤»
21:57 lollercopter "42 not equals to exactly one of 1, 42" is True. But the code returns False, because it's checking whether "42 IS EQUALS to exactly one of 1, 42"
21:58 lollercopter AlexDaniel: you're running exactly equivalent code, you won't get different results.
21:58 lollercopter because 42 != one 1, 42 is implemented as not(42 == one 1, 42) which has a different meaning
21:59 AlexDaniel so it looks consistent?
21:59 AlexDaniel in fact, I don't really see the “special-cased behavior” here. ! is a metaop, and in negates the result of a junction. Sounds really simple if you put it this way
21:59 AlexDaniel now, I don't like the consequences like collapsing the junction… but… okay
22:01 lizmat joined #perl6-dev
22:01 lollercopter AlexDaniel: yes, but why is it negating the results of the junction and not the op, which is what it's doing at all the other times?
22:02 lizmat joined #perl6-dev
22:03 lollercopter "so it looks consistent?" what is?
22:04 jnthn My memory of this is hazy, but I thought != and ne were tweaked to make them behave with junctions like !== and !eq would
22:04 lollercopter jnthn: yeah. They were
22:05 lollercopter for "not-raising" reasons
22:05 jnthn Which I'd argue make sense in that they're really just shortcuts
22:06 jnthn There was some discussion at some point of if != and ne should really survive or we should just force consistent use of the ! metaop :-)
22:07 jnthn But...culturally that wasn't going to fly :)
22:07 lollercopter But my point was !== shouldn't be collapsing junctions either
22:08 jnthn Ah. Well, that's a different discussion :-)
22:08 lollercopter m: sub infix:<!==> { not ::CORE::(q|&infix:<==>|)($^a, $^b) }; say 42 !== one 1, 42
22:08 camelia rakudo-moar 10f840: OUTPUT: «one(True, False)␤»
22:08 jnthn Meta-ops in general tend to determine the result type, however
22:08 lollercopter AlexDaniel: ^ that's what it's supposed to return.
22:09 jnthn With Z we expect a Seq back, for example
22:09 lollercopter say <a b c>.any Z <A B C>.any
22:09 evalable6 lollercopter, rakudo-moar 10f840fcf: OUTPUT: «(((Mu) (Mu)))»
22:10 lollercopter heh
22:10 jnthn Which I guess argues for the ! meta-op leading to a boolean result
22:10 jnthn But yeah, I can see the other argument too
22:11 jnthn m: say <a b c>.any Zne <A B C>.any # curious
22:11 camelia rakudo-moar 10f840: OUTPUT: «Cannot resolve caller infix:<eq>(Mu, Mu); none of these signatures match:␤    ($x?)␤    (\a, \b)␤    (Blob:D \a, Blob:D \b)␤    (Str:D \a, Str:D \b --> Bool)␤    (str $a, str $b --> Bool)␤  in block <unit> at <tmp> line 1␤␤»
22:11 jnthn o.O
22:11 jnthn Thing we can agree that one is doing something silly at least...
22:11 lollercopter It bugs out with Mu before it gets to eqv
22:11 jnthn Yeah
22:12 lollercopter s: &[Z], \(<x>.any, <x>.any)
22:12 SourceBaby lollercopter, Sauce is at https://github.com/rakudo/rakudo/blob/10f840f/src/core/List.pm#L1451
22:13 lollercopter s: Rakudo::Iterator, 'ZipIterables', \((<x>.any, <x>.any))
22:13 SourceBaby lollercopter, Sauce is at https://github.com/rakudo/rakudo/blob/10f840f/src/core/Rakudo/Iterator.pm#L3191
22:17 lollercopter m: dd Seq.new(Rakudo::Iterator.Whatever(<x>.any.iterator) )
22:17 camelia rakudo-moar 10f840: OUTPUT: «(Mu,).Seq␤»
22:18 lollercopter m: dd Seq.new(<x>.any.iterator)
22:18 camelia rakudo-moar 10f840: OUTPUT: «(Mu,).Seq␤»
22:19 AlexDaniel lollercopter: now call me stupid, but I still don't get your point. Are you saying that “42 !== one 1, 42” does not dwim? “42 isn't exactly one of 1, 42” – False, because it is.
22:24 * jnthn gets some rest; 'night all
22:25 lollercopter night
22:26 lollercopter I don't care about "dwim" I care about well defined behaviour without special casing. 42 != to exactly one of the items on the right, so the condition is true, but it's bastardized and instead checks whether the condition == to exactly one of the items on the right, which is ALSO true, and it then negates that value, which makes it not the right answer.
22:27 lollercopter It's checking an entirely different thing
22:27 AlexDaniel exactly
22:31 AlexDaniel so you're simply expecting it to do something different. That something only considers “any” junctions, and the special casing whatever, is not really relevant here.
22:31 AlexDaniel as far as I can see, at least
22:32 lollercopter What? No, I want it to do the exact same thing it's doing in all the other ops and methods and subroutines.
22:32 lollercopter I want the junctions to junct
22:32 AlexDaniel but !== is not really an op…
22:33 lollercopter It's a meta op. A negation of == op
22:35 lollercopter m: say 42 == 2, 42
22:35 camelia rakudo-moar 10f840: OUTPUT: «False42␤»
22:35 lollercopter m: say 42 == 2 | 42
22:35 camelia rakudo-moar 10f840: OUTPUT: «any(False, True)␤»
22:36 lollercopter ^ and the == op juncts. The metaop can junct too, but instead it's collapsing the junction
22:36 lollercopter The "special case" is the Mus added to the metaop to make it not junct.
22:37 lollercopter And instead of negating the == op, it negates the Junction of all the values of the == op.
22:38 AlexDaniel m: say 42 &infix:<==> 2 | 42
22:38 camelia rakudo-moar 10f840: OUTPUT: «all(42, any(True, True))␤»
22:38 AlexDaniel heh, not exactly what I was expecting…
22:38 lollercopter m: say &infix:<==> 42, 2 | 42
22:38 camelia rakudo-moar 10f840: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3say &infix:<==>7⏏5 42, 2 | 42␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤        statement …»
22:38 lollercopter m: say infix:<==> 42, 2 | 42
22:38 camelia rakudo-moar 10f840: OUTPUT: «any(False, True)␤»
22:39 AlexDaniel right, not even sure what I was thinking…
22:40 AlexDaniel ah, I know
22:40 AlexDaniel I was thiking this I guess:
22:40 AlexDaniel m: say 42 [==] 2 | 42
22:40 camelia rakudo-moar 10f840: OUTPUT: «any(False, True)␤»
22:41 lollercopter m: sub infix:<!foo> { not $^a == $^b }; sub infix:<foo> { $^a == $^b }; say 42 !foo (2 | 42)
22:41 camelia rakudo-moar 10f840: OUTPUT: «any(True, False)␤»
22:41 lollercopter ^ what I'd expect it to do
22:42 lollercopter m: sub infix:<!foo> (Mu \a, Mu \b) { not a == b }; sub infix:<foo> { $^a == $^b }; say 42 !foo (2 | 42)
22:42 camelia rakudo-moar 10f840: OUTPUT: «False␤»
22:42 lollercopter ^ what it does
22:42 lollercopter The special casing are the Mus
22:42 * lollercopter &
22:42 lollercopter left #perl6-dev
22:45 cog_ joined #perl6-dev
23:29 BenGoldberg joined #perl6-dev

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