Geth kudo/nom: 7f970357bd | (Samantha McVey)++ | t/spectest.data
Remove duplicate test

GraphemeBreakTest.t provides the same functionality
00:00
ast: db27cf25ab | (Samantha McVey)++ | 2 files
Remove duplicate test and testgen

GraphemeBreakTest.t provides the same and has been updated for Unicode 9.0
00:02
samcv m: multi sub prefix:<[~]>(*@a where {$_.all ~~ Str}) returns Str { @a.join('');}; say [~] 'thing', 'this' 00:39
camelia rakudo-moar 7f9703: OUTPUT«thingthis␤»
samcv so this works, but it fails if they try and use Int's or other Cool things. and if I use Cool, then it fails if it's undefined yet, something they use 00:40
would it be bad to not do type check and just have things coernce to strings by doing join? which is kind of what [~] already does.
this [~] special case is 3x+ faster
m: say [~] 1,2,3 00:41
camelia rakudo-moar 7f9703: OUTPUT«123␤»
samcv m: my $var; say [~] $var, 1, 3; 00:42
camelia rakudo-moar 7f9703: OUTPUT«Use of uninitialized value $var of type Any in string context.␤Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful.␤ in block <unit> at <tmp> line 1␤13␤»
samcv ok so i guess that doesn't work
oh wait. yeah it does output 13 so
we probably shouldn't have to do typechecks here
m: say [~] DateTime.new.now;
camelia rakudo-moar 7f9703: OUTPUT«Cannot call DateTime.new with no parameters␤ in block <unit> at <tmp> line 1␤␤Actually thrown at:␤ in any at gen/moar/Metamodel.nqp line 3072␤ in block <unit> at <tmp> line 1␤␤»
samcv m: say [~] DateTime.now; 00:43
camelia rakudo-moar 7f9703: OUTPUT«2017-01-16T01:43:03.493890+01:00␤»
samcv yeah
yeah it's like 10x faster 00:44
brokenchicken m: multi sub prefix:<[~]> { @_.join }; for ^100_000 { $ = [~] 42, ".".IO, "foo" }; say now - INIT now 00:53
camelia rakudo-moar 7f9703: OUTPUT«WARNINGS for <tmp>:␤Useless use of constant string "foo" in sink context (lines 1, 1)␤2.41212390␤»
brokenchicken m: multi sub prefix:<[~]> is looser(&[,]) { @_.join }; for ^100_000 { $ = [~] 42, ".".IO, "foo" }; say now - INIT now
camelia rakudo-moar 7f9703: OUTPUT«5.83574109␤»
brokenchicken m: for ^100_000 { $ = [~] 42, ".".IO, "foo" }; say now - INIT now 00:54
camelia rakudo-moar 7f9703: OUTPUT«5.34457378␤»
samcv it won't let me use *@a in the signature for the Str.pm file. complaining about don't change the grammar 01:01
or maybe because it's a prefix
idk 01:02
brokenchicken Is it still faster tho, when you make its precedence right?
timotimo if you define an operator in the setting that hasn't been declared in the grammar first, that'll cause a very expensive operation not only during compilation, but during every startup 01:03
samcv ah ok 01:04
well 10x faster is a pretty big speedup. so i would hope the answer is yes
timotimo i tried to make <[~]> use .join a long time ago, but there was something that spoke against it ... i've forgotten what it was :( 01:05
samcv ah 01:07
timotimo maybe it was just something i did wrong, though
brokenchicken samcv: but how do you get 10x? My eval above shows it as a few percent slower... 01:08
timotimo camelia is not very good for measuring
samcv what were you concatening, not strings right? 01:09
concatening strings it's much faster
and the case you tested, it's a tiny bit slower but not too much
brokenchicken timotimo: not for 1000% faster vs 7% slower :P
m: multi sub prefix:<[~]> is looser(&[,]) { @_.join }; for ^100_000 { $ = [~] "x", "y", "foo" }; say now - INIT now 01:10
camelia rakudo-moar 7f9703: OUTPUT«2.8740187␤»
brokenchicken m: multi sub prefix:<[~]> is looser(&[,]) { @_.join }; for ^100_000 { $ = [~] "x", "y", "foo" }; say now - INIT now
camelia rakudo-moar 7f9703: OUTPUT«2.92866880␤»
brokenchicken m: for ^100_000 { $ = [~] "x", "y", "foo" }; say now - INIT now
camelia rakudo-moar 7f9703: OUTPUT«2.82883002␤»
brokenchicken m: for ^100_000 { $ = [~] "x", "y", "foo" }; say now - INIT now
camelia rakudo-moar 7f9703: OUTPUT«2.8594142␤»
timotimo with only three short strings you're not going to measure much improvement
also, are you sure it's running the exact sub you declared?
brokenchicken So what's the version with 10x improvement? 01:11
samcv concatening strings
brokenchicken -_-
samcv just strings
brokenchicken forget it
samcv you talking to me timotimo ? yeah i am
timotimo no i meant brokenchicken
samcv ah ok
timotimo with the camelia eval 01:12
brokenchicken samcv: we have a special case for [+]; try sticking the [~] in there: github.com/rakudo/rakudo/blob/7f97...ps.pm#L180 01:16
timotimo on a related note, this is one of the coolest hacks involving .join that i know: 01:20
m: say <[ ]>.join("this goes in the middle")
camelia rakudo-moar 7f9703: OUTPUT«[this goes in the middle]␤»
timotimo anyway, i'm really hoping to get good sleep tonight 01:22
seeya!
lizmat Files=1163, Tests=56128, 188 wallclock secs (11.06 usr 4.49 sys + 1123.74 cusr 116.58 csys = 1255.87 CPU) 06:54
raiph hi lizmat 07:02
.ask lizmat cf stackoverflow.com/questions/4166835...6_41670048 Do you recall the downsides of the original rule that an `@` sigil or explicit `.cache` indicates caching of a lazy list/sequence and a `my \foo...` or `my $foo` indicates no caching? (Am I imagining it used t 07:04
yoleaux2 raiph: I'll pass your message to lizmat.
raiph o be that way?)
lizmat hmmm...
yoleaux2 07:04Z <raiph> lizmat: cf stackoverflow.com/questions/4166835...6_41670048 Do you recall the downsides of the original rule that an `@` sigil or explicit `.cache` indicates caching of a lazy list/sequence and a `my \foo...` or `my $foo` indicates no caching? (Am I imagining it used t
lizmat may not be quite awake yet :-) 07:05
raiph i'm just about asleep, so I guess we're even :)
(2am here) 07:06
lizmat hmmm... first time I see a .skip-at-least-pull-one in the wild :-) 07:07
raiph: I think without the caching, we would see many more X::Seq::Consumed errors 07:08
in the core specifically
situations like : if @a { say @a } 07:09
does that make sense to you ?
samcv nice lizmat 07:10
that seems cool. the skip-at-least-pull-one. even though it is super long
lizmat yeah, you should know what you're doing if you're using that one :-) 07:11
raiph lizmat: I thought the `@` in `@a` implied caching
samcv you have made iterator faster right lizmat ?
have you tested iterating over like 300,000 things? 07:12
raiph lizmat: so I don't understand why `if @a { @a }` would cause a problem
lizmat raiph: yes, it does, but we also tried to not make it cache during the GLR
samcv seems to spend a lot of time in the iterator but not sure if the profiler is just telling me it's happening inside the iterator or if the iterator itself is using a lot of cpu
lizmat and then things like: if @a { say @a } would break
samcv let me check the last profile i made
lizmat samcv: I haven't touched the Iterator role for a while now 07:13
samcv ah
github.com/rakudo/rakudo/commit/f7...aee4bdc58b ok just roundrobin then?
lizmat samcv: yea
expecting to push R:It.CrossIterables in the next few hours 07:14
samcv this is a new method? 07:15
returns a list of shared items?
atm i iterate over all codpoints and then inside that loop iterate over all the things in the enum hash or the boolean value hash for unicode database
takes a while 07:16
it's probably normal for it to tell me it spent lots of time in sink of src/core/Seq.pm right? 07:17
when iterating over things
then under that it says <anon> in any-iterable-methods.pm 07:18
raiph lizmat: thanks for answers
goodnight #perl6
samcv night raiph
maybe it will be faster If I make one iterable and iterate through the same one? instead of calling `%code-to-prop.keys.sort(+*)` inside of the block where i iterate per codepoint 07:23
lizmat night raiph 07:25
well, there's still an issue in Any-iterable-methods that for some reason needs a block inside some nqp code 07:26
at least it did in the past, perhaps I should revisit that :-)
samcv iterables get consumed though right? 07:27
lizmat not necessarily 07:28
an Iterable is a class that provides an .iterator method
samcv ok so probably would be fastest to call sort, and then save that sequence?
lizmat an Array is also an Iterable 07:29
samcv instead of for every port calling .sort(+*) on the property names?
lizmat but it could be completely reified, and thus not "consume" anything
samcv or does it magically optimize it
lizmat no magic yet, I'm afraid
do you have a gist ?
samcv sec
gist.github.com/744caecc3a10f6d660...7dc9b9354b
gist.github.com/samcv/744caecc3a10...en-p6-L447 see here 07:30
[Tux] This is Rakudo version 2016.12-337-g7f970357b built on MoarVM version 2016.12-115-ged2df9ac
csv-ip5xs 2.800
test 12.484
test-t 5.081
csv-parser 13.955
samcv this part is the slowest part I think
and for some reason if I don't put quietly it warns me about Any used in a string context… 07:31
i have no clue what that's about. because if i uncomment the "say $point" below it, it always prints out a value
and it shows that warning even if i I don't sort by number and just do string sorting 07:32
wow ok it took 26 minutes to run the whole script ;P 07:33
lizmat well, I see that the inner loop is sorting %code-to-prop.keys.sort(+*) over and over again
perhaps you should take that out of the loop and do it once ?
samcv yeah
that's what I was thinking
lizmat, how do i construct a nqp array? 07:49
when coding in perl 6
oh maybe it's just failing for nqp::bootintarray. nqp::array seems to allow me to assign it to a variable 07:50
timotimo nqp::bootintarray gives you the type for a bootint array 07:51
you then need to create it
samcv ah ok
timotimo nqp::list and friends create it for you
nqp::list_i will also give you a bootintarray, i believe 07:52
lizmat indeed
timotimo but it'll create it for you, and i think it also lets you directly put stuff into the argument list
samcv Type check failed in binding; expected Positional but got List ($())
that's what i get when i try nqp::list. that was the first thing I tried
maybe because i assigned it to an @array?
timotimo right, you have to type your variable Mu, and most likely use a $ sigil 07:54
samcv ah ok
m: use nqp; my $array := nqp::list_i; nqp::push_i($array, 2).say 07:55
camelia rakudo-moar 7f9703: OUTPUT«2␤»
samcv that seems to work
m: use nqp; my $array := nqp::list_i; nqp::push_i($array, 2); say nqp::elems($array)
camelia rakudo-moar 7f9703: OUTPUT«1␤»
samcv ok cool
timotimo m: use nqp; my $array := nqp::list_i(2); .say for @$array 07:56
camelia rakudo-moar 7f9703: OUTPUT«Cannot find method 'cache': no method cache and no .^find_method␤ in block <unit> at <tmp> line 1␤␤»
timotimo m: use nqp; my $array := nqp::list_i(2); .say for $array
camelia rakudo-moar 7f9703: OUTPUT«Cannot find method 'map': no method cache and no .^find_method␤ in block <unit> at <tmp> line 1␤␤»
timotimo m: use nqp; my $array := nqp::list_i(2); $array[$_].say for ^$array.elems
camelia rakudo-moar 7f9703: OUTPUT«Cannot find method 'elems': no method cache and no .^find_method␤ in block <unit> at <tmp> line 1␤␤»
timotimo m: use nqp; my $array := nqp::list_i(2); $array[$_].say for ^nqp::elems($array)
camelia rakudo-moar 7f9703: OUTPUT«X::Multi::NoMatch exception produced no message␤ in block <unit> at <tmp> line 1␤␤»
timotimo m: use nqp; my $array := nqp::list_i(2); nqp::atpos($array, $_).say for ^nqp::elems($array)
camelia rakudo-moar 7f9703: OUTPUT«MVMArray: atpos expected int register␤ in block <unit> at <tmp> line 1␤␤»
samcv what's the NoMatch, it can't match the type?
timotimo m: use nqp; my $array := nqp::list_i(2); say nqp::atpos($array, $_) for ^nqp::elems($array)
camelia rakudo-moar 7f9703: OUTPUT«MVMArray: atpos expected int register␤ in block <unit> at <tmp> line 1␤␤»
timotimo m: use nqp; my $array := nqp::list_i(2); say (my int $a = nqp::atpos($array, $_)) for ^nqp::elems($array) 07:57
camelia rakudo-moar 7f9703: OUTPUT«MVMArray: atpos expected int register␤ in block <unit> at <tmp> line 1␤␤»
timotimo m: use nqp; my $array := nqp::list_i(2); say (my int $a = nqp::atpos($array, $_.Int)) for ^nqp::elems($array)
camelia rakudo-moar 7f9703: OUTPUT«MVMArray: atpos expected int register␤ in block <unit> at <tmp> line 1␤␤»
timotimo :\
probably from not being able to call postcircumfix:<[ ]> on a not-even-derived-from-Mu
samcv ah
lizmat list_i is problematic like that :-( 07:58
timotimo oh!
m: use nqp; my $array := nqp::list_i(2); say nqp::atpos_i($array, $_) for ^nqp::elems($array) 07:59
camelia rakudo-moar 7f9703: OUTPUT«2␤»
samcv m: use nqp; my $array := nqp::list_i; nqp::push_i($array, 2); nqp::join(' ',$array)
camelia rakudo-moar 7f9703: OUTPUT«MVMArray: atpos expected int register␤ in block <unit> at <tmp> line 1␤␤»
samcv how can i join an int array?
timotimo i forgot that you have to _i
samcv ah
timotimo you can't, you'll have to manually stringify the parts
samcv ok
timotimo you can join a string array, i believe. but string arrays are hardly more efficient than regular object arrays
samcv i'll just make a list_s then 08:00
ah
in that case i'll just make one huge array and then do it all at once or something
timotimo may i ask what you're doing? porting the unicode generator to perl6? or tests or something? 08:03
samcv the unicode generator
timotimo cool 08:04
samcv making the bitfield rows and making the point index are the two slowest parts of the code
and easy enough to write in nqp if i can figure out how to do it :P
lizmat nqp::join on a list_s is *much* faster than a HLL Str.join 08:06
samcv is there a nqp op for variable assignment, or just use := in perl 6 code? 08:13
timotimo you're better off using :=, i believe 08:14
i wonder if someone wants to give moarvm an appveyor config at some point 08:16
samcv well that was much faster 08:17
that would be nice
timotimo oh?
samcv nqp::while($iter,
$string := nqp::concat(nqp::concat($string, nqp::base_I(nqp::shift($iter), 10)), ',')
);
timotimo you're lucky that we have ropes 08:18
otherwise concatenating strings over and over like that would get you in performance trouble
lizmat samcv: in my experience, nqp::push_s to a list_s, and then nqp::join is generally faster 08:19
samcv ok I will do that
simpler too
lizmat but please benchmark: don't take my word for it :-)
samcv well. though
I have to uhm split every such length though 08:20
to fit it onto lines
timotimo you could do it after the join :P
(well, then you'd have to find the location of spaces and such)
samcv well of commas but yeah 08:21
Geth kudo/nom: 1842af41c0 | (Elizabeth Mattijsen)++ | src/core/Rakudo/Iterator.pm
Introducing R:It.CrossIterables(|Map|Op)

The future workhorse of Xop
08:31
kudo/nom: 8a3ff7b64b | (Elizabeth Mattijsen)++ | src/core/List.pm
Make X and cross(...,:with) about 5x faster

By using the new R:It.CrossIterables logic. Still looking at the METAOP_CROSS handling.
08:42
lizmat hmmm... getting segfaults :-( 08:55
timotimo what, by using your iterables? :o
lizmat yeah :-( 08:56
in METAOP_CROSS
gist.github.com/lizmat/815429b57a3...626e7f3c8f # diff
$ 6 'dd "000" ... "077"' 08:57
Segmentation fault: 11
timotimo i'll have a look
lizmat not sure how *that* relates to Xop, but there you go :(
timotimo ugh 08:58
lizmat ... does wind up in METAOP_CROSS 09:05
timotimo could be it splits that up into 0..0 and 0..7 and Xes that? 09:06
lizmat could be
timotimo how did we put an object with a null STable pointer into the multi cache? 09:07
lizmat is unsure :-)
timotimo hold on
lizmat I don''t think I added any multis in the last few commits 09:08
hmmm... it *is* using the new code
timotimo i think i confused the arg array with the multi cache contents
timotimo turns optimize off in the hopes of getting sane stuff in gdb 09:12
so ... we're somehow calling some function with a nulled out register
and trying to find a node for it in the cache we accidentally deref to get its STable
from SETTING::src/core/Rakudo/Iterator.pm:855 (/home/timo/perl6/install/share/perl6/runtime/CORE.setting.moarvm:pull-one) 09:13
well, it probably shouldn't segfault if you manage to do that, so i'll put in a null check 09:15
but can you figure out what call passes a null in the first argument?
lizmat that's the pull-one, it's not supposed to take an argument apart from the iterator object
so that would imply the iterator object got nulled ? 09:16
timotimo no, there's one more call frame on the stack 09:17
so it's something the pull-one calls that asplodes
at <unknown>:1 (/home/timo/perl6/install/share/perl6/runtime/CORE.setting.moarvm:)
^- really not very helpufl
lizmat hmmm.... that *could* be the mapper 09:18
timotimo sprinkle some debug says ;)
lizmat yeah, doing that now :-)
timotimo huh 09:26
now it's exploding because a null made it into the argument of getcodeobj
lizmat timotimo: it's definitely the mapper call: the first time it's ok, the second it isn't
guess I found a source of chaos :-) 09:27
timotimo at <unknown>:1 (/home/timo/perl6/install/share/perl6/runtime/CORE.setting.moarvm:outer)
from SETTING::src/core/Backtrace.pm:222 (/home/timo/perl6/install/share/perl6/runtime/CORE.setting.moarvm:)
from SETTING::src/core/Backtrace.pm:240 (/home/timo/perl6/install/share/perl6/runtime/CORE.setting.moarvm:outer-caller-idx)
<Internal error while creating backtrace: getcodeobj needs a code ref in method outer at SETTING::src/core/Code.pm line 26 09:28
in block at SETTING::src/core/Backtrace.pm line 222
in method outer-caller-idx at SETTING::src/core/Backtrace.pm line 240
what fun!
lizmat - (my $result := $!mapper($!next)), 09:29
+ (my $result := $!mapper(nqp::clone($!next))),
that fixes it
I guess I cannot depend on the op not destroying the IterationBuffer
running full spectest now 09:30
timotimo oh no, clones :\
also ... congrats on getting a null frame into the call stack somehow
hum. the error i now get is MVMArray cannot shift from empty array 09:31
(that's before the "internal error" line above)
Geth kudo/nom: 2e80df0467 | (Elizabeth Mattijsen)++ | src/core/Rakudo/Iterator.pm
Prevent segfault on "000" ... "077"

This apparently uses X~ underneath, and that caused a segfault if the result buffer wasn't cloned before applying the op.
09:38
samcv how do I get the name of a variable? my $var; say $var.name #> var
lizmat m: my $a = 42; say $a.VAR.name 09:39
camelia rakudo-moar 8a3ff7: OUTPUT«$a␤»
samcv nice 09:40
m: my @a; my $var2 = 10; @a.push($var2); for @a { .VAR.name.say } 09:43
camelia rakudo-moar 8a3ff7: OUTPUT«@a␤»
samcv it loses its name when it gets added to args right
any way for a sub to know the name of the variables it's passed?
using slurpy *@args 09:44
timotimo hm, you can try "is raw" on it
lizmat m: $ 6 'sub a(*@a is raw) { dd @a[0].VAR.name }; a(my $b = 42) # yup, TIL :-) 09:45
camelia rakudo-moar 8a3ff7: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3$7⏏5 6 'sub a(*@a is raw) { dd @a[0].VAR.nam␤ expecting any of:␤ infix␤ infix stopper␤ statement end␤ statement modif…»
lizmat m: sub a(*@a is raw) { dd @a[0].VAR.name }; a(my $b = 42) # yup, TIL :-)
camelia rakudo-moar 8a3ff7: OUTPUT«"\$b"␤»
samcv nice.
Geth kudo/nom: a26f51361b | (Elizabeth Mattijsen)++ | src/core/metaops.pm
Make Xop about 7x faster

Except for the Xand family, which is still using the old code.
09:47
timotimo what is Xand? 09:49
moritz m: say (0, 1) Xand (3,4 9 09:50
camelia rakudo-moar 8a3ff7: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3say (0, 1) Xand (3,47⏏5 9␤ expecting any of:␤ infix␤ infix stopper␤ statement end␤ statement modifier␤ state…»
moritz m: say (0, 1) Xand (3,4)
camelia rakudo-moar 8a3ff7: OUTPUT«(0 0 3 4)␤»
moritz X meta op at work
samcv I can reduce compilation time by putting things in a module right? and if the code in the module doesn't change, compiling a long program will be faster
timotimo yeah, usually 09:51
lizmat m: dd (0,1) Xand (1,0)
camelia rakudo-moar a26f51: OUTPUT«(0, 0, 1, 0).Seq␤»
timotimo i'm not sure why that's a special case, but okay :) 09:52
7x faster is pretty fantastic
lizmat m: my $a = 0; dd ((0,1) Xand ($a++,$a++); say $a 09:53
camelia rakudo-moar a26f51: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in parenthesized expression; couldn't find final ')' ␤at <tmp>:1␤------> 3 = 0; dd ((0,1) Xand ($a++,$a++); say $a7⏏5<EOL>␤ expecting any of:␤ postfix␤ …»
lizmat m: my $a = 0; dd (0,1) Xand ($a++,$a++); say $a
camelia rakudo-moar a26f51: OUTPUT«(0, 0, 0, 1).Seq␤2␤»
lizmat hmmm
yeah, not 4 09:54
the short-circuiting is what makes them special
timotimo ah, that makes sense
so they have an additional level of closure there? 09:55
timotimo BBL
lizmat timotimo: I'm not grokking that part quite yet, TBH
samcv nqp::base_I($i, 10) is how to go from int to str base 10 right? or is there one only for base 10? 10:08
or is that it
lizmat github.com/perl6/nqp/blob/master/d...s.markdown says: 10:09
base_I(Int $i, int $radix)
Returns a string representing the integer $i in base $radix
samcv well I know it works
just wondering if there was one that just assumed it was base 10
lizmat doesn't appear to be one
samcv kk 10:10
also do integer operands to nqp ops have to unbox every time?
or no
if i run the same thing a bajillion times
jnthn Integer ops or big integer ops? 10:11
arnsholt You can unbox them by binding them to a natively typed thing
jnthn Int is always a boxed type; there's no unboxing/boxing since there's no native bigint
samcv it's just the number 10 in the source file
kk arnsholt that's what i had tried. but wasn't sure if it automatically did it only once 10:12
jnthn Ah, you're asking if the 10 to nqp::base_I(...) will generate unbox code every time?
samcv i was doing my $i := unbox_i(10) or whatever
yeah that jnthn
arnsholt I don't think that should be necessary 10:13
jnthn Pretty sure we'll code-gen it directly as a native int
samcv ok good
jnthn my $i := nqp::unbox_i(10); is pointless fwiw
Since binding to an untyped Scalar will force boxing of it again
Geth kudo/nom: babfc3ced5 | (Elizabeth Mattijsen)++ | src/core/Rakudo/Metaops.pm
Make error message on 1 Xcmp 2 Xcmp 3 a bit clearer
10:14
samcv oh 10:15
you can't bind to a typed value though
is there a base_i? i don't see one 10:16
so I have to box it before calling base_I?
Geth ast: 0634c5aa5e | (Elizabeth Mattijsen)++ | S03-metaops/cross.t
Unfudge now passing test

Still not sure what the stance is on being more specific on the error being thrown. So not specifying error just yet.
10:18
lizmat m: dd <1 2> Xcmp <1 2> Xcmp <1 2> 10:19
camelia rakudo-moar a26f51: OUTPUT«Incorrect number of elements: expected 2, got 3␤ in block <unit> at <tmp> line 1␤␤»
lizmat this *should* probably be caught at compile time
samcv idk why this isn't working. P6opaque: get_boxed_ref could not unbox for the representation '20' of type scalar
what does that mean? do i have to unbox a scalar or something? in Perl 6 it's just an Int
lizmat try nqp::unbox_i() ? 10:21
samcv screw it. just gonna have this hash have string values 10:22
not int's
that did work tho lizmat
maybe Ops.markdown is wrong saying it takes in Int? idk 10:23
or an Int in nqp not an Int in p6?
jnthn Natively keyed hashes are not implemented yet. 10:24
So it'll always box to Int on storage
samcv that's not what I meant
it has values that are Int's atm
not keys
the keys are strings
jnthn Natively valued ones aren't either
samcv but in nqp? 10:25
timotimo samcv: to make that unbox work you need to nqp::decont 10:26
samcv ah ok
jnthn No, no native hashes anywhere yet. 10:30
samcv well i mean whatever it is still a string
not an object
lizmat gist.github.com/lizmat/b9da3fbcf0c...9f4b554bed # seemed like a straightforward improvement, but this breaks tests. Huh? 10:33
Geth ast: flexibeast++ created pull request #222:
uniprop: add tests for 5 more properties
10:35
jnthn m: dd List.reduce(&[+])
camelia rakudo-moar babfc3: OUTPUT«Nil␤»
jnthn Not sure. 10:36
lizmat rakudobug it ?
fwiw, specifying "is nodal" with the candidates didn't fix it either 10:37
samcv in a nqp hash how do I set a keys value? 10:38
to some string
jnthn nqp::bindkey
samcv no bindkey_s?
or is that what you meant by NYI 10:39
timotimo keys in nqp hashes are always str
jnthn < jnthn> No, no native hashes anywhere yet.
samcv yes i saw that
exactly timotimo that's what i wanted to do
ok so the just bindkey then. will do that
timotimo i forgot how we implement object hashes :P
jnthn Massive cheating :)
timotimo something involving nqp::objid
or some other name
samcv cheating is ok
timotimo which generates a unique never-changing ID for an object 10:40
jnthn timotimo: That's how we get a WHICH for referene types
*reference
timotimo (though not guaranteed to be free forever once the object in question dies)
jnthn Object hashes use that
timotimo (i.e. can be re-used)
jnthn It can be, but if that happens the object wasn't in a hash any more ;)
I suspect we'll implement object hash stuff at Perl 6 level, and revisit ObjAt along the way, fwiw. 10:41
Geth ast: bbab08a343 | Alexis++ | S15-unicode-information/uniprop.t
uniprop: add tests for 5 more properties

Diacritic, Default_Ignorable_Code_Point, ID_Start, IDS_Binary_Operator, IDS_Trinary_Operator
10:42
ast: 71aafc1b46 | (Samantha McVey)++ | S15-unicode-information/uniprop.t
Merge pull request #222 from flexibeast/master

uniprop: add tests for 5 more properties
lizmat jnthn: object hash stuff is already at Perl6 level, no ?
jnthn lizmat: Sorta, but still uses nqp::hash and friends underneath 10:44
lizmat ah, yes, it does :-)
so you're suggesting a new type of nqp::hash ?
jnthn Which forces us to do nasty things, like form fragile ObjAt strings which seem to be an everlasting source of bugs.
No, we'd just implement it using nqp::list for the actual storage 10:45
jnthn will have to make a sketch of this in this copious available time. ;-) 10:46
lizmat hehe
timotimo ah, we'll expose our string hashing via a nqp op and implement our own bucketing/linkedlist stuff
jnthn timotimo: Yeah, I think something like that.
timotimo: But probably no linked list. 10:47
timotimo yeah, linked lists are boo
jnthn Or at least, if we do, only on collisions.
And then not linked even :)
timotimo unhinged lists
samcv MoarVM panic: Memory allocation failed; could not allocate 18446744073709551612 bytes 10:48
hah
jnthn o.O
timotimo oh yeah
m: say 18446744073709551612.base(16)
camelia rakudo-moar babfc3: OUTPUT«FFFFFFFFFFFFFFFC␤»
samcv that happening when trying to bintd a key
why would
maybe will try and unbox more things 10:49
timotimo i wonder if some sort of endless recursion happens or something?
can you set a gdb break point in MVM_panic and see what's on the plate^Wstack?
samcv yeah. 10:50
timotimo i'll be AFK for a while
samcv seems to be in MVM_bigint_to_str 10:55
gist.github.com/samcv/3c1403b941b1...3745d2ac89 here is the bt 10:56
timotimo base 0? 11:27
that'll give you Inf :)
m: use nqp; nqp::radix("123", 0) 11:28
camelia rakudo-moar babfc3: OUTPUT«===SORRY!===␤Arg count 2 doesn't equal required operand count 5 for op 'radix'␤»
timotimo what op is it again ...
m: use nqp; nqp::base_I("123", 0)
camelia rakudo-moar babfc3: OUTPUT«P6opaque: get_boxed_ref could not unbox for the representation '20' of type Str␤ in block <unit> at <tmp> line 1␤␤»
timotimo m: use nqp; nqp::base_I(nqp::decont("123"), 0)
camelia rakudo-moar babfc3: OUTPUT«P6opaque: get_boxed_ref could not unbox for the representation '20' of type Str␤ in block <unit> at <tmp> line 1␤␤»
timotimo m: use nqp; nqp::base_I(nqp::unbox_s("123"), 0) 11:29
camelia rakudo-moar babfc3: OUTPUT«P6opaque: get_boxed_ref could not unbox for the representation '20' of type Str␤ in block <unit> at <tmp> line 1␤␤»
timotimo m: use nqp; nqp::base_I(nqp::unbox_s(nqp::decont("123")), 0)
camelia rakudo-moar babfc3: OUTPUT«P6opaque: get_boxed_ref could not unbox for the representation '20' of type Str␤ in block <unit> at <tmp> line 1␤␤»
timotimo
nqp: nqp::base_I("123", 0) 11:30
camelia nqp-moarvm: OUTPUT«This representation (P6str) cannot unbox to other types (for type BOOTStr)␤ at <tmp>:1 (<ephemeral file>:<mainline>)␤ from gen/moar/stage2/NQPHLL.nqp:1582 (/home/camelia/rakudo-m-inst-1/share/nqp/lib/NQPHLL.moarvm:eval)␤ from gen/moar/stage2/NQPHLL.nqp:1…»
timotimo nqp: nqp::base_I(nqp::unbox_s("123"), 0)
camelia nqp-moarvm: OUTPUT«This representation (P6str) cannot unbox to other types (for type BOOTStr)␤ at <tmp>:1 (<ephemeral file>:<mainline>)␤ from gen/moar/stage2/NQPHLL.nqp:1582 (/home/camelia/rakudo-m-inst-1/share/nqp/lib/NQPHLL.moarvm:eval)␤ from gen/moar/stage2/NQPHLL.nqp:1…»
timotimo jesus christ.
jnthn Don't you need a bigint there? 11:31
timotimo oh, maybe i do? 11:38
nqp: nqp::base_I(123, 0) 11:39
camelia nqp-moarvm: OUTPUT«This representation (P6int) cannot unbox to other types (for type BOOTInt)␤ at <tmp>:1 (<ephemeral file>:<mainline>)␤ from gen/moar/stage2/NQPHLL.nqp:1582 (/home/camelia/rakudo-m-inst-1/share/nqp/lib/NQPHLL.moarvm:eval)␤ from gen/moar/stage2/NQPHLL.nqp:1…»
samcv oh i checked looks like it was my mistake. but it was 10 in one of the correct spots but not the other one :P 11:53
m: use nqp; nqp::base_I(nqp::decont('10'), 0)
camelia rakudo-moar babfc3: OUTPUT«P6opaque: get_boxed_ref could not unbox for the representation '20' of type Str␤ in block <unit> at <tmp> line 1␤␤»
samcv weird 11:54
timotimo anyway, yeah, base of 0 will get you an explosion and we should probably just straight up die when we see a 0 as base 11:59
samcv yea 12:00
lizmat m: dd (1..* X* 1..*)[^3] 12:21
camelia rakudo-moar babfc3: OUTPUT«(1, 2, 3)␤»
lizmat $ 6 '(1..* X* 1..*)[^3]'
Can only have one lazy sequence in a cross
this breaks one spectest 12:22
I think having 2 lazy lists in a X doesn't make sense, as the second will hide the first except the first value
samcv does anybody see what i'm doing wrong here in this nqp section? gist.github.com/samcv/2584c8777142...en-p6-L374 12:44
This representation (NativeRef) cannot unbox to other types (for type IntLexRef) 12:45
in sub make-point-index at ./UCD-gen.p6 line 374
jnthn Probably it wants an nqp::decont_i somewhere 12:59
fwiw, nqp::add_i may as well be written with + 13:00
The static inliner should already be catching those cases
samcv jnthn, any clue where? it only started throwing that error when I changed from a for 0..$point-max to nqp::repeat_until 13:07
jnthn samcv: Somehwere where you used a native with an nqp:: op 13:23
samcv kk
jnthn just had quite a bug hunt because it seems Digest::SHA1::Native ends up modifying the Buf you give it to SHA-1 somehow :S 13:26
samcv :| 13:27
Geth ast: 12f6ef1e24 | (Elizabeth Mattijsen)++ | S15-unicode-information/uniprop.t
Make file compile and correct number of tests
14:08
kudo/nom: d4a5b695ea | (Elizabeth Mattijsen)++ | src/core/Rakudo/Iterator.pm
Make 1 X foo about 20% faster

