»ö« 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:05 proc joined 00:09 Sgeo__ joined 00:11 formalin14 joined 00:13 Sgeo_ left 00:18 Manifest0 left 00:25 Manifest0 joined 00:30 Manifest0 left 00:35 Manifest0 joined 00:39 yht left 00:41 Manifest0 left 00:47 Manifest0 joined 00:50 formalin14 left 00:51 formalin14 joined 00:52 Manifest0 left 00:57 Manifest0 joined 01:05 Manifest0 left 01:09 Manifest0 joined 01:11 noisegul_ joined 01:15 noisegul left 01:16 Manifest0 left 01:20 molaf left 01:21 formalin14 left, Manifest0 joined, formalin14 joined 01:22 pounce joined 01:30 Manifest0 left 01:32 epony left, molaf joined 01:35 Manifest0 joined 01:39 formalin14 left, Manifest0 left 01:40 formalin14 joined 01:44 Manifest0 joined 01:45 leont left 01:50 leont joined 01:55 leont left 01:56 Manifest0 left 02:02 Manifest0 joined 02:09 Manifest0 left 02:17 Manifest0 joined 02:21 epony joined 02:24 Manifest0 left
Kaiepi i'm going to release the Failable type i wrote to the ecosystem as-is 02:25
i was originally going to write a generic sum type module but i figure this is a useful enough feature on its own to merit being a separate module
02:29 Manifest0 joined 02:37 Manifest0 left 02:40 Cabanossi left 02:42 Manifest0 joined 02:45 pounce left 02:46 Manifest0 left 02:51 Cabanossi joined 02:52 Manifest0 joined 02:59 Manifest0 left 03:02 formalin14 left 03:04 formalin14 joined 03:07 Manifest0 joined 03:14 Manifest0 left
Geth ecosystem: 211201fac7 | (Ben Davies)++ (committed using GitHub Web editor) | META.list
Remove Kaiepi's modules from META.list

They're already on CPAN
03:18
03:19 Manifest0 joined 03:27 aborazmeh joined, aborazmeh left, aborazmeh joined 03:36 Manifest0 left 03:41 Manifest0 joined
Geth ecosystem: b6c82b2bef | (Ben Davies)++ (committed using GitHub Web editor) | META.list
Temporarily add Kaiepi's Failable module to META.list

