AlexDaniel heh, bubble sort 02:53
MasterDuke yeah, a merge sort was even faster, but large profiles are such memory hogs anyway i thought the in-place heap sort was a better choice 03:03
dalek p: bcf3fe7 | MasterDuke17++ | .gitignore:
Add bin/ to .gitignore

So it does not accidentally get committed
08:00
p: 93ea436 | niner++ | .gitignore:
Merge pull request #322 from MasterDuke17/gitignore_bin

Add bin/ to .gitignore
p: 316ee5b | MasterDuke17++ | src/vm/moar/HLL/Backend.nqp:
Use heap sort to sort the keys when creating JSON

The existing bubble sort could take over 8s one of the times it's called with over 4k keys when profiling a Rakudo build. That's reduced to about 0.1s with the heap sort. The usual case of <10 keys is not noticeably changed either way.
08:03
nqp: 6e63342 | niner++ | src/vm/moar/HLL/Backend.nqp:
nqp: Merge pull request #323 from MasterDuke17/better_key_sorting_for_json_in_profiles
nqp:
nqp: Use heap sort to sort the keys when creating JSON
timotimo MasterDuke: oh wow 08:11
masak heh, we had a bubble sort in there? :P 09:09
timotimo yeah, i was convinced the number of keys you'd encounter would always be around 10 09:10
masak that might still be completely true of the average case, yes 09:11
timotimo hm, why did i sort the keys in the first place?
gfldex lizmat: could you add the caterogy "2016" for the advent on wordpress please? It wont let me. 09:12
timotimo i think i can 09:14
yup, there it is
it seems like we had some trouble in the past with using tags where tags ended up with LOTS of words in them 09:15
here's a good one: 2012 Perl 5 Core Documentation I wrote perlootut from scratch and revised perlobj from the ground up for the Perl 5.16.0 release. I also made major edits to several other documents in the Perl core
ain't that a tag to behold?
DrForr I saw that in blogs.perl.org stuff as well.
timotimo oh dude 09:16
i added a 2016 tag, not category
DrForr Oh, I wasn't accusing.
timotimo now the category exists 09:17
i just updated a tag to split it into the tags it was meant to have; will that re-push it to aggregators and subscribers?
there's some tags i find amusing and cool 09:18
gfldex "Publishing of post failed." that aint nice
timotimo it looks almost as if someone wrote their whole post in the tag field instead of the content field 09:19
i.imgur.com/KanZTqC.png
DrForr gfldex: Is this the b.p.org beta? 09:20
gfldex think so
timotimo i think it's perl6advent.wordpress.com?
oh, ok!
some of those tags are actually totally cool
"a command line program" "or a daemon", why did it split that so perfectly? but the rest is jumbled together? 09:21
gfldex i can't publish or save a draft right now. If I happen to fall of a cliff before the problem is solved, here is my post: gist.github.com/gfldex/f5145c24e70...471aa8efcd 09:22
using the WP Admin worked. Post scheduled an ready for proofreading 09:29
psch the first paragraph has wonky line breaks here 09:34
gfldex will check (pasting html does that on WP) 09:35
psch also "there's a class for anything besides classes [...]. Metamodel::ClassHOW [...] is the class behind class" read a bit weird 09:36
+s
gfldex i know, but it is weird
psch i mean, it's self-contradictory 09:37
"there's no class behind this, except this class is behind it"
maybe link to some other blog post that explains the MOP a bit more, if we have one of those lying around somewhere 09:38
gfldex true, i need to think about how to tell the difference between a class defined with the class-declarator and a MOP one
timotimo there is hardly any
psch i mean
you define MOP classes with 'class' too, no?
gfldex conceptually there is a difference, the byte code may not agree 09:39
what i ment is that there is no class called Class
psch m: say Grammar; say Grammar.HOW 09:40
camelia rakudo-moar 054aca: OUTPUT«(Grammar)␤Perl6::Metamodel::ClassHOW.new␤»
psch that's also kinda a thing too 09:41
gfldex: you're definitely right that the distinction is hard to make. maybe coming from a purely practical angle works?
gfldex i just updated with tactical typesetting 09:42
psch gfldex: it also depends a lot on how much MOP you want to explain i suppose
gfldex i will leave to MOD-explaining to jnthn :->
psch oh, and i think "[...] ClassHOW, what is [...]" is bad english grammar? 09:43
feels like that should be 'which'
gfldex true
m: say Any.WHO, Any.new.WHO 11:10
camelia rakudo-moar 054aca: OUTPUT«AnyAny␤»
viki m: printf '%z'; CATCH { default { dd [.is-setting, .Str] given .backtrace[4] } } 11:56
camelia rakudo-moar 054aca: OUTPUT«[Bool::False, " in any at /home/camelia/rakudo-m-inst-2/share/perl6/runtime/CORE.setting.moarvm line 1\n"]␤»
viki .ask MasterDuke would you know how come this Backtrace::Frame doesn't get the seperate-core-file treatment and still has CORE.setting.moarvm in it instead of src/Backtrace or whatever? m: printf '%z'; CATCH { default { dd [.is-setting, .Str] given .backtrace[4] } } 11:57
yoleaux2 viki: I'll pass your message to MasterDuke.
dalek kudo/nom: 843a6be | peschwa++ | src/vm/jvm/runtime/org/perl6/rakudo/Binder.java:
Fix attributive binding not looking outward for self.

  jnthn++ for pointing out that this is a valid use case.
