Perl 6 language and compiler development | Logs at colabti.org/irclogger/irclogger_log/perl6-dev | For toolchain/installation stuff see #perl6-toolchain | For MoarVM see #moarvm
Set by Zoffix on 27 July 2018.
AlexDaniel O_o 01:21
my program just ended with “Floating point exception”
m: dd <0/0> 01:23
camelia <0/0>
AlexDaniel m: say <0/0>.round
camelia (signal FPE)
AlexDaniel I mean… yeah… but…
6c: say <0/0>.round
committable6 AlexDaniel, gist.github.com/94854a749ae9ccb808...dd5df9e3b0
AlexDaniel bisect: old=2018.06 say <0/0>.round 01:24
bisectable6 AlexDaniel, Bisecting by exit signal (old=2018.06 new=1611795). Old exit signal: 0 (None)
AlexDaniel, bisect log: gist.github.com/407bb0f73363556c20...e7e8dc192a
AlexDaniel, (2018-07-31) github.com/rakudo/rakudo/commit/09...7dfa4fc5d7
AlexDaniel R#2569 01:26
synopsebot R#2569 [open]: github.com/rakudo/rakudo/issues/2569 [regression][severe] SIGFPE when rounding a 0/0 Rat
01:43 MasterDuke joined, p6bannerbot sets mode: +v MasterDuke, MasterDuke left, MasterDuke joined, herbert.freenode.net sets mode: +v MasterDuke, p6bannerbot sets mode: +v MasterDuke 01:56 MasterDuke left 03:07 evalable6 left 03:11 evalable6 joined, ChanServ sets mode: +v evalable6 03:12 p6bannerbot sets mode: +v evalable6 03:15 lizmat left
Geth rakudo: d39e2fc4f8 | (Nick Logan)++ (committed using GitHub Web editor) | src/core/CompUnit/Repository/FileSystem.pm6
Cache files-prefix
03:26
07:32 evalable6 left 07:36 evalable6 joined, ChanServ sets mode: +v evalable6, p6bannerbot sets mode: +v evalable6 08:40 dogbert11 joined 08:41 p6bannerbot sets mode: +v dogbert11 08:43 dogbert17 left 09:28 lizmat joined, p6bannerbot sets mode: +v lizmat 10:24 [TuxCM] joined 10:25 p6bannerbot sets mode: +v [TuxCM]
[TuxCM] Rakudo version 2018.12-48-gd39e2fc4f - MoarVM version 2018.12-8-g45d15efe9
csv-ip5xs0.949 - 0.971
csv-ip5xs-207.139 - 7.163
csv-parser21.934 - 22.690
csv-test-xs-200.427 - 0.432
test7.530 - 7.558
test-t1.803 - 1.843
test-t --race0.812 - 0.818
test-t-2029.404 - 30.848
test-t-20 --race9.414 - 9.524
10:39
10:51 Tux__ left 10:53 Tux__ joined 10:54 p6bannerbot sets mode: +v Tux__ 10:57 [TuxCM] left, [TuxCM] joined 10:58 |Tux| joined, Tux__ left, p6bannerbot sets mode: +v [TuxCM], p6bannerbot sets mode: +v |Tux| 11:01 lizmat left 11:24 Tux__ joined 11:25 p6bannerbot sets mode: +v Tux__, lizmat joined, p6bannerbot sets mode: +v lizmat 11:27 [TuxCM] left 11:28 [TuxCM] joined 11:29 Tux__ left, p6bannerbot sets mode: +v [TuxCM] 11:50 Tux__ joined 11:51 p6bannerbot sets mode: +v Tux__ 11:54 [TuxCM] left, [TuxCM] joined 11:55 Tux__ left, p6bannerbot sets mode: +v [TuxCM] 12:04 llfourn left 12:22 Tux__ joined, p6bannerbot sets mode: +v Tux__ 12:25 [TuxCM] left 12:52 [TuxCM] joined 12:53 p6bannerbot sets mode: +v [TuxCM]
Geth rakudo: 11da0fb489 | (Elizabeth Mattijsen)++ | src/core/Rational.pm6
Fix FPE on Rat.round

Fixes R#2569, but makes Rat.round 30% slower :-(
12:54
synopsebot R#2569 [open]: github.com/rakudo/rakudo/issues/2569 [regression][severe] SIGFPE when rounding a 0/0 Rat
12:56 Tux__ left, Tux__ joined 12:57 p6bannerbot sets mode: +v Tux__, [TuxCM] left
Geth rakudo: cf0a6eaa24 | (Elizabeth Mattijsen)++ | src/core/Rational.pm6
Streamline Rational.floor/ceiling/Int

  - use ternaries
  - use Failure.new instead of fail, just returning the Failure directly
  - set return value on signature for possible future optimization possibilities
  - makes them about 10% faster