I uploaded a buggy release of Failable to CPAN and am stuck waiting a few days since I don't want to version bump so I can reupload sooner
03:46
04:06 Manifest0 left 04:08 [Sno] left 04:10 cooper joined, Manifest0 joined 04:15 Manifest0 left 04:21 Manifest0 joined, cooper left 04:24 mowcat left 04:25 formalin14 left 04:32 Manifest0 left 04:37 Manifest0 joined 04:40 khisanth_ left 04:41 Manifest0 left 04:42 khisanth_ joined 04:47 Manifest0 joined 04:52 vrurg left 04:53 vrurg joined 04:54 Manifest0 left, tbrowder joined 04:59 Manifest0 joined 05:03 Manifest0 left 05:08 Manifest0 joined 05:15 Manifest0 left 05:16 dustinm`_ left, dustinm`_ joined 05:21 Manifest0 joined 05:26 molaf left 05:44 Manifest0 left 05:45 Elronnd joined 05:48 aborazmeh left 05:49 Manifest0 joined 05:50 formalin14 joined, xinming left 05:51 xinming joined 05:57 Manifest0 left 06:01 Manifest0 joined 06:03 squashable6 left 06:08 squashable6 joined, ChanServ sets mode: +v squashable6 06:10 squashable6 left 06:13 squashable6 joined, ChanServ sets mode: +v squashable6 06:22 Manifest0 left 06:27 Manifest0 joined 06:31 Manifest0 left 06:32 Xliff left 06:37 Manifest0 joined 06:39 patrickb joined 06:57 robertle_ joined 07:02 Manifest0 left, domidumont joined 07:09 [particle]1 joined, Manifest0 joined 07:10 [particle] left 07:16 Manifest0 left 07:20 Manifest0 joined 07:21 veesh joined 07:26 someuser joined 07:27 Manifest0 left 07:36 Manifest0 joined 07:40 Manifest0 left 07:46 Manifest0 joined 07:48 scimon joined 07:50 Manifest0 left, leont joined 07:58 Manifest0 joined 07:59 xiaoyafeng joined 08:04 zakharyas joined, ravenousmoose left, ravenousmoose joined 08:05 Manifest0 left, someuser left 08:10 proc left, Manifest0 joined 08:13 leont left 08:18 Manifest0 left 08:19 antoniogamiz joined
antoniogamiz morning o/ 08:19
ugexe: you told me subtest 'message' => {
ugexe: but you use subtest {}, 'message' 08:20
is there a reason for this?
moritz thinks message first reads better 08:22
it tells the reader what the subtest block is about upfront
antoniogamiz I think the same!
but I was asking because the second way is used in zef and I wanted to know if there was any particular reason 08:23
08:24 Manifest0 joined 08:28 khisanth_ left 08:29 sena_kun joined
sena_kun 08:30
08:37 domidumont left, Manifest0 left 08:43 domidumont joined, pecastro joined, Manifest0 joined 08:44 khisanth_ joined 08:58 domidumont1 joined 09:01 domidumont left 09:02 someuser joined 09:03 Manifest0 left 09:06 ravenousmoose left, ravenousmoose joined 09:08 Manifest0 joined
El_Che I am writing someone small in Perl 6 at work. I must say it survives Marie Kondo as it brings me joy :) 09:11
09:12 Manifest0 left 09:15 Black_Ribbon left
sena_kun s/someone/something/? 09:18
El_Che it's a complete autonomous AI
or maybe a short script :)
need coffee
:)
09:19 Manifest0 joined
El_Che I have been writing Go lately for some small projects, mostly because of available libs 09:19
it's fun to write perl 6 and use it 09:20
sena_kun: hopefully with your work, perl 6 will be the lang-to-go for ldap code :) 09:21
sena_kun: hopefully your talk will be recorded 09:22
sena_kun El_Che, lang-to-go is maybe an exaggeration, I mean, you can't really invent something new there, just a useful utility. (high hopes scare me) 09:25
El_Che well, you need a lang with good libs for simple stuff
so when someone says LDAP code, you know what stack to use :) 09:26
lizmat antoniogamiz: the message => { } was added relatively recently (that's the reason) 09:27
antoniogamiz lizmat: oh I see, thanks! :D 09:28
09:29 noisegul joined 09:32 noisegul_ left 09:34 noisegul left, noisegul joined 09:36 jkramer left
Kaiepi there are two ways to do subtests? 09:43
i always did it subtest 'test-name' -> { }
09:43 someuser left
sena_kun subtest {}, 'test-name'? 09:44
Kaiepi or something like that, i'd have to check
nope, none of the above 09:45
subtest 'test-name', { }
antoniogamiz I know these two: subtest "" => { 09:48
}
and subtest {}, "";
09:52 Manifest0 left
Kaiepi m: use Test; plan 1; subtest 'foo', { plan 1; pass 'ok'; } 09:54
camelia 1..1
1..1
ok 1 - ok
ok 1 - foo
10:00 Manifest0 joined 10:04 sena_kun left 10:14 domidumont joined 10:16 domidumont1 left 10:18 domidumont left 10:20 Voldenet left
antoniogamiz what is the fastest way to check if two hashes objects are equal? 10:21
or the "shortest" way in perl6
10:22 AlexDaniel left, AlexDaniel joined 10:25 Voldenet joined, Voldenet left, Voldenet joined
jnthn %h1 eqv %h2 10:28
yoleaux 00:20Z <AlexDaniel> jnthn: what do you think about this commit? The same test is in 6.c-errata (so it needs a change also). github.com/perl6/roast/commit/d60f...0250243809
01:06Z <vrurg> jnthn: I think I have R#3040 finalized and ready for merge. Would you please have another look at it?
synopsebot R#3040 [open]: github.com/rakudo/rakudo/pull/3040 Implement support for defining new symbols in CORE.e.setting
10:34 Manifest0 left 10:39 Manifest0 joined 10:53 aborazmeh joined, aborazmeh left, aborazmeh joined
antoniogamiz jnthn: ty 10:53
11:06 ravenousmoose left
ugexe antoniogamiz: like 5 years ago subtests could only be written that way 11:08
11:10 antoniogamiz left
ugexe Kaiepi: fat comma can be used in place of comma usually 11:11
Kaiepi fat comma? 11:12
ugexe en.m.wikipedia.org/wiki/Fat_comma 11:13
=>
11:20 kaare_ joined 11:22 zakharyas left 11:30 aborazmeh left 11:32 Manifest0 left 11:35 kensanata joined, ravenousmoose joined 11:36 formalin14 left 11:37 Manifest0 joined, __jrjsmrtn__ left 11:41 molaf joined 11:54 Manifest0 left 11:59 Manifest0 joined 12:04 kensanata left 12:13 rindolf joined 12:30 Manifest0 left 12:32 veesh left 12:34 domidumont joined 12:35 rindolf left 12:36 Manifest0 joined, rindolf joined 12:41 veesh joined
El_Che jnthn: giving Comma a test run. The redish-orange colour for variables and subs feels problematic as it looks to closed to a detected error. I know I can change Intellij colours, but thinking about sensible defaults here. 12:48
.tell sena_kun giving Comma a test run. The redish-orange colour for variables and subs feels problematic as it looks to closed to a detected error. I know I can change Intellij colours, but thinking about sensible defaults here.
yoleaux El_Che: I'll pass your message to sena_kun.
jnthn Errors are displayed consistently as underlines 12:50
I wonder if we can make it a little more orange, though 12:51
jnthn was never quite so happy with the colors in the light theme compared to the dark theme
El_Che jnthn: yes, it's clearly not an error, but it instinctly feels like that. 12:52
jnthn Oh, curious, on my display it looks very much orange and not at all red. 12:53
12:53 nepugia joined
El_Che because other languages don't use redish colours for vars and subs 12:53
jnthn We don't use it for vars, I don't think, only subs/methods 12:54
Unless I've got some custom configuration here that I forgot about...
El_Che sorry, indeed
12:54 Itaipu left
El_Che let me screen shot, it's orange all right, but in the redish realm 12:54
jnthn I suspect we're seeing the same, and it's either a difference of display or color perception :) 12:55
(My eyes are weird in more than one way, so... :))
El_Che claudio.ulyssis.be/var/tmp/comma.png 12:56
I think it's a perception thing
jnthn Yeah, I think so too :)
El_Che I know it's not read, but my brain yells: ERROR! ERROR!
jnthn That looks the same to me
(same as mine)
El_Che that's good thing :) 12:57
jnthn Curious: does the darker red for infix operators not bother you?
e.g. is the problem "it's bright and somewhere close to red"?
El_Che yes, redish tones have the error connotation
looking at other code
12:59 lizmat_ joined
jnthn Much of the trouble is picking which things to assign distinct colors to. I remember going through the dozens of syntax elements we can assign colors to and trying to group them in some sensible way. :) 12:59
13:00 evalable6 left, notable6 left, statisfiable6 left, sftp left
El_Che ok, for go intellij uses dark blue for keywords, green for strings, light purple for constants and default colour for vars and subs 13:00
light blue for ints
jnthn Loads of questions come up if you do that. Like "should prefix and infix operators get different colors 'cus folks sometimes confuse them", etc. :)
13:00 sftp joined
El_Che the perl 6 plugin uses a lighter variant of orange 13:00
jnthn: p6 is a difficult case as it's more concentrated and more expressive 13:01
lizmat_ weekly: www.linkedin.com/pulse/perl-future...s-rehsack/
jnthn Default color for vars/subs is...failing to highlight one of the most important program elements.
13:01 lizmat left
jnthn El_Che: Yeah, it's difficult alright :) 13:01
El_Che I would love that colours match for p5, p6, go and java :)
but that's utopia
:) 13:02
jnthn Well, it *is* entirely configurable, but yeah, that orange could certainly be tweaked so it's less likely to be perceived as an error.
13:02 xinming left
El_Che jnthn: anyway, just an opinion, maybe I am the only one wired like that. I just believe default matter 13:03
defaults
13:03 xinming joined
jnthn They do, though as noted, if I'm putting effort into Comma defaults, the first one is "default to the dark theme" :) 13:03
13:03 domidumont1 joined
El_Che jnthn: and to think I used to like you 13:03
:P
jnthn But of course for those who prefer the light one, we can tweak it. 13:04
Heh, well, I wear glasses that darken automatically when I go out, and further so in the sun, and the light theme makes me want to put my glasses on :) 13:05
13:05 AlexDaniel left
jnthn As noted, my eyes are weird in more ways than one :) 13:05
13:05 AlexDaniel joined
jnthn El_Che: I've opened an issue to suggest looking at making us not use such a red-y orange there, anyways 13:06
13:06 domidumont left
jnthn Maybe there's another more appropriate color/ 13:06
13:13 zakharyas joined 13:14 veesh left 13:15 Manifest0 left
El_Che jnthn: maybe I am the only one left using light themes :) 13:15
jnthn Well, if it's the default, you won't be the only one... :) 13:16
lizmat_ fwiw, I would be using light themes 13:19
13:19 lizmat_ is now known as lizmat
lizmat on my new MBP, the colour temperature is automatically changed in an artificial light environment 13:21
it's quite amazing :-)
El_Che lizmat: I disable that, it drives me crazy 13:22
(although I program on Linux most of the time)
lizmat I love it...
.oO( diff'rent strokes :-)
13:23 Manifest0 joined
El_Che we both like Wendy, so that's something 13:23
lizmat but I like her more :-) 13:24
El_Che lizmat: you don't know that :)
El_Che ducks
lizmat I know where you live :-) 13:25
13:26 ravenousmoose left 13:30 natrys joined 13:33 lucasb joined 13:35 Manifest0 left 13:40 Manifest0 joined, rindolf left 13:42 antoniogamiz joined 13:45 nepugia left 13:48 rindolf joined 13:49 ravenousmoose joined 13:56 Manifest0 left 13:57 __jrjsmrtn__ joined
woolfy Hey hey, I guess I am the only one who dislikes Wendy the most! She is not a nice person when you really get to know her. So please stop that nonse, you two! 13:58
13:59 evalable6 joined 14:01 Manifest0 joined, ravenousmoose left, notable6 joined, ChanServ sets mode: +v notable6 14:02 statisfiable6 joined, Xliff joined
Xliff \o 14:02
What does it mean when I can "use A::B::C" just fine, but when I do this -=> "my $c := try require ::("A::B::C")" and $c turns out to be Nil? 14:03
14:09 Manifest0 left 14:14 Manifest0 joined 14:23 domidumont joined, molaf left 14:24 Manifest0 left 14:25 domidumont1 left
jnthn If you remove the `try`, what error do you get? 14:27
(or note $/ after it) 14:28
14:30 Manifest0 joined
nine AlexDaniel: that commit includes an NQP bump. Did you bisect NQP, too? 14:35
14:36 Manifest0 left
nine Oh, it's only one new commit anyway 14:36
14:37 Cabanossi left 14:41 Manifest0 joined
nine So, how would one create a NativeRef (StrLexRef) in the first place? 14:45
14:46 Manifest0 left
timotimo have a sub that takes a "str $foo is rw" 14:47
though it's not guaranteed to get a LexRef, since the optimizer could have turned your lexical into a local for optimization reasons 14:48
nine woolfy: What about this: sub foo ($foo is rw) { ... }; my str $f = "foo"; foo($f)
Err....timotimo ^^^ 14:49
lizmat yeah, that would be a strange question for woolfy
nine woolfy: I don't think anybody's going to get to know you well enough to dislike you ;)
timotimo that'll quite likely get a StrLocalRef, is that's actually a thing
try to get a scope in there that prevents the lex-to-local optimization 14:50
14:50 Cabanossi joined 14:51 Manifest0 joined 14:55 khisanth_ left 14:57 scimon left 14:59 domidumont left, domidumont joined 15:02 wildtrees joined 15:03 Manifest0 left
nine Ok, the string it trips over is "symbol" 15:04
timotimo that seems like a very ordinary string 15:05
(i missed all of the context)
lizmat somehow this reminds me of a mini-computer system of way back when that had "SYSTEM" as its master password
antoniogamiz ugexe: can I use * when specifying a ifle in the resources entry of META6.json?
nine My theory is that somewhere a StrLexRef gets used as the name of a method added through the MOP. Cro::LDAP (which I broke) uses ASN::META which...uses the MOP 15:07
15:08 khisanth_ joined 15:09 Manifest0 joined 15:13 domidumont left 15:14 patrickb left 15:21 robertle_ left 15:22 Guest43313 left 15:28 success joined, success is now known as Guest59723
nine Alas I can't find the place that'd do this and all mitigations I've tried so far fail 15:33
timotimo nine: that sounds like all that would have to be done is put a decont_s or unbox_s or whatever in the right spot 15:34
you're on ryzen, right? that'd mean no support for rr :(
nine yep
15:34 Manifest0 left
nine Oooooh! decont_s does the trick! 15:36
timotimo :) :)
nine timotimo++ 15:37
timotimo stand back, i know nqp
15:39 Manifest0 joined
Kaiepi wait there are typed decont ops? 15:40
timotimo yup
Kaiepi does that mean no more having to type nqp::unbox_s(nqp::decont($str)) and the like? 15:43
15:43 zakharyas left
timotimo hm, it might only work for native refs, not entirely sure 15:43
Kaiepi looks like it only works with native refs and... proxies i think? looking at how it's implemented in moarvm 15:45
timotimo so containers in general i suppose 15:46
which makes sense, since it's a decont op
Kaiepi m: use nqp; my Str $s = 'ayy lmao'; say nqp::decont_s($s) 15:47
camelia ayy lmao
Kaiepi oh i was misreading the code
timotimo can't know how much boxing/unboxing it puts in there
Kaiepi it works on containers in general, but it also works on any repr that stores a string 15:48
on moarvm at least
15:56 Manifest0 left
antoniogamiz is there a way to know the path of the perl6 file that is in execution? 15:58
timotimo there's a few different variables that give you that 16:00
like $?FILE or $?PROGRAM or something
m: say $?FILE; say $?PROGRAM
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '$?PROGRAM' is not declared
at <tmp>:1
------> 3say $?FILE; say 7⏏5$?PROGRAM
timotimo m: say $?FILE
camelia <tmp>
timotimo m: say $?EXECUTABLE
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '$?EXECUTABLE' is not declared
at <tmp>:1
------> 3say 7⏏5$?EXECUTABLE
timotimo m: say $?EXECUTEABLE
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '$?EXECUTEABLE' is not declared
at <tmp>:1
------> 3say 7⏏5$?EXECUTEABLE
antoniogamiz mmmm 16:01
lucasb m: say $*PROGRAM
camelia "<tmp>".IO
antoniogamiz is using *
timotimo ah
antoniogamiz ty! :D
16:02 Manifest0 joined 16:13 antoniogamiz left 16:17 [Sno] joined 16:19 Manifest0 left 16:24 [Sno] left 16:25 Manifest0 joined, [Sno] joined 16:33 nepugia joined 16:34 Manifest0 left 16:38 Manifest0 joined
Geth ¦ problem-solving: AlexDaniel assigned to jnthn Issue Running some scripts without any input sometimes leads users to believe that the program is hanging github.com/perl6/problem-solving/issues/60 16:53
16:56 Itaipu joined
TreyHarris what's the right way to do the moral equivalent of `$obj.method // $default` when $obj may not implement .method? 17:06
jnthn $obj.?method // $default 17:07
TreyHarris whoah, I totally missed that methodop existed
wait, how can it be a methodop? nqp magic?
17:08 pamplemousse joined
TreyHarris Ah, thank you docs: "Technically, not a real operator; it's syntax special-cased in the compiler." 17:10
Damn, though; I got excited there for a minute thinking about the possibilities
17:11 chromisx joined
Geth ¦ problem-solving: AlexDaniel assigned to jnthn Issue Ambiguity in pseudo-package and package reaction on missing symbols. github.com/perl6/problem-solving/issues/58 17:14
17:19 Manifest0 left 17:24 Manifest0 joined 17:27 Itaipu left 17:28 chromisx left, Manifest0 left 17:34 Manifest0 joined 17:43 Manifest0 left
Kaiepi m: none(Int, Str) ^ Num 17:45
camelia WARNINGS for <tmp>:
Useless use of "^" in expression "none(Int, Str) ^ Num" in sink context (line 1)
Kaiepi m: say (none(Int, Str) ^ Num) ~~ Num
camelia False
Kaiepi shouldn't this be True?
ohh wait nvm 17:46
Num also matches none(Int, Str)
m: say (none(Int, Str) ^ Int) ~~ Int
camelia True
17:48 Manifest0 joined 17:53 Manifest0 left 17:58 Manifest0 joined 17:59 Itaipu joined 18:18 sena_kun joined
sena_kun 18:18
yoleaux 12:48Z <El_Che> sena_kun: giving Comma a test run. The redish-orange colour for variables and subs feels problematic as it looks to closed to a detected error. I know I can change Intellij colours, but thinking about sensible defaults here.
Kaiepi so there's ^ for one junctions, | for any, & for all, but why is there nothing for none? 18:27
i may be getting them mixed up but i know there's no operator for none junctions
18:28 Manifest0 left 18:29 Sauvin left
moritz none is just negated any 18:31
and we ran out of ASCII chars for infix operators
18:32 Manifest0 joined
nepugia have to use nonprintable ones eh? ;) 18:37
Geth doc: AlexDaniel assigned to JJ Issue Create a "How to blog about Perl 6" page here. github.com/perl6/doc/issues/2898
AlexDaniel self-unassigned Create a "How to blog about Perl 6" page here. github.com/perl6/doc/issues/2898

