rcmlz Thank you. „>>“ is something I need to use more often. SmokeMachine: interesting solution. I do not understand yet, why the order is preserved … 05:10
jubilatious1_98524 antipairs makes each line into a key/value with line-number as value. The final sort reconstructs the input order (head insures that only the first value per key is used for sorting). Clever. 06:55
Hi, I don't uunderstand what "line 20" refers to. Could you explain? Thx. 07:05
FYI, I tried to write awk-like Raku, so people reading the accepted answer (15 Upvotes) would see parallels. Cheers. stackoverflow.com/a/77964930/7270649
08:26 dakkar joined 08:35 ab5tract left 08:37 ab5tract joined
rcmlz With line 20 I was refering to the glot.io link. My final version, taking also memory into account is # read all lines from standard input - we need it twice, hence we store it in an array my @numbers = $*IN.lines; # find numbers that appear only once my %singletons = @numbers.Bag.grep(*.value == 1); # print the single-occurrence numbers in their original order @numbers.grep( -> $n { %singletons{ $n }:exists } 10:27
).join("\n").put
10:41 librasteve_ left 13:49 deadmarshal left, KOTP left 14:02 KOTP joined 14:09 deadmarshal joined 14:12 librasteve_ joined
_elcaro_ You could also do that this way perl @numbers.Bag.grep(*.value == 1).Hash{@numbers}:k I always try to remember when doing something like @xs.map({ %h{$_} }) that I can often just do %h{@xs} 14:22
14:55 greenfork left, tbrowder left, tbrowder joined
rcmlz Oh, that is better! Will include that in my really-final-version. Thank you for the hint. 15:02
15:04 greenfork joined
antononcube For all of the NIX-addicts -- is this something easily (re-)doable in Raku: quesma.com/blog/60s-linux-analysis-nix-llms/ 15:05
15:07 bolangi_ joined, bolangi left 15:47 timo1 joined 15:50 avuserow_ joined 15:53 avuserow left, sivoais left, timo left 15:55 sivoais joined
myrlynx Kept running into this while installing cro ===> Building [FAIL]: Digest::SHA1::Native:ver<0.06> Aborting due to build failure: Digest::SHA1::Native:ver<0.06> 16:22
16:35 dakkar left, jmcgnh left 16:38 jmcgnh joined 16:41 librasteve_ left 16:48 samebchase7 joined, rantanplan joined 16:50 ntv joined 16:54 ab5tract left, apogee_ntv left, samebchase left, snonux left, ACfromTX left, samebchase7 is now known as samebchase 16:59 librasteve_ joined, ab5tract joined 17:02 ACfromTX joined
librasteve @myrlynx depending on your platform, you may need some developer libraries installed for the SHA1 to work... 17:16
chatgpt.com/share/68c99c2c-b224-80...66a496d0b8 17:19
myrlynx I think I got it working from installing from source 17:22
librasteve cool 17:40
18:09 ACfromTX left 18:21 ACfromTX joined
antononcube I have to always do that on macOS. 18:24
librasteve recently I have tested a clean new user on macos against the proposed install methods listing on the new raku.org site - so homebrew and rakubrew have been successful for me - also @arkuiat asked me to add MacPorts today (and I trust that he would only do that if it works reasonably well with a reasonably recent version installed) 19:43
please do highlight to me any issues with any install method listed on the new raku.org and I will try to adjust the defaults
22:41 librasteve_ left