Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-06-16

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:18 tony-o nah
00:19 tony-o here is the one liner i was using
00:19 tony-o my HTTP::Server::Threaded $s .=new; $s.handler(sub ($r,$s) { $s.close("sup"); }); $s.listen;
00:19 tony-o and then: ab <whatever> https://127.0.0.1:8091/
00:26 tinyblak joined #perl6
00:28 laouji joined #perl6
00:29 jepeway joined #perl6
00:40 laouji joined #perl6
00:50 laouji joined #perl6
00:59 tinyblak joined #perl6
01:01 Akagi201 joined #perl6
01:06 BenGoldberg_ joined #perl6
01:11 yeahnoob joined #perl6
01:13 kurahaupo1 joined #perl6
01:49 Gardner joined #perl6
01:50 dayangkun joined #perl6
01:52 timotimo t/07_chunkedrequestecho.t ......... ok - and then it just doesn't do anything any more
01:57 aborazmeh joined #perl6
01:57 aborazmeh joined #perl6
02:04 gagalicious is there a perlbot here?
02:04 gagalicious perlbot : how are u?
02:22 noganex joined #perl6
02:30 [Coke] m: say "hi"
02:30 camelia rakudo-moar 28a769: OUTPUT«hi␤»
02:32 colomon paultcochrane++
02:38 rmgk_ joined #perl6
02:38 prevost joined #perl6
02:45 gerry__ joined #perl6
02:50 BenGoldberg_ m: say 'I am a ' ~ $*PERL ~ ' bot.'
02:50 camelia rakudo-moar 28a769: OUTPUT«I am a Perl 6 bot.␤»
03:00 lizmat joined #perl6
03:33 dalek rakudo/nom: d6430c1 | lizmat++ | docs/ChangeLog:
03:33 dalek rakudo/nom: Fix probable typo
03:33 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d6430c12f0
03:37 lizmat std: my @a = *[1,2.3]
03:37 camelia std 28329a7: OUTPUT«ok 00:00 140m␤»
03:38 lizmat m: my @a = *[1,2.3]; say @a
03:38 camelia rakudo-moar 28a769: OUTPUT«WhateverCode.new␤»
03:38 lizmat m: my @a = *[1,2.3]; say @a.perl
03:38 camelia rakudo-moar 28a769: OUTPUT«[WhateverCode.new]<>␤»
03:38 lizmat feels to me that *[...] makes more sense as a flattening indicator than :[...], because we also use it for slurpies
03:40 skids I can see that but I think I may have actually used *[] in a whatever already.
03:41 lizmat skids: so what does that mean?
03:41 lizmat camelia's output didn't tell me much...
03:41 skids m:  my @lperms = [^16], { [ (7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8)[$_.values] ] } ... *[0]  == 4; @lperms.say
03:41 skids hrm.
03:42 camelia rakudo-moar 28a769: OUTPUT«(timeout)»
03:43 skids weird that works in production...
03:43 skids oh, thats an old file.
03:44 skids Used to work.  Broke at some point and I had to work around it.
03:46 skids m: ($(1,2),$(2,3)).grep(*[1] == 2).perl.say # simpler example.
03:46 camelia rakudo-moar 28a769: OUTPUT«($(1, 2),)␤»
03:47 gerry__ joined #perl6
03:47 labster joined #perl6
03:50 skids Dunno, ban "\_" as a term and use underscore?
03:51 gagalicious http://pastebin.com/60jK1bEk <-- i have some characters like <202e> etc that is seen from inside vim editor... i would like to remove them using the perl substitution but it doesnt work. help.
03:52 labster hm, just managed to segfault my REPL on the second expression.
03:53 skids oh that's P5 code.
03:58 skids So, assuming :[] do we also get @foo:[1,2,3] or is that a syntactic mess?
03:58 skids (as a flattening slice)
03:58 labster .u 202E
03:58 yoleaux U+202E RIGHT-TO-LEFT OVERRIDE [Cf] (<control>)
03:58 TimToady subscripts already flatten
03:59 TimToady the assumption is that you're slicing, and that indices typically want to be integers, not sublists
04:00 skids Ah, so that's one flattening context that will remain.
04:03 skids heheh.  crazy up-too-late idea.  Make term<_> a magical "identity array" and _[] falls out naturally.
04:03 skids Oh I guess that really only works for hashes.
04:05 kaare_ joined #perl6
04:09 skids Maybe the inside-flattener belongs inside the circumfix.
04:09 diana_olhovik_ joined #perl6
04:12 skids m: $[|1,[2,3]].perl.say
04:12 camelia rakudo-moar d6430c: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Hau1DX6rlf␤Arg-flattening | is only valid in an argument list␤at /tmp/Hau1DX6rlf:1␤------> 3$[|7⏏1,[2,3]].perl.say␤»
04:12 skids Isn't that semantically an argument list?
04:14 skids Oh, guess not because adverb part of the capture oes outside.
04:23 Peter_R joined #perl6
04:36 telex joined #perl6
04:40 steve_mc joined #perl6
04:41 tony-o m: $[1,2,3].perl.say
04:41 camelia rakudo-moar d6430c: OUTPUT«(Any, Any, Any)␤»
04:41 gagalicious http://pastebin.com/60jK1bEk <-- i have some characters like <202e> etc that is seen from inside vim editor... i would like to remove them using the perl substitution but it doesnt work. help.
04:42 tony-o m: |$[1,[2,3]].perl.say
04:42 camelia rakudo-moar d6430c: OUTPUT«5===SORRY!5=== Error while compiling /tmp/mdEyy57bSR␤Arg-flattening | is only valid in an argument list␤at /tmp/mdEyy57bSR:1␤------> 3|7⏏5$[1,[2,3]].perl.say␤»
04:44 silug joined #perl6
04:48 spider-mario joined #perl6
04:55 gerry__ joined #perl6
04:56 kurahaupo joined #perl6
04:58 kurahaupo joined #perl6
05:08 Woodi joined #perl6
05:18 gerry__ joined #perl6
05:20 gerry__ joined #perl6
05:21 quester joined #perl6
05:29 gerry__ joined #perl6
05:34 tinyblak joined #perl6
05:47 gerry__ joined #perl6
05:49 diana_olhovik_ joined #perl6
05:59 kaare_ joined #perl6
06:05 _mg_ joined #perl6
06:13 gfldex joined #perl6
06:20 domidumont joined #perl6
06:22 tinyblak joined #perl6
06:25 domidumont joined #perl6
06:26 RabidGravy joined #perl6
06:28 kst joined #perl6
06:28 dalek Inline-Perl5: 7e03fc9 | (Stefan Seifert)++ | t/lib/P5 (2 files):
06:28 dalek Inline-Perl5: Add missing test files
06:28 dalek Inline-Perl5:
06:28 dalek Inline-Perl5: Thanks to quester++ for reporting
06:28 dalek Inline-Perl5: review: https://github.com/niner/Inline-Perl5/commit/7e03fc9eaf
06:28 masak morning, #perl6
06:29 brrt joined #perl6
06:29 masak tony-o: we use `flat` outside of argument lists, and `|` in argument lists... for some reason...
06:32 [ptc] masak: o/
06:32 yoleaux 11 Jun 2015 23:15Z <japhb> [ptc]: rakudo commit ba5fab6 sets a default for :$abs_tol = 0, but then immediately dies unless $abs_tol > 0.  This seems unintentional.  In fact, I don't see why either $abs_tol or $rel_tol == 0 is a problem; it's just the degenerate equality case, rather than approximation.
06:33 Woodi joined #perl6
06:33 [ptc] japhb: actually, the is-approx implementation was just a proposal to be discussed.
06:34 [ptc] japhb: unfortunately, in the end not much discussion happened.  I based the implementation on that which Python uses in SciPy and it seemed a sensible way to do it.
06:34 [ptc] japhb: I'm most certainly open to improvements to the current is-approx implementation
06:39 [ptc] japhb: the reason I proposed the change at all was because the previous implementation was producing inconsistent results.  E.g. very small numbers were always approximately equal even if being wildy different
06:46 abraxxa joined #perl6
06:52 espadrine_ joined #perl6
06:52 gagalicious joined #perl6
06:55 kaare_ joined #perl6
06:56 Sqirrel joined #perl6
06:57 kaare_ joined #perl6
07:01 Ven joined #perl6
07:02 labster m: multi sub prefix:<|> (\a) { a.flat }; say (|[1,2,3]).perl
07:02 camelia rakudo-moar d6430c: OUTPUT«5===SORRY!5=== Error while compiling /tmp/jvrQI4RBsS␤Arg-flattening | is only valid in an argument list␤at /tmp/jvrQI4RBsS:1␤------> 3i sub prefix:<|> (\a) { a.flat }; say (|7⏏5[1,2,3]).perl␤»
07:04 tinyblak_ joined #perl6
07:05 labster n: multi sub prefix:<|> (\a) { a.flat }; say (|[1,2,3]).perl
07:05 camelia niecza v24-109-g48a8de3: OUTPUT«sh: mono: command not found␤»
07:07 dalek Inline-Perl5: a1c1d93 | (Stefan Seifert)++ | / (2 files):
07:07 dalek Inline-Perl5: Check for presence of Filter::Simple P5 module in build scripts
07:07 dalek Inline-Perl5:
07:07 dalek Inline-Perl5: Should give the user a somewhat more usefull error message than
07:07 dalek Inline-Perl5: just test failures.
07:07 dalek Inline-Perl5:
07:07 dalek Inline-Perl5: Thanks to quester++ for the suggestion!
07:07 dalek Inline-Perl5:
07:07 dalek Inline-Perl5: Fixes GH#25
07:07 dalek Inline-Perl5: review: https://github.com/niner/Inline-Perl5/commit/a1c1d93b4d
07:09 Woodi joined #perl6
07:12 kurahaupo1 joined #perl6
07:18 brrt joined #perl6
07:26 darutoko joined #perl6
07:26 masak m: multi sub prefix:<|||> (\a) { a.flat }; say (|||[1,2,3]).perl
07:26 camelia rakudo-moar d6430c: OUTPUT«[1, 2, 3]<>␤»
07:30 FROGGS joined #perl6
07:30 labster masak: Yeah, the grammar hates me.
07:33 FROGGS :S
07:33 FROGGS good morning
07:33 labster good morning FROGGS
07:38 rindolf joined #perl6
07:49 zakharyas joined #perl6
07:55 bjz joined #perl6
08:05 brrt joined #perl6
08:25 laouji joined #perl6
08:35 bin_005 joined #perl6
08:51 espadrine_ joined #perl6
08:58 g4 joined #perl6
09:00 lizmat joined #perl6
09:00 quester left #perl6
09:04 brrt joined #perl6
09:08 Celelibi joined #perl6
09:31 espadrine joined #perl6
09:39 AlexDani` joined #perl6
09:41 mr-foobar joined #perl6
09:50 Ven joined #perl6
09:55 cognominal joined #perl6
09:58 kurahaupo joined #perl6
10:00 RabidGravy m: my @a; @a[0] = 65537; sub foo( @h where * <65536) { say @h}; foo(@a)
10:00 camelia rakudo-moar d6430c: OUTPUT«65537␤»
10:01 RabidGravy clearly the whatever there refers to something other than the individual elements
10:01 RabidGravy is there a way of doing that but constrain the values of the elements?
10:05 psch m: my @a; @a[0] = 65537; sub foo( @h where *.grep(* > 65536) == 0) { say @h}; foo(@a)
10:05 camelia rakudo-moar d6430c: OUTPUT«Constraint type check failed for parameter '@h'␤  in sub foo at /tmp/Z8RhiiJLsX:1␤  in block <unit> at /tmp/Z8RhiiJLsX:1␤␤»
10:06 psch intuitively i wanted "where all(*) < 65536", but that doesn't compile
10:06 psch m: my @a; @a[0] = 65537; sub foo( @h where all(*) < 65536) { say @h}; foo(@a)
10:06 camelia rakudo-moar d6430c: OUTPUT«Cannot call Real(Whatever: ); none of these signatures match:␤    (Mu:U \v: *%_)␤  in sub foo at /tmp/OZUK2M2gWA:1␤  in block <unit> at /tmp/OZUK2M2gWA:1␤␤»
10:06 psch like that
10:06 psch not sure it should, though, Junctions again :P
10:07 psch oh, also the working one probably wants >=
10:09 psch m: my @a; @a[0] = 65537; sub foo( @h where { @^a.grep(* < 65536) == @a}) { say @h}; foo(@a) # or like this
10:09 camelia rakudo-moar d6430c: OUTPUT«Constraint type check failed for parameter '@h'␤  in sub foo at /tmp/_ZOK3qCo4w:1␤  in block <unit> at /tmp/_ZOK3qCo4w:1␤␤»
10:10 psch the all(*) approach does have something, though, but i guess it's an order-of-execution problem
10:11 psch i.e. we can't Junction before we have a parameter but have to, so we try to Junction the Whatever and that breaks..?
10:11 psch something like that, i'd guess
10:12 psch aha
10:12 psch but with placeholders it works
10:12 psch m: my @a; @a[0] = 65537; sub foo( @h where { all(@^a) < 65536 }) { say @h}; foo(@a) # or like this
10:12 camelia rakudo-moar d6430c: OUTPUT«Constraint type check failed for parameter '@h'␤  in sub foo at /tmp/g9QhtiWp2k:1␤  in block <unit> at /tmp/g9QhtiWp2k:1␤␤»
10:12 psch RabidGravy: ^^^ that?
10:13 RabidGravy yeah, that :) cheers
10:13 psch now who to bug about the Whatever not doing the right thing there...
10:13 psch or maybe just for clarification if that *is* the right thing :s
10:22 jnthn Teaching so can't stay long but: no, the * ain't expected to work there, that's not a context where it auto-curries. But why introduce a parameter at all? "where all(@h) < 65536" works
10:22 jnthn That is, just use the nmae of the parameter itself
10:23 psch oh, that works?
10:23 psch that's probably even better, i thought of where taking a closure
10:23 psch but yeah, the actual parameter should still be reachable anyway
10:23 psch m: my @a; @a[0] = 65537; sub foo( @h where all(@h) < 65536 ) { say @h}; foo(@a) # or like this
10:23 camelia rakudo-moar d6430c: OUTPUT«Constraint type check failed for parameter '@h'␤  in sub foo at /tmp/ymKUSc5BM3:1␤  in block <unit> at /tmp/ymKUSc5BM3:1␤␤»
10:23 psch jnthn++
10:23 jnthn yeah, we take care in the binder to put the symbol in place early enough to be sure it works :)
10:24 psch jnthn: can i pick your brain later regarding my path towards standalone executable jars?
10:24 jnthn psch: Can try after teaching; let's see how I feel
10:24 psch jnthn: i'm trying to be able to run precompiled .class files directly, via the RakudoEvalServer
10:24 RabidGravy I'd rather do "subset Short of Int where * < 65536;  sub foo(Short @a) { ... }" but that doesn't appear to work either
10:24 psch jnthn: sure, thanks :)
10:24 jnthn (I'm still digging my way back to full health.)
10:25 jnthn RabidGravy: Array types are nominal
10:26 jnthn That is, you'd have to pass an array declared as a Short array
10:26 jnthn You do know that native arrays work, yes? :)
10:26 jnthn my int16 @arr
10:26 jnthn lunch &
10:27 RabidGravy ooh, that might work.  I didn't now that would but that's even better
10:29 RabidGravy except it doesn't crap out early enough
10:29 RabidGravy m: my int16 @a; @a[0] = 65537; sub foo(int16 @h) { say @h}; foo(@a)
10:29 camelia rakudo-moar d6430c: OUTPUT«1␤»
10:31 psch well, it overflows
10:33 psch RabidGravy: maybe redesigning further up is the better approach.  as in, where does it come up that you might have data outside of your range and can you prohibit it there?
10:34 psch except this might already *be* that spot, in which case i'd go with the where clause
10:34 RabidGravy well it's more where it goes
10:35 RabidGravy it goes into a CArray[int16] which then gets passed to a short * in a native function
10:36 RabidGravy allowing it to wrap not good
10:36 psch just modulo MAX_VALUE :P
10:36 psch clipping is an artistic choice
10:37 psch yeah, no, i guess the where clause does what you need then
10:39 _mg_ joined #perl6
10:47 RabidGravy they are like to be gigantic arrays, I think for the time being its document the constraint and the wrapping behaviour and leave the actual constraint to the user
10:51 RabidGravy though that's not too shabby:
10:51 RabidGravy m: my @a = (^65538); sub foo( @h where all(@h) <65536) { say @h}; foo(@a)
10:51 camelia rakudo-moar d6430c: OUTPUT«Constraint type check failed for parameter '@h'␤  in sub foo at /tmp/otDajGzfZk:1␤  in block <unit> at /tmp/otDajGzfZk:1␤␤»
10:55 Khisanth joined #perl6
10:58 bin_005_r joined #perl6
11:00 psch m: our Int sub f { fail "a" }; f() # RT #64990
11:00 synbot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=64990
11:00 camelia rakudo-moar d6430c: OUTPUT«Earlier failure:␤ a␤  in block <unit> at /tmp/ei0jX01kk7:1␤␤Final error:␤ Type check failed for return value; expected 'Int' but got 'Failure'␤  in any return_error at src/vm/moar/Perl6/Ops.nqp:639␤  in sub f at /tmp/ei0jX01kk7:1␤  in block…»
11:01 psch naively i'd say p6typecheckrv always allows Failure as matching the type check, but that feels iffy
11:07 FROGGS psch: but I think something like that was agreed on...
11:07 FROGGS I remember jnthn talking about it
11:08 FROGGS m: my Int sub f { fail "a" }; f()
11:08 camelia rakudo-moar d6430c: OUTPUT«Earlier failure:␤ a␤  in block <unit> at /tmp/fvgswF03l8:1␤␤Final error:␤ Type check failed for return value; expected 'Int' but got 'Failure'␤  in any return_error at src/vm/moar/Perl6/Ops.nqp:639␤  in sub f at /tmp/fvgswF03l8:1␤  in block…»
11:08 FROGGS m: sub f returns Int { fail "a" }; f()
11:08 camelia rakudo-moar d6430c: OUTPUT«Earlier failure:␤ a␤  in block <unit> at /tmp/mEED5q4MyN:1␤␤Final error:␤ Type check failed for return value; expected 'Int' but got 'Failure'␤  in any return_error at src/vm/moar/Perl6/Ops.nqp:639␤  in sub f at /tmp/mEED5q4MyN:1␤  in block…»
11:12 Sqirrel joined #perl6
11:12 psch i think those examples should all go through p6typecheckrv
11:12 psch i'll give it a try and see what roast says
11:13 silug joined #perl6
11:25 brrt joined #perl6
11:29 bjz joined #perl6
11:31 cdc left #perl6
11:38 skids joined #perl6
11:54 brrt joined #perl6
11:57 tinyblak joined #perl6
12:01 Akagi201 joined #perl6
12:13 Ulti joined #perl6
12:13 Ulti left #perl6
12:13 Ulti joined #perl6
12:16 andreoss joined #perl6
12:19 andreoss use ...::from<java> is intended to be perl6-jvm's only?
12:20 psch andreoss: exactly, moar can't interpret jvm bytecode
12:21 nine Unless someone writes some Inline::Java for Perl 6
12:21 Ulti psch well in theory it could instead do something like Inline::Perl5 for the JVM when on moar
12:22 psch oh, yes, that's probably true
12:22 Ulti or even just talk to rakudo on the JVM to do it :)
12:23 psch i brought the latter possibility up somewhen in the past, iirc
12:23 Ulti like you could probably cross EVAL?
12:23 psch i.e. "if r-m encounters :from<Java> and we have r-j installed should we do something RPC-ish?"
12:24 psch i don't remember what the reply was
12:24 psch in any case, jvminterop is still somewhat lackluster
12:24 Ulti I guess the point is really why would you bother
12:24 Ulti you can just run on the JVM implementation
12:25 psch well, with lexical use i can imagine use cases that want moar (i.e. "fast") most of the time and only fall back on jvm if absolutely neccessary
12:25 psch but that should probably more be motivation to make r-j faster... :s
12:26 nine If you want to split your application between moar and the jvm, you can easily implement it with some IPC mechanism (probably some RESTy thing nowadays)
12:27 psch oh, yes, IPC not RPC
12:28 psch RPC is one way of doing IPC
12:29 * psch makes a note
12:30 nine Since we're talking Java here, it should probably be XMLRPC ;)
12:30 andreoss joined #perl6
12:33 [Coke] **, #Perl6
12:33 andreoss j: say 1
12:33 camelia rakudo-jvm d6430c: OUTPUT«1␤»
12:34 andreoss j: use java::lang::String:from<Java>; my String $x .= new; say $x.perl;
12:34 camelia rakudo-jvm d6430c: OUTPUT«Method 'dispatch:<.=>' not found for invocant of class 'java.lang.String'␤  in block <unit> at /tmp/89KMTsRmbQ:1␤␤»
12:34 psch j: use java::lang::System:from<Java>; System.println("works")
12:34 camelia rakudo-jvm d6430c: OUTPUT«Method 'println' not found for invocant of class 'java.lang.System'␤  in block <unit> at /tmp/BRLJeM6enn:1␤␤»
12:34 psch ah shucks
12:34 andreoss j: use java::lang::String:from<Java>; my String $x ; say $x.^methods;
12:34 camelia rakudo-jvm d6430c: OUTPUT«Method 'parents' not found for invocant of class 'Perl6::Metamodel::JavaHOW'␤  in any methods at gen/jvm/Metamodel.nqp:466␤  in block <unit> at /tmp/XTVBraDBL8:1␤␤»
12:34 psch j: use java::lang::System:from<Java>; System.get_out.println("works")
12:34 camelia rakudo-jvm d6430c: OUTPUT«works␤»
12:34 psch andreoss: it's *really* bare bones at the moment
12:34 psch as in, most of the MOP stuff is missing
12:35 psch andreoss: the working stuff is pretty much only what you can find in t/03-jvm/01-interop.t in the rakudo directory
12:37 Akagi201 joined #perl6
12:37 andreoss are there plans for December release for JVM interop?
12:37 psch i'm poking at it when i feel competent, which has been rare the last few weeks, but i wouldn't rely on it
12:38 psch especially considering it's not really a Perl 6 thing, but a Rakudo thing
12:38 abraxxa joined #perl6
12:39 andreoss psch:thanks
12:45 [Coke] JVM is not mandatory for December, no.
12:46 nine [Coke]: regarding your p5helper.dylib issue. I'm somewhat at a loss, since I cannot test this myself. Does perl6 configure.pl6 give you any clue?
12:50 [Coke] nine - I'm installing via panda. any idea how to get that from a panda session?
12:50 [Coke] if not, I'll try to build it by hand.
12:50 nine [Coke]: sorry, no idea.
12:51 nine Installing manually might give us valuable hints anyway
12:51 [Coke] nine: configure fails miserably.
12:51 [Coke] Perl v5.18.0 required--this is only v5.16.3, stopped at -e line 1.
12:52 [Coke] I wonder why panda doesn't fail there.
12:52 nine Panda does not run configure.pl6 but only what's in Build.pm
12:53 [Coke] um.
12:53 nine I only noticed this morning that Build.pm is missing the Perl 5 version check and added it.
12:53 [Coke] not pushed yet?
12:54 [Coke] I just ran Build.pm and it succeeded.
12:54 nine [Coke]: pushed it as commit a1c1d93b4dfaeeb3150a8f2f622cd7f091d0923d
12:54 nine [Coke]: how did you run Build.pm's build method?
12:55 [Coke] incorrectly? Let me try via panda.
12:56 [Coke] yup, much better. thank you.
12:57 nine I really should try to figure out this ppport.h thing. Should make it possible to support older perls.
12:57 [Coke] is the perl you have in your path the perl that used at runtime? or is it whatever perl is in your path then?
12:58 aborazmeh joined #perl6
12:58 aborazmeh joined #perl6
12:59 nine At runtime it should use the libperl of the perl found in $PATH during configure/Build time
13:02 [Coke] perl6 -e 'use Inline::Perl5; my $p5 = Inline::Perl5.new(); $p5.run("print 3333");'
13:02 [Coke] ^^ should that print something?
13:03 [Coke] ah, I probably want print $p5.run("3333");
13:03 [Coke] but where does the output from .run go?
13:03 nine A definite maybe.
13:04 [ptc] domidumont: ping
13:04 nine It should, but output buffering may be a problem. Try $p5.run(q{print "3333\n"});
13:04 [Coke] nine: works
13:09 hoelzro good morning, #perl6
13:09 [ptc] hoelzro: o/
13:09 hoelzro o/ [ptc]
13:19 _mg_ joined #perl6
13:21 PerlJam good morning
13:22 hoelzro morning PerlJam
13:24 PerlJam hoelzro: What's new in your world?
13:24 yqt joined #perl6
13:24 hoelzro PerlJam: giving a Perl 6 talk in Milwaukee on Thursday, and banging my head against a wall on RT #125407
13:24 synbot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=125407
13:24 hoelzro yourself?
13:25 PerlJam still recovering from helping my wife with an annual gymnastics competition.  (my first time not being in the audience)
13:25 psch hoelzro: i looked at AST dumps from those examples, and it's just weird :s
13:26 isBEKaml joined #perl6
13:26 lizmat joined #perl6
13:26 hoelzro PerlJam: does your wife compete, or was she there to help things along?
13:26 hoelzro psch: yes, indeed
13:27 hoelzro my research has lead me into the far-off land of EXPR
13:27 elimik31 joined #perl6
13:27 PerlJam hoelzro: She's the director of the local organization (Sokol).  Every year they do it at a different location in Texas.  This year it was here.
13:28 hoelzro ah, ok
13:28 Ven joined #perl6
13:29 PerlJam RT #125407 is a weird one
13:29 synbot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=125407
13:31 skids joined #perl6
13:33 psch the obvious assumption is that some prec state gets carried over into the next statement in the wrong case
13:33 psch but i think that'd be in EXPR, and... :S
13:40 domidumont [ptc]: yes ?
13:41 hoelzro psch: that's where I'm looking right now
13:42 hoelzro and digging into it, and the notion that there may be a bug lurking in there, disturbs me
13:42 psch hoelzro: yeah, i saw that, belatedly.  i have no idea how to make sense of EXPR, i'll readily admit...
13:44 abraxxa joined #perl6
13:48 isBEKaml p: my @a = <1 2 3>; all(@a) > 5; none(@a) > 5;
13:48 isBEKaml m: my @a = <1 2 3>; all(@a) > 5; none(@a) > 5;
13:48 camelia rakudo-moar d6430c: OUTPUT«WARNINGS:␤Useless use of ">" in expression "all(@a) > 5" in sink context (line 1)␤»
13:49 isBEKaml m: my @a = <1 2 3>; say all(@a) > 5; say none(@a) > 5;
13:49 camelia rakudo-moar d6430c: OUTPUT«all(False, False, False)␤none(False, False, False)␤»
13:52 [ptc] domidumont: I just wanted to ask a question regarding rpath overrides and lintian, however I think I worked it out
13:52 [ptc] domidumont: I just updated moarvm so that it builds for version 2015.05
13:52 domidumont [ptc]: ok, cool
13:53 [ptc] domidumont: nqp 2015.05 should be on its way sometime soon as well
13:53 domidumont [ptc]: are you working in sync with Daniel ? (I'd rather avoid duplicated work)
13:54 [ptc] domidumont: not as far as I know... I'd like to avoid duplicated work as well
13:54 [ptc] domidumont: my plan was to send an email to the list letting everyone know about the updates
13:55 [ptc] domidumont: is he in this irc channel?
13:55 domidumont [ptc]: yes as nebuchadnezzar
13:55 [ptc] domidumont: ok, thanks
13:56 * domidumont goes back to angularjs :-/
13:57 [ptc] domidumont: he'd already updated the source to the upstream 2015.05 version, I just patched the things which needed patching in order to get debuild to work
13:59 abraxxa joined #perl6
14:00 domidumont [ptc]: no problem.
14:03 [ptc] .tell nebuchadnezzar I've patched the files in the moarvm package so that debuild builds correctly, and pushed the changes to alioth.  Just wanted to let you know :-)
14:03 yoleaux [ptc]: I'll pass your message to nebuchadnezzar.
14:05 colomon [ptc]++
14:05 itz joined #perl6
14:11 smls joined #perl6
14:13 smls jnthn or timotimo: Does https://github.com/perl6/gtk-simple/pull/11 look alright?
14:13 abraxxa joined #perl6
14:14 dalek gtk-simple: e55d10c | smls++ | lib/GTK/Simple.pm6:
14:14 dalek gtk-simple: Provide a 'spacing' property for GTK::Simple::Box
14:14 dalek gtk-simple:
14:14 dalek gtk-simple: This is analogous to the 'border_width' property of GTK::Simple::Container.
14:14 dalek gtk-simple: review: https://github.com/perl6/gtk-simple/commit/e55d10ce62
14:14 dalek gtk-simple: 09a6cac | smls++ | lib/GTK/Simple.pm6:
14:14 dalek gtk-simple: Allow setting the 'text' property in GTK::Simple::Entry.new
14:14 dalek gtk-simple:
14:14 dalek gtk-simple: GTK::Simple::Label.new(text => 'foo') works, so GTK::Simple::Entry.new(text => 'foo') should too.
14:14 dalek gtk-simple: review: https://github.com/perl6/gtk-simple/commit/09a6cac8f4
14:14 dalek gtk-simple: f9fbfb9 | timo++ | lib/GTK/Simple.pm6:
14:14 dalek gtk-simple: Merge pull request #11 from smls/master
14:14 dalek gtk-simple:
14:14 dalek gtk-simple: two small additions
14:14 dalek gtk-simple: review: https://github.com/perl6/gtk-simple/commit/f9fbfb9daa
14:14 tadzik timotimo++ standing guard
14:14 smls thanks :)
14:14 tadzik smls++
14:15 smls Oh, and in case someone is looking for an array munging benchmark with *lots* of room for Rakudo improval: http://rosettacode.org/wiki/Perfect_shuffle#Perl_6
14:16 smls ^^ takes 1.1 seconds in Perl 5, but over 14 minutes in Rakudo
14:20 smls s/improval/improvement/  # my brain is weird :P
14:22 timotimo yw
14:23 timotimo smls: run a profile please? :)
14:23 smls how? never done it before :)
14:23 timotimo perl6 --profile foobar.p6
14:23 smls ok
14:23 abraxxa joined #perl6
14:24 dalek ecosystem: 53cea7c | RabidGravy++ | META.list:
14:24 dalek ecosystem: Add Audio::Sndfile
14:24 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/53cea7c214
14:24 RabidGravy there
14:24 RabidGravy that took longer than I expected
14:24 tadzik oh :)
14:26 RabidGravy not particularly useful just at the moment unless you're into generating your own sounds or writing a convertor
14:32 smls RabidGravy: nice
14:33 isBEKaml joined #perl6
14:33 isBEKaml joined #perl6
14:33 timotimo i'd be very interested to see what exactly makes that perfect shuffle thing slow
14:34 timotimo i think i'd say it's Z
14:34 telex joined #perl6
14:34 PerlJam I was guessing it's all the copying of those array elements.
14:34 timotimo hmm
14:36 smls The  [<] @deck  probably doen't short-circuit, but replacing it with  @deck eqv @original  doesn't make much of a difference in performance so I kept it.
14:36 timotimo huh, it could learn to short-circuit if it can't already
14:36 timotimo < is a simple chain op
14:37 timotimo and those are always and-ed together, so METAOP_REDUCE could very well learn about it
14:37 timotimo bbiab
14:37 smls but the [] reduce-metaop does not preserve short-circuiting behavior
14:37 smls according tio the specs
14:40 moritz I guess it can't presevere the short-circuiting of thunking ops like && and ||
14:40 moritz and that's what the specs mean
14:41 moritz but [<] is free abort on first False
14:41 lolisa joined #perl6
14:41 smls ah, makes sense
14:42 smls timotimo: https://gist.githubusercontent.com/smls/76283bc497f26de98407/raw/perfect_shuffle_profile.htm
14:42 * moritz is building funny pipeline DAGs with gocd
14:53 rindolf joined #perl6
14:56 timotimo smls: 404 :(
14:56 timotimo oh, wait
14:58 moritz http://moritz.faui2k3.org/tmp/perfect_shuffle_profile.html # rendered as actual HTML
14:59 timotimo smls: using "div" instead of / for the mid point can remove the tiny bit of time spent working with rational numbers
14:59 moritz but the big time sink is list iteration, again :(
15:00 timotimo oh how surprising ... the top allocated thing is Scalar, the top allocators are gimme, reify, REIFY and an <anon> that's just reify again
15:00 FROGGS joined #perl6
15:00 timotimo and for some reason we are hitting the slow path binder :\
15:02 yqt joined #perl6
15:03 rurban joined #perl6
15:04 timotimo i'd love to see a version that just allocates an appropriately sized list and throws the values into it from the source array, just to see how many orders of magnitude that's faster
15:05 isBEKaml joined #perl6
15:09 timotimo holy wat
15:09 timotimo oh, lazyness strikes again
15:10 timotimo we spend 30.6% of time inside perfect-shuffle and 68% in STORE (just looking at the frame for the loop that calls perfect-shuffle)
15:11 timotimo but that's just because perfect-shuffle gets to defer a bunch of work to reifying the list
15:11 psch $ ./perl6-j -e'our Int sub f { fail "a" }; say f() ~~ Failure'
15:11 psch True
15:11 psch ...that took longer than expected :s
15:11 psch now how do i do that on moar..?
15:11 moritz wait, what?
15:12 psch moritz: http://irclog.perlgeek.de/perl6/2015-06-16#i_10756235
15:14 * moritz not convinced that is workable
15:14 moritz if we optimize based on the type, we can't allow exceptions
15:14 timotimo we are good at deopting
15:14 timotimo at least for dynamic optimizations
15:15 sjn_phone joined #perl6
15:16 psch well, i've patched it as written in the clog, as the last check in p6typecheckrv
15:17 psch e.g. after the "is it maybe unboxable"
15:17 smls timotimo: What do you mean by "just allocates an appropriately sized list and throws the values into it from the source array"?
15:17 psch so dynopts should've already happened before we end up there anyway, or not?
15:17 timotimo do the Z yourself
15:18 timotimo psch: i'm not sure we do any optimizations based on the defined return value of a sub at the moment
15:18 smls ah, like the Perl 5 version?
15:18 timotimo oh
15:18 timotimo i didn't know the perl 5 version did it like that
15:18 smls "map { @_[$_, $_ + $mid] } 0..($mid - 1);"
15:19 nebuchadnezzar [ptc]: thanks, FROGGS made some patches too, maybe the same?
15:19 yoleaux 14:03Z <[ptc]> nebuchadnezzar: I've patched the files in the moarvm package so that debuild builds correctly, and pushed the changes to alioth.  Just wanted to let you know :-)
15:19 psch timotimo: we have "optimize_p6typecheckrv" in Optimizer.nqp, but that seems to not do particularly much
15:19 timotimo also, i wonder what happens if you @deck := perfect-shuffle @deck
15:19 psch lines 1183ff
15:19 timotimo psch: i'd guess that just possibly throws out the type check if the thing we're returning is already proven to be of the right type
15:20 [ptc] nebuchadnezzar: I only made patches to the debian package.
15:20 [ptc] nebuchadnezzar: I'm guessing FROGGS made patches to MoarVM itself?
15:20 psch timotimo: yeah, that interpretation makes sense...
15:22 TimToady I did a few stats on the dynvar caching last night, and discovered what I expected, that we're kinda overwhelming the 1-per-frame cache, according to https://gist.github.com/TimToady/fe858b303f9d033365d9
15:23 TimToady when I last worked on that cache, I got it tuned to about 5 frames average, but most of the symbols average quite a bit more than that now
15:23 TimToady and we're traversing 11 million frames to look up $*ACTIONS
15:24 TimToady so we really need that better cache we discussed a few weeks ago
15:25 smls timotimo: Interestingly,  .map({ @deck[$_, $_ + $mid] })  seems to be significantly slower than  map({ @deck[$_], @deck[$_ + $mid] })
15:25 TimToady $*MAST_FRAME is averaging 34 frames per lookup
15:25 nebuchadnezzar [ptc]: yes, and provide gists to add debian patches if I understand correctly
15:26 timotimo smls: doesn't surprise me terribly much, to be honest :(
15:26 smls timotimo: := instead of = seems to help a little, too.
15:26 timotimo smls: i wonder how well we're doing with regards to lazyness when we use := there
15:27 timotimo hm. well, we'll pretty much always grab the very first element and the first one after the middle
15:27 timotimo because we start comparing the first and second element every time
15:27 timotimo so lazyness doesn't help us terribly much there
15:27 timotimo anyway, gotta be afk for a bit
15:32 TimToady oh, those dynvar stats were from compiling the setting
15:32 FROGGS [ptc]: I patched MoarVM for GNU/kFreeBSD and provided a patch for libuv
15:33 dalek Inline-Perl5: 0064616 | (Stefan Seifert)++ | README.md:
15:33 dalek Inline-Perl5: Add some hints on where to obtain a libperl.so on Debian and Fedora
15:33 dalek Inline-Perl5:
15:33 dalek Inline-Perl5: Some Linux distributions seem to split perl into multiple packages.
15:33 dalek Inline-Perl5: Thanks to Benjamin Tietze for the suggestion.
15:33 dalek Inline-Perl5: review: https://github.com/niner/Inline-Perl5/commit/006461643e
15:34 RabidGravy psch, I sent a quick PR for Audio::PortAudio - but it seems it also tickles something related to #125408
15:34 synbot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=125408
15:36 Ven joined #perl6
15:37 rurban joined #perl6
15:45 FROGGS[mobile] joined #perl6
15:45 abraxxa joined #perl6
15:46 JimmyZ_ joined #perl6
15:47 captain-adequate joined #perl6
15:47 japhb .tell [ptc] Oh, I wasn't complaining about the general set of is-approx patches (dealing with very large or small numbers well is important to the use case), I was specifically saying that that particular commit seemed to have a couple bugs in it.
15:47 yoleaux japhb: I'll pass your message to [ptc].
15:50 japhb .tell smls La la la la, please make that a https://github.com/japhb/perl6-bench minibenchmark ...    # re: http://irclog.perlgeek.de/perl6/2015-06-16#i_10757135
15:50 yoleaux japhb: I'll pass your message to smls.
15:51 japhb .oO( Might as well sing it, it feels like the chorus of my #perl6 song at this point )
15:51 psch RabidGravy: line 68 in which file tickles the bug?
15:51 RabidGravy in the test.pl
15:51 psch ah
15:52 psch hm, native nums :/
15:52 smls japhb: I'll look into that :P
15:52 RabidGravy it's something to do with assigning to an item in a NumTypedCArray under some circumstance
15:52 psch the underrun is most likely performance in generating data or iteration or something
15:52 psch i.e. should get better eventually
15:52 psch i think i prefill the data, so it should be just iteration
15:53 Gardner joined #perl6
15:53 psch consider with 44100hz we have that many values per second to deliver to the audio device
15:54 RabidGravy oh for sure
15:54 psch but idk, i do know that i had plenty of underruns too, pretty much constantly
15:55 psch the thing with jvminterop that i started used an osc written in java...
15:55 psch and even that dropped frames occassionally
15:57 spider-mario joined #perl6
16:00 diana_olhovik_ joined #perl6
16:01 telex joined #perl6
16:03 psch RabidGravy: i've added you as a collaborator
16:03 psch to that repo
16:03 psch 'cause that's probably the way forward if it's supposed to go into the ecosystem, as i'm kinda at capacity with the jvm things i want to do
16:04 psch with the underrun issue i'm reminded that i wanted to try offline rendering, though
16:06 psch hm, the Failure patch from above gives me a TODO passed in S02-types/native.t..? o.O
16:07 psch and 10 failures across a few files, 3 of those in S17
16:07 RabidGravy sounds like a plan, I might test it out with some input from a file
16:09 psch heh
16:09 psch a failure in S02-types/deprecations.t
16:09 psch expected version, name
16:09 psch got name, version"
16:09 psch ...paraphrased
16:11 psch m: my num32 $x; say $x
16:11 camelia rakudo-moar d6430c: OUTPUT«0␤»
16:11 psch m: my num64 $x; say $x
16:11 camelia rakudo-moar d6430c: OUTPUT«NaN␤»
16:11 psch j: my num32 $x; say $x
16:11 camelia rakudo-jvm d6430c: ( no output )
16:12 psch j: my num64 $x; say $x
16:12 camelia rakudo-jvm d6430c: OUTPUT«NaN␤»
16:12 psch num32 works with my patch for RT #64990...
16:12 synbot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=64990
16:13 psch but further FAILs look like they need more attention than i have right now
16:13 psch bbl o/
16:16 sjn_phone joined #perl6
16:16 uncleyea1 joined #perl6
16:28 molaf joined #perl6
16:28 StavroMueller joined #perl6
16:32 gfldex joined #perl6
16:38 RabidGravy if one has a Signature object in hand, what can you do with it?
16:38 [Sno] joined #perl6
16:42 [ptc] japhb: do you think the implementation as it currently stands is sound?
16:42 yoleaux 15:47Z <japhb> [ptc]: Oh, I wasn't complaining about the general set of is-approx patches (dealing with very large or small numbers well is important to the use case), I was specifically saying that that particular commit seemed to have a couple bugs in it.
16:45 diana_olhovik_ joined #perl6
16:50 skids m: Signature.^methods.say; say Signature.^attributes.map: *.name # RabidGravy
16:50 camelia rakudo-moar d6430c: OUTPUT«<anon> <anon> <anon> <anon> arity count params returns ACCEPTS perl gist␤$!params $!returns $!arity $!count $!code␤»
16:51 [ptc] nebuchadnezzar: sorry if I trampled on anyone's work.  I basically assumed that since there were no new commits to the Alioth repos that I could go ahead and update the MoarVM and nqp projects
16:58 skids psch: Some of the num32 behavior is http://irclog.perlgeek.de/p​erl6/2015-06-13#i_10746333 and RT#124084
16:58 synbot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=124084
17:10 [particle]1 joined #perl6
17:10 uncleyear joined #perl6
17:12 masak getting RT tickets from Zefram is like being knocked unconscious by a bottle of really fine champagne.
17:12 masak (hi #perl6)
17:13 _mg_ joined #perl6
17:14 psch skids: the clog bit doesn't seem particularly related, but the ticket is exactly what seems fixed by my change
17:14 psch skids: i just have no clue *why* my change would fix it... :)
17:14 skids Which change?
17:15 psch a fix for RT #64990
17:15 synbot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=64990
17:15 psch i.e. let Failure always match return type constraints of subs
17:15 psch so it doesn't blow up with TypeCheck::Return
17:15 skids Right, but is the patch anywhere viewable yet?
17:15 japhb .tell [ptc] Your calculation for the implementation which takes a $tol parameter (the second one) will always fail if $expected == 0 and $tol < 1, because then $abs-diff == $abs-max == $got and $rel-diff == 1.
17:15 yoleaux japhb: I'll pass your message to [ptc].
17:16 psch the change does seem to break something with passing the Junction type into subs, which i'll look at next...
17:16 [particle] joined #perl6
17:16 skids And does it fix my num32 = 3e0 for example?
17:17 psch $ ./perl6 -e'my num32 $x; my num32 $y = 3e0; say $x ~ " " ~ $y'
17:17 psch NaN 3
17:17 psch that's -j, btw
17:17 psch dunno if the bug exists on moar
17:18 jnthn Sized integer types in lexicals are barely implemented in Moar
17:18 skids m: my num32 $x = 3e0; $x.say
17:18 camelia rakudo-moar d6430c: OUTPUT«0␤»
17:18 jnthn In fact, we generated invalid code for them that the verifier should probably be rejected.
17:18 jnthn *rejecting
17:18 psch j: my num32 $x = 3e0; $x.say
17:18 camelia rakudo-jvm d6430c: OUTPUT«3␤»
17:18 psch the NaN bit is broken on camelia iirc
17:18 psch j: my num32 $x; say $x
17:18 camelia rakudo-jvm d6430c: OUTPUT«NaN␤»
17:18 psch eh
17:18 psch nevermind then :P
17:18 psch must've been seeing things :)
17:19 japhb .tell [ptc] The implementation which takes a :$rel_tol and :$abs_tol (the third one) allows *either* tolerance to succeed, and there doesn't seem to be a way to require both; that may or may not matter.  Also, using Numeric for the tolerances leaves me wondering about the exact behavior if the tolerances are Complex instead of Real.
17:19 yoleaux japhb: I'll pass your message to [ptc].
17:19 psch jnthn: Moar verifier?
17:19 jnthn psch: MoarVM's bytecode verifier
17:20 jnthn I suspect it's too lax somewhere
17:20 psch ah, okay
17:20 japhb psch: Moar has a bytecode verifier that makes sure the bytecode is sane enough to even try executing.
17:20 jnthn "num32...num64...what's that between friends" :)
17:20 jnthn It does the same with the sized int types, but you get away with it on LE :P
17:21 psch well, that explains the TODO passed i get in S02-types/native.t — it's not fudged for only moar even though it should be, 'cause jvm seems to do it right
17:22 skids Yes that was added very recently.
17:22 psch aside from that i get 3 FAILs that could be said to be wrong tests, because they expect TypeCheck::Return instead of DivideByZero
17:22 psch on FAIL that's expecting order where there isn't any to be expected
17:23 psch and flappers and java-version-dependent TODO passed
17:23 psch and one test that definitely isn't working right anymore so i'd have to look at that
17:23 cognominal flappers?
17:23 psch S17 FAIL that go away when the file is ran standalone
17:24 psch unicode being dependent on jvm version is kind of iffy i feel sometimes
17:25 jnthn I really dislike the whole "Failure sneaks through" thing
17:25 psch jnthn: it was a ticket, i just tried to make it work as expected from the ticket... :s
17:25 jnthn I suspect the optimizer will need a look over.
17:26 jnthn psch: I wasn't saying "Failure sneaks through" isn't the Perl 6 design, just that I think it's bad design. :)
17:26 jnthn I feel the same about Nil, though.
17:27 rindolf joined #perl6
17:27 jnthn (which needs special handling on assignment)
17:27 skids The alternative is the user has to catch thrown exceptions and turn them soft, if that's the desired behavior.
17:28 jnthn If we are going to not be able to rely on return types, though, then we may want to consider dropping our compile-time signature analysis just to consider natively typed things.
17:28 skids I see the design as sort of "NaN for OO"
17:29 psch i'll admit i don't see all the implications
17:29 psch for me it's mostly confusing to see TypeCheck::Return when fail()ing from a sub
17:30 prammer joined #perl6
17:30 lolisa joined #perl6
17:30 jnthn sub foo(Int $x) { ... }; sub bar() returns Int { ... }; foo(bar()) # can't compile-time dispatch foo
17:32 jnthn But I think we may well have code that tries to do so today in the optimizer; if so, that may be the source of some failures.
17:32 psch the FAIL i have that looks most related is in S03-junctions/misc.t
17:33 psch 'sub foo($) { }; foo(Junction)'
17:33 psch throws AdHoc instead of TypeCheck::Binding
17:33 psch with null for varName in the Binder
17:33 psch line 364 in Binder.java
17:34 skids An argument could be made for "compile-time-dispatch anyway and let the Failure blow up inside foo() at runtime"
17:35 jnthn skids: It may actually *not* blow up
17:35 skids (For implicitly |Failures on the constraint, but not for returns Failure)
17:35 jnthn Because when we compile-time inline we lose the constraints. :)
17:36 jnthn That's part of the point of doing it.
17:37 domidumont joined #perl6
17:37 skids When inlined the part of bar that returns the failure would count as a use of the failure (for the multidipatch) and should then explode, no?
17:38 jnthn skids: We'd not inline something that calls fail(...) anyway at the moment; it's the inlining of foo that is at issue
17:39 jnthn (we toss any signature checks when inlining because we "proved" they aren't needed)
17:40 jnthn The issue is that we simply can't rely on the "returns" to provide useful type information for the optimizer for the non-native case when a Failure may also be returned.
17:40 skids So you'd have inlined foo with a call to bar which could return a Failure where you think you have an Int.
17:40 jnthn Right
17:42 sjn_phone joined #perl6
17:42 skids My immediate reaction is that bar() should have beenrewritten into sepearate entry points one of which returns failures, the other of which where any return fail raises exceptions.
17:43 jnthn That's too much work to be bothered with in the static optimizer.
17:43 jnthn It has no stats on if it's work is even worthwhile.
17:44 skids sorta like us humans? :-)
17:44 jnthn Indeed :P
17:44 jnthn Anyway, we mostly want to stick to simple trnasforms there
17:44 jnthn (Like unpicking simple Junctions)
17:44 jnthn Along with inlining natives
17:45 jnthn And tbh, now we know how spesh and indy look, I think maybe we can just leave compile-time inlining explicitly for natives.
17:46 jnthn So maybe I should stop worrying, simplify Perl6::Optimizer, and be happy. :)
17:48 jnthn (At the time I wrote the analyses in question, we were targeting Parrot, which has nothing like spesh/indy.)
17:51 araujo joined #perl6
17:51 araujo joined #perl6
17:52 jnthn psch: src/Perl6/Optimizer.nqp:1865 and :1952 are the lines that'd need guarding for native types only, fwiw
17:52 psch jnthn: alright, i'll take a note of that
17:53 psch first gotta figure out that test failure and port my changes to moar too
17:53 jnthn psch: To port to Moar you probably want to look in src/moar/Perl6/Ops.nqp or src/moar/ops/perl6_ops.c
17:54 psch yeah, i think the former
17:54 psch i think i saw p6typecheckrv there
17:54 jnthn *nod*
17:58 jnthn dinner &
18:08 dalek perl6-roast-data: b96151f | coke++ | / (9 files):
18:08 dalek perl6-roast-data: today (automated commit)
18:08 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/b96151f3f5
18:11 sjn_phone joined #perl6
18:12 ab5tract hmm.. searching doc.perl6.org for '>>' returns only a link to regex
18:12 ab5tract are we missing docs for hyper ops?
18:12 ab5tract I also couldn't find docs on [&infix]
18:12 colomon ab5tract: did you try looking for »  ?
18:13 ab5tract colomon: that one returns docs for Quote as well ;)
18:14 ab5tract (I also couldn't remember/unpack what the [&infix] form of [] would be called. 'circumfix:<[ ]>' makes the most sense. is it implemented as a multi, with one for &infix behavior and one for creating Arrays?
18:16 psch [&infix] is META_REDUCE in Grammar.nqp iirc
18:16 psch i.e. [+] @ints
18:16 ab5tract psch: right, that's the one.
18:17 psch so the "Reduction Meta-Operator" i suppose
18:17 psch eh, maybe not
18:17 psch Z and X are listed as reduction operators in the design
18:18 ab5tract psch: thanks for digging :
18:18 psch hm, no, i misinterpreted skimming of the google summary of S03 :P
18:19 ab5tract :)
18:19 ab5tract heh
18:19 psch S03:Reduction_operators
18:19 synbot6 Link: http://design.perl6.org/S03.html#Reduction_operators
18:19 * ab5tract is writing a proposal YAPC::EU
18:20 ab5tract *for YAPC::EU
18:26 ab5tract tentative title: 'Whatever, or How I Stopped Fearing and Fell in Love with this Op'
18:29 [Coke] I'm pretty happy that we have a p5er dealing with the stuff on the language list. :)
18:30 colomon [Coke]: you mean the uninformed trolling on the language list?  ;)
18:30 [Coke] aristotle++
18:30 [Coke] Everyone who wants to respond to those, take a deep breath. :)
18:30 ab5tract [Coke]: is there a list archive available?
18:31 colomon aristotle++ indeed
18:31 colomon ab5tract: trust me, it is not worth reading.
18:31 ab5tract well, the language list might be
18:32 colomon ab5tract: actually, the language list in general has very rarely been worth reading in the last 7 years.
18:32 ab5tract ok
18:35 bbkr joined #perl6
18:35 smls joined #perl6
18:36 smls timotimo: https://gist.github.com/smls/a1f6033c142202bddc4d <-- full report on the 'Perfect Shuffle' thing :P
18:38 smls turns out the line zipping the half-lists is indeed responsible for most of the run time
18:39 colomon ab5tract: the archive is http://www.nntp.perl.org/group/perl.perl6.language/ but seriously, the list basically functions as a honeypot for people who have Very Important Ideas about language design, but can’t be bothered to figure out real discussion occurs on #perl6
18:43 ab5tract colomon: gotcha
18:49 skids smls: I had noticed that "for @a Z @b" was a major slowdown in Sum as well.
18:50 molaf_ joined #perl6
18:51 dagurval any way to represent an array in struct with NativeCall? For example struct a { int b[256]; int i; }
18:52 uncleyear joined #perl6
18:59 ugexe maybe something like this untested class Foo is repr('CStruct') { has CArray[OpaquePointer] $.b; has int $.i; }
18:59 RabidGravy CArray[int32] even
19:02 RabidGravy if its expect to be a particular size then you need to assign a new one to it
19:02 RabidGravy then $foo.b[255] = 0;
19:04 timotimo smls: it's missing one variant i'm missing
19:04 smls ?
19:04 Gardner joined #perl6
19:04 timotimo something like my @result = 0 xx +@deck; loop (...) { @result[$foo] = @deck[$bar]; @result[$foo + 1] = @deck[$baz] }
19:05 smls ah, ok
19:05 hoelzro ab5tract: I, for one, would like to see the language list be a more interesting and better place
19:05 hoelzro then again, I myself barely post there =/
19:06 RabidGravy I think I subscribed to it for afew months in 2001-2
19:06 timotimo smls: and also using div instead of / for division
19:06 hoelzro should --ll-exception be enabled for building lib/*.pm in rakudo?
19:06 smls ok
19:07 hoelzro that way, if it fails, it's one fewer step to finding out why
19:07 timotimo hoelzro: may be a good idea
19:07 smls timotimo: funny though that binding instead of asisgning to @deck actually made it slower on a full run, right?
19:07 smls when i tried it out on small inputs, it seemed to help
19:08 dagurval RabidGravy: thanks, I'll try that. It's the particular size issue I'm having problem figuring out
19:13 skids Not sure CArray members are supported yet.
19:15 dagurval if so, any other way to tell 'CStruct' that "here are 256 ints" (a[256]) - so I can access the data below?
19:18 pmichaud j/lastlog pmichaud 5
19:18 pmichaud good afternoon, #perl6
19:19 colomon o/
19:19 uncleyear joined #perl6
19:20 bin_005 joined #perl6
19:22 RabidGravy yeah, that may not work actually
19:22 RabidGravy m: use NativeCall; class Foo is repr("CStruct") { has CArray[int32] $.b is rw }; my $b = Foo.new; $b.b = CArray[int32].new;
19:22 camelia rakudo-moar d6430c: OUTPUT«Cannot modify an immutable IntTypedCArray[int32]␤  in block <unit> at /tmp/ZKlPu4ia2V:1␤␤»
19:24 skids dagurval: maybe point an OpaquePointer and use nativecast?
19:24 skids You'll have to do your own memory mgmt on the data separate from the CStruct.
19:27 [Coke] I would love to see attributes have an "is required" that throws a typed exception. (instead of handrolling your own required die closure)
19:30 [Coke] ... heh. ovid has it on a slide. Yes, that thing.
19:34 sjn_phone_ joined #perl6
19:34 dagurval skids: I don't see how, but I'll look into it.
19:41 timotimo dagurval: we want to have that at some point, but we don't have it yet :(
19:43 dagurval timotimo: ok - I'll work with what we have :-).
19:43 timotimo sorry about that :(
19:44 smls_ joined #perl6
19:48 smls_ timotimo: gist updated.
19:50 timotimo yeah, i expected it to be a whole lot faster
19:51 timotimo it's quite surprising to me that the difference between intmath and rats is so big
19:52 timotimo but i suppose we keep the rat around and then turn it into an int over and over and over again
19:52 smls_ well, it does do one addition on that value per iteration of the innermost loop
19:54 _mg_ joined #perl6
19:56 brrt joined #perl6
19:59 timotimo right
19:59 timotimo addition on a rat has a multiplication inside it
20:02 masak that's because rats as a concept have a multiplication in them :)
20:04 brrt btw, are FatRats already implemented
20:05 colomon yes
20:05 masak m: FatRat; say "yes"
20:05 camelia rakudo-moar d6430c: OUTPUT«yes␤»
20:06 colomon m: say 1/3.FatRat ** 1000000
20:06 camelia rakudo-moar d6430c: OUTPUT«(timeout)»
20:06 colomon m: say (1/3.FatRat ** 1000000).perl
20:07 camelia rakudo-moar d6430c: OUTPUT«(timeout)»
20:07 colomon oh
20:07 RabidGravy not ideal
20:08 brrt why... does that break
20:08 brrt oh
20:08 brrt there's a **
20:08 brrt no wonder
20:08 colomon may have gotten carried away wit hthe size of the **
20:08 brrt m: say (1/3.FatRat ** 10);
20:08 camelia rakudo-moar d6430c: OUTPUT«0.000017␤»
20:09 colomon m: say 1 / (3 ** 500).FatRat
20:09 camelia rakudo-moar d6430c: OUTPUT«0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000028␤»
20:09 colomon m: say (1 / (3 ** 500).FatRat).perl
20:09 camelia rakudo-moar d6430c: OUTPUT«FatRat.new(1, 36360291795869936842385267079543319118023385026001623040346035832580600191583895484198508262979388783308179702534403855752855931517013066142992430916562025780021771247847643450125342836565813209972590371590152578728008385990139795377610001)␤»
20:12 FROGGS joined #perl6
20:14 brrt joined #perl6
20:16 smls_ timotimo: updated again.  Turning the per-iteration addition from  int+Int  to  int+int  helped quite a bit more, and binding is suddenly beneficial again :)
20:18 RabidGravy I'm looking at a native API that has twenty+ pairs of get_/set_ functions is it sane to fake up 20 "attributes" with Proxy? like "method foo() is rw returns Str { Proxy.new( FETCH => sub ($) { get_foo(self) }, STORE => sub ($, $foo ) { set_foo(self, $foo) }} ..." ?
20:18 smls_ Do you think Rakudo will ever become smart enough to run the naive implementation (810 sec) as fast as the optimized one (19 sec)?
20:19 smls_ RabidGravy: Why not?
20:20 smls_ GTK::Simple does it
20:20 psch i'm planning to do something similar for jvminterop, fwiw
20:20 psch although the problem of the get_/set_ methods come from the jvm in that case
20:20 psch or maybe from how we generate the interop classes
20:21 psch so that's another "why not?"
20:22 dolmen joined #perl6
20:22 RabidGravy works nicely, just feels like I should be able to factor it more tidily
20:22 PerlJam RabidGravy: or just have perl generate the 20 attrs directly
20:22 smls_ PerlJam: but how would you hook them up to the native library's getters/setters?
20:23 vendethiel mmh, what's the report channel on freenode?
20:23 RabidGravy I may get bored typing it and work out a way of generating them magically
20:23 smls_ :P
20:24 psch yeah, i'm hoping to get that into the JavaHOW for jvminterop
20:24 psch like, RakudoJavaInterop.java generates those get_/set_ methods
20:24 psch and the JavaHOW builds attributes for every one of those
20:25 psch but i have no solid idea how that'll work and it's a bit further down on my list too... :)
20:25 psch the most noteable problem there seems to be that i have to pull the JavaHOW into Perl 6 land, instead of having it in NQP land
20:26 psch but there it should be easy enough, i think
20:26 psch and NativeCall is already Perl 6 land so you should be fine :P
20:27 psch i have a feeling that a trait_mod could do it somewhat cleanly, but it's a bit knee-jerky, that feeling
20:30 RabidGravy yeah, apply a role to the Method the makes a CALL-ME with the boilerplate, passing the subs as the trait args
20:30 Gardner joined #perl6
20:31 skids .oO("is required" ... "has $.foo!" maybe?)
20:35 Akagi201_ joined #perl6
20:38 kurahaupo1 joined #perl6
20:51 uncleyear joined #perl6
20:53 nys joined #perl6
20:55 kurahaupo1 joined #perl6
20:59 smls_ m: y @x := [\*] 1..*; say @x[^10]
20:59 camelia rakudo-moar d6430c: OUTPUT«5===SORRY!5=== Error while compiling /tmp/E56AlQLdXY␤Unsupported use of y///; in Perl 6 please use tr///␤at /tmp/E56AlQLdXY:1␤------> 3y7⏏5 @x := [\*] 1..*; say @x[^10]␤»
21:00 smls_ m: @x := [\*] 1..*; say @x[^10]
21:00 camelia rakudo-moar d6430c: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Ghl4_aGxp3␤Variable '@x' is not declared␤at /tmp/Ghl4_aGxp3:1␤------> 3<BOL>7⏏5@x := [\*] 1..*; say @x[^10]␤»
21:00 smls_ m: my @x := [\*] 1..*; say @x[^10]
21:00 camelia rakudo-moar d6430c: OUTPUT«1 2 6 24 120 720 5040 40320 362880 3628800␤»
21:00 smls_ m: my @x := 1, [\*] 1..*; say @x[^10]
21:00 camelia rakudo-moar d6430c: OUTPUT«Memory allocation failed; could not allocate 16384 bytes␤»
21:00 smls_ ^^ so the comma operator forces eagerness?
21:01 smls_ then how can I concatenate a lazy list to the end of a literal list?
21:02 rurban joined #perl6
21:04 kurahaupo1 joined #perl6
21:04 rurban joined #perl6
21:04 [Coke] the yapc::na videos audio & video are not in sync, it seems.
21:04 bin_005_i joined #perl6
21:05 [Coke] had problems with both ovid++'s and util++'s . :(
21:05 vendethiel [Coke]: really? util++'s was good for me when I watched it
21:09 cognominal joined #perl6
21:12 [Sno] joined #perl6
21:17 uncleyear joined #perl6
21:18 smls_ Strange... after moar was killed by the kernel for running out of memory, I can no longer run perl6
21:18 smls_ "error while loading shared libraries: .../lib/libmoar.so: unexpected PLT reloc type 0xa0331a29"
21:19 timotimo smls_: there's a method called "plan" that's used to append a lazy list to another
21:19 timotimo or elements to a lazy list
21:19 timotimo without eagerifying the list
21:20 smls_ ok
21:24 smls_ I wonder if TimToady's/pmichaud's hypothetical list concatenation operation will be able to handle this as well...
21:30 timotimo quite possible
21:36 espadrine joined #perl6
21:39 masak I read an unusually nice autopun the other day.
21:39 masak so, there's this planet full of individuals who strongly believe in anti-induction.
21:40 masak the sun has risen every morning in living memory, so (they believe) it's *not* at all likely to rise tomorrow.
21:41 masak understandably, everyone on this planet is very bad at dealing with reality. they are all quite miserable.
21:41 masak a visiting xenoanthropologist asks "but... why? why do you keep believing in anti-induction? it's obviously the source of all your trouble, so why?"
21:41 masak they say "well, it's never worked before..."
21:42 smls_ ;)
21:43 masak paraphrased from http://www.scottaaronson.com/democritus/lec15.html -- which read, by the way.
21:45 uncleyear joined #perl6
21:48 masak 'night, #perl6
21:55 diana_olhovik_ joined #perl6
21:58 RabidGravy nighty night
22:00 nebuchadnezzar [ptc]: I just include FROGGS[mobile] patches in MoarVM, maybe you could present yourself on the pkg-rakudo mailing list?
22:01 nebuchadnezzar I'm testing a build before pushing
22:06 dolmen joined #perl6
22:10 uncleyear joined #perl6
22:36 skids joined #perl6
22:38 uncleyear joined #perl6
22:38 LLamaRider joined #perl6
22:39 nebuchadnezzar .tell [ptc] Ok, now I figure out you are Paul Cochrane, I revert your patch on Configure.pl since it's forbidden to modify upstream directly and you arleady provided a patch for this
22:39 yoleaux nebuchadnezzar: I'll pass your message to [ptc].
22:50 vendethiel joined #perl6
23:13 Sqirrel joined #perl6
23:14 thezip joined #perl6
23:28 [particle] joined #perl6
23:29 kurahaupo1 joined #perl6
23:31 uncleyear joined #perl6
23:32 telex joined #perl6
23:51 uncleyear joined #perl6
23:56 laouji joined #perl6

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo