»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg camelia perl6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by sorear on 25 June 2013.
00:14 hummeleBop left 00:21 sunnavy joined 00:32 Sqirrel left 00:35 Sqirrel joined 01:02 klapperl_ joined 01:06 klapperl left 01:09 thou joined 01:21 tusooa joined 01:22 tusooa left, thistusooa joined 01:23 thistusooa left, thistusooa joined 01:40 takesako_____ left 01:44 FROGGS_ joined 01:46 Su-Shee_ joined, Sqirrel_ joined 01:47 Sqirrel left 01:48 FROGGS left
ren1us Okay, as part of my continuing struggle to work through the book, such as it is, I now have a question: When it comes to constructing a new instance via self.bless, how would the syntax look for sending in a param with a name which doesn't quite match an attribute? 01:48
And because that clearly made no sense in words, here's a quick example: new($value) { return self.bless(:$value); } works fine, given a "$value" attribute
01:49 Su-Shee left
ren1us However, let's say you wanted to do something along the lines of: new($val) { return self.bless(value => $val); }. How would the *proper* syntax for that look? 01:49
I think my big confusion is, exactly what is that : operator actually doing and how is bless trying to match things. 01:50
BenGoldberg As far as I know, :$foo is exactly identical to foo => $foo 01:51
ren1us But what if you're trying to do foo => $bar? 01:52
BenGoldberg Then write foo => $bar 01:53
flussence You can write :foo($bar) if you want, but they're both the same everywhere.
ren1us That works and actualyl makes a ton of sense. Thanks. 01:54
01:58 prevost left 02:20 hoverboard joined 02:30 perltricks joined 02:38 perltricks left 03:08 perltricks joined
perltricks anyone know why this capture doesn't work? perl6 -e '"one two" ~~ m:g/(\w+)/; for @() { say } 03:09
avuserow2 m: "one two" ~~ m:g/(\w+)/; for @() { .say } 03:12
camelia rakudo-moar dca172: OUTPUT«「two」␤␤»
avuserow2 perltricks: ^
03:12 avuserow2 is now known as avuserow
avuserow is that what you are seeing? 03:12
m: "one two" ~~ m:g/(\w+)/; @().perl.say 03:13
camelia rakudo-moar dca172: OUTPUT«(Match.new(orig => "one two", from => 4, to => 7, ast => Any, list => ().list, hash => EnumMap.new()),).list␤»
perltricks Hi, thanks. I'm getting the last match ... but I want to iterate all matches 03:14
With global matching I expected 'one' and 'two' as captures 03:15
avuserow you could always use .comb here 03:20
03:21 thou left
avuserow m: .say for "one two".comb(/\w+/) 03:21
camelia rakudo-moar dca172: OUTPUT«one␤two␤»
perltricks aha, thanks avuserow let me try that
lue m: .say for "one two".words # even shorter, if you're specifically looking for /\w+/ 03:22
camelia rakudo-moar dca172: OUTPUT«one␤two␤»
03:24 xragnar_ joined, xragnar left, xragnar_ is now known as xragnar 03:25 Sqirrel_ left
perltricks thanks lue, will try that also 03:26
03:29 thou joined 03:33 Sqirrel joined 03:52 perltricks left 04:00 skids joined 04:22 Sqirrel left 04:24 BenGoldberg left 04:33 thou left, Sqirrel joined 04:39 Sqirrel left 04:41 Sqirrel joined 04:45 Sqirrel left 04:46 hoverboard left 04:51 Sqirrel joined 05:14 kaare_ joined 05:32 xinming joined 05:34 xinming_ left 05:39 SevenWolf joined 05:56 huf_ is now known as huf 06:05 bjz left, bjz joined 06:21 bbkr left 06:26 darutoko joined 06:27 darutoko- joined 06:31 darutoko left, darutoko joined, darutoko- left 06:32 Sqirrel left 06:52 Sqirrel joined 07:10 [Sno]_ is now known as [Sno] 07:17 kurahaupo joined
FROGGS_ moritz: the LWP::Simple r-m* problems you mentioned make me think that we cannot have a star release *after* the compiler release anymore 07:36
moritz: I think we should do a star release and compiler release at the same time, so do not have regressions in star that require a point release
07:37 FROGGS_ is now known as FROGGS
moritz lue: iirc .words uses \S+, not \w+ 07:42
FROGGS correct 07:51
m: .say for "ohh, yeah".words
camelia rakudo-moar dca172: OUTPUT«ohh,␤yeah␤»
moritz FROGGS: I dunno, the failures shoudl have been obvious from the rakudo-star-daily thingy 07:53
FROGGS moritz: nothing hangs on my box when I build r-m*
just checked
moritz FROGGS: maybe adding that to the release guide would help
FROGGS: it hung here on two different machines :(
FROGGS: does r-p* build the modules fine for you? 07:54
xfix perlcabal.org/syn/S03.html#line_1456 - interesting, ANSI C explicitly allows for operator looser in the precedence in middle part. But I guess it's because there is rarely an use for that.
FROGGS moritz: it did on wednesday, but I'll check in a minute
moritz (that is, no SORRY in the output) 07:55
FROGGS I see that LWP::Simple fails a test though (on r-m) 07:56
"Internal error: inconsistent bind result" 07:57
never seen that before
08:24 bjz left 08:31 spider-mario joined 08:37 denis_boyun_ joined 08:57 denis_boyun___ joined, denis_boyun_ left 08:58 uniejo joined 08:59 SevenWolf left 09:04 denis_boyun_ joined 09:05 denis_boyun___ left 09:08 SamuraiJack__ joined 09:12 Su-Shee_ is now known as Su-Shee 09:26 Sqirrel left
masak FROGGS++ # a new internal error; well done! 09:31
FROGGS meh
:P
moritz git grep -i inconsistent in rakudo/nqp/parrot/moarvm doesn't yield that error message anywhere 09:32
any idea where it comes from? 09:33
FROGGS rakudo/src/Perl6/Metamodel/BOOTSTRAP.nqp:2927: nqp::die("Internal error: inconsistent bind result");
09:43 Sqirrel joined
jnthn waves from the mojoconf hackathon 09:45
09:45 bowtie left
moritz oh, my local copy of rakudo is "a bit" out of date 09:45
like, 1225 commits
jnthn FROGGS: That means that the lowered signature code thought the bind failed, it fell back to the binder proper to generate an error message, and that then thought all was OK, and the internal error is 'cus that should not happen. 09:46
FROGGS hmmm
09:47 Psyche^ joined
jnthn agrees with moritz that we need to use the star-daily thingy to try and make sure we don't cut releases that bust stuff for Star 09:49
On the other hand, given it seems that that only some of us can re-produce the bug... 09:50
09:51 Sqirrel left 09:53 Sqirrel joined 09:55 kaare__ joined 09:59 kaare_ left
jnthn FROGGS: Can you get me a condensed test case on the internal bind error? 10:01
FROGGS jnthn: gimme a minute 10:02
jnthn ok
I'm also looking into the crazy slowness of IO::Path.contents 10:03
10:06 sqirrel_ joined
jnthn Uhh...yeah 10:09
Doing it 100 times hits the binder slow path around 30,000 times.
10:10 dmol joined
jnthn We also hit it 78 times at startup now. 10:13
Wonder how much that is costing...
vendethiel that reminds me of String#hashCode which is itself called so much time in Java's library that the JIT optimized it already when your own program starts
jnthn wonders which on earth BUILD method is so costly... 10:14
vendethiel (what tools do you use for bottlenecks ?)
xfix timotimo++, I just noticed you (yes, I know, late, but I don't follow Perl 6 news lately) continued my old blog I didn't have time to write anymore. Also, it seems you write better posts than I did :-). 10:16
FROGGS jnthn: the lwp-simple problem is about this: gist.github.com/FROGGS/9228162347e3b4c03a18 10:18
jnthn: when I delete the LWP/Simple.moarvm, I get the gisted bt 10:19
and it passes when I disable spesh
10:19 Rotwang joined
jnthn FROGGS: eek, yeah, that obj looks like junk 10:20
FROGGS I am not sure I can provide a one-liner though 10:21
but perhaps.... I create a shorter script that shows the problem 10:22
xfix I barely have time for programming and writing because of school.
(perhaps I should try Perl 6 again, and check how it improved...) 10:23
FROGGS xfix: you should :o)
xfix It was 6 months, after all. Is MoarVM usable now? 10:24
(or should I continue using Parrot Perl 6?)
10:27 denis_boyun_ left
jnthn xfix: Many folks are using MoarVM as their Perl 6 backend of choice these days. 10:27
xfix: Worth it for the speedup. 10:28
xfix So, it's reasonably complete.
jnthn Well, it passes more spectests than any of the other backends by now.
So at least by that measure...
:)
Has full nativecall support too
xfix Interestnig.
10:29 anaeem1_ joined
xfix Compared to Perl 5, how fast MoarVM Rakudo Perl is? 10:32
But considering Parrot's performance six months ago, it's probably comparable or faster. 10:34
moritz xfix: try it and see 10:35
xfix :-)
Right now it's compiling.
jnthn Comparison with Perl 5 varies greatly by benchmark.
xfix note: expected ‘char (*)(struct DCCallback *, struct DCArgs *, union DCValue *, void *)’ but argument is of type ‘char (*)(struct DCCallback *, struct DCArgs *, union DCValue *, struct MVMNativeCallback *)’ 10:36
I love overzealous compilers.
jnthn doesn't
The MSVC build of MoarVM is warning free. The clang build on OSX apparently spits out 1000 warnings o.O
xfix Well, I guess that void * in function is not compatible with struct MVMNativeCallback *, but it will work on most platforms. 10:37
jnthn gcc is a few
xfix Except for Emscripten if I remember correctly.
But considering MoarVM is JIT, I doubt it would work on Emscripten either way. 10:38
FROGGS three warning using gcc 10:39
warnings*
xfix I got one while compiling MoarVM.
10:39 anaeem1_ left
xfix gcc 4.8.1, if you ask. 10:40
FROGGS I've got also 4.8.1
jnthn I htink I have 3 on GCC... 10:41
I'll fix those is nobody else gets to them first.
The clang 1000 is just crazy though :)
xfix Why it would report way more than gcc? 10:42
FROGGS jnthn: I can't provide a simple case for the lwp-simple issue, the problem vanishes when I rip out random stuff
vendethiel (is clang bad ?)
I watched some C++ talks and they kept making fun of clang ;o)
jnthn vendethiel: Not bad, just different defaults, I guess :)
FROGGS I like clang
xfix For fish shell, I get two warnings in clang, and one in gcc. 10:43
vendethiel the little I used clang, it was just soo good because it was soo fast
xfix But let's be honest, before fixing them, clang reported way more.
Those two warnings that were left are about unused static functions for which calls are generated using preprocessor. 10:44
tadzik I think clang is awesome
xfix It is.
It found lots of legit issues in fish shell. 10:45
github.com/fish-shell/fish-shell/b...k.cpp#L804 10:46
Now I wonder who added __attribute__((unused)) here, and didn't add it anywhere else.
10:48 denis_boyun_ joined, thou joined
xfix MoarVM installed, and it seems more responsive than Parrot. Interesting. 10:49
10:50 prevost joined
xfix Its REPL still loads faster than Node.js's REPL, which is already quite great. 10:50
tadzik well, I started writing Steroids and games because Mokudo was faster than Typescript :) 10:52
xfix The only issue I see for now is that -e code loads in 0.8 seconds or so.
10:52 thou left
xfix Typescript slower than Rakudo? What? 10:53
Aren't JavaScript implementations optimized really well?
tadzik well, startup-time wise
typescript needed like 3 seconds to compile an empty file
vendethiel xfix: they mean the compiler :-)
tadzik so I said "screw this, I'll write it in Perl 6"
vendethiel compile it is long, not running it
tadzik which is funny, since typescript compiler is written is JS which is supposed to be OMG FAST 10:54
xfix 3 seconds is faster than C++ that can easily compile for 2 days :-).
tadzik but it was super annoying to deal with
moritz xfix: I don't know any C++ compiler that takes >3s for an empty fie
xfix Hm, right.
I assumed that 3 seconds for a complete program. 10:55
tadzik well, Rakudo now takes more than 3 seconds to compile the entire steroids too
and it's possible that typescript is still at 3 :)
but the startup time was unbearable so I ditched it
xfix I remember compiling HHVM. It took so long that I just installed Fedora in VM, and downloaded the .rpm package in meantime.
(yes, it's PHP_) 10:56
tadzik I like Go :)
well, Hiphop is C++, I don't think it uses PHP in itself, does it
xfix Well, it's VM for PHP.
I like Go, but I cannot get used to the types being on the right side just because. 10:57
vendethiel go is bad :/
all hail rust !
xfix And this array declaration syntax which looks like []int. Like, why?
tadzik because writing function pointers isn't crazy like in C :) 10:58
and it all makes sense
xfix It's not even consistent. func main() should be main func() IMO. 10:59
tadzik *
FROGGS ohh dang, panda's sub local-fetch needs some love... 11:03
xfix And there is issue of Unicode support. It claims to be Unicode supporting programming language. It even has fmt.Println("Hello, 世界") on main page. 11:04
It even has some methods that only make sense in Unicode. But they don't work, strings.EqualFold("ss", "ß") returns false.
What's worse? Not having Unicode support, or claiming to have Unicode support without having it? 11:05
moritz xfix: the world isn't just black and white. Get used to it. 11:06
xfix: it simply could have Unicode support that's not perfect.
xfix I guess you are right here, but it still annoys me.
But it's annoying when according to Go, uppercase version of ß is ß. That's basic ISO-8859-1. 11:11
Then again, it's not that Rakudo does it better. 11:12
rn: say uc "ß" 11:13
camelia rakudo-jvm dca172: OUTPUT«SS␤»
..rakudo-{parrot,moar} dca172, niecza v24-109-g48a8de3: OUTPUT«ß␤»
xfix But I assume it's just a bug in Rakudo.
moritz r-j does better. 11:14
xfix r-j: say uc "ß"
camelia rakudo-jvm dca172: OUTPUT«SS␤»
xfix I already know it was reported - rt.perl.org/Public/Bug/Display.html?id=121377 11:15
tadzik isn't ß defined as case neutral in unicode? 11:16
xfix 00DF; 00DF; 0053 0073; 0053 0053; # LATIN SMALL LETTER SHARP S
No, it's not.
tadzik The Unicode standard defines, that “ß” does not change when mapping to upper, title, or lower case.
xfix (according to SpecialCasing.txt) 11:17
tadzik no source for that above sentence though
just an internet comment that people didn't disagree wiht :)
xfix According to Unicode, \xDF is \xDF (lowercase), \x53\x73 (titlecase) or \x53\x53 (uppercase).
moritz tadzik: that comment is wrong; I recently looked it up 11:18
tadzik fair enough
xfix www.unicode.org/Public/UNIDATA/SpecialCasing.txt - this is newest version of Unicode, if you want it. 11:20
In most cases ß is uppercased to SS. 11:22
Apparently ẞ is obligatory for official documentation when wriing geographical names in all-caps (141.74.33.52/stagn/Portals/0/101125_TopR5.pdf), but other than that, SS is being used. 11:23
11:27 molaf left
FROGGS xfix: I also had email conversation with german grammar officals, and it is quite possible that ẞ will be the offical ß.uc in a few years 11:29
which would result in an update to unicode of course 11:30
xfix Well, yes, but currently Unicode doesn't change this change.
FROGGS "change this change"? 11:31
xfix update for this change*
wasn't updated*
FROGGS the officals will only accept ẞ if it used more widely btw
xfix: unicode can't do that on its own 11:32
xfix That would be an interesting change.
Especially considering that ẞ was added rather recently. Windows Vista doesn't have ẞ character, but I bet that Microsoft would release an update if ẞ would be officially accepted. 11:33
(assuming that it will be changed before Vista end of support) 11:34
FROGGS ẞ is there since uniode 5.1 (2008) 11:37
not that recently
11:38 SamuraiJack__ left
tadzik hmm, I don't suppose there's something like nqp::getattr() that'll traverse the inheritance hierarchy for me? 11:50
FROGGS hehe
nice try :o) 11:51
tadzik :>
11:51 anaeem1_ joined
tadzik that nice try would've saved me a 'for { ... try {' :P 11:51
tadzik is porting MooseX::StrictConstructor
jnthn
.oO( "It looks like you're after a method" )
11:53 denis_boyun__ joined 11:54 denis_boyun_ left 11:56 sqirrel_ left
jnthn grr 12:02
So I got :enc(:$encoding) to work out for bind lowering, thus dealing with open, subst, etc.
Then I discovered match :/
:st(:nd(:rd(:th(:$nth))))
FROGGS :/ 12:03
jnthn just hacks it 12:04
timotimo o/ 12:05
xfix: thanks for your kind words
12:06 bowtie joined
xfix r: a: goto a; 12:08
camelia rakudo-{parrot,jvm,moar} dca172: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfile␤Undeclared routine:␤ goto used at line 1␤␤»
jnthn It turns out the slow-path binder is less slow than I thought... Eliminating the 30,000 calls to it doesn't really make much difference to the IO::Path.contents slowness
xfix Any idea why 'a:' causes SIGSEGV in r-m (on my computer)? 12:09
(but only in REPL)
FROGGS hmmmm
jnthn No idea. Doesn't here in REPL for me.
xfix > a:
fish: Job 1, 'perl6' terminated by signal SIGSEGV (Address boundary error)
Strange.
FROGGS segfaults for me too :(
12:09 bowtie left
jnthn Odd. No problems here. 12:10
xfix Perhaps it's x86_64 specific or something.
12:10 bowtie joined
jnthn is on x86_64... 12:11
xfix I have 3.11.10-7 kernel, but it's probably not about that.
Well, 3.11.10-7-desktop (openSUSE). 12:12
Let me check gdb...
(after I install it)
FROGGS xfix++ 12:14
xfix "/home/xfix/Code/rakudo/install/bin/perl6": not in executable format: File format not recognized
Hm...
It's a shell script. Ok. 12:15
gist.github.com/xfix/7313ed1b82d2047f7faa 12:18
huh
FROGGS xfix: you need a MoarVM --debug=3 build 12:19
xfix Hm, ok
FROGGS you don't need to reinstall nqp/rakudo afterwards btw 12:20
xfix So, I guess I have to recompile Moar.
FROGGS just reconfigure MoarVM, and provide --prefix and --debug=3
xfix I installed Rakudo using --gen-moar.
FROGGS --prefix needs to point to your install directory
xfix And there is --moar-option
I guess I have to download Moar then. 12:22
jnthn now has a Rakudo that doesn't hit the slow-path binder at all at startup
12:22 Sqirrel left
jnthn or match/subst 12:22
xfix Heh, fish shell still calls sed on startup. 12:23
12:25 kaare__ is now known as kaare_
FROGGS jnthn: do you recognize a speed improvement? 12:25
12:26 spider-mario left
jnthn Not a great one... 12:26
12:26 pippo joined
pippo o/ #perl6 12:26
jnthn I mean, it knows some off IO::Path.contents
xfix Hi, pippo.
jnthn But it appears not to be the main thing that makes it costly
Even though 100 of them did it 30,000 times 12:27
pippo xfix: same problem as yours on my box here. I have a 32bits machine.
xfix: btw also on perl6-j REPL.
xfix gist.github.com/xfix/8aa1ba6cb3d9f8679654 12:28
Is it useful enough?
FROGGS xfix: yeah 12:29
it tries to unbox_s a NULL object
xfix Why it would do that... 12:30
FROGGS I dunno 12:31
but I will find out
xfix Anyway, I have to go away
FROGGS thanks for the backtrace :o) 12:32
12:33 Sqirrel joined 12:36 thou joined
dalek p: b436340 | jonathan++ | / (3 files):
Support having a pair of possible parameter names.

Just on MoarVM backend for now, but that's the only one that lowers Perl 6 signatures at present.
12:36
12:38 Sqirrel left
dalek kudo/nom: 10d5c92 | jonathan++ | src/Perl6/Actions.nqp:
Lower attributive parameter binds.
12:38
kudo/nom: 9df1a8c | jonathan++ | / (2 files):
Lower :a(:$amaze) in signatures.
kudo/nom: 33e16f0 | jonathan++ | src/core/Str.pm:
Tweak match signature to be lowerable.

With this, we never hit the slow-path binder on startup, and avoid it on all the calls to match.
12:39 Sqirrel joined 12:41 thou left
tadzik "A class's explicit method definition hides any role definition of the same name", says S14. Is there a way to call it anyway? 12:41
vendethiel tadzik: .RoleName.method ? .*method ?
tadzik nah, doesn't work 12:42
masak m: role R { method foo { say "R!" } }; class C does R { method foo { say "C!" } }; C.new::R.foo
camelia rakudo-moar dca172: OUTPUT«===SORRY!===␤Could not find symbol 'new'␤»
masak m: role R { method foo { say "R!" } }; class C does R { method foo { say "C!" } }; C.new()::R.foo 12:43
camelia rakudo-moar dca172: OUTPUT«===SORRY!=== Error while compiling /tmp/GVUay61J3v␤Two terms in a row␤at /tmp/GVUay61J3v:1␤------> s R { method foo { say "C!" } }; C.new()⏏::R.foo␤ expecting any of:␤ method arguments␤ ar…»
jnthn ummm...
masak m: role R { method foo { say "R!" } }; class C does R { method foo { say "C!" } }; C.new().R::foo
camelia rakudo-moar dca172: OUTPUT«R!␤»
tadzik hmm
masak got the syntax wrong first. but there it is.
tadzik how about from C.foo? :)
jnthn in IO::Path.contents
We do 12:44
next unless $elem ~~ $test;
And then a few lines later
take $elem.path if $elem ~~ $test;
Meaning we're doing the test twice?
tadzik m: role Bar { method meth { say "from role" } }; class Foo does Bar { method meth { say "from class"; Bar::meth } }; Foo.meth
camelia rakudo-moar dca172: OUTPUT«from class␤===SORRY!===␤Could not find symbol '&meth'␤»
jnthn That won't be helping its speed...
tadzik masak: that's what I want to do here
jnthn tadzik: self.Bar::meth 12:45
tadzik maybe I get the syntax wrong too
aha!
jnthn++
masak yeah, it's still a method call.
I used to not like the syntax, feeling it mixed together roles with module 'our' sub lookup.
tadzik and I guess I can do that with callwith() too
masak but nowadays I think it's fairly brilliant. 12:46
tadzik or something
jnthn FROGGS: Do you know if the test in contents is meant to happen on the fully qualified path after we catfile, or on the unqualified one?
FROGGS: Feels wrong to do it on both...
FROGGS jnthn: what test on contents? 12:48
jnthn FROGGS: In IO::Path.contents 12:49
We try $test twice.
next unless $elem ~~ $test;
$elem := $.SPEC.catfile($!path, $elem) if self ne '.';
if $elem.substr(0, 2) eq any("./", ".\\") {
$elem := $elem.substr(2);
}
take $elem.path if $elem ~~ $test;
There's so much fail in here... 12:50
Just avoe
*above
my Str $elem := nqp::nextfiledir($dirh);
if nqp::isnull_s($elem) || !$elem.chars {
isnull_s is meant to be used on a native str...
FROGGS hmmm 12:51
I've seen that we test twice yesterday or so... but we also modify $elem in between 12:53
jnthn yeah but...only on Moar
on JVM we check it once
tadzik I ported MooseX::StrictConstructor to Perl 6: github.com/tadzik/ClassX-StrictConstructor 12:55
it was fun :)
I wonder if I should maybe reuse some existing exception class, but X::Attribute::Undeclared only supports one attribute 12:56
and I feel it's more helpful to show them all
Juerd What does .^ do and does anybody know a way to google for punctuation? :) 12:57
Or another search engine
12:58 Sqirrel left
masak tadzik++ # boa constrictconstructor 12:58
tadzik Juerd: calls to MOP
Juerd Thanks
masak Juerd: $obj.^meth == $obj.HOW.meth($obj)
tadzik and no, I don't know how to search for punctuation 12:59
vendethiel m: role R { method foo { say "R!" } }; class C does R { method foo { say "C!" } }; C.new().R.foo # what's that ambigous with ?
camelia rakudo-moar dca172: OUTPUT«No such method 'R' for invocant of type 'C'␤ in block at /tmp/SKp2ZG4DVx:1␤␤»
vendethiel oh, it's left associative ?
dalek kudo/nom: 2c54ffd | jonathan++ | src/core/IO.pm:
Various optimizations to IO::Path.contents.