The "1" case was being treated as an iterator rather than a constant. Making it act as a single element reified list makes things significantly faster :-)
14:15
samcv i'm going to bed very soon all 14:21
lizmat samcv: at 4:25am in the morning, that sounds like an excellent plan :-) 14:24
samcv it's 6:24 am ;)
lizmat oops
yes
duh
samcv close tho
lizmat it's already 15:24 here, not 13:24 :)
Geth kudo/nom: d3035a8359 | (Pawel Murias)++ | 3 files
Remove an obsolete nqp::p6captureouters op.
14:26
kudo/nom: 2a7c27aa2f | (Elizabeth Mattijsen)++ | src/core/Rakudo/Iterator.pm
Make X die on various forms of lazy sequences

  - 1,2 X 1..* now dies with:
   "Can only have single element lists before a lazy sequence in a cross"
   The reason for this is that the "2" of the first list will never be
   reached, and thus indicates a thinko of the developer.
... (13 more lines)
14:37
lizmat jnthn TimToady comments?
RT #112602 14:42
ah, no synopsebot
rt.perl.org//Public/Bug/Display.html?id=112602 14:43
Geth ast: 4fd31a1643 | (Elizabeth Mattijsen)++ | S03-metaops/cross.t
Adapt test so it doesn't die

Related ticket: rt.perl.org//Public/Bug/Display.html?id=112602 Related commit: github.com/rakudo/rakudo/commit/2a7c27aa2f
14:46
ast/6.c-errata: f425c24cf8 | (Elizabeth Mattijsen)++ | S03-metaops/cross.t
Adapt test so it doesn't die

