🦋 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:07 holyghost left 00:23 marcusr left 00:24 marcusr joined, Doc_Holliwood left 00:26 marcusr left 00:27 marcusr joined 00:34 patrickz left 00:41 oneeggeach joined, oneeggeach left 01:09 ctilmes_ joined, ctilmes_ left 01:34 mahafyi left 01:36 ctilmes_ joined 01:45 molaf left 01:46 aborazmeh joined, aborazmeh left, aborazmeh joined 01:48 MasterDuke left 01:58 molaf joined 02:10 pilne left 02:14 dotdotdot left, dotdotdot joined 02:19 dotdotdot left 02:22 dotdotdot joined 02:26 dotdotdot left 02:39 Cabanossi left 02:41 Cabanossi joined 02:43 dotdotdot joined 02:56 ctilmes_ left 02:57 RaycatWhoDat joined 03:02 RaycatWhoDat left 03:05 ctilmes_ joined 03:22 ctilmes_ left 03:41 molaf left 03:48 mahafyi joined 03:56 hungrydonkey joined 04:01 k-man left 04:09 k-man joined 04:10 u_u left 04:11 aborazmeh left 04:32 Doc_Holliwood joined 04:55 bkool joined 04:58 hungrydonkey left 05:12 sauvin joined 05:15 brtastic joined 05:20 hungrydonkey joined, bkool left 05:22 Redfoxmoon left 05:25 SpiceMan joined
SpiceMan $ raku -> You may want to `zef install Readline` etc etc. where do I get this Seph guy from? 05:26
05:33 hungrydonkey left
AlexDaniel SpiceMan: sorry, what do you mean? 05:51
SpiceMan the repl says I can zef install Readline. I find no such zef :) 05:53
AlexDaniel SpiceMan: oh, then you need to install zef first github.com/ugexe/zef 06:08
06:08 Redfoxmoon joined
SpiceMan thanks 06:11
06:19 brtastic left
Geth ecosystem: c355c7b2b3 | (Matias Linares)++ (committed using GitHub Web editor) | META.list
Matrix::Client moved to CPAN
ecosystem: d9dae40dad | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | META.list
Merge pull request #492 from Raku/matiaslina-patch-1

Matrix::Client moved to CPAN
doc/master: 4 commits pushed by (Stoned Elipot)++, (Juan Julián Merelo Guervós)++ 06:24
doc: 6a0e048c35 | (Stoned Elipot)++ | 2 files
Process Pod code block with lang:<raku>
doc: c3d8ba3edc | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | 2 files
Merge pull request #3376 from Raku/code-block-raku

