»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by masak on 12 May 2015.
00:00 kid51 joined, khw left
osto True, but head and body elements allow different child elements. It would be nice if there was a way to write a pattern for a generic element, and then extend it for a more specific element. 00:00
00:00 Peter_R left
osto I might be looking at this the wrong way. 00:01
timotimo there's no reason you'd have to use <sym> inside the regex 00:02
or use it only once
00:03 sprocket joined
osto But that gives you only one parameter. I can't specify an element by both name and allowed content patterns. 00:04
Maybe I'm misunderstanding something about proto 00:05
RabidGravy BooK, the docs.perl6.org/language/grammars and the co-located regex page
beyond that dunno
osto Thanks, I'll take a look 00:06
kmel Hola! 00:11
ugexe osto: i think something like this might be what you are looking for github.com/ugexe/Perl6-Grammar--HT...30.pm6#L95 00:13
it will attempt to apply a rule that matches the name of the header itself, and if one does not exist it uses a generic rule 00:14
and then the matches all come back as name => value, not some-rule3 => somevalue-4 00:15
RabidGravy is there any reason that the constants PIO::* in IO::Socket::INET are "my" scoped? 00:16
ugexe the rules used to match those headers are in another file, but each one has different match logic
00:17 raiph joined
osto Thanks! I'll probably have to play around with it to understand it better, but this is helpful. 00:17
BooK RabidGravy: thanks 00:19
00:21 leont left 00:23 BenGoldberg left 00:25 firstdayonthejob left 00:31 aborazmeh joined, aborazmeh left, aborazmeh joined 00:32 lichtkind left 00:36 kmel left
RabidGravy right it's bed time 00:42
toodle pip
00:47 RabidGravy left, espadrine left
AlexDaniel Timbus: thank you very much :) 00:51
00:52 MadcapJake left
timotimo osto: the sym<foobar> part is actually part of the name, not really a parameter; each regex/token/rule you have that has the same name before the :sym<...> part as a proto token/rule/regex would be attempted to match against when the proto token/regex/rule is invoked 00:58
osto: inside the regex's definition, you can put whatever you like
github.com/moritz/json/blob/master...Grammar.pm <- osto, BooK, this is a good example grammar, BTW. the "Actions.pm" file in the same folder belongs to it, too. 00:59
timotimo signs off 01:00
osto timotimo: That's the exact module I've been looking at for a while. 01:07
I just found that amusing :) 01:08
01:09 yeahnoob joined 01:14 telex left 01:16 telex joined 01:18 sufrostico left 01:19 Actualeyes joined 01:23 khw joined 01:24 khw left 01:27 MilkmanD1n is now known as MilkmanDan 01:28 lizmat left 01:43 tokuhiro_ joined 01:47 tokuhiro_ left 01:57 [Tux] left 01:59 nightfrog left 02:03 raiph left, nightfrog joined 02:05 lizmat joined 02:15 [Tux] joined, nightfrog left, nightfrog joined 02:16 AlexDaniel left 02:17 tokuhiro_ joined
osto Dumb question: What's the best way to use a conditional in a regex? Something like: 02:24
token example($arg) { $arg == 42 ?? a* :: b* } 02:25
02:25 yqt left 02:27 chenryn joined
tokuhiro_ hmm 02:31
m: dd("\x0d\x0a".encode('latin1').decode('latin1') ~~ /\x0d?\x0a/)
camelia rakudo-moar 183d69: OUTPUT«Any $var = Any␤»
tokuhiro_ why?
ugexe because \x0d\x0a its encoded as 1 grapheme but you are comparing it against 2 i would guess 02:36
as in, i can see how the ? could imply its 2 characters 02:37
maybe /[\x0a | \x0d\x0a]/ would work 02:38
ShimmerFairy m: say ?("\r\n".encode("latin1").decode("latin1") ~~ /\r?\n/) 02:39
camelia rakudo-moar 183d69: OUTPUT«True␤»
ShimmerFairy m: say ?("\r\n".encode("latin1").decode("latin1") ~~ /\x0d?\x0a/)
camelia rakudo-moar 183d69: OUTPUT«False␤»
ShimmerFairy m: say ?("\r\n".encode("latin1").decode("latin1") ~~ /"\r"? "\n"/)
camelia rakudo-moar 183d69: OUTPUT«False␤»
ShimmerFairy tokuhiro_: note that /\n/ will match any kind of newline, beyond just ^J and ^M^J :) 02:40
m: say ?("\r\n".encode("latin1").decode("latin1") ~~ /^ \n $/) 02:41
camelia rakudo-moar 183d69: OUTPUT«True␤»
tokuhiro_ hmm 02:42
02:42 kid51 left
ugexe if its your http parser grammar CRLF you could look at grammar::http, as its code works with the new changes 02:43
02:43 softmoth left 02:44 ilbot3 left
ShimmerFairy I get the feeling /\r?\n/ only works because the \r? is ignored, what with the question mark :) 02:44
m: say ?("\r\n" ~~ /\r\n/)
camelia rakudo-moar 183d69: OUTPUT«True␤»
ShimmerFairy huh, apparently not.
zengargoyle m: "\r\n".encode('latin1') 02:46
camelia ( no output )
zengargoyle m: say "\r\n".encode('latin1')
camelia rakudo-moar 183d69: OUTPUT«Blob[uint8]:0x<0d 0a>␤»
02:46 ilbot3 joined
zengargoyle that just has the 0d on my moar built just early this morning... 02:47
ShimmerFairy which means somebody (most likely jnthn++) fixed non-Unicode encodings since then :)
02:47 eliasr left
zengargoyle yeah, i'mma going to wait a couple of days until everything settles. :P 02:48
ugexe my ocd will not allow such a thing 02:49
osto Another dumb question.... I can't find the syntax for how to reference a unicode character by name in a regex... 02:51
zengargoyle "\c[LATIN CAPITAL LETTER A, COMBINING RING ABOVE]" 02:54
osto Awesome, thanks 02:55
zengargoyle <:name(/^LATIN LETTER.*P$/)>
from quick ack of specs
no guarantees...
m: say 'A' ~~ /<:name('LATIN CAPITAL LETTER A')>/ 02:57
ShimmerFairy The <:name()> version is particularly useful if you need to match any character with a particular kind of name, as shown in the paste :)
camelia rakudo-moar 183d69: OUTPUT«「A」␤»
zengargoyle m: say 'A' ~~ /"c[LATIN CAPITAL LETTER A]"/ 02:58
camelia rakudo-moar 183d69: OUTPUT«Nil␤»
zengargoyle m: say 'A' ~~ /"\c[LATIN CAPITAL LETTER A]"/
camelia rakudo-moar 183d69: OUTPUT«「A」␤»
zengargoyle m: say 'A' ~~ /\c[LATIN CAPITAL LETTER A]/
camelia rakudo-moar 183d69: OUTPUT«「A」␤»
03:00 kaare_ joined
osto Interesting, although I imagine over a set of characters whose names match a regex is never a good idea. 03:00
*matching over
Besides matching the exact name of course 03:01
m: say 'A' ~~ /<:name('')>/ 03:02
camelia rakudo-moar 183d69: OUTPUT«Nil␤»
osto m: say 'A' ~~ /<:name('LETTER')>/
camelia rakudo-moar 183d69: OUTPUT«Nil␤»
osto m: say 'A' ~~ /<:name('LATIN CAPITAL LETTER A')>/
camelia rakudo-moar 183d69: OUTPUT«「A」␤»
osto m: say "\t" ~~ /<:name('CHARACTER TABULATION')>/ 03:05
camelia rakudo-moar 183d69: OUTPUT«「 」␤»
osto m: say "\t" ~~ /<:name('TAB')>/
camelia rakudo-moar 183d69: OUTPUT«Nil␤»
osto m: say "\t" ~~ /<:name('tab')>/
camelia rakudo-moar 183d69: OUTPUT«Nil␤»
03:12 kid51 joined
osto Another question: Is there a way to match every item in a list, but in any order? 03:13
say "b, a, c" ~~ /{.join(', ') for <a b c>.permutations}/ 03:15
m: say "b, a, c" ~~ /{.join(', ') for <a b c>.permutations}/
camelia rakudo-moar 183d69: OUTPUT«「」␤»
osto m: say "bac" ~~ /{<a b c>.permutations}/ 03:16
camelia rakudo-moar 183d69: OUTPUT«「」␤»
osto m: say <a b c>.permutations
camelia rakudo-moar 183d69: OUTPUT«((a b c) (a c b) (b a c) (b c a) (c a b) (c b a))␤»
osto m: say /{<a b c>.permutations}/ 03:17
camelia rakudo-moar 183d69: OUTPUT«/{<a b c>.permutations}/␤»
osto m: say .join for <a b c>.permutations
camelia rakudo-moar 183d69: OUTPUT«abc␤acb␤bac␤bca␤cab␤cba␤»
osto m: say "bac" ~~ /{.join for <a b c>.permutations}/ 03:18
camelia rakudo-moar 183d69: OUTPUT«「」␤»
03:19 ostomachion joined
ostomachion say (.join for <a b c>.permutations).WHAT 03:21
m: say (.join for <a b c>.permutations).WHAT
camelia rakudo-moar 183d69: OUTPUT«(List)␤»
03:21 kid51 left
ostomachion m: my @a = <x y>; say "x" ~~ /x/; 03:23
camelia rakudo-moar 183d69: OUTPUT«「x」␤»
ostomachion m: my @a = <x y>; say "x" ~~ /@a/;
camelia rakudo-moar 183d69: OUTPUT«「x」␤»
ostomachion m: my @a = <x y>; say "x" ~~ /{@a}/;
camelia rakudo-moar 183d69: OUTPUT«「」␤»
ostomachion m: my @a = <x y>; say "x" ~~ /<@a>/;
camelia rakudo-moar 183d69: OUTPUT«「x」␤»
ostomachion m: my @a = <x y>; say "x" ~~ /<{@a}>/; 03:24
camelia rakudo-moar 183d69: OUTPUT«「x」␤»
ostomachion m: say "bac" ~~ /<{.join for <a b c>.permutations}>/
camelia rakudo-moar 183d69: OUTPUT«Nil␤»
ostomachion m: say "x" ~~ /<{<x y>}>/
camelia rakudo-moar 183d69: OUTPUT«「x」␤»
ostomachion m: say .join for <a b c>.permutations 03:25
camelia rakudo-moar 183d69: OUTPUT«abc␤acb␤bac␤bca␤cab␤cba␤»
ostomachion m: say .join for <a b>.permutations 03:26
camelia rakudo-moar 183d69: OUTPUT«ab␤ba␤»
ostomachion m: my $x = .join for <a b>.permutations; my $y = <ab ba>; say $x == $y 03:27
camelia rakudo-moar 183d69: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '7⏏5ba' (indicated by 7⏏)␤ in block <unit> at /tmp/wTX7Ud4W4c:1␤␤Actually thrown at:␤ in block <unit> at /tmp/wTX7Ud4W4c:1␤␤»
ostomachion m: my $x = .join for <a b>.permutations; my $y = <ab ba>; say $x eq $y
camelia rakudo-moar 183d69: OUTPUT«False␤»
ostomachion m: say <a b>.permutations
camelia rakudo-moar 183d69: OUTPUT«((a b) (b a))␤»
ostomachion m: say .join for <a b>.permutations 03:28
camelia rakudo-moar 183d69: OUTPUT«ab␤ba␤»
ostomachion m: say <ab ba>
camelia rakudo-moar 183d69: OUTPUT«(ab ba)␤»
ostomachion m: say @(.join for <a b>.permutations) # ??? 03:29
camelia rakudo-moar 183d69: OUTPUT«(ab ba)␤»
ostomachion m: say "bac" ~~ /<{@(.join for <a b>.permutations)}>/ 03:30
camelia rakudo-moar 183d69: OUTPUT«「ba」␤»
03:30 Actualeyes left
ostomachion m: say "bac" ~~ /<{@(.join for <a b c>.permutations)}>/ 03:30
camelia rakudo-moar 183d69: OUTPUT«「bac」␤»
ostomachion m: say ":D"
camelia rakudo-moar 183d69: OUTPUT«:D␤»
03:30 dmitri joined
ostomachion Now... is there a way to do this without calling .permutations? I imaging it doesn't scale well 03:31
m: say "bbaa" ~~ /<{@(.join for (/a*/, /b+/, /c?/).permutations)}>/ 03:36
camelia rakudo-moar 183d69: OUTPUT«Regex object coerced to string (please use .gist or .perl to do that) in block at /tmp/jWm70vGjJI:1␤Regex object coerced to string (please use .gist or .perl to do that) in block at /tmp/jWm70vGjJI:1␤Regex object coerced to string (please use .gist…»
ostomachion m: say "bbaa" ~~ /<{@((/a*/, /b+/, /c?/).permutations)}>/
camelia rakudo-moar 183d69: OUTPUT«Regex object coerced to string (please use .gist or .perl to do that) in block <unit> at /tmp/EIRSj9Fo5q:1␤Regex object coerced to string (please use .gist or .perl to do that) in block <unit> at /tmp/EIRSj9Fo5q:1␤Regex object coerced to string (plea…»
dmitri is there a real Perl6 module (for example, one listed on modules.perl6.org) that uses macros? 03:38
s/real//
03:39 ostomachion left, osto left 03:48 kaare_ left 03:55 Oatmeal left 03:56 chenryn left, bpmedley left, bpmedley joined 03:57 bpmedley left, bpmedley joined 04:01 khw joined 04:07 domm left 04:08 Oatmeal joined 04:17 chenryn joined 04:20 BenGoldberg joined 04:28 softmoth joined 04:32 dmitri left, softmoth left 04:34 Actualeyes joined 04:52 BenGoldberg left 04:58 xpen left 05:07 khw left 05:15 sprocket left 05:19 vendethiel joined 05:31 cognominal joined, skids left 05:43 vendethiel left 05:49 Oatmeal left, aborazmeh left 05:59 yeahnoob left 06:01 xpen joined, Oatmeal joined 06:17 softmoth joined
moritz #ÄÄBN N ÄSÄAÖ-´P#9~9~+ẞ4~+TXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX9~XX9~XXXXXGVFVT8NLOULPÄ# 06:18
-
good morning from Ida (and now also from me) :-) 06:19
06:20 xfix joined 06:21 softmoth left 06:28 aindilis left
tadzik good morning :D 06:32
Hotkeys m: say "test".chars; 06:36
camelia rakudo-moar 183d69: OUTPUT«4␤»
Hotkeys m: 1 + 1 06:37
camelia rakudo-moar 183d69: OUTPUT«WARNINGS:␤Useless use of "+" in expression "1 + 1" in sink context (line 1)␤»
Hotkeys m: "test".chars
camelia ( no output )
Hotkeys doing "test".chars in my repl makes it stop working 06:38
but doing say "test".chars is fine
it also doesn't exit when I type exit
but it does if I do "say exit"
did I break something 06:39
06:39 domidumont joined
timotimo does it perhaps think you want to put more things on the same line? or something? 06:40
hm. or perhaps the warning makes it break 06:42
06:44 domidumont left, domidumont joined
dalek osystem: d4b1b6f | (Fayland Lam)++ | META.list:
Add Business::CreditCard to ecosystem

See github.com/fayland/perl6-Business-CreditCard
06:45
mrf good * #perl6 06:46
timotimo hey mrf 06:50
06:50 domidumont left
Hotkeys timotimo: i.imgur.com/7d3YxkU.png 06:51
the big spaces before terminating are me hitting enter
I also tried putting a semicolon and that didn't do anything
timotimo can you try just "warn 'foo'"? 06:52
Hotkeys > warn 'foo'
foo in block <unit> at <unknown file>:1
0
timotimo hum.
Hotkeys i.imgur.com/G1HWGZY.png 06:53
weird
ignore my strange directory structure 06:54
06:55 andreoss joined
mrf timotimo: are you able to merge things into rakudo? 06:56
timotimo i don't have a clue what's going wrong there
yeah, i am
mrf timotimo: any chance you could look at github.com/rakudo/rakudo/pull/573 as the spec tests for it have already been merged so are likely failing 06:57
Hotkeys i also tried rebuilding rakudo
didn't help
mrf heads to work 06:58
06:58 geraud left
Hotkeys also just restarted 06:59
still doing it
also does it in both powershell and the command prompt 07:00
timotimo mrf: done it :)
dalek kudo/nom: c698e20 | (Mike Francis)++ | src/Perl6/Actions.nqp:
Add support for 1^..^10 non inclusive range quantifiers in regexs
kudo/nom: 55d55f3 | timo++ | src/Perl6/Actions.nqp:
Merge pull request #573 from ungrim97/feature/non_inc_range_quantifier

