»ö« 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
middle
five
finished
00:24
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
middle
five
finished
timotimo m: given 5 { say "before"; when 1 { say "one"; proceed }; say "middle"; when 5 { say "five"; proceed }; say "end" }; say "finished"
camelia before
middle
five
end
finished
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)
(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
(Any)
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?
pairs
pairup
path
tail

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
10
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
whatever
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
infix stopper
s…
irced m: my $args = $(2, 3, 4, 5, 6, 7, 8, 9, 10); say min(@$args); say max(@$args);
camelia 2
10
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
False
Elronnd ahh, cool 06:05
thanks
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
07:18
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
thx
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
infix stopper
postfix
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
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)
notable6 El_Che, Noted! (weekly)
13:37 afresh1 joined 13:48 marcel_ joined 13:49 marcel_ left
AlexDaniel El_Che: so, can you file a ticket? 13:51
or should we reopen the old one
13:51 robertle joined, marcel_ joined 14:07 ravenousmoose left 14:09 ravenousmoose joined
chloekek tyil: nice 14:15
14:18 ravenousmoose left 14:20 tokomer joined 14:25 lucasb joined 14:29 marcel_ left 14:31 ravenousmoose joined 14:54 [Coke] joined, Cabanossi left, [Coke] left 14:57 ChoHag left 14:59 marcel_ joined 15:01 Cabanoss- joined
Geth doc: 8d9a5cb5cd | Antonio++ | 33 files
all links element working #561
15:03
15:21 robertle left 15:22 pat_js joined 15:29 pamplemousse left 15:54 Sgeo__ joined 15:55 wildtrees joined 15:57 Sgeo_ left 15:59 mowcat joined 16:00 wildtrees left 16:01 wildtrees joined, mowcat left 16:05 mowcat joined, mowcat left 16:10 mowcat joined 16:15 pat_js left, wildtrees left 16:17 wildtrees joined 16:19 wildtrees left 16:35 dakkar left 16:37 chloekek left
AlexDaniel m: say <foo bar baz>.fmt: ‘%s %s %s’ 16:39
camelia Your printf-style directives specify 3 arguments, but 1 argument was supplied
in block <unit> at <tmp> line 1
AlexDaniel what am I missing?
ahhh
I need sprintf instead of fmt, I guess
thanks 16:40
16:59 robertle joined 17:05 wamba joined 17:25 Sgeo_ joined 17:29 Sgeo__ left 17:31 chloekek joined 18:00 reportable6 left 18:01 tokomer left 18:02 reportable6 joined 18:03 wamba left
tony-o_ m: say <foo bar baz>.fmt: '%s' 18:04
camelia foo bar baz
tony-o_ m: say <foo bar baz>.fmt: '%s', ', '
camelia foo, bar, baz
18:07 zakharyas left 18:13 yqt joined 18:14 dolmen left 18:25 [Sno] joined 18:28 sauvin left 18:31 pilne joined 18:47 aindilis left 18:55 xi- joined 19:08 aindilis joined 19:16 cpan-p6 left, cpan-p6 joined, cpan-p6 left, cpan-p6 joined 19:19 sena_kun joined
robertle I am wondering about linting and highlighting of perl6 code. Is there not a way to make the compiler dump some form of AST with line/column location attached that can be used for this? 19:26
19:27 lucasb left
lizmat perl6 --target=ast or --target=optimize ? 19:28
Elronnd doesn't seem to provide location information 19:29
robertle still a really good start, I bet it has the location and just doesn't print it 19:31
timotimo perhaps use EVAL with target => parse or ast
19:33 reach_satori left, reach_satori joined 19:35 zakharyas joined
chloekek I run Perl 6 programs from a read-only file system which means that it cannot generate caches. 19:36
Is there a way to control where to put the MoarVM bytecode cache? 19:37
robertle don't get the EVAL idea, is 'target' a named param to EVAL? it does not seem to do anything, or I am doing it wrong...
chloekek Including Cro::HTTP takes like ten seconds. :D
robertle m: EVAL('my $a = 3 +3', target => 'parse')
camelia ( no output )
timotimo chloekek: try out my nested_stagestats branches for nqp and rakudo and use --stagestats and you'll see what exactly it's precompiling when/why 19:38
robertle or you could put the caches onto the read-only filesystem together with the source files, that's what debian does for perl6 packaged 19:39
tyil tfw `%foo.bar.map(...).&to-json` is only allowed if it's all on one line
is there some way to allow the `to-json` call to be on a different line?
chloekek robertle: how would I generate those?
timotimo m: sub do-it($a) { }; (1, 2, 3).pairs.map({ .value => .key })\␤.&do-it 19:41
camelia ( no output )
timotimo tyil: looks like unspace does it
chloekek Oh it seems to put them in my home directory anyway.
So it does precompile stuff.
robertle with great pain :) salsa.debian.org/perl6-team/rakudo...l.template
but it seems your problem has gone away anyway :) 19:42
chloekek Oh no it doesn't, just creates ~/.perl6/shrt.
tyil timotimo: I think that only works if the following line also contains no indentation
timotimo m: sub do-it($a) { }; (1, 2, 3).pairs.map({ .value => .key })\␤ .&do-it
camelia ( no output )
tyil I have a less-than-elegant solution, I think 19:43
wrap everything before in ( )
and have the ) and .&to-json be next to eachother
timotimo it does seem to work with indentation on camelia, i'd probably have to see the full code to see what the difference is
tyil I can push that
timotimo: gitlab.com/tyil/perl6-app-cpan/blo...es.pm6#L40 19:45
19:48 pamplemousse joined
robertle oh, perl6 --target=syntaxcheck is quite interesting as well! 19:49
chloekek It seems that precompiled sources go into lib/.precomp 19:51
19:51 pamplemousse_ joined
tyil heh, found a minor bug in vim-perl6 syntax highlighting, if you have `qq:to/EOF/.&foo`, the `.&foo` is highlighted as a string value, instead of a &function call 19:53
19:54 pamplemousse left 19:56 pamplemousse_ is now known as pamplemousse
chloekek RAKUDO_MODULE_DEBUG=1 prints a bunch of "Trying to load" lines but nothing indicates that Rakudo attempts to store bytecode anywhere. 19:58
robertle perhaps a bit low-level and old-school, but strace could give you a second opinion 20:01
20:02 Black_Ribbon joined
robertle so the file you are running under perl6 is on a read-only filesystem? or "just" the modules it's loading? 20:02
chloekek All the Perl 6 code is on a read-only file system, yeah. 20:03
But it does try to look for modules in ~/.perl6/precomp.
Here's a dump: gist.github.com/chloekek/662298a1c...28f5fa1949 20:08
Is it even supposed to do precompilation when doing a normal run with perl6 my-app.p6? 20:12
Or do I somehow have to issue a separate command to precompile?
20:15 [particle]1 joined 20:16 dolmen joined, [particle] left
robertle you normally do not need to do anything to get the precompiled, I am just not sure whether it will cross from one "repository" to another to save precomp files. probably not. so it will only try to put the precomp where it found the source, which is read-only. perhaps, just guessing 20:17
20:18 |Sno| joined 20:20 [Sno] left, zakharyas left
chloekek That's probably what's happening, yes. 20:22
robertle I guess there is no secret namespace or so that contains the code under rakudo/src/Perl6? I would love to just "use" the Grammar...
tyil timotimo: it seems like it auto-jsons if I cast the Seq to a List
chloekek I think I can precompile the libraries I use. 20:23
It'll take some work, I'll try it. 20:24
robertle if you want to try the debian script, be careful around the __COMPILER__ part, that gets filled in with a string depending on your rakudo and moar versions 20:26
chloekek My directory names are fully specified by the build inputs, and I use absolute paths to Rakudo, NQP and MoarVM, so that shouldn't be an issue. :) 20:28
robertle not sure that's true, it's more about the directory names *within* the precomp directory...
but just play with it... 20:29
hm, perhaps you could use /usr/share/perl6/tools/install-dist.p6 instead of the debian script, that's really the heart and the debian script may be mostly stuff you don't need, like uninstallation and upgrade support, and ordering dependencies 20:30
20:32 mowcat left
chloekek If I change the version of Rakudo, then the path to the precomp directory will also change, since the path is determined by the hash of all build inputs. 20:37
tyil does anyone have a suggestion toavoid the repitition here: gitlab.com/tyil/perl6-app-cpan/blo...es.pm6#L62
I feel like there should be a way to not have to type the same variable name 3 times
20:38 marcel_ left
lizmat is it a defined value in there always > 20:39
?
$_ = DateTime.new($_) with %params<since>; 20:40
$_ = +$_ with %params<skip>
the latter would also work for 0 20:41
not sure whether that would be a bug or a feature
tyil: ^^
20:41 |Sno| left
tyil that would be a feature for me 20:42
20:43 [Sno] joined
tyil that seems to work, thanks lizmat :D 20:43
the method it gets passed to also that value on 0 by default, so it doesn't really have any impact if %params<skip> is 0 20:45
it just demands it to be an Int
lizmat you can also do this with `without`:
m: my %h; $_ = 42 without %h<a>; dd %h
camelia Hash %h = {:a(42)}
tyil cool 20:47
once this endpoint is done I should be able to make a script to generate the list with new and updated modules on a weekly basis
lizmat whee! :-) 20:48
tyil though I should probably also start parsing the github modules to have a complete list 20:49
20:51 kensanata joined 20:55 pamplemousse left, pamplemousse joined
chloekek robertle: this script? github.com/rakudo/rakudo/blob/mast...ll-dist.p6 20:55
I have no idea what repositories and repository registries are, I'll have to look those up. 20:58
20:58 |oLa|1 left
chloekek But I don't think I really need to go through so much trouble just to precompile modules. 20:59
robertle that's the script I meant yes
21:01 pamplemousse left
chloekek Do you know what the --for flag does? 21:03
21:04 Sgeo_ left
chloekek If I run install-dist.p6 --from=<distribution> --for=site --to=<repository> then it does put precomp in <repository> so that's something :) 21:04
21:09 Altai-man_ joined
robertle I think you want to set --for=vendor, but to be honest I can't remember why 21:10
21:10 irced joined
robertle perhaps this has some details: wiki.debian.org/Perl6PreCompProposal 21:11
21:11 sena_kun left
robertle right, "site" means a package locally installed on this machine, and "vendor" that the distribution installed it 21:12
so technically you are "site" but I guess eitehr would work
chloekek Thanks, that makes some sense. :)
Should PERL6LIB point to the repository? 21:13
Ok, apparently Rakudo can't cope with PERL6LIB entries being symbolic links. 21:15
Or maybe it can.
irced chloekek: what does your PERL6LIB environment variable look like (echo) ? 21:16
chloekek That'll be difficult to explain, but I'll try. 21:19
irced say what?
chloekek I'm trying to integrate Perl 6 libraries into Nix, and every library gets its own directory. So for instance, when building Crypt::Random (which depends on if), my current attempt at PERL6LIB is this value: 21:20
/nix/store/1gm6qn1dm5n21qsd7nlbdp8mmpd48ssp-Crypt-Random/share/REPOSITORY,/nix/store/1gm6qn1dm5n21qsd7nlbdp8mmpd48ssp-Crypt-Random/share/DISTRIBUTION,/nix/store/ffr2nnkpygvr86dsavr9pz6nvcxggdx7-if/share/REPOSITORY,/nix/store/ffr2nnkpygvr86dsavr9pz6nvcxggdx7-if/share/DISTRIBUTION
Where REPOSITORY contains the output of install-dist.p6, and DISTRIBUTION the extracted tarball from CPAN
(or the GitHub repo in case of ecosystem) 21:21
But it fails to install with this error: gist.github.com/chloekek/f8f6e67be...ef5e2a4fd4 21:23
irced in the REPL, is that the output of put %*ENV<PERL6LIB> ?
21:24 yqt left
irced ${rakudo}/bin/perl6 -e "put %*ENV<PERL6LIB>" 21:25
chloekek Yep.
Ran that command and it prints the same string.
I'm not sure if PERL6LIB is supposed to point to repository? Or only to distributions? 21:26
irced is thinking. 21:27
i'm a little rusty with my bash but see if the following outputs DOES NOT EXIST for any of those paths 21:34
echo $PERL6LIB | tr ',' "\n" | while read -r line; do test -e $line; if test "$?" != 1]; then echo "$line DOES NOT EXIST"; fi; done
it's sloppy and will output a DOES NOT EXIST for empty entries, but if the path is prefixed then you know
PERL6LIB is a search path for modules, as far as i know 21:35
tejr If only there were a language that was historically very good at splitting text on arbitrary patterns 21:36
tyil cpan.svc.tyil.net/api/v1/modules?name=App::CPAN :D
irced if only :-p
tyil searching works
irced if only there was a regular way to express such a thing 21:37
irced coughs.
tyil also added a readiness probe, so the old pod wont be killed before the new one is usable
irced is beefing up regex but is currently a scrawny little punk. 21:38
chloekek irced: they all exist (I fixed your script first)
irced chloekek: let's see the fixed script! you can msg me if you prefer 21:39
chloekek: anyway, have you inspected the $*REPO object ? can't speak to it except it is supposed to give info on your search paths etc.
chloekek irced: gist.github.com/chloekek/db2bf0082...21d1443cdb 21:40
irced well done, thanks!
chloekek Ah interesting, $*REPO 21:41
CompUnit::Repository::FileSystem.new(prefix => "/nix/store/vsdqb8rcj9mbhkg3i841m5p5v1kf24di-Crypt-Random/share/REPOSITORY") 21:42
irced chloekek: it might be heavy object though. but after you have ruled out search paths it might have more to offer you to solve this problem.
chloekek I think that's just the first entry in PERL6LIB since that directory is still empty before calling install-dist.p6
Yeah, if I prepend /tmp/FOO, to PERL6LIB then $*REPO is /tmp/FOO 21:43
irced This variable holds information about modules installed/loaded.
chloekek Ah, repo-chain 21:45
irced chloekek: oh, i think the meat of it is in CompUnit::Repository::Filesystem and not the variable itself
chloekek $*REPO.repo-chain starts out with all those entries in PERL6LIB in the same order.
irced chloekek: cool, you are inspecting the object. better than icould have 😃 21:46
chloekek: how did you list its methods?
El_Che it could be rakudo: twitter.com/hmemcpy/status/1151890...67328?s=21
irced chloekek: although your specific issue is not 100% clear to me, might I suggest checking for the presence of a duplicate pm6 ? 21:47
a duplicitous duplicate 21:48
try saying that 20 times real fast in a row
chloekek irced: I just looked on google and somebody mentioned repo-chain
21:50 netrino joined
chloekek It seems like the installation ignores other repos. 21:52
timotimo this has nothing to do with having to put inst# in front of a path in pERL6LIB, right 21:53
chloekek Perhaps something here is fishy: github.com/rakudo/rakudo/blob/082c...n.pm6#L257 21:54
21:56 netrino left 21:57 netrino joined
chloekek If I put inst# in front of the repository path then it tries to put precomp files in the distribution path (which fails since I made it readonly). 21:57
lol, '/nix/store/dqm6wh6kgvv0c90k0hjrfhaq6iz33l9b-App-cp6t-meta6-to-nix/share/REPOSITORY/short/7DD8090C3B9BC53A154EBA4D8954E2046FCAF6B4' is a directory, cannot do '.open' on a directory 21:59
22:03 lichtkind_ left 22:06 Xliff joined
chloekek timotimo: what does inst# mean? 22:07
Ah, should I put that in front of paths to installations 22:12
22:20 pamplemousse joined
timotimo basically "which class that implements CompUnitRepo is used here" 22:21
inst is the short name that CompUnitRepo::Installation gets
chloekek What if no prefix is given? 22:22
timotimo i think that's a CompUnitRepo::LocalFile or something 22:23
22:23 Sgeo joined
chloekek AAaah 22:27
install-dist.p6 sets next-repo for the installation to site 22:28
That's why it can't find the other PERL6LIB entries
22:29 caasih_ joined
chloekek I got it working now, I think. 22:30
22:30 timeless_ joined
chloekek Alright, irced I must *not* pass --for to install-dist.p6, and I must pass --to=inst#... and also include inst# in PERL6LIB where relevant 22:30
22:31 casdr_ joined, obfusk__ joined 22:32 BinGOs_ joined
irced chloekek: cool 22:34
chloekek: thanks for sharing
chloekek: not for nothing, but here's a rafactored (posix compliant) bash... (IFS=","; for i in $PERL6LIB; do if ! [ -e $i ]; then echo "$i DOES NOT EXIST"; fi; done; ) 22:35
now the question is, how to achieve the same in perl6 in a handful of lines or less
essentially, what's the IFS equivalent in perl6. i know, use regex, i'm getting to that level ... ... 22:36
chloekek %*ENV<PERL6LIB>.split(‘,’).grep(!*.IO.e).map({“$_ DOES NOT EXIST”.say}) 22:37
22:37 caasih_ is now known as caasih, timeless_ is now known as timeless, BinGOs_ is now known as BinGOs, BinGOs left, BinGOs joined
irced chloekek: sweeeeet! 22:37
Kaiepi for the people not in the discord, i wrote an implementation of an identity monad that satisfies the three monad laws gist.github.com/Kaiepi/f1888cd8c53...90a983338e
chloekek Awesome, I can now build my program and it runs in 1s instead of 15s. :)
Here's the final result: github.com/chloekek/cp6t/blob/6fe4...ix#L22-L64 22:38
irced chloekek: how could i forget those fundamentals! split a string and grep a type (although the grep part might have been easier to forget) 22:39
Kaiepi shame i can't really write anything that does the monad role without nqp because of the ACCEPTS method. having its attributes be public would sort of defeat the purpose of it being a monad
22:39 dotdotdot left
Kaiepi maybe there's a better way to write it so monads both don't make anything public and can be compared against one another 22:40
irced err grep smart match anyway 22:42
chloekek Now I can use Cro::HTTP with all libraries managed through Nix. :) I'm so happy! Thanks for the help timotimo++ irced++ robertle++
irced nice!
Xliff Um.... 22:43
timotimo great!
Xliff From latest perl6: "Stage optimize : -0.009" -- O_o
timotimo haha, oops
Xliff *snrk*
Kaiepi optimizing so hard it finishes before it starts
Xliff 2019.07.1-105-g082c09e0e 22:44
22:44 dotdotdot joined
Xliff I doubt I will be able to reproduce it. 22:44
Kaiepi is the value of an Attribute public? 22:46
oh, looks like you can pass an object to Attribute.get_value to get it 22:48
perfect, then i can make monads' ACCEPT method not require nqp
22:51 dolmen left 22:52 pamplemousse left 22:54 kensanata left
Altai-man_ >monads 22:55
we have them now?
22:55 Altai-man_ is now known as sena_kun
chloekek once wrote I/O monad in COBOL 22:56
timotimo i mean a monad doesn't have terribly much to it
that's why all the blog posts a la "monads are like burritos"
chloekek doesn't trust monad tutorials that aren't in terms of Kleisli composition 22:57
ugexe %*ENV<PERL6LIB>.split(‘,’).grep(!*.IO.e) <-- but not all compunit repos have to provide .IO or be backed by the filesystem at all 22:59
so you kinda have to use $*REPO to do that stuff right
23:00 pamplemousse joined
ugexe use lib "CompUnit::Repository::Github#user<ugexe>#repo<zef>#branch<master>#/"; 23:00
so you could also have values like that in PERL6LIB
irced ugexe: thanks for the observation! 23:01
Xliff ooo!
chloekek p6: say 「!!! THIS IS A GENERATED FILE !!!」.chars == 「DO NOT UPDATE THIS FILE MANUALLY」.chars # extreme satisfaction
camelia True
irced wow what symmetry 23:02
Xliff Does Attribute.set_value do something similar to: nqp::bindattr(nqp::decont(self), GActionEntry, '$!name', nqp::decont( $val )); 23:03
ugexe PERL6LIB="CompUnit::Repository::FileSystem#." perl6 -e '...' works just like PERL6LIB="." perl6 -e '...'
23:08 sena_kun left, sena_kun joined
Xliff Will Obj.^attributes always return attributes in definition order? 23:08
m: Class A { has $.a; has $!b; has $.c; has $!z; has %.y }; .name.say for A.^attributes; 23:09
camelia 5===SORRY!5=== Error while compiling <tmp>
You cannot declare attribute '$.a' here; maybe you'd like a class or a role?
at <tmp>:1
------> 3Class A { has $.a7⏏5; has $!b; has $.c; has $!z; has %.y };
expecting any of:
Xliff m: class A { has $.a; has $!b; has $.c; has $!z; has %.y }; .name.say for A.^attributes;
camelia $!a
$!b
$!c
$!z
%!y
23:10
Xliff m: class A { has $.a; has $!b; has $.c; has $!z; has %.y }; .name.say for A.^attributes;
camelia $!a
$!b
$!c
$!z
%!y
Xliff looks like! :D
irced m: class A { method blah { "blah blah" }; }; say A.^methods; 23:11
camelia (blah BUILDALL)
irced claps appreciatively.
m: say $*REPO.^methods; 23:12
camelia (writeable-path can-install name upgrade-repository install uninstall files candidates resolve need resource id short-id loaded distribution installed precomp-store precomp-repository load repo-chain new path-spec source-file Str gist perl WHICH next-…
irced m: say $*REPO.^methods.eager;
camelia (writeable-path can-install name upgrade-repository install uninstall files candidates resolve need resource id short-id loaded distribution installed precomp-store precomp-repository load repo-chain new path-spec source-file Str gist perl WHICH next-…
irced chloekek: see that?
ugexe m: say .path-spec for $*REPO.repo-chain; 23:16
camelia inst#/home/camelia/.perl6
inst#/home/camelia/rakudo-m-inst-1/share/perl6/site
inst#/home/camelia/rakudo-m-inst-1/share/perl6/vendor
inst#/home/camelia/rakudo-m-inst-1/share/perl6/core
ap#
nqp#
perl5#
23:16 chloekek left
irced m: say $REPO.repo-chain.$mro; 23:16
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '$mro' is not declared
at <tmp>:1
------> 3say $REPO.repo-chain.7⏏5$mro;
irced m: say $REPO.repo-chain.^mro;
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '$REPO' is not declared
at <tmp>:1
------> 3say 7⏏5$REPO.repo-chain.^mro;
irced m: say $*REPO.repo-chain.^mro;
camelia ((List) (Cool) (Any) (Mu))
ugexe repo-chain is a linked list
irced m: say $*REPO.repo-chain.^name; 23:17
camelia List
irced k, thanks
m: say $*REPO.repo-chain.perl
camelia (CompUnit::Repository::Installation.new(prefix => "/home/camelia/.perl6"), CompUnit::Repository::Installation.new(prefix => "/home/camelia/rakudo-m-inst-1/share/perl6/site"), CompUnit::Repository::Installation.new(prefix => "/home/camelia/rakudo-m-ins…
23:35 netrino left 23:39 Xliff left 23:44 nepugia joined 23:45 aborazmeh joined, aborazmeh left, aborazmeh joined 23:51 rindolf left 23:52 Black_Ribbon left 23:53 Black_Ribbon joined 23:54 Black_Ribbon left, Black_Ribbon joined