Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-09-27

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:04 colomon joined #perl6
00:24 mr_ron left #perl6
00:26 mr_ron joined #perl6
00:26 mr_ron m: sub md5-block(@H is rw, @X) {}
00:26 camelia rakudo-moar 0132b6: OUTPUT«5===SORRY!5=== Error while compiling /tmp/JG3vifxubI␤Can only use 'is rw' on a scalar ('$' sigil) parameter␤at /tmp/JG3vifxubI:1␤»
00:43 Timbus_ mr_ron: you might find it's already 'rw' enough for you
00:54 mr_ron Timbus: its an error I'm getting from building Task::Star when building Digest::MD5 which does that on line 41 of MD5.pm breaking my Task::Star build ...
00:55 Timbus_ oh
00:56 Timbus_ time to bug cosimo ?
00:58 Timbus_ oh snap haha you're already on the case
00:58 mr_ron I cloned the repository, took out the rw, and pointed projects.json at my clone.  It got me around the problem.  I may bug moritz++ if the Task::Star build finishes.
00:59 mr_ron s/cloned/forked/
01:02 skids joined #perl6
01:04 mr_ron panda completed installing the revised Task::Star
01:12 mr_ron .tell moritz I tried to install rakudo star with rakudobrew and panda install Task::Star.  It failed to install Digest::Md5 because line 41 of MD5.pm reads "sub md5-block(@H is rw, @X) {" and the current rakudo does not like the "is rw".  I forked and took out the "is rw" and pointed projects.json at my fork and Task::Star built OK.  Could you take out the "is rw".
01:12 yoleaux mr_ron: I'll pass your message to moritz.
01:13 mr_ron .tell moritz s/Could you takeout .../Could you please take out the "is rw"?/
01:13 yoleaux mr_ron: I'll pass your message to moritz.
01:33 colomon joined #perl6
01:37 xinming_ joined #perl6
01:45 vendethiel joined #perl6
02:09 dalek faq: 8964bde | ShimmerFairy++ | answers.md:
02:09 dalek faq: Add answer for needing unspace with method calls
02:09 dalek faq:
02:09 dalek faq: It's a bit long, but hopefully comprehensive enough to be a satisfactory
02:09 dalek faq: answer. Improvements of course welcome :) .
02:09 dalek faq: review: https://github.com/perl6/faq/commit/8964bde792
02:12 dalek faq: 6b3cecc | ShimmerFairy++ | answers.md:
02:12 dalek faq: A couple grammar/wording improvements.
02:12 dalek faq: review: https://github.com/perl6/faq/commit/6b3cecc301
02:21 aborazmeh joined #perl6
02:21 aborazmeh joined #perl6
02:39 noganex joined #perl6
02:43 dalek rakudo-star-daily: cce58f2 | coke++ | log/ (9 files):
02:43 dalek rakudo-star-daily: today (automated commit)
02:43 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/cce58f24fc
02:45 mr_ron joined #perl6
02:50 dalek rakudo/nom: 73836e1 | TimToady++ | src/core/ (7 files):
02:50 dalek rakudo/nom: infixes that should likely be pure
02:50 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/73836e1a70
02:51 nightfrog joined #perl6
02:58 xinming joined #perl6
03:20 TimToady .tell awwaiid --> belong in the signature because it enables return typing on lambdas
03:20 yoleaux TimToady: I'll pass your message to awwaiid.
03:44 adu joined #perl6
03:48 zostay m: my $x = 10; $x max= [max] 4, 6, 8; $x.say;
03:48 camelia rakudo-moar 73836e: OUTPUT«10␤»
03:52 mr_ron joined #perl6
04:26 rmgk_ joined #perl6
04:29 tokuhiro_ joined #perl6
05:13 RabidGravy joined #perl6
05:16 awwaiid interesting reason TimToady. I will noodle that.
05:16 yoleaux 03:20Z <TimToady> awwaiid: --> belong in the signature because it enables return typing on lambdas
05:24 mr_ron joined #perl6
05:35 tokuhiro_ joined #perl6
05:35 rurban joined #perl6
05:38 kaare__ joined #perl6
05:45 adu noodle?
05:57 moritz .tell mr_ron that's what the R* releases are for: they are snapshots where the version of rakudo and the modules match
05:57 yoleaux 01:12Z <mr_ron> moritz: I tried to install rakudo star with rakudobrew and panda install Task::Star.  It failed to install Digest::Md5 because line 41 of MD5.pm reads "sub md5-block(@H is rw, @X) {" and the current rakudo does not like the "is rw".  I forked and took out the "is rw" and pointed projects.json at my fork and Task::Star built OK.  Could you take out the "is rw".
05:57 yoleaux moritz: I'll pass your message to mr_ron.
05:57 yoleaux 01:13Z <mr_ron> moritz: s/Could you takeout .../Could you please take out the "is rw"?/
06:04 dalek rakudo/nom: cb25b2f | TimToady++ | src/Perl6/ (2 files):
06:04 dalek rakudo/nom: Allow infix:<.> if next thing is alphabetic
06:04 dalek rakudo/nom:
06:04 dalek rakudo/nom: As much as I mistrust "fluent" programming, we already have an infix:<.=>
06:04 dalek rakudo/nom: operator, so it's not a big stretch to have infix:<.>.  We limit it
06:04 dalek rakudo/nom: to actual method names so that we can detect (most) accidental use
06:04 dalek rakudo/nom: of P5's use of . for concatenation.  Note that this is a term/infix
06:04 dalek rakudo/nom: distinction now, so .meth where a term is expected still defaults to $_.
06:04 dalek rakudo/nom: Community standards for method cascades will likely ask for whitespace
06:04 dalek rakudo/nom: around infix:<.> to make a visual disinction from the term form, but we
06:04 dalek rakudo/nom: don't enforce that, if for no other reason than to refrain from giving
06:04 dalek rakudo/nom: the fluent programmers something to yammer on about.  Basically, I've
06:04 dalek rakudo/nom: decided that the slight possibility for greater confusion is outweighed
06:04 dalek rakudo/nom: by consistency with .= and utility of have a . that can also serve as
06:04 dalek rakudo/nom: a precedence modifier.  (Since both .= and . parse leftward with
06:04 dalek rakudo/nom: item assignment precedence, but rightward as a term.)
06:04 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/cb25b2f475
06:06 ShimmerFairy TimToady: ironically the "fluent programming" page on wikipedia isn't very good at saying what it actually is, so I still don't quite understand "fluent" programming :P
06:09 TimToady Anyway, we can now do cascaded methods to the next line without a \ as long as it's a normal looking method
06:10 ShimmerFairy Sounds fair to me, though I personally have never actually lined up method calls, come to think of it :) . It's always been either method arguments or nested sub calls (e.g. nqp::op(...) "trees")
06:12 TimToady though I don't like the style, I decided it was allowable without too much pain to the rest of us :)
06:12 ShimmerFairy I suppose you could think of the dot as a strange, twisted kind of concatenation, in that you bring together a bunch of things to produce one singular object, which is how read things like +$foo.bar.baz.quux to remember the prefix is after method calls.
06:13 TimToady but . will let you run the + before the method now, due to precedence, and the spacing will be intuitive
06:13 ShimmerFairy I also think P5-isms are less of a concern now, enough that I don't worry about this change interfering with the worryobs :)
06:14 ShimmerFairy TimToady: so +$foo.bar means +($foo.bar), and +$foo . bar means (+$foo).bar ? Sounds almost intuitive :P
06:14 TimToady pretty nearly almost :)
06:15 * JimmyZ heard that many guys around the Community are waiting for the 1.0 beta release news ..
06:16 ShimmerFairy TimToady: also, thanks for invalidating my carefully constructed FAQ answer mere hours after pushing it :P . Though while writing it I was thinking "could someone write an infix:<.> ? But that would probably require a slang, being a 'special' operator"
06:19 TimToady JimmyZ: well, it's a beta of an official release, it's not an official beta release :)
06:19 TimToady but we're certainly clamping down on language changes after my birthday, and if we liked, we could label a version of the test suite as "first beta"
06:20 TimToady but the beta is the test suite, not an actual release, so October's rakudo will be the first "beta" rakudo really, in my mind
06:21 ShimmerFairy TimToady: is my proposed S32::Stringy too much of a change this close, then? Honestly, part of me would be happy to shelve it for 6.1, and focus again on improving Pod6 instead. :)
06:21 TimToady unless we want to do an extra release next week just so we can say "supports 6.birthday"
06:22 TimToady I need to do more than just skim it
06:23 ShimmerFairy TimToady: I'm alright with saving it for a future Perl 6. It's not a revolutionary change to S32::Str, but I could easily see it being too close for comfort by now.
06:23 JimmyZ TimToady: many chinese friends ask me about it(the news) :P
06:23 ShimmerFairy .oO(Test Suite 6.???? )
06:35 dalek rakudo/nom: db0c46e | moritz++ | lib/NativeCall.pm:
06:35 dalek rakudo/nom: NativeCall: explicitly-manage does not need its string arg "is rw"
06:35 dalek rakudo/nom:
06:35 dalek rakudo/nom: it modifies the string by mixing something in, not via the container.
06:35 dalek rakudo/nom: This should fix a test failure in DBIish, which calls explicitly-manage
06:35 dalek rakudo/nom: on a non-container
06:35 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/db0c46e744
06:38 TimToady m: say -42 . abs + 5
06:38 camelia rakudo-moar cb25b2: OUTPUT«47␤»
06:38 TimToady m: -42 . abs . say
06:38 camelia rakudo-moar cb25b2: OUTPUT«42␤»
06:39 ShimmerFairy reminds me of lisp or haskell all of a sudden :)
06:41 Fleurety joined #perl6
06:41 ShimmerFairy m: say -42.abs + 5
06:41 camelia rakudo-moar cb25b2: OUTPUT«-37␤»
06:41 ShimmerFairy And I suppose it's one way to solve the -42 issue that came up a while back :)
06:44 mr_ron joined #perl6
06:50 TimToady JimmyZ: otoh, the September release is pretty close to beta quality
06:52 JimmyZ TimToady: yeah, they are waiting for the news(about 1.0 beta), not the star relases, haha
06:53 Loren joined #perl6
06:53 Loren afternoon, #perl6
06:56 JimmyZ TimToady: and happy birthday!
07:03 TimToady yup, now it's my birthday here :)
07:04 TimToady We are now officially in beta. :)
07:04 JimmyZ ;)
07:06 ShimmerFairy ???? !  :)
07:08 dalek rakudo/nom: 96c2ec9 | TimToady++ | src/core/Perl.pm:
07:08 dalek rakudo/nom: change to 6.Birthday
07:08 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/96c2ec9613
07:10 * TimToady heads off to sleep the first part of his birthday...
07:11 JimmyZ good night
07:12 Loren good night .. :)
07:24 _itz_ joined #perl6
07:37 tokuhiro_ joined #perl6
08:12 darutoko joined #perl6
08:18 masak good antenoon, #perl6
08:19 masak happy b-day, TimToady. wishing you peace, and long life.
08:19 DrForr Morning.
08:20 TEttinger I hope TimToady gets a gift of hundreds of pull requests fixing every issue in Perl6 for the next year
08:20 FROGGS joined #perl6
08:25 rurban joined #perl6
08:31 Loren That's a pretty gift.
08:33 TEttinger it might take a year to arrive
08:38 tokuhiro_ joined #perl6
08:44 adu joined #perl6
08:50 vendethiel joined #perl6
08:51 araujo joined #perl6
09:14 nbd_ joined #perl6
09:16 xinming joined #perl6
09:25 xinming joined #perl6
09:26 [Tux] test             50000    35.068    34.967
09:26 [Tux] test-t           50000    35.727    35.626
09:36 FROGGS o/
09:36 yoleaux 26 Sep 2015 20:16Z <lizmat> FROGGS: I commented on your comment on https://gist.github.com/lizmat/f3807956c354c14902a3
09:44 FROGGS .tell lizmat I commented on your comment on my comment :o) - https://gist.github.com/lizmat/f3807956c354c14902a3#gistcomment-1582671
09:44 yoleaux FROGGS: I'll pass your message to lizmat.
09:49 spider-mario joined #perl6
09:56 yqt joined #perl6
09:58 brrt joined #perl6
10:00 pmurias joined #perl6
10:14 abaugher joined #perl6
10:19 rindolf joined #perl6
10:20 mattprelude joined #perl6
10:28 brrt good * #perl6
10:30 leont joined #perl6
10:30 Akagi201 joined #perl6
10:32 Khisanth joined #perl6
10:40 tokuhiro_ joined #perl6
10:42 * lizmat wishes TimToady a Happy Birthday
10:42 yoleaux 09:44Z <FROGGS> lizmat: I commented on your comment on my comment :o) - https://gist.github.com/lizmat/f3807956c354c14902a3#gistcomment-1582671
10:42 lizmat and thanks him for the give that is Foo\n.method  :-)
10:43 lizmat [Tux] (and many other people) will be very happy with that
10:43 lizmat *gift
10:44 emilbarton joined #perl6
10:45 lizmat m: dd Int.new(42); Int .new(42); Int. new(42)
10:45 camelia rakudo-moar 96c2ec: OUTPUT«42␤»
10:45 lizmat m: dd Int.new(42); dd Int .new(42); dd Int. new(42)
10:45 camelia rakudo-moar 96c2ec: OUTPUT«42␤42␤42␤»
10:45 lizmat :-)
10:48 emilbarton hello, I'm puzzled because I have a class with 'has $.id' but somewhere I get "cannot assign to a readonly value or variable" for a regex like 'if $_.id ~~ /^<$user>$/', in other places in my script the same regex works normally. Can you help me solve this?
10:48 mr_ron joined #perl6
10:48 dalek roast: a2e9472 | lizmat++ | S02-lexical-conventions/minimal-whitespace.t:
10:48 dalek roast: Adapt tests to new reality of cb25b2f475f31335d77
10:48 dalek roast: review: https://github.com/perl6/roast/commit/a2e9472d91
10:49 lizmat emilbarton: could you create a gist of that ?
10:50 psch m: class A { has $.b }; my A $a .= new( :b("foo") ); say $_.b ~~ /foo/ given $a;  # must be something more involved
10:50 camelia rakudo-moar 96c2ec: OUTPUT«「foo」␤»
10:50 emilbarton lizmat: no I'm sorry
10:50 psch m: class A { has $.b }; my A $a .= new( :b("foo") ); my $rx = "foo"; say $_.b ~~ /<$rx>/ given $a;  # must be something more involved
10:50 camelia rakudo-moar 96c2ec: OUTPUT«「foo」␤»
10:51 moritz emilbarton: it seems you are trying a writing access on it, like with .id ~~ s/a/b/ or so
10:52 emilbarton moritz: but precisely I aint
10:52 emilbarton psch: thanks, I'll try
10:53 moritz emilbarton: then please boil it down to a runnable test case
10:53 Alina-malina joined #perl6
10:53 moritz emilbarton: and submit it as a bug report
10:53 psch emilbarton: ...i didn't suggest anything?  i just demonstrated that what you describe should work :)
10:53 emilbarton ok, it happens just after instanciation
10:54 FROGGS .tell TimToady Happy Birthday! <oȏ> <-- should look like a hug if it is not obvious :o)
10:54 yoleaux FROGGS: I'll pass your message to TimToady.
10:56 dalek DBIish: a2e3ca9 | moritz++ | t/01-ConnectConfig-PG.t:
10:56 dalek DBIish: Avoid uinitialized warning in test
10:56 dalek DBIish: review: https://github.com/perl6/DBIish/commit/a2e3ca9633
11:01 moritz .tell [Tux] Tux/CSV/NLPW-2015/090-hooks.txt uses "@f is rw" in a signature (multiple times); please drop the "is rw"; newest rakudo disallows it on array params
11:01 yoleaux moritz: I'll pass your message to [Tux].
11:02 [Tux] moritz, why?
11:02 yoleaux 11:01Z <moritz> [Tux]: Tux/CSV/NLPW-2015/090-hooks.txt uses "@f is rw" in a signature (multiple times); please drop the "is rw"; newest rakudo disallows it on array params
11:02 vendethiel- joined #perl6
11:02 [Tux] as in "why is it not allowed on arrays?
11:02 moritz [Tux]: because arrays and hashes aren't read-only anyway
11:02 [Tux] afk
11:02 [Tux] ok
11:06 moritz FROGGS: rakudo-p5/v5/src/Perl5/Terms.pm uses 'is rw' on array params (chop and chomp); please drop the "is rw"
11:09 FROGGS moritz: does it even compile these days?
11:10 moritz FROGGS: I'm sure it does not compile, at least due to the extra "is rw" :-)
11:10 FROGGS :o)
11:13 jnthn m: say -42.abs; say -42 .abs; # I love how TimToady++ takes a continued complaint about whitespace not being allowed and makes it mean something in the process of making it significant :)
11:13 yoleaux 26 Sep 2015 18:03Z <FROGGS> jnthn: I try to implement 'my $a; "a" ~~ /$a=[.]/' and fail to do that in P6::A... is that something I should be able to do in the actions?
11:13 camelia rakudo-moar 96c2ec: OUTPUT«-42␤42␤»
11:13 yoleaux 26 Sep 2015 18:11Z <brrt> jnthn: (poor jnthn for all the spam) i've created a gist with dynvar log results: https://gist.github.com/bdw/992dfd5b69b7d42f2239
11:14 jnthn Uh, in the process of making it allowed
11:14 jnthn That visual-pills nicely, especially in the multi-line case.
11:15 jnthn Happy Birthday, TimToady++ :)
11:15 FROGGS ohh, nice example
11:15 jnthn FROGGS: Well, you may need a little effort to make the parse work out right for the $a=... thing
11:16 FROGGS jnthn: it is parsing it correctly
11:16 FROGGS jnthn: but emitting a p6store to that variable in a qast::stmts in a qast::nodelist doesnt work...
11:16 lizmat FROGGS: commented on https://gist.github.com/lizmat/f3807956c354c14902a3 again  :-)
11:16 FROGGS jnthn: the match result will be empty then, and I dunno what to do
11:18 FROGGS lizmat: that still renders v1.2.+ totally useless
11:18 lizmat well, I can't say I disagree with that...
11:19 rmgk left #perl6
11:19 lizmat but what you're suggesting, is that we can *only* have semantic versioning, and nothing else
11:19 FROGGS lizmat: I dont
11:19 FROGGS I say that we let the users give more than one option to chose from, and also a way to be less strict / more flexible
11:20 lizmat ok, so maybe we need a pragma?  Allow semantic versioning ?
11:20 FROGGS and I also say that you cannot predict what will work out and what does not, so let use give the users a chance to evolve to the optimal solution
11:20 FROGGS no
11:21 lizmat how would you handle difference in auth ?
11:21 lizmat would *that* be an error ?
11:22 FROGGS no, if the user decided to not filter on auth, or to use a regex that is satisfied by two auths (github:FROGGS and pause:FROGGS) then we are not allowed to stand in the users way
11:22 FROGGS that's not snake language here, you know :o)
11:23 lizmat so it would load both ?
11:23 nine .tell masak the visitor macros are something that I incidentally though about before falling asleep yesterday. Seems like something really useful for implementing something like LINQ and even more, for making Rakudo's optimizer readable.
11:23 yoleaux nine: I'll pass your message to masak.
11:24 jnthn FROGGS: OK, I'll have to take a closer look later :)
11:24 * jnthn bbl
11:24 FROGGS lizmat: no, it will sort the candidates by version, and pick these with the highest version; if the result is not a signle CU --> fail
11:25 FROGGS single*
11:25 lizmat so even major version bump ?
11:25 FROGGS lizmat: if the user did not specify the version at all, sure
11:25 FROGGS because then you don't know there is a bump
11:26 lizmat well, that *really* feels like the noose that is Perl 5 module packaging  :-(
11:26 FROGGS lizmat: it is like duck typing, you can/want to add type information, but you are not forced to
11:26 lizmat and we make it way too easy for people to step into that noose
11:26 lizmat well, I think we agree to disagree on this  :-)
11:26 FROGGS yeah, sadly :/
11:27 lizmat personally, I could live with patch level changes, and take the highest
11:27 lizmat anytihing else, I think is asking for trouble in the long run
11:28 lizmat so I guess we will have to take jnthn up on his offer to put on his pumpkin hat
11:28 FROGGS lizmat: yes, but as I said, it is not up to you to decide... the user is in charge to make clear what exactly (s)he wants
11:28 lizmat we've put several "traps" in Perl 6 code to prevent people coming from Perl 5 to continue with the same "bad" habits
11:28 lizmat use Foo;
11:28 lizmat is one of them, in my book
11:29 nine lizmat: there's usually not much difference in API between 0.* and 1.* versions. Even when people stick to semver.
11:29 lizmat the thing is this: one of the bad reps of Perl in the world, is the nightmare that is dependency hell
11:30 lizmat with :auth and :ver , Larry has at least pointed to a way out of that
11:30 lizmat if we don't lead people that way, then all of that work has really been in vain
11:30 lizmat and we could as well just drop the whole CUR idea, and just go for Perl 5 semantics
11:31 lizmat it has brought us this far, why won't it take us further ??
11:31 lizmat sorry, but I feel really deeply about this, having had to deal with the dependency nightmare at former $work
11:31 lizmat and seen the way it stifles moving forward
11:32 lizmat yes, it is more strict in the beginning
11:32 lizmat but developers need to know the needs of the sysadmins a bit as well
11:32 lizmat I see it as being a responsible developer
11:32 ShimmerFairy I think versioning is such a free-form thing in general that adding any kind of enforcement will inevitably make a number of people unhappy.
11:32 lizmat if you say "use Foo"
11:32 lizmat it just means you don't care
11:32 ShimmerFairy cf. the fact that you can construct a Version object with anything you want
11:33 lizmat and you should in a production environment
11:35 mr_ron joined #perl6
11:36 ShimmerFairy FROGGS: I think highest version picking should only happen with packages from the same auth (that is, sort by auths and _then_ versions), because otherwise you can't be sure the versioning scheme is the same.
11:37 btyler the node ecosystem does a pretty good job of this, I think
11:39 ShimmerFairy I don't see how 'supersede' is related to module loading at all, btw.
11:39 btyler when you declare dependencies you specify whether you care about version, and if you do, you can pick "X, + or - minor patch level", "anything newer than X", "precisely X", or "X.Y or Y.Z, but nothing else"
11:39 btyler and best practice depends if you're writing an application or a library
11:41 ShimmerFairy lizmat: I think having multiple candidates should only die if they have different auths, whereas multiple versions of one auth can be sorted and chosen as appropriate.
11:41 * leont would agree p5's take on versioning is suboptimal
11:41 leont In theory, p5 meta supports relatively complex behavior, in practice no one has implemented it in a useful way
11:42 btyler oh, and the other bit about node/npm -- every single library/all has its own local::lib-alike, so different dependencies relying on different versions of the same lib doesn't matter
11:42 btyler *library/app
11:43 btyler at the expense of disk space, of course
11:43 lizmat btyler: I don't quite follow you there
11:43 leont As for numeric versus semantic versioning: I don't think it's unreasonable to pick one of them and force users to use it. It's hard-to-impossible to make both work at the same time.
11:43 lizmat disk space is cheap, generally _0
11:43 lizmat :-)
11:44 leont Encouraging people to specify more about their versions sounds like a good idea
11:44 leont Subtly related to that: having a mechanism to install tests, and rerun them (for example after the upgrade of a dependency) would be a killer feature too
11:44 leont We've been talking about that in p5 land for years, but it's very NYI so far
11:45 lizmat in P6 land that would be possible, as the tests get installed as well
11:45 leont I was hoping you were going to say that
11:45 lizmat yeah, the thinking on that has changed  :-)
11:45 btyler lizmat: sorry, I might be a bit off topic; I don't totally understand the p6 versioning/dependency thread. in short: I have an app Foo. Foo depends on library libbar and libbaz. the way node/npm handles things is to give both libbar and libbaz their own local::lib (called node_modules) with the precise version that it needs
11:46 btyler so if both libbar and libbaz need libawesome, but one needs libawesome 0.3 and the other needs libawesome 1.5, there's no problem
11:46 leont I suspect that testing if things still work is often more reliable than specifying "0.3.x should work, no idea about 0.4.x"
11:46 btyler you just end up with two copies of libawesome installed; one in libbar's local::lib and the other in libbaz's local::lib
11:46 lizmat btyler: that problem will not exist in P6, as 2 versions of the same compunit can be installed in the same CUR
11:47 ShimmerFairy Gentoo, for example, will complain about you not specifying the package category when multiple packages have the same name, but you're free to leave the version unspecified and get the latest possible. I think I'd like that to be how 'use' decls work
11:47 * btyler goes to the glossary
11:47 lizmat *and* they can be loaded simulteanously as well (even in the same lexical scope, if you can rename one of them)
11:47 btyler very nice
11:49 ShimmerFairy I also don't think enforcing one particular versioning scheme would be a good idea. People like their conventions :)
11:50 lizmat well, that is true  :-(
11:50 lizmat :-)
11:50 lizmat but conventions can change
11:51 lizmat and I'm thinking in 5 years from now: people will think: how did we *ever* build large applications without specifying which part needs which version of a library
11:51 lizmat and it being a USP for Perl
11:52 ShimmerFairy And I don't think restricting the version scheme would suddenly make cross-auth version sorting reliable; one auth's v0.2.7 is another's v42.0.0
11:52 lizmat in my experience, the use of Perl in a lot of corporations, is blocked by sysadmins, not by developers
11:54 lizmat ShimmerFairy: I'm not sure what you're saying :-)
11:54 btyler that's partially a product of the deployment artifact too, right? e.g. golang sysadmins don't need to care about what's running on the production box, because all the libs are wrapped up in the thing you deploy
11:54 jdv79 fwiw im with FROGGS on this
11:54 ShimmerFairy lizmat: I think someone made the implication (FROGGS?) that :auth<Foo> and :auth<Bar> candidates wouldn't die, and instead pick the highest version
11:55 ShimmerFairy but I don't recall if he stated that explicitly, or it was just the vagueness of what he said
11:55 lizmat ah, yes, that should *never* happen  :p)
11:55 jdv79 no need to be overly strict out of the gate methinks
11:56 ShimmerFairy lizmat: the one reason I disagree with forcing a strict :auth<> and :ver<> requirement is that not every program endeavors to be stable, or left unmaintained.
11:56 lizmat ShimmerFairy: I'm not saying that either
11:57 lizmat but *if* CURLI.candidates finds more than one CompUnit for -use Foo-, it should die
11:57 jdv79 id be interested to how the laxer approaches would work out in complex codebases
11:57 ShimmerFairy lizmat: my thoughts boil down to: require an :auth<> only to disambiguate, and default to highest version for multiple same-auth matches. Without a disambiguating :auth<> where it's needed, it should die
11:58 lizmat well, that still leaves us with most of the shit that has happened in P5, because most modules *are* maintained by the one developer
11:59 lizmat *and* they've been known to cause problems between versions even if they didn't intend to
11:59 * lizmat being one of them
11:59 ShimmerFairy I don't think you can reasonably require a :ver<> specifier without causing a lot of grief. An unqualified 'use Foo' is allowed for a reason :)
12:00 lizmat in my eyes, an unqualified -use Foo- is a one liner, or an historical artefact
12:00 AlexDaniel joined #perl6
12:01 ShimmerFairy I disagree. And I predict people would just start using :ver<*> anyway, at which point requiring it doesn't seem to add much value :)
12:02 lizmat well, yeah, :ver<*> is just as badd
12:02 lizmat well, I can't seem to convince
12:02 lizmat guess it will need to become a PBP  :-(
12:03 ShimmerFairy I think lack of :ver could reasonably be considered a synonym for :ver<*>
12:03 jdv79 pbp?
12:03 lizmat Perl Best Practice
12:03 ShimmerFairy You could have a pragma that enforces :ver, of course, I just don't think it's a good default for all cases.
12:04 jdv79 kinda like optional typing as FROGGS suggested?
12:04 lizmat well, I suggested a pragma before
12:04 lizmat and we were so glad that -use strict- is now the default  :-(
12:05 ShimmerFairy I don't think that's quite the same as 'use strict', though :)
12:05 emilbarton lizmat, moritz, psch: ok I managed to make a gist of my problem. It's my first script in perl6 so be kind! It's a client-server app for sqlite3. The gist is at https://gist.github.com/emilbarton/41d3e7094dc0d6115c00https://gist.github.com/emilbarton/41d3e7094dc0d6115c00 . I'v tried to remove as much as possible of my spaghetti...
12:06 lizmat emilbarton: I get a 404 on that link ?
12:06 jdv79 the strict has to be tamed though:)  this is still Perl afterall.
12:06 emilbarton https://gist.github.com/emilbarton/41d3e7094dc0d6115c00
12:06 lizmat :-)
12:07 emilbarton there is an example usage to reproduce the error at the end
12:09 lizmat hmmm... the gist is 142 lines, but the line number refers to line 187 ?
12:11 jdv79 couldnt a versioning pbp be hoisted into core later anywsy?
12:11 jdv79 *anyways
12:11 lizmat well, yes, but not a default setting change, as that could break code
12:11 jdv79 so dont upgrsde?
12:12 lizmat not upgrading is not an option in most cases in real life, I'm afraid
12:12 ShimmerFairy That's one thing I'd like to see about P6's design process in future versions: don't upgrade if you're not willing to make the necessary changes.
12:13 jdv79 what.  $work was on 5.8.5 until 2 years ago
12:13 lizmat anyways, to summarize: on what we *do* agree on (I think):
12:14 lizmat 1. if two CompUnits are found with different auths, it should die
12:14 _mg_ joined #perl6
12:14 lizmat hmm.. that's not much
12:14 gfldex emilbarton: try changing 172: my @auth =(1,2,3); to my @auth = [1,2,3];
12:14 emilbarton lizmat: the problem happens at line 178
12:15 emilbarton lizmat: in the server file
12:15 lizmat my proposal would be to allow auto-select to the highest version of a CompUnit if: 1. name / auth are equal and there's only a patch level difference
12:16 emilbarton gfldex: ok but it doesn't matter for the error
12:16 jdv79 could thatvlast bit be dropped for now?
12:16 lizmat m: my @a = (1,2,3); my @b = [1,2,3]; dd @a, @b   # there is a difference ???
12:16 camelia rakudo-moar 96c2ec: OUTPUT«Array @a = [1, 2, 3]␤Array @b = [1, 2, 3]␤»
12:17 ShimmerFairy lizmat: that would require settling on a specific versioning scheme, but I do think something specifying a general range of acceptable versions would be a good idea
12:17 btyler lizmat: is there a middle ground of a 'warn' if it's the same name/auth and there's a > patch level diff, or it isn't clear how to calculate the version diff (if someone is using a goofy naming scheme)?
12:17 zed__ joined #perl6
12:17 ShimmerFairy *cough* gentoo's SLOTs *cough*
12:17 btyler or maybe we need pluggable version comparison :D
12:18 btyler use Version::SemVer in my library
12:18 * ShimmerFairy ponders a separate :slot<> specifier :P
12:19 ShimmerFairy lizmat: i.e. I think it'd be best if we had some way of distinguishing groups of compatible versions, that preferably didn't rely on a certain portion of the version number
12:20 lizmat ShimmerFairy: using slots may be an idea, but at the META6.json level, I would think
12:20 ShimmerFairy e.g.  use Qt:slot<4>  for getting a Qt4-based package, latest existing version
12:20 lizmat not at that level
12:20 lizmat I see it more as a tie-breaker
12:21 lizmat so the slot info lives in the meta-info
12:21 lizmat if you specify a -use- command that selects more than one CompUnit, but they are in the same slot, *then* use the one with the highest version
12:22 ShimmerFairy lizmat: you mean in terms of the 'depends' section, perhaps? (Which would be analogous with ebuild files, I _think_?)
12:22 lizmat I think "slot" is a bad name, though, API version would be better, I think
12:22 lizmat maybe an example works better:
12:22 ShimmerFairy Yeah, it of course doesn't have to be "slot", that's just what gentoo calls it :P
12:22 lizmat I have Foo 1.1 and Foo 2.0 installed
12:23 lizmat they are by the same auth
12:23 lizmat and they have the same "slot"
12:23 lizmat when I do "use Foo 1+", it would load Foo 2.0 without any issue
12:23 lizmat if Foo 2.0 would be in a different "slot"
12:24 lizmat the same "use Foo 1+" would die, because there are 2 CompUnits that match that specification, and they are in different slots
12:24 lizmat semantically versioned modules would auto-slot for patch levels
12:25 ShimmerFairy Gentoo's SLOTs are designed to let you have multiple versions of a package installed at once, and choose which slot you need something from. I don't think the "multiple installed" is a problem for us, it'd just be the "choose a slot" thing, in my mind
12:25 lizmat (unless differently specified in the META6.jsnon)
12:25 emilbarton lizmat: I've updated the error output at the end of the 2 files
12:25 emilbarton moritz: should I submit a bug report or is there something obviously wrong in my code?
12:25 z8 joined #perl6
12:26 lizmat ShimmerFairy: slots in this context, would only be for selection, not for installing, indeed
12:26 ShimmerFairy lizmat: calling it an API version instead, I think you should have to select a particular version of the API if there are multiple, but then within that highest-version by default
12:26 ShimmerFairy so if someone has Qt modules installed for both Qt4 and Qt5, you'd have to specify somewhere which API you want, e.g.  use Qt:api<5>
12:27 ShimmerFairy (because there isn't necessarily a clean relationship between "slot"s and versions, at least in Gentoo's implementation of the concept)
12:27 lizmat well, I would sorta expect a Qt4 and Qt5 module then, if they are that radically different API's ?
12:27 spebern joined #perl6
12:27 dalek roast: 450b919 | TimToady++ | S (2 files):
12:27 dalek roast: adjust some exceptions
12:27 dalek roast: review: https://github.com/perl6/roast/commit/450b91981a
12:27 dalek roast: 4321092 | TimToady++ | S02-lexical-conventions/minimal-whitespace.t:
12:27 dalek roast: merge the changed tests I forgot to check in
12:27 dalek roast: review: https://github.com/perl6/roast/commit/4321092722
12:27 dalek rakudo/nom: be141b8 | TimToady++ | src/Perl6/Grammar.nqp:
12:27 dalek rakudo/nom: . and .= should parse tighter
12:27 dalek rakudo/nom:
12:27 dalek rakudo/nom: To be intuitive, . and .= need to parse at about the level of unaries,
12:27 dalek rakudo/nom: such that "-3**2 . abs" treats the left as a single pill, but nothing
12:27 dalek rakudo/nom: looser than that, lest it eat up the multiplication of "-3 * 2 . abs".
12:27 dalek rakudo/nom: (Changing .= away from item assignment is okay because initializer .=
12:27 dalek rakudo/nom: was effectively tighter precedence anyway, and nobody ever noticed.
12:27 dalek rakudo/nom: And .= was always syntactically privileged anyway.)
12:27 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/be141b8d9b
12:27 * TimToady woke up early realizing two things: 1) he forgot to check in his tests for . and 2) the precedence of . and .= is too loose, and they should just eat things that would ordinarily be kept together visually, like unaries and exponentiation, but nothing looser
12:27 yoleaux 10:54Z <FROGGS> TimToady: Happy Birthday! <oȏ> <-- should look like a hug if it is not obvious :o)
12:28 lizmat good morning, TimToady, and what a beautiful day this is (I hope :-)
12:29 ShimmerFairy lizmat: true, it's just that thinking of concrete examples from gentoo, Qt was the first thing that came to mind (there are two SLOTs for 4 and 5 for Qt's packages, qtcore etc.)
12:31 * TimToady heads back to bed maybe...
12:31 lizmat 5:30 is a bit early, right ?
12:32 ShimmerFairy lizmat: I think we both agree that there needs to be a distinction between "API versions", and the other, regular kind. I just happen to think that you should be able to disambiguate on API without specifying the regular version if you want :) .
12:32 diana_olhovik_ joined #perl6
12:32 ShimmerFairy ♞ TimToady maybe o/
12:32 telex joined #perl6
12:37 [Tux] moritz, removed from .txt there were not present in the actual code anymore
12:38 [Tux] I also removed the remaining is rw's that were unneeded
12:40 dalek specs: 2fa83b9 | lizmat++ | S22-package-format.pod:
12:40 dalek specs: Tests *will* probably be installed
12:40 dalek specs: review: https://github.com/perl6/specs/commit/2fa83b9f3a
12:41 tokuhiro_ joined #perl6
12:47 cognominal joined #perl6
12:49 yqt joined #perl6
12:50 lizmat ShimmerFairy: thinking more about slots / API version: isn't that in the end just the same as semantic versioning really ?
12:51 ShimmerFairy lizmat: I suppose, but having a separate concept of API version would allow more freedom in how someone can actually version their stuff.
12:52 lizmat true
12:52 vendethiel joined #perl6
12:52 ShimmerFairy (which is something Gentoo has to allow for, but P6 is perhaps able to be more influential on its packages right now ☺)
12:54 [ptc] TimToady: Happy Birthday!
12:54 lizmat if we would add an :api, I think it should be a name, rather than a number
12:54 lizmat ShimmerFairy:  use QT:api<QT4>
12:55 lizmat use Qt:api<Qt4> rather  :-)
12:57 FROGGS joined #perl6
13:01 abaugher joined #perl6
13:02 timotimo o/
13:02 timotimo lizmat: i expect you might know a bit about this: should parameters like args in "sub foo(|args)" be treated the same was as "is raw"?
13:03 timotimo because right now we allocate a scalar container for those and i'm sure there's no need at all
13:03 lizmat feels to me they should be treated the same...  but that's just a feeling, I would defer to jnthn for a authoritative answer
13:04 timotimo also, there's a whole bunch of subs that have a $¢ lexical registered, but not used, so i think the optimizer wants to learn about making unnecessary dollarcent lexicals disappear as well
13:04 lizmat yup, feels like :-)
13:05 timotimo i suppose i'll just cook up a patch for the "is raw by default" thing and run spec tests
13:06 timotimo if they agree i'll go the "forgiveness > permission" route; can always revert it and put a good explanation in the commit message if the idea was bad
13:06 ShimmerFairy timotimo: ah, I made $¢ work in grammars (but not bare /.../ regexes, grr), but I didn't touch the optimizer :)
13:07 timotimo oh i see :)
13:08 ShimmerFairy lizmat: I can agree on :api<> . There's no reason we should limit ourselves to mere numbers :)   .oO(use webkit-gtk:api<random-api-change-yaaay>)
13:11 * timotimo updates all the components
13:12 * lizmat goes cycling for some fresh air, ideas and energy
13:12 timotimo i noticed the |args thing when CALL-ME from inside NativeCall was the #1 allocator of Scalar objects in my nativecall-heavy program
13:13 timotimo the only scalar it allocated was the one for |args in that case
13:13 timotimo so removing that was quite worth it :)
13:13 kaare__ joined #perl6
13:13 timotimo sadly, that program isn't a good benchmark yet, as its workload depends on random numbers
13:14 timotimo but we do have srand, right? maybe that'll help
13:15 espadrine joined #perl6
13:16 ShimmerFairy timotimo: btw, if you happen to figure out how to make $¢ work in places like  $a ~~ /<stuff> { say $¢ } <stuff>/  , that'd be cool :P
13:17 [Tux] $ panda list --installed --verbose
13:17 [Tux] resolve stage failed for list: Project list not found in the ecosystem
13:17 [Tux] in method throw at /pro/3gl/CPAN/rakudobrew/moar-nom/install/share/perl6/runtime/CORE.setting.moarvm:1
13:18 timotimo ShimmerFairy: i don't have a clue yet
13:19 ShimmerFairy timotimo: don't worry about it, I couldn't figure it out either :)   (closest I got, IIRC, was inserting my own $¢ to bypass qbuildsub's insert-if-nonexistent, and then removing what I added, but then EVALs of regexes died on 'missing lexical'(?))
13:21 timotimo :|
13:25 BenGoldberg joined #perl6
13:25 timotimo at least i think i found the right peg to hang the "is raw by default" thing on
13:26 timotimo spec test time
13:27 BenGoldberg joined #perl6
13:29 pmurias lizmat: isn't pinning down exact version deps something that Carton (and similiar such things) try to fix in Perl 5 land?
13:30 lizmat I don't know Carton well enough to answer that question
13:31 lizmat i *think* Carton is more about having a single CUR in @?INC with only the modules you need for a specific application
13:31 lizmat and then start perl6 with just that one CUR
13:31 lizmat if I would transpose this from P5 to P6
13:32 khw joined #perl6
13:34 timotimo only t/spec/S02-types/WHICH.t, t/spec/S05-transliteration/trans.rakudo.moar and t/spec/S32-num/power.rakudo.moar have failures
13:34 timotimo i expect that's not because of my change
13:35 lizmat no, it's not
13:35 timotimo yays
13:35 lizmat m: StrDistance.new
13:35 camelia rakudo-moar be141b: OUTPUT«Cannot make a Block object using .new␤  in block <unit> at /tmp/O9_9bpmVfG:1␤␤»
13:35 lizmat now what is that about???
13:35 Loren joined #perl6
13:35 lizmat basically the issue in WHICH
13:35 timotimo huh, well, that's interesting
13:35 lizmat m: StrDIstance.WHICH
13:35 camelia rakudo-moar be141b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/_hTGl0TykO␤Undeclared name:␤    StrDIstance used at line 1␤␤»
13:35 lizmat m: StrDistance.WHICH
13:35 camelia rakudo-moar be141b: ( no output )
13:37 lizmat .oO( still not cycling :-)
13:38 timotimo m: say StrDistance.WHAT
13:38 camelia rakudo-moar be141b: OUTPUT«(Block)␤»
13:39 timotimo what the flying foot is up with that?
13:39 timotimo m: my class FooBar is Cool { }; say FooBar.WHAT
13:39 camelia rakudo-moar be141b: OUTPUT«(FooBar)␤»
13:40 ShimmerFairy m: say StrDistance.^mro
13:40 camelia rakudo-moar be141b: OUTPUT«((Block) (Code) (Any) (Mu))␤»
13:40 timotimo StrDistance only occurs in the generated m-CORE.setting in the parts included from StrDistance.pm
13:40 ShimmerFairy m: class FooBar is Cool { }; say FooBar.^mro
13:40 camelia rakudo-moar be141b: OUTPUT«((FooBar) (Cool) (Any) (Mu))␤»
13:40 timotimo so nothing overrides that after the fact
13:41 timotimo and running that exact file with a "say StrDistance" afterwards gives me "(StrDistance)" instead
13:42 lizmat my class StrDistance is Cool
13:42 timotimo yeah
13:42 lizmat so not sure where the Block come from...
13:42 lizmat the ACCEPTS looks a bit wonky?
13:42 timotimo me neither
13:43 ShimmerFairy m: my class Foo is StrDistance { }; say Foo.WHAT
13:43 camelia rakudo-moar be141b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/irBn76jOdj␤Cannot call trait_mod:<is>(Foo, Block); none of these signatures match:␤    (Mu:U $child, Mu:U $parent)␤    (Mu:U $child, :$DEPRECATED!)␤    (Mu:U $type, :$rw!)␤    (Mu:U $type, :$nativesiz…»
13:43 timotimo that looks like an artifact from the days where we had that same thing for "list", too
13:43 jnthn Just passing by but: some patch somewhere has caused some *very* odd kind of corruption/mis-compilation
13:44 jnthn It happened around the time I merged the isrwcont change
13:44 psch $_ = "foo"; if tr/o/u/ > 1 { say "more than one replacement" } # is the reason for StrDistance.ACCEPTS
13:44 ShimmerFairy lizmat: both ACCEPTS and BUILD look suspicious to me
13:44 psch doesn't work right now though, obviously
13:44 jnthn m: say StrDistance
13:44 camelia rakudo-moar be141b: OUTPUT«->  { #`(Block|59519208) ... }␤»
13:44 lizmat ShimmerFairy: BUILD is fine
13:44 jnthn That's one of the very odd consequences
13:45 jnthn StrDistance should be a type object.
13:45 ShimmerFairy lizmat: isn't it just the same as standard BUILD, though? (I agree nothing is wrong with it, just odd that it's there ☺)
13:45 lizmat jnthn: agree  :-)
13:45 lizmat ShimmerFairy: actually, you're right
13:45 psch ShimmerFairy: :$!before is coerced to Str
13:45 lizmat ah, yes
13:45 psch ShimmerFairy: standard BUILD doesn't coerce
13:45 ShimmerFairy psch: and after isn't ?
13:45 dalek rakudo/nom: 7116059 | timotimo++ | src/Perl6/World.nqp:
13:45 dalek rakudo/nom: don't give capture parameters a scalar container
13:45 dalek rakudo/nom:
13:45 dalek rakudo/nom: spec tests are fine, suggesting that there's never a need
13:45 dalek rakudo/nom: for a capture parameter to have a scalar container to live
13:45 dalek rakudo/nom: in.
13:45 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/7116059675
13:46 timotimo ^- please notice my commit, senpai :3
13:46 psch ShimmerFairy: no, after is the result of Str.trans, which is Str
13:47 psch just stating reasons for why i wrote it as it is, no idea where the Block weirdness comes from either...
13:47 jnthn timotimo: Looks OK
13:47 psch although ISTR that &trans had Str as return type..?
13:48 timotimo jnthn: i noticed this when a piece of code using SDL2::Raw allocated most of its scalars inside CALL-ME
13:48 timotimo and i'm still wondering why CALL-ME doesn't end up getting speshed at all :\
13:49 dalek specs: 3cd3789 | lizmat++ | S11-modules.pod:
13:49 dalek specs: Introduce "api" and :api
13:49 dalek specs: review: https://github.com/perl6/specs/commit/3cd3789de8
13:50 lizmat FROGGS: this implies that if a distribution does not specify any API, it will revert to the behaviour you want
13:50 lizmat if a distribution *does* specify an API, and the selected compunits have a different API, it will fail (which would be the behaviour *I* want)
13:51 lizmat I think this is the best of both worlds, thanks ShimmerFairy for keeping coughing :-)
13:51 lizmat ShimmerFairy++  # coughing
13:51 ShimmerFairy lizmat: I'm just sharing my portage-addled brain :P
13:52 lizmat and we thank you for that!
13:52 ShimmerFairy The other Neat Idea™ I can think of would be "virtuals", that let you select between different satisfactory implementations (e.g. Oracle or IcedTea JVM), but I don't think we need a special concept for that, at least not yet :)
13:53 lizmat I think that is covered by "emulates"
13:53 lizmat really cycling&
13:53 ShimmerFairy ah, yes, I thought that sounded familiar :)
13:53 ShimmerFairy bye lizmat o/
13:54 zakharyas joined #perl6
13:55 Ulti m: say -42.abs + -42 . abs
13:55 camelia rakudo-moar be141b: OUTPUT«0␤»
13:55 Ulti ;__;
13:56 ShimmerFairy I think it's cool we have a lower-precedence methodop (though TimToady++ did mention something about infix:<.> and .= having too low a precedence atm)
13:57 Ulti m: say -42.abs + -42 .abs #also
13:57 camelia rakudo-moar be141b: OUTPUT«0␤»
13:57 Ulti thats one space different semantically super close but does something different and its the - which is the issue really not the new method magic
13:58 ilmari m: say -42.abs + -42.abs
13:58 camelia rakudo-moar be141b: OUTPUT«-84␤»
13:58 Zoffix :S
13:59 ShimmerFairy Ulti: the issue is that the prefix isn't interpreted as part of a numeric literal (and I think it'd be weird if it was, it'd be the only numeric literal thingy that has an op version too)
13:59 Ulti yes I know
13:59 Zoffix m: say (-42).abs
13:59 camelia rakudo-moar be141b: OUTPUT«42␤»
13:59 Ulti I dont think it would be weird at all that prefix - with no space was always seen as the literal numerically
14:00 timotimo but but but custom operators
14:00 Ulti I think that is literally what programmer on the planet would expect, literal pun intended
14:00 Ulti *every
14:00 ShimmerFairy Ulti: I personally wouldn't mind making mathematicians cry over  -4 ** 2 -> 16  :)
14:00 timotimo ShimmerFairy: before adding $¢ to the optimizer, there were 4229 lines matching \d+: .*$¢, now there are 3465
14:01 timotimo i have no clue how many of these are "legitimate", but ...
14:01 timotimo oh, this is the core setting
14:01 pink_mist why would they cry over that? maybe I'm just not a mathematician so I don't get it :>
14:01 Zoffix m: say -4 ** 2
14:01 camelia rakudo-moar be141b: OUTPUT«-16␤»
14:01 Zoffix :)
14:01 ShimmerFairy pink_mist: in math, prefix:<-> has looser precedence than exponentiation (makes a tiny bit more sense written as -4², but still)
14:02 pink_mist oh I see
14:02 ilmari m: say -4²
14:02 camelia rakudo-moar be141b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/srmhsIzfLF␤Bogus postfix␤at /tmp/srmhsIzfLF:1␤------> 3say -47⏏5²␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤        statement modif…»
14:02 * ilmari is disappoint
14:02 timotimo hah
14:02 jnthn "There will be modules" :P
14:03 timotimo m: sub postfix:<²>($a) { $a ** 2 }; say 100²
14:03 camelia rakudo-moar be141b: OUTPUT«10000␤»
14:03 pink_mist ShimmerFairy++ thanks for explaining =)
14:03 Zoffix wow, that's so cool.
14:03 ShimmerFairy jnthn: that's gonna be the weirdest thing for me, I think. Getting used to the idea that language improvements will come from modules rather than additions to core :)
14:03 timotimo you're susprised by that? you need to pay more attention in #perl6 it seems ;) ;)
14:03 pmurias lizmat: isn't having an exact set of dependencies how we should deploy our apps to production?
14:04 pink_mist m: sub postfix:<²>($a) { $a ** 2 }; say 100²² #I wonder...
14:04 camelia rakudo-moar be141b: OUTPUT«100000000␤»
14:04 pink_mist damn, that wasn't interpreted as ^22 :P
14:04 ShimmerFairy You'd need a slang of some kind to generalize superscripts :)
14:04 timotimo LTM would allow you to build a ²² postfix
14:05 mn080202 joined #perl6
14:05 Ulti I'm not entirely sure why anyone has a problem with - being part of a numeric literal given we have . already -___-
14:05 Ulti . is now all sorts of things!
14:05 jnthn ShimmerFairy: I'm really glad of that, in fact. It means whenever people want to propose things for core, we'll be able to say "do it as a module and see how it works out", and bring in the things that see widespread and unproblemtic use
14:05 ShimmerFairy Ulti: I certainly don't, I perceive it as literal integer syntax.
14:05 timotimo very yes.
14:05 timotimo ShimmerFairy: the question now becomes: why don't we accept - as literal integer syntax, too?
14:06 ShimmerFairy jnthn: sure, I'm not saying it's a bad thing, just weird for me :)
14:06 ShimmerFairy timotimo: to make the mathemagicians happy, I guess. Also, what about  my $a = 4;  say -$a ** 2
14:06 Ulti I dont want to have to use NegativeNumbers :P
14:06 jnthn ShimmerFairy: I guess it's 'cus very few languages are in a place to make that happen :)
14:06 mn080202 hey guys if I mod a library how do I recompile the module so it picks up the changes?
14:06 mn080202 with latest rakudo panda
14:07 timotimo mn080202: panda doesn't do pre-compilation any more, so you can just re-install the new version and everything will work out immediately
14:07 mn080202 and if I mod it in the filesystem? it should pick it up?
14:07 timotimo yes, but you shouldn't do that :)
14:07 timotimo oh, wait
14:07 ShimmerFairy jnthn: I just put up a repo (need to add it to the ecosystem) that offers error reporting within grammars, with a hope that it could someday be core functionality, for example :)
14:07 timotimo what exactly do you mean by "in the filesystem"?
14:08 mn080202 hm I am trying to debug HTTP::UserAgent it is failing  so I found the module where it is installed
14:08 mn080202 and tried to insert debug statements
14:08 mn080202 and it does not print stuff so I thought it most probably compiles it since I saw that output on install
14:09 mn080202 Compiling lib/HTTP/Header/Field.pm6 to mbc
14:09 timotimo huh? compiling to mbc?
14:09 timotimo is that really latest panda?
14:10 mn080202 I tried to follow tuts online I will check to find something newer
14:11 FROGGS_ joined #perl6
14:11 timotimo the easiest thing to do is use "rakudobrew", to be honest
14:12 emilbarton joined #perl6
14:15 pmurias lizmat: re using a use without a version numer one thing I often want to use when developing code is to just use the latest thing from CPAN
14:16 pmurias lizmat: releasing it is the moment I would like to have a tool go and write down the list of things my module requires
14:18 mn080202 well I tried straight from github and before I tried rakudobrew but again it compiles I will try rakudobrew again
14:22 Ulti m/win 2
14:27 mn080202 how do you remove modules with panda?
14:33 emilbarton joined #perl6
14:33 dalek rakudo/nom: 08d9122 | timotimo++ | src/Perl6/Optimizer.nqp:
14:33 dalek rakudo/nom: throw out unused $¢
14:33 dalek rakudo/nom:
14:33 dalek rakudo/nom: those were added to subs and methods in a recent-ish patch,
14:33 dalek rakudo/nom: but aren't actually used terribly often.
14:33 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/08d9122337
14:34 timotimo mn080202: that's not yet implemented :\
14:39 mn080202 huh thanks timotimo I finally managed to get HTTP::UserAgent to scrape a simple web page
14:39 timotimo phew
14:39 mn080202 used rakudobrew to install everything
14:39 timotimo that's good; rakudobrew can install panda for you, too, but i expect you've noticed
14:39 timotimo was there a problem inside HTTP::UserAgent?
14:40 mn080202 no there does not seem to be one what I did in the begining was I used rakudobrew then I installed rakudo 2015.02 then 2015.07 after removing all rakudo.xy.tar.gz and using rakudobrew again it worked
14:40 timotimo ShimmerFairy: would you be interested in looking at a moar --dump of the core setting with that latest commit applied and seeing if there's any pattern to $¢ being unnecessary, but the optimizer not having a clue?
14:41 timotimo maybe the moar --dump is less helpful than a --target=optimize, actually
14:42 ShimmerFairy sure, but not now, it's bed for me :)
14:42 tokuhiro_ joined #perl6
14:43 timotimo ah
14:43 timotimo good night :)
14:56 Akagi201 joined #perl6
15:05 spebern joined #perl6
15:17 Akagi201 joined #perl6
15:27 dalek rakudo/nom: 2b04b50 | TimToady++ | src/Perl6/Grammar.nqp:
15:27 dalek rakudo/nom: fake up intermediate precedence for . and .=
15:27 dalek rakudo/nom:
15:27 dalek rakudo/nom: until we straighten out the associativity of unaries and infixes sharing
15:27 dalek rakudo/nom: the same precedence level....
15:27 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/2b04b50e90
15:35 vendethiel TimToady: I wanna say, thanks a lot for this. being able to line up calls nicely is a great thing, imho :)
15:44 tokuhiro_ joined #perl6
15:49 xinming joined #perl6
15:49 Akagi201 joined #perl6
15:58 steelwilly joined #perl6
15:58 nwc10 joined #perl6
16:01 nwc10 good Birthday, TimToady
16:01 yoleaux 25 Sep 2015 13:33Z <tony-o> nwc10: there is a perl6 'prove' module/bin out there called 'Green', can be installed with zef or panda.
16:02 nwc10 good UGT, #perl6
16:06 jasanj joined #perl6
16:10 moritz m: my @a = 1, 2, 3; for @a.item { .say }
16:10 camelia rakudo-moar 2b04b5: OUTPUT«[1 2 3]␤»
16:12 nwc10 it looks like if one creates tickets directly in RT, they don't hit the list
16:19 moritz m: say <a b c>.kv.perl
16:19 camelia rakudo-moar 2b04b5: OUTPUT«(0, "a", 1, "b", 2, "c").Seq␤»
16:19 moritz m: say <a b c>.pairs.perl
16:19 camelia rakudo-moar 2b04b5: OUTPUT«(0 => "a", 1 => "b", 2 => "c").Seq␤»
16:20 moritz m: say join '|', <a b>, <d e>
16:20 camelia rakudo-moar 2b04b5: OUTPUT«a|b|d|e␤»
16:20 moritz m: say join '|', <a b>, $<d e>
16:20 camelia rakudo-moar 2b04b5: OUTPUT«Use of uninitialized value <element> of type Any in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.  in block <unit> at /tmp/fVx5bYkx37:1␤Use of uninitialized value <element> of type Any in string context…»
16:20 moritz m: say join '|', <a b>, <d e>.item
16:20 camelia rakudo-moar 2b04b5: OUTPUT«a|b|d e␤»
16:22 moritz m: sub fe(*@flat) { @flat.elems }; say fe(<a b>, <d e>.item);
16:22 camelia rakudo-moar 2b04b5: OUTPUT«3␤»
16:22 vendethiel mh, maybe someone will expect $<foo> to itemize :P
16:23 moritz it's a rather obscure use case
16:23 moritz interesting for explaining list mechanics, but seldomly useful in real-world code
16:25 timotimo nwc10: how do you actually create a ticket in rt?
16:26 moritz m: say <a b c d e>.pick: 3;
16:26 camelia rakudo-moar 2b04b5: OUTPUT«(c a b)␤»
16:26 timotimo i was under the impression that's impossible
16:26 moritz timotimo: mailto:rakudobug@perl.org
16:26 timotimo yeah
16:26 timotimo that's not "directly in rt", that's "in your mailclient"
16:28 moritz no, you write your mail in your MUA, but it becomes a ticket inside RT
16:28 moritz sorry for being a nuisance; I maintain a fork of a ticket system for $work :/
16:29 moritz m: say <a b c>.rotate(1).^name
16:29 camelia rakudo-moar 2b04b5: OUTPUT«List␤»
16:29 moritz m: say <a b c>.reverse.^name
16:29 camelia rakudo-moar 2b04b5: OUTPUT«List␤»
16:32 nine TimToady: Happy birthday!
16:34 moritz TimToady++ # one day a year the aniversary brings free karma
16:35 moritz m: my @a = 1, 2, 3; say @a.^splice(0, 2).^name
16:35 camelia rakudo-moar 2b04b5: OUTPUT«Method 'splice' not found for invocant of class 'Perl6::Metamodel::ClassHOW+{<anon>}'␤  in block <unit> at /tmp/cDO9K5yu_Z:1␤␤»
16:35 moritz m: my @a = 1, 2, 3; say @a.splice(0, 2).^name
16:35 camelia rakudo-moar 2b04b5: OUTPUT«Array␤»
16:37 moritz m: my @a = 1, 2, 3; say @a.rotor(2 => -1).^name
16:37 camelia rakudo-moar 2b04b5: OUTPUT«Seq␤»
16:40 moritz m: say (<a b c> Z <d e> Z (1, 2)).perl
16:40 camelia rakudo-moar 2b04b5: OUTPUT«(("a", "d", 1), ("b", "e", 2)).Seq␤»
16:41 moritz m: say .join for zip <a b c>, <d e f>
16:41 camelia rakudo-moar 2b04b5: OUTPUT«ad␤be␤cf␤»
16:43 moritz m: say .join for zip <a b c>, ('d', *)
16:43 camelia rakudo-moar 2b04b5: OUTPUT«ad␤bWhatever<139937550545840>␤»
16:47 timotimo bwhatever
16:47 timotimo b whatever u want
16:48 dalek doc: 645466d | moritz++ | lib/Type/List.pod:
16:48 dalek doc: GLRify List.pod
16:48 dalek doc: review: https://github.com/perl6/doc/commit/645466db7b
16:50 moritz why is zef no longer in the modules list?
16:52 raydiak good morning, #perl6
16:52 sergot m: my @a = <1 2>; my @b = <3 4>; @a.push: @a,;
16:52 camelia rakudo-moar 2b04b5: ( no output )
16:53 sergot m: my @a = <1 2>; my @b = <3 4>; @a.push: @b,; say @a;
16:53 camelia rakudo-moar 2b04b5: OUTPUT«[1 2 3 4]␤»
16:53 sergot m: my @a = <1 2>; my @b = <3 4>; @a.push: @b,; say @a.perl;
16:53 camelia rakudo-moar 2b04b5: OUTPUT«[IntStr.new(1, "1"), IntStr.new(2, "2"), IntStr.new(3, "3"), IntStr.new(4, "4")]␤»
16:53 sergot m: my @a = <1 2>; my @b = <3 4>; @a.push: @b, ; say @a.perl;
16:53 camelia rakudo-moar 2b04b5: OUTPUT«[IntStr.new(1, "1"), IntStr.new(2, "2"), IntStr.new(3, "3"), IntStr.new(4, "4")]␤»
16:53 * moritz hopes this is a bug
16:54 sergot hmm
16:54 sergot m: my @a = <1 2>; my @b = <3 4>; @a.push: @b; say @a;
16:54 camelia rakudo-moar 2b04b5: OUTPUT«[1 2 3 4]␤»
16:54 sergot , doesn't matter here
16:56 jasanj m: say 1.WAT
16:56 camelia rakudo-moar 2b04b5: OUTPUT«Method 'WAT' not found for invocant of class 'Int'␤  in block <unit> at /tmp/xXai9V6HAq:1␤␤»
16:57 jasanj m: say 1.WHAT
16:57 camelia rakudo-moar 2b04b5: OUTPUT«(Int)␤»
16:57 jasanj m: say 1.WHICH
16:57 camelia rakudo-moar 2b04b5: OUTPUT«Int|1␤»
16:57 jasanj m: say 1.WHO
16:57 camelia rakudo-moar 2b04b5: OUTPUT«␤»
16:58 jasanj m: say 1.WHERE
16:58 camelia rakudo-moar 2b04b5: OUTPUT«139948576800912␤»
16:58 jasanj m: say 1.HOW
16:58 camelia rakudo-moar 2b04b5: OUTPUT«Perl6::Metamodel::ClassHOW.new␤»
16:58 jasanj m: say 1.WHY
16:58 camelia rakudo-moar 2b04b5: OUTPUT«(Any)␤»
17:01 TimToady maybe .WHY should default to "Mu"  :)
17:02 moritz TimToady: or to class Dunno is Mu { }
17:03 skids joined #perl6
17:03 TimToady or Cool :)
17:06 moritz m: my @a; my @b = <a b >; @a.push: @b,; say @a.elems
17:06 camelia rakudo-moar 2b04b5: OUTPUT«2␤»
17:06 moritz TimToady: would you agree this is a bug?
17:06 moritz m: my @a; my @b = <a b >; @a = @b,; say @a.elems
17:06 camelia rakudo-moar 2b04b5: OUTPUT«1␤»
17:06 moritz seems inconsistent with array assignment, at least
17:06 MadcapJake joined #perl6
17:14 [Tux] TimToady, belated congrats from the Netherlands
17:24 TimToady moritz: as jnthn pointed out a day or so ago, arglist commas are different, and we don't really want to encourage that notation anyway
17:26 TimToady that's why we have $@b and $[1,2,3]
17:26 TimToady m: my @a = <1 2>; my @b = <3 4>; @a.push: item @b; say @a;
17:26 camelia rakudo-moar 2b04b5: OUTPUT«[1 2 [3 4]]␤»
17:26 TimToady or that
17:31 nwc10 timotimo: one needs to be logged in, and have suffienct queue privs
17:32 timotimo oh
17:32 timotimo interesting
17:32 timotimo hey TimToady, happy birthday!
17:36 rindolf joined #perl6
17:45 tokuhiro_ joined #perl6
17:47 mr_ron joined #perl6
17:59 thou joined #perl6
18:13 cognominal joined #perl6
18:15 nwc10 anyway, the ticket in question is https://rt.perl.org/Ticket/Display.html?id=126195
18:15 nwc10 It has a patch, and all :-)
18:19 dalek rakudo/nom: 3813a26 | nicholas++ | t/harness:
18:19 dalek rakudo/nom: Only enable 'trap' for new enough harnesses.
18:19 dalek rakudo/nom:
18:19 dalek rakudo/nom: The 'trap' option was added to TAP::Harness version 3.22. Attempting to set it
18:19 dalek rakudo/nom: on earlier versions is a fatal error, and aborts testing. Hence pass
18:19 dalek rakudo/nom: argument conditionally, based on $TAP::Harness::VERSION.
18:19 dalek rakudo/nom:
18:19 dalek rakudo/nom: Signed-off-by: Moritz Lenz <moritz@faui2k3.org>
18:19 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/3813a26d1e
18:20 nwc10 moritz++
18:20 nwc10 thanks
18:22 jnthn .oO( If only things ignored named options they didn't understand, we'd not have this problem :P )
18:23 FROGGS_ heh
18:25 nwc10 Thermal::Detonator.explode(dry_run => 1);
18:25 nwc10 dry_run was added in version 3.
18:25 nwc10 there are arguments both ways :-)
18:28 pink_mist . o O ( and then there are those who refer to code that aborts as 'exploding' )
18:28 * lizmat is back
18:32 yqt joined #perl6
18:33 patrickz joined #perl6
18:37 dalek nqp: e1cc288 | (Pawel Murias)++ | src/vm/js/nqp-runtime/bootstrap.js:
18:37 dalek nqp: [js] fix bootstraping bug
18:37 dalek nqp: review: https://github.com/perl6/nqp/commit/e1cc2886a2
18:37 dalek nqp: 3f2ad11 | (Pawel Murias)++ | src/vm/js/nqp-runtime/ (2 files):
18:37 dalek nqp: [js] serialization of simple STables
18:37 dalek nqp: review: https://github.com/perl6/nqp/commit/3f2ad11b4d
18:39 tokuhiro_ joined #perl6
18:44 Ven joined #perl6
18:47 pmurias lizmat: re silently allowing version differences up to patch level, aren't a lot of the breakages caused by accident instead of concious api changes?
18:48 lizmat yes, they are
18:48 lizmat that is why *I* think it is best to be as strict in your -use- statements as possible
18:49 jdv79 or desired
18:50 pmurias for deploying applications having an exact list of tested dependencies seems the sanest option
18:51 pmurias having cpan modules have exact deps would cause some problems
18:52 pmurias like having your up load a bunch of old Moose (replace with any common dependency) versions
18:52 lizmat pmurias: that's why we have "supersedes"
18:55 pmurias isn't having "supersedes" everywhere the same thing as assuming that higher versions supersed older ones unless marked as breaking
18:56 lizmat you can indicate that a compunit is superseding another (range of) compunits: this is very specific
18:58 lizmat if Foo 1.2 has a supersedes Foo <1.2, then any attempt to select a Foo < 1,2 will result in selecting Foo 1.2
18:58 jdv79 isn't emulates teh same thing as this new api tag thing?
18:58 pmurias api tag thing?
18:59 lizmat emulates is when you ask for Foo 1.2 and that is not available, but there is a Bar 3.4 that emulates Foo 1.2, *then* Bar will be selected
18:59 lizmat if there *is* a Foo 1.2, then that will be used
18:59 jdv79 k
19:00 jdv79 pmurias: i mean the, as of a few hours ago, addition of an api specifier
19:00 jdv79 see S11
19:03 pmurias lizmat: marking a module as using semantic versioning and specifing a version would work nearly the same as supersedes
19:04 lizmat accept with supersedes you can actually list which compunits you're superseding
19:04 Ven joined #perl6
19:04 lizmat if Foo 1.2, 1.5 and 1.7 had serious issues, you can make Foo 1.8 supersede only *those* versions
19:10 Ven is there a "code index" for the advent calendar? to update all the code samples for the post-GLR world, say.
19:15 moritz Ven: well, some of them were made into tests in roast
19:15 masak Ven: the only thing like that (that I know about) is the spectests that have been adapted from the advent calendar.
19:15 yoleaux 11:23Z <nine> masak: the visitor macros are something that I incidentally though about before falling asleep yesterday. Seems like something really useful for implementing something like LINQ and even more, for making Rakudo's optimizer readable.
19:15 Ven right, those I'm aware of
19:15 masak nine: nice :)
19:16 masak nine: if you have time to talk about them at some point, I'd be happy to
19:16 nwc10 left #perl6
19:17 Ven Linq, for me, falls into the other scope. Vmacros would only be useful for analysis and modifying-slang-ish things.
19:17 Ven mmh, or should it... well, depends which kind of stuff we can catch
19:18 masak yeah, LINQ feels more slang-y to me as well.
19:19 masak basically visitor macros do not change the syntax of the language, though they can both analyze and modify the resulting Qtrees if they want.
19:22 Ven masak: which category does timotimo++'s ADT module fall into?
19:23 AlexDaniel “New slurpy parameter, +args or +@args, to allow for one-argument style binding”
19:23 AlexDaniel ooooooooh
19:25 AlexDaniel If I got that right, there are some of early RTs waiting for that
19:25 AlexDaniel in fact, some of them were fixed and should now be reopened to use that new thing
19:26 AlexDaniel some of my early reports*
19:26 AlexDaniel m: say 2 + Ⅵ;
19:26 camelia rakudo-moar 3813a2: OUTPUT«5===SORRY!5=== Error while compiling /tmp/bPb40erFJ9␤Missing required term after infix␤at /tmp/bPb40erFJ9:1␤------> 3say 2 +7⏏5 Ⅵ;␤    expecting any of:␤        prefix␤        term␤»
19:27 masak Ven: you mean the thing inside the q{} in https://github.com/timo/ADT/blob/master/README.md
19:27 masak ...?
19:27 masak that's clearly a slang to me.
19:27 Ven masak: well, the idea would be to have something akin to "ADT foo = ..."
19:27 philh joined #perl6
19:27 masak well, then the `ADT` bit would be the slang "opener".
19:28 philh p6: say ((1,2),3).flat
19:28 camelia rakudo-moar 3813a2: OUTPUT«(1 2 3)␤»
19:28 philh p6: say [(1,2),3].flat
19:28 camelia rakudo-moar 3813a2: OUTPUT«((1 2) 3)␤»
19:28 pmurias lizmat: I'm not sure I see a use for the api modifier, if we have sister versions like Perl 6 and Perl 5 wouldn't it be better to have the number as part of the name?
19:28 philh Should .flat on an Array be doing that?
19:29 lizmat pmurias: for that we have :from<perl5>
19:29 apotheon joined #perl6
19:29 lizmat which, BTW, already works if you have Inline::Perl5 installed
19:30 cognominal joined #perl6
19:31 masak m: say [[1, 2], 3].flat
19:31 camelia rakudo-moar 3813a2: OUTPUT«([1 2] 3)␤»
19:31 pmurias lizmat: what's the intended use of the :api modifier?
19:32 masak philh: seems suspect to me. does Array.flat only convert the outermost [] to a () ? seems a bit surprising.
19:33 jnthn Array.flat is a no-op 'cus an Array is by definition already flat
19:33 philh masak: well, it seems to return a Seq rather than a list. But yeah, it doesn't seem to be actually flattening.
19:33 lizmat if a module author indicates that a certain version of a compunit adheres to a certain api, then a CURLI can automatically allow/disallow selecting a higher numbered version of a module in the case where multiple compunit match a give -use- statement specification
19:33 jnthn (Because an Array is a bunch of Scalar containers)
19:33 jnthn So, working as designed.
19:33 lizmat jnthn: perhaps Array.flat should warn then ?
19:34 jnthn lizmat: But flat is recursive, so then for flat @a, @b { } would warn.
19:34 jnthn Which surely isn't desirable.
19:34 lizmat that would be the sub case, I was talking about the Array.flat method
19:34 philh p6: say [(1,2),3].list.flat
19:34 camelia rakudo-moar 3813a2: OUTPUT«((1 2) 3)␤»
19:35 jnthn lizmat: The sub only delegates to the .flat method
19:35 philh So is there a simple way to get the flattening behaviour on an array?
19:35 lizmat ah, eh, ok
19:36 jnthn m: say flat [[1, 2], 3]>>[]
19:36 camelia rakudo-moar 3813a2: OUTPUT«(1 2 3)␤»
19:36 pmurias lizmat: isn't that something that can be done with supersedes?
19:36 jdv79 pmurias: the api mod (in backlog) is a solution to bridging the gap between the strict and lax camps.
19:36 jnthn (That is, apply the zen slice over the data structure)
19:36 TimToady m: say gather [[1,2],3].deepmap: *.take
19:36 camelia rakudo-moar 3813a2: OUTPUT«(1 2 3)␤»
19:36 jnthn This works any number of levels deep
19:36 jnthn m: say flat [[1, 2], [3, [4, 5]]]>>[]
19:36 camelia rakudo-moar 3813a2: OUTPUT«(1 2 3 [4 5])␤»
19:37 jnthn oh? :)
19:37 jnthn Oh, nodal...not deep
19:37 jnthn The TimToady one works any number of levels deep, I guess.
19:39 timotimo Ven: i'd call my ADT module just "code gen"
19:39 Ven timotimo: hey, better syntax is always nice ;-)
19:41 TimToady lunch &
19:42 pmurias jdv79: I have read through todays backlog but it seems to be just an attempt to port stuff from gentoo
19:42 dha joined #perl6
19:43 masak "an array is already flat" -- interesting. I can see how that is true, but it's something I've yet to internalize.
19:43 philh I'm trying to look up the >>[] thing but can't find >>, could I get a pointer?
19:44 japhb joined #perl6
19:44 jnthn philh: Hyper operator
19:44 pmurias jdv79: with the use case being binding to different incompatible versions of libraries
19:44 jnthn m: my @a = 1, 2, 3; @a>>++; say @a;
19:44 camelia rakudo-moar 3813a2: OUTPUT«[2 3 4]␤»
19:44 dha You may have to search for «
19:44 japhb .tell TimToady Happy Birthday!
19:44 yoleaux japhb: I'll pass your message to TimToady.
19:44 jnthn That's another example
19:44 dha sorry, »
19:45 japhb .tell masak three-types-of-macros.md looks very promising.  How much of that do you have working in 007 at this point?
19:45 yoleaux japhb: I'll pass your message to masak.
19:46 mr_ron joined #perl6
19:47 philh jnthn: Ah, thanks. So the [...]>>[] is like ( [1,2][], 3[] ) i.e. ( [1,2], 3 ) which flattens accordingly. Got it.
19:47 japhb What's the proper post-GLR way to map over an array, producing a Pair for each item in the original array in which the Pair's key is a (computed) string and the Pair's value is an array of two values, and assigning that to another array, so that the end result is [ key1 => [ a, b ], key2 => [ c, d], ]?
19:48 japhb I keep trying to fix this pre-GLR code in front of me with cargo culting, and (no surprise) that isn't actually working for me.
19:49 masak m: my @a = 1..6; say [@a.map(-> $x, $y { "key{ ++$ }" => [$x, $y] })].perl
19:49 yoleaux 19:45Z <japhb> masak: three-types-of-macros.md looks very promising.  How much of that do you have working in 007 at this point?
19:49 camelia rakudo-moar 3813a2: OUTPUT«[:key1([1, 2]), :key2([3, 4]), :key3([5, 6])]␤»
19:49 moritz m: say <a b c>.map({; ($_ x 2) => [ $_ xx 2] }).perl
19:49 camelia rakudo-moar 3813a2: OUTPUT«(:aa(["a", "a"]), :bb(["b", "b"]), :cc(["c", "c"])).Seq␤»
19:49 masak japhb: ^
19:51 masak japhb: in 007 (just as in Rakudo), the first of the three is implemented. just about to dive into the latter two. I don't think 007 does hygiene properly yet, but working on that.
19:51 jnthn masak: superstitious ; ?
19:51 japhb moritz was closer to what I meant, but I'll file both of those in my head for later.  Thanks masak++, moritz++
19:51 spider-mario joined #perl6
19:51 jnthn Oh, moritz wrote the superstitious ;
19:51 masak jnthn: did you mean "moritz"? :P
19:51 jnthn :)
19:51 japhb jnthn: You mean moritz?
19:51 jnthn You know, guys, I might just have meant moritz! :P
19:51 japhb Heh
19:51 masak perhaps you meant that other guy.
19:52 jnthn m: say <a b c>.map({ ($_ x 2) => [ $_ xx 2] }).perl
19:52 camelia rakudo-moar 3813a2: OUTPUT«(:aa(["a", "a"]), :bb(["b", "b"]), :cc(["c", "c"])).Seq␤»
19:52 * masak .oO( superstitious "masak:" ) :P
19:52 japhb Although now I'm really wondering what I didn't get right before.
19:52 masak japhb: yah, I got it in one! :P
19:52 jnthn The use of $_ implies it's a Block (though we hadn't used to get that one right)
19:54 * moritz is stuck in his "superstitious" past
19:54 japhb moritz: Yeah, I have a lot of them to unlearn after all these years.
19:55 Ven joined #perl6
19:55 japhb Especially since some of the bugs still exist, and some only got fixed in the last week.
20:00 dalek roast: 9d54b21 | usev6++ | S12- (14 files):
20:00 dalek roast: Replace some eval-dies-ok in S12-* with throws-like
20:00 dalek roast: review: https://github.com/perl6/roast/commit/9d54b217d6
20:04 rurban joined #perl6
20:05 Ben_Goldberg joined #perl6
20:05 _dolmen_ joined #perl6
20:08 * jnthn back tomorrow, with tuits :)
20:08 jnthn 'night
20:09 timotimo gnite jnthn :)
20:10 AlexDani` joined #perl6
20:10 colomon joined #perl6
20:13 masak I have that "stuck in the past" thing, too.
20:14 masak I solve it by jealously observing newcomers quickly arrive at clean, un-superstitious solutions, and then telling them how horrible things used to be :P
20:16 Ven so, how should I call an external program with output capturing *and* parameter escaping? seems `run` is not the one droid I'm looking for
20:16 sergot #perl6: don't forget about the lunar eclipse this night! :)
20:18 japhb Ven: What kind of parameter escaping are you looking for?  run doesn't need shell escaping, since it skips the shell ...
20:18 japhb (Well, at least on OSen that have sane spawn semantics)
20:19 * masak saw "parameter escaping", assumed the wrong context (escape analysis) and went "wuh, parameters trivially escape, always!" :P
20:20 Ven japhb: true. I'm never clear enough... I want to invoke a program with an escaped strng
20:22 timotimo so you need to unescape the escaping?
20:23 perler joined #perl6
20:27 cognominal joined #perl6
20:27 colomon joined #perl6
20:30 dha joined #perl6
20:33 Ven joined #perl6
20:37 vendethiel joined #perl6
20:38 mr_ron joined #perl6
20:40 * lizmat has been working on the next issue of P6W: https://gist.github.com/lizmat/28d6d9b8f3a968e6c92e
20:40 lizmat please let me know if I missed any videos, blogs, slides   :-)
20:41 tokuhiro_ joined #perl6
20:43 timotimo good work, lizmat!
20:47 timotimo lizmat: we don't have any clue how to make .min and .max faster, right?
20:47 masak lizmat++ # working on p6w
20:47 dha lizmat++ # just generally.
20:48 dha I probably won't have a blog post up until I get home. Sorry.
20:48 lizmat dha: I won't publish until tomorrow evening, in about 24 hours
20:48 lizmat I've been only combing the net for videos, blogs, slides, ecosystem additions so far
20:48 dha Ok. I'm flying home now, so maybe...
20:49 dha *nod*
20:49 lizmat timotimo: we could actually make it faster, I think
20:49 timotimo good flight, dha!
20:49 lizmat I mean, why do we need the map at all ?
20:50 timotimo yeah
20:50 dha I'm considering attempting to corral the documentation efforts into something more coherent while we still have a couple of months before the release.
20:50 timotimo well, maybe that's the cleverest way to pull out all values from the iterator?
20:50 dha thanks timotimo!
20:50 Ven ++lizmat++ # YAY!
20:50 lizmat timotimo: no, because map needs to take care of the case where it returns more than one value in an iteration
20:51 timotimo oooh
20:51 timotimo of course
20:51 lizmat also, it's generating a list there
20:51 lizmat when it is immediately discarded
20:51 timotimo so, what is the other way we can do it? get the .iterator and .shift off of it?
20:51 * timotimo not yet very good at the new GLR internals api
20:52 lizmat lemme see if I can whip up a proto type
20:52 lizmat need some time of from blogging  :-)
20:52 timotimo oh, glad to be supplying something easy-ish for you :)
20:53 timotimo lizmat: min accounts for 20% inclusive time on this one task i have :)
20:55 timotimo in the mean time i'll work towards making this thing a more proper benchmark
20:55 timotimo with reproducible decisions whether or not to do work at certain places - which are currently probabilistic
20:59 timotimo very good, it's reproducible now
21:02 dha Hm. Is p6doc broken at all?
21:02 dha "===SORRY!===\nCannot invoke this object (REPR: Uninstantiable)"
21:02 lizmat dha: I have no idea  :-(
21:02 lizmat wow
21:03 dha That's when I  try to read docs for an installed module. Maybe it's not documented...
21:03 lizmat no, that's a deep compile error
21:04 renormalist joined #perl6
21:04 lizmat timotimoL would 2x as fast do ?
21:04 lizmat timotimo: would 2x as fast do ?
21:05 timotimo hm
21:05 dha Ironically, I'm looking to read the docs on Benchmark. :-)
21:05 timotimo well, i'd prefer 20x faster, but that's probably beyond the point of diminishing returns ;)
21:05 timotimo just kidding, i'd love 2x as fast!
21:05 lizmat lemme check some more..
21:06 timotimo my min was called 213668 times and took 21739.4ms inclusive time
21:06 timotimo 172267.72ms is the complete run time of the program
21:07 timotimo (an amazing 37% gc time)
21:08 apotheon joined #perl6
21:09 lizmat timotimo: do you need a "by" ?
21:09 dha Ah. regardless of p6doc's status, Benchmark isn't documented.
21:09 lizmat it's an ecosystem module, is it not ?
21:09 dha Dunno. I'll look.
21:09 timotimo i do not
21:10 Ven joined #perl6
21:10 timotimo this is a bunch of ints and a couple of Inf
21:10 Ven Also -- before it's too late, right? – Happy birthday, TimToady++
21:11 timotimo sorry, lizmat, i meant to highlight you. no :&by needed
21:13 lizmat 2.6 times is what I can do for you... :-)
21:13 lizmat checking spectest result before committing
21:14 timotimo hooray
21:14 lizmat if the spectest comes out ok, indeed  :-)
21:14 * masak .oO( conditional hooray! )
21:15 lizmat hmmm... some breakage...  :-(   looking at why in a mo
21:16 timotimo there's like three test files that b0rk
21:17 lizmat I have a few more now
21:17 lizmat but I also got a lot of roast updates...
21:18 Ven .u ⍵
21:18 yoleaux U+2375 APL FUNCTIONAL SYMBOL OMEGA [So] (⍵)
21:19 Ven .u apl alpha
21:19 yoleaux No characters found
21:20 Ven .u apl functional symbol alpha
21:20 yoleaux U+2376 APL FUNCTIONAL SYMBOL ALPHA UNDERBAR [So] (⍶)
21:20 yoleaux U+237A APL FUNCTIONAL SYMBOL ALPHA [So] (⍺)
21:21 masak APL: the first and the last programming language that got its own set of Unicode symbols.
21:23 Ben_Goldberg m: https://gist.github.com/BenGoldberg1/bc39a9a31eaeb733012a
21:23 camelia rakudo-moar 3813a2: OUTPUT«Cannot send a message on a closed channel␤  in block <unit> at /tmp/T9gWZ7YfGJ:33␤␤»
21:23 lizmat timotimo: found an error in my logic, fixing now and re-testing
21:25 Ben_Goldberg Can anyone tell me why the error seems to come from line 33, which doesn't contain a .send ?
21:28 masak Ben_Goldberg: maybe the channel closes before the logic in `start { ... }` has time to finish?
21:28 * masak confesses to not knowing any details of this
21:31 lizmat timotimo: my opt breaks (^10).pick(3).min  :-(   (This Seq has been consumed)
21:32 lizmat timotimo: https://gist.github.com/lizmat/44a6d97adf6ab4588e97
21:33 lizmat I thought I could get away by just using AT-POS
21:33 bakedb joined #perl6
21:33 lizmat probably need a full-fledged iterator class..  :-)
21:34 gfldex Ben_Goldberg: you may be running out of threads from the pool, unless that bug was fixed already. I am guessing as hard as masak tho.
21:35 Ben_Goldberg Running out of threads from the pool should cause a deadlock, no?
21:36 gfldex you may be able to test is by limiting the number of threads to 10
21:36 colomon joined #perl6
21:36 Ben_Goldberg How do I do that?
21:37 gfldex change 1..20 to something much smaller
21:38 Ben_Goldberg m: https://gist.github.com/BenGoldberg1/bc39a9a31eaeb733012a
21:38 camelia rakudo-moar 3813a2: OUTPUT«Attempt to return outside of any Routine␤  in block <unit> at /tmp/4c1CWudfwj:33␤␤»
21:38 Ben_Goldberg Oooh, different error now.
21:38 Ben_Goldberg So it's a threads problem.
21:39 gfldex there are many bugs to choose from :)
21:42 lizmat timotimo: think I got it covered now
21:42 gfldex Ben_Goldberg: it maybe wise to rakudobug your findings
21:46 mr_ron joined #perl6
21:46 colomon joined #perl6
21:48 dalek rakudo/nom: 91b8b1e | lizmat++ | src/core/Any-iterable-methods.pm:
21:48 dalek rakudo/nom: Make .min about 2.5x faster
21:48 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/91b8b1ee03
21:49 lizmat timotimo: ^^^
21:53 TEttinger joined #perl6
21:56 makapa joined #perl6
22:01 masak lizmat++
22:01 masak 'night, #perl6
22:04 timotimo lovely!
22:04 timotimo lizmat: i expect i can just copy-paste that into .max, too?
22:05 lizmat I'm working on that, but that caused build breakage somehow
22:05 dnmfarrell joined #perl6
22:10 lizmat weird: I changed the code just a little bit, no logic changes, and now it compiles like a charm  :-(
22:11 lizmat running spectest now, if clean, will push
22:16 telex joined #perl6
22:17 dalek rakudo/nom: 1ed1ea0 | lizmat++ | src/core/Any-iterable-methods.pm:
22:17 dalek rakudo/nom: Make .max about 2.5x faster
22:17 dalek rakudo/nom:
22:17 dalek rakudo/nom: Plus some refactoring on .min as well to reduce code bloat
22:17 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/1ed1ea09dd
22:17 lizmat timotimo ^^^
22:18 sftp joined #perl6
22:20 * lizmat wonders how timotimo's program runs now
22:23 timotimo right, gimme a bit
22:27 timotimo a bunch fewer GC runs
22:27 timotimo noticably less run time in total, too
22:28 timotimo m: say "the previous run took { 92149.34 / 82652.85 }x as much time for executing code"
22:28 camelia rakudo-moar 91b8b1: OUTPUT«the previous run took 1.11489610x as much time for executing code␤»
22:29 lizmat ?  is that backwards ?
22:29 timotimo it was slower before
22:29 timotimo so it's faster now
22:29 lizmat ah, yes
22:30 lizmat well, I guess we could further optimize the @a.min and @a.max case
22:30 timotimo m: say "min used to take { 13226.42 / 6069.31 }x as much time"
22:30 camelia rakudo-moar 91b8b1: OUTPUT«min used to take 2.1792296x as much time␤»
22:30 timotimo not quite 2.5x faster, but it's still very welcome :)
22:32 lizmat my bench was: (^10000).list.min.say
22:32 lizmat *100000
22:33 lizmat anyways, glad to have been of service
22:33 timotimo \o/
22:33 * lizmat gets some sleep before getting up to see a red moon
22:33 timotimo gnite lizmat :)
22:33 timotimo good luck with that moon
22:33 timotimo i'll be trying to catch it, too
22:34 timotimo huh, i may have compared it to a version that lacked another patch, too
22:34 timotimo so the time difference might be less pronounced actually
22:41 Akagi201 joined #perl6
22:52 leont joined #perl6
22:57 mr_ron joined #perl6
23:28 Khisanth joined #perl6
23:43 krunen joined #perl6
23:43 tokuhiro_ joined #perl6

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

Perl 6 | Reference Documentation | Rakudo