Add support for 1^..^10 non inclusive range quantifiers in regexs
Hotkeys and perl6 has no problem executing files
just a repl problem it seems
timotimo yeah, our repl is a strange beast
the way it works wants a redesign ... at least partially 07:01
andreoss m: class Foo { has &!code ; submethod CALL-ME(|z) { &!code.(||z) } }; my $x = Foo.new(code => { say "hi" })
camelia ( no output )
andreoss m: class Foo { has &!code ; submethod CALL-ME(|z) { &!code.(||z) } }; my $x = Foo.new(code => { say "hi" }) ; $x()
camelia rakudo-moar 183d69: OUTPUT«Cannot invoke this object␤ in submethod CALL-ME at /tmp/RnomBOAjft:1␤ in block <unit> at /tmp/RnomBOAjft:1␤␤»
timotimo huh, ||? 07:02
class Foo { has &!code ; submethod CALL-ME(|z) { &!code.(|z) } }; my $x = Foo.new(code => { say "hi" }); $x() 07:03
m: class Foo { has &!code ; submethod CALL-ME(|z) { &!code.(|z) } }; my $x = Foo.new(code => { say "hi" }); $x()
camelia rakudo-moar 183d69: OUTPUT«Cannot invoke this object␤ in submethod CALL-ME at /tmp/oQwC2Qbd7w:1␤ in block <unit> at /tmp/oQwC2Qbd7w:1␤␤»
timotimo huh.
andreoss m: class Foo does Callable { has &!code ; submethod CALL-ME(*@a) { &!code.(|@a) } }; my $x = Foo.new(code => { say "hi" }) ; $x()
camelia rakudo-moar 183d69: OUTPUT«Cannot invoke this object␤ in submethod CALL-ME at /tmp/SjXpCfkcwi:1␤ in block <unit> at /tmp/SjXpCfkcwi:1␤␤»
mrf timotimo++ thanks 07:04
07:04 domidumont joined 07:05 domidumont left
timotimo thank you for contributing :) 07:08
07:09 diana_olhovik_ joined
andreoss m: class Foo does Callable { has &.code ; submethod CALL-ME(*@a) { &.code.(|@a) } }; my $x = Foo.new(code => { say "hi" }) ; $x() 07:09
camelia rakudo-moar 183d69: OUTPUT«5===SORRY!5=== Error while compiling /tmp/2RGUbNiwBR␤Virtual call &.code may not be used on partially constructed objects␤at /tmp/2RGUbNiwBR:1␤------> 3&.code ; submethod CALL-ME(*@a) { &.code7⏏5.(|@a) } }; my $x = Foo.new(code => { sa␤ …»
andreoss m: class Foo does Callable { has &.code ; submethod CALL-ME(*@a) { self.code.(|@a) } }; my $x = Foo.new(code => { say "hi" }) ; $x() 07:10
camelia rakudo-moar 183d69: OUTPUT«hi␤»
andreoss m: class Foo does Callable { has &.code ; submethod CALL-ME(|z) { self.code.(|z) } }; my $x = Foo.new(code => { say "hi" }) ; $x()
camelia rakudo-moar 183d69: OUTPUT«hi␤»
andreoss why this doesn't work with private attribute? 07:11
also why the second deference is needed since it already has & sigil? 07:15
dalek rl6-most-wanted: 33fa25b | azawawi++ | most-wanted/modules.md:
Added Selenium::WebDriver as a WIP
07:17
07:19 domidumont joined, vendethiel joined
Timbus class Fdsa does Callable { has &.code; submethod CALL-ME(|z) { &!code(|z) } }; my $x = Fdsa.new(code => { say "hi" }); $x() 07:24
m: class Fdsa does Callable { has &.code; submethod CALL-ME(|z) { &!code(|z) } }; my $x = Fdsa.new(code => { say "hi" }); $x()
camelia rakudo-moar 55d55f: OUTPUT«hi␤»
Timbus andreoss, the public accessor is a method that returns the code block, if that's what you mean about 'dereferencing' 07:25
andreoss m: class Wrap does Callable { has &!code; submethod BUILD(:&!code) { * } submethod CALL-ME(|z) { &!code.(|z) } } ; my Wrap $x .= new(code => { say "hi @_[]" }) ; $x(10);
camelia rakudo-moar 55d55f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/LVDkwdDP8i␤Strange text after block (missing semicolon or comma?)␤at /tmp/LVDkwdDP8i:1␤------> 3 &!code; submethod BUILD(:&!code) { * }7⏏5 submethod CALL-ME(|z) { &!code.(|z) }␤ expecting an…»
andreoss m: class Wrap does Callable { has &!code; submethod BUILD(:&!code) { * } ; submethod CALL-ME(|z) { &!code.(|z) } } ; my Wrap $x .= new(code => { say "hi @_[]" }) ; $x(10); 07:26
camelia rakudo-moar 55d55f: OUTPUT«hi 10␤»
andreoss m: class Wrap does Callable { has &!code; submethod CALL-ME(|z) { &!code.(|z) } } ; my Wrap $x .= new(code => { say "hi @_[]" }) ; $x(10); 07:28
camelia rakudo-moar 55d55f: OUTPUT«Cannot invoke this object␤ in submethod CALL-ME at /tmp/56Ce9s0696:1␤ in block <unit> at /tmp/56Ce9s0696:1␤␤»
andreoss m: class Wrap does Callable { has &!code = { say "bye" }; submethod CALL-ME(|z) { &!code.(|z) } } ; my Wrap $x .= new(code => { say "hi @_[]" }) ; $x(10);
camelia rakudo-moar 55d55f: OUTPUT«bye␤»
andreoss private attributes are not handled by default constructor? 07:29
07:29 darutoko joined
TimToady if you want the name to be part of the public API, you must declare it with . instead of ! 07:31
"private" means you can change the name and nobody's program will break 07:33
so don't use ! unless you mean that
07:34 eone joined
andreoss what if i just don't want an accessor for a variable? 07:34
07:35 firstdayonthejob joined
moritz andreoss: what's the use case for letting a user set an attribute, but not read it? 07:35
tadzik perhaps it's not a variable after all, just a good name to have in .new() 07:39
07:39 Actualeyes left, Actualeyes joined 07:40 RabidGravy joined
andreoss moritz: i want a wrapper/decorator class, so i don't need these accessors at all 07:44
may be there is a better way to achieve that 07:45
07:47 _mg_ joined, vendethiel left
[Tux] test 50000 36.543 36.428 07:55
test-t 50000 36.848 36.733
nine [Tux]: nice numbers! I wonder what helped there 07:59
[Tux] noise
but yes, nice numbers 08:00
nine .tell jnthn I wonder if PackageHOW would be a good place for the global merging code. Then it would just be a matter of GLOBALish.merge-symbols($handle.globalish-package); 08:02
yoleaux nine: I'll pass your message to jnthn.
08:06 softmoth joined 08:10 softmoth left 08:12 rindolf joined 08:23 Actualeyes left 08:24 firstdayonthejob left
andreoss m: Parcel.WHAT.say 08:27
camelia rakudo-moar 55d55f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/kj8qUzHel3␤Undeclared name:␤ Parcel used at line 1␤␤»
08:28 leont joined 08:32 ely-se joined
nine andreoss: Parcel's gone 08:33
lizmat good *, #perl6!
nine Good #perl6, lizmat! 08:34
lizmat nine o/
08:36 chenryn left 08:37 chenryn joined 08:39 zakharyas joined 08:46 leont left 08:49 abraxxa joined 08:50 yeahnoob joined 08:52 g4 joined 08:55 eone left 09:02 Jonis joined
andreoss had Rakudo::Perl6::Format ever been working or that's some kind of draft? 09:17
09:23 abaugher` left, dakkar joined, abaugher` joined
lizmat andreoss: not sure what that's for beast 09:29
oops, dutchism: 09:30
not sure what kind of beast that is
09:31 Psyche^ joined
BooK mmm, formats 09:31
09:33 lab joined 09:34 lab is now known as nadim 09:35 Psyche^_ left
lizmat afk for a few hours& 09:36
09:50 yeahnoob left
mrf m: say "ll" ~~ /l ** ^3/ 09:51
camelia rakudo-moar 55d55f: OUTPUT«「ll」␤»
mrf :D
09:55 softmoth joined 09:59 softmoth left 10:00 rindolf left 10:03 grondilu left
RabidGravy andreoss, it looks like it may work to some extent if some of the pull requests were merged 10:03
it needs a bit of love 10:04
RabidGravy isn't even going to touch it with a bargepole
10:04 grondilu joined
RabidGravy seem to be spending more time working on other modules than the ones I want to make 10:05
ho-hum
there's a lot of stuff which is like 80% there for my needs ;-) 10:06
10:14 espadrine joined 10:23 rarara__ joined, rarara__ left 10:27 ollej left 10:29 virtualsue joined 10:30 chenryn left
RabidGravy .tell tadzik as discussed last night I've sent github.com/tadzik/JSON-Unmarshal/pull/10 to make some things easier to unmarshall nicely 10:34
yoleaux RabidGravy: I'll pass your message to tadzik.
tadzik awesome, I'll try get around it today :)
yoleaux 10:34Z <RabidGravy> tadzik: as discussed last night I've sent github.com/tadzik/JSON-Unmarshal/pull/10 to make some things easier to unmarshall nicely
tadzik hey, thanks yolo!
RabidGravy cool, all working and everything 10:35
10:35 llfourn left
RabidGravy this is why I started with a "nice and simple" idea like making a META.info parser, more special cases than I could have imagined before I started 10:39
tadzik you know what'd be fun? 10:40
use this to create a JSON schema vaildator
RabidGravy that would be cool 10:41
tadzik maybe even *the* JSON schema 10:42
RabidGravy what I am actually aiming toward is getting github.com/jonathanstowe/JSON-Infer working nicely so the generate classes Just Work™ 10:43
10:44 pdcawley left
RabidGravy anyway off out to the supermarket now 10:45
have fun
10:50 RabidGravy left 10:59 chenryn joined, pippo joined
pippo o/ #perl6! 10:59
m: grammar G {…}; G.parse("AA"); grammar G {rule TOP {.*}}; 11:01
camelia rakudo-moar 55d55f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/yLZxYEKcrs␤Redeclaration of symbol G␤at /tmp/yLZxYEKcrs:1␤------> 3grammar G {…}; G.parse("AA"); grammar G7⏏5 {rule TOP {.*}};␤ expecting any of:␤ generic role␤»
pippo ^^Bug? That used to work with '…' and now no more. It works with '...' though. 11:02
m: grammar G {...}; G.parse("AA"); grammar G {rule TOP {.*}};
camelia ( no output )
grondilu (TIL I learnt that on irssi you can type "/msg" by just pressing tab) 11:05
pippo .tell lizmat Bug? irclog.perlgeek.de/perl6/2015-11-05#i_11487475
yoleaux pippo: I'll pass your message to lizmat.
11:07 pippo left
jnthn afternoon, #perl6 11:11
yoleaux 4 Nov 2015 18:58Z <nine> jnthn: I just love these moments, when working on the implementation reveals another piece of the rationale behind your design, even when you didn't spell it out. It's like reading a good book, only in a more active way :)
4 Nov 2015 19:09Z <lizmat> jnthn: perhaps .ords should return a List of List of codepoints
4 Nov 2015 19:36Z <lizmat> jnthn: S15:148 may need some rewording, as it specifically states ord can return negative numbers
08:02Z <nine> jnthn: I wonder if PackageHOW would be a good place for the global merging code. Then it would just be a matter of GLOBALish.merge-symbols($handle.globalish-package);
synbot6 Link: design.perl6.org/S15.html#148_may_n..._rewording
jnthn o.O
tadzik :D
grondilu m: say |<a b c> xx 3 # pretty cool that this works as expected 11:16
camelia rakudo-moar 55d55f: OUTPUT«(a b c a b c a b c)␤»
jnthn TIL kidney beans expand a lot when left to soak overnight 11:17
grondilu m: say 1, |<a b c> xx 3 # not sure about that though
camelia rakudo-moar 55d55f: OUTPUT«1(a b c a b c a b c)␤»
jnthn .tell lizmat Seems the .ords question was answered by TimToady++, and yeah, S15 will want aligning with the tests 11:18
yoleaux jnthn: I'll pass your message to lizmat.
stmuk I once confused wet and dry weight with chickpeas and ended up with a 5 nines % chickpea casserole
jnthn My recipe says 350g of dried beans, soaked overnight :) 11:20
So I'm pretty sure I've got it right :) 11:21
gfldex how heavy are they now?
TEttinger stmuk: that sounds entertaining 11:22
jnthn .tell nine Glad you're having fun with! ;) I don't know PackageHOW would be the right place; it's a meta-object. And GLOBALish is just a type object. It's GLOBALish:: that is the actual Stash to merge things in to. So Stash may be a better place.
yoleaux jnthn: I'll pass your message to nine.
TEttinger for the entire homeless shelter you could feed with it, I'm sure
jnthn gfldex: Not sure, they're still in the water for now :) 11:23
Though I kinda just realized that when I've been buying kidney beans in tins I've been mostly paying for water... 11:24
TEttinger not even very drinkable water 11:25
lizmat .botsnack 11:29
yoleaux 11:05Z <pippo> lizmat: Bug? irclog.perlgeek.de/perl6/2015-11-05#i_11487475
synbot6 om nom nom
yoleaux :D
11:18Z <jnthn> lizmat: Seems the .ords question was answered by TimToady++, and yeah, S15 will want aligning with the tests
11:30 nightfro` joined 11:31 nightfrog left, nightfro` is now known as nightfrog, nadim left, nadim joined
stmuk I do sort of wish .chars was .wchars or .graphemes 11:32
lizmat stmuk: why ?
grondilu wonders if we could not have |op] as a shortcut for |[op] 11:33
11:33 kid51 joined
grondilu (or rather |\op] for |[\op]) 11:33
ilmari eww, non-matched brackets 11:34
stmuk lizmat: because it's more obvious and explicit
grondilu ilmari: yeah, non-matching brackets are LTA, granted. 11:35
ilmari LTA?
grondilu Less Than Awesome, see S99
DrForr Well, .wchars could easily mean 16-bit characters like you get out of the curses library, not UTF-8.
ilmari DrForr: there's no such thing as a utf8 character 11:36
tadzik I think synbot6 can do that
gfldex m: say 1, |( |<a b c> xx 3) # i want my spaces back!
camelia rakudo-moar 55d55f: OUTPUT«1abcabcabc␤»
tadzik synbot6: LTA
ilmari </peeve>
tadzik S99:LTA
synbot6 Link: design.perl6.org/S99.html#LTA
tadzik aha!
grondilu gfldex: use slip 11:37
m: say 1, slip |<a b c> xx 3
camelia rakudo-moar 55d55f: OUTPUT«1abcabcabc␤»
gfldex m: dd (1, |( |<a b c> xx 3))
camelia rakudo-moar 55d55f: OUTPUT«List $var = $(1, "a", "b", "c", "a", "b", "c", "a", "b", "c")␤»
stmuk DrForr: well wikipedia says A wide character is a computer character datatype that generally has a size greater than the traditional 8-bit character
DrForr ilmari: Yes, I'm aware. Graphemes are more correct than any of the alternatives like .char or .wchar, because of how Unicode designates "characters".
gfldex grondilu: confess! you took my spaces!
grondilu oh I get what you meant now 11:38
DrForr And I'm just *today* back from vacation, need time to take up slack.
ilmari DrForr: my point is that the character set is unicode, utf-8 is merely the encoding
grondilu m: say 1, 2, 3
camelia rakudo-moar 55d55f: OUTPUT«123␤»
DrForr Ah, yes.
ilmari DrForr: you probably meant unicode character 11:39
grondilu m: say .WHAT given 1, 2, 3
camelia rakudo-moar 55d55f: OUTPUT«(List)␤»
DrForr I thought the standard preferred the term 'glyph'?
ilmari no, glyph is how it's rendered 11:40
fonts have glyphs
DrForr Okay, I sit corrected. 11:41
11:42 rindolf joined
gfldex m: say 1,2,3; say (1,2,3); that's a little confusing 11:43
camelia rakudo-moar 55d55f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/MPKNDKH8ao␤Undeclared routines:␤ a used at line 1␤ confusing used at line 1␤ little used at line 1␤ that's used at line 1␤␤»
gfldex m: say 1,2,3; say (1,2,3); # that's a little confusing
camelia rakudo-moar 55d55f: OUTPUT«123␤(1 2 3)␤»
11:43 softmoth joined
gfldex m: say 1,2,3; my $a := 1,2,3; say $a; # even more so 11:45
camelia rakudo-moar 55d55f: OUTPUT«123␤(1 2 3)␤»
11:47 pippo joined
pippo m: say (1, slip (|<a b c>) xx 3).Str; 11:47
camelia rakudo-moar 55d55f: OUTPUT«1 a b c a b c a b c␤»
pippo gfldex: ^^Is that what you were looking for? 11:48
11:48 softmoth left
gfldex pippo: i'm looking for bugs, your last version works 11:49
grondilu it's a bit awkard that stringification looks better than gist 11:52
*awkward 11:53
11:53 xfix left
grondilu m: say (1, slip |<a b> xx 3).Str 11:53
camelia rakudo-moar 55d55f: OUTPUT«1 a b a b a b␤»
grondilu m: say (1, slip |<a b> xx 3).gist
camelia rakudo-moar 55d55f: OUTPUT«(1 a b a b a b)␤»
grondilu ??
m: say (1, slip |<a b> xx 3)
camelia rakudo-moar 55d55f: OUTPUT«(1 a b a b a b)␤»
grondilu wth
m: say 1, slip |<a b> xx 3 11:54
camelia rakudo-moar 55d55f: OUTPUT«1ababab␤»
grondilu I have no idea what's going on here
not the same say multi candidate I guess 11:55
11:55 pmurias joined
dalek p: 0223e6a | jnthn++ | src/QRegex/P5Regex/Actions.nqp:
Fixes to :P5 to match magical \n behavior.

