»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: irc.perl6.org | UTF-8 is our friend! | feather will shut down permanently on 2015-03-31
Set by jnthn on 28 February 2015.
00:04 virtualsue left
J-L I gotta go now, but thanks to everyone for all your help! Perl6 is looking like it's gonna be a great language! 00:10
timotimo big parts of it already are <3 00:11
00:14 adu left 00:15 vendethiel left
dalek kudo/nom: 976eeaf | jnthn++ | src/core/ (2 files):
Switch Array/Hash to use method ^parameterize.
00:16
kudo/nom: b7dc805 | jnthn++ | src/core/ (2 files):
Switch a few places to use .^parameterize.

Kebab-case RAKUDO_NO_DEPRECATIONS
There is no point in adding a deprecation cycle here, as adding it would inhibit seeing that particular deprecation message. Since hardly anybody is using this feature, I tought it'd be safe to kebab-case immediately.
00:16 dalek left
jnthn That was the merge of parameterize-cleanup 00:16
00:17 dalek joined, ChanServ sets mode: +v dalek
Mouq jnthn++ 00:18
jnthn Tomorrow, native arrays. 00:19
:)
Mouq jnthn: Does that have preformance implications?
*per
jnthn Mouq: Not especially
Mouq: It certainly shouldn't hurt.
Mouq: It removes a level of indirection, but not on a hot path
Mouq jnthn: Right :)
00:20 vendethiel joined
jnthn It's more a design fix, removing an icky meta-level/non-meta-level confusion. 00:20
Mouq m: my sub foo (@a[$,$]) {} 00:24
camelia rakudo-moar 9411a7: OUTPUT«5===SORRY!5===␤Shape declaration is not yet implemented; please use whitespace if you meant a subsignature for unpacking␤at /tmp/lw_ieHh0vp:1␤------> 3my sub foo (@a7⏏5[$,$]) {}␤Unsupported use of $] variable; in Perl 6 please use $*PERL.…»
Mouq That seems too easy to mistake for @a [$,$] once we get shapes
Would it be a terrible idea just to restrict subsig definitions to (@a :($, $)) ? (after a deprecation cycle) 00:25
00:26 laouji joined
Mouq m: my sub foo (@a:($,$)) {} 00:26
camelia ( no output )
Mouq m: my sub foo (@a:($,$)) {}([1,2,3])
camelia rakudo-moar 9411a7: OUTPUT«Too many positionals passed; expected 2 arguments but got 3 in sub-signature of parameter @a:␤ in sub foo at /tmp/JM0pxGvNtG:1␤ in block <unit> at /tmp/JM0pxGvNtG:1␤␤»
Mouq m: my sub foo (@a :($,$)) {}([1,2,3]) 00:27
camelia rakudo-moar 9411a7: OUTPUT«===SORRY!===␤Cannot invoke this object (REPR: P6opaque, cs = 0)␤»
Mouq I dunno what that's about
jnthn Well, the reason we have the [...] form is that it implies Positional 00:28
So you can write
sub foo([$head, *@tail]) { }
Mouq Also the ->$a{} vs ->$a {} keeps biting me in one-liners
jnthn And it will only accept a Positional argument.
Mouq jnthn: @:(…) should already work, and I don't see a problem with :[…] 00:29
m: sub foo(@:($head, *@tail)) {say @tail.perl}([4,5,6,7]) 00:30
camelia rakudo-moar 9411a7: OUTPUT«Array.new(5, 6, 7)␤»
00:30 pecastro joined
jnthn It ain't as pretty, though... :) 00:31
Mouq m: my (@a :($b, $c)) = [1, 2]; say @a; say $b; say $c
camelia rakudo-moar 9411a7: OUTPUT«5===SORRY!5=== Error while compiling /tmp/cUknIvn7Kz␤Variable '$b' is not declared␤at /tmp/cUknIvn7Kz:1␤------> 3 (@a :($b, $c)) = [1, 2]; say @a; say $b7⏏5; say $c␤ expecting any of:␤ postfix␤»
Mouq jnthn: Yeah…
jnthn Time for some sleep :) 00:32
Mouq I don't think sub foo(:[$head, *@tail]) { } is too bad, but it's not quite as "homoiconic", to misuse a word
'night jnthn :)
jnthn 'night
Mouq We could still recognize ([…]) as a sub-sig long as there's no variable there… 00:33
s/variable/parameter
00:39 laouji left 00:40 laouji joined 00:42 laouji left 00:50 laouji joined 00:58 dayangkun joined 01:08 yeahnoob joined 01:16 fhelmberger joined 01:17 raiph joined 01:20 fhelmberger left
timotimo who knows where i find the place nqp-moar puts types into the hll config? 01:23
01:24 espadrine left
timotimo oh, it lives inside moarvm in 6model/bootstrap, probably 01:27
01:43 madmuid left 02:03 kaare_ left 02:07 adu joined 02:08 colomon left 02:09 colomon joined 02:14 agentzh joined, agentzh left, agentzh joined, bayprogrammer left
agentzh I've put together my benchmark programs for various perl 5/perl 6 top-down parsing libraries (or builtins): github.com/agentzh/perl-parsing-li...-benchmark 02:14
yoleaux 3 Mar 2015 00:40Z <japhb> agentzh: gist.github.com/agentzh/c5108a959309f015c4f6 looks like a very nice benchmark; can you create a PR for github.com/japhb/perl6-bench adding this as one of the minibenchmarks?
agentzh perl 5's Pegex is a clear winner in this test.
yoleaux: perl6-bench is an ambitious project. but i'd like to keep my scripts in a separate repos :) 02:15
japhb agentzh: Honest question: why the hesitation? Feel like you can't iterate fast enough? Having trouble understanding what you need to do to add tests to perl6-bench? Not getting what you want from it? 02:17
I'm trying to understand because I find I'm having trouble convincing people in general to put tests in perl6-bench and not just as one-offs, and I don't understand why. 02:18
agentzh japhb: well, just want to have a focus :)
japhb Did you know that perl6-bench allows tests to be tagged and filtered, so you can run and analyze only the tests you care about?
agentzh japhb: and don't want to distract too much. no offense to the perl6-bench project :) 02:19
japhb I wasn't at all offended. I'm just trying to figure out what I need to do to make it more attractive.
agentzh japhb: feel free to grab whatever in my benchmark scripts into perl6-bench :) 02:20
japhb The value of perl6-bench to the community is strongly correlated with how well it includes the tests people really care about.
02:20 chenryn joined
japhb agentzh: Oh, so you don't mind having a snapshot included in the perl6-bench collection? 02:20
agentzh japhb: i admit i lack enough energy and motivation to do that myself :)
japhb Ah, hmmm. I need to find a way to lower that barrier considerably, methinks. 02:21
japhb at bus-stop, bbiab.
agentzh in this little benchmark, rakudo is the slowest. it'll be great if you guys can help reviewing the benchmark scripts for me because I may do something stupid that messes up the results :) I'm still learning Perl 6. 02:24
oh, one caveat is that the numbers include the startup time. 02:25
02:39 kaare_ joined 02:41 cognominal joined 02:49 grondilu joined, agentzh left
adu hi all 03:12
how goes? 03:13
japhb It goes quietly at this time of night. :-)
03:15 agentzh joined 03:16 skids left 03:18 Psyche^ joined 03:20 vendethiel left 03:21 skids joined
adu japhb: oh, right 03:21
03:22 noganex_ joined, Patterner left 03:23 vendethiel joined 03:25 noganex left 03:27 cognominal left 03:32 HelloWorld joined 03:33 grondilu left 03:35 mr-foobar left 03:40 HelloWorld left 03:46 vendethiel left 03:47 vendethiel joined
Mouq tried making agentzh++'s Perl 6 bench a little more idiomatic, but it was no help :| 03:53
adu Mouq: did it make it slower? 04:02
Mouq No 04:04
But I could easily make it slower… for example changing some for loops into reduces
But I was trying to match the Pegex versoin
04:07 lichtkind left 04:10 vendethiel left 04:12 agentzh left 04:18 vendethiel joined 04:32 chenryn left
raydiak good evening, #perl6 04:34
04:41 vendethiel left 04:43 dj_goku joined 04:54 yeahnoob left 04:55 laouji left 04:59 jdv79 left, chenryn joined 05:03 vendethiel joined 05:06 adu left 05:12 st_iron joined 05:13 agentzh joined 05:17 mr-foobar joined 05:19 jdv79 joined 05:21 madmuid joined 05:25 vendethiel left 05:30 telex left, vendethiel joined 05:31 laouji joined 05:32 telex joined 05:43 agentzh left 05:48 st_iron left 05:49 diana_olhovik_ joined 06:10 agentzh joined 06:13 cognominal joined
TimToady I'm fine with '0' being true, as long as IntStr 0 is false 06:16
06:20 st_iron joined 06:22 diana_olhovik_ left 06:23 agentzh left 07:01 diana_olhovik joined 07:04 prime left 07:10 prime joined 07:18 wicope joined 07:19 gfldex joined
[Tux] why can push not handle Inf? 07:21
m: (1,4..7,9..Inf).perl.say
camelia rakudo-moar 076da8: OUTPUT«(1, 4..7, 9..Inf)␤»
[Tux] m: my@x=1;my$x=4;@x.push($x..7);$x=9;@x.pus ($x..Inf);@x.perl.say
camelia rakudo-moar 076da8: OUTPUT«5===SORRY!5=== Error while compiling /tmp/FXMQ4BbEKm␤Two terms in a row␤at /tmp/FXMQ4BbEKm:1␤------> 3my@x=1;my$x=4;@x.push($x..7);$x=9;@x.pus7⏏5 ($x..Inf);@x.perl.say␤ expecting any of:␤ infix stopper␤ infix or meta…»
[Tux] m: my@x=1;my$x=4;@x.push($x..7);$x=9;@x.push($x..Inf);@x.perl.say
camelia rakudo-moar 076da8: OUTPUT«Cannot .push an infinite list␤ in block <unit> at /tmp/plGAjLg7vX:1␤␤»
[Tux] can I *dynamically* put an $x .. Inf entry in @x? 07:22
TimToady use .plan instead of .push 07:23
[Tux] top!
TimToady .push is eager
[Tux] m: my@x=1;my$x=4;@x.plan($x..7);$x=9;@x.plan($x..Inf);@x.perl.say
that hangs
camelia rakudo-moar 076da8: OUTPUT«(timeout)» 07:24
TimToady well, it's supposed to work...
[Tux] RT?
TimToady though I think current implementation only allows one plan at a time
07:25 FROGGS joined
TimToady but that doesn't look like the problem here 07:25
m: my @x = 1,2,3; @x.plan('a'..*); say @x 07:26
camelia rakudo-moar 076da8: OUTPUT«1 2 3 a b c d e f g h i j k l m n o p q r s t u v w x y z aa ab ac ad ae af ag ah ai aj ak al am an ao ap aq ar as at au av aw ax ay az ba bb bc bd be bf bg bh bi bj bk bl bm bn bo bp bq br bs bt bu bv bw bx by bz ca cb cc cd ce cf cg ch ci cj ck cl cm cn …»
TimToady well, maybe it is
[Tux] I'll RT
TimToady m: my @x = 1,2,3; @x.plan(7,8,9); @x.plan('a'..*); say @x
camelia rakudo-moar 076da8: OUTPUT«1 2 3 7 8 9 a b c d e f g h i j k l m n o p q r s t u v w x y z aa ab ac ad ae af ag ah ai aj ak al am an ao ap aq ar as at au av aw ax ay az ba bb bc bd be bf bg bh bi bj bk bl bm bn bo bp bq br bs bt bu bv bw bx by bz ca cb cc cd ce cf cg ch ci cj ck cl …»
TimToady yeah, better RT that 07:27
FROGGS o/
07:28 TryOut6 joined
TryOut6 m: infix<+>(42,43) 07:28
camelia rakudo-moar 076da8: OUTPUT«5===SORRY!5=== Error while compiling /tmp/1lYp9uDINf␤Undeclared routine:␤ infix used at line 1. Did you mean 'index', 'indir'?␤␤»
TryOut6 m: infix+(42,43)
camelia rakudo-moar 076da8: OUTPUT«5===SORRY!5=== Error while compiling /tmp/2fM0pefff8␤Undeclared routine:␤ infix used at line 1. Did you mean 'index', 'indir'?␤␤»
TimToady m: infix:<+>(42,43) 07:29
camelia ( no output )
TimToady m: infix:<+>(42,43).say
camelia rakudo-moar 076da8: OUTPUT«85␤»
TimToady need the colon
TryOut6 m: infix:<+>(42,43)
camelia ( no output )
TimToady and the say
FROGGS or print... 07:30
TryOut6 Hi, Larry I am trying out the stuff that you showed me yesteday. :-)
I see now. :-)
TimToady I recognized it :)
TryOut6 m: infix:<+>(42,43).say
camelia rakudo-moar 076da8: OUTPUT«85␤»
TimToady m: say infix:<+>(42,43) 07:31
camelia rakudo-moar 076da8: OUTPUT«85␤»
TimToady can go out front too
TryOut6 m: infix:<max>().say
camelia rakudo-moar 076da8: OUTPUT«-Inf␤»
TimToady FP vs OO in a nutshell :)
TryOut6 Yes It has -Infintiy :-)
TimToady m: [max].say
camelia rakudo-moar 076da8: OUTPUT«-Inf␤»
TryOut6 m: infix:<min>().say
camelia rakudo-moar 076da8: OUTPUT«Inf␤»
TryOut6 (-Infinity, Infinity) Wowowowowowowoowowowowowowo :-) 07:32
TimToady say 42 ~~ -Inf..Inf
m: say 42 ~~ -Inf..Inf
camelia rakudo-moar 076da8: OUTPUT«True␤»
TimToady m: say -Inf ~~ 42..Inf 07:33
camelia rakudo-moar 076da8: OUTPUT«False␤»
TryOut6 :-)
Now let me try the Swartian tranasorm. :-)
(10,11,23,14,26,78,7,8).sort() 07:34
M: (10,11,23,14,26,78,7,8).sort()
m: (10,11,23,14,26,78,7,8).sort()
camelia ( no output )
lizmat m: (10,11,23,14,26,78,7,8).sort().say
camelia rakudo-moar 076da8: OUTPUT«7 8 10 11 14 23 26 78␤»
TryOut6 Ih, yes I am forgeting the say... :-) 07:35
dalek c: 0d07d54 | (Justin DeVuyst)++ | lib/Language/ (5 files):
Fix some bad links.
c: 8f5d6b3 | (Justin DeVuyst)++ | lib/Language/5to6.pod:
Fix a mis-spelling.
c: 0951d69 | FROGGS++ | lib/Language/ (6 files):
Merge pull request #60 from jdv/master

