»ö« 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. |
|||
00:15
jernster joined,
jme` left,
leont left
00:23
w_richard_w joined
00:33
jernster left
|
|||
cpan-p6 | New module released to CPAN! Date-Names-Perl6 (1.1.0) by 03TBROWDER | 00:34 | |
00:37
rindolf left
00:39
dct left
00:47
w_richard_w left
00:59
pnu__ joined,
peteretep joined,
mrsolo joined,
iviv joined
01:06
htoc^ left
01:11
hphs^ joined
01:13
Actualeyes joined,
alpha6 joined
01:14
molaf joined
01:26
sacomo joined,
albongo joined
01:36
markoong left,
markoong joined
01:41
markoong left
01:43
kurahaupo left
01:45
kurahaupo joined
02:03
hythm joined
|
|||
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 | ||
02:39
kurahaupo_ joined
02:41
hythm left,
kurahaupo left,
hythm joined
02:47
molaf left
|
|||
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.) |
|||
03:00
molaf joined
03:03
cpan-p6 left,
cpan-p6 joined
03:04
zachk left
|
|||
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 | |
03:33
w17t left
|
|||
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 | ||
03:55
hythm left
03:57
kurahaupo_ left
04:01
Actualeyes left
04:06
kerrhau left
04:11
avuserow joined
04:17
ferreira left
04:19
MasterDuke left
04:23
abraxxa joined,
abraxxa left
04:24
abraxxa joined
04:28
abraxxa left
04:30
eythian joined
04:38
mowcat left
04:40
mowcat joined,
mowcat left
04:41
mowcat joined
04:43
abraxxa joined
04:44
mowcat left
05:01
w17t joined
05:13
molaf left,
reach_satori left
05:14
dustinm` left
05:21
reach_satori joined
05:24
dustinm` joined
05:32
Xliff left
05:53
curan joined
|
|||
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 | |||
06:04
jmerelo joined
06:05
dustinm` left
06:06
molaf joined
06:08
ufobat___ left
|
|||
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 | |
06:11
[particle] joined
06:13
[particle]1 left
06:14
dustinm` joined
|
|||
Geth | doc: b8e92c9c38 | cfa++ | doc/Language/nativetypes.pod6 Fix index entries. |
06:25 | |
synopsebot | Link: doc.perl6.org/language/nativetypes | ||
06:26
molaf left
|
|||
Geth | doc: 87f2b70ba9 | cfa++ | doc/Language/list.pod6 Fix typo. |
06:29 | |
synopsebot | Link: doc.perl6.org/language/list | ||
06:33
domidumont joined
06:42
cpan-p6 left,
cpan-p6 joined
|
|||
Geth | ecosystem: 98bee26916 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | META.list Unreleases auth version of Terminal-Print |
06:44 | |
07:02
domidumont left
|
|||
Geth | doc: 230292c39d | (JJ Merelo)++ | CONTRIBUTING.md Howto linked, closes #2266 |
07:06 | |
07:09
abraxxa left
07:14
ravenousmoose_ joined
|
|||
Geth | doc: b12bdd3402 | cfa++ | .gitignore Update .gitignore (node modules, package lock). |
07:19 | |
07:21
jeromelanteri joined
07:22
domidumont joined
07:34
jmerelo left
07:36
zacts joined
07:37
zacts left
07:39
w_richard_w joined
07:56
domidumont left
07:58
domidumont joined
08:00
sauvin joined
08:03
jeromelanteri left
08:05
w_richard_w left
08:11
integral_ left,
integral_ joined,
integral_ is now known as integral
08:19
powerbit joined
08:34
abraxxa joined
08:36
obfusk_ left
08:37
obfusk joined,
dakkar joined
08:39
kurahaupo joined
|
|||
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 | |
08:57
zakharyas joined
09:04
ravenousmoose_ left
09:05
ravenousmoose joined
09:14
ravenousmoose left
09:27
ufobat joined
09:34
random_yanek left
09:41
ravenousmoose joined
09:47
Actualeyes joined
10:03
ravenousmoose left
10:06
Sgeo__ left
10:07
Sgeo__ joined
10:10
ravenousmoose joined
10:16
rindolf joined
10:32
cpan-p6 left,
cpan-p6 joined
10:33
phogg left
10:42
random_yanek joined,
random_yanek left
10:44
random_yanek joined
10:54
rindolf left
11:06
yqt joined
11:07
rindolf joined
11:21
markoong joined
11:22
Sgeo_ joined
11:25
Sgeo__ left
11:26
domidumont left
11:46
Sgeo__ joined
11:47
hphs^ left
11:48
sena_kun joined
11:49
Sgeo_ left
12:03
kst` joined,
kst left
12:07
kurahaupo left,
sena_kun left
12:08
mowcat joined
|
|||
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 | |
12:15
leont joined
|
|||
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! | ||
12:21
domidumont joined
12:23
domidumont left
12:28
leont left
12:38
ravenousmoose left,
ravenousmoose joined
12:44
zakharyas left
12:58
Sgeo_ joined
12:59
domidumont joined
13:00
mowcat left
13:01
Sgeo__ left,
lucasb joined
13:08
ravenousmoose left
13:17
MilkmanDan left
13:21
MilkmanDan joined
13:28
bhm_ is now known as bhm
13:33
ravenousmoose joined
13:35
random_yanek left
13:36
random_yanek joined,
random_yanek left
13:38
random_yanek joined
13:39
w17t left
13:40
abraxxa left,
abraxxa joined
13:45
scimon joined
13:49
ravenousmoose left
|
|||
scimon | So. What happened to HTTP::Server::Async ? | 14:04 | |
14:12
phogg joined
14:17
reach_satori left
|
|||
Geth | ¦ ecosystem-unbitrot: AlexDaniel self-assigned MeCab github.com/perl6/ecosystem-unbitrot/issues/471 | 14:25 | |
14:27
molaf joined
14:31
cpan-p6 left,
zakharyas joined,
cpan-p6 joined,
sena_kun joined
14:33
molaf left
14:34
sacomo left
14:47
zakharyas left
14:49
zakharyas joined
|
|||
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 | |
14:57
melezhik joined
15:05
curan left
|
|||
guifa | We all have those moments | 15:06 | |
15:19
w17t joined
|
|||
masak | yes, nameds are optional | 15:31 | |
(and, perhaps more importantly, optional nameds don't figure in dispatch resolution) | |||
15:34
ravenousmoose joined
15:53
domidumont left,
domidumont joined,
ravenousmoose left
15:55
pmurias joined
|
|||
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 | ||
16:00
abraxxa left
16:04
ufobat left
16:05
domidumont left
16:06
domidumont joined
16:22
ferreira joined
16:31
w17t left
16:32
w17t joined
16:39
zacts joined
16:40
Peter_R joined
16:41
Xliff joined
16:42
pmurias left
16:43
molaf joined
16:45
random_yanek left
16:48
gregf_ left
16:51
lucasb left
16:52
leszekdubiel joined
16:54
imcsk8 left
16:56
random_yanek joined,
random_yanek left
16:58
cfa joined
|
|||
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 | |
17:01
zacts left
|
|||
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 | |
17:02
abraxxa joined
|
|||
AlexDaniel | leszekdubiel: some people are very attached to “Perl” :) | 17:03 | |
17:03
random_yanek joined
|
|||
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 | |
17:23
domidumont left
|
|||
cfa | xt/aspell.t: # Looks like you failed 28 tests of 376 | 17:23 | |
think i'll leave it there for now | 17:24 | ||
17:28
scimon left
17:34
yqt left
17:42
dakkar left
|
|||
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) | |||
17:53
zacts joined
17:56
zacts left,
melezhik left
|
|||
cfa | # Looks like you failed 25 tests of 376 | 18:05 | |
18:05
leszekdubiel left
|
|||
tbrowder | .ask lucs check your email when you get a chance | 18:12 | |
yoleaux | tbrowder: I'll pass your message to lucs. | ||
18:17
cpan-p6 left,
cpan-p6 joined
18:19
natrys joined
18:27
abraxxa left,
abraxxa joined
18:28
abraxxa left
18:37
domidumont joined
|
|||
SmokeMachine | m: multi foo($a, :$str!) { samewith($a).join }; multi foo($a) { <a b c> }; say foo('blah', :str); | 18:37 | |
camelia | abc | ||
18:41
pecastro joined
|
|||
cpan-p6 | New module released to CPAN! DB-SQLite (0.3) by 03CTILMES | 18:46 | |
19:02
cpage_ joined
19:03
Grauwolf_ joined,
cfa left,
Peter_R_ joined
19:04
sergot_ joined,
aindilis` joined,
pmichaud_ joined,
bisectable6_ joined,
ChanServ sets mode: +v bisectable6_,
Bob- joined,
mephinet- left,
Peter_R left,
probablymoony left,
reu_ left,
sftp left,
albongo left,
reportable6 left,
bisectable6 left,
APic left,
pmichaud left,
sergot left,
atta left,
aindilis left,
reportable6 joined,
esh_ left,
integral left,
leah2 left,
SCHAPiE left,
cpage left,
Grauwolf left,
evalable6 left,
bobby left,
masak left,
dalek left,
dalek joined,
Peter_R_ is now known as Peter_R,
cpage_ is now known as cpage,
ChanServ sets mode: +v reportable6,
ChanServ sets mode: +v dalek,
APic joined
19:05
esh joined,
integral joined,
moony joined,
mephinet joined,
atta joined,
albongo joined,
sftp joined,
masak joined,
SCHAPiE joined
19:06
masak is now known as Guest32385,
reu joined
19:07
leah2 joined
19:10
lichtkind joined
19:34
integral left,
integral joined
19:36
domidumont left
19:42
ufobat joined
19:43
natrys left,
shphrd joined
19:44
shphrd left
19:54
patrickb joined
19:56
evalable6 joined
20:02
calyx left
20:04
molaf left
20:11
zakharyas left
20:14
drolax joined
20:22
gurmble joined,
gurmble is now known as grumble
|
|||
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 | ||
21:04
zachk joined,
d4l3k_ joined,
ChanServ sets mode: +v d4l3k_
21:05
ufobat left
21:06
reportable6 left,
integral left,
dalek left,
integral_ joined,
mephinet left,
d4l3k_ is now known as dalek,
mephinet joined
21:07
zachk left
21:08
zachk joined
21:10
yqt joined,
zachk left,
zachk joined
21:16
cpan-p6 left
21:17
integral_ left,
integral_ joined,
integral_ is now known as integral,
cpan-p6 joined
21:19
kensanata joined,
ofperfection joined
|
|||
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" | |||
21:22
lizmat left
|
|||
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 '/' | ||
21:32
molaf joined
|
|||
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 |
||
21:35
lizmat joined
|
|||
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 | ||
21:48
yqt left
22:02
reportable6 joined,
ChanServ sets mode: +v reportable6
|
|||
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 | |
22:07
rindolf left
22:08
kerrhau joined
22:09
KotH left
22:12
KotH joined
22:14
kensanata left
22:26
melezhik joined
|
|||
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 |
||
22:30
robertle left
|
|||
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 | |
22:38
leont joined
|
|||
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 | ||
22:51
molaf left
|
|||
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 | ||
22:55
drolax left
22:57
thundergnat left
23:02
patrickz joined
23:03
random_yanek left
|
|||
AlexDaniel | lizmat++ | 23:04 | |
23:05
patrickb left
23:08
kurahaupo joined
|
|||
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! | ||
23:10
melezhik left
23:11
random_yanek joined,
random_yanek left
23:13
random_yanek joined
23:46
lichtkind left
23:57
w_richard_w joined
|