Related ticket: rt.perl.org//Public/Bug/Display.html?id=112602 Related commit: github.com/rakudo/rakudo/commit/2a7c27aa2f
14:52
MasterDuke lizmat: your recent change to S15-unicode-information/uniprop.t, doesn't it have an extra ' (single quote) at the beginning? github.com/perl6/roast/blob/12f6ef...rop.t#L167 15:07
lizmat hmmm... that's weird 15:08
samcv no it was a PR I merged
and i'm pretty sure it's correct
unless it doesn't compile
lizmat it didn't compile, it does compile now 15:09
samcv oh
lizmat .u '̴
yoleaux2 U+0027 APOSTROPHE [Po] (')
U+0334 COMBINING TILDE OVERLAY [Mn] (◌̴)
samcv anyway i am asleep now
night 15:10
lizmat if I remove the first quote, it doesn't compile
good night, samcv, sleep tight!
MasterDuke ah, i guess because of the combining. my browser must not show it correctly on the github page 15:11
lizmat something is getting confused somewhere, that much is clear :-) 15:12
MasterDuke it definitely looks different in vim
moritz have you folks seen www.craftinginterpreters.com/contents.html ? 15:28
not looked at it in detail yet, but might be an interesting resource 15:29
pmurias jnthn: re avoiding duplication of magical variable, can the variables have traits placed on them outside of them being declared? 16:16
jnthn pmurias: Technically, but I think in that case it's a "tough luck" situation :)
pmurias: I mean, you can in theory obtain the thing and stick a trait on it at any point you want by calling trait_mod:<is> manually 16:17
But that probably falls under "if you do it, you get to keep all the pieces when it breaks"
pmurias jnthn: If the users grabs the variable using VAR it should be cloned anyway. Also I'm doing the optimalization for variables that already share the container descriptors. 16:29
Geth pan style="color: #d55e83">geth: f53e2016d6 | (Zoffix Znet)++ | lib/Geth/GitHub/Hooks/Preprocessor.pm6
Refactor version bump fetching into separate method
16:39
lizmat dinner& 16:55
Geth pan style="color: #d55e83">geth: dd458f0dfa | (Zoffix Znet)++ | 2 files
Implement on-demand version bump changes fetcher

  - Adds triggered command `ver GITHUB_URL_TO_VERSION_BUMP_COMMIT`
  - Useful for release managers