Eliminate duplicate application of $test on MoarVM; probably just an accident in porting. Then do a range of other optimizations. Cuts the time taken to less than half of what it was.
tadzik hm. I can remove nextsame; from the end of Boa::Constrictor's new(), and tests will still work
vendethiel m: role R { method foo { say "R!" } }; class C does R { method foo { say "C!" } }; C.new().(R::foo) # what's that ambigous with ?
camelia rakudo-moar dca172: OUTPUT«===SORRY!===␤Could not find symbol '&foo'␤»
Juerd Not being able to search for punctuation has always been annoying when learning Perl... Maybe I'll create an operator lookup web thingy.
12:59 Sqirrel joined
tadzik I wonder if tests are lacking, or is it indeed unnecessary :) 12:59
vendethiel Juerd: "poogle", like hoogle :P 13:00
Juerd ?
jnthn FROGGS: Hopefully the various patches today alleviate your .contents slowness issues a little.
vendethiel Juerd: haskell.org/hoogle
Juerd Ah, I was googling for poogle and found nothing relevant :)
This does look like something we could use indeed 13:01
13:01 denis_boyun__ left
masak tadzik: well, can you think of a situation where 'nextsame' would make an observational difference? 13:01
tadzik masak: I just thought of one 13:02
FROGGS jnthn: that'd be nice :o)
tadzik masak: gist.github.com/tadzik/815aa29efaebd5d15adf
13:02 WAAD4CC joined
tadzik this outputs "new from B\nnew from A" 13:03
FROGGS installing v5 using panda takes more than 10m
tadzik if teh class weren't using the StrictConrnsyarntoa it would never say "new from A"
so the nextsame is rong
masak aye.
tadzik: minor thing, but I saw github.com/tadzik/ClassX-StrictCon...ctor.pm#L6 and thought "hm, using the private forms in that string means that a subclass cannot polymorphically override typename and extras in that message" 13:04
jnthn FROGGS: Almost all the rest of the time is taken up in evaluating the test...
masak tadzik: usually, I use the ! forms in command methods and the . forms in query methods, for this reason... YMMV. 13:05
tadzik masak: hm, I see 13:06
but speaking of this nextsame, I found a counter-example
FROGGS jnthn: looks like I need to profile my use-case and then come up with something sane :o)
tadzik m: class A { method new { say "new from A" } }; class B is A { }; B.new
camelia rakudo-moar dca172: OUTPUT«new from A␤»
FROGGS my brane is not very capable of doing this right now sadly
tadzik so adding a StrictConstructor to B should not change anything
so A.new still should get called
so nextsame is necessary after all 13:07
jnthn FROGGS: Well, looks like Junction.ACCEPT being slow is muchly to blame. 13:08
13:10 sqirrel_ joined
FROGGS jnthn: k, I'll have a look at that 13:10
dalek osystem: ed7482a | tadzik++ | META.list:
Add ClassX::StrictConstructor
13:11
tadzik this name is horrible to type :o 13:12
jnthn FROGGS: Yeah, I can get it down to less than half again with a tweak there 13:13
13:13 kaare_ left
tadzik wow, P5's Moosex::StrictConstructor's code is so complicated by comparison 13:13
FROGGS jnthn: uhh, nice 13:14
right now I have the problem that I can't really make v5 pandable because I need to install stuff to nqp's lib folder 13:15
dalek kudo/nom: f9138ba | jonathan++ | src/core/IO.pm:
Optimize IO::Path.contents default test.

