Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6-dev, 2017-09-25

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

All times shown according to UTC.

Time Nick Message
00:51 mryan50 joined #perl6-dev
01:37 Ven`` joined #perl6-dev
01:55 ilbot3 joined #perl6-dev
01:55 Topic for #perl6-dev is now Perl 6 language and compiler development 2.0 | Logs at http://irclog.perlgeek.de/perl6-dev/today | For toolchain/installation stuff see #perl6-toolchain | For MoarVM see #moarvm
02:20 BenGoldberg joined #perl6-dev
04:10 Geth ¦ roast: 6c42b17ba7 | (Martin Ryan)++ | S02-types/int-uint.t
04:10 Geth ¦ roast: Add tests for type byte
04:10 Geth ¦ roast:
04:10 Geth ¦ roast: See RT #276
04:10 Geth ¦ roast: review: https://github.com/perl6/roast/commit/6c42b17ba7
04:10 Geth ¦ roast: 7b3edb289a | (Martin Ryan)++ (committed using GitHub Web editor) | S02-types/int-uint.t
04:10 Geth ¦ roast: Merge pull request #332 from mryan/byte-type
04:10 Geth ¦ roast:
04:10 Geth ¦ roast: Add tests for type byte
04:10 Geth ¦ roast: review: https://github.com/perl6/roast/commit/7b3edb289a
05:12 mryan50 joined #perl6-dev
05:40 Geth ¦ roast: mryan++ created pull request #333: Add tests for $*INITTIME
05:40 Geth ¦ roast: review: https://github.com/perl6/roast/pull/333
06:12 [Tux] This is Rakudo version 2017.09-85-gebd6440c2 built on MoarVM version 2017.09.1-36-gfbd89898
06:12 [Tux] csv-ip5xs        1.316 -  1.447
06:12 [Tux] test             9.988 - 10.100
06:12 [Tux] test-t           3.506 -  3.556
06:12 [Tux] csv-parser      12.545 - 12.824
07:16 cuonglm joined #perl6-dev
08:48 Geth ¦ roast: d67a3ca396 | (Martin Ryan)++ | S28-named-variables/inittime.t
08:48 Geth ¦ roast: Add tests for $*INITTIME
08:48 Geth ¦ roast:
08:48 Geth ¦ roast: See RT #296
08:48 Geth ¦ roast: review: https://github.com/perl6/roast/commit/d67a3ca396
08:48 Geth ¦ roast: ae62664e3e | lizmat++ (committed using GitHub Web editor) | S28-named-variables/inittime.t
08:48 Geth ¦ roast: Merge pull request #333 from mryan/init-time
08:49 Geth ¦ roast:
08:49 Geth ¦ roast: Add tests for $*INITTIME
08:49 Geth ¦ roast: review: https://github.com/perl6/roast/commit/ae62664e3e
08:50 lizmat Files=1229, Tests=75177, 309 wallclock secs (14.68 usr  5.31 sys + 2127.23 cusr 218.70 csys = 2365.92 CPU)
09:04 [TuxCM] joined #perl6-dev
09:18 eater hehe
09:19 eater m: DEPRECATED("the garbage bin")
09:19 camelia rakudo-moar ebd644: ( no output )
09:19 * eater asks himself where the output went
09:21 Zoffix eater: deprecated can be disabled with an env var, which the bot has enabled
09:21 eater hehe
09:22 lizmat m: %*ENV<RAKUDO_NO_DEPRECATIONS>:delete; DEPRECATED("the garbage bin")
09:22 camelia rakudo-moar ebd644: OUTPUT: «Saw 1 occurrence of deprecated code.␤================================================================================␤Block <unit> (from unknown) seen at:␤  <tmp>, line 1␤Please use the garbage bin instead.␤-------------------------------------…»
09:22 eater :D
09:22 Zoffix :)
09:22 eater tbh kinda suprised I could call that in "user"-land
09:23 Zoffix m: sub f is DEPRECATED('the garbage bin') {};     f
09:23 camelia rakudo-moar ebd644: ( no output )
09:24 Zoffix m: %*ENV<RAKUDO_NO_DEPRECATIONS>:delete; sub f is DEPRECATED('the garbage bin') {};     f
09:24 camelia rakudo-moar ebd644: OUTPUT: «Saw 1 occurrence of deprecated code.␤================================================================================␤Sub f (from GLOBAL) seen at:␤  <tmp>, line 1␤Please use the garbage bin instead.␤---------------------------------------------…»
09:24 lizmat deprecations are collected until END time: only then the env variable is checked
09:24 eater Zoffix: ah, then it makes sense you can call that function from userland
09:26 robertle joined #perl6-dev
09:29 eater private multi methods aren't allowed?
09:29 eater why so?
09:29 Zoffix Not implemented
09:29 Zoffix yet
09:30 eater ah, not a technical limitation?
09:38 mryan50 joined #perl6-dev
09:40 Zoffix ZOFFLOP: t/spec/S17-procasync/kill.t
09:40 Zoffix t/spec/S32-io/IO-Socket-Async.t fails for me: "`Failed to resolve host name '::1'. Error: 'Address family for hostname not supported'`"
09:42 cuonglm Zoffix: Do you know where the code of `-n` command line flag?
09:42 cuonglm I found it was added to main here https://github.com/rakudo/rakudo/blob/nom/src/main.nqp#L22
09:43 Zoffix cuonglm: not off hand. MasterDuke would know
09:43 eater Zoffix: let me see
09:43 eater I may have broke that
09:44 cuonglm Zoffix: Yeah, I saw that LAST seems not work with `-n`
09:44 Geth ¦ rakudo/nom: 3f0f321469 | (Zoffix Znet)++ | src/core/Exception.pm
09:44 Geth ¦ rakudo/nom: Remove trailing whitespace
09:44 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/3f0f321469
09:44 cuonglm Zoffix: echo 1 | perl6 -ne 'LAST .say' prints nothing
09:46 cuonglm sounds like the code isn't wrapped inside a loop like Perl 5
09:47 Zoffix cuonglm: there's a ticket: https://rt.perl.org/Ticket/Display.html?id=128398#ticket-history
09:47 Zoffix cuonglm: it's likely wrapped into nqp loop and the LAST handler isn't installed
09:48 ilmari looks like none of the block/loop phasers are set up
09:48 Zoffix cuonglm: like was the case here: https://github.com/rakudo/rakudo/commit/3b67b4acea682ae5970ce5c9bbe96ead66c8bb9f#diff-395f59b38aa35c60a5cf4ef234c5ba3d
09:48 Zoffix oh wait, those ain't phasers
09:48 Zoffix never mind
09:49 ilmari )$ echo 1 | perl6 -ne 'ENTER .say'
09:49 ilmari ===SORRY!===
09:49 ilmari Cannot reference undeclared local 'enter_result__1'
09:50 cuonglm ilmari: I saw it was setup, with output of --target=optimize
09:51 cuonglm but in wrong scope
09:51 Zoffix m: Rakudo::Internals.REGISTER-DYNAMIC: '$*Z', { say "meow"; }; say $*Z; say $*Z
09:51 camelia rakudo-moar 3f0f32: OUTPUT: «meow␤True␤meow␤True␤»
09:51 Zoffix oh, nm (had a question but found what I did wrong)
09:54 eater how do I run single tests within rakudo again? ?
09:54 Zoffix t/fudgeandrun some-test.t
09:54 eater sometests doesn't seem to be generated in my Makefile?
09:54 eater ah
09:56 cuonglm .tell MasterDuke can you tell me where is the code for `-n` command line flags
09:56 yoleaux cuonglm: I'll pass your message to MasterDuke.
09:58 eater Zoffix: stupid question but do you have IPv6 support on your machine? (at least, does your loopback interface have it)
09:59 Zoffix eater: how can I find out?
09:59 eater what OS are you on?
09:59 Zoffix Debian
10:01 eater Zoffix: `ip address show lo`
10:01 eater if that show an error it's just the first entry in `ip address show`
10:02 eater there should be an 'inet 127.0.0.1/8' for IPv4 and 'inet6 ::1/128' for IPv6
10:02 ilmari cuonglm: Perl6::Actions::wrap_option_n_code()
10:03 cuonglm ilmari: thanks ++
10:03 ilmari the comment says «Turn $code into "for lines() { $code }"», but to me it looks more like lines().map($code)
10:03 ilmari i.e. not a loop
10:04 ilmari m: (1..3).map({ LAST say "last" })
10:04 camelia rakudo-moar 3f0f32: OUTPUT: «last␤»
10:04 ilmari ah, no, loop phasers do work with map
10:04 Zoffix 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default
10:04 Zoffix link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
10:04 Zoffix eater: ^
10:05 eater there are no addresses assigned to it? :o
10:05 cuonglm ilmari: I'm not sure, but I think that LAST phaser was installed in wrong scope
10:05 Zoffix inet6 ::1/128 scope host
10:05 cuonglm ilmari: I missed perl -MO=Deparse :)
10:05 Zoffix eater: full output: https://gist.github.com/zoffixznet/2ead25c4d50bb2ec8ff8ee77227bda11
10:05 eater hmmm
10:05 eater weird
10:06 cuonglm ilmari: the AST requires many knowledge about rakudo internal to understand
10:06 eater you have ipv6 at least :)
10:06 eater so lets see if I fucked something up
10:06 Zoffix huggable: swear jar
10:06 huggable Zoffix, Help Perl 6. Donate: https://donate.perlfoundation.org/
10:06 eater D:
10:06 teatime lol
10:12 eater Zoffix: you have that fail with rakudo/nom and moar/master ?
10:13 Zoffix eater: no, whatever moar the rakudo specifies as needing
10:13 eater but rakudo/nom?
10:13 Zoffix Yes.
10:14 Zoffix nom+1
10:14 Zoffix ZOFVM: Files=1280, Tests=152159, 143 wallclock secs (20.49 usr  3.34 sys + 2970.36 cusr 225.37 csys = 3219.56 CPU)
10:16 Geth ¦ roast: 84b48ec92b | (Zoffix Znet)++ | 2 files
10:16 Geth ¦ roast: Spec $*INIT-INSTANT
10:16 Geth ¦ roast: review: https://github.com/perl6/roast/commit/84b48ec92b
10:18 Geth ¦ rakudo/nom: 6bdb2dd368 | (Zoffix Znet)++ | 3 files
10:18 Geth ¦ rakudo/nom: Rename $*INITTIME to $*INIT-INSTANT
10:18 Geth ¦ rakudo/nom:
10:18 Geth ¦ rakudo/nom: - $*INITTIME was never specced
10:18 Geth ¦ rakudo/nom: - Use kebob-case as all of our other multi-word dynamics use
10:18 Geth ¦ rakudo/nom: - Encode the value type in the name
10:18 Geth ¦ rakudo/nom:
10:18 Geth ¦ rakudo/nom: Part of 6.d-prep featurelist:
10:18 Geth ¦ rakudo/nom: https://github.com/perl6/6.d-prep/blob/master/TODO/FEATURES.md
10:18 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6bdb2dd368
10:18 Zoffix ^ (deprecate $*INITTIME for 6 months)
10:19 lizmat meh
10:19 lizmat :-)
10:19 Zoffix meh?
10:20 Geth ¦ 6.d-prep: 346b27c7ec | (Zoffix Znet)++ | TODO/FEATURES.md
10:20 Geth ¦ 6.d-prep: Mark $*INIT-INSTANT as now implemented
10:20 Geth ¦ 6.d-prep: review: https://github.com/perl6/6.d-prep/commit/346b27c7ec
10:21 lizmat was this discussed somewhere ?
10:22 lizmat I mean, I just merged tests for $*INITTIME
10:22 lizmat color me surprised, that's all
10:22 Zoffix Yeah, it was discussed on the Issue the PR mentioned.
10:23 * Zoffix & for the rest of the day
10:23 lizmat *
10:24 eater Zoffix: :/ can't reproduce your failure
10:43 Ven`` joined #perl6-dev
10:50 eater .tell Zoffix the tests pass for me even in a clean environment so your changes may have broke it?
10:50 yoleaux eater: I'll pass your message to Zoffix.
10:51 eater very helpful feedback ofc
10:51 eater ~works on my machine~
10:51 lizmat "Object of type X::Comp in QAST::WVal, but not in SC"
10:52 lizmat I get this with the QAST generation part of Foo in "nqp::getattr(self,Foo,'$!a') = %init.AT-KEY('a')"
10:52 lizmat it now is "QAST::WVal.new( :value( nqp::atpos($task,1) ) )"
10:52 lizmat I guess I need to register that somewhere somehow?  but where and how?
10:52 lizmat timotimo jnthn moritz ^^^
10:55 jnthn $*W.add_object iirc
10:55 yoleaux 24 Sep 2017 03:55Z <MasterDuke> jnthn: instead of https://github.com/rakudo/rakudo/pull/1171, could nqp::join return the input string if there was only one?
10:55 jnthn .tell MasterDuke I'm surprised join doesn't already know that trick! Yes, let's do that, it's far more general
10:55 yoleaux jnthn: I'll pass your message to MasterDuke.
10:55 lizmat jnthn: trying that
10:59 jnthn fwiw, probably won't be doing much useful today...got sick over the weekend, and improving but still got a horrible headache :/
11:00 Zoffix eater: just built HEAD on my home Bodhi Linux box (fork of Ubuntu, which is a fork of Debian) and the test passes there. So the failure is due to some setup of the VM; would be nice if the test could be skipped when whatever that condition is exists
11:00 yoleaux 10:50Z <eater> Zoffix: the tests pass for me even in a clean environment so your changes may have broke it?
11:01 Zoffix VM => Google Compute Engine VM I was using where the test failure happened
11:01 eater >need google account
11:01 eater ffff
11:02 eater I rather find out what those conditions are tho
11:04 Zoffix If I'm the only one for whom the failure happens, then just leave it to me. I
11:04 Zoffix If I'm the only one for whom the failure happens, then just leave it to me. I'll fix it later
11:04 lizmat jnthn: https://gist.github.com/lizmat/16e79ba101327c5780dce9db7f767e49  # hopefully this will help with your headache
11:05 eater Zoffix: poke me if you need help resolving it :)
11:08 jnthn lizmat:  # ??  not sure why this is
11:08 jnthn lizmat: That line is what attaches the block you produce into the AST :)
11:11 lizmat could it be because the class isn't composed at that time ?
11:16 jnthn Oh, you're still getting the error/
11:16 jnthn That'd be odd in that type objects are created/installed right at the start
11:17 jnthn after the class Foo ...traits... {
11:17 lizmat right
11:17 lizmat hmmm...  perhaps I need a decont
11:17 lizmat it's been through HLL land already then
11:20 lizmat nope :-(
11:22 lizmat from what I can tall, with .HOW.name, it *is* the object for which we're creating the BUILD
11:23 lizmat jnthn: what is the meaning of "$!w.cur_lexpad()[0].push($block);"
11:24 lizmat where $block is the Block of the method being created
11:26 jnthn Take the QAST::Block of the current scope, get its first QAST::Stmts node (which is where we install declarations), and push the block into it
11:26 jnthn It's just putting the QAST::Block you've created into the AST
11:26 jnthn So that it will be compiled as part of the overall program
11:28 lizmat jnthn: being a complete noob (again) at this, how do I take the QAST::Block of the current scope ?
11:33 lizmat jnthn: another issue I just realized: can you replace a method in an augment ?
11:33 lizmat if we're adding a BUILD method at compose time, we cannot add a possibly changed BUILD method when augmenting
11:34 lizmat m: use MONKEY; class Foo {}; augment class Foo { has $.a }  # this appears to be legal
11:34 camelia rakudo-moar 6bdb2d: ( no output )
11:36 jnthn $!w.cur_lexpad() gets the QAST::Block of the current scope
11:36 jnthn It's...barely legal
11:37 jnthn I'm a bit surprised it allows it, but I guess the actual constraint is loose enough that you get away with it if you never made an instance of the class
11:37 jnthn m: use MONKEY; class Foo {}; BEGIN Foo.new; augment class Foo { has $.a }
11:37 camelia rakudo-moar 6bdb2d: ( no output )
11:38 jnthn Huh...
11:38 jnthn m: use MONKEY; class Foo {}; BEGIN Foo.new; augment class Foo { has $.a }; Foo.new
11:38 camelia rakudo-moar 6bdb2d: ( no output )
11:38 jnthn m: use MONKEY; class Foo {}; BEGIN Foo.new; augment class Foo { has $.a }; Foo.new.a.say
11:38 camelia rakudo-moar 6bdb2d: OUTPUT: «P6opaque: no such attribute '$!a' in type Foo when trying to get a value␤  in block <unit> at <tmp> line 1␤␤»
11:38 jnthn Right, that clearly can't work, but where is the error going :S
11:38 lizmat so: we should disallow adding attributes on augment ?
11:39 jnthn It used to throw (at compile time) if you tried
11:39 jnthn I don't know when that regressed
11:40 lizmat ok, well, that's a relief
11:40 lizmat I guess we need to add a test  :-)
11:40 jnthn https://github.com/MoarVM/MoarVM/blob/master/src/6model/reprs/P6opaque.c#L652 fwiw
11:43 lizmat well, I'll just make sure we don't try to change the BUILDPLAN or try to create a BUILD method when augmenting
11:44 lizmat er, I mean BUILDALL method  :-)
11:53 lizmat jnthn: $!w.cur_lexpad()[0].push($block);  # this is what you meant, right ?
11:53 lizmat that's already in the code  :-(
11:55 lizmat jnthn: thinking about this though, isn't the lexpad of that World method at compile time not the wrong place ?
11:58 lizmat jnthn: RT #132157 fwiw
11:58 synopsebot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=132157
12:02 [Coke] samcv, jnthn : RT #132154 - my guess is that slurp isn't doing anything specific, it's just normal unicode \r\n normalization?
12:02 synopsebot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=132154
12:06 jnthn "Basically, slurp is changing \r\n to \n. This may seem like a reasonable thing, except that then it has to also change \r to \n."
12:06 jnthn Do we actually run on any platforms that use \r as the line ending?
12:06 jnthn Anyway, too headache to write it up now, but rejected.
12:06 jnthn \r\n => \n transformation is done consistently
12:07 DrForr Mac uses \r I believe.
12:07 jnthn DrForr: Yes, I know, and does anyone run Rakudo on a Mac? :)
12:07 stmuk classic MacOS < 10
12:07 yoleaux 24 Sep 2017 21:07Z <tbrowder> stmuk: please check the docs (Programs | Reading the docs  | p6doc - the Perl 6 pod reader) and see if the blurb needs changes
12:08 [Coke] No, I don't think we have any p6 platforms that use that line ending.
12:08 jnthn (pre-OSX, I mean)
12:08 jnthn Right
12:08 jnthn We should add a :!translate-nl option at some point
12:08 DrForr Oh, that changed as of OS X? Ya learn something new every day...
12:09 jnthn All the guts for it are there, just needs exposin
12:09 jnthn *exposing
12:09 jnthn With translation enabled as the default
12:09 jnthn As it is today
12:11 Zoffix m: "foo\rbar".lines.say # I think the ticket primarily was created because Str.lines does split on bare \r
12:11 camelia rakudo-moar 6bdb2d: OUTPUT: «(foo bar)␤»
12:12 Zoffix And so you have the inconsistency that lines() gives you one thing, but slurp.lines gives another
12:12 perlpilot joined #perl6-dev
12:13 * [Coke] wonders how !translate-nl would work - you'd have an "invalid" Str at that point, no? (Something not in NFG)
12:13 jnthn Ah
12:13 jnthn I was more concerned with consistency with the rest of I/O
12:13 jnthn Which only does \r\n -> \n
12:13 jnthn [Coke]: There's two separate things here
12:14 jnthn [Coke]: \r\n becoming a grapheme is a normalization step
12:14 jnthn (And part of Unicode)
12:14 jnthn [Coke]: Translating the \r\n grapheme into \n is a separate step, and done as part of the definition "text mode" I/O
12:15 jnthn The proposed :!translate-nl would just contorl the second step
12:15 [Coke] ah, thanks.
12:15 jnthn *control
12:16 jnthn The first one, you're always going to be getting with a Str
12:57 lizmat jnthn: a progress report: it appears to happen only if atpos($task,1) !=:= the class for which we're creating the BUILDALL
12:57 lizmat this is the case if we e.g. have a subclass
12:58 * lizmat tests a brainwave
13:00 lizmat yup, that's it
13:01 lizmat I was registering the Wval, but the original object should be registered  :-)
13:02 jnthn Ah!
13:02 jnthn Yes :)
13:07 lizmat m: class A { submethod BUILD() { dd self } }; class B is A { submethod BUILD () { dd self } }; B.new  # shouldn't that be A.new/B.new ???
13:07 camelia rakudo-moar 6bdb2d: OUTPUT: «B.new␤B.new␤»
13:07 lizmat jnthn: ^^^
13:07 lizmat I guess not...  hmmm...
13:07 lizmat ok
13:08 lizmat sorry for the noise
13:11 lizmat jnthn: do we have some function that translates primspec to "i", "n", "s" respectively ?
13:14 jnthn No, usually I just make an array and index into it with the primspec result
13:14 lizmat yeah, I seem to be doing a lot of that lately  :-)
13:42 skids joined #perl6-dev
13:57 lizmat progress report: native + opaque setting from %init now completed
14:13 lizmat afk for a bit&
14:17 timotimo only in compatibility situations though?
14:17 timotimo oops, wasn't scrolled down all the way
14:23 buggable joined #perl6-dev
14:38 AlexDaniel joined #perl6-dev
15:17 geekosaur joined #perl6-dev
15:52 ugexe what are the valid values a package name part (e.g. Part1::Part2) can start with?
15:53 timotimo hm, i'd expect it's the same rule as identifiers
15:55 ugexe seems likely, do you know what the rules for identifiers are?
15:58 timotimo i was expecting <alpha> followed by <alpha + numeric>
15:58 ugexe isnt emoji a valid identifier?
16:00 timotimo don't think so, aren't they "symbol"?
16:00 Zoffix Nope. You can make it a term though
16:00 Zoffix Identifiers are `<.ident> [ <.apostrophe> <.ident> ]*`
16:00 timotimo m: say uniprop("☺")
16:00 camelia rakudo-moar 6bdb2d: OUTPUT: «So␤»
16:00 timotimo that counts as emoji, right?
16:01 timotimo m: say uniprop("☺", "Emoji")
16:01 camelia rakudo-moar 6bdb2d: OUTPUT: «True␤»
16:01 Zoffix where apostrophe is <[ ' \- ]> and ident is something from nqp
16:03 ugexe ah forgot about '
16:04 Zoffix ident is \w
16:04 Zoffix nqp checks for nqp::const::CCLASS_WORD
16:04 ugexe foo_::bar is ok, but not foo-::bar
16:05 Zoffix m: say 95.chr
16:05 camelia rakudo-moar 6bdb2d: OUTPUT: «_␤»
16:05 Zoffix and ident can only start with _ or nqp::iscclass(nqp::const::CCLASS_ALPHABETIC
16:05 ugexe ah ha, thats what i was after
16:06 cognominal nice landing page  jnthn++
16:08 Zoffix And there's something involving parentheses that I'm unsure of: https://github.com/rakudo/rakudo/blob/nom/src/Perl6/Grammar.nqp#L524-L543
16:09 timotimo cognominal: the cro one?
16:47 dogbert2 joined #perl6-dev
16:57 cognominal timotimo, this one http://jnthn.net/, the cro one is nice too
17:00 ilmari haha, http://ma.cro.services/ works too :)
17:00 ilmari and http://vel.cro.services/
17:00 ilmari (wildcard dns)++
17:01 robertle joined #perl6-dev
17:02 Ven joined #perl6-dev
17:03 cognominal ilmari, wish long life to Perl 6 so we don´t need ne.cro.services
17:09 Zoffix lol
17:28 timotimo oooh that's a cool front page, yeah
17:32 timotimo jnthn: a whole bunch of course page links on the "ourexpertdetails" page on you are 404 :(
17:40 jnthn timotimo: ooh, nice catch
17:41 * jnthn passed it on to the folks who tend that site :)
17:48 Zoffix joined #perl6-dev
17:57 Ven joined #perl6-dev
18:03 Zoffix I'm just gonna rip out the temporary-fix commit.
18:03 Zoffix There's a whole bunch of places with >= <= != ops that don't deal with Reals; trying to plug them al up feels iffy :/
18:04 Zoffix Rip out the https://github.com/rakudo/rakudo/commit/a13bad95b2e1ad48a1d1a023e84912b1b5950faa I meant
18:09 Ven_ joined #perl6-dev
18:11 Zoffix I don't get why old version is slow at all. The `is pure` on the sub would've inlined the sub in static optimizer, no?
18:11 * Zoffix builds and looks at ASTs
18:21 Zoffix ZOFFLOP: t/spec/S29-os/system.t
18:21 Zoffix ZOFVM: Files=1280, Tests=152159, 141 wallclock secs (21.29 usr  3.52 sys + 2831.09 cusr 221.26 csys = 3077.16 CPU)
18:25 Geth ¦ rakudo/nom: 1af2a745fc | (Zoffix Znet)++ | src/core/Numeric.pm
18:25 Geth ¦ rakudo/nom: Revert "Temporary fix for RT #131626"
18:25 Geth ¦ rakudo/nom:
18:25 Geth ¦ rakudo/nom: This reverts commit a13bad95b2e1ad48a1d1a023e84912b1b5950faa.
18:25 Geth ¦ rakudo/nom:
18:25 synopsebot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=131626
18:25 Geth ¦ rakudo/nom: The commit breaks Version ≥ Version, Date ≥ Date, and possibly more.
18:25 Geth ¦ rakudo/nom: I looked at trying to plug up those candidates in a similar
18:25 Geth ¦ rakudo/nom: fashion, but seems quite messy and doesn't guarantee total fix.
18:25 Geth ¦ rakudo/nom: For something that's meant to be just temporary, feels like overkill.
18:25 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/1af2a745fc
18:28 Geth ¦ roast: 1f6a182301 | (Zoffix Znet)++ | S03-operators/misc.t
18:28 Geth ¦ roast: Test ≤, ≥, and ≠ for non-Real values
18:28 Geth ¦ roast:
18:28 Geth ¦ roast: Rakudo fix: https://github.com/rakudo/rakudo/commit/1af2a745fc
18:28 Geth ¦ roast: review: https://github.com/perl6/roast/commit/1f6a182301
18:32 samcv .
18:34 Zoffix :
18:35 [Coke]
18:35 samcv good *
18:36 Zoffix \o
18:36 [Coke] good ⍟
18:45 Zoffix Ah, OK, static optimizer constant folds `is pure` ops only if args are known at compile time
18:46 Zoffix Is constant folding the same thing as inlining/
18:46 Zoffix ?
18:47 Zoffix I guess not
18:53 lizmat no, constant folding is more like changing 1 + 2 to 3 so you don't have to do the addition at runtime
18:54 Zoffix Ah
18:55 lizmat [Tux]: is utf8-c8 now clean in your experience ?
18:57 Zoffix m: my constant &infix:«zof» = &infix:«>=»; for ^1000_00 { $ = rand zof rand }; say now - INIT now
18:57 camelia rakudo-moar 1af2a7: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Variable '&infix:<zof>' is not declared␤at <tmp>:1␤------> 3 = &infix:«>=»; for ^1000_00 { $ = rand 7⏏5zof rand }; say now - INIT now␤»
18:57 Zoffix Can't use &foo as constants?
18:58 Zoffix seems to work if you just use &foo instead of the &infix:«zof»
19:19 Zoffix m: say 20.33786761/0.3678445
19:19 camelia rakudo-moar 1af2a7: OUTPUT: «55.289307330␤»
19:19 Zoffix ouch
19:20 Zoffix ^ that comit made those ops that much slower than Texas versions
19:20 Zoffix Buut... good news. I have another "temporary" workaround that makes them just say 0.59670900/0.42650955 slower
19:20 Zoffix m: say 0.59670900/0.42650955
19:20 camelia rakudo-moar 1af2a7: OUTPUT: «1.3990519␤»
19:21 AlexDaniel u: ≤
19:21 unicodable6 AlexDaniel, U+2264 LESS-THAN OR EQUAL TO [Sm] (≤)
19:21 Zoffix And looks like pre-compit slowage factor was 1.43x, so I'd say it's it's a wash :D
19:22 Zoffix .oO( Zoffix takes away and Zoffix giveth back )
19:25 patrickz joined #perl6-dev
19:29 Zoffix ZOFFLOP: t/spec/S03-operators/misc.t
19:31 Zoffix :S test dies with No such method 'CALL-ME' for invocant of type 'Sub+{<anon|47455808>}'
19:31 Zoffix in block <unit> at t/spec/S03-operators/misc.rakudo.moar line 149
19:31 Zoffix but if I run the code of the test alone it works
19:37 Zoffix Oh. Way weird. ./perl6 -e 'say 5 ≤ 5'; works, but ./perl6 -e 'say 16 ≥  8; say 5 ≤ 5' dies with that error :S
19:37 Zoffix I just did stuff like `my &infix:«≤» = &infix:«<=»;` (and earlier had `BEGIN my &infix:«≤» = &infix:«<=»;`) in src/core/Numeric.pm
19:40 mryan50 joined #perl6-dev
19:46 Geth ¦ rakudo/faster-mexico: 04612ba00a | (Zoffix Znet)++ | src/core/Numeric.pm
19:46 Geth ¦ rakudo/faster-mexico: Make Mexico numeric ops 1.3x slower than 50x slower
19:46 Geth ¦ rakudo/faster-mexico:
19:46 Geth ¦ rakudo/faster-mexico: Temporary workaround for RT#131626 to restore the benefit of
19:46 Geth ¦ rakudo/faster-mexico: https://github.com/rakudo/rakudo/commit/1af2a745fc
19:46 synopsebot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=131626
19:46 Geth ¦ rakudo/faster-mexico:
19:46 Geth ¦ rakudo/faster-mexico: Got a weird bug in it where using one of the ops and then using
19:46 Geth ¦ rakudo/faster-mexico: another one of the ops crashes:
19:46 Geth ¦ rakudo/faster-mexico: https://irclog.perlgeek.de/perl6-dev/2017-09-25#i_15214686
19:46 Geth ¦ rakudo/faster-mexico: review: https://github.com/rakudo/rakudo/commit/04612ba00a
19:46 * Zoffix relocates
19:46 timotimo "mexico" %)
19:46 Zoffix it's across from Texas :)
19:47 timotimo right
20:02 lizmat and another Perl 6 Weekly hits the Net: https://p6weekly.wordpress.com/2017/09/25/2017-39-smarting-up-the-pool/
20:19 Geth ¦ tap-harness6/master: 23 commits pushed by (Leon Timmermans)++
20:19 Geth ¦ tap-harness6/master: review: https://github.com/perl6/tap-harness6/compare/aa5dbdbabe...439b9ed661
20:29 lizmat jnthn: would it make sense to add the World.nqp / line number to the generated accessor methods so that it's clear where they originated?
20:29 lizmat jnthn: instead of "<unknown>:<unknown>" in stack traces / profiles ?
20:29 lizmat jnthn: if so, how to go about this?
20:32 timotimo you can attach a :node to specific qast nodes
20:32 timotimo that's what we use for line number annotations and such
20:32 timotimo it has to be a match object
20:32 timotimo the compiler cross-references the match object's position to where line endings are
20:34 lizmat ok, I think In need to grok this a bit more  :-)
20:38 timotimo we could probably teach the compiler to accept a list of three things as line number annotations, too
20:38 timotimo like file, line, column
20:39 timotimo but i'm not sure how you'd get, for example, the line number that belongs to an attribute or something
20:46 lizmat I was thinking of using the file/line of the generator method
20:49 timotimo oh, the one that does the compiling?
20:49 lizmat yup
20:50 lizmat I mean, if you want to know what's going on in there, you would need to go there, not to some line in the class's source
20:50 timotimo right
20:51 timotimo not sure if that's so great
20:51 lizmat why ?
20:52 timotimo pointing people at the compiler's guts .. :\
20:55 |Tux| lizmat, yes, I think it is. But I have had no time yet to actually implement the parts that would need it
20:56 lizmat timotimo: if someone takes the trouble at looking at stack traces that deeply, the deserve to see the guts  :-)
20:56 lizmat [Tux]: ok, so fixed until you prove it not to be  :-)
20:58 |Tux| yes
21:14 pmurias joined #perl6-dev
21:16 pmurias btw do we want to also have columns in back traces (in addition to line numbers) when they are available? (like on the js backend)
21:17 Geth ¦ nqp/master: 13 commits pushed by pmurias++
21:17 Geth ¦ nqp/master: review: https://github.com/perl6/nqp/compare/cd588c17da...a254cd808f
21:17 Geth ¦ rakudo/js: 8 commits pushed by pmurias++
21:17 Geth ¦ rakudo/js: 1f9fcad23c | [js] Don't choose the multi variant in the optimizer because it's buggy
21:17 Geth ¦ rakudo/js: fdfdbdb111 | [js] Throw a type exception from nqp::p6bindassert
21:17 Geth ¦ rakudo/js: f386b98e08 | [js] Do a var -> let, const in a few places
21:17 Geth ¦ rakudo/js: cc5d957c69 | [js] Set the Iterable using nqp::p6setitertype
21:17 Geth ¦ rakudo/js: c85028b280 | [js] Make nqp::p6decontrv just decont things which are not Iterable
21:17 Geth ¦ rakudo/js: ab4207fae1 | [js] Make nqp::defor use the defined method when in perl6 hll
21:18 Geth ¦ rakudo/js: 13950b7f07 | [js] Add a Not Implememented stub for ThreadPoolScheduler
21:18 Geth ¦ rakudo/js: e1fc8255a9 | [js] Unbox objects in a rakudo specific manner
21:18 Geth ¦ rakudo/js: review: https://github.com/rakudo/rakudo/compare/c5383a1cf3...e1fc8255a9
21:18 Zoffix m: my &infix:<foo> = &infix:«<=»; my &infix:<bar> = &infix:«>=»; say 2 foo 4; say 3 bar 1
21:19 camelia rakudo-moar 1af2a7: OUTPUT: «True␤True␤»
21:19 Zoffix hmm.. weird works here fine :/
21:20 Zoffix m: my &infix:<≤> = &infix:«<=»; my &infix:<≥> = &infix:«>=»; say 2 ≤ 4; say 3 ≥ 1
21:20 camelia rakudo-moar 1af2a7: OUTPUT: «No such method 'CALL-ME' for invocant of type 'Sub+{<anon|53916432>}'␤  in block <unit> at <tmp> line 1␤␤»
21:22 mryan50 joined #perl6-dev
21:22 Zoffix give up your secrets, compiler...
21:23 timotimo m: my &infix:<lolol> = &infix:≪<=≫; say 1 lolol 2
21:23 camelia rakudo-moar 1af2a7: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Confused␤at <tmp>:1␤------> 3my &infix:<lolol> = &infix:7⏏5≪<=≫; say 1 lolol 2␤    expecting any of:␤        colon pair␤»
21:24 timotimo oh, wrong kind of french quotes
21:24 timotimo m: my &infix:<lolol> = &infix:«<=»; say 1 lolol 2
21:24 camelia rakudo-moar 1af2a7: OUTPUT: «True␤»
21:24 timotimo must have something to do with that one you have already being declared?
21:26 Zoffix The one in core? I get the same error if I change the core ones to ^ that declaration. I'm guessing it's something to do with the fact taht there are grammar rules for ≤ and the like, but none for `foo`
21:26 Zoffix and grammar rules do things
21:26 teatime
21:26 Zoffix This core change gives same error: https://github.com/rakudo/rakudo/commit/04612ba00a
21:27 timotimo hmm
21:27 Zoffix Note that the error happens only when you combine it with another op. The op by itself works fine :S
21:27 Zoffix s/combine/use another op in unrelated statement/;
21:27 * Zoffix dinners
21:28 timotimo anything odd in the target=ast or target=optimize? anything --optimize=off does?
21:30 travis-ci joined #perl6-dev
21:30 travis-ci NQP build failed. pmurias 'Test nqp::base_I with base 36'
21:30 travis-ci https://travis-ci.org/perl6/nqp/builds/279700205 https://github.com/perl6/nqp/compare/cd588c17dabd...a254cd808f85
21:30 travis-ci left #perl6-dev
21:37 * lizmat gets some sleep&
21:49 pmurias joined #perl6-dev
21:53 Zoffix --optimize off don't do nothing
21:58 timotimo OK
22:09 TimToady joined #perl6-dev
22:10 jnthn lizmat: Don't think we can get the line number of the location where the code-gen happened; we could put the line number on the class decl perhaps, we'd need to just :node($/) or so (provided we have a match object to hand)
22:12 cognominal in Promise, why the @!thens are scheduled all in a loop ? https://github.com/rakudo/rakudo/blob/nom/src/core/Promise.pm#L106    this seems to defeat the purpose of chaining the Promise with .then.  One being executed when the preceding one has succeeded
22:12 cognominal I probably miss something essential :(
22:13 jnthn You mean like $promise.then(...).then(...).then(...) ?
22:14 cognominal yes
22:14 jnthn The first .then(...) returns another Promise
22:14 jnthn Which will only be kept/broken when the then completes
22:14 jnthn And has its own @!thens
22:15 jnthn The loop is for if you do things like: my $p = some-promise(); $p.then(...); $p.then(...);
22:15 jnthn That is, you want to react to the same Promise being completed in two different ways
22:15 cognominal each promise in the chain has its own @!thens ! That's probably what I missed
22:15 jnthn Yes :)
22:16 cognominal don't see yet how  they are set
22:16 cognominal jnthn++ # learning so much reading your code
22:16 jnthn https://github.com/rakudo/rakudo/blob/nom/src/core/Promise.pm#L147 in method then
22:21 cognominal I did not think about that idiom :  <jnthn> The loop is for if you do things like: my $p = some-promise(); $p.then(...); $p.then(...);
22:23 jnthn Two `await`s on the same Promise is a similar case
22:24 timotimo imagine you're waiting for some object to do a lengthy calculation that a user asked for; simultaneously another user might make the same request and you'd end up having one .then (or await) for each user's request waiting for the same background calculation
22:24 timotimo only if the lengthy calculation would give the same answer for any future query, of course
22:29 cognominal reactive programming needs brain rewiring.
22:30 timotimo react/whenever is an amazing construct that can make that stuff easier to work with
22:31 jnthn Well, time to go and see if I can sleep myself back to healthyish... 'night o/
22:31 cognominal yea, I enjoy reading cro code
22:32 timotimo good luck, jnthn!
22:38 skids joined #perl6-dev
22:41 mryan50 joined #perl6-dev
22:48 Zoffix .tell jnthn feedback on your blog from Twitter: https://twitter.com/hercynium/status/912443716836741120
22:48 yoleaux Zoffix: I'll pass your message to jnthn.
22:54 Zoffix Hm. Swapping all the <= to ≤ could be done in static optimizer c'd'n't
23:04 Zoffix I guess $op.name = 'new-name' would be too easy.
23:05 * Zoffix compiles with $op = QAST::Op.new: @$op, |$op, :name('&infix:name«<=»');
23:08 timotimo you'd have to $op.name('new-name') if anything :)
23:08 timotimo bedtime o/
23:09 geekosaur joined #perl6-dev
23:10 Zoffix Ohhh :) Thanks.
23:34 Zoffix waaat
23:34 Zoffix $ ./perl6 -e 'my $mark = now; my $n = 1000_000; for ^$n { $ = rand ≥ rand }; say now - $mark; $mark = now; for ^$n { $ = rand >= rand }; say now - $mark;'
23:34 Zoffix 0.504100
23:34 Zoffix 0.72118403
23:34 Zoffix It probably means it's not working right....
23:35 Zoffix oh, wait, that's not the op I optimized... what's going on :/ It should be 50x slower :/
23:36 Zoffix Oh wait, yeah, it is the op I optimized
23:36 Zoffix .oO( maybe I shouldn't be operating computers after eating sleeping pills... )
23:37 * gfldex .oO( I should be sleeping after operating computers )
23:37 gfldex good night
23:37 Zoffix \o
23:43 Zoffix :S this makes even less sense: $ ./perl6 -e 'my $mark = now; my $n = 1000_000; for ^$n { $ = rand ≥ rand }; say now - $mark; for ^$n { $ = rand ≥ rand }; say now - $mark; $mark = now;'
23:43 Zoffix 0.50753306
23:43 Zoffix 22.9959289
23:43 Zoffix Only first call gets rewritten to Texas, second one is left as ≥
23:45 Zoffix even though they're identical in code :/
23:47 Zoffix oh I didn't update the mark >_<
23:51 Zoffix Nope, even used Benchy and I get "NEW version is 32% faster" if I use the op just once and "OLD version is 59.88x faster" if I use the op more than once >:|
23:55 Zoffix wonder if name change messes with .is_from_core value. This is what I'm using: https://gist.github.com/zoffixznet/75b1785c975d05df57f7f84d7f0074e8

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