Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6-dev, 2016-12-07

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

All times shown according to UTC.

Time Nick Message
00:02 pyrimidine joined #perl6-dev
00:10 lucasb joined #perl6-dev
00:52 pyrimidine joined #perl6-dev
01:03 yoleaux2 joined #perl6-dev
01:40 lucasb joined #perl6-dev
02:01 pyrimidine joined #perl6-dev
02:48 FROGGS joined #perl6-dev
03:04 pyrimidine joined #perl6-dev
03:43 FROGGS joined #perl6-dev
05:16 zostay joined #perl6-dev
06:30 pyrimidine joined #perl6-dev
06:31 zostay joined #perl6-dev
06:52 RabidGravy joined #perl6-dev
07:15 [TuxCM] This is Rakudo version 2016.11-147-g4fd6e9482 built on MoarVM version 2016.11-27-g3171dbbe
07:15 [TuxCM] csv-ip5xs        3.205
07:15 [TuxCM] test            13.975
07:15 [TuxCM] test-t           6.511
07:15 [TuxCM] csv-parser      13.905
08:02 pyrimidine joined #perl6-dev
08:18 brrt [Coke]: what day is today?
08:18 brrt 7th...
08:18 brrt hmmm
08:18 brrt alright, I'll do my best
08:18 brrt well, in fact, i'll just do it :-)
08:24 nine ++brrt
08:34 cognominal joined #perl6-dev
08:53 cognominal joined #perl6-dev
09:08 pmurias joined #perl6-dev
09:13 pyrimidine joined #perl6-dev
09:34 jnthn ooh, brrt post coming up soon? :)
09:46 pmurias m: say((-1) ** 99999999999999999999999999999999999999999);
09:46 camelia rakudo-moar 4fd6e9: OUTPUT«Numeric overflow␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
09:46 pmurias j: say((-1) ** 99999999999999999999999999999999999999999);
09:46 camelia rakudo-jvm 8ca367: OUTPUT«-1␤»
09:46 pmurias jnthn: should I special case that on the MoarVM backend too?
09:49 jnthn Not particularly inclined to
09:50 seatek joined #perl6-dev
09:58 pmurias j: say(2 ** 99999999999999999999999999999999999999998);
09:58 camelia rakudo-jvm 8ca367: ( no output )
09:58 pmurias j: say(2 ** 99999999999999999999999999999999999999998);
09:58 camelia rakudo-jvm 8ca367: OUTPUT«Inf␤»
09:58 pmurias j: say(2 ** 99999999999999999999999999999999999999999);
09:58 camelia rakudo-jvm 8ca367: OUTPUT«-Inf␤»
10:08 pmurias jnthn: you mean I should make -1 ** big-numers work (and you plan to work on something else) or it's not worth working on?
10:10 jnthn I'm not sure it's worth special-casin
10:10 jnthn *special-casing
10:10 jnthn I mean, what practical problem would it actually solve, in the name of slowing down every other case?
10:16 brrt sooner than planned, I have my work cut out for me :-)
10:28 AlexDaniel joined #perl6-dev
10:29 pmurias jnthn: it would only slow down the path when the exponent is too big
10:30 jnthn Hm, true. But still...
10:30 jnthn Seems a slightly odd discontinuity
10:31 pmurias it's specced in roast
10:32 pmurias just skipped on moarvm
10:32 pmurias isn't (-1)**n sometimes used in mathematic equations?
10:32 DrForr Quite a bit, yes.
10:33 DrForr Especially when you're learning about divergent sequences, it's a great way to get alternating signs.
10:33 jnthn So it's actually potentially useful?
10:34 jnthn That beats "only works on -1"?
10:34 DrForr Oh, definitely.
10:35 DrForr https://en.wikipedia.org/wiki/1_%E2%88%92_1_%2B_2_%E2%88%92_6_%2B_24_%E2%88%92_120_%2B_...
10:36 pmurias I'll fix that then
10:42 jnthn OK, fair enough
11:11 dalek roast: 2387fff | jnthn++ | S32-io/IO-Socket-Async-UDP.t:
11:11 dalek roast: Add UDP socket re-use test.
11:11 dalek roast: review: https://github.com/perl6/roast/commit/2387fffdfb
11:12 dalek nqp: 43b37f1 | jnthn++ | tools/build/MOAR_REVISION:
11:12 dalek nqp: Bump MOAR_REVISION for fixes.
11:12 dalek nqp: review: https://github.com/perl6/nqp/commit/43b37f1ead
11:13 dalek rakudo/nom: b2ac4e4 | jnthn++ | tools/build/NQP_REVISION:
11:13 dalek rakudo/nom: Bump to get latest MoarVM.
11:13 dalek rakudo/nom:
11:13 dalek rakudo/nom: * Fixes a couple of premature frees in async sockets when errors
11:13 dalek rakudo/nom:   occur
11:13 dalek rakudo/nom: * Optimizations for Int -> int coercion
11:13 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b2ac4e44d1
11:16 bisectable6 joined #perl6-dev
11:16 evalable6 joined #perl6-dev
11:16 unicodable6 joined #perl6-dev
11:17 benchable6 joined #perl6-dev
11:17 committable6 joined #perl6-dev
11:18 lucasb joined #perl6-dev
11:19 committable6_ joined #perl6-dev
11:24 cognominal joined #perl6-dev
11:25 zostay joined #perl6-dev
12:06 dalek roast: 28c5e0d | jnthn++ | integration/weird-errors.t:
12:06 dalek roast: Test to cover RT #128985.
12:06 dalek roast: review: https://github.com/perl6/roast/commit/28c5e0d3f4
12:50 cognominal joined #perl6-dev
13:10 lizmat joined #perl6-dev
13:10 AlexDaniel joined #perl6-dev
13:11 lizmat_ joined #perl6-dev
13:13 AlexDaniel bisect: old=2016.03 say ^1000 .grep: -> $n {([+] ^$n .grep: -> $m {$m and $n %% $m}) == $n }
13:13 bisectable6 AlexDaniel, Bisecting by exit signal (old=2016.03 new=b2ac4e4). Old exit signal: 11 (SIGSEGV)
13:13 bisectable6 AlexDaniel, bisect log: https://gist.github.com/4960ed59f8d4f6c5b191daca2689a0da
13:13 bisectable6 AlexDaniel, ‘bisect run’ failure
13:17 AlexDaniel perhaps it is this bump: https://github.com/rakudo/rakudo/commit/957b5273034fc85250c11566b8a3370b3c403dc8
13:26 AlexDaniel joined #perl6-dev
13:26 AlexDaniel or let's see what caused it
13:26 AlexDaniel bisect: new=2016.03 say ^1000 .grep: -> $n {([+] ^$n .grep: -> $m {$m and $n %% $m}) == $n }
13:26 bisectable6 AlexDaniel, Bisecting by exit signal (old=2015.12 new=2016.03). Old exit signal: 0 (None)
13:27 bisectable6 AlexDaniel, bisect log: https://gist.github.com/e2e3ed219c6c500fa388c762ec5444f2
13:27 bisectable6 AlexDaniel, (2016-03-02) https://github.com/rakudo/rakudo/commit/62ed92add63e6d044190c4b6c67a629f61bf6cc5
13:36 cognominal joined #perl6-dev
13:52 AlexDaniel joined #perl6-dev
13:57 * [Coke] asks a NYI ticket author for a pointer to where it says it SHOULD be I. get an IRC link pointing at TimToday. :|
13:58 jnthn [Coke]: Which ticket?
13:59 [Coke] #130253
14:01 jnthn Yeah, I expect we'll do that at some point
14:04 synopsebot6 joined #perl6-dev
14:23 pyrimidine joined #perl6-dev
14:28 pyrimidine joined #perl6-dev
14:38 huggable joined #perl6-dev
14:40 lizmat joined #perl6-dev
14:42 babydrop m: sub (Int) {}(Failure.new)
14:42 camelia rakudo-moar b2ac4e: OUTPUT«Earlier failure:␤ Failed␤␤Final error:␤ Type check failed in binding to <anon>; expected Int but got Failure (Failure.new(exception...)␤  in sub  at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
14:42 babydrop m: sub (Int()) {}(Failure.new)
14:42 camelia rakudo-moar b2ac4e: OUTPUT«Failed␤␤Actually thrown at:␤  in sub  at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
14:42 babydrop weird
14:42 cognominal joined #perl6-dev
14:44 babydrop m: multi sub infix:<zz>(Mu \x, Int() $n) is pure {}; 42 zz '123aaa'
14:44 camelia rakudo-moar b2ac4e: ( no output )
14:45 babydrop m: sub zz(Int() $n) {}; zz('123aaa')
14:45 camelia rakudo-moar b2ac4e: ( no output )
14:45 babydrop m: sub zz(Int() $n) {}('123aaa')
14:45 camelia rakudo-moar b2ac4e: ( no output )
14:45 babydrop m: sub (Int() $n) {}('123aaa')
14:45 camelia rakudo-moar b2ac4e: ( no output )
14:45 babydrop oh ok, never mind
14:45 pyrimidine joined #perl6-dev
14:48 dalek rakudo/nom: 5bacb05 | (Zoffix Znet)++ | src/core/List.pm:
14:48 dalek rakudo/nom: Fix poor error with infix:<xx> with non-numeric Str
14:48 dalek rakudo/nom:
14:48 dalek rakudo/nom: When '123aaa' is given, the Failure occurs inside the coercion,
14:48 dalek rakudo/nom: which we then attempt to store in a native int, triggering a bad error
14:48 dalek rakudo/nom:
14:48 dalek rakudo/nom: Fix by moving the coercer into the Num() multi, where such a Failure
14:48 dalek rakudo/nom: would explode in the .Int method.
14:48 dalek rakudo/nom:
14:48 dalek rakudo/nom: Fixes RT#130288: https://rt.perl.org/Ticket/Display.html?id=130288
14:48 dalek rakudo/nom:
14:48 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=130288
14:48 dalek rakudo/nom: P.S: this is probably a deeper issue with our coercers; IIRC there's
14:48 dalek rakudo/nom: a ticket that they don't check the final type.
14:49 babydrop https://github.com/rakudo/rakudo/commit/5bacb0573ce9458c2e6a7bcc1bc9a5f2cce18233
14:49 dalek roast: 5f708dc | (Zoffix Znet)++ | S03-operators/repeat.t:
14:49 dalek roast: Test exception for infix:<xx> with non-numeric Str
14:49 dalek roast:
14:49 dalek roast: RT#130288: https://rt.perl.org/Ticket/Display.html?id=130288
14:49 dalek roast: Rakudo fix: https://github.com/rakudo/rakudo/commit/5bacb0573ce9458c2e6
14:49 dalek roast: review: https://github.com/perl6/roast/commit/5f708dc3b6
14:49 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=130288
15:00 AlexDaniel joined #perl6-dev
15:06 pyrimidine joined #perl6-dev
15:12 cognominal joined #perl6-dev
15:29 AlexDaniel joined #perl6-dev
15:50 dalek nqp: e423c36 | (Pawel Murias)++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java:
15:50 dalek nqp: [jvm] Fix pow_I when trying to calculate 2 ** large_odd_number.
15:50 dalek nqp: review: https://github.com/perl6/nqp/commit/e423c3693a
16:24 jnthn m: 'x' ~~ /<before>/
16:24 camelia rakudo-moar 5bacb0: OUTPUT«===SORRY!===␤Cannot find method 'ann' on object of type NQPMu␤»
16:24 jnthn So, I've just hunted down that goes wrong here
16:24 babydrop \o/
16:25 jnthn And fixed
16:25 jnthn The cause of the crash
16:25 jnthn Was actually in the NFA construction
16:25 jnthn Now it survives to runtime
16:25 jnthn and tells you before needs an argument
16:25 jnthn Not sure if that's sufficiently awesome but at least it's better :)
16:27 AlexDani` joined #perl6-dev
16:39 TimToady that should probably be a disallowed empty regex
16:39 jnthn Detect before/after specially?
16:40 TimToady anything that takes a regex as an argument
16:40 jnthn Well, anything in theory can take a regex as an argument... ;)
16:40 TimToady well, but without //
16:40 TimToady <before .*> vs <febore /.*/>
16:40 jnthn m: /<my-name-here .+>/
16:40 camelia rakudo-moar 5bacb0: ( no output )
16:41 TimToady well, I guess there'd need to be colon or parens for that
16:41 jnthn I thought it was general syntax?
16:41 jnthn At least, we've been parsing it that way so far :)
16:41 TimToady well, but we know it's regex due to the absence of colon or parens
16:41 TimToady hmm, I wonder...
16:41 jnthn For sure
16:41 TimToady m: 'x' ~~ /<before >/
16:41 camelia rakudo-moar 5bacb0: OUTPUT«===SORRY!=== Error while compiling <tmp>␤Null regex not allowed␤at <tmp>:1␤------> 'x' ~~ /<before ⏏>/␤»
16:42 TimToady there we go
16:42 jnthn But <my-name-here> is fine, where we'd probably like <before> to not be fine
16:42 TimToady it's using the space currently
16:42 geekosaur dont forget the case where someone defined a rule called after and then tried to use <after ...>
16:42 jnthn I'm...not entirely sure what we can do about that case.
16:42 geekosaur there's some thinking needed about this whole thing I'm afraid
16:43 jnthn I mean, that's just a plain old extensibility question
16:43 jnthn We don't, in general, ban people from overriding built-in names.
16:43 TimToady well beforeoids should at least fail to dispatch without an argument
16:44 jnthn Well, they will with the local patch I have
16:44 jnthn Before, the lack of argument upset the NFA builder
16:44 jnthn Which then exploded with a useless message
16:44 TimToady nodnod
16:44 jnthn m: 'a' ~~ /<before('x')>/
16:44 camelia rakudo-moar 5bacb0: OUTPUT«===SORRY!===␤Cannot find method 'rxtype' on object of type NQPMu␤»
16:44 jnthn That one now just gives a differently weird error :)
16:45 jnthn But question is if we want to catch it
16:45 TimToady m: 'a' ~~ /<before(/x/)>/
16:45 camelia rakudo-moar 5bacb0: OUTPUT«===SORRY!===␤Cannot find method 'rxtype' on object of type NQPMu␤»
16:46 jnthn That works out OK it seems
16:46 jnthn $ ./nqp-m -e 'say("ok") if "a" ~~ / <before(/a/)> /'
16:46 jnthn ok
16:46 geekosaur I think my point is that if <before ...> and <after ...> are going to be parsed differently, they should probably refer to a different kind of thing than "rule". but also, the general conflict between that syntax and rules with parameters makes me think either that whole area needs to be formalized better, or before/after should become a different grammtical construct that doesn't collide
16:47 jnthn m: /<general >/
16:47 camelia rakudo-moar 5bacb0: OUTPUT«===SORRY!=== Error while compiling <tmp>␤Null regex not allowed␤at <tmp>:1␤------> /<general ⏏>/␤»
16:47 jnthn That is also general
16:47 jnthn I'd always figured that <foo .+> was a regular shorthand for <foo(/.+/>
16:47 jnthn uh, with the missing paren
16:47 jnthn So we're not parsing before/after differently so far as I can tell
16:48 TimToady yes, it's a general syntax, triggered by the space
16:48 jnthn It's just the most common way to use them is the shorthand way
16:49 jnthn The only thing that's special about before is that the NFA constructor pays attention to it
16:49 jnthn OTOH, after is more special because it flips the AST before compiling it...
16:57 dalek nqp: 768b20d | jnthn++ | src/QRegex/NFA.nqp:
16:57 dalek nqp: Make NFA builder cope with <before>.
16:57 dalek nqp:
16:57 dalek nqp: Also, with <before('x')>. Both caused it to explode unhelpfully
16:57 dalek nqp: before, with no indication of where things went wrong.
16:57 dalek nqp: review: https://github.com/perl6/nqp/commit/768b20d9c7
16:57 jnthn Anyway, that makes the error less sucky
17:00 jnthn Also, it makes the code in https://rt.perl.org/Ticket/Display.html?id=130273 work fine
17:00 jnthn Since overriding before/after is possible and, without the NFA constructor getting confused, does the right thing
17:10 jnthn TimToady: I left a comment on https://rt.perl.org/Ticket/Display.html?id=130273&amp;results=bc31d9064e3a3aab4fccfa1f87285294
17:11 jnthn TimToady: Not quite sure what you'd prefer we do of the options I present at the end :)
17:11 jnthn I mean, the status quo with my patch is the code the user wrote now works, so we could just roast it... :)
17:12 geekosaur that "where do we draw the line" is actually where I was going... I think we might want a new indicator there
17:12 geekosaur another reason for that.. .what exactly does <!foo> mean?
17:13 geekosaur it's legal currently but I have no idea what a user defined rule foo would do about it (or how it would know about it)
17:13 jnthn <!foo> just means "foo doesn't match here"
17:14 jnthn e.g. "use foo as a negative lookeahead"
17:14 jnthn Like <?foo> means "use foo as a positive lookahead"
17:15 jnthn They generalize very easily, you just call the rule normally, look at whether it matched or not, but don't advance the cursor of the caller.
17:15 jnthn The more contentious ones are <+foo> and <-foo>
17:15 jnthn Where you'll get potentially odd results at the moment if your foo doesn't match a single char
17:17 jnthn I suspect only <+foo> is actually afflicted, and that may be because the code-gen cheats and pretends it's <.foo> rather than <?foo> .
17:18 jnthn Though of course there's also the question of whether something called as <+foo> or <-foo> not matching exactly one char should be a warning/error/match fial
17:18 jnthn *fail
17:22 jnthn Dinner time :) bbl
17:25 pyrimidine joined #perl6-dev
17:30 dalek rakudo/fix-powers-with-big-exponents: cf05254 | (Pawel Murias)++ | src/core/Int.pm:
17:30 dalek rakudo/fix-powers-with-big-exponents: Stop relying on a bug in infix:<**>(Int, Int).
17:30 dalek rakudo/fix-powers-with-big-exponents: review: https://github.com/rakudo/rakudo/commit/cf0525408e
17:35 cognominal joined #perl6-dev
17:40 AlexDani` joined #perl6-dev
17:43 babydrop hmm
17:43 babydrop There's a point on that topic that bugged me before:
17:43 babydrop m: say 2e0 ** 99999999999999
17:43 camelia rakudo-moar 5bacb0: OUTPUT«Inf␤»
17:43 babydrop m: say 2 ** 99999999999999
17:43 camelia rakudo-moar 5bacb0: OUTPUT«Numeric overflow␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
17:44 babydrop So... what if we remove all those checks and feed the args straight to pow_I; giving an Inf on overflow?
17:44 babydrop And then we have consistency between Num, and Int candidates
17:46 * babydrop notes pmurias isn't here, so comments on the PR instead
17:48 pyrimidine joined #perl6-dev
17:51 pyrimidine joined #perl6-dev
17:54 [Coke] babydrop: are there cases where INT ** INT gives you a Num?
17:54 [Coke] I think that's the diff there, NUM ** INT can give you Inf-the-specialist-of-Nums.
17:55 [Coke] (but if we have other cases where we do that type-change, that's fine.)
17:55 babydrop m: put chars 1.7975e308.Int * 1.7975e308.Int * 1.7975e308.Int * 1.7975e308.Int * 1.7975e308.Int * 1.7975e308.Int * 1.7975e308.Int * 1.7975e308.Int * 1.7975e308.Int * 1.7975e308.Int * 1.7975e308.Int * 1.7975e308.Int * 1.7975e308.Int * 1.7975e308.Int * 1.7975e308.Int * 1.7975e308.Int * 1.7975e308.Int * 1.7975e308.Int * 1.7975e308.Int * 1.7975e308.Int * 1.7975e308.Int * 1.7975e308.Int * 1.7975e308.Int *
17:55 camelia rakudo-moar 5bacb0: OUTPUT«===SORRY!=== Error while compiling <tmp>␤Missing required term after infix␤at <tmp>:1␤------> .Int * 1.7975e308.Int * 1.7975e308.Int *⏏<EOL>␤    expecting any of:␤        prefix␤        term␤»
17:55 babydrop 1.7975e308.Int * 1.7975e308.Int * 1.7975e308.Int
17:55 babydrop m: put chars 1.7975e308.Int * 1.7975e308.Int * 1.7975e308.Int * 1.7975e308.Int * 1.7975e308.Int * 1.7975e308.Int * 1.7975e308.Int * 1.7975e308.Int * 1.7975e308.Int * 1.7975e308.Int * 1.7975e308.Int * 1.7975e308.Int * 1.7975e308.Int * 1.7975e308.Int * 1.7975e308.Int * 1.7975e308.Int * 1.7975e308.Int * 1.7975e308.Int * 1.7975e308.Int * 1.7975e308.Int * 1.7975e308.Int * 1.7975e308.Int * 1.7975e308.Int
17:55 camelia rakudo-moar 5bacb0: OUTPUT«7090␤»
17:55 babydrop So is that a proper 7090-digit long number?
17:56 timotimo probably?
17:56 babydrop So why can't the pow_I op do the same type of thing?
17:56 timotimo good Q
17:56 * babydrop doesn't know anything of those low-level details :(
17:58 timotimo well, i expect the problem appears inside moarvm's c code
18:00 dalek nqp: 8151d0c | (Pawel Murias)++ | src/vm/js/nqp-runtime/bignum.js:
18:00 dalek nqp: [js] Fix nqp::pow_I.
18:00 dalek nqp: review: https://github.com/perl6/nqp/commit/8151d0ce7e
18:00 dalek nqp: fb3fa50 | (Pawel Murias)++ | t/nqp/060-bigint.t:
18:00 dalek nqp: Test nqp::pow_I more (check if it handles -1 ** large_number, returns nqp::inf when overflowing etc.).
18:00 dalek nqp: review: https://github.com/perl6/nqp/commit/fb3fa504a5
18:01 pmurias joined #perl6-dev
18:03 pmurias babydrop: re why not do those checks and returns Inf, it would change the semantics
18:03 travis-ci joined #perl6-dev
18:03 travis-ci NQP build failed. Pawel Murias 'Test nqp::pow_I more (check if it handles -1 ** large_number, returns nqp::inf when overflowing etc.).'
18:03 travis-ci https://travis-ci.org/perl6/nqp/builds/182038550 https://github.com/perl6/nqp/compare/768b20d9c756...fb3fa504a5d5
18:03 travis-ci left #perl6-dev
18:04 babydrop pmurias: fair enough.
18:04 pmurias timotimo: the problem with too big arguments is that we don't have when we create that number we run out of memory
18:05 timotimo *shrug*, if you build a number this big, you'll get what you want
18:06 cognominal joined #perl6-dev
18:07 dalek nqp: af8eadd | (Pawel Murias)++ | tools/build/MOAR_REVISION:
18:07 dalek nqp: Bump moar for pow_I fixes.
18:07 dalek nqp: review: https://github.com/perl6/nqp/commit/af8eaddad5
18:08 pmurias TimToady: what should 2**(2**200) do? throw an exception or return Inf?
18:08 babydrop TimToady: or give a giant number?
18:10 timotimo yeah, that'll be ... a bit big :)
18:10 travis-ci joined #perl6-dev
18:10 travis-ci NQP build passed. Pawel Murias 'Bump moar for pow_I fixes.'
18:10 travis-ci https://travis-ci.org/perl6/nqp/builds/182040385 https://github.com/perl6/nqp/compare/fb3fa504a5d5...af8eaddad580
18:10 travis-ci left #perl6-dev
18:11 psch j: use java::lang::BigInteger:from<Java>; say BigInteger.new(-1).pow(99999999999999)
18:11 * psch .oO( of course that's right when the irc.p6c.org connection to freenode times out... )
18:11 camelia rakudo-jvm 8ca367: OUTPUT«===SORRY!===␤Could not find java::lang::BigInteger at line 1 in:␤    /home/camelia/.perl6␤    /home/camelia/rakudo-j-inst-2/share/perl6/site␤    /home/camelia/rakudo-j-inst-2/share/perl6/vendor␤    /home/camelia/rakudo-j-inst-2/share/perl6␤    C…»
18:12 psch oh, probably "math" actually :s
18:12 psch j: use java::math::BigInteger:from<Java>; say BigInteger.new(-1).pow(99999999999999)
18:12 camelia rakudo-jvm 8ca367: OUTPUT«===SORRY!===␤Could not find java::math::BigInteger at line 1 in:␤    /home/camelia/.perl6␤    /home/camelia/rakudo-j-inst-2/share/perl6/site␤    /home/camelia/rakudo-j-inst-2/share/perl6/vendor␤    /home/camelia/rakudo-j-inst-2/share/perl6␤    C…»
18:12 psch grr
18:12 pmurias babydrop: it's more die from lack of memory rather then return a giant number
18:12 psch that's what i get for implementing different specs for jre and user-supplied-classes
18:13 psch j: use java::math::BigInteger:from<JavaRuntime>; say BigInteger.new(-1).pow(99999999999999)
18:13 camelia rakudo-jvm 8ca367: OUTPUT«Couldn't find a constructor with types class java.lang.Long.␤  in block <unit> at <tmp> line 1␤␤»
18:13 psch j: use java::math::BigInteger:from<JavaRuntime>; say BigInteger.new("-1").pow(99999999999999) # but *now*
18:13 camelia rakudo-jvm 8ca367: OUTPUT«-1␤»
18:13 psch r: say (-1)**99999999999999
18:13 camelia rakudo-jvm 8ca367: OUTPUT«-1␤»
18:13 camelia ..rakudo-moar 5bacb0: OUTPUT«Numeric overflow␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
18:13 psch okay so
18:14 psch i wanna say that r-m shouldn't screw things up r-j can do
18:14 psch cause r-j is kinda crippled and well
18:14 psch mind, that's probably not the best reasoning
18:15 psch r-j is similarly bound to ieee754, minus some boxing concerns which mostly don't matter
18:15 babydrop pmurias: it's a byte per 8 positions, right?
18:15 psch (as in, we have the boxing types as kinda fallback but not really because they also adhere to ieee754)
18:16 babydrop Well, wolframalpha does it somehow: http://www.wolframalpha.com/input/?i=2**%282**200%29
18:16 psch j: use java::math::BigInteger:from<JavaRuntime>; say BigInteger.new("2").pow(BigInteger.new("2").pow(200))
18:16 camelia rakudo-jvm 8ca367: OUTPUT«This type cannot unbox to a native integer␤  in block <unit> at <tmp> line 1␤␤»
18:17 psch ah, marshalling screws that over
18:17 psch 'cause we unbox BigInteger.new("2").pow(200) before passing it to the other .pow
18:17 babydrop ah
18:17 psch because apparently we don't have robust enough bigint marshalling rules yet :/
18:17 psch (...patches welcome..? :P )
18:18 babydrop j: use java::math::BigInteger:from<JavaRuntime>; say BigInteger.new("9999999999").pow(Big​Integer.new("9999999999"))
18:18 camelia rakudo-jvm 8ca367: OUTPUT«===SORRY!=== Error while compiling <tmp>␤Unable to parse expression in argument list; couldn't find final ')' ␤at <tmp>:1␤------> say BigInteger.new("9999999999").pow(Big⏏​Integer.new("9999999999"))␤    expecting any of:␤        i…»
18:18 psch whu
18:19 psch is there some sneaky unicode there..?
18:19 babydrop oh, yeah appears so
18:19 babydrop j: use java::math::BigInteger:from<JavaRuntime>; say BigInteger.new("9999999999").pow(BigInteger.new("9999999999"))
18:19 camelia rakudo-jvm 8ca367: OUTPUT«This type cannot unbox to a native integer␤  in block <unit> at <tmp> line 1␤␤»
18:20 psch mhm, so unmarshalling is similarly weird
18:20 psch probably falling back to natives where it shouldn't :/
18:22 AlexDani` joined #perl6-dev
18:22 dalek rakudo/nom: cf05254 | (Pawel Murias)++ | src/core/Int.pm:
18:22 dalek rakudo/nom: Stop relying on a bug in infix:<**>(Int, Int).
18:22 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/cf0525408e
18:22 dalek rakudo/nom: 3836012 | (Paweł Murias)++ | src/core/Int.pm:
18:22 dalek rakudo/nom: Merge pull request #938 from rakudo/fix-powers-with-big-exponents
18:22 dalek rakudo/nom:
18:22 dalek rakudo/nom: Stop relying on a bug in infix:<**>(Int, Int).
18:22 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/3836012bff
18:23 pmurias psch: re (-1)**99999999999999 # this should now work on rakudo-moar
18:24 psch pmurias++
18:25 dalek rakudo/nom: f367e4e | (Zoffix Znet)++ | src/core/List.pm:
18:25 dalek rakudo/nom: Fix MVMArray Error on .pick with negative numbers
18:25 dalek rakudo/nom:
18:25 dalek rakudo/nom: ...by restricting range to UInt. However, for some ops, like infix:<xx>
18:25 dalek rakudo/nom: we treat negatives as zero (see
18:25 dalek rakudo/nom: https://irclog.perlgeek.de/perl6/2016-12-07#i_13698488)
18:25 dalek rakudo/nom:
18:25 dalek rakudo/nom: I'm commiting this as a fix for very LTA error, but will leave the
18:25 dalek rakudo/nom: ticket[^1] open. I will review what we do for most of our methods to see
18:25 dalek rakudo/nom: if there's any sort of consistency we can make out of it.
18:25 dalek rakudo/nom:
18:25 dalek rakudo/nom: [1] https://rt.perl.org/Ticket/Display.html?id=130284
18:25 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/f367e4edc1
18:34 dalek rakudo/nom: 00541a5 | (Lucas Buchala)++ | src/Perl6/Compiler.nqp:
18:34 dalek rakudo/nom: De-indent 4 spaces the "perl -h" message output
18:34 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/00541a5540
18:34 dalek rakudo/nom: 419f7bd | (Zoffix Znet)++ | src/Perl6/Compiler.nqp:
18:34 dalek rakudo/nom: Merge pull request #939 from lucasbuchala/patch-1
18:34 dalek rakudo/nom:
18:34 dalek rakudo/nom: De-indent 4 spaces the "perl -h" message output
18:34 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/419f7bd605
18:46 pmurias https://rt.perl.org/Public/Bug/Display.html?id=125938 - needs checking on Mac OS X so that we can close the ticket
18:48 AlexDani` joined #perl6-dev
18:52 cognominal joined #perl6-dev
18:56 [Coke] pmurias: we have os x tests on jenkins, no?
19:00 FROGGS joined #perl6-dev
19:00 dalek roast: 714abc9 | (Pawel Murias)++ | S03-operators/overflow.t:
19:00 dalek roast: Test that 2**-10000000000 throws an overflow exception.
19:00 dalek roast: review: https://github.com/perl6/roast/commit/714abc91ce
19:01 psch j: 2**-10000000000
19:01 camelia rakudo-jvm 8ca367: OUTPUT«WARNINGS for <tmp>:␤Useless use of "**" in expression "2**-" in sink context (line 1)␤Numeric overflow␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in method throw at gen/jvm/CORE.setting line 27529␤  in method throw at gen/jvm/COR…»
19:01 psch j: say 2**-10000000000
19:01 camelia rakudo-jvm 8ca367: OUTPUT«Numeric overflow␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in method throw at gen/jvm/CORE.setting line 27529␤  in method throw at gen/jvm/CORE.setting line 30188␤  in method gist at gen/jvm/CORE.setting line 30222␤  in sub say …»
19:20 cognominal joined #perl6-dev
19:22 babydrop hm, did we bump nqp for the pow thing? I'm getting a bunch of failures on t/spec/S03-operators/overflow. and t/spec/S32-num/power.
19:23 babydrop nope. I'll bump
19:28 pmurias sorry for not bumping NQP
19:29 babydrop It's fine. I like bumping thing :)
19:32 pmurias aren't https://github.com/perl6/roast/blob/master/S32-num/power.t#L115 and https://github.com/perl6/roast/blob/master/S32-num/power.t#L118 contradictory?
19:32 geekosaur https://www.youtube.com/watch?v=UfM3kMz-6c4 do the bump :p
19:35 RabidGravy joined #perl6-dev
19:35 babydrop pmurias: the tests themselves look OK to me, one's power ends in ⁵⁴ and the other ends in ⁴⁵
19:35 babydrop and the odd one tests for the result being -1
19:35 psch right, one has an even exponent, the other an odd one
19:36 psch also, neat song :3
19:38 dalek rakudo/nom: 2d01981 | (Zoffix Znet)++ | tools/build/NQP_REVISION:
19:38 dalek rakudo/nom: (nqp bump) Fix for nqp::pow_I with large exponents
19:38 dalek rakudo/nom:
19:38 dalek rakudo/nom: NQP changes: https://github.com/perl6/nqp/compare/e423c3693...af8eadda
19:38 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/2d0198139b
19:41 pmurias do those weird unicody powers work?
19:41 babydrop yup
19:41 babydrop m: say 2²
19:41 camelia rakudo-moar 419f7b: OUTPUT«4␤»
19:42 babydrop ZOFVM: Files=1204, Tests=130255, 153 wallclock secs (23.78 usr  3.52 sys + 3539.04 cusr 274.42 csys = 3840.76 CPU)
19:46 pmurias they are stored in an int
20:01 cognominal joined #perl6-dev
20:50 dalek rakudo/fix-powers-with-big-exponents: 4e2bf14 | (Pawel Murias)++ | src/Perl6/Actions.nqp:
20:50 dalek rakudo/fix-powers-with-big-exponents: Support superscript powers that are larger then we could store in an int.
20:50 dalek rakudo/fix-powers-with-big-exponents: review: https://github.com/rakudo/rakudo/commit/4e2bf143ce
20:51 dalek rakudo/nom: 0428b79 | (Pawel Murias)++ | src/Perl6/Actions.nqp:
20:51 dalek rakudo/nom: Support superscript powers that are larger then we could store in an int.
20:51 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0428b79af0
20:54 dalek roast: a099498 | (Pawel Murias)++ | S (2 files):
20:54 dalek roast: Unfudge tests that should no longer be a problem.
20:54 dalek roast: review: https://github.com/perl6/roast/commit/a099498b47
20:55 pmurias [Coke]: where is that jenkins you mention?
20:59 [Coke] er... said jenkins, meant travis
21:00 [Coke] so if you have arecent enough rakudo build passing with bumps that include your fixes. (or a PR that passes), I think OS X is on that list.
21:00 RabidGravy I've got a jenkins building rakudo here
21:02 pmurias RabidGravy: on OS X?
21:06 pyrimidine joined #perl6-dev
21:11 cognominal joined #perl6-dev
21:24 pmurias the 3 tickets for infix:<**> need to be closed: RT #124798, #127493, #127500
21:24 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=124798
21:24 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=127493
21:24 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=127500
21:26 RabidGravy pmurias, no :) Though I can't see any reason why it wouldn't work
21:37 pyrimidine joined #perl6-dev
21:37 AlexDaniel joined #perl6-dev
21:45 AlexDani` joined #perl6-dev
22:09 pyrimidine joined #perl6-dev
22:18 travis-ci joined #perl6-dev
22:18 travis-ci Rakudo build errored. Zoffix Znet 'Fix MVMArray Error on .pick with negative numbers
22:18 travis-ci https://travis-ci.org/rakudo/rakudo/builds/182045511 https://github.com/rakudo/rakudo/compare/3836012bffe3...f367e4edc189
22:18 travis-ci left #perl6-dev
22:18 buggable [travis build above] ✓ All failures are due to timeout (1), missing build log (0), or GitHub connectivity (0).
22:29 MasterDuke joined #perl6-dev
22:45 pyrimidine joined #perl6-dev
22:58 babydrop pmurias: done.
23:08 pyrimidine joined #perl6-dev
23:11 babydrop .ask pmurias I assume the `fix-powers-with-big-exponents` branch can be deleted? It's the one that included a fix to avoid the bug explotation of pow_I in Int ** Int, but that was merged.
23:11 yoleaux2 babydrop: I'll pass your message to pmurias.
23:22 cognominal joined #perl6-dev
23:40 pmurias joined #perl6-dev
23:54 pyrimidine joined #perl6-dev

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