alanrocker++ created pull request #2899: Update syntax.pod6
18:43
Xliff jnthn: If I remove the try, it won't compile. 18:48
"Undeclared routinew: require used at line 1"
timotimo m: require("foo") 18:49
camelia Could not find foo in:
inst#/home/camelia/.perl6
inst#/home/camelia/rakudo-m-inst-2/share/perl6/site
inst#/home/camelia/rakudo-m-inst-2/share/perl6/vendor
inst#/home/camelia/rakudo-m-inst-2/share/perl6/core
ap#
nqp#…
timotimo ah, not like that then
Xliff What does it mean when I can "use A::B::C" just fine, but when I do this -=> "my $c := try require ::("A::B::C")" and $c turns out to be Nil?
^^
timotimo it's very weird it'd fail the syntax there 18:50
Xliff I know.
timotimo the "undeclared routine require"
18:51 sena_kun left
Xliff I'm on 3.1.664 18:51
Think another brew is in order?
18:51 sena_kun joined
ugexe m: BEGIN my $c := try require ::("Test"); say $c 18:53
camelia (Mu)
ugexe m: my $c := try require ::("Test"); say $c
camelia (Test)
Xliff ugexe: Yeah. jnthn was asking what would happen without the try. 18:54
ugexe: So I can use "A::B::C" just fine, but when I do my $c := try require ::("A::B::C") I get Any. How can I find out what went wrong? 18:55
ugexe try 18:56
my $c := (try require ::($ = "Test"));
i dunno why it would work. i just do that alot so i assume there is a reason
Xliff OK. Now Any has turned into Nil 18:57
What's the latest version of rakudo? 18:58
Trying to figure if I should brew and see if I can get anything more out of this code.
timotimo 2019.03.1-680-g82fc4e570 - but i'm not totally at the newest version i think 18:59
wildtrees whats a good url fetching module for perl6? Net::HTTP seems to not want to get the same url more than once
tadzik what about HTTP::UserAgent?
Xliff *shrug*.. OK. 19:00
Nothing seems to get this working. I am at a loss.
19:07 Manifest0 left
Xliff timotimo: 2019.03.1-685-gf13ac2c03 19:08
19:11 Manifest0 joined
Xliff Ah... now my module gives me this when I try and "use" it: "Use of uninitialized value $repo-id of type Any in string context." 19:14
ugexe Net::HTTP gets the same url more than once for me 19:16
wildtrees I tried it from a repl, ugexe 19:21
19:24 xiaoyafeng left
Xliff timotimo: 2019.03.1-685-gf13ac2c03 19:24
^^ Latest
19:27 tomaw joined 19:43 vrurg left 19:44 Manifest0 left
nine m: my $c := try require ::("A::B::C"); dd $c; say $! 19:46
camelia Nil
Could not find A::B::C at line 0 in:
inst#/home/camelia/.perl6
inst#/home/camelia/rakudo-m-inst-2/share/perl6/site
inst#/home/camelia/rakudo-m-inst-2/share/perl6/vendor
inst#/home/camelia/rakudo-m-inst-2/share/perl6/core…
nine m: my $c := try require ::("Test"); dd $c; say $!
camelia Test
(Any)
19:46 vrurg joined 19:50 Manifest0 joined
TreyHarris m: multi order(Cool:D(Numeric) $num --> Int) { return log10($num).round(1) }; say order(3000); 19:52
camelia Ambiguous call to 'order(Int)'; these signatures all match:
:(Cool:D(Numeric):D $num --> Int)
:(Cool:D(Numeric):D $num --> Int)
in block <unit> at <tmp> line 1
TreyHarris What am I doing wrong there?
SmokeMachine Hi! is there a way to require a path? 19:55
I mean, something like: ```require "./my_code.pm6"``` 19:56
19:56 sena_kun left 19:57 Elronnd left, Elronnd joined
nine m: multi order(Cool(Numeric) $num --> Int) { return log10($num).round(1) }; say order(3000) 20:01
camelia 3
nine SmokeMachine: yes 20:03
SmokeMachine nine, how?
TreyHarris nine: I did notice that, but I don't understand. Cool(Numeric:D) works, too 20:06
m: multi order(Cool(Numeric:D) $num --> Int) { return log10($num).round(1) }; say order(3000); say order(Int); 20:07
camelia 3
Type check failed in binding to parameter '$num'; expected Numeric:D but got Int (Int)
in sub order at <tmp> line 1
in block <unit> at <tmp> line 1
TreyHarris m: multi order(Cool(Numeric) $num --> Int) { return log10($num).round(1) }; say order(3000); say order(Int);
camelia 3
Cannot resolve caller log(Int:U: Num:D); none of these signatures match:
(Real:D: *%_)
(Real:D: Real $base, *%_)
(Numeric:D: Cool $base, *%_)
(Numeric:D: Numeric $base, *%_)
in sub order at <tmp> line 1
in block <un…
nine m: use lib "/home/camelia/rakudo-m-2"; require Test:file<lib/Test.pm6>; # SmokeMachine
camelia ( no output )
SmokeMachine nine: thank you! 20:08
TreyHarris So `Cool(Numeric:D)` appears best from an error-reporting standpoint at least. But why is `Cool:D(Numeric)` no good?
nine TreyHarris: no idea. The implementation of concrete types is a bit odd at times. They appeared rather late and I guess that still shows 20:10
timotimo huh, why does wakelift.de not show up when google-searching for "perl 6 programming"? 20:16
ah crap
it says "a perl programming language blog"
that'd do it
20:16 Black_Ribbon joined
timotimo ok, fixed that 20:17
fwiw, on my try it still gave less than 5k results 20:19
nine TIOBIzation of blogs? 20:27
wildtrees ugexe, hmm yea Net::HTTP::GET works fine multiple times from a script, though not at the repl 20:29
timotimo i mean i already put "a perl programming language blog" in there for tiobe 20:36
Xliff tiobe? 20:37
Oh. The index. 20:38
20:46 Manifest0 left 20:52 Manifest0 joined
Geth doc: f45282d8da | alanrocker++ (committed using GitHub Web editor) | doc/Language/syntax.pod6
Update syntax.pod6