Really, we should make Junction.ACCEPTS faster - or junctions faster in general - but this helps further reduce the awful slowness of IO::Path.contents.
13:18
13:23 Sqirrel left 13:24 sivoais left 13:25 Sqirrel joined
jnthn bah, there's more LHF in here to optimize too 13:25
13:26 spider-mario joined
jnthn We really need to be more careful in implementing setting things... 13:26
Sure enough, another .1s off it 13:27
13:27 SamuraiJack__ joined
dalek kudo/nom: d96eb3f | jonathan++ | src/core/IO.pm:
Don't re-dispatch to other new, just bless.

This is the way constructors are meant to be written.
13:29
kudo/nom: 2e758a8 | jonathan++ | src/core/IO.pm:
Just construct IO::Path, don't go via coercion.
jnthn Next up: @list.push 13:38
m: my @a; @a.push(1); @a[0] = 2; say @a 13:41
camelia rakudo-moar dca172: OUTPUT«2␤»
13:51 Pleiades` left 13:54 cognominal left
tadzik eek 13:54
13:54 Pleiades` joined
tadzik m: my @a; @a.push(1); @a[0] = 2; say @a.perl 13:54
camelia rakudo-moar dca172: OUTPUT«Array.new(2)␤»
tadzik ah
jnthn Yeah, it's fine
I meant @list.push performance
I now have a benchmark that took almost 4s running in < 1s 13:55
13:55 cognominal joined
tadzik nice :) 13:55
jnthn but spectest fails :(
14:03 sqirrel_ left 14:16 spider-mario left 14:19 anaeem1_ left 14:20 anaeem1 joined 14:23 anaeem1_ joined, anaeem1 left 14:24 thou joined 14:27 Alina-malina left, anaeem1_ left 14:28 Alina-malina joined, telex left 14:29 thou left 14:30 telex joined
timotimo jnthn: excellent work! :) 14:31
JimmyZ_ :) 14:32
14:32 JimmyZ_ is now known as JimmyZ, guru joined 14:33 guru is now known as Guest415, Guest415 is now known as ajr_
FROGGS[mobile] still very nice improvements :o) 14:34
jnthn Think I got the spectest fails cleared up now too 14:35
Also looking into the for 1..100000 { } -> while loop opt. 14:36
timotimo oh yay
jnthn It's a bit of a cheat for the benchmarks, but afaik Perl 5 also does the same cheat. :) 14:38
tadzik :) 14:39
JimmyZ What a cheat! 14:44
timotimo i don't think it's bad to cheat at this; for ^$n loops are pretty common 14:45
and making them slimmer would be great
14:45 prevost left
JimmyZ +1 14:45
14:46 anaeem1 joined, denis_boyun_ joined
masak what's the actual cheat? 14:46
14:46 SamuraiJack__ left
timotimo turn a for loop into a while loop 14:47
masak oh, that sounds totally legit.
timotimo well, for for loops over ranges, that is
vendethiel you can just eliminate the loop if it's empty, can't you ?
masak in the long run, I would only expect us to retain the for-ishness of for loops if we were actually directly using the iterator somehow.
jnthn 13.5s -> 2.7s. Not bad. 14:49
masak nice.
vendethiel haha :D.
jnthn And since this is the outer loop of various benchmarks... :)
masak m: say "that's around a []x speedup".subst("[]", (13.5 / 2.7).round) 14:50
camelia rakudo-moar 2c54ff: OUTPUT«that's around a 5x speedup␤»
timotimo jnthn: now if we could lower for loops over different iterators, that would be fantastic, too :)
but that seems much harder
jnthn well, yeah, that needs something more
timotimo that's perhaps something that spesh may do at one point when we have inlining?
jnthn Not really
Really, it wants Rakudo's iterators to be a bit more co-operative in the whole process. 14:51
14:51 SamuraiJack__ joined
timotimo OK; sounds like something the big list re-do would be needed for 14:51
14:52 uniejo left 14:53 anaeem1 left
jnthn aye 14:53
This opt is useful independent of that, though. 14:54
14:55 xfix left 14:57 SamuraiJack__ left
masak I have some colored diff test routines and recursive data structure colored diff test routines here that I should probably publish as a module or two. 15:00
timotimo i'm confused, what exactly does that do? 15:02
15:03 xfix joined
jnthn spectests his range opt along with the push/unshift opts. 15:04
15:05 pdurbin left
jnthn oops, off by one :) 15:06
masak .oO( but what's a one between friends, huh? ) 15:08
jnthn it's a few failed spectests :P
15:09 cognominal left
jnthn timotimo: Got a link to the latest bench results you posted, btw? 15:09
15:10 cognominal joined
timotimo gimme a sec 15:14
2014-05-12-spesh_log_and_stuff.html and 2014-05-12-spesh_log_and_stuff_sans_startup.html in t.h8.lv/p6bench/ 15:15
as well as 2014-05-03-return_types.html or 2014-05-03-moar_progress.html
15:20 sqirrel_ joined
jnthn Thanks 15:23
timotimo i should build a static website generator thingie for that or something :) 15:27
15:30 kaare_ joined
masak the WAT for the DWIM of implicit boolification is the semipredicate problem. 15:38
in other words, your two choices are "suffer through strictness" or "risk confusing 'false' with 'not applicable'" 15:39
relatedly, the correct way to spell "is $small part of $large" in code is `defined $large.index($small)`, not `$large.index($small)` 15:40
timotimo oh, yeah :|
wouldn't we use ~~ for that?
masak normally, yes. 15:41
but this was inside an action method.
timotimo ah
masak and I got an error message saying that I oughtn't mess with $/
timotimo mhh 15:42
dalek kudo/nom: ca5ce73 | jonathan++ | src/core/List.pm:
Optimize push and unshift.

