»ö« 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:26 w_richard_w joined 00:30 patrickz left
MasterDuke timotimo: github.com/facebook/zstd/releases/tag/v1.4.0 00:40
00:45 arios joined
MasterDuke blog post i don't think i'd seen before about perl6 solutions to the weekly challenge #3 perl6.eu/regular-pascal.html 00:47
01:13 AlexDaniel left 01:16 mowcat left 01:42 netrino left
ugexe i tried to do the pi challenge polyglot... it didnt turn out so great 01:44
gist.github.com/ugexe/c0c447738bd9...8db7178dd2
finishes quickly in perl 5, but i'm not sure it'll ever finish running in perl 6 lol 01:45
its taken 5 minutes to print ~40 of the 1000+ digits so far 01:46
need a quicker way to do polyglot +</<< than eval 01:47
MasterDuke are many different values getting shifted by many different values? if not could you cache the results and then use those? 01:52
ugexe hey that did the trick 01:57
its still slow as shit but it finishes after a minute of doing nothing
$g = $bitshift_cache{$b} //= (bitshift($b, 1) - 1); 01:59
02:03 Manifest0 left
MasterDuke huh, that gives more digits when run with perl5 02:03
02:04 Manifest0 joined
ugexe try again. i must have made some not-so-superficial changes 02:09
MasterDuke ah, now it works with both 02:11
ugexe im not really familiar with this algorithm at all either. i used what was on rosetta code 02:13
MasterDuke whoops, segv when trying to profile 02:15
ugexe i only write code that cannot be profiled 02:16
MasterDuke sounds like a great way to preserve your anonymity 02:18
02:20 Kaiepi joined 02:22 w_richard_w left
Kaiepi so while debugging an issue with perl 6 on openbsd i may have accidentally found a vulnerability in the os that lets me read anything and everything in memory, completely disregarding anything that'd otherwise stop me from being able to do that 02:29
i'm really excited to write a proof of concept for it since it's not every day you get to hack what claims to be the most secure os
MasterDuke congrats? 02:30
timotimo: around?
Kaiepi dw i'm not doing anything malicious with this
02:36 Manifest0 left
ugexe i wonder if there is a way to create an infix << 02:39
#`() sub infix:<< << >>($a, $b) { $a +< $b }; or some such 02:40
02:42 Manifest0 joined
ugexe m: sub infix:«<<»(Int:D $a, Int:D $b) { $a +< $b }; say 1 << 1 02:42
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/KdgISISZTO
Unsuppo…
ugexe, Full output: gist.github.com/4d24c5ef730c30cb79...3e3c61114f
ugexe seems like i can't avoid the compile time error suggesting to use +<
should that error really be happening without p5isms? 02:46
then again its not exactly a p5ism so it also kinda makes sense 02:49
02:50 ctilmes left, ctilmes joined
MasterDuke maybe an `is tighter/looser` would make it work? 02:50
yeah, that's really a c++ism
03:06 Manifest0 left 03:08 Cabanossi left 03:13 xiaoyafeng joined 03:16 Manifest0 joined 03:17 Cabanoss- joined 03:19 dalek left
ugexe github.com/rakudo/rakudo/blob/7ee0...4017-L4019 03:22
while the error makes sense, i'm still unsure it should error when the infix has been defined by the user. 03:24
03:24 w_richard_w joined
ugexe those are the only lines calling .sorryobs 03:25
03:51 w_richard_w left
MasterDuke m: use isms; multi sub infix:«<<»(Int:D $a, Int:D $b) { $a +< $b }; say 1 << 1 03:57
evalable6 2
MasterDuke maybe the error should suggest `use isms`? 03:59
03:59 w_richard_w joined 04:24 arios left 04:26 Kaiepi left 04:29 AndroidKitKat joined 04:53 Manifest0 left 04:55 xiaoyafeng14 joined 04:57 Manifest0 joined 04:58 xiaoyafeng left 05:05 Manifest0 left 05:11 Manifest0 joined 05:14 xiaoyafeng14 left 05:15 kaare__ joined 05:26 kaare__ left, kaare__ joined 05:27 w_richard_w left 05:31 molaf joined 06:02 sauvin joined 06:06 kaare__ left 06:14 Manifest0 left 06:17 atweiden-air joined 06:19 Manifest0 joined 06:21 kaare__ joined 06:22 Kaiepi joined 06:27 domidumont joined 06:28 Manifest0 left 06:35 Manifest0 joined 06:38 kaare__ left, kaare__ joined 06:42 domidumont left 06:45 kaare__ left, kaare__ joined 06:49 atweiden-air left 06:53 kaare__ left 06:59 Geth left, sergot left, synopsebot left, Manifest0 left, dalek joined, ChanServ sets mode: +v dalek, Geth joined, synopsebot joined, ChanServ sets mode: +v Geth, ChanServ sets mode: +v synopsebot, p6lert joined 07:01 cpan-p6 left, cpan-p6 joined, cpan-p6 left, cpan-p6 joined 07:02 jmerelo joined 07:03 domidumont joined 07:05 Manifest0 joined 07:25 sftp left 07:29 reach_satori left 07:33 rindolf joined, Kaiepi left 07:38 xiaoyafeng14 joined 07:42 patrickb joined 07:51 Manifest0 left, ufobat_ joined 07:56 Manifest0 joined 08:02 Grrrr left, Grrrr joined 08:04 dakkar joined 08:18 sena_kun joined 08:21 zakharyas joined 08:28 sftp joined 08:41 kaare__ joined 08:58 ayerhart left 09:00 Black_Ribbon left 09:05 kaare__ is now known as kaare_
SmokeMachine m: PROCESS::<$*RED-DB> = 42; say PROCESS::<$*RED-DB> 09:22
evalable6 42
SmokeMachine m: $*RED-DB = 42; say PROCESS::<$RED-DB> 09:24
evalable6 (exit code 1) Dynamic variable $*RED-DB not found
in block <unit> at /tmp/gMjyHsuuH9 line 1
SmokeMachine m: my $*RED-DB = 42; say PROCESS::<$RED-DB>
evalable6 (Any)
timotimo ugh, i hate it when a command segfaults unless run under gdb 09:26
09:30 Kaiepi joined 09:39 ayerhart joined
Geth doc: 48e6e1820e | (JJ Merelo)++ | doc/Language/statement-prefixes.pod6
Adds quietly as statement prefix refs #2034
09:39
synopsebot Link: doc.perl6.org/language/statement-prefixes
jmerelo Don't want to get thick, but we really need help in the documentation. If you have a few minutes, or even an hour, to spare, take a look at the issues, and do whatever you can. 09:40
09:45 aborazmeh joined, aborazmeh left, aborazmeh joined
sena_kun jmerelo, are there any urgencies or a massive breakage ongoing? 09:48
10:05 Kaiepi left, domidumont left
jmerelo sena_kun: it's documentation, it's not like it's not going to compile or anything. But there's a massive backlog of 6.d features, for instance. 10:17
sena_kun: the issue for doing that is pinned. In many cases, it's only checking that the feature is mentioned correctly. 10:18
10:19 Manifest0 left
Geth doc: e42f3287a9 | (Zili Chen)++ (committed using GitHub Web editor) | resources/i18n/zh/README.zh.md
Sync README.zh.md with README.md
10:24
10:24 Manifest0 joined
jmerelo sena_kun: there are also parts of the language that are not covered. Just look for the issues < 1000 10:29
sena_kun jmerelo, well, I am doing a full shift, including overtimes, for Comma almost every day, and while I am not, I am working on ldap. :| There are certainly a lot of tickets for docs, but I have a feeling that people are working on what they find fun and however time allows. 10:33
and I see people doing various improvements on their free time too 10:34
jmerelo sena_kun: it's quite clear that Perl6 is -Ofun 10:38
sena_kun: but it must be -Ofun for everyone, specially for people that arrive at Perl 6 for the first time through documentation. 10:39
sena_kun: all personal reasons for not working in the documentation are valid (or the ecosystem, or MoarVM for that matter)
sena_kun: but, all personal reasons considered (including mine), we still need help in the documentation, even if checking if the use of the ¿ sigil in Junctions in 6.d is documented is not fun at all. 10:40
sena_kun jmerelo, sorry, I've took a wrong approach from the start with your words. Yes, I guess you are right.
jmerelo sena_kun: maybe I have done that a bit too, so sorry about that. But anyway, solving issues helps, but spreading the word helps too. 10:43
10:50 mowcat joined 10:52 benchable6 left 10:53 benchable6 joined, ChanServ sets mode: +v benchable6
Geth ecosystem: kalkin++ created pull request #450:
Update [email@hidden.address]
10:54
ecosystem: a6cd7bb519 | (Bahtiar `kalkin-` Gadimov)++ | META.list
Update [email@hidden.address]
ecosystem: bb0cc6d346 | (Elizabeth Mattijsen)++ (committed using GitHub Web editor) | META.list
Merge pull request #450 from kalkin/master