Explicitly specify legal bounding characters for multi-line comment blocks.
20:52
synopsebot Link: doc.perl6.org/language/syntax
Geth doc: b157bd5bbd | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | doc/Language/syntax.pod6
Merge pull request #2899 from alanrocker/patch-1

Update syntax.pod6
Xliff Is ::?CLASS the only way to get a class object out of a class definition? 20:54
self.^name might work for my purposes, too. 20:55
20:57 wildtrees left
Xliff Weird. I was able to get one object back from the whole "my $c := try require ::("A::B::C") # $c === Nil" thing by changing the name and commenting a lot of code until it loaded. 20:58
Then uncommenting the code in stages until there were no comments.
WAT?!?!
Kaiepi m: class Foo { say OUR.^name } 20:59
camelia Foo
Xliff Kaiepi++
21:03 natrys left 21:09 |Sno| joined 21:12 Manifest0 left, [Sno] left 21:16 natrys joined, Manifest0 joined 21:27 rindolf left 21:30 wildtrees joined 21:35 rindolf joined 21:38 Seance[m] joined
Seance[m] Hey Folks, got a question on perl6 hashes that seems really basic 21:39
Xliff ((1…100).rotor(1 => 1).flat.rotor(2 => 1).flat)
m: ((1…100).rotor(1 => 1).flat.rotor(2 => 1).flat)
camelia ( no output )
Xliff m: ((1…100).rotor(1 => 1).flat.rotor(2 => 1).flat).say
camelia (1 3 7 9 13 15 19 21 25 27 31 33 37 39 43 45 49 51 55 57 61 63 67 69 73 75 79 81 85 87 91 93 97 99)
Seance[m] given 'my %hashname = 'A' => 0;'
why does print %hashname['A'] throw an error
timotimo because you use [] for positional access, i.e. numbers
you want {} for key access 21:40
Seance[m] ' cannot convert string to number'
Xliff m: ((1…100).rotor(1 => 1).say
camelia 5===SORRY!5=== Error while compiling <tmp>
Unable to parse expression in parenthesized expression; couldn't find final ')' (corresponding starter was at line 1)
at <tmp>:1
------> 3((1…100).rotor(1 => 1).say7⏏5<EOL>
expecting a…
timotimo if your keys are literals in the code, you can use < > for that purpose (unless they have spaces in them, which < > will split into multiple)
Xliff m: (1…100).rotor(1 => 1).say
camelia ((1) (3) (5) (7) (9) (11) (13) (15) (17) (19) (21) (23) (25) (27) (29) (31) (33) (35) (37) (39) (41) (43) (45) (47) (49) (51) (53) (55) (57) (59) (61) (63) (65) (67) (69) (71) (73) (75) (77) (79) (81) (83) (85) (87) (89) (91) (93) (95) (97) (99))
Seance[m] oof, ruby biting me again
thanks
timotimo :)
Xliff m: (1…100).rotor(3 => 1).flat.say
camelia (1 2 3 5 6 7 9 10 11 13 14 15 17 18 19 21 22 23 25 26 27 29 30 31 33 34 35 37 38 39 41 42 43 45 46 47 49 50 51 53 54 55 57 58 59 61 62 63 65 66 67 69 70 71 73 74 75 77 78 79 81 82 83 85 86 87 89 90 91 93 94 95 97 98 99) 21:41
Xliff m: (1…100).rotor(2 => 1).flat.say
camelia (1 2 4 5 7 8 10 11 13 14 16 17 19 20 22 23 25 26 28 29 31 32 34 35 37 38 40 41 43 44 46 47 49 50 52 53 55 56 58 59 61 62 64 65 67 68 70 71 73 74 76 77 79 80 82 83 85 86 88 89 91 92 94 95 97 98)
Xliff m: (1…100).rotor(1 => 1).flat.say
camelia (1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99)
Xliff m: (1…100).rotor(1 => 3).flat.say
camelia (1 5 9 13 17 21 25 29 33 37 41 45 49 53 57 61 65 69 73 77 81 85 89 93 97)
Xliff m: (1…100).rotor(1 => 2).flat.say
camelia (1 4 7 10 13 16 19 22 25 28 31 34 37 40 43 46 49 52 55 58 61 64 67 70 73 76 79 82 85 88 91 94 97 100)
Xliff m: (1…100).rotor(1 => 3).flat.rotor(1 => 1).flat.say 21:42
camelia (1 9 17 25 33 41 49 57 65 73 81 89 97)
Xliff m: (1…100).rotor(1 => 2).flat.rotor(1 => 1).flat.say 21:43
camelia (1 7 13 19 25 31 37 43 49 55 61 67 73 79 85 91 97)
Xliff I missed the sequences squashie. :( 21:44
These are fun.
MasterDuke Xliff: still a bunch of sequences un-implemented... 21:45
Xliff Yeah. I can see.
21:50 pamplemousse left 22:06 Manifest0 left
Xliff What do Cro::WebApp templates render into? 22:06
rather.. compile into.
jnthn Xliff: They're compiled into Perl 6 (in memory, on first use, and then the compilation cached) 22:07
timotimo github.com/croservices/cro-webapp/...te/AST.pm6 - this spits out the code 22:08
jnthn You can ask that the whole lot is compiled up-front at startup if you'd rather pay the hit then rather than incrementally on first request
(Though for development you probably would prefer fast startup :)) 22:09
Xliff jnthn: Yah. Would rather pay the piper at startup.
jnthn: Have you done any benchmarking? 22:10
jnthn Then :compile-all when you specify the template location (it's documented :))
No
Xliff ah.
jnthn Well, aside from "I've been running it in production for a year" :P
("and nothing bad happened" :))
Xliff LOL!
jnthn: What about a Repository subclass that would use a database? 22:11
22:11 Manifest0 joined
lizmat weekly: yakshavingcream.blogspot.com/2019/...o-run.html 22:12
notable6 lizmat, Noted!
vrurg jnthn: What is the sense of line 'EVAL $code, context => CALLER::CALLER::CALLER::CALLER::CALLER::;' in Test.pm? Besides of this chain of CALLERs getting outside of all scopes... 22:14
ugexe lol
jnthn Xliff: To cache the compilations?
vrurg: Hope that somebody realizes string forms of eval-dies-ok and friends are just not worth it? :) 22:15
Xliff jnthn: To store the templates and cache the compilations. 22:16
vrurg jnthn: Well, I just realized that it causes tests to fail randomly because of Failure returned... ;)
Xliff Actually, want to store the templates in a database and use memcached to store the compilations
vrurg Just trying to figure out what to do about it. 22:17
jnthn Xliff: I think that's something for a separate module, but I'm happy to accept any changes in Cro::WebApp::Template that ease using a different repository.
Xliff jnthn: OK! I will put that on my growing bucket list.
jnthn++: Cro::WebApp looks interesting! Thanks for the hard work! 22:18
jnthn :)
I needed it for a $dayjob thing, and observed that some folks seemed to want something "built-in" for templating rather than just taking a templating engine and using it...hopefully it at least helps resolve that barrier to entry :) 22:20
22:26 Manifest0 left 22:31 Manifest0 joined 22:35 Manifest0 left 22:41 Manifest0 joined 22:49 Manifest0 left 22:54 Manifest0 joined, nepugia left 23:07 Manifest0 left 23:08 natrys left 23:12 Manifest0 joined
wildtrees anyone use perl6 with nixos? if so how do I get zef to find .so's for c libraries? 23:20
23:24 patrickb joined
timotimo may have to do the equivalent of installing the -dev package, which usually comes with a symlink named blahblah.so -> blahblah.so.9.3.2.1.5 23:24
23:25 patrickz joined
patrickz AlexDaniel: Where would I put documentation/files for building executable release packages? rakudo/tools/releasable? 23:26
AlexDaniel patrickz: is it too big for github.com/rakudo/rakudo/blob/mast..._guide.pod ? 23:28
23:28 dominix joined
patrickz I have separate README.md files. Also separate for Linux and Windows 23:28
and some scripts to be put into the windows release 23:29
AlexDaniel maybe create your own directory in tools/?
23:29 patrickb left
AlexDaniel tools/releasable is a bit special (read shitty) because it creates a bunch of files in the in that same directory and then cleans them… 23:29
patrickz ah ok. How would you name such a directory? I feel like I miss the the one snappy word. "binary release", "executable release" both don't hit it... 23:30
Kaiepi wildtrees, do you know anything about how library versioning works on nixos? is it like openbsd where it's practically meaningless? 23:33
AlexDaniel tools/build/binaries ?
wildtrees Kaiepi, I don't know about how the versioning work, I know most things go into a nix/store/crypto-hash-here-libname-versionname and then they are symlinked 23:36
Kaiepi rakudo's VM class might need some changes to work with nixos libraries 23:38
23:40 uzl joined
uzl Hello, everyone! How do you normalize a Unicode string in P6 as stated in this Python-related SO question? Is there a similar module in the ecosystem? 23:42
AlexDaniel uzl: which question? Strings are normalized by default 23:43
uzl AlexDaniel: I should've been more clear ;-). I mean, given a certain Unicode string how do I get the simplest Unicode entity for it? 23:46
23:46 rindolf left
timotimo oh, there's .NFG, .NFC, .NKFC, .NKFD methods on strings iirc 23:47
m: say "ä".NFD
camelia NFD:0x<0061 0308>
timotimo m: say "ä".NFC
camelia NFC:0x<00e4>
uzl timotimo: Oh, god! It seems I was looking too hard at only this page: docs.perl6.org/language/unicode I should've looked around more :-)! 23:49
Thanks!
AlexDaniel uzl: still, what do you mean by simplest unicode entity
strings are normalized by default, you'd always get a normalized string no matter what you do 23:50
timotimo arguably, NKFC gives you that :P
m: say "①".NKFD.Str
camelia No such method 'NKFD' for invocant of type 'Str'. Did you mean any of these?
NFC
NFD
NFKD

in block <unit> at <tmp> line 1
23:50 Kaiepi left
timotimo m: say "①".NFKD 23:50
camelia NFKD:0x<0031>
timotimo m: say "①".NFKD.Str
camelia 1
timotimo m: say "☺".NFKD.Str
camelia
23:50 Kaiepi joined
timotimo huh, that's not fun! :P 23:50
uzl AlexDaniel: Thanks for the clarification! 23:51
AlexDaniel a better question is how *not* to get that :)
because sometimes you do need to roundtrip stuff with as few modifications as possible
wildtrees now if my .so's are in a weird place, is there a way to specify that to zef install? do I need to specify it to perl6 as well? if tests fail with zef install does it fail to totally install the package? 23:52
timotimo you can force it to skip tests
i'm not sure if LD_LIBRARY_PATH is taken into account at all
uzl AlexDaniel: Totally! That'd be a good SO question. 23:53
AlexDaniel uzl: well, there's no good answer though 23:54
as regexes and other stringy functions are not implemented for Bufs
timotimo utf8-c8
AlexDaniel oooh actually, yeah…
yeah :)
23:57 lucasb left