01:20 hulk joined 01:22 kylese left 01:33 topnep left 01:35 topnep joined, sibl joined 02:11 sibl left 02:15 hulk left, kylese joined 02:36 apogee_ntv left 02:37 apogee_ntv joined 03:10 sibl joined 03:45 lichtkind_ joined 03:48 lichtkind__ left 04:36 Inline left 05:00 maylay left 05:10 maylay joined 05:16 hurufu joined 05:31 Sgeo left 05:44 topnep left 05:46 topnep joined 06:17 abraxxa joined 06:34 hurufu left 07:50 topnep left 07:51 topnep joined 07:53 dakkar joined 08:01 hurufu joined 08:11 apogee_ntv left 09:08 Inline joined 09:48 librasteve_ joined 09:55 topnep left 09:57 topnep joined 10:14 sibl left 11:20 acidsys left 11:31 Inline left 11:40 acidsys joined 12:19 Inline joined 12:27 Inline left 12:30 Inline joined 12:33 abraxxa left 12:37 abraxxa joined
xinming accorrding to docs.raku.org/type/IO/Handle "As of 6.d language version, the use of path '-' is deprecated and it will be removed in future language versions entirely. 12:46
In this case, How do we re-open the $*IN handle in binary mode? 12:47
lizmat m: dd IO::Handle.new(path => IO::Special.new("STDIN")) # perhaps ? 12:54
camelia IO::Handle.new(path => IO::Special.new("STDIN"), chomp => Bool::True, nl-in => $("\n", "\r\n"), nl-out => "\n", encoding => "utf8")
xinming lizmat: Got it, thanks 13:10
m: my Buf[uint8] $t = $*IN.read(48, :bin); $t.rotor(2).map({ .reverse.map(*.base(16)).join("") }).raku.say
camelia ("BBC2", "6157", "6E6E", "7420", "6572", "6666", "6E65", "7720", "7269", "6420", "6572", "2069", "6977", "6465", "7265", "7A20", "7375", "6D61", "3F6D", "ABC2", "20A", "2020", "BBC2", "6D55").Seq
lizmat well, that actually doesn't work (yet), but something like that
xinming: maybe make an issue for the deprecation of "-" and how to re-open $*IN 13:11
xinming with this example, I got uint8 read from stdin, and trying to make it a Buf[uint16], Is there a built-in method for this?
when I try to use *.base(16).join(""), and do "str".parse-base(16) It seems there are some unnecessary steps to do the convertion. 13:12
lizmat have you tried $*IN.encoding('utf16') ?
xinming Is it possible to directly load binary into uint directly? 13:13
lizmat: hmm, thanks, will try it now.
I don't know encoding works in this case. I thought it's for decoding utf8
lizmat docs.raku.org/type/IO/Handle#method_encoding
"bin" would do uint8 I think 13:14
xinming m: my $b = Blob[uint16].new(|(1..2000).pick(24)); $*ERR.say: $b.raku; $*OUT.write: $b, :bin 13:27
lizmat: $*IN.encoding('utf16') won't return Buf[uint16], It still returns Buf[uint8]
$*IN.encoding('utf16'); my $t = $*IN.read(24, :bin); $t.raku.say; 13:28
evalable6 Buf[uint8].new(226,153,165,240,159,166,139,32,234,146,155,227,142,178,226,130,138,226,188,166,240,159,130,180)
lizmat hmmm... that *could* be considered a bug
xinming Ok, I'll do 2 bug reports then. :-)
lizmat thank you!
xinming I'll stick with my original version, which uses .parse-base for now 13:29
13:34 Inline left 13:54 hurufu left 13:56 Inline joined 14:10 hurufu joined 15:09 librasteve_ left 15:44 human-blip left 15:46 human-blip joined 16:03 vrurg_ joined, vrurg left 16:20 librasteve_ joined 16:35 dakkar left 17:00 tgt joined, tgt left 17:06 abraxxa left 17:09 manu_ is now known as eseyman 17:12 lizmat left, lizmat joined
ugexe you can't reopen stdin, stdout, stderr 17:45
ah, i guess it depends on what is meant by reopen 17:46
i.e. you can't open stdin stdout stderr after they've been close 17:47
18:18 topnep left 18:21 topnep joined 18:24 topnep left 18:25 topnep joined 18:29 librasteve_ left 19:08 belluzj joined 19:16 belluzj left 20:29 topnep left, topnep joined 20:37 hurufu left 20:38 Inline left 21:05 jjido joined 22:08 jjido left 22:32 Sgeo joined 22:44 lizmat left, lizmat_ joined
japhb What is the oldest Rakudo y'all are using in your CI pipelines? Trying to decide whether to bump the Rakudo ages for my various repo CI actions ... 22:50
22:51 Inline joined