Often we're just dealing with single items, so add multi candidates that efficiently handle that case. Need to take a lot of care to get flattening right. Also some small optimizations in the multi-item code paths.
kudo/nom: 1a103e7 | jonathan++ | src/Perl6/Optimizer.nqp:
Optimize for 1..100000 { } loops into while loops.

This pattern shows up especially often in benchmarks, but can crop up in various bits of real-world code also.
timotimo # Range operators we can optimize into loops, and how to do it. ← this comment reads really weird 15:43
jnthn timotimo: Feel free to improve it
timotimo: Also I only did ..
timotimo: But the code is easily extensible for ..^, ^.., ^..^ and prefix ^ 15:44
timotimo: I thought you might like to do those? ;)
tadzik Ilike looking at those optimization commits and wondering under what circumstances an optimizer could do that
masak .oO( range operators we can optimize. and how! ) :P
Juerd Isn't code for ..^ automatically used by prefix ^? :)
timotimo can do, thanks for leaving some crumbs :)
jnthn Juerd: Not sure...not at the level we're analyizing things here 15:45
It may well call ..^ internally
But we can't see into ^
Juerd I thought ^$x would be translated to 0..^$x before most of the rest
jnthn - QAST::Op(call &prefix:<^>) ^ 15:46
Seems not.
timotimo hmm, could compile-time evaluate that to a Range object, no?
masak long term, I should hope so. 15:47
that's just a kind of constant folding, after all.
tadzik unless .. is redefined in that scope, right?
I want to do that:)
timotimo of course
tadzik that'll be the second logical step for my first ever patch to rakudo 15:48
which was the Range.pick optimization :)
timotimo we always inspect the operators to make sure they are the ones from the setting
tadzik okay, I'm going to attempt to do it now :)
timotimo cool
there should be an "is_from_setting" method or something
tadzik I'll probably ask you for your optimization toolkit
I mean, "what was that commandline option for dumping ASTs" 15:49
timotimo ah, --target=ast, --target=optimize
what's the term for the implicit *%_ on methods again? 15:53
tadzik rakudo has reached the point when I stare at the "Stage parse" line and ask "come on, what takes you so long?" :) 15:54
timotimo interface consistency*
tadzik huh, 113 seconds 15:55
ah, that's just powersave mode
shouldn't sub infix:<..>($min, $max) be pure? 15:58
timotimo i think it could be, aye
tadzik then I wouldn't even need to mess with the optimizer probably 15:59
timotimo yes
the others from that group should be, too
tadzik yeah
this would shave the whole 1 call from most loop-y benchmarks :o
timotimo this should also give us a tiny improvement for nested loops 16:00
tadzik yep
timotimo well, since for loops on ranges are going to turn into while loops anyway, it's not that important ;)
we'll also need a candidate for %range_bounds that introspects Range objects rather than operators 16:02
tadzik hmm, adding the pure markers didn't help 16:03
timotimo interesting, maybe the constant folding happens after we look at the other optimization
at the moment, the code doesn't handle &infix:<,> being lexically replaced 16:04
which sounds like a very "interesting" idea in any case
tadzik ah no, I just forgot about --target=optimize 16:08
16:09 cognominal left
jnthn tadzik: If you put in this, it'll likely completely break the opt I just put in. :( 16:09
16:10 cognominal joined, sivoais joined
jnthn tadzik: so if you do it, please update the opt too :) 16:10
tadzik jnthn: what purifying the infix:<..>?
jnthn tadzik: Yeah
tadzik: 'cus the thing I just put in loops for a use of the .. op
tadzik aha 16:11
timotimo it could look at Range objects instead
hm
tadzik huh. if I don --target=ast --target=optimize, all I get is "Unhandled exception: cannot stringify this" 16:12
timotimo does it only look at ranges with QAST::Want endpoints?
only one of those targets is allowed
tadzik ah, that explains stufff :)
16:13 thou joined
timotimo LTA error still. 16:14
it probably tries to stringify a list of "ast, optimize" or something?
tadzik I don't get this: gist.github.com/tadzik/c14a7499b1006be2f14c
there is Range there, _and_ infix:<..>
timotimo aye, one for void context 16:15
for sinking and stuff
not 100% sure why
tadzik doesn't sound necessary
timotimo i think we only ever optimize one of the two branches or something?
16:17 thou left
tadzik I wonder if we need optimizer tests, to make sure that new optimizations don't break the old ones :) 16:18
timotimo would be nice if it were easier to run in isolation; we still have some trouble handling classes from NQP i think 16:19
other than that you can getcomp and call the stages one by one
tadzik there are 58 pure operators in the setting, and 736 unpure ones. It'd be a nasty surprise if someone (me) purified some of them in a good will, and then make stuff slower by accident
well, you could run 'perl6 --target=optimize' and grep for stuff... :P 16:20
timotimo it may be easy enough to grep the optimizer for the names of subs you pure'd
tadzik there we go
or have a superclass of the optimizer that writes logs of opts it makes 16:21
16:21 zakharyas joined
timotimo if we could have lightweight "trace points" in mvm bytecode so that we can output if or how often a given line was hit, that might be interesting 16:24
16:25 thou joined
jnthn has a couple of patches that make the reduce_int_comb_range benchmark a little less of a disaster. 16:26
timotimo oh, cool :)
we need to get better benchmarks if our microbenchmarks are exhausted for optimization opportunities :)
jnthn Well, we need more benchmarks.
timotimo yes
jnthn One idea I had for the JSON parsing benchmark: write a Perl 5 implementation using Parse::RecDescent and building up a similar data structure. 16:27
timotimo so that the comparison is fair? 16:28
dalek kudo/nom: 97ad565 | jonathan++ | src/core/Str.pm:
Optimize .comb().
kudo/nom: d201a27 | jonathan++ | src/core/Mu.pm:
Optimize no-args-to-pass case of >>.meth.