12:30
psch r: class A { has $.foo; method bar($baz) { with $baz -> $!foo { self } } }; A.new.bar("foo").foo.say # my test case for that
camelia rakudo-jvm 76b061: OUTPUT«Unable to bind attributive parameter '$!foo' - could not find self␤ in method bar at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
..rakudo-moar 054aca: OUTPUT«foo␤»
psch looks where to put that into roast... 12:31
hm, S12-methods/attribute-params.t i suppose 12:34
dalek ast: aa74436 | peschwa++ | S12-methods/attribute-params.t:
Add test for slightly unconventional attributive binding
12:40
kudo/nom: 35183f3 | (Zoffix Znet)++ | src/core/Cool.pm:
Fix sprintf($format) issuing spurious warnings

When no arguments are given, $!riefied of *@args ends up being a type object and we get warnings when we pass it to nqp::sprintf
  irclog.perlgeek.de/perl6/2016-11-28#i_13640361
13:20
ast: 23867b4 | (Zoffix Znet)++ | S32-str/sprintf.t:
Test sprintf($format) does not issue warnings

Fixed in commit:
  github.com/rakudo/rakudo/commit/35183f396e
13:21
kudo/nom: 3c4ac3c | (Zoffix Znet)++ | src/core/IO/Handle.pm:
Use &sprintf for IO::Handle.printf

instead of re-inventing the wheel
13:22
viki ZOFVM: Files=1204, Tests=130209, 142 wallclock secs (20.56 usr 3.18 sys + 2613.62 cusr 210.01 csys = 2847.37 CPU) 13:42
gfldex viki: could you have a look at docs.perl6.org/build-log/ please? Seams broken. 14:40
[Coke] why did we need to add bin to .gitignore on nqp? what's generating it? (I just did a build and install, and it's not there.) 15:09
timotimo maybe someone used --prefix=. or something?
dalek kudo/nom: 10ad853 | lizmat++ | src/core/ (2 files):
Add push|sink-all to R:I:ShapeLeafIterator

To speed up copying/initializing larger shaped arrays. Note that this addition needed a change in .kv, since it was messing with the indices. So no speed increase in that case.
15:13
kudo/nom: 437538e | lizmat++ | / (2 files):
Abstract native shape checking logic

  - it is independent of native type
  - we need it in more places
