🦋 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:10 Kaiepi left 00:11 Kaiepi joined 00:12 Kaiepi left 00:13 Kaiepi joined, upupbb-user2 joined 00:15 Doc_Holliwould left 00:16 PacoLinux left 00:22 Kaiepi left 00:29 hungrydonkey joined 00:31 Kaiepi joined 00:35 k-man left 00:40 benlittle left 00:42 benlittle joined 00:43 cpan-raku_ left, lucasb left, cpan-raku joined, cpan-raku left, cpan-raku joined 00:51 upupbb-user2 left 00:54 vrurg left 00:55 girafe2 left, girafe joined 00:56 vrurg joined 01:01 vrurg left 01:03 k-man joined, vrurg joined 01:06 guifa joined 01:07 vrurg left 01:13 markong left 01:27 vrurg joined 01:32 vrurg left 01:33 vrurg joined 01:38 molaf left 01:42 Maylay left 01:46 Maylay joined 01:50 molaf joined 01:59 Sgeo__ left 02:06 Sgeo joined, rbt left 02:07 rbt joined
jdv79 is it correct that Z seems to stop at a type obj? 02:19
02:20 poohman joined
poohman hello all 02:21
jdv79 nm
02:21 hungrydonkey left
poohman is there any way to use the tail of the list in a map function 02:22
?
02:23 krako joined
krako Hi everyone ! I'm new to the perl community and downloaded raku installers from rakudo. I downloaded also the *.asc files but I don't find the gpg keys. 02:24
Could anyone help me, please ?
02:42 krako[m] joined 02:43 krako left
rypervenche krako[m]: Someone will answer if you hang out a bit :) 03:07
03:10 upupbb-user1 joined
krako[m] I'm using riot/matrix with bridge to irc:freenode so even if I quit, I'll don't miss the reply ! (if any !) 03:17
jdv79 m: class C { has $.a; submethod BUILD (:$!a) {} }; C.new(:a(none <d f>)).perl.say 03:20
camelia C.new(a => "f")
jdv79 what is going on there?
m: class C { has $.a; }; C.new(:a(none <d f>)).perl.say
camelia C.new(a => none("d", "f"))
krako[m] Just to introduce myself, I'm a programmer with some knowledge on Python/PHP/Go/Rust/HTML5/CSS3/JS.
I'm starting to learn perl (named raku now?) mainly to do text processing. I know how to use awk/grep/sed but I'm feeling quite limited with their regex capabilities
jdv79 perl and raku are related but not the same thing 03:21
raku is formerly perl6
krako[m] Does raku keep most of its syntax from perl 5 ?
jdv79 its similar enough to be related but dissimilar enough to not be called perl6;) 03:22
you could look at rosettacode maybe to see some examples side by side 03:23
i'm not super clear how that BUILD somehow transforms a junction into a string of the last element 03:24
and by not super clear i mean clueless
krako[m] Oh, I see ! Quite honestly, I don't know what to use between Perl 5 (exists on most OS) and raku, as I'm planning to use a subset of their capabilities (mostly for little scripts or on command lines). 03:29
More precisely, I'll use perl 5 or raku to avoid limitation of grep/sed/awk but not for large programming tasks as I already know other languages
jdv79 perl is mature, well known, has more modules, better regex perf... raku is newer, regex perf is not great yet, (pre)compilation times can be significant. depends on what you're looking for. 03:33
krako[m] I plan to use perl5/raku for text processing : the first project is to build a converter that will converta data from file with a specific syntax and without documentation to config files like json or yaml 03:41
03:41 NODE left
krako[m] jdv79: With the "birth" of raku, do you know if perl 5 dissapear ? 03:43
jdv79 its not an easy answer:) raku grammars are very nice but kinda slow. perl is quite good at text...
krako[m] *will disappear
jdv79 nope
03:43 NODE joined
krako[m] nope, you don't know or nope, it won't disappear ? (sorry for insisting) 03:44
jdv79 both are mostly independently developed
though perl6 was originally thought as a possible successor those days are over 03:45
03:48 rainmanjam joined
[Coke] It's a related language, it's not a replacement. 03:51
03:54 PacoLinux joined
krako[m] Ok, I think for now, I'll use Perl 5 due to its maturity and availability by default on most OS. 03:56
Thank jdv79 and [Coke] for your replies !
jdv79 have fun 03:57
krako[m] (sarcastic ?) 03:58
03:59 pilne left 04:05 rainmanjam left
jdv79 no. i use both almost every day:) 04:05
04:09 lichtkind left, squashable6 left 04:12 squashable6 joined
poohman krako: if you have the time, I suggest you give both perl and raku a try 04:13
just to ensure you base your decision on your feel for the language 04:14
jdv79 m: class C { has $.a; submethod BUILD (:$!a) {} }; C.new(:a(none <d f>)).perl.say 04:16
camelia C.new(a => "f")
jdv79 m: class C { has $.a; submethod BUILD () {$!a = %_<a>;} }; C.new(:a(none <d f>)).perl.say
camelia C.new(a => none("d", "f"))
krako[m] poohman: I think I'll start with perl 5 and then give raku a chance later .
I'm a big fan of regexes and text processing tool so, why not !
jdv79 why is that necessary?... 04:17
04:17 angelds joined, NODE left
jdv79 krako[m]: #perl is the other chan 04:18
04:19 Sgeo_ joined, Doc_Holliwould joined, NODE joined 04:21 Sgeo left 04:28 molaf left, lichtkind joined
krako[m] <jdv79 "why is that necessary?..."> I'll test raku because I'm curious about things that use regexps and allow me to do text processing. So, mostly curiosity ! 04:28
mst krako[m]: perl5 is cool and my usual tool 04:29
04:29 Sgeo__ joined
mst krako[m]: raku grammars are *very* much worth looking at 04:29
krako[m] noted ! 04:31
04:33 Sgeo_ left
AlexDaniel` krako: I think you'll need to try both to actually see what each one excels at in your particular tasks 04:40
perl5 is great, fast and reliable, but very often I'm willing to sacrifice a bit of that for something that is more enjoyable to write 😇 04:42
04:43 lichtkind left
AlexDaniel` but you can probably tell by my avatar that I'm biased 😁 04:43
krako[m] I'll do test them both 04:51
05:17 squashable6 left 05:18 squashable6 joined 05:24 sauvin joined 05:28 poohman left 05:30 angelds left 05:34 poohman joined, guifa left 05:35 xelxebar_ joined
poohman m:my @a = [0..20]; @a.map(*.say) 05:45
evalable6 0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
poohman is there a way to pass the tail of the array (by tail I mean the remaining array) to map or is there some other function other than map which works on lists 05:47
05:48 xelxebar_ left
poohman so basically want 0 and 1..20, 1 and 2..20, 2 and 3..20 etc 05:48
or atleast is there a way to get the index in the map function - so that I can get the use the tail function and the index to get the required array 05:50
m:my @a = [0..20]; @a.map: -> $a,$b {say $a~"--"~$b} 05:55
evalable6 (exit code 1) 0--1
Too few positionals passed; expected 2 arguments but got 1
in block <unit> at /tmp/ajT7zmf7Q0 line 1

