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.
00:15 Merfont joined, Kaypie left 00:16 p6bannerbot sets mode: +v Merfont 00:17 Kaypie joined, Merfont left 00:18 p6bannerbot sets mode: +v Kaypie 00:43 Ven`` left
Geth rakudo/precompile-on-require: 4c859ae342 | (Nick Logan)++ | src/core/CompUnit/Repository/FileSystem.pm6
Back CURFS.load with .need, allowing auto precomp

Auto precompile modules loaded with `require` / $*REPO.load similar to `use` / $*REPO.need. It also allows CURFS.load to take and load a precompiled file path.
Mostly works. However it breaks on `require "lib/Zef/CLI.pm6"` for some reason.
03:16
04:54 AlexDani` joined, p6bannerbot sets mode: +v AlexDani` 05:02 Tux__ left, AlexDaniel left 05:08 Tux__ joined 05:09 p6bannerbot sets mode: +v Tux__ 07:05 [TuxCM] joined 07:06 p6bannerbot sets mode: +v [TuxCM] 07:29 Tux__ left 07:30 |Tux| joined 07:31 p6bannerbot sets mode: +v |Tux| 07:48 [TuxCM] left 08:03 lgtaube left 08:19 lgtaube joined 08:20 p6bannerbot sets mode: +v lgtaube 09:05 |Tux| left, |Tux| joined 09:06 p6bannerbot sets mode: +v |Tux| 09:16 |Tux| left, |Tux| joined, [TuxCM] joined 09:17 p6bannerbot sets mode: +v |Tux|, p6bannerbot sets mode: +v [TuxCM] 09:25 robertle_ joined 09:26 p6bannerbot sets mode: +v robertle_ 09:35 |Tux| left 09:36 |Tux| joined 09:37 p6bannerbot sets mode: +v |Tux| 09:53 [TuxCM] left 10:04 patrickb joined 10:05 |Tux| left, p6bannerbot sets mode: +v patrickb 10:06 |Tux| joined, p6bannerbot sets mode: +v |Tux| 10:16 lizmat joined, p6bannerbot sets mode: +v lizmat 10:35 |Tux| left 10:36 |Tux| joined 10:37 p6bannerbot sets mode: +v |Tux| 10:54 lizmat left 10:57 lizmat joined, p6bannerbot sets mode: +v lizmat 11:05 |Tux| left 11:06 |Tux| joined, p6bannerbot sets mode: +v |Tux| 11:55 [TuxCM] joined 11:56 p6bannerbot sets mode: +v [TuxCM] 12:26 lucasb joined, p6bannerbot sets mode: +v lucasb
lucasb hmm, I noticed R#2541 was closed 12:52
synopsebot R#2541 [closed]: github.com/rakudo/rakudo/issues/2541 Post-incrementing native integers across overflow boundary
lucasb m: say my int8 $x = 127; say $x++; say $x
camelia 127
-129
-128
lucasb to be clear, I'm not questioning the wrap-around behavior, I *do* expect that. I'm questioning the -129 value there 12:53
-129 is not in int8 range
lizmat I completely missed that 12:54
timotimo ha
lizmat reopened the ticket
timotimo is it returning $resultvalue - 1 to do that?
lucasb ah, thanks lizmat :)
lizmat timotimo: no, it's not afaics 12:56
timotimo so how does it cross the boundary once, and then goes backwards? :) 12:57
lizmat good question, looking into it now
looks like $a++ is not calling the int variant of postfix:<++> in Int.pm6 12:59
jnthn How did you determine that? 13:04
I think in some cases it'll inline the thing...
lizmat by putting a "say" inside the candidate and not seeing any output
jnthn OK, that'll prevent the static optimizer from inlining it... 13:05
Though I guess if it's an intlexref or whatever it should still end up in the right candidate anyway
lizmat well, it's not winding up in the Int candidate either 13:06
13:13 AlexDani` is now known as AlexDaniel
timotimo it could be the optimizer is rewriting it 13:15
like, without consulting the normal inliner
jnthn That'd be naughty, but it's possible 13:16
lizmat perl6 --optimize=0 -e 'my int8 $a = 127; say $a++'
int ++ 127 13:17
127
so, yes, it's the optimizer
because it then does call the candidate
comment in the optimizer: 13:35
# need to assign original value; it's cheaper to just
# do the reverse operation than to use a temp var
timotimo that's what breaks it, surely 13:36
13:37 scovit_ joined
lizmat yup 13:37
looking at the effect of removing that opt now
13:37 p6bannerbot sets mode: +v scovit_
scovit_ would anybody be against (or would there be any particular technical difficulties) in adding a submethod BUILD on the Parameter class? (defined in BOOTSTRAP.nqp and expanded in core/Parameter.pm6) 13:40
13:41 scovit_ is now known as scovit
lizmat scovit: to what end ? 13:43
scovit lizmat: to be able to dynamically type signatures
can be useful for instance with nativecast
that can take a signature as the first argument 13:44
lizmat could you turn that into a ticket with an example ?
scovit I can
lizmat scovit++
timotimo: removing the opt makes $a++ 2x as slow
timotimo d'oh 13:48
patrickb What does -- do exactly in perl6? 13:49
On the command line that is 13:50
Could exec-name also be a candidate for forwarding from the perl6 commandline to moar? 13:53
Currently I try to do the forwarding for: --debug-suspend --dump --full-cleanup --tracing --debug-port= 13:54
Still unsure about exec-name.
lizmat timotimo: but I'm not sure how we could get around that :-(
for any but "int" 13:55
m: my int32 $a = 0x7fffffff; say $a; say $a++ 13:57
camelia 2147483647
-2147483649
timotimo we should know the size of the register in question, right?
lizmat m: my int16 $a = 0x7fff; say $a; say $a++
camelia 32767
-32769
timotimo maybe all we need to do is emit a truncate op?
lizmat m: my int64 $a = 0x7fffffffffffffff; say $a; say $a++
camelia 9223372036854775807
9223372036854775807
lizmat do we know the size of the int there? 13:58
timotimo not sure, actually 14:00
lizmat hmmm... looking at the profile without the opt 14:03
the prefix:<++> only takes 18% of total
my int8 $a = 0; for ^10_000_000 { my int8 $b = $a++ }
jnthn By runtime I think you can't recover it, but I think at compile time it'll probably be in the symbol table
lizmat hmmm... potential memory leak with return signatures: R#2593 14:12
synopsebot R#2593 [open]: github.com/rakudo/rakudo/issues/2593 'index' routine shows severe performance decline in a loop
lizmat timotimo: oddly enough, removing the opt breaks the spectest 14:17
patrickb The more I think about it, exec-name will never be interesting for perl6 users. It's merely a tool to help the current script based perl6 runners fake it's executable name from within perl6. Users never want to do that. 14:21
lizmat m: say EVAL(q/my uint8 $var = 255; $var++; say $var; $var/) # que? 14:22
camelia 0
0
lizmat ah
with the postfix:<++> opt removed, I get 0 / 256 14:23
bisectable6: my int8 $a = 127; say $a++ 14:25
bisectable6 lizmat, On both starting points (old=2015.12 new=4d7cdc0) the exit code is 0 and the output is identical as well
lizmat, Output on both points: Ā«-129ā¤Ā»
lizmat wow, that's been sitting there a long time
AlexDaniel c: 2015.12,HEAD my int8 $a = 127; say $a++ 14:28
committable6 AlexDaniel, Ā¦2015.12,HEAD(4d7cdc0): Ā«-129ā¤Ā»
AlexDaniel c: 2015.12,HEAD my int8 $a = 127; say $a++; say $a++; say $a++
committable6 AlexDaniel, Ā¦2015.12,HEAD(4d7cdc0): Ā«-129ā¤-128ā¤-127ā¤Ā»
AlexDaniel lucasb++
scovit lizmat: github.com/rakudo/rakudo/issues/2594 14:31
R#2594
synopsebot R#2594 [open]: github.com/rakudo/rakudo/issues/2594 [wishlist] add BUILD submethods to Parameter and Signature classes
AlexDaniel btw I love R#2593 14:49
synopsebot R#2593 [open]: github.com/rakudo/rakudo/issues/2593 [regression][āš  blocker āš ] 'index' routine shows severe performance decline in a loop
AlexDaniel short description, bisected and with valgrind output
AlexDaniel tweaks the issue templateā€¦ 14:50
Geth rakudo: 095d216ae8 | (Aleks-Daniel Jakimenko-Aleksejev)++ | .github/ISSUE_TEMPLATE.md
Tweak ISSUE_TEMPLATE

Make it even clearer that parts of the template can be deleted. Inspired by a short yet amazing ticket #2593.
14:51
synopsebot RAKUDO#2593 [open]: github.com/rakudo/rakudo/issues/2593 [regression][āš  blocker āš ] 'index' routine shows severe performance decline in a loop
14:53 go|dfish joined, p6bannerbot sets mode: +v go|dfish 15:12 go|dfish left
scovit lizmat: my last comment was bogus. I think it makes sense to have both Signature and Parameter as first class. But certain detail, as you said, should be provided behind a decent interface. 15:14
15:21 Kaypie is now known as Kaiepi 15:27 go|dfish joined, p6bannerbot sets mode: +v go|dfish
|Tux| Maybe a stupid question, but 15:30
if I have a class with a public mutable attribute, is there a way to make a shortcut so I can write $classs.field = 42 as $class = 42 15:31
so that an assignment to the (immutable) class defaults to assigning to a specific attribute of the class 15:32
I'd also accept a class method that would be invoked on assigning to the class 15:33
lizmat [Tux]: if you let .new return a Proxy object, with the actual object inside it, that should work, but would cause overhead 15:38
|Tux| does not want overhead (obviously :)
AlexDaniel this is not it, but kinda similar: 15:39
m: class Foo { method ASSIGN-POS($index, $new) { say 42 } }; Foo.new[0] = 50
camelia 42
AlexDaniel m: class Foo { method STORE($new) { say 42 } }; Foo.new = 50
camelia 42
AlexDaniel hmmmm
|Tux| interesting 15:40
AlexDaniel why the hell does that work? :S
maybe it should, I don't know :)
15:40 Ven`` joined
AlexDaniel 6c: class Foo { method STORE($new) { say 42 } }; Foo.new = 50 15:40
committable6 AlexDaniel, Ā¦6c (36 commits): Ā«42ā¤Ā» 15:41
15:41 p6bannerbot sets mode: +v Ven``
AlexDaniel |Tux|: if we think that it should work, maybe it's a good idea to create a ticket to ensure we have tests for it 15:41
|Tux| I didn't know about ASSIGN-POS and ASSIGN-KEY, which most likely are the two that I would need 15:42
lizmat [Tux] do you really want to have your object look like an array or a hash ? 15:44
|Tux| Yep :)
like an array *and* a hash :P
AlexDaniel like github.com/zostay/perl6-ArrayHash ?
|Tux| no 15:45
15:45 MasterDuke joined, p6bannerbot sets mode: +v MasterDuke, MasterDuke left, MasterDuke joined, herbert.freenode.net sets mode: +v MasterDuke, p6bannerbot sets mode: +v MasterDuke
|Tux| summary, I have CSV::Row, which is an object that holds the parser itself and a list of CSV::Field's 15:45
*if* the csv has header row (the columns are labelled), I want the row $r to be addressed by the column label $r<field1> 15:46
which then return the CSV::Field object in that column 15:47
which might be $r[14]
lizmat yeah, then AT-KEY is what you want
for $r<field1> 15:48
|Tux| when *assigning* to CSV::Field, I'd just want to write $r[0] = 42 instead of $r[0].text = 42
I already have a working AT-KEY and AT-POS
github.com/Tux/CSV/blob/master/lib...SV.pm#L388 15:49
scovit Tux: you want something siilar to a R data frame 15:51
jnthn AlexDaniel: Yes, implementing STORE is the correct way for a non-Scalar/Proxy to implement its assignment semantics. 15:52
AlexDaniel: See Array.STORE and Hash.STORE for example
AlexDaniel roast#509 15:53
jnthn The rules are: 1) if $ or & sigil, compile into a scalar assignment, 2) @ or % sigil compile into a call to STORE, 3) if not a variable (so no sigil) compile into something late-bound that looks at iscont
AlexDaniel SPEC#509
synopsebot SPEC#509 [open]: github.com/perl6/roast/issues/509 STORE on custom classes is not tested
scovit Tux: it seems to me that the way to go is to get something that share the carachteristic of a multidim array and a Hash 15:54
jnthn AlexDaniel: +1 for the ticket; I think it's fine to be spec. 15:55
lizmat but how should that work? 16:00
m: class A { method STORE(|) { say "STORE" } }; my $a := A.new; dd $a; $a = 666; dd $a # assigns the container
camelia A.new
Cannot assign to an immutable value
in block <unit> at <tmp> line 1
lizmat m: class A { method STORE(|) { say "STORE" } }; my $a = A.new; dd $a; $a = 666; dd $a # assigns the container 16:01
camelia A $a = A.new
Int $a = 666
lizmat m: class A { method STORE(|) { say "STORE" } }; my $a := A.new; dd $a; $a = 666; dd $a # fails
camelia A.new
Cannot assign to an immutable value
in block <unit> at <tmp> line 1
16:01 robertle_ left
jnthn lizmat: Read the 3 rules I wrote above again. 16:01
lizmat missed that, jnthn++
jnthn s/again// :)
|Tux| FYI it proves that ASSIGN-KEY and ASSIGN-POS are exactly what I was looking for, and it works! 16:02
and because I did not know about them, I asked the wrong question
Geth rakudo: f329d6c6ca | (Elizabeth Mattijsen)++ | src/core/Signature.pm6
Make Signature a first class citizen

Signature.new(params => (Parameter.new,), returns => Int, arity => 1, count => Inf) now works. Part of fix for R#2594
16:05
synopsebot R#2594 [open]: github.com/rakudo/rakudo/issues/2594 [wishlist] Make Signatures and Parameters first class citizens
lizmat afk& 16:07
scovit lizmat++ 16:13
16:26 lucasb left 16:35 [TuxCM] left 16:46 travis-ci joined, p6bannerbot sets mode: +v travis-ci
travis-ci Rakudo build failed. Elizabeth Mattijsen 'Make Signature a first class citizen 16:46
travis-ci.org/rakudo/rakudo/builds/477414640 github.com/rakudo/rakudo/compare/0...29d6c6cab9
16:46 travis-ci left 17:34 coverable6 left, coverable6 joined 17:35 p6bannerbot sets mode: +v coverable6 17:42 Ven`` left 17:56 [TuxCM] joined 17:57 p6bannerbot sets mode: +v [TuxCM] 18:15 releasable6 left, notable6 left, quotable6 left, shareable6 left, undersightable6 left 18:16 undersightable6 joined, quotable6 joined, shareable6 joined, notable6 joined, releasable6 joined, p6bannerbot sets mode: +v undersightable6, p6bannerbot sets mode: +v quotable6, p6bannerbot sets mode: +v shareable6, p6bannerbot sets mode: +v notable6, p6bannerbot sets mode: +v releasable6
Geth rakudo/precompile-on-require: 840018e61a | (Nick Logan)++ | src/core/CompUnit/Repository/FileSystem.pm6
Extract precomp id from path only once
18:30
21:07 patrickb left
gfldex m: say X::Multi::NoMatch.new.Str; 21:12
camelia Something went wrong in (NoMatch)
gfldex Who alloed a Microsoft dev to write that error message? :->
21:23 Kaiepi left 21:24 Kaiepi joined, p6bannerbot sets mode: +v Kaiepi 21:27 Kaiepi left 21:29 Kaiepi joined 21:30 p6bannerbot sets mode: +v Kaiepi 21:31 lizmat left 22:39 MasterDuke left 22:59 dct joined, p6bannerbot sets mode: +v dct 23:21 Ven`` joined 23:22 p6bannerbot sets mode: +v Ven`` 23:27 dct left 23:47 MasterDuke joined, p6bannerbot sets mode: +v MasterDuke, MasterDuke left, MasterDuke joined, herbert.freenode.net sets mode: +v MasterDuke, p6bannerbot sets mode: +v MasterDuke