šŸ¦‹ 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:05 wamba left 00:12 sena_kun joined 00:14 Altai-man_ left 00:41 cydf joined, cy_d_fect_ left 01:03 aborazmeh joined, aborazmeh left, aborazmeh joined 01:25 aborazmeh left 01:31 Xliff left 01:37 orinthe left 01:54 molaf left 01:56 Sgeo left 01:57 Sgeo joined 02:00 orinthe joined 02:07 molaf joined 02:11 Altai-man_ joined 02:13 sena_kun left 02:31 guifa2 left 02:33 guifa2 joined 02:36 zacts left 02:48 xinming_ left 02:49 xinming_ joined
brass Hey, if I want to read in a file that's been compressed with gzip, what would be the best way to do that? 03:43
Like access.log.gz, so it's not a tar archive 03:44
03:49 evalable6 left, linkable6 left 03:51 evalable6 joined 03:52 linkable6 joined 04:03 Sgeo left 04:04 Sgeo joined 04:12 sena_kun joined 04:14 Altai-man_ left 04:25 cydf left 04:30 lucasb left 04:42 andrew_ joined 04:44 andrew_ is now known as andrew[43]
guifa2 brass: have you tried Libarchive? 04:50
I haven't used it (yet), but it appears to handle gzipped files 04:51
04:55 molaf left 04:57 andrzejku joined 05:20 bocaneri joined 05:23 cpan-raku joined, cpan-raku left, cpan-raku joined
cpan-raku New module released to CPAN! Date::Calendar::MayaAztec (0.0.2) by 03JFORGET 05:33
06:11 Altai-man_ joined 06:14 sena_kun left 06:28 patrickas joined 06:30 patrickas left 06:54 Sgeo left 07:16 leont joined 07:29 dakkar joined 07:37 kent\n left 07:38 kent\n joined 07:42 pecastro joined 07:48 andrew[43] left 07:49 xinming_ left 07:50 andrew_ joined 07:51 xinming_ joined 08:12 sena_kun joined 08:13 Altai-man_ left 08:24 wamba joined
Geth doc: paultcochrane++ created pull request #3542:
Capitalise the word "Boolean"
08:58
tadzik hah 09:00
I never thought of Boolean that way (even though I knew about George Bool
synthmeat *Boole 09:04
09:04 andrew_ left
tadzik duh, yes, thanks 09:05
09:15 patrickb joined
patrickb o/ 09:21
tellable6 2020-07-29T23:32:50Z #raku <tony-o> patrickb i'll flesh that out in the gist tomorrow ante meridiem
2020-07-29T23:33:11Z #raku <tony-o> patrickb that being the zef ecosystem tpf doc
patrickb guifa2: supernovus is difficult to reach via IRC. The best idea is probably to write an email. (I have been in contact with him via email the last weeks). 09:23
tony-o: Sounds good! 09:24
09:26 wamba left
Geth doc: b5f57e72f3 | (Paul Cochrane)++ (committed using GitHub Web editor) | 16 files
Capitalise the word "Boolean" (#3542)

  * Capitalise "Boolean" in `Language/` subdir
As required in #3517.
  * Capitalise "Boolean" in `Type/` subdir
As required in #3517.
09:31
linkable6 DOC#3542 [closed]: github.com/Raku/doc/pull/3542 Capitalise the word "Boolean"
linkable6 DOC#3517 [open]: github.com/Raku/doc/issues/3517 [docs][easy to resolve] Boolean should be capitalized
09:56 _jrjsmrtn left 10:00 __jrjsmrtn__ joined 10:11 Altai-man_ joined 10:13 sena_kun left 10:37 wamba joined 10:43 andrew joined 10:52 kensanata joined 10:54 ensamvarg3 joined 11:54 andrew left 12:12 sena_kun joined
Geth advent: antoniogamiz++ created pull request #54:
Claim RFC-5
12:14
12:14 Altai-man_ left
Geth advent: 16b3321902 | (Antonio Gamiz)++ | 20th/README.md
Claim RFC-5
12:16
advent: efdca4a4b7 | (Elizabeth Mattijsen)++ (committed using GitHub Web editor) | 20th/README.md
Merge pull request #54 from antoniogamiz/pr/claim-rfc-5

Claim RFC-5
advent: antoniogamiz++ created pull request #55:
Add article for RFC 5
12:24
12:28 andrew joined 12:30 rindolf joined 12:34 raku-bridge left 12:35 raku-bridge joined, raku-bridge left, raku-bridge joined
rypervenche brass: I use: use Libarchive::Filter :gzip; and it gives me the "gunzip" sub. 12:38
12:39 cpan-raku left
codesections m: say "No capture: " ~ ('a1a2a3a4a5' ~~ m:g/a \d/).gist; say "capture: " ~ ('a1a2a3a4a5' ~~ m:g/(a \d)/).gist 12:44
camelia No capture: (ļ½¢a1ļ½£ ļ½¢a2ļ½£ ļ½¢a3ļ½£ ļ½¢a4ļ½£ ļ½¢a5ļ½£)
capture: (ļ½¢a1ļ½£
0 => ļ½¢a1ļ½£ ļ½¢a2ļ½£
0 => ļ½¢a2ļ½£ ļ½¢a3ļ½£
0 => ļ½¢a3ļ½£ ļ½¢a4ļ½£
0 => ļ½¢a4ļ½£ ļ½¢a5ļ½£
0 => ļ½¢a5ļ½£)
codesections why do the $0 capture group ^^^ have multiple matches in it? I would have expected just one in each execution 12:45
s/do/does 12:46
moritz codesections: you actually get several matches, each with their own $0 12:52
codesections Yeah, I see that. But, unless I'm misreading the output, each of the $0 (except the last) has two matches 12:53
moritz you are misreading 12:54
I recommend you print each match on a separate line in the terminal, it will be easier to see that way
12:56 _jrjsmrtn joined, __jrjsmrtn__ left 12:59 patrickb left
codesections Aha, thanks, I see it now 13:01
m: for ('a1a2a3a4a5' ~~ m:g/(a \d)/) { print "match " ~ ++$ ~ ": " ~ say $_.gist}
camelia ļ½¢a1ļ½£
0 => ļ½¢a1ļ½£
match 1: Trueļ½¢a2ļ½£
0 => ļ½¢a2ļ½£
match 2: Trueļ½¢a3ļ½£
0 => ļ½¢a3ļ½£
match 3: Trueļ½¢a4ļ½£
0 => ļ½¢a4ļ½£
match 4: Trueļ½¢a5ļ½£
0 => ļ½¢a5ļ½£
match 5: True
codesections By default, that prints like (ļ½¢a1ļ½£ 13:02
0 => ļ½¢a1ļ½£ ļ½¢a2ļ½£
0 => ļ½¢a2ļ½£ ļ½¢a3ļ½£
0 => ļ½¢a3ļ½£ ļ½¢a4ļ½£
0 => ļ½¢a4ļ½£ ļ½¢a5ļ½£
0 => ļ½¢a5ļ½£)
maybe a LTA print representation?
moritz it's pretty good actually, if you take care that each output starts on a new line 13:04
codesections Hmm? The thing I was saying is LTA is that each output *doesn't* start on a new line. 13:05
13:05 aborazmeh joined
moritz well, but that's because you're not using say() 13:05
13:05 aborazmeh left, aborazmeh joined
moritz just do it, and you'll be fine 13:05
gist.github.com/moritz/698e186c9fb...8f0bbf7588 13:06
or even add \n before you output the match 13:07
codesections yeah, I get that. I was saying the *default* print representation for `say 'a1a2a3a4a5' ~~ m:g/(a \d)/` isn't great ā€“ because that prints without the newlines 13:08
moritz agreed 13:09
but there isn't much we could do
that wouldn't also break some other use case
codesections Interesting. Why is that? `say` there prints with `.gist` ā€“ I thought `.gist` was free to print however it liked without breaking anything? 13:10
Or would it break things in the sense of displaying poorly?
moritz well, say gets a list
we could of course say that .gist on a list joins by newline 13:11
but then something like
m: say <a b c>
camelia (a b c)
moritz would be *much* more verbose
or we could say that Match.gist adds newlines (leading or trailing), but then the *far more common* use case of simply doing "say $/" now contains unnecessary whitespace 13:12
codesections: what would be your suggestion on improving the situation?
codesections I was thinking along the lines of the second suggestion. If `Match.gist` added a trailing newline, wouldn't that be good whenever `$/` returns more than one match? And when $/ returns 1 match, it'd just cost 1 newline 13:14
moritz IME a single mach is by far more common than multiple matches 13:15
and it makes sense to optimize for the common use case
codesections Agreed 13:16
I guess I thought one extra newline wouldn't be much of a loss: the problem with newlines in `say (a, b, c)` is that it gets really verbose, but one newline doesn't really cause that problem. 13:17
But yeah, if we view the extra newline as a problem, then there's no good way to fix the uncommon case without messing up the common one
ĀÆ\_(惄)_/ĀÆ 13:18
13:20 domidumont joined
codesections (a more radical solution that I personally like but wouldn't advocate for is to change `List.gist` to print commas between the list elements. But that's too big a change to make sense as a fix here ā€“ I'd just like it :) ) 13:20
moritz too 13:25
Geth doc: 1be6eefaac | Coke++ | xt/headings.t
Treat Boolean as a proper name
advent: 6928ceda82 | (Antonio Gamiz)++ | 20th/articles/rfc5.md
Add article for RFC 5
13:30
advent: 369acb0c66 | (Elizabeth Mattijsen)++ (committed using GitHub Web editor) | 20th/articles/rfc5.md
Merge pull request #55 from antoniogamiz/pr/rfc5-article

Add article for RFC 5
codesections Actually, moritz: what would you think about printing Matches with a delimiter? e.g., changing .gist to print like: 13:33
m: say ('a1a2a3' ~~ m:g/(a \d)/).map({'{' ~.gist~ '}'})
camelia ({ļ½¢a1ļ½£
0 => ļ½¢a1ļ½£} {ļ½¢a2ļ½£
0 => ļ½¢a2ļ½£} {ļ½¢a3ļ½£
0 => ļ½¢a3ļ½£})
codesections Matches *aren't* associative, but they "feel" a bit like an associative object 13:34
which is why I used `{ā€¦}` in the example. But it could be other delimiters 13:35
moritz m: say Match ~~ Associative
camelia False
moritz m: say Match ~~ Positional
camelia False
moritz slightly surprised
13:37 aluaces left, aborazmeh left
codesections m: say Match.new.hash ~~ Associative; say Match.new.list ~~ Positional 13:39
camelia True
True
13:42 m0ltar_ is now known as m0ltar 13:43 m0ltar is now known as m0ltar_ 13:52 cpan-raku joined, cpan-raku left, cpan-raku joined 14:00 kensanata left 14:12 Altai-man_ joined 14:14 sena_kun left 14:23 dogbert11 joined 14:26 dogbert17 left 14:38 dogbert11 left 14:43 andrzejku left 14:55 molaf joined 15:12 Sgeo joined 15:19 gnufr33dom joined
moritz Hi all, please comment on news.perlfoundation.org/post/grant..._ecosystem to let us (the grant committee) know what the Raku community thinks of this grant proposal 15:21
15:21 JJMerelo joined 15:22 andrzejku joined
[Coke] There is not a lot of milestone info. 15:27
rockxloose Price each milestone at $3,000? 15:38
15:39 lichtkind joined
dakkar I'm wary of the API aspect 15:40
I love the metacpan api
but I love more than the cpan clients don't need it
I can set up my own darkpan or reduced cpan mirror or any combination of them with minimal effort 15:41
and all tools Just Workā„¢ (as long as `02-packages.txt` is there)
15:42 zacts joined
[Coke] adds his questions so far to the proposal 15:43
cpan-raku New module released to CPAN! Math::Libgsl::RunningStatistics (0.0.1) by 03FRITH 15:51
jdv79 i'm with coke - there's virtually no details 15:53
quite hand wavy, not only on the new but also on the contrast to the existing
guifa2 patrickb++ 15:54
Is there a way to remove a mixin? (guessing the answer is no butā€¦ ) 16:01
gfldex guifa2: not from the object that has received the mixin. You could create a new object that is a partial clone. 16:02
16:05 andrew left
guifa2 gfldex: hmm, creating the new object is the tricky bit. I'm being evil and wrapping new ^_^ 16:10
I guess i can check if it matches the mixin role and adjust the callsame accordingly 16:11
16:12 sena_kun joined 16:13 gnufr33dom left, john_parr_ joined 16:14 Altai-man_ left
tony-o dakkar: i'm fleshing that grant proposal out a bit more this morning. anything in particular you'd like addressed about the API ? 16:17
disregard - i see comments on the link moritz posted 16:18
dakkar yeah ā˜ŗ and here
essentially, having "just a bunch of files" makes plenty of uses simpler 16:19
of course, some of those files will be indexes
16:19 melezhik joined
dakkar but the fact that I can create a local cpan mirror with just a call to rsync is powerful 16:19
by all means, fancy APIs like metacpan are awesome 16:20
melezhik Hi rakuers! If someone is into kubernetes stuff here? I've created a Sparrowdo scenario to deploy k8s cluster from the scratch using aws infrastructure
github.com/melezhik/sparrowdo/blob...s/k8s.raku
dakkar but having to install indexers, servers, &c to serve my own distributions feels like a sub-optimal design to me
melezhik I am going to give more details in the next RakuOps issue 16:21
tony-o there won't be much of a change from that type of structure except to handle the :auth:ver etc
the api is mostly around account creation/uploading
dakkar ok, so it's a PAUSE-like API 16:24
and the repository stays CPAN-like
and `zef` doesn't need an index server, it keeps fetching the whole index file and reading that 16:25
+1 from me
16:25 squashable6 left
tony-o exactly ^ right on 16:26
dakkar tony-o++ # keeping the good bits, improving the bad bits 16:27
16:27 squashable6 joined, skids joined
[Coke] Getting details like that into the proposal would definitely help in my opinion. (I am a recently former member of the GC, full disclosure) 16:29
tony-o [Coke]: i'll be adding some and responding to your comments this morning too 16:31
is it appropriate to just respond in comments or is there a way to amend the proposal?
moritz tony-o: you write an email to Jason Crome (TPF secretary who posted the item on the blog) and supply him with an updated version 16:38
he'll probably figure something out
if you don't have his email address, I can /msg it to to you 16:39
16:40 dakkar left
codesections tony-o: You may have already read this, but here's an article that I found helpful in framing the questions around language package managers/ecosystems: medium.com/@sdboyer/so-you-want-to...e9c17d9527 16:41
16:41 Kaeipi joined, dogbert17 joined 16:44 Kaiepi left 16:45 Kaeipi left 16:47 Kaiepi joined 16:48 Kaiepi left 17:03 aluaces joined 17:04 JJMerelo left
[Coke] crome has the ability to update that posting, or create a new one, or... 17:04
17:12 andrew joined
guifa2 reading through pure C code designed for a bajillion different architectures reminds me why I like scripting languages 17:27
codesections I added a couple of questions to the grant proposal :) 17:29
17:42 domidumont left 17:43 domidumont joined, domidumont left 17:46 andrew_ joined 17:50 andrew left
jdv79 gee golly - isn't that nice that the comments get whitespace stripped on the grants pages. 18:09
now my comment looks like an incoherent rant instead of a semi-structured piece... 18:10
codesections Yeah, I noticed that. Mine turned into quite the wall of text! Sorry about that
jdv79 [Coke]: what is up with that?!
haha
18:12 Altai-man_ joined 18:13 reach_satori_ left, reach_satori_ joined 18:14 sena_kun left 18:19 AlexDaniel joined 18:20 AlexDaniel left, AlexDaniel joined
tony-o a lot of turn out on the comments, i have some notes in an addendum i'll email to jason in a bit 18:20
unless discussion here is preferrable.
18:21 andrzejku left 18:24 ensamvarg3 left
Geth doc: paultcochrane++ created pull request #3543:
Link to Bool types
18:25
18:30 bocaneri left
codesections Is there any particular logic behind why BagHash has an `add` method but SetHash doesn't? 18:33
m: my %b is BagHash; %b.add('apple'); say %b; my %s is SetHash; %s.add('pear')
camelia BagHash(apple)
No such method 'add' for invocant of type 'SetHash'
in block <unit> at <tmp> line 1
18:34 andrew_ left, MasterDuke joined 18:36 AlexDaniel left 18:37 zacts left
lizmat codesections: there was, but it escapes me now 18:38
codesections :D 18:39
lizmat yeah, because it is called .set rather than .add 18:40
to reflect the subtle difference in semantics
m: my %s is SetHash; %s.set('pear'); dd %s
camelia SetHash.new("pear")
lizmat and remove is called unset on SetHash 18:41
codesections ^^ 18:42
codesections Aha. That all makes sense, thanks!
(None of these are documented on the SetHash or BagHash pages; I'll try and send a doc PR to add this info)
lizmat codesections++ 18:45
bisectable6: old=2019.01 my %s is SetHash; %s.set('pear'); dd %s
bisectable6 lizmat, Cannot find revision ā€œ2019.01ā€ (did you mean ā€œ2020.01ā€?)
lizmat bisectable6: old=2019.02 my %s is SetHash; %s.set('pear'); dd %s 18:46
bisectable6 lizmat, Cannot find revision ā€œ2019.02ā€ (did you mean ā€œ2020.02ā€?)
lizmat bisectable6: old=2019.03 my %s is SetHash; %s.set('pear'); dd %s
bisectable6 lizmat, Bisecting by exit code (old=2019.03 new=17f7f15). Old exit code: 1
guifa2 code to convert [-]h[h[:mm[:ss[.s*]?]?]? into an integer of seconds in C = 50+ lines of code. Raku, 11. And only because I like pretty whitespace. Really just 3
bisectable6 lizmat, bisect log: gist.github.com/dc1e2ccfe93ab669b0...afb2f39e83
lizmat, (2020-02-04) github.com/rakudo/rakudo/commit/6d...0e5be420ed
lizmat codesections: available since 2020.02 18:47
codesections Thanks :)
lizmat PSA: for all of you who didn't see this here, or in the Rakudo Weekly News: 18:57
github.com/Raku/Raku-Steering-Coun...0200720.md
Raku Community to elect Raku Steering Council 18:58
you can still nominate yourself for the election!
Geth doc: paultcochrane++ created pull request #3544:
Add `update-html` make target
18:58 andrew joined
guifa2 lizmat++ 19:05
lizmat: how many will be on the steering committee? 19:08
lizmat the intent is 7, it's all in github.com/Raku/Raku-Steering-Coun...il_Code.md
guifa2 lizmat: Are commit bits required for nomination or just for voting? (strictly as written, it's the latter) 19:17
lizmat passive voting right is the right to put yourself up for nomination > 19:18
?
Since there is no formal Raku "core team" yet, any person with a commit bit in either of these repositories, has active and passive voting rights: 19:19
Rakudo
NQP
MoarVM
guifa2: does that answer your question ?
19:22 squashable6 left
guifa2 lizmat: ah okay. That makes sense, I just didn't the distinction of passive/active there. 19:23
19:23 squashable6 joined
guifa2 doesn't have any commit bits in those repositories yet oddly 19:24
lizmat do you have a commit bit in roast ? 19:26
19:48 melezhik left 19:49 Ven`` joined 19:58 zacts joined 20:08 wamba left 20:13 sena_kun joined 20:14 Altai-man_ left 20:30 zacts left 20:33 andrew left 20:42 kensanata joined 20:48 Kaiepi joined 20:57 Ven`` left 21:08 rindolf left 21:10 Ven`` joined
guifa2 lizmat: also no. I've done everything outside of core space. But there are some very capable names nominated so I'm happy to sit this cycle out 21:11
lizmat there's a PR now to postpone the election by a month: github.com/Raku/Raku-Steering-Council/pull/18 21:12
21:13 demostanis joined
demostanis Hello everyone! 21:13
codesections o/ 21:14
lizmat demostanis o/
gfldex raku: say ā€šHello demostanis!ā€˜;
evalable6 Hello demostanis!
Altreus Can I just do start { $thing } to wrap $thing in a promise? 21:15
as a return value
oh hey the examples do supply emit 21:16
I try this
gfldex You will get a Promise that way, but you will get a thread and no control over the Promise.
lizmat what is $thing? a variable, or something that runs ? 21:17
Altreus a variable yes
a new - synchronous - object!
lizmat m: dd Promise.kept(42).result # maybe that's what you're looking for ? 21:19
camelia 42
Altreus aha :) 21:20
I think I'm looking for a better way of sticking it together, but this will work for now
thank :) 21:21
demostanis I'm having some weird issue with regexes (again), $m.Str where $m ~~ Match seems to return a string of the match, INCLUDING ignored stuff, is this is intended behavior? I am going to try to write up an example... 21:23
In a grammar, I have a token value { [ <thing> | <other-thing> | <.ignored-thing> ]* } 21:24
In the grammar's actions, I am trying to get the $<value> as a string using its .Str method, however the result includes stuff matched by <.ignored-thing> 21:25
skids <.ignored-thing> just doesn't create a submatch. It doesn't exclude the text that matched ignored-thing from the outer token. 21:31
demostanis How would I make it exclude that text? 21:32
codesections If I understand what you're trying to do correctly, try something like this: 21:33
m: 'AAABBBCCC' ~~ /<(['AAA' | 'BBB')> | 'CCC']*/
camelia ( no output )
codesections m: say 'AAABBBCCC' ~~ /<(['AAA' | 'BBB')> | 'CCC']*/
camelia ļ½¢AAABBBļ½£
codesections (grr, always forget I need to add the `say` on here) 21:34
21:34 sno left
codesections With the <(ā€¦)> doing the work of limiting the Match as a whole 21:34
21:36 sno joined
demostanis Ok, seems to solve my problem, thanks 21:37
codesections Glad I could help :) 21:38
demostanis Why does the first '<(' comes before '[', while the second doesn't go after the ']', though? 21:42
lizmat demostanis <( and )> do *not* need to be balanced 21:43
codesections ha, good question. The `<(ā€¦)>` isn't really a grouping thing, despite the apparance
lizmat indeed
demostanis How is it called? 21:50
codesections "capture marker" docs.raku.org/language/regexes#Cap..._%3C(_)%3E 21:51
demostanis Thanks
21:58 kensanata left 22:02 gordonfish- joined 22:03 gordonfish- left, gordonfish- joined, gordonfish left 22:04 gordonfish- is now known as gordonfish 22:12 Altai-man_ joined 22:14 sena_kun left 22:17 demostanis left 22:19 vike left 22:26 netrino joined, netrino is now known as destroycomputers 22:27 destroycomputers left
cpan-raku New module released to CPAN! Hash2Class (0.1.1) by 03ELIZABETH 22:28
22:35 Ven`` left
codesections The docs mention that you can check whether a type object is an enum like this 22:50
m: enum E(<a b c>); say E ~~ Enumeration;
camelia True
codesections is there something similar to see if a type object is a Role? 22:51
Right now, I'm doing 22:52
m: role R {...}; say ~R.HOW ~~ /Role/;
camelia ļ½¢Roleļ½£
codesections which feels a little gross/Stringly-typed
22:53 vike joined 22:54 leont left 22:55 m_athias left
guifa2 m: enum (a => (my Int $ = 2)); say a 22:59
camelia a 23:00
guifa2 m: enum (a => (my int $ = 2)); say a
camelia ===SORRY!===
Lexical with name '$ANON_VAR__1' has wrong type. real type 8 wanted type -1
guifa2 o.O
gfldex guifa2: Raku is less dynamic that it might look. You just made that show. 23:01
guifa2 Indeed. I'm finding lots of little gotchas when working with natives. 23:02
23:05 fridim left, lichtkind left, fridim joined 23:06 m_athias joined
codesections m: say MixHash.HOW 23:17
camelia No such method 'gist' for invocant of type
'Perl6::Metamodel::ClassHOW+{<anon>}'. Did you mean 'isa'?
in block <unit> at <tmp> line 1
23:39 pecastro left
elcaro lizmat: Hash2Class is nice. I'm not sure if it's of any interest to you, but there's an intersting talk by Rich Hickey about schema (and something called 'spec') in Clojure 23:51
It's about validating that the data in a Hash looks a certain way. I was thinking of building something like that but Hash2Class pretty darn close 23:52
here's the talk, if interested: www.youtube.com/watch?v=YR5WdGrpoug
I'm not a Clojure user, but it's still interesting... and potentially would still be a useful thing to build. Do we have something in ecosystem that validates the shape of - and types in - a Hash? 23:53