17:02
brokenchicken Geth: ver github.com/rakudo/rakudo/commit/64...51885e12f5 17:03
Geth brokenchicken, version bump brought in these changes: github.com/perl6/nqp/compare/2016....-g10fa8082
brokenchicken Geth: ver github.com/perl6/nqp/commit/1d4f071453
Geth brokenchicken, version bump brought in these changes: github.com/MoarVM/MoarVM/compare/2...3-gd1da1ba
brokenchicken .botsnack
yoleaux2 :D
synopsebot6 om nom nom
b2gills lizmat: since you just worked with infix:<X> 17:23
m: say Bool.pick Xxx 20 # doesn't thunk left side
camelia rakudo-moar 2a7c27: OUTPUT«((True True True True True True True True True True True True True True True True True True True True))␤»
b2gills m: say (Bool.pick,) Xxx 20 # does thunk left side
camelia rakudo-moar 2a7c27: OUTPUT«((False False True True False True True True False True True False False True False True True True True False))␤»
b2gills ( It was broken before today, so you didn't make it worse ) 17:24
lizmat star: say Bool.pick Xxx 20 18:12
camelia star-m 2016.10: OUTPUT«((True True True True True True True True True True True True True True True True True True True True))␤»
lizmat b2gills: suggest making a ticket :-) 18:19
pmurias I should use 'make spectest' to check if my optimalization didn't break anything? 18:35
lizmat doing a "make spectest" is always a good thing 18:36
lizmat runs at least one just before committing
$ 6 'my @a = ^50; for @a.skip(40) { print "$_ " }' 18:38
40 41 42 43 44 45 46 47 48 49
does that make sense ^^^
brokenchicken didn't even know we had such a method 18:41
lizmat brokenchicken: we don't
brokenchicken Ah
lizmat but it's about 6 lines of code
so I'm very tempted to add it :-)
inspired by one of the comments on stackoverflow.com/questions/4166835...-in-perl-6 18:43
brokenchicken What happens with my @a = ^50; my $z = @a.skip(40); for @a { print "$_ " }; for $z { print " 18:44
$_" }
I guess I'm not really following what .skip() returns 18:45
lizmat in Seq.pm: method skip(Int() $n) { $!iter.skip-at-least($n); self } 18:46
in Any.pm: method skip(Int() $n) { Seq.new(self.iterator).skip($n) }
.skip returns a Seq, and the same .Seq when called on a .Seq 18:47
brokenchicken Ah 18:49
pmurias lizmat: so @a.skip($n) would be @a[$n..*] but lazy?
lizmat the skip would not be lazy, but the rest would be, yes 18:50
when called on a Seq, it just eats away at its iterator without caching 18:51
perlpilot lizmat: I like .skip() fwiw. 18:55
lizmat $ 6 'dd "words".IO.lines.skip(235880)' 18:56
("Zyryan", "zythem", "Zythia", "zythum", "Zyzomys", "Zyzzogeton").Seq
perlpilot Though it does make me think that we may need more docs on laziness wrt caching vs. non-caching
lizmat $ 6 'dd "words".IO.lines.skip(235880).head(3)' 18:58
("Zyryan", "zythem", "Zythia").Seq
:-)
brokenchicken :D 18:59
Geth kudo/nom: f67df8ad9d | (Pawel Murias)++ | src/Perl6/World.nqp
Reuse the containers that magic variables containers are cloned off.
19:35
lizmat pmurias: any idea on savings ? ^^^ 19:44
pmurias haven't measure that, should be bigger on the jvm and js backends as moar does some $_ removal they don't do 19:47
lizmat oki :-) 19:50
pmurias lizmat: it saved 19735 serialized objects on the js backend, I'm not sure how to count the number of serialized objects on the moarvm one 20:50
lizmat how much is that in % ? 20:51
samcv hellp 20:52
*hello 20:53
lizmat morning!
pmurias lizmat: it's ~54% of the objects used directly by QAST::WVal 20:58
lizmat pmurias: cool!
and another Perl6 Weekly hits the Net: p6weekly.wordpress.com/2017/01/16/...turing-ok/ 21:23
timotimo can't click that link :< 21:41
p6weekly.wordpress.com/2017/01/16/...turing-ok/
maybe?
crap, that's not a normal space
lizmat p6weekly.wordpress.com # also works this week 21:42
timotimo ah! it was an emoji!
lizmat yes
timotimo my terminal refused to let me copy that
on top of not displaying it
lizmat I felt evil trying to see what it will break :-)
Geth kudo/nom: 4386e77b39 | (Elizabeth Mattijsen)++ | src/core/Rakudo/Iterator.pm
Fix copy-pastoes
21:45
kudo: usev6++ created pull request #995:
[JVM] Add option --nqp-lib=blib to start script
21:52
kudo/nom: 4320fdc2fa | usev6++ | 2 files
[JVM] Add option --nqp-lib=blib to start script

  ... so that rakudo-j works without 'make install', again.
  nine++ for the suggestion.
