🦋 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:11 risorg23 left 00:30 stoned75 joined, patrickb left 00:47 DavidRomero55 joined
DavidRomero55 Hi everyone. 00:48
vrurg DavidRomero55: \o 00:49
DavidRomero55 I'm looking for a way to reload a raku module at runtime aech time I made a change on it.
sjn o/
vrurg DavidRomero55: possibly require could do it, but I'm not sure about it. 00:50
Restarting a process would be much more reliable alternative.
DavidRomero55 I try this "try require ::('Foo');"
sjn hasn't heard about any Raku/Perl6 modules that do this 00:51
DavidRomero55 it load the module at run time but not reload on changes.
00:52 delimited joined 00:53 delimited is now known as Guest49635
vrurg DavidRomero55: then it's not possible. 00:53
DavidRomero55 What i try to do is not require to restart the process on development mode.
sjn DavidRomero55: you may want to wait until tomorrow (EU time) and ask again when some of the people who know the internals are here
I imagine there can be a way to hack it, but I'd be worried about memory leaks
vrurg DavidRomero55: there is a problem. When a module is loaded its kinda linked against the existing structures. It'd be the same as reloading a dynamic library. 00:54
sjn another option is to see how "require" and "use" (and perhaps "do"?) is implemented. Most of it is in Perl 6, minus some basic stuff in NQP 00:55
vrurg Funny coincidence: I'm working on a module loading issue right now. ;) 00:56
sjn: I could even point out into CompUnit::RepositoryRegistry, but that's of little help because it eventually refers to MoarVM loadbytecodefh op. 00:58
01:00 Guest49635 left, delimited_ joined 01:03 wamba joined
DavidRomero55 sjn: Where is the place to find "require" and "use" implementations? 01:08
01:09 wamba left
vrurg DavidRomero55: see my last comment. CompUnit::RepositoryRegistry in src/core.c/CompUnit/ 01:09
DavidRomero55 vrurg: Thanks I will check it. 01:10
vrurg Though it's waste of time. Depending on how a module is written, it may leave behind some garbage causing incorrect behaviour after reload. The only clean way was and ever will be restarting the process. 01:13
01:22 lizmat joined 01:24 wamba joined 01:35 DavidRomero55 left 01:56 wamba left 02:14 stoned75 left 02:16 Doc_Holliwood joined
Doc_Holliwood m: ('A', 'B').lc.say 02:17
camelia a b
02:35 RubioTerra joined
RubioTerra I'm getting this error when trying to run rakudo on Windows 10: "akudoshareperl6\runtime\perl6.moarvm': no such file or directory". I tried to compile it directly, and tried rakudobrew. Same result. 02:37
Did someone get this error?
Demos[m] what's the equivalent to a stub but for an attribute.... 02:39
I want to require that the invocant for some role methods has certain attributes (or is some role) 02:40
02:44 leonardus joined 03:00 wildtrees left
RubioTerra Let me correct myself: rakudobrew worked. That will serve me for now. Thanks. 03:00
03:09 wtwt5237 joined
wtwt5237 awesome raku folks! may i know if anyone has any solution to raku/perl6's slow regex match problem? 03:10
i can give some specific examples if needed to, but my experience is that all regex matches are slow, so it's a general problem on my hand 03:11
AlexDaniel wtwt5237: that's probably the case, I think regexes is one of the slowest parts of rakudo right now 03:20
wtwt5237 i see. so no workaround so far. they have plans to address this problem soon? 03:22
AlexDaniel wtwt5237: if you need something simple, then perhaps using basic methods like .starts-with and similar can be a decent workaround
wtwt5237: as for plans, rakudo performance is constantly improving, but most of the work is about making rakudo faster in general, currently nobody is working specifically on making regexes faster 03:23
wtwt5237: how fast do you need them to be? What's your data? 03:24
wtwt5237 thanks! please see my github: github.com/wtwt5237/perl6-for-bioinformatics
the same task, perl5 takes 0.195s and perl6 takes 6s. about 4s are spent on several regex matches 03:25
AlexDaniel ohhh bioinformatics
now I see why you're asking this :)
wtwt5237 i think if raku is about as fast as perl5, that will be good
AlexDaniel wtwt5237: ok, so as I understand you have some specific benchmarks? 03:26
wtwt5237: that's actually a good starting point
wtwt5237: can you file a bug report here with your findings? github.com/rakudo/rakudo/issues
wtwt5237: e.g. “this simple code running with that data file takes X seconds with raku and a similar script takes Y seconds in perl” 03:27
wtwt5237: I think we'll be able to get people to look at it and see what can be done
wtwt5237 yeah, i use perl5 and raku to do the same thing - parse a small SAM format file. The file and codes are all in my github 03:28
sure, will do. thanks so much!
AlexDaniel wtwt5237: IIRC there are some improvements from jnthn++ that are not merged yet, I'm interested to see how these will affect your benchmark if at all 03:29
uzl[m] .seen timotimo
tellable6 uzl[m], I saw timotimo 2019-11-05T22:06:16Z in #raku: <timotimo> and it's extremely annoying
wtwt5237 i will keep benchmark all releases of raku. if i find something interesting, i will come back to post here and discuss 03:31
AlexDaniel wtwt5237: a ticket can give us something actionable so that we can do some real improvements, so please do submit it :) 03:33
uzl[m] .tell timotimo Re: Comma, You're right. By leaving and coming back, I mean switching to a different workspace and coming back. On Vim, I can leave the workspace with Vim opened and switch back into it and immediately start typing. With Comma, I need to click in the editor since the cursor isn't active anymore.
tellable6 uzl[m], I'll pass your message to timotimo
03:33 squashable6 left 03:35 dmaestro joined, squashable6 joined
uzl[m] .tell [Coke] Is Alt + Tab a Comma's keymap? IIRC that looks like a Windows shortcut right?! I'm using Manjaro Linux + i3wm so that might have something to do with it. See colabti.org/irclogger/irclogger_lo...-11-06#l73 03:36
tellable6 uzl[m], I'll pass your message to [Coke]
03:43 RubioTerra left 03:49 wtwt5237 left
AlexDaniel c: HEAD gist.github.com/AlexDaniel/e111854...7e7c55c13a 03:56
committable6 AlexDaniel, Using file “benchmark1.p6” as a main file, other files are placed in “./sandbox”
AlexDaniel, gist.github.com/60dcad71e9e798e035...5d4d989012
AlexDaniel c: HEAD gist.github.com/AlexDaniel/e111854...7e7c55c13a 03:57
committable6 AlexDaniel, Using file “benchmark1.p6” as a main file, other files are placed in “./sandbox”
AlexDaniel, ¦HEAD(1d84c64): «5.8780151␤»
AlexDaniel c: 6c gist.github.com/AlexDaniel/e111854...7e7c55c13a
committable6 AlexDaniel, Using file “benchmark1.p6” as a main file, other files are placed in “./sandbox”
AlexDaniel, gist.github.com/9d077cedb95ef1bef3...127a6c80ea 04:03
AlexDaniel committable6: timeout=15 04:06
committable6 AlexDaniel, timeout is now set to “15” (default value is “10”)
AlexDaniel committable6: timeout=20
committable6 AlexDaniel, timeout is now set to “20” (default value is “10”)
AlexDaniel c: 6c gist.github.com/AlexDaniel/e111854...7e7c55c13a
committable6 AlexDaniel, Using file “benchmark1.p6” as a main file, other files are placed in “./sandbox”
AlexDaniel, gist.github.com/a2f38de9555e66604a...4c74145584 04:12
AlexDaniel yeah, the vars feature doesn't always work
04:55 AlexDaniel left 04:58 jaldhar joined 04:59 jaldhar left 05:00 jaldhar joined 05:01 jaldhar left 05:02 jaldhar joined 05:03 jaldhar left 05:04 jaldhar joined 05:05 jaldhar left 05:06 jaldhar joined 05:07 jaldhar left 05:08 jaldhar joined, AlexDaniel joined, AlexDaniel left, AlexDaniel joined 05:09 jaldhar left 05:10 jaldhar joined 05:11 jaldhar left 05:12 jaldhar joined 05:13 jaldhar left 05:14 jaldhar joined 05:15 jaldhar left 05:16 jaldhar joined 05:17 jaldhar left 05:18 jaldhar joined 05:19 jaldhar left 05:20 jaldhar joined 05:25 jaldhar left 05:26 jaldhar joined 05:27 jaldhar left, jaldhar joined 05:29 jaldhar left, jaldhar joined 05:31 jaldhar left 05:32 jaldhar joined 05:33 jaldhar left 05:34 jaldhar joined 05:35 jaldhar left 05:36 jaldhar joined 05:37 jaldhar left 05:38 jaldhar joined 05:39 jaldhar left 05:40 jaldhar joined 05:41 jaldhar left 05:42 jaldhar joined 05:43 jaldhar left, jaldhar joined 05:45 jaldhar left, jaldhar joined 05:46 wamba joined 05:47 jaldhar left 05:48 jaldhar joined 05:49 jaldhar left 05:50 jaldhar joined 06:05 robertle left 06:15 sena_kun joined 06:17 cpan-raku left, cpan-raku joined, cpan-raku left, cpan-raku joined, jaldhar left 06:18 jaldhar joined 06:26 leonardus left 06:27 leonardus joined 06:31 jaldhar left, jaldhar joined 06:33 jaldhar left, jaldhar joined 06:35 jaldhar left 06:36 jaldhar joined 06:37 jaldhar left 06:38 jaldhar joined 06:41 jaldhar left, jaldhar joined 06:43 jaldhar left 06:44 jaldhar joined 06:46 wamba left 06:49 jaldhar left 06:50 jaldhar joined 06:51 jaldhar left, pdcawley joined 06:52 jaldhar joined
pdcawley Trying to scratch an itch from reading one of Damian's perl weekly challenge pieces: Is there a built in to get all the tails of a sequence, so 2,3,5,7,11, ... becomes (2,3,5,...), (3,5,7,...), (5,7,11,...), ... ? 06:55
Also, hello Raku...
moritz pdcawley: hi there
I'd do it like this: (0..*).map({ @yoursequence[$_..*]}) 06:56
m: my \fib = 2, 3, 5, *+* ... *>42; say (0..*).map({ fib[$_..*]}) 06:57
camelia (...)
moritz m: my \fib = 2, 3, 5, *+* ... *>42; say eager (0..*).map({ fib[$_..*]})
meh
06:57 jaldhar left
moritz m: my \fib = 2, 3, 5, *+* ... *>42; say eager (0..5).map({ fib[$_..*]}) 06:57
camelia (timeout)
((2 3 5 8 13 21 34 55) (3 5 8 13 21 34 55) (5 8 13 21 34 55) (8 13 21 34 55) (13 21 34 55) (21 34 55))
pdcawley I was thinking: @seq, *.tail(1) ... * or similar?
moritz can't eager an infinite sequence, of course
06:58 jaldhar joined, sena_kun left
pdcawley does the infinite sequence thing work on objects that aren't numbers? 06:58
moritz m: my \fib = 2, 3, *+* ... *>42; say fib, *.tail ... []
camelia Cannot get sequence endpoint from an empty list (use * or :!elems instead?)
in block <unit> at <tmp> line 1
pdcawley Sorry, .skip(1)
moritz m: my \fib = 2, 3, *+* ... *>42; say fib, *.skip(1) ... :!elems
camelia ((2 3 5 8 13 21 34 55) (3 5 8 13 21 34 55) (5 8 13 21 34 55) (8 13 21 34 55) (13 21 34 55) (21 34 55) (34 55) (55) ())
pdcawley Bingo. 06:59
moritz pdcawley: that works as well
pdcawley Damn, perl 6, you're so pretty.
moritz another approach similar to my first:
06:59 jaldhar left
moritz m: my \fib = 2, 3, *+* ... *>42; say fib.keys.map({fib.skip($_)}) 06:59
camelia The iterator of this Seq is already in use/consumed by another Seq
(you might solve this by adding .cache on usages of the Seq, or
by assigning the Seq into an array)
in block <unit> at <tmp> line 1
07:00 jaldhar joined
moritz m: my \fib = 2, 3, *+* ... *>42; say fib.keys.map({fib[$_..*]}) 07:00
camelia The iterator of this Seq is already in use/consumed by another Seq
(you might solve this by adding .cache on usages of the Seq, or
by assigning the Seq into an array)
in block <unit> at <tmp> line 1
pdcawley Explicitly invoking keys gives the mathematician in me the shudders :)
moritz m: my @fib = 2, 3, *+* ... *>42; say @fib.keys.map({@fib[$_..*]})
camelia ((2 3 5 8 13 21 34 55) (3 5 8 13 21 34 55) (5 8 13 21 34 55) (8 13 21 34 55) (13 21 34 55) (21 34 55) (34 55) (55))
moritz pdcawley: :-)
pdcawley Seems so... inelegant. 07:01
moritz #raku here to scare your inner mathematician :d
07:01 jaldhar left
moritz I find it very readable, because it makes it clear I'm iterating those numbers for the purpose of indexing an array 07:01
and not, say, to do arithmetics with them 07:02
07:02 jaldhar joined
pdcawley Since I only really want the first 3 elements of each of those tails, i started with `primes Z primes.skip(1) Z primes.skip(2) but that just felt so... icky. 07:02
07:03 jaldhar left 07:04 jaldhar joined 07:05 jaldhar left 07:06 jaldhar joined, squashable6 left 07:07 jaldhar left 07:08 jaldhar joined, squashable6 joined 07:09 jaldhar left, jaldhar joined 07:10 Mrbuck joined, Mrbuck left 07:11 jaldhar left, jaldhar joined 07:13 jaldhar left, jaldhar joined 07:15 jaldhar left 07:16 jaldhar joined 07:17 jaldhar left 07:18 jaldhar joined 07:19 jaldhar left, jaldhar joined
pdcawley m: my @list = ^5; say @list, *.skip(1) ... * 07:20
camelia (...)
pdcawley m: my @list = ^5; say (@list, *.skip(1) ... *).head(10) 07:21
07:21 wamba joined
camelia ([0 1 2 3 4] (1 2 3 4) (2 3 4) (3 4) (4) () () () () ()) 07:21
pdcawley I was rather hoping that that would give me a finite list, not something with a bunch of empty lists tacked on the end...
07:21 jaldhar left 07:22 jaldhar joined
moritz pdcawley: it's all a question of your end condition 07:22
* means "go on, go on"
pdcawley Ah. 07:23
I thought that might have something to do with it.
moritz :!empty is what you want/need
pdcawley Damn this IRC client... autoscroll, damn you!
pdcawley may have missed something there... just nuked my backlog. 07:24
moritz m: my @list = ^5; say (@list, *.skip(1) ... :!empty) 07:26
camelia No such method 'empty' for invocant of type 'Array'. Did you mean 'emit'?
Did you try to smartmatch against a Pair specifically? If so, then the
key of the Pair should be a valid method name, not 'empty'.
in block <unit> at <tmp> line 1
moritz m: my @list = ^5; say (@list, *.skip(1) ... :!elems)
camelia ([0 1 2 3 4] (1 2 3 4) (2 3 4) (3 4) (4) ())
07:27 jaldhar left 07:28 jaldhar joined
pdcawley m: my @list = ^Inf; say (@list, *.skip(1) ... :!elems) 07:28
camelia ([...])
pdcawley Cool! Thanks.
Where's the docs on the lazy list builder? ... in ops? 07:29
07:29 jaldhar left 07:30 jaldhar joined
pdcawley m: my @list = ^5; say @list, *.skip(1) ...^ * 07:31
camelia (...)
pdcawley m: my @list = ^5; say @list, *.skip(1) ...^ :!elems
camelia ([0 1 2 3 4] (1 2 3 4) (2 3 4) (3 4) (4))
pdcawley Yay! Everything thought of :: 07:32
07:33 jaldhar left, dmaestro left 07:34 jaldhar joined 07:35 jaldhar left 07:36 jaldhar joined 07:37 jaldhar left 07:38 jaldhar joined
pdcawley Dang! 07:38
m: elems ^Inf 07:39
camelia Cannot .elems a lazy list
in block <unit> at <tmp> line 1
pdcawley So... how do I check for the emptiness of an Interable which might be lazy? 07:40
Iterable
07:45 jaldhar left 07:46 jaldhar joined 07:47 jaldhar left 07:48 jaldhar joined 07:49 jaldhar left
sarna m: (^Inf).iterator.elems 07:50
camelia ( no output )
07:50 jaldhar joined
sarna m: say (^Inf).iterator.elems 07:50
camelia 1
sarna pdcawley: this seems to have one element, 0
07:51 jaldhar left, jaldhar joined 07:52 wamba left
pdcawley m: say [].iterator.elems 07:52
camelia 1
sarna darn
pdcawley m: say [1,2,3].iterator.elems
camelia 1
pdcawley How's that an emptiness check, or am I missing something? 07:53
07:53 jaldhar left
sarna no, I got confused, sorry :D 07:53
07:53 jaldhar joined 07:54 davidholoshka joined
davidholoshka is there an irc for cro questions ? 07:55
pdcawley Hmm
07:55 jaldhar left
pdcawley m: say [] ?? 'truthy' :: 'falsy' 07:55
camelia 5===SORRY!5=== Error while compiling <tmp>
Please use !! rather than ::
at <tmp>:1
------> 3say [] ?? 'truthy' :7⏏5: 'falsy'
expecting any of:
colon pair
07:56 jaldhar joined
pdcawley m: say [] ?? 'truthy' !! 'falsy' 07:56
camelia falsy
pdcawley m: my @list = ^5; say (@list, *.skip(1) ... :!*)
camelia 5===SORRY!5=== Error while compiling <tmp>
Malformed False pair; expected identifier
at <tmp>:1
------> 3@list = ^5; say (@list, *.skip(1) ... :!7⏏5*)
pdcawley m: my @list = ^5; say (@list, *.skip(1) ... !*) 07:57
camelia ([0 1 2 3 4] (1 2 3 4) (2 3 4) (3 4) (4) ())
pdcawley Bingo!
07:57 jaldhar left 07:58 jaldhar joined
tadzik :) 07:58
sarna what the heck is this code
07:58 wamba joined
AlexDaniel davidholoshka: yes, you can try #cro 08:00
davidholoshka: or you can ask here
pdcawley blinks at an error message... "Method 'skip' not found for invocant of class 'Seq'" 08:01
But... butl...
m: sub tails(Iterable \s) { s, *.skip(1) ... !* }; say tails ^Inf 08:03
camelia (0..^Inf (...) (...) (...) (...) (...) (...) (...) (...) (...) (...) (...) (...) (...) (...) (...) (...) (...) (...) (...) (...) (...) (...) (...) (...) (...) (...) (...) (...) (...) (...) (...) (...) (...) (...) (...) (...) (...) (...) (...) (...) (.…
pdcawley Hmm... why isn't that working for me locally?
Time to get up... I shall have to play later. Thanks for the help. 08:05
08:05 pdcawley left, jaldhar left 08:06 jaldhar joined
Geth whateverable: 8c2c846df9 | (Aleks-Daniel Jakimenko-Aleksejev)++ | lib/Whateverable.pm6
Join #cro too

Evalable and Tellable are mostly harmless, so why not.
08:06
08:07 jaldhar left 08:08 jaldhar joined 08:09 jaldhar left 08:10 tellable6 joined, jaldhar joined, evalable6 joined 08:11 jaldhar left 08:12 jaldhar joined 08:13 jaldhar left, jaldhar joined 08:17 jaldhar left, jaldhar joined 08:19 jaldhar left 08:20 jaldhar joined 08:21 pdcawley joined, pdcawley left, jaldhar left 08:22 jaldhar joined
xinming m: (infix:<+>(3, 5)).perl.say; (infix:{"+"}(3, 5)).perl.say; <---- Anyone here tells me, WHy former works, But not the latter? 08:22
camelia ===SORRY!===
Cannot find method 'has_compile_time_value' on object of type NQPMu
08:23 jaldhar left 08:24 jaldhar joined 08:25 sena_kun joined
moritz xinming: looks like a bug in the optimizer to me 08:25
08:25 jaldhar left 08:26 jaldhar joined
xinming moritz: Ok, Thanks, that'll makes sense. As I thought that infix:{"+"} and infix:<+> are handled differently. 08:26
08:27 jaldhar left, kensanata joined
moritz (tbh optimizer is just a guess, but "bug" is a pretty firm diagnosis :D ) 08:27
08:28 jaldhar joined 08:29 jaldhar left 08:30 jaldhar joined 08:31 jaldhar left, jaldhar joined 08:33 jaldhar left 08:34 jaldhar joined
tobs xinming: there is a related ticket, but about round parentheses R#2948 08:34
I don't know if this is the responsible piece of code, but if it is, it seems like a limitation built into the compiler: github.com/rakudo/rakudo/blob/mast....nqp#L4304 08:35
tobs off to work
08:35 jaldhar left 08:36 jaldhar joined 08:37 jaldhar left 08:38 jaldhar joined, daxim left 08:39 jaldhar left 08:40 jaldhar joined 08:42 pdcawley joined 08:44 daxim joined 08:50 daxim left 08:51 jaldhar left 08:52 jaldhar joined, sena_kun left 08:53 jaldhar left 08:54 jaldhar joined 08:55 jaldhar left 08:56 jaldhar joined 08:57 jaldhar left, daxim joined 08:58 jaldhar joined 09:01 jaldhar left 09:02 jaldhar joined 09:03 jaldhar left 09:04 jaldhar joined 09:05 jaldhar left 09:06 jaldhar joined 09:07 jaldhar left, jaldhar joined 09:09 jaldhar left, jaldhar joined 09:15 daxim left 09:17 jaldhar left, jaldhar joined 09:19 jaldhar left, daxim joined, jaldhar joined 09:25 jaldhar left, jaldhar joined 09:27 jaldhar left, jaldhar joined
Doc_Holliwood join #cro 09:28
oops
09:29 jaldhar left 09:30 jaldhar joined
pdcawley Is there a way to do something like `assuming` on a method? 09:30
09:31 HoboWithAShotgun joined, jaldhar left
pdcawley I'd like to do `@seq-of-seqs.map(&head.assuming(*, 3))`, but `head` is only defined as a method. 09:31
09:32 jaldhar joined
pdcawley map( { $_.head(3) } ) seems clumsy to me. 09:32
09:32 Doc_Holliwood left 09:33 jaldhar left 09:34 jaldhar joined 09:39 jaldhar left 09:40 jaldhar joined 09:43 jaldhar left 09:44 jaldhar joined 09:45 jaldhar left 09:46 jaldhar joined 09:47 jaldhar left 09:48 jaldhar joined 09:49 jaldhar left, jaldhar joined 09:51 jaldhar left 09:52 jaldhar joined, Doc_Holliwood joined 09:53 jaldhar left 09:54 jaldhar joined 09:55 HoboWithAShotgun left
moritz not really :( 09:55
09:55 jaldhar left 09:56 jaldhar joined, davidholoshka left 09:57 jaldhar left 09:58 jaldhar joined 09:59 jaldhar left 10:00 jaldhar joined 10:01 jaldhar left 10:02 jaldhar joined 10:03 jaldhar left 10:04 jaldhar joined 10:05 jaldhar left 10:06 jaldhar joined 10:07 jaldhar left
pdcawley I wonder why it's only defined as a method and not a submethod or whatever they're called. 10:07
10:08 jaldhar joined
pdcawley Ah... because: .map(*.head(3)) is quite neat enough. 10:09
10:09 jaldhar left 10:10 jaldhar joined
pdcawley I'm still not entirely au fait with the workings of the syntax. 10:10
10:13 jaldhar left 10:14 jaldhar joined 10:15 jaldhar left 10:16 jaldhar joined 10:17 jaldhar left, jnthn joined 10:18 jaldhar joined 10:19 jaldhar left 10:22 jaldhar joined 10:23 jaldhar left 10:24 jaldhar joined 10:25 jaldhar left 10:26 jaldhar joined 10:27 jaldhar left 10:28 jaldhar joined 10:29 jaldhar left 10:30 jaldhar joined
Altreus Any good modules for making interactive terminal apps? Like curses except I'm loathe to say that word 10:30
10:31 jaldhar left 10:32 jaldhar joined 10:33 jaldhar left 10:34 jaldhar joined 10:35 jaldhar left 10:36 jaldhar joined 10:37 sena_kun joined, jaldhar left 10:38 jaldhar joined 10:43 jaldhar left 10:44 jaldhar joined 10:45 jaldhar left 10:46 jaldhar joined 10:51 jaldhar left 10:52 jaldhar joined
sarna Altreus: modules.raku.org/t/TERMINAL 10:53
10:57 jaldhar left 10:58 jaldhar joined 11:03 jaldhar left 11:04 jaldhar joined 11:05 jaldhar left 11:06 jaldhar joined 11:07 jaldhar left 11:08 jaldhar joined 11:13 jaldhar left 11:14 jaldhar joined
SmokeMachine m: say ((1,2,3,4,5), (11,12,13,14,15)).map(List.^find_method(“head”).assuming(*, 3)) # pdcawley 11:15
camelia ((1 2 3) (11 12 13))
11:21 jaldhar left 11:22 jaldhar joined 11:23 jaldhar left 11:24 jaldhar joined 11:25 jaldhar left 11:26 jaldhar joined 11:27 jaldhar left, jaldhar joined
xinming SmokeMachine: I'll update that ticket after I know deeper about the Red design. 11:28
SmokeMachine: But may be busy these days.
SmokeMachine xinming: great! Thanks! 11:29
11:29 sena_kun left
SmokeMachine xinming: if you need any help... 11:29
xinming I have an idea to add postgres related infix op for Driver::Pg, Which is like pg->> pg#>
11:29 jaldhar left, jaldhar joined
xinming But I'm still thinking wether Ishould have pg prefix to these operators, even they are relates to pg. 11:29
SmokeMachine xinming: it would be good it it could be used as an raku method... 11:31
xinming Is there any info to attach to the Driver, So, We can add multi and use ->> directly? Or, postgres operators such as pg->> pg#> is ok for this purpose.
11:31 jaldhar left
xinming I also considered that, But still need to export methods if possible. 11:32
11:32 jaldhar joined
xinming let's say, something like, ResultSeq.grep: { pgop('-->', .left-column, .right-column) } 11:32
11:33 jaldhar left
xinming SmokeMachine: I wish to add some operators to Driver::Pg after I know deeper about the Red design. 11:33
SmokeMachine xinming: I’d prefere something like: `{ .left-column<json-key> == .right-column }` 11:34
11:34 jaldhar joined
SmokeMachine xinming: I’d prefere something like: `{ .left-column{.right-column} }` 11:34
and I’d die on drivers that json aren’t supported... 11:35
11:35 jaldhar left
xinming SmokeMachine: There are many postgres operators, I think many of them can be implemented in raku directly. 11:35
11:36 jaldhar joined
SmokeMachine xinming: github.com/FCO/Red/blob/master/lib...ethods.pm6 11:36
xinming m: multi infix:<#test> ($a, $b) { "$a #test $b".say; }; (3 [&infix:<#test>] 4)
camelia WARNINGS for <tmp>:
3 #test 4
Useless use of &infix:<#test> in sink context (line 1)
SmokeMachine xinming: in some point, it will be broken into different roles... 11:37
11:37 Tirifto joined, jaldhar left 11:38 jaldhar joined
SmokeMachine then I’ll have 1 role for each possible column type and mixin only the right role on each column... 11:39
xinming: ^^
xinming: so, only if the column if of type jsonb we could add a `AT-POS` method on it… for example... 11:40
11:41 jaldhar left
xinming There are many operations for json colulmn in postgres too. 11:41
11:42 jaldhar joined
xinming Not only the AT-KEY 11:42
SmokeMachine xinming: Yes… but we could make those with a combination ot raku ops…, for example:
11:43 ubz-dih_ joined
xinming 412 upgraded, 50 newly installed, 6 to remove and 0 not upgraded. 11:44
11:45 ubz-dih_ is now known as ubz-dih, jaldhar left
SmokeMachine .col[0] == 1 ===> Red::AST::Eq.new: Red::AST::JSONArrow.new(col, 0), 1 11:45
11:46 ubz-dih is now known as ubz-dih_, jaldhar joined
SmokeMachine .col<bla> == 1 ===> Red::AST::Eq.new: Red::AST::JSONArrow.new(col, “bla"), 1 11:46
xinming I'd like that we can add generic infix helper.
SmokeMachine .col[0] eq “test" ===> Red::AST::Eq.new: Red::AST::JSONArrowStr.new(col, 0), “test" 11:47
Etc...
xinming: ^^
11:47 jaldhar left 11:48 jaldhar joined
SmokeMachine .col.keys ===> Red::AST::Function.new: :name<json_object_keys>, :args[.col] 11:50
11:50 jaldhar left 11:51 wamba left
SmokeMachine to-json .col ===> Red::AST::Function.new: :name<jsonb_pretty>, :args[.col] 11:51
xinming: what do you mean? 11:52
xinming { sql-infix('+', .col-left, .col-right) } sql-postfix('bla', .col) sql-prefix('ble', .clol) 11:59
SmokeMachine xinming: I don’t get it... 12:00
you mean add this sql-infix sub?
xinming SmokeMachine: It's just a un-recommended function to build Red::AST::Infix thing.
Yes.
SmokeMachine xinming: why not just `.col-left + .col-right`? 12:01
xinming This allows us to directly pass the operator when Red doesnt have that op added.
SmokeMachine: Because, There are many index which may not be in Red yet.
SmokeMachine wouldn’t it be better to implement it?
xinming SmokeMachine: It would, But that takes a long time. 12:02
12:02 wamba joined
xinming It's a low level API, when Red doesn't have that op, We can use this as workaround, After we added the op, We mark it deprecated on specificop. 12:03
SmokeMachine xinming: today you can already do something like that… `Red::AST::Infix.new: :left(.col-left), :right(.col-right), :op<+>`... 12:04
xinming: but I wouldn’t advise you to use that...
xinming: I don’t think it should be part of Red, but we could have a separate distro with this subs that just return Red::AST’s... 12:06
12:06 joule joined
xinming SmokeMachine: Got it 12:06
I'll check more about Red design 12:07
SmokeMachine xinming: or it could be inside of Red, but one should need to explicitly call use for use it... 12:09
xinming SmokeMachine: I do mean these should be explicitly used to call it. But at first stage, We export them as a handy helper for people to use it. 12:11
SmokeMachine xinming: if we export it it will never be unexpected... 12:12
xinming SmokeMachine: After Red stabilized, We deprecated the use of implemented op in Red.
SmokeMachine xinming: www.irccloud.com/pastebin/QkClxze7/ 12:15
xinming: I prefer not exporting it...
xinming: the importwant part: www.irccloud.com/pastebin/HSfuiEG0/ 12:16
I thing I’ll create a `Red::AST::GenericInfix`...
xinming: with `Red::AST::GenericInfix`, `Red::AST::GenericPrefix` and `Red::AST::GenericPostfix`, the subs would not be needed... 12:19
xinming SmokeMachine: Thanks for the info about how that worked.
SmokeMachine xinming: we already have `Red::AST::Function`...
xinming SmokeMachine: Subs are just handy helpers 12:20
dinner time, bbl
SmokeMachine xinming: but that’s the thing… I dont want to make it easy to be used/abused... 12:21
xinming: I agree it should be possible, but not easy...
12:25 mid_laptop joined 12:35 mid_laptop left 12:51 Tirifto left 12:55 mid_laptop joined 13:00 lucasb joined 13:05 HoboWithAShotgun joined 13:07 Doc_Holliwood left 13:09 patrickb joined 13:19 HoboWithAShotgun left 13:20 HoboWithAShotgun joined
pdcawley SmokeMachine: So map: *.head(3) is the neatest approach unless I'm doing something severely complicated then. Thanks. 13:33
Altreus Term::Choose looks ideal 13:38
SmokeMachine xinming: lunch-time commit: www.irccloud.com/pastebin/wDyEFNGf/ 13:39
13:41 wamba left 13:47 cpan-raku left 13:48 cpan-raku joined, cpan-raku left, cpan-raku joined 13:54 daxim left 13:56 HoboWithAShotgun left 13:59 sena_kun joined 14:06 HoboWithAShotgun joined 14:08 daxim joined
sena_kun if I need to generate human readable dates in non-English locale, where just "$day $month-name" won't work, because $month-name changes its ending, where should I look? CLDR? 14:11
14:12 Doc_Holliwood joined
guifa sena_kun: yes 14:12
I’m not entirely finished with that part of Intl::CLDR but it should be *mostly* functional right now I think. I haven’t looked at it in a few weeks because $day-job though 14:13
sena_kun guifa, I don't see anything related to dates in Intl::CLDR in the readme, any examples or is it NYI?
well, I can just dirty patch 12 months myself, I think, and deadline is tomorrow, so I don't want to force anyone to do anything, but if there is a way, it will be awesome to make use of it. :) 14:14
guifa look in Intl::CLDR::Format::DateTime 14:15
14:16 HoboWithAShotgun left
guifa actually, I’m not sure if that’s up on Github, if it’s not, I can zip it up and email it to you 14:16
Oh wait, it is 14:17
github.com/alabamenhu/Intl-CLDR/bl...teTime.pm6
You may need to do some quick hacky stuff to make sure it runs for dates and not just times but most all of the functionality should be there 14:18
14:19 daxim left
pdcawley I'm really starting to regret going to OS X Catalina... 14:19
IO::Socket::Async::SSL is currently failing its tests in about the most uninformative way possible. It's just bloody dying without saying anything. 14:20
tbrowder sena_kun: can Date::Names help? or be modded to help?
jnthn pdcawley: Dying as in SIGSEGV, or? 14:21
pdcawley jnthn: Dunno '[1] 33897 abort perl6 -Ilib t/ciphers.t' is the only error I get' 14:22
sena_kun guifa, is it not added into "provides"? should I do a PR? 14:23
pdcawley Hmm... when I do 'use OpenSSL' from the REPL, it aborts the same way...
jnthn I've little idea about MacOS, but that looks rather nasty indeed. 14:24
14:24 daxim joined
jnthn I'm guessing if it's not actually a SEGV it's in that territory 14:24
guifa sena_kun: I just realized that. I’m doing some QAD stuff right now. Unfortunately you’ve caught it while I was in the middle of a reorganization of the module =\ might go with Date::Names for now if I can’t get this quickly
sena_kun tbrowder, not with languages where endings change. :/ Date::Names is cool for simple and often needed case, but this one is more specific and needs something more complex to deal with it, I think.
guifa I think CLDR just has the difference between regular and genetive, tbh 14:25
sena_kun guifa, no problem, I'll skip this particular thing for now and monkey patch it later, I think...
jnthn pdcawley: Probably only running it under something like gdb/lldb/whatever is the MacOS thing will give further info. 14:26
sena_kun guifa, genitive case will be enough
guifa Ah, then that data is definitely there
If you just need day/month/year, you can probably hack it together by directly accessing the CLDR data 14:27
tbrowder hm, if you can give some examples maybe as a feature request issue; i could take a look
pdcawley jnthn: Yikes.
14:29 daxim left
guifa theoretically it should be cldr-data-for-lang($lang-tag)<calendars><gregorian><months><stand-alone><wide> and cldr-data-for-lang($lang-tag)<calendars><gregorian><months><format><wide> 14:31
sena_kun guifa, thanks! will try it out later 14:32
14:33 daxim joined
guifa sena_kun the one thing to watch out for is that for some languages there might not be all those specific formats available. There are some weird rules on which forms to test out, but you can probably do some tests with conditionals to figure it out. I tried to make fairly decent gists for CLDR items, so you can doo, e.g. 14:35
say cldr-data-for-lang("en")<calendars><gregorian>
—> [Calendar::CLDR-Calendar:quarters,timeFormats,eras,months,dateFormats,dateTimeFormats,dayPeriods,intervalFormats,days,appendItems,availableFormats]
sena_kun guifa, I need only this specific month forms for Ukrainian, so fine with other languages being incomplete as long as necessary is present 14:36
14:39 HoboWithAShotgun joined 14:40 daxim left
guifa oh great, that makes it a lot easier haha. You could probably as a super quick hack just copy in the forms. I’m sorry I don’ t have the formatter working better for you :( 14:40
sena_kun guifa, no problem, you are awesome with working on these things in any case. :) 14:41
14:42 Doc_Holliwood left
guifa I am about to have a huge release for Intl::LanguageTag. You can now get an enum to do Language::English, Language::Ukranian, Script::Latin etc 14:44
14:46 daxim joined, Doc_Holliwood joined 14:48 HoboWithAShotgun left 14:55 wamba joined 15:29 Altai-man_ joined 15:31 sena_kun left 15:45 mid_laptop left 15:46 wamba left 15:54 patrickb left 16:12 pdcawley left 16:15 HoboWithAShotgun joined 16:18 daxim left 16:19 Doc_Holliwood left 16:22 HoboWithAShotgun left 16:24 daxim joined 16:25 mid_laptop joined 16:33 kensanata left 16:45 jmerelo joined 16:53 wamba joined 17:03 pdcawley joined 17:04 lichtkind joined 17:16 MasterDuke joined 17:32 Altai-man_ left 17:33 mid_laptop left 17:37 daxim left 17:41 daxim joined 17:54 Doc_Holliwood joined 17:59 lucasb left 18:02 Doc_Holliwood left 18:03 HoboWithAShotgun joined
HoboWithAShotgun What is raku? 18:05
tellable6 2019-10-23T16:41:04Z #raku <AlexDaniel> HoboWithAShotgun: “I tend to always use double quotes, except for when i explicitly don't want interpolation” what about always using single quotes, except when you want interpolation? ;)
[Coke] raku - it's a programming language. Formerly called "Perl 6" 18:17
18:19 robertle joined 18:20 lgtaube joined 18:24 daxim left
tony-o .tell ctilmes any info on an mssql server DB:: driver?, i don't want to start work on one if you've already done it 18:26
tellable6 tony-o, I'll pass your message to ctilmes
18:29 daxim joined 18:30 chloekek joined 18:38 jmerelo left 18:56 daxim left, mid_home joined 18:57 ctilmes joined
ctilmes tony-o: I haven't started an mssql server. I've toyed with Oracle, but haven't gotten very far with that either. 18:57
tellable6 2019-11-06T18:26:49Z #raku <tony-o> ctilmes any info on an mssql server DB:: driver?, i don't want to start work on one if you've already done it
ctilmes tony-o: my next step is to make DB::Pg dependent on DB like sqlite/mysql, but I'm not sure when I'll get around to that. 18:58
tony-o: very open to any suggestions or contributions to any of them, or additional database drivers 18:59
19:01 daxim joined
tony-o ctilmes++ 19:04
[Coke]: ^ that's as far as I've got with that :-)
19:05 daxim left 19:10 daxim joined 19:15 mensvaga left 19:21 daxim left 19:27 daxim joined 19:35 wamba left 19:36 wamba joined
[Coke] tony-o: Danke. 19:43
19:55 daxim left 19:58 stoned75 joined 20:00 daxim joined 20:06 ufobat__ left 20:21 chloekek left 20:23 daxim left 20:29 daxim joined 20:50 joule left 21:07 stoned75 left
Demos[m] is there a way to write something liike "role A { also does B; } role C { also does B; } role D {also does A; Also does C; } and only get one of B in my class 21:15
erm role
21:16 wamba left
Demos[m] Like I want an entire role, but stubbed 21:16
ah I see github.com/rakudo/rakudo/issues/2694 21:19
SmokeMachine xinming: github.com/FCO/Red/commit/de9b2131...c812baee6a 21:31
21:32 daxim left 21:33 stoned75 joined 21:36 patrickb joined 21:38 daxim joined 21:39 ctilmes left 21:47 MasterDuke left 21:48 MasterDuke joined
Geth ecosystem: dad1208b32 | (Jonathan Stowe)++ | META.list
Alter META file for System::Passwd
21:50
22:01 ggoebel left 22:02 daxim left 22:03 colomon joined 22:08 daxim joined 22:18 sena_kun joined 22:37 wildtrees joined 22:56 sena_kun left 23:16 delimited_ left 23:51 patrickb left 23:56 Xliff joined
Xliff o/ 23:57
timotimo: Could you check this on your end and see if you can confirm this behavior? github.com/Xliff/p6-GtkPlus/issues/40
timotimo: Honestly, I've been getting this kind of stuff all throughout GTK and can't figure out how I would even report it. Just confirming this would be enough for me to rakudo-bug it. 23:58
timotimo: Thaaanks! ;)