Easy to check once outside of the hyper and then avoid flattening an empty Capture in every time.
jnthn Well, right now there's no Perl 5 impl for that one. 16:29
So there's no comparison. :)
timotimo a few months ago i thought about writing a json parser that doesn't use grammars
so what you said, but the other way around :)
dalek nda: 43822c6 | (Tobias Leich)++ | lib/Panda/Fetcher.pm:
optimize local-fetch by moving things out of the loop
jnthn But I think that's fair. As a data point, the Petamem modules that will be ported to Perl 6 use Parse::RecDescent and will be re-written using Perl 6 grammars.
timotimo that sounds good
tadzik FROGGS[mobile]++ 16:30
FROGGS[mobile]: does it bring a visible improvement in local-fetching?
jnthn So, final benchmark to see if I can make less awful today is forrest fire :) 16:34
FROGGS[mobile] yeah, I'll give you numbers soonish 16:35
16:36 ajr_ left
tadzik awesome 16:36
16:36 guru joined, guru is now known as ajr_, ggoebel111116 joined 16:37 breinbaa1 joined 16:39 sorear left, denis_boyun__ joined, Shozan joined, Shozan left, Shozan joined, erdic_ joined 16:41 sorear joined 16:44 sivoais left, denis_boyun_ left, kurahaupo left, erdic left, ggoebel111115 left, SHODAN left, breinbaas left, erdic_ is now known as erdic 16:47 zakharyas left
timotimo oooh forest fire! 16:49
there's stuff in there that i wish was moar faster in general
also, forest fire is currently b0rked 16:50
no trees ever set other trees on fire
no clue what's going on there
16:50 sivoais joined 16:51 sqirrel_ left
dalek kudo/nom: 17ab8d1 | jonathan++ | src/Perl6/Metamodel/BOOTSTRAP.nqp:
Cache junctional fallbacks in multi-dispatch.

