🦋 Welcome to the former MAIN() IRC channel of the Raku Programming Language (raku.org). This channel has moved to Libera (irc.libera.chat #raku)
Set by lizmat on 23 May 2021.
00:03 reportable6 left, reportable6 joined 00:11 frost joined 00:36 xinming_ left 00:38 xinming_ joined 00:49 Doc_Holliwood left 01:01 curioususer joined 01:02 curioususer left 01:10 xinming_ left 01:12 xinming_ joined 02:00 _ed joined 02:05 _ed left 02:13 _ed joined 02:15 frost left 02:16 MasterDuke left 02:21 _ed left 02:22 _ed joined
japhb Is there a module already for an ordered hash (in the sense that iterating over it will return keys/values/pairs in exactly the order they were inserted)? I see lizmat has Map::Ordered but not Hash::Ordered, FCO has an OrderedHash but it seems to care about either sorting or specifying the order of keys (rather than depending on insertion order), and there appear to be lots of modules in the Hash::* 02:26
namespace, but none look like a match for what I'm looking for.
(Unless of course I just missed it.) 02:28
02:30 _ed left 02:33 xinming_ left 02:34 xinming_ joined 02:41 _ed joined 02:42 rassoc left 02:51 _ed left 03:06 _ed joined 03:10 tyil[m] left, littlebenlittle[ left, juanfra left, AlexDaniel left 03:11 CIAvash left, demostanis[m] left, cnx left, juanfra joined 03:13 _ed left 03:14 _ed joined 03:15 AlexDaniel joined, demostanis[m] joined, cnx joined, tyil[m] joined, littlebenlittle[ joined, CIAvash joined 03:18 _ed left 03:33 demostanis[m] left, juanfra left 03:34 stoned75 left 03:35 AlexDaniel left 03:36 stoned75 joined 03:39 cnx left 03:40 tyil[m] left, littlebenlittle[ left, CIAvash left 04:01 _ed joined, neshpion left 04:06 _ed left 04:21 RandalSchwartz left 04:22 Doc_Holliwood joined 05:22 coverable6 left, greppable6 left, notable6 left, statisfiable6 left, benchable6 left, shareable6 left, bisectable6 left, unicodable6 left, quotable6 left, committable6 left, bloatable6 left, linkable6 left, releasable6 left, reportable6 left, evalable6 left, nativecallable6 left, sourceable6 left, tellable6 left, squashable6 left, sourceable6 joined, releasable6 joined, notable6 joined, benchable6 joined, quotable6 joined, squashable6 joined, linkable6 joined, committable6 joined 05:23 unicodable6 joined, reportable6 joined, coverable6 joined 05:24 tellable6 joined, statisfiable6 joined, bloatable6 joined, nativecallable6 joined 05:25 evalable6 joined, shareable6 joined, greppable6 joined, bisectable6 joined 05:26 squashable6 left 05:28 squashable6 joined 06:02 reportable6 left 06:03 reportable6 joined 06:18 notna joined 06:35 Sgeo left 06:51 ufobat joined 07:05 patrickb joined 07:25 juanfra joined 07:28 demostanis[m] joined, AlexDaniel joined, cnx joined, littlebenlittle[ joined, tyil[m] joined, CIAvash joined 07:45 juanfra left 07:46 demostanis[m] left 07:49 AlexDaniel left 07:58 tyil[m] left, cnx left 07:59 littlebenlittle[ left, CIAvash left, juanfra joined 08:03 demostanis[m] joined, AlexDaniel joined, cnx joined, littlebenlittle[ joined, tyil[m] joined, CIAvash joined 08:20 juanfra left, demostanis[m] left 08:23 AlexDaniel left 08:32 tyil[m] left, cnx left, littlebenlittle[ left, CIAvash left 08:33 juanfra joined 08:36 demostanis[m] joined, AlexDaniel joined, cnx joined, littlebenlittle[ joined, tyil[m] joined, CIAvash joined 08:40 littlebenlittle[ left, CIAvash left, demostanis[m] left, tyil[m] left, cnx left, AlexDaniel left, juanfra left 08:59 MoC joined 09:00 frost joined 09:02 _ed joined 09:05 juanfra joined 09:07 _ed left 09:09 demostanis[m] joined, AlexDaniel joined, cnx joined, tyil[m] joined, littlebenlittle[ joined, CIAvash joined
patrickb polettix_: Did you notice www.reddit.com/r/rakulang/comments...?context=3 09:59
tellable6 hey patrickb, you have a message: gist.github.com/8503b4fd5eae8e2cd0...26d550c237
CIAvash m: say .chars == .comb.unique given 'abcd' 10:00
camelia True
patrickb polettix_: I fear I have tried leaving that comment in *three* different ways, only to not be seen and you finding out about object construction separately. Grrr. I'm grumpy on Disqus now. 10:01
10:09 linkable6 left, evalable6 left 10:11 evalable6 joined, linkable6 joined 10:22 Kaiepi left 10:23 Kaiepi joined 10:30 Doc_Holliwood left 10:38 rassoc joined 10:42 discord-raku-bot left 10:56 discord-raku-bot joined 10:58 sono left 11:14 neula joined 11:33 _ed joined 11:37 _ed left
SmokeMachine sorry, yesterday I said `Model.WHAT` meaning `Model.HOW` 11:44
rassoc m: "a1b2\nc3\nd4e5".lines.comb(/\d/) 11:50
camelia ( no output )
rassoc m: "a1b2\nc3\nd4e5".lines.comb(/\d/).say 11:51
camelia (1 2 3 4 5)
rassoc oh, interesting comb behaviour; never knew that
lizmat you're combing for numeric characters... or is that not what you meant ? 11:52
rassoc that it considers multiple elements, separate lines in this case. usually incorporated a map of some kind while processing lines
SmokeMachine m: say <a1 b2 c3>.comb: /\d+/ 11:54
camelia (1 2 3)
SmokeMachine m: say <0a1 b2 3c4>.comb: /\d+/
camelia (0 1 2 3 4)
gfldex m: "a1b2\nc3\nd4e5".lines».comb(/\d/) 12:01
camelia ( no output )
gfldex m: "a1b2\nc3\nd4e5".lines».comb(/\d/).say
camelia ((1 2) (3) (4 5))
gfldex rassoc: .comb coerces to Str
lizmat rassoc: what gfldex says, so you would get the same result without the .lines 12:02
12:02 reportable6 left
lizmat m: "a1b2\nc3\nd4e5".comb(/\d/) 12:02
camelia ( no output )
12:03 reportable6 joined
lizmat m: "a1b2\nc3\nd4e5".comb(/\d/).say 12:03
camelia (1 2 3 4 5)
lizmat m: "a1b2\nc3\nd4e5".lines>>.comb(/\d/).say
camelia ((1 2) (3) (4 5))
rassoc i do realize that now, but it never occurred to me before that i could utilize it in such a way 12:11
gfldex: recently, i ran into a situation where i deadlocked the scheduler by .receiving on various interdependent channels. stumbled upon one of your blog posts on await and it really saved me. the docs mention that it utilizes .receive internally, but the impl is actually using .polling and supplies. so, thanks a bunch for your frequent blogging! 12:31
13:03 linkable6 left, evalable6 left, Doc_Holliwood joined 13:05 perlbot left, perlbot joined 13:06 linkable6 joined, evalable6 joined 13:07 RandalSchwartz joined 13:09 abraxxa left 13:19 frost left
cnx <CIAvash "m: say .chars == .comb.unique gi"> I'm aware of this, but I'm still curious of a regex solution (apologies to IRC people for the quote) 13:27
13:37 Doc_Holliwood left
rassoc regex solution for what? verifying that a str has no repeated chars? 13:44
m: say "abc" !~~ /(.).*$0/
camelia True
rassoc m: say "abca" !~~ /(.).*$0/
camelia False
13:45 Sgeo joined
cnx is it possible for a possive match? 13:49
e.g. of only 4 to 20 unique alphanumerics 13:50
rassoc cnx: in a single regex? not quite sure what you are trying to do. is this what you are after? 14:10
m: my &small-uniq = { !/(.) .* $0/ ?& /<alpha> ** 4..20/ }; "abc".&small-uniq.say; "abcd".&small-uniq.say; "abcdd".&small-uniq.say;
camelia False
cnx yes, in a single regex, I'm just wondering if it's possible to forbid duplication using capture groups 14:16
14:16 Eddward joined
Eddward m: say "test" 14:16
camelia test
Eddward m: my $y = -> $n { say "hi $n" } ; $y(3)
camelia hi 3
hi 3 14:17
Eddward m: my $y = -> $n { say "hi $n" } ; for 1..5 $y
camelia 5===SORRY!5=== Error while compiling <tmp>
Missing block
at <tmp>:1
------> 3my $y = -> $n { say "hi $n" } ; for 1..57⏏5 $y
expecting any of:
block or pointy block
infix stopper
Eddward m: my $y = -> $n { say "hi $n" } ; $y.perl 14:18
camelia ( no output )
Eddward m: my $y = -> $n { say "hi $n" } ; $y.raku
camelia ( no output )
Eddward m: my $y = -> $n { say "hi $n" } ; say $y.perl 14:19
camelia -> $n { #`(Block|91879296) ... }
14:24 melezhik joined
melezhik . 14:24
. 14:25
Eddward sub x($n) { say "hi $n" } ; for 1..5 &x 14:34
sub x($n) { say "hi $n" } ; &x.perl.say 14:35
evalable6 sub x ($n) { #`(Sub|94922466683104) ... }
Eddward my $x = ->($n) { say "hi $n" } ; $x.perl.say
evalable6 -> $ ($n) { #`(Block|94632884115120) ... }
Eddward my $x = -> $n { say "hi $n" } ; $x.perl.say 14:36
evalable6 -> $n { #`(Block|93854853147912) ... }
Eddward my $x = -> $n { say "hi $n" } ; for 1..5 { $x($_) } 14:37
evalable6 hi 1
hi 2
hi 3
hi 4
hi 5
Eddward my $x = -> $n { say "hi $n" } ; for 1..5 $x 14:38
m: my $x = -> $n { say "hi $n" } ; for 1..5 $x
camelia 5===SORRY!5=== Error while compiling <tmp>
Missing block
at <tmp>:1
------> 3my $x = -> $n { say "hi $n" } ; for 1..57⏏5 $x
expecting any of:
block or pointy block
infix stopper
Eddward ¯\_(ツ)_/¯ 14:39
rassoc m: my &x = -> $n { say "hi $n" }; .&x for 1..5 # Eddward 14:45
camelia hi 1
hi 2
hi 3
hi 4
hi 5
Eddward rassoc: Thanks. I was inspired by an article that I didn't think did what it thought it did. 14:47
jcoterhals.medium.com/what-not-to-...94121ab30c 14:48
I thought `A($_) for ^3` was the same as `for ^3 { A($_) }` 14:49
lizmat Eddward: it has the same effect, but the for ^3 { } case has an extra level of indirection 14:50
Eddward right 14:51
15:18 notna left
m6locks can has more exercises in exercism.io/my/tracks/raku ? 15:57
16:18 linkable6 left, evalable6 joined, evalable6 left 16:19 evalable6 joined
rassoc m6locks: you can try theweeklychallenge.org/challenges/ or adventofcode.com/ while waiting for some more content on exercism 16:19
16:19 linkable6 joined
rassoc latter has a collection of solutions for comparison here: github.com/codesections/advent-of-raku-2020 16:20
16:30 MoC left, RandalSchwartz left 16:34 RandalSchwartz joined 16:50 stoned75 left
perlmaros hi, i'm running a raku application in a systemd unit and no ~/.raku/precomp files are being written. whenever i start it manually/directly via shell they are created. any suggestions what might be needed to coerce rakudo into creating these files? 16:50
16:51 stoned75 joined
perlmaros strace shows that it looks for these files, but it does not try to create them 16:52
17:18 ufobat left
moritz permission problems, maybe? 17:37
systemd unit files have an option to disable access to home directories, IIRC
ugexe note just because it looks and doesn't find them there doesn't mean it didnt find them somewhere else 17:38
m: say $*REPO.repo-chain.map(*.?prefix).grep(*.so).map(*.absolute) 17:39
camelia (/home/camelia/.raku /home/camelia/rakudo-m-inst-1/share/perl6/site /home/camelia/rakudo-m-inst-1/share/perl6/vendor /home/camelia/rakudo-m-inst-1/share/perl6/core)
ugexe run your script with `RAKUDO_MODULE_DEBUG=1` and you'll get some more details 17:40
18:02 reportable6 left 18:04 melezhik left 18:05 reportable6 joined 18:32 RandalSchwartz left 18:57 neula left 19:01 sono joined 19:12 jess left
perlmaros not sure if i can get anything helpful from RAKUDO_MODULE_DEBUG=1 ... it just prints where it tries to load the precomp files from, but it doesn't say anything about where/when/if it tries to write them 19:20
lizmat it should say something like "Precompiled /foo/bar into /foo/baz" 19:25
and "Writing dependencies and byte code to foo for source checksum: 765372657362
raydiak permissions and env vars are common stumbling blocks I've read about wrt systemd units. unix.stackexchange.com/a/339645 gives a good list of various differences between running from a shell and running from systemd. also if you're running selinux/apparmor, make sure that's not causing an issue 19:59
20:00 Doc_Holliwood joined 20:24 jess joined, [Coke] left, [Coke] joined 21:03 clarjon1 left 21:04 clarjon1 joined 21:05 tejr left 21:06 tejr joined, clarjon1 left, clarjon1 joined 21:23 xinming_ left 21:32 jess left 21:39 patrickb left 21:41 zostay left 21:42 kawaii_ left, pjlsergeant left 21:52 kawaii_ joined, pjlsergeant joined 21:53 zostay joined
Geth problem-solving/clarify-readme: e43a7a59a4 | (Daniel Sockwell)++ (committed using GitHub Web editor) | README.md
clarify PS process in README

This is an attempted solution to #272 as described in that issue. In particular, it is intended to clarify the existing process without adding any substantive changes.
problem-solving: codesections++ created pull request #289:
Clarify Problem Solving process description in README
22:41 Raycat|Home joined
Raycat|Home Howdy. Two questions: How do I create a subset of a fixed array containing a particular class? I wanna do `subset Board of Array[Square] where .elems > 9;` but this doesn't work. 22:42
Hmm. I've forgotten the second question. So, just the one then. 22:43
22:45 xinming joined 22:55 Eddward left, Eddward joined 23:16 logix34 joined, logix34 is now known as javor 23:19 guifa joined
guifa lizmat: are you still working on a redo of the sequence operator mechanics? (I seem to recall that being in your long list of todos) 23:19
23:21 javor left 23:43 cognominal left