Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-02-18

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 sortiz I'm distracted reading the loader code.
00:11 timotimo moritz: were you +1 or -1 on "turn /etc back into etckeeper-enabled git repo"?
00:12 firstdayonthejob joined #perl6
00:13 adu joined #perl6
00:16 timotimo i wonder what happened on that one day where there was a gigantic amount of traffic: http://www.p6c.org/stats/testers.perl6.org
00:17 timotimo perhaps that was when testing was being done?
00:19 ugexe looks to be mostly googlebot
00:19 ugexe testing would be the blank user agent i would think
00:22 timotimo you think we don't set a user agent when we submit panda test reports?
00:25 dalek perl6-examples: 5282a5d | timotimo++ | template/head.html:
00:25 dalek perl6-examples: remove jquery, jquery-ui and search.js, as they aren't used here (404)
00:25 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/5282a5dd94
00:25 ugexe i know so
00:25 timotimo OK
00:25 Hotkeys Is it still common practice to do 'use v6' ?
00:26 Hotkeys or should the perl version just be in META.info
00:27 ugexe use v6 gives you a decent warning when you `perl` it
00:27 timotimo i wonder if we ought to provide /apple-touch-icon.png and/or /apple-touch-icon-precomposed.png
00:27 timotimo ugexe: yeah, as opposed to use v6.c, which perl5 explodes when it sees that
00:28 ugexe its probably best for bin scripts without extensions
00:31 * timotimo looks if examples.perl6.org successfully gets updated
00:31 raiph m: my Mu $foo = 1; for ^1e6 { $foo = $foo + 1 }; say now - INIT now
00:32 camelia rakudo-moar e3b1dd: OUTPUT«6.4864783␤»
00:32 raiph m: my int $foo = 1; for ^1e6 { $foo = $foo + 1 }; say now - INIT now
00:32 camelia rakudo-moar e3b1dd: OUTPUT«6.5606549␤»
00:33 raiph timotimo: can you have camelia show a use of int or str or other native type that speeds code up?
00:33 raiph or anyone else of course :)
00:35 timotimo if someone wants to fix things:
00:36 timotimo categories/euler/prob047-gerdr.pl - has nativecall related "potential difficulties"
00:36 timotimo actually, just look through the build log will ya :P
00:38 ugexe my int @a = 1..100; for @a { my $x = $_; } # this is actually slower
00:39 raiph ugexe: slower was going to be my second request
00:39 timotimo https://travis-ci.org/perl6/perl6-examples - someone can look through this and see what's going wrong there
00:40 timotimo ugexe: native arrays are still rather slow, iirc
00:40 rudi_s Hi. I'm looking for a way to "join" IO::Paths. E.g. $path ~ '/' ~ $file which takes care of choosing '/' for me and just works. Did I miss something in IO::Path?
00:40 yoleaux 1 Dec 2015 21:09Z <FROGGS> rudi_s: please pull all the things and rebuild rakudo, Pointer is rw works now like shown in this test: https://github.com/rakudo/rakudo/commit/2b5c41e94f
00:40 timotimo well, native multi-dim arrays are tremendously slow at the moment
00:40 timotimo rudi_s: you want "catpath"
00:41 ugexe $io-path.child('xxx')
00:41 timotimo or that
00:41 rudi_s Ah, IO::Spec. Thanks.
00:42 AlexDaniel m: my int@a;
00:42 camelia rakudo-moar e3b1dd: ( no output )
00:42 AlexDaniel m: myint@a;
00:42 camelia rakudo-moar e3b1dd: OUTPUT«5===SORRY!5=== Error while compiling /tmp/cw9YzaSB7E␤Two terms in a row␤at /tmp/cw9YzaSB7E:1␤------> 3myint7⏏5@a;␤    expecting any of:␤        infix␤        infix stopper␤        statement end␤        statement modifier␤       …»
00:42 AlexDaniel :(
00:42 rudi_s So I guess it's not recommended to use IO::Path as path container and instead I should use just Str seeing that IO::Spec returns Strings.
00:43 mkz joined #perl6
00:43 raiph timotimo: thx re native array tip
00:43 timotimo i may actually be wrong about native arrays, though
00:43 timotimo i haven't spent proper time on that
00:44 raiph er, native multidim arrays, is that what your last comment is about?
00:44 raiph (ie emphasis on multidim)
00:44 timotimo well, native multidim arrays really are crazy slow
00:44 ugexe rudi_s: use .child()
00:44 timotimo regular native arrays, not 100% sure if they're slow
00:45 rudi_s ugexe: Where can I find documentation for that?
00:45 raiph m: my @a[1e3;1e3]; @a>>++; say now - INIT now
00:46 camelia rakudo-moar e3b1dd: OUTPUT«(timeout)»
00:46 raiph m: my @a[1e1;1e1]; @a>>++; say now - INIT now
00:46 camelia rakudo-moar e3b1dd: OUTPUT«Type check failed in binding @dims; expected Positional but got Any␤  in block <unit> at /tmp/RvcHaB7R92 line 1␤␤»
00:47 timotimo m: my @a[10;10]; @a>>++; say now - INIT now
00:47 camelia rakudo-moar e3b1dd: OUTPUT«Type check failed in binding @dims; expected Positional but got Any␤  in block <unit> at /tmp/HqUxFSFxzb line 1␤␤»
00:47 ugexe rudi_s: https://github.com/perl6/specs/blob/master/S32-setting-library/IO.pod#child-
00:47 timotimo i think that's just NYI
00:48 ugexe doh, did someone take down the metacpan elastic search?
00:48 ugexe on hack
00:49 timotimo it's probably just not rebootsafe
00:49 timotimo vim -E -s -c 'let g:html_no_progress=1|syntax on|set noswapfile|set bg=light|set ft=perl6||runtime syntax/2html.vim|wq! /tmp/gOJMLFDfnj|quit' -cqa /tmp/g6EnonQCzE 2>/dev/null >/dev/null
00:49 timotimo this command seems kind of spinning there
00:49 timotimo it's now at almost 5 minutes CPU time spent
00:50 pdcawley_ joined #perl6
00:50 rudi_s ugexe: Ah, nice. Didn't find it on doc.perl6.org
00:50 sortiz llfourn, I think I have a clue, and a possible fix
00:53 timotimo http://examples.perl6.org/build-log/build-2016-02-18T00:30+0000.log  -  failed ;(
00:54 timotimo https://github.com/stmuk/p6-Text-VimColour/blob/master/lib/Text/VimColour.pm#L28
00:54 timotimo that's the line in question
00:55 timotimo i wonder if that's a bug; that fail inside a LEAVE phaser doesn't work properly?
00:56 timotimo looks like andreoss introduced that? perhaps?
00:56 skids m: sub a { 42.say; LEAVE { return "foo" } }; a(); # no probably not a bug
00:56 camelia rakudo-moar e3b1dd: OUTPUT«42␤Attempt to return outside of any Routine␤  in sub a at /tmp/T4uj5JrP43 line 1␤  in block <unit> at /tmp/T4uj5JrP43 line 1␤␤»
00:58 skids Sould be an X::AdHoc.new(...).throw
00:58 raiph timotimo: I'm guessing there's no current example of native types speeding code up more than about 10% or so. Does that sound about right?
00:59 skids for loops I think?
01:00 rudi_s Lets say I have an absolute path and a relative path and I want to join them. How can I do this with IO::Path or IO::Spec?
01:00 rudi_s catdir/catpath/join seem to work only with either only directories or just a single file.
01:00 skids I think IO::Spec is a dead end, I've seen mumurs about it getting killed off.
01:01 skids .child I think.
01:02 skids m: "/etc".IO.child("foo").say
01:02 camelia rakudo-moar e3b1dd: OUTPUT«"/etc/foo".IO␤»
01:02 raiph m: my ($foo, $bar) = <a b>; for ^1e6 { $ = $foo ~ $bar }; say now - INIT now
01:02 camelia rakudo-moar e3b1dd: OUTPUT«7.95860273␤»
01:02 raiph m: my str ($foo, $bar) = <a b>; for ^1e6 { $ = $foo ~ $bar }; say now - INIT now
01:03 camelia rakudo-moar e3b1dd: OUTPUT«7.42987849␤»
01:03 raiph m: my ($foo, $bar) = 1, 2; for ^1e6 { $ = $foo + $bar }; say now - INIT now
01:03 camelia rakudo-moar e3b1dd: OUTPUT«6.3440703␤»
01:03 raiph m: my int ($foo, $bar) = 1, 2; for ^1e6 { $ = $foo + $bar }; say now - INIT now
01:03 rudi_s skids: The question is, if it works correctly if "foo" is an IO::Path or a path with multiple elements. It seems to work fine here, but I'd feel better if it was specified, that it works with more than just a single file name.
01:03 timotimo raiph: depends strongly on what the minimum size of code is that you'd accept
01:03 camelia rakudo-moar e3b1dd: OUTPUT«6.8162347␤»
01:04 raiph timotimo: my focus is the "use native types" bit of the p6doc performance page
01:05 raiph timotimo: I'm thinking it might be best to drop mention of native types for now
01:05 skids m: my str ($foo, $bar) = <a b>; my int $a; while $a++ < 1000000 { $ = $foo ~ $bar }; say now - INIT now
01:05 camelia rakudo-moar e3b1dd: OUTPUT«0.428320␤»
01:05 skids m: my str ($foo, $bar) = <a b>; my $a; while $a++ < 1000000 { $ = $foo ~ $bar }; say now - INIT now
01:05 camelia rakudo-moar e3b1dd: OUTPUT«0.60979299␤»
01:06 skids There are actually a few places where native types are slower IIRC.
01:07 raiph skids: thx. about 30% speedup due to use of int
01:07 skids Probably more, considering the concat.
01:08 timotimo as i said multiple times before, our inlining currently has gigantic problems with native ints
01:08 dalek perl6-examples: 38822ca | timotimo++ | lib/Pod/Htmlify.pm6:
01:08 dalek perl6-examples: when vim color highlighting fails, try to continue.
01:08 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/38822ca6ff
01:09 skids I can only get about 30 minutes into reading MoarVM and compile guts before I get totally lost.
01:09 mspo "Chapter 1" ...(30 mintes later) ^H^H^H^H^H^H^H^H^H^H^H^H
01:13 timotimo skids: i can answer lots of questions if you like
01:13 raiph Do you expect there to be, using current Rakudo, ways to use natives to make 50% or better memory savings even if the code is slower?
01:14 timotimo potentially. sadly, we don't have code to remove the taking of LexRefs yet. they also cause memory churn, definitely. but they tend to be thrown out with the minor collections.
01:15 skids Very large array[int32] and such I imagine might do it.
01:15 timotimo i'd really like for rakudobrew to compile moarvm with a higher -j count ...
01:15 timotimo ah, yeah
01:15 timotimo that's likely to be better than arrays of Int or arrays of Any
01:15 timotimo though remember that we save a bit of space when an Int's content fits into 32bit
01:16 skids But still there's a Scalar around it.
01:16 timotimo oh, inside an Array, yeah
01:16 timotimo good point
01:16 timotimo those are definitely long-living
01:19 skids rudi_s: I don't see 'fee/fie'.IO.child('foo/fum') tested in roast so unfortunately that behavior isn't part of 6.c I'm afraid.
01:20 rudi_s skids: Thanks for looking! I think for now I can live with the "uncertainty".
01:21 Hotkeys does perl 6 have tail call optimization?
01:21 timotimo not really, no
01:22 timotimo the language definition doesn't forbid or require it, and rakudo-moar doesn't do it yet
01:22 Hotkeys are there plans to?
01:22 Hotkeys just curious
01:22 timotimo i *think* when we get trace jit it'll be possible to build TCO
01:23 Hotkeys mmkay
01:26 dalek perl6-examples: 7717b27 | timotimo++ | lib/Pod/Htmlify.pm6:
01:26 dalek perl6-examples: use $_ rather than $! inside CATCH block (because $! gets unset)
01:26 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/7717b27dc0
01:28 skids TCO tends to become a golden hammer, not that we shouldn't have it.
01:30 TimToady "anything that is allowed is mandatory" is the failure mode there :)
01:35 * skids reminds himself to make some erudite joke about Maslow's hammer and Chekhov's gun some day.
01:36 skids Heheh.  "Birmingham screwdriver"
01:37 rudi_s Can I prepend to a string? Like "a" op= "b" yields "ba"?
01:38 timotimo .tell stmuk since you're the genius behind VimColour, could you try to figure out why at least one of the files in project euler from the perl6-examples library makes it spin at 100% cpu for ever(?) ... i think it might be prob008-duff2.pl
01:38 yoleaux timotimo: I'll pass your message to stmuk.
01:39 timotimo .tell stmuk it looks like there's three files in euler that do failure ...
01:39 yoleaux timotimo: I'll pass your message to stmuk.
01:40 sortiz .tell llfourn I think that for the 'target-package' path, INDIRECT_NAME_LOOKUP should include CORE:: in the test for initialize "$thing".
01:40 yoleaux sortiz: I'll pass your message to llfourn.
01:40 atweiden m: my %h = :level-one(:level-two(:level-three(:is-level-three(True)))); sub deref(%h, *@k) is rw { my $h := %h; $h := $h{$_} for @k; $h }; deref(%h, qw<level-one level-two>)<is-level-two> = True; say %h.perl;
01:40 camelia rakudo-moar e3b1dd: OUTPUT«Cannot modify an immutable Mu␤  in block <unit> at /tmp/SD73eUQwvv line 1␤␤»
01:40 atweiden why does `deref(%h, qw<level-one level-two>)<is-level-two> = True` fail? isn't the container returned `is rw`?
01:42 atweiden m: my %h = :level-one(:level-two(:level-three(:is-level-three(True)))); sub deref(%h, *@k) is rw { my $h := %h; $h := $h{$_} for @k; $h }; for deref(%h, qw<level-one level-two>) -> $at is rw { say 'got this: ', $at.perl }
01:42 camelia rakudo-moar e3b1dd: OUTPUT«Parameter '$at' expected a writable container, but got Pair value␤  in block <unit> at /tmp/wDdcQp8ebC line 1␤␤»
01:42 timotimo collectd now shows information about our apache's status on www.p6c.org
01:43 timotimo heh. the failure generated when calling "fail" inside a LEAVE phaser gets leaked and later pops up when it gets garbage-collected
01:48 timotimo .tell FROGGS i set the cronjob to rsync over the html files of cpandatesters to only run every 15 minutes rather than every 5
01:48 yoleaux timotimo: I'll pass your message to FROGGS.
01:50 timotimo does monitoring all of this make me a worse sysadmin? %)
01:52 skids m: my %h = :level-one(:level-two({:level-three(:is-level-three(True))})); sub deref(%h, *@k) is rw { my $h := %h; $h := $h{$_} for @k; $h }; deref(%h, qw<level-one level-two>)<is-level-two> = True; say %h.perl # A Pair is not a Hash is why
01:52 camelia rakudo-moar e3b1dd: OUTPUT«{:level-one(:level-two({:is-level-two, :level-three(:is-level-three)}))}␤»
01:52 skids atweiden: ^^^
01:53 ugexe m: my $a = "a";  $a .= &reverse("b"); say $a; # rudi_s heh
01:53 camelia rakudo-moar e3b1dd: OUTPUT«[b a]␤»
01:53 rudi_s ugexe: ;-)
01:54 atweiden skids: the brackets, i see :)
01:55 timotimo it bothers me greatly that it still says "Generated on 2015-12-29T16:53:26.645083Z" at the bottom of examples.perl6.org
01:56 timotimo oh, i "just" had to ctrl-r
01:58 abaugher joined #perl6
01:58 timotimo and now there should be fewer 404s on that domain
01:58 timotimo from now on, going forward
02:06 Herby_ joined #perl6
02:06 Herby_ Evening, everyone!
02:07 skids o/
02:07 Herby_ \o
02:08 dalek doc: 12e1234 | raiph++ | doc/Language/performance.pod:
02:08 dalek doc: Remove stubbed native types section.
02:08 dalek doc:
02:08 dalek doc: Native types don't yet perform well enough.
02:08 dalek doc: review: https://github.com/perl6/doc/commit/12e1234c49
02:08 molaf joined #perl6
02:08 raiph hi Herby_
02:10 apiw joined #perl6
02:18 apiw joined #perl6
02:18 Ben_Goldberg joined #perl6
02:20 molaf_ joined #perl6
02:38 colomon joined #perl6
02:41 Actualeyes joined #perl6
02:47 ilbot3 joined #perl6
02:47 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
02:56 PerlJam joined #perl6
02:57 Herby_ If anyone is feeling bored and wants to give Perl 6 a little exposure, another programming puzzle is up: https://www.reddit.com/r/dailyprogrammer/comments/468pvf/20160217_challenge_254_intermediate_finding_legal/
02:59 Herby_ Juerd submitted a great solution for Monday's puzzle
03:00 AlexDaniel geez, a parade of ass long solutions
03:01 Herby_ Yep.  And there is only 19 of them so far, so any submissions should get lots of eyes
03:02 noganex_ joined #perl6
03:05 El_Che joined #perl6
03:11 llfourn .botsnack
03:11 yoleaux :D
03:11 yoleaux 01:40Z <sortiz> llfourn: I think that for the 'target-package' path, INDIRECT_NAME_LOOKUP should include CORE:: in the test for initialize "$thing".
03:12 avenj joined #perl6
03:12 avenj joined #perl6
03:17 llfourn sortiz: You there?
03:20 Herby_ joined #perl6
03:23 llfourn .tell sortiz ++ that is an interesting solution to the immediate problem. It should work. I think that IO::Socket::SSL inserting itself into SETTING::IO::Socket might be dangerous for setting versioning reasons. I think that not being able to introspect a CompUnit to see what's in it is another problem.
03:23 yoleaux llfourn: I'll pass your message to sortiz.
03:28 AlexDaniel m: my @a = < a b c d >; for @a { $_ = 42 if /a/ }; say @a
03:28 camelia rakudo-moar e3b1dd: OUTPUT«[42 b c d]␤»
03:29 AlexDaniel m: my @a = [< a b c d >, < a a >]; for @a { for @$_ { $_ = 42 if /a/ } }; say @a
03:29 camelia rakudo-moar e3b1dd: OUTPUT«Cannot assign to an immutable value␤  in block  at /tmp/xHmIb1O8aM line 1␤  in block <unit> at /tmp/xHmIb1O8aM line 1␤␤»
03:29 AlexDaniel how can I make it work?
03:30 skids my @a = [[< a b c d >], [< a a >]]; for @a { for @$_ { $_ = 42 if /a/ } }; say @a
03:30 skids m: my @a = [[< a b c d >], [< a a >]]; for @a { for @$_ { $_ = 42 if /a/ } }; say @a
03:30 camelia rakudo-moar e3b1dd: OUTPUT«[[42 b c d] [42 42]]␤»
03:30 skids <a b c d> is a list.
03:30 AlexDaniel ooh
03:31 skids You only get an Array in the @a = by virtue of the @a.
03:31 AlexDaniel riight
03:34 pmqs joined #perl6
03:42 ryan__ joined #perl6
03:43 AlexDaniel Herby_: almost have it
03:43 Herby_ \o/
03:45 n0tjack joined #perl6
03:47 AlexDaniel Herby_: oh damn, I forgot about diagonals…
03:47 AlexDaniel let's see if there is any easy way to get diagonal slices…
03:48 colomon joined #perl6
03:48 AlexDaniel besides that it is pretty short, readable and clever
03:50 AlexDaniel Herby_: take a look: https://gist.github.com/AlexDaniel/b952b73284a083973802
03:50 Herby_ Nice job!
03:51 AlexDaniel yeah but diagonals
03:51 AlexDaniel all I have to do is slap it into the main loop and everything else should work all by itself
03:51 Herby_ hmm
03:52 Juerd How do you slurp stdin?
03:52 AlexDaniel m: say slurp;
03:52 camelia rakudo-moar e3b1dd: 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’ G…»
03:53 Juerd http://juerd.nl/i/6d47b64b7714a0d92552d9b602c2f19d.png is my first working regex but I want a grammar :)
03:53 Juerd Oh, just slurp. Heh. :)
03:53 Juerd I tried $*IN.slurp...
03:53 AlexDaniel geez, reversi with grammars
03:54 AlexDaniel who knows, maybe that's going to work :)
03:55 Hotkeys is there a negated version of << in regex?
03:55 Hotkeys (word boundary)
03:59 Herby_ AlexDaniel: I'm not much help on the diagnols but you're solution is nice, clean and easy to read
03:59 noganex joined #perl6
03:59 AlexDaniel Herby_: I think that I'll hack it up quickly. Just a couple of minutes :)
04:04 El_Che joined #perl6
04:06 Hotkeys oh I didn't realize the cached trait is experimental
04:08 AlexDaniel Hotkeys: it wasn't for a long time
04:12 AlexDaniel phah, got half of the board diagonally…
04:14 AlexDaniel yup, it actually works. Couldn't believe my eyes
04:17 Herby_ good stuff.  Got a link?
04:17 AlexDaniel not yet
04:18 AlexDaniel Herby_: well, if you split the board in half diagonally then it is (for ^@map -> $c { (@map[$c-$_;$_] for ^($c*2 + 1)) })
04:19 AlexDaniel Herby_: so you get something like this: https://gist.github.com/AlexDaniel/b952b73284a083973802
04:20 Hotkeys Why is cached experimental now?
04:20 AlexDaniel Herby_: but that's just 1 half of all diagonals…
04:20 AlexDaniel Hotkeys: it was too buggy
04:20 Hotkeys ah
04:20 AlexDaniel Hotkeys: most of the time it was actually fine, actually. But there were some corner cases
04:20 AlexDaniel /actually//, actually
04:20 Hotkeys ah
04:21 Juerd Damn, grammars are hard
04:21 Juerd Is there a way to pass a capture to subrules?
04:23 Juerd Ah, found it
04:23 Juerd <other-token: $<capture>>
04:25 * skids wonders if timotimo is still conscious today.
04:27 Hotkeys woo
04:27 Hotkeys just finished my translation of the porter stemming algo
04:27 Hotkeys time to make it into a proper module
04:42 addison_ joined #perl6
04:49 raiph joined #perl6
04:51 Hotkeys so I have some regexes that I use in a sub in this modules
04:51 Hotkeys er
04:51 Hotkeys never mind
04:56 Juerd Okay, my solution is posted
04:56 Juerd And my head hurts now
04:56 Juerd I'm not sure this was a good idea :)
04:59 Hotkeys what is this for juerd
05:00 Juerd https://www.reddit.com/r/dailyprogrammer/comments/468pvf/20160217_challenge_254_intermediate_finding_legal/
05:00 Hotkeys ah
05:00 Juerd Please have a look at my grammar and say something nice, so I can go to bed
05:00 Juerd :P
05:03 Herby_ Looks good!
05:04 Juerd Thank you :D
05:04 Juerd It is not good, though :(
05:04 Juerd Just spotted a bug.
05:04 Herby_ minor detail :)
05:04 Juerd Output is weird
05:06 Juerd It shifts the board somehow
05:07 Herby_ headed to bed, good luck!
05:11 addison joined #perl6
05:23 jack_rabbit joined #perl6
05:31 Juerd Okay, so .comb(8) does not what I expect
05:31 Juerd +do
05:34 atweiden m: my @a = [ [ [ 'd', 'delta' ], [ 'e', 'echo' ], [ 'f', 'foxtrot' ] ], [ [ 'g', 'golf' ], [ 'h', 'hotel' ], [ 'i', 'india' ] ] ]; my $target-to-splice-in = [ [ 'a', 'alpha' ], [ 'b', 'bravo' ], [ 'c', 'charlie' ] ]; @a.splice(0, 0, $target-to-splice-in); say @a.perl;
05:34 camelia rakudo-moar e3b1dd: OUTPUT«[["a", "alpha"], ["b", "bravo"], ["c", "charlie"], [["d", "delta"], ["e", "echo"], ["f", "foxtrot"]], [["g", "golf"], ["h", "hotel"], ["i", "india"]]]␤»
05:34 atweiden this keeps stripping the outer []
05:35 atweiden tried it a bunch of different ways now
05:35 Juerd Argh, this must be a bug
05:35 Juerd If I copy/paste the string and use the REPL, I get exactly what I want
05:35 atweiden m: my @a = [ [ [ 'd', 'delta' ], [ 'e', 'echo' ], [ 'f', 'foxtrot' ] ], [ [ 'g', 'golf' ], [ 'h', 'hotel' ], [ 'i', 'india' ] ] ]; my @target-to-splice-in = [ [ 'a', 'alpha' ], [ 'b', 'bravo' ], [ 'c', 'charlie' ] ]; @a.splice(0, 0, $@target-to-splice-in); say @a.perl;
05:35 camelia rakudo-moar e3b1dd: OUTPUT«[["a", "alpha"], ["b", "bravo"], ["c", "charlie"], [["d", "delta"], ["e", "echo"], ["f", "foxtrot"]], [["g", "golf"], ["h", "hotel"], ["i", "india"]]]␤»
05:37 atweiden m: my @a = [ [ [ 'd', 'delta' ], [ 'e', 'echo' ], [ 'f', 'foxtrot' ] ], [ [ 'g', 'golf' ], [ 'h', 'hotel' ], [ 'i', 'india' ] ] ]; my @target-to-splice-in = [[ [ 'a', 'alpha' ], [ 'b', 'bravo' ], [ 'c', 'charlie' ] ]]; @a.splice(0, 0, $@target-to-splice-in); say @a.perl;
05:37 camelia rakudo-moar e3b1dd: OUTPUT«[["a", "alpha"], ["b", "bravo"], ["c", "charlie"], [["d", "delta"], ["e", "echo"], ["f", "foxtrot"]], [["g", "golf"], ["h", "hotel"], ["i", "india"]]]␤»
05:37 atweiden m: my @a = [ [ [ 'd', 'delta' ], [ 'e', 'echo' ], [ 'f', 'foxtrot' ] ], [ [ 'g', 'golf' ], [ 'h', 'hotel' ], [ 'i', 'india' ] ] ]; my @target-to-splice-in = $[[ [ 'a', 'alpha' ], [ 'b', 'bravo' ], [ 'c', 'charlie' ] ]]; @a.splice(0, 0, $@target-to-splice-in); say @a.perl;
05:37 camelia rakudo-moar e3b1dd: OUTPUT«[[["a", "alpha"], ["b", "bravo"], ["c", "charlie"]], [["d", "delta"], ["e", "echo"], ["f", "foxtrot"]], [["g", "golf"], ["h", "hotel"], ["i", "india"]]]␤»
05:40 Juerd Probably a rakudobug, but I can't golf it: https://www.reddit.com/r/dailyprogrammer/comments/468pvf/20160217_challenge_254_intermediate_finding_legal/d0462hz change /.**{8}/ to 8 and it invents an extra '-'
05:40 Juerd But if you put the string there manually, it works correctly with .comb(8)
05:40 Cabanossi joined #perl6
05:42 davido joined #perl6
05:44 Hotkeys Juerd: what does it do when you don't put the string there manually?
05:46 addison joined #perl6
05:47 mattp__ joined #perl6
05:48 jack_rabbit joined #perl6
05:53 raiph joined #perl6
05:58 adu joined #perl6
06:04 simcop2387 joined #perl6
06:56 AlexDaniel .tell Herby I cannot find any meaningful way to get diagonals…
06:56 yoleaux AlexDaniel: I'll pass your message to Herby.
06:56 AlexDaniel .tell maybe you'll have a better luck
06:56 yoleaux AlexDaniel: I'll pass your message to maybe.
07:15 azawawi joined #perl6
07:15 azawawi hi
07:16 azawawi good morning #perl6
07:19 CIAvash joined #perl6
07:25 hippie joined #perl6
07:25 AlexDaniel .tell b2gills oh, maybe you'll find something clever. Given a two-dimensional array, I can iterate over its rows with 「for @a], over its columns with 「for (@a[*;$_] for ^@a)」. But what would be the easiest way to iterate over its diagonals?
07:25 yoleaux AlexDaniel: I'll pass your message to b2gills.
07:26 AlexDaniel .tell b2gills I cannot manage to find a solution that wouldn't make me want to kill myself after an hour
07:26 yoleaux AlexDaniel: I'll pass your message to b2gills.
07:27 wamba joined #perl6
07:32 FROGGS joined #perl6
07:33 n0tjack joined #perl6
07:34 firstdayonthejob joined #perl6
07:37 darutoko joined #perl6
07:41 sjoshi joined #perl6
07:43 nakiro joined #perl6
07:44 davido joined #perl6
07:44 SHODAN joined #perl6
07:46 RabidGravy joined #perl6
07:48 RabidGravy MARNING!
07:53 Hotkeys GNINRAM
07:53 nebuchadnezzar joined #perl6
07:53 moritz \o
07:54 moritz timotimo: re /etc and etckeeper: I don't care much either way, as long as we keep passwords out of the git repo
07:54 ugexe joined #perl6
07:55 El_Che moritz: vault seems to be nice for that kind of stuff
07:59 [TuxCM] test            22.275
07:59 [TuxCM] test-t          12.050
07:59 [TuxCM] csv-parser      51.057
07:59 ely-se joined #perl6
07:59 [TuxCM] NLUUG asked me to do a perl6 talk on CSV on their conference
08:01 SHODAN joined #perl6
08:02 moritz nice
08:03 [TuxCM] still need approval of boss
08:03 moritz [TuxCM]: fwiw I've used your Perl 6 Text::CSV "in production" (not for fun, but for getting things done) already
08:03 [TuxCM] \o/
08:03 [TuxCM] added .header yesterday
08:03 El_Che same here (nothing fancy though)
08:03 [TuxCM] which I used in production all week
08:04 moritz (for GPW2016, I needed a list of speaker's email addresses; So I wrote a small Perl 6 program to extract them from the two CSV export from talks and from users)
08:06 sno joined #perl6
08:06 El_Che We are the certificate authority for the University. We migrated to a new CA provider. We had a list om certificates, several expiration dates and contact e-mails for domains still using the other CA (about 2000). I used Text::CSV to convert this info into a json file that my application uses to send expiration warnings and keep state (how many warnings, left, has it migrated, uses a new certificate, etc)
08:07 [TuxCM] :)
08:07 El_Che so, nothing fancy, but thx nevertheless :)
08:13 El_Che would love to see it enter rakudo star
08:21 [TuxCM] would that imply my involvement, or does it just mean that it enters a list
08:22 moritz for now, it'd just enter a list
08:22 [TuxCM] than I have no objections at all
08:22 moritz later we might want to get module authors to make releases, so that we can include released versions in the star distribution
08:24 [TuxCM] I would then need instructions for that. I'll probably nag lizmat on a PM when that is due
08:25 El_Che my docker images start from the rakudo star release + panda install MyModule
08:25 El_Che so the less moving pieces the best
08:25 El_Che better
08:25 * [TuxCM] => $work
08:40 dalek ecosystem: 702e42d | (John Spurr)++ | META.list:
08:40 dalek ecosystem: Add Lingua::EN::Stem::Porter
08:40 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/702e42d869
08:40 dalek ecosystem: 1086b6e | (Fritz Zaucker)++ | META.list:
08:40 dalek ecosystem: Merge pull request #155 from johnspurr/patch-1
08:40 dalek ecosystem:
08:40 dalek ecosystem: Add Lingua::EN::Stem::Porter
08:40 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/1086b6ef1c
08:41 RabidGravy Grooviness
08:47 fireartist joined #perl6
08:47 espadrine joined #perl6
08:48 Hotkeys woo
08:48 Hotkeys first proper contribution to the ecosystem
08:48 Hotkeys ^^^
08:52 dakkar joined #perl6
08:55 zakharyas joined #perl6
08:56 lizmat jnthn: I just found something strange wrt int/Int parameter passing:
08:56 lizmat m: my int @a; my int $i = 42; for ^100000 { @a.push($i) }; say now - INIT now   # int to int candidate is slower
08:56 camelia rakudo-moar e3b1dd: OUTPUT«0.0876879␤»
08:56 lizmat m: my int @a; my Int $i = 42; for ^100000 { @a.push($i) }; say now - INIT now   # Int to Int candidate is much faster
08:56 camelia rakudo-moar e3b1dd: OUTPUT«0.034061␤»
08:57 RabidGravy eugh
08:57 lizmat jnthn: I verified the int candidate of native array.push *is* selected
08:57 lizmat (in the int case)
08:57 * lizmat profiles
09:02 lizmat hmmm...in the profile, the Int candidate is green, and the int candidate is yellow
09:02 Amendil joined #perl6
09:02 lizmat so the int candidate is not jitted
09:04 lizmat only speshed
09:07 lizmat also: the int case has 100000 intlexref allocations with 4 gc runs, the Int case none and only 1 GC run
09:07 Zero_Dogg joined #perl6
09:10 RabidGravy sounds like a good candidate for some toshing up :)
09:11 lizmat yeah, it's just that I'm not sure whether this is on jnthn's radar already or not
09:13 Skarsnik joined #perl6
09:14 Skarsnik Hello
09:17 kjs_ joined #perl6
09:18 lizmat Skarsnik  o/
09:19 kjs_ joined #perl6
09:20 RabidGravy HARR
09:22 lizmat hmm.... removing the int candidate does *not* improve things atm
09:23 lizmat it even looks like it makes it slightly worse
09:23 lizmat so, so much for the idea of removing stuff to make things faster (now)
09:24 Skarsnik ^^
09:33 dalek rakudo/nom: 9983c2c | lizmat++ | src/core/Exception.pm:
09:33 dalek rakudo/nom: Make X::TypeCheck a little more informative
09:33 dalek rakudo/nom:
09:33 dalek rakudo/nom: by showing the actual value passed if possible, truncated if too long
09:33 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/9983c2c843
09:34 lizmat afk for a few hours&
09:34 n0tjack joined #perl6
09:34 RabidGravy as a completely OT thing does anyone know about avahi or mDNS things in general?
09:35 RabidGravy I want to arrange for a device to have a "cname" or some alternative name that I can use for a web server routing
09:36 RabidGravy er virtual host
09:36 cpage_ joined #perl6
09:38 RabidGravy it seems that you can add static hosts but that blows the advantage of mDNS
09:55 rindolf joined #perl6
09:55 jnthn lizmat: That's not odd once you know that spesh doesn't know much about native refs yet :)
10:10 espadrine joined #perl6
10:15 arnsholt Hotkeys++ # Porter stemmer; very cool!
10:17 apiw joined #perl6
10:17 Hotkeys Ty
10:18 Hotkeys arnsholt: I'm probably gonna implement the big optimization stuff tomorrow or Friday depending on if I finish some other things I'm doing
10:19 Hotkeys There's a few things recommended to speed things up from the original paper that I'm going to try out
10:19 Hotkeys But this is a functional implementation so that's good enough for tonight
10:21 Hotkeys I also should probably write some sort of test for it other than the use test but I'll deal with that later
10:22 RabidGravy tsk
10:23 arnsholt That's the right order to do things in, though. Make it right, then make it fast
10:24 RabidGravy except for the tests, without the tests you can't do the second part in the secure knowledge you aint broke nothin
10:25 Hotkeys Fair enough
10:26 Hotkeys I've got a ~30000 word list that I'm currently testing it against but I feel like that would be overkill for the actually .t test
10:27 arnsholt Nah, not necessarily
10:27 RabidGravy how long does it take?
10:27 Hotkeys About 11 seconds on my computer
10:27 Hotkeys From the repl
10:27 arnsholt Or take a subset for normal tests, and another set for a full test
10:27 RabidGravy nah, thats fine, I'd stick that in
10:28 RabidGravy I've got *single* tests that take longer than that in some of my modules
10:28 Hotkeys Where would I put the word list, /resources ?
10:28 RabidGravy er t/data is what I tend to use
10:28 Hotkeys Alright
10:28 Hotkeys I'll stick it in in the morning
10:28 RabidGravy if you put it in resources it'll get installed with the module
10:28 Hotkeys Ah
10:29 arnsholt I'd probably just shove the whole thing in the test file, TBH
10:29 RabidGravy there is that option
10:29 Hotkeys The word list and its matching expected output?
10:29 Hotkeys That'd be quite long
10:30 jevin joined #perl6
10:31 Hotkeys Somewhat unrelated, what is "Koalatee" on modules.perl6.org
10:31 RabidGravy In URI::Template I have several test files in t/data - in some of the Audio::* things there are whole audio files
10:32 RabidGravy something like has a compliant META file, has a README, has tests
10:32 Hotkeys Ah
10:32 hankache joined #perl6
10:32 hankache hello #perl6
10:32 Hotkeys Hello
10:32 RabidGravy a sort of adaptation of Kwalitee, something not quite "quality"
10:33 Hotkeys Yeah this is my first time really contributing a module to any ecosystem not just perl 6
10:33 Hotkeys I'm quite lazy wrt testing on personal projects
10:34 Hotkeys Or yknow, wrt to everythibg
10:34 DrForr left #perl6
10:34 Hotkeys See: my very empty github profile
10:34 DrForr joined #perl6
10:34 RabidGravy not doing tests is actually anti-lazy, it's making a problem that you are going to have to fix later
10:35 Hotkeys Fair enough
10:36 Hotkeys It's lazy in the right now
10:36 Hotkeys Just not future lazy :p
10:36 DrForr Incidentally, https://github.com/drforr/perl6-App-prancer is up in ts first cut on github.
10:37 RabidGravy but I've been making software for a living for a quarter of a century and I'm definitely a slacker, making tests early is a good thing
10:37 Hotkeys Once I'm happy with this module I'm probably going to do the snowball stemming algo
10:37 hankache There is a new German translation of perl6intro.com available at de.perl6intro.com Your review would be highly appreciated. PR's are welcomed: https://github.com/hankache/perl6intro
10:37 RabidGravy do it! do it!
10:37 n0tjack joined #perl6
10:37 Hotkeys I've been making software for a living for 0 years so far
10:37 Hotkeys :p
10:37 RabidGravy HotKeys, when you're done with that you know we''ll insist you make a full-text indexer ;-)
10:37 jnthn DrForr: That README would be 75% more awesome if it had a little example in it :)
10:37 Skarsnik DrForr, you should add an example
10:38 Hotkeys RabidGravy: heh
10:38 Skarsnik damn jnthn
10:38 DrForr Gimme 5 minutes :)
10:38 jnthn :P
10:38 Hotkeys I need to contribute all the Lingua::* modulea
10:38 jnthn Though I can see there's Pod with a synopsis so nice
10:38 Hotkeys modules*
10:40 RabidGravy DrForr, is there any point me sending a PR for the missing dependency in the META and the wrong test files?
10:40 RabidGravy I'll have a play later
10:41 Hotkeys I should probably do more developing in the hours that aren't immediately before I get into bed
10:41 ocbtec joined #perl6
10:41 Hotkeys I had to write the use test and update the readme from my phone from bed
10:42 Hotkeys (To add the pretty Travis build image)
10:43 RabidGravy woah!  I struggle to type code on a 10" tablet, I don't think I'd even try on a phone
10:43 Hotkeys Well I realized I forgot to actually put anything in the use test
10:44 Hotkeys And I couldn't sleep with a failing initial build :p
10:45 Skarsnik hm, NC expose a refresh sub. look a bit too generic as a name x)
10:45 RabidGravy I think it's for stuff like rw structs
10:46 Hotkeys Maybe next year I'll do gsoc
10:46 Hotkeys Once I've beefed up my github a little bit with Lingua modules
10:46 apiw joined #perl6
10:47 donaldh joined #perl6
10:48 zpmorgan joined #perl6
10:49 Hotkeys And also assuming there are perl 6 people mentoring gsoc next year
10:49 Skarsnik hm, how I skip test without making it complaining that I did not run all the test in the plan?
10:50 DrForr Hotkeys: I'm willing, has there been any response from Google?
10:50 Hotkeys Hm?
10:50 RabidGravy Skarsnik, "if $gonna-skip { skip-rest }
10:50 DrForr Re: GSOC.
10:51 Hotkeys I'm not doing it this year, possibly next year though
10:51 RabidGravy assuming you have a plan
10:51 DrForr Ah.
10:51 RabidGravy if not then just do "plan 9;  skip-test; exit"
10:51 Skarsnik skip-rest sound like it will skip everything after x)
10:51 RabidGravy well yes
10:51 Hotkeys Thanks though DrForr
10:52 RabidGravy well for a certain number there is "skip $why, $number = 1"
10:53 RabidGravy right, off out shopping
10:53 Skarsnik I have if something { tests... } else { skip these}, and skip-rest make it happend empty tests x)
10:54 Skarsnik *append
10:56 Skarsnik Oh I needed to put a second argument to skip x)
11:01 Hotkeys I should sleep soon
11:03 sno joined #perl6
11:06 Skarsnik damn githux does not show conflict when a pr can't be merged
11:06 hankache joined #perl6
11:13 DrForr perl6-App-prancer updated with a more useful README.
11:14 kaare_ joined #perl6
11:19 itaipu joined #perl6
11:20 Hotkeys I'm gonna sleep
11:20 Hotkeys Night all o/
11:26 rindolf joined #perl6
11:36 rudi_s What is the convention for doc.perl6.org for method signatures? Is the self object added as parameter or not? e.g. IO::Path's absolute method's signature is method absolute (IO::Path:D: $base = ~$*CWD --> IO::Path:D) but shouldn't it be method absolute (IO::Path:D:, IO::Path:D: $base = ~$*CWD --> IO::Path:D) when comparing it with other methods on the same page?
11:36 rudi_s (Btw. the return value is wrong, it's a Str - which I find a little confusing to be honest, but the spec also says it's a string. Any idea why it's not an IO::Path?)
11:39 moritz rudi_s: the convention for doc.perl6.org is to be as exact as possible
11:40 rudi_s moritz: Well, for methods it's not clear to me if the this-object is necessary as it's already documented in the document itself. E.g. I'm looking at the page of IO::Path, so every method call uses it.
11:40 apiw joined #perl6
11:49 kid51 joined #perl6
11:50 moritz rudi_s: it's necessary, because without the :D you'd be allowed to call the method on the class, not on an instance
11:55 kjs_ joined #perl6
12:01 rudi_s moritz: I'm just asking because the spec (S32-setting-library) doesn't use it.
12:01 rudi_s *S32-setting-library/IO.pod
12:03 kjs_ joined #perl6
12:03 rudi_s (Btw. what is the recommended patch policy for doc.perl6.org - patches per mailing list, github pull requests, patches here?)
12:04 moritz rudi_s: per pull request
12:05 moritz rudi_s: the specs aren't very precise about their invocant signatures
12:05 moritz rudi_s: or you can push directly, if you tell me your github ID first :-)
12:10 lizmat http://de.perl6intro.com   # hankache++
12:10 lizmat and Sören Laird Sörries++
12:11 masak "But we’ll have to live with two Pythons for quite a while. If we manage to not kill each other over it, everyone’s gonna be fine." -- https://hynek.me/articles/python3-2016/
12:11 rupert160 joined #perl6
12:11 masak (hi, #perl6)
12:12 espadrine joined #perl6
12:12 TEttinger I'm sure plenty of bodybuilders have at least two pythons
12:14 wamba joined #perl6
12:22 sufrostico joined #perl6
12:35 timotimo TEttinger: they also carry around two guns everywhere they go
12:35 timotimo (heya #perl6)
12:38 ely-se joined #perl6
12:39 lizmat timotimo o/
12:39 lizmat masak o/
12:42 dalek rakudo/nom: 0270966 | lizmat++ | src/core/ (2 files):
12:42 dalek rakudo/nom: Streamline Buf some more
12:42 dalek rakudo/nom:
12:42 dalek rakudo/nom: - add int/Int candidates for push|append
12:42 dalek rakudo/nom: - improve error message for non-ints being pushed/appended
12:42 dalek rakudo/nom: - add unshift/prepend methods with same features
12:42 dalek rakudo/nom: - make sure the X::TypeCheck is known at the right time
12:42 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0270966184
12:43 lizmat $ 6 'Buf.new.push(1,2,3,4,"a")'
12:43 lizmat Type check failed in pushing element #4 to Buf; expected uint8 but got Str ("a")
12:43 lizmat ^^ example of improved error message
12:45 Skarsnik hm
12:45 Skarsnik m: Buf.new.push(2000);
12:45 camelia rakudo-moar 9983c2: ( no output )
12:45 Skarsnik should it warn that it's too big?
12:45 lizmat m: dd Buf.new.push(2000)
12:45 camelia rakudo-moar 9983c2: OUTPUT«Buf.new(208)␤»
12:46 lizmat no, natives can overflow without further noise (intentionally so, afaik)
12:49 Skarsnik maybe it should be a pragma to warn about them?
12:49 Skarsnik can probably help debug some code
12:52 lizmat if you have an overflow issues, you probably shouldn't be using natiives / Bufs
12:53 donaldh joined #perl6
12:54 Skarsnik m: my uint8 $m = 2000; say $m;
12:54 camelia rakudo-moar 027096: OUTPUT«208␤»
12:54 Skarsnik It get fixed recently the uint working? x)
12:54 Skarsnik m: my uint16 $m = 20000; say $m;
12:54 camelia rakudo-moar 027096: OUTPUT«20000␤»
12:55 Skarsnik m: my uint16 $m = 2 ** 16 + 40; say $m;
12:55 camelia rakudo-moar 027096: OUTPUT«40␤»
12:58 timotimo DrForr: your App::Prancer tests seem a bit ... strange :)
12:59 timotimo DrForr: i don't see where the Readline class comes from that it's testing
12:59 DrForr Fine, fine, I'll delete the tests.
12:59 sufrostico joined #perl6
12:59 timotimo :P
12:59 DrForr I think I've warned a few times that it's crude, that's part of what I meant :)
13:00 timotimo :D
13:00 timotimo i find it a bit strange to have it called App::Prancer
13:00 timotimo to me, the App:: namespace always seemed to be about applications that you can install and then immediately run
13:00 moritz that's the idea behind it, yes
13:00 moritz to distinguish it from libraries
13:01 DrForr I suppose I should separate the two bits as well, but that's more admin work.
13:02 DrForr Pushed test changes.
13:03 timotimo the "two bits"?
13:04 rudi_s moritz: Thanks. Do we want to add the :D to return values in p6doc or is just Bool enough?
13:04 rudi_s Oh and any idea why absolute() and similar IO::Path functions return a Str and not an IO::Path?
13:04 DrForr I just meant separate App::prancer and Prancer::Handler, but since they were developed it seemed easier to just have a single package so I don't have to have two windows open.
13:08 rudi_s What should I do if IO::Path implements a method but it's not in the spec?
13:08 timotimo what does App::Prancer do on its own?
13:09 Juerd Daaamn, I have the weirdest heisenbug :(
13:10 Juerd Add debug prints, and the bug goes away
13:10 rudi_s And in which order do we want to document the functions/methods?
13:10 timotimo Juerd: can you try MVM_SPESH_DISABLE=1 in your environment?
13:10 DrForr At the moment? Nothing, it's just a driver for the blog application. But that will change, the thing is I want turnkey ability so the user can just type 'bin/prancer run-blog <blog-name> <admin-user> <admin-pass> # and it'll build and launch. Which at the moment probably requires the ::Handler module to be loaded, but could in the future exec() the generated binary.
13:11 Skarsnik rudi_s, depend if it's an obscure thing or not. if not add to the doc and add an issue on roast?
13:11 Juerd timotimo: Doesn't fix
13:11 DrForr Thus it could be separated easily, but I don't want to do that until I've stabiliized the API.
13:11 Juerd Heck, even if I swap two 'say' statements, the bug goes away
13:11 rudi_s Skarsnik: roast?
13:12 Skarsnik roast is where the spect test are, if I am right x)
13:13 timotimo oh, a blog, eh?
13:13 timotimo if it's good, it'll replace wordpress for the weekly at least, maybe the advent calendar :P
13:13 rudi_s Skarsnik: Ah, thanks.
13:14 rudi_s What exactly is the official perl6 spec? The .pod files or the test cases?
13:14 jnthn The test suite.
13:14 rudi_s Thanks.
13:14 DrForr Or whatever app. I'm mangling a Dancer app into shape at work, so this way I've got a test case to work from.
13:18 timotimo OK
13:20 DrForr I'll get it straightened out before actual release, there's still quite a bit of legwork to do but it's just a SMOP at this point.
13:21 Juerd Worst bug golfing experience ever :)
13:22 Juerd Down to 21 lines
13:22 RabidGravy joined #perl6
13:22 timotimo Juerd: are you using anything "parallel"? .hyper, start, supplies, Proc::Async, ...?
13:22 Juerd Nope
13:23 Juerd http://pastebin.com/vCR8exZB
13:23 Juerd See what happens with the 3 8's
13:23 Juerd 888 turns into 8888, magically, with the first .comb
13:23 Juerd Change any of the 8's to something else, and it works fine
13:23 Juerd Add 'say $board.comb' in the loop, and it works fine
13:23 Juerd etc.
13:24 Juerd Turn $board ~= ~$cell into i.e. $board ~= $input.substr(++$, 1), which results in the exact same $board, and no bug.
13:25 Juerd Swap the two say $board.comb lines, and it works fine
13:25 timotimo hm. could potentially be something about our implementation of ropes?
13:25 timotimo could you try putting nqp::flattenropes($board) in there?
13:25 Juerd I'm out of time
13:25 Juerd Maybe later
13:25 timotimo i'll try it
13:25 jnthn Also not sure if we expose that as an nqp:: op
13:25 timotimo just gotta build rakudo first :)
13:26 El_Che upgrading a modules with "panda --force install Module_dir_name" stays on the old version untill .perl6 is deleted. Maybe expected, but I am pretty sure regular users will be bitten by that
13:26 timotimo jnthn: when we run the /.**{8}/ over it, it'd flatten, right?
13:26 timotimo so maybe changing the order of the two can make a difference, or running an "empty" regex over it?
13:26 jnthn timotimo: Yeah
13:27 apiw joined #perl6
13:27 jnthn lunch &
13:31 timotimo well, i'd say it's about ropes. putting a regex in front makes both comb versions output the same thing
13:32 masak the 8888 thing sounds like a bug I discovered a while back
13:33 masak https://rt.perl.org/Ticket/Display.html?id=123602
13:36 timotimo that's most likely also ropes
13:37 masak yes, that's the common factor. I'm not aware of a third rope-related bug.
13:38 Skarsnik m: https://gist.github.com/Skarsnik/531748d0f80543c4999e
13:38 camelia rakudo-moar 027096: OUTPUT«Before repeat␤after repeat␤Before repeat␤»
13:39 Skarsnik I am not sure how to golf more
13:39 Skarsnik but it's definitly a bug x)
13:39 espadrine joined #perl6
13:40 Skarsnik adding 0; after the repeat block make it work correctly
13:40 timotimo so it's a lazy list there, eh?
13:41 timotimo try "sink repeat ..." or something?
13:42 Skarsnik it look similar to the loop bug after x-mas
13:42 masak m: sub foo($c) { return if $c == 0; { say "B $c"; repeat { say "A $c"; foo($c -1) } while 0 } }; foo(3)
13:42 camelia rakudo-moar 027096: OUTPUT«B 3␤A 3␤B 2␤»
13:43 timotimo it really does look like a lazy evaluation thing goes on there
13:43 timotimo m: sub foo($c) { return if $c == 0; { say "B $c"; repeat { say "A $c"; foo($c -1) } while 0 } }; say foo(3).perl
13:43 camelia rakudo-moar 027096: OUTPUT«B 3␤A 3␤B 2␤A 2␤B 1␤A 1␤(((Nil,).Seq,).Seq,).Seq␤»
13:43 masak agree it's a bug.
13:44 timotimo should sink sink that recursively?
13:46 pmurias joined #perl6
13:51 timotimo i really don't feel up to the task of rope debugging today
13:51 cdg joined #perl6
13:52 Skarsnik Should I just rakudobug this?
13:52 timotimo well, why do we expect repeat/while to be eager?
13:54 masak Skarsnik: please.
13:54 masak timotimo: because it's a statement. and the rule of "last statement is lazy" was too confusing, so it was changed.
13:54 Amendil joined #perl6
13:54 timotimo OK
13:55 Skarsnik It's annoying when it's nested inside other stuff (in my case if was inside a given/when block)
13:55 timotimo OK
13:55 Skarsnik because it not that easy to see that it's the 'end' of the sub
13:57 timotimo right
13:59 masak fortunately, that rule doesn't apply anymore. it was changed to "statements are eager" with 251282d9f834b305afd095e11a9ddd17ad0f51a5 on 2013-10-07. longer ago than I remember.
13:59 timotimo wow
14:04 kjs_ joined #perl6
14:07 TreyHarris joined #perl6
14:08 hankache joined #perl6
14:09 RabidGravy I can only thing the IETF are trolling us https://tools.ietf.org/html/rfc7265 - this is the worst possible representation of iCalendar as JSON
14:09 apiw joined #perl6
14:09 RabidGravy I guess that's what happens when you get some software company who don't really care about interoperability to write the spec for you
14:10 dalek rakudo/nom: 64ab188 | lizmat++ | src/core/Rakudo/Internals.pm:
14:10 dalek rakudo/nom: Add EXPAND-LITERAL-RANGE to Rakudo::Internals
14:10 dalek rakudo/nom:
14:10 dalek rakudo/nom: Expands "a..e" to "abcde", "a..e..i" to "abcdefghi" and "a..ei..k"
14:10 dalek rakudo/nom: to "abcdeijk".  Based on internal sub in Str, but now without recursion
14:10 dalek rakudo/nom: and now also allows returning a list (with each char separately),
14:10 dalek rakudo/nom: rather than a string
14:10 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/64ab188d52
14:10 dalek rakudo/nom: e93a06c | lizmat++ | src/core/Str.pm:
14:10 dalek rakudo/nom: Use new Rakudo::Internals.EXPAND-LITERAL-RANGE
14:10 dalek rakudo/nom:
14:10 dalek rakudo/nom: Instead of local subs that needed optimizing
14:10 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e93a06c1d5
14:10 RabidGravy go! go! go!
14:13 timotimo .tell grondilu i just got the Image Noise example to run at 5.7 FPS instead of 1.9 FPS by using SDL_RenderPoints and a CArray of int32 instead of SDL_RenderPoint
14:13 yoleaux timotimo: I'll pass your message to grondilu.
14:14 raiph joined #perl6
14:15 timotimo .seen grondilu
14:15 yoleaux I saw grondilu 5 Feb 2016 21:52Z in #perl6: <grondilu> oops ignore that^
14:16 hankache yo!
14:16 Skarsnik Hi
14:19 dalek rakudo-star-daily: 133e5df | coke++ | log/ (9 files):
14:19 dalek rakudo-star-daily: today (automated commit)
14:19 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/133e5df3ae
14:24 skids joined #perl6
14:29 rindolf joined #perl6
14:32 TreyHarris joined #perl6
14:34 fireartist could someone explain what this means in the Mixins docs: "Thus @-sigiled containers will require binding to make the role stick." - what do I have to actually /do/?
14:36 lizmat hmmm... these last changes made Juerd's atbash example 2x faster yet again  :-)
14:37 RabidGravy fireartist, depends on what 'do' you want
14:38 timotimo fireartist: that means if you use =, you'll just get assignment, and all values from your custom array/list/thing get copied over into a freshly created Array
14:39 RabidGravy but "@a does Role" works fine
14:39 lizmat commute to Niederrhein.pm meeting&
14:40 fireartist RabidGravy: thanks - I somehow didn't realise it was only referring to @arrays - I was worried I would have to special-case any function that accepted a $scalar that might be mixin'd
14:40 fireartist RabidGravy: but your explanation makes a lot of sense :-)
14:40 RabidGravy no, no, there's plenty of "does" and "but" all over the place
14:41 xinming joined #perl6
14:41 RabidGravy m: role Foo { method bar() { self.pick(*) }};  my @a = <1 2 3>; @a does Foo; say @a.WHAT; @a.push: 4; say @a; say @a.bar
14:41 camelia rakudo-moar e93a06: OUTPUT«(Array+{Foo})␤[1 2 3 4]␤(4 2 1 3)␤»
14:42 RabidGravy still an array but with added Fooness
14:43 ash`_ joined #perl6
14:45 apiw joined #perl6
14:45 krakan joined #perl6
14:46 skids timotimo: wrt to last night's comments, this is not an entirely atypical experience for me: https://gist.github.com/skids/0029ab3fe15e354f1378
14:48 timotimo oh, heh
14:48 timotimo yeah, i guess i see what's going through your mind when that kind of thing happens
14:49 nine skids: did we mention that rakudo's internals are quite hackable?
14:50 xinming joined #perl6
14:50 ash` w clkao
14:51 ash` left #perl6
14:51 skids nine: :-)
14:52 apiw joined #perl6
14:54 timotimo having some trouble binding this function: https://wiki.libsdl.org/SDL_LockTexture
14:55 kjs_ joined #perl6
14:59 xinming joined #perl6
15:00 timotimo if someone would like to help, have a look at my repo: https://github.com/timo/SDL2_raw-p6/blob/master/examples/white_noise.p6#L23  and  https://github.com/timo/SDL2_raw-p6/blob/master/lib/SDL2/Raw.pm#L184
15:02 iH2O joined #perl6
15:10 pierrot joined #perl6
15:13 prammer joined #perl6
15:38 apiw joined #perl6
15:38 AlexDaniel joined #perl6
15:38 AlexDaniel .
15:39 cdg joined #perl6
15:39 masak
15:40 masak 'night, #perl6
15:41 molaf joined #perl6
15:42 Juerd In a regex or grammar, can you capture something that wasn't in the original string?
15:45 iH2O left #perl6
15:47 nine Juerd: sounds like a job for an actions object?
15:47 Juerd I considered that, but that's a lot of code for one tiny thing :)
15:47 Juerd It's for a code example at https://www.reddit.com/r/dailyprogrammer/comments/468pvf/20160217_challenge_254_intermediate_finding_legal/
15:48 jnthn You can { make 42 } within a closure in the regex, and pull it out with .made later
15:48 Juerd If I can make 'cell-tested' capture a '*' instead of the '-' that it actually matched, I could get rid of the inner loop of the main code.
15:48 jnthn Don't need to go all the way to having an actions class
15:48 Juerd jnthn: Ooh, now that's what I hoped to hear :)
15:50 buharin joined #perl6
15:50 sufrostico joined #perl6
15:57 alpha123 joined #perl6
16:06 sjn_ joined #perl6
16:06 Juerd https://www.reddit.com/r/dailyprogrammer/comments/468pvf/20160217_challenge_254_intermediate_finding_legal/d0462hz
16:06 Juerd Thanks, jnthn :)
16:08 prammer joined #perl6
16:10 adu joined #perl6
16:11 b2gills AlexDaniel: I can't think of a really nice way to write it either, sorry.
16:11 yoleaux 07:25Z <AlexDaniel> b2gills: oh, maybe you'll find something clever. Given a two-dimensional array, I can iterate over its rows with 「for @a], over its columns with 「for (@a[*;$_] for ^@a)」. But what would be the easiest way to iterate over its diagonals?
16:11 yoleaux 07:26Z <AlexDaniel> b2gills: I cannot manage to find a solution that wouldn't make me want to kill myself after an hour
16:11 AlexDaniel :(
16:14 kjs_ joined #perl6
16:14 apiw joined #perl6
16:15 Skarsnik timotimo, I am not to understand the function, it give you the pixels or give it to it? x)
16:15 khw joined #perl6
16:26 TreyHarris How do I assign a list of string => string pairs into a hash? And how can I create a new kv in a hash, given a string => string pair?
16:26 Skarsnik that look like a weird stuff
16:27 Skarsnik my Pair %hash{List}; my %hash{(1, 2, 3)} = a => 1; ?
16:27 jnthn TreyHarris: For the first, just assignment should do it
16:28 jnthn m: my @a = 'a' => 'b', 'c' => 'd'; my %h = @a; say %h<c>
16:28 camelia rakudo-moar e93a06: OUTPUT«d␤»
16:28 jnthn And for the second, .push
16:28 jnthn m: my @a = 'a' => 'b', 'c' => 'd'; my %h = @a; my $p = 'e' => 'f'; %h.push($p); say %h.perl
16:28 camelia rakudo-moar e93a06: OUTPUT«{:a("b"), :c("d"), :e("f")}␤»
16:30 apiw joined #perl6
16:30 TreyHarris jnthn: that's crazy, I swear I tried both those things. I've got a WIP commit trail though, lemme see why it didn't work
16:30 TreyHarris jnthn: thanks though
16:31 TreyHarris I had a grammar action that was taking "a=b" lines and turning them into pairs; first I tried to accumulate them and assign them to a hash, then I tried to create the has first and push them one at a time in the action
16:31 TreyHarris I'll check out the WIP and see what was going on, it was prolly something doubledumb.
16:32 Juerd https://www.reddit.com/r/dailyprogrammer/comments/468pvf/20160217_challenge_254_intermediate_finding_legal/d0462hz  # now with explanation
16:34 zakharyas joined #perl6
16:47 dfcarpenterak joined #perl6
16:50 sjn Is there a way to cleverly/automa[tg]ically cast one type into another?
16:51 sjn eg. my URI $homepage = "http://some.host/mypage"; # Str -> URI
16:51 * sjn imagines adding an URI method to the Str class
16:51 sjn not sure if that's a nice thing to do, though
16:52 apiw joined #perl6
16:52 ilmari my URI $homepage .= new("http://some.host/mypage");
16:53 rudi_s How can I redirect stdin to /dev/null when using run?
16:55 sjn ilmari: yeah, that's what the URI docs say
16:55 Skarsnik the URI module could extend Str for that probably
16:55 sjn Skarsnik: yep, that's what I'm thinking :)
16:55 sjn I'm just asking if it's a nice thing to do. :D'
16:56 ugexe m: sub foo(Str(Cool) $path) { say $path.^name; }; foo(IO::Path.new("/home")); # dont think you can coerce with custom types yet though
16:56 camelia rakudo-moar e93a06: OUTPUT«IO::Path is disallowed in restricted setting␤  in sub restricted at src/RESTRICTED.setting line 1␤  in method new at src/RESTRICTED.setting line 32␤  in block <unit> at /tmp/3_vg50NtxV line 1␤␤»
16:56 ugexe m: sub foo(Str(Cool) $path) { say $path.^name; }; foo("/home".IO); # dont think you can coerce with custom types yet though
16:56 camelia rakudo-moar e93a06: OUTPUT«Str␤»
16:57 sjn hm
16:58 * sjn is ETOOCLEVERFORMYOWNGOOD
17:01 timotimo Skarsnik: it gives me a pointer to a memory region it manages and i change it
17:05 prammer joined #perl6
17:05 sjn rudi_s: Does http://doc.perl6.org/type/Proc#method_new help with your problem?
17:06 b2gills rudi_s: add a 「:!in」 If you aren't going to send any data, and 「:!out」 / 「:!err」 to ignore any data from it
17:07 * sjn is a little overwhelmed by the Proc class atm.
17:07 ugexe you dont normally invoke a process with Proc.new
17:09 sjn ugexe: docs make it look like run() is an alias for new()
17:10 raiph joined #perl6
17:10 sjn or at least replacable
17:10 ugexe run/shell/qx use Proc.new followed by $proc.spawn
17:11 ugexe https://github.com/rakudo/rakudo/blob/nom/src/core/Proc.pm#L137-L138
17:11 sjn right
17:16 dfcarpenterak joined #perl6
17:17 prammer joined #perl6
17:20 ely-se joined #perl6
17:21 ugexe perl6 -e 'my $proc = run "perl6", "-e", "1", :out; say ?$proc' # why does the output order of this change if you remove :out?
17:22 ugexe with :out its "True\nWARNING: blah blah". without :out its "WARNING: blah blah\nTrue"
17:22 ugexe the warning comes on stderr
17:24 rudi_s sjn: b2gills: Ah, nice. Didn't know I could use :!in.
17:25 Zero_Dogg joined #perl6
17:25 Zero_Dogg joined #perl6
17:27 ugexe also, why does `my $proc = run "perl6", "-e", "die", :out, :err; $proc.err.close; say ?$proc` work, but not (adding $proc.out.close): `my $proc = run "perl6", "-e", "die", :out, :err; $proc.out.close; $proc.err.close; say ?$proc`
17:28 sufrostico joined #perl6
17:30 ugexe closing .out before .err in these cases affects the exitcode
17:31 ugexe ah, to add: `|$proc.out.close;` also makes it work
17:32 ugexe (it can be before .err then)
17:32 pierrot joined #perl6
17:32 rudi_s Hm. I'm getting deadlocks when I try to capture stdout and stderr.
17:32 rudi_s s/deadlocks/weird hangs/
17:33 ugexe whats your proc code
17:33 rudi_s Wait, have to check if I'm stupid or not.
17:34 ugexe perl6 -e 'my $proc = run("perl6", "-e", "say 100; die(q|failure|)"); say $_ for $proc.out.lines; say $_ for $proc.err.lines; $proc.out.close; $proc.err.close; say $proc' # this shows stdout and stderr
17:35 ugexe oops, add :out and :err to run heh
17:36 AlexDaniel m: say 25.min(3)
17:36 camelia rakudo-moar e93a06: OUTPUT«Cannot call min(Int: Int); none of these signatures match:␤    ($: *%_)␤    ($: &by, *%_)␤  in block <unit> at /tmp/Un2jewJglN line 1␤␤»
17:37 Peter_R m: say 'my beard'.comb
17:37 camelia rakudo-moar e93a06: OUTPUT«(m y   b e a r d)␤»
17:38 beginner joined #perl6
17:39 rudi_s I'm spawning SSH and it seems to be related to ControlMaster. But I've no idea why it behaves differently when running in Perl6.
17:39 ugexe i wish the RT link on rakudo.org linked directly to perl6 queue
17:39 ugexe rudi_s: is your code short enough to gist?
17:43 AlexDaniel m: my @a = [<a b c>, <d e f>];  say @a[^1 Z; ^1]
17:43 camelia rakudo-moar e93a06: OUTPUT«5===SORRY!5=== Error while compiling /tmp/1AGGQTo3Za␤Missing required term after infix␤at /tmp/1AGGQTo3Za:1␤------> 3my @a = [<a b c>, <d e f>];  say @a[^1 Z7⏏5; ^1]␤    expecting any of:␤        prefix␤        term␤»
17:43 AlexDaniel m: my @a = [<a b c>, <d e f>];  say @a[^1 Z[;] ^1]
17:43 camelia rakudo-moar e93a06: OUTPUT«Non-QAST node visited BOOTInt␤Weird node visited: BOOTInt␤Weird node in analyze: BOOTInt␤===SORRY!===␤Unknown QAST node type BOOTInt␤»
17:43 timotimo so, maybe SDL_LockTexture doesn't work because "Invalid texture"
17:43 AlexDaniel m: my @a = [<a b c>, <d e f>];  say @a[^1 »;« ^1]
17:43 camelia rakudo-moar e93a06: OUTPUT«5===SORRY!5=== Error while compiling /tmp/r54kRqZXvw␤Bogus postfix␤at /tmp/r54kRqZXvw:1␤------> 3my @a = [<a b c>, <d e f>];  say @a[^1 »7⏏5;« ^1]␤    expecting any of:␤        infix␤        infix stopper␤»
17:43 AlexDaniel how can I make that work?
17:43 timotimo wow, yeah, initializing the renderer after building the texture for it. great idea.
17:44 AlexDaniel m: my @a = [<a b c>, <d e f>];  say @a[.[0];.[1]] for ^1 Z ^1
17:44 camelia rakudo-moar e93a06: OUTPUT«a␤»
17:45 AlexDaniel ↑ that's one way to do it, but I'm hoping to find a way to do it without 「for」
17:46 prammer joined #perl6
17:47 jnthn AlexDaniel: You'd need || to be implemented to do that, I think, but it ain't
17:47 rudi_s ugexe: https://pbot.rmdir.de/1lbxjrKt1wWunRGqhDLs2A
17:47 AlexDaniel jnthn: || ?
17:47 jnthn So need for (or map) for now
17:47 jnthn AlexDaniel: Variant of | that lets you spice in a multi-dim index
17:47 rudi_s Sometimes it doesn't hang, but sometimes it hangs for 30 seconds (this should be the ControlPersist timeout).
17:47 rudi_s But outside of perl6 it always returns immediately.
17:47 AlexDaniel jnthn: oooh, okay.
17:48 jnthn At least, if I understand what you're trying to do, but I'm currently juggling code in 3 other languages so only half paying attention :P
17:48 AlexDaniel jnthn: but if I can do Z, why can't I do Z; ?
17:48 jnthn ; isn't an operator
17:48 AlexDaniel but , is?
17:48 jnthn Yes
17:48 AlexDaniel fine.
17:49 rudi_s ugexe: Oh, and it seems like sometimes it hangs forever.
17:49 jnthn 1,2,3 is parsed as the infix:<,> operator, whereas things separated by semis are only accepted in various places in the grammar and parsed by a special <semilist> rule
17:49 AlexDaniel m: my @a = [<a b c>, <d e f>];  say @a[0,1;0,1] # hmm
17:49 camelia rakudo-moar e93a06: OUTPUT«(a b d e)␤»
17:50 AlexDaniel jnthn: ok! Thanks
17:50 rudi_s But most of the time it hangs just 30 seconds.
17:50 maybekoo5 joined #perl6
17:51 timotimo ah, SDL_GetError always returns "invalid renderer" after setting up a renderer, but it's only a valid error string if the renderer returned was actually NULL
17:54 dalek ecosystem: fa89df7 | RabidGravy++ | META.list:
17:54 dalek ecosystem: Alter the META of META6
17:54 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/fa89df7d6b
17:56 rudi_s ugexe: Hm. Now I can reproduce it outside of perl6 as well. I'll have to debug this, please ignore it for now.
17:57 ugexe perl6 -e 'my $proc = run("ls", :err); my $err = $proc.err.lines; $proc.err.close; say $err'
17:57 ugexe bin  lib  logotype  META6.json  README.pod  resources  t  test.pl
17:57 ugexe readline requires an object with REPR MVMOSHandle in block <unit> at -e line 1
17:58 DrForr Aroo?
17:58 ugexe $err.^name is Seq at the end
17:59 firstdayonthejob joined #perl6
18:00 Vitrifur joined #perl6
18:03 ugexe this is the line that causes the readline error: https://github.com/rakudo/rakudo/blob/5648fea880bf3a3def5dba43c2f836d7ccc96fb2/src/core/IO/Handle.pm#L132
18:03 rindolf joined #perl6
18:04 timotimo i'm getting somewhere! with terrible hack-around-this-crap-code
18:04 timotimo (i now corrupt some data)
18:04 rudi_s ugexe: Hm. Just checked again. Definately perl6 related.
18:06 rudi_s But ssh -vvv has alsmost the same output (inside perl6 ssh talks about two more file descriptors its setting to Nonblock, but I have no idea if that's related).
18:08 rudi_s So I've no idea how to debug this.
18:09 SCHAAP137 joined #perl6
18:11 prammer joined #perl6
18:12 ugexe rudi_s: first try doing it without capturing stdout and stderr. then capture :err, then just capture :out. this might give insight if its related to :out/:err being buggy
18:13 _dolmen_ joined #perl6
18:14 ugexe theres lots of weird things that go on with procs. i have some that will fail unless the output is captured. othertimes its because i captured one before the other. i cant explain why, i usually just perservere with slight changes till it works :(
18:14 rudi_s :-(
18:14 rudi_s It seems to be stderr. Unless I capture stderr everything works.
18:15 timotimo i can't get better than 6fps for the "white noise" code right now
18:15 rudi_s Any idea how to debug that. Having such issues in Perl6 really sucks as spawning processes is essential for me.
18:15 ugexe rudi_s: one hack may be to just use `shell` so you can use redirection
18:16 rudi_s Not possible in my case, I need it without shell redirection.
18:17 rudi_s s/redirection/interpolation/
18:17 rudi_s Interesting it seems only to happen when ssh spawns a child (the ControlMaster background process).
18:18 rindolf joined #perl6
18:18 rudi_s Btw. capturing stderr only (and not stdout) doesn't help.
18:19 rudi_s Only if I capture stdout and stderr it breaks - which is really bad because I need both.
18:19 ugexe is it the capture or close that does it?
18:20 ugexe https://github.com/ugexe/zef/blob/master/lib/Zef/Client.pm6#L527 # this is a hack i use to fix a similar situation
18:20 timotimo oh, neat.
18:20 daxim I need to know how to look up the [\~] operator (from <https://perl6advent.wordpress.com/2009/12/23/day-23-lazy-fruits-from-the-gather-of-eden/>).  I know the whole thing is composed, and the tilde part is string concat
18:20 timotimo i could actually get white_noise's inner loop jitted and now i'm sitting at almost 7fps
18:21 rudi_s ugexe: It seems to be the slurp-rest of stderr.
18:22 rudi_s So this fix doesn't help :-/
18:24 ugexe hmmm, .slurp-rest does not get the readline error i mention above like .lines
18:24 rudi_s I teste .slurp-rest and .lines in my case and both cause the same error.
18:25 ugexe without :err at all does it print an actual error to terminal?
18:25 TreyHarris ugexe: I just tried that github snippet and I can't get anything out of $proc.err regardless
18:26 rudi_s ugexe: No.
18:26 rudi_s There's no output on stderr.
18:26 TreyHarris ugexe: sorry, I meant when I force an error, like:
18:26 TreyHarris perl6 -e 'my $proc = run("ls nosuch", :out, :err); my @out = $proc.out.lines; my @err = $proc.err.lines; say @out; say @err'
18:26 TreyHarris []y
18:27 TreyHarris []
18:27 TreyHarris (no 'y' supposed to be there, chat client artifact I guess)
18:28 ugexe fwiw it should be run("ls","nosuch"
18:28 * TreyHarris smacks head
18:28 TreyHarris d'oh. sorry.
18:29 TreyHarris perl6 -e 'my $proc = run("ls", "nosuch", :out, :err); my @out = $proc.out.lines; my @err = $proc.err.lines; say @out; say @err'
18:29 TreyHarris []
18:29 rudi_s ugexe: Oh btw., when I use :!in, :out, :merge, perl6 segfaults.
18:29 TreyHarris [ls: nosuch: No such file or directory]
18:29 ugexe :merge doesnt work
18:29 rudi_s strace says, epoll, EBADF
18:29 rudi_s Oh .. nice.
18:29 AlexDaniel earlier I was asking how to go through two-dimensional array diagonally. Nevermind, I figured it out! It is very easy!
18:29 AlexDaniel all you have to do is: ((@map[       .[0];.[1]] for $_ Z .reverse) for |(0 X.. ^@map), |((0 X.. ([R,] 0..^(@map-1))) Z+ 1..^@map ) )
18:30 timotimo daxim: did you find out about the [\~] yet?
18:30 daxim no
18:30 timotimo it's just a triangle reduce
18:30 daxim my question was how to look it up
18:31 timotimo no clue, honestly
18:31 timotimo look for "reduce" in the docs and find out that its two forms are [op] and [\op]?
18:31 AlexDaniel yeah, it is documented somewhere
18:32 timotimo i wonder if unicode has a left-leaning triangle that we can use instead of the [\ portion :P
18:32 ugexe rudi_s: if you simply dont close $p.err and $p.out, does it work?
18:32 AlexDaniel .u ◺
18:32 yoleaux U+25FA LOWER LEFT TRIANGLE [Sm] (◺)
18:32 AlexDaniel timotimo: like that?
18:33 timotimo yeah
18:33 zakharyas joined #perl6
18:33 AlexDaniel timotimo: though the result is more like ◿
18:33 daxim it's neither on http://doc.perl6.org/routine/reduce nor on http://doc.perl6.org/routine/%5B%20%5D
18:33 ugexe not closing .out and .err can affect exitcodes, so its not really a solution
18:35 timotimo have you tried .eager on the .lines?
18:35 ugexe seems like *maybe* closing .out and .err *after* your say "STDOUT {$out}" bit may also work
18:36 ugexe i have (well, |$proc.out.lines)
18:36 AlexDaniel timotimo: perhaps ◹ is more appropriate?
18:36 ugexe oh there we go
18:37 ugexe rudi_s: try this: |$p.err.close; |$p.out.close;
18:38 AlexDaniel daxim: http://design.perl6.org/S03.html
18:38 AlexDaniel daxim: search for “to lazily generate all intermediate results along with the final result, you can backslash the operator:”
18:38 AlexDaniel daxim: please create an issue here: https://github.com/perl6/doc/issues/new
18:38 skids m: my $len = 8; my @ax1 = |([\,] 0..^$len), |((0..^$len).tail($len - $_) for 0..^$len); my @ax2 = 7 «-« @ax1; @ax1.say; @ax2.say; # As far along as I had gotten, indexes for the ther diagonals.
18:38 camelia rakudo-moar e93a06: OUTPUT«[(0) (0 1) (0 1 2) (0 1 2 3) (0 1 2 3 4) (0 1 2 3 4 5) (0 1 2 3 4 5 6) (0 1 2 3 4 5 6 7) (0 1 2 3 4 5 6 7) (1 2 3 4 5 6 7) (2 3 4 5 6 7) (3 4 5 6 7) (4 5 6 7) (5 6 7) (6 7) (7)]␤[(7) (7 6) (7 6 5) (7 6 5 4) (7 6 5 4 3) (7 6 5 4 3 2) (7 6 5 4 3 2 1) (7 6 …»
18:39 AlexDaniel skids: yeah, I've also noticed that using [\*] is going to help
18:40 AlexDaniel skids: instead of «-« you can probably use just X-
18:40 skids I don;t think that keeps structure?
18:40 rudi_s ugexe: Doesn't help here .. it hangs when trying to slurp stderr, not on the close.
18:40 skids m: my $len = 8; my @ax1 = |([\,] 0..^$len), |((0..^$len).tail($len - $_) for 0..^$len); my @ax2 = 7 X- @ax1; @ax1.say; @ax2.say; # As far along as I had gotten, indexes for the ther diagonals.
18:40 camelia rakudo-moar e93a06: OUTPUT«[(0) (0 1) (0 1 2) (0 1 2 3) (0 1 2 3 4) (0 1 2 3 4 5) (0 1 2 3 4 5 6) (0 1 2 3 4 5 6 7) (0 1 2 3 4 5 6 7) (1 2 3 4 5 6 7) (2 3 4 5 6 7) (3 4 5 6 7) (4 5 6 7) (5 6 7) (6 7) (7)]␤[6 5 4 3 2 1 0 -1 -1 0 1 2 3 4 5 6]␤»
18:40 AlexDaniel hmmmh
18:41 skids The hyper's deepmap semantic is in use there.
18:42 telex joined #perl6
18:42 daxim AlexDaniel, done: issue 402
18:44 skids m: my $len = 8; my @ax1 = |([\,] 0..^$len), |((0..^$len).tail($len - $_) for 0..^$len); my @ax2 = 7 X- @ax1; say @ax1 »+« @ax2 »*» 8;
18:44 camelia rakudo-moar e93a06: OUTPUT«Lists on either side of non-dwimmy hyperop of infix:<+> are not of the same length while recursing␤left: 2 elements, right: 1 elements␤  in block <unit> at /tmp/6sSnmBJfDE line 1␤␤»
18:44 AlexDaniel daxim: thank you very much
18:45 skids oh.
18:45 skids m: my $len = 8; my @ax1 = |([\,] 0..^$len), |((0..^$len).tail($len - $_) for 0..^$len); my @ax2 = 7 «-« @ax1; say @ax1 »+« @ax2 »*» 8;
18:45 camelia rakudo-moar e93a06: OUTPUT«This Seq has already been iterated, and its values consumed␤(you might solve this by adding .cache on usages of the Seq, or␤by assigning the Seq into an array)␤  in block <unit> at /tmp/NiIokyYtfD line 1␤␤»
18:45 rudi_s Btw. how can I capture the exit code. Now when I do out.close my program dies with an exception. try { $p.out.close; } doesn't seem to help.
18:45 skids Ah nm
18:48 AlexDaniel skids: it looks like there's something wrong
18:49 AlexDaniel skids: these lists end with [(6 7), (7)] and [(1 0), (0)]
18:49 AlexDaniel skids: unless I'm reading that incorrectly 7;0 is there twice
18:50 skids The first lol is the x axes the other lol is the y
18:51 _mg_ joined #perl6
18:51 AlexDaniel skids: (6;1, 7;0), (7;0) – right?
18:53 AlexDaniel skids: also, can't we just @ax2 = @ax1.reverse ?
18:54 AlexDaniel maybe not :}
18:56 skids It's the second list that's wrong the elements are reversed.
18:57 skids We could probably @ax2 = (@ax1».reverse).reverse
18:57 rudi_s Btw. how can I capture the exit code. Now when I do out.close my program dies with an exception. try { $p.out.close; } doesn't seem to help.
18:58 ugexe rudi_s: probably something like `try { CATCH { when X::Proc::Unsuccessful { say "exitcode: {$_.proc.exitcode}"; }; my $proc = run("xxx"); };`
18:59 ugexe but with what we've been seeing today... who knows
18:59 rudi_s ugexe: It dies on the close.
18:59 rudi_s Should't try { $p.out.close } catch all exceptoins?
19:01 ugexe it has something to do with when the proc gets sunk or something
19:01 skids AlexDaniel: actually, Just @ax1.reverse does work all things factored.
19:01 skids m: my $len = 8; my @ax1 = |([\,] 0..^$len), |((0..^$len).tail($len - $_) for 0..^$len); my @ax2 = @ax1.reverse; @ax1.say; @ax2.say
19:01 camelia rakudo-moar e93a06: OUTPUT«[(0) (0 1) (0 1 2) (0 1 2 3) (0 1 2 3 4) (0 1 2 3 4 5) (0 1 2 3 4 5 6) (0 1 2 3 4 5 6 7) (0 1 2 3 4 5 6 7) (1 2 3 4 5 6 7) (2 3 4 5 6 7) (3 4 5 6 7) (4 5 6 7) (5 6 7) (6 7) (7)]␤[(7) (6 7) (5 6 7) (4 5 6 7) (3 4 5 6 7) (2 3 4 5 6 7) (1 2 3 4 5 6 7) (0 1 …»
19:02 rudi_s ugexe: Yeah. But the question is, why does try { .. } not catch _all_ exceptions. Did I misread the docs?
19:02 AlexDaniel skids: have you figured out a way to zip that thing into x;y pairs?
19:02 skids Like I said, that is as far as I got :-)
19:03 skids Was kinda hoping »Z« would be a thing
19:04 ugexe rudi_s: im not saying you are wrong (i tried the same thing before). more that i think something related to where the proc actually gets sunk affects where the code gets executed
19:04 ugexe if you try to use the $proc outside the try it will re-raise the exception i believe
19:04 skids (Hyperops are really frustrating to work with with all these consumed Seqs)
19:05 AlexDaniel skids: meh. Almost: .say for (@ax1 Z @ax2).map({.[0] »,« .[1] })
19:05 timotimo skids: »Z,« is potentially a thing
19:05 AlexDaniel skids: which Seq is already iterated in this case? I have no idea…
19:06 skids Yeah, basically.
19:06 skids \o/
19:06 skids or the shrug version of that
19:07 AlexDaniel just 「.list」-ing a Seq should probably work
19:08 AlexDaniel but I'm always surprised to see a seq when I didn't mean it explicitly :)
19:08 skids Tried already.
19:11 addison_ joined #perl6
19:19 RabidGravy rudi_s, I thought that someone had RTd that already (close on the out of a failed proc dies in an uncatchable way), if you could RT it would be good
19:24 skids m: 'my $len = 8; my @ax1 = |(([\,] 0..^$len).cache), |((0..^$len).tail($len - $_).cache for 0..^$len); my @ax2 = @ax1.reverse; say @ax1.perl; say @ax2.perl; say (@ax1 »,« @ax2).perl.say
19:24 camelia rakudo-moar e93a06: OUTPUT«5===SORRY!5=== Error while compiling /tmp/oPHFzFqIiH␤Unable to parse expression in single quotes; couldn't find final "'" ␤at /tmp/oPHFzFqIiH:1␤------> 3 @ax2.perl; say (@ax1 »,« @ax2).perl.say7⏏5<EOL>␤    expecting any of:␤        si…»
19:24 skids m: my $len = 8; my @ax1 = |(([\,] 0..^$len).cache), |((0..^$len).tail($len - $_).cache for 0..^$len); my @ax2 = @ax1.reverse; say @ax1.perl; say @ax2.perl; say (@ax1 »,« @ax2).perl.say
19:24 camelia rakudo-moar e93a06: OUTPUT«[(0,), (0, 1), (0, 1, 2), (0, 1, 2, 3), (0, 1, 2, 3, 4), (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5, 6), (0, 1, 2, 3, 4, 5, 6, 7), (0, 1, 2, 3, 4, 5, 6, 7), (1, 2, 3, 4, 5, 6, 7), (2, 3, 4, 5, 6, 7), (3, 4, 5, 6, 7), (4, 5, 6, 7), (5, 6, 7), (6, 7), (7,)]␤[(7…»
19:25 skids m: my $len = 8; my @ax1 = |(([\,] 0..^$len).cache), |((0..^$len).tail($len - $_).cache for 0..^$len); my @ax2 = @ax1.reverse; say (@ax1 »,« @ax2).perl.say
19:25 camelia rakudo-moar e93a06: OUTPUT«[((0, 7),), ((0, 6), (1, 7)), ((0, 5), (1, 6), (2, 7)), ((0, 4), (1, 5), (2, 6), (3, 7)), ((0, 3), (1, 4), (2, 5), (3, 6), (4, 7)), ((0, 2), (1, 3), (2, 4), (3, 5), (4, 6), (5, 7)), ((0, 1), (1, 2), (2, 3), (3, 4), (4, 5), (5, 6), (6, 7)), ((0, 0), (1, 1),…»
19:25 skids Silly me no need for Z.
19:26 sortiz \o #perl6
19:26 yoleaux 03:23Z <llfourn> sortiz: ++ that is an interesting solution to the immediate problem. It should work. I think that IO::Socket::SSL inserting itself into SETTING::IO::Socket might be dangerous for setting versioning reasons. I think that not being able to introspect a CompUnit to see what's in it is another problem.
19:31 sjn joined #perl6
19:33 perlpilot joined #perl6
19:35 sortiz ping llfourn
19:36 rudi_s ugexe: Hm. still confused. Because try { $p.out.close; CATCH { ... } } works, but just try { $p.out.close } doesn't.
19:36 rudi_s RabidGravy: RT?
19:37 RabidGravy https://rt.perl.org/
19:38 sortiz RabidGravy, What do you think about my idea of include CORE:: in the search done in INDIRECT_NAME_LOOKUP?
19:39 rudi_s RabidGravy: So just to be sure. It's unexpected that try { $p.out.close } doesn't work? I'm still a Perl6 newbie, so I'm not sure.
19:39 rudi_s If it's unexpected, I should just send a mail to the address mentioned on rakudo.org to report the bug?
19:40 RabidGravy yeah, I thought the bug had been reported already (it came up a month ago) but I just searched and apparently not
19:42 RabidGravy sortiz, would that impact "local shadowing" ?  e.g    class Foo { class Promise { } } ?
19:43 sortiz No, as far as Foo don't exists.
19:44 sortiz The problem with IO::Socket::SSL is that IO::Socket already exist in CORE::
19:48 Juerd It's interesting that in a forum like /r/dailyprogrammer, things get downvoted.
19:48 rudi_s RabidGravy: [x]
19:51 patrickz joined #perl6
19:53 FROGGS joined #perl6
19:54 FROGGS o/
19:54 yoleaux 01:48Z <timotimo> FROGGS: i set the cronjob to rsync over the html files of cpandatesters to only run every 15 minutes rather than every 5
19:54 FROGGS timotimo++
20:07 cognominal_ joined #perl6
20:07 perlpilot_ joined #perl6
20:09 El_Che_ joined #perl6
20:10 FROGGS_ joined #perl6
20:11 petercom1and joined #perl6
20:11 cfedde_ joined #perl6
20:11 sortiz .tell llfourn That the loader doesn't create unneeded package stubs looks good to me, so appending to those provided by settings can't be a problem, unless we want "reserved" namespaces.
20:11 yoleaux sortiz: I'll pass your message to llfourn.
20:12 nine joined #perl6
20:12 xnrand joined #perl6
20:12 adrusi_ joined #perl6
20:13 shmibs joined #perl6
20:13 xinming joined #perl6
20:13 pederindi joined #perl6
20:13 camelia joined #perl6
20:15 salva joined #perl6
20:17 fireartist joined #perl6
20:18 spider-mario joined #perl6
20:19 fireartist fantastic error message :-) I mis-typed "XXX::RPC" as "XXX:RPC", and got: Invalid type smiley 'RPC' used in type name
20:20 TimToady phantasmagoric, maybe
20:21 prammer joined #perl6
20:21 yqt joined #perl6
20:21 nine Public service announcement: we're gonna ban "\n" from distribution's and module's "ver", "auth" and "api" fields. Voice any objections now!
20:22 [Tux] joined #perl6
20:22 nine And we're doing this because: why the hell are you even asking??
20:24 musiKk joined #perl6
20:25 perlpilot_ nine: wait! ...
20:25 perlpilot_ nine: no, never mind   ;)
20:26 AlexDaniel skids: cool!
20:26 AlexDaniel skids: except that diagonal is listed twice
20:27 sortiz nine, module's "ver", "api", and overall "auth" seems a good idea, may be nightmarish one to implement well but banning?
20:27 AlexDaniel skids: I mean the biggest one: ((0 0) (1 1) (2 2) (3 3) (4 4) (5 5) (6 6) (7 7)) (twice!)
20:30 AlexDaniel skids: another question is how to get the same thing but in another direction
20:34 nine sortiz: those fields should be processable even by non-Perl6 code. And they need to be serialized on disk in a format thats fast to parse. One field per line seems like the perfect candidate
20:38 sortiz nine. Ah, Ok, I misunderstand what you write, forget my objection.
20:41 Ven joined #perl6
20:42 Relsak joined #perl6
20:42 sjn_ joined #perl6
20:43 Hotkeys Morning perl 6
20:43 Hotkeys Well technically afternoon but I got up like an hour and a half ago
20:43 Hotkeys So I'll count it
20:44 sjn_ good *
20:44 dfcarpenterak joined #perl6
20:46 Hotkeys What do I need to do to get my module to 100% Koalatee
20:46 Hotkeys I can't find any requirements listed anywhere
20:47 sufrostico joined #perl6
20:48 Hotkeys I'm only at 60%
20:49 Hotkeys (Lingua::EN::Stem::Porter)
20:49 Skarsnik having test and Readme
20:51 kent\n joined #perl6
20:51 hoelzro oh, awesome, a porter stemmer!
20:52 arnsholt I know, right?
20:53 jdv79 Hotkeys: the short list is right in the code
20:54 jdv79 https://github.com/perl6/modules.perl6.org/blob/master/lib/ModulesPerl6/Metrics/Koalatee.pm#L21-L44
20:56 * jnthn wonders if there's a stout stemmer and an ipa stemmer too...
20:58 hoelzro jnthn: I made that joke at work once, went right over everyone's heads =P
20:58 * sjn would guess at a Bitter stemmer
20:58 sjn our perhaps a sour one
20:59 jnthn eww, sour :P
21:01 Ven joined #perl6
21:02 Hotkeys jdv79: I think I have all of those things
21:02 Hotkeys https://github.com/johnspurr/Lingua-EN-Stem-Porter
21:05 Relsak joined #perl6
21:07 captain-adequate joined #perl6
21:08 Ven joined #perl6
21:08 firstdayonthejob joined #perl6
21:08 skids Hotkeys: I noticed one of my modules have the reqs but a lower Koalatee score as well.
21:08 Hotkeys Hmm
21:08 Hotkeys I know that it doesn't /really/ matter
21:08 Hotkeys but part of me really wants 100%
21:08 Hotkeys :p
21:12 Hotkeys should I start including a perl6 shebang at the top of my stuff
21:12 Hotkeys I see other people doing it
21:12 Hotkeys I don't really need it on windows but if it would be better for linux users I could
21:13 Hotkeys in the tests anyway
21:14 rudi_s Is "return;" the equivalent of "return undef" (or just return) in Perl5? I want to indicate failure by returning "nothing" and a string otherwise.
21:15 [Coke] bare return is equiv to "return Nil", so yah.
21:16 [Coke] m: sub a { return } ; say a.perl;
21:16 camelia rakudo-moar e93a06: OUTPUT«Nil␤»
21:16 [Coke] m: sub a { Nil } ; say a.perl; #or rely on last statement
21:16 camelia rakudo-moar e93a06: OUTPUT«Nil␤»
21:17 hoelzro hmm, that's interesting; I didn't realize it returned Nil
21:17 hoelzro m: my $value is default(5); $value = 7; sub nothing { return; }; $value = nothing(); say $value
21:17 camelia rakudo-moar e93a06: OUTPUT«5␤»
21:19 hoelzro that's a little weird to me
21:21 jnthn 5 is a little bit of a weird default value :-)
21:21 hoelzro I should've used 42 like the spec =P
21:21 jnthn But yeah, Nil assignment resets a Scalar to its original :)
21:21 jnthn uh
21:21 jnthn To it's default
21:21 cdg joined #perl6
21:22 hoelzro yeah, that makes sense with what I know about Nil
21:22 hoelzro I guess it's not really that weird
21:28 Hotkeys if I'm testing my algo against a wordlist in my test
21:28 Hotkeys should I produce 1 OK per match
21:28 Hotkeys or 1 OK for the list
21:28 Hotkeys in its entirety
21:29 rudi_s [Coke]: Thanks.
21:32 sufrostico joined #perl6
21:36 Ven joined #perl6
21:38 Coke__ joined #perl6
21:38 Juerd In a regex, is there something like any(map some-token, 1, 2, 3), as in: an easier way to write [ <foo(0)> | <foo(6)> | <foo(7)> | <foo(8)> ], by having a list of 0, 6, 7, 8?
21:38 rudi_s Lets say I have a variable which is either Nil or has a value. How can I run a function on it if its non Nil? Something like $x .= func with $x works, but I'd like to have it shorted if possible.
21:38 rudi_s (Basically I want fmap on Maybe from Haskell.)
21:40 jdv79 i had some funky/sour porters last weekend.  they were interesting.
21:41 Juerd If the specific method doesn't exist for Nil, you could do $x.?meth(), but you can't combine that with .=
21:41 dalek ecosystem: e0f3597 | RabidGravy++ | META.list:
21:41 dalek ecosystem: Add Audio::Playlist::JSPF
21:41 dalek ecosystem:
21:41 dalek ecosystem: See https://github.com/jonathanstowe/Audio-Playlist-JSPF
21:41 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/e0f3597e01
21:45 ugexe rudi_s: my $chars = $str_or_nil.?chars;
21:47 rudi_s Juerd: ugexe: Thanks. So there's no way to combinate that and mutate $x itself?
21:48 ugexe oh didnt see Juerd covered that
21:48 Hotkeys So I have a wordlist ~30000 long
21:48 Hotkeys and I feel like testing against all of them with an OK each would be very spammy
21:48 Hotkeys but it also feels like the right thing to do
21:49 skids Certainly failing on the entire chunk would leave no indocation of which test case failed.
21:49 Hotkeys since it seems every OK produces a message http://i.imgur.com/Oe1Qc1d.png
21:49 Hotkeys or does it not always produce a message
21:49 skids There is a Test:: function to print warnings though.
21:50 skids "diag"
21:51 RabidGravy yeah, I would do a subtest, keep all 30000 okays but wrap them as one top level test
21:51 skids You could do one test for the whole chunk, and a diag for the first few failed sections of the test.
21:51 RabidGravy though most users will run it in a harness anyway so will only see the number of tests and the result, not each line
21:51 Hotkeys ah
21:51 Hotkeys yeah it seems prove summarizes things
21:52 jnthn I'd just do them all top level and then I can be like "and yeah, my module has THIRTY THOUSAND tests, how about yours?" :)
21:52 Hotkeys lol jnthn
21:52 skids Subtests take up just as much screen if you are not using prove.
21:52 RabidGravy actually yeah so would I ;-)
21:52 jnthn But yeah, they're usually run under a harness :)
21:52 geraud joined #perl6
21:53 Hotkeys so I don't need to worry about filling someones terminal with 30000 lines of "ok n - blah"
21:53 Hotkeys ?
21:53 skids Well, personally I rarely use prove but everyone else seems to.
21:53 RabidGravy nah, they only see that if they're actually interested
21:53 Juerd Alternatively, is there a way after <foo>**{0,6,7,8}, to know how many times the preceding thing matched?
21:53 Hotkeys I actually asked that yesterday I think
21:54 Juerd I tried { +$<foo> } but that appears to include more than just the preceding part
21:54 Hotkeys if you capture the group you can just convert it to num
21:54 Hotkeys oh
21:54 Hotkeys wait it's a named capture doi
21:54 Hotkeys er
21:54 Hotkeys not a named capture, a named regex
21:54 Juerd A token, actually
21:55 RabidGravy is the XML module the state of the art in XML parsing at the current time or am I missing something super-spiffy
21:55 Hotkeys Juerd: http://irclog.perlgeek.de/perl6/2016-02-17#i_12060661
21:55 Hotkeys this conversation might help
21:55 RabidGravy it seems churlish to do JSPF and XSPF too
21:56 RabidGravy and not
21:56 Hotkeys okay
21:56 Hotkeys so now I can say
21:56 Hotkeys my module has 30000 tests come at me
21:56 Juerd Hotkeys: Thanks; I tried to just numify the $<foo> but that gives values that weren't in my list
21:57 Hotkeys well
21:57 Juerd Like 16, which is none of 0, 6, 7, 8.
21:57 Hotkeys 30428 to be precise
21:57 Hotkeys Juerd: ah strange
21:58 RabidGravy Hotkeys, well there will be no wiggle room for anyone gain-saying what you implemented at least ;-)
21:59 Hotkeys :p
21:59 Hotkeys I expect for this test to fail 41 times out of 30428 I think
21:59 Hotkeys lets see how it goes
21:59 Skarsnik RabidGravy, I tried saving a big tree I get from a web page and loading it with XML it did not work
21:59 perlpilot Juerd: does your list have 16 items?
22:00 Juerd perlpilot: No
22:00 Juerd I'm trying to simplify the Perl 6 example at https://www.reddit.com/r/dailyprogrammer/comments/468pvf/20160217_challenge_254_intermediate_finding_legal/
22:00 Juerd <after $player <cellws>**{0,6,7,8} [<opponent> <cellws>**{+$<cellws>}]+ '-'>
22:01 Juerd ^ I thought I could shorten the 4 <after> lines to just that single line
22:01 Juerd But that doesn't work.
22:01 Hotkeys or I can forget a semicolon in the test and fail all 30428
22:01 Hotkeys that works too
22:01 jnthn Juerd: Dunno if using a code assertion afterwards wouold cut it
22:01 * perlpilot wasn't aware that **{LIST}  worked
22:01 skids m: "ffffffffffff fffffff" ~~ m/$<foo>=[f]**{0,6,7,8}/.say
22:01 camelia rakudo-moar e93a06: OUTPUT«「ffff」␤ foo => 「ffff」␤»
22:01 jnthn perlpilot: Me either... :) I'm wondering what it actually does :)
22:01 skids 4, for four elements?
22:01 jnthn I think it's numifying the list :)
22:02 Juerd Oh damn :)
22:02 perlpilot yep, that's what I think too
22:02 jnthn m: say "fffff" ~~ /(f)* <?{ $0 == any(3,5) }>/
22:02 camelia rakudo-moar e93a06: OUTPUT«「fffff」␤ 0 => 「f」␤ 0 => 「f」␤ 0 => 「f」␤ 0 => 「f」␤ 0 => 「f」␤»
22:02 jnthn m: say "ffff" ~~ /(f)* <?{ $0 == any(3,5) }>/
22:02 camelia rakudo-moar e93a06: OUTPUT«「fff」␤ 0 => 「f」␤ 0 => 「f」␤ 0 => 「f」␤»
22:02 jnthn Maybe something like that
22:03 Juerd It needs to try specific numbers
22:03 jnthn Needs to *try*?
22:03 jnthn Not just match?
22:03 Juerd It needs to match any of the specific numbers of repetitions :)
22:04 Juerd But if it's not 0, 6, 7, or 8 times, that doesn't mean the entire match should fail
22:04 Ven joined #perl6
22:04 jnthn I thought that's what mine did? :)
22:04 Juerd With backtracking, perhaps :)
22:04 jnthn Yes :)
22:04 Juerd I don't want that in my grammar :)
22:04 jnthn OK
22:05 perlpilot you could probably make a parameterized regex and have is-valid call it too
22:05 Juerd "This type does not support positional operations"
22:05 Juerd Oh, that type.
22:06 jnthn Not sure how far knowing would help...those tend to come from the bowels. :)
22:06 Juerd I just added newlines to get a more specific location :)
22:06 Hotkeys do hashes have a maximum size?
22:06 Hotkeys > elems [@wordlist-input Z=> @wordlist-expected];
22:06 Hotkeys 30428
22:06 Hotkeys > elems hash [@wordlist-input Z=> @wordlist-expected];
22:06 Hotkeys 18981
22:07 Juerd Hotkeys: Yes, eventually you will run out of memory.
22:07 jnthn Hotkeys: Is @wordlist-input unique?
22:09 Hotkeys oh here's a fun story
22:09 jnthn If not, then you'll lose things 'cus the same key will replace an earlier entry
22:09 Hotkeys I mixed up my output and input files
22:09 Hotkeys when i renamed them
22:09 Hotkeys :)
22:09 jnthn ah :)
22:09 Hotkeys that would also explain why I failed all of my tests
22:10 rudi_s Can I change the object type in BUILD? I want to replace it with a proper subclass after running a few methods (so I can't do this in new where I can't call the methods yet) which help me detecting which subclass I need.
22:10 Hotkeys alright all is good
22:10 hoelzro rudi_s: I don't believe so; could you run the methods on the type object? that way you could use new()
22:11 hoelzro as a side note, having Type.new return something that isn't a Type is probably not a great idea =/
22:11 rudi_s hoelzro: No, the method needs instance variables. - Can I call bless and then immediately use that object?
22:11 Hotkeys performance wise, is it okay to have a 'my' declarator in a 30000-time looping for loop, or should I stick the declaration outside
22:11 perlpilot might be less of a surprise if it's called TypeFactory
22:11 perlpilot :)
22:12 hoelzro perlpilot: I think that's fair
22:12 rudi_s Yeah, but it would be really useful in my case.
22:12 hoelzro rudi_s: yes
22:12 Hotkeys oh no Factories, java is invading
22:14 Juerd Hm, does <after> not capture/
22:14 Juerd s/'/'/?/
22:14 Hotkeys woo http://i.imgur.com/DaXZIvY.png
22:14 wwwbukolaycom joined #perl6
22:14 Hotkeys I remembered the number I'd fail
22:15 rudi_s Hm. require Foo::Bar::($var); works, but Foo::Bar::($var).bless(...) doesn't. How can I call bless dynamically?
22:17 jnthn How does it fail to work? I'd expect that to...
22:17 jnthn m: class A::B { }; my $var = 'B'; A::($var).bless.WHAT.say
22:17 camelia rakudo-moar e93a06: OUTPUT«5===SORRY!5=== Error while compiling /tmp/QbPB4s2I_Z␤Combination of indirect name lookup and call not supported␤at /tmp/QbPB4s2I_Z:1␤------> 3class A::B { }; my $var = 'B'; A::($var)7⏏5.bless.WHAT.say␤    expecting any of:␤        argum…»
22:18 jnthn m: class A::B { }; my $var = 'B'; A::{$var}.bless.WHAT.say
22:18 camelia rakudo-moar e93a06: OUTPUT«(B)␤»
22:18 jnthn Ah, yeah
22:18 jnthn Like that :)
22:18 jnthn A:: just gets you the Stash of A, and then it's just a hash indexing into it
22:19 * jnthn is still a tad curious about the other form...
22:20 rudi_s jnthn: Awesome, thank you. - It was recommended by Perl6 to me when I tried to use require Foo::Bar::$var;
22:20 jnthn Hmm
22:20 jnthn I think we might be better suggesting the hash indexer form
22:21 rudi_s Both were suggested, I just chose the first one.
22:22 rudi_s "please use ::('$var'), ::{'$var'} or ::<$var>"
22:22 * perlpilot would have tried the first or last way and not thought of the middle way.
22:23 _dolmen_ joined #perl6
22:25 rudi_s {$var} in the require gives me the warning "block object coerced to string (please use .gist or .perl to do that).
22:25 rudi_s jnthn: ^
22:25 rudi_s So I chose ($var).
22:25 jnthn Ah, interesting.
22:27 TreyHarris joined #perl6
22:36 sno joined #perl6
22:42 cpage_ joined #perl6
22:49 Hotkeys Anyone who was excited about my porter module existing: I'm going to try snowball after I optimize this, but are there any other things I should look into to help flesh out Lingua::*?
22:51 Zero_Dogg joined #perl6
22:51 Zero_Dogg joined #perl6
22:59 hoelzro is Lingua:: for any sort of NLP?
23:08 Hotkeys hoelzro: I'm assuming it is
23:08 Hotkeys not sure though
23:08 hoelzro hmm...all of the NLP stuff I've done lately requires fast matrix stuff
23:09 hoelzro so we would need a numeric analysis library first for things like Lesk, LSA, LDA
23:09 hoelzro and it just so happens I have the *perfect* name for a numerical analysis module for Perl 6
23:11 Hotkeys not sure if I'd be up to doing a good numeric analysis library
23:11 Hotkeys I'll leave that to you :p
23:13 hoelzro well, in case someone else wants to do it the name is "PerfectNumber"
23:13 hoelzro because 6 is the first perfect number ;)
23:14 dalek rakudo-star-daily: d0d7a7e | coke++ | log/ (8 files):
23:14 dalek rakudo-star-daily: today (automated commit)
23:14 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/d0d7a7e001
23:15 jnthn sleep &
23:16 Hotkeys hoelzro: lol
23:21 perlawhirl joined #perl6
23:21 khw joined #perl6
23:21 perlawhirl hi perlers
23:21 perlawhirl FOSDEM VIDEOS ARE UP!!
23:25 AlexDaniel perlawhirl: how many of them?
23:27 perlawhirl looks to be pretty much all of them. i had a cron running every 5 mins to check for changes... logged in this morning to 81 emails :D
23:27 perlawhirl so... possibly some are still uploading ??
23:29 TEttinger joined #perl6
23:30 cpage_ joined #perl6
23:31 perlawhirl just ran my script again. looks like it's still "updating" (i can't tell you what's updating, my script just compares md5sum of the html )
23:34 perlawhirl also... when i said 'pretty much all of them' i meant... the perl ones... they're the only ones that matter, right :D
23:35 skids joined #perl6
23:36 cpage_ joined #perl6
23:39 sortiz .
23:48 adu joined #perl6
23:51 avenj joined #perl6
23:56 dfcarpenterak joined #perl6
23:56 Hotkeys So I added some optimizations to this porter alogrithm
23:56 Hotkeys annnnd it's a second and a half slower on the wordlist test
23:59 brrt joined #perl6

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

Perl 6 | Reference Documentation | Rakudo