Discovered when making \n on Windows default to \r\n.
11:56
nine Hi jnthn!
yoleaux 11:22Z <jnthn> nine: Glad you're having fun with! ;) I don't know PackageHOW would be the right place; it's a meta-object. And GLOBALish is just a type object. It's GLOBALish:: that is the actual Stash to merge things in to. So Stash may be a better place.
nine jnthn: Ah, so it _is_ a Stash? That's what I thought at first, but introspection confused me:
m: use nqp; say "WHAT: {GLOBAL.WHAT.gist}, ^name: {GLOBAL.^name}, HOW: {GLOBAL.HOW}, isa Stash? {GLOBAL ~~ Stash} nqp::istype Stash? {nqp::istype(GLOBAL, Stash)}"
camelia rakudo-moar 55d55f: OUTPUT«WHAT: (GLOBAL), ^name: GLOBAL, HOW: Perl6::Metamodel::PackageHOW<140198113318904>, isa Stash? False nqp::istype Stash? 0␤»
11:57 andreoss left
nine m: use nqp; say "WHAT: {GLOBALish.WHAT.gist}, ^name: {GLOBALish.^name}, HOW: {GLOBALish.HOW}, isa Stash? {GLOBALish ~~ Stash} nqp::istype Stash? {nqp::istype(GLOBALish, Stash)}" 11:57
camelia rakudo-moar 55d55f: OUTPUT«WHAT: (GLOBAL), ^name: GLOBAL, HOW: Perl6::Metamodel::PackageHOW<139854194657272>, isa Stash? False nqp::istype Stash? 0␤»
jnthn nine: GLOBALish isn't. GLOBALish.WHO is.
nine: GLOBALish:: just being sugar for GLOBALish.WHO 11:58
grondilu
.oO( multi say(**@args is raw) { say (@args) } )
nine jnthn: ah I see now that in Perl6::ModuleLoader::merge_globals only $target.WHO is accessed 11:59
dalek ast: 72bb826 | jnthn++ | S32-exceptions/misc.t:
Harden test against different newline formats.
12:01
nine So it becomes GLOBALish.WHO.merge-symbols($handle.globalish-package.WHO) which is still very nice
jnthn nine: Yes :) 12:03
Phew, down to two test files with regressions before I can push magical \n
12:04 TEttinger left
nine I think the key to untangling this mess was really to completely separate loading the BOOTSTRAP from loading plain modules. Now we can easily move the code into places where it belongs. 12:05
12:09 xpen left
lizmat nine++ # the great untangler 12:09
jnthn nine++ # making sense of my designs 12:10
nine lizmat: I think it's actually an advantage that I knew almost nothing about this part of Rakudo when I started. Since I don't know what has been difficult historically, I just naively try things and some of them work out well :) 12:11
12:12 AlexDaniel joined
stmuk m: Buf.new(13, 10).decode("ascii").chars 12:13
camelia ( no output )
stmuk m: say Buf.new(13, 10).decode("ascii").chars
camelia rakudo-moar 55d55f: OUTPUT«1␤»
12:14 virtualsue left 12:21 abraxxa left, abraxxa joined, andreoss joined
andreoss m: my %h = a => 1; my $z = %h<a>:exists || %h<b>:exists; say $z; 12:21
camelia rakudo-moar 55d55f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/8UcGS60Xx8␤You can't adverb &infix:<||>␤at /tmp/8UcGS60Xx8:1␤------> 3 1; my $z = %h<a>:exists || %h<b>:exists7⏏5; say $z;␤ expecting any of:␤ pair value␤»
andreoss m: my %h = a => 1; my $z = %h<a>:exists or %h<b>:exists; say $z; 12:22
camelia rakudo-moar 55d55f: OUTPUT«True␤»
andreoss RabidGray: seems working after few fixes 12:25
12:25 pippo left, bpmedley left 12:27 Actualeyes joined 12:28 chenryn left, chenryn joined
dalek ast: 238fd35 | jnthn++ | S32-io/IO-Socket-INET. (3 files):
Make IO::Socket tests not sensitive to magical \n.
12:28
p: 570054a | jnthn++ | tools/build/MOAR_REVISION:
Get MoarVM with various normalization fixes.
12:29
andreoss though it doesn't do much indenting, just basic stuff like blocks 12:30
12:31 kaare_ joined
andreoss also it does compile the code 12:31
i guess it need some special action class to prevent it from doing so
jnthn lizmat: Ah, I think the Supply.lines tests may be a little bogus 12:43
They do this:
$s.emit( "\nc\rd\n" );
$s.emit( "\ne" );
lizmat that could well be
jnthn oops, wrong 2
$s.emit( "a\nb\r" );
$s.emit( "\nc\rd\n" );
But that could actually never be emitted by incoming data 'cus we'd never split a grapheme
lizmat well, that was intentional
jnthn Well, either Supply.lines needs to change to concatenate the leftover with the new 12:44
lizmat ah, but that would also be true for sockets ?
jnthn Right, if you read chars from a socket, if we see a \r in one packet, we'll not give you it back until we've seen the next packet doesn't have a \n at the start (and if it does, then we turn it into the grapheme)
lizmat if we receive at the end of a CR and the next chunk starts with a LF, would that work ?
ok, so that was what that test was checking 12:45
jnthn Ah
If we want that test to work, then the best way is to have Supply.lines concatenate new stuff to old
lizmat and afaik, it will concat the chunks
12:45 chenryn left
lizmat doesn't it do that ? 12:45
jnthn I don't see a concat in there
oh, or...hmm 12:46
lizmat $str = $str ~ nqp::unbox_s(val);
jnthn Yeah
lizmat line 458
jnthn So what on earth else is it doing to end up leaking the \r out...
lizmat maybe concat is busted in that respect ?
jnthn No 12:47
That I'm very sure works :)
m: say ("\r" ~ "\n").chars
camelia rakudo-moar 55d55f: OUTPUT«1␤»
12:47 nadim left 12:48 nadim joined
jnthn Hmm 12:48
It's really odd
ilmari m: ("\r" ~ "\n").codes 12:49
camelia ( no output )
ilmari m: say ("\r" ~ "\n").codes
camelia rakudo-moar 55d55f: OUTPUT«2␤»
jnthn lizmat: Maybe I should just push the change I have and tell you how to reproduce the issue? :)
lizmat sure, that will work for me :-) 12:50
jnthn ++lizmat :)
lizmat then will get back to you if I can't figure it out :-)
12:50 kid51 left
dalek kudo/nom: 772cb2a | jnthn++ | tools/build/NQP_REVISION:
Bump NQP_REVISION in preparation for magical \n.
12:51
kudo/nom: 4f276be | jnthn++ | src/Perl6/Actions.nqp:
Make \n resolve to $?NL.

