Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-09-25

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:00 kyan mm?
00:00 timotimo https://github.com/jnthn/grammar-debugger/blob/master/lib/Grammar/Tracer.pm6#L47
00:00 timotimo this line calls into the code in the grammar that's being traced
00:00 timotimo if an exception flies, it never calls $indent-- in the next line
00:00 Cabanossi joined #perl6
00:00 timotimo this ought to have some kind of combination of try and CATCH
00:01 kyan Oh, interesting
00:01 timotimo it's probably a good idea to output something about exceptions if one passes by
00:01 timotimo and make sure it gets rethrown, of course
00:01 timotimo m: do { die "oh no!"; CATCH { say "i caught $_" } }
00:01 camelia rakudo-moar ebd644: OUTPUT: «i caught oh no!␤oh no!␤  in block <unit> at <tmp> line 1␤␤»
00:01 timotimo ^- here it gets rethrown
00:02 timotimo m: do { die "oh no!"; CATCH { default { say "i caught $_" } } }
00:02 camelia rakudo-moar ebd644: OUTPUT: «i caught oh no!␤»
00:02 timotimo ^- having a "when" that matches the exception or a "default" will prevent it from being rethrown
00:02 timotimo well, only prevents it from being rethrown automatically for you
00:02 timotimo you can still manually rethrow it
00:03 kyan I see, should I try to edit Grammar::Debugger? (It's a little intimidating, I've only been using Perl 6 for like 3 days now, heh)
00:04 * kyan gonna try it, don't know how to install it though since I used "zef" instead of portage
00:04 AlexDaniel may be a good use for LEAVE
00:04 timotimo no problem, you can just git clone that repository, make your changes, and run "zef install --force ." in the directory
00:04 kyan Ah, thanks!
00:04 timotimo (the --force is needed so that you don't have to bump the version field in the META file every time)
00:04 * kyan was thinking of LEAVE, actually
00:05 timotimo LEAVE around the $indent-- will make sure the indent gets changed appropriately in any case
00:05 timotimo having an extra CATCH can then help print out something helpful
00:06 kyan Would LEAVE run the indent-- at the right time, or would it happen after the "#Dump result" bit?
00:06 kyan I might just use a try...catch at first, seems simple
00:06 AlexDaniel my $result; { $indent++; LEAVE $indent--; $result := $meth($c, |args); } # or something?
00:07 AlexDaniel kyan: yea you'd have to introduce another block, probably
00:07 Xliff What is the easiest way to convert a decimal number to any base?
00:07 timotimo m: say 1234.base(16)
00:07 camelia rakudo-moar ebd644: OUTPUT: «4D2␤»
00:07 kyan Mm. Thanks!
00:08 Xliff m: 64.base(2).say
00:08 camelia rakudo-moar ebd644: OUTPUT: «1000000␤»
00:08 kyan m: say 123456789.base(64)
00:08 camelia rakudo-moar ebd644: OUTPUT: «base argument to base out of range. Is: 64, should be in 2..36␤  in block <unit> at <tmp> line 1␤␤»
00:08 Xliff m: 65.base(2).say
00:08 camelia rakudo-moar ebd644: OUTPUT: «1000001␤»
00:08 Xliff Thanks.
00:08 ugexe timotimo: when installing from a local path it will not attempt to use a cached copy
00:09 ugexe oh n/m, rakudo itself needs the --force still
00:10 ugexe e.g. CUR.install($dist, :force)
00:15 kyan Ok, it's working, albeit a little talkatively. I'm not sure it should mention the exception being caught and rethrown, at least not there, since it does it 4 times :P
00:17 timotimo hm. you can have a variable that gets set when throwing was involved and when the next method gets called (and thus the whole printing business starts back up) it could output the exception stuff at the "right" level
00:17 timotimo but since most exceptions will leave straight out of the .parse or .subparse method those would need to be wrapped, too
00:18 timotimo actually, perhaps parse is already wrapped?
00:18 kyan I mean, the caller could just be expected to handle exceptions from the grammar, I'd think
00:18 timotimo the variable i've envisioned may also be used to only print any given exception once
00:20 timotimo anyway, i'm late for bed and the cat will probably enforce half an hour of cuddling before i'm allowed to sleep :)
00:20 timotimo good luck!
00:20 kyan Opened a PR: https://github.com/jnthn/grammar-debugger/pull/38 Thanks all! :D
00:20 kyan gn!
00:30 Cabanossi joined #perl6
00:31 mcmillhj joined #perl6
00:35 kyan gn!
00:35 kyan oops, thought this was my terminal, tried to rerun a command -_-; Sorry.
00:37 Morfent are grammar rules allowed to be recursive?
00:39 AlexDaniel Morfent: sure, but there are some limitations
00:40 AlexDaniel Morfent: for example, left-recursive things may loop forever
00:40 andrzejku1 joined #perl6
00:41 Morfent ah
00:51 mryan50 joined #perl6
00:53 mcmillhj joined #perl6
00:56 aborazmeh joined #perl6
00:56 aborazmeh joined #perl6
01:10 mcmillhj joined #perl6
01:15 Cabanossi joined #perl6
01:26 mcmillhj joined #perl6
01:37 Ven`` joined #perl6
01:37 Xliff I'm writing NativeCall code and need to flip a bitmask. What's the easiest way to do that? I am getting stumped by C-think, and I don't know if the +^ operator is doing what I think it is supposed to.
01:53 mcmillhj joined #perl6
01:54 ilbot3 joined #perl6
01:54 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!
01:55 kyan Ah, it does seem so. I guess returning a False Boolean triggers a test failure, but also does *not* automatically throw an exception at the same time. I guess that makes sense. Thanks. :)
01:59 mcmillhj joined #perl6
02:03 xiaomiao joined #perl6
02:03 char_var[buffer] joined #perl6
02:07 jdv79 so it looks like i can't tap the Supply hanging off a IO::Socket::Async more than once
02:07 jdv79 does that sound right?
02:15 mcmillhj joined #perl6
02:15 jdv79 seems lame to me but i might be missing something
02:15 jdv79 but if i insert a .share in there it works.  hmm.
02:15 jdv79 wonder why...
02:16 jdv79 i thought i could tap any Supply n times
02:16 zacts evening
02:17 jdv79 it i
02:17 jdv79 s
02:20 BenGoldberg joined #perl6
02:30 roguelazer joined #perl6
02:30 Cabanossi joined #perl6
02:30 mcmillhj joined #perl6
02:42 itaipu joined #perl6
02:46 Wander4096 joined #perl6
02:46 mcmillhj joined #perl6
02:55 noganex_ joined #perl6
03:02 mcmillhj joined #perl6
03:05 wamba joined #perl6
03:06 cpage_ joined #perl6
03:10 bwisti joined #perl6
03:20 mcmillhj joined #perl6
03:20 cpage_ joined #perl6
03:29 Cabanossi joined #perl6
03:39 mcmillhj joined #perl6
03:55 Averna joined #perl6
04:06 Averna joined #perl6
04:14 Cabanossi joined #perl6
04:19 rngoodn joined #perl6
04:29 cgfbee joined #perl6
04:43 mcmillhj joined #perl6
04:59 Cabanossi joined #perl6
05:00 mcmillhj joined #perl6
05:12 mryan50 joined #perl6
05:12 ufobat joined #perl6
05:15 mcmillhj joined #perl6
05:32 domidumont joined #perl6
05:44 lowbro joined #perl6
05:44 lowbro joined #perl6
05:47 rngoodn joined #perl6
05:47 eliv joined #perl6
05:48 ryn1x joined #perl6
05:55 domidumont joined #perl6
05:59 Cabanossi joined #perl6
06:11 TimToady hmm, maybe .base above 36 should just return the ":60[12,34,56]" form instead
06:12 AlexDaniel m: say 9123607.polymod(37 xx *).reverse
06:12 camelia rakudo-moar ebd644: OUTPUT: «(4 32 4 15 36)␤»
06:13 TimToady well, or we could have a polymul
06:13 AlexDaniel for .parse-base?
06:14 * AlexDaniel doesn't get it
06:14 TimToady I mean going the other direction of extending .base
06:15 TimToady m: say 9123607.base(37)
06:15 camelia rakudo-moar ebd644: OUTPUT: «base argument to base out of range. Is: 37, should be in 2..36␤  in block <unit> at <tmp> line 1␤␤»
06:15 AlexDaniel polymod code above is already equivalent to .base(37)
06:15 TimToady but returns a list, not string, unlike .bae
06:15 TimToady *base
06:16 TimToady it's just an odd little case of refusing to dwim
06:16 TimToady or the error should suggest a workaround, but then why not just make it work?
06:16 AlexDaniel m: say sum (37 X**^∞)Z*(<4 32 4 15 36>.reverse)
06:16 camelia rakudo-moar ebd644: OUTPUT: «9123607␤»
06:17 TimToady yeah, completely obvious :P
06:17 AlexDaniel well, that's for parse-base
06:20 TimToady well, it's a minor discontinuity
06:20 * TimToady ponders how to detect left-recursion efficiently...
06:21 AlexDaniel TimToady: there we go: RT #132156
06:21 synopsebot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=132156
06:22 TimToady well, that's assuming that's the right decision :)
06:23 TimToady well, it's certainly righter than what we have, just might not be the rightest...
06:24 AlexDaniel some unicode characters would be OK for me, but :60[12,34,56] is arguably wronger than what we have now…
06:25 AlexDaniel because for variable bases you'd suddenly get something completely different when you go over 36
06:26 knobo joined #perl6
06:27 rindolf joined #perl6
06:28 TimToady not so completely different as the difference between a string and a list though, which is what polymod returns
06:28 TimToady the question is what will be reading the string on the other end, I guess
06:28 AlexDaniel but polymod returns a list consistently
06:29 TimToady not consistently with .base :P
06:29 AlexDaniel unfortunately cirlced numbers only go up to ㉟
06:29 Cabanossi joined #perl6
06:30 AlexDaniel ah wait
06:30 AlexDaniel
06:30 TimToady still an arbitrary limit
06:33 AlexDaniel TimToady: well, then why not give it a named arg with the character set for produced numbers
06:33 AlexDaniel then you can go as high as you want, as long as you give it enough characters
06:34 TimToady well, but if you're getting that fancy you might as well use polymod and ordinary array lookup rather than reinventing it
06:35 TimToady I don't actually feel terribly strongly about this; it just struck me as an odd discontinuity since we do have a string rep for higher bases
06:37 TimToady so one could argue that the real discontinuity if we do that is the need to suddenly include the base info in the string when .base(16), say, doesn't
06:39 TimToady otoh, we note the same sort of defaulting on input:
06:39 TimToady m: say :16(~:60[1,2,3])
06:39 camelia rakudo-moar ebd644: OUTPUT: «14115␤»
06:59 moritz .u ㉟
06:59 yoleaux U+325F CIRCLED NUMBER THIRTY FIVE [No] (㉟)
07:01 jonas1 joined #perl6
07:02 abraxxa joined #perl6
07:13 eroux joined #perl6
07:17 darutoko joined #perl6
07:17 zakharyas joined #perl6
07:29 leont joined #perl6
07:29 Cabanossi joined #perl6
07:33 margeas joined #perl6
07:38 eliv joined #perl6
07:42 Geth ¦ doc: 443b4b2518 | (Steve Mynott)++ | bin/p6doc
07:42 Geth ¦ doc: add warning comment about updating p6doc docs
07:42 Geth ¦ doc: review: https://github.com/perl6/doc/commit/443b4b2518
07:44 andrzejku joined #perl6
07:49 sena_kun joined #perl6
07:51 sproctor joined #perl6
08:20 ufobat joined #perl6
08:21 Altreus joined #perl6
08:26 leont joined #perl6
08:28 konsolebox joined #perl6
08:29 Cabanossi joined #perl6
08:34 kaare_ joined #perl6
08:38 virtualsue joined #perl6
08:40 kaare_ joined #perl6
08:41 araujo joined #perl6
08:42 eliv joined #perl6
08:42 eliv joined #perl6
08:43 kaare__ joined #perl6
08:48 kaare_ joined #perl6
08:49 kaare_ joined #perl6
08:50 kaare__ joined #perl6
08:53 kaare__ joined #perl6
09:01 kaare__ joined #perl6
09:14 Cabanossi joined #perl6
09:21 ilmari m: say ㉟²
09:21 camelia rakudo-moar ebd644: OUTPUT: «1225␤»
09:25 lizmat .u ㉟
09:25 yoleaux U+325F CIRCLED NUMBER THIRTY FIVE [No] (㉟)
09:26 robertle joined #perl6
09:38 mryan50 joined #perl6
09:40 eythian joined #perl6
09:53 ChoHag joined #perl6
10:08 Geth ¦ doc: 73521af75c | (Tom Browder)++ (committed using GitHub Web editor) | bin/p6doc
10:08 Geth ¦ doc: fix typo
10:08 Geth ¦ doc: review: https://github.com/perl6/doc/commit/73521af75c
10:10 kaare__ joined #perl6
10:19 Geth ¦ doc: 3b3c29b675 | (Zoffix Znet)++ | 2 files
10:19 Geth ¦ doc: Document $*INIT-INSTANT
10:19 Geth ¦ doc:
10:19 Geth ¦ doc: Fixes #510 Fixes #1462
10:19 Geth ¦ doc:
10:19 Geth ¦ doc: Rakudo impl: https://github.com/rakudo/rakudo/commit/6bdb2dd368
10:19 Geth ¦ doc: Spec:        https://github.com/perl6/roast/commit/84b48ec92b
10:19 Geth ¦ doc: review: https://github.com/perl6/doc/commit/3b3c29b675
10:24 bitrauser joined #perl6
10:29 virtualsue joined #perl6
10:29 eliv77 joined #perl6
10:30 mr-foobar joined #perl6
10:37 eliasr joined #perl6
10:43 Ven`` joined #perl6
10:44 kaare_ joined #perl6
10:52 rgrau joined #perl6
10:58 mr-foobar joined #perl6
11:13 ChoHag joined #perl6
11:24 wamba joined #perl6
11:29 Cabanossi joined #perl6
11:40 sena_kun joined #perl6
11:54 itaipu joined #perl6
11:59 Cabanossi joined #perl6
12:12 perlpilot joined #perl6
12:14 kurahaupo joined #perl6
12:14 kurahaupo joined #perl6
12:14 [Coke] typo: https://github.com/perl6/doc/blob/3b3c29b675a7bfc3aadd067c5d2f3f464932f0e0/doc/Language/variables.pod6#L1102 "statup"
12:15 ryn1x joined #perl6
12:16 Geth ¦ doc: ae24046577 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/variables.pod6
12:16 Geth ¦ doc: s/statup/startup/
12:16 Geth ¦ doc: review: https://github.com/perl6/doc/commit/ae24046577
12:19 robertle I would like to load a module at runtime, based on some lookup. I can do "require ::($module-name);" ok, but how can I load it if it's not already in the search path? is there a runtime equivalent of "use lib 'somewhere';"? or is there a "require" with filename rather than module name?
12:20 jnthn I vaguely recall `require $filename` working for that
12:20 moritz right, just pass in a string
12:21 robertle when I try that I get a "Could not find ... in ...."
12:23 robertle ah, needs an absolute path!
12:24 robertle aewsome!
12:24 Zoffix ( tangently relevant: the code that pulls code from github repo and loads the module from it if it's not installed: https://github.com/rakudo/rakudo/blob/nom/t/harness6#L10-L21 )
12:28 mr-foobar joined #perl6
12:28 nicq20 joined #perl6
12:29 Cabanossi joined #perl6
12:29 perlpilot How does one add to the list of places Rakudo looks for modules at run-time?   $*REPO doesn't seem to be very well documented
12:35 Zoffix This works perl6 -e 'my $path = get.trim; %*ENV<PERL6LIB> = $path; require Foo'
12:35 Zoffix This works too perl6 -e 'my $path = get.trim; qq|use lib <$path>|.EVAL; require Foo'
12:35 Zoffix No idea about $*REPO
12:39 moritz m: say $*REPO.repo-chain
12:39 camelia rakudo-moar 6bdb2d: OUTPUT: «(inst#/home/camelia/.perl6 inst#/home/camelia/rakudo-m-inst-2/share/perl6/site inst#/home/camelia/rakudo-m-inst-2/share/perl6/vendor inst#/home/camelia/rakudo-m-inst-2/share/perl6 CompUnit::Repository::AbsolutePath.new(next-repo => CompUnit::Repository::…»
12:41 Zoffix perlpilot: .use-repository: .repository-for-spec: $path.IO.absolute given CompUnit::RepositoryRegistry;
12:41 Zoffix That's what `use lib` does under the hood
12:41 Zoffix huggable: run-time use lib :is: Add module search path at runtime: .use-repository: .repository-for-spec: $path.IO.absolute given CompUnit::RepositoryRegistry;
12:41 huggable Zoffix, Added run-time use lib as Add module search path at runtime: .use-repository: .repository-for-spec: $path.IO.absolute given CompUnit::RepositoryRegistry;
12:43 [Coke] Zoffix++
12:45 Zoffix (P.S.: .EVAL example above is dangeruuus; do not use :) )
12:55 epony joined #perl6
12:56 HoboWithAShotgun joined #perl6
12:56 mcmillhj joined #perl6
13:07 cdg joined #perl6
13:08 wamba joined #perl6
13:13 kyan joined #perl6
13:14 Cabanossi joined #perl6
13:18 kyan Um, so I can use <?{ if condition { fail; }; }> in a grammar to fail a parse. Is there a way to do change that so it just fails matching the specific token, and continues with parsing?
13:25 TimToady there are a number of things you could mean by "continues with parsing", so I'm wondering which one it is :)
13:30 kyan TimToady: In other words, if I have a token baz { <foo> || <bar> }, and token foo { <?{ if condition { fail; }; }> }, I'd want it to continue to try to match <bar> if "condition" were true
13:30 timotimo if you return a boolean from the code block it gives you a match success or match failure
13:31 timotimo just like when you put a "foo" in the regex but there's no "foo" in the source. that kind of failure
13:31 timotimo i.e. it'll also cause backtracking of stuff before it
13:31 timotimo m: say "hello world" ~~ / .<?{ say "tried $/"; $++ > 5 }> /
13:31 camelia rakudo-moar 6bdb2d: OUTPUT: «tried h␤tried e␤tried l␤tried l␤tried o␤tried  ␤tried w␤tried o␤tried r␤tried l␤tried d␤Nil␤»
13:31 timotimo oh?
13:32 kyan Ok. Interesting. It seems to be ditching out for me
13:32 timotimo anyway, "fail" is a lot lkie a "return"
13:32 timotimo m: say "hello world" ~~ / .<?{ say "tried $/"; say $++; $++ > 5 }> /
13:32 camelia rakudo-moar 6bdb2d: OUTPUT: «tried h␤0␤tried e␤0␤tried l␤0␤tried l␤0␤tried o␤0␤tried  ␤0␤tried w␤0␤tried o␤0␤tried r␤0␤tried l␤0␤tried d␤0␤Nil␤»
13:32 timotimo okay, $++ isn't what i should use there
13:33 kyan I think I might be starting to wrap my head around how that works.
13:35 Zoffix m: my $tries; say "hello world" ~~ / .<?{ say "tried $/"; $tries++ > 5 }> /
13:35 camelia rakudo-moar 6bdb2d: OUTPUT: «tried h␤tried e␤tried l␤tried l␤tried o␤tried  ␤tried w␤「w」␤»
13:36 TimToady note that it'll also backtrack into a |
13:36 TimToady and pick the next longest token to try
13:36 kyan Cool. Thanks! :D
13:36 Zoffix m: say "hello world" ~~ /<?{True}>/ ?? "Matched" !! "Not matched"; say "hello world" ~~ /<?{False}>/ ?? "Matched" !! "Not matched"
13:36 Morfent perl regex is mindblowing compared to other languages' regex i've had to work with before
13:36 camelia rakudo-moar 6bdb2d: OUTPUT: «Matched␤Not matched␤»
13:37 TimToady that's probably where break-everything-that-needs-breaking caused the most redesign
13:37 Morfent which half the time was manually wrangling strings when lookbehind would've been nice to have
13:38 TimToady though you have to be a little careful with lookbehind, since it might violate the one-pass parsing idea
13:38 kyan (not-exactly-related question: is there a way to make multiline Q[foo] string literals work with whitespace?)
13:38 TimToady for instance, never check to see if something is backslashed using lookbehind
13:38 Zoffix kyan: work how?
13:39 Morfent yeah, i avoid using it when i can
13:39 TimToady because what if the backslash is backslashed, and then what if that one is backslashed?
13:39 kyan Ok, that was a really unclear way of phrasing it. Sorry. I'll make a gist showing what I mean
13:39 * kyan has not had enough coffee yet
13:40 Zoffix m: https://gist.github.com/zoffixznet/d1dade124855d628694fc46d24488574
13:40 camelia rakudo-moar 6bdb2d: OUTPUT: «Foo bar meow␤Meow meow mow␤Moooo␤␤»
13:40 Zoffix kyan: I think you're talking about HEREDOCs ^
13:42 kyan https://gist.github.com/ethus3h/0d97aa66030fc4fd4c0155032ef590d3
13:42 skids joined #perl6
13:43 kyan Zoffix: Aha, precisely. Thanks! ♥
13:44 kyan (your mind reading skills are impressive. I wouldn't have understood my question if I hadn't written it, upon looking back.)
13:48 kyan Thanks all for all your help. :D Off to class now... Bye!
13:51 mcmillhj joined #perl6
13:51 Zoffix You know what's fun? That you can use fancy unicode chars for the `:to` delimiters that delimit a fancy unicode char for the heredoc
13:51 Zoffix m: say Q:to♥✎♥;␤    Foo bar meow␤    Meow meow mow␤    Moooo␤    ✎
13:51 camelia rakudo-moar 6bdb2d: OUTPUT: «Foo bar meow␤Meow meow mow␤Moooo␤␤»
13:51 Zoffix ehehe
13:53 Zoffix Apparently the colon isn't even needed in that case
13:53 Zoffix m: say Qto✏✎✏;␤    Foo bar meow␤    Meow meow mow␤    Moooo␤    ✎
13:54 camelia rakudo-moar 6bdb2d: OUTPUT: «Foo bar meow␤Meow meow mow␤Moooo␤␤»
13:56 mr-foobar joined #perl6
14:00 leont joined #perl6
14:06 HoboWithAShotgun joined #perl6
14:07 mcmillhj joined #perl6
14:07 wamba joined #perl6
14:10 ShalokShalom_ joined #perl6
14:10 bdmatatu joined #perl6
14:14 Cabanossi joined #perl6
14:18 Zoffix m: 「foo\\\bar\bar」.subst(:g, /<!after 「\」> 「\」 ./, {.Str eq 「\\」 ?? 「\」 !! .uc}).put
14:18 camelia rakudo-moar 6bdb2d: OUTPUT: «foo\\bar\Bar␤»
14:18 Zoffix ^_^
14:18 Aaronepower joined #perl6
14:19 Zoffix Don't really get why it's not working right. The subbed part is re-examined or what?
14:20 Zoffix Ah, ok, nevermind
14:21 jnthn 'win 23
14:21 jnthn oops :)
14:22 * Zoffix adds that to the lottery patterns
14:23 Zoffix 'win 42
14:23 buggable joined #perl6
14:23 buggable Zoffix, Thank you for entering Accidental /win Lottery! The next draw will happen in 5 days, 9 hours, 36 minutes, and 52 seconds
14:24 Zoffix .oO( wonder why it used to be under @perl6.party but rejoined under @IPv6 )
14:38 AlexDaniel joined #perl6
14:39 wamba joined #perl6
14:40 eliasr joined #perl6
14:49 Zoffix m: 「foo\\\bar\bar」.subst(:g, /「\」./, *.comb.tail.uc).put
14:49 camelia rakudo-moar 6bdb2d: OUTPUT: «foo\BarBar␤»
14:49 Zoffix I gave up trying to do it with lookbehind :)
14:51 Zoffix m: 「foo\\\bar\bar」.subst(:g, /<!after 「\」**{1,3…5555}> 「\」 ./, *.comb.tail.uc).put # other than this, I mean
14:51 camelia rakudo-moar 6bdb2d: OUTPUT: «foo\BarBar␤»
14:52 Zoffix m: 「foo\\\bar\bar」.subst(:g, /<!after $0=[「\」+] {dd $0}> 「\」 ./, *.comb.tail.uc).put
14:52 camelia rakudo-moar 6bdb2d: OUTPUT: «Nil␤foo\\barBar␤Nil␤Nil␤Nil␤Nil␤Nil␤Nil␤Nil␤Nil␤Nil␤Nil␤Nil␤»
14:53 TEttinger joined #perl6
14:53 Zoffix And I kinda expected the stuff inside <after> to be its own match object that I could introspect while matching, but seems its empty or something
14:53 Zoffix Ah, it just don't capture
14:55 leont joined #perl6
14:59 mr-foobar joined #perl6
15:00 Zoffix m: 「foo\\\bar\bar」.subst(:g, /<!after <!{$/.orig.substr($/.pos).subst:  /^ (「\」+) <?{$0.chars %% 2}>/, ""}>> 「\」 ./, *.comb.tail.uc).put
15:00 camelia rakudo-moar 6bdb2d: OUTPUT: «foo\BarBar␤»
15:00 Zoffix Yes. I win :)
15:07 AlexDaniel e: .say for sort (.unival for 1..0x10FFFF).unique
15:07 evalable6 AlexDaniel, rakudo-moar ebd6440c2: OUTPUT: «(signal SIGHUP) «timed out after 10 seconds»»
15:08 AlexDaniel :(
15:08 kyan joined #perl6
15:11 geekosaur joined #perl6
15:14 Cabanossi joined #perl6
15:20 rgrau joined #perl6
15:37 notostraca joined #perl6
15:47 epony joined #perl6
15:56 troys joined #perl6
16:05 domidumont joined #perl6
16:07 leont Zoffix: you keep breaking my stuff! :-p https://github.com/Leont/build-graph6/issues/3 ;-)
16:08 Zoffix leont: it still works, it's just deprecated.
16:08 Zoffix Blame the person who documented an unspecced feature :)
16:09 Zoffix greppable6: \$\*INITTIME
16:09 greppable6 Zoffix, https://gist.github.com/d775c42b964195bb652d3c9c65023e14
16:09 Zoffix I guess I should've checked that :}
16:10 ChoHag joined #perl6
16:10 * Zoffix makes PRs
16:14 Cabanossi joined #perl6
16:15 Zoffix leont: https://github.com/Leont/build-graph6/pull/4
16:18 khw joined #perl6
16:19 wander4096 joined #perl6
16:20 ryn1x joined #perl6
16:25 mcmillhj joined #perl6
16:27 mr-foobar joined #perl6
16:27 leont Fix looks good to me
16:28 st_elmo joined #perl6
16:28 Zoffix japhb: (I think you have commit rights): https://github.com/ab5tract/Terminal-Print/pull/53
16:30 thou joined #perl6
16:31 chakli joined #perl6
16:31 eliv77 joined #perl6
16:47 [Coke] https://github.com/perl6/doc/blob/ae24046577722c5b6c1c0dba0a0a9519032ddd8c/doc/Language/variables.pod6#L1104 - typo in docs. "miliseconds"
16:47 dogbert2 joined #perl6
16:47 Zoffix gah. I can't type at all :D
16:48 Geth ¦ doc: 2cdbde8c91 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/variables.pod6
16:48 Geth ¦ doc: s/miliseconds/milliseconds/;
16:48 Geth ¦ doc: review: https://github.com/perl6/doc/commit/2cdbde8c91
16:59 [Coke] if I have a Proc::Async and want to feed the output of that to the input of another Proc::Async, is there a way to do it without having to explicitly tap the first and have it write to the second?
16:59 mr-foobar joined #perl6
17:01 robertle joined #perl6
17:02 ryn1x joined #perl6
17:02 Ven joined #perl6
17:03 Zoffix Don't see a way without raking object guts with nqp
17:03 ryn1x joined #perl6
17:04 ilmari $proc1.bind-stdout($proc2.stdin) or vice versa?
17:05 AlexDaniel Zoffix: I just realized…
17:05 Zoffix $proc2.stdin returns a Supply tho
17:05 AlexDaniel Zoffix: merging these PRs will make the tests fail on all rakudos before 2017.10
17:05 Zoffix I meant, it doesn't return an IO::Handle
17:05 AlexDaniel Zoffix: including the previous rakudo star
17:06 Zoffix AlexDaniel: why?
17:06 Zoffix AlexDaniel: which PRs the INITTIME ones?
17:06 AlexDaniel Zoffix: ah sorry, didn't look into the PRs themselves
17:06 AlexDaniel nevermind then :)
17:06 Zoffix :)
17:06 ryn1x lizmat: Just checking back in about the selling the stuffed camelia's online...
17:06 Zoffix $proc2.stdin isn't a method actually.
17:06 AlexDaniel Zoffix++
17:07 Zoffix Well, there's .bind-stdout that takes an IO::Handle and there's a .bind-stdin that takes IO::Handle and they use .native-descriptor to do their thing, but I don't know how to chain the two together
17:08 ChoHag joined #perl6
17:08 ilmari there's a .bind-stdin that takes a Proc::Async::Pipe
17:09 Zoffix Ohhh
17:09 ilmari which is what .stdout(:bin) returns
17:10 ilmari so $proc2.bind-stdin($proc1.stdout(:bin))
17:10 frobisher joined #perl6
17:11 ilmari hence "or vice versa" above, because I couldn't immediately figure out which way around they went together
17:11 ilmari hedging++
17:11 AlexDaniel https://github.com/perl6/doc/issues/1580
17:12 ilmari AlexDaniel++ # that was quick
17:12 Zoffix m: this works: my $proc1 = Proc::Async.new: "cal"; my $proc2 = Proc::Async.new: «perl6 -e "slurp.uc.put"»; $proc2.bind-stdin: $proc1.stdout: :bin; await $proc1.start, $proc2.start
17:12 camelia rakudo-moar 6bdb2d: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤    works used at line 1. Did you mean 'words', 'ords'?␤␤»
17:12 Zoffix ilmari++
17:13 Zoffix s/m: //;
17:15 ilmari jnthn++ # added bind-stdin(Pipe) in June
17:18 Guest_ joined #perl6
17:20 [Coke] ilmari++ jnthn++ danke.
17:21 [Coke] Zoffix++
17:21 ilmari huggable: hug everyone
17:21 * huggable hugs everyone
17:21 thou joined #perl6
17:27 leont joined #perl6
17:28 andrzejku_ joined #perl6
17:30 leont Can someone remind me how I can check if the current rakudo is 2017.09+ or not?
17:31 Zoffix m: say not $*PERL.compiler.version before 2017.09
17:31 camelia rakudo-moar 6bdb2d: OUTPUT: «True␤»
17:31 Zoffix c: 2017.04 say not $*PERL.compiler.version before 2017.09
17:31 committable6 Zoffix, ¦2017.04: «False»
17:32 Zoffix m: say $*PERL.compiler.version !before 2017.09 # prolly clearer
17:32 camelia rakudo-moar 6bdb2d: OUTPUT: «True␤»
17:33 Zoffix m: say $*PERL.compiler.version !before v2017.09 # prolly clearer
17:33 camelia rakudo-moar 6bdb2d: OUTPUT: «True␤»
17:33 Zoffix Oops :) missed a `v` :)
17:34 Zoffix m: say $*PERL.compiler.version >= v2017.09 # prolly clearer
17:34 camelia rakudo-moar 6bdb2d: OUTPUT: «True␤»
17:35 Zoffix m: say $*PERL.compiler.version ≥ v2017.09 # prolly clearer
17:35 camelia rakudo-moar 6bdb2d: OUTPUT: «Cannot resolve caller Real(Version: ); none of these signatures match:␤    (Mu:U \v: *%_)␤  in block <unit> at <tmp> line 1␤␤»
17:35 Zoffix haw
17:35 Zoffix lame
17:36 leont Thanks!
17:36 Zoffix Ah, it's due to the temp fix for the bug that makes ≥ 50x slower than >= Not all the >= candidates were added as ≥
17:36 * Zoffix hackety hacks
17:40 frobisher Huh. Apparently I've been away from IRC so long that someone managed to appropriate my nick. :-/
17:41 Zoffix What did it use to be?
17:41 frobisher dha
17:41 Zoffix Ah
17:41 Zoffix Should've registered :}
17:41 frobisher I did.
17:42 frobisher If registrations don't expire, then I have no idea what happened.
17:42 Zoffix Hm... I think I recall a few month back Freenode saying you need to re-login if you want to keep your registration or something
17:42 teatime I don't think they do automatically, but after a certain period of inactivity people can request staff to delete them so they can register it.
17:43 Zoffix frobisher: it's still registered dude
17:43 Zoffix frobisher: just log in and do /ghost dha
17:43 frobisher Oh. Or possibly, as it seems to be logged in from Amsterdam, maybe I somehow never got logged out.
17:43 Zoffix :D
17:43 teatime lol
17:43 frobisher Apparently, I may not ghost dha.
17:43 Zoffix You need to log in first
17:44 frobisher I'm confused. what does "log in" mean in this context?
17:44 Zoffix login into nickserv
17:44 teatime frobisher: identify.  /msg nickserv help identify
17:45 frobisher ah.
17:45 Zoffix Syntax: GHOST <nick> [password]
17:45 Zoffix /msg NickServ ghost dha your-pass
17:46 dha huzzah!
17:46 dha thanks.
17:46 lizmat .oO( dha's back! :-)
17:47 dha Indeed. :-)
17:48 HoboWithAShotgun joined #perl6
17:48 Zoffix joined #perl6
17:50 leont I don't understand the results observed in https://github.com/Leont/yamlish/issues/17
17:50 leont That element should be a regex and not a token, I can understand
17:50 leont But why also TOP?
17:55 tinita leont: btw, i ran the test suite matrix on yamlish. it took 18 minutes though, and i'm not sure i want to run that every time i regenrate it
17:55 tinita i think i need to write a script that runs all tests in one process
17:56 tinita it passed 80 tests and died for 123 tests
17:56 Zoffix I don't get how that grammar matches with `regexes` at all. Wouldn't `no bar` match the `no` first and then fail because not entire string was matched?
17:57 tinita leont: http://flens.perlpunks.de/tinita/ytm/ # note that this is temporary
17:57 mr-foobar joined #perl6
17:57 Ven joined #perl6
17:58 leont tinita: well, the link I just posted might explain some of those failures
17:58 wamba joined #perl6
17:58 leont In recent times I discovered a whole bunch of issues that need to be fixed -_-
17:58 Zoffix Ah
17:59 leont Fixing tags/anchors on block sequences and maps would probably help a lot too
17:59 Zoffix leont: I see why also TOP: `rule TOP` matches "no" as `<element>` but that's not the end of string, so it still has to backtrack to match a different `<element>`
18:00 leont Ah, I see. I hadn't realised that
18:00 tinita leont: i hope i have time soon to write a batch script for the matrix tests. until then, i'll keep perl6 off the matrix
18:00 tinita leont: are you using the test suite yourself?
18:01 leont It shouldn't be that slow though, that would make me suspect something disagrees with precompilation or some such
18:01 tinita leont: the funny thing is, the json dumper version is a bit faster
18:01 tinita 15 minutes
18:02 tinita and the first one is always very slow
18:02 leont Your test suite? No not yet. Hadn't come around to setting that up. Is there a write-up of how to do that?
18:02 tinita so it seems precompilation is happening at least
18:03 tinita leont: you can just checkout the 'data' branch of yaml/yaml-test-suite
18:03 tinita any error tests have an 'error' file in their directory, so these should fail
18:04 tinita so even if you don't output events yet, you can use it to see if parsing succeeds or not
18:04 tinita for perl5 YAML::PP i include the data directory in my release tarball
18:07 tinita i think it's time to add some more infos to the test suite README
18:08 leont One clear thing in that test is that currently tags are broken and anchors have issues, which isn't that much of a surprise
18:09 tinita =)
18:09 Ven_ joined #perl6
18:10 leont ast branch should make fixing that easier, though actually solving it will mean more serious refactoring of the grammar
18:11 cdg joined #perl6
18:14 Cabanossi joined #perl6
18:17 thou joined #perl6
18:21 wamba joined #perl6
18:22 Rawriful joined #perl6
18:25 ChoHag joined #perl6
18:26 leont joined #perl6
18:36 espadrine joined #perl6
18:37 itaipu joined #perl6
18:38 rurban joined #perl6
19:00 Cabanossi joined #perl6
19:05 ryn1x_ joined #perl6
19:06 tom_ joined #perl6
19:08 Toni_ joined #perl6
19:08 Toni_ hi
19:09 Toni_ how can I execute a sub which has its name in a variable?
19:09 devmikey joined #perl6
19:09 Toni_ sub s { say "something"}
19:09 Toni_ my $x = "s"
19:10 Toni_ i want to execute $x
19:10 Zoffix sub s { say "something"}; my $x = "s"; ::("&$x")()
19:10 Zoffix m: sub s { say "something"}; my $x = "s"; ::("&$x")()
19:10 camelia rakudo-moar 1af2a7: OUTPUT: «something␤»
19:10 itaipu joined #perl6
19:10 Zoffix ::() is symbol look up. Sub symbols have "&" in front of names. And the trailing () execute it (and can take args)
19:11 Toni_ thank you Zoffix
19:21 * lizmat is almost done with this week's Perl 6 Weekly
19:21 lizmat are there any things you think I may have missed, *now* is the time to let me know!
19:25 patrickz joined #perl6
19:28 wamba joined #perl6
19:29 raschipi joined #perl6
19:30 timotimo i don't remember doing anything of interest the last week
19:30 timotimo the grant proposal wasn't in the last weekly, though?
19:30 timotimo only until tomorrow to comment on it
19:31 timotimo though i'm not sure if many readers of the weekly are good people to ask for comments here on that
19:33 lizmat timotimo: it wasn't in last weeks, it is in this weeks
19:39 timotimo OK
19:40 mryan50 joined #perl6
19:43 cdg joined #perl6
19:57 thou joined #perl6
19:59 mr-foobar joined #perl6
20:02 lizmat and another Perl 6 Weekly hits the Net: https://p6weekly.wordpress.com/2017/09/25/2017-39-smarting-up-the-pool/
20:07 Zoffix \o/
20:08 raschipi \0/
20:09 ChoHag joined #perl6
20:10 leont joined #perl6
20:11 AlexDaniel “I promise to travel to wherever you live and kiss your feet if you do this latter task”
20:11 AlexDaniel (https://www.reddit.com/r/perl6/comments/715ged/can_perl6_grammar_capabilities_make_easier_to/dnd8e9m/)
20:13 Zoffix Gross
20:13 Zoffix lizmat++ good weekly
20:13 Zoffix Lots of new namea I don't recognize
20:13 Zoffix names
20:14 Cabanossi joined #perl6
20:17 dha lizmat++
20:23 * sjn reads the weekly
20:32 Geth ¦ ecosystem: 4710e04096 | (Jonathan Stowe)++ | META.list
20:32 Geth ¦ ecosystem: Add GDBM
20:32 Geth ¦ ecosystem:
20:32 Geth ¦ ecosystem: See https://github.com/jonathanstowe/p6-GDBM
20:32 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/4710e04096
20:53 AlexDaniel “and as far as syntax, capital letters just everywhere. Sometimes entire words capitalized. I use Perl in my dev environment, which I SSH into, and it is a nightmare to try to type Perl 6 code”
20:53 AlexDaniel XD somebody has troubles typing capital letters
20:53 AlexDaniel don't tell them about unicode stuff we use
20:54 AlexDaniel ( https://www.reddit.com/r/perl/comments/714v77/relevance_of_perl_5/dn9capm/ )
21:01 rgrau joined #perl6
21:08 Zoffix But it doesn't say they have trouble typing capital letters. I don't know why people are mocking that person.
21:10 geekosaur -Wtrigraphs, anyone?
21:11 timotimo right, they complained that allcaps words are ugly to them, and then went on to say typing perl6 code is no fun for them
21:14 pmurias joined #perl6
21:16 Zoffix geekosaur: sounds like a perfect idea for a Slang :P
21:22 mryan50 joined #perl6
21:29 Cabanossi joined #perl6
21:30 mryan50 Are there any known problems installing ‘v5’ with zef?
21:30 HoboWithAShotgun joined #perl6
21:31 [Coke] Is v5 working? no travis setup, 8 open issues...
21:32 [Coke] Looks like v5 is depending specfically on Panda modules
21:32 [Coke] ... without declaring this; so zef doesn't install them for you.
21:33 lizmat v5 is pretty bitrotten afaik
21:33 mryan50 I’m a newbie so, I didn’t know where to look.  Ok.  So if v5 doesn’t work, one would expect the tests in S01-perl-5-integration should be expected to fail?
21:33 timotimo i believe v5 is bitrotted by a lot
21:33 timotimo those probably use Inline::Perl5 though
21:34 mryan50 ahh.. thanks
21:35 [Coke] (Panda) I did zef install Panda::Common, that grabbed all the deps, then it hangs during the build.
21:35 timotimo shall we remove panda from the ecosystem in a month or two?
21:35 timotimo maybe also ufo?
21:36 mryan50 So, how does one know what tests to expect to (not) work in t/spec ?
21:36 ryn1x joined #perl6
21:36 timotimo there's the spectest.data that defines what gets tried at all
21:37 timotimo inside the t folder
21:37 mryan50 ok.  ta
21:37 timotimo individual tests are "fudged" with text like #?rakudo skip or todo or something
21:37 AlexDaniel m: say 42; LEAVE say ‘bye’;
21:37 camelia rakudo-moar 1af2a7: OUTPUT: «42␤bye␤»
21:37 AlexDaniel m: say 42; exit 0; LEAVE say ‘bye’;
21:37 camelia rakudo-moar 1af2a7: OUTPUT: «42␤»
21:47 rindolf joined #perl6
21:49 pmurias joined #perl6
21:59 john51 joined #perl6
22:07 thou joined #perl6
22:09 TimToady joined #perl6
22:10 epony joined #perl6
22:19 epony joined #perl6
22:38 skids joined #perl6
22:41 mryan50 joined #perl6
22:47 sverre_ joined #perl6
22:48 sverre_ left #perl6
22:48 sverre_ joined #perl6
22:48 kurahaupo_ joined #perl6
22:49 kurahaupo_ joined #perl6
22:55 sverre_ joined #perl6
22:55 sverre_ left #perl6
22:56 sverre_ joined #perl6
22:59 Cabanossi joined #perl6
23:00 thou Is it possible to do $foo.match() or $foo ~~ / pat / inside an action method?  I get "Cannot assign to a readonly variable ($/) or a value".  https://gist.github.com/softmoth/e63b4920d89970620bcd96d4ce065420
23:00 Zoffix thou: don't name the parameter $/
23:01 thou oh, that seems simple enough
23:01 Zoffix :)
23:01 Zoffix m: https://gist.github.com/zoffixznet/c0669519ad2de18b8dc5eeaae3069d5b
23:01 camelia rakudo-moar 1af2a7: OUTPUT: «HI HI␤»
23:01 thou … and it is simple!
23:09 Zoffix The error likely can be improved. Filed as https://rt.perl.org/Ticket/Display.html?id=132162
23:16 geekosaur joined #perl6
23:22 teatime hmmmm...  I just had a maybe really good idea...  how about a weekly Perl6 quiz, like http://rubyquiz.com/ ?   Would give me a project to do, generate a bunch of example Perl6 code for folks to read, and be a source of regular semi-interesting exercises for people wanting to learn/practice Perl6.
23:23 teatime there used to be at least one Perl5 one
23:23 Zoffix teatime: do it! :)
23:26 teatime Zoffix: does it seem like a legit promising idea, or are you just being generically encouraging?  :)
23:28 sverre_ left #perl6
23:29 Zoffix teatime: promising idea
23:29 Cabanossi joined #perl6
23:30 Zoffix There is (used to be?) 6Fix that emailed challenges. I had trouble using the system and never got more than 3 first challenges
23:31 teatime ah yes... I had forgotten how long perl6 has actually been around.
23:32 Praise joined #perl6
23:32 Praise joined #perl6
23:34 cdg joined #perl6
23:48 kyan joined #perl6
23:59 Cabanossi joined #perl6

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

Perl 6 | Reference Documentation | Rakudo