Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2014-08-05

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:01 rindolf joined #perl6
00:07 timotimo don't think we actually want that
00:07 timotimo cmp is a fallback for when we have data we're not sure about how to compare properly
00:08 chenryn joined #perl6
00:08 timotimo so ... not sure if stability ought to be guaranteed
00:08 lue to be honest, I'm not entirely sure how 12 and '12a' are supposed to compare, or '12a' and 2
00:09 timotimo it could be more confusing if a "4" gets sorted as More than 5, because Str comes after I
00:15 hoelzro timotimo++ # blog post
00:17 BenGoldberg m: my @a = 12, '12a', 2, 12; @a.sort.say; @a.sort.sort.say;
00:17 camelia rakudo-moar b17a24: OUTPUT«2 12 12 12a␤2 12 12 12a␤»
00:17 SevenWolf joined #perl6
00:17 BenGoldberg m: my @a = 12, '12a', 2, 12; @a.sort.say; @a.reverse.sort.say;
00:17 camelia rakudo-moar b17a24: OUTPUT«2 12 12 12a␤2 12 12 12a␤»
00:17 hoelzro timotimo: btw, I managed to get my Rakudo build back to a decent speed again =)
00:21 [Coke] (sorting heterogenous stuff) tcl's dictionary sort is nice here.
00:23 dalek roast/S26-WHY: cb20042 | (Rob Hoelz)++ | S26-documentation/why-leading.t:
00:23 dalek roast/S26-WHY: Fix typo with params test
00:23 dalek roast/S26-WHY: review: https://github.com/perl6/roast/commit/cb200422f3
00:25 * timotimo decommutes and goes to bed
00:49 * [Coke] pokes at the make write error for moar on osx and comes up empty
00:53 tony-o [Coke]: need more info about it?
00:53 [Coke] I can reproduce it, if that's what you mean.
00:53 tony-o i get it on every build but it doesnt seem to affect anytyjing
00:54 [Coke] getting debug information about what's causing it has proved fruitless here.
00:55 [Coke] well, it stops the build, anyway.
00:57 tony-o i get an updated executable from it, what else does the build do?
01:05 cooper_ joined #perl6
01:08 chenryn joined #perl6
01:15 ren1us joined #perl6
01:20 [Coke] try doing a || build.
01:21 [Coke] (and perl6 isn't executable when it's done, either.)
01:25 cognome joined #perl6
01:36 klapperl_ joined #perl6
01:40 FROGGS_ joined #perl6
01:40 hoelzro oh, nevermind; I found the relevant line in S26
01:45 hoverboard joined #perl6
01:46 raiph joined #perl6
01:49 dalek roast/S26-WHY: b74a2c2 | (Rob Hoelz)++ | S26-documentation/why-leading.t:
01:49 dalek roast/S26-WHY: Fix no proto multi test
01:49 dalek roast/S26-WHY: review: https://github.com/perl6/roast/commit/b74a2c2359
01:49 dalek roast/S26-WHY: eca9b0a | (Rob Hoelz)++ | S26-documentation/why-leading.t:
01:49 dalek roast/S26-WHY: Fix typo
01:49 dalek roast/S26-WHY: review: https://github.com/perl6/roast/commit/eca9b0a8fc
01:49 dalek roast/S26-WHY: e5a6d54 | (Rob Hoelz)++ | S26-documentation/why-leading.t:
01:49 dalek roast/S26-WHY: Fix another typo
01:49 dalek roast/S26-WHY: review: https://github.com/perl6/roast/commit/e5a6d5428b
01:56 dayangkun joined #perl6
02:01 colomon joined #perl6
02:05 ChoHag joined #perl6
02:09 chenryn joined #perl6
02:11 nbrown_ joined #perl6
02:15 nbrown__ joined #perl6
02:15 iarna joined #perl6
02:19 ventica joined #perl6
02:26 rurban joined #perl6
02:42 chenryn joined #perl6
02:50 ventica2 joined #perl6
02:56 ggoebel111119 joined #perl6
02:57 cooper_ joined #perl6
03:06 dayangkun joined #perl6
03:06 cooper_ joined #perl6
03:09 cooper_ joined #perl6
03:15 dalek rakudo/nom: 3852449 | duff++ | src/Perl6/Grammar.nqp:
03:15 dalek rakudo/nom: panic to get file/line info for RT #86906
03:15 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/38524499a4
03:15 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=86906
03:23 lustlife joined #perl6
03:30 jack_rabbit joined #perl6
03:31 jack_rabbit is there a 'filter' function for lists? I don't see anything obvious in the reference.
03:37 btyler jack_rabbit: something like .grep?
03:37 jack_rabbit I can pass a block for the matcher?
03:37 btyler m: (1 .. 10).grep({ $_ > 5 });
03:37 camelia rakudo-moar cf544a: ( no output )
03:37 btyler m: say (1 .. 10).grep({ $_ > 5 });
03:37 jack_rabbit ahh, okay. perfect.
03:37 camelia rakudo-moar cf544a: OUTPUT«6 7 8 9 10␤»
04:00 kaare_ joined #perl6
04:10 anaeem1_ joined #perl6
04:14 iarna joined #perl6
04:26 PotatoGim joined #perl6
04:27 egrep joined #perl6
04:31 nbrown__ joined #perl6
04:38 cooper_ joined #perl6
04:39 cooper_ joined #perl6
04:49 nbrown__ joined #perl6
05:13 hoverboard joined #perl6
05:13 gfldex joined #perl6
05:17 xenoterracide joined #perl6
05:21 nwc10 good *, #perl6
05:21 nwc10 T -3:30
05:26 kaare_ joined #perl6
05:35 Guest55638 joined #perl6
05:52 [Sno] joined #perl6
05:56 denis_boyun joined #perl6
06:09 chenryn joined #perl6
06:16 darutoko joined #perl6
06:35 kaleem joined #perl6
06:36 kaleem joined #perl6
06:37 kaleem joined #perl6
06:37 ventica2 joined #perl6
06:39 kaleem joined #perl6
06:40 dayangkun joined #perl6
06:43 Alula_ joined #perl6
06:51 dmol joined #perl6
06:54 breinbaas left #perl6
06:54 breinbaas joined #perl6
07:07 thou joined #perl6
07:13 sergot o/
07:13 kivutar joined #perl6
07:23 Ven joined #perl6
07:27 Ven o, #perl6
07:29 Alula_ joined #perl6
07:29 Ven o/, even.
07:30 dmol joined #perl6
07:34 nwc10 now T-31 and counting
07:36 nwc10 masak: https://twitter.com/rjbs/status/496392901958844417 leads to http://www.windycityrails.org/schedule/#shirai
07:36 nwc10 so all may be revealed on September 4 in Chicago
07:45 nwc10 T -20
07:50 pmurias joined #perl6
07:51 masak exciting.
07:51 pmurias porting rubinious X to moarvm would be awesome ;)
07:51 masak \o, #perl6
07:51 pmurias o/
07:51 masak nwc10: is there a URL to go with that countdown?
07:52 nwc10 http://www.spacex.com/webcast/
07:52 nwc10 the usual one
07:52 nwc10 still not yet aborted
07:52 nwc10 (spot the optimism)
07:54 zakharyas joined #perl6
07:54 masak spacex++
07:54 masak yeah, I'm getting a feed here.
07:54 masak launches always put me in a good mood.
07:55 nwc10 I realised that some of the tram trailers in Vienna are older than the moon landings
07:55 nwc10 http://xover.mud.at/~tramway/stvkr-a-wiki/index.php/Type_c3_%28Wien%29
07:55 nwc10 so, in theory, you can watch the lanch streamed on your mobile device sitting on something that is roughly Mecury era
07:59 masak T -1
08:00 masak whhhhhhhhhhhhhhh
08:01 nwc10 oh, wonderful, my stream was well lagged
08:10 dayangkun joined #perl6
08:16 ventica2 joined #perl6
08:18 dakkar joined #perl6
08:22 dalek rakudo/nom: 480f4e5 | (Elizabeth Mattijsen)++ | docs/ChangeLog:
08:22 dalek rakudo/nom: Mention ∅ finally working
08:22 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/480f4e5763
08:32 cognome_ joined #perl6
08:33 masak I was wondering about `token term:sym<empty_set> { "\x2205" <!before <[ \( \\ ' \- ]> || \h* '=>'> }`
08:33 masak so that last bit, `\h* '=>'`, is for autoquoting to work, yes?
08:34 moritz for the empty set not to be gobbled up in an autoquoting
08:34 masak why does it do \h* and not \s* ? is there something saying that autoquoting only works if you put the `=>` on the same line?
08:35 moritz masak: parsing stuff across line boundaries isn't that easy, in case of heredocs
08:35 jnthn The auto-quoting rule, I think :)
08:35 jnthn Pretty sure \h* is in fatarrow too
08:35 masak oki -- carry on, then.
08:35 jnthn So just for consistency with that
08:35 masak aye.
08:35 jnthn Though I guess your questoin is valid about that too :P
08:35 masak I wasn't aware that autoquoting only works on the same line.
08:35 moritz mysub q:to('bla'), ∅ \n => \n bla
08:36 jnthn masak: Which shows how much you'd miss it not being :)
08:36 moritz from a parser implementor's POV, I hate heredocs
08:37 zakharyas joined #perl6
08:37 masak moritz: oh, right.
08:43 lizmat with TEST_JOBS=16 (twice the number of virtual CPU's on my machine):
08:43 lizmat Files=912, Tests=32059, 174 wallclock secs ( 9.07 usr  4.27 sys + 1140.74 cusr 121.54 csys = 1275.62 CPU)
08:45 moritz 174s
08:46 lizmat yes
08:46 moritz m: say sprintf "%d:%02d", $_ div 60, $_ % 60 given 174;
08:46 camelia rakudo-moar 385244: OUTPUT«2:54␤»
08:46 moritz m: printf "%d:%02d", $_ div 60, $_ % 60 given 174;
08:46 camelia rakudo-moar 385244: OUTPUT«2:54»
08:47 moritz that's very nice!
08:48 xtreak_ joined #perl6
08:49 lizmat m: say 1275.62/174  # still not completely saturated all of my CPU's
08:49 camelia rakudo-moar 385244: OUTPUT«7.331149␤»
08:55 thou joined #perl6
08:59 jnthn Close, though :)
09:01 jnthn And wow, under 3 mins
09:01 jnthn :)
09:01 jnthn That's enough to make a cup of tea, but the kettle had better boil quickly :)
09:05 masak m: sub divmod($x, $y) { $x div $y, $x % $y }; printf("%g:%02d", |divmod($_, 60)) given 174
09:06 camelia rakudo-moar 385244: OUTPUT«2:54»
09:06 masak er, %g? meant %d :)
09:06 masak m: sub divmod($x, $y) { $x div $y, $x % $y }; printf("%d:%02d", |divmod($_, 60)) given 174
09:06 camelia rakudo-moar 385244: OUTPUT«2:54»
09:15 Vlavv joined #perl6
09:21 pecastro joined #perl6
09:31 brrt joined #perl6
09:31 zakharyas joined #perl6
09:31 bjz joined #perl6
09:36 zengargoyle joined #perl6
09:41 xtreak_ m: say "hello";
09:41 camelia rakudo-moar 480f4e: OUTPUT«hello␤»
09:42 xtreak_ left #perl6
09:43 sergot m: .say;
09:43 camelia rakudo-moar 480f4e: OUTPUT«Nil␤»
09:43 virtualsue joined #perl6
09:47 masak m: .say given "hello"
09:47 camelia rakudo-moar 480f4e: OUTPUT«hello␤»
09:48 timotimo m: say "yay" given "a cookie"
09:48 camelia rakudo-moar 480f4e: OUTPUT«yay␤»
09:48 spider-mario joined #perl6
09:49 Ven .oO( we'll use given to do cucumber-based cookie testing )
09:50 masak m: say "om" ~ " nom" x (5..10).pick ~ "!" given :cookie
09:50 camelia rakudo-moar 480f4e: OUTPUT«om nom nom nom nom nom nom nom!␤»
09:50 masak m: say "om" ~ " nom" x (5..10).pick ~ "!" given :3cookies
09:50 camelia rakudo-moar 480f4e: OUTPUT«om nom nom nom nom nom!␤»
09:51 masak m: say "om" ~ " nom" x .value ~ "!" given :3cookies
09:51 camelia rakudo-moar 480f4e: OUTPUT«om nom nom nom!␤»
09:51 masak m: say "om" ~ " nom" x .value ~ "!" given :27cookies
09:51 camelia rakudo-moar 480f4e: OUTPUT«om nom nom nom nom nom nom nom nom nom nom nom nom nom nom nom nom nom nom nom nom nom nom nom nom nom nom nom!␤»
09:51 masak :D
09:51 jnthn lol
09:52 jnthn The joys of generalizing :1st... :)
09:59 colomon joined #perl6
10:00 sergot m: say :3c.WHAT
10:00 camelia rakudo-moar 480f4e: OUTPUT«(Pair)␤»
10:00 sergot m: say :3c.perl
10:00 camelia rakudo-moar 480f4e: OUTPUT«"c" => 3␤»
10:00 sergot nice :)
10:01 masak m: say :!c.perl
10:01 camelia rakudo-moar 480f4e: OUTPUT«"c" => Bool::False␤»
10:02 masak m: say :c.perl
10:02 camelia rakudo-moar 480f4e: OUTPUT«"c" => Bool::True␤»
10:03 nbrown__ joined #perl6
10:04 masak I think TheDamian mentioned in a keynote that he had at one point been championing giving :¿c or :¡c some meaning, too. :)
10:04 masak (but got shot down by boringly reasonable people, or something)
10:05 jnthn wtf :)
10:07 masak I think you mean ¡¿qtf?! :P
10:07 masak (do Spanish people nest their inverted signs like that? I've never even though about it.)
10:10 egrep masak: I think they do.
10:12 masak huh. muy cool.
10:27 kaare_ joined #perl6
10:32 ChoHag If I have a grammar which can parse a well-formed line-based file, how can I change it to accept and ignore malformed lines?
10:32 ChoHag Or (just) those beginning with #
10:34 ChoHag I changed rule TOP { [ <line> \n? ]+ } to { [ <line> \n? | '#' \N* \n? ]+ }, but to no avail.
10:35 ChoHag Also the grammar engine seems to be quite easy to kill.
10:43 thou joined #perl6
10:52 dalek rakudo/nom: 3ad15f3 | (Elizabeth Mattijsen)++ | src/Perl6/Grammar.nqp:
10:52 dalek rakudo/nom: No need to beat around the bush wrt ∅
10:52 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/3ad15f3292
10:56 FROGGS_ lizmat: does this have an impact on compile time?
11:04 Ven joined #perl6
11:04 Ven lizmat: wasn't that empty set quoted due to some parrot slowness ?
11:06 FROGGS_ Ven: in the setting, aye
11:06 FROGGS_ but I dunno if that also would mean that Perl6::Grammar takes now longer to compile...
11:06 ChoHag How can I write a rule to match "bar[baz]" where baz may be any string (without []) or another "bar[baz]", recursing as necessary.
11:07 FROGGS_ I guess since we don't see a major slowdown it is okay to have ∅ in the grammar
11:07 Ven ChoHag: rule key { '[' ~ ']' \S+ }; token TOP { $<toplevel>=\S+ <key~+ } ?
11:07 Ven something like that
11:07 Ven `
11:08 Ven <key>*, eh.
11:08 Ven (might want to use <.key> and $<part>= inside key)
11:10 lizmat I've tested it on parrot, no ill effects
11:12 ChoHag That looks like it'll parse a string followed by one of more strings surrounded by [] characters.
11:14 Akagi201 joined #perl6
11:14 ChoHag As opposed to a string followed by a []eted string where the latter may be formatted the same as the whole, to arbitrary depth.
11:16 FROGGS_ lizmat: cool :o)
11:17 Akagi201_ joined #perl6
11:18 moritz uh, don't use rule key { '[' ~ ']' \S+ };
11:18 moritz the \S+ can match a ] too
11:18 moritz and it backtracks
11:19 moritz that's usually not what you want
11:19 moritz wait, I don't know if ~ backtracks
11:19 moritz anyway, the far more obvious one is   token key { '[' ~ ']' <-[ \] ]>+ }
11:20 FROGGS_ m: grammar G { token TOP { <thing> }; token thing { <ident> [ '[' ~ ']' <thing> ]? } }; say G.subparse("bar[baz]")
11:20 camelia rakudo-moar 480f4e: OUTPUT«「bar[baz]」␤ thing => 「bar[baz]」␤  ident => 「bar」␤  thing => 「baz」␤   ident => 「baz」␤␤»
11:20 FROGGS_ m: grammar G { token TOP { <thing> }; token thing { <ident> [ '[' ~ ']' <thing> ]? } }; say G.subparse("bar[baz[foo]]")
11:20 camelia rakudo-moar 480f4e: OUTPUT«「bar[baz[foo]]」␤ thing => 「bar[baz[foo]]」␤  ident => 「bar」␤  thing => 「baz[foo]」␤   ident => 「baz」␤   thing => 「foo」␤    ident => 「foo」␤␤»
11:20 FROGGS_ m: grammar G { token TOP { <thing> }; token thing { <ident> [ '[' ~ ']' <thing> ]? } }; say G.subparse("bar")
11:20 camelia rakudo-moar 480f4e: OUTPUT«「bar」␤ thing => 「bar」␤  ident => 「bar」␤␤»
11:20 FROGGS_ m: grammar G { token TOP { <thing> }; token thing { <ident> [ '[' ~ ']' <thing> ]? } }; say G.parse("bar[baz[foo]]")
11:20 camelia rakudo-moar 480f4e: OUTPUT«「bar[baz[foo]]」␤ thing => 「bar[baz[foo]]」␤  ident => 「bar」␤  thing => 「baz[foo]」␤   ident => 「baz」␤   thing => 「foo」␤    ident => 「foo」␤␤»
11:21 FROGGS_ moritz: the \S+ would eat the ']' and then it would fail to match it
11:21 FROGGS_ you can use '[' \S+ ']' to avoid that
11:22 moritz or simply <-[ \] ]>+. No backtracking, no surprises
11:23 nbrown___ joined #perl6
11:23 brrt joined #perl6
11:24 Akagi201 joined #perl6
11:25 dakkar joined #perl6
11:26 Ven ChoHag: token key { '[' <.key> '}' | \w+ } ? :)
11:26 Ven that second one should be a ], btw
11:26 chenryn joined #perl6
11:29 mr-foobar joined #perl6
11:39 anaeem1_ joined #perl6
11:40 ChoHag Is ident the equivalent of self?
11:41 moritz no
11:41 xragnar_ joined #perl6
11:42 moritz ident is simply a built-in rule
11:42 ChoHag Oh another one.
11:42 ChoHag Are the built-in rules listed anywhere?
11:43 xylixy joined #perl6
11:44 moritz in s05
11:44 moritz s/s/S/
11:45 Ven .oO( S/S/s/ )
11:52 xylixy left #perl6
12:02 DarthGandalf joined #perl6
12:08 dalek roast/S26-WHY: 5c5abc0 | (Rob Hoelz)++ | S26-documentation/why-trailing.t:
12:08 dalek roast/S26-WHY: Fixes for trailing test
12:08 dalek roast/S26-WHY: review: https://github.com/perl6/roast/commit/5c5abc0000
12:13 dayangkun joined #perl6
12:14 anaeem1 joined #perl6
12:23 masak m: grammar G { regex TOP { <lookup> }; regex lookup { <word> '[' <key> ']' }; regex word { \w+ }; regex key { <word> | <lookup> } }; say ?G.parse("foo[bar]"); say ?G.parse("foo[bar[baz]]"); say ?G.parse("foo")
12:23 camelia rakudo-moar 3ad15f: OUTPUT«True␤True␤False␤»
12:24 masak ChoHag: ^^
12:24 Ven what's the reasoning behind capitalized Bool, btw ?
12:25 jnthn Just following normal naming rules
12:26 telex joined #perl6
12:26 jnthn Bool is a type, and enum elements are type-ish too
12:30 masak they're type-ish in the sense that they're terms?
12:31 masak m: enum Trool <False Kinda True>; say False ~~ Bool; say Trool::False ~~ Trool
12:31 camelia rakudo-moar 3ad15f: OUTPUT«False␤True␤»
12:31 masak m: enum Trool <False Kinda True>; say False.WHAT
12:31 camelia rakudo-moar 3ad15f: OUTPUT«(Trool)␤»
12:32 thou joined #perl6
12:33 xenoterracide joined #perl6
12:33 masak m: enum Quool <False Um Ah True>; say False < Um < Ah < True
12:34 camelia rakudo-moar 3ad15f: OUTPUT«True␤»
12:34 ChoHag How do I check a string against a token inside a grammar?
12:35 ChoHag Also thanks.
12:35 cognome_ timotimo: in your otherwise great post, there is an alteration or an adulteration when you speak of alternation.  $your-post ~~ s/alteration/alternation/
12:36 cognome_ I meant s:g///
12:36 jnthn ChoHag: $str ~~ /<GrammarName::tokename>/
12:37 masak jnthn: does the token have to be 'our' for that to work?
12:38 moritz don't you use GrammarName.parse($str, :rule<tokenname>) for that?
12:39 tadzik m: https://gist.github.com/tadzik/bb7c2f1aee7bf6b8fc43
12:39 camelia rakudo-moar 3ad15f: OUTPUT«gist not found»
12:39 moritz or .subparse if it doesn't have to match the whole string
12:39 tadzik hrmm
12:39 moritz tadzik: camelia doesn't like the "new" gists
12:39 tadzik anyway, the above prints "True True False", is that a bug?
12:39 moritz (patches from anybody welcome)
12:39 moritz yes, the LHS of ~~ doesn't autothread anymore
12:39 jnthn masak: I...think that's actually sugar for some method call...
12:39 moritz s/yes/no/
12:40 moritz "it's a feature"
12:41 moritz though I have trouble finding the commit that changed that
12:42 masak huh, I would have kind of expected that to autothread. what's the reasoning/use case behind it not doing so?
12:43 moritz it's in the backlog (of the last few weeks)
12:43 rurban joined #perl6
12:44 moritz maybe it was to make  ~~ Junction  DWIM
12:45 masak that seems rather a small reward for making (x & y) ~~ z not DWIM.
12:47 Ven that whole "matching on Junction" is kind of eww to start with :/
12:47 Ven and well, it works with subs at least
12:48 moritz the DWIM part should be on the RHS
12:50 masak moritz: how would you write (x & y) ~~ z so that it DWIMs?
12:50 woolfy joined #perl6
12:51 lizmat_ joined #perl6
12:51 moritz masak: I wouldn't; nor am I in favor of that change
12:55 sqirrel joined #perl6
12:57 masak TimToady: how would you write "x and y both smartmatch on z" in idiomatic Perl 6?
13:02 darutoko- joined #perl6
13:05 Ven masak: sub infix:<DWIM~~> { my $x =@_.pop; [&&] @_.map({ $_ ~~ $x; }) }, of course !
13:06 masak heh.
13:12 PerlJam masak: all(($x,$y).map:{ /$z/ });  # maybe?
13:12 * PerlJam isn't sure of the utility of junctional matches though.
13:13 PerlJam (good UGT btw)
13:13 masak I find junctional tests occasionally useful.
13:14 masak I could definitely see myself being in a situation where I had `$x ~~ Z && $y ~~ Z` in my code, and I looked at it and decided to write it a bit shorter.
13:15 masak I think it would then surprise me that `$x & $y ~~ Z` didn't work.
13:15 darutoko- joined #perl6
13:15 Akagi201 joined #perl6
13:15 klapperl_ joined #perl6
13:15 MilkmanDan joined #perl6
13:15 cibs joined #perl6
13:15 nhayashi joined #perl6
13:15 avuserow joined #perl6
13:15 kshannon joined #perl6
13:15 [particle] joined #perl6
13:15 TimToady joined #perl6
13:15 awwaiid joined #perl6
13:15 ilogger2 joined #perl6
13:15 ClarusCogitatio joined #perl6
13:15 japhb joined #perl6
13:15 bowtie_ joined #perl6
13:15 thilp joined #perl6
13:17 colomon btyler++ # improved JSON performance is fantastic news for me.
13:19 tadzik oh, when did it happen?
13:20 colomon maybe it's not done yet?  I'm just catching up on http://p6weekly.wordpress.com/2014/08/05/2014-31-for-real-this-time/
13:21 lizmat_ commute to Amsterdam.PM meeting&
13:21 colomon largely out of the loop this week, we're on vacation in Newfoundland.
13:27 tadzik Newfoundland always sounds to me like a placeholder name :D
13:28 tadzik like VisualStudioApp17
13:28 tadzik or "New Folder" in Windows
13:30 masak :)
13:32 pmurias joined #perl6
13:34 brrt lol
13:34 pmurias what would be a good way to map perl6 or nqp modules/packages to node modules?
13:35 pmurias does compiling each distribution (which might contain several perl6 modules) into a single node module seems sane?
13:36 Woodi joined #perl6
13:37 timotimo colomon: it's a module you use instead of JSON::Tiny
13:41 FROGGS_ jnthn: I was rong, I have to change every QAST::Node<foo> (twice) :o(
13:41 robinsmidsrod joined #perl6
13:45 robinsmidsrod joined #perl6
13:49 robinsmidsrod joined #perl6
13:52 FROGGS_ jnthn: why did you remove that line? https://github.com/rakudo/rakudo/commit/f2842a593ff1367b2cbc91cf6f006f7c2f37dd94#diff-deae5f68054ef8116f04d6cb78bc4395L1009
13:53 robinsmidsrod joined #perl6
13:54 jnthn FROGGS_: Was never read anywhere
13:55 jnthn So, effectively dead code.
13:55 jnthn decommute via le pub &
13:55 FROGGS_ ahh
13:55 FROGGS_ nice
13:57 sqirrel joined #perl6
13:58 kst joined #perl6
13:58 grondilu joined #perl6
14:01 btyler colomon: well, it isn't strictly 'improved', just 'using a C lib' :) I'm low on tuits until next wednesday, but feel free to leave github issues for improvements/bugs
14:02 gfldex joined #perl6
14:06 thou joined #perl6
14:13 treehug88 joined #perl6
14:31 MilkmanDan joined #perl6
14:32 rurban joined #perl6
14:36 python joined #perl6
14:38 hoelzro morning #perl6
14:38 rindolf joined #perl6
14:39 masak \o
14:47 chenryn joined #perl6
14:57 btyler joined #perl6
14:58 raiph joined #perl6
15:00 kaleem joined #perl6
15:06 xfix_ joined #perl6
15:07 kaare_ joined #perl6
15:07 xfix joined #perl6
15:14 dmol joined #perl6
15:21 japhb lizmat, re: 3ad15f3292fc53c0d98b8a9599f84f8a8d4214e2 -- why leave the null set character in double quotes?
15:25 japhb .ask jnthn Anything you'd like me to prioritize with my perl6-bench hack time to support your run up to the YAPC::EU performance talk?
15:25 yoleaux japhb: I'll pass your message to jnthn.
15:27 hoelzro does anyone have any input on my question on documenting parametric roles?
15:30 ventica2 joined #perl6
15:32 cooper_ joined #perl6
15:32 ventica3 joined #perl6
15:33 guru joined #perl6
15:41 dalek rakudo-star-daily: 6658196 | coke++ | log/ (14 files):
15:41 dalek rakudo-star-daily: today (automated commit)
15:41 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/6658196193
15:41 dalek perl6-roast-data: c997c8e | coke++ | / (5 files):
15:41 dalek perl6-roast-data: today (automated commit)
15:41 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/c997c8e488
15:42 chenryn joined #perl6
15:42 [Coke] FROGGS++
15:42 [Coke] n: 1386; jvm: 31
15:42 camelia niecza v24-109-g48a8de3: ( no output )
15:42 [Coke] moar: 6, parrot: 15
15:43 [Coke] mmhehe.
15:46 * jnthn home
15:46 yoleaux 15:25Z <japhb> jnthn: Anything you'd like me to prioritize with my perl6-bench hack time to support your run up to the YAPC::EU performance talk?
15:54 TimToady masak: I've decided it's probably okay for ~~ to autothread the LHS, but in order to preserve optimizability, either 'given' must not be fed a junction, or we have to autothread the entire block of the given
15:55 TimToady we need to find a better term than autothreading for this...but superpositioning is too long
15:55 jnthn I'm not convinced either discontinuity is worth it...
15:56 TimToady we do want a switch of all integers to optimize to a jump table
15:56 masak *nod*
15:56 TimToady which you can't if you bind $_ to the junction
15:56 jnthn Right.
15:56 TimToady so for now we could just prohibit given taking junctions
15:56 jnthn How exactly?
15:57 masak runtime error?
15:57 jnthn = extra type check on every given...
15:57 jnthn And thus bigger code for every given.
15:57 jnthn Not a huge deal.
15:58 jnthn I just tend to worry about such things these days :)
15:58 TimToady if we optimize to jumptable, we have to coerce to int
15:58 TimToady that might fail
15:58 chenryn joined #perl6
15:58 TimToady (for "free")
15:58 jnthn Trouble is, $junction.Int gives...a Junction
15:58 jnthn Our general approach to coercions being method calls is kinda...annoying.
15:59 jnthn Oh, I think you can overload invoke on the type object or something too...
16:00 TimToady m: say Int(1|2).WHAT
16:00 camelia rakudo-moar 3ad15f: OUTPUT«(Junction)␤»
16:01 TimToady well, at what point do we "really int()" to get the value of the integer to do the jump?
16:02 TimToady there's gotta be a primitive to pull an integer out of a boxed object; what would that do with a Junction?
16:02 timotimo "this object cannot unbox to a native int" :)
16:03 TimToady okay, that's probably sufficient to prevent people feeding junctions to an optimized jumptable
16:04 TimToady we can simply spec that you're not allowed to feed a junction to a given that might get optimized to a jumptable
16:05 TimToady or that it is at least erroneous
16:05 TimToady and the workaround is to wrap the switch in a binding context that will autothread the whole given
16:05 masak which `given` statements might get oprimized to a jumptable?
16:05 timotimo right, like a sub?
16:05 timotimo https://github.com/kanatohodets/p6-json-jansson/blob/master/lib/JSON/Jansson.pm#L69
16:05 timotimo ^- masak
16:06 denis_boyun_ joined #perl6
16:06 ren1us joined #perl6
16:06 TimToady well, if all the cases are small integers, it's a no brainer
16:07 TimToady if all the cases are string matchers with a known set of first characters, it's equivalent to an ord() plus an integer dispatch
16:07 Alina-malina joined #perl6
16:08 TimToady if the first N cases are jumpable, it's worth building the jumptable, for some N in the neighborhood of 3 or 4
16:08 jnthn Yeah, an int() coercion/unbox would do it.
16:08 TimToady (I think Perl 4 put the threshold about there.)
16:08 timotimo wow, that's how early it's worth it?
16:09 TimToady jumptables are fast
16:09 TimToady compared to comparisons
16:09 TimToady they're just computed gotos
16:09 timotimo how do we best deal with non-contiguous targets?
16:10 TimToady depends on how big the holes are
16:10 timotimo we could use our existing sequence deduction method %)
16:10 TimToady for small holes, you just put a bunch of goto's to the first statement
16:10 TimToady for larger, you either give up or put some range guards
16:11 TimToady er, goto the first statement that is after the excluded casees, I should say
16:11 TimToady so you still get a speedup even on a non-match
16:11 timotimo if we have 1, 2, 4, 8, 16, ... we can log2 the number beforehand %)
16:12 TimToady and it's only the excluded initial cases you worry about, since we just fall through on nonmatch
16:12 TimToady the jumptable is not in charge of "succeed" semantics, the 'when' is (or the if/else gotos, if you optimize those too)
16:14 TimToady if you optimize general conditionals, you also get to worry about inequalities :)
16:14 timotimo that'll make that part easier.
16:15 TimToady an inequality might just define one end or the other of the jumptable
16:15 TimToady anyway, that's all certainly possible, since Perl 4 did it
16:16 TimToady well, it gave up if there were large holes, and didn't try to do the sparse thing
16:16 TimToady but it did all the rest of it
16:18 TimToady being able to examine a bunch of when's and deduce a jumptable was one of the main motivations for making smartmatch asymmetric.
16:19 TimToady you can't do that if @array ~~ 4 means to check if @array[4].so
16:19 TimToady so we broke that
16:19 raiph joined #perl6
16:20 TimToady m: my @array = 0,0,0,0; say so @array ~~ 4
16:20 camelia rakudo-moar 3ad15f: OUTPUT«True␤»
16:20 TimToady instead it means that
16:21 Alina-malina joined #perl6
16:24 TimToady the optimizer should be allowed to turn that into @array == 4
16:25 jnthn What (if anything) does it have to know in order to do that?
16:25 jnthn That the RHS is of type Int (or Num, or Rat...) and certainly not a type object?
16:26 jnthn If we know it's a type there on the RHS, can we compile it into an nqp::istype(a, b), for example?
16:26 jnthn That is, when is it OK to completely circumvent calling ACCEPTS?
16:27 jnthn At the moment we don't optimize ~~ at all. I've never had a good feeling how aggressive we're allowed to be, and what we can get away with. :)
16:27 timotimo well, the 4 we have there is a WVal, so it has a compile-time known value, so we can see if it has "the default ACCEPTS for Int" and the compiler can know "what that means" for the LHS, which we know is of type Array
16:28 jnthn Well, except method calls are (a) late-bound, and (b) augment can happen after we see it
16:28 timotimo ah, of course.
16:28 jnthn And you can potentially write a multi method ACCEPTS(Foo:U: $topic) { ... }
16:28 jnthn Or augment one of those in too.
16:29 timotimo oh, you can just write a multi method outside of a class and it'll plop right in?
16:29 timotimo that does require monkey typing, though, right?
16:29 jnthn No, but you can augment.
16:29 jnthn Right.
16:29 timotimo OK
16:29 jnthn Of course, that's the *wrong* way to customize type checking.
16:29 jnthn So I personally don't mind if we make it not work.
16:29 timotimo how does that interact with the "we consider most things static/known at optimize-time"?
16:29 jnthn If you want to do that, you should be using the MOP.
16:29 timotimo aye, i wouldn't mind it either
16:29 jnthn Which will behave consistently.
16:30 jnthn Since we already make no promise at all that type checks go through ACCEPTS.
16:30 timotimo m: my int $a; say $a ~~ int;
16:30 camelia rakudo-moar 3ad15f: OUTPUT«False␤»
16:30 timotimo should this be a smartmatch-way of using nqp::isint?
16:30 jnthn No
16:31 jnthn Well, hmm...urgh
16:31 timotimo m: my int $a; say $a; say $a.perl;
16:31 camelia rakudo-moar 3ad15f: OUTPUT«0␤0␤»
16:31 jnthn Nah, it'll be too hard to get it consistent.
16:31 timotimo m: my int $a is default(42); say $a; say $a.perl;
16:31 camelia rakudo-moar 3ad15f: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/QoN3iaXihtâ�¤Can't use trait 'is default' on a native.â�¤at /tmp/QoN3iaXiht:1â�¤------> [32mmy int $a is default(42)[33mâ��[31m; say $a; say $a.perl;[0mâ�¤    expecting any of:â�¤        postfix…»
16:31 timotimo mhm.
16:31 jnthn It will autobox.
16:31 timotimo ah, of course it would
16:31 timotimo for the method call
16:32 jnthn Anyway, I'm all for more aggresively optimizing ~~ things; I just think we might want toput some langauge into the spec first to make clear what's kosher.
16:32 timotimo say, jnthn, what position on your prioritized to-do list does the tricky thing that'll make native/shaped arrays and $i++ on natives and such work?
16:32 timotimo (and read-writable Bufs or Blobs or something like that?)
16:33 timotimo oh, i'll be AFK for a bit
16:33 jnthn That probably goes as "after YAPC"
16:33 jnthn Autumn sometime. I really would like to deal with those.
16:34 timotimo i would also really like to have them. but not enough for me to try to tackle it myself ;)
16:39 treehug88 joined #perl6
16:39 jnthn Anyone fancy another second off CORE.setting build time?
16:39 * timotimo raises hand
16:40 [Coke] if we all raise our hands, can we one second each?
16:40 Rotwang joined #perl6
16:41 dalek nqp: 775ac85 | jnthn++ | src/QRegex/Cursor.nqp:
16:41 dalek nqp: Optimize NQP Match object construction.
16:41 dalek nqp:
16:41 dalek nqp: Before, CAPHASH built a hash, which we then re-walked and turned into
16:41 dalek nqp: the list and hash needed for the Match object. This meant an extra
16:41 dalek nqp: throwaway Hash and iterator every Match object, as well as the time
16:41 dalek nqp: iterating them. This reduces the cost by eliminating one of the
16:41 dalek nqp: passes. CAPHASH remains since Rakudo's Match construction still needs
16:41 dalek nqp: it; porting the optimization to Rakudo is an exercise for the reader.
16:41 dalek nqp: review: https://github.com/perl6/nqp/commit/775ac85288
16:42 timotimo oooooh
16:42 timotimo you went and did that. great!
16:46 [Coke] doesn't literal unicode in the grammar slow down parrot?
16:47 timotimo we thought so, but lizmat said this doesn't cost us anything
16:47 [Coke] regarding "No need to beat around the bush wrt ∅"
16:47 [Coke] she tested it? ok.
16:53 PerlJam Why are calls to $*throw()  sometimes like $*W.throw($/, 'X::Comp::NYI', ... )  and other times like $*W.throw( $/, ['X', 'Placeholder', 'Block'], ...)  ?
16:55 lee_ wow with that last commit CORE.setting parses in 29.988s for me
16:55 lee_ new record jnthn++!
16:55 PerlJam (i.e. why is the second arg sometimes a string and other times an array?)
16:55 jnthn Yes, it was my first time under 30s for stage parse too :)
16:56 TimToady PerlJam: circularity issues maybe?
16:57 jnthn PerlJam: I don't know of a deep reason off hand...I think if it is a string it simply splits it up
17:01 PerlJam yeah, that's what it looks like.
17:02 noganex joined #perl6
17:03 jnthn If you're interested in clearing it up, I think the array form ($*W.throw( $/, ['X', 'Placeholder', 'Block'], ...)) is the preferable one.
17:03 Ulti joined #perl6
17:04 PerlJam I think I'd prefer <X PlaceHolder Block>  myself :)
17:04 PerlJam I was just wondering why there were two different ways to call throw with no obvious (to me) reason.
17:05 TimToady 29.929 seconds here :)
17:05 jnthn PerlJam: ooh, that's pretty :)
17:06 jnthn PerlJam: Well, there may be a historical reason... :)
17:06 jnthn Heh, I found an easy way to shave another chunk off stage mbc
17:07 jnthn Down from 0.275 to 0.159. profiler++
17:09 masak tadzik++ # panda
17:10 tadzik (:
17:10 masak it works great, *and* it has a cute name!
17:10 tadzik I'm glad it works well :)
17:18 TimToady in 0,1,*+*...* do currently we have any way of optimizing *+* into &infix:<+>?
17:18 jnthn No
17:18 TimToady I didn't think so
17:19 jnthn I don't actually know quite where to put it either.
17:19 TimToady and we can't just turn *+* into &infix<+> unless we determine that it will not be subject to further *-ification
17:19 jnthn Yeah...
17:20 jnthn That's what makes it tricky.
17:21 timotimo hmm, isn't that the "reverse" of what i did with the whatevercode inlining thingie?
17:22 TimToady I suppose if the innards of &infix:<+> are inlined into *+*, it's only duplicate code, not an extra call
17:22 jnthn I'd have to check if that actually happens
17:23 jnthn But should do, I guess
17:23 TimToady or we could have something somewhere that says "I'm about to really call this; try optimizing it first."
17:23 TimToady something that is capablie of updating the function pointer
17:24 timotimo "i'm gonna do it! for real! you better believe me! here i go! better be ready!"
17:24 timotimo can we use the mixin mechanism to "replace" the WhateverCode with the actual + sub?
17:24 jnthn m: say (823161 - 64) * (6.5 * 8)
17:24 camelia rakudo-moar 3ad15f: OUTPUT«42801044␤»
17:25 jnthn m: say ((823161 - 64) * (6.5 * 8)) / 4194304
17:25 camelia rakudo-moar 3ad15f: OUTPUT«10.20456409␤»
17:25 jnthn Wowser.
17:25 jnthn timotimo: That sounds kinda odd... :)
17:25 timotimo just making uneducated guesses
17:26 * TimToady is not sure it's even wrong... :P
17:26 timotimo jnthn: pray tell, where did you get a factor of ten speed improvement from this time? :)
17:26 timotimo (looks more like 10 GC runs eliminated, though)
17:26 jnthn That's not a speed improvemnet, it's a number of GC runs I can get rid of.
17:26 timotimo called it! :)
17:26 jnthn m: say ((828017 - 128) * (6.5 * 8)) / 4194304 # worth it?
17:26 camelia rakudo-moar 3ad15f: OUTPUT«10.26397419␤»
17:27 jnthn Nah.
17:27 jnthn timotimo: int -> str caching.
17:27 jnthn Basically, what happens if we keep a cache of the strings for the first 64 integers starting at 0.
17:27 jnthn 128 is not worth much extra
17:28 timotimo holy hell
17:28 timotimo that's a good one.
17:28 TimToady or you can do something like P5, where you cache the string with the int, if you think the string value will get reused more often than the int will change
17:29 TimToady that'd work for any int
17:29 timotimo our ints don't change
17:29 timotimo (yet?)
17:29 timotimo but they also don't really get deduplicated
17:29 TimToady an int container, I mean
17:29 jnthn Well, this is a native int, which means no container.
17:29 TimToady sure, it has a container, just not a P6 container
17:30 TimToady computer can't have values without containers :)
17:30 TimToady except very temporarily in the traces between CPU locations
17:31 timotimo you gotta read between the registers!
17:31 TimToady but yeah, native ints are special, and would take more work to cache, especially for an array of ints
17:32 jnthn I'm not convinced making every native int 64 bits bigger so we can pass a string pointer around with it will be a win :)
17:32 * TimToady didn't say "every" :)
17:32 jnthn I'm also pretty sure the JIT will be aghast too :)
17:32 guru joined #perl6
17:33 jnthn BTW, the dynvar caching strategy seems to be suboptimal.
17:33 FROGGS_ yay, v5 (the Perl 6 version) does now work after the .ann/.annotate change :o)
17:33 TimToady jnthn: well, you said at the time you thought it needed tuning
17:33 FROGGS_ need to fix the nqp version when I want to compare how something is parsed...
17:33 virtualsue joined #perl6
17:34 jnthn TimToady: Yes, I'm just not quite sure how exactly to tune it.
17:34 jnthn TimToady: Other than "fiddle with the numbers"
17:34 jnthn 2% of CORE.setting compilation time currently goes on dynvar lookup.
17:35 TimToady well, you'd like to guess that you want it close, so optimal is probably some fibonacci distance away from the leaf
17:36 Alina-malina joined #perl6
17:36 jnthn TimToady: https://github.com/MoarVM/MoarVM/blob/master/src/core/frame.c#L1008 is the current cache installation code, fwiw.
17:37 FROGGS_ the NFA still drives me nuts, s/a/b/ is parsed as identifier=s infix=/ ...
17:38 * timotimo bbl
17:38 timotimo FROGGS_: did you make extra-extra sure that it's the NFA part and not the actual grammar that bails for the other branch?
17:39 FROGGS_ timotimo: I did some research for the last weirdness, and it was the NFA... not so sure about this time
17:43 japhb jnthn: Any thoughts on my earlier question about what you'd like from perl6-bench in the next couple weeks?  Or do you already have all that you need at this point?
17:44 jnthn japhb: I should look at some recent graphs more closely; I do know that the filtering of early noise made the last set of graphs I produced look weird.
17:44 jnthn japhb: As in, I thought the cure was worse than the disease. I'm sure there's a flag for it though :)
17:45 japhb Checking that ... but if it's not there, and you need it, I can do that.  :-)
17:45 jnthn OK. If the noise filtering was tuned since I last tried it (probably; you'd only just put it in) then it may be OK anyway.
17:47 japhb I did tune it.  But right now it exists as a constant masquerading as a variable: $min_time, at the top of compare_scaled_times in analyze.  You can locally fudge that until I have something better for you.
17:47 japhb (I simplified the filter down to just that, because the early filtering was both confusing and not sufficiently helpful.)
17:48 khisanth_ joined #perl6
17:53 [Sno] joined #perl6
17:54 japhb The next thing I'm interested in adding is the ability to mark a test as being not considered in the total summary score, because e.g. empty loops don't measure anything useful to an end user; it's only useful for the implementor, to gauge loop overhead.
17:54 jnthn True, though don't underestimate the marketing value of such things. :)
17:55 japhb So that when people inevitably throw a summary score plot into a slide deck, at least the audience is seeing something that actually relates to the real world.
17:55 japhb Oh sure, I was going to keep those tests in the per-test plots, just not in the summary.
17:56 [Coke] i think our detractors would argue that perl6 has taken longer to do nothing than our competitors.
17:56 japhb To avoid e.g. r-j appearing way faster for normal use than it really is, because it can make empty native loops wicked fast, but is much more in line with other implementations as soon as the loop is non-empty.
17:56 treehug88 joined #perl6
17:58 jnthn Ah, OK, I follow :)
17:58 Alula_ joined #perl6
18:01 TimToady m: say '∅' ~~ /\w/; # funny how people keep thinking of ∅ as alphanumeric
18:01 camelia rakudo-moar 3ad15f: OUTPUT«Nil␤»
18:03 TimToady I suspect it's the visual correspondence with 0 and ø
18:03 TimToady but Perl will never autoquote the null set on the left of =>
18:04 lizmat joined #perl6
18:04 TimToady (unless Unicode changes its classification)
18:05 denis_boyun___ joined #perl6
18:07 * japhb wonders if, now that perl6-bench does historical plots, it would be useful to have a set of benchmarks that essentially test whether an optimization is happening as expected; sortof regression tests for the optimizer
18:09 denis_boyun_ joined #perl6
18:10 masak TimToady: no, it's the similarity to ø, of course ;)
18:15 psch m: "abc".comb(/./, :match).WHAT.say # this should be a Match i think?
18:15 camelia rakudo-moar 3ad15f: OUTPUT«(List)␤»
18:15 psch also: hi #perl6 o/
18:15 * psch realizes that there's much more to the whole m:g// and smartmatch thing
18:18 psch ah, no, that's supposed to be a List, says S32::Str
18:20 virtualsue joined #perl6
18:21 raiph joined #perl6
18:22 vendethiel sjn: hey, will you have time to finish the PR until the end of the week, or should I merge as-is ?
18:24 sqirrel joined #perl6
18:24 lustlife joined #perl6
18:26 prevost joined #perl6
18:30 Hansel joined #perl6
18:41 itz while attempting to build v5
18:42 itz ===SORRY!===
18:42 itz Could not find Perl5 in any of:
18:42 itz ideas?
18:43 sergot .seen supernovus
18:43 yoleaux I saw supernovus 19 Feb 2014 00:12Z in #perl6: <supernovus> Well, I'll test some more of my libraries out on the various backends another day. Have a good * #perl6 :-)
18:44 anaeem1 joined #perl6
18:48 anaeem1 joined #perl6
18:49 itz oh maybe I should have read the docs :)
18:53 brrt joined #perl6
19:09 anaeem1 joined #perl6
19:18 dwarring joined #perl6
19:21 FROGGS_ itz: v5 needs a fix with current rakudo anyway
19:24 itz I was seeing "This type does not support associative operations
19:25 FROGGS_ correct, one of the latest nqp patches does that...
19:26 FROGGS_ I need to fix master, nqp_to_perl6 already is patched
19:26 FROGGS_ itz: are you actually using v5?
19:27 itz I was just curious and experimenting
19:27 FROGGS_ k
19:27 FROGGS_ :o)
19:28 FROGGS_ v5 will be installable via panda in a few months, so there won't be any README reading needed by then :o)
19:33 guru joined #perl6
19:35 virtualsue joined #perl6
19:46 kurahaupo joined #perl6
19:49 lizmat [Coke]: re: http://irclog.perlgeek.de/perl6/2014-08-05#i_9136422 , it only slows down when in the settings, *not* in the grammar
19:50 lizmat not sure why, but that is what I've seen
19:50 [Coke] lizmat: ah, great. Thanks for following up.
19:52 PerlJam Is there a ticket for the "unicode slows things down" problem?  Adding that little tidbit would be useful it's not already there.
19:54 anaeem1 joined #perl6
19:56 lue and the slowdown is just for Parrot, right?
19:57 colomon joined #perl6
19:58 virtualsue joined #perl6
20:01 timotimo parrot has to scan from the very beginning of the string for every string access "at a given grapheme"
20:01 timotimo it doesn't cache iterators
20:01 timotimo so it ends up going quadratic
20:02 PerlJam timotimo: but only in the setting?
20:03 PerlJam timotimo: or is it that there's only one character in this case (since we've been avoiding them), so it's not noticably slow?
20:03 timotimo PerlJam: the setting is just a super huge string
20:03 lizmat lue: yes
20:04 colomon btyler: I am using JSON::Tiny for $work, and it is SLOW.  A significant speed up would be brill.
20:04 timotimo exactly, at the moment it can do O(1) lookups
20:05 btyler colomon: well, if you don't mind the native library installation jig, jansson is pretty fast. not as fast as perl5's JSON::XS, though
20:06 btyler but the major cavaet at the moment is that json::jansson doesn't just dump everything into p6 data structures -- the data stays in jansson's realm and it gets manipulated there. so you'll probably very quickly run into hash or array methods/operations that work with normal p6 data structures but don't with json::jansson
20:06 brrt joined #perl6
20:07 btyler I'll have some time next week to improve that a bit, but I suspect that'll always be the case to some degree
20:07 colomon btyler: yes, well, so far I've avoided switching to p5 so far...
20:14 Sqirrel joined #perl6
20:16 rurban joined #perl6
20:16 ajr_ joined #perl6
20:19 fhelmberger joined #perl6
20:21 fhelmberger joined #perl6
20:23 fhelmberger joined #perl6
20:25 raiph joined #perl6
20:27 itz_ joined #perl6
20:29 fhelmberger joined #perl6
20:36 perlfan joined #perl6
21:11 colomon joined #perl6
21:11 masak m: say 4195835 / 3145727
21:11 camelia rakudo-moar 3ad15f: OUTPUT«1.33382045␤»
21:12 masak http://www.trnicely.net/pentbug/pentbug.html
21:17 timotimo m: my @a = $(1, 2, 3); say [>>+<<] @a;
21:17 camelia rakudo-moar 3ad15f: OUTPUT«Not enough positional parameters passed; got 1 but expected 2␤  in block  at src/gen/m-CORE.setting:17636␤  in sub  at src/gen/m-CORE.setting:17527␤  in block  at /tmp/sodTCpvGK3:1␤␤»
21:17 timotimo m: my @a = $(1, 2, 3), $(0, 0, 0); say [>>+<<] @a;
21:17 camelia rakudo-moar 3ad15f: OUTPUT«1 2 3␤»
21:17 timotimo ^- i don't know how to formulate the bug report for this
21:17 masak "[BUG] instance of the reduce metaop which should work with one-element list only works with two or more elements in Rakudo"
21:18 timotimo perfect
21:18 timotimo would you do the honors? :)
21:18 * masak submits rakudobug
21:18 timotimo thank you :)
21:21 timotimo i can't &[>>+<<] to get the >>+<< operator as an object?
21:22 masak you oughta.
21:22 masak I think there's an RT ticket about that already, though.
21:22 timotimo probably
21:25 masak m: my @a; say [>>+<<] @a
21:25 camelia rakudo-moar 3ad15f: OUTPUT«Not enough positional parameters passed; got 0 but expected 2␤  in block  at src/gen/m-CORE.setting:17636␤  in sub  at src/gen/m-CORE.setting:17525␤  in block  at /tmp/GywDsUPozD:1␤␤»
21:27 timotimo i'd like to try passing one or 0 arguments to >>+<<
21:28 timotimo sadly, i can't get a handle on it
21:29 masak a cursory search of RT for a &[op] ticket finds nothing.
21:29 masak that's only weak evidence that it's not there, though.
21:30 * cxreg ponders some kind of code review / best practices / idiomatic perl 6 / 6monks style site.  any such thing yet?
21:31 [Coke] perlmonks itself?
21:31 masak cxreg: there's (the really small) https://github.com/moritz/perl6-wtop/blob/master/practices.pod
21:32 bjz joined #perl6
21:32 masak 'night, #perl6
21:33 timotimo gnite masak
21:33 lue Might be of interest to some of you here :) http://rdstar.wordpress.com/2014/08/05/the-magic-of-exponential-growth/
21:33 lue ♞ masak o/
21:34 sjn vendethiel: do as you wish :)
21:34 [Coke] oh, I just realized I can go revisit my app I was writing in perl6 months ago and add a GUI and be faster. whee.
21:36 sjn vendethiel: I think it's a step in the right direction, at least. But since you noticed quite a few nits to pick too, you'll have to be the arbitor of taste here :)
21:38 timotimo [Coke]: when you start work on the gui, make sure to get in touch so you can help motivate and guide improvements to GTK::Simple
21:42 rurban joined #perl6
21:51 raydiak lue: weird, I was just doing the same calculations today for space instead of time
21:51 Sqirrel joined #perl6
21:52 lue raydiak: I actually did them a while ago. I know they're correct because I've gone through the process a few times between when the thought first came to me and that post :)
21:52 lue (I usually got hung up on forgetting which units applied to which numbers. Not this last time, fortunately :P)
21:56 raydiak the other interesting thing is that the result for space (per dimension) and for time is similar
21:56 raydiak well, if you use the size of the observable universe
21:56 raydiak whatever that's worth
21:57 lue raydiak: you're using planck lengths, right?
21:57 raydiak ya
21:58 lue observable universe, predictable history, it's all the same not-sure-about-all-of-it :)
21:59 raydiak then we can at least say that our ignorance seems to be well-balanced, dimensionally speaking :)
22:01 lue pastwards, yes. futurewards, I'd say time starts growing more unknowable than what's ahead of you spatially.
22:03 brrt left #perl6
22:03 yoleaux joined #perl6
22:04 yoleaux joined #perl6
22:05 raydiak how so?
22:07 lue raydiak: probably just our minimal understanding of how time works, really. My thoughts don't feel well-formed enough for me to say much more, so ignore them at will :)
22:11 * egrep wonders what people here recommend egrep use to gain a better understanding and knowledge of perl6...
22:11 sftp_ joined #perl6
22:13 FROGGS_ egrep: this? https://github.com/Nami-Doc/learnxinyminutes-docs/blob/master/perl6.html.markdown
22:13 robins joined #perl6
22:14 jnthn Also, if coming from Perl 5, then moritz++'s 5 to 6 tutorial is likely also worth a look, I think.
22:14 haroldwu joined #perl6
22:16 egrep I'm coming from not really good with any perl whatsoever
22:16 jnthn Ah, then the learnxinyminutes is probably better
22:17 avuserow m: say "Welcome egrep! You can also run code here if you have questions about it :)" # or via privmsg to camelia too
22:17 camelia rakudo-moar 3ad15f: OUTPUT«Welcome egrep! You can also run code here if you have questions about it :)␤»
22:20 salv0 joined #perl6
22:21 anocelot joined #perl6
22:29 kivutar joined #perl6
22:31 Psyche^_ joined #perl6
22:52 timotimo egrep: that's cool, i've never written a single line of perl before i came to the perl6 community
22:52 timotimo i was a python user before that
22:52 timotimo FROGGS_: you should probably link to the learnxinyminutes.com/something/something/perl6 instead
22:52 egrep Heh. I have actually written a bit in perl6 and perl5 before, though.
22:52 timotimo they have a nicer (?) rendering
22:53 egrep I think the something is docs
22:53 egrep They should make their rendering even nicer... stuff flows out of that nice gray box.
22:56 lizmat joined #perl6
22:58 timotimo yes :(
23:00 * egrep wonders how that could be done, though... the only option egrep sees is scrolling
23:01 timotimo HTML and CSS are pain.
23:16 colomon joined #perl6
23:17 rurban joined #perl6
23:22 dalek rakudo/nom: 574266a | (Elizabeth Mattijsen)++ | src/core/CompUnitRepo/Locally.pm:
23:22 dalek rakudo/nom: Layout esthetics to please Amsterdam.pm
23:22 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/574266a680
23:22 lizmat and with that, good night #perl6!
23:35 PZt joined #perl6
23:35 [Coke] (look at old perl6 app) ZOMG SO MUCH FASTER. jnthn++ and everyone++
23:36 timotimo %)
23:36 [Coke] it was unusably slow before. had to emit debug output so I knew it was not dead. now runs in under 2s. whee.
23:36 timotimo can we have numbers? :)
23:36 timotimo whoa.
23:36 timotimo that does sound lovely
23:37 [Coke] was able to clean up a bunch of code and refactor things that were ugly, but it was so painfully slow to change and test, I left it alone.
23:38 timotimo well, that's definitely good news and i'm glad to hear it :)
23:42 egrep Wait... so if I do a git pull in rakudo... what's the relationship with nqp and moarvm... I'm assuming they don't get git pulled because they're a separate repo... but... how do I update those then?
23:42 [Coke] timotimo: right now I'm happy with term::ansicolor && unicode. (it's dealing with a deck of cards)
23:42 [Coke] egrep: reconfigure rakudo
23:42 dalek roast: 6b28a6c | (David Warring david.warring@gmail.com)++ | integration/advent2011-day04.t:
23:42 dalek roast: removed stray 'say' - was breaking TAP
23:42 dalek roast: review: https://github.com/perl6/roast/commit/6b28a6cff2
23:42 [Coke] it will update nqp/moar if needed.
23:42 egrep [Coke]: Okay... so I need to figure out how to do that. :P
23:43 [Coke] perl Configure.pl --gen-moar --gen-nqp --backends=moar (will grab the versions required of nqp/moar, not HEAD)
23:43 egrep Oh... okay. :|
23:43 egrep I'm assuming head just won't work or isn't 100% certain of being working or something like that.
23:44 timotimo i have a ~/perl6 where i have a checkout of moarvm, nqp and rakudo and i Configure.pl them all to have --prefix=../install
23:44 timotimo head is usually in good shape
23:44 egrep Oooh... I think I'll try that out for no reason. :
23:44 egrep :P
23:44 timotimo :)
23:44 [Coke] if you always want latest, you can configure with:
23:45 [Coke] perl Configure.pl --gen-moar=master --gen-nqp=master --backends=moar
23:46 egrep Or I can do that. ._.
23:46 timotimo aye.
23:46 egrep This must be the perl way, more than one way. :P
23:46 [Coke] but you really won't need that, unless you're working on nqp or moar.
23:46 [Coke] we update the required version pretty frequently
23:47 egrep Meh. Why not anyway?
23:47 [Coke] knock yourself out.
23:47 [Coke] timotimo:
23:47 [Coke] 1: 6♥ 6♠ A♣ 9♦   4  ??
23:47 [Coke] 2: 3♠ 8♣ 5♦ 8♦   3  ??
23:47 [Coke] aw. that's in color here.
23:49 * egrep hits egrep on the head with a perl
23:52 timotimo %)
23:55 kurahaupo joined #perl6
23:55 colomon joined #perl6

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

Perl 6 | Reference Documentation | Rakudo