»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend! Set by moritz on 22 December 2015. |
|||
00:05
darkmorph joined
00:08
cdg_ joined
00:11
cdg left
00:13
cdg_ left
|
|||
COMBORICO | m: say ~$0 if 'cacbcd' ~~ / [ a || b ] (c.) / ; | 00:15 | |
camelia | cb | ||
COMBORICO | Why isn't the above output 'ca'? | 00:16 | |
00:28
pilne joined
00:41
mempko left
|
|||
sacomo | m: say ~$0 if 'cacbcd' ~~ / (c [a||b]) / ; | 00:41 | |
camelia | ca | ||
00:42
Cabanossi left
00:43
troys is now known as troys_
00:44
Cabanossi joined
00:46
margeas left
00:48
Mrofnet joined
00:51
Morfent left
00:55
aindilis joined
00:58
aborazmeh joined,
aborazmeh left,
aborazmeh joined
|
|||
COMBORICO | Sacomo, Thanks! | 01:07 | |
sacomo | welcome! | 01:08 | |
01:30
mcmillhj joined
01:35
mcmillhj left
01:42
Cabanossi left
01:43
mcmillhj joined
01:44
Cabanossi joined
01:48
mcmillhj left
|
|||
COMBORICO | What does m: do in regex? (I already searched docs.) | 01:53 | |
timotimo | it's for "ignoremark" | 01:54 | |
m: say "bäh" ~~ /:m a/ | |||
camelia | 「ä」 | ||
timotimo | here it matched the ä even though the regex has only an a in it | 01:55 | |
COMBORICO | I understand. But this example seems different. Stand by. | 01:57 | |
m: say so 'AB' ~~ m:i/ ab/; | 01:58 | ||
camelia | True | ||
01:58
napo1eon joined
|
|||
timotimo | yeah, that's ignorecase | 01:59 | |
the m in there is just the regex match operator, and this usage of it is problematic | 02:00 | ||
m: say "ab" ~~ m/ab/ | |||
camelia | 「ab」 | ||
timotimo | m: $_ = "ab"; say m/ab/ | ||
camelia | 「ab」 | ||
timotimo | hm, maybe not problematic? | ||
02:00
mempko joined
|
|||
geekosaur | there was a bug there at one point but I thought it was fixed | 02:00 | |
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? | ||
m: say r/abc/ | |||
camelia | 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 |
||
timotimo | m: say rx/abc/ | ||
camelia | rx/abc/ | ||
02:02
notostraca is now known as TEttinger
|
|||
COMBORICO | Timotimo, thanks; I've added the name into my notes. | 02:02 | |
02:06
colomon left
02:07
colomon joined,
BenGoldberg joined
02:16
mempko left
02:19
napo1eon left,
napo1eon joined,
napo1eon left,
napo1eon joined
|
|||
COMBORICO | Sleep time. Night. | 02:22 | |
02:22
COMBORICO left
02:26
aborazmeh left
02:27
Cabanossi left
02:29
Cabanossi joined,
bitrauser joined
02:33
bitrauser_ left
02:35
Herby_ joined
|
|||
Herby_ | \o | 02:35 | |
02:37
mcmillhj joined
02:42
cdg joined
02:43
mcmillhj left
02:45
ilbot3 left
02:49
piojo joined
02:50
mcmillhj joined
02:55
mcmillhj left
02:56
ilbot3 joined,
ChanServ sets mode: +v ilbot3,
Cabanossi left
02:58
Cabanossi joined
03:02
troys_ is now known as troys
03:03
KDr2 joined
03:05
mcmillhj joined
03:15
mcmillhj left
03:22
mcmillhj joined
03:26
mcmillhj left
|
|||
KDr2 | p6: say 3; | 03:26 | |
camelia | 3 | ||
03:28
noganex joined
03:31
noganex_ left
03:35
BenGoldberg left
03:37
mcmillhj joined
03:43
cdg left
03:44
mcmillhj left
03:46
Herby_ left
03:54
mtj_ left
03:56
mcmillhj joined
04:00
KDr2_ joined
04:01
KDr2_ left,
mcmillhj left
04:08
troys is now known as troys_
04:12
mcmillhj joined
04:14
cdg joined
04:19
cdg left
04:20
mcmillhj left
04:22
mtj_ joined
04:24
mson left
04:40
Cabanossi left
04:41
raschipi joined
04:43
Cabanossi joined,
wander left
04:46
eliasr left
04:47
mcmillhj joined
04:50
raschipi left
04:55
wander joined,
mcmillhj left
05:05
vike joined
05:06
mcmillhj joined
05:08
nadim left
05:12
khw left
05:13
mcmillhj left
05:20
finanalyst joined
05:25
mcmillhj joined
|
|||
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:27 | |
05:28
darkmorph left
|
|||
finanalyst | OR is / [<-[:]>|| '::' ] * / a valid expression, which (I think) would allow a module named '::Something' to be valid. | 05:28 | |
05:30
mcmillhj left
05:31
troys_ is now known as troys
05:35
vike left
05:36
mcmillhj joined
05:38
nadim joined
05:40
Aceeri_ joined
05:41
vike joined,
mcmillhj left
05:48
mr-foobar left
05:50
mcmillhj joined
05:55
mcmillhj left
06:05
mcmillhj joined
06:10
mcmillhj left,
mcmillhj joined
06:15
mcmillhj left
|
|||
wander | .ask finanalyst, does this code satisfy you? gist.github.com/W4anD0eR96/4cefb22...53487144fc | 06:16 | |
yoleaux | wander: What kind of a name is "finanalyst,"?! | ||
wander | .ask finanalyst does this code satisfy you? gist.github.com/W4anD0eR96/4cefb22...53487144fc | ||
yoleaux | wander: I'll pass your message to finanalyst. | ||
finanalyst | yoleaux: its my nic. Short for financial analyst. | 06:17 | |
yoleaux | 06:16Z <wander> finanalyst: does this code satisfy you? gist.github.com/W4anD0eR96/4cefb22...53487144fc | ||
06:18
troys left
|
|||
finanalyst | yoleaux: is there a problem with my nic? | 06:18 | |
wander | no, is my misspell | ||
yoleaux is a chat-bot | |||
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 | ||
finanalyst | wander: maybe you misunderstand. I am asking about the perl6 ecosystem | ||
Would a module called "::thisIsMySpecialModule" be an acceptable name? Or should there be at least one letter? | 06:20 | ||
wander | I think it can, technically, be. | 06:22 | |
moritz | finanalyst: my understanding is that distribution names should be valid Perl 6 identifers | ||
*identifiers | 06:23 | ||
so it needs to start with <:alpha+[_]> | |||
wander | when you `use Grammar::Tracer`, in fact it searches in perl6 path | 06:24 | |
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 | |
moritz: you say <:alpha> . Is that not \w ? | |||
wander | \w includes \d | 06:26 | |
06:26
Cabanossi left
|
|||
finanalyst | wander: I know \w includes \d, and I was thinking that a module could be called '007::SpecialAgent' | 06:28 | |
06:28
Cabanossi joined
|
|||
finanalyst | However, I also know that perl6 identifiers may not have an initial \d | 06:28 | |
wander | \w I think | 06:30 | |
github.com/cjfields/bioperl6 | |||
someone use model-name with digit | |||
finanalyst | I am just trying to check if it is theoretically possible for '::someotherpart' to be a valid module name. | 06:31 | |
06:32
xinming joined
|
|||
wander | regardless ecosystem convenience, it can | 06:34 | |
gist.github.com/W4anD0eR96/ed3e91b...a55f19aac8 | |||
lexically it looks like `::something` | 06:36 | ||
m: use 123; | 06:37 | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Undeclared routine: use used at line 1 |
||
wander | m: use "123"; | 06:38 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Undeclared routine: use used at line 1 |
||
wander | m: use Model; | ||
camelia | ===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… |
||
wander | m: use Model2; | ||
camelia | ===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
06:43
mcmillhj joined
06:45
Piotr_ joined
06:48
mcmillhj left,
SCHAPiE left
06:55
Cabanossi left
06:57
SCHAPiE joined
06:58
Cabanossi joined,
mcmillhj joined
07:00
wander_ joined
07:01
wander left
07:02
Piotr_ left
07:03
mcmillhj left
07:10
mcmillhj joined
07:15
mcmillhj left
07:16
domidumont joined
07:20
domidumont left
07:22
mcmillhj joined
07:27
mcmillhj left
|
|||
wander_ | m: grammar AlternativeMatch { token start($patten) { $patten } }; say AlternativeMatch.parse('abab', :rule('start'), :args(\('[ a || b ] +'))); | 07:28 | |
camelia | Nil | ||
wander_ | m: grammar AlternativeMatch { token start($patten) { $patten+ } }; say AlternativeMatch.parse('aaaa', :rule('start'), :args(\('a'))); | ||
camelia | 「aaaa」 | ||
wander_ | moritz, any way can I DWIW for the former? | 07:29 | |
interpolate regexes seems like | 07:30 | ||
07:35
domidumont joined
07:36
domidumont left
07:37
domidumont joined,
mcmillhj joined
07:45
mcmillhj left
07:51
rindolf joined
07:52
abraxxa joined
07:53
mcmillhj joined
07:58
mcmillhj left
08:03
jonas1 joined,
lowbro joined
08:06
mcmillhj joined
08:09
bob joined,
bob is now known as Guest1693
|
|||
Guest1693 | p6 : say 3; | 08:10 | |
p6: say 3; | |||
camelia | 3 | ||
08:10
Guest1693 left
08:11
mcmillhj left
|
|||
no-n | p6: 3.say | 08:12 | |
camelia | 3 | ||
08:21
Morfent joined
08:22
mcmillhj joined
08:24
Mrofnet left
|
|||
Geth | doc/W4anD0eR96-patch-1: 39539835bf | (Alex Chen)++ (committed using GitHub Web editor) | doc/Type/Grammar.pod6 Rewrite Type/Grammar.pod6 Review needed And plz help improving examples of `*%opt` arguments. I have try : ... (12 more lines) |
08:26 | |
08:27
mcmillhj left
|
|||
Geth | doc: W4anD0eR96++ created pull request #1645: Rewrite Type/Grammar.pod6 |
08:27 | |
08:28
azawawi joined
|
|||
azawawi | hi #perl6 | 08:28 | |
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))); | |||
camelia | Cannot assign to an immutable value in submethod BUILDALL at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
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 | |
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))); | |||
camelia | Cannot assign to an immutable value in submethod BUILDALL at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
azawawi | Any idea why im getting "cannot assign to an immutable value" on the above code? | 08:30 | |
08:30
zakharyas joined
08:34
mcmillhj joined
08:35
zakharyas left
08:36
zakharyas joined
08:39
domm joined,
mcmillhj left
|
|||
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 | ||
geekosaur, bisect log: gist.github.com/1d3e189ec8d95993e1...f84345b67e | |||
geekosaur, There are 6 candidates for the first “new” revision. See the log for more details | |||
geekosaur | apparently never did work, so at least lizmat's BUILDALL changes are off the hook :) | 08:41 | |
will guess CUnion was not well tested and has a glitch | |||
azawawi | oh thanks | 08:42 | |
so there is no workarounds? | |||
geekosaur | I played around a bit and couldn't find one. But I'm not an expert on NativeCall | ||
azawawi | or basically create n-different structs for n-union elements :) | 08:43 | |
08:44
cdg joined
|
|||
azawawi | or create n-int8 and play with the bits :) | 08:44 | |
# Currently making a wrapper for msgpackc (a C implementation of our currently slow Data::MessagePack) | 08:45 | ||
github.com/msgpack/msgpack-c | |||
github.com/pierre-vigier/Perl6-Data-MessagePack | 08:46 | ||
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:48 | ||
08:48
cdg left
|
|||
azawawi | current pure perl6 implementation is currently too slow to create even 10_000 elements :) | 08:49 | |
08:50
mcmillhj joined,
sproctor joined
|
|||
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. | ||
azawawi | geekosaur: thx | 08:55 | |
08:56
wander_ left
08:58
telex left
08:59
telex joined,
azawawi left
09:00
mcmillhj left
|
|||
Geth | mu: 2dee2e0297 | (Tom Browder)++ (committed using GitHub Web editor) | misc/perl6advent-2017/schedule title change |
09:02 | |
09:11
wander joined,
Cabanossi left
09:13
Cabanossi joined
09:15
steeznson joined
09:23
ivans left
09:25
robertle joined
09:27
rindolf left
|
|||
AlexDaniel | squashable6: next | 09:28 | |
squashable6 | AlexDaniel, ⚠🍕 Next SQUASHathon in 1 day and ≈0 hours (2017-11-04 UTC-12⌁UTC+14). See github.com/rakudo/rakudo/wiki/Mont...Squash-Day | ||
09:41
ivans joined
09:46
sena_kun joined
09:52
KDr2 left
09:56
cdg joined
10:01
cdg left,
zakharyas left
10:02
zakharyas joined
10:08
finanalyst left
10:23
araujo joined
10:30
eroux joined
10:32
eroux left
10:40
llfourn_ left
10:45
astj left,
astj joined
10:47
ivans left,
ivans joined
|
|||
DrForr | m: say sprintf "foo%d",Any; | 10:48 | |
camelia | Died with X::Str::Sprintf::Directives::BadType |
||
DrForr | This doesn't have a proper error with file/line. | 10:49 | |
10:50
astj left
|
|||
AlexDaniel | DrForr: RT#126063 | 10:53 | |
synopsebot | RT#126063 [new]: rt.perl.org/Ticket/Display.html?id=126063 printf omits line number in error message | ||
DrForr | Aha, good to know. | ||
Maybe I should join the squashathon... | 10:54 | ||
AlexDaniel | \o/ | ||
.pizza DrForr | |||
buggable: pizza DrForr | |||
buggable | DrForr, enjoy this slice of Chicken Mexican Red Wave pizza, my friend! Yummy 🍕 | ||
10:57
steeznson left
|
|||
DrForr | Nom. | 10:57 | |
sacomo | Hi all, is there a way to dynamically load a module, require ::('Foo::Bar'), and access its `our` subroutines? | 11:00 | |
11:02
zakharyas left
|
|||
wander | sacomo, docs.perl6.org/language/modules#require | 11:02 | |
so it is "require" | |||
sacomo | wander, thanks, I have been trying that... | 11:03 | |
11:04
jeek joined
11:06
zakharyas joined
|
|||
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:07 | |
ah, got it | 11:08 | ||
&::('Foo')::bar(); | |||
11:13
margeas joined
11:20
aborazmeh joined,
aborazmeh left,
aborazmeh joined
11:24
GreatMazi joined
11:27
Cabanossi left
11:28
Cabanossi joined,
cpage__ joined
11:29
bisectable6 left,
bisectable6 joined,
ChanServ sets mode: +v bisectable6
11:31
cpage left,
cpage__ is now known as cpage
11:38
eliasr joined
11:39
nightfrog joined
11:57
Cabanossi left
11:58
Cabanossi joined
12:03
GreatMazi1 joined
12:05
ivans left
12:07
GreatMazi left
12:09
llfourn joined
12:12
ivans joined
12:16
zakharyas left
|
|||
Geth | ecosystem: 52c0623124 | (Zoffix Znet)++ (committed using GitHub Web editor) | META.list Move module from CPAN |
12:19 | |
12:24
kalkin- joined
|
|||
kalkin- | hi | 12:24 | |
m: class F { has @.color[4] = <1 2 3 4> }; my $f = F.new(); say $f.color; | 12:25 | ||
camelia | [(Any) (Any) (Any) (Any)] | ||
kalkin- | Why is the default array value not assigned? | ||
12:26
pmurias joined
|
|||
kalkin- | m: class F { has $f = 23 }; my $f = F.new(); say $f.f; | 12:26 | |
camelia | No such method 'f' for invocant of type 'F' in block <unit> at <tmp> line 1 |
||
kalkin- | m: class F { has $.f = 23 }; my $f = F.new(); say $f.f; | ||
camelia | 23 | ||
Geth | modules.perl6.org: aed4cb5740 | (Zoffix Znet)++ | lib/ModulesPerl6/Controller/Dist.pm Properly escape README content; Zoffix-- Fixes #92 |
||
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 | |
I think I'm missing something basic | |||
12:28
Zoffix joined
|
|||
Zoffix | kalkin-: looks like a bug with defaults on shaped array attributes | 12:28 | |
kalkin-: would you file it, please? | |||
huggable: rakudobugs | |||
huggable | Zoffix, Report bugs on github.com/rakudo/rakudo/issues/new | ||
kalkin- | m: class F { has @.color = <1 2 3 4> }; my $f = F.new(); say $f.color; | 12:29 | |
camelia | [1 2 3 4] | ||
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 | ||
m: class F { has @.color[4] = <1 2 3 4> }; my $f = F.new(); say $f.color; | 12:31 | ||
camelia | [(Any) (Any) (Any) (Any)] | ||
kalkin- | Zoffix: ok, opening a bug thank you | ||
Zoffix | And well, the bot uses HEAD | ||
m: class F { has @.color[4]; submethod BUILD (:@!color = <1 2 3 4>) {} }; my $f = F.new(); say $f.color; | |||
camelia | [1 2 3 4] | ||
Zoffix | m: class F { has @.color[4]; submethod TWEAK (:@!color = <1 2 3 4>) {} }; my $f = F.new(); say $f.color; | ||
camelia | [1 2 3 4] | ||
Zoffix | kalkin-: ^ you can use that as a workaround in the meantime | ||
(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! | ||
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:33 | |
Zoffix & | 12:34 | ||
12:34
Zoffix left
|
|||
kalkin- | Done: github.com/rakudo/rakudo/issues/1226 | 12:37 | |
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 | Array.new(:shape(4,), [Any, Any, Any, Any]) | ||
lizmat | so it looks like .STORE is not being called | ||
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 | Array.new(:shape(4,), [Any, Any, Any, Any]) | ||
12:45
darkmorph joined
12:47
mson joined
12:55
cdg joined
13:00
cdg left
13:02
gGREATmAZI joined,
rgrau joined
13:06
GreatMazi1 left
13:10
rindolf joined
|
|||
wander | kalkin-, it works well on the version I use | 13:15 | |
I reply you on the issue | |||
with version | |||
This is Rakudo version 2017.10-64-g697e4ecff built on MoarVM version 2017.10-29-g116c7a13 implementing Perl 6.c. | |||
$ perl6 -e 'class F { has @.color = <1 2 3 4>; }; my $f = F.new(); dd $f.color' | |||
> Array @!color = [IntStr.new(1, "1"), IntStr.new(2, "2"), IntStr.new(3, "3"), IntStr.new(4, "4")] | |||
oops | 13:17 | ||
if you try to fix size, then the issue occurs, sorry. | |||
13:18
darkmorph left
13:21
AlexDaniel left
13:22
GreatMazi joined
13:23
cdg joined
13:25
gGREATmAZI left
|
|||
sacomo | Zoffix: thanks, that should come in handy. | 13:33 | |
13:34
COMBORICO joined
|
|||
wander | timotimo, irclog.perlgeek.de/perl6/2017-11-01#i_15388148 | 13:42 | |
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
|
|||
kalkin- | wander: I have a typo in the issue, I meant shaped arrays @.color[4] = … | 13:46 | |
Fixed the issue | |||
m: class F { has @.color[4] = <1 2 3 4> }; my $f = F.new(); say $f.color; # @wander | |||
camelia | [(Any) (Any) (Any) (Any)] | ||
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 | |
kalkin-, :) | |||
13:59
aborazmeh left
14:00
mcmillhj joined
14:05
mcmillhj left,
mcmillhj joined,
Tom_Leg joined
14:07
MasterDuke joined
14:10
mempko joined
14:11
Tom_Leg left
|
|||
wander | moritz, what is the convenience we use "<|w>" and ">>", "<<" | 14:14 | |
they are quite of same usage | 14:15 | ||
moritz | << only matches a left word boundary | ||
>> only matches a right word boundary | |||
m: say "stuff here!!!".subst(:g/, />>/, '|') | 14:16 | ||
camelia | 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 />>/, '|') |
||
moritz | m: say "stuff here!!!".subst(:g, />>/, '|') | ||
camelia | stuff| here|!!! | ||
moritz | m: say "stuff here!!!".subst(:g, /<</, '|') | ||
camelia | |stuff |here!!! | ||
moritz | m: say "stuff here!!!".subst(:g, /<?wb>/, '|') | ||
camelia | |stuff| |here|!!! | ||
wander | I saw the difference, thank you | 14:17 | |
14:21
stmuk_ joined
14:23
stmuk left
14:37
zakharyas left,
zakharyas joined
14:39
perlpilot joined
|
|||
Geth | doc: b00b047e8b | (Alex Chen)++ (committed using GitHub Web editor) | doc/Language/regexes.pod6 Update regexes.pod6 1. Remove `=head1 Look-around assertions` and put `Lookahead/Lookbehind assertions` into `Anchor` 2. Add example to show difference between C«<|w>» and C<«>, C<»>: |
14:41 | |
synopsebot | Link: doc.perl6.org/language/regexes | ||
14:56
abraxxa left
14:57
mcmillhj left
14:59
mcmillhj joined
15:05
araujo left
15:11
COMBORICO1611 joined
15:17
mson left
|
|||
COMBORICO1611 | Can someone read this in English for me? / ( [ \d. ] ** 1 . . 3 \. ] ** 3 \d ** 1 . . 3 ) /; | 15:19 | |
15:21
japhb joined
|
|||
COMBORICO | Nevermind, finally got it. | 15:23 | |
15:27
MasterDuke left
15:29
khw joined
|
|||
AlexDaniel` | squashable6: next | 15:45 | |
yoleaux | 31 Oct 2017 10:51Z <wander> AlexDaniel`: ^^ | ||
squashable6 | AlexDaniel`, ⚠🍕 Next SQUASHathon in ≈18 hours (2017-11-04 UTC-12⌁UTC+14). See github.com/rakudo/rakudo/wiki/Mont...Squash-Day | ||
COMBORICO1611 | m: my $string = "IP address: 17.125.246.28;" ; say ~$/ if $string ~~ / ( [ \d ** 1 . . 3 \. ] ** 3 \d ** 1 . . 3 ) / ; | 15:50 | |
camelia | ( no output ) | ||
15:51
mempko left
|
|||
wander | whitespace important | 15:54 | |
m: my $string = "IP address: 17.125.246.28;" ; say ~$/ if $string ~~ / ( [ \d ** 1..3 \. ] ** 3 \d ** 1..3 ) / ; | |||
camelia | 17.125.246.28 | ||
wander | '1 . . 3' is surely different from '1..3' | ||
COMBORICO1611 | I see. Thank you. | 15:55 | |
I'm trying to find out how [\d] is being applied outside of its grouping | |||
Specifically, with the second **. | |||
(If that is even correct.) | 15:56 | ||
15:57
mcmillhj left,
hankache joined
|
|||
wander | m: say "IP address: 17.125.246.28;" ~~ /( ( \d ** 1..3 \. ) ** 3 (\d) ** 1..3 )/ ; | 15:58 | |
camelia | 「17.125.246.28」 0 => 「17.125.246.28」 0 => 「17.」 0 => 「125.」 0 => 「246.」 1 => 「2」 1 => 「8」 |
||
wander | that is it | ||
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: github.com/perl6/modules.perl6.org...l/86/files IIRC the problem with it was that data fetcher doesn't fetch travis files | ||
tbrowder | .tell moritz check yr gmail address when you get a chance, please | ||
yoleaux | tbrowder: I'll pass your message to moritz. | ||
timotimo | i.e. it's allowed to cheat as much as it wants as long as it knows it won't get caught | ||
COMBORICO1611 | Hmm. Thank you for your help. | 16:01 | |
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 | ||
wander | XD | 16:03 | |
moritz | actions are applied in the order their regex calls match | ||
yoleaux | 15:59Z <tbrowder> moritz: check yr gmail address when you get a chance, please | ||
moritz | with alternations or quantifiers, than can be different from left-to-right | ||
16:05
piojo left
|
|||
wander | sounds reasonable | 16:06 | |
cannot wait to read your 'Parsing with Perl 6 Regexes and Grammars' | 16:08 | ||
16:10
callyalater joined
16:11
troys joined
|
|||
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:13 | |
Juerd | ** applies to the one thing that comes before it | 16:14 | |
16:15
astj joined
|
|||
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 | ||
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 | ||
the most common operators are concatenation (which is invisble, the default operator basically), |, || and quantifiers | 16:18 | ||
wander | COMBORICO: '**3' modify '[ \d ** 1..3 \. ]' | ||
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
astj left
|
|||
moritz | of course, grouping constructs have even tighter precedence, so in / [a b]+ /, it matches ab, abab, ababab etc. | 16:19 | |
wander | most of these should be documented in docs.perl6.org/language/regexes | 16:20 | |
COMBORICO | I'm starting to get it. | ||
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 | |
the rabbithole goo^Hes deeeep | |||
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:22 | |
(I'm mixing math and Regex in the above.) | 16:23 | ||
16:23
unicodable6 left,
unicodable6 joined,
mempko joined
|
|||
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. | ||
Thanks for the help! | |||
16:26
domidumont left
|
|||
wander | I think '**3' modify the whole '[ \d ** 1..3 \. ]' | 16:26 | |
just like | |||
m: my regex wrapped { \d ** 1..3 \. }; say "IP address: 17.125.246.28;" ~~ /(<wrapped> ** 3 (\d) ** 1..3 )/ ; | |||
camelia | 「17.125.246.28」 0 => 「17.125.246.28」 wrapped => 「17.」 wrapped => 「125.」 wrapped => 「246.」 0 => 「2」 0 => 「8」 |
||
COMBORICO | Let me live my lie! I don't want to move on to the next page! J/k. | 16:31 | |
I mean i want to move on. | |||
16:33
rgrau left
|
|||
wander | curious about when Learning Perl 6 publishes | 16:41 | |
16:46
ChoHag left
16:47
wamba joined
|
|||
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 | 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 }>}; |
||
COMBORICO1611 | I knew it was a typo! | ||
I like the color coding error message. Good stuff. | 16:51 | ||
I also like how the arrow thing looks like a pile of dog crap. | |||
16:53
wamba left
16:54
mcmillhj joined
16:58
wamba joined
16:59
mcmillhj left
17:02
rgrau joined,
troys is now known as troys_,
epony left
17:06
robertle left,
troys_ is now known as troys
|
|||
COMBORICO | Moritz, i appreciate the insight into most common operators for rejects. It is definitely helpful to know what to focus on. | 17:06 | |
17:06
mr-foobar joined
17:08
epony joined,
hankache left
17:09
epony left
17:11
mcmillhj joined
17:17
mson joined
17:18
mingdao left
17:19
mingdao joined
|
|||
COMBORICO1611 | Can someone explain this: my $str = "<c>foo</c> <a>foo</a>"; | 17:19 | |
perlpilot | COMBORICO1611: it's a lexical scalar that's been assigned a string. :-) | 17:20 | |
COMBORICO1611 | $str ~~ s!'<a>foo</a>'~<a>bar</a>!; | ||
Heh. I knew I wouldn't get the rest out before a comment. | 17:21 | ||
Shoot! forgot a ! | |||
$str ~~ s!'<a>foo</a>'!<a>bar</a>!; | 17:22 | ||
17:22
setty1 joined
|
|||
COMBORICO1611 | I need to try different IRC client -- Quassel is too small a font. Zooming in makes things worse. | 17:22 | |
perlpilot | COMBORICO1611: so ... what actually needs explaining? | 17:23 | |
geekosaur | it's a substitution, using ! as the delimiter | ||
COMBORICO1611 | So ! is taking the place of / / ? | 17:24 | |
perlpilot | yep | ||
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 < >) | ||
COMBORICO1611 | What about the middle ! one? | ||
perlpilot | s/// -> s!!! | ||
geekosaur | s/// becomes s!!! | ||
s/ pattern / replacement / | |||
COMBORICO1611 | What the!? | ||
17:26
epony joined
|
|||
COMBORICO1611 | So the middle ! is some kind of operator | 17:26 | |
? | |||
perlpilot | separator | ||
geekosaur | s! pattern ! replacement ! | ||
COMBORICO1611 | Are the first and last ! also separators? | ||
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 ;) | ||
COMBORICO1611 | I'm not sure, geekosaur. The title of the section is s/search/replace Construct | ||
very little explaining :( | |||
geekosaur | it's missing the closing delimiter sigh | ||
COMBORICO1611 | Okay, so we got two delimiters (front and back !) and one separator, the ! inthe middle. | 17:28 | |
HUH? You saying ther eis a typo inthe book? | |||
17:30
GreatMazi1 joined,
raiph joined
|
|||
geekosaur | apparently, since this is apparently something that needs to be explained even though it's a fairly coimmon construct | 17:30 | |
so it should probably be as pedantic as possible rather than assuming the reader has already encountered all the other uses of it | |||
COMBORICO1611 | Ya, this book needs more pedagogory. | 17:31 | |
perlpilot | COMBORICO1611: which book is this? | ||
COMBORICO1611 | The only beginner programmer Perl 6 book. | 17:32 | |
I think this is the onlyone. | |||
Think Perl 6. | |||
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:33 | ||
17:33
GreatMazi left
17:34
zakharyas left
17:36
sproctor left,
jonas1 left
17:37
gGREATmAZI joined
17:39
COMBORICO1611 left
17:40
wamba left,
Piotr joined,
GreatMazi1 left
17:46
zakharyas joined
17:49
sena_kun left
17:50
sena_kun joined
17:57
Cabanossi left
17:58
Cabanossi joined
17:59
napo1eon left
18:03
sena_kun left
18:05
zakharyas left
18:06
zakharyas joined
18:09
Ven joined
18:10
Ven is now known as Guest34073
18:11
raschipi joined,
cdg left
18:12
azawawi joined
|
|||
azawawi | hi :) | 18:12 | |
18:13
cdg joined
|
|||
azawawi | geekosaur: ping | 18:13 | |
geekosaur | muu | ||
(qm... not entirely here) | 18:14 | ||
*am | |||
azawawi | :) | ||
geekosaur: Nearly there github.com/azawawi/scripts/blob/ma...rapper.pl6 # Packing natively msgpacks | 18:15 | ||
geekosaur: turned out i need to wrap the msgpack C API since libmsgpack does not expose all pack api | |||
once finished, Data::MessagePack will be way faster | 18:17 | ||
18:17
cdg left
|
|||
azawawi | what do you think is a good module name for a Data::MessagePack NativeCall wrapper? LibMsgPack? | 18:19 | |
moritz | Data::MessagePack::Native ? | 18:20 | |
azawawi | moritz: thx | 18:22 | |
ugexe | if you name it LibFoo* it might end up on debian and such as liblibfoo-perl6 | 18:23 | |
azawawi | what about libCurl ? :) | 18:24 | |
LibCurl that is | |||
moritz | $ apt-cache search ^liblib|wc -l | ||
4 | |||
this is on Ubuntu | |||
ugexe | only one is a legit liblib | 18:25 | |
(liblibrary and liblibre don't count) | 18:26 | ||
18:27
domidumont joined
18:30
troys is now known as troys_
|
|||
azawawi | gist.github.com/azawawi/130b6db09b...c389c39936 # A quick benchmark... Pure Perl 6 implemented excluded | 18:30 | |
implemented=implementation | |||
18:33
darutoko left
18:34
sftp joined
18:41
cpage_ left
18:46
callyalater left
18:47
GreatMazi1 joined
18:48
wamba joined
18:50
gGREATmAZI left
18:58
zakharyas left
18:59
MasterDuke joined
|
|||
COMBORICO | m: my $str = "<c>foo</c> <a>foo</a>"; $str ~~ s!'<a>foo</a>'!<a>bar</a>!; | 19:05 | |
camelia | ( no output ) | ||
buggable | New CPAN upload: bamboo-0.000.003_20171102.tar.gz by PSIXDISTS cpan.metacpan.org/authors/id/P/PS/...102.tar.gz | 19:06 | |
New CPAN upload: DateTime-Parse-0.000.003_20171102.tar.gz by PSIXDISTS cpan.metacpan.org/authors/id/P/PS/...102.tar.gz | |||
raschipi | m: my $str = "<c>foo</c> <a>foo</a>"; say $str ~~ s!'<a>foo</a>'!<a>bar</a>!; | 19:09 | |
camelia | 「<a>foo</a>」 | ||
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:10 | |
COMBORICO | m: my $str = "<c>foo</c> <a>foo</a>"; $str ~~ s!'<a>foo</a>' !<a>bar</a>!; | 19:11 | |
camelia | ( no output ) | ||
kalkin- | Do I put it in src? In ccode? In ext? In vendor? | ||
raschipi | COMBORICO: Camelia isn't the REPL, you need something to do output there or it won't. | ||
COMBORICO | Hmm. | 19:12 | |
So there is no typo m | |||
M = ? | |||
raschipi | m: my $str = "<c>foo</c> <a>foo</a>"; $str ~~ s!'<a>foo</a>' !<a>bar</a>!; say $str | 19:13 | |
camelia | <c>foo</c> <a>bar</a> | ||
raschipi | It's working but there wasn't any output. | ||
COMBORICO | First and last ! are delimiters, but what is middle ! | 19:14 | |
19:14
cpage_ joined
|
|||
COMBORICO | ! Is | 19:14 | |
geekosaur | didn't we establish that? separator | ||
s'pattern'replacement' | |||
COMBORICO | ! is separator? | ||
geekosaur | er | ||
s!pattern!replacement! | |||
COMBORICO | Haha. Your funny. | ||
moritz | the s/// or s!!! thing consists of two parts | 19:15 | |
a search regex and a replacement string | |||
COMBORICO | HAHA this is funny. | ||
moritz | is it? | ||
geekosaur | why | ||
MasterDuke | i would say it's just another delimiter | ||
19:15
Guest34073 left
|
|||
COMBORICO | I gotta talk to you guys off this phone and on a real keyboard. | 19:15 | |
19:18
mcmillhj left
|
|||
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? | ||
ugexe | m: say q!hello! | 19:21 | |
camelia | hello | ||
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:23 | |
I don't believe this was ever established in the book. | 19:24 | ||
19:27
mcmillhj joined
19:33
Ven joined,
Ven is now known as Guest7149
19:35
GreatMazi1 left
19:47
AlexDaniel joined
|
|||
Geth | ecosystem: 6cffbb8c7e | (Ahmad M. Zawawi)++ (committed using GitHub Web editor) | META.list Add MsgPack to ecosystem |
19:48 | |
19:49
cognominal left
19:57
mempko left,
mson left
|
|||
AlexDaniel | squashable6: next | 20:00 | |
squashable6 | AlexDaniel, ⚠🍕 Next SQUASHathon in ≈13 hours (2017-11-04 UTC-12⌁UTC+14). See github.com/rakudo/rakudo/wiki/Mont...Squash-Day | ||
AlexDaniel | :O | ||
20:02
cdg joined
|
|||
squashable6 | Webhook for perl6/doc is now active! Encourage flow. | 20:03 | |
AlexDaniel | \o/ | ||
(that's just a webhook. The event will start in 13 hours as planned) | 20:04 | ||
20:05
mr-foobar left
|
|||
AlexDaniel | hm somebody added 6lang tag to the doc repo. Cool :) | 20:06 | |
20:16
zakharyas joined,
comborico1611 joined
|
|||
comborico1611 | ^HOkay, 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 | ||
comborico1611 | Thanks! | 20:23 | |
geekosaur | or, in that one it *might* be safe without, but <> is risky | ||
hm, actually it's necessary hwere regardless | |||
<> is special in perl 6 regex | |||
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 | ||
comborico1611 | So in general the use of the single quotes are a good idea with that s/ / / operator? | ||
raschipi | if you want to match literally, yes | ||
comborico1611 | Alright. Thanks. | 20:25 | |
20:28
nadim_ joined,
nadim left,
domidumont left
20:29
comborico1611 left,
raschipi left
20:31
astj joined,
comborico1611 joined
20:33
raschipi joined
20:35
astj left
|
|||
comborico1611 | At the moment, I prfer XChat the most. | 20:35 | |
raschipi | m: my $new = 'word subst'; $new ~~ s/^'word'/foo/; say $new | 20:36 | |
camelia | foo subst | ||
raschipi | In this substitution, the caret goes outside the quotes because it means the start of the string instead of a literal caret. | 20:37 | |
comborico1611 | You're speaking of anchors ^ and $. | 20:38 | |
raschipi | Yes, to get the special meaning they go outside the quotes. | 20:41 | |
20:41
mcmillhj left
|
|||
comborico1611 | Roger that. | 20:41 | |
raschipi | m: my $new = '^word subst'; $new ~~ s/'^word'/foo/; say $new | ||
camelia | foo subst | ||
raschipi | Inside the quotes it's a literal caret. | ||
comborico1611 | I see. | 20:42 | |
20:43
rgrau left
20:44
wamba left
|
|||
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:45 | |
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! | ||
perlpilot | I | 20:47 | |
comborico1611 | Earlier, when y'all were saying s///, I was like what are y'all talking about! | ||
Aye* | |||
perlpilot | comborico1611: it helps if you've played with tools like ed, sed, perl(5). :-) | 20:48 | |
vi(m) | |||
etc. | |||
comborico1611 | I think I'm going to start with Emacs. | ||
I like his tutorial. | |||
Now I just need to figure out how to run XBindKeys so I can remap the arrow keys. | 20:49 | ||
geekosaur | what's wrong with the arrow keys? | 20:50 | |
comborico1611 | Moving away from homerow. | ||
20:53
callyalater joined
20:54
Juerd left
|
|||
azawawi | Interesting, MoarVM panic: Heap corruption detected: pointer 0x7f3117f083a0 to past fromspace | 21:00 | |
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
|
|||
AlexDaniel | you can do stuff like | 21:03 | |
key <AC02> { [ s, S, Left, Left ] }; | |||
and then AltGr+s will be Left | |||
comborico1611 | Do that in what program? | ||
AlexDaniel | create your own xkb layout | ||
comborico1611 | I'm not talking about in code, I mean on my OS. | 21:04 | |
AlexDaniel | you're using linux, right? | ||
comborico1611 | Yes. | ||
geekosaur | you can also do it with xmodmap and avoid the xkb runes | ||
AlexDaniel | here's an example gist.github.com/AlexDaniel/0ba2044...211e3d13bb | ||
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 | ||
AlexDaniel | the run something like this to activate: setxkbmap 'awesome' -option 'lv3:ralt_switch' -print | xkbcomp -I"$HOME/.xkb" - "$DISPLAY" | ||
21:06
Juerd joined
|
|||
AlexDaniel | then* | 21:07 | |
comborico1611 | I see. Thanks. | 21:10 | |
21:11
mempko joined
21:28
pmurias left
21:31
ryn1x_ joined
|
|||
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 | |
is an array created with < > different? | |||
azawawi | github.com/azawawi/scripts/blob/ma...sgpack.pl6 # at 100_000 list size dumps a heap corruption using rakudo latest | 21:41 | |
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 | |
when I reference* | |||
geekosaur | ryn1x_, <> acts like single quotes already | 21:45 | |
but with word splitting, minus quotes | 21:46 | ||
21:46
Piotr left
|
|||
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:46
zakharyas left
|
|||
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 < > | ||
ryn1x_ | ah ok. thanks! | 21:49 | |
geekosaur | 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
|
|||
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:56
Cabanossi left
21:58
ChoHag joined,
Cabanossi joined
21:59
callyalater left
22:11
comborico1611 left
|
|||
COMBORICO | That xmodmap thing is driving me nuts. | 22:15 | |
I am I'm trying to do is compose Ctrl + J 2 duplicate left | |||
To duplicate | 22:16 | ||
azawawi | MasterDuke: i have also gdb installed, under perl6-debug-m.pl6 it throws an exception and stops in _pack | ||
MasterDuke: any link to how to debug it? | |||
MasterDuke | can you type 'bt'? | ||
azawawi | gdb or perl6-debug-m? | 22:17 | |
MasterDuke | and 'call MVM_dump_backtrace(tc)' | ||
oh, gdb | |||
i've never used perl6-debug-m much | |||
maybe try 'say backtrace.new' | 22:18 | ||
22:21
cognominal joined
|
|||
azawawi | sorry a bit sleepy lol | 22:22 | |
gist.github.com/azawawi/a65f86dc84...93ed31a5b9 | |||
MasterDuke | huh, not a whole lot of info there | 22:24 | |
it's not segfaulting for me | |||
This is Rakudo version 2017.10-103-gef84aafc0 built on MoarVM version 2017.10-35-g9b9bd1bf4 | |||
azawawi | MoarVM panic: Heap corruption detected: pointer 0x7fbc4bf951b0 to past fromspace | 22:26 | |
random | |||
MasterDuke | valgrind might be better in this case | 22:27 | |
azawawi | i think putting passing CStruct on the stack is maybe causing that (recursively) | ||
MasterDuke | could be, i really don't know NativeCall at all, so i'm afraid i'm not going to be much help | 22:28 | |
azawawi | so far CStructs and CUnions have their own weird hidden bugs | 22:29 | |
22:29
niceperl joined
|
|||
MasterDuke | also, you'll get more useful info out of gdb and valgrind if you build your moarvm with '--debug=3' | 22:30 | |
azawawi | any idea what's the command line using rakudobrew? | 22:31 | |
MasterDuke | heh, i did know at one point | 22:32 | |
22:32
setty1 left
|
|||
azawawi installs valgrind | 22:32 | ||
ugexe | --configure-opts="--debug=3" or some such | 22:33 | |
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:35
HaraldJoerg left
22:36
raschipi left
22:37
niceperl left
|
|||
MasterDuke | azawawi: you're getting it with Data::MessagePack or your module? | 22:37 | |
azawawi | mine | 22:38 | |
MsgPack | |||
Data::MessagePack ... forget about getting more than 1000... so much slow :) | 22:39 | ||
Great even ubuntu (travis ci) apt update is failing also lol | 22:42 | ||
22:43
raschipi joined
22:45
telex left
22:46
telex joined
22:49
mson joined
|
|||
azawawi | gist.github.com/azawawi/f23cd00275...7242652d1f | 22:50 | |
timotimo | dang, that's not easy to debug | 22:52 | |
is it enough to git clone your repo and run that test file or do i need something else? | |||
azawawi | gist.github.com/azawawi/ef9a0f4b17...a69a34381f # full | 22:55 | |
timotimo | yeah we don't need the leak report | 22:56 | |
azawawi | timotimo: zef build . # to build resources/xyz.so | ||
timotimo: sudo apt install libmsgpack-dev | |||
timotimo | i need your scripts repository? | 22:57 | |
azawawi | examples | 22:58 | |
check out the last gist | |||
please | |||
timotimo | the full leak check is pretty useless | ||
moarvm just literally exits when it's finished, rather than going through all of its stuff and freeing things | 22:59 | ||
22:59
cdg left
|
|||
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:04 | |
more than 10k, it fails because it is just too fast :) | 23:05 | ||
timotimo | um, huh. | ||
the perl6-msgpack repo doesn't have the module that test-msgpack.pl6 uses | 23:06 | ||
23:06
Guest7149 left
23:07
COMBORICO left
|
|||
azawawi | what's the error? | 23:07 | |
timotimo | Could not find Data::MessagePack at line 4 in: | ||
this repo only has MsgPack | |||
azawawi | git pull ? | 23:08 | |
timotimo | already up to date | 23:09 | |
azawawi | github.com/azawawi/perl6-msgpack/b...sgpack.pl6 | ||
timotimo | where should i be looking? | ||
that's a different script! | |||
i can't install LibraryCheck | 23:11 | ||
azawawi | zef install LibraryCheck # not working? | 23:13 | |
timotimo | nope, it doesn't pass its tests | ||
now i gots the segfault | 23:15 | ||
now i can apply Techniques | 23:18 | ||
azawawi | cool | ||
MasterDuke | i see it dying in interp.c:3002 (nqp::decont) | 23:23 | |
timotimo | here it crashes in a guardconc :) | 23:25 | |
bleh. dumping the backtrace crashes inside gdb | 23:26 | ||
23:27
evalable6 left,
evalable6 joined
23:28
cdg joined
|
|||
MasterDuke | same thing happens in lldb | 23:29 | |
23:32
cdg left
|
|||
MasterDuke | hm, very different results if i add a `&& STABLE(OBJ)` into that conditional | 23:33 | |
timotimo: gist.github.com/MasterDuke17/ee516...4ca4e72e82 | |||
23:34
raiph left
23:37
lizmat left
23:41
cdg joined
|
|||
azawawi | tomorrow im going to add macOS and windows support | 23:45 | |
23:45
cdg left
|
|||
azawawi | thanks for helping me out on this one | 23:45 | |
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:47 | ||
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 neovim.io/doc/user/msgpack_rpc.html | 23:51 | ||
23:56
nadim_ left,
Cabanossi left
23:58
Cabanossi joined
|