This means we can hit the cache in a bunch of junctional dispatch cases for operators.
16:53
jnthn timotimo: Hm, I've mostly just paid attention to its runtime :P
That helps a little bit. Actually with anything Junction-heavy. 16:54
Proivded it's the multi-dispatcher that catches it.
16:57 zakharyas joined
timotimo oh that seems nice! 17:08
17:20 ajr_ left 17:21 hoverboard joined 17:22 Rotwang left 17:24 Alina-malina left, zakharyas left 17:26 zakharyas joined 17:28 daxim left 17:31 anaeem1 joined
FROGGS eww, panda's rebootstrap.pl infiniloops :/ 17:33
jnthn ugh
17:33 vendethiel left
jnthn Maybe best to bissect to work out what broke it? 17:33
FROGGS yeah 17:34
17:34 krunen left
timotimo ah, that must be why it didn't do anything for a long time last time i tried it 17:39
17:41 daxim joined
jnthn dinner & 17:44
17:51 Alina-malina joined, vendethiel joined 17:55 vendethiel left 18:05 spider-mario joined
FROGGS jnthn: this one introduces the infiniloop: github.com/rakudo/rakudo/commit/2c...4ad14a6de4 18:08
timotimo so it could happen that $cwd_chars is as long as $elem itself?
FROGGS that was possible before 18:09
timotimo er, of course
FROGGS I think only "next unless $elem ~~ $test;" can be the offending (now missing) line 18:10
timotimo i didn't even look at the other differences m)
silly me
my god, this thing is ifdef hell 18:12
hm. well, not quite as bad as i thought
but i gotta run now
FROGGS eww 18:21
jnthn: it infiniloops over stuff like that: 18:22
path=/home/froggs/dev/nqp/install/languages/perl6/site/lib/../../../nqp/../perl6 elem=..
path=/home/froggs/dev/nqp/install/languages/perl6/site/lib/../../../nqp/../perl6 elem=site
path=/home/froggs/dev/nqp/install/languages/perl6/site/lib/../../../nqp/../.. elem=lib
I print that where the additional 'next' was
so one line before '$elem = nqp::substr($elem, $cwd_chars + 1) if self.is-relative;'
err, one line before '$elem = $SPEC.catfile($!path, $elem) if $!path ne '.';' 18:23
18:23 hoverboard left
FROGGS m: say 1 if 'a' eq 'a' | 'b' 18:23
camelia rakudo-moar 17ab8d: OUTPUT«1␤»
FROGGS m: say 1 if 'a' ne 'a' | 'b' 18:24
camelia ( no output )
FROGGS m: say 1 if 'b' ne 'a' | 'b'
camelia ( no output )
18:33 hoverboard joined
FROGGS jnthn: this would be my solution: gist.github.com/FROGGS/217301b3625f919aaf8d 18:37
18:48 rurban_ left
FROGGS okay, looks like .contents is about 10 to 15% faster 18:49
18:54 hoverboard left
pippo m: my @a; @a.push: $("one,two,three".split(','); say @a[0]; 18:55
camelia rakudo-moar 17ab8d: OUTPUT«===SORRY!=== Error while compiling /tmp/U7OWy_zyVS␤Unable to parse expression in contextualizer; couldn't find final ')' ␤at /tmp/U7OWy_zyVS:1␤------> $("one,two,three".split(','); say @a[0];⏏<EOL>␤ expecti…»
pippo m: my @a; @a.push: $("one,two,three".split(',')); say @a[0];
camelia rakudo-moar 17ab8d: OUTPUT«␤»
18:56 rurban_ joined
pippo ^^ Is this correct? 18:56
m: my @a; @a.push: $(<one two three>); say @a[0]; 18:57
camelia rakudo-moar 17ab8d: OUTPUT«one two three␤»
FROGGS m: say "one,two,three".split(',') 18:58
camelia rakudo-moar 17ab8d: OUTPUT«one two three␤»
FROGGS m: say "one,two,three".split(',').item
camelia rakudo-moar 17ab8d: OUTPUT«one two three␤»
FROGGS hmmm 18:59
m: my @a; @a.push: $("one,two,three".split(',')); say @a
camelia rakudo-moar 17ab8d: OUTPUT«␤»
FROGGS m: my @a; @a.push( $("one,two,three".split(',')) ); say @a
camelia rakudo-moar 17ab8d: OUTPUT«␤»
FROGGS m: my @a; @a.push( "one,two,three".split(',') ); say @a
camelia rakudo-moar 17ab8d: OUTPUT«one two three␤»
FROGGS hmmm, I have no idea.. 19:00
m: my @a; @a.push( "one,two,three".split(',').item ); say @a
camelia rakudo-moar 17ab8d: OUTPUT«␤»
19:01 darutoko left, FROGGS[mobile] left 19:04 raiph joined
raiph #perl6: would a P6ian approach to www.reddit.com/r/ProgrammingLanguag...ogramming/ be a variant of "use fail"? 19:08
19:11 zakharyas left 19:12 zakharyas joined 19:18 Alula left 19:19 rurban_ left, zakharyas left 19:23 molaf joined 19:24 Vlavv left 19:30 rurban_ joined
masak raiph: are you thinking of 'use fatal' ? 19:36
19:37 Vlavv joined
dalek kudo/nom: 2b2ab99 | (Tobias Leich)++ | src/core/IO.pm:
do not accidently take .. into dir's .content
19:43
19:50 molaf left 19:53 vendethiel joined
pippo FROGGS: That was working (at least few weeks ago) and now stopped... 19:53
FROGGS p: : my @a; @a.push( "one,two,three".split(',').item ); say @a 19:54
camelia rakudo-parrot 17ab8d: OUTPUT«===SORRY!=== Error while compiling /tmp/DBamSgz2gH␤Bogus statement␤at /tmp/DBamSgz2gH:1␤------> <BOL>⏏: my @a; @a.push( "one,two,three".split(␤ expecting any of:␤ statement list␤ prefix …»
FROGGS p: my @a; @a.push( "one,two,three".split(',').item ); say @a
camelia rakudo-parrot 17ab8d: OUTPUT«one two three␤»
FROGGS hmmm, so it is moarvm specific... 19:55
I guess we should bisect this one
j: my @a; @a.push( "one,two,three".split(',').item ); say @a
camelia rakudo-jvm 17ab8d: OUTPUT«␤» 19:56
FROGGS O.o
vendethiel j: my @a; @a.push( "one,two,three".split(',').item ); say @a.perl; say "one,two,three".split(',').item.perl; 19:58
camelia rakudo-jvm 17ab8d: OUTPUT«Array.new(().list.item)␤("one", "two", "three").list.item␤»
pippo p: my @a; @a.push: $("one,two,three".split(',')); say @a[0];
camelia rakudo-parrot 17ab8d: OUTPUT«one two three␤»
pippo n: my @a; @a.push: $("one,two,three".split(',')); say @a[0]; 19:59
19:59 SevenWolf joined
camelia niecza v24-109-g48a8de3: OUTPUT«one two three␤» 19:59
20:03 hoverboard joined
FROGGS hmmm, building v5 feels ridiculous fast right now 20:10
lizmat good *, #perl6! 20:12
Files=871, Tests=31480, 200 wallclock secs ( 8.24 usr 3.68 sys + 1245.40 cusr 134.37 csys = 1391.69 CPU)
haven't seen a spec test quite so fast in a long time 20:13
20:13 daxim left
lizmat mainly caused by lower CPU usage (I would say about 3% down) 20:13
FROGGS hi lizmat 20:14
lizmat FROGGS o/ 20:15
jnthn evening o/ 20:20
lizmat jnthn o/ 20:21
dalek ecs: 29d4026 | (Elizabeth Mattijsen)++ | S32-setting-library/IO.pod:
Specify IO.* return values and Nil on failure
20:22
lizmat m:say "doesnotexist.t".IO.z 20:23
m: say "doesnotexist.t".IO.z
camelia rakudo-moar 17ab8d: OUTPUT«0␤»
jnthn lizmat: Yeah, I think we lost some off startup time perhaps
20:24 anaeem1 left
FROGGS lizmat: umm, did I messed it up again? ó.ò 20:24
lizmat FROGGS: don't worry
I'll look at it... 20:25
jnthn FROGGS: OK, well, doing the test *twice* is really wrong...
lizmat I also think it should return Nil in that case
as with any of the IO.* methods
if the path does not exist
FROGGS Str.index returns (Int) for not found instead of Nil btw 20:26
20:27 daxim joined
lizmat so you'd expect Bool instead of True/False ? 20:27
FROGGS jnthn: yeah, I guess there is still room for improvement :/
lizmat: I don't know what to expect
lizmat and in the case of IO.s, we'd return an undef Int ?
the Int type I mean :-) 20:28
FROGGS yeah, I dunno
if the file does not exist I'd be happy with Int and/or Nil I think
m: say 'olala'.IO.d 20:29
camelia rakudo-moar 17ab8d: OUTPUT«0␤»
lizmat feels a Bool would be too easily interpreted as False 20:30
m: my Bool $a = Nil
camelia ( no output ) 20:31
lizmat m: my Bool $a = Nil; say $a
camelia rakudo-moar 17ab8d: OUTPUT«(Bool)␤»
dalek kudo/nom: e16709f | jonathan++ | src/core/Junction.pm:
Optimizations to Junction construction.

Means we construct Junctions more quickly, and makes them flatter in nature.
kudo/nom: 19e085f | jonathan++ | src/core/Junction.pm:
Another Junction.new candidate to avoid wrapping.
20:31 hoverboard left, Khisanth left
woolfy First videos of Netherlands Perl Workshop are online now, including talks by lizmat and jnthn: www.youtube.com/channel/UCAsxQEJp-...EDNjvLfjCA 20:34
(thanks to vanHoesel)
jnthn Also, my talk at Mojoconf this weekend was recorded :)
So hopefully will also be online at some point.
lizmat timotimo: you can finally link to jnthn's reactive programming presentation :-) 20:35
www.youtube.com/watch?v=JROvKKei4u8
jnthn Anyway, this was the final jnthn talk until YAPC::EU :)
timotimo: If you fancy kicking off a p6bench run on the latest improvements, it could be interesting. 20:36
20:44 Khisanth joined 20:50 kurahaupo joined 20:51 Alula joined 20:54 spider-mario left 20:59 bjz joined
timotimo will do that later tonight 21:12
how many backends? :)
21:12 kaare_ left
jnthn timotimo: Well, Moar should give us a good idea 21:14
timotimo aye 21:15
21:18 hoverboard joined
masak tadzik: did you see the p6u email about passing excess parameters to .new ? 21:22
tadzik: clearly your new constrictor should be advertized here! :D
tadzik oh, I'll advertise it as soon as I get over the election results :o
lizmat
.oO( boa constrictor? )
21:24
jnthn
21:25
beer attempt &
masak looks at election results 21:27
...wow.
tadzik remember the guy I told you about, that says he candidates to take teh EU money and build a bomb that'll blow it up 21:29
masak yes...? 21:30
(uh oh)
tadzik brb emigrating & 21:31
vendethiel masak: I'm sooo sad. 21:32
21:33 FROGGS left 21:34 bjz left
masak vendethiel: 25%! 21:34
vendethiel: what is happening over there!?
vendethiel I really need to get the fuck out of here.
It's getting literally cancerous
masak :/ 21:35
tadzik vendethiel: where are you?
masak .fr
vendethiel tadzik: france
and basically, the nazi won.
masak tadzik: the racists just got a fourth of the votes.
vendethiel and not the little racists playing in the sandbox, the racists that you still hear went to fascist stuff and so on... 21:36
disgusting
masak tadzik: their party line seems to be "how about we Ebola those immigrants, eh?"
vendethiel exactly
tadzik oh fuck
masak exactly
vendethiel well, before I go and lie down to cry, are there other p6 talks in the NLPW::2014 ?
lizmat how the camel is de-cocooning, but that is really more for Perl 5 people :-) 21:37
vendethiel lizmat: yeah, I noted your and jnthn's talk already :)
woolfy The Dutch extreme-right (PVV) seems to have lost 1 or 2 seats. lizmat and I can stay Dutch for a bit longer... 21:39
vendethiel woolfy: I'll consider coming over
I'm frightened, literally.
well then, g'night y'all :-) 21:40
woolfy vendethiel: i think there is a Dutch company that assimilates a lot of good Perl-developers, you might have a chance... :-)
vendethiel masak: it's heil here (;-).) 21:42
woolfy: I don't p5, though :)
and I'm still in school. That's really the only reason i'm still in france, actually
masak .se is behind the curve, but we seem to be building our own flavor of right-wing extremism and xenophobia.
woolfy vendethiel: I am afraid not much money with p6 can be earned at the moment in The Netherlands...
vendethiel hehe
masak well, there's always stealth usage of p6... 21:43
vendethiel
.oO( The Masak Ninja )
masak (1) write something indispensable (2) deploy it (3) people really like it (4) wouldn't you know, it's written in Perl 6!
(5) ... profit! 21:44
woolfy Cloak on!
vendethiel well, I'm starting to build small blocks to do that :)
I actually had a vision for Styley (p6 css), so I'm gonna try it soon. Sprockets is working, I just need to add filters. And then profit :) 21:45
Real g'night now !
21:45 raiph left
masak 'night, vendethiel 21:46
22:01 denis_boyun__ left
timotimo this time i'll also run benchmarks with CGOTO=1 22:07
dalek ecs: f017efd | (Elizabeth Mattijsen)++ | S32-setting-library/IO.pod:
Further refinement on IO.x methods
22:08
22:11 hoverboard left
dalek kudo/nom: d1b16a1 | (Elizabeth Mattijsen)++ | src/core/IO.pm:
Implement initial say / note optimization