15:33
lizmat m: my Num $a = 42.13e1; my Str $b = $a; dd $b 15:44
camelia rakudo-moar 054aca: OUTPUT«Type check failed in assignment to $b; expected Str but got Num (421.3e0)␤ in block <unit> at <tmp> line 1␤␤»
lizmat m: my num $a = 42.13e1; my str $b = $a; dd $b # this doesn't seem consistent, jnthn TimToady ??
camelia rakudo-moar 054aca: OUTPUT«"421.3"␤»
jnthn Perhaps thanks to overly-helpful code-gen. 15:46
I'll bet it auto-coerces int <-> num too in such cases 15:47
lizmat jnthn: yes it does
so we agree this is a bug ?
jnthn Well, we tend to be good with natives auto-unboxing, but this is probably going a bit too far 15:48
I rather suspect NQP relies quite heavily on the code-gen in question, however 15:49
(They're actually inserted down at the QAST -> [MJ]AST level)
So tightening it up will take some thought.
lizmat m: my int @a = ^10; my num @b = @a
camelia rakudo-moar 054aca: OUTPUT«This type cannot unbox to a native number: P6opaque, Int␤ in block <unit> at <tmp> line 1␤␤»
lizmat m: my int @a = ^10; my int8 @b = @a 15:50
camelia ( no output )
jnthn That second case is likely fine
lizmat well, I just wanted to make sure that the behaviour was unexpected
jnthn Yup, just comes from our code-gen being quite eager to make things work out :) 15:51
lizmat m: my int @a[2;2] = (0,1),(2,3); my num @b[2;2] = @a; dd @b 15:59
camelia rakudo-moar 054aca: OUTPUT«This type cannot unbox to a native number: P6opaque, Int␤ in block <unit> at <tmp> line 1␤␤»
lizmat should give us a better error message shortly :-)
so, should we document "dd" or not ? 16:17
viki :o 16:18
lizmat seems to me it is a handy feature for debugging that we should tell people about ?
even though it isn't strictly Perl 6 ?
and yes, I know it's my brainchild :-) 16:19
viki For a second I thought this was an amazing coincidence you mentioning it... *looks at GitHub notifications*... but it isn't :) 16:20
lizmat :-)
I realized that the discussion there wouldn't be seen by a lot of people :-_
)
viki I'm ok with documenting
maybe a section in docs.perl6.org/programs/00-running ? All the other stuff on that page seems to be Rakudo-specific 16:23
[Coke] Put it where it would go if it were a real spec thing, but I would include: 16:32
a tag noting that this is only part of rakudo, and that we make no guarantee as to the output. Do not rely on the particular formatting. 16:33
(maybe with something like getbootstrap.com/2.3.2/components....els-badges with a [RAKUDO] tag somewhere, at least on the HTML side) 16:36
but if we do that, there's a bunch of Rakudo-specific stuff that we've been excluding that we could put in. (most recently, rakudo-specific environment variable)
Then we have to decide - mark the rakudo stuff per page? per method/heading? 16:37
(I think this is going to end up being the same mechanism where we mark which version of the spec things are from) 16:38
dalek kudo/nom: 79090b2 | lizmat++ | / (2 files):
Make copying intX[2;2] to intY[2;2] just as fast

as copying intX[2;2] to intX[2;2]
  - modulo conversion from intX to IntY
  - add more descriptive error in case they're not the same type
