»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_log/perl6 | UTF-8 is our friend! 🦋
Set by Zoffix on 25 July 2018.
cpan-p6 New module released to CPAN! Date-Names-Perl6 (1.1.0) by 03TBROWDER 00:34
Xliff Is there a way to get the Rakudo Star installer to install somewhere other than C: drive? 02:14
MasterDuke Xliff: currently no. however, someone is working on making rakudo relocatable, which would make that possible 02:18
yoleaux 11 Feb 2019 15:35Z <uzl> MasterDuke: Thanks! I was kind of shortsighted because doing, for example, my @a[2].perl prints out how it'd be declared explicitly. ;-)
Xliff MasterDuke++ # Thanks for the heads up. 02:24
Does anyone know if NativeCall will work with MSYS2 libraries? 02:28
Geth doc/master: 4 commits pushed by cfa++ 02:50
doc: b21e83c87d | cfa++ | xt/words.pws
Spelling: allow 'initialise' as we already whitelist 'initialised'.
02:59
doc: f962861d04 | cfa++ | 2 files
Spelling: sort dictionaries to make auditing easier.

  (There are no changes to dictionary contents in this commit.)
Xliff Well, I think I will stop my attempts at getting Rakudo to build under MSYS at "Command failed (status 32768): git fetch" 03:24
Geth doc/master: 4 commits pushed by cfa++ 03:38
doc: a8a39f38aa | cfa++ | 2 files
Spelling: add a couple more words to {code,words}.pws
03:50
doc: 3c4d4ebf75 | cfa++ | doc/Type/Mu.pod6
Spelling: "ided" → "enriched".
synopsebot Link: doc.perl6.org/type/Mu
cpan-p6 New module released to CPAN! Math-Factorial-Operator (0.1.2.0) by 03RIBNOTTER 05:56
New module released to CPAN! Text-Names (0.0.2) by 03RIBNOTTER
New module released to CPAN! Math-Factorial-Operator (0.1.2) by 03RIBNOTTER
jmerelo notable6: Pod6 can be now visualized in GitHub github.com/perl6/doc/blob/master/d...dules.pod6 06:08
notable6 jmerelo, Noted!
jmerelo it's been deployed by kivikkak in GitHub last Dec 2018 github.com/github/markup/commit/b8...ef45a4a2f0 06:09
Geth doc: b8e92c9c38 | cfa++ | doc/Language/nativetypes.pod6
Fix index entries.
06:25
synopsebot Link: doc.perl6.org/language/nativetypes
Geth doc: 87f2b70ba9 | cfa++ | doc/Language/list.pod6
Fix typo.
06:29
synopsebot Link: doc.perl6.org/language/list
Geth ecosystem: 98bee26916 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | META.list
Unreleases auth version of Terminal-Print
06:44
Geth doc: 230292c39d | (JJ Merelo)++ | CONTRIBUTING.md
Howto linked, closes #2266
07:06
Geth doc: b12bdd3402 | cfa++ | .gitignore
Update .gitignore (node modules, package lock).
07:19
Geth ecosystem: acdb5d799e | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | META.list
Deprecates HTTP::Server::Threaded

