This channel is intended for people just starting with the Raku Programming Language (raku.org). Logs are available at irclogs.raku.org/raku-beginner/live.html
Set by lizmat on 8 June 2022.
00:49 MasterDuke left 01:10 jgaz joined 02:46 teatwo left, teatwo joined 03:19 human-blip left, human-blip joined 03:27 razetime joined 08:19 tea3po joined 08:20 tea3po left, tea3po joined 08:21 teatwo left 08:36 razetime left 11:36 habere-et-disper joined
habere-et-disper I can pass an operator with something like &infix:<+> 11:45
But how do I pass any infix operator?
Something like : 11:58
m: sub compute-infix( $a, &op, $b ) { $a &op $b }; say compute-infix( 3, &infix:<+>, 4 );
camelia all(3, 4)
12:04 thowe left
lizmat m: sub compute-infix( $a, &op, $b ) { op($a,$b) }; say compute-infix( 3, &infix:<+>, 4 ); 12:10
camelia 7
12:10 thowe joined
habere-et-disper :] 12:11
lizmat++ 12:13
m: infix:<+>(3, 4)
camelia WARNINGS for <tmp>:
Useless use of "infix:<+>(3, 4)" in expression "infix:<+>(3, 4)" in sink context (line 1)
habere-et-disper m: say infix:<+>(3, 4)
camelia 7
12:53 habere-et-disper left
jgaz How do I slurp a binary file starting at a specific offset? 16:30
lizmat "file".IO.open.seek($offset).slurp 17:41
but that wouldn't close the handle
jgaz but that only would make sense for files opened with :bin 17:45
for text based, you could wind up in the middle of a multi-byte code point
anyways: docs.raku.org/type/IO/Handle#method_seek 17:46
jgaz lizmat: thanks... 17:48
19:18 discord-raku-bot joined 19:30 discord-raku-bot left 19:31 discord-raku-bot joined 20:19 teatwo joined 20:23 tea3po left 21:40 deoac joined 23:40 deoac left