typo fixes
TryOut6 m: (10,11,23,14,26,78,7,8).sort().say
camelia rakudo-moar 076da8: OUTPUT«7 8 10 11 14 23 26 78␤»
TryOut6 m: (10,11,23,14,26,78,7,8).sort(~).say
camelia rakudo-moar 076da8: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Dbthiz0gm6␤Prefix ~ requires an argument, but no valid term found␤at /tmp/Dbthiz0gm6:1␤------> 3(10,11,23,14,26,78,7,8).sort(~7⏏5).say␤ expecting any of:␤ prefix or meta-prefix␤»
07:36 mr-foobar left
FROGGS m: (10,11,23,14,26,78,7,8).sort( :by(* leg *) ).say 07:36
camelia rakudo-moar 076da8: OUTPUT«7 8 10 11 14 23 26 78␤»
lizmat m: (10,11,23,14,26,78,7,8).sort(*.Str).say
camelia rakudo-moar 076da8: OUTPUT«10 11 14 23 26 7 78 8␤»
FROGGS ahh
TryOut6 m: (10,11,23,14,26,78,7,8).sort(*.Str).say
camelia rakudo-moar 076da8: OUTPUT«10 11 14 23 26 7 78 8␤»
FROGGS m: (10,11,23,14,26,78,7,8).sort(* leg *).say 07:37
camelia rakudo-moar 076da8: OUTPUT«10 11 14 23 26 7 78 8␤»
FROGGS it is a positional not a named... need to adjust my memory
lizmat FROGGS: arity 1 in the the block, makes a schwartzian transform, arity 2 doesn't
TryOut6 Well, yeah, however yesterday Larry showed me a trick with just one character.
lizmat do tell!
TryOut6 I do not rememeber... :-( 07:38
Mouq m: say &[+](1,2) # this?
camelia rakudo-moar 076da8: OUTPUT«3␤»
TimToady m: (10,11,23,14,26,78,7,8).sort(+*)
camelia ( no output )
TimToady m: (10,11,23,14,26,78,7,8).sort(+*).say
camelia rakudo-moar 076da8: OUTPUT«7 8 10 11 14 23 26 78␤»
TimToady m: (10,11,23,14,26,78,7,8).sort(~*).say
camelia rakudo-moar 076da8: OUTPUT«10 11 14 23 26 7 78 8␤»
FROGGS ahh
TryOut6 Yeah that was it. :-) 07:39
m: (10,11,23,14,26,78,7,8).sort(~*).say
camelia rakudo-moar 076da8: OUTPUT«10 11 14 23 26 7 78 8␤»
TryOut6 :-)
lizmat TimToady: looks like .plan will gimme(*) any existing nextiter and blow up if it was infinite
so I'm not sure what the problem is
TimToady but in the RT'd one the first .plan wasn't infinite 07:40
TryOut6 Oh, Boy, this so much fun. Now Larry if you are in Budapest that I would like to recomend to you the Spas that are available. :-)
Mouq m: (1..*).plan(42)
camelia rakudo-moar 076da8: OUTPUT«No such method 'plan' for invocant of type 'Range'␤ in block <unit> at /tmp/cQU9KNoRJg:1␤␤»
TimToady was at one already
Mouq m: (1..*).list.plan(42)
camelia rakudo-moar 076da8: OUTPUT«Unhandled exception: Cannot add plan to an infinite list␤ at <unknown>:1 (/home/camelia/rakudo-inst-1/languages/perl6/runtime/CORE.setting.moarvm:throw:4294967295)␤ from src/gen/m-CORE.setting:15248 (/home/camelia/rakudo-inst-1/languages/perl6/runt…»
Mouq ^^
lizmat [Tux]: I don't think there is a problem with .plan 07:41
TryOut6 Okie. Probabley you went to Sechenyi...
Szechenyi. :-)
lizmat it's the .perl that is trying to generate a string representing an infinite list, on which it is hanging
TimToady it's the open air one
TryOut6 Byt the others are fun too. :-) 07:42
www.spasbudapest.com/
lizmat m: my@x=1;my$x=4;@x.plan($x..7);$x=9;@x.plan($x..Inf);@x.say # implicitely use .gist, which *does* stop
camelia rakudo-moar 0a8bdf: OUTPUT«1 4 5 6 7 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 9…»
TryOut6 I also like the Rudas, and the Lukacs. :-)
They are smaller, but fun. :-)
TimToady but not as much fun if I have to be in a different area from Gloria
Mouq lizmat: No, .plan does .gimme(*) 07:43
TryOut6 And the Gellert has his atmosphere. :-)
Mouq That's the problem
TryOut6 I see.
Mouq synopses say "Adds the list to the end of @array lazily as a kind of "lazy push""
TryOut6 Then ignore the Rudas, go to Lukacs that is coeducated. :-)
And be sure to pay for the sauna world. ;-) 07:44
lizmat Mouq: yes, it *does* generate all elements before the .plan, yes...
not sure whether that is a bug or not
TryOut6 Other thing that you might want to try out are the ruin pubs. :-)
Try it out in the evenings or at night. :-)
lizmat
.oO( read that as "are to ruin pubs )
07:45
TryOut6 Nooo... :)
They will not ruin you, there are inside of ruin houses. :-) 07:46
One of the most famous is the Szimpla Kert, but there are others too. :-)
[Tux] lizmat, what, in your opinion, is the correct way to dynamically build (1, 4..7, 9..Inf)? 07:47
07:48 raiph left
lizmat m: my @x = 1; @x.plan(4..7); @x.plan(9..Inf); say @x[^10] 07:48
camelia rakudo-moar 0a8bdf: OUTPUT«1 4 5 6 7 9 10 11 12 13␤»
07:48 Ven joined
[Tux] but I want to use @x as a subscript in @y[@x] 07:48
lizmat m: my @y = ^20; my @x = 1; @x.plan(4..7); @x.plan(9..Inf); say @y[@x] # not seeing the problem 07:50
camelia rakudo-moar 0a8bdf: OUTPUT«1 4 5 6 7 9 10 11 12 13 14 15 16 17 18 19␤»
[Tux] hmm, so only using .perl on that is something to rather not do
TryOut6 Okie guys this was so fun, but I need to goo back to work. :-) 07:51
Bye. Now. :-)
lizmat bye TryOut6
TryOut6 By lizmat. :-) 07:52
lizmat [Tux]: yes, because .perl is by definition eager
07:52 TryOut6 left
lizmat I guess we could make .push smarter about pushing an infinite list onto an finite list 07:54
07:54 darutoko joined
lizmat it would be more DWIM in a way, but perhaps also a WAT 07:54
perhaps TimToady has some thoughts ?
TimToady push is supposed to be eager 07:55
lizmat it's just that you may not know what you're pushing onto a list
making .push to a .plan for you, when it can, seems DWIM to me 07:56
*to do
CurtisOvidPoe m: sub f($n is rw) {$n=$n+1; say $n};f(3)
camelia rakudo-moar 0a8bdf: OUTPUT«Cannot assign to an immutable value␤ in sub f at /tmp/WfatAVYfks:1␤ in block <unit> at /tmp/WfatAVYfks:1␤␤»
CurtisOvidPoe I though declaring the argument as “is rw” means it’s no longer immutable? 07:57
moritz it should actually fail at dispatch time
an 'is rw' param shouldn't even bind to a non-container
CurtisOvidPoe I don’t know what this means: “shouldn’t even bind to a non-container” 07:58
Ah, it’s a constant!
So “is rw” creates an alias instead of a copy? 07:59
lizmat m: sub f($n is rw) {say $n; $n=$n+1};f(3) # the "say" shouldn't even be done, is what moritz means
camelia rakudo-moar 0a8bdf: OUTPUT«3␤Cannot assign to an immutable value␤ in sub f at /tmp/p1zVHLjHSi:1␤ in block <unit> at /tmp/p1zVHLjHSi:1␤␤»
moritz yes
sub f($x is rw) { }; f 1; # should die
sub f($x is rw) { }; f my $ = 1; # should live
lizmat CurtisOvidPoe: maybe you want "is copy" ?
CurtisOvidPoe lizmat++ 08:00
Mouq tries to do a one-liner implementation of .plan in terms of .List::gimme but fails 08:05
(to make it that short, that is :P)
TimToady commuting to CityBank gig & 08:07
lizmat plan is currently speculated to be: Adds the list to the end of C<@array> lazily as a kind of "lazy push". 08:08
(That is, the reified part of the array is not modified, but the list
is appended to the not-yet-reified specifications for how to
extend the array on demand, if it is subscripted or shifted beyond the
currently reified elements.) Returns the modified array.
I guess the current implementation is in violation of the "the reified part of the array is not modified" part 08:09
moritz sounds like a push to $!nextiter
oh wait, $!nextiter isn't an array, right? 08:10
lizmat nope
that's the problem
but since the GLR is going to touch this most likely
I'm not going to touch it now
moritz so the implementation with the current semantics would be more like: if $!nextiter isn't set, set it to the argument
lizmat (although this little investigation has been enlighting to me ) 08:11
moritz otherwise, recursie into $!nextiter
lizmat current logiv:
my $elems = self.gimme(*);
fail 'Cannot add plan to an infinite list' if $!nextiter.defined;
moritz so basically just if $!nexiter.DEFINITE { $!nextiter.plan(newstuff) } else { $!nextiter := newstuff } 08:12
lizmat so it doesn't recurse per se, it just reifies all until then
an ListIter can do that ?
ListIter doesn't have a .plan method 08:13
moritz eeks, I forgot that $!nextiter isn't just a List again
Mouq It's an iterator, so it probably should be able to
lizmat yeah, different turtles all the way down :-)
Mouq My idea was to have a $!planned attribute, but really that's what $!nextiter is for 08:14
lizmat again, not touching until there's clarity about its state wrt GLR
moritz turtles and elefants all the way down
lizmat: +1
lizmat Terry++ # may he RIP
afk for a bit& 08:15
[Tux] lizmat, if .perl is always eager, pls explain 08:19
m: (1,4..7,9..Inf).perl.say;
camelia rakudo-moar 0a8bdf: OUTPUT«(1, 4..7, 9..Inf)␤»
08:21 agentzh joined 08:26 agentzh left
[Tux] => $work 08:26
08:26 MadcapJake left
Mouq m: (1,4..7,9..Inf).flat.perl.say; # [Tux] 08:27
camelia rakudo-moar 0a8bdf: OUTPUT«(1, 4, 5, 6, 7, ListIter.new()).list␤»
Mouq Er
08:27 rurban joined, espadrine joined
Mouq Something :P 08:27
Mouq needs to go to bed
dalek ast: cf04ac0 | usev6++ | S32-str/substr.t:
Add test for RT #123602
08:29
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=123602
08:34 zakharyas joined 08:55 smls joined 08:56 spider-mario joined, Ven left
masak good morning, Earthlings 08:56
er, I mean #perl6. good morning, #perl6
bartolin o/ 08:57
CurtisOvidPoe Good correction, masak. Referring to people in this channel as “Earthlings” is specist and offensive.
:)
08:58 Ven joined
moritz many of us are actually bots from outer space 08:58
CurtisOvidPoe And still don’t pass the Turing test …
08:58 Rounin joined
masak moritz: ssssssh! 09:01
masak glances around, wildly
09:02 rindolf joined
masak CurtisOvidPoe: the *Turing test* is speciesist and offensive. heh, like we'd want to aspire to be like you hum... uh... it's setting "being human" as a goal for "being able to think", which is a really weird standard. 09:03
some bots have told me in private that they think entirely different from human persons. 09:04
moritz wonders when/if "humanist" will have a negative connotation 09:05
Ven would certainly prefer not to infinite loop... so is definitely okay with being nonturing complete :)
moritz would love to have the infinite memory capacity that turing completeness requires/implies 09:06
Ven thinks that'd be too boring :) 09:07
moritz recently read that memory access is at best O(sqrt(n)) 09:08
masak moritz: huh. where does the sqrt come from, I wonder?
moritz in time
masak: from geometry, mostly
masak moritz: I mean, if you'd said O(log(n)), I'd've gotten a mental image of a branching lookup.
moritz masak: you only have a finite memory density 09:09
masak but I have no such mental image from sqrt(n)
moritz masak: so if your memory is big enough, big parts of it are further away from you
masak: and so speed of light limits access time
09:09 cognominal left
moritz so in an ideal world it would be n**(1/3) 09:09
masak .oO( unless you can also store it in the TIME DIMENSION ) o.O 09:10
moritz but typical architectures and requirements like heat dissipation mean that practically, you have n**(1/2)
masak *nod*
moritz masak: www.ilikebigbits.com/blog/2014/4/21...ram-part-i 09:11
09:14 espadrine left 09:15 Ugator joined 09:16 kjs_ joined 09:21 Ven left
timotimo o/ 09:22
moritz timotimo/ 09:23
Mouq masak: "unless you can also store it in the TIME DIMENSION" That's what lazy lists are for ;) 09:24
jnthn morning o/ 09:27
09:27 eli-se joined
timotimo top of the morning to you, jnthn! 09:27
eli-se hi
moritz \o jnthn, eli-se 09:28
moritz idly wonders if eli-se becomes eli-no if she moves a bit to the west
eli-se I'd become English. 09:29
Or a citizen of Zealand, although I'd rather move to New Zealand.
nwc10 they have a better cricket team. 09:30
09:32 eli-se left
smls Does "myfile".IO.words.map:... read the file lazily like "myfile".IO.lines.map:... ? 09:33
Ulti moritz that article is a bit silly though a better way to think about it is your levels of RAM are arranged in a circle around the CPU so its constant time to look up any segment in that circle because they are equidistant from the CPU... that some circles that are bigger are also further away doesn't really change that you just pick the constant to the circle that fits your program 09:34
thats kind of the point of asymptotic analysis you can make those sorts of simplifications and they are still meaningful 09:35
moritz Ulti: but if they are further away, speed of light limits access time 09:36
Ulti so
speed of light was a constant last I checked
moritz yes
Ulti so if I need the edge of the universe to have a surface big enough to arrange the bits of my program its still a constant to access them just mega slow
moritz Ulti: but the RAM isn't arranged as one circle
Ulti: it's arranged as a ring of concentric circles
Ulti: with inner caches being the caches, and outer circles the actual ram and/or disc arrays 09:37
which is why you can access small amounts of memory faster, and large amounts slower
Ulti yeah so that just means its happily faster than the worst case some of the time, asymptotically you worry about the slow constant
moritz of course you could make everything slow, by putting it all into the outer-most ring, but that'd be silly
Ulti people who want to optimise for the special cases then worry about the details 09:38
moritz Ulti: that's about the same approach as saying that most algorithms are O(exp(N))
Ulti hence when you do alter your program to deal with cache lookup its way faster, its not even as simple as the levels of cache but also the CPU rules for staying in cache
moritz they are, because E(exp(N)) is just an upper bounday
*boundary
09:39 st_iron left
moritz but it's not a *useful* boundary 09:39
Ulti yeah apart from a computer isn't infinite
I dont have swap so system memory is my constant
in a literal sense
nwc10 Ulti: speed of light *in a vacuum* is constant (and accurately known) 09:40
Ulti but time is a dimension that goes on for a while
you can fit quite a few complexity classes in there
nwc10 (which is what you meant, but you weren't clear)
moritz Ulti: so, your argument is that you can give a constant upper boundary for a constant amount of RAM
Ulti: that doesn't contract the article in any way
Ulti nwc10 I was talking about a computer which is computing at the level of the known universe I think its safe to make any assumptions you like :P 09:41
Mouq Ulti: He addresses this in the FAQ
"I only care about stuff that fits in RAM, and I want to ignore cache effects "
nwc10 Ulti: ah OK. 09:42
can I assume that it's Friday? :-)
Ulti cache effects are cache effects they are not asymptotic behaviour if I change to a CPU that doesnt have cache now what?
the point of using this form of analysis is to make simplifications
09:43 Ven joined
Mouq Ulti: His point is that as your memory increases, access time increases 09:43
Ulti though I like the idea of dealing with real physical limits
as in just the density of memory with time possible in the limits of what is physically possible
I guess it would end up being quite similar
Mouq Ulti: If you just say "well, it's a constant", that's beside the point of the article :P 09:44
Ulti but that sounds a lot more like quantum information theory than asymptotic analysis of an algorithm
09:47 kjs_ left 09:50 Ven left 09:51 kjs_ joined 09:53 fhelmberger joined 09:54 brrt joined
lizmat m: (1,4..7,9..Inf).list.perl.say # .perl doesn't flatten, a .list does 09:54
camelia rakudo-moar 0a8bdf: OUTPUT«(1, 4, 5, 6, 7, ListIter.new()).list␤»
lizmat hmm.... 09:55
m: (1,4..7,9..Inf).WHAT.say
camelia rakudo-moar 0a8bdf: OUTPUT«(Parcel)␤»
lizmat m: (1,4..7,9..Inf).list.WHAT.say
camelia rakudo-moar 0a8bdf: OUTPUT«(List)␤»
lizmat m: my @a = (1,4..7,9..Inf); say @a.perl 09:56
m: my @a = (1,4..7,9..Inf)
camelia rakudo-moar 0a8bdf: OUTPUT«(timeout)»
( no output )
lizmat m: my @a = (1,4..7,9..Inf); say @a 09:57
camelia rakudo-moar 0a8bdf: OUTPUT«1 4 5 6 7 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 9…»
Mouq m: say (1,4..7,9..Inf).flat.gist 09:58
camelia rakudo-moar 0a8bdf: OUTPUT«1 4 5 6 7 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 9…»
Ulti Mouq imagine on the graphs of that article if I had 256GB of system RAM and the same cache sizes... would you still fit that line? 10:01
smls has simply accepted that pre-GLR Perl 6 flattening behavior is weird and not worth memorizing
lizmat smls: "file".IO.words should be lazy
smls hopes there will be GLR progress soon
lizmat: cool, thanks 10:02
lizmat unless you specify words(:eager)
which is a pre-GLR hack
Ulti we are now in a post-GLR economy? 10:03
lizmat alas, not yet :-( 10:04
pmichaud is still harvesting tuits, I'm afraid
10:07 laouji left, Sir_Ragnarok left
Ulti imagines a tuit hog used to find tuits since they are quite rare and usually buried 10:09
timotimo :D 10:10
10:11 espadrine joined 10:12 Sir_Ragnarok joined
ab5tract does anyone have any non-core examples of Proxy? 10:21
I was having a pretty terrible time at it yesterday, which resulted in a fresh rakudobug 10:22
masak ab5tract: maybe search moritz++' new pan-ecosystem repo? 10:24
ab5tract ah, that sounds promising
masak perlgeek.de/blog-en/perl-6/2015-all...a-box.html
jnthn
.oO( It's my mod in a box )
10:25
moritz /p6/perl6-all-modules (master)$ git grep Proxy|wc -l
73
masak moritz++ is le faster
I was still on git clone
moritz some of them are false positives
smls this has lots of Proxy use: github.com/avuserow/perl6-audio-ta.../Simple.pm 10:26
masak today is a Perl 6 day! \o/
my stated goals are to (a) get the custom-ops branch of 007 merge-ready, and (b) blog about 007
lizmat github.com/rubygems/rubygems/pull/1188 # wonder if this could be of interest wrt to lists and reification
10:31 brrt left
lizmat jnthn: I just found out that Supply.on-demand is not speculated, and not tested 10:37
I figured something like: Supply.on-demand( { state $x = 1; say $x; $x++ }); 10:38
10:38 cschwenz joined
lizmat would be functionally the same as: 10:38
Supply.from-list 1..10);
masak pro warning: if you start liking nested subs and nested lexical classes a lot in your code, your subroutines can start being ~150 lines long without you noticing.
lizmat Supply.from-list( 1..10);
but it isn't
jnthn lizmat: That isn't how Supply.on-demand works :) 10:39
lizmat I figured that, but am unsure how it is supposed to
jnthn Supply.on-demand(-> $obs { state $x = 0; $obs.emit($x++) }) iirc 10:40
lizmat ah, the code needs to take a Supply
jnthn Though you can write such a simple one as
Supply.on-demand({ .emit(++state $) }) or so 10:41
10:41 xfix joined
lizmat alas, no go... 10:42
only gets one value :-(
jnthn Oh
Yes, you need a loop in there yourself.
lizmat ok 10:43
jnthn m: my $ten = Supply.on-demand(-> $s { for ^10 { $s.emit($_) }; $s.done; }); $ten.tap(&say); $ten.tap(&say); 10:44
camelia rakudo-moar 0a8bdf: OUTPUT«0␤1␤2␤3␤4␤5␤6␤7␤8␤9␤0␤1␤2␤3␤4␤5␤6␤7␤8␤9␤»
lizmat is the $s.done necessary ?
jnthn Yes
Well, in this case you'd get away with it I guess
lizmat yeah 10:45
gotcha
jnthn But if doc'ing it, we should guide folks to use it to indicate that their finite supplies are over
Otherwise things don't work out so well once you start to zip, await the last value, etc.
lizmat not doccing, just writing test atm
jnthn OK :)
lizmat and speculating :-) 10:46
dalek kudo/nom: 7fd909a | jnthn++ | src/core/ (2 files):
Use .^ in ^parameterize methods now it's safe.

There used to be some issues with how .^ worked, but they're long fixed. Thus we can have much neater code here.
lizmat jnthn: does that apply to *all* .HOW.method cases in the settings? 10:47
jnthn Good question
jnthn greps through some
lizmat there's quite a lot of them
masak moritz: I'm curious -- are you using a script to make all the commits in github.com/moritz/perl6-all-module...its/master ?
jnthn lizmat: Looks like it to me. 10:48
lizmat ok, will take that on
jnthn Yay, more cleanup :)
We got the one above 'cus I'm working on native arrays, so looking at how typed arrays already work :) 10:49
10:49 kjs_ left, eli-se joined
eli-se hi 10:50
10:50 coffee` joined, eli-se left
jnthn bye... 10:50
masak eli-se seems to be using an IRC client with a non-stick interface... 10:51
lizmat jnthn: when does the :closing code get called ?
10:51 kjs_ joined
jnthn lizmat: When a tap is closed, which should then recursively close up the chain 10:52
10:52 MadcapJake joined
jnthn lizmat: It's there to allow cleanup 10:52
lizmat ok, gotcha
jnthn lizmat: Such as Supply.interval being able to toss the timer 10:53
10:53 eli-se joined 10:56 eli-se left
dalek ast: 22ae2c8 | lizmat++ | S17-supply/on-demand.t:
Basic Supply.on-demand test
10:57
kudo/nom: 6ffd9bd | lizmat++ | t/spectest.data:
Add basic Supply.on-demand test
10:59
11:00 laouji joined 11:03 risou is now known as risou_awy 11:04 risou_awy is now known as risou, risou is now known as risou_awy
rurban moritz: do you have a good google=>github userlist? 11:04
11:04 risou_awy is now known as risou 11:05 dayangkun left
rurban Mine is this but I'm missing a couple: pastebin.com/nWQqdtBr 11:06
11:09 agentzh joined
lizmat jnthn: I guess I should leave something like: obj.HOW.mixin(obj.clone(), $role) untouched? 11:10
moritz rurban: not really. You can add moritz.lenz => moritz
11:10 kjs_ left
jnthn lizmat: Yes 11:12
lizmat: Well, actually
lizmat jnthn: also, there is no ^^name, right, for this case: attr.type.HOW.^name
jnthn lizmat: You cna write it obj.clone.^mixin($role)
lizmat ok
11:12 kjs_ joined
jnthn lizmat: No, there's no ^^ :) 11:12
lizmat: Thankfully, meta-meta-programming is not so common :)
lizmat hehe :-) 11:13
11:13 Ven joined
rurban my users: gist.github.com/rurban/5aa89bcc8443259fc3b1 11:13
11:13 agentzh left 11:26 grondilu joined 11:31 vendethiel left
lizmat jnthn: gist.github.com/lizmat/a04b8cb10c6e3eb2e5f6 is a diff with all the foo.HOW.bar(foo,..) -> foo.^bar(...) 11:32
alas, it hangs on tests like t/spec/S02-names-vars/perl.t 11:33
afk for a bit&
11:34 vendethiel joined
ab5tract okay, so i resolved at least some of the mystery 11:36
the signatures for the Proxy keys on a method are working when FETCH => sub ($) and STORE => sub ($, Str $s) 11:39
gist.github.com/ab5tract/1ee13c094f0ccc34a180
this is awkwardly _not_ required in the test files 11:40
and when using perl6-debug-m, it spends an a weird number of steps in what seems to be the same place 11:42
11:43 Vlavv left, skids left
masak tips for people who find themselves having to loop over a list of things *as stuff gets added and removed form the list*: 11:50
jnthn Don't. 11:51
;)
masak jnthn: note: "having to"
I have an actual use case for it.
(a) loop on indices. `for 0..Inf -> $i` and then `last` when you run out of elements.
(b) push new elements to the end.
(c) don't actually remove elements -- that screws up the indices. instead, just keep an array or a hash with "marked as deleted" information. 11:52
if you do all this, it's actually quite sane. 11:53
Ven (which we can resume as: end :P)
I'd say b) is a bad choice if you don't promise the order of elements will stay the same
s/end/don't/ duh
masak troo. (b) and (c) really are for the same reason: don't screw up the indices. 11:54
smls but, manually decremention/incrementing indexes based on complicated conditions, is fun!! 11:55
:P
(I actually did something like that years ago in Perl. It was a mess. Later I refactored the script to remove the need to modifying the array while iterating it.) 11:56
11:57 CurtisOvidPoe left 11:58 cognominal joined
ab5tract so in the case of requiring FETCH sub ($) { ... } 11:58
11:58 brrt joined
ab5tract i assume the ($) is for self? 11:58
jnthn Well, really the container 11:59
(the Proxy instance)
You can think of it as self I guess
ab5tract hmm... self of the Proxy then? 12:00
smls m: say "a".lines.DUMP
camelia rakudo-moar 6ffd9b: OUTPUT«(signal SEGV)use of uninitialized value <element> of type Any in string context in sub DUMP at /home/camelia/rakudo-inst-1/languages/perl6/runtime/CORE.setting.moarvm:1␤␤use of uninitialized value <element> of type Any in string context in sub DUMP a…»
smls ^^ nice way to get Rakudo to hang for several seconds, spew some warnings, and then segfault :P 12:01
ab5tract this is pretty twisty stuff.. is the rule that this signature will always be required? and why do the test cases do it differently and work fine? I'm not enjoying this part of the rabbit hole very much :(
12:17 grondilu left 12:22 chenryn left, chenryn joined
jnthn 50 passing tests for native arrays so far 12:23
lunch &
12:27 chenryn left 12:36 abraxxa left 12:37 kjs_ left, diana_olhovik left, diana_olhovik joined 12:39 eli-se joined
eli-se hi 12:39
masak hi \o
eli-se: you keep dropping out on us! :)
eli-se I went for lunch.
kebab
masak ah.
12:41 laouji left
eli-se m: sub infix:<< o >>(&f, &g) { sub ($a) { g(f($a)) } }; ({.abs} o {.sqrt})(-9).say 12:42
camelia rakudo-moar 6ffd9b: OUTPUT«3␤»
eli-se woo function composition
masak better yet, you can reduce over it, with `[o]` 12:43
woo, foldl'd function composition!
eli-se Then I should define the nullary infix:<< o >>
to return the identity function
masak yes :)
moritz sub infix:<< o >>(&f, &g) { sub ($a) { g(f($a)) } }; say (&abs o &sqrt)(-9) 12:44
m: sub infix:<< o >>(&f, &g) { sub ($a) { g(f($a)) } }; say (&abs o &sqrt)(-9)
camelia rakudo-moar 6ffd9b: OUTPUT«3␤»
Ven why "<< >>"? 12:45
eli-se moritz: cool
moritz no need to wrap the subs in anon blocks
Ven: no need
eli-se I tried abs and sqrt at first and I got an error because I forgot the sigils. :P
masak eli-se: verb/noun distinction
eli-se: the default mode of a function in Perl 6 is to be called
eli-se I know. 12:46
masak if you don't want that, you have to add more syntax :)
12:49 bjz joined 13:00 spider-mario left 13:02 eli-se left 13:03 eli-se joined 13:07 skids joined
smls Python makes the verb/noun distinction by requiring parens for function calls 13:07
smls prefers the Perl 6 way
eli-se doesn't 13:08
13:10 Ven left
arnsholt The Python way is nuts for methods 13:10
dalek kudo-star-daily: c41513b | coke++ | log/ (9 files):
today (automated commit)
eli-se no, it's good and constistent
arnsholt The semantics are a bit odd
With functions being special objects that have different look-up semantics, depending on whether they are looked up from an instance or a type object 13:11
[Coke] -> (09:08) From Sue D. Nymme, to Strider, perl:
- "Ia! Ia! Cthulhu lwall $+[$_]!"
eli-se arnsholt: no 13:12
methods are special 13:13
functions assigned to attributes don't bind self when used with .
brrt 'a bit odd' - talk about understating
which is precisely what is so odd about it all (imho at least)
arnsholt eli-se: That's because the special behaviour only triggers if the look-up is from the type-object
brrt arnsholt - is the difference created at lookup time or at installation time? 13:14
arnsholt In Python "foo.bar(arg)" compiles to first a fetch operation, then a call operation on the result of the look-up
eli-se ideone.com/KbSg60
arnsholt brrt: It's handled by functions implementing a special API (descriptors) which is invoked at run-time
eli-se I think this is very reasonable, and line 10 is useful.
you can do map(str.toupper, xs) instead of map(lambda x: x.toupper(), xs) 13:15
brrt descriptors! omg i can't even
arnsholt eli-se: The thing is that you can assign any random function to the type object, and then it'll be a method
Bound methods are nice, I agree. But the way it works under the hood is pretty odd 13:16
brrt talk about odd magic
eli-se Oh, I don't know.
I never assign things to attributes of type objects.
arnsholt That's what def in a class block is though. Assign this callable to that name in the type object 13:17
def is actually an assignment in Python
eli-se ideone.com/ZqWzFP
it doesn't pass self to f 13:18
13:23 kjs_ joined
eli-se doing it anyway would introduce a horrible special case making it impossible to write any generic code 13:23
smls eli-se: That example looks like something that would be better served by a dedicated generics/template syntax, or failing that a meta-object protocol 13:24
arnsholt There's a Python MOP. Haven't gotten around to looking at how it works yet, though 13:26
smls In any case, regarding the verb/noun distinction, the Perl 6 way fits right in with the whole "variables have sigils" thing (as &foo basically treats a subroutine as a variable) 13:27
eli-se Python is pointlessly dynamic though.
smls Also, I won't let anyone pry my nice paren-less function calls from me :P
eli-se Haskell! 13:28
13:29 eli-se left
arnsholt Haskell is actually pretty awesome. Though the lazyness does weird things 13:29
masak did anyone ever invent a non-lazy Haskell? 13:31
arnsholt Standard ML sort of is, I guess?
masak yeah, I suppose so. 13:33
skids m: my @a = (rx/0/, rx/$<a>=(1)(2) { make $1 }/); "12" ~~ / (<foo=@a>) { $/.gist.say } /; # is there a way to get the full $/ from the interpolated rx to graft it into the Match/AST?
camelia rakudo-moar 6ffd9b: OUTPUT«「12」␤ 0 => 「12」␤ foo => 「12」␤»
TimToady m: say lines 13:34
camelia rakudo-moar 6ffd9b: OUTPUT«Céad slán ag sléibhte maorga Chontae Dhún na nGall Agus dhá chéad slán ag an Eireagal ard ina stua os cionn caor is coll; Nuair a ghluais mise thart le Loch Dhún Lúich’ go ciúin sa ghleann ina luí I mo dhiaidh bhí gleanntáin ghlas’ Ghaoth …»
Mouq skids: NYI, I think 13:35
13:35 eli-se joined
TimToady m: $*IN.read().WHAT.say 13:36
camelia rakudo-moar 6ffd9b: OUTPUT«Too few positionals passed; expected 2 arguments but got 1␤ in method read at src/gen/m-CORE.setting:17267␤ in block <unit> at /tmp/5bKm7gc2kJ:1␤␤»
skids Or even specced I think.
TimToady m: $*IN.read(10000).WHAT.say
camelia rakudo-moar 6ffd9b: OUTPUT«(Buf[uint8])␤»
TimToady m: $*IN.read(10000).decode('utf8').WHAT.say
camelia rakudo-moar 6ffd9b: OUTPUT«(Str)␤»
TimToady hi guys, I'm live at Sophos now :) 13:37
eli-se What is Sophos?
nwc10 that's not-a-Bank
but also in Budapest?
TimToady they bought ActiveState
eli-se > Antivirus software package targeted at business customers.
TimToady yes, also here
masak m: say "TimToady is live! \\o/ commence the silly evals!" 13:38
camelia rakudo-moar 6ffd9b: OUTPUT«TimToady is live! \o/ commence the silly evals!␤»
nwc10 grand tour of Budapest?
masak m: say "What happens when an unstoppable \c[COMET] meets an immovable \c[SNOWMAN]?"
camelia rakudo-moar 6ffd9b: OUTPUT«What happens when an unstoppable ☄ meets an immovable ☃?␤»
masak \o/
eli-se in C++ you can do that 13:39
struct T { T(T&&) = delete; T& operator=(T&&) = delete; }; throw T(); // throw is unstoppable, yet meets an immovable object 13:40
terrible joke
I should leave.
Mouq lol 13:42
masak hugs eli-se :)
eli-se perhaps I should make my compiler warn when people don't use the result of an equality comparison expression, since = means comparison and := means assignment 13:44
Mouq m: say [»~«] [<g mo So>], [<oo rn ph>], [<d ing os>] 13:47
camelia rakudo-moar 6ffd9b: OUTPUT«good morning Sophos␤»
eli-se that's a sophosticated snippet of perl code 13:49
masak just business as usual at the Perl 6 factory 13:50
...not really. :) Mouq++ :)
Mouq m: say [~] «i "s t" hi "s be" tter ?» 13:51
camelia rakudo-moar 6ffd9b: OUTPUT«is this better?␤»
13:52 eli-se left
moritz m: 1 == 2; say 42 13:53
camelia rakudo-moar 6ffd9b: OUTPUT«WARNINGS:␤Useless use of "==" in expression "1 == 2" in sink context (line 1)␤42␤»
13:53 vendethiel left 13:54 eli-se joined
timotimo m: my $hello-wordl = "hi sophos!"; say $hello-world 13:54
camelia rakudo-moar 6ffd9b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/NtvMWAbSLn␤Variable '$hello-world' is not declared. Did you mean '$hello-wordl'?␤at /tmp/NtvMWAbSLn:1␤------> 3o-wordl = "hi sophos!"; say $hello-world7⏏5<EOL>␤ expecting any of:␤ post…»
13:54 vendethiel joined 13:57 eli-se left 14:02 tbrowder joined, dalek left 14:07 Ven joined 14:09 fhelmberger left 14:10 cognominal left 14:13 eli-se joined
eli-se Can you encode loop invariants in Perl 6? 14:13
Similar to PRE and POST for subroutines. 14:14
14:22 danstone1 is now known as danstoner
timotimo hm, i don't see why PRE and POST wouldn't be a good candidate for that 14:22
[Coke] m: sub mad(){POST {say "d"};PRE {say "m"};say "a"}; mad 14:25
camelia rakudo-moar 6ffd9b: OUTPUT«m␤a␤d␤»
[Coke] ^^?
eli-se requires duplciation 14:26
[Coke] I still don't undertand what you're asking for. :) 14:27
masak eli-se: you can use PRE and POST directly in a loop body.
eli-se: or in any block's body.
eli-se yeah but loop invariant is the same for PRE and POST 14:28
14:29 rindolf left
masak oh, I see what you mean. 14:30
masak .oO( macro INVARIANT ) 14:31
masak adds this to his growing list of use cases
I think this would be a good place for a macro. 14:32
since it's about hiding/reducing boilerplate/duplication.
[Coke] masak: ... what is the issue? 14:33
masak [Coke]: a loop invariant should be checked both at PRE-time and at POST-time of an iteration 14:34
[Coke]: the only way to do that now is to have both PRE and POST, with exactly the same check
(or the POST check slightly modified to take into account that we're not in the next iteration yet, I guess) 14:35
14:35 Hor|zon left
masak if you skip the POST, you don't get your last check. 14:35
eli-se I just wrote a sorting function that only works for inputs that are already sorted. 14:36
masak very narrow utility 14:37
eli-se sub sort($xs) { PRE { is-sorted($xs) }; xs }; sort([1, 2, 3, 4]).say :P
I guess INVARIANT shouldn't be loop-specific. 14:38
14:38 chenryn joined
eli-se but work on any block 14:38
nine_ Oh, seek is inocent. open(:rw) is simply NYI 14:40
14:40 chenryn left
timotimo we can't open :rw? 14:40
:\
nine_ we pretend to, but the mode is not properly passed on to nqp::open 14:41
timotimo :o
14:41 chenryn joined
eli-se naughty! 14:42
nine_ my $mode := $w ?? 'w' !! ($a ?? 'wa' !! 'r');
timotimo wa !! r... wa !! r never changes ... 14:43
14:44 kaare_ left, FROGGS left
nine_ And MoarVM does not support and 'rw' mode 14:45
Only supports "r", "w" and "wa"
14:45 cschwenz left, cschwenz joined
timotimo well, wa is kind of rw, no? or is that wa+? or a+? 14:45
14:46 chenryn left
nine_ "wa" is O_CREAT | O_WRONLY | O_APPEND 14:46
timotimo ah, hm
gotta run! :P
Ven nine_: I think I'm to blame for open(:rw)
I'm fairly sure I tested it and it worked then at least :o) 14:47
14:47 agentzh joined
nine_ Ven: maybe on Parrot? 14:47
14:47 Rounin left
eli-se I deny the existence of Parrot. 14:48
Ven nine_: I have been doing perl6 for no more than a year ;) (+ half a month now)
nine_ I cannot find any code supporting :rw except for the argument declaration :) 14:49
14:51 agentzh left
Ven nine_: github.com/rakudo/rakudo/commit/88...cc5cbcc541 14:54
14:56 rmgk_ joined, rmgk left, rmgk_ is now known as rmgk 15:00 perl6_newbee joined
Mouq Ven: Pretty sure you're not to blame :) 15:01
Ven alright
15:01 raiph joined
Mouq The only use of the $r and $rw vars in open() is the line "$r = $w = True if $rw;" 15:02
(Even in at the commit you linked, that is) 15:03
15:04 vendethiel left 15:06 vendethiel joined
Mouq Ven: Oh, I misread your comment 15:07
Ven: Carry on
:P
Ven Mouq: ... carry on blaming myself? :P 15:08
jnthn m: my @a = 1,2,3; @a.pop = 4; say @a; 15:09
camelia rakudo-moar 2a9de6: OUTPUT«1 2␤»
jnthn Hm :)
Yeah, I think that behavior ain't happening on native arrays...
masak no big loss :) 15:10
15:10 kjs_ left 15:11 chenryn joined 15:12 chenryn left 15:15 grondilu joined 15:18 FROGGS joined
raydiak g'mornin #perl6 15:20
Ven huh.
Ven is still puzzled somehow
hi raydiak
15:21 telex left
raydiak heya Ven 15:21
15:22 telex joined
[Coke] wonders if we should be able to say PRE POST { stuff }. (right now it fails) 15:24
psch [Coke]: i wondered the same, but PRE/POST seems to be the only useful case that i can see off hand 15:29
15:29 vendethiel left 15:31 virtualsue joined, Hor|zon joined
jnthn Pro-tip: nqp::push_i is not very useful for implementing unshift... 15:32
ugexe is there a way to see if test reports are being received by p6c.org? i dont know if i have something misconfigured, or if testers just isnt generating recent reports atm 15:33
[Coke] sub mom(){ sub m { say "m" }; PRE m;POST m;say "o"}; mom 15:35
even that's verbose, though, sure.
timotimo you need to pass in the arguments pre and post get, too, though 15:36
well, the $_ i suppose
so it'd want to be .&m
moritz ugexe: I guess FROGGS[mobile]++ would need to debug that 15:37
15:37 Hor|zon left
FROGGS ugexe: lemme check 15:39
err
hack itself has problems
it takes ages to log in 15:40
(still waiting)
psch can log in ok
but things like tab completion hang the shell
FROGGS O.o 15:41
psch similarly git status
moritz so, IO is slow?
FROGGS so the disk is busy?
moritz what does 'uptime' say?
moritz tries to log in
psch i don't know, "echo foo > test" is fine
15:41 eli-se left
psch 15:41:33 up 1 day, 5:28, 11 users, load average: 419.80, 402.71, 359.88 15:41
FROGGS perhaps there is a panda running that creates more and more .panda-work dirs...
wow
moritz that's a pretty high load :( 15:42
timotimo shouldn't be that high :(
FROGGS ugexe: your client might okay :o) 15:43
15:44 vendethiel joined
moritz there seem to be an awful lot of cron processes running 15:44
15:44 lichtkind joined
FROGGS :S 15:44
15:45 alini joined
moritz not cron, CRON 15:45
FROGGS tries to look innocent
15:45 eli-se joined
eli-se so 15:46
15:46 sqirrel joined
brrt afk 15:49
15:49 brrt left, Hor|zon joined, masak left, chenryn joined, PerlJam left 15:50 sergot left, Util left, avuserow left, chenryn left, psch left, Mouq left, [Coke] left
moritz now I lost console connection to hack :( 15:51
15:53 dalek joined, ChanServ sets mode: +v dalek
moritz reboot completed 15:53
sorry everybody 15:54
if somebody feels inclined to debug this (and this would be very much appreciated), my first step would be to set up collectd to gather some stats about the host 15:55
15:59 masak joined
masak shrugs off the reboot in all directions, like droplets off a hairy dog 16:00
16:00 psch joined, kjs_ joined
masak I should at least make a list of the channels I like, somewhere... 16:01
moritz masak: /save
masak ooh
moritz++
ugexe i only use bespoke artisinal handcrafted configs 16:02
psch m: "aa" ~~ /(.)+/; say @0 # wondered about this while looking at #72820 16:03
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...l?id=72820
camelia rakudo-moar 17b096: OUTPUT«「a」 「a」␤»
timotimo i also recommend trying weechat :P
psch m: "a" ~~ /(.)/; say &0 # what that ticket is about
camelia rakudo-moar 17b096: OUTPUT«「a」␤»
timotimo if your irssi gets booted off the 'net evrey once in a while anyway
hoelzro timotimo: ('weechat' > 'irssi').WHY
er, gt
*
16:04 [Coke] joined
masak m: say 'weechat' gt 'irssi' # because :) 16:04
camelia rakudo-moar 17b096: OUTPUT«True␤»
psch the obvious fix for &0 breaks @0, but i'm not sure if @0 is sensible or spec'd, anyway
if @() is @($/), would @0 be be @($0)? 16:05
[Coke] sorry, read the backlog, but i didn't get what happend to hack.
hoelzro I've been curious to try weechat, but I have such a heavily customized irssi config, I need a compelling reason =)
timotimo it just seems more sensible "by default" than irssi 16:06
but i have a hard time coming up with things i've missed from irssi; i sort of never looked back since i switched ;)
hoelzro interesting
timotimo it has a smart filter for quits and joins
hoelzro how is it "smart"?
timotimo i usually have that turned on all the time; it only shows a join if the person wrote something shortly after and only shows a part if the person spoke shortly before that 16:07
hoelzro oh, that's kinda neat
timotimo and since i always tabcomplete nicknames anyway before i write a response, i'll notice soon enough if the person had disappeared in the mean time
turning it off is just alt=
alt-k and then a key combination will give you exactly what you can type into the binding config to bind something to that combination 16:08
or alternatively what's currently bound to it
meta-k /input grab_key_command
meta-r /input delete_line
16:08 vendethiel left
smls m: say "étêté" ~~ /:ignoremark e/ 16:09
camelia rakudo-moar 17b096: OUTPUT«5===SORRY!5=== Error while compiling /tmp/4f5ohE_4wG␤Unrecognized regex modifier :ignoremark e/␤at /tmp/4f5ohE_4wG:1␤------> 3say "étêté" ~~ /:ignoremark e/7⏏5<EOL>␤»
smls :(
timotimo instead of /last that clobbers your screen you can ctrl-R /input search_text to search through the history
hoelzro that's a bonus 16:10
retupmoca ooh, weechat has remote clients
hoelzro hmm 16:11
that's pretty compelling
timotimo it does, "glowing bear" is a good one
16:13 vendethiel joined
smls m: say "dkzkwjeraeiz" ~~ / <[aeiou]>**3 / 16:15
camelia rakudo-moar 17b096: OUTPUT«「aei」␤»
smls ^^ is there any downside or side-effect to using the ** regex quantifier without surrounding spaces like that?
masak smls: no, not outside of :sigspace 16:17
smls ok
masak smls: if :sigspace is explicitly on, or you're in a rule, it matters 16:18
16:18 dwarring left
masak also, in those cases `<foo>*` vs `<foo> *` also matters. 16:18
as I learned the other week.
errand & 16:19
Ven masak: huh? 16:20
16:25 cognominal joined
psch m: say "a b" ~~ token { \w * }; say "a b" ~~ rule { \w * }; 16:26
camelia rakudo-moar 17b096: OUTPUT«「a」␤「a b」␤»
16:28 mr-foobar joined
psch Ven: S05:380 16:30
synopsebot Link: design.perl6.org/S05.html#line_380
Ven ah, thanks psch
16:35 eli-se left
psch m: $_ = "aa"; m/(a)+/; .say for @0 16:36
camelia rakudo-moar 17b096: OUTPUT«「a」␤「a」␤»
16:36 agentzh joined
psch .oO( and that's how i realized it already works like that... ) 16:36
16:37 raiph left
dalek p/mast_localref: 154998c | timotimo++ | / (2 files):
initial implementation of localref X local access

as well as three simple failing tests
16:37
16:40 retupmoca left, agentzh left 16:42 alini left 16:44 retupmoca joined 16:45 Util joined, btyler_ left, anocelot left, perl6_newbee left, btyler joined, anocelot joined
psch huh, a flapping test in S14-roles/parameterized-type.t 16:46
failed with make spectest, worked with make $filename
16:49 Possum left 16:52 Ven left
psch std: &0 # still not sure why std doesn't complain here 16:54
camelia std 28329a7: OUTPUT«ok 00:00 137m␤»
FROGGS std: &-1 16:55
camelia std 28329a7: OUTPUT«ok 00:00 139m␤»
FROGGS std: &-1e3
camelia std 28329a7: OUTPUT«ok 00:00 139m␤»
psch std: &bar
camelia std 28329a7: OUTPUT«5===SORRY!5===␤Undeclared routine:␤ 'bar' used at line 1␤Check failed␤FAILED 00:00 138m␤»
psch std: my &1 = { 1 }
camelia std 28329a7: OUTPUT«5===SORRY!5===␤Cannot declare a numeric variable at /tmp/ahH0SPgIdC line 1:␤------> 3my &17⏏5 = { 1 }␤Parse failed␤FAILED 00:00 137m␤»
psch so, no way to get a &1 anyway
m: MY::<&1> = { 1 } 16:56
camelia rakudo-moar 17b096: OUTPUT«Cannot modify an immutable Any␤ in method ASSIGN-KEY at src/gen/m-CORE.setting:2229␤ in sub postcircumfix:<{ }> at src/gen/m-CORE.setting:3647␤ in block <unit> at /tmp/FP8iSVy_p6:1␤␤»
psch that makes me wonder, if disallowing &\d+ in rakudo should be backported to std :s 16:57
16:59 rindolf joined 17:11 sqirrel left 17:12 smls left 17:20 cschwenz left 17:22 tgt joined 17:24 Vlavv_ joined 17:25 espadrine left 17:29 kjs_ left 17:33 zby_home joined 17:40 zakharyas left 17:46 alini joined
dalek kudo/nom: bdbb656 | lizmat++ | / (13 files):
Replace foo.HOW.method(foo,...) with foo.^method(...)
17:46
jnthn lizmat: You found out what hung? :) 17:48
lizmat yeah, thinko on my part
jnthn ah, not .^ bug. OK :) 17:49
lizmat no, not bug :-) well, not in your code :-) 17:50
however, if in a block there are multiple .^foo calls on the same object 17:51
[Coke] m: say sqrt(sqrt(9**2+19**2/22))
camelia rakudo-moar 17b096: OUTPUT«3.14159265258265␤»
lizmat it may make sense to create a temp HOW and work from there?
jnthn lizmat: Unlikely
lizmat: .HOW is a very cheap thing.
lizmat ok 17:52
jnthn lizmat: JITs to a couple of machine instructions, iirc
lizmat from a runtime point of view, my change didn't do anything, right ?
just better readability, no?
17:53 cognominal left
jnthn It may have produced a bit better code to 17:53
$a.HOW.name($a) # two lexical lookups
$a.^name # one lexical lookup put in a temporary and re-used 17:54
But lexical lookups are really cheap too. :)
lizmat ah, ok...lemme try that :-)
jnthn So you're unlikely to be able to measure it.
dalek kudo/nom: fe77d28 | lizmat++ | src/core/Variable.pm:
Remove reference to PARAMETERIZE
17:55
nwc10 jnthn: with any hammer smaller than cachegrind? 17:59
lizmat yeah, within noise levels, however with a ever so slight tendency towards $foo.^name being *slower*
18:00 _4d47 joined, hkatz joined
hkatz Hey there can anyone answer a question? 18:01
psch the answer to that on is "you don't have to ask to ask", i think :) 18:02
nwc10 and the answer to your initial question is "it depends what the question is"
hkatz lol, anyways I'm writing a script in p5 and I want to show off a bit of p6 by compaing and contrasting the implementations 18:03
in the p5 script I use a Setup.pm package to parse the command line, get the variables and options, validate them, then make them all globally available to the application
for p6, would I use a class for this? Role? module?
psch i'd probably use &MAIN
depending on what your constraints are 18:04
hkatz I can't seem to find a parallel way without putting the logic in MAIN methods in the main script
but I feel that pollutes the main script
psch what are the constraints?
hkatz constraints?
psch for the arguments to the script
how do you have to validate them
hkatz it's a simple script that just takes in some options and 1 arg from Getopts::Long
one sec I'll gist it 18:05
gist.github.com/hjkatz/42c801677efd611085ef
there's the GetOptions definition
should give you a basic idea
psch &parse_arg is probably the most interesting one, the rest you can already achieve with required nameds 18:06
hkatz oh! I already know that that's why I picked this specific example for a demonstration of p6
I'm asking about a way to NOT pollute the main script
I would prefer the main script offload most of the work to keep the logic simple 18:07
psch the logic in the signature of MAIN is just the signature
hkatz however, I'm not aware of a package in p6 being able to do the MAIN method
I think I could call a MAIN method in the main script and then immediatly pass that to my package with the same definitions
psch e.g. «sub MAIN(Str :$targets-file!) { }» makes your script require "--targets-file=$file" or print usage
hkatz but that seems silly
ugexe %*ARGS or whatever stores the arguments doesnt it 18:08
hkatz psch, even better is <<subset File of Str where *.IO.e;>>
ugexe or just pass *%_ from MAIN 18:09
hkatz think that'll work?
jnthn hkatz: To me, the script is the right place to define the command line interface, not pollution. :) But you should be able to write MAIN methods in a module and put "is export" on them
psch doc.perl6.org/language/5to6#Getopt%3A%3ALong
hkatz: yes, that would guarantee you get a file
hkatz jnthn thank you, I'll take a look into that. The only reason I was moving it to another file is because it's a Setup.pm
psch i'm with jnthn++ here, arguments should be validated by the main entry point
hkatz basically to get all the globals, settings, etc up and ready 18:10
psch fwiw, i'd rather put all the not-setup logic into the module
18:10 _4d47 left 18:12 virtualsue left 18:14 Rounin joined, _4d47 joined
hkatz in a package in p6 how would you emulate or replicate the functionality of Exporter() with global subs and variables? 18:23
just add "is export" after them?
nine_ hkatz: basically, yes
hkatz lol basically ;)
everything about perl is basically* *not actually basic 18:24
nine_ hkatz: there is more functionality available, but "is export" is all you need most of the time
psch beyond the basically there's «is export(:DEFAULT)» or «is export(:MANDATORY)» or «is export(:rarely-used)» 18:25
FROGGS is relieved that the perl6-j+Digest bug is not a precomp one
psch where the capital ones are special, as i understand
hkatz can I export multiple variables at once? or only at definition? 18:28
in p5: <<use vars qw( ... ); >>
in p6?
18:29 kjs_ joined
hkatz I gtg, I'll ask again later :P 18:29
18:32 sqirrel joined 18:33 _4d47 left 18:38 _4d47 joined 18:40 lizmat_ joined, kjs_ left
nine_ Why can I not use my normal rt.perl.org user for Perl 6 bugs? 18:41
[Coke] define "use"
there's a separate privs list. p5 bugadmins aren't p6 bugadmins 18:42
dalek kudo/nom: fc178b7 | (Geoffrey Broadwell)++ | src/core/IO/Path.pm:
Now that nqp-j supports nqp::readlink, enable IO::Path.resolve for any backend
ecs: 11b888d | lizmat++ | S32-setting-library/Exception.pod:
Speculate about kebab-casing hidden_from_backtrace
18:43 lizmat left
FROGGS jnthn / psch: that's the jvm+Digest bug: gist.github.com/FROGGS/e2093d1bdcef95700b9c 18:49
quite weird...
dalek ast: a0ea667 | jnthn++ | S09-typed-arrays/native.t:
Add some basic tests for native int/num arrays.
18:50
jnthn FROGGS: Very. 18:51
FROGGS okay, can be simplified to: 18:52
$ perl6-j -e 'my $a = (42 for ^2).flat; say $a[0]'
Nil
nine_ [Coke]: coming from the perl 6 ticket list I can only login using Bitcard or use the public interface. Coming from a CPAN module's ticket I can use the login for CPAN authors 18:53
FROGGS perl6-j -e 'my $a = (42 for ^2).flat; say $a.WHAT, " ", $a.elems' # (List) 0 18:55
[Coke] rt.cpan.org is special.
would be my guess.
(I think those were merged at some point but started out separate)
vendethiel m: say %(do for <<"foo: a=b c=d" "bar: 1=2">> { my ($pre, $post) = .split(/':' <.ws>/); $pre => $post.split(/<[= \s]>+/); }) 19:00
yoleaux 12 Mar 2015 23:44Z <eli-se> vendethiel: I also disallow mixed | and & without parens
camelia rakudo-moar fe77d2: OUTPUT«bar => 1 2, foo => a b c d␤»
vendethiel m: say %(do for <<"foo: a=b c=d" "bar: 1=2">> { my ($pre, $post) = .split(/':' <.ws>/); $pre => $post.split(/<[= \s]>+/); }).perl
camelia rakudo-moar fe77d2: OUTPUT«("bar" => ("1", "2").list.item, "foo" => ("a", "b", "c", "d").list.item).hash␤»
vendethiel m: say %(do for <<"foo: a=b c=d" "bar: 1=2">> { my ($pre, $post) = .split(/':' <.ws>/); $pre => $post.split(/<[= \s]>+/).hash; }).perl
camelia rakudo-moar fe77d2: OUTPUT«("foo" => {"c" => "d", "a" => "b"}, "bar" => {"1" => "2"}).hash␤»
vendethiel hehehehe
nine_ Ok, I now got myself a bitcard account and used that to login but am still not able to add information to my ticket
To the contrary, I cannot even look at the Perl 6 ticket list when logged in?! 19:01
19:04 diana_olhovik left
dalek pan style="color: #395be5">perl6-examples: a5e2753 | paultcochrane++ | / (2 files):
Example() now takes a pod-content field
19:05
pan style="color: #395be5">perl6-examples: 73832bb | paultcochrane++ | categories/best-of-rosettacode/100-doors.pl:
[rosettacode] merge pod blocks; add AUTHOR
pan style="color: #395be5">perl6-examples: 9379274 | paultcochrane++ | README.md:
Document how to run examples in README
itz nine_: I've had that problem .. I had less access logged into RT than anonymous ... I had to create another accn
19:05 _4d47 left
dalek pan style="color: #395be5">perl6-examples: 43d3193 | paultcochrane++ | README.md:
Stop the #perl6 channel from being a heading
19:07
timotimo hehe 19:08
bartolin Fr
er
nine_ itz: but I just registered this account? Why would yet another account work any better?
bartolin FROGGS: is that JVM+Digest bug in RT as RT #123506 ? 19:10
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=123506
psch FROGGS: there's quite a bit weird there, yes 19:11
FROGGS bartolin: yes, exactly!
psch $ ./perl6-j -e'my method flats($list:) { $list.flattens ?? $list !! nqp::p6list(nqp::list($list), List, Bool::True) }; say flats (1 for 1)'
1
FROGGS look at that:
psch but!
FROGGS $ perl6-j -e 'my $a = (do 42 for ^2).flat; say $a.WHAT, " ", $a.elems' # (List) 2
$ perl6-j -e 'my $a = ( 42 for ^2).flat; say $a.WHAT, " ", $a.elems' # (List) 0
bartolin FROGGS: ahh, thanks!
psch $ ./perl6-j -e'my method flats($list:) { $list.flattens ?? $list !! nqp::p6list(nqp::list($list), List, Bool::True) }; say (1 for 1).&flats'
Nil
FROGGS bartolin: thank you for the reference :o)
nine_ Is there some RT administrator in this channel?
FROGGS nine_: ask [Coke]++ 19:12
psch: hmmm
psch &flats in my examples is identical to List.flat, fwiw
FROGGS hmmm
nine_ [Coke]: could you please give my account at least as much priviledge as anonymous? Or even better the ability to contribute information? User name is nine 19:13
FROGGS "user name is nine" - "nein"
[Coke] I can only make you a bugadmin.
19:13 xinming left
FROGGS psch: that's highly interesting (and weird) 19:14
19:14 xinming joined
nine_ [Coke]: if that allows me to post additional information, I'll gladly take that ;) 19:14
[Coke] nine_: "couldn't find that principal"
are you sure it's "nine", no special characters, on rt.perl.org ?
nine_ [Coke]: yes? Email is [email@hidden.address] 19:15
[Coke] found the email. added.
psch FROGGS: i don't get the implementation of p6list on moar, so i can't really compare it to jvm, but that's where i'd look...
19:16 rindolf left
psch FROGGS: aside from that it could maybe be some kind of wonkiness with in IndyBootstrap, differences between methcall_noa and subcall_noa, but that's pretty much a blind guess 19:16
dalek kudo/nom: 44f46ac | lizmat++ | / (18 files):
"hidden_from_backtrace" -> "hidden-from-backtrace"
nine_ [Coke]: many thanks! 19:17
psch s/with //
masak usev6++ # RT ticket wrangling 19:18
dalek line-Perl5: 54e5c05 | (Stefan Seifert)++ | / (3 files):
Support READLINE on file handles passed from P6 to P5
19:19
[Coke] nine_: of course. thanks. 19:20
dalek kudo/nom: d4eb903 | lizmat++ | src/core/ (2 files):
"is hidden_from_USAGE" -> "is hidden-from-USAGE"
19:27
19:28 vagabondo joined
nine_ .seen [Tux] 19:29
yoleaux I saw [Tux] 08:26Z in #perl6: * [Tux] => $work
nine_ .seen |Tux|
yoleaux I saw |Tux| 11 Mar 2015 14:53Z in #perl6: <|Tux|> no
masak famous last words
jdv79 what's with the s/_/-/ stuff? is there a non-subjective reason? 19:30
psch jdv79: consistency is the main reason
nine_ .tell [Tux] Text::CSV_XS can now read from Perl 6 file handles :) Just be sure to open the file with chomp => False.
yoleaux nine_: I'll pass your message to [Tux].
masak jdv79: it's the War On Underscores
psch jdv79: and kebab-case won, Because We Can™
dalek c: 3e81edc | moritz++ | lib/Type/ (3 files):
track hidden_from_backtrace rename
19:31
nine_ Still feels like difference for the sake of difference to me
lizmat_ moritz++
19:31 lizmat_ is now known as lizmat
psch fwiw, i disagree with kebab-casing CAPS-ONLY names, if only because it's inconvenient to type 19:32
but i'm not going to argue about that
nine_ psch: ONE-OF-THE-FEW-GOOD-USES-FOR-CAPS-LOCK 19:33
psch: but I guess you're as little used to using caps lock as I am ;)
lizmat psch: fwiw, kebab-casing ALL-CAPS is intended to make it inconvenient to type :-)
19:33 virtualsue joined
psch nine_: my caps lock is compose :) 19:33
lizmat it's a bit like the QWERTY layout :-)
psch lizmat: i guess that makes sense, and is as good as a reason as any for me 19:34
lizmat psch: how often *will* you type something like AT-KEY anyway ?
psch lizmat: as i said, i won't argue the point, especially as i hadn't considered that the places where we want all caps *should* be inconvenient, which only makes it work better 19:36
case in point: MONKEY_TYPING vs MONKEY-TYPING
19:37 hkatz left
psch (where i actually typoed twice in the kebab-caps version) 19:37
jdv79 i was just curious, partly because p5 tends to favor snake case and partly because it seems a little petty but i'm all for consistency.
psch which does add sufficient gravitas
timotimo I-DONT-FIND-IT-HARD-TO-TYPE-KEBABCAPS
[Coke] ME-EITHER-AND-I-DON'T-EVEN-HAVE-A-CAPSLOCK. 19:38
19:39 madmuid1 joined
timotimo I-CAN-GET-CAPSLOCK-BY-PRESSING-BOTH-SHIFT-KEYS-AT-THE-SAME-TIME 19:39
AND-THEN-THE-DASH-IS-ON-CAPSLOCK-AND-T
19:40 madmuid left
psch .oO( that aside, i have this hud for storing muscle-powered vehicles, and i'm wondering about the color... ) 19:41
japhb FROGGS: I could have sworn once seeing a discussion that the difference between 'a for b' and 'do a for b' was intentional: for doesn't return its iterated results unless you 'do for' 19:42
Maybe that was only temporarily the case and r-j never caught up?
psch oh, i remember that
timotimo you store muscle-powered vehicles inside a heads up display? 19:43
psch timotimo: no, in my heads up display i store reminders for typos that ruin silly jokes :/
timotimo :) 19:44
19:45 spider-mario joined 19:46 sqirrel left 19:47 aborazmeh joined, aborazmeh left, aborazmeh joined 19:48 espadrine joined, hobbs left 19:51 hobbs joined
psch japhb: the parens aren't superstitious 19:52
m: my $x = 1 for ^2; say $x; $x = (1 for ^2); say $x
camelia rakudo-moar d4eb90: OUTPUT«1␤1 1␤»
dalek kudo/nom: 80f5c8d | lizmat++ | / (3 files):
"use MONKEY_TYPING" -> "use MONKEY-TYPING"

Alas, no deprecation message for MONKEY_TYPING just yet, as this exceeds my rakudo-nqp capabilities.
psch m: my $x = do 1 for ^2; say $x # and this 19:53
camelia rakudo-moar d4eb90: OUTPUT«1 1␤»
19:53 diana_olhovik joined
moritz moritz@pat:~/p6/all>git grep MONKEY_TYPING|wc -l 19:54
16
7 of those are in p6/doc
masak heh.
jnthn Monkey see, monkey doc.. 19:55
19:55 vagabondo left
dalek c: 0fe9413 | moritz++ | lib/Type/X/ (4 files):
s/MONKEY_TYPING/MONKEY-TYPING/
19:58
lizmat moritz++
dalek ast: 5b8dbb5 | lizmat++ | / (18 files):
"use MONKEY_TYPING" -> "use MONKEY-TYPING"
20:02
FROGGS O.o 20:03
lizmat ??
too soon ?
FROGGS why are we changing that at all?
lizmat in roast? or in core?
FROGGS in both
lizmat consistency ?
FROGGS foo-bar makes sense to be because you dont have to press shift for the dash/underscore.. 20:04
but for FOO-BAR I have to release shift, which is a keystroke too many
that's why I thought we go for 'foo-bar' and 'FOO_BAR' 20:05
psch FROGGS: but the CAPS-ONLY things we have are supposed to be inconvenient
like EVAL, or MONKEY-TYPING
FROGGS psch: they have to stick out, that's all
like method BUILD
lizmat FROGGS: eh, why didn't you speak up when I did AT-KEY and friends?
FROGGS "I do something special/weird here, look" 20:06
lizmat: because I dunno :/
arnt these internal only?
lizmat alas, no, they are part of the rakudo implementation
FROGGS japhb: I know about the distinction of a statement level 'for' and the opposite... but the handling of that happens in Perl6::Action...
lizmat and they allow you to create custom classes that allow you to do [] and {}
FROGGS japhb: I dont think there VM specific bits 20:07
jnthn lizmat: Part of Perl 6, surely...
FROGGS japhb: (at least I hope so)
lizmat: hmmm
jnthn lizmat: Otherwise, there's no way to implement a custom collection type
FROGGS lizmat: I'd like to here TimToady's opinion on that
lizmat jnthn: nothing about AT-KEY and friends is speculated about
FROGGS just if it should be AT-KEY or AT_KEY 20:08
lizmat therefore I put tests for AT-KEY and friends in "make test"
grondilu having to press shift is maybe a good thing for something you want to dissuade the user to type.
FROGGS because at least on my keyboard AT_KEY is easier to type
20:08 vagabondo joined
masak also, '_' reads more like a space between words than '-' 20:09
jnthn lizmat: Wait, you removed tests for those from spectest?
grondilu the underscore has a look that suits more the "experimental" aspect of the pragma.
lizmat yes, there weren't many, only in Set/Bag/Mix mostly
jnthn lizmat: Removing stuff from spectest because they aren't mentioned in the design docs is an odd choice, given the spectests are primary...
Or at least, that's how I consider them. 20:10
FROGGS grondilu: that does not look anywhere near 'experimental' to me :o)
masak I don't mind underscores in ALL_CAPS things, and I will probably continue to use them in my programs. but I don't have a hyena in this race. if the powers-that-be want to upheav all of the ecosystem to get rid of underscores, then please go ahead. :)
lizmat jnthn: note: these were tests for AT-KEY (at_key) specifically, not for [] or {} 20:11
masak upheave*
20:11 vagabondo left
jnthn lizmat: In my view, [AT|ASSIGN|BIND|EXISTS|DELETE]-[POS|KEY] should get decent spectest coverage, *especially* tests covering using them for implementing custom types. 20:11
lizmat I agree they must be tested 20:12
but I think they belong in the sanity test (make test) rather than in roast (make spectest)
jnthn But they're a public-facing part of the language!
lizmat as other implementation of Perl6 might not use this name *or* that type of implementation
jnthn: I was under the impression that it was a public-facing part of an *implementation* of the language 20:13
FROGGS lizmat: if it is in roast it has to be supported by Perl 6 compilers
moritz lizmat: I think they should be documented in the design docs 20:14
lizmat well, by all means, I'll move the tests :-)
FROGGS lizmat++
lizmat does niecza have at_key as well ?
jnthn lizmat++
lizmat does pugs ? 20:15
jnthn I suspect niecza may well do so
Pugs is probably too long ago to be relevant. But we've had the at_pos/at_key thing for O(years) now.
20:16 FROGGS[mobile] left
lizmat well, if we all agree it's part of Perl 6 as a language, and not of the rakudo implementation, that's fine by me :-) 20:16
jnthn Perl 6 as a language needs a mechanism for doing this stuff.
20:17 yqt joined
lizmat in any case, at_key and friends were grossly undertested 20:17
jnthn can quite imagine 20:18
lizmat the removal of the tests is in 33d5415548 in roast
most of those I had put in myself
suggestion fot location in roast for t/01sanity/22-KEY.t ? 20:19
S02-primitives ? 20:20
(new directory)
jnthn S32-container maybe?
20:21 aborazmeh left
[Coke] irc-- 20:21
FROGGS [Coke]: be nice, IRC could be your father :P
lizmat [Coke]: ?? 20:22
[Coke] that is… highly doubtful
permissions. remembering channels you've subbed to. lack of built in logging. 20:23
20:23 bayprogrammer joined
lizmat jnthn: would you be against a new dir S02-primitives ?? Feels to me AT-KEY and friends need to be speculated about in S02, no? 20:24
or perhaps S32-setting-library/Basics.pod ? 20:25
FROGGS psch: it is more about statement level for I guess, or method vs. sub: perl6-j -e 'my method flats($list:) { say $list }; (1 for 1).&flats' # Nil 20:27
jnthn lizmat: I guess S02 does talk a decent bit about container stuff too 20:28
lizmat: So it'd fit there I guess
20:28 darutoko left
lizmat but I guess it's more general in S02, and more specific in S32-basics 20:28
so we might well keep AT-KEY and friends in S32-basics as to not make S02 even heavier than it already is 20:29
dalek ast: c828560 | lizmat++ | S32-basics/xxKEY.t:
Move sanity AT-KEY and friends tests to roast
20:30
lizmat we can always move it later :-)
dalek kudo/nom: e07ef9d | lizmat++ | t/ (2 files):
Move sanity AT-KEY and friends tests to roast
20:31
20:31 virtualsue_ joined 20:32 virtualsue left, virtualsue_ is now known as virtualsue 20:33 molaf joined
lizmat jnthn: BTW, I asked a question a few days ago about the reason for ASSIGN-KEY and AT-KEY being rw 20:34
looks to me either AT-KEY could be made *not* is rw, or we don't need an ASSIGN-KEY primitive 20:35
jnthn We don't *need* ASSIGN-KEY, but it makes very common case assignments dramatically faster. 20:38
In a way that we will struggle to match with other optimizations.
20:39 beastd joined
jnthn There was some discussion about it between myself and TimToady around the time it went in, which can probably be dug up from the ir clogs. 20:39
masak m: sub foo(@bar) { @bar = 1, 2, 3; say @bar }; my @x = 4, 5, 6; foo(@x)
camelia rakudo-moar 80f5c8: OUTPUT«1 2 3␤»
masak so... 'is rw' is not needed on container types? 20:40
m: sub foo(@bar) { @bar = 1, 2, 3; say @bar }; my @x = 4, 5, 6; foo(@x); say @x
camelia rakudo-moar 80f5c8: OUTPUT«1 2 3␤1 2 3␤»
jnthn masak: It's only interesting on scalars.
masak I see.
jnthn masak: Well, and on slurpyes.
masak S02 contains two examples of an array parameter being marked 'is rw' 20:41
jnthn It's another case of the "has @.foo is rw" kettle of fish.
FROGGS masak: the intend probably was to disallow messing with its slots by default 20:42
masak: but it proves to be difficult
masak I know. 20:43
FROGGS m: say (42 for 1)
camelia rakudo-moar e07ef9: OUTPUT«42␤»
FROGGS jnthn: is that a statement level for?
masak I seems to recall me some wording in the sp^Wdoc about the default readonlyness being applicable "one level down" (that is, to the array's elements, too) 20:44
this, too, I believe, is difficult to enforce
jnthn FROGGS: I think the interesting ones are statementlist level, no? 20:45
masak m: sub foo(@bar is copy) { @bar = 1, 2, 3; say @bar }; my @x = 4, 5, 6; foo(@x); say @x
camelia rakudo-moar e07ef9: OUTPUT«1 2 3␤4 5 6␤»
masak ah, good.
jnthn FROGGS: That one doesn't count as having the eager semantics.
masak this is what I needed.
psch $ ./perl6-j -e'say (eager (1 for ^2)).flat' 20:47
1 1
psch shrugs
FROGGS jnthn: by statementlist level you basically mean thruthness of $*statement_level, right?
psch this is a point where i don't know what behavior should be correct
FROGGS when looking at rakudo/src/Perl6/Grammar.nqp:1275: rule statementlist($*statement_level = 0) {
psch if «say (42 for 1)» isn't eager and r-m print something but jvm doesn't...? 20:48
i suppose &say should cause eager evaluation
or at least some kind of evaluation?
FROGGS well, I hope so
jnthn FROGGS: yes 20:49
psch but it breaks on assignment too, doesn't it? which means there's a spot where r-j doesn't realize it has to evaluate
which is List.flat
FROGGS btw, for that example $*statement_level is trueish but $ast.ann('statement_level') is falsish
on moar 20:50
ugexe FROGGS: i dont see any of my recent test reports showing up, although I see your URI report popped up. is testers working fine or are my test enviroments likely borked? 20:55
20:58 MadcapJake left
dalek kudo/nom: 26b7eb1 | lizmat++ | src/core/SetHash.pm:
Make SetHash<a> = True about 5% faster
20:59
raydiak notices that KEY and POS have been converted to uppercase but not invoke 21:00
dalek Heuristic branch merge: pushed 30 commits to rakudo/newio by lizmat 21:01
lizmat raydiak: I was under the impression that the jury was till out on that
specifically which UPPERCASE name to be used instead of invoke()
raydiak ah...haven't been keeping a close eye for a few days, wasn't sure if it was intentional or not
what's wrong with INVOKE?
lizmat I'm not sure either :-) 21:02
perhaps it is ok to change, but I missed it somehow while backlogging
psch &
raydiak figured I'd ask since it's the one stopping Inline::Lua from matching the other Inline:: APIs 21:03
FROGGS ugexe: we had a blackout from 12th midnight to were my URI reports were received 21:04
ugexe FROGGS: yeah, i *should* have had tests submitting for the last hour from at least 1 machine
unless `PANDA_SUBMIT_TESTREPORTS=1 && panda smoke` not work the same as `PANDA_SUBMIT_TESTREPORTS=1 panda smoke` (thats all ive changed since) 21:05
lizmat raydiak: looking at irclog.perlgeek.de/perl6/2015-03-07#i_10238687
FROGGS ugexe: wrong 21:06
the && is to blame
ugexe: try that: PANDA_SUBMIT_TESTREPORTS=1 panda install URI 21:07
lizmat raydiak: irclog.perlgeek.de/perl6/2015-03-07#i_10240527
FROGGS ugexe: and then: perl6-m -e 'say "%*CUSTOM_LIB<site>/panda/reports.$*PERL.compiler.version()".IO.lines' 21:08
lizmat lizmat: guess I missed irclog.perlgeek.de/perl6/2015-03-07#i_10240635 21:09
FROGGS ugexe: this should print: URIv0.1.0TrueTruemoar
ugexe: if it is in that reports file, it was sent 21:10
japhb FROGGS: Any chance for the S11 branch(es) to make it in for 2015.03?
FROGGS japhb: no chance
ugexe FROGGS: it appears to have sent then. let me try with the && and see if that makes it not work 21:11
japhb OK, too bad.
FROGGS japhb: ohh wait... the eleven branch only exists in panda anymore
raydiak lizmat: heh cute; not sure that CALL-ME would be my first choice though I don't much care as long as it's more obscure and different-looking than lowercase "invoke"
japhb Oh? I didn't realize it was only there now!
FROGGS ugexe: then try another module, the reports file is used to only send a report once per module/result
lizmat raydiak: getting tired now, will look at invoke() -> CALL-ME tomorrow 21:13
raydiak: feels like it's too easy to make mistakes there :-)
hoelzro two threads can safely read from a single channel, right?
lizmat yes, that's the idea, afaik
hoelzro ok, I may have found a bug...
21:13 agentzh joined, agentzh left, agentzh joined
raydiak lizmat: probably true...thank you again for working on this (and like a million other things) 21:14
hoelzro going to dig a bit
lizmat hoelzro: S17:259
synopsebot Link: design.perl6.org/S17.html#line_259
lizmat raydiak: yw :-)
hoelzro thanks lizmat
dalek kudo/newio: 6506a31 | lizmat++ | docs/ChangeLog:
Mention some more deprecations
21:17
p: f3bd3c5 | jnthn++ | src/vm/moar/HLL/Backend.nqp:
Fix "cannot dump Str" profile report bug.
lizmat [Tux] ^^^^
ugexe FROGGS: it was the &&. must have to do with how panda handles resetting that ENV (or what i think i remember from panda from months ago)
jnthn .tell |Tux| latest NQP has a fix for the profile dump bug
yoleaux jnthn: I'll pass your message to |Tux|.
lizmat jnthn: shall I bump NQP_REV ? 21:18
FROGGS ugexe: the && just lets your bash not pass it to panda... 21:19
ugexe i thought panda just read it from ENV?
jnthn lizmat: No
dalek kudo/nom: 95ef453 | lizmat++ | docs/ChangeLog:
Mention some more deprecations (in right branch)
jnthn lizmat: I've a MoarVM dump to do also,
lizmat jnthn: okidoki
jnthn lizmat: I'll bump it soon.
lizmat ok 21:20
I know [Tux] is eager to see that fix :-)
hoelzro: if you can reproduce a Channel bug, could you please put the test in t/spec/S17-channel/ ? 21:21
hoelzro lizmat: you got it
I'll probably paste it here first, to check my sanity
dalek p: caa6a98 | jnthn++ | tools/build/MOAR_REVISION:
Bump MOAR_REVISION for bindpos_n JIT fix.
lizmat sure
FROGGS ugexe: yes, and I was under the impression that FOO=42 && /my/program would be a noop regarding to the env... 21:22
jnthn Hm, even before optimization work, native arrays come out faster
lizmat cool!
japhb Excellent!
FROGGS I like the word faster!
japhb
.oO( Party on, Wayne! )
21:23
masak I like the *concept* faster! :D 21:24
lizmat
.oO( even more concepter! )
21:24 skids left
masak .oO( in Swedish, the word "faster" means "father's sister" -- "aunt" ) 21:24
21:25 Ugator1 joined
masak we have very compelling/logical names for relatives in Swedish. the rest of the world should copy us. 21:25
lizmat :q
hugme hugs lizmat, good vi(m) user!
lizmat hehe
21:25 Ugator left
masak hugme: do you ever hug Emacs users? 21:25
^X^S 21:26
apparently not.
dalek ast: b129356 | jnthn++ | S09-typed-arrays/native-decl.t:
Tests for "my int @x" and "my num @x".

These focus on the declaration syntax; native.t is left to focus on the native array type itself.
21:29
ugexe whats the least amount of RAM someone has heard of jvm rakudo installing succesfully?
vendethiel masak: only if they have evil-mode installed ;-) 21:30
FROGGS that's sooo weird:
perl6-m -e 'say my $a = (42 for ^2)' # 42 42
perl6-j -e 'say my $a = (42 for ^2)' # Nil
perl6-j -e 'say (42 for ^2)' # 42 42
vendethiel I need to look at how I can make evil-mode behave like I want it...
jnthn FROGGS: Any notable diffs if you --target=ast and --target=optimize ?
lizmat ugexe: I've heard 1G and up
FROGGS jnthn: the ast diff shows that the jvm uses p6bindsig where moar does a bunch of lowered_param thingies 21:31
ugexe i havent had success with 1G yet :(
vendethiel uses ";" instead of ":" on vim because one less keypress
ugexe def havent had success with 350 lol
FROGGS same for optimize 21:32
hoelzro oooo, I got my concurrent implementation to segfault
FROGGS hoelzro++
hoelzro non-deterministicly, of course =(
FROGGS :/
lizmat yeah, that happens, there's quite a lot of skipped tests in S17* 21:33
that do that still :-(
hoelzro =(
the S17 stuff is exactly why I reached for P6 for this tool
lizmat please gist it anyway, perhaps it will give us the info we need to kill off the non-deterministici;kjljgzjxgj 21:34
dalek kudo/nom: 439c40c | jnthn++ | tools/build/NQP_REVISION:
Bump NQP_REVISION for Moar JIT + profiler fixes.
retupmoca I'd really like to use P6 threads, but I've been holding off; they aren't yet stable
vendethiel ^ 21:35
lizmat m: multi a () {}; multi a(*%_) {}; a() # how can I make a MMD that matches on () in this case?? 21:36
camelia rakudo-moar 26b7eb: OUTPUT«Ambiguous call to 'a'; these signatures all match:␤:()␤:(*%_)␤ in sub a at /tmp/RAGGuyxlJv:1␤ in block <unit> at /tmp/RAGGuyxlJv:1␤␤»
21:37 zby_home left
lizmat I guess you can't :-( 21:38
jnthn I don't think you can.
On the threading/concurrency stuff: yes, it needs work. It's on my todo list, after native arrays and NFG. 21:40
dalek kudo/nom: 1cc426d | jnthn++ | / (2 files):
Add a partial array[T], usable for native int/num.

This still has a number of pieces missing that are needed for full functionality (for example, .perl and .gist are to come), not to mention many missing optimizations. However, it is enough to pass the initial ~200 native array tests.
21:45
kudo/nom: fc1e6c2 | jnthn++ | src/Perl6/World.nqp:
Make "my int @a" and "my num @a" use array[T].
kudo/nom: 6c78f03 | jnthn++ | t/spectest.data:
Run new native array test files.
lizmat jnthn
++
masak when I make typos in my code, Levenshtein taunts me about them :P
21:45 telex left 21:46 telex joined
jnthn masak: Learn to tpye proper :P 21:46
geekosaur porper?
jnthn That's the one 21:47
lizmat porperly ?
geekosaur and porpoisely
masak porpoisefully 21:48
jnthn dolphinately
masak meh... orca... 21:49
jnthn :D
21:53 muraiki left 21:55 yqt left, cognominal joined
lizmat jnthn: for: 22:02
multi method ASSIGN-POS(array:D: Int $idx, $value) {
nqp::bindpos_i(self, $idx, $value)
}
isn't there a coercer for $value missing ?
otherwise, what's the difference with: 22:03
multi method ASSIGN-POS(array:D: Int $idx, int $value) {
nqp::bindpos_i(self, $idx, $value)
}
same for the numarray role, BTW 22:06
22:06 bayprogrammer left 22:07 adu joined
lizmat sleep& 22:08
22:14 xfix left 22:15 bjz left
FROGGS hmmm, since 'say (42 for ^2)' works, but 'say my $a = (42 for ^2)' does not I guess it is about: 22:15
rakudo/src/vm/jvm/runtime/org/perl6/rakudo/RakudoContainerSpec.java:33: public void store(
22:17 zby_home_ joined 22:18 bjz joined 22:21 diana_olhovik left
jnthn lizmat: The one taking a lowercase int is to avoid boxing a native value 22:24
[Tux] jnthn++
yoleaux 19:30Z <nine_> [Tux]: Text::CSV_XS can now read from Perl 6 file handles :) Just be sure to open the file with chomp => False.
[Tux] nine++
jnthn lizmat: The other one will try to unbox (the code-gen takes care of that) and explode if not, thus serving as the type check.
[Tux] things to play with this weekend :) 22:25
22:27 kaare_ joined 22:28 kst` joined 22:29 kst left 22:35 spider-mario left 22:41 dolmen joined 22:42 adu left 22:53 iv left 22:54 Rounin left
dalek kudo/nom: 61ec592 | jnthn++ | t/spectest.data:
Re-enable accidentally disabled spectests.
22:57
23:03 tgt left 23:05 pecastro left 23:13 iv joined 23:14 gfldex left 23:18 lea left 23:19 donaldh joined
donaldh jnthn: I think I've isolated the cause of UnwindException escapes 23:23
FROGGS do tell 23:24
jnthn donaldh: oh? :) 23:25
donaldh runtime exceptions throw sttraight past the 'handle' try/catch block that would be the UnwindException target.
So I have hacked up a fix that wraps a handle block in an extra try/catch for Throwable. 23:26
gist.github.com/donaldh/6d1a12182b49fb5947e5
If this looks right ish, then I'll clean it up.
There may be an altogether better way of dealing with this but I think it would require a bigger dig into QAST/Compiler.nqp 23:28
jnthn donaldh: It seems sane to me, at first glance 23:29
23:30 cognominal left
donaldh So the generated code for a 'handle' op is now try { try { ... } catch (Throwable) { rethrow ControlException or dieInternal(Throwable) } } catch (ControlException) { ... } 23:30
I'll clean up the names to make it clearer what the inner and outer catches are.
jnthn It seems like a general fix rather than a hack for a specific problem, so I think it's the right direction. 23:32
donaldh Yes, it's definitely a general problem with the way the 'handle' op generates try/catch code.
donaldh is trying not to get alarmed by the volume of bytecode we generate for simple perl code :-/ 23:34
jnthn yay, between the compiler and spesh, "my int @a; my int $i = 0; while $i < 1000000 { @a[$i] = 1; $i = $i + 1; };" 23:38
ends up fully inlined
donaldh \o/ 23:39
jnthn And JIT compiled
Now we "just" need to improve the code quality :)
(lots of room for that)
23:41 virtualsue_ joined 23:42 virtualsue left, virtualsue_ is now known as virtualsue
FROGGS btw, for the 'my $foo = (42 for ^2)' issue on jvm, RakudoContainerSpec.store gets Nil as the value to store 23:43
so it is not store as I thought earlier 23:44
jnthn Yay, and now the thing I pasted above also does zero GCs. 23:46
FROGGS wow
jnthn profiler++ # telling me useful stuff
donaldh jnthn++ 23:47
FROGGS what's the timing compared to before? do you know?
jnthn haha... "In total, 204 call frames were entered and exited by the profiled code. Inlining eliminated the need to create 999894 call frames (that's 99.98%)."
FROGGS hehe
23:48 virtualsue left
jnthn my int @a; my int $i = 0; while $i < 1000000 { @a[$i] = 1; $i = $i + 1; }; # 0.69s inc startup 23:48
my @a; my int $i = 0; while $i < 1000000 { @a[$i] = 1; $i = $i + 1; }; # 1.42s inc startup
23:48 espadrine left
jnthn If you pre-size the array you get 0.39s vs 1.17s fwiw. 23:49
FROGGS ohh, yeah 23:50
jnthn++
:o)
btw, we do not presize bufs, so appending a single element is quite costly
I was thinking we should allocate always in 2**n, like we do for other stuff in moar 23:51
jnthn But a Buf is a VMArray underneath, which does the power-of-2?
FROGGS hmmm, strange 23:52
I try to come up with an example this weekend
jnthn ooh 23:54
timecmd perl -E "use integer; my @a; $a[9999999] = 0; my $i = 0; while ($i < 10000000) { $a[$i] = 1; $i = $i + 1; }; say scalar(@a)" 23:55
command took 0:0:1.94 (1.94s total)
C:\consulting\rakudo>timecmd perl6-m -e "my int @a; @a[9999999] = 0; my int $i = 0; while $i < 10000000 { @a[$i] = 1; $i = $i + 1; }; say @a.elems"
command took 0:0:1.23 (1.23s total)
FROGGS \o/
23:56 dolmen left
FROGGS now I can dream of something fast :o) 23:56
gnight 23:57
23:57 FROGGS left
jnthn o/ 23:57