Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-11-02

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 darkmorph joined #perl6
00:08 cdg_ joined #perl6
00:15 COMBORICO m: say ~$0 if 'cacbcd' ~~ /  [ a || b ] (c.) / ;
00:15 camelia rakudo-moar d21c31e1d: OUTPUT: «cb␤»
00:16 COMBORICO Why isn't the above output 'ca'?
00:28 pilne joined #perl6
00:41 sacomo m: say ~$0 if 'cacbcd' ~~ /  (c [a||b]) / ;
00:41 camelia rakudo-moar d21c31e1d: OUTPUT: «ca␤»
00:44 Cabanossi joined #perl6
00:48 Mrofnet joined #perl6
00:55 aindilis joined #perl6
00:58 aborazmeh joined #perl6
00:58 aborazmeh joined #perl6
01:07 COMBORICO Sacomo, Thanks!
01:08 sacomo welcome!
01:30 mcmillhj joined #perl6
01:43 mcmillhj joined #perl6
01:44 Cabanossi joined #perl6
01:53 COMBORICO What does m: do in regex? (I already searched docs.)
01:54 timotimo it's for "ignoremark"
01:54 timotimo m: say "bäh" ~~ /:m a/
01:54 camelia rakudo-moar d21c31e1d: OUTPUT: «「ä」␤»
01:55 timotimo here it matched the ä even though the regex has only an a in it
01:57 COMBORICO I understand.  But this example seems different. Stand by.
01:58 COMBORICO m: say so 'AB' ~~ m:i/ ab/;
01:58 camelia rakudo-moar d21c31e1d: OUTPUT: «True␤»
01:58 napo1eon joined #perl6
01:59 timotimo yeah, that's ignorecase
02:00 timotimo the m in there is just the regex match operator, and this usage of it is problematic
02:00 timotimo m: say "ab" ~~ m/ab/
02:00 camelia rakudo-moar d21c31e1d: OUTPUT: «「ab」␤»
02:00 timotimo m: $_ = "ab"; say m/ab/
02:00 camelia rakudo-moar d21c31e1d: OUTPUT: «「ab」␤»
02:00 timotimo hm, maybe not problematic?
02:00 mempko joined #perl6
02:00 geekosaur there was a bug there at one point but I thought it was fixed
02:01 geekosaur otherwise, the main use for m// instead of // is to make it easier to add adverbs (like m:i//)
02:01 timotimo i'd have used rx/ / instead i guess?
02:01 timotimo m: say r/abc/
02:01 camelia rakudo-moar d21c31e1d: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Missing required term after infix␤at <tmp>:1␤------> 3say r/abc/7⏏5<EOL>␤    expecting any of:␤        prefix␤        term␤»
02:01 timotimo m: say rx/abc/
02:01 camelia rakudo-moar d21c31e1d: OUTPUT: «rx/abc/␤»
02:02 COMBORICO Timotimo, thanks; I've added the name into my notes.
02:07 colomon joined #perl6
02:07 BenGoldberg joined #perl6
02:19 napo1eon joined #perl6
02:19 napo1eon joined #perl6
02:22 COMBORICO Sleep time.  Night.
02:29 Cabanossi joined #perl6
02:29 bitrauser joined #perl6
02:35 Herby_ joined #perl6
02:35 Herby_ \o
02:37 mcmillhj joined #perl6
02:54 cdg joined #perl6
02:56 ilbot3 joined #perl6
02:56 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:58 Cabanossi joined #perl6
03:03 KDr2 joined #perl6
03:05 mcmillhj joined #perl6
03:22 mcmillhj joined #perl6
03:26 KDr2 p6: say 3;
03:26 camelia rakudo-moar d21c31e1d: OUTPUT: «3␤»
03:28 noganex joined #perl6
03:37 mcmillhj joined #perl6
03:56 mcmillhj joined #perl6
04:00 KDr2_ joined #perl6
04:12 mcmillhj joined #perl6
04:14 cdg joined #perl6
04:22 mtj_ joined #perl6
04:41 raschipi joined #perl6
04:43 Cabanossi joined #perl6
04:47 mcmillhj joined #perl6
04:55 wander joined #perl6
05:05 vike joined #perl6
05:06 mcmillhj joined #perl6
05:20 finanalyst joined #perl6
05:25 mcmillhj joined #perl6
05:27 finanalyst Can anyone here let me know whether the following assumption is wrong? A valid perl6 module name must have a single initial character. That is a module should conform to / \w [<-[:]>|| '::' ] * /
05:28 finanalyst OR is /  [<-[:]>|| '::' ] * / a valid expression, which (I think) would allow a module named '::Something' to be valid.
05:36 mcmillhj joined #perl6
05:38 nadim joined #perl6
05:40 Aceeri_ joined #perl6
05:41 vike joined #perl6
05:50 mcmillhj joined #perl6
06:05 mcmillhj joined #perl6
06:10 mcmillhj joined #perl6
06:16 wander .ask finanalyst, does this code satisfy you? https://gist.github.com/W4anD0eR96/4cefb22da17262e9d9edea53487144fc
06:16 yoleaux wander: What kind of a name is "finanalyst,"?!
06:16 wander .ask finanalyst does this code satisfy you? https://gist.github.com/W4anD0eR96/4cefb22da17262e9d9edea53487144fc
06:16 yoleaux wander: I'll pass your message to finanalyst.
06:17 finanalyst yoleaux: its my nic. Short for financial analyst.
06:17 yoleaux 06:16Z <wander> finanalyst: does this code satisfy you? https://gist.github.com/W4anD0eR96/4cefb22da17262e9d9edea53487144fc
06:18 finanalyst yoleaux: is there a problem with my nic?
06:18 wander no, is my misspell
06:18 wander yoleaux is a chat-bot
06:19 finanalyst wander: ah. OK
06:19 wander for the code, alternatively you can use ::Model in Model.pm, but cannot change Model.pm to :: Model.pm
06:19 finanalyst wander: maybe you misunderstand. I am asking about the perl6 ecosystem
06:20 finanalyst Would a module called "::thisIsMySpecialModule" be an acceptable name? Or should there be at least one letter?
06:22 wander I think it can, technically, be.
06:22 moritz finanalyst: my understanding is that distribution names should be valid Perl 6 identifers
06:23 moritz *identifiers
06:23 moritz so it needs to start with <:alpha+[_]>
06:24 wander when you `use Grammar::Tracer`, in fact it searches in perl6 path
06:25 finanalyst moritz: that was my assumption as well. But I wanted to check. I could not find a reference to this in specs
06:25 finanalyst moritz: you say <:alpha> . Is that not \w ?
06:26 wander \w includes \d
06:28 finanalyst wander: I know \w includes \d, and I was thinking that a module could be called '007::SpecialAgent'
06:28 Cabanossi joined #perl6
06:28 finanalyst However, I also know that perl6 identifiers may not have an initial \d
06:30 wander \w I think
06:30 wander https://github.com/cjfields/bioperl6
06:30 wander someone use model-name with digit
06:31 finanalyst I am just trying to check if it is theoretically possible for '::someotherpart' to be a valid module name.
06:32 xinming joined #perl6
06:34 wander regardless ecosystem convenience, it can
06:34 wander https://gist.github.com/W4anD0eR96/ed3e91b607ee1249055e9ba55f19aac8
06:36 wander lexically it looks like `::something`
06:37 wander m: use 123;
06:37 camelia rakudo-moar d21c31e1d: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤    use used at line 1␤␤»
06:38 wander m: use "123";
06:38 camelia rakudo-moar d21c31e1d: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤    use used at line 1␤␤»
06:38 wander m: use Model;
06:38 camelia rakudo-moar d21c31e1d: OUTPUT: «===SORRY!===␤Could not find Model at line 1 in:␤    /home/camelia/.perl6␤    /home/camelia/rakudo-m-inst-2/share/perl6/site␤    /home/camelia/rakudo-m-inst-2/share/perl6/vendor␤    /home/camelia/rakudo-m-inst-2/share/perl6␤    CompUnit::Re…»
06:38 wander m: use Model2;
06:38 camelia rakudo-moar d21c31e1d: OUTPUT: «===SORRY!===␤Could not find Model2 at line 1 in:␤    /home/camelia/.perl6␤    /home/camelia/rakudo-m-inst-2/share/perl6/site␤    /home/camelia/rakudo-m-inst-2/share/perl6/vendor␤    /home/camelia/rakudo-m-inst-2/share/perl6␤    CompUnit::R…»
06:41 darutoko joined #perl6
06:43 mcmillhj joined #perl6
06:45 Piotr_ joined #perl6
06:57 SCHAPiE joined #perl6
06:58 Cabanossi joined #perl6
06:58 mcmillhj joined #perl6
07:00 wander_ joined #perl6
07:10 mcmillhj joined #perl6
07:16 domidumont joined #perl6
07:22 mcmillhj joined #perl6
07:28 wander_ m: grammar AlternativeMatch { token start($patten) { $patten } }; say AlternativeMatch.parse('abab', :rule('start'), :args(\('[ a || b ] +')));
07:28 camelia rakudo-moar d21c31e1d: OUTPUT: «Nil␤»
07:28 wander_ m: grammar AlternativeMatch { token start($patten) { $patten+ } }; say AlternativeMatch.parse('aaaa', :rule('start'), :args(\('a')));
07:28 camelia rakudo-moar d21c31e1d: OUTPUT: «「aaaa」␤»
07:29 wander_ moritz, any way can I DWIW for the former?
07:30 wander_ interpolate regexes seems like
07:35 domidumont joined #perl6
07:37 domidumont joined #perl6
07:37 mcmillhj joined #perl6
07:51 rindolf joined #perl6
07:52 abraxxa joined #perl6
07:53 mcmillhj joined #perl6
08:03 jonas1 joined #perl6
08:03 lowbro joined #perl6
08:06 mcmillhj joined #perl6
08:09 bob joined #perl6
08:10 Guest1693 p6 : say 3;
08:10 Guest1693 p6: say 3;
08:10 camelia rakudo-moar d21c31e1d: OUTPUT: «3␤»
08:12 no-n p6: 3.say
08:12 camelia rakudo-moar d21c31e1d: OUTPUT: «3␤»
08:21 Morfent joined #perl6
08:22 mcmillhj joined #perl6
08:26 Geth ¦ doc/W4anD0eR96-patch-1: 39539835bf | (Alex Chen)++ (committed using GitHub Web editor) | doc/Type/Grammar.pod6
08:26 Geth ¦ doc/W4anD0eR96-patch-1: Rewrite Type/Grammar.pod6
08:26 Geth ¦ doc/W4anD0eR96-patch-1:
08:26 Geth ¦ doc/W4anD0eR96-patch-1: Review needed
08:26 Geth ¦ doc/W4anD0eR96-patch-1:
08:26 Geth ¦ doc/W4anD0eR96-patch-1: And plz help improving examples of `*%opt` arguments.
08:26 Geth ¦ doc/W4anD0eR96-patch-1:
08:26 Geth ¦ doc/W4anD0eR96-patch-1: I have try :
08:26 Geth ¦ doc/W4anD0eR96-patch-1: <…commit message has 12 more lines…>
08:26 Geth ¦ doc/W4anD0eR96-patch-1: review: https://github.com/perl6/doc/commit/39539835bf
08:27 Geth ¦ doc: W4anD0eR96++ created pull request #1645: Rewrite Type/Grammar.pod6
08:27 Geth ¦ doc: review: https://github.com/perl6/doc/pull/1645
08:28 azawawi joined #perl6
08:28 azawawi hi #perl6
08:28 azawawi m: use v6; use NativeCall; class U is repr('CUnion') { has int8 $.i8; }; class S is repr('CStruct') { has int8 $.type; has U $.union; }; my $o = S.new(:type(1), :union(U.new(i8 => 42)));
08:28 camelia rakudo-moar d21c31e1d: OUTPUT: «Cannot assign to an immutable value␤  in submethod BUILDALL at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
08:29 azawawi use v6; use NativeCall; class U is repr('CUnion') { has int8 $.i8; }; class S is repr('CStruct') { has int8 $.type; has U $.union is rw; }; my $o = S.new(:type(1), :union(U.new(i8 => 42)));
08:29 azawawi m: use v6; use NativeCall; class U is repr('CUnion') { has int8 $.i8; }; class S is repr('CStruct') { has int8 $.type; has U $.union is rw; }; my $o = S.new(:type(1), :union(U.new(i8 => 42)));
08:29 camelia rakudo-moar d21c31e1d: OUTPUT: «Cannot assign to an immutable value␤  in submethod BUILDALL at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
08:30 azawawi Any idea why im getting "cannot assign to an immutable value" on the above code?
08:30 zakharyas joined #perl6
08:34 mcmillhj joined #perl6
08:36 zakharyas joined #perl6
08:39 domm joined #perl6
08:39 geekosaur bisectable: use NativeCall; class U is repr('CUnion') { has int8 $.i8; }; class S is repr('CStruct') { has int8 $.type; has U $.union; }; my $o = S.new(:type(1), :union(U.new(i8 => 42)));
08:39 bisectable6 geekosaur, Bisecting by output (old=2015.12 new=d21c31e) because on both starting points the exit code is 1
08:39 bisectable6 geekosaur, bisect log: https://gist.github.com/1d3e189ec8d95993e1c8e9f84345b67e
08:39 bisectable6 geekosaur, There are 6 candidates for the first “new” revision. See the log for more details
08:41 geekosaur apparently never did work, so at least lizmat's BUILDALL changes are off the hook :)
08:41 geekosaur will guess CUnion was not well tested and has a glitch
08:42 azawawi oh thanks
08:42 azawawi so there is no workarounds?
08:42 geekosaur I played around a bit and couldn't find one. But I'm not an expert on NativeCall
08:43 azawawi or basically create n-different structs for n-union elements :)
08:44 cdg joined #perl6
08:44 azawawi or create n-int8 and play with the bits :)
08:45 azawawi # Currently making a wrapper for msgpackc (a C implementation of our currently slow Data::MessagePack)
08:45 azawawi https://github.com/msgpack/msgpack-c
08:46 azawawi https://github.com/pierre-vigier/Perl6-Data-MessagePack
08:48 azawawi Quick benchmark show that python and perl implementation are like 2.3s and 2.8s (msgpackc is 1.81) for 10_000_000 element array pack/unpack
08:49 azawawi current pure perl6 implementation is currently too slow to create even 10_000 elements :)
08:50 mcmillhj joined #perl6
08:50 sproctor joined #perl6
08:54 tbrowder .tell ugexe how can i get a local install of rakudo to find Debugger::UI::CommandLine (and its dependencies) in system-wide COMPUNITS? alternatively, how can i get zef to —install-to=/some/path?
08:54 yoleaux tbrowder: I'll pass your message to ugexe.
08:55 azawawi geekosaur: thx
08:59 telex joined #perl6
09:02 Geth ¦ mu: 2dee2e0297 | (Tom Browder)++ (committed using GitHub Web editor) | misc/perl6advent-2017/schedule
09:02 Geth ¦ mu: title change
09:02 Geth ¦ mu: review: https://github.com/perl6/mu/commit/2dee2e0297
09:11 wander joined #perl6
09:13 Cabanossi joined #perl6
09:15 steeznson joined #perl6
09:25 robertle joined #perl6
09:28 AlexDaniel squashable6: next
09:28 squashable6 AlexDaniel, ⚠🍕 Next SQUASHathon in 1 day and ≈0 hours (2017-11-04 UTC-12⌁UTC+14). See https://github.com/rakudo/rakudo/wiki/Monthly-Bug-Squash-Day
09:41 ivans joined #perl6
09:46 sena_kun joined #perl6
09:56 cdg joined #perl6
10:02 zakharyas joined #perl6
10:23 araujo joined #perl6
10:30 eroux joined #perl6
10:45 astj joined #perl6
10:47 ivans joined #perl6
10:48 DrForr m: say sprintf "foo%d",Any;
10:48 camelia rakudo-moar c2baf95e1: OUTPUT: «Died with X::Str::Sprintf::Directives::BadType␤␤»
10:49 DrForr This doesn't have a proper error with file/line.
10:53 AlexDaniel DrForr: RT#126063
10:53 synopsebot RT#126063 [new]: https://rt.perl.org/Ticket/Display.html?id=126063 printf omits line number in error message
10:53 DrForr Aha, good to know.
10:54 DrForr Maybe I should join the squashathon...
10:54 AlexDaniel \o/
10:54 AlexDaniel .pizza DrForr
10:54 AlexDaniel buggable: pizza DrForr
10:54 buggable DrForr, enjoy this slice of Chicken Mexican Red Wave pizza, my friend! Yummy 🍕
10:57 DrForr Nom.
11:00 sacomo Hi all, is there a way to dynamically load a module, require ::('Foo::Bar'), and access its `our` subroutines?
11:02 wander sacomo, https://docs.perl6.org/language/modules#require
11:02 wander so it is "require"
11:03 sacomo wander, thanks, I have been trying that...
11:04 jeek joined #perl6
11:06 zakharyas joined #perl6
11:07 sacomo trying to access the subs using the ::('Foo::Bar')::subname(), but that doesn't seem to work. I have also tried ::('Foo::Bar::subname')(), but no go...
11:08 sacomo ah, got it
11:08 sacomo &::('Foo')::bar();
11:13 margeas joined #perl6
11:20 aborazmeh joined #perl6
11:20 aborazmeh joined #perl6
11:24 GreatMazi joined #perl6
11:28 Cabanossi joined #perl6
11:28 cpage__ joined #perl6
11:29 bisectable6 joined #perl6
11:38 eliasr joined #perl6
11:39 nightfrog joined #perl6
11:58 Cabanossi joined #perl6
12:03 GreatMazi1 joined #perl6
12:09 llfourn joined #perl6
12:12 ivans joined #perl6
12:19 Geth ¦ ecosystem: 52c0623124 | (Zoffix Znet)++ (committed using GitHub Web editor) | META.list
12:19 Geth ¦ ecosystem: Move module from CPAN
12:19 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/52c0623124
12:24 kalkin- joined #perl6
12:24 kalkin- hi
12:25 kalkin- m: class F { has @.color[4] = <1 2 3 4> }; my $f = F.new(); say $f.color;
12:25 camelia rakudo-moar c2baf95e1: OUTPUT: «[(Any) (Any) (Any) (Any)]␤»
12:25 kalkin- Why is the default array value not assigned?
12:26 pmurias joined #perl6
12:26 kalkin- m: class F { has $f = 23 }; my $f = F.new(); say $f.f;
12:26 camelia rakudo-moar c2baf95e1: OUTPUT: «No such method 'f' for invocant of type 'F'␤  in block <unit> at <tmp> line 1␤␤»
12:26 kalkin- m: class F { has $.f = 23 }; my $f = F.new(); say $f.f;
12:26 camelia rakudo-moar c2baf95e1: OUTPUT: «23␤»
12:26 Geth ¦ modules.perl6.org: aed4cb5740 | (Zoffix Znet)++ | lib/ModulesPerl6/Controller/Dist.pm
12:26 Geth ¦ modules.perl6.org: Properly escape README content; Zoffix--
12:26 Geth ¦ modules.perl6.org:
12:26 Geth ¦ modules.perl6.org: Fixes #92
12:26 Geth ¦ modules.perl6.org: review: https://github.com/perl6/modules.perl6.org/commit/aed4cb5740
12:27 kalkin- If I don't use an array the default value is assigned to the class attribute, but in case of an array it's not
12:27 kalkin- I think I'm missing something basic
12:28 Zoffix joined #perl6
12:28 Zoffix kalkin-: looks like a bug with defaults on shaped array attributes
12:28 Zoffix kalkin-: would you file it, please?
12:28 Zoffix huggable: rakudobugs
12:28 huggable Zoffix, Report bugs on https://github.com/rakudo/rakudo/issues/new
12:29 kalkin- m: class F { has @.color = <1 2 3 4> }; my $f = F.new(); say $f.color;
12:29 camelia rakudo-moar c2baf95e1: OUTPUT: «[1 2 3 4]␤»
12:30 kalkin- Zoffix: let me check first if I have an up to date rakudo version, because I remember Elizabet(?) fixed some shaped array bugs some time ago according to p6weekly
12:30 Zoffix kalkin-: I've just tried it locally on near-HEAD and it has the same bug
12:31 Zoffix m: class F { has @.color[4] = <1 2 3 4> }; my $f = F.new(); say $f.color;
12:31 camelia rakudo-moar c2baf95e1: OUTPUT: «[(Any) (Any) (Any) (Any)]␤»
12:31 kalkin- Zoffix: ok, opening a bug thank you
12:31 Zoffix And well, the bot uses HEAD
12:31 Zoffix m: class F { has @.color[4]; submethod BUILD (:@!color = <1 2 3 4>) {} }; my $f = F.new(); say $f.color;
12:31 camelia rakudo-moar c2baf95e1: OUTPUT: «[1 2 3 4]␤»
12:31 Zoffix m: class F { has @.color[4]; submethod TWEAK (:@!color = <1 2 3 4>) {} }; my $f = F.new(); say $f.color;
12:31 camelia rakudo-moar c2baf95e1: OUTPUT: «[1 2 3 4]␤»
12:31 Zoffix kalkin-: ^ you can use that as a workaround in the meantime
12:32 Zoffix (the TWEAK one; BUILD works too but it disables handling of defaults on all the other attributes)
12:32 kalkin- Zoffix: thanks for the hint!
12:33 Zoffix sacomo: you can also save the thing `require` returns and use that instead of having to type ::("") thing all the time: `unit module Foo; our sub meow {say "meow"}` and then  `my \M = (require ::("Foo")); M::meow'`
12:34 * Zoffix &
12:34 Zoffix left #perl6
12:37 kalkin- Done: https://github.com/rakudo/rakudo/issues/1226
12:40 lizmat m: class A { has @.a[4] = <a b c d e> }; dd A.new.a  # this should die, but doesn't
12:40 camelia rakudo-moar c2baf95e1: OUTPUT: «Array.new(:shape(4,), [Any, Any, Any, Any])␤»
12:40 lizmat so it looks like .STORE is not being called
12:42 lizmat m: class A { has @.a[4] = <a b c d e> }; dd A.new.a(a => (1,2,3,4))  # also not working
12:42 camelia rakudo-moar c2baf95e1: OUTPUT: «Array.new(:shape(4,), [Any, Any, Any, Any])␤»
12:45 darkmorph joined #perl6
12:47 mson joined #perl6
12:55 cdg joined #perl6
13:02 gGREATmAZI joined #perl6
13:02 rgrau joined #perl6
13:10 rindolf joined #perl6
13:15 wander kalkin-, it works well on the version I use
13:15 wander I reply you on the issue
13:15 wander with version
13:15 wander This is Rakudo version 2017.10-64-g697e4ecff built on MoarVM version 2017.10-29-g116c7a13 implementing Perl 6.c.
13:15 wander $ perl6 -e 'class F { has @.color = <1 2 3 4>; }; my $f = F.new(); dd $f.color'
13:15 wander >  Array @!color = [IntStr.new(1, "1"), IntStr.new(2, "2"), IntStr.new(3, "3"), IntStr.new(4, "4")]
13:17 wander oops
13:17 wander if you try to fix size, then the issue occurs, sorry.
13:22 GreatMazi joined #perl6
13:23 cdg joined #perl6
13:33 sacomo Zoffix: thanks, that should come in handy.
13:34 COMBORICO joined #perl6
13:42 wander timotimo, https://irclog.perlgeek.de/perl6/2017-11-01#i_15388148
13:42 wander is that means "The regex engine tries to find a match inside a string by searching from left to right." will be wrong?
13:44 zakharyas joined #perl6
13:46 kalkin- wander: I have a typo in the issue, I meant shaped arrays @.color[4] = …
13:46 kalkin- Fixed the issue
13:46 kalkin- m: class F { has @.color[4] = <1 2 3 4> }; my $f = F.new(); say $f.color; # @wander
13:46 camelia rakudo-moar c2baf95e1: OUTPUT: «[(Any) (Any) (Any) (Any)]␤»
13:47 wander In grammar, `token func-def { <type> <id> <.update-symtab> <func-body> }` with action object, its behavior depends on in which order it parse.
13:47 wander kalkin-, :)
14:00 mcmillhj joined #perl6
14:05 mcmillhj joined #perl6
14:05 Tom_Leg joined #perl6
14:07 MasterDuke joined #perl6
14:10 mempko joined #perl6
14:14 wander moritz, what is the convenience we use "<|w>" and ">>", "<<"
14:15 wander they are quite of same usage
14:15 moritz << only matches a left word boundary
14:15 moritz >> only matches a right word boundary
14:16 moritz m: say "stuff here!!!".subst(:g/, />>/, '|')
14:16 camelia rakudo-moar c2baf95e1: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Preceding context expects a term, but found infix , instead␤at <tmp>:1␤------> 3say "stuff here!!!".subst(:g/,7⏏5 />>/, '|')␤»
14:16 moritz m: say "stuff here!!!".subst(:g, />>/, '|')
14:16 camelia rakudo-moar c2baf95e1: OUTPUT: «stuff| here|!!!␤»
14:16 moritz m: say "stuff here!!!".subst(:g, /<</, '|')
14:16 camelia rakudo-moar c2baf95e1: OUTPUT: «|stuff |here!!!␤»
14:16 moritz m: say "stuff here!!!".subst(:g, /<?wb>/, '|')
14:16 camelia rakudo-moar c2baf95e1: OUTPUT: «|stuff| |here|!!!␤»
14:17 wander I saw the difference, thank you
14:21 stmuk_ joined #perl6
14:37 zakharyas joined #perl6
14:39 perlpilot joined #perl6
14:41 Geth ¦ doc: b00b047e8b | (Alex Chen)++ (committed using GitHub Web editor) | doc/Language/regexes.pod6
14:41 Geth ¦ doc: Update regexes.pod6
14:41 Geth ¦ doc:
14:41 Geth ¦ doc: 1. Remove `=head1 Look-around assertions` and put `Lookahead/Lookbehind assertions` into `Anchor`
14:41 Geth ¦ doc:
14:41 synopsebot Link: https://doc.perl6.org/language/regexes
14:41 Geth ¦ doc: 2. Add example to show difference between C«<|w>» and C<«>, C<»>:
14:41 Geth ¦ doc: review: https://github.com/perl6/doc/commit/b00b047e8b
14:59 mcmillhj joined #perl6
15:11 COMBORICO1611 joined #perl6
15:19 COMBORICO1611 Can someone read this in English for me?    /      (    [ \d. ]   **   1 . . 3   \.  ]    **    3 \d  **  1 . . 3   )        /;
15:21 japhb joined #perl6
15:23 COMBORICO Nevermind, finally got it.
15:29 khw joined #perl6
15:45 AlexDaniel` squashable6: next
15:45 yoleaux 31 Oct 2017 10:51Z <wander> AlexDaniel`: ^^
15:45 squashable6 AlexDaniel`, ⚠🍕 Next SQUASHathon in ≈18 hours (2017-11-04 UTC-12⌁UTC+14). See https://github.com/rakudo/rakudo/wiki/Monthly-Bug-Squash-Day
15:50 COMBORICO1611 m: my $string = "IP address: 17.125.246.28;" ; say ~$/ if $string ~~ /    (   [ \d ** 1 . . 3 \. ]  ** 3    \d ** 1 . . 3    )     / ;
15:50 camelia rakudo-moar 9f54bc989: ( no output )
15:54 wander whitespace important
15:54 wander m: my $string = "IP address: 17.125.246.28;" ; say ~$/ if $string ~~ /    (   [ \d ** 1..3 \. ]  ** 3    \d ** 1..3    )     / ;
15:54 camelia rakudo-moar 0973b307a: OUTPUT: «17.125.246.28␤»
15:54 wander '1 . . 3' is surely different from '1..3'
15:55 COMBORICO1611 I see.  Thank you.
15:55 COMBORICO1611 I'm trying to find out how  [\d] is being applied outside of its grouping
15:55 COMBORICO1611 Specifically, with the second **.
15:56 COMBORICO1611 (If that is even correct.)
15:57 hankache joined #perl6
15:58 wander m: say "IP address: 17.125.246.28;" ~~ /(   ( \d ** 1..3 \. )  ** 3    (\d) ** 1..3    )/ ;
15:58 camelia rakudo-moar 0973b307a: OUTPUT: «「17.125.246.28」␤ 0 => 「17.125.246.28」␤  0 => 「17.」␤  0 => 「125.」␤  0 => 「246.」␤  1 => 「2」␤  1 => 「8」␤»
15:58 wander that is it
15:59 timotimo wander: the optimizer is allowed to do whatever it wants as long as the result is the same
15:59 yoleaux 12:25Z <Zoffix> timotimo: there looks to be a stale PR by you to mp6o: https://github.com/perl6/modules.perl6.org/pull/86/files IIRC the problem with it was that data fetcher doesn't fetch travis files
15:59 tbrowder .tell moritz check yr gmail address when you get a chance, please
15:59 yoleaux tbrowder: I'll pass your message to moritz.
15:59 timotimo i.e. it's allowed to cheat as much as it wants as long as it knows it won't get caught
16:01 COMBORICO1611 Hmm.  Thank you for your help.
16:02 wander timotimo, thanks. I think anyway actions should apply from left to right, otherwise actions within grammar become unreliable.
16:02 timotimo i'm refering only to inside a single regex
16:03 wander XD
16:03 moritz actions are applied in the order their regex calls match
16:03 yoleaux 15:59Z <tbrowder> moritz: check yr gmail address when you get a chance, please
16:03 moritz with alternations or quantifiers, than can be different from left-to-right
16:06 wander sounds reasonable
16:08 wander cannot wait to read your 'Parsing with Perl 6 Regexes and Grammars'
16:10 callyalater joined #perl6
16:11 troys joined #perl6
16:13 COMBORICO Where ** 3, what is specifying \d?  It seems ** 3 is isolated on its own.  How does regex know it is suppose to be \d ?
16:14 Juerd ** applies to the one thing that comes before it
16:15 astj joined #perl6
16:16 COMBORICO But before it is a group statement thing [d\ ** 1..3] .  So is it d\ ** 1-3 or 3 ?
16:16 moritz COMBORICO: so, regexes are made out of terms and operators, just like regular Perl 6 code
16:17 timotimo that matches a d and then one to three spaces
16:17 moritz COMBORICO: and these operators have relative precedence, and the precedence decides what a quantifier applies to
16:18 moritz the most common operators are concatenation (which is invisble, the default operator basically), |, || and quantifiers
16:18 wander COMBORICO: '**3' modify '[ \d ** 1..3 \. ]'
16:18 moritz quantifiers have the tightest precedence, so in "ab+" or "a b+" or however you write it, the quantifier only quantifies the last atom
16:19 moritz of course, grouping constructs have even tighter precedence, so in / [a b]+ /, it matches ab, abab, ababab etc.
16:20 wander most of these should be documented in https://docs.perl6.org/language/regexes
16:20 COMBORICO I'm starting to get it.
16:21 moritz wander: I tried to write down everything I knew about regexes and grammars, and it became more than 150 pages, and I still discover stuff that's I know and that's not included in the book :-)
16:21 moritz the rabbithole gooes deeeep
16:22 COMBORICO1611 So it is analogous to Order of Operations in math.  [ 5x -1 ]  ** 3, where the only thing that can be maniplated by ** 3 is x ( in our case, \d ).
16:23 COMBORICO1611 (I'm mixing math and Regex in the above.)
16:23 unicodable6 joined #perl6
16:23 mempko joined #perl6
16:24 wander moritz: yes, once you build a new tool/language, you can never image how people will use it
16:24 COMBORICO1611 So ** 3 knows it cannot "fraternize" with ** or 1..3, but only \d.
16:24 COMBORICO1611 Thanks for the help!
16:26 wander I think '**3' modify the whole '[ \d ** 1..3 \. ]'
16:26 wander just like
16:26 wander m: my regex wrapped { \d ** 1..3 \. }; say "IP address: 17.125.246.28;" ~~ /(<wrapped> ** 3  (\d) ** 1..3  )/ ;
16:26 camelia rakudo-moar 6dab5aad8: OUTPUT: «「17.125.246.28」␤ 0 => 「17.125.246.28」␤  wrapped => 「17.」␤  wrapped => 「125.」␤  wrapped => 「246.」␤  0 => 「2」␤  0 => 「8」␤»
16:31 COMBORICO Let me live my lie!  I don't want to move on to the next page!  J/k.
16:31 COMBORICO I mean i want to move on.
16:41 wander curious about when Learning Perl 6 publishes
16:47 wamba joined #perl6
16:50 COMBORICO1611 m: my $string = "IP address: 17.125.246.28;"; my $octet = = rx{(\d ** 1..3) <?{0 <= $0 <= 255 }>}; say ~$/ if $string ~~ /([<$octet> \.] ** 3 <$octet>)/;
16:50 camelia rakudo-moar 6dab5aad8: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Preceding context expects a term, but found infix = instead␤at <tmp>:1␤------> 3 address: 17.125.246.28;"; my $octet = =7⏏5 rx{(\d ** 1..3) <?{0 <= $0 <= 255 }>}; ␤»
16:50 COMBORICO1611 I knew it was a typo!
16:51 COMBORICO1611 I like the color coding error message.  Good stuff.
16:51 COMBORICO1611 I also like how the arrow thing looks like a pile of dog crap.
16:54 mcmillhj joined #perl6
16:58 wamba joined #perl6
17:02 rgrau joined #perl6
17:06 COMBORICO Moritz, i appreciate the insight into most common operators for rejects. It is definitely helpful to know what to focus on.
17:06 mr-foobar joined #perl6
17:08 epony joined #perl6
17:11 mcmillhj joined #perl6
17:17 mson joined #perl6
17:19 mingdao joined #perl6
17:19 COMBORICO1611 Can someone explain this: my $str = "<c>foo</c> <a>foo</a>";
17:20 perlpilot COMBORICO1611: it's a lexical scalar that's been assigned a string.   :-)
17:20 COMBORICO1611 $str ~~ s!'<a>foo</a>'~<a>bar</a>!;
17:21 COMBORICO1611 Heh.  I knew I wouldn't get the rest out before a comment.
17:21 COMBORICO1611 Shoot!  forgot a !
17:22 COMBORICO1611 $str ~~ s!'<a>foo</a>'!<a>bar</a>!;
17:22 setty1 joined #perl6
17:22 COMBORICO1611 I need to try different IRC client -- Quassel is too small a font.   Zooming in makes things worse.
17:23 perlpilot COMBORICO1611: so ... what actually needs explaining?
17:23 geekosaur it's a substitution, using ! as the delimiter
17:24 COMBORICO1611 So ! is taking the place of / / ?
17:24 perlpilot yep
17:24 geekosaur perl 6 regex has more metacharacters and you need to quote things that are to be matched literally if thet contain special characters (like < >)
17:24 COMBORICO1611 What about the middle ! one?
17:24 perlpilot s///  -> s!!!
17:24 geekosaur s/// becomes s!!!
17:24 geekosaur s/ pattern / replacement /
17:24 COMBORICO1611 What the!?
17:26 epony joined #perl6
17:26 COMBORICO1611 So the middle ! is some kind of operator
17:26 COMBORICO1611 ?
17:26 perlpilot separator
17:26 geekosaur s! pattern ! replacement !
17:26 COMBORICO1611 Are the first and last ! also separators?
17:27 geekosaur were you expecitng ti to turn back into a / or are you just confused about substitution syntax?
17:27 perlpilot COMBORICO1611: those are delimiters ;)
17:27 COMBORICO1611 I'm not sure, geekosaur.  The title of the section is s/search/replace Construct
17:27 COMBORICO1611 very little explaining :(
17:27 geekosaur it's missing the closing delimiter sigh
17:28 COMBORICO1611 Okay, so we got two delimiters (front and back !) and one separator, the ! inthe middle.
17:28 COMBORICO1611 HUH? You saying ther eis a typo inthe book?
17:30 GreatMazi1 joined #perl6
17:30 raiph joined #perl6
17:30 geekosaur apparently, since this is apparently something that needs to be explained even though it's a fairly coimmon construct
17:30 geekosaur so it should probably be as pedantic as possible rather than assuming the reader has already encountered all the other uses of it
17:31 COMBORICO1611 Ya, this book needs more pedagogory.
17:31 perlpilot COMBORICO1611: which book is this?
17:32 COMBORICO1611 The only beginner programmer Perl 6 book.
17:32 COMBORICO1611 I think this is the onlyone.
17:32 COMBORICO1611 Think Perl 6.
17:33 COMBORICO1611 Okay, armed with the knowledge that the first and last ! are delimiters, and the middle one is a separator, I'll go to lunch.
17:37 gGREATmAZI joined #perl6
17:40 Piotr joined #perl6
17:46 zakharyas joined #perl6
17:50 sena_kun joined #perl6
17:58 Cabanossi joined #perl6
18:06 zakharyas joined #perl6
18:09 Ven joined #perl6
18:11 raschipi joined #perl6
18:12 azawawi joined #perl6
18:12 azawawi hi :)
18:13 cdg joined #perl6
18:13 azawawi geekosaur: ping
18:13 geekosaur muu
18:14 geekosaur (qm... not entirely here)
18:14 geekosaur *am
18:14 azawawi :)
18:15 azawawi geekosaur: Nearly there https://github.com/azawawi/scripts/blob/master/test-msgpack-wrapper.pl6 # Packing natively msgpacks
18:15 azawawi geekosaur: turned out i need to wrap the msgpack C API since libmsgpack does not expose all pack api
18:17 azawawi once finished, Data::MessagePack will be way faster
18:19 azawawi what do you think is a good module name for a Data::MessagePack NativeCall wrapper? LibMsgPack?
18:20 moritz Data::MessagePack::Native ?
18:22 azawawi moritz: thx
18:23 ugexe if you name it LibFoo* it might end up on debian and such as liblibfoo-perl6
18:24 azawawi what about libCurl ? :)
18:24 azawawi LibCurl that is
18:24 moritz $ apt-cache search ^liblib|wc -l
18:24 moritz 4
18:24 moritz this is on Ubuntu
18:25 ugexe only one is a legit liblib
18:26 ugexe (liblibrary and liblibre don't count)
18:27 domidumont joined #perl6
18:30 azawawi https://gist.github.com/azawawi/130b6db09bfc0321fc7999c389c39936  # A quick benchmark... Pure Perl 6 implemented excluded
18:30 azawawi implemented=implementation
18:34 sftp joined #perl6
18:46 callyalater left #perl6
18:47 GreatMazi1 joined #perl6
18:48 wamba joined #perl6
18:59 MasterDuke joined #perl6
19:05 COMBORICO m: my $str = "<c>foo</c> <a>foo</a>"; $str ~~ s!'<a>foo</a>'!<a>bar</a>!;
19:05 camelia rakudo-moar b380230dd: ( no output )
19:06 buggable New CPAN upload: bamboo-0.000.003_20171102.tar.gz by PSIXDISTS https://cpan.metacpan.org/authors/id/P/PS/PSIXDISTS/Perl6/bamboo-0.000.003_20171102.tar.gz
19:06 buggable New CPAN upload: DateTime-Parse-0.000.003_20171102.tar.gz by PSIXDISTS https://cpan.metacpan.org/authors/id/P/PS/PSIXDISTS/Perl6/DateTime-Parse-0.000.003_20171102.tar.gz
19:09 raschipi m: my $str = "<c>foo</c> <a>foo</a>"; say $str ~~ s!'<a>foo</a>'!<a>bar</a>!;
19:09 camelia rakudo-moar b380230dd: OUTPUT: «「<a>foo</a>」␤»
19:10 kalkin- When I have some c code which will be build and wrapped by my project, where do I put it in the project structure?
19:11 COMBORICO m: my $str = "<c>foo</c> <a>foo</a>"; $str ~~ s!'<a>foo</a>' !<a>bar</a>!;
19:11 camelia rakudo-moar b380230dd: ( no output )
19:11 kalkin- Do I put it in src? In ccode? In ext? In vendor?
19:11 raschipi COMBORICO: Camelia isn't the REPL, you need something to do output there or it won't.
19:12 COMBORICO Hmm.
19:12 COMBORICO So there is no typo m
19:12 COMBORICO M = ?
19:13 raschipi m: my $str = "<c>foo</c> <a>foo</a>"; $str ~~ s!'<a>foo</a>' !<a>bar</a>!; say $str
19:13 camelia rakudo-moar b380230dd: OUTPUT: «<c>foo</c> <a>bar</a>␤»
19:13 raschipi It's working but there wasn't any output.
19:14 COMBORICO First and last ! are delimiters, but what is middle !
19:14 cpage_ joined #perl6
19:14 COMBORICO ! Is
19:14 geekosaur didn't we establish that? separator
19:14 geekosaur s'pattern'replacement'
19:14 COMBORICO ! is separator?
19:14 geekosaur er
19:14 geekosaur s!pattern!replacement!
19:14 COMBORICO Haha. Your funny.
19:15 moritz the s/// or s!!! thing consists of two parts
19:15 moritz a search regex and a replacement string
19:15 COMBORICO HAHA this is funny.
19:15 moritz is it?
19:15 geekosaur why
19:15 MasterDuke i would say it's just another delimiter
19:15 COMBORICO I gotta talk to you guys off this phone and on a real keyboard.
19:18 geekosaur moritz, they've apparently never encountered sed-style substitutions before and are completely bewildered by it; this is the second time around asking the same questions
19:18 COMBORICO Under which subject in regex docs is this subject located? Substitution?
19:21 ugexe m: say q!hello!
19:21 camelia rakudo-moar b380230dd: OUTPUT: «hello␤»
19:23 COMBORICO Just like the search-and-replace editor's dialog box, the s/ / / operator has two sides, a left and right side. The left side is where your  matching expression goes, and the right side is what you want to replace it with."
19:24 COMBORICO I don't believe this was ever established in the book.
19:27 mcmillhj joined #perl6
19:33 Ven joined #perl6
19:47 AlexDaniel joined #perl6
19:48 Geth ¦ ecosystem: 6cffbb8c7e | (Ahmad M. Zawawi)++ (committed using GitHub Web editor) | META.list
19:48 Geth ¦ ecosystem: Add MsgPack to ecosystem
19:48 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/6cffbb8c7e
20:00 AlexDaniel squashable6: next
20:00 squashable6 AlexDaniel, ⚠🍕 Next SQUASHathon in ≈13 hours (2017-11-04 UTC-12⌁UTC+14). See https://github.com/rakudo/rakudo/wiki/Monthly-Bug-Squash-Day
20:00 AlexDaniel :O
20:02 cdg joined #perl6
20:03 squashable6 Webhook for perl6/doc is now active! Encourage flow.
20:03 AlexDaniel \o/
20:04 AlexDaniel (that's just a webhook. The event will start in 13 hours as planned)
20:06 AlexDaniel hm somebody added 6lang tag to the doc repo. Cool :)
20:16 zakharyas joined #perl6
20:16 comborico1611 joined #perl6
20:22 comborico1611 Okay, one last thing on this question.  Are the single quotes necessary in this Regex substitution operation: s!'<a>foo</a>'!<a>bar</a>!
20:22 geekosaur yes
20:23 comborico1611 Thanks!
20:23 geekosaur or, in that one it *might* be safe without, but <> is risky
20:23 geekosaur hm, actually it's necessary hwere regardless
20:23 geekosaur <> is special in perl 6 regex
20:24 comborico1611 I see.
20:24 geekosaur it would try to run a rule named a, then match foo, then become confused because </a> is not (I think) a defined extension syntax
20:24 comborico1611 So in general the use of the single quotes are a good idea with that s/ / / operator?
20:24 raschipi if you want to match literally, yes
20:25 comborico1611 Alright.  Thanks.
20:28 nadim_ joined #perl6
20:31 astj joined #perl6
20:31 comborico1611 joined #perl6
20:33 raschipi joined #perl6
20:35 comborico1611 At the moment, I prfer XChat the most.
20:36 raschipi m: my $new = 'word subst'; $new ~~ s/^'word'/foo/; say $new
20:36 camelia rakudo-moar ef84aafc0: OUTPUT: «foo subst␤»
20:37 raschipi In this substitution, the caret goes outside the quotes because it means the start of the string instead of a literal caret.
20:38 comborico1611 You're speaking of anchors ^ and $.
20:41 raschipi Yes, to get the special meaning they go outside the quotes.
20:41 comborico1611 Roger that.
20:41 raschipi m: my $new = '^word subst'; $new ~~ s/'^word'/foo/; say $new
20:41 camelia rakudo-moar ef84aafc0: OUTPUT: «foo subst␤»
20:41 raschipi Inside the quotes it's a literal caret.
20:42 comborico1611 I see.
20:45 comborico1611 Interesting how the substitution is done only once.  $_ = 'There can be twly two'; s/tw/on/; # There can be only two, instead of, There can be only "ono"
20:46 perlpilot comborico1611: that's a bit of history.  s/// == substitute once and stop.  s:g/// == substitute "globally" on the string (i.e. every occurrence)
20:46 comborico1611 I see!
20:47 perlpilot I
20:47 comborico1611 Earlier, when y'all were saying s///, I was like what are y'all talking about!
20:47 comborico1611 Aye*
20:48 perlpilot comborico1611: it helps if you've played with tools like ed, sed, perl(5).   :-)
20:48 perlpilot vi(m)
20:48 perlpilot etc.
20:48 comborico1611 I think I'm going to start with Emacs.
20:48 comborico1611 I like his tutorial.
20:49 comborico1611 Now I just need to figure out how to run XBindKeys so I can remap the arrow keys.
20:50 geekosaur what's wrong with the arrow keys?
20:50 comborico1611 Moving away from homerow.
20:53 callyalater joined #perl6
21:00 azawawi Interesting, MoarVM panic: Heap corruption detected: pointer 0x7f3117f083a0 to past fromspace
21:02 AlexDaniel comborico1611: you sure you don't want to change the keyboard layout directly?
21:02 comborico1611 What do you mean?
21:03 espadrine joined #perl6
21:03 AlexDaniel you can do stuff like
21:03 AlexDaniel key <AC02> { [ s,  S,  Left,       Left        ] };
21:03 AlexDaniel and then AltGr+s will be Left
21:03 comborico1611 Do that in what program?
21:03 AlexDaniel create your own xkb layout
21:04 comborico1611 I'm not talking about in code, I mean on my OS.
21:04 AlexDaniel you're using linux, right?
21:04 comborico1611 Yes.
21:04 geekosaur you can also do it with xmodmap and avoid the xkb runes
21:04 AlexDaniel here's an example https://gist.github.com/AlexDaniel/0ba2044f3c36d06bd9e4e2211e3d13bb
21:05 AlexDaniel you put it somewhere, like $HOME/.xkb
21:05 geekosaur that said, rebinding arrows to be e.g. alt-foo may confuse programs that look specifically for alt+arrow keys
21:05 AlexDaniel the run something like this to activate: setxkbmap 'awesome' -option 'lv3:ralt_switch' -print | xkbcomp -I"$HOME/.xkb" - "$DISPLAY"
21:06 Juerd joined #perl6
21:07 AlexDaniel then*
21:10 comborico1611 I see.  Thanks.
21:11 mempko joined #perl6
21:31 ryn1x_ joined #perl6
21:40 ryn1x_ Why can I my    @a = '/path/to/file', '/path/to/file2'; slurp @a[0], :bin;    but I can't    my @a = <'/path/to/file' '/path/to/file2'>; slurp @a[0], :bin;  as in the second example I get: Failed to open file /currentdir'/path/to/file': Invalid argument
21:40 ryn1x_ is an array created with < > different?
21:41 azawawi https://github.com/azawawi/scripts/blob/master/test-msgpack.pl6 # at 100_000 list size dumps a heap corruption using rakudo latest
21:42 ryn1x_ what I access reference the string elem of the array created with < > and pass it to slurp it wants to concatenate it with ' ' to my current working directory...
21:42 ryn1x_ when I reference*
21:45 geekosaur ryn1x_, <> acts like single quotes already
21:46 geekosaur but with word splitting, minus quotes
21:46 geekosaur just omit the single quotes in the <> form
21:46 MasterDuke azawawi: have you run under gdb or valgrind? any info from them?
21:48 ryn1x_ geekosaur: Thanks... I thought it just let me omit the commas...
21:48 geekosaur if you want the quotes to work as well, use « » instead of < >
21:49 ryn1x_ ah ok. thanks!
21:50 geekosaur https://docs.perl6.org/language/quoting there's a rather bewildering array of quoting operators
21:50 azawawi MasterDuke: no but I saw a couple of "Heap corruption detected: pointer 0x7f3117f083a0 to past fromspace" while testing various list sizes
21:52 HaraldJoerg joined #perl6
21:53 MasterDuke do you have valgrind and/or gdb installed? could try running with perl6-gdb-m or perl6-valgrind-m then, they'll help find the problem (especially if your moarvm is built with debugging enabled)
21:53 * azawawi starts debugging it
21:58 ChoHag joined #perl6
21:58 Cabanossi joined #perl6
21:59 callyalater left #perl6
22:15 COMBORICO That xmodmap thing is driving me nuts.
22:15 COMBORICO I am I'm trying to do is compose Ctrl + J 2 duplicate left
22:16 COMBORICO To duplicate
22:16 azawawi MasterDuke: i have also gdb installed, under perl6-debug-m.pl6 it throws an exception and stops in _pack
22:16 azawawi MasterDuke: any link to how to debug it?
22:16 MasterDuke can you type 'bt'?
22:17 azawawi gdb or perl6-debug-m?
22:17 MasterDuke and 'call MVM_dump_backtrace(tc)'
22:17 MasterDuke oh, gdb
22:17 MasterDuke i've never used perl6-debug-m much
22:18 MasterDuke maybe try 'say backtrace.new'
22:21 cognominal joined #perl6
22:22 azawawi sorry a bit sleepy lol
22:22 azawawi https://gist.github.com/azawawi/a65f86dc8415ddc69d844393ed31a5b9
22:24 MasterDuke huh, not a whole lot of info there
22:24 MasterDuke it's not segfaulting for me
22:24 MasterDuke This is Rakudo version 2017.10-103-gef84aafc0 built on MoarVM version 2017.10-35-g9b9bd1bf4
22:26 azawawi MoarVM panic: Heap corruption detected: pointer 0x7fbc4bf951b0 to past fromspace
22:26 azawawi random
22:27 MasterDuke valgrind might be better in this case
22:27 azawawi i think putting passing CStruct on the stack is maybe causing that (recursively)
22:28 MasterDuke could be, i really don't know NativeCall at all, so i'm afraid i'm not going to be much help
22:29 azawawi so far CStructs and CUnions have their own weird hidden bugs
22:29 niceperl joined #perl6
22:30 MasterDuke also, you'll get more useful info out of gdb and valgrind if you build your moarvm with '--debug=3'
22:31 azawawi any idea what's the command line using rakudobrew?
22:32 MasterDuke heh, i did know at one point
22:32 * azawawi installs valgrind
22:33 ugexe --configure-opts="--debug=3" or some such
22:35 ugexe or --configure-opts="--moar-option=--debug=3"
22:35 MasterDuke do you need to go three levels deep? --configure-opts="--moar-option=--debug=3"
22:37 MasterDuke azawawi: you're getting it with Data::MessagePack or your module?
22:38 azawawi mine
22:38 azawawi MsgPack
22:39 azawawi Data::MessagePack ... forget about getting more than 1000... so much slow :)
22:42 azawawi Great even ubuntu (travis ci) apt update is failing also lol
22:43 raschipi joined #perl6
22:46 telex joined #perl6
22:49 mson joined #perl6
22:50 azawawi https://gist.github.com/azawawi/f23cd002754e60cd24dc5d7242652d1f
22:52 timotimo dang, that's not easy to debug
22:52 timotimo is it enough to git clone your repo and run that test file or do i need something else?
22:55 azawawi https://gist.github.com/azawawi/ef9a0f4b17b98d50aa3400a69a34381f  # full
22:56 timotimo yeah we don't need the leak report
22:56 azawawi timotimo: zef build .   # to build resources/xyz.so
22:56 azawawi timotimo: sudo apt install libmsgpack-dev
22:57 timotimo i need your scripts repository?
22:58 azawawi examples
22:58 azawawi check out the last gist
22:58 azawawi please
22:58 timotimo the full leak check is pretty useless
22:59 timotimo moarvm just literally exits when it's finished, rather than going through all of its stuff and freeing things
23:04 azawawi at 5,000 only-ones list size, MsgPack (native wrapper) can do it in 0.76 secs vs 5.61s (pure implementation Data::MessagePack)  :)
23:05 azawawi more than 10k, it fails because it is just too fast :)
23:05 timotimo um, huh.
23:06 timotimo the perl6-msgpack repo doesn't have the module that test-msgpack.pl6 uses
23:07 azawawi what's the error?
23:07 timotimo Could not find Data::MessagePack at line 4 in:
23:07 timotimo this repo only has MsgPack
23:08 azawawi git pull ?
23:09 timotimo already up to date
23:09 azawawi https://github.com/azawawi/perl6-msgpack/blob/master/examples/test-msgpack.pl6
23:09 timotimo where should i be looking?
23:09 timotimo that's a different script!
23:11 timotimo i can't install LibraryCheck
23:13 azawawi zef install LibraryCheck # not working?
23:13 timotimo nope, it doesn't pass its tests
23:15 timotimo now i gots the segfault
23:18 timotimo now i can apply Techniques
23:18 azawawi cool
23:23 MasterDuke i see it dying in interp.c:3002 (nqp::decont)
23:25 timotimo here it crashes in a guardconc :)
23:26 timotimo bleh. dumping the backtrace crashes inside gdb
23:27 evalable6 joined #perl6
23:28 cdg joined #perl6
23:29 MasterDuke same thing happens in lldb
23:33 MasterDuke hm, very different results if i add a `&& STABLE(OBJ)` into that conditional
23:33 MasterDuke timotimo: https://gist.github.com/MasterDuke17/ee516fde9916dc4dfc6ab74ca4e72e82
23:41 cdg joined #perl6
23:45 azawawi tomorrow im going to add macOS and windows support
23:45 azawawi thanks for helping me out on this one
23:47 azawawi more tests from Data::MessagePack (Thanks to pierre-vigier++)  are now passing... Current missing features are pack (no hash and bin support yet) and unpack
23:51 azawawi The funny thing i started all this to get neovim API RPC properly working and acting as a client-server for Perl 6 scripts ... see https://neovim.io/doc/user/msgpack_rpc.html
23:58 Cabanossi joined #perl6

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

Perl 6 | Reference Documentation | Rakudo