As suggested by jnthn in gist.github.com/jnthn/41dbb7ab7150f6cfd41c
22:13
lizmat other optimization suggested by jnthn currently breaks stuff :-( 22:14
jnthn timotimo: Feel free also to make CGOTO the default on compilers that support it, if you fancy a little configure work. 22:15
lizmat: Yeah, I'll ponder that a bit more.
timotimo no clue how to figure out if that is supported ...
lizmat we need a better way to read / write files in memory, ala open \$foo in Perl 5 22:16
jnthn beer attempt failed... hotel bar + Sunday night = out of luck
lizmat :-(
jnthn lizmat: IO::Capture in the ecosystem? :)
lizmat shouldn't that be in core then ?
jnthn Not sure :) 22:17
We don't have to put *everything* in core. :P
We're already well past 20,000 lines of CORE.setting. 22:18
lizmat indeed, but open \$scalar *is* in Perl 5 core
and it is really useful
jnthn So is CGI.pm :P 22:19
timotimo good one! :)
jnthn I can kinda see the use, yes
lizmat also: looking at the IO::Capture code: it would also break with your more aggresive optimisation
tadzik :>
lizmat CGI.pm is evicted from core in 5.20, or will be in 5.22
jnthn Yeah, well, we never really did say what we expect you to provide if you implement your own IO mechanism.
We should do that. 22:20
lizmat indeed... and we need to, I'm afraid
6.0.0 blocker :-)
jnthn Right.
Yes, S16 will probably want a going over.
tadzik do we have a list of those? :)
jnthn I haven't look at it closely in a while. It used to be this huge bong-full of weird, but I get the impression it's been made at least somewhat saner. :) 22:21
timotimo actually, no CGOTO=1 this time (i can't easily get it in there without much hassle) 22:24
jnthn ok 22:25
But my "if you want to patch Configure" offer/request stands ;)
It's potentially a nearly-free several percent win on everything.
lizmat: I wonder if maybe we want some role that provides things like a .say that can delegate to .print, to keep down the amount needed. And similar such things. 22:26
timotimo fair enough
also, --configure=3 will probably not make it into the benchmark
er
--optimize=3 of course
lizmat jnthn: I was thinking among similar lines
timotimo oh, wait, can i give --gen-moar options? 22:27
if i can, the configure.pl --help output doesn't say 22:28
lizmat jnthn: does nqp::p6box_i box to Int or int ? 22:30
I guess int, right?
jnthn Int
int isn't an object type, it's a native type
So it's unboxed 22:31
lizmat ok, *phew*
I feared we would have a problem with files > 4G in size
jnthn int on MoarVM and JVM is 64-bit anyway... :)
(EU election results) arrrgghhhh, wtf :/ 22:32
lizmat indeed :-(
masak "oh shit, there goes the planet" -- Space Balls 22:34
timotimo oh hey 22:36
the tools/lib/NQP/Configure.pl files have diverged a bit
it seems like there were changes made to gen_nqp in rakudo which weren't ever needed in nqp/ because nqp never gets --gen-nqp 22:37
but i think the files should still be kept in sync if possible
lizmat if these files need to be kept in sync, maybe they should be generated from a common source ?
jnthn timotimo: Makes sense to me
timotimo and it ought to have --moar-option to go along with --parrot-option IMO. 22:38
that would make my life easier with p6bench :)
lizmat IO.changed and friends currently return Int 22:39
timotimo oh, interesting
lizmat shouldn't that a DateTime ?
timotimo NQP/Configure.pl already seems to know about --moar-options
er, --moar-option actually
i'm not sure the unconditional push @opts, "--optimize" would be right if --moar-option has a --optimize=n in it 22:40
hm 22:43
did my mail answer to the passing excess arguments thread reach the mailing list? 22:44
i don't see the bounce
dj_goku jnthn: wow, just walked your talk on Reactive Programming in P6! awesome stuff. 22:46
timotimo walk the talk!
dj_goku s/walked/watched/
:D
timotimo :3
i liked that talk very much, too
jnthn :)
It was a fun talk to give
timotimo and it seemed like you and liz had lots of fun preparing for it :) 22:47
dj_goku That is the type of thing I have a hard time wrapping my head around. I hope with P6 it'll make it easier to do.
lizmat dj_goku: that's the idea :-)
BTW, I'm starting to wonder whether the IO.x methods shouldn't just return an unthrown X::PathDoesNotExist exception if the path does not exist 22:49
return just a Bool (rather than True or False) feels dangeroue
in the sense that a Bool might be easily interpretable as a False 22:50
dj_goku lizmat: awesome.
timotimo yeah, the same pitfall with "defined @list.index($item)"
jnthn Teaching tomorrow, so sleep...
'night, #perl6 22:51
lizmat gnight jnthn !
timotimo gnite jnthn!
22:57 colomon joined
colomon o/ 22:57
timotimo i'd love to get some concurrency-using benchmarks into the benchmark suite 22:58
lizmat colomon o/ 22:59
timotimo: wish we did not have to mark so many S17 tests as todo / skip :-(
timotimo aye :(
23:03 stux|away is now known as stux|away|away
colomon programmed mandelbrot to use promises while up at the in-laws' cabin... 23:04
now pushed to github. 23:05
afk # 5yo bedtime
lizmat gnight colomon!
timotimo cool! :) 23:06
5 years of bedtime? :o
lizmat hmm.. I thought: that's early for colomon to go to bed :-)
dalek kudo/nom: c32fb15 | (Elizabeth Mattijsen)++ | src/core/IO.pm:
IO.* methods return type if path doesn't exist
23:11
masak 'night, #perl6
lizmat gnight masak!
23:12 hoverboard joined
timotimo gnite masak! 23:14
lizmat does .s on a directory make sense ? 23:16
masak it does in Perl 5. 23:17
really sleep & 23:18
geekosaur it *does something* in perl5. I don't think it *makes sense* though; it just treats a dir like a file
(this means in particular that if a directory exists, -s will always pass) 23:19
lizmat oddly enough we're checking for "regular file" in Perl 6 for -z, but not for -s 23:20
geekosaur (also it will fail oddly if the filesystem does not treat directories like files) 23:21
23:22 Timbus_ left
lizmat so, this feels like it could use some improvement... :-) 23:23
23:24 Timbus joined 23:26 BenGoldberg joined
timotimo 28/43 of the first run of 2, maybe i'll add a fresh perl5 run after that 23:27
given i've got a newer gcc this time around
flussence
.oO( but what if you're using the anti-feature from ancient reiser4fs versions where files can act like directories?! :)
23:28
geekosaur gives flussence OS/400 23:30
lizmat well, either both .s and .z should check for fileness, or they both shouldn't 23:31
colomon timotimo: 5-year-old, as in my son. ;)
timotimo i know ;) 23:32
i must say i'm pretty glad jnthn was able to find some stuff to improve in junctions
colomon so, between cleaning up the control loops and doing a very naive parallelization, a mandelbrot that took 120 seconds two days ago takes 20 seconds today. 23:33
timotimo junctions being a very expressive syntax feature that sadly gets pretty costly easily
\o/
colomon interestingly, moar is significantly faster than jvm for this, but returns slightly wrong answers. 23:35
lizmat urgh?
timotimo slightly wrong, eh? 23:36
would you be able to extract some tests from that?
flussence fun with floats/big ints?
timotimo complex i believe
uses Num inside
or num i guess 23:37
colomon It's Complex, which is num inside, I believe. 23:38
but it's not the math, it's the parallel code.
timotimo er, did i write Complex?
we don't have that yet
lizmat colomon: how are you parallelizing ?
colomon we call complex Complex
timotimo there's some trouble with $_, $/, $! maybe being re-used accidentally
colomon lizmat: promise
there is a $_ in there, hmm... 23:39
timotimo try to my $_ nearby and see if that improves things
we definitely need to correct this in the future, though
colomon just changed $_ to a proper variable 23:40
timotimo now that for ^10 is much quicker, maybe we can have the same treatment for for ^10 X ^10 or something :)
colomon nope, still wrong
timotimo ah dang 23:41
colomon www.harmonyware.com/pictures/moar.png demonstrates what I mean by slightly wrong 23:42
dalek kudo/nom: 501a702 | (Elizabeth Mattijsen)++ | src/core/ (2 files):
Make IO.x fail with typed exceptions

