»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_log/perl6 | UTF-8 is our friend! 🦋
Set by Zoffix on 25 July 2018.
00:00 reportable6 left
astronavt ugexe is that the same? you can pass in a literal value and it'll pattern match on it? 00:00
Elronnd when you want to pass complex pointer types, or deeply nested struct or union hierarchies, it gets hairy
astronavt Elronnd yeah wouldnt be. either a pointer to a read only buffer or copying data to a some kind of native buffer
how about C++? same deal?
ugexe astronavt: it only matches 0
00:00 reportable6 joined, ChanServ sets mode: +v reportable6
astronavt so i cant do multi factorial(1) { 1 } ? 00:00
Elronnd it depends. If you just have a buffer you want filled it should be doable 00:01
00:01 [particle] joined
Elronnd m: multi fac(0) { 1 }; multi fac($x where * > 0) { $x * fac($x - 1) }; say fac 5 00:01
camelia 120
ugexe you can do factorial 1. but it will match 1, not smartmatch against 1
timotimo C++ will do name mangling for you when you put methods in classes as far as i know
00:02 aborazmeh joined, aborazmeh left, aborazmeh joined
Elronnd astronavt: I don't know how good the c++ support is, but I will say that it's *hard* 00:02
timotimo github.com/rakudo/rakudo/blob/mast...mangling.t / github.com/rakudo/rakudo/blob/mast...ngling.cpp
Elronnd in general
d does it because it was written by the only person ever to write a c++ compiler solo, and its support isn't even that great 00:03
timotimo: do you know if the msvc++ name mangling is supported too?
or just (clan)g++
timotimo i believe it is
astronavt Elronnd my standard is Cython and R
00:05 adu left
Kaiepi the c++ support is fairly basic 00:06
astronavt actually R has a pretty cool package where you can write inline C++ code in a string and it gets compiled w/ R headers and imported on the fly
Kaiepi you'll need to pad structs a lot for more complex classes
astronavt Kaiepi this would be simple stuff, arrays of floats and ints
Kaiepi ah 00:07
msvc is supported btw 00:08
timotimo i used a Scipy module that compiles C++ code with a bunch of stuff around it and transfers your variables to C++ land and back 00:10
it had a library included that gives you very complex multidimensional slicing for numpy arrays
00:10 pamplemousse joined
astronavt timotimo thats not part of scipy itself though, is it? 00:11
timotimo it was in so far as that it came with it, i believe
docs.scipy.org/doc/scipy-0.18.1/re...weave.html 00:12
astronavt i had no idea that existed
oh it looks like it was removed from scipy a long time ago
Kaiepi i have a pullreq open to add support for wchar_t/wint_t/char16_t/char32_t and passing Str as such to nativecall but no one's reviewed it yet, which would be helpful for writing c++ stuff
astronavt and was never ported to py 3. before my time
Elronnd Kaiepi: what's wint_t? 00:13
astronavt oh yeah, text. i assume perl6 is good at unicode?
Elronnd the best
Kaiepi wint_t is a type that supports everything wchar_t does + WEOF
timotimo haha 00:14
Kaiepi i haven't actually tested cpp code with it yet (which i suspect has special mangling for those types), but i know it works for c code
Elronnd ugh, I hate when c people add stupid types like that
timotimo it already felt like nobody had touched it in a long time when i used it
Elronnd like, afaik there's a signed type, has a normal positive range, but for negative numbers it's only guaranteed to include -1
00:15 pamplemousse left
timotimo "Up to now, most testing has been done on Windows 2000 with Microsoft’s C++ compiler (MSVC) and with gcc (mingw32 2.95.2 and 2.95.3-6). All tests also pass on Linux (RH 7.1 with gcc 2.96)" 00:15
Kaiepi not always!
Elronnd D:
Kaiepi sometimes WEOF is above zero, but beyond what wchar_t supports
astronavt Elronnd does it know where grapheme cluster boundaries are? 00:16
timotimo anyway, rakudo on moarvm comes with a jit compiler, that reduces the need to rewrite your stuff in C a little bit at least
00:16 aborazmeh left
astronavt timotimo this would only be to leverage existing libraries 00:17
Kaiepi wide strings are absolutely ridiculous, every platform deals with them differently
timotimo right
Elronnd timotimo: I'm fairly sure perl6 is still slower than perl5
timotimo twitter.com/loltimo/status/1155983272045760514 - like this :)
astronavt but performance was another question i had. other languages ive played with recently include common lisp, tcl, and julia
Elronnd even though the latter has no JIT
astronavt CL can be fast and julia is designed to be fast
timotimo Elronnd: on average, probably. there's stuff where perl6 will outperform perl5 already
astronavt whereas R is slow as molasses and python is meh unless you use pypy
timotimo jnthn will have a very interesting talk at the upcoming perlcon in riga 00:18
about this exact topic
Elronnd ooh
astronavt cool
gtk bindings, nice
timotimo for what it's worth, pypy is fucking amazing
astronavt i never want to write C code i hate C so much
Elronnd astronavt: yeah, cl and julia are mad fast
at least if you use sbcl
I like c. But sometimes, I just need a bit more abstraction
astronavt Elronnd apparently Clasp is coming along nicely too
Elronnd so I hear. Never used it
timotimo it's very easy to write perl6 code that is a hundred times slower than extremely similar perl6 code, sadly 00:19
astronavt i just dont like how in C you have this veneer of typing and safety, but actually everything is just a binary blob and the compiler doesn't bother to warn you when you forget to free memory
Kaiepi c was one of the first languages i tried, but i wasn't aware gdb existed while i was learning it so i quit shortly after pointers were introduced
i learned to like it after having tried higher level languages
Elronnd timotimo: saw something like that on the subreddit recently. Given/when was much slower than if/==, because of smartmatching 00:20
timotimo maybe it was smartmatching, maybe it was "succeed"/"proceed"
i would have had to check it in the profiler and spesh log and all that
astronavt what is succeed/proceed? 00:21
Kaiepi one of them lets you fall through to the later cases iirc, but i forget what the other one does and i'm not sure which is which 00:23
never had to use them
timotimo the default for when blocks is to jump out of the containing block when the code finishes
m: given 5 { say "before"; when 1 { say "one" }; say "middle"; when 5 { say "five" }; say "end" }; say "finished"
camelia before
astronavt the search tool on docs.perl6.org is very nice
timotimo m: given 5 { say "before"; when 1 { say "one"; succeed }; say "middle"; when 5 { say "five"; succeed }; say "end" }; say "finished"
camelia before
timotimo m: given 5 { say "before"; when 1 { say "one"; proceed }; say "middle"; when 5 { say "five"; proceed }; say "end" }; say "finished"
camelia before
timotimo ^- when you use proceed it'll proceed with the other stuff in the containing block
that's why it'll say "end" in the last one
as far as i know it's implemented with control exceptions, so not as fast as an if/elsif/else chain
Kaiepi m: given 5 { if $_ == 5 { say 'five' }; if $_ ~~ Int { say ' is also Int' } } 00:26
camelia five
is also Int
Kaiepi nothing's stopping you from using ifs in given blocks
probably bad practice though
timotimo i don't consider that bad practice 00:27
Kaiepi oh
timotimo given is a good way to give a value a name, and $_ can be very useful
Kaiepi what's the difference between with and given? 00:28
timotimo with is also a conditional
given will always execut 00:29
Kaiepi ah
astronavt it would be nice if the docs were more "clickable" 00:32
like i see `when` in special formatting, itd be great if i could click it and jump to the 'when' syntax entry
Kaiepi i kinda wish the docs would have different pages for different releases of perl 6 so there wouldn't be notes saying (20xx.xx and later) (deprecated in 20xx.xx) everywhere 00:36
implementing that would be a huge job though
timotimo perl6 releases are 6.c, 6.d, 6.e etc, not year-based 00:40
Kaiepi i meant like 2019.07, 2019.07.1, etc 00:42
whatever you call those 00:43
timotimo that's compiler releases
technically they don't deprecate stuff
language versions do 00:45
and one compiler release will usually support multiple language versions at the same time
astronavt Kaiepi i almost think i like the opposite? that way you dont get confused like in python 3.7 when some asyncio functions just disappeared 00:46
Kaiepi fair
astronavt i dont know how the docs are generated, but some kind of semantic "deprecated since" or "available as of" would be powerful 00:47
cause then you can filter on it
timotimo anyway, i'm pretty tired. good luck and have fun with perl6! 00:50
github.com/bduggan/p6-jupyter-kernel - this probably deserves a shout-out again, the "launch binder" button will literally immediately drop you into a running perl6 jupyter notebook
pilne that's fucking amazing 00:53
ty timotimo
00:55 Kaiepi left 00:56 Kaiepi joined 01:00 ufobat__ joined 01:04 ufobat_ left
tobs astronavt: there is a ticket about tagging documentation for language/compiler versions D#302 01:28
synopsebot D#302 [open]: github.com/perl6/doc/issues/302 [big][build][site][wishlist] Need a way to mark which version something is part of.
zostay my elegant solution to my problem of uint16 sometimes returning -256 instead of 65280 is: check if it appears negative and do a complement on it before sticking it in the UInt 01:30
I'll put an ugly comment that its a work-around and that someday I should fix it.
01:41 Actualeyes left
pilne would Inline::FORTH even be worthwhile outside of a thought experiment? :D 01:49
01:54 cpan-p6 left, cpan-p6 joined, cpan-p6 left, cpan-p6 joined 01:56 adu joined
astronavt tobs thanks for that tip 02:03
pilne perl6 seems like a good place to do that 02:04
02:04 Manifest0 left 02:05 Manifest0 joined
pilne i mean, unless one is truly worried about top speed for everything, perl6 seems to be a good place to do anything, even if it hasn't been done/optimized by someone smarter than me yet :D 02:17
02:17 uzl left 02:18 uzl joined 02:20 uzl left
astronavt heh. there are a lot of fun weird languages id like to try 02:29
cpan-p6 New module released to CPAN! App::nm2perl6 (0.0.3) by 03JGOFF 02:53
03:20 candr left 03:28 irced joined
irced hey all, so I can map Str keys to values but what if I want to map any of several string keys to the same value. I can think of ways to abstract this but surely this is so common there must be a convenient way that has been added to the language by the wise perl6 developers? 03:31
or a concise abstraction
that one of the perl6 mages present can share with the channel? 03:32
tobs irced: you can assign whatever-many values to a hash slice of your keys 03:42
m: my %h; %h<a b c d e f> = 42 xx *; dd %h 03:43
camelia Hash %h = {:a(42), :b(42), :c(42), :d(42), :e(42), :f(42)}
irced scratches his chin and ponders the wizened insight.
tobs: ahh yes, that repetition operator does save quite a bit of coding! now to see if i can add more keys besides that.. lesse 03:45
irced opens the perl6 tome. 03:46
astronavt tobs sometimes i find myself needing to call many different functions on the same piece of data, and collecting them in a list or passing that onto another function. like [min(a), median(a), max(a)]. is there some perl6 magic for this? 03:50
(tagged you because it seems relevant to what you just posted)
irced m: my %h; %h<a b c d e f>=42 xx *; %h.append: {%h<g h i j k> = 9 xx *}.pairs; say %h{e}.gist; say %h{i}.gist; 03:51
camelia (Any)
irced m: my %h; %h<a b c d e f>=42 xx *; %h.append: {%h<g h i j k> = 9 xx *}.pairs; say %h{<e>}; say %h{<i>};
camelia 42
tobs astronavt: I think it can be marginally shorter (depends on how long "a" is really) if you put the functions into a list apply a call to them using a hyperoperator 03:53
irced m: my %h; %h<a b c d e f>=42 xx *; %h<g h i j k> = 9 xx *; say %h<b>.kv; say %h<j>.kv;
camelia (0 42)
(0 9)
tobs m: sub mean (@a) { @a.sum / @a }; [&min, &mean, &max]».(2..10).say
camelia [2 6 10]
astronavt yeah that seems like what i'm after
irced m: my %h; %h<a b c d e f>=42 xx *; %h<g h i j k> = 9 xx *; say %h<b>.pair; say %h<j>.pair; 03:54
camelia No such method 'pair' for invocant of type 'Int'. Did you mean any of these?