16:56
dogbert17 o/ 17:26
viki: are you at $work by any chance?
viki Yeah 17:28
Now I recall you wanted me to try something on 32-bit box... 17:29
dogbert17 could you try 'make t/spec/S32-num/power.t' on your 32 bit box
:-)
viki dogbert17: "Result: PASS" 17:40
oh wait, my roast is ancient... 17:41
dogbert17 phew, you should 'hopefully' get one fail 17:42
viki "Result: FAIL"
:)
dogbert17 yay
viki and it's a bogus test 17:43
or is it..
viki looks it up
m: say 1.0000001 ** (10 ** 9) 17:45
camelia rakudo-moar 054aca: OUTPUT«(timeout)»
viki m: say 10**9
camelia rakudo-moar 054aca: OUTPUT«1000000000␤»
viki yikes
m: Int.max.say
camelia rakudo-moar 054aca: OUTPUT«-Inf␤»
viki :S
That's the weirdest answer 17:46
dogbert17 indeed
viki m: Int.Range.max.say
camelia rakudo-moar 054aca: OUTPUT«Inf␤»
viki m: int.Range.max.say
camelia rakudo-moar 054aca: OUTPUT«9223372036854775807␤»
viki m: num.Range.max.say
camelia rakudo-moar 054aca: OUTPUT«Inf␤»
viki yeah, right 17:47
timotimo it's not weird, you're getting the maximum value of an empty list 17:50
so it's got to be the value that's smaller than any value a non-empty list could possibly have 17:51
i.e. it's the neutral element
viki why is it judging the non-empty list if I gave it an empty list (which I didn't) 17:53
timotimo single items tend to act like lists of only themselves 17:54
viki right
timotimo i suppose it's judging it as the undefined value instead
geekosaur seems to me .max on an item promoted it to a single element list, and the element being the type object (no value) was ignored and got you the identity for max
ilmari m: ().max.say 17:55
camelia rakudo-moar 054aca: OUTPUT«-Inf␤»
geekosaur that said, I would expect an Int type object to act like 0
with a warning
moritz m: say +Int 17:56
camelia rakudo-moar 054aca: OUTPUT«Use of uninitialized value of type Int in numeric context␤ in block <unit> at <tmp> line 1␤0␤»
geekosaur or that 17:57
s: 'max', Int
SourceBaby geekosaur, Something's wrong: ␤ERR: Cannot resolve caller sourcery(Str, Int); none of these signatures match:␤ ($thing, Str:D $method, Capture $c)␤ ($thing, Str:D $method)␤ (&code)␤ (&code, Capture $c)␤ in block <unit> at -e line 6␤␤
viki s: Int, 17:58
SourceBaby viki, Something's wrong: ␤ERR: Cannot resolve caller sourcery(Int); none of these signatures match:␤ ($thing, Str:D $method, Capture $c)␤ ($thing, Str:D $method)␤ (&code)␤ (&code, Capture $c)␤ in block <unit> at -e line 6␤␤
viki s: Int, '
SourceBaby viki, Something's wrong: ␤ERR: ===SORRY!=== Error while compiling -e␤Unable to parse expression in single quotes; couldn't find final "'" ␤at -e:7␤------> <BOL>⏏<EOL>␤ expecting any of:␤ single quotes␤ term␤
viki bah
s: Int, 'max', \()
SourceBaby viki, Sauce is at github.com/rakudo/rakudo/blob/7909...s.pm#L1276
geekosaur bass-ackwards, figures >.>
viki It's not 17:59
geekosaur no, me
viki It follows the Int.^lookup('max').can(\())
s/can/cando/.;
geekosaur in any case that looks like it's coercing the item into a 1-element list 18:00
s: (Int), 'max', \()
SourceBaby geekosaur, Sauce is at github.com/rakudo/rakudo/blob/7909...s.pm#L1276
geekosaur bah
viki what's the conventional method to check if the code is running on a 32-bit box?
geekosaur s: (Int,), 'max', \()
SourceBaby geekosaur, Sauce is at github.com/rakudo/rakudo/blob/7909...s.pm#L1276
geekosaur oh, that is the right thing and not just the coercer 18:02
github.com/rakudo/rakudo/blob/7909...s.pm#L1283
ignores type objects
should possibly throw
well, fail
no, I completely scrambled what it's doing. warn and use 0 18:04
like in any other numeric context
rathetr, any other context where it is asked to provide a value. sigh. (think these through before commenting...) 18:08
viki m: use nqp; say nqp::pow_I(10000001, 1000000000, Num, Int) 18:09
geekosaur if someone wants max to skip type objects, maybe it can be an adverb
camelia rakudo-moar 054aca: OUTPUT«(timeout)»
viki dogbert17: well, it overflows in ^ that op in src/core/Int.pm#L286 I don't know what the expected limit for it that it doesn't blow up on 64-bit boxes, 'cause that's a huge number 18:10
2.68810370126492381050560030147750374656383777515+×+10^7000000043
And actually the Rat limit would be smaller, because we exponentiate numerator/denominator separately 18:11
dogbert17 that look big 18:12
viki And this is the ticket the test testss rt.perl.org/Ticket/Display.html?id=112788
So the solution may be to pick a smaller number to stuff into the test? *shrug* 18:13
dogbert17 hmm, might need some contemplation 18:14
this seems to do the trick on 32-bit say 1.0000001 ** (10 ** 8) 18:15
m: say 1.0000001 ** (10 ** 8) 18:16
camelia rakudo-moar 054aca: OUTPUT«(timeout)»
dogbert17 I think that should do it
viki committable6: 2015.07 say 1.0000001 ** (10 ** 8) 18:17
/o\
dogbert17 heh
you might have found a bot killer 18:18
viki What can I say, I have a knack
m: say 1.0000001 ** (10 ** 90000) 18:19
camelia rakudo-moar 054aca: OUTPUT«Numeric overflow␤ in block <unit> at <tmp> line 1␤␤Actually thrown at:␤ in block <unit> at <tmp> line 1␤␤»
viki Yeah, so maybe then reduce the current test to 10 ** 8 and also add another one for 1.0000001 ** (10 ** 90000) to test that it throws Numeric overflow and not the weird stuff mentioned in the ticket
m: say 10 ** 90000 18:20
camelia rakudo-moar 054aca: OUTPUT«1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000…»
dogbert17 yep 18:22
me or you? 18:23
viki you :) 18:27
viki is at $work, remember?
:)
I'm... working...
dogbert17 ok :) if you get bored, can you also try 'make t/spec/S04-declarations/constant.t' on your 32-bit machine, it sometimes fails completely for me 18:29
viki Same "MoarVM panic: Internal error: zeroed target thread ID in work pass" 18:31
dogbert17 excellent, then it's not only me 18:32
diakopter well if it's a GC problem, you should be able to force that error on 64-bit too, with the twiddle that makes moarvm run the GC on every allocation 18:34
dogbert17 what twiddle might that be? 18:37
diakopter not sure; ask on #moarvm I'd guess 18:39
dogbert17 thx, will do 18:44
dalek kudo/nom: 87dcc08 | lizmat++ | src/core/ (2 files):
Add support for natives to R:I:ShapeBranchIterator
19:51
ast/power-fix: d127a53 | (Jan-Olof Hendig)++ | S32-num/power.t:
Fix test which breaks on 32 bit systems

