Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-03-12

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:05 mcmillhj joined #perl6
00:14 Cabanossi joined #perl6
00:17 mcmillhj joined #perl6
00:22 araujo joined #perl6
00:24 jeffythedragonsl joined #perl6
00:26 BenGoldberg joined #perl6
00:30 jeffythedragonsl hey
00:30 naxieAlDle hello!
00:30 jeffythedragonsl windows 10 killed my linux bootloader but I'm back up to speed now, trying some more perl6 stuff
00:32 gdonald joined #perl6
00:32 ZofBot joined #perl6
00:34 naxieAlDle \o/
00:36 mcmillhj joined #perl6
00:37 jeffythedragonsl I'm looking at https://github.com/MoarVM/MoarVM/issues/549, can't reproduce it
00:38 MasterDuke m: say expmod(1, -1, 1)
00:38 camelia rakudo-moar d444f6: OUTPUT: «0␤»
00:38 MasterDuke m: say expmod(3, -1, 3)
00:39 camelia rakudo-moar d444f6: OUTPUT: «(timeout)»
00:39 MasterDuke m: say expmod(3, -1, 1)
00:39 camelia rakudo-moar d444f6: OUTPUT: «0␤»
00:39 jeffythedragonsl ok, but (1, -1, 1) doesn't timeout
00:39 MasterDuke i think it was fixed for the case of the third parameter == 1
00:40 MasterDuke dogbert17 has some comments about it over in #moarvm
00:41 jeffythedragonsl it's implemented in rakudo/src/core/Int.pm?
00:41 MasterDuke i believe the problem is actually in the 3rd party math lib we use
00:41 MasterDuke libtommath
00:42 MasterDuke MoarVM/3rdparty/libtommath
00:44 MasterDuke jeffythedragonsl: you know about the web site with logs of the channels?
00:44 jeffythedragonsl yeah
00:45 MasterDuke https://irclog.perlgeek.de/moarvm/2017-03-11 has the comments i was thinking of
00:46 jeffythedragonsl hmm
00:46 mcmillhj joined #perl6
00:47 jeffythedragonsl why use gdb for python instead of pdb?
00:48 samcv j: 'st'.fc.say
00:48 camelia rakudo-jvm fb4f16: OUTPUT: «st␤»
00:48 ggoebel joined #perl6
00:49 khw joined #perl6
00:52 MasterDuke jeffythedragonsl: i think it's the other way around? using some python script in gdb
00:54 jeffythedragonsl I git cloned moarvm and there's no code in MoarVM/3rdparth/libtomath
00:54 MasterDuke it got turned into a submodule, so i think you have to `perl Configure.pl` and that will clone it
00:56 jeffythedragonsl ok
00:56 jeffythedragonsl all I see that looks anything like that is in src/math/bigintops.c theres MVM_bigint_expmod
00:57 ecocode joined #perl6
00:58 MasterDuke yeah, looks like it pretty much just calls mp_exptmod
01:00 MasterDuke 3rdparty/libtommath/bn_mp_exptmod.c:24:
01:00 jeffythedragonsl so it's going into infinite recursion with no stack overflow?
01:01 ecocode joined #perl6
01:03 MasterDuke could be, i haven't looked at it at all, just noticed it was being talked about
01:08 mcmillhj joined #perl6
01:12 avuserow joined #perl6
01:14 jeffythedragonsl I'm thinking https://github.com/perl6/nqp/issues/332 might be easier since it's all in MoarVM
01:14 jeffythedragonsl I can reproduce it now
01:17 aborazmeh joined #perl6
01:17 aborazmeh joined #perl6
01:25 bjz joined #perl6
01:25 mcmillhj joined #perl6
01:27 jeffythedragonsl anyone have any idea where the code for || is?
01:28 Cabanossi joined #perl6
01:29 MasterDuke you could try doing `--target=ast` and see what it gives
01:30 MasterDuke e.g., perl6 --target=ast -e 'your code here'
01:33 jeffythedragonsl I guess it's called something like infix:<||>
01:34 MasterDuke probably
01:35 Geth ¦ whateverable: fcf6ae0542 | (Aleks-Daniel Jakimenko-Aleksejev)++ | t/committable.t
01:35 Geth ¦ whateverable: Test very old tags
01:35 Geth ¦ whateverable:
01:35 Geth ¦ whateverable: Adds tests for issue #30.
01:35 Geth ¦ whateverable:
01:35 Geth ¦ whateverable: 2014.01 is the oldest release of Rakudo on MoarVM, currently we do not
01:35 Geth ¦ whateverable: provide anything older than that.
01:35 Geth ¦ whateverable: review: https://github.com/perl6/whateverable/commit/fcf6ae0542
01:36 * IOninja points out the bug is in nqp, so doing `perl6 --...` is a bit far from home.
01:37 user9 joined #perl6
01:37 MasterDuke heh, whoops. `nqp --target=ast -e 'your code here'`
01:38 jeffythedragonsl ok, it's QAST::Op(unless &infix:<||>)  ||
01:39 jeffythedragonsl if you put 4 || 200 in it evaluates to 4, only if you use a variable it's zero
01:41 MasterDuke might try saving off the asts for each version and diffing them, might give you a place to look
01:41 MasterDuke and making the variable an int also give 4
01:42 IOninja nqp: my $v := 42; my int $x := nqp::unless($v, 5); say($x)
01:42 camelia nqp-moarvm: OUTPUT: «0␤»
01:43 IOninja nqp: my $v := ''; my int $x := nqp::if($v, 5); say($x)
01:43 camelia nqp-moarvm: OUTPUT: «0␤»
01:44 IOninja nqp: my $v := ''; my $x := nqp::if($v, 5); say($x)
01:44 camelia nqp-moarvm: OUTPUT: «␤»
01:45 IOninja nqp: my $v := ''; my num $x := nqp::if($v, 5); say($x)
01:45 camelia nqp-moarvm: OUTPUT: «0␤»
01:45 jeffythedragonsl $ nqp --target=ast -e "my $bar := 4; my int $foo2 := $bar || 200;"
01:45 jeffythedragonsl Confused at line 2, near "my int  :="
01:45 jeffythedragonsl at gen/moar/stage2/NQPHLL.nqp:765  (/home/jpl/.rakudobrew/moar-nom/install/share/nqp/lib/NQPHLL.moarvm:panic)
01:45 MasterDuke might try disabling spesh or the jit
01:45 AngeloMichael joined #perl6
01:45 Actualeyes left #perl6
01:46 MasterDuke can't use " for the outermost quote, the shell uses them
01:47 jeffythedragonsl single quotes work
01:47 mcmillhj joined #perl6
01:49 agentzh joined #perl6
01:51 jeffythedragonsl diff of the two versions
01:51 jeffythedragonsl $ diff foo foo2
01:51 jeffythedragonsl 40c40
01:51 jeffythedragonsl <       - QAST::Stmts  my $bar := 4; my int $foo := $bar || 200;
01:51 jeffythedragonsl ---
01:51 jeffythedragonsl >       - QAST::Stmts  my $bar := 4; my int $foo := 4 || 200;
01:51 jeffythedragonsl 46c46
01:51 jeffythedragonsl <           - QAST::Op(bind)  :var_initialized<?> int $foo := $bar || 200
01:51 jeffythedragonsl ---
01:51 jeffythedragonsl >           - QAST::Op(bind)  :var_initialized<?> int $foo := 4 || 200
01:51 jeffythedragonsl 49c49
01:51 jeffythedragonsl <               - QAST::Var(lexical $bar)
01:51 jeffythedragonsl ---
01:51 jeffythedragonsl >               - QAST::IVal(4)
01:51 jeffythedragonsl don't see how that really helps me though
01:51 jeffythedragonsl :q
01:51 IOninja jeffythedragonsl: FWIW we have #perl6-dev
01:52 jeffythedragonsl ok :)
02:03 wamba1 joined #perl6
02:04 labster joined #perl6
02:06 kalkin- joined #perl6
02:11 gdonald joined #perl6
02:12 Geth ¦ whateverable: a96dec07a5 | (Aleks-Daniel Jakimenko-Aleksejev)++ | 2 files
02:12 Geth ¦ whateverable: Make sure huge STDIN is not replied back fully
02:12 Geth ¦ whateverable:
02:12 Geth ¦ whateverable: Adds some tests for issue #34.
02:12 Geth ¦ whateverable:
02:12 Geth ¦ whateverable: Interestingly, we only test stdin features for committable and
02:12 Geth ¦ whateverable: evalable even though *all* bots support it equally. Perhaps it's time
02:12 Geth ¦ whateverable: to create a separate file for common tests.
02:12 Geth ¦ whateverable: review: https://github.com/perl6/whateverable/commit/a96dec07a5
02:12 diakopter___ joined #perl6
02:14 Cabanossi joined #perl6
02:14 ZzZombo joined #perl6
02:14 ZzZombo joined #perl6
02:23 ZzZombo Is there a way to do this in just one assigment?
02:23 ZzZombo m: 'a b c' ~~ /(\w)\s(\w)\s(\w)/;say my ($x,$y,$z)=$0,$1,$2
02:23 camelia rakudo-moar d444f6: OUTPUT: «(「a」 「b」 「c」)␤»
02:26 MasterDuke m: my ($x,$y,$z) = |("a b c" ~~ /(\w)\s(\w)\s(\w)/); say $x; say $y; say $z
02:26 camelia rakudo-moar d444f6: OUTPUT: «「a」␤「b」␤「c」␤»
02:27 ZzZombo thanks, very good.
02:27 MasterDuke np
02:40 mcmillhj joined #perl6
02:46 Cabanossi 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:50 user9 joined #perl6
02:52 mcmillhj joined #perl6
02:54 jpl_ joined #perl6
02:56 skids joined #perl6
02:56 user10 joined #perl6
03:03 mcmillhj joined #perl6
03:09 mcmillhj joined #perl6
03:12 bjz joined #perl6
03:15 naxieAlDle m: "a b c" ~~ /$<x>=\w\s$<y>=\w\s$<z>=\w/; say $<x>; say $<y>; say $<z>
03:15 camelia rakudo-moar 7bebec: OUTPUT: «「a」␤「b」␤「c」␤»
03:15 naxieAlDle too late… :)
03:20 IOninja m: my ($x,$y,$z) = 'a b c'.words; dd [ $x, $y, $z ]
03:20 camelia rakudo-moar 7bebec: OUTPUT: «["a", "b", "c"]␤»
03:21 mcmillhj joined #perl6
03:28 pierrot_ joined #perl6
03:29 Dunearhp_ joined #perl6
03:29 ilbelkyr_ joined #perl6
03:30 r3m joined #perl6
03:30 labster joined #perl6
03:31 garu joined #perl6
03:33 mcmillhj joined #perl6
03:33 ccntrq- joined #perl6
03:34 hobbified joined #perl6
03:35 r3m joined #perl6
03:37 xxpor joined #perl6
03:37 ribasushi joined #perl6
03:39 mcmillhj joined #perl6
03:41 IOninja nqp doesn't have multies, does it?
03:42 noganex joined #perl6
03:43 Geth ¦ whateverable: d6c1f87205 | (Aleks-Daniel Jakimenko-Aleksejev)++ | 5 files
03:43 Geth ¦ whateverable: Tests malformed links
03:43 Geth ¦ whateverable:
03:43 Geth ¦ whateverable: Adds tests for issue #103.
03:43 Geth ¦ whateverable:
03:43 Geth ¦ whateverable: Again, these should probably be separated into a file with common
03:43 Geth ¦ whateverable: tests. The commands are slightly different for each bot, but that's
03:43 Geth ¦ whateverable: not a big problem.
03:43 Geth ¦ whateverable: review: https://github.com/perl6/whateverable/commit/d6c1f87205
03:44 girafe joined #perl6
03:44 salparadise joined #perl6
03:44 unclechu joined #perl6
03:49 jhill__ joined #perl6
03:49 dalek joined #perl6
03:49 Xliff joined #perl6
03:49 Undercover joined #perl6
03:49 SourceBaby joined #perl6
03:49 synopsebot6 joined #perl6
03:49 Matthew[m] joined #perl6
03:49 TBSliver joined #perl6
03:49 cpage joined #perl6
03:49 Grauwolf joined #perl6
03:49 jhill__ joined #perl6
03:50 mcmillhj joined #perl6
03:52 jhill__ joined #perl6
03:56 ZzZombo joined #perl6
03:56 ZzZombo joined #perl6
03:57 mcmillhj joined #perl6
03:58 bjz joined #perl6
03:58 Geth ¦ whateverable: 73e51c7e8d | (Aleks-Daniel Jakimenko-Aleksejev)++ | 2 files
03:58 Geth ¦ whateverable: Make sure we have some sane characters in stdin
03:58 Geth ¦ whateverable:
03:58 Geth ¦ whateverable: Adds tests for issue #83.
03:58 Geth ¦ whateverable: review: https://github.com/perl6/whateverable/commit/73e51c7e8d
04:06 ZzZombo Is this expected to behave this way?
04:06 ZzZombo m: grammar A {token TOP { (<ws>+ || <alnum>+ || <cntrl>+ || .)* } };class B { method TOP($/) { say $/ }};say A.parse(' founded the Evidenzbureau in 1850 as the ',:actions(B));
04:06 camelia rakudo-moar 7bebec: OUTPUT: «(timeout)»
04:08 IOninja m: my num:D $ = 42e0;
04:08 camelia rakudo-moar 7bebec: OUTPUT: «Type check failed in assignment; expected num:D but got Num (42e0)␤  in block <unit> at <tmp> line 1␤␤»
04:08 IOninja m: my num $ = 42e0;
04:08 camelia rakudo-moar 7bebec: ( no output )
04:09 IOninja m: my int:D $ = 42;
04:09 camelia rakudo-moar 7bebec: OUTPUT: «Type check failed in assignment; expected int:D but got Int (42)␤  in block <unit> at <tmp> line 1␤␤»
04:09 Cabanossi joined #perl6
04:10 IOninja m: multi foo (Int:D $x) {say "here"}; multi foo (int:D $x) { say "there" }; foo my int $x = 42
04:10 camelia rakudo-moar 7bebec: OUTPUT: «there␤»
04:10 IOninja m: my int:D $ = my int $x = 42
04:10 camelia rakudo-moar 7bebec: OUTPUT: «Type check failed in assignment; expected int:D but got Int (42)␤  in block <unit> at <tmp> line 1␤␤»
04:10 naxieAlDle m: grammar A {token TOP { <ws>+ } }; say A.parse(‘hello’);
04:10 Todd joined #perl6
04:11 IOninja This feels a bit bustified. Probably should just throw when attempting to use type smiley on natives?
04:11 camelia rakudo-moar 7bebec: OUTPUT: «(timeout)»
04:11 naxieAlDle m: ‘hello’ ~~ /<ws>+/
04:11 naxieAlDle ZzZombo: ok, here's the reason ↑
04:11 camelia rakudo-moar 7bebec: OUTPUT: «(timeout)»
04:11 naxieAlDle m: ‘hello’ ~~ /<ws>/
04:11 camelia rakudo-moar 7bebec: ( no output )
04:11 naxieAlDle m: say ‘hello’ ~~ /<ws>/
04:11 camelia rakudo-moar 7bebec: OUTPUT: «「」␤ ws => 「」␤»
04:11 naxieAlDle or this, to be exact
04:12 naxieAlDle ZzZombo: <ws> may be zero-width, so you end up matching it forever
04:12 naxieAlDle I think it has always been like this
04:12 naxieAlDle all: say ‘hello’ ~~ /<ws>/
04:12 IOninja <ws>+ don't make sense as <ws> covers it.
04:12 naxieAlDle but we can double-check, of course
04:13 committable6 naxieAlDle, https://gist.github.com/7487193b7df50e7e88f3c52f6fecf4be
04:13 naxieAlDle all: say 'hello' ~~ /<ws>/
04:13 naxieAlDle ya
04:13 Todd Hi All,  A quick question on subsitutions.  This subsitution `$Clipboard ~~ s:global|\t| |;` replaces tabs with spaces.  Question, if I had wanted to use `chr(9)` instead of `\t`, how would I do such (what is the syntax)?
04:13 committable6 naxieAlDle, https://gist.github.com/4ef103af1276adad35bce29a9b6524b4
04:14 naxieAlDle Todd: <{chr(9)}> perhaps
04:14 IOninja Todd: {chr 9)} instead of \t
04:14 IOninja s/)//
04:14 Todd testing
04:14 ZzZombo m: grammar A {token TOP { (<alnum>+ || <cntrl>+ || .)* } };class B { method TOP($/) { say $/ }};say A.parse(' founded the Evidenzbureau in 1850 as the ',:actions(B));
04:14 camelia rakudo-moar 7bebec: OUTPUT: «「 founded the Evidenzbureau in 1850 as the 」␤ 0 => 「 」␤ 0 => 「founded」␤  alnum => 「f」␤  alnum => 「o」␤  alnum => 「u」␤  alnum => 「n」␤  alnum => 「d」␤  alnum => 「e」␤  alnum => 「d」␤ 0 => 「 」␤ 0…»
04:14 IOninja Ah, right, naxieAlDle's version
04:15 ZzZombo hm... but I do need whitespaces covered
04:16 naxieAlDle ZzZombo: what about \s+ ?
04:16 ZzZombo m: grammar A {token TOP { (\s+ || <alnum>+ || <cntrl>+ || .)* } };class B { method TOP($/) { say $/ }};say A.parse(' founded the Evidenzbureau in 1850 as the ',:actions(B));
04:16 camelia rakudo-moar 7bebec: OUTPUT: «「 founded the Evidenzbureau in 1850 as the 」␤ 0 => 「 」␤ 0 => 「founded」␤  alnum => 「f」␤  alnum => 「o」␤  alnum => 「u」␤  alnum => 「n」␤  alnum => 「d」␤  alnum => 「e」␤  alnum => 「d」␤ 0 => 「 」␤ 0…»
04:16 ZzZombo is't it supposed to be the same?
04:17 naxieAlDle not at all
04:17 naxieAlDle but if you mean “one or more spaces”, then you need \s+
04:17 naxieAlDle or, optionally, you can redefine <ws> to mean \s+
04:23 Todd Thank you.. My test has a sybntax error.  once I figure it out, I will be back
04:26 Geth ¦ whateverable: 08d08fb9e7 | (Aleks-Daniel Jakimenko-Aleksejev)++ | 5 files
04:26 Geth ¦ whateverable: Make sure it is possible to add a comment after URLs
04:26 Geth ¦ whateverable:
04:26 Geth ¦ whateverable: Adds tests for issue #75.
04:26 Geth ¦ whateverable: review: https://github.com/perl6/whateverable/commit/08d08fb9e7
04:31 ZzZombo_ joined #perl6
04:31 ZzZombo_ joined #perl6
04:42 DnAeillaxe joined #perl6
04:44 ZzZombo_ joined #perl6
04:44 ZzZombo_ joined #perl6
04:47 silug joined #perl6
04:56 Exodist joined #perl6
05:00 pierrot joined #perl6
05:01 mcmillhj joined #perl6
05:10 Cabanossi joined #perl6
05:10 Geth ¦ whateverable: 5c8e78f444 | (Aleks-Daniel Jakimenko-Aleksejev)++ | t/committable.t
05:10 Geth ¦ whateverable: Test the fallback response
05:10 Geth ¦ whateverable:
05:10 Geth ¦ whateverable: Adds a test for issue #67.
05:10 Geth ¦ whateverable:
05:10 Geth ¦ whateverable: Generally, this fallback was added to handle buggy behavior. Any bot
05:10 Geth ¦ whateverable: should figure out what to respond for *any* given command. Committable
05:10 Geth ¦ whateverable: is the only bot that does not do so, which is why we are able to test
05:10 Geth ¦ whateverable: the fallback response. Arguably, this should be changed, but the
05:10 Geth ¦ whateverable: default response is actually spot on in this particular case.
05:10 Geth ¦ whateverable: review: https://github.com/perl6/whateverable/commit/5c8e78f444
05:47 CIAvash joined #perl6
05:50 samcv looks like latest kde adds support for EditorConfig
05:51 samcv that's neat
05:51 samcv editorconfig for everything!
05:57 Geth ¦ doc: fd7a41bca3 | (Zoffix Znet)++ | doc/Type/IO/Path.pod6
05:57 Geth ¦ doc: [io grant] Improve code example
05:57 Geth ¦ doc:
05:57 Geth ¦ doc: - remove Perl 5-ist parentheses
05:57 Geth ¦ doc: - avoid repetition of a variable
05:57 Geth ¦ doc: - fix incorrect Range (prose says "first three files")
05:57 Geth ¦ doc: - gather IO::Paths, not strings
05:57 Geth ¦ doc: - Don't use regex when we don't need it
05:57 Geth ¦ doc: - No need to test .f
05:57 Geth ¦ doc: review: https://github.com/perl6/doc/commit/fd7a41bca3
06:01 Geth ¦ doc: 110efb41af | (Zoffix Znet)++ | doc/Type/IO/Path.pod6
06:01 Geth ¦ doc: [io grant] No need for `.ends-with`
06:01 Geth ¦ doc: review: https://github.com/perl6/doc/commit/110efb41af
06:02 samcv good post by someone who worked at microsoft about programming and complexity https://hackernoon.com/complexity-and-strategy-325cd7f59a92#.ob7riudaf
06:04 Geth ¦ whateverable: daf479ad16 | (Aleks-Daniel Jakimenko-Aleksejev)++ | 5 files
06:04 Geth ¦ whateverable: Make sure bots understand their misspelled nicknames
06:04 Geth ¦ whateverable:
06:04 Geth ¦ whateverable: Adds tests for issue #39.
06:04 Geth ¦ whateverable: review: https://github.com/perl6/whateverable/commit/daf479ad16
06:07 faraco joined #perl6
06:08 faraco IONinja: I'm sure people will adopt it more in the future.
06:11 Todd Hi, I  am back.    I am still tryuing to figure out  `s:global|{chr(9)}|Z|`.    I create a test program to demonstrate the issue I am having.  http://vpaste.net/OIoMP   Would you guys mind taking a look at it?
06:12 IOninja Todd: it's <{chr 9}> not {chr 9}
06:12 cibs joined #perl6
06:13 IOninja You can also use \x[9]
06:13 IOninja What are you trying to do anyway?
06:13 Todd perl6 -e 'my $x="a\tb\tc"; say $x; $x ~~ s:global|<{chr(9)}>|z|; say $x'
06:13 Todd Null regex not allowed
06:13 DnAeillaxe m: my $x="a\tb\tc"; say $x; $x ~~ s:global|<{chr(9)}>|z|; say $x
06:13 camelia rakudo-moar 0f289a: OUTPUT: «a  b       c␤5===SORRY!5=== Error while compiling /home/camelia/EVAL_0␤Null regex not allowed␤at /home/camelia/EVAL_0:1␤------> 3anon regex {         7⏏5}␤»
06:14 IOninja m: my $x="a\tb\tc"; say $x; $x ~~ s:global|a<{chr(9)}>|z|; say $x
06:14 camelia rakudo-moar 0f289a: OUTPUT: «a  b       c␤5===SORRY!5=== Error while compiling /home/camelia/EVAL_0␤Null regex not allowed␤at /home/camelia/EVAL_0:1␤------> 3anon regex {         7⏏5}␤»
06:14 IOninja heh
06:14 DnAeillaxe wtf?
06:14 Todd perl6 -e 'my $x="a\tb\tc"; say $x; $x ~~ s:global|<{chr 9}>|z|; say $x'   same error
06:14 IOninja Todd: what are you trying to do?
06:15 DnAeillaxe maybe you'd love .trans more?
06:15 IOninja Ah
06:15 IOninja m: my $x="a\tb\tc"; say $x; $x ~~ s:ss:global|<{chr(9)}>|z|; say $x
06:15 camelia rakudo-moar 0f289a: OUTPUT: «a  b       c␤5===SORRY!5=== Error while compiling /home/camelia/EVAL_0␤Null regex not allowed␤at /home/camelia/EVAL_0:1␤------> 3anon regex {         7⏏5}␤»
06:15 Todd I am trying to put together an example subsitute file that shows how to subsitute a non-printable character that doesn't have a fancy `\t` for it
06:15 DnAeillaxe “{chr(9)}” ?
06:16 IOninja Well, whatever the switch to use significant spacing is
06:16 DnAeillaxe m: my $x="a\tb\tc"; say $x; $x ~~ s:ss:global|"{chr(9)">|z|; say $x
06:16 camelia rakudo-moar 0f289a: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3\tc"; say $x; $x ~~ s:ss:global|"{chr(9)7⏏5">|z|; say $x␤    expecting any of:␤        infix␤        infix stopper␤        statement end␤        s…»
06:16 DnAeillaxe m: my $x="a\tb\tc"; say $x; $x ~~ s:ss:global|"{chr(9)}">|z|; say $x
06:16 camelia rakudo-moar 0f289a: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Couldn't find terminator |␤at <tmp>:1␤------> 3c"; say $x; $x ~~ s:ss:global|"{chr(9)}"7⏏5>|z|; say $x␤    expecting any of:␤        horizontal whitespace␤        infix stopper␤        st…»
06:16 DnAeillaxe m: my $x="a\tb\tc"; say $x; $x ~~ s:ss:global|"{chr(9)}"|z|; say $x
06:16 camelia rakudo-moar 0f289a: OUTPUT: «a  b       c␤azbzc␤»
06:16 DnAeillaxe \o/
06:16 samcv why not just \x[9]
06:16 Todd perl6 -e 'my $x="a\tb\tc"; say $x; $x ~~ s:global|"{chr 9}"|z|; say $x'   Perfect!!!! Thank you!
06:17 DnAeillaxe m: my $x="a\tb\tc"; say $x; $x ~~ s:ss:global|\x<9>|z|; say $x
06:17 camelia rakudo-moar 0f289a: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Unrecognized backslash sequence: '\x'␤at <tmp>:1␤------> 3x="a\tb\tc"; say $x; $x ~~ s:ss:global|\7⏏5x<9>|z|; say $x␤»
06:17 samcv yeah gotta have the interpolation to have it actually act as a string not as code
06:17 samcv m: my $x="a\tb\tc"; say $x; $x ~~ s:ss:global|\x[9]|z|; say $x
06:17 camelia rakudo-moar 0f289a: OUTPUT: «a  b       c␤azbzc␤»
06:19 DnAeillaxe Todd: oh… so
06:19 DnAeillaxe m: my $x="a\tb\tc"; say $x; say $x.trans((chr 9,) => (‘Z’))
06:19 camelia rakudo-moar 0f289a: OUTPUT: «a  b       c␤aZbZc␤»
06:20 DnAeillaxe Todd: why not something like this?
06:21 samcv i'm still not sure what he.'s trying to do
06:21 Todd no reason.  I just want to get `s` down.  I am trying to learn its quirks
06:21 samcv replace tabs with z's?
06:21 samcv use \t or \x[7]
06:21 samcv or you can be weird and do "{ }" if you want, or even put code there
06:21 samcv or something
06:21 samcv well i mean code that creates the string literal
06:22 rindolf joined #perl6
06:22 samcv m: say 'abcdefg' ~~ s/"{'d' ~ 'e'}"/z
06:22 camelia rakudo-moar 0f289a: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Malformed replacement part; couldn't find final /␤at <tmp>:1␤------> 3say 'abcdefg' ~~ s/"{'d' ~ 'e'}"/z7⏏5<EOL>␤    expecting any of:␤        horizontal whitespace␤        infix stopper␤…»
06:22 samcv m: say 'abcdefg' ~~ s/"{'d' ~ 'e'}"/z/
06:22 camelia rakudo-moar 0f289a: OUTPUT: «Cannot modify an immutable Str␤  in block <unit> at <tmp> line 1␤␤»
06:22 samcv m: my $a = 'abcdefg'; $a ~~ s/"{'d' ~ 'e'}"/z/
06:22 camelia rakudo-moar 0f289a: ( no output )
06:22 samcv m: my $a = 'abcdefg'; say $a ~~ s/"{'d' ~ 'e'}"/z/
06:22 camelia rakudo-moar 0f289a: OUTPUT: «「de」␤»
06:23 samcv m: my $a = 'abcdefg'; $a ~~ s/"{'d' ~ 'e'}"/z/; say $a;
06:23 camelia rakudo-moar 0f289a: OUTPUT: «abczfg␤»
06:23 Todd `\x9` is hex?
06:23 samcv my bad. it returns the match, but changes the variable
06:23 samcv yes Todd
06:24 Todd waht is octal and what is base 10?
06:24 Todd \x9 worked too
06:25 samcv never done octal unicode before. sounds silly
06:25 DnAeillaxe \c[9] is dec
06:25 mcmillhj joined #perl6
06:25 samcv what
06:25 samcv you serious?
06:26 DnAeillaxe am I wrong?
06:26 samcv idk
06:26 samcv m: say "\c[BOY]"
06:26 camelia rakudo-moar 0f289a: OUTPUT: «????␤»
06:26 samcv that sure ain't a number
06:26 DnAeillaxe m: my $x="a\tb\tc"; say $x; $x ~~ s|“\c[97]”|z|; say $x
06:26 camelia rakudo-moar 0f289a: OUTPUT: «a  b       c␤z     b       c␤»
06:26 DnAeillaxe but that is
06:26 samcv m: say "\c[20]"
06:26 camelia rakudo-moar 0f289a: OUTPUT: «␤»
06:26 samcv huh. that's super weird... ok
06:26 DnAeillaxe :)
06:27 samcv until unicode names something that's all numbers i guess we'll be fine
06:27 samcv which is not allowed in their current rules. it has to start with an ascii letter
06:27 samcv cant't have two spaces in a row or two dashes in a row either
06:28 DnAeillaxe u: fullwidth five
06:28 unicodable6 DnAeillaxe, U+FF15 FULLWIDTH DIGIT FIVE [Nd] (5)
06:28 DnAeillaxe m: say “\c[55]”
06:28 camelia rakudo-moar 0f289a: OUTPUT: «7␤»
06:28 DnAeillaxe m: say “\c[555]”
06:28 camelia rakudo-moar 0f289a: OUTPUT: «ȫ␤»
06:29 samcv DnAeillaxe, so does it check the 1st character and see if it's a number?
06:29 samcv should look at the source. wherever it is in there
06:29 DnAeillaxe haven't seen the source code for this
06:29 samcv i did. a while ago
06:30 samcv well. actually recently. but not the part we're talking about. but it's probably the same file or maybe related. let me see
06:31 samcv cause i removed jvm's #?if since i added getstrfromname to jvm
06:31 DnAeillaxe m: say “\o[10”
06:31 camelia rakudo-moar 0f289a: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in octal character; couldn't find final ']' ␤at <tmp>:1␤------> 3say “\o[107⏏5”␤»
06:31 DnAeillaxe m: say “\o[10]”
06:31 camelia rakudo-moar 0f289a: OUTPUT: «␤»
06:31 DnAeillaxe okay, that's octal
06:31 samcv ew
06:32 samcv oh i must have only removed it from rakudo. nqp still has the ?if's in there
06:32 samcv i might have to regenerate the stages if i do that
06:33 samcv or maybe not. not sure about the jvm
06:33 travis-ci joined #perl6
06:33 travis-ci Doc build passed. Zoffix Znet '[io grant] No need for `.ends-with`'
06:33 travis-ci https://travis-ci.org/perl6/doc/builds/210199966 https://github.com/perl6/doc/compare/fd7a41bca34d...110efb41af0b
06:33 travis-ci left #perl6
06:33 DnAeillaxe https://github.com/perl6/nqp/blob/f414161e9cd0c77152b7a4333d6f6d67855d0817/src/HLL/Grammar.nqp#L162
06:34 DnAeillaxe m: say “\c[5_5_5]”
06:34 camelia rakudo-moar 0f289a: OUTPUT: «ȫ␤»
06:34 Todd I am not getting binay or octal to work `s:global|\o12|Q|`  `s:global|\b1001|R|`
06:34 travis-ci joined #perl6
06:34 travis-ci Doc build passed. Zoffix Znet '[io grant] Improve code example
06:34 travis-ci https://travis-ci.org/perl6/doc/builds/210199463 https://github.com/perl6/doc/compare/9c2b7269f606...fd7a41bca34d
06:34 travis-ci left #perl6
06:36 samcv that makes the code there make so much more sense now
06:36 DnAeillaxe Todd: it should be \o11
06:36 samcv i mean i had worked with it, but didn't know \c[99] would work, though it makes sense
06:36 mcmillhj joined #perl6
06:37 samcv yeah i need to regenerate the jvm stages
06:38 DnAeillaxe Todd: and binary is not going to work this way, I believe
06:39 Todd `s:global|\b1001|R` it is not.  The octal worked as soon as I put the right number in
06:39 DnAeillaxe samcv: what's the meaning of this? | <control=[ ?..Z ]>
06:39 Cabanossi joined #perl6
06:40 samcv idk where are you seeing that
06:41 DnAeillaxe https://github.com/perl6/nqp/blob/f414161e9cd0c77152b7a4333d6f6d67855d0817/src/HLL/Grammar.nqp#L166
06:41 DnAeillaxe looks like some dead code
06:41 DnAeillaxe and this is what happens with it later: https://github.com/perl6/nqp/blob/b069919fb8844a503b8afa374d01865fc5d52abd/src/HLL/Actions.nqp#L231-L232
06:42 samcv why do you say dead code?
06:42 DnAeillaxe how can you trigger it?
06:42 DnAeillaxe m: say "\c[A]" # nope
06:42 camelia rakudo-moar 0f289a: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Unrecognized character name [A]␤at <tmp>:1␤------> 3say "\c[A7⏏5]" # nope␤»
06:42 jpl_ joined #perl6
06:42 samcv https://github.com/perl6/nqp/blob/f414161e9cd0c77152b7a4333d6f6d67855d0817/src/HLL/Grammar.nqp#L143
06:43 IOninja DnAeillaxe: the meaning is set $<control> to the Match that matches <[?..Z]>
06:43 IOninja *matched
06:43 DnAeillaxe sure, that I understand
06:43 DnAeillaxe but I wonder why \c[A] doesn't work
06:44 IOninja Because there's no char named "A"?
06:44 IOninja Or is that the code that matches stuff?
06:44 ZzZombo_ joined #perl6
06:44 IOninja Ah
06:45 DnAeillaxe m: say "\cA"
06:45 DnAeillaxe ah
06:45 DnAeillaxe m: say "\cZ"
06:45 camelia rakudo-moar 0f289a: OUTPUT: «␤»
06:45 DnAeillaxe because I'm blind, yet again
06:45 DnAeillaxe ok now it makes sense
06:46 Todd Got another question: I asked the badly on the mailing list.  So, I will trying asking it a little more clearly.  We have all kinds of escaped characters for various things, for instance `\t`, `\n`, \d`, `\D` etc..  Is there a list of all these somewhere?
06:46 DnAeillaxe and also:
06:46 DnAeillaxe m: say "\c[55]"
06:46 camelia rakudo-moar 0f289a: OUTPUT: «7␤»
06:46 DnAeillaxe m: say "\c55"
06:46 camelia rakudo-moar 0f289a: OUTPUT: «7␤»
06:47 samcv Todd, start herehttps://docs.perl6.org/language/regexes#Backslashed,_predefined_character_classes
06:47 DnAeillaxe hm… ok nevermind
06:47 Todd Hi Sam!  Perfect!!  Thank you!
06:48 samcv np
06:49 Todd And, how about a list of all the special characters `:xxxx`, for instance, `:space` `:global` ?
06:51 DnAeillaxe Todd: https://docs.perl6.org/language/regexes#Adverbs what about this?
06:51 DnAeillaxe m: say "\c[BOY, 0x7_0, 0b110_011, 55]"
06:51 camelia rakudo-moar 0f289a: OUTPUT: «????p37␤»
06:51 DnAeillaxe ok
06:52 DnAeillaxe m: say "\cZ"
06:52 camelia rakudo-moar 0f289a: OUTPUT: «␤»
06:52 mcmillhj joined #perl6
06:53 * DnAeillaxe wonders why characters 0x1B…0x1F have no shortcut
06:54 parv joined #perl6
06:55 DnAeillaxe ah, because of the way it is implemented, maybe. Whatever. My horse is getting tired.
06:55 Todd DnAeillaxe:  I wanted that one too!  Thank you.  But I still need the long ones, like :space and :global
06:56 Todd You read my mind!
06:56 DnAeillaxe Todd: it's all there
06:58 Todd I just did not scroll far enough.  Thank you!
06:59 faraco .tell timotimo Sorry for a very late reply, here is the benchmark with whitenoise.pl -
06:59 yoleaux faraco: I'll pass your message to timotimo.
06:59 faraco real0m3.725s - user0m3.280s - sys0m0.120s
07:03 mcmillhj joined #perl6
07:09 Todd I am trying to count the number of letters in a string.  Not having much luck.  DuckDuckGo is giving me tons of Perl 5 examples.  Thisis what I have that does not work:
07:09 Todd perl6 -e 'my $x='12abc34'; my $i; for $x ~~ :global/\D/ {$i++;}; say $i;'
07:09 Cabanossi joined #perl6
07:10 Todd Doesn't like my ~~
07:13 ZzZombo_ Cannot resolve caller end(Text::Generator::BasicText::Actions: Match); none of these signatures match:
07:13 ZzZombo_ (Any:U $: *%_)
07:13 ZzZombo_ (Any:D $: *%_)
07:13 ZzZombo_ grammar Test
07:13 ZzZombo_ {
07:13 ZzZombo_ token TOP { ([<whitespace> || <word> || <symbol>]* <end>) }
07:13 ZzZombo_ ...token end { $ }
07:13 ZzZombo_ }
07:13 ZzZombo_ what's wrong?
07:14 Geth ¦ whateverable: ef025b9cb2 | (Aleks-Daniel Jakimenko-Aleksejev)++ | t/benchable.t
07:14 Geth ¦ whateverable: Benchable does this fallback thingy too
07:14 Geth ¦ whateverable: review: https://github.com/perl6/whateverable/commit/ef025b9cb2
07:15 DnAeillaxe Todd: why not just $x.chars ?
07:16 DnAeillaxe ah, number of letters…
07:16 DnAeillaxe fine
07:16 DnAeillaxe m: my $x='12abc34'; say +$x.comb(/\D/)
07:16 ZzZombo_ huh, renaming end to endd solved this.
07:16 camelia rakudo-moar 0f289a: OUTPUT: «3␤»
07:17 perlpilot joined #perl6
07:18 Todd I will have a time string `01:24` in hours and minutes format.  I need to test the string to make sure it is really a valid time string (I will be reading it from the clipboard).  So I wanted to know how many letter and how many numbers are in the string.  I also wanted to know how many colons were present.  So I wanteer to know the count of letters, numbers, and colons
07:18 DnAeillaxe m: my $x=‘12abc34’; my $t; $t++ if /\D/ for $x.comb; say $t
07:18 camelia rakudo-moar 0f289a: OUTPUT: «3␤»
07:18 Todd I will run your example
07:19 CIAvash Todd: m:global/\D/
07:20 Todd how do I use that
07:20 Todd ?
07:21 Todd Dn's example worked.
07:22 ZzZombo joined #perl6
07:23 CIAvash "m" is missing in the code you pasted, before :global
07:24 Todd my $i; for $x ~~ m:global/\D/ {$i++;}; say $i;'
07:24 Todd syntax error near unexpected token `~~'
07:25 IOninja m: subset ValidTime where {try DateTime.new: "2016-12-31T$_:00"};  say $_ ~~ ValidTime for '12:00', '28:00', '00:56'
07:25 camelia rakudo-moar 0f289a: OUTPUT: «True␤False␤True␤»
07:26 CIAvash m: my $x='12abc34'; my $i; for $x ~~ m:global/\D/ {$i++;}; say $i;
07:26 camelia rakudo-moar 0f289a: OUTPUT: «3␤»
07:26 CIAvash Todd: ↑
07:26 Todd testing
07:27 IOninja m: my $x='12abc34'; my $i = elems $x ~~ m:global/\D/; say $i
07:27 camelia rakudo-moar 0f289a: OUTPUT: «3␤»
07:29 Todd That worked worked  Thank you!  I take it "m" meant "match"?
07:34 Todd Thank you guy!  I have to call it quits for the night
07:37 * parv muses that Trigun ref showed up here. Hi there CIAvash.
07:38 jraglin joined #perl6
07:39 * parv just heard "Dad's blast was awesome". :-O
07:42 CIAvash hmm, it's not a Trigun ref
07:42 parv The "blast" was from Dragon Ball something.
07:43 mcmillhj joined #perl6
07:52 domidumont joined #perl6
07:53 robertle joined #perl6
07:55 wamba1 joined #perl6
07:57 domidumont joined #perl6
08:07 cibs joined #perl6
08:10 bjz_ joined #perl6
08:12 eroux joined #perl6
08:13 samcv m: say "\c[penguin #blah blah]"
08:13 camelia rakudo-moar 0f289a: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Unrecognized \c character␤at <tmp>:1␤------> 3say "\c[7⏏5penguin #blah blah]"␤    expecting any of:␤        argument list␤        double quotes␤        term␤»
08:13 samcv m: say "\c[penguin#blah blah]"
08:13 camelia rakudo-moar 0f289a: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Unrecognized \c character␤at <tmp>:1␤------> 3say "\c[7⏏5penguin#blah blah]"␤    expecting any of:␤        argument list␤        double quotes␤        term␤»
08:13 samcv hmm
08:15 samcv yeah that doesn't even work. i think somebody intented you to be able to put comments inside "\c[ ] things
08:16 samcv https://github.com/perl6/nqp/blob/f414161e9cd0c77152b7a4333d6f6d67855d0817/src/HLL/Grammar.nqp#L159
08:17 samcv yeah it doesn't even work across lines
08:19 Peter_R joined #perl6
08:20 Guest48672 joined #perl6
08:21 mcmillhj joined #perl6
08:31 cibs joined #perl6
08:31 jraglin joined #perl6
08:33 moritz lol I blogged: https://perlgeek.de/blog-en/perl-6/2017-011-variable.html
08:39 mcmillhj joined #perl6
08:50 fir3starter joined #perl6
08:50 fir3starter how do you check if two hashes are identical?
08:50 fir3starter m: {a => 5} == {a => 7}
08:50 camelia rakudo-moar 0f289a: OUTPUT: «WARNINGS for <tmp>:␤Useless use of "==" in expression "{a => 5} == {a => 7}" in sink context (line 1)␤»
08:50 parv smart op?
08:51 parv sorry, smart match.
08:51 fir3starter m: {a => 5} ~~ {a => 7}
08:51 camelia rakudo-moar 0f289a: ( no output )
08:51 gdonald joined #perl6
08:51 fir3starter m: say {a => 5} ~~ {a => 7};
08:51 camelia rakudo-moar 0f289a: OUTPUT: «False␤»
08:51 fir3starter m: say {a => 5} ~~ {a => 5};
08:51 camelia rakudo-moar 0f289a: OUTPUT: «False␤»
08:52 bjz joined #perl6
08:52 fir3starter smart match doesn't work
08:54 TEttinger m: say ({a => 5} ~~ {a => 5});
08:54 camelia rakudo-moar 0f289a: OUTPUT: «False␤»
08:54 TEttinger hm
08:54 CIAvash m: say {a => 5} eqv {a => 5};
08:54 camelia rakudo-moar 0f289a: OUTPUT: «True␤»
08:55 TEttinger thanks
08:55 TEttinger is eqv operator-like?
08:55 TEttinger it looks infix there
08:56 CIAvash https://docs.perl6.org/routine/eqv
08:56 fir3starter according to this http://www.dlugosz.com/Perl6/web/eqv.html it is an operator
08:57 TEttinger yep, and CIAvash's link too
08:57 TEttinger thanks
08:58 mcmillhj joined #perl6
08:59 samcv fir3starter, use eqv
08:59 fir3starter unfortunately it still doesn't work with this:
08:59 fir3starter m: {a => (5, 5)} eqv {a => [5, 5]}
08:59 camelia rakudo-moar 0f289a: OUTPUT: «WARNINGS for <tmp>:␤Useless use of "eqv" in expression "{a => (5, 5)} eqv {a => [5, 5]}" in sink context (line 1)␤»
09:00 fir3starter m: say {a => (5, 5)} eqv {a => [5, 5]};
09:00 camelia rakudo-moar 0f289a: OUTPUT: «False␤»
09:00 samcv fir3starter, how old is that site?
09:00 samcv documentation on eqv is here https://docs.perl6.org/routine/eqv
09:00 TEttinger those aren't equivalent, right?
09:01 samcv no they are different things
09:01 parv is eqv preferred over smart match? does https://docs.perl6.org/routine/$TILDE$TILDE list all the possible expected operands?
09:01 samcv say {a => (5, 5)} ~~ {a => [5, 5]};
09:01 samcv m: say {a => (5, 5)} ~~ {a => [5, 5]};
09:01 camelia rakudo-moar 0f289a: OUTPUT: «False␤»
09:01 samcv parv, uh smart match does different things in differetn contexts
09:01 fir3starter is there an operator that would treat these as equal?
09:01 TEttinger doesn't smart match check for contains?
09:01 samcv if you want to compare hashes, i don't think ~~ will help you
09:02 fir3starter ~~ checks if the number of keys is the same
09:02 samcv m: say {a => (5, 5)} eq {a => [5, 5]};
09:02 camelia rakudo-moar 0f289a: OUTPUT: «True␤»
09:02 samcv they both stringify the same, but that's not that great a way to do it. but works i suppose
09:03 samcv also i'm not sure fir3starter
09:03 samcv what is the application
09:03 parv is there any other current doc/article that discusses smartmatch in more details than https://docs.perl6.org/routine/$TILDE$TILDE?
09:04 samcv not sure parv but ~~ can do uh ranges
09:04 samcv and regex and uh
09:04 samcv well there's a list there
09:05 samcv if you don't understand one of those let me know. but that list is good.
09:05 fir3starter as i see in eq, element order matters
09:05 samcv plus it can match ranges too
09:05 fir3starter m: say {b => 1, a => 2} eq {a => 1, b => 2};
09:05 camelia rakudo-moar 0f289a: OUTPUT: «False␤»
09:05 fir3starter oops, my bad :D
09:05 samcv say {b => 1, a => 2}.Str
09:06 samcv m: say {b => 1, a => 2}.Str
09:06 camelia rakudo-moar 0f289a: OUTPUT: «a  2␤b     1␤»
09:06 fir3starter my mistake
09:06 parv ok, thanks samcv. would you say the list is complete?
09:06 samcv well aside from range
09:06 parv aye.
09:06 samcv i think so
09:06 samcv m: say 1..10 ~~ 1..5
09:06 camelia rakudo-moar 0f289a: OUTPUT: «False␤»
09:07 samcv m: say 1..5 ~~ 1..10
09:07 camelia rakudo-moar 0f289a: OUTPUT: «True␤»
09:07 samcv yeah it checks against the right hand side
09:07 samcv also parv generally if there's a number on the right side it'll do number semantics
09:07 samcv or if it's a string it'll stringify a number to compare
09:07 samcv m: say '9' ~~ 9
09:07 camelia rakudo-moar 0f289a: OUTPUT: «True␤»
09:08 samcv so that compares them numerically
09:08 samcv m: say 'a9' ~~ 9
09:08 camelia rakudo-moar 0f289a: OUTPUT: «False␤»
09:08 mcmillhj joined #perl6
09:08 parv hmm. hmm.
09:08 samcv m: say 'blah' ~~ Str
09:08 camelia rakudo-moar 0f289a: OUTPUT: «True␤»
09:08 samcv can do types
09:09 samcv m: {a => (5, 5)}».flat eqv {a => [5, 5]}».flat
09:09 camelia rakudo-moar 0f289a: OUTPUT: «WARNINGS for <tmp>:␤Useless use of "eqv" in expression "».flat eqv {a => [5, 5]}».flat" in sink context (line 1)␤»
09:09 samcv m: say {a => (5, 5)}».flat eqv {a => [5, 5]}».flat
09:09 camelia rakudo-moar 0f289a: OUTPUT: «False␤»
09:09 parv i see; helps to think of ~~ as test of subset (in case of range), or (sub)type.
09:09 samcv yeah thought that wouldn't do what i want
09:09 samcv yeah
09:09 samcv compared based on what is in the right hand side
09:10 samcv if it's a regex it uses regex, string it uses string semantics etc
09:11 ZzZombo I've been stuck for a while; how do I refer to each named capture in a rule like
09:11 ZzZombo token TOP { ([<whitespace> || <word> || <symbol>]* <eof>) }
09:11 ZzZombo in my action class?
09:13 fir3starter $<whitespace>, $<word>, ...?
09:15 parv is there an online perl6 REPL of some sort?
09:15 parv (short of here, to save my face)
09:18 mcmillhj joined #perl6
09:21 espadrine joined #perl6
09:22 samcv idk parv
09:23 parv samcv, no problemo
09:24 samcv ZzZombo, have you seen the grammar tutorial?
09:25 samcv https://docs.perl6.org/language/grammar_tutorial#Grammars_by_Example_with_Actions
09:25 samcv be back in a minute
09:28 CIAvash parv: depending on what you want to do, you can 「/msg camelia」 here or use https://glot.io/new/perl6
09:29 parv CIAvash: thanks. I just want to try some short snippets.
09:36 mcmillhj joined #perl6
09:40 Cabanossi joined #perl6
09:43 RabidGravy joined #perl6
09:45 MeirG joined #perl6
09:45 MeirG \help
09:46 MeirG \quit
09:46 MeirG \QUIT
09:47 ecocode it's /, not \
09:48 Todd joined #perl6
09:49 Todd quick question that I an not find on google for perl 6: how do I find out how many elements are in an array?
09:50 Todd This is perl 5:  perl -e 'my @x=qw[ aa bb cc ]; my $y=@x; print "$y\n";'    answer is 3
09:51 Todd This is my attempt at Perl 6:   perl6 -e 'my @x=qw[ aa bb cc ]; my $y=@x; print "$y\n";'   answer is aa bb cc
09:51 Todd scalar is not in perl6 either
09:53 ZzZombo I don't see anything relevant.
09:53 ZzZombo samcv
09:53 ZzZombo Todd
09:54 ZzZombo m: say (my @a=1,2,3).elems
09:54 camelia rakudo-moar 0f289a: OUTPUT: «3␤»
09:54 Sound joined #perl6
09:54 ZzZombo m: say (my @a=1,2,3)+0
09:54 camelia rakudo-moar 0f289a: OUTPUT: «3␤»
09:54 Todd Found it!  perl6 -e 'my @x=qw[ aa bb cc ]; say @x.elems;'     it is just .elems
09:54 mcmillhj joined #perl6
09:55 Todd Thank you ZZ!
09:55 Todd bye bye
09:57 rindolf joined #perl6
10:01 Todd back again.  what is the operator for modulus?  I want the remainder  5 mod 3 = 2
10:02 ZzZombo m: say 10 % 2
10:02 camelia rakudo-moar 0f289a: OUTPUT: «0␤»
10:02 Todd Thank you!  https://docs.perl6.org/language/operators#index-entry-Modulo_operator was no help
10:03 parv is variable binding another name for aliasing?
10:14 mcmillhj joined #perl6
10:16 eater joined #perl6
10:20 RabidGravy parv, whilst the effect may be like aliasing, it's somewhat different
10:20 jpl_ joined #perl6
10:21 RabidGravy https://docs.perl6.org/language/containers#Binding
10:22 parv RabidGravy, thanks; I just read that in moritz's post too https://perlgeek.de/blog-en/perl-6/2017-011-variable.html .
10:26 dct joined #perl6
10:33 mcmillhj joined #perl6
10:36 ZzZombo_ joined #perl6
10:44 dct joined #perl6
10:48 ilbelkyr joined #perl6
10:49 mcmillhj joined #perl6
10:53 domidumont joined #perl6
10:56 Todd is this the proper way to do an logical OR inside an "if"?
10:57 bjz joined #perl6
10:57 Todd if ( $NumCount < 2 ) || ( $LtrCount > 1 ) {do something}
11:02 RabidGravy I don''t think  you need the extra parentheses but yeah
11:03 Todd Then I will check for a short between the headsets.  :'(
11:05 Todd what is the question to ask if a variable is initialized?
11:05 ZzZombo_ m: say Any.defined
11:05 camelia rakudo-moar 0f289a: OUTPUT: «False␤»
11:05 gfldex Todd: there is more then one question for that
11:06 ZzZombo_ m: say defined 'asd'
11:06 camelia rakudo-moar 0f289a: OUTPUT: «True␤»
11:06 Todd Perfect!  Thank you!
11:06 gfldex Todd: see https://docs.perl6.org/language/typesystem#Undefinedness
11:07 eroux joined #perl6
11:08 Todd Thank you!  Bye Bye
11:09 ZzZombo_ b-but you don't even have to disconnect every time.
11:09 RabidGravy .seen jnthn
11:09 yoleaux I saw jnthn 11 Mar 2017 18:16Z in #perl6: * jnthn bbiab :)
11:09 RabidGravy not so much ab then :)
11:09 mcmillhj joined #perl6
11:11 jnthn .oO( Oh no, I'm being ab tested! )
11:11 jnthn RabidGravy: After something? :)
11:13 ZzZombo_ why does this suddenly not match <word>, but rather matches <symbol>:
11:13 ZzZombo_ token TOP { (<whitespace> || <word> || <symbol>)* }
11:13 ZzZombo_ token word { <.alnum>+ <[' & . , -]+:Dash_Punctuation+:Connector_Punctuation> <.alnum>+ }
11:13 ZzZombo_ token symbol { . } #everything else.
11:13 ZzZombo_ when parsing "Modern development"?
11:14 ZzZombo_ m: my token word { <.alnum>+ <[' & . , -]+:Dash_Punctuation+:Connector_Punctuation> <.alnum>+ };say "Modern development" ~~ /<&word>/
11:14 camelia rakudo-moar 0f289a: OUTPUT: «Nil␤»
11:14 ZzZombo_ hm
11:14 ZzZombo_ m: my token word { <.alnum>+ <[' & . , -]+:Dash_Punctuation+:Connector_Punctuation> <.alnum>+ };say "Modern development" ~~ /<.alnum>+ <[' & . , -]+:Dash_Punctuation+:Connector_Punctuation> <.alnum>+/
11:14 camelia rakudo-moar 0f289a: OUTPUT: «Nil␤»
11:14 ZzZombo_ what
11:14 robertle joined #perl6
11:14 ZzZombo_ it used to work
11:14 RabidGravy jnthn, well I just got round to looking at the Stomp::Server - do you anticipate that the tap on process-messages should be a  given/when ever the command or should it actually be split up with a bunch of greps into indivdual supplies for each command?
11:15 lukaramu joined #perl6
11:15 jnthn ZzZombo_: It expects alnum after the char class too?
11:15 ZzZombo_ m: my token word { <.alnum>+ <[' & . , -]+:Dash_Punctuation+:Connector_Punctuation> <.alnum>+ };say "Modern development" ~~ /(<.alnum>+ <[' & . , -]+:Dash_Punctuation+:Connector_Punctuation>)* <.alnum>+/
11:15 camelia rakudo-moar 0f289a: OUTPUT: «「Modern」␤»
11:15 ZzZombo_ yes
11:15 ZzZombo_ basically words like "AT&T", "half-way"
11:16 ZzZombo_ m: my token word { (<.alnum>+ <[' & . , -]+:Dash_Punctuation+:Connector_Punctuation>)* <.alnum>+ };say "Modern development" ~~ /<&word>/
11:16 camelia rakudo-moar 0f289a: OUTPUT: «「Modern」␤»
11:16 ZzZombo_ huh
11:16 ZzZombo_ when did I mess it up?
11:16 jnthn ZzZombo_: You didn't have the (...)* around the first part in the earlier examples, I think?
11:16 ZzZombo_ yes
11:17 mscha joined #perl6
11:18 jnthn RabidGravy: I think (it was ages ago though) I'd originally planned it so the listen connection would give you back an object per connection
11:19 jnthn RabidGravy: iirc, one supply is probably the most useful thing, because ordering matters
11:19 mscha m: class A { has Str $.s; method gist { $!s; } }; multi infix:<cmp>(A $a, A $b) { $a.s.chars <=> $b.s.chars }; (A.new(:s<aa>), A.new(:s<b>), A.new(:s<ccc>)).sort.say
11:19 camelia rakudo-moar 0f289a: OUTPUT: «(aa b ccc)␤»
11:19 mscha m:  class A { has Str $.s; method gist { $!s; } }; multi infix:<cmp>(A $a, A $b) { $a.s.chars <=> $b.s.chars }; (A.new(:s<aa>), A.new(:s<b>), A.new(:s<ccc>)).sort(&infix:<cmp>).say
11:19 camelia rakudo-moar 0f289a: OUTPUT: «(b aa ccc)␤»
11:19 mscha Shouldn't the first one output the same as the second?
11:19 jnthn RabidGravy: Like, if you get a begin transaction, then some messages, then a commit (I forget the exact commands)
11:19 mscha And if not, how can I change the default sort on custom opbjects?
11:20 mscha objects?
11:20 bjz joined #perl6
11:21 jnthn RabidGravy: So I guess in that sense it works a bit like sockets themselves: you get a supply of incoming connections, giving an object which has a supply of incoming things per connection.
11:24 jnthn mscha: That's expected I think, since operators are lexically scoped
11:25 jnthn So unless you pass in your current idea of what cmp is, then the sort method will see the one that exists where it's declared
11:26 rindolf joined #perl6
11:26 jnthn It's more typical in Perl 6 to express the sort condition when sorting, functional style (so .sort(*.s.chars)).
11:27 RabidGravy yeah,  the subscribe/unsubscribe case too
11:28 jnthn Indeed
11:29 mcmillhj joined #perl6
11:29 mscha jnthn: that's annoying, since in my actual case, I'd have to say .sort({ $^a.y <=> $^b.y || $^a.x <=> $^b.x })
11:30 jnthn mscha: Then implement cmp as you have, and just pass it in
11:30 jnthn In some languages, sort order is considered something owned by an object. Perl 6 just isn't one of them.
11:31 mscha Shame.
11:31 jnthn As opposed to, say, smartmatching, which is done via. implementing an ACCEPTS method
11:31 mscha Something for 6.d?
11:31 jnthn No.
11:31 jnthn At least, I'm pretty sure it's by design this way, not an oversight.
11:32 mscha OK, too bad.  Thanks.
11:33 gfldex mscha: you can .wrap operators in Perl 6
11:33 RabidGravy jnthn, so really a Stomp::Server::Connection should be thing that does the MessageStream I guess
11:34 parv later people.
11:34 jnthn RabidGravy: Yeah, that sounds reasonable
11:34 parv left #perl6
11:34 MasterDuke mscha: i noticed that project euler solution you posted yesterday was spending a lot of time in infix:<max> with Ints, so i added a candidate specific to that, it shaves a couple seconds off the time
11:35 MasterDuke also, make the loop variables native ints shaved another couple seconds
11:36 MasterDuke jnthn: left a question for you in #perl6-dev
11:37 mscha MasterDuke: “so i added a candidate specific to that”, what do you mean?
11:37 mscha Native ints: good idea.
11:38 MasterDuke https://github.com/rakudo/rakudo/commit/a9c51964a0 shows the change
11:39 MasterDuke i added a version of max and min specifically for Ints, ints, Nums, and nums
11:40 mscha Ah, you mean in Rakudo, not my script.
11:41 MasterDuke right. you could of course do the same thing manually if you don't want to update your rakudo
11:41 MasterDuke i don't know how you get it, but the next official rakudo release is a week from now
11:46 mcmillhj joined #perl6
11:47 Sound joined #perl6
11:48 mscha Thanks, MasterDuke, I'll get it eventually.  (Next Rakudo Star, probably.)
11:48 mscha m: class A { has Str $.s; method gist { $!s; } }; &infix:<cmp>.wrap(-> $a, $b { if $a ~~ A && $b ~~ A { $a.s.chars <=> $b.s.chars } else { callsame } }); (A.new(:s<aa>), A.new(:s<b>), A.new(:s<ccc>)).sort.say
11:48 camelia rakudo-moar 0f289a: OUTPUT: «(b aa ccc)␤»
11:49 mscha gfldex: that works!  Elegant?  Hmm, not really...
11:50 MasterDuke mscha: also, ++$x is faster than $x++, and $x = $x + 1 is faster still
11:50 jnthn Not to mention slow and not certain to work if we inline before you wrap ;P
11:51 mscha Seriously, MasterDuke?  I'll remember that.
11:51 mscha Any performance difference between $x = $x + 1 and $x += 1 ?
11:53 MasterDuke yeah, $x = $x + 1 is faster
11:56 mcmillhj joined #perl6
11:58 ZzZombo_ m: my token word { (<.alnum>+ <[' & . , -]+:Dash_Punctuation+:Connector_Punctuation>)* <.alnum>+ };say "Modern development India," ~~ /<&word>/
11:58 camelia rakudo-moar 0f289a: OUTPUT: «「Modern」␤»
11:58 Geth ¦ Inline-Perl5/master: 5 commits pushed by (Luc St-Louis)++, (Stefan Seifert)++
11:58 Geth ¦ Inline-Perl5/master: a8032aa90e | Add test for inner packages
11:58 Geth ¦ Inline-Perl5/master: 8f84aeda40 | Split require into require and !create_wrapper_class
11:58 Geth ¦ Inline-Perl5/master: 9c0c248f9b | Create wrappers for all Perl 5 packages loaded by a require call.
11:58 Geth ¦ Inline-Perl5/master: 1982bcbf81 | Inline the useful parts of $loaded
11:58 Geth ¦ Inline-Perl5/master: d82450a9f4 | Version 0.24
11:58 Geth ¦ Inline-Perl5/master: review: https://github.com/niner/Inline-Perl5/compare/e66fa091c8...d82450a9f4
11:58 ZzZombo_ m: my token word { (<.alnum>+ <[' & . , -]+:Dash_Punctuation+:Connector_Punctuation>)* <.alnum>+ };say "India," ~~ /<&word>/
11:58 camelia rakudo-moar 0f289a: OUTPUT: «Nil␤»
12:00 araraloren joined #perl6
12:05 mcmillhj joined #perl6
12:08 araraloren joined #perl6
12:09 andrzejku joined #perl6
12:10 Cabanossi joined #perl6
12:18 tbrowder hi #perl6
12:19 tbrowder i'm seeking some advice on a function name in a module i'm releasing soon
12:21 tbrowder the module is Number::More and has subs named dec2bin, etc., for conversion of unsigned integers between binary, octal, dcimal, and hexadecimal
12:22 grondilu I'd use adverbs
12:23 tbrowder i've just added a general transformation sub and have initially named it baseM2baseN (yuk), ideas?
12:23 tbrowder adverbs?
12:24 grondilu m: multi say(Int $n, :bin!) { say $n.fmt("0b%b"); }; say 5, :bin
12:24 camelia rakudo-moar 0f289a: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Malformed parameter␤at <tmp>:1␤------> 3multi say(Int $n, :7⏏5bin!) { say $n.fmt("0b%b"); }; say 5, :b␤»
12:24 grondilu m: multi say(Int $n, :$bin!) { say $n.fmt("0b%b"); }; say 5, :bin
12:24 camelia rakudo-moar 0f289a: OUTPUT: «0b101␤»
12:24 mcmillhj joined #perl6
12:25 grondilu ^adverbs are basically named parameters
12:25 Actualeyes joined #perl6
12:26 tbrowder i'm using adverbs (named params). my subs allow other feature. all i'm loooking for is a name for the general sub
12:26 grondilu foo2bar seems like a common enough idiom
12:27 grondilu it's not pretty but *
12:27 tbrowder yes, hence bin2dec, etc
12:27 grondilu yeah, go for it
12:28 grondilu though frankly perl6 already has lots of ways to display an integer in various bases
12:28 mscha m: sub baseM2baseN($x, $m, $n) { $x.parse-base($m).base($n) }; say baseM2baseN('1234', 8, 16);
12:28 camelia rakudo-moar 0f289a: OUTPUT: «29C␤»
12:29 tbrowder but a single sub for transforming base X to base Y is what i want to get a good name for.  baseX2baseY seems clunky. i've thought about shortening it to 'a2b'
12:29 mscha m: sub bin2dec($x) { $x.parse-base(2) }; say bin2dec('1011001010110111');
12:29 camelia rakudo-moar 0f289a: OUTPUT: «45751␤»
12:30 tbrowder i get it, all that is wrapped up and working nicely
12:33 mcmillhj joined #perl6
12:41 agentzh joined #perl6
12:49 ZzZombo joined #perl6
12:49 ZzZombo joined #perl6
12:51 mcmillhj joined #perl6
13:10 Cabanossi joined #perl6
13:10 mcmillhj joined #perl6
13:11 gdonald joined #perl6
13:13 moritz gimp tells me: "Metadata parasite seems to be corrupt"
13:14 moritz of the category "wut?"
13:15 DrForr Radiation damage on the way back from Ceti Alpha V?
13:22 ZzZombo undefine(($prefix,$word,$postfix)); # after this line...
13:22 ZzZombo $prev-word=$word; # dead code...
13:22 DrForr . o ( I see dead code );
13:23 ZzZombo m: my ($x,$y,$z)=1,23,5;undefine(($x,$y));$z=False;say $x,$y,$z
13:23 camelia rakudo-moar 0f289a: OUTPUT: «(Any)(Any)False␤»
13:23 ZzZombo what gives?
13:23 ZzZombo swapping the lines fixed the bug where $prev-word wasn't changed.
13:29 mcmillhj joined #perl6
13:34 lukaramu_ joined #perl6
13:35 tbrowder in general, should i use tokens or named regexes for one-off matching? i think tokens don't backtrack so may be faster
13:36 tbrowder how can i put a regex/token in an array so i can use it a
13:36 tadzik https://plus.google.com/114866592715069940152/posts/dz6UixNCYCH not sure if slowpoke, but maybe a worthy insight into making JSON::Fast faster or so :)
13:36 tbrowder use it something like "$a~~ @b[6]"
13:40 Cabanossi joined #perl6
13:42 gfldex m: my \r = /abc/; say 'abc' ~~ r
13:42 camelia rakudo-moar 0f289a: OUTPUT: «「abc」␤»
13:43 gfldex m: my @r = /abc/; say 'abc' ~~ @r.all
13:43 camelia rakudo-moar 0f289a: OUTPUT: «True␤»
13:43 gfldex tbrowder: ^^^
13:44 tbrowder hi, gfldex, can you show me how to put a regex or token in an array and use it, please?
13:45 fir3starter joined #perl6
13:46 cibs joined #perl6
13:46 tbrowder sorry, i'm still asleep, thanks!
13:48 mcmillhj joined #perl6
13:48 tbrowder ok, say i have 2 named regexes. can i put their names in an array and call them by index?
13:50 cog joined #perl6
13:58 moritz m: my token word { <:alpha>+ }; my token number { \d+ }; my @re = &word, &number; say '123' ~~ @re[1];
13:58 camelia rakudo-moar 0f289a: OUTPUT: «「123」␤»
13:58 moritz tbrowder: ^^
13:59 tbrowder thanks, moritz!
14:00 gfldex m: say so /abc/ ~~ Callable;
14:00 camelia rakudo-moar 0f289a: OUTPUT: «True␤»
14:00 gfldex tbrowder: this ^^^ is why it works
14:05 timotimo .botsnack
14:05 synopsebot6 om nom nom
14:05 yoleaux :D
14:05 yoleaux 06:59Z <faraco> timotimo: Sorry for a very late reply, here is the benchmark with whitenoise.pl -
14:05 DnAeillaxe joined #perl6
14:07 mcmillhj joined #perl6
14:07 tbrowder moritz: then i would need boolean coercion to successful match or not, correct?
14:08 nowan joined #perl6
14:08 moritz tbrowder: or just use it in a boolean context (like an 'if' statement)
14:10 MeirG joined #perl6
14:10 timotimo whitenoise.pl doesn't have a benchmark mode; it'd just run forever?
14:11 masak "What we need are *notions*, not notations" -- Gauss
14:11 masak I like that. feels relevant to some comments about syntax.
14:11 masak (hi, #perl6)
14:11 timotimo what we need are not ions!
14:11 masak timotimo: the funny thing is how syntactical your joke reply is :P
14:12 masak I fully buy that syntax *underpin* and *strengthen* notions rather than being the notions
14:12 ZzZombo So nobody has an idea why undefine caused unreachable code?
14:12 MeirG Hi folks. I was trying to intall Rakudo. It failed with 2503 error then with 2502 error. What's wrong?
14:13 masak MeirG: "2503 error"?
14:13 MeirG masak: yes, on Win10 64bits
14:14 timotimo ZzZombo: i have no idea what you mean by "dead code" there
14:14 timotimo or "unreachable"
14:15 masak MeirG: do you see an error message?
14:18 MeirG masak: Yes, just a second and I'll quote it...
14:19 timotimo oh, that's probably a visual c error then?
14:20 DrForr It looks like a .msi permission problem according to https://answers.microsoft.com/en-us/windows/forum/windows8_1-update/error-code-2503-2502-when-installing-msi-file/0aa6840f-e625-4075-b1c5-051da100c151
14:20 timotimo hah, this website recommends to kill explorer.exe and start a new one with admin privileges
14:21 timotimo nothing bad could ever happen there!
14:21 bjz_ joined #perl6
14:21 timotimo i fondly remember KDE3 used to - in some distros at least - give you a desktop background with lots of bombs on it and a big pop-up when you logged in as root
14:22 geekosaur suse did that, yeh
14:23 timotimo it was a work of art
14:23 MeirG "The installer has encounteredan unexpected error installing that package. This might indicate a problem with this package. The error code in 2503"
14:23 geekosaur as for the windows thing, you should be able to Run As Administrator the .msi
14:23 masak MeirG: huh.
14:23 masak MeirG: that's... disconcerting.
14:23 timotimo very strange
14:24 masak MeirG: is there anything higher up in the console output that seems to indicate there was a problem?
14:24 timotimo i don't think they're doing it from a console
14:24 masak MeirG: or are you interacting with a graphical interface that gives no such output?
14:24 timotimo that looks like typical output you'd get in a messagebox
14:24 masak aye
14:24 masak guess we'll have to try this ourselves on a Win64 box
14:25 masak and by "we", I mean "not me", because I don't own one... :)
14:25 MeirG I am an administrator. I will also look up DrForr's ling and report.masak: No, it is an msi file with doesn't invoke a consol window. It invoked an installation "wizard"
14:26 timotimo you can install msi from the console if you want, you need "msiexec /i foobar.msi" for that
14:26 timotimo but i'm not sure if it'll actually give any output on tho console
14:26 mcmillhj joined #perl6
14:27 timotimo actually, i'm almost sure it'll just give you the gui, too
14:27 timotimo it's how i install .msi things when i have wine
14:28 geekosaur you need an installer script to avoid the gui, I think
14:28 geekosaur been a while since I did that kind of stuff
14:30 RabidGravy I think I need a thing like Supply.merge but dynamic
14:30 DnAeillaxe to people who are subscribed to whateverable repo: I am about to reopen 11 issues that have no tests, please don't freak out :)
14:30 timotimo RabidGravy: what does "dynamic" mean?
14:31 timotimo like you can give it more supplies at any time?
14:31 masak MeirG: I wish I could give some firm guarantees we'll look into this -- but we're sort of volunteer-driven, so someone'll need to step up
14:31 RabidGravy timotimo, zackly
14:31 masak MeirG: in any case -- thanks for bringing this to our attention. I hope a solution will materialize soon.
14:31 timotimo you can look at the implementation of "migrate"
14:33 timotimo migrate takes a supply that spits out supplies and gives you a supply that'll always give values from the latest supply that was spat out by the supply-supply
14:34 timotimo so what you want is you start with a supply of supplies (where you feed in more and more supplies that are to be merged)
14:34 timotimo and whenever a supply is spat out by that supply-supply, it'll be taken into account for further emits
14:34 gfldex i just checked 2017.01-64bit on a clean win10 VM and it installs fine
14:34 RabidGravy I think my head hurts
14:35 gfldex didn't do updates lately, doing that now
14:35 mcmillhj joined #perl6
14:36 timotimo haha, RabidGravy :)
14:39 timotimo i think it'll be really rather simple to write
14:39 timotimo kind of like supply { whenever $supply-of-supplies -> $new-supply { whenever $new-supply -> $value { emit $value } } }
14:39 timotimo maybe that's enough
14:40 gfldex timotimo: can i have a supply that will write my code? :->
14:40 Cabanossi joined #perl6
14:40 timotimo gfldex: if you don't mind the code being evil, you can implement an ssh server that accepts any password and gives out a root shell
14:40 timotimo that should give you code within minutes of launching
14:41 gfldex sounds like a workable solution
14:41 timotimo it even ticks a whole bunch of buzzword checkboxes
14:41 gfldex windows update is shit
14:41 timotimo it's dependency injection, it's highly networked, it's multiple-failover, it's distributed (duh), it's platform-as-a-service, it's highly available
14:42 timotimo haha, yeah, tell me about it
14:42 gfldex it stalled at 10% for 20minutes and then it raced to 90% in 30 sec
14:42 timotimo i boot windows every couple of months to play new subnautica updates ...
14:42 gfldex now it stalls again
14:42 timotimo oh, you're getting off lucky
14:42 timotimo i usually wait a couple of hours while it's saying "looking for available updates"
14:43 timotimo i'm told it's because microsoft decided to put an np-complete problem into their update mechanism
14:43 timotimo i.e. "there's a bunch of things-to-be-fixed, and any patch can have any amount of things-to-be-fixed in them. find the optimal solution to cover all things-to-be-fixed with patches"
14:43 geekosaur sadly that was because they had something even worse before
14:43 geekosaur (namely not do that and break people's systems)
14:48 n1ce joined #perl6
14:50 timotimo anyway, there's something called "wsus offline updater"
14:50 timotimo it's a neat little gui that allows you to download a whole bunch of patch files up front, and also a little tool to apply all these updates
14:51 timotimo doing that five times in a row and rebooting in between multiple times ought to get your system up to date enough for the regular windows update to finish calculating its plan of action in under two hours
14:55 mcmillhj joined #perl6
14:56 tbrowder still seeking suggestions for a sub name for a general function that transforms a number in one base to that number in another base ( i don't need details of how to do that or suggested signatures).  see my github/tbrowder/Number-More-Perl6 repo for the WIP.
14:56 timotimo so, like, rebase" :P
14:57 tbrowder not bad!
14:57 tbrowder rebaseA2B
14:57 timotimo basetrans?
14:59 tbrowder those are good, timotimo. i've bern hung up with "x2y' as part of the name but i think yr ideas are better!
14:59 geekosaur in-base but I question the purpose
14:59 timotimo a fresh perspective can always do wonders
14:59 timotimo reinterpret-base
14:59 timotimo base2base
14:59 tbrowder amen, brudda!
14:59 geekosaur because internally it's going to be base 2 unless you are on a very experiemntal architecture or you re working with it in string format
15:00 timotimo of course this is about strings :)
15:00 Geth ¦ whateverable: 0874e785c2 | (Aleks-Daniel Jakimenko-Aleksejev)++ | t/bisectable.t
15:00 Geth ¦ whateverable: Test the hint about a useless result (⚠ + a note for contributors)
15:00 Geth ¦ whateverable:
15:00 Geth ¦ whateverable: Adds a test for issue #95.
15:00 Geth ¦ whateverable:
15:00 Geth ¦ whateverable: This is the last closed issue that needed a test. From now on, we will
15:00 Geth ¦ whateverable: have a similar policy that is used for rakudo development:
15:00 Geth ¦ whateverable:
15:00 Geth ¦ whateverable: <…commit message has 5 more lines…>
15:00 Geth ¦ whateverable: review: https://github.com/perl6/whateverable/commit/0874e785c2
15:00 geekosaur maybe as-base if in-base is considered ambiguous
15:04 geekosaur also if doing this a lot you might want a tagged representation (string + its base) to avoid the question of "so what base is '6' absent other information?" (could be any from 7 up to your limit)
15:04 mcmillhj joined #perl6
15:09 ZzZombo [21:21:59] <ZzZombo> undefine(($prefix,$word,$postfix)); # after this line...
15:09 ZzZombo [21:21:59] <ZzZombo> $prev-word=$word; # dead code...
15:09 ZzZombo [21:23:41] <ZzZombo> swapping the lines fixed the bug where $prev-word wasn't changed.
15:09 ZzZombo timotimo ^
15:10 timotimo yeah, i read all of that
15:10 timotimo i still don't understand what you mean?
15:10 timotimo $prev-word "wasn't" changed?
15:11 timotimo what do you get, what did you expect? because when i run code like that i get $prev-word set to Any, which is exactly what i expect
15:11 ZzZombo you know, forget it, doesn't matter now.
15:11 geekosaur minimal reproducing case, include rakudo version, consider also running with spesh disabled
15:12 timotimo perl6 -e 'my ($prefix, $word, $postfix) = <foo bar baz>; my $prev-word = "wtf"; dd $prefix, $word, $postfix; $prev-word = $word; undefine(($prefix, $word, $postfix)); dd $prefix, $word, $postfix; dd $prev-word'
15:12 timotimo this gives me foo bar baz first, then any any any, and $prev-word at the end is "bar"
15:13 timotimo and when i put the $prev-word = $word after the undefine, it gives me foo bar baz first, then any any any, and at the end $prev-word is any
15:13 timotimo which is also exactly what i expect ?!
15:13 ZzZombo yea, it is
15:13 timotimo i'm AFK for a bit now
15:14 timotimo but i'd love for you to explain what's up. maybe put it up on a pasting site or something, along with output and expected behavior
15:15 gfldex clean install on a recent win10 too
15:16 timotimo for some reason it really irks me that you seem to have found a problem with rakudo and you're not telling us
15:16 gfldex MeirG: can't reproduce, happy digging :)
15:16 timotimo well, either a problem with rakudo, or with the docs
15:17 RabidGravy we may never know
15:20 Peter_R joined #perl6
15:25 mcmillhj joined #perl6
15:31 tbrowder timotimo: i like 'rebase' best, what's yr fav of yr suggestions?
15:39 vendethiel joined #perl6
15:42 mcmillhj joined #perl6
15:46 timotimo i don't have a fav, they are all acceptable
15:47 gdonald joined #perl6
15:54 firestarter joined #perl6
15:55 Cabanossi joined #perl6
15:57 Geth ¦ doc: 9d408f0051 | titsuki++ | doc/Language/nativecall.pod6
15:57 Geth ¦ doc: Use num64 instead of num
15:57 Geth ¦ doc: review: https://github.com/perl6/doc/commit/9d408f0051
16:01 tbrowder timotimo: thanks...you're very easy to please!
16:03 mcmillhj joined #perl6
16:03 khw joined #perl6
16:12 tbrowder i would like to test modules on my Windows box and wonder if routines run and shell work there for calling cmd and Power Shell?
16:15 timotimo shell most probably invokes cmd
16:15 cibs joined #perl6
16:15 timotimo https://github.com/jnthn/p6-ssh-libssh/blob/master/Build.pm#L18
16:15 timotimo this is an example of how to invoke powershell
16:16 DnAeillaxe buggable: DOC
16:17 DnAeillaxe buggable: tag DOC
16:17 buggable DnAeillaxe, There is 1 ticket tagged with DOC; See http://perl6.fail/t/DOC for details
16:17 DnAeillaxe definitely my bad
16:22 Geth ¦ Inline-Perl5: beaa8ce8eb | (Stefan Seifert)++ | p5helper.c
16:22 Geth ¦ Inline-Perl5: Fix segfault in Inline::Perl5.new when loaded from Inline::Perl6 without multiplicity
16:22 Geth ¦ Inline-Perl5:
16:22 Geth ¦ Inline-Perl5: When perl is compiled without multiplicity, we want to throw a useful
16:22 Geth ¦ Inline-Perl5: exception when the user tries to create multiple interpreters. When loaded
16:22 Geth ¦ Inline-Perl5: via Inline::Perl6 we did not take the already running interpreter into
16:22 Geth ¦ Inline-Perl5: account. Now instead of segfaulting, we point the user at the actual
16:22 Geth ¦ Inline-Perl5: source of the problem.
16:22 Geth ¦ Inline-Perl5:
16:22 Geth ¦ Inline-Perl5: Fixes GH #73
16:22 Geth ¦ Inline-Perl5: review: https://github.com/niner/Inline-Perl5/commit/beaa8ce8eb
16:23 Geth ¦ ecosystem: Demayl++ created pull request #309: rename META of Email::Valid and add tags
16:23 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/pull/309
16:25 tbrowder timotimo: nice link...thanks!
16:25 Geth ¦ ecosystem: 250d5c90c7 | Demayl++ | META.list
16:25 Geth ¦ ecosystem: rename META of Email::Valid and add tags
16:25 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/250d5c90c7
16:25 Geth ¦ ecosystem: a7ddf8d71a | (Itsuki Toyota)++ | META.list
16:25 Geth ¦ ecosystem: Merge pull request #309 from Demayl/master
16:25 Geth ¦ ecosystem:
16:25 Geth ¦ ecosystem: rename META of Email::Valid and add tags
16:25 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/a7ddf8d71a
16:32 mcmillhj joined #perl6
16:43 agentzh joined #perl6
16:45 fir3starter joined #perl6
16:47 eroux joined #perl6
16:51 mcmillhj joined #perl6
16:54 f1r3starter joined #perl6
16:59 agentzh joined #perl6
17:01 firestarter joined #perl6
17:03 Khisanth joined #perl6
17:11 nine Darn...I have a very neat fix for Inline::Perl6, but it depends on an implementation detail of the recent require-fixes.
17:12 nine Right now in Perl 5 'v6::run("use Foo;"); v6::call("Foo::bar");' won't work due to the lexicalness of "use Foo"
17:12 mcmillhj joined #perl6
17:12 espadrine joined #perl6
17:15 mst nine: I always thought it was odd that you were doing that rather than having a context object to run against
17:16 nine Now with the recent fixes, a require statement installs a lexical %REQUIRE_SYMBOLS which we use with indirect lookup ::($foo). Since v6::call and v6::invoke use indirect lookup, I can easily save and restore %REQUIRE_SYMBOLS.
17:19 mst right, if you basically turn them into implicit calls on a global context
17:19 mst that should be basically sane
17:20 nine Yep. Except that it turns %REQUIRE_SYMBOLS in a public API which is not really what I had in mind when introducing it.
17:20 mst and, er, you could always add an api to rakudo that's equivalent to Eval::WithLexicals or Devel::LexAlias or something
17:21 mst a persistent lexical scope module would make it much easier to build repls
17:21 mst and, y'know, look what we inflicted on CPAN as a result of perl5 not having an API for it ;)
17:21 nine Thing is that EVAL already takes an optional context object. But that's a PseudoStash which is...not exactly a straight forward data structure.
17:22 mcmillhj joined #perl6
17:23 BenGoldberg joined #perl6
17:24 mxco86 joined #perl6
17:41 mcmillhj joined #perl6
17:53 mcmillhj joined #perl6
17:53 ugexe samcv: did you ever try leaving the TCI language as perl but change https://github.com/rakudo/rakudo/blob/nom/.travis.yml#L22 to `openjdk-7-jdk` instead of -jre?
17:53 samcv ugexe, yeah it has a too old perl version
17:53 samcv oh. uhm
17:54 samcv uh i tried it once. you can go ahead and try now if you want. it's working fine right?
17:54 ugexe yeah, but the change to the nqp travis-ci reminded me to follow up
18:02 ugexe easier to do things like get a perl with the correct version/compile args (for say Inline::Perl5) under the perl env
18:05 ugexe e.g. `language: perl, perl: 5.14-shrplib`
18:10 Cabanossi joined #perl6
18:11 mcmillhj joined #perl6
18:12 * ugexe has been meaning to add $version-[moar-jvm] enum options to perl6 TCI ala `perl6: - 2017.01-moar, - 2017.01-jvm`
18:18 xinming joined #perl6
18:19 rindolf joined #perl6
18:22 mcmillhj joined #perl6
18:35 f1r3starter joined #perl6
18:41 mcmillhj joined #perl6
18:43 grumble joined #perl6
18:51 leedo joined #perl6
18:52 leedo joined #perl6
19:01 mcmillhj joined #perl6
19:05 spebern joined #perl6
19:14 sena_kun joined #perl6
19:22 mcmillhj joined #perl6
19:27 chansen_ Does Perl6 expose a API for Unicode sets?
19:27 chansen_ .. Unicode sets
19:27 DnAeillaxe chansen_: hmmm… what unicode sets?
19:28 DnAeillaxe chansen_: is there something specific you need?
19:28 chansen_ DnAeillaxe: combination of Unicode properties!
19:29 DnAeillaxe oh, sure. Do you need it in a regex;
19:29 DnAeillaxe ?
19:29 DnAeillaxe m: say ‘hello②world’ ~~ /<:No>/
19:29 camelia rakudo-moar 0f289a: OUTPUT: «「②」␤»
19:29 chansen_ DnAeillaxe: No, i'm looking for a clean API that I can steal and implement in P5 ;o)
19:30 agentzh joined #perl6
19:31 DrForr Perl6 has \P{}.
19:31 DrForr Er, perl5
19:33 mcmillhj joined #perl6
19:33 geekosaur I don't think it has a good set story for them though (e.g. a generalization of [] like p6's that lets you subtract sets and such)
19:35 chansen_ DrForr: I'm aware what P5 provides! The reason I asked for a clean API to access Unicode Blocks, Scripts and Properties was for inspiration, but it seems that Perl6 doesn't provide that.
19:37 chansen_ samcv: ^^?
19:38 geekosaur I thought there was something for that these days... maybe not the API you were hoping for though (in which case yes, you want to talk to samcv)
19:38 DnAeillaxe chansen_: so you want to look up characters based on properties and stuff?
19:40 DrForr .uniprop and .uniname handles at least properties, but scripts and blocks seem missing. Maybe .uniscript and .uniblock would be possible?
19:40 unicodable6 DrForr, U+006E LATIN SMALL LETTER N [Ll] (n)
19:40 unicodable6 DrForr, U+0069 LATIN SMALL LETTER I [Ll] (i)
19:40 unicodable6 DrForr, 135 characters in total: https://gist.github.com/344ebf70e34723b1562f2ac67109b879
19:40 DnAeillaxe but that's one of the properties
19:41 chansen_ DnAeillaxe: Let's say I wanted to union two scripts and differentiate a block and union two block properties?
19:41 DnAeillaxe DrForr: sorry for that, that was a bug :D
19:41 DnAeillaxe uniprop: ½
19:41 DnAeillaxe unidump: ½
19:41 unicodable6 DnAeillaxe, https://gist.github.com/e9ccb3b9f86c41e49bd634dfcb668c1d
19:41 cdg joined #perl6
19:42 DnAeillaxe chansen_: okay, then you use Block and Script properties
19:42 DnAeillaxe let's see
19:43 agentzh joined #perl6
19:43 DnAeillaxe m: say ‘½’ ~~ /<:Block(‘Latin-1 Supplement’) + :Script(‘Common’)>/
19:43 camelia rakudo-moar 0f289a: OUTPUT: «「½」␤»
19:43 DnAeillaxe like this?
19:45 DnAeillaxe u: { .chr ~~ /<:Block(‘Latin-1 Supplement’) + :Script(‘Common’)>/ }
19:45 unicodable6 DnAeillaxe, U+0000 <control-0000> [Cc] (control character)
19:45 unicodable6 DnAeillaxe, U+0001 <control-0001> [Cc] (control character)
19:46 DnAeillaxe oops…
19:47 adu joined #perl6
19:48 Xliff_ joined #perl6
19:50 chansen_ DnAeillaxe: with all respect, you are clearly not familiar with Unicode enough to answer this question ;)
19:51 DnAeillaxe chansen_: perhaps. But it would definitely help if you said what exactly you're trying to do
19:51 DnAeillaxe chansen_: if you want to actually match stuff, then what I've shown above should work
19:52 DnAeillaxe but if not, then I guess you're trying to do something else
19:52 mcmillhj joined #perl6
19:53 Ven joined #perl6
19:53 agentzh joined #perl6
19:53 chansen_ DnAeillaxe: I have answered you already!
19:53 chansen_ 20:41:02 <chansen_> DnAeillaxe: Let's say I wanted to union two scripts and differentiate a block and union two block properties?
19:55 cdg joined #perl6
19:57 RabidGravy jnthn, I've just pushed a very crude start to an implementation of SUBSCRIBE/UNSUBSCRIBE to Stomp::Server
19:59 DnAeillaxe chansen_: OK, I might sound stupid to you and you'll lose all hope, but how come <:Script(‘Cyrillic’) + :Script(‘Common’)> is not a “union of two scripts”?
20:00 DnAeillaxe the rest you get in a similar fashion
20:01 espadrine joined #perl6
20:05 DnAeillaxe ?
20:06 chansen_ DnAeillaxe: thats the union, how do you differentiate a block and union two block properties and provide the difference?
20:07 DrForr Subtract?
20:07 chansen_ DrForr: true
20:10 DnAeillaxe chansen_: if you want to have an intersection, you'll have to use & outside of <>
20:10 chansen_ The question was if there was a simple way of achieve this in Perl6, and if there was I would like to steal it to p5, but it seems that tis wheel hasten't been invented in p6
20:11 DnAeillaxe so… that's not simple enough?
20:12 moritz didn'T we have intersection in char classes too?
20:12 DrForr What are we missing? What's a simpler solution?
20:12 DnAeillaxe moritz: trying to find a ticket, but no
20:12 DnAeillaxe moritz: NYI
20:13 mcmillhj joined #perl6
20:13 DnAeillaxe moritz: RT #130419
20:13 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=130419
20:16 jferrero_ Hi! I need an example for enum's constants exported into a module.
20:18 bjz joined #perl6
20:18 chansen_ DnAeillaxe: How do I union two script properties subtract a block and union two other block properties and print out the resulting set?
20:19 DnAeillaxe chansen_: Oh, so you want to look up these characters, not to match stuff! Finally we know :)
20:22 DnAeillaxe chansen_: there is indeed no API to do this stuff. Unicodable bot, for example, goes through the whole 0..0x10FFFF range and tries to match every character
20:23 DnAeillaxe chansen_: this takes a second or two… which I guess is less than awesome. Again, it depends on what you actually need this for
20:24 wamba1 joined #perl6
20:24 DnAeillaxe chansen_: what you are asking for is basically a little database you can make queries for :) Not sure if the language itself should provide this, but I'd definitely love to see a module for this!
20:24 b2gills m: say (0..0x10FFFF).map(*.chr).grep: /<:L - :Ll>/
20:24 camelia rakudo-moar 0f289a: OUTPUT: «(A B C D E F G H I J K L M N O P Q R S T U V W X Y Z ª º À Á Â Ã Ä Å Æ Ç È É Ê Ë Ì Í Î Ï Ð Ñ Ò Ó Ô Õ Ö Ø Ù Ú Û Ü Ý Þ Ā Ă Ą Ć Ĉ Ċ Č Ď Đ Ē Ĕ Ė Ę Ě Ĝ Ğ Ġ Ģ Ĥ Ħ Ĩ Ī Ĭ Į İ IJ Ĵ Ķ Ĺ Ļ Ľ Ŀ Ł Ń Ņ …»
20:24 DrForr regexes could possibly be introspected to a junction.
20:26 cschwenz joined #perl6
20:26 DrForr Though something like .chr.uniprop would be better... Maybe a core module that introspects the Unicode tables at compile time.
20:26 agentzh joined #perl6
20:29 cschwenz so, when using qqx{…} and the executed command spews diagnostic messages to STDERR — on the Perl 6 side, how do i capture them?
20:30 DnAeillaxe /o\ qqx
20:30 DrForr Incidentally, when using sub MAIN(..), I don't see where the options are spec'ed.
20:30 moritz cschwenz: buy using run(@command, :out, :err) instead, or Proc::Async
20:31 moritz cschwenz: or with 2>&1 inside qqx
20:31 cschwenz moritz++
20:31 DnAeillaxe cschwenz: see some examples here: https://docs.perl6.org/type/Proc
20:32 moritz cschwenz: or see https://perlgeek.de/blog-en/perl-6/2017-001-book-silent-cron.html for an example that uses Proc::Async
20:32 cschwenz awesome, thanks all!  :-D
20:34 mcmillhj joined #perl6
20:35 DrForr Ah, Bool :$flag is the key.
20:41 jferrero Is possible to export class' enum constant?
20:41 skids joined #perl6
20:42 moritz enum Foo is export <...>; # I believe
20:48 mcmillhj joined #perl6
21:02 cibs joined #perl6
21:12 DrForr Perl6::Tidy out on github, not putting it up on the ecosystem until it does something non-trivial.
21:13 mcmillhj joined #perl6
21:13 silug joined #perl6
21:15 sjn nice!
21:16 IOninja DrForr: out on Github where?
21:16 DrForr github.com/drforr/perl6-Perl6-Tidy
21:17 sjn DrForr: are you up for feature requests? :)
21:18 DrForr Issues are probably the best way to handle this, but yes.
21:18 cdg_ joined #perl6
21:19 sjn "Produce output according to vim modeline in input text" :)
21:19 DrForr https://github.com/drforr/perl6-Perl6-Tidy/blob/master/lib/Perl6/Tidy.pm6 walks the token stream and filters out comments optionally. 6 lines is all it needs.
21:20 MasterDuke DrForr++
21:20 sjn yeah, DrForr++ deserves some extra karma today \o/
21:20 TEttinger joined #perl6
21:21 sjn and praise and gratitude and stuff :)
21:21 sena_kun DrForr++, a really good work on that
21:22 IOninja What's .Bridge method for?
21:22 mcmillhj joined #perl6
21:23 RabidGravy it's for making James Brown tracks with :)
21:25 cschwenz left #perl6
21:26 DrForr Wow. Thanks.
21:27 moritz IOninja: basically for converting to common numeric ground
21:28 IOninja moritz: I don't get it... Why have an extra method call when all of them are converting to Num? Why not just call Num?
21:28 vike joined #perl6
21:28 DrForr If I were slightly smarter what I"d do is add a Perl6::Catchall "token" that gets added when the code can't figure out what to do with a given tag instead of die as it currently does, so I can refine stepwise a little easier
21:29 DrForr Tomorrow, maybe.
21:29 moritz m: say [^5].head(3)
21:29 camelia rakudo-moar 0f289a: OUTPUT: «(0 1 2)␤»
21:29 moritz m: say [^5].head(10)
21:29 camelia rakudo-moar 0f289a: OUTPUT: «(0 1 2 3 4)␤»
21:29 moritz m: say [^5][^10]
21:29 camelia rakudo-moar 0f289a: OUTPUT: «(0 1 2 3 4 (Any) (Any) (Any) (Any) (Any))␤»
21:29 IOninja m: say [^5][lazy ^10]
21:29 camelia rakudo-moar 0f289a: OUTPUT: «(0 1 2 3 4)␤»
21:31 moritz fascinating
21:31 moritz nick ListNinja
21:33 DnAeillaxe m: say (^∞).head(∞).is-lazy
21:33 camelia rakudo-moar 0f289a: OUTPUT: «True␤»
21:33 DnAeillaxe m: say (^999999999999).head(∞).is-lazy
21:33 camelia rakudo-moar 0f289a: OUTPUT: «False␤»
21:33 mcmillhj joined #perl6
21:33 DnAeillaxe so is-lazy propagates through?
21:34 IOninja Yes.
21:36 DrForr Incidentally, you can walk back and forth, up to parents and down to children from a give node. I'm thinking abot removing that ability though because it ort of lets you break encapsulation, if you can use something other than built-in terator methods to walk the list.
21:51 labster joined #perl6
21:52 wamba1 joined #perl6
21:53 mcmillhj joined #perl6
21:54 cdg joined #perl6
22:00 spebern DrForr: did you have time to look at my attempt of fixing the antlr translater?
22:02 mcmillhj joined #perl6
22:05 ggoebel joined #perl6
22:13 jnthn RabidGravy: Nice; don't see anything wrong after having a look over it
22:13 eroux joined #perl6
22:22 mcmillhj joined #perl6
22:24 Geth ¦ whateverable: 7fbfd2c26c | (Aleks-Daniel Jakimenko-Aleksejev)++ | 2 files
22:24 Geth ¦ whateverable: Space should be required after .u
22:24 Geth ¦ whateverable:
22:24 Geth ¦ whateverable: Otherwise unicodable may answer on any message starting with .u (as it
22:24 Geth ¦ whateverable: just happened).
22:24 Geth ¦ whateverable: review: https://github.com/perl6/whateverable/commit/7fbfd2c26c
22:25 unicodable6 joined #perl6
22:25 DnAeillaxe .uniprops blabla
22:25 DnAeillaxe there, fixed :)
22:30 DnAeillaxe hugme
22:30 DnAeillaxe huggable: bots
22:30 huggable DnAeillaxe, The #perl6 irc channel normally hosts several helpful bots.  I am a bot, and camelia, benchable, bisectable, buggable, committable, dalek, ilbot, NeuralAnomaly, SourceBaby, synopsebot6, Undercover, yoleaux are other bots who are usually here.
22:33 DnAeillaxe huggable: bots :is: The #perl6 irc channel normally hosts several helpful bots. I am a bot, and everyone else voiced on this channel is a bot. See the full list here: https://github.com/perl6/doc/issues/711#issuecomment-235414744
22:33 huggable DnAeillaxe, Added bots as The #perl6 irc channel normally hosts several helpful bots. I am a bot, and everyone else voiced on this channel is a bot. See the full list here: https://github.com/perl6/doc/issues/711#issuecomment-235414744
22:33 mcmillhj joined #perl6
22:36 vendethiel joined #perl6
22:39 dct joined #perl6
22:45 Voldenet joined #perl6
22:45 Voldenet joined #perl6
22:54 cdg joined #perl6
22:57 BenGoldberg s: ("EVAL" && EVAL("42")), "Str"
22:57 SourceBaby BenGoldberg, Sauce is at https://github.com/rakudo/rakudo/blob/f190f24/src/core/Mu.pm#L454
22:59 BenGoldberg s: ("shell" && shell("ls") && 42), "Str"
22:59 SourceBaby BenGoldberg, Sauce is at appveyor.yml
22:59 SourceBaby joined #perl6
22:59 BenGoldberg IOninja, I think you need to improve sub is-safish ;)
22:59 geekosaur o.O
23:00 IOninja BenGoldberg: easier to just make the bot ignore you.
23:01 * BenGoldberg apologizes
23:02 mcmillhj joined #perl6
23:03 n1ce joined #perl6
23:03 BenGoldberg I'm not being mean, just pointing out that a malicious user might exploit your bot -- I only ran 'ls', but someone else might do something worse.
23:03 Cabanossi joined #perl6
23:09 BenGoldberg s: ((return "really simple"))
23:09 SourceBaby BenGoldberg, Something's wrong: ␤ERR: Attempt to return outside of any Routine␤  in block <unit> at -e line 6␤␤
23:10 BenGoldberg s: ((put("really simple\n") && 42), 'Int')
23:10 SourceBaby BenGoldberg, Something's wrong: really simple␤␤␤ERR: Cannot resolve caller sourcery(List); none of these signatures match:␤    ($thing, Str:D $method, Capture $c)␤    ($thing, Str:D $method)␤    (&code)␤    (&code, Capture $c)␤  in block <unit> at -e line 6␤␤
23:16 DnAeillaxe BenGoldberg: it's not just that
23:16 DnAeillaxe BenGoldberg: most bots here are kind of vulnerable to this
23:17 DnAeillaxe BenGoldberg: RESTRICTED setting practically does nothing
23:17 DnAeillaxe BenGoldberg: interestingly, right now I'm working on making whateverable more secure…
23:17 DnAeillaxe but yeah, if somebody can contribute that, please do :P
23:18 BenGoldberg s: "foo", Str ) && ("test
23:18 SourceBaby BenGoldberg, Something's wrong: ␤ERR: ===SORRY!=== Error while compiling -e␤Unable to parse expression in double quotes; couldn't find final '"' ␤at -e:7␤------> <BOL><HERE><EOL>␤    expecting any of:␤        double quotes␤        term␤
23:18 BenGoldberg s: "foo", Str ) && ("test"
23:18 SourceBaby BenGoldberg, Something's wrong: ␤ERR: Cannot resolve caller sourcery(Str, Str); none of these signatures match:␤    ($thing, Str:D $method, Capture $c)␤    ($thing, Str:D $method)␤    (&code)␤    (&code, Capture $c)␤  in block <unit> at -e line 6␤␤
23:19 BenGoldberg s: &say, \() ) && ("test"
23:19 SourceBaby BenGoldberg, Something's wrong: ␤ERR: Index out of range. Is: 1, should be in 0..0␤  in block <unit> at -e line 6␤␤Actually thrown at:␤  in block <unit> at -e line 6␤␤
23:19 BenGoldberg s: &say, \() ) && ("test", "foo"
23:19 SourceBaby BenGoldberg, Something's wrong: foo␤␤ERR:
23:20 BenGoldberg s: &say, \() ) && ("test", "github sucks #perl6 rocks!"
23:20 SourceBaby BenGoldberg, Sauce is at github sucks #perl6 rocks!
23:20 DnAeillaxe :|
23:21 BenGoldberg Whee ;)
23:21 agentzh joined #perl6
23:23 mcmillhj joined #perl6
23:25 SourceBaby joined #perl6
23:27 SourceBaby joined #perl6
23:29 bjz joined #perl6
23:29 SourceBaby joined #perl6
23:31 SourceBaby joined #perl6
23:33 SourceBaby joined #perl6
23:36 gdonald joined #perl6
23:39 Geth ¦ ecosystem: 74c3f6d7c1 | (Tom Browder)++ | META.list
23:39 Geth ¦ ecosystem: add module Number::More
23:39 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/74c3f6d7c1
23:43 mcmillhj joined #perl6
23:44 DnAeillaxe m: ‘
’.uniname.say
23:44 camelia rakudo-moar 212cc8: OUTPUT: «PARAGRAPH SEPARATOR␤»
23:44 DnAeillaxe e: ‘
’.uniname.say
23:45 DnAeillaxe :|
23:45 DnAeillaxe s: hello
world
23:45 SourceBaby DnAeillaxe, Something's wrong: ␤ERR: ===SORRY!=== Error while compiling -e␤Undeclared routine:␤    hello used at line 6. Did you mean 'shell'?␤␤
23:45 DnAeillaxe s: ‘
’
23:45 DnAeillaxe s: ‘ ’
23:45 SourceBaby DnAeillaxe, Something's wrong: ␤ERR: Cannot resolve caller sourcery(Str); none of these signatures match:␤    ($thing, Str:D $method, Capture $c)␤    ($thing, Str:D $method)␤    (&code)␤    (&code, Capture $c)␤  in block <unit> at -e line 6␤␤
23:45 DnAeillaxe s: ‘
’
23:45 DnAeillaxe he-heey!
23:46 DnAeillaxe IOninja: now that's something interesting!
23:46 DnAeillaxe haven't figured it out yet
23:47 DnAeillaxe but that's why unicodable failed a little bit earlier today
23:48 DnAeillaxe and if I got it right, JSON::Tiny is unable to work with this character also
23:48 DnAeillaxe but I'm still investigating…
23:52 DnAeillaxe m: say so 0x2029.chr ~~ /\n/
23:52 camelia rakudo-moar 212cc8: OUTPUT: «True␤»
23:53 IOninja In the log I see it's messing with parsing of IRC protocol. The ❚⚠❚ : WORLD bit is never supposed to be triggered, I think... https://gist.github.com/zoffixznet/da77f4ef00fac4d48d10c59905fae266
23:53 mcmillhj joined #perl6
23:55 DnAeillaxe IOninja: well I don't know, but all “\n”s here are suspicious: https://github.com/zoffixznet/perl6-IRC-Client/blob/master/lib/IRC/Client/Grammar.pm6
23:56 DnAeillaxe because, surprise-surprise, U+2029 does match \n
23:56 DnAeillaxe (or other way round… whatever!)
23:56 IOninja u: U+2029
23:56 unicodable6 IOninja, U+2029 PARAGRAPH SEPARATOR [Zp] (
)
23:57 DnAeillaxe u: Zp
23:57 unicodable6 DnAeillaxe, U+2029 PARAGRAPH SEPARATOR [Zp] (
)
23:57 IOninja m: say "\c[2029]" ~~ "\n"
23:57 camelia rakudo-moar 212cc8: OUTPUT: «False␤»
23:57 DnAeillaxe IOninja: it's hex
23:57 DnAeillaxe m: say "\x[2029]" ~~ "\n"
23:57 camelia rakudo-moar 212cc8: OUTPUT: «False␤»
23:57 IOninja ?
23:57 DnAeillaxe m: say "\x[2029]" ~~ /\n/
23:57 camelia rakudo-moar 212cc8: OUTPUT: «「
」␤»
23:57 IOninja Oh right
23:58 IOninja m: dd "\c[2029]"
23:58 camelia rakudo-moar 212cc8: OUTPUT: «"\x[7ed]"␤»
23:58 IOninja What's that? decimal?
23:58 DnAeillaxe yes
23:58 IOninja Ah
23:58 DnAeillaxe u: { .chr ~~ /\n/ }
23:58 IOninja Well, I've no idea wtf that matches \n
23:58 IOninja u: newline
23:58 unicodable6 DnAeillaxe, U+000A <control-000A> [Cc] (control character)
23:58 unicodable6 DnAeillaxe, U+000B <control-000B> [Cc] (control character)
23:58 unicodable6 IOninja, U+2424 SYMBOL FOR NEWLINE [So] (␤)
23:58 unicodable6 IOninja, U+2B92 NEWLINE LEFT [So] (⮒)
23:58 unicodable6 IOninja, U+2B93 NEWLINE RIGHT [So] (⮓)
23:59 IOninja m: say "\x[2029]" ~~ "\x[A]"
23:59 camelia rakudo-moar 212cc8: OUTPUT: «False␤»
23:59 IOninja So I guess all those \n should be replaced with \x[A]
23:59 DnAeillaxe u: { so .chr ~~ /\n/ }
23:59 unicodable6 DnAeillaxe, U+000A <control-000A> [Cc] (control character)
23:59 unicodable6 DnAeillaxe, U+000B <control-000B> [Cc] (control character)
23:59 DnAeillaxe ah right, yes… yes, unicodable, you're actually right

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

Perl 6 | Reference Documentation | Rakudo