in block <unit> at <tmp> line 1
irced m: my %h; %h<a b c d e f>=42 xx *; %h<g h i j k> = 9 xx *; say %h<b>.pairs; say %h<j>.pairs;
camelia (0 => 42)
(0 => 9)
irced tobs: thanks tobs. just seeing if i can refer back to the key in the call there but i see that it works. excellent insight!
tobs astronavt: in Perl 6, you can also construct, store and apply Captures, which are collections of arguments to be passed to a sub, so another way to shorten code that uses the same arguments over and over is reusing the capture: 03:58
m: my \args = \(2,3,4,5,6,7,8,9,10); say min(|args); say max(|args) 03:59
camelia 2
irced m: my %h; %h<a b c d e f>.map: { 42 };
tobs args padded for effect :p
camelia ( no output )
irced m: my %h; %h<a b c d e f>.map: { 42 }; say %h;
camelia {}
irced is pondering the whatever code. 04:00
04:00 curan joined
irced m: my %h=<a b c d e f>.map: { $^a => 42 } 04:02
camelia ( no output )
irced growls at camelia. 04:03
m: my %h=<a b c d e f>.map: { $^a => 42 }; say %h;
camelia {a => 42, b => 42, c => 42, d => 42, e => 42, f => 42}
irced that's more like it.
m: my %h=<a b c d e f>.map: { $_ => 42 }; say %h;
camelia {a => 42, b => 42, c => 42, d => 42, e => 42, f => 42}
irced unfortunely i can't add directly to the Hash with the map call 04:05
astronavt tobs what is the | doing here? and is the \ meaning something other than const? 04:06
irced m: my %h=<a b c d e f>.map: { $_ => 42 }; %h.append: <g h i j k>.map: { $_ => 9}; say %h; 04:07
camelia {a => 42, b => 42, c => 42, d => 42, e => 42, f => 42, g => 9, h => 9, i => 9, j => 9, k => 9}
irced i know what you're thinking tobs
irced is becoming quite the mind reader.
tobs astronavt: the \args could be $args I suppose. The second backslash in \() constructs the Capture. The | "slips" the capture into the call, i.e. applies the arguments contained in it instead of passing a single Capture object to the sub. 04:09
astronavt hm. why use \ for two completely unrelated tasks? 04:12
irced why not just make the args a list? i haven't seen \ but i'm a newbie 04:13
04:13 [Sno] left
irced m: my $args = $(2, 3, 4, 5, 6, 7, 8, 9 10); say min(@$args); say max(@$args); 04:13
camelia 5===SORRY!5=== Error while compiling <tmp>
Two terms in a row
at <tmp>:1
------> 3my $args = $(2, 3, 4, 5, 6, 7, 8, 97⏏5 10); say min(@$args); say max(@$args);
expecting any of:
infix stopper
irced m: my $args = $(2, 3, 4, 5, 6, 7, 8, 9, 10); say min(@$args); say max(@$args);
camelia 2
tobs irced: in this case, sure, but a Capture lets you collect positional and named arguments for more complicated calls. 04:17
irced tobs: ok, i'll keep that in mind. thanks! 04:18
04:20 tejr joined 04:24 Juerd joined
tobs astronavt: I'm not sure. To go out on a limb, they both feel like escaping in a way: \args makes the variable forgo the container that would come with a sigil, and \() reminds of a sub call but avoids the call part. 04:27
But I guess deep down (or even down on earth), they're completely unrelated, yeah.
irced earth, the only planet where you can wake up to the sound of birds coughing 04:28
04:28 Juerd_ joined 04:29 Juerd left, Juerd_ is now known as Juerd
astronavt does perl 6 have partial function application aka currying 04:42
and can you use multiple Captures in a function call?
m: my \args1 = \(1, 2); my \args2 = \(3, 4); say min(|args1, |args2); 04:43
camelia 1
tobs currying can be done with the .assuming method on Callables 04:46
m: sub inc ($x, :$step = 1) { $x + $step }; my &big-step = &inc.assuming(step => 100); say big-step 5
camelia 105
tobs the docs on assuming have cooler examples 04:47
astronavt m: sub inc ($x, :$step = 1) { $x + $step }; my \step10 = \(:$step = 10); say inc(3, |step10); 04:48
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '$step' is not declared
at <tmp>:1
------> 3ep = 1) { $x + $step }; my \step10 = \(:7⏏5$step = 10); say inc(3, |step10);
astronavt do Captures support named arguments?
tobs m: sub inc ($x, :$step = 1) { $x + $step }; my \step10 = \(step => 10); say inc(3, |step10); 04:49
camelia 13
astronavt ah
05:15 sauvin joined 05:31 robertle left 05:36 irced left
Elronnd how can I easily check if two lists are equal? I could use eq but that seems expensive 05:36
I added a debug line to my program, saying "say "Max of @numbers[] is ", max(@numbers);", and it says "Max of 0 30 55 80 33 150 is 80". I can't reproduce it in a repl, though; if I make a list containing those numbers, it says correctly that the max is 150 05:55
interestingly, if I coerce it to int by saying @numbers=@numbers.map(+*) first, it works fine 05:57
06:00 reportable6 left 06:02 reportable6 joined
tobs Elronnd: eqv checks equivalence recursively, so you can use it to compare arrays. But beware that eqv is different from e.g. == when you get down to comparing the elements of the two arrays. 06:02
m: use Test; ok [1,2,3] eqv [1,2,3]; nok [1,2,3] eqv [1,3,2]; nok [1,2,3] eqv [[1],2,3] 06:03
camelia ok 1 -
ok 2 -
ok 3 -
tobs m: say 1 == "1"; say 1 eqv "1" # avoid eqv if you want to be lax with types though 06:04
camelia True
Elronnd ahh, cool 06:05
tobs as for the 150 vs. 80 thing, I can only hope that "150" is just some other object that prints as "150" but numifies to something less than 80, no idea though :) 06:06
sweval: say (1,50) 06:08
06:35 marcel_ joined 06:40 rindolf joined 06:47 [particle]1 joined 06:49 [particle] left 06:50 ambs joined
Elronnd tobs: it's just command-line args 06:50
the only thing I can think of is it has a newline at the end or something--but, it coerces fine to int when I do it by hand 06:51
ufobat__ is there another way of building URIs from parts (esp query parameters) without string fiddling? I think URI doesn't do the job since github.com/perl6-community-modules.../issues/27 06:57
07:01 sena_kun joined
Geth doc: d32bc48de2 | Antonio++ | 35 files
fix more links #561
Elronnd how can I make a list be mutable?
I keep getting errors that it's immutable
m: my @x = -1 xx 3 xx 3; @x[1][1] = 1; 07:20
camelia Cannot modify an immutable List ((-1 -1 -1))
in block <unit> at <tmp> line 1
AlexDaniel El_Che: what fix? You have another one?
El_Che: As I said, it's *in* the release 07:21
El_Che: if it's still flapping, then either my change is not enough, or there's something else going on
lizmat Elronnd: that smells like a bug to me
Elronnd yayy 07:22
my first compiler bug in this language!
lizmat m: my @x = [-1 xx 3] xx 3; @x[1][1] = 1; dd @x 07:23
camelia Array @x = [[-1, -1, -1], [-1, 1, -1], [-1, -1, -1]]
lizmat Elronnd: ^^ workaround, or the way to do that I guess
Elronnd yah
07:26 lichtkind joined
lichtkind any objection to rename Math::Matrix to Math::Matrix::Bundle ? 07:27
07:27 [particle]1 left, [particle] joined
lizmat lichtkind: would that contain "Math::Matrix", or will that also be a module in the ::Bundle,. but with fewer features > 07:28
in other words: will "use Math::Matrix" do the same thing as before, or not? 07:29
if not, maybe put an :api<2.0> on the module long name ?
lichtkind lizmat: i want to have a vector lib of seemingless interop, an extra matrix array lib for bare bones matrices and ousource decomposition in its own lib but still include it plus some other things 07:30
it will stll be same distro just rename it
lizmat that was clear to me from your blog post
if it will be the same distro, why rename it ? 07:31
07:31 marcel_ left 07:32 noisegul joined
lichtkind im still unsure but im not sure either im allright with doing all this under now name 07:32
lizmat if you are unsure... I think you need to find out why that is 07:33
07:34 Sgeo_ joined 07:37 Sgeo__ left, adu left, dakkar joined 07:38 adu joined 07:39 [particle] left
lichtkind lizmat: beause this will be about slightly more just bare matrices but dont want to put in too much like geometry or qantum stuff, frankly i dont have the head for it now, just figured how crout LU out of regular so that i can use one single algorythm for both and gtting as bonus crout with P, what many math dont provide 07:43
07:43 chloekek joined 07:44 zakharyas joined 07:46 ilbelkyr joined 07:52 sena_kun left 08:06 dolmen joined 08:09 dolmen left 08:10 dolmen joined
lichtkind lizmat: so ypu opinion is rather change it not? 08:17
lizmat lichtkind: I think the emphasis should be on not breaking existing code that uses Math::Matrix 08:18
if you can do that with a rename, then by all means, go for it if you think it is necessary 08:19
if you can not, then I'd suggest thinking about a way that you can make sure existing code won't break
or not do the rename
Elronnd is there anything in the standard library to rotate a 2-d array? That is, to turn something 3x4 into something 4x2 08:20
lichtkind Elronnd: not that i know of , so you want method that creates rotation matrices? 08:23
i actually thought about that
Elronnd basically, yeah
err, 4x3. Not 4x2
moritz [Z] iirc
lichtkind Elronnd: like a camera matrix 08:24
moritz m: my @a = [1, 2, 3, 4], [5, 6, 7, 8]; my @b = [Z] @a; say @b
camelia [(1 5) (2 6) (3 7) (4 8)]
moritz m: my @a = [1, 2, 3, 4], [5, 6, 7, 8]; my @b = [Z] @a; say @b.map: *.Array 08:25
camelia ([1 5] [2 6] [3 7] [4 8])
moritz that's transposing the AoA
lichtkind neat thanks moritz 08:27
m: my @a = [1, 2, 3, 4], [5, 6, 7, 8], [9,10,11,12]; my @b = [Z] @a; say @b 08:29
tadzik so, who's coming to Perlcon next week? :)
camelia [(1 5 9) (2 6 10) (3 7 11) (4 8 12)]
lichtkind Elronnd: but you sought a matrix that performs a certain angle? 08:32
tadzik: me
Elronnd nope 08:38
[Z] does exactly what I want
although I wonder...
m: my @a = [[[1, 2], [3, 4]], [[5, 6], [7, 8]]], [[[9, 10], [11, 12]], [[13, 14], [15, 16]]]; say [Z] @a; 08:41
camelia (([[1 2] [3 4]] [[9 10] [11 12]]) ([[5 6] [7 8]] [[13 14] [15 16]]))
Elronnd ahh, it only rotates in 2 dimensions
chloekek m: my @a = [[[1, 2], [3, 4]], [[5, 6], [7, 8]]], [[[9, 10], [11, 12]], [[13, 14], [15, 16]]]; say [ [Z] ] @a; 08:51
camelia 5===SORRY!5=== Error while compiling <tmp>
Two terms in a row
at <tmp>:1
------> 0312]], [[13, 14], [15, 16]]]; say [ [Z] ]7⏏5 @a;
expecting any of:
infix stopper
statement en…
chloekek m: my @a = [[[1, 2], [3, 4]], [[5, 6], [7, 8]]], [[[9, 10], [11, 12]], [[13, 14], [15, 16]]]; say [[Z]] @a;
camelia (([[1 2] [3 4]] [[9 10] [11 12]]) ([[5 6] [7 8]] [[13 14] [15 16]]))
08:54 [particle] joined 09:12 satori__ left, reach_satori joined 09:30 ravenousmoose left, ravenousmoose joined 09:34 ravenousmoose left 09:52 pilne left 09:58 pat_js joined 10:01 ravenousmoose joined
tyil I have a role with a method that contains `$?CLASS.^name.split("::").tail.fc`, adding this role to a class and calling this method returns the name of the role, however, I want it to return the name of the class 10:13
does someone know of a way to get this behaviour?
chloekek tyil: $?CLASS refers to the lexically enclosing class or role. I think you can use self instead? 10:17
p6: role R { method m { self.^name } }; class C does R { }; say C.m; say C.new.m
camelia C
tyil yep, that works
I wasn't thinking simple enough, thansk chloekek 10:18
10:26 ufobat__ left 10:27 marcel_ joined 10:28 ufobat joined
cpan-p6 New module released to CPAN! Template::Prometheus (0.1.0) by 03TYIL 10:31
10:41 dolmen left 10:43 dakkar left, dakkar joined 10:49 Black_Ribbon left 10:55 AlexDaniel is now known as test{}, test{} is now known as AlexDaniel
chloekek tyil: today you and I learned 11:07
tyil it resulted in Template::Prometheus, which is going to be used by App::CPAN's API to expose Prometheus metrics :>
I'm now comtemplating how to expose modules themselves on this api
chloekek Prometheus is nice. I wish to use it for my project as well. 11:08
tyil there's a module for that now :>
I need to open up a reverse proxy for grafana with guest permissions, so people can openly check the metrics Im keeping rn 11:09
and for the P6weekly I want to be able to easily generate a list of modules that have been added since a given date
also need to work on importing modules from github, as rn I'm only keeping track of stuff uploaded to CPAN 11:10
chloekek I'm working on using Perl 6 library with the Nix package manager and I can now use almost all of those that are on CPAN. A part of this is creating an index of all the archives with their hashes, and I want to host this somewhere with a nice GUI. 11:11
tyil I have an index of all distributions, but I don't have hashes on them, I think
chloekek And it seems that Cro::HTTP is on CPAN, which means I can now use it with Nix, so I'll be using that for the GUI. :) 11:12
Eventually I also want to run tests for all the packages in CI, and generate documentation. 11:13
tyil extra testing would be convenient tbh 11:14
it's easy to miss something somewhere I've learned :p
El_Che prometheus is so nice that I use its format without Prometheus for now. Wrote a small parser for nagios to read prometheus-ready endpoints ;)
11:14 mowcat joined
tyil oh yeah, that should be easy 11:14
it's just plaintext after all :p
chloekek Perl 6 grammar for Prometheus data is probably six lines of code.
tyil depends on whether you want to parse the HELP and TYPE info 11:15
if you drop that, you can shorten it by another 3 or 4 lines :p
chloekek It's fun to work on Perl 6 tooling, in Perl 6, and it's also an excellent task for Perl 6. 11:16
tyil it's fun to work with p6 in general tbh :p 11:17
if my metrics aren't complete shite, I'm apparently #3 in number of unique modules uploaded to CPAN 11:18
timotimo wowzer 11:22
chloekek Also having source code search with Perl 6 regexes would be very nice. 11:23
Basically metacpan :P 11:24
tyil possibly a feature of App::CPAN, if I find the time
timotimo greppable6: use .* :i aa
greppable6 timotimo, Found nothing!
timotimo greppable6: use .* :i ww
greppable6 timotimo, Found nothing!
timotimo greppable6: use.*ww
greppable6 timotimo, 49 lines, 19 modules: gist.github.com/295a2abf8e5d333e72...e67998b11a
tyil neat 11:25
timotimo don't forget we have a perl6-all-modules repository, too :)
tyil I need to work through all META6.jsons to gather all the metadata Im keeping
I'm unsure if github will like me firing off a thousand requests at them every couple minutes 11:26
11:26 wbn left
timotimo yeah, the module updater thingie in modules.perl6.org has a little bit of code to honor github rate limits 11:26
11:26 dolmen joined
timotimo they tell you exactly what your remaining quota is in http headers in every response 11:26
tyil that should help
timotimo the modules updater takes like an hour 11:27
and that's not because perl6 is slow; the updater is written in perl5 actually
tyil mine will be written in p6 :>
I'd like to prefer "new" modules over "updated" modules if it takes so much time, though
timotimo the machine it runs on also currently has only one core, so parallelizing wouldn't do very much 11:28
11:28 jeek_ is now known as jeek
tyil my machines have 2 cores, 4gb ram iirc 11:28
with the kubernetes master having 4 cores, but nothing gets scheduled on that
could run stuff on my desktop with 8 cores if it really needs more cores, tho 11:29
11:29 wbn joined
chloekek tyil: do you have a link to App::CPAN or is it not yet open source? 11:30
tyil gitlab.com/tyil/perl6-app-cpan/pipelines
chloekek Thanks! 11:31
tyil let met update the api branch, so it's a bit more up to date
wonder if I can get Cro to use something like `where` stuff on get/post endpoints 11:35
lizmat subsets work, so why wouldn't where work ?
tyil oh, nice
I hadn't looked into it yet, was just wondering 11:36
lizmat that's one of the points of cro, I would say
that you can use all of the Perl 6 dispatch features to do your routing
tyil now I wonder how I'd access headers to check in a where clause
11:36 mowcat left 11:37 ChoHag joined
lizmat you probably should ask this on #cro :-) 11:37
tyil probably
11:38 pat_js left
lizmat I guess something like `where request.header('Foo') eq 'bar'` 11:38
11:38 zakharyas left 11:42 lichtkind_ joined 11:45 lichtkind left 11:47 MilkmanDan left 11:48 MilkmanDan joined 12:00 reportable6 left 12:03 reportable6 joined, ChanServ sets mode: +v reportable6 12:09 aborazmeh joined, aborazmeh left, aborazmeh joined
timotimo plasma-umass.org/doppio-demo/ - if rakudo.js doesn't work out for some unknown reason, we can just use rakudo-jvm in the browser with this 12:16
chloekek Or just use <applet> :D 12:18
timotimo what is this, the 80s? 12:21
12:43 mowcat joined
chloekek Ah, the Web in the 90s. No SPAs. 12:43
timotimo .o( i put the spa in spaß ) 12:46
12:49 pamplemousse joined
El_Che New 2017.07.1 pkgs: github.com/nxadm/rakudo-pkg/releas...v2019.07.1 (repo link: github.com/nxadm/rakudo-pkg#os-repositories). It took some time because of flapping tests on low resource travis VMS (mostly i386 is problematic) 12:52
Weekly: New 2017.07.1 pkgs: github.com/nxadm/rakudo-pkg/releas...v2019.07.1 (repo link: github.com/nxadm/rakudo-pkg#os-repositories). It took some time because of flapping tests on low resource travis VMS (mostly i386 is problematic)
weekly: New 2017.07.1 pkgs: github.com/nxadm/rakudo-pkg/releas...v2019.07.1 (repo link: github.com/nxadm/rakudo-pkg#os-repositories). It took some time because of flapping tests on low resource travis VMS (mostly i386 is problematic)
notable6 El_Che, Noted! (weekly)
El_Che better, sorry for the spamming
chloekek I got a nice name for my Perl 6 archive listing tool: p6al (pronounce: sixal), short for Perl 6 archive listing. 13:00
13:01 marcel_ left 13:04 marcel_ joined 13:10 zakharyas joined 13:11 curan left 13:12 marcel_ left, mowcat left 13:13 aborazmeh left
tyil cpan.svc.tyil.net/api/v1/modules?s...T00:00:00Z base thing works 13:17
now I want it to become a json response if the client requests json output
Guest37021 El_Che: New 2017.07.1 pkgs - is that a typo? 13:26
El_Che yes 13:30
weekly: New 2019.07.1 pkgs: github.com/nxadm/rakudo-pkg/releas...v2019.07.1 (repo link: github.com/nxadm/rakudo-pkg#os-repositories). It took some time because of flapping tests on low resource travis VMS (mostly i386 is problematic)