The test for RT #112788 didn't work properly on 32-bit systems. This has been fixed by changing the exponent from 9 to 8 so now it should behave the same, i.e. hang, on both 32 and 64 bit systems. An additional test was added (viki++) which checks that a Rat raised to a very large number actually throws.
19:59
ast: db78f0f | dogbert17++ | S32-num/power.t:
Fix test which breaks on 32 bit systems (#185)

The test for RT #112788 didn't work properly on 32-bit systems. This has been fixed by changing the exponent from 9 to 8 so now it should behave the same, i.e. hang, on both 32 and 64 bit systems. An additional test was added (viki++) which checks that a Rat raised to a very large number actually throws.
20:04
diakopter lizmat: did you see this github.com/rakudo/rakudo/commit/87...t-19988382 20:09
just curious if you get notified on a comment like that
lizmat diakopter: yes, I got notified by mail just now 20:10
diakopter oh ok
lizmat whether or not it makes sense to remove the getattr, you tell me
should it ? 20:11
diakopter well if $shape isn't changing inside the loop, I don't see why not 20:12
lizmat ok, lemme try to benchmark that after I'm done with what I'm working on now
diakopter lizmat: can you use atpos_i in that same line? 20:24
lizmat no, because for non-native shaped arrays, the shape is a List 20:25
and Lists cannot have list_i as their reified
diakopter oh
lizmat (well, technically, they can, but all sorts of things break when they do)
in any case, a non-native shape should be able to have a Whatever in it 20:26
dalek kudo/nom: 4dffef7 | lizmat++ | src/core/ (2 files):
Use same role detection logic for (non)-natives
20:52
lizmat dogbert17: t/spec/S32-num/power.t , test #78 started failing for me 20:53
viki lizmat, which test? One was changed another was addedd 21:05
oh sorry, you said it. 21:09
viki is blind
dogbert17 nooo 21:15
lizmat: tried to make it work on both 32 aand 64 bit
dogbert17 curses Mac OS X :) 21:16
so it's the new test, odd 21:18
lizmat dogbert17: will look at it more closely after finishing the P6W 21:24
dogbert17 cool 21:25
bartolin looks like nqp::substr on MoarVM works with a negative offset: github.com/MoarVM/MoarVM/blob/ee0b...ops.c#L290 (it does not on JVM) 21:29
yoleaux2 26 Nov 2016 16:16Z <viki> bartolin: what's the failure in this test (sleep huge values)? Seems to work fine in camelia. github.com/perl6/roast/commit/08ff...67fb20b397
26 Nov 2016 16:16Z <viki> bartolin: never mind. Reproduced :)
bartolin r: use nqp; say nqp::substr("bar", -1, 1)
camelia rakudo-moar 054aca: OUTPUT«r␤»
..rakudo-jvm 76b061: OUTPUT«java.lang.StringIndexOutOfBoundsException: String index out of range: -1␤ in block <unit> at <tmp> line 1␤␤»
bartolin should I open a nqp issue for this difference? 21:30
AlexDaniel m: use nqp; say nqp::substr("bar", -1, 1) 21:37
camelia rakudo-moar 054aca: OUTPUT«r␤»
AlexDaniel m: use nqp; say nqp::substr("bar", -2, 1)
camelia rakudo-moar 054aca: OUTPUT«a␤»
AlexDaniel m: use nqp; say nqp::substr("bar", -4, 1)
camelia rakudo-moar 054aca: OUTPUT«␤»
AlexDaniel m: use nqp; say nqp::substr("bar", -5, 1)
camelia rakudo-moar 054aca: OUTPUT«Substring end (-1) cannot be less than 0␤ in block <unit> at <tmp> line 1␤␤»
AlexDaniel m: use nqp; say nqp::substr("bar", -4, 5)
camelia rakudo-moar 054aca: OUTPUT«bar␤»
bartolin m: 'say "bar".substr(-1, 1)' 21:39
camelia rakudo-moar 054aca: OUTPUT«WARNINGS for <tmp>:␤Useless use of constant string "say \"bar\".substr(-1, 1)" in sink context (line 1)␤»
bartolin m: say "bar".substr(-1, 1)
camelia rakudo-moar 054aca: OUTPUT«Start argument to substr out of range. Is: -1, should be in 0..3; use *-1 if you want to index relative to the end␤ in block <unit> at <tmp> line 1␤␤Actually thrown at:␤ in block <unit> at <tmp> line 1␤␤»
FROGGS bartolin: yes, please open said ticket 21:42
bartolin will do
perlpilot bartolin: be sure to include a transcript of what AlexDaniel did above ... even if I can accept that it should handle negative offsets, that second to last one is just crazy 21:46
bartolin I'm on it :-) 21:47
perlpilot bartolin++ 21:48
bartolin nqp issue 324 it is 22:24
dalek kudo/nom: b516784 | bartolin++ | src/Perl6/Grammar.nqp:
Avoid calling nqp::substr with negative offset

  ... when we are interested in the preceding character.
22:26
kudo/nom: 5163e8a | (Zoffix Znet)++ | src/Perl6/Grammar.nqp:
Merge pull request #930 from usev6/patch-3

Avoid calling nqp::substr with negative offset
lizmat and another Perl6 Weekly hits the net: p6weekly.wordpress.com/2016/11/28/...ing-along/ 22:37
dogbert17 lizmat++ Weeky 22:42
s/Weeky/Weekly/
b2gills m: use MONKEY-TYPING;augment class IO::ArgFiles { method getc (|c){ self!next-io.getc(|c) }}; say $*ARGFILES.getc.say 22:43
camelia rakudo-moar 054aca: OUTPUT«C␤True␤»
lizmat good night, #perl6-dev! 23:04
viki night