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.
guifa Nemokosch: if you update Intl::CLDR to 0.7.2, Intl::Format::Number should install no problem now O:-) 00:03
00:03 discord-raku-bot left, discord-raku-bot joined
guifa format-number 12345678, :language<fa>; # ۱۲٬۳۴۵٬۶۷۸ 00:06
jaguart trying to ``rakubrew triple`` to upgrade 00:10
getting /usr/bin/ld: ./libmoar.so: undefined reference to `uv__cloexec_ioctl'
Nemokosch should have asked what this command was supposed to do before running it... 00:14
it did compile for me though 00:20
jaguart oh - ``rakubrew build`` seems to have resolved - apparently ``triple`` hadn't updated the moarvm repo 00:21
jaguart shrugs - or maybe not build works triple fails 00:24
has zef repo changed name of master to something else? 00:26
Nemokosch yes, main
jaguart hmmm 00:27
00:27 Nemokosch joined
jaguart so the real fix is ``rakubrew self-upgrade`` to get all the latest repos and branch names, doh 00:31
rakubrew triple
Nemokosch indeed, I did that prior to running the command 😅 00:32
00:32 Nemokosch left
jaguart still failing... 00:34
So ``triple`` works if I remove old ``~/.rakubrew/versions/moar-HEAD-HEAD-HEAD`` - I'm putting it down to branch name changes etc. 00:51
and the ``build-zef`` fix was also to remove the ~/.rakubrew/repos/zef repo 00:53
02:50 deoac joined
deoac How do I write a regex to match ANSI/xterm terminal codes? 02:51
"\e"
\/\\e\[\d+m/ doesn't work 02:52
ignore the leading backslash
kjp deoac: The "\e" is an escape character, so something like "/\x1b" is one possibility 03:05
or "\[ESCAPE]" might be clearer 03:09
03:09 habere-et-disper left 03:58 frost left 04:19 deoac left 04:22 deadmarshal left 05:02 deadmarshal joined 05:34 razetime joined 06:58 Kaipei joined 07:19 m_athias left 07:20 m_athias joined 07:35 razetime left, razetime joined 08:02 Heptite left 08:04 razetime left 08:21 razetime joined 08:55 dakkar joined 09:10 frost joined 10:07 frost left 10:27 frost joined 10:34 frost left 10:37 frost joined 10:43 frost left 11:10 frost joined 11:26 frost left, discord-raku-bot left 11:27 discord-raku-bot joined 12:06 frost joined 12:19 discord-raku-bot left, discord-raku-bot joined 12:53 frost left 14:23 Kaipei left
Anton Antonov What is the easiest way to interlace the elements of an array with a value? E.g. from `<1 2 3>` and `a` to get `<1 a 2 a 3>` . 14:31
14:43 Kaipei joined
lizmat and yet another Rakudo Weekly News hits the Net: rakudoweekly.blog/2022/11/14/2022-...butterfly/ 14:44
15:51 Heptite joined 16:08 m_athias left 16:09 m_athias joined 16:58 razetime left 17:19 bigfondue left 17:37 dakkar left 19:32 bigfondue joined
lakmatiol ```perl 21:06
> (gather for @a {take 'a'; take $_})[1..*]
(1 a 2 a 3)```
this was my first idea, but I don't like it all that much
avuserow m: my @a = <a b c>; say @a.kv # @lakmatiol 21:09
camelia (0 a 1 b 2 c)
avuserow m: my @a = <a b c>; say flat zip @a.keys, @a; # or more generally, with zip 21:10
camelia (0 a 1 b 2 c)
avuserow oh sorry I didn't fully read this :| 21:13
m: my @a = <1 2 3>; say zip(@a, "a" xx *).flat.head(*-1) 21:16
camelia (1 a 2 a 3)
Nemokosch yeah big brain 21:21
lakmatiol yeah, IG zip and flat is nicer than gather here 22:25
Nemokosch I'm not sure if anybody likes this but it's sufficiently weird to show... 23:05
m: sub jojin(List() $lhs, $rhs, :$inner = $*INNER) { |$lhs, $inner, $rhs }; given 'a' -> $*INNER { dd [[&jojin]] (1, 2, 3, 4, 8); } 23:06
> (1, "a", 2, "a", 3, "a", 4, "a", 8)
of course at this point you can rename your sub `jojin` to something like `infix:<J>` 23:08