Process Pod code block with lang:<raku>
06:30 Doc_Holliwood left 06:46 brtastic joined 06:56 robertle joined 07:00 farcas1982regreg joined 07:08 andrzejku joined 07:17 konvertex joined 07:27 roguelazer left 07:28 roguelazer joined 07:33 konvertex left 07:35 MasterDuke joined 07:40 skyl4rk left, daxim left 07:51 farcas1982regreg left, farcas1982regreg joined 07:56 skyl4rk joined 07:59 daxim joined 08:06 daxim left 08:07 stoned75 joined 08:11 daxim joined 08:13 sjm_uk joined 08:16 Redfoxmoon left, Redfoxmoon joined 08:17 daxim left 08:30 daxim joined 08:34 gordonfish left 08:44 daxim left 08:48 jjmerelo joined 08:50 stoned75 left 08:51 rindolf joined 09:00 daxim joined 09:04 jjmerelo left 09:14 pecastro joined 09:42 jjmerelo joined 09:51 sjm_uk left 09:52 mayuresh joined, mayuresh left 09:55 stoned75 joined 09:58 Sgeo_ joined 10:01 konvertex joined, Sgeo left 10:05 Altai-man_ joined 10:08 andrzejku left 10:15 andrzejku joined 10:16 sena_kun joined 10:18 Altai-man_ left 10:27 sjm_uk joined 10:45 molaf joined 10:47 MasterDuke left 11:04 ctilmes_ joined 11:06 andrzejku left 11:16 farcas1982regreg left 11:17 konvertex left 11:20 farcas1982regreg joined 11:22 konvertex joined 11:26 andrzejku joined 11:37 MasterDuke joined 11:39 stoned75 left 11:40 ctilmes_ left 11:45 ctilmes_ joined 11:46 Noisytoot joined
robertle has anyone got experience with cro and exception handling? I would like to just throw exceptions within my app, and then transform them to responses in the router. works, but I can only put the exception handler into the "get -> 'path' {" sort of constructs, not the block around it. 11:49
which means I need to duplicate the exception handling, I would rather only have one... 11:50
sena_kun robertle, I imagine you can 1)throw an exception, it'll be converted into 500 response and then have a middleware to convert 500 responses into some pages; 2)to keep the information, dynamic var can be used, though I am not really sure how concurrency safe, possibly some sort of exception storage monitor would be more safe. 11:54
robertle, can you provide a pseucodoe example, please? 11:56
robertle sena_kun: yeah, but I would like it to be a bit more fine-grained, like 4xx/5xx depending on exception type etc. I'll keep playing and report back, just wondering if anyone has done this before and I am just stupid...
11:56 andrzejku left
robertle so e.g. github.com/robertlemmen/svc-shelve...akumod#L80 11:57
this kinda works and can be extended to more exception types etc, but I need it in each route, and would like to have it one level up
11:58 ctilmes_ left 11:59 andrzejku joined
sena_kun robertle, I think the easy way is to set the response's body to some constant text for this type of exception, then in middleware you can inspect it and rewrite as you wish, having the whole logic in a single place instead of duplicating it in every handler. 12:00
robertle hm, but where would you put the CATCH? I was trying to avoid duplicating that part... 12:09
anyway, just needs more fiddling... 12:10
12:15 girafe2 joined, Altai-man_ joined 12:18 sena_kun left, girafe left 12:21 Doc_Holliwood joined 12:22 bloatable6 left, bloatable6 joined
konvertex Damn, chaining iterators is nice and all, but raku's meta operators are a whole different level. Nice and concise, slick! 12:29
Alright, actual newbie question: I want to extract the same chars of two string, removing non-matching. Is there a fancier way than this?
("abc".comb Z "axc".comb).grep({.head eq .tail}).map(*.head).join
12:33 mowcat joined
MasterDuke konvertex: do they have to be in order? 12:34
konvertex Yes.
12:35 andrzejku left
AlexDaniel konvertex: this is not really neater but: 12:38
m: say (‘abc’.comb Zxx ("abc".comb Zeq "axc".comb)).join
camelia ac
konvertex xx in conjunction with truthy vals, interesting. I like it. 12:42
AlexDaniel m: say zip(‘abc’.comb, ‘axc’.comb, with => { $^a eq $^b ?? $a !! Empty }).join 12:52
camelia ac
AlexDaniel konvertex: or maybe like this
tadzik heh, these “proper quotes” always make me uneasy when I see them in code :P 12:56
AlexDaniel tadzik: why
konvertex AlexDaniel: That will do, thanks!
tadzik AlexDaniel: just unusual, they always feel like "oh no, someone copypasted it from something with good formatting and now the parser will obviously reject them" ;) 12:57
and then I realize it's Raku so no need to worry
AlexDaniel ah :) 12:58
13:02 caterfxo left
jnthn m: say ("abc".comb Z[&({ $^a if $^a eq $^b })] "axc".comb).join 13:04
camelia ac
13:10 jjmerelo left
[Coke] m: 0_0; 13:22
camelia WARNINGS for <tmp>:
Useless use of constant integer 0_0 in sink context (line 1)
timotimo m: say ... 0_0; 13:24
camelia Potential difficulties:
Apparent sequence operator parsed as stubbed function argument; please supply any missing argument to the function or the sequence (or parenthesize the ... call, or use 'fail' instead of ...)
at <tmp>:1
timotimo m: say / <(^.^)> / 13:25
camelia / <(^.^)> /
[Coke] :) 13:26
AlexDaniel m: say 6^…^9
camelia (7 8)
13:31 stoned75 joined 13:34 ctilmes_ joined, andrzejku joined 13:36 sjm_uk left 13:37 gordonfish joined
timotimo nice 13:44
13:44 sivoais left, sivoais joined
mahafyi raku scripts reacting to SIEM events via tailing syslog files (manually parsing logs, but learning grammars now heh, will recode next week). The whole thing is working well and *better* than fail2ban. Though slurping data inside the react block, memory utilization is fine, and scripts have been running without crash stably for a few days now. And 13:44
banned plenty bad guys, \o/
13:45 abraxxa left
moritz nice! 13:45
konvertex Damn, Z[&({ ... })] is interesting as well. Raku's a complex beast indeed. 13:47
mahafyi i didn't use any telemetry (will learn also), no HUP kill inside a crontab entry either. Simply ran inside a terminal emulator (screen) , monitoring with htop only for now. 13:49
konvertex My homies over at #ada would lynch me for that.
moritz I prefer to call it "versatile" :D 13:50
AlexDaniel konvertex: well, it's not the most readable alternative
13:55 Redfoxmoon_ joined, Redfoxmoon left 13:56 Redfoxmoon_ left, Redfoxmoon_ joined, Redfoxmoon_ is now known as Redfoxmoon, molaf left 14:00 Doc_Holliwood left 14:01 Doc_Holliwood joined 14:05 mowcat left 14:17 sena_kun joined 14:18 Altai-man_ left 14:44 Doc_Holliwood left 14:45 brtastic left 14:47 melezhik joined 14:49 daxim left 14:53 mayuresh joined
mayuresh i believe perl(5) had it's own extension to regex called 'pcre'. 14:55
does that same hold true for raku too?
15:01 mayuresh left
tadzik pcre is not perl5's regex extension 15:02
it's a separate project that calls itself "perl compatible", but mostly it's just compatible with pcre ;)
I don't think there's anything like pcre for Raku's regexes though
15:04 mayuresh joined 15:05 mayuresh left 15:12 vmv joined 15:13 mayuresh joined 15:17 daxim joined
mayuresh if anyone reads this, do take a look at "causal profiling". 15:18
their c++ based implementation; github.com/plasma-umass/coz/ 15:19
and they also have a python implementation called "scalene".
hope even "raku" gets one soon. :)
15:19 jjmerelo joined
mayuresh hi merelo. :) 15:19
watched your video on youtube today. :)
love the way you talk, especially your accent. :) 15:20
jjmerelo: google for "scalene profiler python".
jjmerelo Thanks! 15:21
mayuresh or simply; github.com/emeryberger/scalene
jjmerelo But in relation to which video? 15:22
mayuresh umnn, the one in which you introduced your book on raku.
also talked about how to taught your girls programming.
15:23 brtastic joined 15:25 __jrjsmrtn__ joined, vmv left, _jrjsmrtn left 15:28 guifa2 left 15:35 mayuresh left 15:52 stoned75 left 15:54 stoned75 joined 15:57 chloekek joined 16:00 Doc_Holliwood joined 16:02 Noisytoot left
lizmat weekly: p6steve.wordpress.com/2020/05/07/r...g-or-what/ 16:04
notable6 lizmat, Noted! (weekly)
16:11 brtastic left
AlexDaniel weekly: sparrowdo.wordpress.com/2020/05/08...eue-short/ 16:14
notable6 AlexDaniel, Noted! (weekly)
16:16 Altai-man_ joined
AlexDaniel 6c: say $*PERL 16:16
committable6 AlexDaniel, gist.github.com/5072e66403c8920dea...ff4e839395
16:19 sena_kun left 16:26 Noisytoot joined 16:30 andrzejku left 16:33 ctilmes_ left 16:37 Doc_Holliwood left 16:47 finsternis joined 16:51 Doc_Holliwood joined
El_Che the capitals :) 16:54
17:17 stoned75 left 17:29 andrzejku joined 17:35 Doc_Holliwood left 17:40 Doc_Holliwood joined 17:49 molaf joined 17:50 Noisytoot left 17:52 andrzejku left 17:58 patrickb joined 18:08 xps joined
xps The Buf returned from .slurp'ing a IO handle with :bin returns Buf[uint8] - I want Buf[uint64], how can I influence that? 18:09
18:11 andrzejku joined 18:17 sena_kun joined 18:18 Altai-man_ left 18:26 sauvin left 18:27 vmv joined 18:31 Noisytoot joined 18:37 vmv left 18:44 andrzejku left 19:14 jjmerelo left, mowcat joined 19:24 hacktor joined
ctilmes xps: You could always read uint64s from a Buf[uint8] with read-uint64() 19:29
xps ctilmes: Alright, perfect, thanks! 19:30
jdv79 how come a MAIN arg declared as Int allows a Bool?
xps Also, is it correct that the filehandle lock method locks the filehandle itself in the program and it does not relate to file locking in say Linux?
MasterDuke m: say Bool.^mro 19:36
camelia ((Bool) (Int) (Cool) (Any) (Mu))
jdv79 how could one make a usage arg that only too integer values 0-3 let's say 19:40
and not Bools
hmm, seems to be inconsistency between different Int args... 19:42
oh, not really 19:43
xps sub foo (Int $i where * > 0 where * < 3)
MasterDuke not quite. you can't use * to refer to the same thing twice. sub foo(Int $i where 0 <= $i <= 3) {} 19:45
though by doing it like ^^^ it's only referred to once, so you could use * 19:46
jdv79 except True and False are effectively 1 and 0 so cmps like that don't exclude them 19:47
xps MasterDuke: Didn't know yet that you can't chain * refinements, good to know! Thanks!
ctilmes: Must be some silly mistake or something but I can't call that method on my Buf[uint8]. No such method 'read-uint64' for invocant of type 'Buf[uint8]' 19:48
19:48 Noisytoot left, brtastic joined
jdv79 this seems to do accomplish what i want - Int :v(:$verbose) where { .WHAT !~~ Bool && 0 <= $_ <= 3 } 19:51
MasterDuke m: my $a = Buf[uint8].new(^16); say $a.^name; say $a.read-uint64(0)
camelia Buf[uint8]
jdv79 but looks odd to me cause why am i declaring something as Int but then having to furth exclude Bools
xps Alright, so now I have to question my package distribution of rakudo-start I guess - bummer, thanks MasterDuke for the help 19:52
MasterDuke yeah, those are kind of new
xps perl6 -v claims 6.c 19:53
MasterDuke that the language version, you want to know the compiler version
xps This is nqp version 2017.01 built on MoarVM version 2017.01
MasterDuke ha. yeah, that's a bit out of date
xps I'm on nixos, the version is probaly not maintained that well 19:54
Alright, now I know why - thanks for the help!
MasterDuke there's someone else here packaging stuff for nix
chloekek maybe
19:55 chloekek left
xps I will google it a bit, did come across some threads talking about the packaging on nix not being actively maintained 19:55
19:55 rindolf left
MasterDuke i'd try looking in the logs for this channel. colabti.org 19:55
jdv79 hmm, if i cast from Str its less messy. 19:56
19:56 rjbs left 19:57 plicease left 20:01 blum joined 20:02 blum left
xps It seems like it's been updated in the unstable channel for just a couple of months ago MasterDuke 20:03
20:03 vike left
xps An update jump from 2017 to 2020 20:03
Quite a jump
20:04 stoned75 joined
robertle in case anyone was interested in the exception->response problem earlier, this is what I do now: github.com/robertlemmen/svc-shelve...akumod#L43 20:09
20:09 rjbs joined
robertle it's just basic higher-order wrapping of the route block, to avoid having to repeat the catch logic in every block. :) 20:10
comments very welcome of course, I still have that inkling feeling that there must be a better way... 20:11
20:15 plicease joined 20:16 Altai-man_ joined 20:18 sena_kun left 20:21 patrickb left, xps left, aborazmeh joined, aborazmeh left, aborazmeh joined
MasterDuke xps: should be quite a bit faster and more stable 20:25
tellable6 MasterDuke, I'll pass your message to xps
AlexDaniel but it depends, Rakudo from 2017 is also pretty good 20:27
maybe not as fast and not as stable, but still very usable and useful
20:29 xps joined
MasterDuke sure. but if an update is available... 20:32
20:32 vike joined 20:33 brtastic left 20:38 cognomin_ joined 20:40 vike left 20:41 cognominal left 20:44 stoned75 left 20:45 rjbs left, plicease left 20:46 stoned75 joined 20:50 farcas1982regreg left
xps What's the supposed way of outputting the compiled bytecode? -o doesn't seem to do that and --target=moar says no dump method. 20:50
tellable6 2020-05-08T20:25:56Z #raku <MasterDuke> xps: should be quite a bit faster and more stable
MasterDuke --target=mbc, and -o is broken. you have to use --output=<foo> 20:54
20:55 vike joined
Geth doc/test-for-3350: f78e05ac1f | (Stoned Elipot)++ | xt/routine-definitions.t
Add test for routine header vs routune definitions

ref #3350
doc: stoned++ created pull request #3380:
Add test for routine header vs routine definitions
21:02 plicease joined 21:04 rjbs joined 21:11 pilne joined 21:33 aborazmeh left 21:35 caterfxo joined
Geth doc/regex-lookbehind-typo: ede6d5fa17 | (Stoned Elipot)++ | doc/Language/regexes.pod6
formatting code typo
doc: stoned++ created pull request #3381:
formatting code typo
lizmat weekly: raku-musings.com/linked-sum.html 22:03
notable6 lizmat, Noted! (weekly)
Geth doc: ede6d5fa17 | (Stoned Elipot)++ | doc/Language/regexes.pod6
formatting code typo
doc: 6394622b6d | (Will Coleda)++ (committed using GitHub Web editor) | doc/Language/regexes.pod6
Merge pull request #3381 from Raku/regex-lookbehind-typo

formatting code typo
linkable6 Link: docs.raku.org/language/regexes
22:11 stoned75 left, xps left 22:17 sena_kun joined 22:18 Altai-man_ left 22:23 cognominal joined 22:26 cognomin_ left 22:48 ctilmes left 23:09 pecastro left 23:38 konvertex left