21:54
kudo/nom: 3e373ffe26 | (Paweł Murias)++ | 2 files
Merge pull request #995 from usev6/jvm_build_blib

  [JVM] Add option --nqp-lib=blib to start script
kudo/nom: 9537ccd87a | (Elizabeth Mattijsen)++ | src/core/Rakudo/Iterator.pm
Revert "Make X die on various forms of lazy sequences"

This reverts commit 2a7c27aa2f4c7744912c1405fe5ed5ba45941d3d.
22:14
kudo/nom: 0cd921e351 | (Elizabeth Mattijsen)++ | src/core/Rakudo/Iterator.pm
Fix for RT #130566

Turned out the check for $!todo wasn't triggering for lazy Lists, so it was assumed it was an empty List. Which will never generate any values.
22:36
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=130566
MasterDuke is it ok that this ( github.com/perl6/nqp/blob/master/s...r.nqp#L553 ) uses nqp::lc() instead of nqp::fc()? 23:00
samcv lizmat, say "\c[woman gesturing OK] (woman gesturing OK)"; 23:20
idk why the parens are there?
m: say "\c[woman gesturing OK] (woman gesturing OK)";
camelia rakudo-moar 0cd921: OUTPUT«🙆‍♀️ (woman gesturing OK)␤»
samcv i guess that does output
seemed odd to me to put it inside the text. but i guess no worries
lizmat, maybe put it as a comment in the code block? 23:49