| 8 Jun 2026 | |||
| timo | there you go. newer version uploaded to fez | 20:16 | |
| [Coke]: can't believe you first post an issue "more debug output please" and now it's "too much debug output" SMH my head ;) | 20:17 | ||
| [Coke] | You can't win! | 20:59 | |
| lizmat | PSA: the IRC logs server is experiencing an overload atm, so I've taken it down for now | 21:24 | |
| . | 22:39 | ||
| tbrowder | timo, thanks | 23:39 | |
| the whole Raku world relies on yr work | 23:40 | ||
| 9 Jun 2026 | |||
| disbot4 | <melezhik.> liz: irclogs.raku.org/ is down for me | 06:28 | |
| <melezhik.> ^^ lizmat: | 06:29 | ||
| xinming | my $fh = open("xxx.bin", :enc<utf16>); my $buf = $fh.read(8, :bin); | 07:02 | |
| In this case, the buf should be Buf[uint16], right? | |||
| bbl, I'll ugpraded my raku and test again. | |||
| timo | tbrowder: liz put in a lot of work with JSON::Fast as well | 07:28 | |
| xinming | Even with 2026.05 version, when open a file with :enc<utf16>, read returns Blob[uint8] too. | 08:33 | |
| So a bug | |||
| timo | xinming: i think read is for binary reading, not encoded reading | 08:35 | |
| xinming | timo: Which method to use then? When I check the doc, there is readchars | 08:46 | |
| I thought readchars is pure byte by byte reading | |||
| timo | you have it backwards, readchars is to get decoded strings and read is for byte-for-byte reading | 08:47 | |
| depending on your use case, you may be more likely interested in .get to read line-by-line, or .slurp to read everything? | 08:48 | ||
| xinming | timo: I wish to get Buf[uint16] string | 08:52 | |
| timo: Thanks, I just read the docs.raku.org/type/IO/Handle yea, read do byte reading, readchars do graphemes | |||
| timo | OK, i'm not sure what the easiest way is to get from a file handle to a 2-byte buffer | 08:53 | |
| xinming | I can manually combine 2 uint8 in to a single uint16, But there're unnecessary steps I want to avoid. | 08:54 | |
| something like, my $buf = $fh.read(24, :bin); $buf.rotor(2).map( ... ) | 08:55 | ||
| timo | there's methods on Buf for reading and writing different sizes of bytes at desired endiannesses | 08:56 | |
| m: my $a = Buf.new; $a.write-uint32(0x123456); say $a | |||
| camelia | Too few positionals passed; expected 3 or 4 arguments but got 2 in block <unit> at <tmp> line 1 |
||
| timo | m: my $a = Buf.new; $a.write-uint32(0, 0x123456); say $a | ||
| camelia | Buf:0x<56 34 12 00> | ||
| xinming | timo: thanks for the Buf methods hint, Will paly on Buf.write-* method | 09:02 | |
| timo | well, you will want the .read-* methods to get 16bit parts from an 8bit buf and put them into an array of some kind | 09:05 | |
| xinming | timo: Thanks, the read-* methods from Blob is what I want. Much better than my .parse-base method | 09:18 | |
| timo | apart from .parse-base, there's also this: | 09:19 | |
| m: say :256[0x10, 0x20, 0x30, 0x40] | 09:20 | ||
| camelia | 270544960 | ||
| timo | m: say :256[0x10, 0x20, 0x30, 0x40].base(16) | ||
| camelia | 10203040 | ||
| timo | m: say :10[1,2,3,4,5,6] | 09:21 | |
| camelia | 123456 | ||
| timo | m: say :65536[0xabcd, 0xaffe, 0x9876].base(16) | 09:22 | |
| camelia | ABCDAFFE9876 | ||
| timo | it's a little bit like parse-base but it operates on integers instead of strings. i guess it's a bit like polymod in reverse? | ||
| basically it's $accum = $accum * $base + $_ for @numbers i think | 09:23 | ||
| disbot4 | <librasteve> .oO guess I need to add that to cragcli.info | 13:24 | |
| <librasteve> hi. i just submitted Slangify: The Case for DSLs in LLM Workflows to Hackernews news.ycombinator.com/item?id=48460953 … your comments on this topic would be very welcome to help it gain momentum | 13:37 | ||
| tbrowder | timo: yes, as in the old song about super man: lizmat's everywhere, she's everywhere! | 14:59 | |
| 10 Jun 2026 | |||
| xinming | Hi, with rakubrew, if I download the tar ball manually, and extract the tar ball, and move it to $HOME/.rakubrew/versions/ folder, then run 'radkubrew global xxxx' to switch to the version I manually installed. Do I need some other steps to make the installation right? | 04:39 | |
| I don't use rakubrew download as there is firewall causing network die randomly | 04:40 | ||
| patrickb | xinming: From the top of my head: that's it. | 05:09 | |
| disbot4 | <melezhik.> o/ | 05:24 | |
| <melezhik.> Looking for volunteers to participate in QA automation of rocky Linux and Rakulang development of QA scripts . Let me know here or PM me. Rocky Linux teams has a lot of open tickets where people can participate. And yes they use Raku, sparrow, Spraky to automate tests. | 05:27 | ||
| xinming | patrickb: Thanks. | 05:31 | |