🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). Log available at irclogs.raku.org/raku/live.html . If you're a beginner, you can also check out the #raku-beginner channel!
Set by lizmat on 6 September 2022.
00:19 jpn joined 00:24 jpn left 01:18 F3nd0 left 02:42 kylese left, hulk joined 03:15 hulk left, kylese joined 03:17 Summer joined
Summer m: say 'abc'.&{ m/./, m/../ } 03:23
camelia (ï½¢abï½£ ï½¢abï½£)
Summer I get why, but
03:40 edr left 04:04 grondilu left 04:06 Summer left 04:15 grondilu joined 04:23 jpn joined 04:28 jpn left 06:03 Summer joined 07:24 avuserow left 07:25 avuserow joined
lizmat Summer: if you get why, why do it like that ? 08:53
08:53 simcop2387 left, perlbot left 08:58 perlbot joined, simcop2387 joined 09:26 Summer left 09:32 sena_kun joined 10:10 jpn joined 10:12 sena_kun left
nemokosch I remember this somehow 10:35
And I even seem to remember that this was agreed to be a bug 10:36
Another case of "$/ shouldn't be read internally"
10:37 tejr left 10:43 tejr joined 10:51 jpn left
lizmat m: my $a = 42; sub a() is raw { $a++; $a }; say a,a # basically the issue 10:51
camelia 4444
lizmat m: my $a = 42; sub a() { $a++; $a }; say a,a # basically the issue 10:52
camelia 4344
10:53 Sgeo left 10:54 jpn joined 10:58 jpn left
nemokosch but it's still incorrect that it just echoes $/ back 10:59
it should be the other way around, as with grammars: create a value, and then copy it into $/ 11:00
m: say 'abc'.&{ .match(/./), .match(/../) } 11:01
evalable6 Cannot test ce46b15c6e189964dfbf817624a30af228452c7d (Commit exists, but an executable could not be built for it)
linkable6 (2023-12-08) github.com/rakudo/rakudo/commit/ce46b15c6e Remove unnecessary "done-testing"
Raku eval (ï½¢aï½£ ï½¢abï½£)
nemokosch just like this, actually
grondilu m: enum coin <heads tail>; say heads but role {} ~~ heads 11:37
camelia False 11:38
grondilu ^I was expecting True
I don't see why mixin would change the nature of an enum item 11:39
m: class A {}; say A.new ~~ A
camelia True
lizmat looks like enum.ACCEPTS is using ===
grondilu m: class A {}; say A.new but role {} ~~ A
camelia True 11:40
grondilu lizmat: that's not right, is it?
lizmat feels wrong indeed
grondilu should I create an issue?
lizmat yes please
grondilu will do 11:41
lizmat a simple fix using nqp::istype does not seem to do the trick :-( 11:45
nemokosch: looks like the issue is already resolved in RakuAST 11:48
m: say Q|say "{ $_ = "abc"; m/./, m/../ }"|.AST.EVAL
camelia a ab
True
lizmat it's just that the .&{ } syntax is not yet supported in RakuAST 11:49
grondilu github.com/rakudo/rakudo/issues/5492 11:50
nemokosch Similar topic to github.com/rakudo/rakudo/pull/5275 11:51
13:01 constxqt_ left 13:33 merp left 13:35 merp joined 14:20 melezhik joined
melezhik o/ 14:20
hi lizmat ! I have a question on rak 14:21
how can I find everything start starts with "foo" and ends with ";" multiline , is it possible with oak?
rak
oak is a good name as well BTW ))) 14:22
14:30 edr joined 14:31 hobbs joined, melezhik left 14:35 melezhik joined, melezhik left
hobbs If I do @foo.race.map: -> $blah { ... }, should I expect lexical variables declared in the '...' to be "safe" / independent between threads? I tried it on an AoC solution just for fun and I'm getting inconsistent results. gist.github.com/arodland/67d4af5f4...9757089f52 14:50
tellable6 2023-12-07T11:04:45Z #raku <nemokosch> hobbs: I just found something raku.land/zef:Scimon/Range::SetOps
15:16 xinming left 15:18 xinming joined
lizmat .tell melezhik rak --per-file '/ foo .*? ";" /' but that would only give you one find / file and I guess that's not what you want 15:37
tellable6 lizmat, I'll pass your message to melezhik
15:46 melezhik joined, xinming left
melezhik . 15:46
tellable6 2023-12-08T15:37:49Z #raku <lizmat> melezhik rak --per-file '/ foo .*? ";" /' but that would only give you one find / file and I guess that's not what you want
melezhik .tell lizmat so yeah, I am looking for a code snippets in results, denoted by semi comas, actually those are function calls
tellable6 melezhik, I'll pass your message to lizmat
melezhik interesting, but something rak 'foo' --before-context=2 --after-context=5 examples/ gives the me that 15:47
not your example
lizmat yeah, but that *shows* lines around a find 15:48
15:48 xinming joined
lizmat if the "foo" is on one line, and the ";" is on another, it won't find it 15:48
melezhik I see
can your example works with color output ?
lizmat I guess something like --search-context=3 would check 3 lines at a time, basically rotorig 3 => -2 15:49
melezhik yeah, I mean I need exact function calls for that matter --before/after may vary 15:51
lizmat re color output: --highlight-before and --highlight-after should allow you to add color 15:52
with the right escape sequences, but I've never tried that
melezhik hmmm, not sure if I understand who it all works 15:56
how 15:58
16:02 melezhik left
lizmat melezhik: on further thought, you might want to try with something like: rak --per-line='*.lines.rotor(3 => -2)' 16:35
tellable6 lizmat, I'll pass your message to melezhik
lizmat that would check against 3 lines at a time
16:37 El_Che left 16:38 El_Che joined
lizmat melezhik: actually: rak --per-line='*.lines.rotor(3 => -2)>>.Str' 16:40
tellable6 lizmat, I'll pass your message to melezhik
17:50 Sgeo joined 17:52 Ben69 joined 17:53 Ben69 left 18:45 xinming left 18:48 xinming joined 18:59 abraxxa-home joined, jpn joined 19:02 abraxxa-home left 19:03 abraxxa-home joined 19:11 jpn left 19:27 jpn joined 19:36 abraxxa-home left 19:59 jpn left 20:03 Summer joined 20:45 xinming left 20:47 xinming joined 21:22 spide-pig joined
spide-pig Please be patient with me, I'm new and don't really know what I'm doing. 21:27
I know just enough perl and BASH to meet my daily needs and after seeing a vid of Bruce Grey at perl con and following along in rakudo I'm really liking what I see. I'm a pleibian so it's mostly going to be a bc and grep killer until I get a better feel. Is there anything similar to perltut available yet? It'd be really nice to try and learn whilst
going through the advent of code challenges.
avuserow spide-pig: learnxinyminutes.com/docs/raku/ might be a good starting point 21:31
spide-pig Thank you :D , looks quite handy I shall investigate later tonight. 21:34
21:45 xinming left 21:47 xinming joined 21:59 sena_kun joined 22:06 spide-pig left, spider-pig joined 22:27 kst left 22:41 jpn joined 22:44 swaggboi left 22:46 spider-pig left, spider-pig joined 22:52 swaggboi joined 22:59 swaggboi left 23:01 swaggboi joined 23:03 jpn left 23:15 xinming left 23:17 xinming joined 23:41 dustinm` left 23:46 dustinm` joined 23:51 sena_kun left