13:22
13:23 [TuxCM] joined 13:24 p6bannerbot sets mode: +v [TuxCM] 13:27 Tux__ left 13:28 Tux__ joined, [TuxCM] left, p6bannerbot sets mode: +v Tux__ 13:49 [TuxCM] joined 13:50 p6bannerbot sets mode: +v [TuxCM]
Geth rakudo: 236351adeb | (Elizabeth Mattijsen)++ | src/core/Rational.pm6
Streamline Rational.Num

  - the Rational attributes are always bound, so no decont necessary
  - the defaults in the attribute definition therefore have no meaning
  - makes Rational.Num about 5% faster
13:51
13:53 Tux__ left, Tux__ joined 13:54 [TuxCM] left, p6bannerbot sets mode: +v Tux__ 14:20 [TuxCM] joined 14:21 p6bannerbot sets mode: +v [TuxCM] 14:24 Tux__ left, Tux__ joined 14:25 [TuxCM] left, p6bannerbot sets mode: +v Tux__ 14:51 [TuxCM] joined 14:52 p6bannerbot sets mode: +v [TuxCM] 14:55 Tux__ left, Tux__ joined 14:56 p6bannerbot sets mode: +v Tux__, [TuxCM] left 14:58 committable6 left 14:59 committable6 joined, benchable6 left, benchable6 joined, nativecallable6 left, p6bannerbot sets mode: +v committable6 15:00 p6bannerbot sets mode: +v benchable6
timotimo lizmat: can you tell if method round became bigger than the inline limit because of that change? 15:04
if so, perhaps turning the whole Failure.new stuff into a sub call could be wortwhile
lizmat I tried that already, didn't make a difference
so I didn't :-)
it's the extra check on $!denominator, I think 15:05
15:17 Tux__ left 15:57 nativecallable6 joined 15:58 p6bannerbot sets mode: +v nativecallable6 16:25 Ven`` joined 16:26 p6bannerbot sets mode: +v Ven``
lizmat m: dd <1/-1> # why isn't this a Rat ? 16:48
camelia RatStr.new(-1.0, "1/-1")
lizmat m: dd <-1/1> # this is!
camelia -1.0
16:59 Ven`` left 17:00 Ven`` joined 17:01 p6bannerbot sets mode: +v Ven``, Tux__ joined 17:02 p6bannerbot sets mode: +v Tux__ 19:14 lucasb joined, p6bannerbot sets mode: +v lucasb
timotimo mathematicians decided that i guess? 19:43
20:32 llfourn joined, p6bannerbot sets mode: +v llfourn
lizmat what do mathematicians have to do with -1/1 vs 1/-1 ? they're both -1 ? 21:11
timotimo: feels more like a parsing issue to me
deliberate, maybe, but still
AlexDaniel lizmat: yeah, there was a list somewhere with all the ways < > syntax is broken
lizmat my feeling is that either both should be RatStr or both should be Rat
timotimo hm. perhaps the canonical representation of a rat doesn't have to be RatStr anyway 21:12
m: dd <-2/2>
camelia -1.0
timotimo hum.
gfldex the Rat literal is a construct of convenience and one form not working is not very convenient at all. 21:14
timotimo well, they're both Rat, only one of them is RatStr
gfldex and since when did mathematicians ever stop us from doing the right thing? :->
lucasb github.com/rakudo/rakudo/blob/mast....nqp#L3256 21:15
<de=.signed-integer> would help?
gfldex m: sub s(Rat $r){ dd $r }; s(<-1/1>); s(<1/-1>); 21:16
camelia -1.0
RatStr.new(-1.0, "1/-1")
gfldex m: sub s(Rat $r){ dd $r.gist, $r.Str }; s(<-1/1>); s(<1/-1>); 21:17
camelia "-1"
"-1"
"1/-1"
"1/-1"
gfldex is there a notable performance hit for RatStr?
timotimo haven't checked yet, but i wouldn't assume it's a whole lot 21:18
gfldex m: dd (<1/-1> * 2).WHAT;
camelia Rat
gfldex the RatStr doesn't survive for long it seams 21:19
AlexDaniel lizmat: fwiw I think if we want <> syntax to be there, we should create a table or something with a list of inputs and and expected outputs, or something
I remember having some good laughs about it with Zoffix
gfldex It will take more RAM tho. That might become an issue in corner cases.
AlexDaniel it may be convenient for simple cases, but in more complex (haha) cases it's very unpredictable 21:20
like, if in the end you have to check what value is created anyway, why not use a more readable syntax 21:21
m: dd <1> 21:24
camelia IntStr.new(1, "1")
AlexDaniel m: dd <-1>
camelia IntStr.new(-1, "-1")
AlexDaniel m: dd <42.5>
camelia RatStr.new(42.5, "42.5")
lucasb github.com/rakudo/rakudo/commit/04...8ec60f2cf7 21:25
AlexDaniel > <TimToady> the reasoning is pragmatic; there's good reason to write <1/2> and <1+2i> as literals, and no good reason to write <42>, since you could just write 42 instead 21:26
colabti.org/irclogger/irclogger_lo...-11-27#l38
lucasb ^^ he introduced the signed-integer token in that commit
made the numerator 'signed-integer' but not the denominator 21:27
AlexDaniel yeah but that's just for parsing
lucasb I thought it was the issue here 21:28
AlexDaniel <nu=.signed-integer> '/' <de=integer> }
lucasb: you're right 21:29
lucasb is there any reason that it isn't "<de=.signed-integer>" ?
lizmat not that I know of 21:30
lucasb '1/+2' looks strange, but... I guess it's orthogonal :)
ah, I guess TimToady thought of that
AlexDaniel m: .^name.say for <1/2>, <1/2*10>, <1/2*10**10> 21:31
camelia Rat
Str
RatStr
lucasb what?! 21:32
m: dd <1/2*10**10>
camelia RatStr.new(0.00000000005, "1/2*10**10")
AlexDaniel you can put a minus here 21:34
m: say .^name for <-1/2*10**10>
camelia RatStr
AlexDaniel and here and here
m: say .^name for <-1/-2*-10**10>
camelia RatStr
AlexDaniel but not here
m: say .^name for <-1/-2*-10**-10>
camelia Str
AlexDaniel although it can be a + 21:35
m: say .^name for <-1/-2*-10**+10>
camelia RatStr
japhb There are surely some bugs there, but I suspect there's a reason <1/-1> is a RatStr instead of a Rat: Because <1/-1> is not in canonical form, thus there's a reason that the original intent should be saved in the Str side of the allotrope. 21:37
Basically, Perl 6 assumes you have a reason for doing things in an odd way, and that there may be meaning to that.
Just like <42> Creates an allotrope, because the only reason for you to not just write 42 is because you wanted something special. 21:38
AlexDaniel heh canonical form
japhb Sorry, allo*morph* 21:39
SmokeMachine m: dd <2/4>
camelia 0.5
japhb has spent too much time the last few days explaining all the cool things about carbon
AlexDaniel I mean, japhb is right, that's the actual intent indeed
but IMO we should throw it away and start again with simpler rules 21:40
m: say WHAT <0xf.8*:2[1,0]**0b11/0o200+2.0e2i>
camelia (ComplexStr)
AlexDaniel m: say <0xf.8*:2[1,0]**0b11/0o200+2.0e2i>
camelia 0xf.8*:2[1,0]**0b11/0o200+2.0e2i
AlexDaniel m: say +<0xf.8*:2[1,0]**0b11/0o200+2.0e2i> 21:41
camelia 0.96875+200i
SmokeMachine 2/4 isnt the canonical form ether, right?
AlexDaniel SmokeMachine: no, it's right, it gave you a Rat
m: say WHAT <2/4>
camelia (Rat)
SmokeMachine I mean by what japhb was saying, it should be an RatStr, right? 21:42
AlexDaniel SmokeMachine: no, the idea is that it is a syntax for Rat and Complex literals 21:43
so in a “canonical form” you'll get a pure Rat or pure Complex
japhb There's a reason I was willing to write Str.Numeric but considered val() a bit above my pay grade ... 21:46
timotimo are you talking about carbon, the element? 21:47
japhb timotimo: Yes, that's why I fumbled "allomorph" as "allotrope" instead
"What's the difference between graphite and diamond?" "Do you want the short answer or the long answer?" "I've got all the time in the world, Daddy." 21:49
AlexDaniel lizmat: see also R#1827
synopsebot R#1827 [open]: github.com/rakudo/rakudo/issues/1827 <1i> should be a Complex literal, not ComplexStr
AlexDaniel m: dd <0x_FF.FF> 21:57
camelia RatStr.new(255.99609375, "0x_FF.FF")
AlexDaniel arguably the rules for getting a plain Rat or Complex are fairly simple 21:58
22:07 llfourn left
timotimo japhb: one of those days i'll watch a five hour lecture on the topic or something :) 22:24
japhb timotimo: Heh. :-) 22:29
Geth rakudo: 5c0ac4db9f | (Elizabeth Mattijsen)++ | src/core/Rational.pm6
Streamline Rational.Str

  - compartmentalize the logic into private methods
  - <42/21> is now about 2.2x as fast
  - <42/17> is now about 1.2x as fast
  - keep comments as much as possible
22:48
lizmat afk& 22:51
23:02 Ven`` left 23:05 Ven`` joined 23:06 p6bannerbot sets mode: +v Ven`` 23:43 lucasb left
Ven`` Am I the only one seeing an issue with perl6advent.wordpress.com/2018/12/...happiness/ ? 23:51
masak
Even perl6advent.wordpress.com/2015/12/...et-agents/ looks a bit weird :o) 23:52
masak++ # for blogging 23:54