This breaks some tests, but it feels right to have checks on non-existing paths fail. But perhaps not right enough for TimToady. So please revert this patch if it is too late to be breaking behaviour like this away from Perl 5.
timotimo wow, ouch
lizmat colomon: I assume you mean the blue spec noise ? 23:43
colomon lizmat: it's not all blue, but yes.
timotimo yeah, seems like it gets results from the wrong spots
and if you remove the number of concurrent threads it gets better?
colomon timotimo: I believe so, but hold a moment. (switch to jvm to generate a correct one) 23:44
timotimo Failed to run command: install/bin/perl6 --optimize=3 /home/timo/perl6/bench/perl6/rc-forest-fire 16 16 8
:\
colomon here's what it should look like: www.harmonyware.com/pictures/jvm.png 23:45
timotimo yeah
lizmat TimToady: if this approach to IO.* methods on non-existing paths is ok, I'll adapt the spec and tests accordingly
timotimo how much faster is moar at this?
colomon timotimo: about 19s vs 32s. 23:46
timotimo mhh, not bad :)
colomon (that's rough, and counting start-up time)
timotimo yeah, start-up for jvm is about 6s on one of my machines
running a 2014.05 rakudo benchmark now 23:47
colomon seems like it's about that here as well
anyway, the crazy thing about this is I just looped on all the lines of the graphic and used start to generate a promise for each. something like 701 threads. 23:48
timotimo well, those aren't "threads" per se
just "jobs"
colomon yeah, wasn't sure.
it's definitely running them in parallel
I can confirm the non-parallel version works fine in moar. 23:49
timotimo i think the thread pool scheduler has a default max thread value built in
rather than asking the computer what's sensible
lizmat 32 atm
timotimo oh, wow.
we have enough ram for that? ;) 23:50
well, i suppose an extra thread is somewhat cheap
lizmat actually: 16
submethod BUILD(:$!initial_threads = 0, :$!max_threads = 16) {
timotimo OK
lizmat threads are cheap, they're not P5 ithreads :-) 23:51
flussence this *might* be the same root problem I was having with moar + threads going haywire, for me it looked like they were scribbling over each other's state
timotimo yes, that could be the case
there are no regexes involved, right? 23:52
lizmat that may well be the case, and it's sort of on jnthn's radar
timotimo i once had code where that was problematic
when i put a lock around the piece of code where a regex was smartmatched against, it worked
colomon check this out:
real0m18.327s
user2m5.557s
that's moar again.
lizmat m: await do for ^1000 { start { 1 for ^10000; .print } }
camelia rakudo-moar d1b16a: OUTPUT«(signal )»
lizmat ^^^ segfaulting :-( 23:53
timotimo :o
flussence Mine was a test file that called .trans on a few dozen things... not regex. Most of the errors seemed to be coming from around that call though 23:54
timotimo i wonder if trans uses regex internally 23:55
lizmat well, the above example, segfaults without any regexes involved
timotimo yes
colomon I seem to be seeing very occasional segfaults as well. 23:56
timotimo i think there's some thread sanitization tools much like ASAN
that may be worth investigating
lizmat like I said, it's on jnthn's radar, but he needs some Quality Time to get to the bottom of it
timotimo right 23:57
colomon yeah, definite issues here running under moar. 23:58
just tried a very small mandelbrot set.
ran in under a second the first two tries, segfaulted the third time.
flussence oh well... at least now I know it's not just my crappy coding to blame again :D 23:59
23:59 volodin661 left
timotimo right 23:59
lizmat ok, it's midnight UTC now, time to go to bed
timotimo we should probably hold off on tooting the "perl6 concurrency is awesome on moar!" for a bit longer
lizmat gnight #perl6!
timotimo gnite lizmat :)