2--3
4--5
6--7
8--9
10--11
12--13
14--15
16--17
18--19
poohman m:my @a = [0..20]; @a.kv.map: -> $a,$b {say $a~"--"~$b} 05:56
evalable6 0--0
1--1
2--2
3--3
4--4
5--5
6--6
7--7
8--8
9--9
10--10
11--11
12--12
13--13
14--14
15--15
16--16
17--17
18--18
19--19
20--20
poohman m:my @a = [0..20]; @a.kv.map: -> $a,$b {say $a~"--"~@a.tail(@a.elems-$a-1)} 05:58
evalable6 0--1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18…
poohman, Full output: gist.github.com/dc8311d051862d2c74...52a80f26ec
06:12 wamba joined 06:14 upupbb-user1 left 06:18 upupbb-user1 joined
AlexDaniel poohman: sorry, I don't understand the question. Do you need .tail? or maybe .rotor? 06:23
my @a = [0..20]; say @a.rotor(1, *) 06:24
evalable6 ((0) (1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20))
AlexDaniel my @a = [0..20]; say @a.rotor(5, *)
evalable6 ((0 1 2 3 4) (5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20))
poohman AlexDaniel: I looked into rotor but could not do what I wanted to do with it 06:26
06:27 stoned75 joined
poohman I need to traverse the array and then for each element need the remaining array 06:27
AlexDaniel ah 06:28
poohman m:my @a = [0..20]; @a.kv.map: -> $a,$b {say $a~"--"~@a.tail(@a.elems-$a-1)}
evalable6 0--1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18…
poohman, Full output: gist.github.com/09d3300bb3c2765ec0...58e3a72920
poohman something like this
is there a more elegant solution? 06:29
AlexDaniel e: my @a = [0..20]; for 1..^@a { my ($, $elem, @rest) = @a.rotor($_, 1, *); say $elem; say @rest } 06:30
evalable6 (1)
[(2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1…
AlexDaniel, Full output: gist.github.com/6f074f6c987243083a...3b37a4bdbd
AlexDaniel hmm that's pretty close isn't it 06:31
lizmat: I think rotor is wrong to deny requests for 0 elements 06:33
poohman let me try to go over ur solution in my repl
AlexDaniel lizmat: here:
m: say (0..20).rotor(2, 1, 5) 06:34
camelia ((0 1) (2) (3 4 5 6 7) (8 9) (10) (11 12 13 14 15) (16 17) (18))
AlexDaniel m: say (0..20).rotor(1, 1, 5)
camelia ((0) (1) (2 3 4 5 6) (7) (8) (9 10 11 12 13) (14) (15) (16 17 18 19 20))
AlexDaniel m: say (0..20).rotor(0, 1, 5)
camelia Rotorizing sublist length is out of range. Is: 0, should be in 1..^Inf;
Did you mean to specify a Pair with => 0?
in block <unit> at <tmp> line 1
AlexDaniel lizmat: for the code above it is actually a needless limitation
zero elements just means an empty list, otherwise DIHWIDT 06:35
poohman: github.com/rakudo/rakudo/issues/3588 06:50
poohman thanks AlexDaniel 06:52
AlexDaniel poohman: I'd say your solution is totally fine 06:54
my @a = [0..20]; for ^@a { say @a[$_]; say @a.tail(@a-$_-1) }
evalable6 0
(1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18…
AlexDaniel, Full output: gist.github.com/ca34b8a557efc10001...7488542902
AlexDaniel poohman: you don't need .kv so you can simplify it, but otherwise the logic is simple enough 06:55
poohman perfect thanks 06:56
AlexDaniel poohman: you can also do (@a.end-$_) if you don't like -1
07:11 rbt left, rbt joined 07:23 abraxxa left 07:26 abraxxa joined 07:29 AlexDaniel` left, BlackChaosNL[m] left, unclechu left, awwaiid left, uzl[m] left, krako[m] left, CIAvash left, benkolera left, matiaslina left 07:32 Geth left, Geth joined 07:43 upupbb-user1 left 07:44 NODE left 07:45 dakkar joined, dakkar left, dakkar joined 07:47 NODE joined 07:48 rindolf joined 07:58 BlackChaosNL[m] joined 08:00 aluaces left
cpan-raku New module released to CPAN! Term::Choose::Util (1.3.4) by 03KUERBIS 08:03
08:26 awwaiid joined, unclechu joined, benkolera joined, krako[m] joined, AlexDaniel` joined, matiaslina joined, uzl[m] joined, CIAvash joined 08:28 vike left 08:36 aluaces joined, sena_kun joined 08:37 pecastro joined, vike joined 08:51 aborazmeh joined, aborazmeh left, aborazmeh joined 08:52 Doc_Holliwould left 09:04 kensanata joined 09:06 lgtaube left 09:07 qiqi joined 09:08 aborazmeh left 09:14 poohman left 09:15 poohman joined 09:22 lgtaube joined 09:23 qiqi left 09:26 colomon joined 09:35 Ven`` joined 09:45 mowcat joined, chloekek joined 09:50 qiqi joined 09:53 upupbb-user1 joined 10:06 Altai-man_ joined 10:08 sena_kun left 10:12 rbt left 10:13 rbt joined 10:39 qiqi left 10:41 aborazmeh joined, aborazmeh left, aborazmeh joined 10:46 markong joined 10:49 markoong joined 10:53 markong left 10:57 markong joined 10:59 colomon left 11:01 markoong left 11:05 markoong joined 11:09 ufobat_ left, colomon joined, markong left
tbrowder hi, #raku people, keeping social distance i hope 11:09
11:09 ufobat joined
lizmat offline indeed :-) 11:10
tbrowder gut!
in my porting effort i have a large number of methods, some of which are exportable in perl's manner 11:11
11:12 stoned75 left
tbrowder is there any advantage or disadvantage of having a class with fewer methods and instead using exportable subs? 11:13
jnthn is mostly working from home anyway, but did an office day yesterday, only to discover the boiler has broken, and so will probably be safely at home even more than planned... :) 11:14
tbrowder the word on tv now seems to be that masks are good even if it's clean hankerchief or scarf 11:16
jnthn Yes, wearning something to cover nose/mouth has been mandatory whenever out of one's home for about 2 weeks here now. 11:21
*wearing
Well, strictly "in public". 11:22
tadzik ah, we're just forbidden from going outside ;) 11:23
tellable6 2020-03-25T22:48:48Z #raku-dev <patrickb> tadzik: Rakubrew is (slowly) getting to the point of working reliably. What's your stance wrt rakudobrew? Should it officially be deprecated?
tadzik ah, hard questions 11:24
chloekek Time to go outside to get food. 11:27
jnthn tadzik: Allowed here only to go to work or to get groceries or other essentials. Otherwise not. 11:34
11:34 aborazmeh left 11:35 chloekek left
tadzik jnthn: yeah, same here. Groceries, doctors or helping others 11:35
but even then, you need to maintain a 2 meter distance from everyone – including people you live with, which is a bit bizarre
jnthn Oh, here there's an exception for people living in the same household. :) 11:36
tadzik perks of living in a first-world country ;) 11:38
11:42 Black_Ribbon left 11:44 markong joined 11:45 markoong left
jnthn At least you have the better pierogi :P 11:53
11:58 poohman left
tadzik :D 12:00
El_Che hi, I hope everyone here is ok 12:01
Geth doc: Kaiepi++ created pull request #3301:
Mention :D types in the documentation for the "is required" trait
12:07 sena_kun joined 12:08 Altai-man_ left 12:10 Ven`` left 12:11 rbt left, rbt joined 12:21 Ven`` joined 12:27 rindolf left 12:35 dakkar left, dakkar joined 12:42 Doc_Holliwould joined
tbrowder jnthn: any opinion on subs vs methods and large classes? 12:59
[Coke] m: say "rakudo" XX "", "c" 13:00
camelia (((rakudo )) ((rakudo c)))
[Coke] m: say "rakudo" X~ "", "c"
camelia (rakudo rakudoc)
13:03 xelxebar left, natrys joined 13:04 rindolf joined 13:09 masak joined, Guest54471 left 13:11 NODE left 13:13 NODE joined
jnthn tbrowder: That's a bit of an abstract question, but in general: do they share any state? If not, there's probably no reason for them to be methods. If yes, group methods by the state they use to see if they really should be one class, or multiple classes. 13:14
(And yes, that's a huge over-simplification, and good OO is usually designed state-last...) 13:15
13:19 masak is now known as Guest16689 13:21 bdju left, abraxxa left
tbrowder i apologize for the looseness of the question, but your answer is very helpful, esp. for my immediate problem. thanks! 13:22
13:23 Doc_Holliwould left 13:24 wamba left 13:26 abraxxa joined, wamba joined, NODE left 13:27 NODE joined 13:29 chloekek joined 13:31 lichtkind joined 13:41 molaf joined 13:49 molaf left
El_Che tbrowder: the question and answer are loosly coupled. A good thing in OO :) 13:56
13:56 P6Bot joined 13:57 rindolf left
tbrowder roger that! and OO so easy in raku :-D 13:58
14:03 P6Bot left 14:04 aborazmeh joined, aborazmeh left, aborazmeh joined 14:06 Altai-man_ joined, rindolf joined 14:08 regreg joined
regreg hello 14:08
does raku have builtin array operators? like matlab/octave
14:08 sena_kun left
chloekek I’m not aware of built-in vector operators. 14:09
El_Che regreg: the built-in methods/routines are here: docs.raku.org/type/Array 14:10
regreg thanks
chloekek You can of course write them succinctly.
14:11 chenyf joined
[Coke] wonders if an Operators::APL would get any use at all. :) 14:12
chloekek p6: my num @a = 1e0, 2e0, 3e0; my num @b = 4e0, 5e0, 6e0; say [+] @a Z* @b; # dot product
camelia 32
chloekek But they will probably not be nearly as fast as properly optimized linear algebra subprograms using vector instructions. 14:13
14:14 wamba left 14:15 wamba joined, rbt left 14:16 rbt joined 14:27 Sgeo__ left 14:33 wamba left 14:35 Doc_Holliwould joined 14:49 wamba joined 14:53 Tirifto joined 14:54 bdju joined 14:55 molaf joined
timotimo theoretically there's nothing keeping us from doing a fully optimized thing when Z* is used on native arrays of the same size and such 14:57
passing native arrays to C code with nativecall isn't allowed without a copy 14:58
14:58 poohman joined, pilne joined 14:59 poohmaan joined
timotimo github.com/MoarVM/MoarVM/commit/86...4b749ddac9 - one way to do it 15:00
but ideally we'd have something that can also fuse loops and such
i.e. not getting around actually emitting machine code with vector ops 15:01
15:02 poohman left
timotimo dynasm does have a bunch of SSE* ops in it 15:03
but those can't be all of them?!
github.com/MoarVM/dynasm/blob/e1a6....lua#L1187 - starting here; chloekek do you happen to have experience with sse assembly instructions or i guess intrinsics? 15:06
15:06 Sgeo joined
timotimo anyone else can speak up too %) 15:07
chloekek Just write the function in C on godbolt.org and it will show you which instructions you have to use. 15:10
timotimo oh, i thought more of, does dasm lack any sse ops, maybe important ones? 15:11
but that'd also help for sure
chloekek godbolt.org/z/HhXgK3 it generates a lot of setup code to check for alignment, because vector instructions require proper alignment. 15:12
timotimo absolutely
chloekek But, we do not have to generate assembly for this directly.
We can generate a VM instruction for Z* on native arrays. 15:13
timotimo it's possible to get our arrays out of alignment as well :(
chloekek Then this VM instruction can call a C function like the one in the example.
15:13 regreg left
timotimo did you see the moarvm commit i linked above? that was the idea for that 15:13
chloekek No, I did not see it. Now I do.
timotimo but really you get a load more performance by not doing full-array operations one after the other
chloekek Yeah just like that. :) 15:14
timotimo ... at least that's what i heard, i haven't actually done anything manual with vectorized ops yet
carefully not overselling my proficiency so that i don't get a "well volunteered" LOL
15:14 wamba left 15:15 regreg joined, aborazmeh left
MasterDuke i think that ship sailed when you pushed a branch to the moarvm repo, not even an individual fork! 15:15
what's NYI on your branch? 15:17
timotimo everything :) :)
only supports 64bit sizes of individual values 15:18
a full implementation will of course have to support all sizes that we have, and all combinations, too
just add, sub, mul, div for floats gives you 4 * 2 * 2, then add, sub, mul, div_i and div_n gives 5 * 4 * 4 15:19
15:22 chenyf left
MasterDuke we already have some code generating tools in our various build processes... 15:23
15:23 natrys left, ufobat_ joined 15:24 rindolf left
chloekek In other news, I got raku-nix working with libraries that have Build.pm. 15:24
timotimo but if you actually want real performance, you have to fuse consecutive ops together
15:25 cpan-raku left, cpan-raku joined, cpan-raku left, cpan-raku joined 15:27 ufobat left, [Coke] left
timotimo you know, have an implementaiton for a + b + c, one for a + b * c, a * b * c, ... 15:29
reordering lets you eliminate a couple of the formulas, of course
jdv79 anyone know why sig binding seems to break junctions?
i'm guessing it's causing iteration and ends up with the last value... 15:30
timotimo signature binding errors out when autothreading is needed, so that the caller of the signature bind can do the autothreading
if you're talking about the lowest level of the signature binder, that is 15:31
15:31 wamba joined
jdv79 m: class C { has $.a; submethod BUILD (:$!a) {} }; C.new(:a(none <d f>)).perl.say 15:32
camelia C.new(a => "f")
jdv79 m: class C { has $.a; submethod BUILD () {$!a = %_<a>;} }; C.new(:a(none <d f>)).perl.say
camelia C.new(a => none("d", "f"))
jdv79 why is the 2nd one necessary for the junction to survive a BUILD?
timotimo interesting
possibly a bind vs assignment difference, or something the signature lowering optimization changes 15:33
jdv79 bug or on purpose? the people want to know! :)
15:35 k-man left
timotimo too headachy to dig into it right now :( 15:37
MasterDuke committable6: all class C { has $.a; submethod BUILD (:$!a) {} }; C.new(:a(none <d f>)).perl.say; class D { has $.a; submethod BUILD () {$!a = %_<a>;} }; D.new(:a(none <d f>)).perl.say 15:38
committable6 MasterDuke, ¦all (64 commits): «C.new(a => "f")␤D.new(a => none("d", "f"))␤»
MasterDuke well, not a regression at least 15:39
15:41 holli__ joined 15:44 Doc_Holliwould left 15:49 [Coke] joined, [Coke] left, [Coke] joined 15:56 poohmaan left 16:06 sena_kun joined 16:08 wildtrees joined 16:09 Altai-man_ left, poohmaan joined 16:12 rindolf joined 16:15 wildtrees left 16:16 guifa joined
guifa o/ 16:18
16:23 lichtkind left 16:30 holli__ left
[Coke] \o 16:30
chloekek Hmm, > This type cannot unbox to a native string: P6opaque, IO::Path 16:40
Funny bug in DBIish when it cannot find a .so 16:41
16:43 molaf left
tbrowder \o\ 16:45
chloekek Bizarre that it can’t find it though, I set LD_LIBRARY_PATH correctly. 16:46
16:46 dakkar left 16:53 guifa is now known as DrGuifa
DrGuifa successfully defended his dissertation this week 16:54
phogg DrGuifa: How much XP did you get?
DrGuifa +100, but -10000000 luck because I can’t celebrate because COVID19 16:55
tobs DrGuifa: congratulations nonetheless! 16:58
16:58 veesh left
DrGuifa I’m going to do a post at some point about the role of Raku in it at some point. All of my backend code is Raku, front end JavaScript because I didn’t have time to really play with the JS runtime 16:59
17:00 wamba left, veesh joined
jnthn DrGuifa++ # look forward to reading that 17:01
And congrats :)
DrGuifa jnthn my next step is to do a Cro backend for collaborative editing 17:03
DrGuifa wrote about a medieval book and focused on digital transcriptions / editions
Raku grammars were actually pretty fundamental, even though being a humanities dissertation I didn’t really talk about them per se very much in the paper itself 17:04
cpan-raku New module released to CPAN! Gnome::Gtk3 (0.27.0.1) by 03MARTIMM
New module released to CPAN! Gnome::Gio (0.4.2) by 03MARTIMM
New module released to CPAN! Gnome::Gdk3 (0.15.4) by 03MARTIMM 17:05
New module released to CPAN! Gnome::GObject (0.16.1) by 03MARTIMM
New module released to CPAN! Gnome::Glib (0.17.0.3) by 03MARTIMM
New module released to CPAN! Gnome::N (0.17.2) by 03MARTIMM
17:07 poohmaan left 17:08 holli__ joined 17:13 poohmaan joined 17:15 dakkar joined 17:17 wamba joined
tbrowder DrGuifa: congratulations! 17:18
DrGuifa One thing I realized I definitely need to do is create a grammars for objects 17:19
DrGuifa . o O ( and at least one person had complained about grammars not handling binary blobs either, so maybe I´ll make that summer project #9948651 ) 17:20
dakkar is one of those people wishing to match blobs with grammars 17:24
I mean, network protocols are well modeled by supplies of blobs, not strings…
DrGuifa dakkar: I think I have a good idea of how I want to do it except for allowing it to work syntactically just like regularly grammars (e.g. having the inside of the token brackets parsed under a different grammar) 17:25
17:25 Ven`` left
DrGuifa But I think I’ll toss together a model using a standard class with methods returning string objects first, and then deal with the fancy Raku-ness of it 17:26
dakkar that sounds like a good plan 17:27
first, make it work; then, make it pretty ☺
17:27 vike left 17:44 upupbb-user1 left
chloekek I am most confused. 17:47
Hmm, it seems that JSON::Fast used to be in the panda repo. 17:50
17:50 molaf joined 17:51 vike joined, pilne_ joined
chloekek Cool! I can now completely automatically generate Nix packages from Raku libraries hosted on CPAN or GitHub. :) 17:52
17:52 pilne left
cpan-raku New module released to CPAN! Gnome::Gio (0.4.2.1) by 03MARTIMM 17:53
18:06 Altai-man_ joined
MasterDuke DrGuifaL congrats 18:07
18:08 [Sno] left, sena_kun left 18:10 sauvin left 18:11 [Sno] joined 18:12 chloekek left 18:14 lichtkind joined 18:16 rindolf left 18:18 rindolf joined
Altreus these release things need URLs to follow 18:22
18:23 dakkar left
rypervenche releasable6, status 18:25
releasable6 rypervenche, Next release will happen when it's ready. 3 blockers. 166 out of 287 commits logged (⚠ 3 warnings)
rypervenche, Details: gist.github.com/0d6497bd78bb14c28e...049edfa741
18:26 |oLa| joined 18:36 natrys joined 18:42 kensanata left 18:44 poohmaan left 18:57 poohmaan joined 19:03 PacoLinux left 20:01 skyl4rk_ joined 20:07 sena_kun joined 20:08 Altai-man_ left 20:19 skyl4rk_ left 20:21 skyl4rk_ joined 20:27 PacoLinux joined 20:29 maggotbrain left 20:33 skyl4rk_ is now known as skyl4rk 20:36 stoned75 joined 20:48 markong left, markoong joined 20:56 markong joined 21:00 markoong left 21:02 Tirifto left
jdv79 is there an overly clever way to get a series of DateTimes given endpoints and a period? 21:07
21:07 poohmaan left 21:08 rindolf left 21:13 Black_Ribbon joined
moritz jdv79: there's always the series operator 21:21
m: say (DateTime.now(2020, 1, 1, 0, 0, 0), *+3600 ... *).head(5) 21:23
camelia Too many positionals passed; expected 1 argument but got 7
in block <unit> at <tmp> line 1
moritz m: say (DateTime.new(2020, 1, 1, 0, 0, 0), *+3600 ... *).head(5)
camelia Cannot resolve caller Numeric(DateTime:D: ); none of these signatures match:
(Mu:U \v: *%_)
in block <unit> at <tmp> line 1
moritz m: say (DateTime.new(2020, 1, 1, 0, 0, 0), *+Duration.new(3600) ... *).head(5)
camelia (2020-01-01T00:00:00Z 2020-01-01T01:00:00Z 2020-01-01T02:00:00Z 2020-01-01T03:00:00Z 2020-01-01T04:00:00Z)
21:27 markoong joined 21:30 markong left 21:41 natrys left 21:52 regreg left 21:57 Sgeo_ joined 22:00 Sgeo left 22:01 markong joined
jdv79 moritz: neat 22:01
22:04 Actualeyes left 22:05 markoong left 22:06 Altai-man_ joined 22:09 sena_kun left 22:16 chloekek joined
lizmat m: role Interval[\seconds = 3600] { my \step = Duration.new(seconds); method succ() { self + step } }; say (DateTime.new(2020,1,1,0,0,0) but Interval ... *).head(5) 22:20
camelia (2020-01-01T00:00:00Z 2020-01-01T01:00:00Z 2020-01-01T02:00:00Z 2020-01-01T03:00:00Z 2020-01-01T04:00:00Z)
Kaiepi m: gather for 1..10 { .take }.elems for ^100_000; say now - $*INIT-INSTANT 22:21
camelia 5.80473565
22:21 pilne_ left, pilne joined
Kaiepi m: class Foo does Iterator { has Int:D $!i = 1; method pull-one is raw { return IterationEnd if $!i >= 10; $!i++ } }; Seq.new(Foo.new).elems for ^100_000; say now - $*INIT-INSTANT 22:22
22:22 rbt left
camelia 1.4806662 22:22
Kaiepi oh damn that's a lot faster than i expected
22:22 rbt joined
lizmat Kaiepi: with the refactoring of ... I'm working on, I'm seeing performance improvements 4x to 15x so far 22:23
Kaiepi nice!
lizmat currently (re)writing extensive tests 22:25
and finding some off stuff 22:26
like:
m: dd 1 ... 5.5
camelia (1, 2, 3, 4, 5).Seq
lizmat m: dd 1 ...^ 5.5
camelia (1, 2, 3, 4, 5).Seq
lizmat the latter I think is incorrect
22:38 k-man joined 22:46 markoong joined 22:50 markong left 22:55 PavelB joined
timotimo depends on how you interpret ...^ ; if it's "up to but not including the end point" it's correct, if you interpret it as "same as ... but drop the last entry" then not 23:00
oh it's ... not .. 23:02
then i think i agree
23:02 chloekek left 23:04 pecastro left 23:10 benlittle left 23:12 benlittle joined 23:14 mowcat left 23:19 holli__ left 23:21 sena_kun joined 23:23 Altai-man_ left 23:24 Sgeo__ joined 23:26 |oLa| left 23:27 Sgeo_ left 23:33 poohmaan joined, markong joined 23:37 markoong left 23:38 xelxebar joined 23:40 devmikey joined 23:46 aborazmeh joined, aborazmeh left, aborazmeh joined 23:52 epony left 23:53 genevino left, aborazmeh left 23:54 caterfxo left 23:55 epony joined, upupbb-user2 joined, markoong joined, benlittle left 23:57 caterfxo joined, benlittle joined, aborazmeh joined, aborazmeh left, aborazmeh joined 23:59 markong left