Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6-dev, 2017-07-03

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

All times shown according to UTC.

Time Nick Message
01:07 astj joined #perl6-dev
02:46 BenGoldberg joined #perl6-dev
04:02 astj joined #perl6-dev
05:01 astj joined #perl6-dev
06:46 [Tux] This is Rakudo version 2017.06-131-gd4436e18c built on MoarVM version 2017.06-30-g389e9732
06:46 [Tux] csv-ip5xs        2.657
06:46 [Tux] test            12.629
06:46 [Tux] test-t           4.086 - 4.177
06:46 [Tux] csv-parser      12.341
07:00 astj_ joined #perl6-dev
08:26 robertle joined #perl6-dev
08:33 dct joined #perl6-dev
08:47 [TuxCM] joined #perl6-dev
09:43 Geth ¦ rakudo/nom: c25fc85c4b | (Jonathan Worthington)++ | src/Perl6/Optimizer.nqp
09:43 Geth ¦ rakudo/nom: Remove dead code path from optimizer.
09:43 Geth ¦ rakudo/nom:
09:43 Geth ¦ rakudo/nom: We stopped using the lexotic op and mechanism for return handlers a
09:43 Geth ¦ rakudo/nom: long time ago; this is a relic from then.
09:43 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/c25fc85c4b
09:43 Geth ¦ nqp: 987178ace0 | (Jonathan Worthington)++ | src/vm/moar/QAST/QASTOperationsMAST.nqp
09:43 Geth ¦ nqp: Remove now-unused MoarVM lexotic of compilation.
09:43 Geth ¦ nqp:
09:43 Geth ¦ nqp: Was replaced by using normal return handlers for implementing `return`
09:43 Geth ¦ nqp: a long time ago.
09:43 Geth ¦ nqp: review: https://github.com/perl6/nqp/commit/987178ace0
10:08 astj joined #perl6-dev
10:09 Geth ¦ rakudo/nom: a7b2304e79 | (Jonathan Worthington)++ | src/vm/jvm/runtime/org/perl6/rakudo/RakOps.java
10:09 Geth ¦ rakudo/nom: Remove an unused `import`.
10:09 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a7b2304e79
10:10 Geth ¦ nqp: f216702b44 | (Jonathan Worthington)++ | 10 files
10:10 Geth ¦ nqp: Remove now-unused lexotic bits from JVM backend.
10:10 Geth ¦ nqp: review: https://github.com/perl6/nqp/commit/f216702b44
11:03 cog__ joined #perl6-dev
11:37 MasterDuke joined #perl6-dev
11:37 * lizmat hopes either ugexe or nine could answer https://stackoverflow.com/questions/44883887/how-do-i-find-the-version-and-authority-of-a-perl-6-module
13:59 dogbert17 joined #perl6-dev
14:11 lizmat afk&
14:47 jnthn m: my $s = "foo"; say "$s>>.uc()"
14:47 camelia rakudo-moar a7b230: OUTPUT: «FOO␤»
14:47 jnthn m: my $s = "foo"; say "$s>>[0]"
14:47 camelia rakudo-moar a7b230: OUTPUT: «foo␤»
14:47 jnthn lizmat: Don't think https://rt.perl.org/Ticket/Display.html?id=131695 is a bug
14:47 jnthn The rules for interpolation don't disqualify hypers.
14:50 * jnthn writes up a rejection
14:52 timotimo it doesn't reject the hyper when you put a \ in front of the first >
14:54 * dogbert17 is wondering what the purpose is behind the undocumented method Supply.stable
14:54 jnthn timotimo: unspace
14:55 timotimo it waits for values emitted by the supply to stay the same value for a while, then it emits the value
14:57 dogbert17 "stay the same value" ?
14:58 dogbert17 what's the usecase?
14:59 timotimo when you have a text box and you want to wait for the user to stop typing before you run some code
14:59 timotimo so you don't run your code for every single letter typed
15:00 dogbert17 aha, so during a specified time the taps won't receive anything?
15:00 timotimo yeah
15:00 timotimo but after a timeout after the last value runs out it will emit the last value
15:02 dogbert17 does this work for both live and on-demand supplies?
15:03 timotimo should
15:10 jnthn Surely will
15:10 jnthn Its at its most useful on things like UI input
15:11 * dogbert17 tries to cobble together an example
15:12 jdv79 most useful.  reminds me of a euro opera rock show type deal i went to in berlin.
15:13 jdv79 oh. "endless forms most beautiful", nightwish
15:13 * jnthn never managed to see nightwish yet
15:15 * timotimo hardly ever goes to concerts
15:15 jnthn Me either these days... :(
15:16 jnthn I mean, I never went to loads of them
15:16 jnthn Maybe once a year or so
15:16 jnthn Or twice.
15:16 jnthn Depended what was on offer :)
15:16 * jnthn mostly ended up seeing Dream Theater
15:19 raschipi joined #perl6-dev
15:24 dogbert17 so while the stable supply timout is running all values emitted to the supplier will get thrown away except the last one (talking about the stable Supply)?
15:25 jnthn Yes, and each time it resets the timeout
15:26 nine I once drove to Switzerland to see Nightwish on their "last" tour before they split up with Tarja. Got stuck in hellish traffic jams and it took me 9 hours despite racing through Switzerland like a mad man. Got to see the last 5 songs from way in the back.
15:27 nine Took a different route the next day on the way home just to get stuck again some 30km from home. Took 3 hours to make those so ended up again with 9 hours of driving. I then decided to never use a car to get to a concert ever again :)
15:27 dogbert17 as for the timeout reset I'm not so sure given that my test program works ok
15:28 jnthn nine: Ouch. Stories like that make me glad driving ain't an option for me. :P
15:28 dogbert17 what I mean is that the reset part doesn't work, or I'm misunderstanding
15:29 dogbert17 no, forget what I wrote, I'm a moron :)
15:30 raschipi Once a got stuck overnight in small village in Uruguay because of a typhoon.
15:32 * dogbert17 tries to document what I have learned ...
15:40 ugexe lizmat: thats a complicated question to answer because it depends on the CUR that loaded it. any answer will just be met with something along the lines of "is it in the documentation?", but its not in the documentation because some of that stuff is NYI
15:44 ugexe nine and I agreed at tps that ^ver should ideally be populated with META6 data is available. but implementation will not be as simple as that could sound
15:47 TimToady joined #perl6-dev
15:47 ugexe llfourn's response in the mailing list linked in the SO question is pretty much spot on
15:50 ugexe otherwise you can figure out what CUR you are using, and take the appropriate action. e.g.
15:50 ugexe m: say $*REPO.need(CompUnit::DependencySpecification.new(:short-name('NativeCall'))).distribution.meta<ver>;
15:50 camelia rakudo-moar a7b230: OUTPUT: «v6.c␤»
15:51 ugexe -Ilib doesn't set :distribution in its CUR, so that requires yet-another-way
15:52 llfourn ugexe: I was thinking about writing a response to that SO. I thought that .^ver and .distribution.meta<ver> were intended to be different. I thought that module/class versions were a thing?
15:53 llfourn (admittedly I haven't read the synopsis or the various proposals/discussions)
15:53 ugexe they would "override" the meta data
15:53 nine FWIW I do hope that the implementation will not be horribly complicated. We just have to get version and auth from the meta data into Perl6::Grammar's $*VER and $*AUTH
15:53 llfourn ugexe: that soudns fair enough.
15:54 ugexe the meta data provides should (but doesnt... yet?) allow like "Foo::Bar:ver<2>" even if the distribution its in is ver 3
15:54 ugexe right now the "distribution" version is applied to everything, but technically we should be able to declare other version
15:56 ugexe nine: the implementation should not be complicated, but figuring out the right interface so that it works for the various CURs likely will be
15:56 llfourn I think that makes sense. I guess Foo::bar:ver<2> or :ver<3> can even be in the same compunit?
15:56 ugexe the naive issue being ver|version
15:57 ugexe llfourn: that i haven't thought about, but from what I understand of s11 only the :api<> version should affect that
15:58 ugexe theoretically... nothing has been done with :api yet
15:59 * llfourn goes to actually read s11
16:00 llfourn "On top of that, Perl 6 allows different versions of the same compunit to be installed in a single repository."
16:00 llfourn Eh do we have versions for compunits now?
16:00 llfourn or does that sentence mean package?
16:00 ugexe its an attribute they have, but i dont think they are used
16:01 ugexe https://github.com/rakudo/rakudo/blob/nom/src/core/CompUnit/Repository/Installation.pm#L480
16:01 dogbert17 jnthn, timotimo: what do you think of https://gist.github.com/dogbert17/8b2f62492810999a1cf78d5ad3809539
16:02 llfourn so we have distribution versions, compunit versions AND package versions that could all potentially be different?
16:02 llfourn (though I think the package declarator itself doesn't take a version)
16:03 timotimo it should point out more clearly that "new" value means "changed" value, or "non-equal" value
16:03 timotimo also, perhaps we want stable to be able to take a comparison function
16:03 ugexe i think compunit version and package version are the same thing
16:03 llfourn eh? by package version I mean like class Foo:ver<2>?
16:04 ugexe and I mean any version on a module in a distribution that is not the same as the distribution version
16:04 llfourn ...maybe I should just finish reading :)
16:04 dogbert17 timotimo: but it doesn't take a comparison function today from what I can see
16:05 llfourn *module* meaning a package or a compunit?
16:05 jnthn dogbert17: maybe more like "This method can be quite useful when handling UI input, where it is not desired to perform an operation until the user has stopped typing for a while rather than on every keystroke."
16:05 ugexe CUR most likely has a :version attribute so it doesn't have to go through the slower .distribution
16:05 timotimo dogbert17: that's why i suggest it :)
16:05 jnthn timotimo: Actually we go purely on time
16:05 llfourn ugexe: ah ok
16:05 jnthn timotimo: What you're suggesting is .squish.stable :)
16:05 timotimo oh! i did not know that!
16:06 llfourn so I think that sentence from s11 is kind of wrong then
16:06 nine I concur
16:08 timotimo so maybe we can formulate it a bit more like "Creates a new supply that only emits a value after no other values have been emitted for $time"
16:08 dogbert17 jnthn: have added your suggestion
16:09 timotimo also, "they will be thrown away" sounds a bit like it refers to the new values
16:10 * jnthn dinner &
16:10 dogbert17 timotimo: have updated the gist
16:13 timotimo okay, and maybe "changed values" should be changed so it doesn't imply the values have to be different?
16:15 dogbert17 perhaps the word 'values' is enough
16:17 timotimo i think it'd also be nice to point out the synergy it has with putting a squish in front
16:18 timotimo AFK for a bit
16:26 tadzik joined #perl6-dev
16:31 robertle joined #perl6-dev
16:41 ilmari[m] joined #perl6-dev
16:41 CIAvash[m] joined #perl6-dev
16:59 ugexe it should be pointed out that its not reasonable to expect package managers to parse `class Foo::Bar:ver<2>` from code, so such declarations *should* always be in the meta data as well (through provides somehow)
17:00 ugexe putting it on the class itself really only helps when you `-Ilib`, and even then it doesn't make much sense since -Ilib does not load version info (although -I. would)
17:01 ugexe e.g. -Ilib is not intended to fulfill its version, its intended to fulfill version 0 (*)
17:05 ugexe m: package foo:ver<1> { say $?PACKAGE.^ver }; # -Ilib
17:05 camelia rakudo-moar a7b230: OUTPUT: «No such method 'ver' for invocant of type 'Perl6::Metamodel::PackageHOW'␤  in block <unit> at <tmp> line 1␤␤»
17:06 ugexe m: module foo:ver<1> { say $?PACKAGE.^ver }; # -I,
17:06 camelia rakudo-moar a7b230: OUTPUT: «v1␤»
17:06 ugexe s/-I,/-I./
17:10 nine But shouldn't the -Ilib case read the META6.json?
17:11 ugexe what if its -Ifoo, should it always look 1 level higher for a meta6.json?
17:12 ugexe -I. finds the meta because it checks if $dir.child("META6.json")
17:12 ugexe -Ilib just guesses
17:13 ugexe which is why i cringe when I usee `use lib <lib>` in distribution's tests instead of `use lib '.'` or some such
17:13 ugexe s/usee/see/
17:13 timotimo when i -I. and there's a meta6.json with a provides, that'll work out fine?
17:14 ugexe makes sense if its not a distribution yet, because there is no meta6.json. but otherwise not
17:14 timotimo sounds like i want to adopt that
17:14 ugexe yep, -I. uses META6.json to turn module names into paths instead of s/::/\// on the name
17:14 timotimo very nice
17:14 ugexe (or -I/directory/containing/meta6-file/ rather)
17:15 timotimo of course
17:16 ugexe nine: if lib was "reserved" in the way "bin" "resources" etc are then I think its ok to check the parent directory for a META6.json file. but not if "any" directory can be used
17:17 ugexe and I dont see a problem with making that a rule either. otherwise someone is eventually going to put all his module source in his resources and load them dynamically through %?RESOURCES because...
18:04 nine ugexe: IIRC we look in the repo's parent directory for the META6.json on the asumption that we're in "lib" or "src" or some such
18:25 dct joined #perl6-dev
18:47 * Zoffix returns
18:47 yoleaux 7 Jun 2017 15:22Z <tony-o> Zoffix: data-dump PRs merged ..
18:47 yoleaux 9 Jun 2017 05:49Z <samcv> Zoffix: yay! you read my mind about `use lib` accepting IO::Path objects! did i ever complain about that or are you a mind reader
18:47 yoleaux 10 Jun 2017 18:38Z <zengargoyle> Zoffix: biodude says thaks
18:47 samcv wow that was an old message
18:48 jnthn Zoffix: wb :)
18:53 Zoffix Decided it would be good to have a little roadmap planned, to have some direction. So I plan to: implement unsigned types correctly, then use them to use proper `uint64` in Rat to (hopefully) speed it up, and then make Rational immutable by getting rid of Rational.REDUCEME and possibly speeding up reduction. And, unless 6.c roast blocks it, I wanna get rid of Rats with Num numerators and represent their
18:53 Zoffix Num.Rat cases with the IEEE thing we already do for Rat.Num cases, but in reverse, so Inf => 1/0,  -Inf => -1/0, NaN => 0/0; that'll fix at least two tickers.
18:54 Zoffix Well, I'll do that after I learn C. 25% complete right now./
18:56 FROGGS joined #perl6-dev
18:56 Zoffix Also, found out that signed overflow is undefined behaviour in C. Wonder if that carries over to our natives...
18:56 Zoffix m: my int8 $x = 127; say ++$x
18:56 camelia rakudo-moar a7b230: OUTPUT: «-128␤»
18:59 Zoffix Oh + I'll fix the case where stuff like 9.99999999999999999999999999999999999 still gives a Rat, but a sick one. Gonna try out TimToady's suggestion of making a RatStr, so we get a non-contagious FatRat, but will see think about what's best once I get there. This will fix at least one ticket.
19:01 jnthn Zoffix: Yes, 'cus (in both cases) they do what the hardware does :)
19:01 jnthn Getting the unsigned stuff more properly fixed up would be very nice :)
19:05 MasterDuke Zoffix: i have some branches in moarvm/nqp/rakudo where i started to attempt a uint fix (don't remember the exact names right now). feel free to steal anything if you like
19:25 dct joined #perl6-dev
19:56 MasterDuke Zoffix: i think 'add_bindattr_u' and 'add_unsigned_int_ops_where_missing' are the names of the branches (in all the repos)
20:16 Zoffix ok
20:20 MasterDuke btw, just finished Seqs part 2 a min ago, good stuff
20:58 ugexe nine: https://github.com/rakudo/rakudo/blob/nom/src/core/CompUnit/Repository/FileSystem.pm#L26 What you're saying does happen, but only for $?RESOURCES (and part of the reason I wonder if CURs should not just delegate this off to the Distribution object itself)
21:13 TimToady joined #perl6-dev
21:30 pmurias joined #perl6-dev
21:46 geekosaur joined #perl6-dev
22:01 sacomo joined #perl6-dev
22:09 lizmat and another Perl 6 Weekly hits the net: https://p6weekly.wordpress.com/2017/07/03/2017-27-inching-on-speed/
22:22 Zoffix Who runs FakeUnicode account? Is it some Perl 6er?
22:23 Zoffix On Twitter I mean
22:29 lizmat good night, #perl6-dev!
22:30 Zoffix night
22:32 Zoffix lizmat++ # good weekly
22:45 timotimo it's not some perl 6er
22:45 timotimo or rather, it would surprise me if it were
22:45 timotimo though given their desire to remain pseudonymous, it'd be a bad idea for them to display they're part of the perl 6 community, as it is somewhat small
22:49 Zoffix was just surprised to be cc'd by them in a couple of tweets
22:49 Zoffix ZofBot: I guess I'm just famous!
22:49 ZofBot Zoffix, html?id=131626 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 eveo, you there? do you think this should work on Linux: my $fh = open('~/scratch
22:50 Zoffix No, it shouldn't, ZofBot
22:50 jnthn Not without the closing ' and ), ZofBot :P
22:50 jnthn And I hpoe that's a ~ directory :P
22:51 timotimo zofbot's a smarty
22:54 AlexDani` joined #perl6-dev
23:08 AlexDaniel “Perhaps this example should be provided somewhere as a 'gotcha'.” – IMO we should put more effort on eliminating gotchas, making messages awesome, etc. We already have a bunch of tickets for gotchas, and if all are actually documented the traps page will be huuuuge… https://github.com/perl6/doc/issues?utf8=%E2%9C%93&amp;q=trap
23:10 BenGoldberg joined #perl6-dev
23:11 timotimo i thought you could use roundrobin to transpose an array of arrays, but somehow i'm not getting it to work
23:11 timotimo oh, because the array itemized the sub-arrays
23:12 timotimo yeah, that was it
23:13 timotimo roundrobin(|$a) gives the original list back when it only has one sub-list
23:13 timotimo er, not the original list
23:13 timotimo the single sub-list, unchanged
23:13 timotimo oh, hm. no, that's not what you want
23:13 timotimo you do get (("a", "b", "c"),).Seq

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