Closes perl6-http-server-threaded#5
08:40
AlexDaniel weekly: Pod6 can be now visualized in GitHub github.com/perl6/doc/blob/master/d...dules.pod6 12:11
notable6 AlexDaniel, Noted!
AlexDaniel notable6: reset Pod6
notable6 AlexDaniel, Moved existing notes to “Pod6_2019-02-12T12:11:09Z”
AlexDaniel weekly: it's been deployed by kivikkak in GitHub last Dec 2018 github.com/github/markup/commit/b8...ef45a4a2f0
notable6 AlexDaniel, Noted!
AlexDaniel although I don't understand that note at all 12:13
AlexDaniel weekly: (↑ original note by jmerelo, here's some commentary from AlexDaniel): actually that commit just slurps the content, without doing any rendering. And that was live for quite a bit I think… 12:16
notable6 AlexDaniel, Noted!
scimon So. What happened to HTTP::Server::Async ? 14:04
Geth ¦ ecosystem-unbitrot: AlexDaniel self-assigned MeCab github.com/perl6/ecosystem-unbitrot/issues/471 14:25
zostay this is curious: 14:52
m: multi foo($a, :$str) { samewith().join }; multi foo($a) { <a b c> }; say foo('blah', :str);
camelia Cannot resolve caller foo(...); none of these signatures match:
($a, :$str)
($a)
in sub foo at <tmp> line 1
in block <unit> at <tmp> line 1
zostay even more curious since that was supposed to be the working example i just ran on my rakudo :-p
m: multi foo($a, :$str) { samewith($a).join }; multi foo($a) { <a b c> }; say foo('blah', :str); 14:53
camelia (timeout)
zostay oh, i see what i've done... nevermind, not curious, just sleep deprived... thanks channel for being my teddy bear 14:54
guifa We all have those moments 15:06
masak yes, nameds are optional 15:31
(and, perhaps more importantly, optional nameds don't figure in dispatch resolution)
pmurias AlexDaniel: by visualized you mean syntax highlighted? 15:55
AlexDaniel pmurias: I have no idea what jmerelo meant
there was a PR that was supposed to render .pod6 files 15:56
but later that was changed to just dump the source
and all that is not news
pmurias AlexDaniel: ahh ok
cfa o/ 16:58
leszekdubiel I've been reading aboutu perl history, and recently about renaming perl6 to Raku... Why not name language "spy" -- as Larry suggested in interviews :) :) Just a free thought... :) 17:00
cfa leszekdubiel: perl 6 hasn't been renamed, fwiw 17:01
leszekdubiel anyway... it's quite strange that there are two names: "Raku is an alternative name for Perl 6 language and can be used interchangeably." <--- from docs 17:02
AlexDaniel leszekdubiel: some people are very attached to “Perl” :) 17:03
AlexDaniel and it's possible to argue that in some ways it'll be better if Perl 6 stays “Perl” 17:03
so I guess we're trying to have it both ways for now :)
leszekdubiel :) :) Okey... :) I understand that naming is a big problem. :) :) There were big blog articles from lizmat and zoofixznet 17:10
cfa xt/aspell.t: # Looks like you failed 28 tests of 376 17:23
think i'll leave it there for now 17:24
guifa . o O ( if only it were possible to get the hunspell dictionary format with aspell corrections ) 17:46
cfa i'm sure this can be improved upon; i've just been focusing on whitelisting and corrections though 17:47
(since we weren't spellchecking the tree for a while)
cfa # Looks like you failed 25 tests of 376 18:05
tbrowder .ask lucs check your email when you get a chance 18:12
yoleaux tbrowder: I'll pass your message to lucs.
SmokeMachine m: multi foo($a, :$str!) { samewith($a).join }; multi foo($a) { <a b c> }; say foo('blah', :str); 18:37
camelia abc
cpan-p6 New module released to CPAN! DB-SQLite (0.3) by 03CTILMES 18:46
Xliff m: $_ = 'aabc'; s[ 'bc' ] = 'yz'; .say 20:30
camelia aayz
Xliff Altreus: ^^ 20:31
m: $n = 'aabc'; ($n ~~ s[ 'bc' ]) = 'yz'; $n.say
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '$n' is not declared
at <tmp>:1
------> 3<BOL>7⏏5$n = 'aabc'; ($n ~~ s[ 'bc' ]) = 'yz'; $
Xliff m: my $n = 'aabc'; ($n ~~ s[ 'bc' ]) = 'yz'; $n.say
camelia 5===SORRY!5=== Error while compiling <tmp>
Missing assignment operator
at <tmp>:1
------> 3my $n = 'aabc'; ($n ~~ s[ 'bc' ]7⏏5) = 'yz'; $n.say
Xliff m: my $n = 'aabc'; $n ~~ s[ 'bc' ] = 'yz'; $n.say
camelia aayz
ofperfection Hey guys, got a question on the regex as I perused the docs and I'm not sure why the following isn't working 21:20
if $_ ~~ m:g/<?after \=> <-[ " ]> +/ {say ~$/}
I'm matching against: NAME="Trisquel GNU/Linux"
if I change it to read: if $_ ~~ m:g/<?after \=\"> .+/ {say ~$/} 21:21
I get Trisquel GNU/Linux"
ofperfection The way I understand in the first example, the negative character class should match ALL non quotation mark characters globally, consequently returning ALL NON QUOTATION MARK CHARACTERS after the "=" 21:22
i.e., Trisquel GNU/Linux
I'm thinking I perhaps don't understand either the function of character classes or the <?after> lookbehind assertion
Can anyone point me in the right direction (:
sena_kun ofperfection, so you want to get `Trisquel GNU/Linux` without `""` around it? 21:23
m: my $a = 'NAME="Trisquel GNU/Linux"'; if $a ~~ m:g/<?after '='> '"' (.+?) '"' / { say $0 }
camelia 「"Trisquel GNU/Linux"」
0 => 「Trisquel GNU/Linux」
sena_kun ofperfection, your first regex fails, because it tries to match anything except `"` symbol after `=`, but there is `="` in your test string. 21:25
your first regex means, like, "after you match '=', please get me all characters that are not `"`", but there are no symbols like that, because in test string there is a `"` right after '='. 21:27
so my version of your regex just states explicitly "get everything between `"`, that goes right after `=` symbol".
character classes match symbols based on if the symbol is included in the class or not, they don't work as "filters", where you can say "get me all digit characters, ignore all other characters that may be between them". 21:29
ofperfection ooooh, I see now that using a capture group would have made my life much easier 21:30
Thank you
sena_kun you are welcome 21:31
ofperfection The reason I was trying to capture all non quote characters after the equals
is in some situations the format will be: NAME="Trisquel GNU/Linux"
In others, DISTRIB_ID=Ubuntu
sena_kun ofperfection, if there is only this case, can you consider just strip off `"` after the match? 21:32
ofperfection basically I was trying to capture all the text, as simply alphanumeric removed the characters that can occur in the name, such as GNU/Linux containing the '/'
b2gills m: my $a = 'NAME="Trisquel GNU/Linux"'; say $a ~~ / '=' '"' ~ '"' [<(.*?)>] / 21:33
camelia 「Trisquel GNU/Linux」
b2gills m: my $a = 'NAME="Trisquel GNU/Linux"'; say $a ~~ / '=' '"'? <( .*? )> '"'? /
camelia 「」
b2gills m: my $a = 'NAME="Trisquel GNU/Linux"'; say $a ~~ / '=' ['"' <( .*? )> '"' | <(.*)>] / 21:34
camelia 「Trisquel GNU/Linux」
sena_kun m: my $a = 'NAME="Trisquel GNU/Linux"'; my $b = 'DISTRIB_ID=Ubuntu'; m:g/<?after '='> .+ /.subst('"', '', :g).say for ($a, $b); 21:35
camelia Trisquel GNU/Linux
Ubuntu
sena_kun I think it's safe to assume `"` character cannot be part of the distro name. 21:35
if you want to support this case too, I think you can do a check, like `if $foo.starts-with('"') && $foo.ends-with('"') { chop off here }` 21:36
that's the safest route.
but if you don't need to support such odd cases, I'd go with subst.
ah, also, in this case, regex is redundant. 21:37
m: my $a = 'NAME="Trisquel GNU/Linux"'; my $b = 'DISTRIB_ID=Ubuntu'; .split('=')[1].subst('"', '', :g).say for ($a, $b); 21:38
camelia Trisquel GNU/Linux
Ubuntu
sena_kun which is both faster and easier to read compared to the regex approach. :)
ofperfection Thank you sena_kun, it is safe for my purposes to assume that the " character won't be part of the distro name
and I appreciate you walking me through all these potential solutions :) 21:39
sena_kun you are welcome. :) 21:40
ofperfection b2gills, I've not seen that syntax previously: say $a ~~ / '=' '"' ~ '"' [<(.*?)>] / 21:41
sena_kun docs.perl6.org/language/regexes#in...structures <- here it is
lizmat so Geth is still AWOL ? 22:03
oops, mischan
discord6 <Rogue> I feel like doing a small project but I just don't know what to do 22:04
melezhik Hi! I am struggling with this error - @!stdout-data; expected Array but got Str ("OK1") 22:26
AlexDaniel weekly: I guess it's old news, but: github.com/trizen/sidef “Sidef is a modern, high-level, general-purpose programming language, inspired by Ruby, Perl 6 and Julia.”
notable6 AlexDaniel, Noted!
melezhik class A { has Array @.stdout-data is rw }
AlexDaniel melezhik: @ is already an Array 22:27
melezhik: Array @array is an array of arrays :)
melezhik: Str @array is an array of Str
melezhik m: class Foo { has Array @.a is rw }; push Foo.new.a, 1 22:28
camelia Type check failed in assignment to @!a; expected Array but got Int (1)
in block <unit> at <tmp> line 1
AlexDaniel so either
m: class Foo { has Int @.a is rw }; push Foo.new.a, 1
camelia ( no output )
AlexDaniel or
m: class Foo { has @.a is rw }; push Foo.new.a, 1
camelia ( no output )
melezhik m: perl6 -e 'class Foo { has Array @.a is rw }; push Foo.new.a, "1"'
camelia 5===SORRY!5=== Error while compiling <tmp>
Two terms in a row
at <tmp>:1
------> 3perl6 -e7⏏5 'class Foo { has Array @.a is rw }; pus
expecting any of:
infix
infix stopper
postfix
statement…
melezhik m: class Foo { has Array @.a is rw }; push Foo.new.a, "g"
camelia Type check failed in assignment to @!a; expected Array but got Str ("g")
in block <unit> at <tmp> line 1
melezhik m: class Foo { has Array $.a is rw }; push Foo.new.a, "g" 22:29
camelia ( no output )
melezhik m: class Foo { has Array $.a is rw }; push Foo.new.a, "g"; say Foo.a.perl
camelia Cannot look up attributes in a Foo type object
in method a at <tmp> line 1
in block <unit> at <tmp> line 1
melezhik m: class Foo { has Array $.a is rw }; my $a = Foo.new.a; push a.a, "g"; say a.a.perl 22:30
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
a used at line 1
discord6 <Rogue> m: class Foo { has @.a is rw; }; my $a = Foo.new; push $a.a, 'value'; say $a.a; 22:32
<Rogue> oof I guess that doesn't work with the bridge
<Rogue> but that's the idea ^ 22:33
melezhik m: class Foo { has Str @.a is rw }; my $obj=Foo.new; push $obj.a, "g"; push $obj.a, "h"; for $obj.a -> $i { say $i } 22:34
camelia g
h
discord6 <Rogue> You need to use the sigil any time you refer to a variable (except when accessing it from a class instance, as that's technically just calling a method)
AlexDaniel Rogue: someone will make it work, eventually, especially if discord becomes more popular :)
melezhik thanks to all, I was just misused "lines" , in my case the difference is critical ... 22:35
m: class Foo { has Str @.a is rw }; my $obj=Foo.new; push $obj.a, "g"; push $obj.a, "h"; for $obj.a.lines -> $i { say $i }
camelia g h
AlexDaniel <JustATest>: say 42
melezhik g h VS g nl h
discord6 <Rogue> Oh wow, I never knew .lines worked on an array in that manner 22:37
ofperfection I've got a weird bit with lines earlier I'm attempting to sort that seems like it should be easy- if I wanted to coerce $filename.lines(1) to a string instead of a seq so I could perform .split, .subst, etc. 22:40
WHat is the best method of achieving this?
I was attempting to coerce with ~, but no dice
Cannot resolve caller split(Any, Str); Routine does not have any candidates. Is only the proto defined? 22:41
Seems like the root is that the output of $filename.lines(1) is a seq, and consequently I can't call Str methods on it
melezhik > Oh wow, I never knew .lines worked on an array in that manner - yeah - that took me hours of debugging today )=; 22:42
it's tricky when your function accepts input parameters $something, which could be both array(list) and filehandler 22:43
so you have $something.lines
and get terrible hard to debug code
lizmat melezhik: multi's are your friend :-) 22:45
timotimo what sometimes bothers me is that you can't always just .say on something to get an output of what it is; if the something is a file handle, it'll complain about missing arguments 22:46
though of course there's dd which doesn't have that issue
melezhik lizmat: yeah, I relied on "lines" "polymorphic" behavior and it bite me )-; 22:48
lizmat there's a whole class of problems like that 22:50
m: dd <a b c>.contains("a b")
camelia Bool::True
lizmat sometimes I think we should at least warn about these, or deprecate them
AlexDaniel lizmat: yes yes for sure 22:52
lizmat is spectesting a fix for R#2686 22:53
synopsebot R#2686 [open]: github.com/rakudo/rakudo/issues/2686 [regression][⚠ blocker ⚠] Some issue exposed by IO::Glob
AlexDaniel lizmat++ 23:04
Xliff m: my @a = <a b c>; .say for ^@a; 23:08
camelia 0
1
2
lizmat AlexDaniel: and that concludes my hacking for today 23:09
good night&
AlexDaniel lizmat: thank you! Good night!