This means it produces \r\n on Windows, \n elsewhere, and can be controlled using the `use newline` pragma.
jnthn First try S17-supply/lines.t with that. It'll probably pass. Then try the test file with `use newline :crlf;` added at the top.
lizmat oki 12:52
jnthn wonders where the stick tests for the newline pragma 12:53
nine So much work just to make software do the "obviously right thing" 12:54
12:55 Actualeyes left
ilmari the hardest part is often figuring out what that actually is 12:55
flussence some things are obviously right until you re-read them 6 months later :) 12:56
stmuk LWP::Simple::parse_chunks is broken but I guess investigation might be best when current work is completed?
lizmat stmuk: I would at least try post the latest NQP_REVISION bump 12:57
dalek ast: 6785742 | jnthn++ | S16-io/newline.t:
Basic tests for newline pragma.
12:58
stmuk lizmat: OK I'll update again
dalek kudo/nom: af78ecc | jnthn++ | t/spectest.data:
Run S16-io/newline.t.
13:01 aborazmeh joined, aborazmeh left, aborazmeh joined 13:04 rindolf left
jnthn There's RT #88674 done 13:04
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...l?id=88674
lizmat an oldie but goodie :-) 13:06
ShimmerFairy
.oO(ChangeLog: "\n" now has correct historical baggage :P)
13:08
jnthn :P 13:09
Darn, could really use even a cheating nqp::readlinechompfh on JVM... 13:11
lizmat jnthn: is readlinechompfh already a thing ?
jnthn adds one
lizmat: On Moar yes 13:12
lizmat: I pushed a branch that uses it even
(Unconditionally)
lizmat cool, looking forward to eradicating a lot of code
ShimmerFairy Though I happen to think Windows got \r\n right, based on my understanding of what the control codes originally meant :) (and considering they probably didn't have NEL yet)
jnthn If I do a cheating one on JVM then we can use it on all backends 13:13
It's no worse than it was before
And then I can de-shag IO::Socket::INET.get a bit too
13:16 aneumann joined
jnthn ooh, lunch! & 13:17
13:19 virtualsue joined 13:20 sufrostico joined 13:31 xpen joined
dalek kudo/nom: bf00046 | (Steve Mynott)++ | src/core/Exception.pm:
fix typo
13:32
kudo/nom: 1a60da9 | lizmat++ | src/core/Exception.pm:
Merge pull request #574 from stmuk/nom

fix typo
13:32 softmoth joined 13:33 pmurias left 13:34 _steve joined, _steve left 13:35 xpen left 13:36 lab_ joined, nadim left
abraxxa jnthn: did you find time to look at my DBDish::Oracle issue? 13:36
13:36 softmoth left
lizmat abraxxa: jnthn is off to lunch atm, but I don't think he has, as he's worked on making \n magical 13:37
abraxxa lizmat: ok, thanks 13:38
13:41 pmurias joined 13:42 AlexDaniel left
dalek kudo/nom: 85033f7 | lizmat++ | src/core/Str.pm:
Allow Str.split to take more than one needle

This should make most of the cases that Text::CSV handles a *lot* faster.
13:42
|Tux| runs to test …
lizmat |Tux|: just throw in the delimiters as a list into Str.split 13:43
don't need to bother to check whether they're Regex or not, it should do the right thing 13:44
|Tux| I first test as-is. see if it chages
can you pate what you mean?
paste
13:44 ecocode joined
lizmat you're now building a regex 13:44
13:44 blooohdy joined
lizmat tight? 13:44
right? 13:45
|Tux| yes
lizmat :-)
|Tux| $str.split ($re, :all).map: {
if $_ ~~ Str {
$_ if .chars;
}
else {
.Str if .Bool;
}; 13:46
};
lizmat the $re should be a list
|Tux| @re ?
lizmat yes, that would be best
|Tux| give it a moment for building
lizmat and you probably want :keep-indices
instead of :all
so you get the index of the delimiter that matched for that chunk 13:47
|Tux| hmmm... seems I haz a bug when migrating from test sub to final method :-( 13:48
argh 13:49
yes
13:49 Actualeyes joined 13:50 xpen joined
JimmyZ exit 13:51
lizmat |Tux| lemme first run some checks again :-(
13:52 blooohdy left 13:53 JimmyZ joined 13:57 aborazmeh left
lizmat $ 6 'dd "foobarbaz".split(<a o>,:keep-indices)' 14:01
List $var = $("f", 1, "", 1, "b", 0, "rb", 0, "z")
|Tux| ^^^
dalek kudo/nom: cdf2521 | lizmat++ | src/core/Str.pm:
Fix some oopsies in Str.split(@needles)
14:03 zacts joined
zacts so I guess is Perl6 officially released now? :-) 14:03
JimmyZ lizmat: there is another multi method split(Str:D \string there
moritz zacts: it's officially in beta
lizmat argh, yes, the limit case
zacts ah, I see. ok 14:04
:-)
cool
what are the main things that need to be done for it to be stable and out of beta?
14:04 RabidGravy joined
lizmat JimmyZ++ 14:04
zacts and I've heard like about 6 months ago that optimization of perl6 was kind of slow
has this improved? 14:05
14:05 zengargoylee joined
DrForr See also: beta :) 14:05
zacts and is there a potential for rakudo to also be able to parse and execute perl5 code one day?
DrForr zacts: See also: Inline::Perl5.
zacts oh cool ok 14:06
dalek kudo/nom: de715e9 | lizmat++ | src/core/Str.pm:
Another oopsie, JimmyZ++ for spotting
14:07
zacts DrForr: although, is rakudo actually executing the Perl5 code in that case, or is it calling an external Perl5 interpreter?
pmurias it's calling an external Perl5 interpreter 14:08
zacts ah ok
lizmat well, embedded Perl5 interpreter would be a better description 14:09
zacts yeah I think I was just curious as to if it would be possible for rakudo to ever parse and execute perl5 code natively in the future
although,, that still sounds cool
pmurias there is a partial implementation of that
jnthn back
lizmat zacts: that's still on the list, but not before Xmas
zacts ah yeah... I wasn't expecting this by Xmas
:-P
pmurias zacts: XS code is also a problem for that
zacts what is XS? 14:10
nine zacts: Perl 5's interface to native libraries. I basically exposes all the internals of the perl interpreter, which is why nothing else has a chance of being compatible. 14:11
zacts ah ok
regardless I'm really excited about the betaness now of Perl6, and hopefully soon a full release 14:12
14:13 rindolf joined
dalek p: 05d7b20 | jnthn++ | src/vm/jvm/ (2 files):
Implement cheating nqp::readlinechompfh on JVM.
14:13
RabidGravy but a lot of things that required XS code in Perl 5 probably can be done directly with NativeCall in Perl 6 and no additional C code required
pmurias RabidGravy: a lot of perl 5 code (in)directly depends on an XS module 14:14
abaugher` I don't find anything SSH on the modules directory or 'modules wanted' pages, which surprises me. Is there a different way to do that now, that I'm not thinking of, or is doing SSH just not as common as I figured?
nine zacts: we're, too ;) 14:15
RabidGravy yes, but a lot of those are just because there was no way to bind a native library
directly
14:15 aneumann left
lizmat abaugher`: actually, I'm not sure, maybe it just needs adding to modules wanted 14:16
nine RabidGravy: it's hard to say, because we have no numbers. There's also a lot of modules that poke around in internals or are just using XS for the performance benefit.
RabidGravy this is also true
abaugher` lizmat: thanks, I'll take a look at whether I can handle it first.
RabidGravy I'm almost tempted to make Linux::SvgaLib for P6 just because I can 14:18
lizmat not SVGALib ?
14:19 abraxxa left
RabidGravy It was the first XS thing I made for P5 I think 14:19
and no that was almost the capitalisation I used metacpan.org/pod/Linux::Svgalib 14:20
jnthn m: say 3.26 / 4.81
camelia rakudo-moar de715e: OUTPUT«0.677755␤»
andreoss RabidGravy: consider my pull requests 14:21
RabidGravy andreoss, which pull requests for what?
andreoss if i assume correcly that perl6format is your stuff
RabidGravy no, no. Nothing to do with me
:) 14:22
the party involved goes by the handle "jaffa" here but not seen for ages
.seen jaffa 14:23
yoleaux I haven't seen jaffa around.
|Tux| lizmat, dd "foobarbaz".split(<a o>,:keep-indices)' should return $("f","o", "o", "b", "a", "rb", "a", "z")
lizmat why ?
|Tux| your split removes all "a"'s and "o"'s
Ahh, now I see! :) 14:24
lizmat yes, and puts 0 or 1 instead
|Tux| 0 => "a" and 1 => "o"
right!
lizmat yup
|Tux| has something to play with
I'll come back to that
lizmat :-) looking forward to new timings
|Tux| now debugging a serious SQLite IPF problem 14:25
sqlite> create table foo (c_foo integer, foo varchar (4));
sqlite> insert into foo values (-2147483646, "foo");
sqlite> select * from foo;
2147483650|foo
RabidGravy andreoss, strategy in these cases is find the email of the author and ask them to examine the PR, if they don't get back to you in some period of time (depending on your patience,) fork the project apply the patches and release it yourself 14:26
14:26 skids joined
lizmat |Tux|: underflow ? 14:26
ilmari -2**31 => 2**31 + 2 # weird 14:27
RabidGravy I'm quite patient, eventually nearly all the PRs I have sent have got applied (seven months is the longest ;-)
14:28 aasasdd joined
|Tux| Calc > -2147483646 14:28
01777777777760000000002 / -2147483646 / 0xFFFFFFFF80000002
Calc > 2147483650
020000000002 / 2147483650 / 0x80000002
14:28 telex left
|Tux| 64bitint bigendian 14:29
14:29 aasasdd left 14:30 telex joined 14:31 xpen left, xpen joined
flussence wonders when/if sqlite4 will ever see the light of day 14:31
14:32 abraxxa joined
dalek kudo-star-daily: 20608b2 | coke++ | log/ (8 files):
today (automated commit)
14:35
rl6-roast-data: ccdd2e2 | coke++ | / (9 files):
today (automated commit)
flussence hm... reading sqlite.org/versionnumbers.html it seems more of an "if" and the answer's "no". 14:36
“one can expect that all future versions of SQLite for the next several decades will begin with "3."”
ilmari maybe they'll pull a solaris/java and drop the leading digit 14:38
ilmari reads the page and realises that's unlikely 14:39
RabidGravy well when they went from 2 -> 3 ten years ago or so, the universe nearly ended 14:43
moritz it did? I didn't notice :-)
14:43 zengargoyle left, pRiVi_ left
RabidGravy "nearly" 14:43
stmuk what does a single | do now in a regexp .. I know the || is alternation? 14:44
14:44 sprocket joined, rhr_ left
jnthn stmuk: Alternation with LTM semantics 14:44
RabidGravy they're both alternation
PerlJam We need to have a "planned end-of-support date" that either doesn't really end or is future-thinking enough to be on the order of 50 years in the future
14:44 zengargoyle joined
jnthn m: say 'abc' ~~ /a || ab/ 14:44
14:44 leedo joined
jnthn m: say 'abc' ~~ /a | ab/ 14:44
camelia? :)
14:44 ashleydev joined 14:45 krakan joined, ponbiki joined, rhr joined, yqt joined, salva left, ponbiki is now known as Guest70635
camelia rakudo-moar de715e: OUTPUT«「a」␤» 14:46
14:46 obra left
camelia rakudo-moar de715e: OUTPUT«「ab」␤» 14:46
14:46 esh left, esh joined
iv do grammars specify the parsing algo, ie. can I assume packrat or something else? 14:46
14:46 obra joined 14:47 Timbus joined, salva joined
iv can I hook my own algorithm in there? 14:47
stmuk under Niceville say so "\r\n" ~~ /[";"|"\r\n"]/ returned True and now it's False
is this correct or a bug?
m: say so "\r\n" ~~ /[";"|"\r\n"]/
camelia rakudo-moar de715e: OUTPUT«False␤»
stmuk m: say so "\r\n" ~~ /["\r\n"]/
camelia rakudo-moar de715e: OUTPUT«True␤»
14:48 pRiVi joined, charsbar joined
stmuk m: say so "\r\n" ~~ /[";"||"\r\n"]/ 14:48
camelia rakudo-moar de715e: OUTPUT«True␤»
flussence that's definitely not right...
PerlJam surely that's a bug.
jnthn I'd expect that to work
stmuk this is why LWP::Simple doesn't work
jnthn m: m: say so "\r\n" ~~ /[";"||\r\n]/ 14:49
camelia rakudo-moar de715e: OUTPUT«True␤»
jnthn m: m: say so "\r\n" ~~ /[";"||"\r\n"]/
camelia rakudo-moar de715e: OUTPUT«True␤»
jnthn grmbl
flussence ...I don't think that's worked for a long time, actually 14:50
jnthn wonders if this is the "NFAs don't groks synthetics yet" issue rearing its head
flussence RT #123452
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=123452
14:51 sprocket left
stmuk it worked in Niceville 14:51
14:51 broquaint joined, raiph joined
jnthn stmuk: It shoudl work, but it won't be fixed this week. 14:53
RabidGravy a lot of places like that in various code I've just removed the quotes
jnthn After dealing with the NFG/IO stuff, I don't hve the energy this week to go hack up the LTM stuff
stmuk OK I'll RT and suggest || in LWP::Simple
RabidGravy I actually did a PR that fixed the problem there last night 14:54
or is this a new one?
stmuk RabidGravy: I couldn't get that fix to work .. maybe things have changed since then
RabidGravy removed the quotes and made it \r?\n in the chunk parsing code
it definitely worked for me 14:55
don't be telling me the music has started again on this stuff
14:55 zakharyas left
raiph stmuk: irclog.perlgeek.de/perl6/2015-11-02#i_11466546 14:56
14:58 sprocket joined
RabidGravy BTW anyone who really cares strongly about LWP::Simple may want to copy the chunk parsing code out of H::UA as it's pretty much twice as fast 14:58
|Tux| lizmat, I had to rebuild rakudo. looks like I was too fast
lizmat ah, yes, a rebuild would be in order :-) 14:59
|Tux| the split still returns too much for me. Easy to change though
lizmat |Tux| too much in how ?
stmuk RabidGravy: ah your workaround does work .. I missed the quote change when I manually patched
|Tux| if the string *starts* with an entry from @re, the first returned element is ""
stmuk but I will still RT the changed behaviour since Niceville
lizmat yes, that's split 15:00
|Tux| hmm
lizmat there was nothing before it
stmuk RabidGravy: I wasn't a big fan of the chunk parsing code in LWP::Simple :)
lizmat so the first element is empty
|Tux| needz :non-empty
lizmat only at beginning / end ?
stmuk raiph: I assume it was hit by a bot or something
|Tux| same for two elements of @re next to eachother
so no, everywhere 15:01
15:01 Guest70635 is now known as ponpon
lizmat and non-empty would put a type object in there, or no element at all? 15:01
RabidGravy stmuk, I fixed up the H::UA code then I think takihurom or someone came and muchly improved it's efficiency
but it's all in a single method now so someone could basically lift it wholesale and adjust the interface 15:02
flussence oh, "Stage parse" has gotten a tiiiiny bit faster since I last paid attention to it... that's promising. 15:03
raiph stmuk: seems odd none of the other counts went up but fair enough, re the oct 21 spike
|Tux| "ofrobaardo".split(<a o>, :keep-indices, :non-empty) => $( 1, "fr", 1, "b", 0, 0, "rd", 1 ) 15:04
maybe :skip-emty would be better
:skip-empty 15:05
dalek kudo/nom: 64bd8a5 | lizmat++ | src/core/Str.pm:
Don't bother handling the $limit case

We need to build the entire structure in memory anyway.
lizmat yeah
stmuk rt.perl.org/Ticket/Display.html?id=126573 15:06
RabidGravy the "Stage parse" is a good canary for the speed of rakudo, it leapt up because the increase in the size of CORE and then went down as people improved
15:07 ChoHag left
jdv79 CORE went up after GLR? 15:08
flussence was about ~50s pre-GLR, shot up to 90+, is 89 today
dalek : bbd2a94 | PerlJam++ | docs/Perl6/Perl5/Differences.pod:
[docs] remove implication about the reality of other object systems
15:09
lizmat $ 6 'dd "ofrobaardo".split(<a o>, :keep-indices, :skip-empty)' 15:10
List $var = $(1, "fr", 1, "b", 0, 0, "rd", 1, "")
dalek kudo/nom: d7a817a | lizmat++ | src/core/Str.pm:
Introduce Str.split :skip-empty
lizmat |Tux| ^^^
|Tux| :)
jdv79 that doesn't sound like a good correlation then cause a few bits of code have gotten markedly faster than pre-glr 15:11
15:11 sprocket left
|Tux| m: my @re = "a", "o"; dd "afoobar".split(@re,:keep_indices, :skip-empty) 15:12
camelia rakudo-moar 64bd8a: OUTPUT«List $var = $("", "f", "", "b", "r")␤»
|Tux| m: my @re = "a", Str, "o"; dd "afoobar".split(@re,:keep_indices, :skip-empty)
camelia rakudo-moar 64bd8a: OUTPUT«Use of uninitialized value of type Str in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed. in regex at /home/camelia/rakudo-m-inst-2/share/perl6/runtime/CORE.setting.moarvm:1␤Use of uninitialized value $t…»
|Tux| OUCH
15:12 sprocket joined
RabidGravy BOOM! BOOM! SHAKE THE ROOM! 15:13
ugexe keep-indices?
PerlJam hopes someone is updating the docs for these things too 15:14
15:15 ChoHag joined, dhj joined 15:16 dhj left
jnthn lizmat: What's the difference between :keep-indices and :all? 15:16
15:17 pmurias left
raiph stmuk: ok, theory=bot for the oct 21 spike. any theory about why around half the hits in the last year are 404s? 15:17
15:18 pmurias joined
RabidGravy stale blog entries 15:18
lizmat jnthn: with :all you get the separator strings, with :keep-indices you get the index in the separator list
15:18 ecocode left
lizmat PerlJam: will do so later tonight, and add tests :-) 15:18
stmuk raiph: there are bots which just send spam sites in referers 15:19
lizmat |Tux| camelia is not up to date yet
15:19 khw joined
|Tux| try Str in @re 15:19
15:19 ChoHag left
lizmat |Tux| that's DIHWIDT 15:20
RabidGravy que?
|Tux| does it hurt when I do this?
15:20 ChoHag joined
RabidGravy :) 15:20
dalek ecs: 990d526 | (Anthony Parsons)++ | S99-glossary.pod:
Add "XS" to glossary
lizmat doctor, it h...
15:21 xpen left
PerlJam S99:DIHWIDT 15:21
synbot6 Link: design.perl6.org/S99.html#DIHWIDT
nine stmuk: even creepier there are bots which send site in referers that have actually interesting content, no links to any other sites, no virus and no ads. I don't get why they do that.
jnthn We don't usually just disregard type objects when a value is expected, as their presence often indicates a mistake
15:21 xpen joined
ugexe are $*THREAD.id's reused? as in if i start a program and get a $*THREAD.id of 4 and the script runs for awhile will it ever get another $*THREAD.id of 4? 15:21
15:21 softmoth joined 15:22 pmurias left
PerlJam |Tux|: what would you expect to happen with a Str in @re ? 15:22
|Tux| skip
15:22 xpen_ joined
|Tux| ignore 15:22
RabidGravy nine, that's to defeat spam checking heuristics that are more clever than "is this referer mine"
PerlJam okay, then ... what jnthn said :)
lizmat @r.map: .defined
jnthn ugexe: Yes, they may be 15:23
lizmat: .grep, no? :)
lizmat @r.grep: .defined # duh
yeah
|Tux| that is what happens with my $rx = qr( "a" | Str | "o" ); "string".split($rx,...)
lizmat than that is a bug
it should at least warn about Str being used in a string context 15:24
|Tux| is just playing the canary in the coalmine here
lizmat m: say "{Str}" # similar to this
camelia rakudo-moar 64bd8a: OUTPUT«Use of uninitialized value of type Str in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed. in block <unit> at /tmp/iBSSQr5kDM:1␤␤»
15:24 sprocket left
PerlJam um ... in a regex, it's not a Str object, it's just the text "Str", no? 15:24
|Tux| that is what it does now: it only slows doen the whole process :P
nine RabidGravy: sounds like a whole lot of effort for little gain. We haven't even found good referer spam filters, so we developed our own daemon that checks if the refering site actually has a link to our customer's. That's how we discovered those 15:25
|Tux| my Str $a; my Str $b = "a"; my $rx = rx{ $a | $b }
lizmat m: my @a = Str; dd "Str" ~~ / @a / 15:26
camelia rakudo-moar 64bd8a: OUTPUT«Use of uninitialized value of type Str in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed. in block <unit> at /tmp/0XBqQxCuLD:1␤Use of uninitialized value $topic of type Str in string context␤Any of .^na…»
|Tux| so yes, Str as object, not as "Str"
15:26 xpen left
lizmat well apparently it becomes "Str" 15:26
|Tux| strats the drumroll ………
lizmat the line above ends with "Match $var = Match.new(ast => Any, list => (), hash => Map.new(()), orig => "Str", to => 0, from => 0)"
dor me
15:26 softmoth left
lizmat *for me 15:26
|Tux| fail :/
jnthn has a fix for the socket .get issue that has busted Panda 15:27
PerlJam |Tux|: where did you get qr() from btw? P6 doesn't have that quoter
lizmat cycling while it's still light &
|Tux| s/qr/rx/
PerlJam okay, just checking that there wasn't something else I was missing :) 15:28
raiph stmuk, nine, RabidGravy: thanks, catch y'all later
stmuk bbfn
15:28 raiph left
RabidGravy :-* 15:28
ugexe mah artisinally bespoke hand crafted irc client 15:29
RabidGravy as long as it's organic and gluten free 15:30
daxim language design discussion: news.ycombinator.com/item?id=10508935
flussence
.oO( the most effective deterrent I've found to logspam is simply to not listen on port 80. Most of 'em are too dumb to try HTTPS. )
RabidGravy but you probably need to have a beard and some tweed clothing
|Tux| somthing *else* also changed, as my reference also got faster 15:32
test 50000 33.354 33.245
test-t *** 40000 20.680 20.572
RabidGravy I did a talk about ten years ago (at Y::E in Braga) about using the DNSBL to block this kind of crap but I can't find the slides anymore
nine Wow, that's.....quite some improvement!
|Tux|: I assume it passes the tests?
|Tux| this means thatr I have some work to do, as 40000 should be 50000
nope
nine darn
|Tux| most of the tests, but basics still fail 15:33
tests++
should be easy to track
but 20 looks promising
zengargoylee m: my $a = 2; say join ',', ($a, ++$a) 15:35
camelia rakudo-moar d7a817: OUTPUT«3,3␤»
zengargoylee m: my $a = 2; say join ',', (+$a, ++$a)
camelia rakudo-moar d7a817: OUTPUT«2,3␤»
zengargoylee m: my $a = 2; say join ',', $a, ++$a 15:37
camelia rakudo-moar d7a817: OUTPUT«3,3␤»
zengargoylee m: my $a = 2; say join ',', +$a, ++$a
camelia rakudo-moar d7a817: OUTPUT«2,3␤»
PerlJam zengargoylee: value vs. container 15:38
zengargoylee would never have thunk that except for reading the traps doc.
which calls that () a Capture 15:39
15:39 pmurias joined
PerlJam heh ... I didn't realize we had a traps doc :) 15:41
(whoever started that)++
zengargoylee which sorta makes that bit of doc.perl6.org/language/traps confusing since it appears to have nothing to do with the Capture '()' part.
zengargoylee sorta thought Captures were gone or made something you never really dealt with diretly most of the time. 15:43
15:43 andreoss left 15:45 _mg_ left 15:47 pippo joined
|Tux| .tell lizmat if *not* using :skip-empty, I now get the error Cannot unbox a type object 15:48
yoleaux |Tux|: I'll pass your message to lizmat.
pippo m: say "a,b,c,d,,e,f,g,,,,h,i".split(',', :skip-empty);
camelia rakudo-moar d7a817: OUTPUT«(a b c d e f g h i)␤»
pippo I wonder what :skip-empty is supposed to do? 15:49
|Tux| say "a,b,c,d,,e,f,g,,,,h,i".split(<,>, :skip-empty)
m: say "a,b,c,d,,e,f,g,,,,h,i".split(<,>, :skip-empty)
camelia rakudo-moar d7a817: OUTPUT«(a b c d e f g h i)␤»
|Tux| it is supposed to skip the empty elements
what's in a name :)
m: say "a,b,c,d,,e,f,g,,,,h,i".split(<, ,>, :skip-empty)
camelia rakudo-moar d7a817: OUTPUT«(a b c d e f g h i)␤»
|Tux| the one-arg-rule played up here 15:50
m: say "a,b,c,d,,e,f,g,,,,h,i".split(<, d>, :skip-empty)
camelia rakudo-moar d7a817: OUTPUT«(a b c e f g h i)␤»
|Tux| m: say "a,b,c,d,,e,f,g,,,,h,i".split(<, d>, :skip-empty, :keep-indices)
camelia rakudo-moar d7a817: OUTPUT«(a 0 b 0 c 0 1 0 0 e 0 f 0 g 0 0 0 0 h 0 i)␤»
pippo |Tux|: why it does not work for my first example?
|Tux| because it is a single arg 15:51
pippo scrathes his head :-))
|Tux| liz implemented split(@re, …)
if @re has more than one entry, keep-indices returns the index into @re for each matched item split upon 15:52
m: say "a,b,c,d,,e,f,g,,,,h,i".split(<, d>, :keep-indices)
camelia rakudo-moar d7a817: OUTPUT«Cannot unbox a type object␤ in block <unit> at /tmp/cFxawulWik:1␤␤»
pippo Hah OK. I understand now. It would be nice to also have my first example work.
|Tux| WIP 15:53
PerlJam What's the use-case for this feature btw?
|Tux| and that last fail is not intended
PerlJam Text::CSV
pippo |Tux|: TY.
|Tux| I explained a few things to Lix last Tuesday and she heard a penny drop
s/Lix/lizmat/ 15:54
flussence
.oO( this looks vaguely like strtok(3), when you squint at it... )
15:54 g4 left
pippo |Tux|: Yes me too was lokking for that for parsing CSVs. 15:54
s/lokking/looking/
|Tux| parsing CSV is way more complicated than splitting on , 15:55
[Coke] chuckles at "< stmuk> it worked in Niceville". :) 15:57
15:57 andreoss joined
zengargoylee doesn't seem to be true: No space allowed around the method call operator. 15:58
|Tux| .tell lizmat :skip-empty leaves the trailing ""
yoleaux |Tux|: I'll pass your message to lizmat.
15:59 kaare_ left, kaare_ joined
zengargoylee m: my $x = [1,2,3]; $x .= reverse; say $x; 15:59
camelia rakudo-moar d7a817: OUTPUT«[3 2 1]␤»
dalek kudo/nom: 93e301f | coke++ | docs/release_guide.pod:
Claim another release.
16:00
|Tux| new drumroll …
RabidGravy I used .() for the first absolutely necessary time today 16:01
|Tux| All tests successful.
Files=25, Tests=19732, 59 wallclock secs ( 2.95 usr 0.16 sys + 206.15 cusr 2.40 csys = 211.66 CPU)
Result: PASS
RabidGravy [Tux]++ # winning
[Coke] wonders how 59s compares to the early 3x s? 16:02
|Tux| the 59 is not interesting, but this is: :) :)
test 50000 33.379 33.270
test-t 50000 20.784 20.676
WE HAVE A WINNER!
flussence whoa
[Coke] lizmat++ |Tux|++ 16:03
jnthn Nice!
RabidGravy everyone++
|Tux| jnthn, what is the chance lizmat++' work stays? If so, I'll commit and push
jnthn |Tux|: Given the speedup, pretty high ;) TimToady may have something to say on naming. 16:04
psch hi #perl6 o/
|Tux| OK, then I will wait for that verdict
psch the jvm breakage is weird and scary
[Coke] psch: looks like something broke, something else broke, the first thing was fixed, so the bisect is haaard. figuring out where it's broken now is hard because ENOLINENUMBER. 16:05
dalek p: af5c625 | jnthn++ | tools/build/MOAR_REVISION:
Bump for Moar fixes with chomping and EOF.
16:05 bpmedley joined
[Coke] My next plan was maybe to bisect, but after each git checkout, apply the various "fix the JVM" build patches that have gone in since and see if we can pinpoint when it breaks then. 16:05
psch [Coke]: well, what i can see from inside jdb looks like we encounter a P6int without a HOW while trying to build a P6Opaque 16:06
i don't know how we can have a sixmodel type without a HOW
16:09 andreoss left
jnthn psch: That really shouldn't happen... 16:09
16:09 diana_olhovik_ left 16:12 ely-se left
pippo "a,d,e,,,f,g,h".split(<, ,>, :keep-indices, :skip-empty) 16:12
m: "a,d,e,,,f,g,h".split(<, ,>, :keep-indices, :skip-empty) 16:13
camelia ( no output )
psch is there another way to get at the type name than Ops.typeName..? 'cause that also NPEs because the delegate is null...
pippo m: say "a,d,e,,,f,g,h".split(<, ,>, :keep-indices, :skip-empty)
camelia rakudo-moar 93e301: OUTPUT«(a 1 d 1 e 1 1 1 f 1 g 1 h)␤»
pippo |Tux|: ^^Do we want to have the indices for the skipped matches?
|Tux|: I mean for the empty ones? 16:14
hoelzro o/ #perl6
PerlJam pippo: I wouldn't.
dalek kudo/nom: 9cc7465 | jnthn++ | tools/build/NQP_REVISION:
Get JVM support for readlinechompfh and Moar fix.
kudo/nom: 13936ab | jnthn++ | src/core/IO/Handle.pm:
Use nqp::readlinechompfh for .get and .lines.

Saves us chomping the strings that come from the VM, decreasing the amount of GC-able objects me make when reading lines.
pippo PerlJam: me too :-)) 16:15
nine lizmat++ # epic speedup!
|Tux| pippo, no, what should it have? the indices point to the entries in the list to split on
m: say "a,b,c,d,,e,f,g,,,,h,i".split(<, d>, :skip-empty, :keep-indices) 16:16
camelia rakudo-moar 93e301: OUTPUT«(a 0 b 0 c 0 1 0 0 e 0 f 0 g 0 0 0 0 h 0 i)␤»
jnthn m: say 3.42 / 4.81
camelia rakudo-moar 93e301: OUTPUT«0.711019␤»
|Tux| every 0 in there is a ",", and every 1 is a "d"
empty elements have no index
jnthn On performance, `for 'foo'.IO.lines { }` just got ~30% cheaper with 13936ab
pippo m: say "a,d,e,,,f,g,h".split(<, ,>, :keep-indices, :skip-empty) 16:17
camelia rakudo-moar 93e301: OUTPUT«(a 1 d 1 e 1 1 1 f 1 g 1 h)␤»
16:17 xpen_ left
dalek kudo/nom: 2e3da75 | jnthn++ | src/core/IO/Socket/INET.pm:
Fixes/improvements to IO::Socket::INET.get.

  * Bring API in line with IO::Handle, using nl-in for the input
   separator and allowing multiple separators
  * Make default separators CR and CRLF, like other handles (this fixes
   the recent Panda regression)
  * Use VM-backed chomped line reading, and remove custom logic for it.
16:17
ast: c5cfb6a | jnthn++ | S32-io/IO-Socket-INET.pl:
Default separator for socket includes \r\n.

Covers RT #126553.
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=126553
pippo |Tux|: You see there the consecutive 1 without letters? They should not appear I think.
PerlJam I guess the implementation of :keep-indices always takes the last one that matches? 16:18
|Tux| probably, that is an implementation detail
PerlJam it might be an important one if the items you're splitting over can partially match each other 16:19
|Tux| I think that as you specify keep-idices, you should either get 0 0 0 0 OR 1 1 1 1
jnthn RabidGravy: 2e3da75 should mean the Panda workaround can go away
|Tux| but that is the purpose of the keep-indices: return a match for what was split upon 16:20
PerlJam, that is covered by my tests :)
at least I think it does
m: say "a,b,c,d,,e,f,g,,,,h,i".split(<,, ,>, :skip-empty, :keep-indices) 16:21
camelia rakudo-moar 93e301: OUTPUT«(a 1 b 1 c 1 d 0 e 1 f 1 g 0 0 h 1 i)␤»
|Tux| :)
dalek ast: 9d9cf0b | jnthn++ | S32-io/io-handle.t:
Correct wrong test that hid a Rakudo bug.

We're meant to chomp separators by default, but previously only did chomp \r\n and \n. Now that's fixed in Rakudo, and this wrong test came to light.
16:22
ast: 98054a2 | jnthn++ | S32-io/IO-Socket-INET.pl:
Avoid using deprecated method.
pippo Everything OK except "g 0 0 h" that second zero is the index of an empy match.
|Tux| no, it is two double-comma matches 16:23
g ,, ,, h
flussence «Stage parse : 87.437» - dropped another 2 seconds since earlier today
|Tux| m: say "a,b,c,d,,e,f,g,,,,h,i".split(<,,, ,, ,>, :skip-empty, :keep-indices)
camelia rakudo-moar 93e301: OUTPUT«(a 2 b 2 c 2 d 1 e 2 f 2 g 0 2 h 2 i)␤»
|Tux| that one is weird. I'd expect 2 0 not 0 2 16:24
but an edge case
pippo |Tux|: Ha. Sorry did not notice you cahnged the <…> part. 16:25
jnthn |Tux|: Could you see if rt.perl.org/Ticket/Display.html?id=123888 is now fixed for you? 16:26
|Tux|: Note that it's call nl-in now
*called
|Tux| 123888 is already fixed
jnthn OK, cool 16:27
|Tux| one thing still bothers me though
jnthn Oh?
|Tux| m: $*IN.nl-in = "";
camelia ( no output )
|Tux| m: $*IN.nl-in = Str;
camelia rakudo-moar 93e301: OUTPUT«Use of uninitialized value $ending of type Str in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed. in block <unit> at /tmp/CgkttKaqIO:1␤»
|Tux| Yuck!
jnthn $*IN.nl-in = [] # no separators
|Tux| m: $*IN.nl-in = [];
camelia ( no output )
jnthn But yeah, maybe it's reasonable to be able to set it to a type object to have another way to say "no separator" 16:28
|Tux| that must be a :D signature :)
jnthn Especially given the "undef $/" meme will probably lead people to try such things
|Tux| github.com/Tux/CSV/commit/42b177ee...f4a4cc0f30 <= that was the .in => .in-nl commit 16:29
PerlJam m: say "a,b,c,d,,e,f,g,,,,,,,,h,i".split(<,,, ,, ,>, :skip-empty, :keep-indices)
camelia rakudo-moar 93e301: OUTPUT«(a 2 b 2 c 2 d 1 e 2 f 2 g 0 0 1 h 2 i)␤»
PerlJam m: say "a,b,c,d,,e,f,g,,,,,,,,h,i".split(<,, ,,, ,>, :skip-empty, :keep-indices)
camelia rakudo-moar 93e301: OUTPUT«(a 2 b 2 c 2 d 0 e 2 f 2 g 1 1 0 h 2 i)␤»
|Tux| nl-in
dakkar I was looking at the way libxml2 builds and frees its trees. each node has a pointer to the parent, a pointer to the first child, and a pointer to the next sibling 16:30
PerlJam huh, it doesn't take the "last" one, it takes the longest one
dakkar which means that the whole tree is full of reference loops
16:30 kmel joined, isBEKaml joined
|Tux| longest one is in0line with how regexes work 16:30
dakkar xmlFreeNode releases the memory for a node, and *all its children*
PerlJam yep
|Tux| I just expect them to match left-to-right, not right-to-left
test 50000 33.462 33.353 16:31
test-t 50000 20.900 20.791
stmuk should an ecosystem module die or fail on error? probably the latter?
|Tux| (after jnthn++ IO patch)
dakkar how badly is it going to interfere with the garbage collector, if I just wrap each pointer in a repr<CStruct> ?
pippo m: $*ERR.nl-out = [];
camelia rakudo-moar 93e301: OUTPUT«Type check failed in assignment to $!nl-out; expected Str:D but got Array␤ in block <unit> at /tmp/3fR7ec85jx:1␤␤»
PerlJam anyway ... as long as it's documented well and we can agree on the semantica
|Tux| not a real difference for me
PerlJam er, semantics
dakkar also, how am I ever going to test memory leaks / double free / garbage in structs ??
16:35 ChoHag left 16:36 ChoHag joined
dalek ast: e108d9d | jnthn++ | S32-io/IO-Socket-INET. (2 files):
Test to cover RT #109306.
16:36
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=109306
16:40 dwarring joined
flussence m: my @l = «foo bar '' baz»; for @l { .say when '' ff * } 16:41
camelia rakudo-moar 2e3da7: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '7⏏5baz' (indicated by 7⏏)␤ in block <unit> at /tmp/4hYgv8AJuz:1␤␤Actually thrown at:␤ in block <unit> at /tmp/4hYgv8AJuz:1␤␤»
flussence that doesn't look sane, but I'm never sure what I'm doing when it comes to «ff» 16:42
dalek ast: dd6a85f | jnthn++ | S16-filehandles/argfiles.t:
Test to cover RT #123888.
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=123888
flussence star-m: my @l = «foo bar '' baz»; for @l { .say when '' ff * } 16:44
camelia star-m 2015.09: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '7⏏5baz' (indicated by 7⏏)␤ in block <unit> at /tmp/l7duRkvAAE:1␤␤Actually thrown at:␤ in block <unit> at /tmp/l7duRkvAAE:1␤␤»
flussence j: my @l = «foo bar '' baz»; for @l { .say when '' ff * }
camelia ( no output )
flussence p: my @l = «foo bar '' baz»; for @l { .say when '' ff * } # long shot... 16:45
thought not :)
16:47 mr_ron joined
RabidGravy jnthn, the cool thing about that change is that it *doesn't have to* come out even when the reason it went in goes away 16:47
jnthn RabidGravy: Aye, though I'd be happy to know if it's no longer needed, e.g. I really did fix the regression that hit it :) 16:49
RabidGravy let me check 16:50
mr_ron In an IETF spec for http chunked transfer CRLF is specified as a terminating marker tools.ietf.org/html/rfc7230#section-4.1
dalek kudo/curli: cc06108 | (Stefan Seifert)++ | src/ (6 files):
Lift GLOBALish merging code out of CompUnit

Moved the Perl 6 code to Stash::merge-symbols and the call site to CompUnitRepo::load_module so we no longer need to pass around GLOBALish. Just loading a CompUnit should no longer influence the environment. That's up to the user.
nine Of course jnthn++ has already foreseen this. Powerful the force is in him...
16:51 CommonSense joined
jnthn :) 16:51
mr_ron The rash of \r?\n patches look like bypasses to me. A more likely fix might be 'use newline :lf'. still looking ...
16:51 perlawhirl_ joined
RabidGravy jnthn, do I need to manually bump moar is that all in the rakudo now 16:51
jnthn RabidGravy: I think I did all the necesary bumps 16:52
16:52 lab__ joined
dalek ecs: aa5522b | jnthn++ | S29-functions.pod:
Update run/shell design to match reality.
16:52
16:52 hoelzro_ joined, skids1 joined, Actualeyes1 joined
RabidGravy mr_ron, probably but better having working stuff 16:52
16:52 virtualsue left, JimmyZ_ joined, inokenty1 joined 16:53 lue joined, sprocket joined, advwp left, apejens_ joined 16:54 perlpilot joined, KotH_ joined, arnsholt_ joined, b^_^d joined, sunnavy_ joined, zengargo1le joined, ilbelkyr_ joined
mr_ron RabidGravy thanks for looking at my comments and thank you for patching things so they work. Just want them fixed right eventually. 16:54
16:54 CommonSense left 16:55 Gothmog_1 joined
RabidGravy but it;s also in the way that "\r\n" differs from \r\n now as far as I understand it 16:55
mr_ron I didn't understand that last comment ...
RabidGravy right
16:56 _sri_ joined
RabidGravy I look forward to seeing the correct fixes 16:56
mr_ron thx
16:57 stmuk_ joined
psch m: say so "\n" ~~ /\r\n/; say so "\n" ~~ /"\r\n"/ 16:57
camelia rakudo-moar 2e3da7: OUTPUT«False␤False␤»
16:57 rvchangue_ joined 16:58 eviltwin_b joined, xfix joined 16:59 bartolin_ joined
RabidGravy who knows, somethings have to be fixed to work rather than be right 16:59
psch didn't really pay attention to those changes... vOv 17:00
17:00 arnsholt_ left, Oatmeal left, robins joined
stmuk_ spekul cases all the things! 17:00
:)
17:01 Fleurety_ joined
RabidGravy :) 17:01
17:01 dgl joined 17:02 mattn_jp joined 17:04 lsm-desktop_ joined
dalek ast: 55d2cae | jnthn++ | S29-os/system.t:
Flesh out tests for run/shell a bit.

We had not tests that checked the return type of run and shell at all. This codifies that they return Proc and along the way covers the final design that RT #117039 was complaining about.
17:04
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=117039
17:04 zengargoyle left, skids left, JimmyZ left, Actualeyes left, lab_ left, ShimmerFairy left, lsm-desktop left, olinkl left, mattn_jp_ left, perlawhirl left, stmuk left, hoelzro left, d^_^b left, robinsmidsrod left, sunnavy left, geekosaur left, dg left, Gothmog_1 is now known as Gothmog_, JimmyZ_ is now known as JimmyZ, rvchangue_ is now known as rvchangue 17:05 perlawhirl_ is now known as perlawhirl, eviltwin_b is now known as geekosaur, pmurias left
jnthn .ask TimToady Should a Proc object in sink context, for a failed process, perhaps die? So a plain run('foo-that-fails') would die rather than silent failure? (Note: run and shell both return Proc.) 17:06
yoleaux jnthn: I'll pass your message to TimToady.
17:06 llfourn joined 17:07 arnsholt_ joined 17:09 advwp joined 17:10 abraxxa left, olinkl joined, softmoth joined
RabidGravy jnthn, in short the get is no longer getting all the stuff, in long I think the way that panda does that is more broken than that problem 17:12
dalek Heuristic branch merge: pushed 34 commits to rakudo/curli by niner
17:12 Oatmeal joined 17:14 domidumont left, Fleurety_ is now known as Fleurety, softmoth left
jnthn RabidGravy: OK, that's good enough for me :) Thanks! 17:15
TimToady wow, what a question
yoleaux 17:06Z <jnthn> TimToady: Should a Proc object in sink context, for a failed process, perhaps die? So a plain run('foo-that-fails') would die rather than silent failure? (Note: run and shell both return Proc.)
jnthn I guess I should asked "or did you really want a Failure in that case, and it's an interesting enough Failure that we can get the exit code"... 17:17
But then it becomes $proc.exception.exitcode or so I guess...
(Where $proc ain't actually a proc at all in this case...) 17:18
But worse, you couldn't read from stderr if you didn't get the proc back
So I think it has to be a Proc, so guess my question stands :)
RabidGravy jnthn, the problem with (what panda is doing) is that some variant of "while ... $socket.get" will stop at the empty line at the end of the header 17:19
TimToady certainly Unix shell culture says to ignore such errors unless tested for, and people use it all the time to do guanrantee the result of an idempotent operation; otoh treating the system as an extension of the language says we don't want to lose failures
moritz and bash has set -e
jnthn RabidGravy: Does it intend to stop at the end of the header? :) 17:20
flussence RabidGravy: $socket.lines works sanely now, you might want to use that instead
TimToady so I think I'm okay with throwing failure in sink context, as long as we can manage the time travel 17:21
RabidGravy jnthn, no, flussence, yes
jnthn TimToady: What time travel are you thinking about? :)
TimToady I guess these are sync, so not a problem 17:22
jnthn I mean, I was just going to put a sink method on Proc that throws a typed exception containing the Proc...
Yes, sync
TimToady you shouldn't ask me to sync this early in the morning
moritz well, if you do some piping options, the program hasn't exited yet, right?
jnthn
.oO( This is the German coastguard. What are you syncing about? )
17:23
moritz but it's pretty useless to set up a pipe in sink context
dalek ast: 2180af7 | (Ronald Schmidt)++ | S16-io/newline.t:
expand S16-io/newline.t tests to include Buf decoding
17:24
ast: 3378706 | (Zoffix Znet)++ | S16-io/newline.t:
Merge pull request #75 from ronaldxs/master

expand S16-io/newline.t tests to include Buf decoding
TimToady now imagines a lot of programs with 'so run ...' commands
dalek kudo/curli: 78c7c56 | (Stefan Seifert)++ | src/core/CompUnit/Repository/ (2 files):
Promote $precomp to a positional argument again

CompUnit::Repository requires $precomp to be positional. These have only been nameds while we needed to pass GLOBALish, too.
flussence I've noticed adding :nl-in<\r\n> causes that panda HTTP request to hang indefinitely, leaving it out works fine. Not sure if I'm using it right or not. 17:25
RabidGravy flussence, yep lines works 17:26
jnthn m: say <\r\n>.perl
camelia rakudo-moar 2e3da7: OUTPUT«"\\r\\n"␤»
jnthn flussence: <...> quoters don't interpolate backslashy things
flussence okay, I'm dumb :)
17:26 dgl is now known as dg
ilmari m: «\r\n».perl.say 17:27
camelia rakudo-moar 2e3da7: OUTPUT«()␤»
ilmari whereas in «» it gets discarded as whitespace separator
jnthn :nl-in("\r\n") :P 17:28
ilmari yeah
jnthn Or <<"\r\n">>
|Tux| can not resist to point TimToady to tux.nl/Talks/CSV6/speed4.html
ilmari hopes the y axis is time, not rate 17:29
|Tux| correct. time in seconds 17:30
ilmari label your axes, damnit
or a dwarf might mistake it for theirs
|Tux| but then there is no use in explaining them in a talk :)
ilmari s/it/them/
|Tux| dives into the documentation if the module used to check for labels ... 17:31
jnthn moritz: Seems that when you specify :in then the exit code isn't set until you close .in
Well, you gotta close all the handles you take, it seems 17:32
stmuk_ I'm seeing problems with "panda update" 17:33
|Tux| ilmari, better? 17:34
flussence jnthn: I think that's a side effect at the OS level. IIRC daemontools' `fghack` makes use of that weirdness too. 17:35
stmuk_ I don't think its getting the body of the json response
|Tux| stmuk_, does $ wget ecosystem-api.p6c.org/projects.json -O .../rakudobrew/moar-nom/install/share/perl6/site/panda/projects.json
ilmari |Tux|: yes, except the first one
|Tux| help you out?
stmuk_ probably :) 17:36
|Tux| ilmari, fixed
17:37 gnomad joined
ilmari |Tux|++ # labeling his axes 17:37
RabidGravy stmuk_, ye 17:39
yes
jnthn has fixed the behavior of ".get", thus exposing the shortcomings of the very, very dumb HTTP client in Panda::Ecosystem 17:40
17:42 espadrine left
ugexe how can i tell if the thread im in is actually the same as a previous thread? moarvm compares the handles but i'm not sure how to do it in perl6 17:43
17:43 KotH_ is now known as Koth, lichtkind joined
stmuk_ oh I see 1719 17:43
flussence m: say $*THREAD; await Promise.allof(start { say $*THREAD; sleep 1 }, start { sleep 1; say $*THREAD }); 17:45
camelia rakudo-moar 2e3da7: OUTPUT«Thread.new(app_lifetime => Bool::False, name => "Initial thread")␤Thread.new(app_lifetime => Bool::True, name => "<anon>")␤Thread.new(app_lifetime => Bool::True, name => "<anon>")␤»
17:45 isBEKaml left
flussence there's a "name" thing there, dunno how to set it off the top of my head though. 17:45
ugexe the name can get reused, as can the id
jnthn ugexe: The $*THREAD object's identity will be unique 17:46
ugexe aha ok 17:47
dalek ast: a0da155 | jnthn++ | S29-os/system.t:
Test run with something portable.

  `true` won't work out on Windows.
17:48
RabidGravy stmuk_, can you confirm that panda is truly broken before I push this change, it's dumber than a dumb thing but will work 17:49
|Tux| today we passed the point that Text::CSV is more than 12.5 times faster than in oktober 2014
|Tux| goes home 17:50
17:50 pippo left
RabidGravy |Tux|++ 17:50
or can someone else confirm that to mee
I think the proper answer here is to make a proper HTTP::Tiny and bundle it with panda 17:51
but I've got it fixed
17:52 domidumont joined
dalek ast: 311f8cb | jnthn++ | S02-magicals/env.t:
Fix test that passed for the wrong reason on Win.
17:53
ugexe i'd say the proper answer is to pull in the project list via git since everything else already requires git to be pulled in
jdv79 git all the things? 17:55
ugexe git git git it
17:57 mr_ron left
dalek kudo/nom: 289fdc5 | jnthn++ | src/core/ (2 files):
Sinking an unsuccessful Proc should throw.

This means `run` anad `shell` in sink context will not fail silently if they are not successful.
18:00
ast: 377eb35 | jnthn++ | S29-os/system.t:
Test run/shell in sink context throw on failure.

Covers RT #117039.
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=117039
dalek ecs: 3b936eb | jnthn++ | S29-functions.pod:
Mention sink behavior of Proc.
18:01
stmuk_ RabidGravy: push all the things 18:02
18:02 espadrine joined, cfloare joined 18:05 Axord joined
jnthn Another xmas RT down :) 18:05
colomon \o/ 18:06
jnthn Enough for today :)
stmuk_ jnthn++ 18:07
18:07 xpen joined, dakkar left 18:09 sufrostico left
stmuk_ wonders if RabidGravy's fix involves $g ~~ /^'['/ :) 18:09
18:10 robins is now known as robinsmidsrod
RabidGravy no regex involved whatsoever 18:10
jdv79 RabidGravy: you are near london? 18:11
RabidGravy well in "greater london" yes
stmuk_ is in zone 2
RabidGravy I think I'm in zone 4 18:12
18:12 xpen left
jdv79 i will likely be there shortly. looking for craft beer bars. any of note? 18:12
TimToady is zoned out
18:12 espadrine left
RabidGravy anyone got commit on panda? tadzik, moritz, timotimo anyone? 18:12
stmuk_ thecraftbeerco.com/ 18:13
18:14 firstdayonthejob joined
RabidGravy jdv79, Greenwich Old brewery www.oldbrewerygreenwich.com/ 18:14
frankly too many to mention
jdv79 nice.
RabidGravy Greenwich has several microbreweries 18:15
the Union bar, zero bar etc
jdv79 i know i could rattle off the best dozen or so in nyc. maybe london is crazier.
jnthn jdv79: If you like BrewDog's stuff, they have a bar in Camden. Have had good guest ones one when I've been there too (sadly, only occasionally) 18:16
TimToady wonders if :keep-indices should just be :k, and :all should just be :v
RabidGravy couple of brewdog places
jnthn Oh, there's more than one in London?
jnthn only knew about the Camden one
RabidGravy one in shoreditch too
jdv79 i was just at their bar alot in edinburgh. brewdog that is.
stmuk_ I believe there is a new one opening tomorrow in Soho
jnthn has no idea where shoreditch is :)
RabidGravy one in brighton now as well
jdv79 but may check it out anyways 18:17
stmuk_ jollybutchers.co.uk/ is about 300 yards away from me :)
RabidGravy jnthn, carry on bishopsgate beyond the "city" and turn right
18:18 _mg_ joined
jnthn ah 18:19
RabidGravy sort of north of brick lane I guess
jnthn :)
stmuk_ just follow the beards 18:20
jnthn never lived in London, just visited it a bunch
RabidGravy :)
psch so apparently the STable at index 7 in CORE.setting is what's broken
my attempts at figuring out which one that is over the last hour or so prove fruitless
jnthn goes to tend to tonight's curry
18:21 lab__ left
RabidGravy anyone in the house who has a comit on panda? 18:21
don't want a third day of this 18:22
perlpilot maybe panda should be brought under the perl6 org 18:23
18:23 perlpilot is now known as PerlJam 18:24 leont joined
nine RabidGravy: I think I do 18:25
RabidGravy be a love and merge the PR, 'cause with the latest rakudo it's borked 18:26
nine RabidGravy: done 18:27
18:27 Actualeyes1 left
RabidGravy :-* 18:27
it's completely poxy but works for me 18:29
(I'd rather have a bit of shit code that works than a squillion people pictching up complaining about it not working) 18:31
18:33 FROGGS joined 18:34 yqt left, zakharyas joined
nine .tell jnthn fun starts when people do use Test; use lib 't/spec/packages'; use Test::Util; because then we load a precomped Test from one repo and a precomped Test::Util from another and the latter is based on a different precomp version of Test. 18:35
yoleaux nine: I'll pass your message to jnthn.
18:46 arnsholt_ left, pink_mist left, arnsholt joined, pink_mist joined 18:49 cognominal left, cognominal joined 18:55 stmuk_ is now known as stmuk 18:59 softmoth joined 19:00 n0tjack joined 19:03 softmoth left
[Coke] POD on SO: stackoverflow.com/questions/335318...ods-in-doc 19:04
lizmat .botsnack
yoleaux :D
synbot6 om nom nom
yoleaux 15:48Z <|Tux|> lizmat: if *not* using :skip-empty, I now get the error Cannot unbox a type object
15:58Z <|Tux|> lizmat: :skip-empty leaves the trailing ""
n0tjack if I weren't fundamentally lazy, I'd make a bot that posted all [perl6] SO questions here. 19:06
lizmat n0tjack: it's not a prerequisite :-) 19:07
n0tjack well, more accurately: if programming tasks were sometimes as easy as they seemed, I'd make a bot...
19:09 _mg__ joined
psch it should be failry easy with Syndication and Net::IRC::Bot, depending on how SO/SE do their bot auth... 19:09
also the former might still have GLR fallout, last update was 28th of august
but yes, the same caveat applies 19:10
19:10 _mg_ left, _mg__ is now known as _mg_
psch part of the jvm breakage comes from 5349d05c, fwiw 19:11
reverting that is still broken, though, with an SOE
nine lizmat: any thoughts on use Test; use lib 't/spec/packages'; use Test::Util; which will load a precomped Test from one repo and a precomped Test::Util from another and the latter is based on a different precomp version of Test. 19:12
lizmat nine: it loads it from a different repo because of the use lib ? 19:13
nine lizmat: yes
upstream repos will always use the precomp store of the head in the list and use lib changes the head 19:14
lizmat isn't the problem really that the check for candidates doesn't match the Test that is already loaded
?
psch doesn't that assume we start distribution a precompd Test::Util?
with roast that is
lizmat psch: you can't, because Test::Util is roast, ergo perl 6 implementation independent
nine psch: the way I see it, we will always precompile used modules automatically on load
lizmat nine: hmmmm..... that doesn't feel right 19:15
psch nine: oh, yes, that actually makes the problem appear, i wasn't aware of any kind of plan like that
nine lizmat: there is no candidate for Test::Util that is compiled against the loaded Test because in the repo Test is from there is no Test::Util
lucs How do I do the perl5 regex equivalent of .+? (frugal)? 19:16
lizmat nine: but Test::Util is source, right? 19:17
psch m: say "aaa" ~~ /.+?/ # lucs
camelia rakudo-moar 289fdc: OUTPUT«「a」␤»
lucs Heh.
lizmat
.oO( some things never change )
lucs psch: Thanks, something else must be wrong my code.
in*
nine lizmat: it starts out as source but we precomp it and then load the precomped version 19:18
lizmat I'm not sure it's a good idea to precomp it
nine lizmat: the alternative is to prohibit precompilation after a use lib 19:19
19:19 spider-mario joined
lizmat ok, looking at it differently: isn't it the real problem then that Test.pm is not precompiled for that repo ? 19:19
nine lizmat: is there in general, apart from my current issue a reason not to precompile everything we encounter? Unless it says no precompilation; of course. 19:20
leont Since rakudo upgrade I'm getting a "Cannot unbox a type object" error (for an attribute that's declared Promise:D)
lizmat leont: gist ?
nine: well, for core developers, it would mean a *lot* of precomped files laying around 19:21
nine lizmat: we change the repo after loading Test. So of course Test is not precompiled for that repo
leont Code is too big for that, and it seems it only gets that error after a while
nine lizmat: cronjobs can clean that up easily
leont Wait, the "error messages get wrong locations when awaiting" bug is probably at play, should investigate further
lizmat nine: fwiw, it doesn't feel right 19:22
this will cause problems on some OS's that are pretty paranoid about writing files
psch jvm has something about an Exception occuring during print_exception, probably... 19:23
well, that is when reverting 5349d05c
nine lizmat: from jnthn++'s gist: The file system compilation unit repository is used when the -I flag is specified. It is initialized with a prefix. It assumes it will be able to create and write to a .precomp directory beneath that path.
psch and without that it's a deserialization issue 19:24
nine lizmat: even having that directory makes no sense unless we precomp automatically. Noone is gonna precomp manually in a plain lib dir.
19:24 yqt joined
lizmat ok, then let's shelve that discussion for now 19:24
nine lizmat: of course, we can check if the .precomp dir is writable and if not just skip precompilation. That could also be an opt-out 19:25
lizmat then I think the problem is that the "use Test" inside the Test/Util.pm should be precomped in that repo
nine lizmat: it is. But we loaded another precomped version of Test before changing the repo. Of course it's easy to fix on the user's side: use lib 't/spec/packages'; use Test; use Test::Util; 19:26
bartolin_ psch: don't know if that helps, but 5349d05c was motivated by this: irclog.perlgeek.de/perl6/2015-11-02#i_11471212
n0tjack m: say (hi => 2) ~~ {hi => 2};
camelia rakudo-moar 289fdc: OUTPUT«Type check failed in binding &call; expected Callable but got Method+{<anon|74220816>}␤ in block <unit> at /tmp/0GV4NFqJws:1␤␤»
lizmat hmmm.... and if they don't, it starts failing :-(
19:27 Skarsnik joined
nine Unless we just don't precompile after a use lib 19:28
19:28 Sqirrel joined
psch bartolin_: i saw the discussion. i tried giving $!handled a default instead, which has the same problem as not declaring it int, so something else broke anyway 19:29
lizmat nine: there's a subtle difference between "use lib" and -I
psch bartolin_: which is to say 5349d05c is probably not at fault, but reverting it unmasks some other breakage 19:30
lizmat with -I, you can be sure there is no code executed before the inclusion of the dir
with "use lib", you can have BEGIN blocks run before the use
nine lizmat: absolutely true
19:31 sufrostico joined
lizmat so maybe we should treat these differently anyway 19:31
bartolin_ psch++ # investigating jvm breakage
lizmat nine: are we handling a "if 42 { use lib; use mod }" ?? 19:32
leont It seems adding a default value and/or a :D smiley solved my issue, but it's still weird
n0tjack did "grammatical" regexes appear in p5 of p6 first? 19:39
I mean in actual executing interpreters/compilers
lizmat afaik, standars p5 doesn't have grammars 19:40
*standard*
n0tjack no, but in p5.10+ plus you do have m/<?&foo>/ etc
(forgetting the exact syntax, but you know what I mean)
lizmat that's not a grammar, that is text substiution afaik 19:41
nine Perl 5.10 introduced named captures which is an imporant step towards grammars 19:42
lizmat: if I just don't precompile after a use lib, we should be fine again
leont p5 has something grammar like, and I thought they weren't textual, but I'm not sure. The syntax is horrible
Only place I've seen it used it a damian module
n0tjack this SO answer lumps such syntaxes under the heading "grammatical patterns": stackoverflow.com/questions/201323/...378#201378 19:43
bartolin_ psch: hmm, with both 5349d05c _and_ f5276ca2 reverted I can build rakudo.jvm \o/
lizmat nine: unless we specifically precomp, and then it should be for that repo
dalek kudo/nom: 9fad7b4 | lizmat++ | src/core/Str.pm:
Fix several issues reported by Tux++
19:45
stmuk I think there an ingyware p5 grammars too 19:52
[Coke] bartolin, psch : worst case, we can #if those two patches for moar vs. jvm 19:55
bartolin_: might be able to reduce the scope of f5276ca2 that causes the breakage...
n0tjack m: [max] (-Inf,-1,0,1,Inf,NaN); 19:56
camelia ( no output )
n0tjack m: say [max] (-Inf,-1,0,1,Inf,NaN);
camelia rakudo-moar 9fad7b: OUTPUT«Inf␤»
n0tjack I don't like that.
psch bartolin_: nice find, i guess that means i can abort my bisect :) 19:57
n0tjack m: say Inf max NaN;
camelia rakudo-moar 9fad7b: OUTPUT«NaN␤»
n0tjack m: say Nan max Inf;
camelia rakudo-moar 9fad7b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ObSjdJOZPS␤Undeclared name:␤ Nan used at line 1␤␤»
n0tjack m: say NaN max Inf;
camelia rakudo-moar 9fad7b: OUTPUT«Inf␤»
psch m: say NaN < -Inf
camelia rakudo-moar 9fad7b: OUTPUT«False␤»
bartolin_ also had to revert ad08a1d7, actually -- but that changed only one line which was touched by f5276ca2 also
psch m: say NaN > -Inf
camelia rakudo-moar 9fad7b: OUTPUT«False␤»
[Tux] hm, :( tests now breaking
lizmat [Tux]: how ? gist ? 19:58
19:58 zakharyas left
bartolin_ [Coke]: yes, that looks fixable now ... 19:58
n0tjack I think technically, Num <infix> NaN and NaN <infix> Num should be NaN.
psch m: say Inf max NaN, :by(&infix:<==>) 19:59
camelia rakudo-moar 9fad7b: OUTPUT«Unexpected named parameter 'by' passed␤ in block <unit> at /tmp/Ja10DUgS9Q:1␤␤»
psch aww
n0tjack Certainly for communitative <infix> the result should be consistently NaN
*commutative
psch n0tjack: max by default doesn't do infix:<==>, but infix:<cmp>
m: say Inf cmp NaN
camelia rakudo-moar 9fad7b: OUTPUT«Same␤»
psch m: say -Inf cmp NaN
camelia rakudo-moar 9fad7b: OUTPUT«Same␤»
n0tjack yuck yuck yuck 20:00
n0tjack closes eyes
psch m: say max (-Inf,-1,0,1,Inf,NaN), :by(&infix:<==>)
camelia rakudo-moar 9fad7b: OUTPUT«-Inf␤»
psch uhh
m: say max -Inf,-1,0,1,Inf,NaN, :by(&infix:<==>)
camelia rakudo-moar 9fad7b: OUTPUT«-Inf␤»
PerlJam m: say NaN cmp 5
camelia rakudo-moar 9fad7b: OUTPUT«Same␤»
psch ah, infix:<==> doesn't fit infix:<cmp> return values i guess
i.e. Less, Same, More 20:01
n0tjack yeah, it's more or less the same
[Tux] ok 30 - parse () tests
not ok 31 - Single newline
lizmat, lemme check
psch m: say max -Inf,-1,0,1,Inf,NaN, :by(&infix:['<=>'])
camelia rakudo-moar 9fad7b: OUTPUT«Cannot call infix:«<=>»(Int); none of these signatures match:␤ (\a, \b)␤ (Real \a, Real \b)␤ (Int:D \a, Int:D \b)␤ (int $a, int $b)␤ (Num:D \a, Num:D \b)␤ (num $a, num $b)␤ (Rational:D \a, Rational:D \b)␤ (Rational…»
psch you'd think (Any \a, Any \b) would fit 20:02
m: say Inf <=> NaN
camelia rakudo-moar 9fad7b: OUTPUT«Same␤»
psch m: say -1 <=> NaN
camelia rakudo-moar 9fad7b: OUTPUT«Same␤»
psch m: say -1 <=> Inf
camelia rakudo-moar 9fad7b: OUTPUT«Less␤»
n0tjack really the only safe thing to do with NaNs is relentlessly propogate them like weaponized ebola
so that people learn to avoid them
PerlJam wonders if NaN will be how we get the equivalent of PDL's bad values 20:03
[Tux] :keep-indices + :skip-empty now always returns an empty list :(
psch well, infix:<cmp> special-cases for Inf and -Inf, it probably should for NaN as well 20:04
[Tux] gist.github.com/Tux/fa07246e4b3368c62932
psch as in, i agree with "NaNs should never get disappeared by CORE operations"
lizmat $ 6 'dd "ofrobaardo".split(<a o>, :keep-indices, :skip-empty)' 20:06
List $var = $("fr", 1, "b", 0, "rd", 1)
[Tux] ^^^
[Tux]: so not always
bartolin_ [Coke], psch: looks like it's enough to revert 5349d05c and ad08a1d7 to get rakudo.jvm to build. And both are small patches ... 20:07
lizmat [Tux]: looking at your code, would it make more sense to return the chunk as a pair: delim => string ?
and this make it :p as the parameter ? 20:08
[Coke] bartolin_: you want the honors? 20:09
lizmat or perhaps *add* :p as a parameter as an alternative to :all
20:09 geraud joined
bartolin_ [Coke]: thanks, but it will be much faster if you commit something directly 20:10
psch those two patches seem to point at something inherently wrong with how R-J does exceptional stuff... :/
[Coke] ok. 20:11
psch might be somewhat related to those UnwindException leaks we get from e.g. match(:ex)
although i don't immediately see how, it just seems to deal with similar stuff vOv
m: say NaN.Stringy ~~ Str 20:12
camelia rakudo-moar 9fad7b: OUTPUT«True␤»
psch m: say 1 le NaN 20:13
camelia rakudo-moar 9fad7b: OUTPUT«True␤»
[Tux] lizmat, gist.github.com/Tux/41263465dcb3b12ded2f 20:14
that *should* be 3 4 "I said" 3 4 4 "Ji!" 4 4 4 3 20:15
that *should* be 3 4 "I said" 3 : " 4 4 "Hi!" 4 4 4 3
before you went biking it was 20:16
3 4 "I said" 3 : " 4 4 "Hi!" 4 4 4 3 ""
3 4 "I said" 3 " " 4 4 "Hi!" 4 4 4 3 ""
lizmat is looking
[Tux] afk a bit 20:17
20:17 zengargoylee left, domidumont left
[Coke] does a build on both to make sure his partial undoing works. 20:18
20:20 xxx joined, xxx is now known as Guest41208 20:21 Guest41208 left
lizmat [Tux]: Ah, I think that's caused by the fact that :skip-empty now also drops the delimiter index 20:22
[Tux]: I was under the impression that you wanted it that way ??
mrf 20:24
m: say "\r\n" ~~ /\xA\xD/ 20:25
camelia rakudo-moar 9fad7b: OUTPUT«Nil␤»
mrf ruddy cat 20:26
^ am I wrong in thinking that that should match
lizmat not anymore 20:27
m: say "\r\n".chars
camelia rakudo-moar 9fad7b: OUTPUT«1␤»
lizmat m: say "\xA\xD".chars
camelia rakudo-moar 9fad7b: OUTPUT«2␤»
mrf Oh. I was aware that jnthn had done some work in this area but not the full ramifications
lizmat "\r\n" is now a synthetic 20:28
FROGGS m: say "\xD\xA".chars
yoleaux 4 Nov 2015 19:48Z <mrf> FROGGS: for some reason 1^..10 doesn't work in a codeblock as a quantifier. I have no idea why
camelia rakudo-moar 9fad7b: OUTPUT«1␤»
PerlJam mrf: it'll probably need a blog post or two explaining it to the masses (especially those who are used to other, very similar languages)
FROGGS m: say "\r\n" ~~ /\xD\xA/
camelia rakudo-moar 9fad7b: OUTPUT«「
FROGGS mrf: ^^
lizmat Hmmm... FROGGS : good point
:-)
FROGGS :o)
20:28 darutoko left 20:29 Oatmeal left
lizmat still, I wonder how we can now e.g. check HTTP headers for actually returning CRLF, and not just LF 20:29
stmuk m: say so "\r\n" ~~ /\xD\xA/
camelia rakudo-moar 9fad7b: OUTPUT«True␤»
FROGGS lizmat: buffers
mrf Indeed. I am curious how I should now handle a grammar that should explicitly match CRLF. (ABNF RFCs)
lizmat or should we care ?
mrf lizmat++ this
FROGGS lizmat: the receiving end should be lax, but the transmitting end should be strict 20:30
lizmat so we don't care (much) :-)
FROGGS m: say so "\n" ~~ /\xD\xA/
camelia rakudo-moar 9fad7b: OUTPUT«False␤»
FROGGS m: say so "\r" ~~ /\xD\xA/
camelia rakudo-moar 9fad7b: OUTPUT«False␤»
FROGGS mrf: you see? it works
stmuk Postel's Law of smart matchs ? 20:31
FROGGS m: say so "\r\n" ~~ /^\xD\xA$/
camelia rakudo-moar 9fad7b: OUTPUT«True␤»
mrf FROGGS: not really seeing it
FROGGS m: say so "\r\n\n" ~~ /^\xD\xA$/
camelia rakudo-moar 9fad7b: OUTPUT«False␤»
FROGGS m: say so "\r\r\n" ~~ /^\xD\xA$/
camelia rakudo-moar 9fad7b: OUTPUT«False␤»
FROGGS mrf: you can match CRLF by matching against \xD\xA
mrf I have to go. Will check back later. Sorry. Thanks anyway 20:32
FROGGS o/
mrf FROGGS: ???? Will ask later when I have time
thanks
20:32 aindilis joined
nine FROGGS: that approach is what inflicted endless pain on the net 20:32
[Coke] arg: Nested conditionals not supported
FROGGS nine: well, that's how the RFC state it, no?
lucs Question: fpaste.scsys.co.uk/501039 20:33
nine FROGGS: not everything written into RFCs turned out to be wise :)
FROGGS nine: true :o)
lizmat lucs: given $some_var_name { when 1 {} when 2 {} when 3 {} 20:34
nine If you're lax on the receiving end, you're forcing every other receiver to be lax in the same way. Because the sender will not be all that strict anymore as it did work in the tests
PerlJam lucs: given $some_var_name { when 1 { "one" } when 2 { "two" } when 3 { "three" } default "wut" } }
stmuk there probably needs to be a gotcha faq about "\r\n"
lizmat yes
moritz lucs: my $foo = ('one', 'two', 'three')[ $some_var_name - 1] // 'wut';
PerlJam moritz++ :) 20:35
FROGGS P5 style :o)
moritz looks like both valid p5.10+ and p6
[Tux] lizmat, I want < 3 4 "I said" 3 " " 4 4 "Hi!" 4 4 4 3 > on the combo, and that implementation made perfect sense 20:36
20:37 hoelzro_ is now known as hoelzro
[Tux] the only problem before yout bike run was a trailing "" 20:37
lizmat ah, ok
[Tux]: how about the pair idea?
lucs I can't get it working with my $foo = given ... , and unfortunately, moritz's example, although it works, is perhaps not general enough (my example used 1, 2, 3, but my real code matches on something more complex).
PerlJam lucs: also, you could do my $foo = do given $some_var_name { $_ == 1 ?? "one" !! $_ == 2 ?? "two" !! $_ == 3 ?? "three" !! "wut"; }
[Tux] has no idea what a pair would yield
lizmat only one elem per chunk 20:38
lucs PerlJam: Aha, closer, yes.
[Tux] so far it doesn't appeal to me
I don't think I like it
but I can be convinced otherwise if it makes sense
lizmat you have a map somewhere now, right ?
[Tux] no 20:39
not in the split(@re, :skip-empty, :keep-indices) version
my @c = $str.split (@re, :keep-indices, :skip-empty).map ({
$_ ~~ Int ?? @re[$_] !! $_ });
that one?
lizmat I see a map there 20:40
yes
lucs PerlJam: Works great, thanks. (basically, I was just missing the 'do')
PerlJam lizmat, Tux: looking on from the peanut gallery, I'm starting to get a creeping featurism feeling about this new split.
[Tux] is to translate the indices back to what it matched
20:40 rindolf left
lizmat PerlJam: I agree to an extent :-) 20:40
[Coke] ok, what dumb thing am I missing here: gist.github.com/coke/599e725e9c9251ac1a08 20:41
lizmat [Tux]: hmmm... but with :all, you wouldn't have to ?
FROGGS [Coke]: #?endif ? 20:42
[Coke] ARGLEBARGLE.
thank you!
lizmat I thought having the index of the delimiter would make it easier for you to determine *what* to do (is it an escape, is it an delimiter, is it a newline ?)
[Tux] result of split(@re,:all) = Array $var = $["", ",", "", "\"", "I said", ",", " ", "\"", "", "\"", "Hi!", "\"", "", "\"", "", "\"", "", ",", ""]
20:42 Oatmeal joined, telex left
[Tux] my @chunks = $str.split(@re, :all).grep(* ne ""); 20:43
will work fine
lizmat well, that is what :skip-empty will do again
[Tux] so, :all, :skip-empty 20:44
lizmat I'm confused though: shouldn't you handle things differently depending on the delimiter encountered ??
20:44 telex joined
[Coke] FROGGS: I haad already gotten it right about 100 lines away from there, too. :) 20:44
FROGGS *g*
[Tux] not in the split
:all, :skip-empty is currently broken 20:45
lizmat yeah, fixing that now
or maybe I should just drop skip-empty completely
[Tux] fine with me 20:46
[Coke] bartolin++
PerlJam huh.
[Coke] whoops. too soon. :|
PerlJam :keep-indices seems the weird one to me. :all and :skip-empty make more sense
20:46 AlexDaniel joined
n0tjack what's the syntactic rationale behind adverbs, instead of just using named params everywhere? 20:47
TimToady has a fix for the foo:bar problem and then some 20:48
n0tjack more convenient, fewer parens?
[Tux] my @chunks = $str.split(@re, :all).grep(* ne ""); =>
All tests successful.
20:48 softmoth joined
PerlJam n0tjack: what do you mean by "using named params everywhere" ? 20:49
n0tjack PerlJam: in my (potentially mixed up) head, adverbs are just anotehr way to pass named parameters to functions
nine Do we have any file locking support? 20:50
n0tjack like m:g/blah blah/ could easily be m/blah blah/, :g
psch adverbs are named arguments to irregular-looking subs, in my understanding
bartolin_ [Coke]: do you get new failures after jvm-specific reverts?
n0tjack but you'd have to do more parenthesizing
lizmat PerlJam: why is the keep-indices the weird one?
PerlJam: if you're splitting and depending on the delimiter, you need to do different things 20:51
PerlJam lizmat: because it's more about the @re than the string or the actual splitting.
lizmat surely a number would be easier to use (like an index into a dispatch table) than the string of the delimiter ?
[Tux] test 50000 36.624 36.508
test-t 50000 21.728 21.611
[Coke] updated gist.github.com/coke/599e725e9c9251ac1a08 with my two local patches and the current fail mode of "make" 20:52
dalek kudo/nom: 3eb2460 | lizmat++ | src/core/Str.pm:
Return :skip-empty to previous semantics
lizmat [Tux]: that should allow you to remove the grep and make it in the 20 sec range again
PerlJam lizmat: I also agree with different delimiter, different actions, but the :keep-indices variant feels like it should be a special-purpose split-with-indices or something 20:53
20:53 softmoth left
[Tux] I just pushed the grep version 20:53
[Tux] retries
bartolin_ [Coke]: I just saw that I was only on commit 6cb35b40b4 when reverting those commits. so probably a recent commit mixed something up (again)? 20:54
sorry for not looking more carefully!
PerlJam n0tjack: so ... adverbs are a way to pass names parameters. But I don't quite see the distinction you're trying to make. 20:55
s/names/named/
[Coke] I imagine that we will eventually have a git policy where commits have to go on a branch indicating which VM they were tested on, so we can test them on other VMs before merging them bcak to mainline.
TimToady lizmat: I think instead of :keep-indices/:all we should do the :k/:v/:kv trick 20:56
bartolin_ [Coke]: on the other hand I'm able to build rakudo.jvm when I had that NPE without a line number before.
nine [Coke]: isn't that a problem that CI was invented for?
TimToady then we can get both the index and the delim
20:57 nys joined
lizmat ok, so :kv would be :all 20:57
:v would be :!all
TimToady I thought :all meant :v
PerlJam too
TimToady anyway, I think consistency with other kv things is nice here
lizmat yeah, agree
TimToady not to mention shorter :)
n0tjack PerlJam: They're explicitly supported as a separate aspect of p6's grammar. Work was put in to support them. I'm interested in the original and ongoing motivation to include them above-and-beyond normal named-parameter syntax.
[Tux] I find that not logical, as @re does not have to be even-counted and there can be several items from @re adjacent 20:58
demo code pls, so I can see what you mean
lizmat TimToady: :v means a filtering for values 20:59
PerlJam n0tjack: sorry, I'm probably being thick right now, but it reads like "why do we even have adverbs?" and my answer is ... for the same reason we have them in English :)
20:59 cygx joined
cygx o/ 20:59
lizmat so, no adverb means only the strings between the delimiters 21:00
:v means the non-empty strings between delimiters
n0tjack PerlJam: There's a lot of stuff we have in English we don't have in Perl6, and vice-versa.
lizmat :kv means the delimiter, then the string ?
n0tjack PerlJam: Though I'd be very interested in wht corresponds to the subjunctive in Perl6 21:01
lizmat it feels a bit weird, as the delimiter is after the string it separates
TimToady :kv means index then delimiter
the "combed" parts are independent of the delim's k or v
lizmat ah, you mean the position in the string ?
TimToady no
same as :keep-indices is now 21:02
[Tux] but the index as currently used is that the parts that matched from @re are returned as an index into @re. Nothing to do with the parts *between* the matches
cygx nine: we support O_CREAT via :x
TimToady that's what I'm talking about
cygx totally not unrelated: github.com/rakudo/rakudo/pull/575
[Tux] TimToady, so :k returns the index for matched parted, :v the matched part and :kv both (for whoever needs it) 21:03
dalek kudo/nom: c5b3538 | TimToady++ | src/Perl6/ (3 files):
regularize and canonicalize pairs on names
21:04
lizmat and what happens to the strings that were separated ?
[Tux] "frobnitz".split(<o i>, :k) => < fr 0 bn 1 tz>
"frobnitz".split(<o i>, :v) => < fr o bn i tz>
TimToady they're interspersed every 3rd instead of every 2nd, if you have :kv
[Tux] "frobnitz".split(<o i>, :kv) => < fr 0 o bn 1 i tz>
TimToady so you could do a switch on the number and then use the value of the delimiter differently depending on the number 21:05
lizmat TimToady: ^^^ is that how you meant it ?
cygx nine: that should have read O_EXCL, of course ;)
TimToady yes
[Coke] nine;if this probably was fixable with CI, then a git bisect would have made it easy to solve, no?
lizmat ok, consider it done :-)
[Tux] so :all becomes :v 21:06
[Coke] if there was a stopper between "commit is in the repo" and "commit is in mainline", then sure.
lizmat yup
[Tux] note that :all was there for a long time, so it will be a deprecation cyle
TimToady I suppose one could have a :p too... 21:07
lizmat yes, that would make sense
[Tux] "frobnitz".split(<o i>, :p) => < fr 0:o bn 1:i tz> ?
lizmat "frobnitz".split(<o i>, :p) => < fr 0 => o bn 1 => i tz> 21:08
[Tux] yes, that
sounds sane
and :skip-empty will stay?
lizmat, are you sitting? 21:09
lizmat yes
[Tux] test 50000 34.725 34.611
test-t 50000 17.972 17.859
lizmat whee!
TimToady o_O
[Tux] $str.split (@re, :all, :skip-empty);
TimToady m: foo:bar["x" ~ 42]
camelia rakudo-moar 9fad7b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/R7wgT0XPvz␤Undeclared routine:␤ foo used at line 1␤␤»
nine woah!
[Coke]: well, once we get JVM 100% working again, CI should notify us of regressions in a timely manner 21:10
21:10 Celelibi_ joined
lizmat just playing devil's advocate: shouldn't :k return the delimiter strings ? 21:11
TimToady m: foo:bar["x" ~ 42]
camelia rakudo-moar c5b353: OUTPUT«5===SORRY!5=== Error while compiling /tmp/qnvDGSJbuD␤Undeclared routine:␤ foo:bar<x42> used at line 1␤␤»
lizmat and :v the indices ?
"delim" => $num feels a bit more natural to me than $num => "delim" 21:12
TimToady well, it's the key into the table
the one you passs
21:12 Celelibi left
lizmat ok 21:12
21:12 gnomad left
TimToady and the value is in the table if it's literal 21:12
[Tux] also feels more comfortable with keys being the numerics and values the strings 21:13
TimToady so that seemed more natural to me
lizmat ok
now, the combination :v and :skip-empty is dangerous
[Tux] why? (that would be what I'd use in T::C)
lizmat because you cannot tell the difference between a delimiter string and a missing chunk
TimToady well, sure, don't do that 21:14
unless you want to test the next thing for integerness
lizmat [Tux]: :v would be the *string* we just decided
*delimiter string"
[Tux] yes, which is what I wanted
indeed
TimToady right, ;v; isn't the integer 21:15
*:
[Tux] correct, so what is the problem?
lizmat ok, I guess I don't understand the Text::CSV internals well enough
TimToady how do you tell if the , is data or delim?
m: my $today:<😂>= “Does this work?”; say $today:<😂> 21:16
camelia rakudo-moar c5b353: OUTPUT«Does this work?␤»
[Tux] it is delim unless I am in quoted state
cygx em... why doesn't $*OUT.IO return something I can do i/o with?
[Tux] TimToady, the split is not the entire engine
TimToady okay 21:17
AlexDaniel wow, what's that
TimToady anyway, I think it's in the DIH category
lizmat [Tux]: and how do you get to quoted state ?
TimToady with a quote in non-quoted state 21:18
[Tux] I split the string into chunks: every chunk is either one of EOL, SEP, QUOTE, ESCAPE, or something else
lizmat TimToady: but there can be multiple quote strings, and it doesn't have to be a " :-)
21:18 flussence joined
[Coke] nine - we do have it on a day interval at the moment, btw. 21:18
[Tux] then I run through the chunks
lizmat [Tux]: but how do you know what a chunk is ? 21:19
TimToady m: my $today:foo<😂>= “Does this work?”; say $today:foo<😂> # still a bug here
camelia rakudo-moar c5b353: OUTPUT«5===SORRY!5=== Error while compiling /tmp/U4qOjejmlb␤Variable '$today' is not declared␤at /tmp/U4qOjejmlb:1␤------> 3y $today:foo<😂>= “Does this work?”; say 7⏏5$today:foo<😂> # still a bug here␤»
[Tux] if it is an EOL, then if I am in quoted state, it is an embedded EOL (data), otherwise it is end of record
lizmat yes, but *how* do you know it's an EOL ???
[Tux] then if it is a SEP, if I am in quoted state it is data, otherwise the start of a new field 21:20
grondilu wow this character 😂 shows up in color on my terminal.
[Tux] for my $chunk @chunks { if $chunk eq $eol { ...}
lizmat [Tux]: but *how* do you know it's a SEP
right
[Tux] if $chunk eq $sep { ... }
lizmat so, if you could change the "if $chunk eq $eol" to a dispatch table depending on the index ? 21:21
that would make it faster. no?
[Tux] possible, but hard (at the moment)
1. I want to support regular expressions for eol/sep/quo/esc later on
2. if eol is undefined I add \r\n, \r and \n 21:22
so the indices will change
lizmat so you change the dispatch table ?
[Tux] additionally, by default QUO and ESC are identical
but the idea of a dispatch table, using :k instead of :v (once implemented) will cause a new branche to play with 21:23
lizmat ok, and I just realize my argument for "how do you know if it's a delim and not a string
is because the string can never be the same as the delimiter 21:24
[Tux] :)
zengargo1le i should be able to recurse usion &?ROUTINE(...) right?
lizmat ok
I shall implement :k and friends, and we'll take it from there
[Tux] top! lizmat++
zengargo1le i'm getting Too many positionals passed; expected 0 arguments but got 4 21:25
when i use &?ROUTINE vs actual-sub-name
TimToady are you really in a block instead of a routine? 21:26
FROGGS zengargo1le: is that &?ROUTINE in a for loop or in a statement modifying for loop?
TimToady is there anything in the outer scope that expects 0 args?
21:26 _mg_ left
[Tux] Thanks all involved for today. I'm ending mine here 21:27
zengargo1le both in a: if &?ROUTINE { blah } and in the actual elsif $foo { &?ROUTINE }
within a surrounding sub actual-name() { ... } of course.
lizmat good night, [Tux]
FROGGS zengargo1le: can you no-paste it? 21:28
zengargo1le gist.github.com/zengargoyle/17f9e4...a8cdccfef0 21:29
in sub next-num(), works when i use next-num() vs &?ROUTINE() 21:30
FROGGS m: sub foo(Int) { if 1 { &?ROUTINE(42) } }; foo 42 21:32
camelia rakudo-moar c5b353: OUTPUT«Too many positionals passed; expected 0 arguments but got 1␤ in block <unit> at /tmp/um_QNQ37Pc:1␤ in sub foo at /tmp/um_QNQ37Pc:1␤ in block <unit> at /tmp/um_QNQ37Pc:1␤␤»
hobbs masak: I just read the 007 README. I didn't realize you were actually Tom Stoppard.
FROGGS that's the bug I was remembering
m: sub foo(Int) { if 1 { &?ROUTINE(42) if 1 } }; foo 42
camelia rakudo-moar c5b353: OUTPUT«Too many positionals passed; expected 0 arguments but got 1␤ in block <unit> at /tmp/jrYuZaobT0:1␤ in sub foo at /tmp/jrYuZaobT0:1␤ in block <unit> at /tmp/jrYuZaobT0:1␤␤»
FROGGS m: sub foo(Int) { if 1 { { &?ROUTINE(42) }() } }; foo 42
camelia rakudo-moar c5b353: OUTPUT«Too many positionals passed; expected 0 arguments but got 1␤ in block <unit> at /tmp/XqXOuML4xk:1␤ in sub foo at /tmp/XqXOuML4xk:1␤ in block <unit> at /tmp/XqXOuML4xk:1␤␤»
ugexe wrap your &?ROUTINE bit like ($ = &?ROUTINE($args)) and it works
FROGGS m: sub foo(Int) { if 1 { $= &?ROUTINE(42) } }; foo 42 21:33
21:33 Celelibi_ is now known as Celelibi
FROGGS O.o 21:33
camelia rakudo-moar c5b353: OUTPUT«Memory allocation failed; could not allocate 8388608 bytes␤»
FROGGS hah!
\o/
m: sub foo(Int) { if 1 { $ = &?ROUTINE(42) } }; foo 42
camelia rakudo-moar c5b353: OUTPUT«Memory allocation failed; could not allocate 8388608 bytes␤»
FROGGS ohh...
well 21:34
FROGGS--
zengargo1le ugexe: that worked. so it's a bug of some sort?
FROGGS zengargo1le: and it is already ticketed
zengargo1le cool.
dalek kudo/nom: c880f16 | TimToady++ | src/Perl6/Actions.nqp:
attach adverbs to variables too
21:39
21:39 n0tjack left
dalek ast: 7390453 | TimToady++ | S32-hash/delete.t:
$var:adverb now dies
21:41
21:41 Oatmeal left
dalek ast: aa4ba57 | TimToady++ | S03-operators/ternary.t:
adverbs now attach to identifiers
21:43
TimToady and another divergence from STD bites the dust...
21:43 kaare_ left
TimToady errantry & 21:46
21:50 eliasr joined 21:54 Oatmeal joined 22:01 Oatmeal left
zengargo1le hrm, refactoring and i hit: dp($t,$a,$s).defined or dp($t,$a,$s) = do if … # works 22:05
dp($t,$a,$s) //= do if … # doesn't
and the &?ROUTINE thing errored out again even with the ($ = …) hack. :( 22:07
22:07 perlawhirl left 22:08 solarbunny left, synbot6 left, dalek left, xpen joined 22:09 lsm-desktop_ left, zengargo1le is now known as zengargoyle 22:10 TEttinger joined 22:11 skids1 left 22:12 kmel left 22:14 xpen left 22:18 Oatmeal joined 22:21 perlawhirl joined 22:24 lsm-desktop_ joined 22:25 kmel joined 22:31 Oatmeal left 22:33 spider-mario left 22:35 Skarsnik left 22:37 softmoth joined 22:38 RabidGravy left
TimToady m: my $today:foo<😂>= “Does this work?”; say $today:foo<😂> 22:39
camelia rakudo-moar c880f1: OUTPUT«Does this work?␤»
TimToady m: my $today:foo:bar:baz<😂>= “Does this work?”; say $today:foo:bar:baz<😂> 22:40
camelia rakudo-moar c880f1: OUTPUT«Does this work?␤»
TimToady m: my $today:foo«a b»:bar:baz<😂>= “Does this work?”; say $today:foo«a b»:bar:baz<😂>
camelia rakudo-moar c880f1: OUTPUT«5===SORRY!5=== Error while compiling /tmp/qnf8h8gQPi␤Variable '$today:foo<a b>:bar:baz<😂>' is not declared. Did you mean '$today:foo«a b»:bar:baz<😂>'?␤at /tmp/qnf8h8gQPi:1␤------> 3a b»:bar:baz<😂>= “Does this work?”; say 7⏏5$…»
TimToady cool, another bug :)
22:42 softmoth left 22:43 FROGGS left 22:44 Oatmeal joined
lizmat :) 22:45
lizmat is almost done with split :k and friends, but needs to debug the $parts case still
I will do that tomorrow, first some sleep
22:45 hlafarge joined
zengargoyle m: sub d($i) is rw { state @; @[$i] }; d(1)=12; say d(1); 22:45
camelia rakudo-moar c880f1: OUTPUT«[1]␤»
lizmat so good night, #perl6!
TimToady o/ 22:46
zengargoyle m: sub d($i,$j) is rw { state @; @[$i][$j] }; d(1,2)=12; say d(1,2);
camelia rakudo-moar c880f1: OUTPUT«(Any)␤»
zengargoyle m: sub d($i,$j) is rw { state @x; @x[$i][$j] }; d(1,2)=12; say d(1,2);
camelia rakudo-moar c880f1: OUTPUT«12␤»
TimToady each sigil is its own state var 22:47
zengargoyle so, doesn't need explicit state?
pink_mist indeed not
zengargoyle m: sub d($i,$j) is rw { @[$i][$j] }; d(1,2)=12; say d(1,2); 22:48
camelia rakudo-moar c880f1: OUTPUT«(Any)␤»
zengargoyle m: sub d($i) is rw { @[$i] }; d(1)=12; say d(1);
camelia rakudo-moar c880f1: OUTPUT«[1]␤»
zengargoyle but still doesn't @[$x][$y]
sprocket how would i declare a function sig, where the only parameter is an array of specific type? 22:49
22:49 abaugher` left
zengargoyle maybe not Perl 5 like autovivication? 22:49
TimToady zengargoyle: it probably oughta work there
22:49 advwp left 22:50 abaugher` joined
TimToady m: sub foo(Int @bar) {...} 22:50
camelia ( no output )
zengargoyle i would expect it to, but it doesn't :) wonder if it's rakudobugged yet?
TimToady but note you can't just pass [1,2,3] to that
sprocket TimToady: thank you! 22:51
why wouldn’t [1,2,3] work in that case?
TimToady because that's just an array containing it's, it's not declared to be an array returning Int
*ints
zengargoyle Array[Int].new(1,2,3)
TimToady that would work better 22:52
zengargoyle that's in the tricks/traps on doc.perl6.org
TimToady m: sub foo(Int @bar) {say @bar}; foo my Int @ = 1,2,3;
camelia rakudo-moar c880f1: OUTPUT«[1 2 3]␤»
TimToady or like that 22:53
m: sub foo(Int @bar) {say @bar}; foo anon Int @ = 1,2,3;
camelia rakudo-moar c880f1: OUTPUT«5===SORRY!5=== Error while compiling /tmp/zJWfQSi6hk␤anon scoped variables not yet implemented. Sorry. ␤at /tmp/zJWfQSi6hk:1␤------> 3foo(Int @bar) {say @bar}; foo anon Int @7⏏5 = 1,2,3;␤ expecting any of:␤ constraint␤»
TimToady m: sub foo(Int @bar) {say @bar}; foo my @ of Int = 1,2,3;
camelia rakudo-moar c880f1: OUTPUT«Type check failed in binding @bar; expected Positional[Int] but got Array[Int]␤ in sub foo at /tmp/LSlALQKT57:1␤ in block <unit> at /tmp/LSlALQKT57:1␤␤»
TimToady hmm
anyway, strong typing is nominal, not structural, in Perl 6 22:55
zengargoyle when do shaped arrays come? sometime after xmas... 22:56
22:56 kmel left
TimToady no, should be in a week or two 22:56
zengargoyle oh, yay! 22:57
TimToady we have them implemented, just not hooked up to the declarator yet
22:57 xfix left
TimToady I think jnthn++ will be working on that next, now that NFG is finally wrapping up 22:57
m: sub foo(Int @bar) {say @bar}; foo Array[Int](1,2,3);
camelia rakudo-moar c880f1: OUTPUT«[1 2 3]␤»
TimToady a coercion also works there
psch m: sub d($i) is rw { @.[$i] }; d(1)=12; say d(1); 22:58
camelia rakudo-moar c880f1: OUTPUT«12␤»
psch m: sub d($i,$j) is rw { @.[$i].[$j] }; d(1)=12; say d(1);
camelia rakudo-moar c880f1: OUTPUT«5===SORRY!5===␤Calling d(int) will never work with declared signature ($i, $j)␤at /tmp/0hmQuus97E:1␤------> 3sub d($i,$j) is rw { @.[$i].[$j] }; 7⏏5d(1)=12; say d(1);␤Calling d(int) will never work with declared signature ($i, $j)␤at /t…»
psch m: sub d($i,$j) is rw { @.[$i].[$j] }; d(1)=12; say d(1, 2);
camelia rakudo-moar c880f1: OUTPUT«5===SORRY!5=== Error while compiling /tmp/gNtLKkDWOY␤Calling d(int) will never work with declared signature ($i, $j)␤at /tmp/gNtLKkDWOY:1␤------> 3sub d($i,$j) is rw { @.[$i].[$j] }; 7⏏5d(1)=12; say d(1, 2);␤»
22:58 rarara__ joined
psch m: sub d($i,$j) is rw { @.[$i].[$j] }; d(1, 2)=12; say d(1, 2); 22:58
camelia rakudo-moar c880f1: OUTPUT«12␤»
zengargoyle ah...
22:58 advwp joined
rarara__ will shaped array be fast reshapable ? 22:58
yoleaux 29 Oct 2015 00:07Z <lizmat> rarara__: I've completed GLRifying Str.split, but still need to look at a few spectest fails, will continue after some sleep
psch m: say (@[1]).perl; say (@.[1]).perl 22:59
camelia rakudo-moar c880f1: OUTPUT«[1]␤Any␤»
rarara__ like change the number of rows and column without any data touching
23:00 lab__ joined
zengargoyle psch: thanks, a bit closer to expected. 23:00
TimToady those aren't the same @
rarara__: pretty fast 23:01
psch [Coke]: did the <#if jvm>-ing work out?
TimToady maybe not quite as fast as APL
but if the data layout is the same, it's just changing the descriptor
m: sub d($i,$j) is rw { @[$i;$j] }; d(1,2)=12; say d(1,2); 23:02
camelia rakudo-moar c880f1: OUTPUT«[1 2]␤»
psch ah, found the gist in the backlog...
TimToady hmm, there's an odd failure mode
bartolin_ psch, [Coke]: After reverting 5349d0 and ad08a1 it looks like cc4d72c4 was the first commit resulting in the current error
23:02 hlafarge left
zengargoyle @.[].[].[] appears to work as well as state @x; @x[][][]. what does not the same @ mean? 23:02
psch @[1] is the array-interpretation of a new array with 1 as only elements 23:03
TimToady if you meantion @ twice it's two different varaibles
psch @.[1] is the 2nd element of an anonymous state array
TimToady m: sub d($i,$j) is rw { @.[$i;$j] }; d(1,2)=12; say d(1,2);
camelia rakudo-moar c880f1: OUTPUT«12␤»
TimToady there we go
psch++
TimToady apologized for misread psch's intent above 23:04
*zes
TimToady is even the guy that added the @[] syntax :) 23:06
bartolin_ psch, [Coke]: since cc4d72c4 only adds two lines, maybe you have an idea apply a patch for JVM
zengargoyle i'm lost.
bartolin_ goes to bed, now
o/
TimToady @[1,2,3] is a special form that coerces to @ 23:07
m: say %[1,2,3,4]
camelia rakudo-moar c880f1: OUTPUT«1 => 2, 3 => 4␤»
zengargoyle @.[$x;$y;$z] is working in my case also.
TimToady so it needs a .
note that, at the moment, the ; form is slower than the [][] form, but we expect that to change 23:08
zengargoyle so @[] is a special case of some sort and @.[] is the real deal?
TimToady @[] is fallout from when we enabled $[1,2,3] to make an itemized array 23:09
zengargoyle ah, so not really bug
TimToady I suppose we could restrict those forms to $
zengargoyle i totally expected @[][][] to work. 23:10
TimToady metoo
23:11 xpen joined
TimToady m: say %{1,2,3,4} 23:11
camelia rakudo-moar c880f1: OUTPUT«5===SORRY!5=== Error while compiling /tmp/XwtIzPxrMM␤Unsupported use of %{1,2,3,4}; in Perl 6 please use %(1,2,3,4)␤at /tmp/XwtIzPxrMM:1␤------> 3say %{1,2,3,4}7⏏5<EOL>␤»
23:14 Oatmeal left
psch @[] should probably throw similary to %{} 23:15
+l
23:16 xpen left
TimToady well, maybe it should just work like we expected 23:18
psch TimToady: that is, install an anon state and index on that?
TimToady is testing a patch 23:19
psch feels a bit overly magical to me, but i'm not inherently opposed
as in, it's certainly symetric with how $ for an anon state works 23:20
well, i don't have anything but a feeling as object is my point, so yeah :)
*objection
TimToady well, it blew up compiling NativeCall for some reason, so I'll leave it be for now
23:26 Oatmeal joined 23:27 rarara__ left 23:28 abaugher` is now known as abaugher 23:34 Oatmeal left 23:35 advwp left 23:37 lsm-desktop_ left 23:39 pippo joined
pippo m: grammar G {rule TOP {<G1>}; token G1 {A}}; my $g = G.parse("A"); say $g.Str; say $g».Str; 23:41
camelia rakudo-moar c880f1: OUTPUT«A␤()␤»
pippo ^^Bub?
^^Bug?
Why $g».Str = ()? 23:42
zengargoyle m: grammar G {rule TOP {<G1>}; token G1 {"A"}}; my $g = G.parse("A"); say $g.Str; say $g».Str;
camelia rakudo-moar c880f1: OUTPUT«A␤()␤»
psch m: grammar G {rule TOP {<G1>}; token G1 {A}}; my $g = G.parse("A"); say $g.perl 23:43
camelia rakudo-moar c880f1: OUTPUT«Match.new(ast => Any, list => (), hash => Map.new((:G1(Match.new(ast => Any, list => (), hash => Map.new(()), orig => "A", to => 1, from => 0)))), orig => "A", to => 1, from => 0)␤»
psch pippo: "list => ()"
pippo psch: ?
psch pippo: » calls .list to do out-of-sequence map on it
23:44 skids joined
psch ...camelia is somewhat slow today, isn't she? 23:44
pippo: i think it's because you don't have any submatches, but i can only verify via camelia, and that apparently takes a moment... :) 23:45
zengargoyle m: grammar G {rule TOP {<G1>}; token G1 {"A"}}; my $g = G.parse("A"); say $g.Str; say $g<G1>.Str;
camelia rakudo-moar c880f1: OUTPUT«A␤A␤»
23:45 kid51 joined
pippo m: grammar G {rule TOP {<G1>}; token G1 {A}}; my $g = G.parse("A"); say $g.list; 23:46
camelia rakudo-moar c880f1: OUTPUT«()␤»
23:46 diegok joined
zengargoyle m: grammar G {rule TOP {(<.G1>)}; token G1 {"A"}}; my $g = G.parse("A"); say $g.Str; say $g>>.Str 23:46
camelia rakudo-moar c880f1: OUTPUT«A␤(A)␤»
pippo zengargoyle: rationale? 23:47
zengargoyle <named> go into % 23:48
psch ah, not submatches, pos captured, right
zengargoyle++
*captures
zengargoyle m: grammar G {rule TOP {(<.G1>)}; token G1 {"A"}}; my $g = G.parse("A"); say $g.Str; say %($g):v
camelia rakudo-moar c880f1: OUTPUT«A␤Map.new(())␤»
zengargoyle bah
m: grammar G {rule TOP {(<.G1>)}; token G1 {"A"}}; my $g = G.parse("A"); say $g.Str; say %($g).values
camelia rakudo-moar c880f1: OUTPUT«A␤()␤»
psch m: my $match = "abc" ~~ /(a) . $<c>=c/; say $match.list; say $match.hash
camelia rakudo-moar c880f1: OUTPUT«(「a」)␤Map.new((:c(Match.new(ast => Any, list => (), hash => Map.new(()), orig => "abc", to => 3, from => 2))))␤»
zengargoyle bah xx 2 23:49
pippo m: grammar G {rule TOP {<G1> % ','}; token G1 {A}}; my $g = G.parse("A, A"); say $g».Str;
camelia rakudo-moar c880f1: OUTPUT«5===SORRY!5=== Error while compiling /tmp/RngiUxhXD2␤Missing quantifier on the left argument of %␤at /tmp/RngiUxhXD2:1␤------> 3grammar G {rule TOP {<G1> %7⏏5 ','}; token G1 {A}}; my $g = G.parse("A␤»
pippo m: grammar G {rule TOP {<G1>+ % ','}; token G1 {A}}; my $g = G.parse("A, A"); say $g».Str; 23:50
camelia rakudo-moar c880f1: OUTPUT«Use of uninitialized value of type Any in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed. in block <unit> at /tmp/z4M2Sn_OK8:1␤()␤»
zengargoyle <G1>+ % ','
23:50 sufrostico left
zengargoyle can only % things that can capture multiples 23:51
23:51 olinkl left
pippo m: grammar G {rule TOP {<G1>+ % ','}; token G1 {A}}; my $g = G.parse("A,A"); say $g».Str; 23:51
camelia rakudo-moar c880f1: OUTPUT«()␤»
pippo m: grammar G {rule TOP {<G1>+ % ','}; token G1 {A}}; my $g = G.parse("A,A"); say $g<G1>».Str;
camelia rakudo-moar c880f1: OUTPUT«[A A]␤»
psch m: grammar G {rule TOP {<G1>+ % ','}; token G1 {A}}; my $g = G.parse("A,A"); say %($g)».Str;
camelia rakudo-moar c880f1: OUTPUT«G1 => A␤»
pippo m: grammar G {rule TOP {<G1>+ % ','}; token G1 {A}}; my $g = G.parse("A,A"); say $g<G1>.list; 23:52
camelia rakudo-moar c880f1: OUTPUT«[「A」 「A」]␤»
psch maybe the lag was me all along, actually...
23:52 olinkl joined
pippo m: grammar G {rule TOP {<G1>+ % ','}; token G1 {A}}; my $g = G.parse("A,A"); say $g<G1>.list.perl; 23:53
camelia rakudo-moar c880f1: OUTPUT«[Match.new(ast => Any, list => (), hash => Map.new(()), orig => "A,A", to => 1, from => 0), Match.new(ast => Any, list => (), hash => Map.new(()), orig => "A,A", to => 3, from => 2)]␤»
pippo m: grammar G {rule TOP {<G1>+ % ','}; token G1 {A}}; my $g = G.parse("A,A"); say $g<G1>.list.Str.perl;
camelia rakudo-moar c880f1: OUTPUT«"A A"␤»
psch m: grammar G {rule TOP {<G1>+ % ','}; token G1 {A}}; my $g = G.parse("A,A"); say $g.caps>>.Str;
camelia rakudo-moar c880f1: OUTPUT«(G1 A G1 A)␤»
pippo m: grammar G {rule TOP {<G1>}; token G1 {A}}; my $g = G.parse("A"); say $g<G1>.list; 23:54
camelia rakudo-moar c880f1: OUTPUT«()␤»
pippo m: grammar G {rule TOP {<G1>}; token G1 {A}}; my $g = G.parse("A"); say $g<G1>.list.perl;
camelia rakudo-moar c880f1: OUTPUT«()␤»
psch pippo: the notable thing happening is that (1) >> coerces to Positional (i.e. calls .list) and (2) named captures aren't positional 23:55
pippo: .list only makes sense when you know that you have multiple, not-matched-with-a-name captures
zengargoyle m: grammar G {rule TOP {<G1>+ % ','}; token G1 {A}}; my $g = G.parse("A,A"); say $g{}>>.Str
camelia rakudo-moar c880f1: OUTPUT«()␤»
Hotkeys remember when I said last week that I wrote circumstantial with a k sound on my llinguistics midterm 23:56
I lied
that wasn't even on my midterm
for some reason I thought I remembered it was
zengargoyle m: grammar G {rule TOP {<G1>+ % ','}; token G1 {A}}; my $g = G.parse("A,A"); say $g.{*} 23:57
camelia rakudo-moar c880f1: OUTPUT«(「A」 「A」)␤»
zengargoyle m: grammar G {rule TOP {<G1>+ % ','}; token G1 {A}}; my $g = G.parse("A,A"); say $g.{*}.values
camelia rakudo-moar c880f1: OUTPUT«(「A」 「A」)␤»
pippo psch: I am parsing a file. And sometimes on a line there is one match and sometimes more. I wanted to get the values and push them on an array. The fact that it behaves differently if you have one or more than one match complicats things :-))
zengargoyle m: grammar G {rule TOP {<G1>+ % ','}; token G1 {A}}; my $g = G.parse("A,A"); say $g.{*}.values>>.Str
camelia rakudo-moar c880f1: OUTPUT«(A A)␤»
zengargoyle m: grammar G {rule TOP {<G1>+ % ','}; token G1 {A}}; my $g = G.parse("A,A"); say ($g.{*}.values>>.Str).join("\n") 23:58
camelia rakudo-moar c880f1: OUTPUT«A␤A␤»
psch m: say (m/@<a>=A+/)<a> for <A AAAA AAAAAAA> 23:59
camelia rakudo-moar c880f1: OUTPUT«「A」␤「AAAA」␤「AAAAAAA」␤»