🦋 Welcome to Raku! raku.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: colabti.org/irclogger/irclogger_log/raku Set by ChanServ on 14 October 2019. |
|||
00:00
holli left
00:02
holli joined,
Doc_Holliwood left
00:05
Doc_Holliwood joined,
Doc_Holliwould left
00:08
Doc_Holliwould joined,
holli left
00:10
holli joined
00:11
Doc_Holliwood left
|
|||
Geth | doc: tbrowder++ created pull request #3245: chg p6 to raku; chg .perl to .raku |
00:13 | |
00:14
Doc_Holliwould left,
Doc_Holliwood joined
00:16
Doc_Holliwould joined,
holli left
00:19
holli joined,
Doc_Holliwood left
|
|||
Geth | doc: tbrowder++ created pull request #3246: chg p6 to raku; chg .perl to .raku |
00:19 | |
00:21
Doc_Holliwood joined
00:22
Doc_Holliwould left
00:24
Doc_Holliwould joined
00:25
holli left
00:26
mowcat joined
|
|||
Geth | doc: tbrowder++ created pull request #3247: chg p6 to raku; chg .perl to .raku |
00:26 | |
00:27
lucasb left,
holli joined
00:28
Doc_Holliwood left
00:29
mowcat left
00:30
Doc_Holliwould left,
Doc_Holliwood joined
00:32
Doc_Holliwould joined
00:33
holli left
00:35
holli joined
00:36
Doc_Holliwood left
00:39
Doc_Holliwood joined,
Doc_Holliwould left
00:40
Doc_Holliwould joined
00:41
holli left
00:42
kst` left,
kst left
00:43
holli joined
00:44
Doc_Holliwood left
00:47
Doc_Holliwould left,
Doc_Holliwood joined
00:49
Doc_Holliwould joined
00:50
holli left
00:51
holli joined
00:52
Doc_Holliwood left
00:54
Doc_Holliwood joined
00:55
Doc_Holliwould left
00:57
holli left,
Doc_Holliwould joined
01:00
holli joined
01:01
Doc_Holliwood left
01:03
Doc_Holliwood joined
01:04
Doc_Holliwould left
01:05
Doc_Holliwould joined
01:06
holli left
01:08
holli joined
01:09
Doc_Holliwood left
01:12
Doc_Holliwould left,
Doc_Holliwood joined
01:14
aborazmeh joined,
aborazmeh left,
aborazmeh joined,
Doc_Holliwould joined
01:15
holli left
01:16
holli joined
01:17
Doc_Holliwood left,
cfa left
01:20
Doc_Holliwould left,
Doc_Holliwood joined
01:22
Doc_Holliwould joined
01:23
holli left
01:25
holli joined,
Doc_Holliwood left
01:28
Doc_Holliwood joined,
Doc_Holliwould left
01:30
Doc_Holliwould joined
01:31
holli left
01:33
holli joined
01:34
Altai-man_ joined,
Doc_Holliwood left
01:36
sena_kun left
01:37
Doc_Holliwood joined,
Doc_Holliwould left
01:38
Doc_Holliwould joined
01:39
holli left
01:41
holli joined
01:42
Doc_Holliwood left
01:44
Doc_Holliwood joined
01:45
Doc_Holliwould left
01:46
Doc_Holliwould joined
01:47
holli left
01:49
holli joined
01:50
Doc_Holliwood left
01:53
Doc_Holliwood joined,
Doc_Holliwould left
01:55
holli left
01:56
Doc_Holliwould joined
01:59
holli joined
02:00
Doc_Holliwood left
02:02
Doc_Holliwould left
02:03
Doc_Holliwood joined
02:04
Doc_Holliwould joined
02:05
holli left
02:07
holli joined
02:08
Doc_Holliwood left
|
|||
Geth | doc: tbrowder++ created pull request #3248: chg .perl to .raku |
02:08 | |
02:10
Doc_Holliwould left
02:11
Doc_Holliwood joined
02:13
Doc_Holliwould joined
02:14
holli left
02:15
holli joined
02:16
Doc_Holliwood left
02:18
Doc_Holliwood joined
02:19
Doc_Holliwould left
02:21
Doc_Holliwould joined,
molaf left,
holli left
02:24
holli joined,
Doc_Holliwood left
02:27
Doc_Holliwood joined,
Doc_Holliwould left
02:29
Doc_Holliwould joined
02:30
holli left,
Maylay left
02:32
holli joined
02:33
Doc_Holliwood left,
molaf joined
02:35
Doc_Holliwould left,
Doc_Holliwood joined
02:37
Doc_Holliwould joined
02:38
holli left
02:40
holli joined
02:41
Doc_Holliwood left
02:43
Doc_Holliwood joined,
Doc_Holliwould left
02:44
Actualeyes left,
Actualeyes joined
02:45
Doc_Holliwould joined
02:46
holli left
02:48
holli joined
02:49
Doc_Holliwood left
02:51
Doc_Holliwould left
02:52
Doc_Holliwood joined
02:55
Maylay joined
02:56
Doc_Holliwould joined,
holli left
02:58
holli joined
02:59
Doc_Holliwood left
03:01
Doc_Holliwood joined
03:02
Doc_Holliwould left
03:04
Doc_Holliwould joined,
holli left
03:06
holli joined
03:07
Doc_Holliwood left
03:10
Doc_Holliwould left,
Doc_Holliwood joined
03:12
Doc_Holliwould joined
03:13
holli left
03:15
holli joined,
Doc_Holliwood left
03:18
Doc_Holliwould left,
Doc_Holliwood joined
03:20
Doc_Holliwould joined
03:21
holli left
03:23
holli joined
03:24
Doc_Holliwood left
03:26
Doc_Holliwood joined,
Doc_Holliwould left
03:27
leont left
03:28
Doc_Holliwould joined
03:29
holli left
03:31
holli joined
03:32
Doc_Holliwood left
03:34
Doc_Holliwould left
03:35
Doc_Holliwood joined,
sena_kun joined
03:36
Altai-man_ left,
Doc_Holliwould joined
03:37
holli left
03:39
holli joined
03:40
Doc_Holliwood left
03:43
Doc_Holliwould left,
Doc_Holliwood joined
03:45
Doc_Holliwould joined
03:46
holli left
03:47
holli joined
03:48
Doc_Holliwood left
03:50
Doc_Holliwood joined
03:51
dansolo42_ joined,
Doc_Holliwould left,
skyl4rk_ joined
03:52
skyl4rk left,
skyl4rk_ is now known as skyl4rk,
dansolo42 left,
marcusr left,
dansolo42_ is now known as dansolo42,
aindilis` joined,
aindilis left,
smash left
03:53
NODE left
03:54
smash joined,
holli left
03:55
NODE joined,
aindilis` left
03:56
Doc_Holliwood left,
marcusr joined
03:59
aindilis joined
04:03
hungrydonkey joined
04:10
molaf left
04:56
bioexpress joined,
bioexpress left
05:08
aborazmeh left
05:34
Altai-man_ joined
05:35
cpan-raku left,
cpan-raku joined,
cpan-raku left,
cpan-raku joined
05:36
Actualeyes left,
Actualeyes joined,
sena_kun left
05:39
maggotbrain left
05:40
maggotbrain joined
05:47
NODE left
05:49
NODE joined
06:01
sena_kun joined
06:02
Altai-man_ left
|
|||
Geth | doc: 4f6c996bbd | (Tom Browder)++ | doc/Language/variables.pod6 chg p6 to raku; chg '.perl' to '.raku' |
06:06 | |
doc: 843ad42aad | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | doc/Language/variables.pod6 Merge pull request #3244 from tbrowder/p6toraku-variables chg p6 to raku; chg '.perl' to '.raku' |
|||
linkable6 | Link: docs.raku.org/language/variables | ||
06:06
dansolo42 left
06:09
jmerelo joined
06:12
dansolo42 joined
06:24
Altai-man_ joined
06:26
sena_kun left
06:47
aluaces joined
|
|||
Geth | doc: ab50f612f3 | (Tom Browder)++ | doc/Language/5to6-nutshell.pod6 chg .perl to .raku |
06:51 | |
doc: b0b6473ad6 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | doc/Language/5to6-nutshell.pod6 Merge pull request #3248 from tbrowder/p6torakup-6to6 chg .perl to .raku |
|||
linkable6 | Link: docs.raku.org/language/5to6-nutshell | ||
Geth | doc: 365ea26721 | (Tom Browder)++ | doc/Language/5to6-perlfunc.pod6 chg pe6 to raku |
06:52 | |
doc: 5d862db15e | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | doc/Language/5to6-perlfunc.pod6 Merge pull request #3233 from tbrowder/p6toraku-5to6-perlfunc chg pe6 to raku |
|||
linkable6 | Link: docs.raku.org/language/5to6-perlfunc | ||
Geth | doc: 0ff7418261 | (Tom Browder)++ | doc/Language/nativecall.pod6 chg p6 to raku |
06:56 | |
doc: 783e0bd088 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | doc/Language/nativecall.pod6 Merge pull request #3242 from tbrowder/p6toraku-nativecall chg p6 to raku |
|||
linkable6 | Link: docs.raku.org/language/nativecall | ||
Geth | doc: bfdfc9cd40 | (Tom Browder)++ | doc/Language/operators.pod6 chg p6 to raku; chg '.perl' to '.raku' |
06:57 | |
doc: df44519417 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | doc/Language/operators.pod6 Merge pull request #3243 from tbrowder/p6toraku-operators chg p6 to raku; chg '.perl' to '.raku' |
|||
linkable6 | Link: docs.raku.org/language/operators | ||
06:57
stoned75 left
|
|||
Geth | doc: ad0b939b51 | (Tom Browder)++ | doc/Language/unicode_entry.pod6 chg p6 to raku; chg .perl to .raku |
06:58 | |
doc: e836824082 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | doc/Language/unicode_entry.pod6 Merge pull request #3245 from tbrowder/p6toraku-unicode_entry chg p6 to raku; chg .perl to .raku |
|||
linkable6 | Link: docs.raku.org/language/unicode_entry | ||
Geth | doc: a631cac09f | (Tom Browder)++ | doc/Language/traps.pod6 chg p6 to raku; chg .perl to .raku |
06:59 | |
doc: 9127fa490c | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | doc/Language/traps.pod6 Merge pull request #3246 from tbrowder/p6toraku-traps chg p6 to raku; chg .perl to .raku |
|||
linkable6 | Link: docs.raku.org/language/traps | ||
Geth | doc: 2791126cbf | (Tom Browder)++ | doc/Language/terms.pod6 chg p6 to raku; chg .perl to .raku |
07:00 | |
doc: af3d55d7b4 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | doc/Language/terms.pod6 Merge pull request #3247 from tbrowder/p6toraku-terms chg p6 to raku; chg .perl to .raku Great job! Thanks. |
|||
linkable6 | Link: docs.raku.org/language/terms | ||
jmerelo | .tell Altai-man would you be interested in including a GitHub action in MoarVM repo that test-compiled in Alpine and maybe other environments? | 07:02 | |
tellable6 | jmerelo, I'll pass your message to Altai-man_ | ||
07:02
Itaipu left
07:04
nwc10 left
07:10
cognominal joined
07:14
cognomin_ left
07:24
Itaipu joined
07:27
hungrydonkey left
07:28
xinming_ joined
07:30
hungrydonkey joined
07:31
xinming left
07:33
rindolf joined
07:35
sena_kun joined
07:36
Altai-man_ left
07:44
Itaipu_ joined
07:46
Itaipu left
07:49
Itaipu_ left
07:51
Itaipu joined
07:58
Itaipu left,
titsuki joined
|
|||
jmerelo | m: package Foo:ver<0>:auth<bar> {}; say Foo.^ver, Foo.^auth, Foo.^name | 08:03 | |
evalable6 | (exit code 1) No such method 'ver' for invocant of type 'Perl6::Metamodel::PackageHOW' in block <unit> at /tmp/BSoqIqKfyw line 1 |
||
08:04
Black_Ribbon left
|
|||
jmerelo | m: package Foo:ver<0>:auth<bar> {}; say Foo.^name; | 08:09 | |
evalable6 | Foo | ||
jmerelo | m: package Foo:ver<0>:auth<bar> {}; say Foo.^auth; | ||
evalable6 | (exit code 1) No such method 'auth' for invocant of type 'Perl6::Metamodel::PackageHOW'. Did you mean any of these? push put in block <unit> at /tmp/ajB50RyaK1 line 1 |
||
08:15
Actualeyes left,
hungryd41 joined,
Actualeyes joined
08:19
hungrydonkey left,
hungryd41 left
08:27
hungrydonkey joined,
Geth left
08:28
Geth joined,
Itaipu joined
08:34
dakkar joined
08:42
Itaipu left
08:44
hungrydonkey left
08:45
hungrydonkey joined
08:46
cpan-raku left,
cpan-raku joined,
cpan-raku left,
cpan-raku joined
08:49
Itaipu joined
|
|||
SmokeMachine | Voldenet: I was thinking… that it’s possible some one would like, for example, count logged users using something like this: `event login-count { has $count = #login.count; match { login(#login)* } }`. The problem with that is that every new login will create a new login-count event… so I was thinking that we should have a syntax to say something like: acumulate everything, but just emit new event for each 10 | 09:13 | |
new logins… or just emit 1/min for example... | |||
what do you guys think? | |||
09:16
Itaipu left
09:17
Itaipu joined
09:18
roguelazer left
09:20
roguelazer joined
|
|||
jmerelo | SmokeMachine: at the language level? | 09:23 | |
SmokeMachine | jmerelo: yes... | 09:24 | |
jmerelo | SmokeMachine: I use rotors for that. But it involves converting Channels to Supplies and back... | 09:25 | |
SmokeMachine: it works most of the time, anyway. I'm using it for my evolutionary algorithms. | |||
SmokeMachine: it would work with Supplies, creating a new supply out of an old one... No need for channels. | |||
09:26
aborazmeh joined,
aborazmeh left,
aborazmeh joined
|
|||
SmokeMachine | jmerelo: that wouldn’t work for me… it should work at “rule” level… but I think the biggest problem for now (before implementing) is finding a good syntax for that... | 09:27 | |
I’m thinking in something like: `login()*/10` and `login()*/1min`... | 09:28 | ||
jmerelo: what do you think? | |||
jmerelo | SmokeMachine: cool! | ||
09:34
Altai-man_ joined
09:36
sena_kun left
|
|||
cpan-raku | New module released to CPAN! Algorithm::GooglePolylineEncoding (1.0.3) by 03SCIMON | 09:41 | |
09:44
hungryd4 joined
09:48
hungrydonkey left
09:49
jmerelo left
|
|||
SmokeMachine | And, ofcourse: `bla() ** 10/2` | 09:50 | |
but that makes me think, what should this do? `bla() ** 10/3`? and this `bla() ** 10/2 bla() ** 9/3`? | 09:52 | ||
Should the `/N` work only for the whole match? | |||
lizmat clickbaits rakudoweekly.blog/2020/02/24/2020-...red-noise/ | 09:53 | ||
SmokeMachine | that makes me think that maybe it would be better something like: `event login-count { has $count = #login.count; match(*/10) { login(#login)* } }` | 09:54 | |
09:55
pecastro joined
09:56
wamba joined
|
|||
cpan-raku | New module released to CPAN! Trait::Env (1.0.2) by 03SCIMON | 09:57 | |
10:12
Sgeo_ joined
10:14
leah2 left
10:15
leah2 joined,
Sgeo left
10:19
xlat joined
10:31
reach_satori left
10:40
Actualeyes left
10:42
hungrydonkey joined,
reach_satori joined
10:47
hungryd4 left
10:51
Celelibi left
11:01
Celelibi joined
11:06
Actualeyes joined
11:08
mowcat joined
|
|||
cpan-raku | New module released to CPAN! Test::HTTP::Server (0.5.1) by 03SCIMON | 11:30 | |
11:34
sena_kun joined
11:36
Altai-man_ left
11:44
wamba left,
Actualeyes left,
Actualeyes joined
|
|||
rindolf | DrForr: hi, mazal tov! | 12:02 | |
tellable6 | 2020-01-27T22:15:13Z #raku <thundergnat> rindolf Re: slow project euler 686; try rosettacode.org/wiki/First_power_of..._12#Perl_6 | ||
12:05
Actualeyes left
12:08
Actualeyes joined
12:12
wamba joined
12:14
NODE left
12:17
NODE joined
12:26
wamba left
12:30
aborazmeh left
|
|||
rindolf | hmmm... it seems faster | 12:44 | |
SmokeMachine | Maybe something like: `event login-count { has $count = #login.count; match(#login.host/10min) { login(#login, host = #login.host)* } }` to emit 1 event per 10 minutes for each host | 12:49 | |
12:57
leont joined
12:59
NODE left
13:02
NODE joined
13:18
titsuki left
13:32
jmerelo joined
13:34
Altai-man_ joined
13:36
sena_kun left
13:40
_jrjsmrtn left,
__jrjsmrtn__ joined
13:47
jmerelo left
13:51
molaf joined
13:54
molaf left,
reach_satori left
14:21
titsuki joined
14:25
aborazmeh joined,
aborazmeh left,
aborazmeh joined
14:28
masak joined
|
|||
abraxxa | can I change the output of Grammar::Tracer to output the whole match and not only its beginning? | 14:41 | |
dakkar | abraxxa: looking at github.com/jnthn/grammar-debugger/...Tracer.pm6 you could redefine the `summary` method | 14:44 | |
14:53
titsuki left
15:04
aborazmeh left
15:05
cfa joined
15:12
zeylos left
15:17
NODE left
15:19
AlexDaniel left,
NODE joined,
AlexDaniel joined,
AlexDaniel left,
AlexDaniel joined
|
|||
abraxxa | does rule and token in a Grammer behave any different but whitespace matching? | 15:26 | |
masak | no, that's the difference | 15:27 | |
tellable6 | 2019-12-25T16:51:28Z #raku <sena_kun> masak not only github.com/masak/data-pretty but github.com/masak/gge wants some de-bitrotting too... | ||
abraxxa | i switched proto rule to a proto token and now it behaves completely different | ||
masak | sena_kun: oh wow. I'm not surprised. | ||
tellable6 | masak, I'll pass your message to sena_kun | ||
masak | tellable6: oh, you do that automatically now? neat. | 15:28 | |
tellable6 | masak, I haven't seen oh around, did you mean o_? | ||
masak | haha. still stupid, though | ||
abraxxa: well, duh :P | |||
abraxxa: hot tip: test your grammars. extensively. | 15:29 | ||
abraxxa | I do and it fails | ||
masak | positive and negative tests. this is very important. | ||
if TDD was ever made for anything, it's grammars. and vice versa. | |||
abraxxa | Grammar::Tracer doesn't show me what's going wrong | 15:30 | |
masak | abraxxa: maybe what you need is an intuitive understanding of where `rule` implicitly inserts <.ws> | ||
abraxxa | I moved one sym down and it's still matched first | ||
15:32
Actualeyes left
15:33
Actualeyes joined
|
|||
masak | :) | 15:33 | |
abraxxa | I don't find that funny! | ||
15:35
sena_kun joined
15:36
lgtaube left
15:37
Altai-man_ left
|
|||
jnthn | .oO( If only there was a tool that showed you where the whitespace was going to be inserted in rules... ) |
15:42 | |
abraxxa | i had fixed strings under '' when using rule which I now had to remove when switching to token | 15:44 | |
masak | sorry for smiling -- I did find <sym> matching in a non-first position funny, though I'd be hard-pressed to explain why | 15:53 | |
cfa | morning all | 15:54 | |
abraxxa | token comment-line { ^^\h*'#'+\h*<(\N*)>\n } | 16:01 | |
this token doesn't match a line starting with regular whitespace followed by # | |||
16:05
pecastro left
|
|||
jnthn | m: my token comment-line { ^^\h*'#'+\h*<(\N*)>\n }; say " # foo\n# bar\n #baz\n" ~~ m:g/<comment-line>/ | 16:06 | |
evalable6 | (「 # foo 」 comment-line => 「foo」 「# bar 」 comment-line => 「bar」 「 #baz 」 comment-line => 「baz」) |
||
jnthn | Looks right to me; I'm guessing the problem is elsewhere | ||
abraxxa | I've changed it to a rule and removed all \h* and now it matches again | 16:09 | |
if the previous token or rule matched the linefeed and the four whitespace chars, will that make the ^^ not match? | 16:10 | ||
problem is that the Grammar::Tracer output only contains the start of the matching previous line | 16:11 | ||
16:11
jmerelo joined
|
|||
jnthn | Yes, the ^^ wants to be after the line feed, if the rule ate whitespace at the end of it that'll mean you're no longer at the start of a line... | 16:13 | |
16:18
Ven_de_Thiel joined
|
|||
Ven_de_Thiel | greppable6: X::ParseFail | 16:18 | |
greppable6 | Ven_de_Thiel, Found nothing! | ||
Ven_de_Thiel | also, o/ #raku | ||
greppable6: ParseFail | |||
greppable6 | Ven_de_Thiel, 26 lines, 3 modules: gist.github.com/b46e2c2a137fb6ffbb...c58c6691ee | ||
Geth | doc: 02d37fa461 | (Tom Browder)++ | doc/Language/modules.pod6 chg p6 to raku |
16:19 | |
doc: 2b0cd7b908 | (Tom Browder)++ | doc/Language/modules.pod6 change to canonical URL; add definition of PR |
|||
doc: d6324dbfaa | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | doc/Language/modules.pod6 Merge pull request #3241 from tbrowder/p6toraku-modules chg p6 to raku |
|||
linkable6 | Link: docs.raku.org/language/modules | ||
doc/master: 5 commits pushed by (Tom Browder)++, (Juan Julián Merelo Guervós)++ | |||
doc: 6840bea8ff | (Tom Browder)++ | doc/Language/glossary.pod6 chg p6 to raku |
16:20 | ||
doc: bf50be3df7 | (Tom Browder)++ | doc/Language/glossary.pod6 use canonical URL |
|||
doc: 17441eaa29 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | doc/Language/glossary.pod6 Merge pull request #3239 from tbrowder/p6toraku-glossary chg p6 to raku |
|||
linkable6 | Link: docs.raku.org/language/glossary | ||
doc: 4773a6b853 | (Tom Browder)++ | doc/Language/haskell-to-p6.pod6 chg p6 to raku |
16:22 | ||
doc: da314d4ba2 | (Tom Browder)++ | doc/Language/haskell-to-p6.pod6 tidy grammar per comment |
|||
doc: a160ba1c8e | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | doc/Language/haskell-to-p6.pod6 Merge pull request #3240 from tbrowder/p6toraku-haskell-to-p6 chg p6 to raku |
|||
linkable6 | Link: docs.raku.org/language/haskell-to-p6 | ||
16:28
Actualeyes left,
Actualeyes joined
|
|||
jmerelo | Just a reminder we're still admitting project proposals for Outreachy github.com/perl-foundation-outreac...2020-ideas | 16:31 | |
16:41
reach_satori joined
16:42
camelCaser left
|
|||
sena_kun | jmerelo, can't some gsoc ideas just be ported there? | 16:42 | |
tellable6 | 2020-02-25T15:27:58Z #raku <masak> sena_kun: oh wow. I'm not surprised. | ||
16:43
camelCaser joined
|
|||
jmerelo | sena_kun: mostly, but you need to take into account that onboarding tasks have to be added, and it requires more involvement from early on, so we encourage 3 or more mentors per project. | 16:43 | |
cpan-raku | New module released to CPAN! Trait::Env (1.0.3) by 03SCIMON | 16:51 | |
sena_kun | El_Che, ping? | 16:56 | |
16:57
xlat left
|
|||
El_Che | pong (although a slow pong, on the train) | 17:00 | |
sena_kun | El_Che, can you PM me later today when comfortable to discuss alpine issue (I Have some new info) | 17:01 | |
jmerelo | sena_kun: I'm around to help if needed... | ||
El_Che | sena_kun: is it sensitive? we can always open an temporarely channel | 17:03 | |
17:04
abraxxa left
|
|||
sena_kun | El_Che, not really, I guess, it's just less noisy, maybe | 17:04 | |
17:05
rindolf left
|
|||
El_Che | sena_kun, jmerelo: joint #rakuadhoc | 17:08 | |
-t | |||
Grinnz | you should use ## for ad hoc channels | 17:09 | |
or maybe #raku-foo? i don't know if that ownership is automatic | 17:10 | ||
17:14
Doc_Holliwood joined
17:22
Ven_de_Thiel left
|
|||
rypervenche | I've got two arrays of equal size. I want to Z~ them together, but also add a '=' in between each created element. How might I accomplish this? | 17:27 | |
leont | By doing two Z~ ? | 17:29 | |
jnthn | m: my @a = 1,2,3; my @b = 4,5,6; say @a Z[&({"$^a=$^b"})] @b | ||
evalable6 | (1=4 2=5 3=6) | ||
rypervenche | Oooh | 17:30 | |
leont | @a Z~ "="xx@a Z~ @b | 17:31 | |
m: my @a = 1, 2, 3; my @b = 4, 5,6; say @a Z~ "="xx@a Z~ @b | |||
evalable6 | (1=4 2=5 3=6) | ||
cfa | m: my @a = 1, 2, 3; my @b = 4, 5, 6; say @a »~» '=' Z~ @b | 17:32 | |
evalable6 | (1=4 2=5 3=6) | ||
jnthn | That's also cute... | 17:33 | |
rypervenche | Oooooh | ||
jnthn | Also this one: | ||
m: my @a = 1, 2, 3; my @b = 4, 5, 6; say @a Z~ "=", * Z~ @b | |||
evalable6 | (1=4 2=5 3=6) | ||
cfa | nifty | ||
jnthn | The , * instead of xx @a | ||
leont | Huh, I didn't know that one! | ||
17:34
Altai-man_ joined
|
|||
leont | Whatever really is that whatever :-D | 17:34 | |
cfa | oh btw leont, i tried Getopt::Long as a drop-in replacement recently | 17:35 | |
very neat | |||
one question: do you plan to auto-provide usage documentation? | |||
rypervenche | Thanks for all of the answers. Very TIMTOWTDI indeed. | 17:36 | |
17:36
sena_kun left
17:37
m_athias joined
|
|||
rypervenche | Another kind of related question. Is it possible to have two arrays, one of variable names (with or without $, not sure if needed), and one of values, and combine them together while declaring them all at the same time? Much like: my ($var1, $var2) = <one two>; but where the first array is actually a variable? | 17:41 | |
17:43
dakkar left
|
|||
Doc_Holliwood | m: .say for (1, 10, 11, 100, 101, 110... *)[0..10] | 17:43 | |
jnthn | No, because lexical declarations need to be known at compile time | ||
evalable6 | (exit code 1) Unable to deduce arithmetic or geometric sequence from 100,101,110 (or did you really mean '..'?) in block <unit> at /tmp/aaJfExAX6t line 1 |
||
rypervenche | In my mind it would look something like: my @var-names = @values; | 17:44 | |
leont | cfa: yeah I do, I just haven't gotten around to it | ||
One of the main factors is that I'm not entirely sure what I want the output to look like exactly | 17:45 | ||
cfa | leont: neat | 17:47 | |
and yeah, understood | |||
leont | The builtin one tends to become very confusing when one has many arguments (e.g. type "zef foo"), but I'm not quite sure what the alternative would look like | ||
cfa nods | 17:49 | ||
rypervenche | Oh! I missed jnthn's response. Hmm. | ||
leont | Also, you may want to have a look at Getopt::Subcommands. It's a bit more experimental at this stage but the two-stage argument handling does seem like a good idea. | 17:50 | |
17:50
wamba joined
17:51
hungrydonkey left
|
|||
rypervenche | jnthn: I was looking to take some bash variables from a file (like: VAR1="$HOME/Desktop") and convert them into Raku syntax via a grammar, and possibly in the actions create our-scoped variables. That won't be possible then? Is there something similar that I could do? | 17:54 | |
jnthn | Depends what problem you're trying to solve. In theory you can write a module with an EXPORT, pass it the file, and it will export variables :) | 17:55 | |
I did something like that once for shell commands (in a talk, as an example) | 17:56 | ||
rypervenche | I was planning on turning this into a module, yeah. | ||
17:58
pecastro joined
|
|||
cfa | leont: cool, will check that out | 18:04 | |
fwiw, i have no real issues with the builtin one... but for the = signs | 18:05 | ||
leont | Yeah the = signs are the main reason why I needed something else as well | 18:13 | |
But having more specific error messages for a lot of issues is a strong second reason | |||
cfa | sounds good | ||
i gather there was a motivation for using = in the first place | |||
leont | It's essentially a design constraint of using a blind parser | 18:17 | |
The default parser converts the command line arguments into a capture without knowing anything about those arguments, so it can't know --foo should take an argument or not | 18:18 | ||
cfa | ah, okay | ||
presumably that's in the typeless MAIN(:$foo) case? | 18:19 | ||
because once you provide a type it's no longer ambiguous? | |||
leont | The default parser doesn't look at MAIN at all until it has already parsed the arguments | ||
cfa | aha | ||
leont | Then it tries to dispatch to MAIN, and if that doesn't work prints the usage message | 18:21 | |
That's why the error message is so non-specific, it only knows that the capture doesn't fit the sub, it doesn't know why. | |||
cfa | i see | ||
anyway, usability wise it's not wonderful: i tend to do --foo <TAB>, then insert the = after completion | 18:22 | ||
where i'm completing a filename | 18:23 | ||
(i doubt i'm alone in this) | |||
leont | It's also why you definitely shouldn't do «Str $file where *.IO.f» like in one of documentation examples; the usage message really isn't really a replacement for "no such file $file" | ||
Geth | doc: 2e51f74560 | Coke++ | doc/Language/haskell-to-p6.pod6 avoid awkward phrasing. passes spelling test again. |
||
linkable6 | Link: docs.raku.org/language/haskell-to-p6 | ||
leont | Essentially all types other than Any or Str give confusing error message in the default parser, because all mismatches trigger the usage message instead of something like «--filesize argument "abc" must be an integer» | 18:28 | |
18:44
abraxxa joined
18:47
chloekek joined
18:48
abraxxa left,
abraxxa joined
18:49
abraxxa left
|
|||
discord6 | <Highlander> rypervenche: here's a link to the talk jnthn is referencing www.youtube.com/watch?v=id4pDstMu1s | 18:49 | |
<Highlander> Also the talk slides since the camera work is a bit dodgy in parts: jnthn.net/papers/2015-fosdem-static-dynamic.pdf | |||
18:50
abraxxa joined
|
|||
discord6 | <Highlander> the code samples in and around slide 56 should be a great starting point for your use case | 18:51 | |
rypervenche | Ahh, thanks Highlander. (not sure how highlighting works via Discord) | 18:52 | |
18:52
abraxxa left
18:53
abraxxa joined,
reach_satori left,
reach_satori joined
18:54
Actualeyes left
|
|||
discord6 | <Highlander> Discord uses @'s but I'm not sure if you need the discriminator (a 4-digit number, since names needn't be unique) as well | 18:55 | |
18:57
abraxxa left
18:58
abraxxa joined
19:02
wamba left
19:03
wamba joined
|
|||
jmerelo | .tell tbrowder got feedback from OSCON, not selected. I'm going to Houston anyway :-) | 19:09 | |
tellable6 | jmerelo, I'll pass your message to tbrowder | ||
19:12
lucasb joined
|
|||
abraxxa | is there a helper method to lookup up an item of an array which is a hash and the attributes all match a given hash (it might have additional keys)? | 19:13 | |
I'd use my $match = @array.first: ???; | 19:14 | ||
does smartmatch what I need? | 19:15 | ||
tbrowder | jmerelo: great, see you there! | ||
moritz | what do you mean by "the attributes"? | 19:16 | |
abraxxa: also, an example or two might help | |||
abraxxa | my %looking-for = ( name => 'foo', color => 'blue' ); my @existing-items = ({ name => 'foo', color => 'blue', otherattr => 'baz' }, { name => 'bar', color => 'red', otherattr => 'baz' }); | 19:17 | |
my %service = @existing-services.first: $_ ~ %service-lookup; | 19:18 | ||
19:18
lgtaube joined
|
|||
abraxxa | my %service = @existing-items.first: $_ ~ %looking-for; | 19:18 | |
moritz | abraxxa: according to the docs, there is sensible Hash ~~ Hash operation defined that suits you | 19:20 | |
abraxxa | my %service = @existing-items.first: * ~ %looking-for; seems to be the correct syntax, but why * and not $_ as in a grep? | 19:21 | |
moritz | say @e.first({ all( $_{%looking-for.keys} ~~ %looking-for.values)}) | 19:22 | |
that's what I'd use to be explicit | |||
abraxxa | that doesn't do what I expect | ||
moritz | no? | ||
abraxxa | my example | ||
moritz | it returns the first hash in your example | 19:23 | |
abraxxa | it always returns the first hash | 19:28 | |
moritz | cannot confirm | 19:30 | |
if I change the order, it still returns the one with color => 'blue' | |||
lizmat | abraxxa: have you considered using objects rather than hashes? then you could create an ACCEPTS method, which would be used inside the block of a first | ||
moritz | m: my %looking-for = ( name => 'foo', color => 'blue' ); my @e = ( { name => 'bar', color => 'red', otherattr => 'baz' }, { name => 'foo', color => 'blue', otherattr => 'baz' },); say @e.first({ all( $_{%looking-for.keys} ~~ %looking-for.values)}) | 19:31 | |
evalable6 | {color => blue, name => foo, otherattr => baz} | ||
abraxxa | lizmat: no, too complicated to this use-once migration code | ||
Firehol linux iptables config frontend to Fortigate firewall rule migration | |||
wrote a Grammar for Firehol | |||
lizmat | or, if it is the same type of object, you wouldn't have to | 19:32 | |
abraxxa | moritz: I also need an exists check in there to silence the warnings | ||
moritz: shouldn't the all function that an array? | 19:33 | ||
moritz | abraxxa: this question no verb | 19:34 | |
abraxxa | s/that/take/ | ||
lizmat | m: class A { has $.a }; my @a = ^10 .map: { A.new(a => $_ ) }; my $needle = A.new(a => 8); dd @a.first: * eqv $needle # abraxxa | 19:35 | |
evalable6 | A @a = A.new(a => 8) | ||
19:35
sena_kun joined
|
|||
moritz | abraxxa: Hash.keys returns a list (or at least something iterable) | 19:35 | |
abraxxa | there is no Hash to Hash comparision operator that doesn deep nested comparision? | 19:36 | |
19:36
aborazmeh joined,
aborazmeh left,
aborazmeh joined
|
|||
abraxxa | moritz: yes, but that's in the one positional parameter to all which uses an operator to return True or False | 19:36 | |
19:37
Altai-man_ left
|
|||
abraxxa | moritz: or is the all like $_.all in this case? | 19:37 | |
moritz | all() returns a Junction | 19:38 | |
abraxxa | those myriads of types really suck! | ||
discord6 | <Highlander> (which will get boolified, and when it does it will be truthy only if "all" its components are truthy) | ||
Voldenet | SmokeMachine: from what you've specified, I making rules on the whole collection of events would be more flexible - (#ev.count % 10 == 0), (#ev.last.date - #ev.first.date < 10m) - hiding that fact would be enormously leaky abstraction anyway | ||
lizmat | abraxxa: again, why hashes ?? | ||
feels to my you're applying Perl 5 idioms in Raku | 19:39 | ||
abraxxa | lizmat: because the FortiManager API takes JSON | ||
lizmat: of course I do, that's what I do since 20 years | |||
moritz | but that doesn't mean you have to work with JSON-compatible data types *inside* your applicaiton | ||
lizmat | well, using hashes is generally not the most performant way in Raku | ||
abraxxa | it's not an application | ||
lizmat | objects are *much* better optinizable | ||
abraxxa | i don't care | 19:40 | |
write fast not run fast | |||
moritz | abraxxa: s/application/code/ then | ||
lizmat | * | ||
abraxxa | raku is more in the way than it helps | ||
I only choose it because of Grammars | |||
lizmat | abraxxa: feels to me it is in the way because you're going against the flow | 19:41 | |
discord6 | <Highlander> I feel like there must be a way to do what you're trying to do without much hassle | ||
abraxxa | Array.first doesn't even have an example using block syntax | ||
discord6 | <Highlander> Why again did moritz's solution not work as expected? Seems like it should do what you're asking for | 19:43 | |
abraxxa | moritz: this doesn't work: my %service = @existing-services.first({ all( $_{%service-lookup.keys}:exists && $_{%service-lookup.keys} eq %service-lookup.values )}); | 19:44 | |
Use of uninitialized value %result{'dport'} of type Any in string context. | |||
there is no %result anywhere in my code | |||
moritz | m: my %looking-for = ( name => 'foo', color => 'blue' ); my @e = ( { name => 'bar', color => 'red', otherattr => 'baz' }, { name => 'foo', color => 'blue', otherattr => 'baz' },); say @e.first({ all($_{%looking-for.keys}:exists) && all( $_{%looking-for.keys} ~~ %looking-for.values)}) | ||
evalable6 | {color => blue, name => foo, otherattr => baz} | 19:45 | |
19:47
jmerelo left
19:49
Black_Ribbon joined
|
|||
abraxxa | moritz: good, that's what i've done too after reading that :exists returns a List/Array/Whatever of boolean values | 19:51 | |
moritz: thanks! | |||
moritz | you're welcome | 19:53 | |
discord6 | <Highlander> see, anything's possible (and easy most of the time) | 19:55 | |
19:56
wamba left
19:57
rindolf joined
|
|||
abraxxa | great, the attribute I have to check is an Array and there is no deep nested comparision operator | 20:03 | |
shouldn't eqv do this? | 20:04 | ||
20:10
molaf joined
|
|||
abraxxa | m: my %looking-for = ( tcp-portrange => ['35450-35490:35450-35490'] ); my @e = ( { name => 'bar', udp-portrange => ['53'] }, { name => 'foo', tcp-portrange => ['35450-35490:35450-35490'] },); say @e.first({ all($_{%looking-for.keys}:exists) && all( $_{%looking-for.keys} eqv %looking-for.values)}) | 20:18 | |
evalable6 | Nil | ||
abraxxa | there you have it | 20:19 | |
m: my %looking-for = ( tcp-portrange => ['35450-35490:35450-35490'] ); my @e = ( { name => 'bar', udp-portrange => ['53'] }, { name => 'foo', tcp-portrange => ['35450-35490:35450-35490'] },);say Dump @e.first({ $_<tcp-portrange> eqv %looking-for<tcp-portrange>}); | 20:20 | ||
evalable6 | (exit code 1) 04===SORRY!04=== Error while compiling /tmp/ZASRPWQxYy Undeclared name: Dump used at line 1 |
||
20:20
cpan-raku left
|
|||
abraxxa | m: use Data::Dump; my %looking-for = ( tcp-portrange => ['35450-35490:35450-35490'] ); my @e = ( { name => 'bar', udp-portrange => ['53'] }, { name => 'foo', tcp-portrange => ['35450-35490:35450-35490'] },);say Dump @e.first({ $_<tcp-portrange> eqv %looking-for<tcp-portrange>}); | 20:20 | |
evalable6 | (exit code 1) 04===SORRY!04=== Er… | ||
abraxxa, Full output: gist.github.com/573b7b70f789a99836...8bb666518a | |||
20:20
aborazmeh left
|
|||
abraxxa | m: my %looking-for = ( tcp-portrange => ['35450-35490:35450-35490'] ); my @e = ( { name => 'bar', udp-portrange => ['53'] }, { name => 'foo', tcp-portrange => ['35450-35490:35450-35490'] },);say @e.first({ $_<tcp-portrange> eqv %looking-for<tcp-portrange>}); | 20:20 | |
evalable6 | {name => foo, tcp-portrange => [35450-35490:35450-35490]} | ||
20:20
cpan-raku joined,
cpan-raku left,
cpan-raku joined
|
|||
abraxxa | why does the former not work? | 20:20 | |
m: my %looking-for = ( tcp-portrange => ['35450-35490:35450-35490'] ); my @e = ( { name => 'bar', udp-portrange => ['53'] }, { name => 'foo', tcp-portrange => ['35450-35490:35450-35490'] },);say @e.first({ all($_{%looking-for.keys}:exists) && $_<tcp-portrange> eqv %looking-for<tcp-portrange>}); | 20:21 | ||
evalable6 | {name => foo, tcp-portrange => [35450-35490:35450-35490]} | ||
abraxxa | m: my %looking-for = ( tcp-portrange => ['35450-35490:35450-35490'] ); my @e = ( { name => 'bar', udp-portrange => ['53'] }, { name => 'foo', tcp-portrange => ['35450-35490:35450-35490'] },);say @e.first({ all($_{%looking-for.keys}:exists) && all( $_{%looking-for.keys} eqv %looking-for.values)}); | 20:22 | |
evalable6 | Nil | ||
20:25
guifa joined
|
|||
tobs | abraxxa: Hash.values returns a Seq which doesn't eqv the List that is returned by a hash slice | 20:36 | |
m: my %looking-for = ( tcp-portrange => ['35450-35490:35450-35490'] ); my @e = ( { name => 'bar', udp-portrange => ['53'] }, { name => 'foo', tcp-portrange => ['35450-35490:35450-35490'] },);say @e.first({ all($_{%looking-for.keys}:exists) && all( $_{%looking-for.keys} eqv %looking-for.values.list)}); | 20:37 | ||
evalable6 | {name => foo, tcp-portrange => [35450-35490:35450-35490]} | ||
20:37
Xliff joined
|
|||
Xliff | m: multi a (&a --> Nil) { say &a.^signature.gist }; a -> 'so', 'say', 'we', 'all' { 1 }; | 20:38 | |
evalable6 | (exit code 1) No such method 'signature' for invocant of type 'Perl6::Metamodel::ClassHOW' in sub a at /tmp/KXBg7ux6eB line 1 in block <unit> at /tmp/KXBg7ux6eB line 1 |
||
tellable6 | 2020-02-24T18:58:56Z #raku-dev <MasterDuke> Xliff: does github.com/rakudo/rakudo/commit/c9...dfc7568c70 do anything for your compile times? | ||
Xliff | m: multi a (&a --> Nil) { say &a.signature.gist }; a -> 'so', 'say', 'we', 'all' { 1 }; | 20:39 | |
evalable6 | ("so", "say", "we", "all") | ||
Xliff | m: multi sub a (&a --> Nil) { say &a.signature.gist }; a -> 'so', 'say', 'we', 'all' { 1 }; | ||
evalable6 | ("so", "say", "we", "all") | ||
20:39
stoned75 joined
|
|||
Geth | doc/star-RAKU: ed6507a548 | (Stoned Elipot)++ | 2 files Be more explicity and less elliptical |
20:52 | |
cpan-raku | New module released to CPAN! Gnome::Gtk3::Glade (0.8.9) by 03MARTIMM | ||
New module released to CPAN! Gnome::Gtk3 (0.25.1) by 03MARTIMM | |||
20:56
rindolf left
|
|||
abraxxa | tobs: that's what I meant with 'the myriads of types suck' | 21:02 | |
Geth | doc/master: 4 commits pushed by (Stoned Elipot)++, stoned++ | 21:05 | |
21:07
mensvaga left
|
|||
Doc_Holliwood | m: .say for Inf..42; | 21:12 | |
evalable6 | |||
Doc_Holliwood | m: .say for Inf, Inf - 1 ... 42; | ||
evalable6 | (signal SIGHUP) Inf NaN NaN NaN NaN NaN NaN NaN… |
21:13 | |
21:13
Xliff left
|
|||
evalable6 | Doc_Holliwood, Full output: gist.github.com/03c24f8def44938dd9...6c92de5a6a | 21:14 | |
Doc_Holliwood | shouldn't that, die or something? | ||
Geth | doc: uzluisf++ created pull request #3250: Partially document the 'is built' trait |
21:20 | |
jnthn | Num stuff typically uses NaN rather than exceptions | ||
21:34
Altai-man_ joined
|
|||
guifa | NaN is a bit of a standards thing too | 21:36 | |
21:36
sena_kun left
|
|||
guifa | It’s for things that are undefined (numerically — not :D defined) or unrepresentable | 21:37 | |
Doc_Holliwood | Ok, but Inf to the left of .. | 21:55 | |
It could warn at least, I mean, that makes no sense right? having that | 21:56 | ||
lizmat | m: dd Inf.succ | ||
evalable6 | Inf | ||
lizmat | m: dd Inf.pred | ||
evalable6 | Inf | ||
lizmat | hmmm | ||
Doc_Holliwood | no that's fine | ||
inf + 1 equals inf | |||
lizmat | m: dd Inf - 1 | ||
evalable6 | Inf | ||
lizmat | so it should generate an infinite number of Inf's ? | 21:57 | |
guifa | To me Inf + 1 is intuitively Inf, but admittedly, math with infinity is a bit field specific, with some allowing degrees of inifnity (transfinite numbers and all) | ||
jnthn | Hm, I wonder where the NaN comes from then... | ||
Doc_Holliwood | it should die "Cannot count FROM infinity" or something | ||
lizmat | yeah, I was wondering that as well... | 21:58 | |
Doc_Holliwood: please file an issue :-) | |||
Doc_Holliwood | hey guifa. my infinity is bigger than yours | 21:59 | |
:-) | |||
guifa | You laugh but it’s literally a thing :-) | ||
Doc_Holliwood | i know | 22:00 | |
guifa | Although the guy who invented it got laughed at hard enough to suicide :( | ||
m: dd Inf + Inf | 22:01 | ||
evalable6 | Inf | ||
guifa | m: dd Inf + 1 | ||
evalable6 | Inf | ||
guifa | m: dd Inf - Inf | 22:02 | |
evalable6 | NaN | ||
guifa | Okay, phew, we’re following ANSI for all this stuff | ||
m: dd 1 / Inf | |||
evalable6 | 0e0 | ||
guifa cheers | |||
MasterDuke | moritz: fyi, camelia is down | 22:04 | |
22:48
leont left
22:53
wamba joined
23:08
Doc_Holliwould joined
23:10
Doc_Holliwood left
23:13
chloekek left
23:14
mowcat left
23:15
leont joined
23:19
holli joined
23:22
lucasb left
23:23
Doc_Holliwood joined,
Doc_Holliwould left
23:25
Doc_Holliwould joined
23:26
holli left
23:27
holli joined
23:28
Doc_Holliwood left
23:31
Doc_Holliwood joined,
Doc_Holliwould left
23:32
pecastro left
23:33
Doc_Holliwould joined,
holli left
23:35
sena_kun joined,
holli joined
23:36
Doc_Holliwood left,
Altai-man_ left
23:39
Doc_Holliwould left,
Doc_Holliwood joined
23:41
Doc_Holliwould joined,
holli left
23:43
holli joined
23:44
AlexDaniel left,
Doc_Holliwood left
23:47
Doc_Holliwould left,
Doc_Holliwood joined,
aborazmeh joined,
hungrydonkey joined,
aborazmeh left,
aborazmeh joined
23:49
Doc_Holliwould joined
23:50
holli left
23:52
holli joined,
Doc_Holliwood left
23:55
Doc_Holliwood joined,
Doc_Holliwould left
23:57
Doc_Holliwould joined
23:58
holli left
|