Update [email@hidden.address]
11:01 zakharyas left 11:03 benchable6 left, benchable6 joined, ChanServ sets mode: +v benchable6 11:16 netrino joined 11:26 netrino left
patrickb .hug sena_kun 11:30
.hug jmerelo
no huggable?
patrickb hugs sena_kun
patrickb hugs jmerelo 11:31
Thanks for your work, both of you!
lizmat seconds 11:33
jmerelo hey, thanks! 11:38
notable6: twitter.com/Tux5/status/1118459720623435776
notable6 jmerelo, I cannot recognize this command. See wiki for some examples: github.com/perl6/whateverable/wiki/Notable
jmerelo weekly: twitter.com/Tux5/status/1118459720623435776
notable6 jmerelo, Noted!
11:38 Manifest0 left 11:44 Manifest0 joined, domidumont joined
sena_kun gets timeout for tux.nl/Talks/CSV6/speed4.html 11:58
11:58 netrino joined
sena_kun oh, seems like it is just me. 11:58
12:02 Kaiepi joined, jmerelo left 12:03 Manifest0 left 12:04 netrino_ joined, netrino left 12:10 Manifest0 joined 12:13 aborazmeh left 12:35 zakharyas joined 13:04 cpan-p6 left 13:05 cpan-p6 joined, cpan-p6 left, cpan-p6 joined 13:35 Manifest0 left 13:40 Manifest0 joined 13:43 mowcat left 13:47 antanst8 left 13:48 xiaoyafeng14 left 13:51 skids joined 13:52 domidumont1 joined 13:54 domidumont left 13:55 aindilis left 14:23 domidumont joined 14:26 gregf_ joined, domidumont1 left
lucs Any way to tell which version of a native lib a module is using? 15:03
jnthn It'd appear in the strace output, I guess 15:05
lucs I'll try that, thanks. 15:06
15:10 aindilis joined
lucs jnthn: Yep, perfect. 15:11
15:30 jmerelo joined
jmerelo weekly: Solution to the 4th Perl Weekly Challenge, by Joelle Maslak github.com/jmaslak/perlweeklychall...slak/perl6 15:31
notable6 jmerelo, Noted!
jmerelo releasable6: status
releasable6 jmerelo, Next release in ≈3 days and ≈3 hours. 12 blockers. 0 out of 218 commits logged (⚠ 51 warnings)
jmerelo, Details: gist.github.com/0c894aa0e9f62b5375...fe1573decb 15:32
15:47 patrickb left 15:51 molaf left 15:54 Wahnberger joined, nuclearsandwich joined 15:56 patrickb joined
Wahnberger hi there: I have a file which i read with IO.lines .. inside i call a database method for adding some data.. psql server runs into "sorry, too many clients already" 15:56
i assume that IO.lines is doing some concurrency by default? If so .. how can i reduce that? 15:57
i have tried stuff like that: "race for $path.IO.lines(:batch(1))" but nothing happens 15:58
jmerelo Wahnberger: how do you call the database method? 16:01
sena_kun Wahnberger, can you show your code? Do you use DB::Pg or DBIish?
jnthn It won't do any concurrency unless you stick in `race` or `hyper` explicitly 16:04
16:07 zakharyas left 16:08 MilkmanDan left
Wahnberger I use DB::Pg 16:08
16:08 MilkmanDan joined 16:09 domidumont left
Wahnberger connection, single inserts and querys woring well so far 16:10
when the loop is running (IO.lines...) i check the connections in psql (pg_stat_activity) and they are exeeding the limit 16:11
so i am assuming that i this loop runs with concurrency 16:12
uhm..have to drop off.. will ask later, sorry 16:13
16:13 Wahnberger left 16:17 mowcat joined
moritz which limit? number of connections limit? 16:22
16:23 spacedbat left 16:26 zacts joined
moritz if so, that sounds like a bug 16:28
16:29 spacedbat joined 16:30 dakkar left 16:33 gregf_ left 16:37 vrurg left, vrurg joined
ugexe grumbles something about posting blatantly incorrect answers to stackoverflow 16:41
sena_kun ugexe, you can bash me directly for this one. However, the post is already deleted. 16:42
ugexe not yours
sena_kun erm, really? Takao == my account, just in case
ugexe yeah. stackoverflow.com/a/55731976/1772220 16:43
frankly this answer is just babbling
sena_kun well, the question is not particularly clear regarding feature X or feature Y, but rather in the area of "X doesn't work, there are like 10 or something reasons why it can be broken, but how do I fix that?" 16:44
which is a really gray area, imho
ugexe i understand. it does not help anyone to list a bunch of unrelated problems
because then anytime some precomp on install issue comes up someone will just regurgitate that list of unrelated problems 16:45
"oh did you bump the version?" well why would this even make sense to suggest? 16:49
16:49 zacts left
jmerelo ugexe: you've got the privs to edit. You can edit the answer to make it better. 16:49
ugexe i had already posted an answer 16:50
jmerelo ugexe: well, thanks for the babbling bit. I'm not going to counterattack.
sena_kun it is also a gray area of where is stackoverflow and where is a bug tracker. I'd be much happier with it being narrowed down to particular issues, as I've saw questions that was, in fact, bug reports of Cro issues. So there can be no other answer than "Well, that's a bug" or "Well, that's a bug, I've fixed it".
jmerelo ugexe: did you *read* the answer? 16:51
sena_kun s/issues/questions/
ugexe obviously i read it
jmerelo ugexe: your answer was not helpful at all. I voted it up anyway.
ugexe: Main thing is that it's not an actionable answer. There's nothing the OP can do about it. 16:52
ugexe: you keep telling the OP things do not make sense. That's not really helpful.
ugexe you are being dense
jmerelo ugexe: you mention "module if" and don't link to it. It's not helpful in any way, might take you in the wrong direction, and does not solve the problem either.
ugexe because i dont expect the author to debug a transitive dependency 16:53
sena_kun wanders off to look at inline refactoring implementing
jmerelo ugexe: if you read it, you don't understand it. What I was saying is that effectively, it looks like the module was installed, and probably with the same version. We have to take the OP at face value: it does not find the module
ugexe: that means that the module was installed without that particular file, which is missing. 16:54
ugexe you frankly dont kow what you are talking about
so i'm done discussing this with you
jmerelo ugexe: as always, it's a pleasure to interact with you. Not. 16:55
ugexe: you can mention me by name, also. Not a problem to defend my blatantly incorrect views. 16:57
17:00 kaare_ left 17:03 kaare_ joined 17:07 kaare_ left, kaare_ joined 17:09 mowcat left 17:22 zachk joined 17:23 zachk left, zachk joined 17:40 fatguy joined 17:43 kaare_ left
fatguy i have a TWEAK submethod on parent class, whenever i create an obj to child class, it will run the TWEAK from parent class. i don't want that, how can i achieve this ? 17:43
timotimo are you allowed to change the parent class? 17:45
tony-o m: role A { submethod TWEAK(|) { "A.TWEAK".say; }; }; class B does A { submethod TWEAK(|) { "B.TWEAK".say; } }; B.new; 17:46
evalable6 B.TWEAK
17:47 arios joined
tony-o if you're not allowed to change the parent, you can override it (and just not call nextwith or similar) 17:47
ugexe they would need to change the parent from a class to a role still 17:48
fatguy what is ( | ) 'pipe' for ? 17:50
i can change the parent class. so my idea is to check the config file on parent class only 17:51
i will spawn the child based on certain condition
the parent class is called 'instance' for example and the child will be instance1...10 17:52
ugexe its an anonymous capture (since its not getting used in that example). if you wanted a non anonymous capture you'd use e.g. TWEAK(|c) { say c.perl } 17:53
timotimo the parent class can compare what type "self" has
fatguy i called the parent class to initiate a config check and log at the beginning of main script
tony-o ah, if you didn't have access you could wrap the TWEAK method also to check the .mro
guess, that wouldn't work either 17:54
not with mro, at least
timotimo m: class Parent { submethod TWEAK { say "parent's TWEAK has $(self.^name)" } }; class Child is Parent { submethod TWEAK { say "child's TWEAK has $(self.^name)" } }; Parent.new; say "and now child:"; Child.new
evalable6 parent's TWEAK has Parent
and now child:
parent's TWEAK has Child
child's TWEAK has Child
timotimo you'd then self.WHAT === Parent, for example
tony-o should a .wrap TWEAK have access to `self` ? 17:56
m: class A { submethod TWEAK(|) { "A.TWEAK".say; }; }; class B is A { submethod TWEAK(|) { "B.TWEAK".say; } }; say A.^can("TWEAK")[0].wrap(-> (|) { self.^name; }); B.new;
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/ay830bJfR1
'self' …
tony-o, Full output: gist.github.com/6c00c758d775b4a0b4...4b6ed16c57
ugexe why does declaring the TWEAK of both parent and child as `method` instead of `submethod` call both TWEAKs?
tony-o m: class A { submethod TWEAK(|) { "A.TWEAK".say; }; }; class B is A { submethod TWEAK(|) { "B.TWEAK".say; } }; A.^can("TWEAK")[0].wrap(-> (|) { say self.^name; }); B.new; # dies with self not available in the wrapped TWEAK 17:57
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/2HvwV476qk
'self' …
tony-o, Full output: gist.github.com/296a38e467d7941a9a...3f287d54b2
timotimo because the buildplan maker goes through the whole MRO and collects everything named TWEAK or BUILD
and it stashes away the actual code objects in the buildplan if i'm not mistaken
ugexe right. but is it this way because it was not considered to e.g. check for non submethods, or because the optimizations force this particular design? 17:58
fatguy thanks, i can work with if self.^name eq 'instance' for this 18:01
timotimo i'm not sure what the semantics should be if a method would be picked up every step of the class hierarchy
you'd have the tweak method of one class be called for any child that doesn't have its own
that seems like a very strange thing to want to have
18:07 arios left
sena_kun Can I use test data from a Perl 5 module? It uses artistic license, can't I get sued or something? Will mentioning it in the readme be enough? 18:08
Not like I've heard of a lot of such cases, just don't want to be rude to the author. 18:10
timotimo i think it should be fine? you're just not allowed to call it the same thing or claim you made the original i think?
tony-o i don't think you can redistribute if you've modified the code under artistic
without modification, you need to include license info 18:11
You may Distribute verbatim copies of the Source form of the Standard Version of this Package in any medium without restriction, either gratis or for a Distributor Fee, provided that you duplicate all of the original copyright notices and associated disclaimers. At your discretion, such verbatim copies may or may not include a Compiled form of the Package.
sena_kun no, I am not modifying the code, I just want to take test data to not re-implement the same foo-bar stuff.
ugexe turn your clock back 10 years. commit your code. claim they stole the tests from you
tony-o lol 18:12
the ol' windows95 registration hack
sena_kun Net::LDAP is probably older than 10 years. :p
tony-o he's working on metric years 18:14
100 seconds in 2 10 hour segments of a day with 20 days per month and 10 months in the year
and years are twice as long 18:15
sena_kun p-probably... ok, I guess I'll peek at the original just a little, considering that the actual implementation code is drastically different, and test data always can be edited after
18:18 lucasb joined
tony-o sena_kun: the 1.0 license has different but similar requirements 18:18
if you're looking at an old set of tests, that might be relevant
opensource.org/licenses/Artistic-1.0 18:19
sena_kun metacpan.org/source/MARSCHAP/perl-...canon_dn.t <- I am looking at this
18:20 cozachk joined
sena_kun I don't want to re-invent those `O=Test,C=GB` into `O=Test2,C=EnoughDifferenceForEveryone` 18:20
the code is not modified, and my code itself is pretty original
18:22 zachk left 18:23 cozachk left 18:24 abraxxa1 joined, sauvin left 18:25 mowcat joined 18:29 jmerelo left 18:34 nuclearsandwich left 18:44 zachk joined 18:46 probablymoony left 18:50 mowcat left 18:53 moony joined 18:56 zachk left, zachk joined 19:18 netrino_ left 19:20 netrino joined, Xliff joined
Xliff \o 19:20
m: role A { method new(1) { say 'Hi' }; }; class B does A { }; B.new(1) 19:21
evalable6 Hi
Xliff m: role A { method new(1) { say 'Hi' }; }; class B does A { }; A.new(1)
evalable6 Hi
Xliff m: role A { has $.a; submethod BUILD(:$!a) { }; method new(1) { self.bless(a => 1) }; }; class B does A { }; A.new(1).a 19:24
evalable6
Xliff m: role A { has $.a; submethod BUILD(:$!a) { }; method new(1) { self.bless(a => 1) }; }; class B does A { }; A.new(1).a.say
evalable6 1
Xliff m: role A { has $.a; submethod BUILD(:$!a) { }; method new(1) { self.bless(a => 1) }; }; class B does A { }; B.new(1).a.say
evalable6 1
Xliff m: role A { has $.a; submethod BUILD(:$!a) { say 'Building role' }; method new(1) { self.bless(a => 1) }; }; class B does A { submethod BUILD { say 'Building class'; }; B.new(1).a.say
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/ovgX7bmzbC
Missing…
Xliff, Full output: gist.github.com/a4727c1f8ebbdbcddf...4e48c85e2a
Xliff m: role A { has $.a; submethod BUILD(:$!a) { say 'Building role' }; method new(1) { self.bless(a => 1) }; }; class B does A { submethod BUILD { say 'Building class'; }; }; B.new(1).a.say 19:25
evalable6 Building class
(Any)
Xliff m: role A { has $.a; submethod BUILD(:$!a) { say 'Building role' }; method new(1) { self.bless(a => 1) }; }; class B does A { }; B.new(1).a.say
evalable6 Building role
1
fatguy i had config file, read using "filename".IO.lines, need to ignore '#' at the beginning and empty line, i can use starts-with for '#' but for empty line i use unless .Stringy to make it work. tried using starts-with(' ') and regex \s+ but it didn't work. is there any better way ? 19:28
sena_kun you can just `next unless $line` 19:29
m: for ('a', '', 'b') -> { next unless $_; say $_ } 19:30
evalable6 (exit code 1) Too many positionals passed; expected 0 arguments but got 1
in block <unit> at /tmp/oH9Nv5HaeR line 1
sena_kun m: for @('a', '', 'b') -> { next unless $_; say $_ }
evalable6 (exit code 1) Too many positionals passed; expected 0 arguments but got 1
in block <unit> at /tmp/zDIAyLjL_Z line 1
sena_kun erm
m: for @('a', '', 'b') { next unless $_; say $_ }
evalable6 a
b
sena_kun fatguy, ^ 19:31
fatguy ok thanks
sena_kun m: for @('a', '', 'b') { next if .chars == 0; say $_ }
evalable6 a
b
sena_kun also this
unclechu m: for @('a', '', 'b') { say $_ unless $_ } 19:32
evalable6
unclechu m: for @('a', '', 'b') { say $_ if $_ }
evalable6 a
b
sena_kun m: for ('a', '', 'b') { say $_ if $_ }
evalable6 a
b
sena_kun m: for 'a', '', 'b' { say $_ if $_ }
evalable6 a
b
sena_kun m: .say if $_ for 'a', '', 'b' 19:33
evalable6 a
b
unclechu m: say $_ if $_ for @('a', '', 'b')
evalable6 a
b
Xliff m: role A { has $.a; submethod BUILD(:$!a) { say ::?CLASS.^name.say; say 'Building role' }; method new(1) { self.bless(a => 1) }; }; class B does A { }; A.new(1).a.say
evalable6 A
True
Building role
1
Xliff m: role A { has $.a; submethod BUILD(:$!a) { say ::?ROLE.^name.say; ::?CLASS.^name.say; say 'Building role' }; method new(1) { self.bless(a => 1) }; }; class B does A { }; A.new(1).a.say 19:36
evalable6 A
True
A
Building role
1
19:47 kaare_ joined 19:50 Black_Ribbon joined 19:55 sftp left 19:58 sftp joined 20:07 patrickb left 20:09 zacts joined 20:11 patrickb joined 20:13 otulp left 20:22 Manifest0 left 20:27 arios joined, Manifest0 joined
ugexe MasterDuke: using "#`() use isms; sub infix:«<<»(Int:D $a, Int:D $b) { $a +< $b };" instead of the previous bitshift sub (both using the cache still) from 45s to 10s 20:33
the cache is no longer needed even 20:34
20:44 eseyman left 20:53 arios left 20:54 MilkmanDan left 20:55 MilkmanDan joined 21:06 skids left 21:14 _jrjsmrtn joined 21:17 __jrjsmrtn__ left
guifa kinda feels like if should set up an implict context. So you can do “return $_ if %foo<bar>:exists” 21:22
21:28 vrurg left, vrurg joined
masak m: my %foo = bar => "OH HAI"; if %foo<bar> -> $value { say $value } 21:28
evalable6 OH HAI
masak if you don't insist on using :exists and the inverted `if`, you have your wish
guifa Interesting that it requires the pointing block though 21:33
jnthn `.return with %boo<bar>` is definedness is good enough, which it usuall is 21:34
*usually
*if
Apparently too tired to type :)
guifa ooh I like that
tyil not sure if this is interesting enough to put in the p6 weekly pleroma.tyil.nl/notice/9hrPeqI82uP3W3i8aO 21:35
guifa I had no idea you could just call .return on a value
tyil same, but that looks p cool 21:36
guifa I actually have to call another method first before the routine but it works fine 21:37
.format( … ).return with %foo<bar>
21:38 sena_kun left
sjn tyil: does your image contain the rakudo star modules too? 21:41
tyil no, bare perl6
no zef either (and the python one doesnt contain pip on alpine i believe) 21:42
sjn a nightly R* based on that one would be cool, I think
21:42 ctilmes_ joined
tyil I could probably just put RUN a zef install on a list of modules that R* also includes and get there 21:43
sjn btw, isn't adding a build-date an anti-pattern?
tyil R* does not do any patches on mainline perl6 does it?
a build-date tag, you mean?
sjn reproducible builds ftw
I see a RUN date "+%FT%TZ" > /var/docker/meta/build-date 21:44
tyil oh
that's not in the perl6 docker image, that's in the cpan-p6 one
.bots
cpan-p6 03cpan-p6:121.0.1 (2019-04-12T16:14:21Z) reporting for duty! [Perl 6] 02git.tyil.nl/perl6/app-cpan-uploadannouncer-irc
tyil that's how it gets that datetime stamp
it allows me to easily check if I'm looking at the right docker image, in case k8s wasnt able to pull a newer image yet 21:45
sjn but it makes it impossible to re-build an image from the same commit and end with the same build sha
tyil docker isnt a reproducible build to begin with, though 21:46
sjn really? 21:47
ctilmes_ tyil: alpine testing/edge has moarvm/nqp/rakudo installed in them.
you can run echo dl-cdn.alpinelinux.org/alpine/edge/testing >> /etc/apk/repositories && apk -U add rakudo
tyil ctilmes_: I heard, but this is latest master branch every night, so slightly more up to date
sjn well, even if that's true, it's a bad argument for not making the effort to make your own build reproducible
tyil and easier to try out custom patches (like one from samcv to check if memory consumption improved) 21:48
ctilmes_ My latest pull was rejected ;-( but I believe that was due to known rakudo bug: github.com/alpinelinux/aports/pull/6845
tyil sjn: well, I don't intend cpan-p6 to be reproducible here, because I intentionally want it to be different so I can easily see if I have a newer image
the perl6 one does not have this timestamp
sjn: git.tyil.nl/docker/perl6/src/branc...ker/alpine this is the perl6 docker image 21:49
sjn tyil: I think you might be misunderstanding the point of having reproducible builds 21:50
tyil no, I do like reproducible builds
but first of all, docker is not a reproducible build system
and second of all, the perl6 image doesn't have that timestamp 21:51
sjn what makes you say docker isn't a reproducible build system?
tyil what makes you think it is?
Nix is a reproducible build system, it makes sure that settings are always correct, including system datetime, pins on specific versions of other packages and validates them all via hashing 21:52
docker doesnt do any tricks to make sure the system state is consistent across builds, and there's no validation on whether RUN commands every have the exact same effect 21:53
sjn hmf
tyil while it may sometimes accidentally make a rather reproducible thing, that doesn't make it a reproducible build system
sjn thought NixOS used docker...
tyil I believe they do build in a container, but additionally they ensure system state is always the same for every build as well 21:54
not sure if they specifically use docker for builds, though
(fwiw, this is what I learned from a NixOS talk, I don't use NixOS myself) 21:56
cpan-p6 New module released to CPAN! JSON::Path (1.6) by 03JNTHN 22:02
tyil damn, python:latest is almost 1gb 22:06
python latest 59a8c21b72d4 2 weeks ago 929MB
22:07 hythm_ joined
hythm_ p6: my $i = 0; loop { last if $i == 7; $i++; LAST say $i } 22:09
evalable6 7
hythm_ p6: sub s { my $i = 0; loop { last if $i == 7; $i++; LAST say $i } }; s
evalable6 (exit code 1) 0
No such method '!capture_phasers' for invocant of type 'Code'
in block <unit> at /tmp/roVf2vPCkV line 1
sjn that looks like a bug to me 22:14
hythm_ i don't get the above error error on repl, instead i get "0" as output, which seems wrong anyway.
22:16 kaare_ left
timotimo oh the repl 22:17
22:18 zacts left
sjn there's a 0 in that output here too 22:19
hythm_ oh, right, did not notice it 22:21
SmokeMachine m: class A { submethod TWEAK(|) { "A.TWEAK".say; }; }; class B is A { submethod TWEAK(|) { "B.TWEAK".say; } }; A.^can("TWEAK")[0].wrap(my method (|) { say self.^name; }); B.new; 22:22
evalable6 B
B.TWEAK
22:23 vrurg left, vrurg joined
hythm_ updated rakudo issue #2836, seems related 22:25
timotimo R#2836 22:29
synopsebot R#2836 [open]: github.com/rakudo/rakudo/issues/2836 [phasers] `LAST` loop inside `sub` increments `$` for every iteration
MasterDuke ugexe: a couple more of those tricks and you're going to end up with a perl (5|6) -> polyglot perl compiler 22:31
ugexe get the worst of both worlds!
22:33 AlexDaniel joined
MasterDuke perl 6, the worst perl 5 *and* the worst perl 6 22:33
22:33 rindolf left
ugexe perl -1, 5-6 22:38
22:38 hythm_ left
guifa Ugh. Mozilla released Fluent v1.0 today. I need to get datetime to work soon so I can get to 1.0 22:39
Juerd Oof, Perl6 got a lot slower on my test case since the last time I tried (months ago perhaps) 22:40
It used to take between 5 and 6 seconds, now 10+.
While I admit the circumstances of this benchmark are suboptimal, I can't think of any explanation for this except regression 22:41
ugexe is there a way to write this without conditional logic? sub polyslurp ($_) { "0" and (return "{$_.IO.slurp}") or (return do { open(my $fh, $_[0]); join("", <$fh>); }) };
MasterDuke Juerd: this is the mqtt regex test, right? 22:42
Xliff Is there any way to make an object's method override an implemented role's method? 22:53
ugexe have it mix-in an anonymous role at build-time that calls the method with the classname qualifier ala self.CLASSNAME::whatever 22:55
Xliff So.... 22:58
m: my role A { method a { say "Role"; }; }; class B does A { method a { say "Class"; }; }; A.new.a
evalable6 Role
Xliff m: my role A { method a { say "Role"; }; }; class B does A { method a { say "Class"; }; }; my $a = A.new but role { method a { self.A.a }; }; $a.new.a 22:59
evalable6 (exit code 1) No such method 'A' for invocant of type 'A+{<anon|1>}'. Did you mean 'a'?
in method a at /tmp/J6QZWNhDzo line 1
in block <unit> at /tmp/J6QZWNhDzo line 1
Xliff m: my role A { method a { say "Role"; }; }; class B does A { method a { say "Class"; }; }; my $a = A.new but role { method a { self.A::a }; }; $a.new.a 23:00
evalable6 Role
Xliff ugexe: ^^
m: my role A { method a { say "Role"; }; }; class B does A { method a { say "Class"; }; }; my $a = A.new but role { method a { "override" }; }; $a.new.a
evalable6
Xliff m: my role A { method a { say "Role"; }; }; class B does A { method a { say "Class"; }; }; my $a = A.new but role { method a { say "override" }; }; $a.new.a
evalable6 override
Xliff m: my role A { method a { say "Role"; }; }; class B does A { method a { say "Class"; }; }; my $a = A.new but role { method a { self.a }; }; $a.new.a 23:01
23:01 zacts joined
evalable6 (signal SIGHUP) «timed out after 10 seconds» 23:01
Xliff m: my role A { method a { say "Role"; }; }; class B does A { method a { say "Class"; }; }; my $a = A.new but role { method a { self.a }; }; $a.a
evalable6 (signal SIGHUP) «timed out after 10 seconds»
ugexe you are never using class B, so why are you including it?
Xliff m: my role A { method a { say "Role"; }; }; class B does A { method a { say "Class"; }; }; my $a = B.new but role { method a { self.B.a }; }; 23:02
evalable6
ugexe self.B::a
Xliff m: my role A { method a { say "Role"; }; }; class B does A { method a { say "Class"; }; }; my $a = B.new but role { method a { self.B::a }; }; 23:03
evalable6
ugexe not self.B.A
m: my role A { method a { say "Role"; }; }; class B does A { method a { say "Class"; }; }; my $a = B.new but role { method a { self.B::a }; }; say $a.a
evalable6 Class
True
Xliff That's a bit confusing, but OK.
/o\
Thanks.
OK. That's better. Thanks! 23:04
23:06 mowcat joined
guifa jnthn: in doing some more tests, the .return with $foo while cleaner code takes more than 2x time :( 23:16
Probably because the with creates a code block (I knwo someone else had something else similar not long ago where that was the slowdown) 23:18
MasterDuke guifa: can you show two golfed code snippets so we can profile them? 23:20
23:21 adu joined
guifa tio.run/##jY/dCoIwGIaP21V8xIIZOSyo...914ese6fgA 23:25
MasterDuke guifa++ 23:27
guifa MasterDuke: Results are actually even more in favor of the return foo if foo when you have more hits than misses (change the grep to !*.is-prime) 23:29
23:30 abraxxa1 left 23:38 ctilmes_ left 23:42 ctilmes_ joined 23:47 lucasb left
lucs If I change for example some code under ./src/core/... in my local clone of rakudo, will a 'make' be sufficient to update everything? 23:59