Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6-dev, 2016-06-02

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

All times shown according to UTC.

Time Nick Message
00:55 jdv79 nite
02:27 Zoffix joined #perl6-dev
04:26 jdv79 joined #perl6-dev
06:11 [Tux] This is Rakudo version 2016.05-38-g069b789 built on MoarVM version 2016.05-18-g1339332
06:11 [Tux] test            19.671
06:11 [Tux] test-t          12.496
06:11 [Tux] csv-parser      34.660
06:29 nine tomboy64: I posted live commentary up to an hour before you asked :) The short version is: this may take a while.
06:44 RabidGravy joined #perl6-dev
06:58 sno joined #perl6-dev
09:32 patrickz joined #perl6-dev
11:45 pmurias joined #perl6-dev
11:47 dalek nqp: 29fbe83 | (Pawel Murias)++ | src/vm/js/RegexCompiler.nqp:
11:47 dalek nqp: [js] Fix rxtype literal with a zerowidth subtype.
11:47 dalek nqp: review: https://github.com/perl6/nqp/commit/29fbe832d9
12:00 dalek nqp: ce971dd | (Pawel Murias)++ | src/vm/js/nqp-runtime/ (2 files):
12:00 dalek nqp: [js] Move to serialization format version 20.
12:00 dalek nqp: review: https://github.com/perl6/nqp/commit/ce971dd588
12:01 dalek nqp: 70a863d | (Pawel Murias)++ | t/nqp/067-container.t:
12:01 dalek nqp: Test decontainerizing a nqp::null.
12:01 dalek nqp: review: https://github.com/perl6/nqp/commit/70a863d069
12:01 dalek nqp: ac38b5f | (Pawel Murias)++ | t/serialization/02-types.t:
12:01 dalek nqp: Test serializing the hll role.
12:01 dalek nqp: review: https://github.com/perl6/nqp/commit/ac38b5fe96
12:17 dalek nqp/return-without-lexotic: 7a9f8e5 | jnthn++ | src/vm/moar/QAST/QASTOperationsMAST.nqp:
12:17 dalek nqp/return-without-lexotic: Map new payload-based exception throwing ops.
12:17 dalek nqp/return-without-lexotic: review: https://github.com/perl6/nqp/commit/7a9f8e579b
12:17 dalek nqp/return-without-lexotic: ed3aa83 | jnthn++ | src/vm/moar/QAST/QASTOperationsMAST.nqp:
12:17 dalek nqp/return-without-lexotic: Implement handlepayload.
12:17 dalek nqp/return-without-lexotic:
12:17 dalek nqp/return-without-lexotic: Will be used to implement new control-exception-based return in an
12:17 dalek nqp/return-without-lexotic: efficient (allocation-free) way.
12:17 dalek nqp/return-without-lexotic: review: https://github.com/perl6/nqp/commit/ed3aa83cc0
12:18 dalek nqp/return-without-lexotic: 3ab1e48 | jnthn++ | src/vm/moar/QAST/QASTOperationsMAST.nqp:
12:18 dalek nqp/return-without-lexotic: Add const for return exception type.
12:18 dalek nqp/return-without-lexotic: review: https://github.com/perl6/nqp/commit/3ab1e486f3
12:18 dalek nqp/return-without-lexotic: e0aae8a | jnthn++ | src/NQP/Actions.nqp:
12:18 dalek nqp/return-without-lexotic: Switch NQP away from using lexotic handlers.
12:18 dalek nqp/return-without-lexotic: review: https://github.com/perl6/nqp/commit/e0aae8a1ab
12:20 jnthn pmurias: Hope ^^ will not be too bad from the JS perspective; if anything it's simpler/more unified than the lexotic mechanism it replaces.
12:21 pmurias jnthn: will look into that, I had planned to look into the nqp-js lexotic soon to fix some things anyway
12:22 jnthn pmurias: Another bit of good news is that it will also kill off one of the Rakudo extops :)
12:36 nine Die extops die!
12:36 jnthn aww, it makes it through all the NQP tests, only to blow up in Rakudo build...
12:36 jnthn .oO( The extops the! )
12:40 ilmari reminds me of http://www.joe.co.uk/news/this-german-magazine-has-the-best-trolling/51330
12:52 jnthn hehe, didn't know about the magazine :P
12:52 jnthn The Simpsons reference was what I had in mind :)
12:55 dalek nqp/return-without-lexotic: 0b83810 | jnthn++ | src/vm/moar/QAST/QASTOperationsMAST.nqp:
12:55 dalek nqp/return-without-lexotic: Fix a register alloc fail in while compilation.
12:55 dalek nqp/return-without-lexotic:
12:55 dalek nqp/return-without-lexotic: We ended up clobbering the result register in the non-void case.
12:55 dalek nqp/return-without-lexotic: review: https://github.com/perl6/nqp/commit/0b83810bfd
12:55 jnthn A tad surprised we didn't uncover that one before now.
13:37 dalek nqp/return-without-lexotic: 0dde699 | jnthn++ | src/vm/moar/QAST/QASTCompilerMAST.nqp:
13:37 dalek nqp/return-without-lexotic: Make nqp::const work as a MAST constant.
13:37 dalek nqp/return-without-lexotic: review: https://github.com/perl6/nqp/commit/0dde699189
13:47 dalek rakudo/return-without-lexotic: 8b6fd14 | jnthn++ | src/ (5 files):
13:47 dalek rakudo/return-without-lexotic: Switch Rakudo away from using lexotic for return.
13:47 dalek rakudo/return-without-lexotic: review: https://github.com/rakudo/rakudo/commit/8b6fd146d1
13:58 patrickz joined #perl6-dev
14:00 ZoffixW joined #perl6-dev
14:02 ZoffixW To comment on my promise to fix is-approx in two days (http://irclog.perlgeek.de/perl6-dev/2016-05-31#i_12581122)... I won't :P
14:03 ZoffixW There seems to be many opinions on what the default tolerance type and values should be, and since I know nothing about the problem domain where is-approx is used and have no use for it myself, I don't want to pick the default myself.
14:05 perlpilot ZoffixW: awww :(
14:06 ZoffixW A radical thought is it should be removed altogether. The basic approx can be done with cmp-ok $got, '≅', $expected; And more complex Python library on which is_approx is based on should be implemented as a separate module in the ecosystem.
14:10 perlpilot I think is-approx should stay and the default tolerance should be 1e-6 ... but that's just me
14:10 ZoffixW Absolute or relative tolerance?
14:11 perlpilot Absolute.  It's easier to understand.
14:17 ZoffixW That was my idea too, but Sam S. says Relative is more useful (https://rt.perl.org/Ticket/Display.html?id=128303). I searched the logs and some people say to use ≅ under the hood, and it has relative tolerance, but with 1e-15 as the value. is-approx does relative with 1e-6. is_approx (which by irc logs and commits I garner is meant to be the "new and improved" is-approx), does absolute of 1e-5 for any values smaller than 1e-6 and does relative
14:17 ZoffixW of 1e-6 for anything else. And that behaviour links to a 13-page description of a Python library I didn't even want to read.
14:18 ZoffixW And that's not even all: there are multiple ways to do relative tolerance: https://en.wikipedia.org/wiki/Relative_change_and_difference#Definitions
14:18 ZoffixW The current implementation chooses |x - y| / max(|x|, |y|) sometimes and others uses $expected*$rel-tol
14:18 pyrimidine ZoffixW: sounds like a topic for a good blog post, but with the inherent danger of additional bikeshedding :)
14:18 ZoffixW So yeah... all that put me off from using my time to make a PR guranteed to create a lot of bikeshedding.
14:19 ZoffixW pyrimidine, but I know nothing about the problem domain. When people use is-approx, what are they looking for? I've no idea.
14:19 perlpilot ZoffixW: FWIW, I was going to revamp is-approx a few months ago.  You've discovered why I didn't do it  :-)
14:19 ZoffixW lol
14:21 perlpilot relative *is* more useful, but that doesn't mean it should be the default.  I think most people think of absolute tolerance when they think of 2 values being approximately equal to each other.
14:21 perlpilot (unless they are a mathematician ;)
14:21 ZoffixW :)
14:23 pmurias_ joined #perl6-dev
14:23 perlpilot Also, I'd probably express relative tolerance differently.  Rather than saying "relative tolerance of 1e-5", I would say something like "are these values within X% of each other"
14:24 ZoffixW % of what? :)
14:24 perlpilot "each other"  ;)
14:24 ZoffixW heh
14:25 brrt joined #perl6-dev
14:35 skids joined #perl6-dev
15:04 edehont joined #perl6-dev
15:59 brrt joined #perl6-dev
16:07 patrickz joined #perl6-dev
16:17 AlexDaniel joined #perl6-dev
16:35 ugexe jnthn: commit 7250543 is giving me a new '===SORRY!=== Cannot assign to an immutable value'. I'm unable to golf it down unfortunately https://gist.github.com/ugexe/e48d7d63b193ebde7c0c8beb6ecc1fef
16:41 ugexe it seems to print out the contents fine if I add debugging statements, so i suspect the --ll-exception trace might be pointing at the wrong thing
17:04 jnthn ugexe: Bisected to exactly that commit? If you revert it, it works again?
17:04 jnthn (or if you run on the commit exactly 1 before it...)
17:06 ugexe the commit right before it (the rev bump) works ok
17:06 jnthn o.O
17:08 jnthn ugexe: The example in the gist seems incomplete though? there's no class Bar...
17:10 jnthn Or is that just showing the method where things fail?
17:10 ugexe yeah, i started to write an example but couldnt golf it down. class Bar is Distribution { }, where method hash it from rakudos own Distribution, so like method hash { %(a => 1, b => 2) }
17:10 ugexe to demonstrate the 'callsame.append' thing
17:11 ugexe it dies on the %hash<identity> = $.identity; line
17:12 edehont joined #perl6-dev
17:13 jnthn Very odd :S
17:13 jnthn Dinner now; I'll see if I can make any sense of it afterwards
17:13 jnthn I just need to clone zef and run the command in the gist description?
17:13 ugexe yes
17:35 sno joined #perl6-dev
17:40 TimToady joined #perl6-dev
20:29 dalek rakudo/nom: 4b1aed3 | lizmat++ | src/core/List.pm:
20:29 dalek rakudo/nom: Streamline List.reify-at-least a bito
20:29 dalek rakudo/nom:
20:29 dalek rakudo/nom: - use a postfix unless for a few % improvement
20:29 dalek rakudo/nom:
20:29 dalek rakudo/nom: Oddly enough, removing the binding to iter, and instead mention
20:29 dalek rakudo/nom: current.iterator twice, causes massive spectest failure.  I wish
20:29 dalek rakudo/nom: I understood why.  Feels like it shouldn't make a difference, but
20:29 dalek rakudo/nom: it does :-(
20:29 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4b1aed39a0
20:32 lizmat m: my Str $a; $a++; say $a  # shouldn't this just say "a" ?
20:32 camelia rakudo-moar 069b78: OUTPUT«Type check failed in assignment to $a; expected Str but got Int (1)␤  in block <unit> at /tmp/Rj4bf8pqs_ line 1␤␤»
20:33 psch m: say Str.succ
20:33 camelia rakudo-moar 069b78: OUTPUT«Invocant requires an instance of type Str, but a type object was passed.  Did you forget a .new?␤  in block <unit> at /tmp/oPnIg4I0yW line 1␤␤»
20:33 psch lizmat: i'd guess it falls back to the Any candidate
20:33 lizmat yah
20:33 lizmat .oO( been watching too much Fargo lately )
20:34 psch well, or Cool maybe...
20:34 psch m: say Any.succ
20:34 camelia rakudo-moar 069b78: OUTPUT«Method 'succ' not found for invocant of class 'Any'␤  in block <unit> at /tmp/3WySyafNrJ line 1␤␤»
20:34 lizmat I guess one could also argue it should be "A"
20:34 psch m: say Cool.succ
20:34 camelia rakudo-moar 069b78: OUTPUT«Method 'succ' not found for invocant of class 'Cool'␤  in block <unit> at /tmp/yUkb6peXTq line 1␤␤»
20:34 psch okay now i'm confused
20:34 masak I guess one could also argue that there isn't a strong use case here... :)
20:35 psch rakudo/rakudo/src/core/Numeric.pm:28:    method succ() { self + 1 }
20:35 masak Str isn't Numeric, though
20:35 psch ...but yeah
20:35 psch rakudo/rakudo/src/core/Any.pm:440:multi postfix:<++>(Mu:D $a is rw) { my $b = $a; $a = $a.succ; $b }
20:36 lizmat the reason was because I fixed this bug:
20:36 lizmat m: my @a = ^5; @a[2]:delete; $_++ for @a; dd @a
20:36 camelia rakudo-moar 069b78: OUTPUT«Array @a = [1, 2, 1, 4, 5]␤»
20:36 psch ...which postfix:<++> is actually called?
20:37 psch ohh
20:37 lizmat this used to break on the null in the array
20:37 psch the one right below the one i pasted of course >_>
20:37 psch Any.pm:441:multi postfix:<++>(Mu:U $a is rw) { $a = 1; 0 }
20:37 psch and, yes, that is clearly bogus
20:37 masak it is?
20:37 psch well, the error message at least
20:38 lizmat m: my $a; $a++; say $a  # that's why we have that
20:38 camelia rakudo-moar 069b78: OUTPUT«1␤»
20:38 lizmat m: my $a; say $a++; say $a
20:38 camelia rakudo-moar 069b78: OUTPUT«0␤1␤»
20:38 masak 'night, #perl6-dev
20:38 psch 'night masak
20:38 lizmat gnight masak
20:39 psch i see the reason for having a postfix and prefix ++ candidate that intifies
20:40 psch but the failed assignment is LTA, and i doubt that declaring narrower ++ candidates for all the non-intifying types is a good idea
20:40 psch m: my Junction $x; $x++
20:40 camelia rakudo-moar 069b78: OUTPUT«Type check failed in assignment to $x; expected Junction but got Int (1)␤  in block <unit> at /tmp/3iXpNZJk7q line 1␤␤»
20:41 lizmat m: my Rat $a; $a++
20:41 camelia rakudo-moar 069b78: OUTPUT«Type check failed in assignment to $a; expected Rat but got Int (1)␤  in block <unit> at /tmp/7l5tOu0AZD line 1␤␤»
20:41 psch well, same old there, of course vOv
20:41 psch m: my Bool $x; $x++
20:41 camelia rakudo-moar 069b78: ( no output )
20:41 psch that's cause Bool.succ doesn't type smiley
20:42 lizmat I think that's actually intentional
20:42 psch yeah, Bool is fine like that
20:42 psch m: my $x = True; say $x--; say $x; say ++$x
20:42 camelia rakudo-moar 069b78: OUTPUT«True␤False␤True␤»
20:43 psch fwiw, i don't like 'not a strong usecase' and would prefer "at least it's consistent, in case someone needs it"
20:44 psch but i guess for that we'd need some way of finding the "succ identity" for the given type
20:45 psch just like ($ = Int)++ returns 0, ($ = Str)++ should return ""
20:46 timotimo lizmat: maybe some things have .iterator as a coercer rather than an accessor?
20:46 lizmat hmmm.... interesting thought
20:52 lizmat .tell pmurias this could be of interest ?  https://zeit.co/blog/async-and-await
20:53 lizmat grrr
20:54 [Coke] evening, sixers.
20:55 lizmat [Coke]  o/
20:59 timotimo so ...
20:59 timotimo nativecall-ing into this function, and the breakpoint at the start of that function doesn't get hit
20:59 timotimo why? :(
21:00 timotimo maybe should ask about this in #perl6 instead
21:25 dalek rakudo/nom: d080d37 | lizmat++ | src/core/List.pm:
21:25 dalek rakudo/nom: Don't create a future if there is none
21:25 dalek rakudo/nom:
21:25 dalek rakudo/nom: This means we can check for number of elements in the future one time
21:25 dalek rakudo/nom: less for each iteration of List.reify-at-least.
21:25 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d080d371d8
21:49 timotimo there is no future ;(
22:09 dalek rakudo/nom: 6bb23a5 | lizmat++ | src/core/List.pm:
22:09 dalek rakudo/nom: Don't todo or reify if there is no future
22:09 dalek rakudo/nom:
22:09 dalek rakudo/nom: Make iterating over an empty slurpy array about 15% faster, and have
22:09 dalek rakudo/nom: 30% fewer allocations.  Basically, this allows the EmptyIterator to
22:09 dalek rakudo/nom: do its work quickly.
22:09 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6bb23a54f1
22:13 timotimo nice!
22:16 lizmat and with that, I wish perl6-dev a good night!
23:43 skids joined #perl6-dev
23:57 ugexe jnthn: It has something to do with returning like `sub foo() { $ = something() }`. If I do s/$ =// it'll run again (although some of those were needed on windows at one time for unknown reasons, havent retested there yet). I still cant golf it down, so something else is needed for it to manifest (being buried in a lazy loop or in a state var?)

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