🦋 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:00 reportable6 left 00:02 reportable6 joined 00:48 kotrcka left 01:08 razetime joined
tonyo it's not about saving keystrokes but about solving the problem, regex is meant to match patterns and it should put those functions before all else..the regex /foobar/ or /dead horse/ is just as easily read as /'foobar'/ or /'dead horse'/ and cleaner 01:17
01:33 deoac left 01:48 kjp_ left 01:53 kjp joined 02:52 Aedil left 02:54 Aedil joined 02:57 Aedil left, Aedil joined 02:59 Aedil left, Aedil_ joined 03:59 linkable6 left, evalable6 left 04:00 evalable6 joined 04:02 linkable6 joined 04:14 slu left, razetime left 04:15 slu joined 04:19 Aedil_ is now known as Aedil 04:26 squashable6 left 04:27 squashable6 joined 05:05 razetime joined 05:20 jpn joined 05:26 jpn left 05:40 sacomo left 05:41 siavash joined 05:48 sacomo joined 05:53 sacomo left 06:00 reportable6 left 06:02 reportable6 joined 07:02 squashable6 left, bloatable6 left, committable6 left, greppable6 left, shareable6 left, tellable6 left, sourceable6 left, coverable6 left, reportable6 left, benchable6 left, quotable6 left, nativecallable6 left, statisfiable6 left, notable6 left, linkable6 left, evalable6 left, bisectable6 left, releasable6 left, unicodable6 left 07:03 greppable6 joined, nativecallable6 joined, quotable6 joined, linkable6 joined, statisfiable6 joined, benchable6 joined, bisectable6 joined, unicodable6 joined 07:04 sourceable6 joined, squashable6 joined, shareable6 joined, releasable6 joined, bloatable6 joined, notable6 joined, committable6 joined, reportable6 joined 07:05 coverable6 joined, evalable6 joined, tellable6 joined 07:09 jpn joined
librasteve m: my $s = 'dead horse'; say $s ~~ /horse/ 07:43
Raku eval 「horse」
librasteve m: my $s = 'dead horse'; say $s ~~ /d horse/
Raku eval Nil Potential difficulties: Space is not significant here; please use quotes or :s (:sigspace) modifier (or, to suppress this warning, omit the space, or otherwise change the spacing) at /home/glot/main.raku:1 ------> my $s = 'dead horse'; say $s ~~ /d⏏ horse/
librasteve m: my $s = 'dead horse'; say $s ~~ m:s/d horse/
Raku eval 「d horse」
librasteve m: my $s = 'dead horse'; say $s ~~ /'d horse'/
Raku eval 「d horse」
librasteve ^^ just right imo 07:46
07:52 jpn left
nemokosch well what can I do about it 07:53
I heavily disagree that it's cleaner or as easily read 07:54
07:54 jpn joined 07:55 sena_kun joined
it's not cleaner because it mixes instructions and literals 07:55
and if that doesn't make it harder to read already, significant whitespace also means that you cannot format it 07:56
I think these are fairly concrete arguments, on the other hand I only see this vague notion that it somehow stands in the way of solving the problem - how? 07:58
08:00 jpn left 08:01 jpn joined
(also, /'some literal'/ really doesn't even require a regex) 08:02
08:09 dakkar joined 08:44 Sgeo left 08:50 razetime left 09:10 razetime joined 09:14 sena_kun left 09:24 jpn left 09:25 jpn left 09:29 jpn joined 10:29 quotable6 left, nativecallable6 left, bloatable6 left, unicodable6 left, greppable6 left, releasable6 left, shareable6 left, squashable6 left, benchable6 left, linkable6 left, notable6 left, bisectable6 left, reportable6 left, tellable6 left, statisfiable6 left, coverable6 left, evalable6 left, sourceable6 left, committable6 left 10:30 quotable6 joined, greppable6 joined, sourceable6 joined, linkable6 joined, bloatable6 joined, tellable6 joined, notable6 joined 10:31 unicodable6 joined, committable6 joined, releasable6 joined, evalable6 joined, nativecallable6 joined, coverable6 joined 10:32 shareable6 joined, bisectable6 joined, squashable6 joined, benchable6 joined, statisfiable6 joined, reportable6 joined
tbrowder__ late to the dance, but if i were looking for "dead horse" i would use ~~ /dead \h* horse/ 10:35
m: say "dead horse" ~~ /dead \h* horse/ 10:37
camelia 「dead horse」
10:53 nine left, nine joined
tonyo they're concrete arguments if you think only you can be correct, for sure 11:13
and i didn't say anything stands in the way of a problem so that's quite a few miles or kms out of context 11:14
11:25 sivoais left 11:56 sivoais joined 12:00 reportable6 left 12:01 reportable6 joined 12:03 jpn left 12:16 jpn joined 12:22 jpn left 12:27 siavash left 12:28 jpn joined 12:35 sivoais left 12:40 jpn left 12:41 jpn joined 12:47 sivoais joined
antononcube I have a design or naming question. Given that "LLM" stands for "Large Language Model", which of these package / module names you find more / most "telling" for a package with the mission statement "Raku package for functions and function objects to access, interact, and utilize LLMs" : 0) LLM 1) LLM::Functions 2) LLM::Functors 3) LLM::Framework 4) LLM::Interlocutors 13:29
13:30 raku_guest joined
nemokosch Well you didn't say anything in particular 13:33
I assumed "it's about solving the problem" and "regex (...) should put those functions before all else" meant to communicate some argument 13:34
Maybe that was presumptuous on my side but I'd say in an argument that's actually the good faith attitude 13:35
Anyway, it's tiresome that some ad-hominem red herring gets thrown in, as if there wasn't an objectively measurable difference. 13:38
13:40 xinming_ left 13:42 xinming_ joined
tonyo agreed, having to deny saying things i didn't say gets tiresome 13:52
if you have a framework the 3, otherwise 0 is what i'd look at
nemokosch then I guess we can agree that it's all about solving problems and tools that don't solve the problems are worthless 13:57
one got to know why I prefer quoted literals and not really why you prefer unquoted literals, that's all what happened 13:58
I really can't see what's the need for looking for hooks to cling something personal there 13:59
13:59 razetime left
tonyo it was asserted that it's possibly uncontended that people prefer raku regex to PCRE. i stated i prefer PCRE syntax for the most part because i don't like quoted literals in the regex. not sure we're arguing about what my preferences are. 14:00
or why it's even really a discussion, as uninteresting as it is
lizmat and uninteresting it is.... 14:04
14:10 razetime joined
nemokosch well, then you basically reassured my point. I gave a reason that might convince someone that Raku regexes are better - you said that you prefer otherwise, because. 14:12
why would that make arguments that people can just evaluate and consider, invalid
anyway, we could have spared this if you just downright said "I fancy it more and that's that" 🤷‍♂️ 14:15
lizmat *sigh* 14:17
14:18 raku_guest left
Voldenet I prefer pcre syntax only because I've been using it for two decades and tons of languages adopted very similar syntax 14:24
14:25 jpn left 14:33 jpn joined
nemokosch at the end of the day, to be able to use whichever one syntax and transform it into as many variations as possible, is a win either way 14:33
[Coke] anything other than coding stopping us from adding a :pcre to support the syntax? (as opposed to linking to a library) 14:34
nemokosch imo the fact that the Raku syntax kind of stands out can even be a benefit for initial learning (less "which one was it" moments about the minuscule details) but once you only use one for some time, it doesn't matter as much anymore I guess 14:36
14:38 jpn left
[Coke] in the future, could we have a PCRE syntax RE compiled with rakuast and then rendered as a raku RE? (or vice versa) 14:38
14:56 merp left 14:58 deoac joined
tonyo [Coke]: it'd be easy enough to hook up a PCRE library and grammar it 15:05
or should it be: s/'grammar'/slang 15:06
15:24 jpn joined
tonyo isn't there a :P5 in the regex? 15:29
15:30 jpn left
tonyo m: say so 'hello world' ~~ m:P5{o w} 15:30
camelia True
15:33 merp joined
SmokeMachine m: use v6.e.PREVIEW; say “42.is-prime”.AST 15:40
camelia RakuAST::StatementList.new(
expression => RakuAST::ApplyPostfix.new(
operand => RakuAST::IntLiteral.new(42),
postfix => RakuAST::Call::Method.new(
name => RakuAST::Name.from-ident…
SmokeMachine m: use v6.e.PREVIEW; say “42.^name”.AST 15:41
camelia RakuAST::StatementList.new(
expression => RakuAST::ApplyPostfix.new(
operand => RakuAST::IntLiteral.new(42),
postfix => RakuAST::Call::MetaMethod.new(
name => "name"
15:51 Sgeo joined 15:57 deoac left 16:01 jpn joined 16:10 jpn left, m_athias left, nine left, nine joined 16:11 m_athias joined 16:31 jpn joined 16:35 dakkar left
Voldenet well, on top of :P5 there's inline perl 16:44
m: EVAL q!print ('hello world' =~ m{o w}!, :lang<Perl5> 16:45
camelia Could not find Inline::Perl5 in:
16:45 jpn left
lizmat Well, I guess that could be one approach: :P5 to call into Inline::Perl5 somehow 16:46
advantage would be that the P5 regex would always be compatible with the Perl version that is being used :-)
another approach could be to drop support for :P5 altogether :-) 16:47
and make a more general "pluggable" regex approach 16:48
Voldenet I think having the syntax for :P5 is better than using perl interpreter, but considering the maintenance cost pluggable regex (with Inline::Perl5) sounds better
it makes more sense on nqp-js, where js regexes are better fit 16:50
16:52 jpn joined 16:53 razetime left 17:16 vrurg left, vrurg joined 17:22 vrurg left
nemokosch also, should the "P5 regex" just be a different syntax for the same behavior or different behavior altogether? 17:24
I mean capture groups for example - do they nest and turn into arrays for quantifiers?
tonyo m: say 'abcdefghijk' ~~ m:P5{(.(.))}; 17:27
camelia 「ab」
0 => 「ab」
1 => 「b」
tonyo looks like they do
nemokosch hm, fair enough
actually, what I don't know is how it works in Perl 😅 17:28
17:46 sena_kun joined
tonyo you'd get ['ab', 'a', 'cd', 'd', 'ef', 'f', ...] 17:47
m: say 'abcdefghijk' ~~ m:P5:g{(.(.))}; 17:49
camelia (「ab」
0 => 「ab」
1 => 「b」 「cd」
0 => 「cd」
1 => 「d」 「ef」
0 => 「ef」
1 => 「f」 「gh」
0 => 「gh」
1 => 「h」 「ij」
0 => 「ij」
1 => 「j」)
tonyo contextually in p5 you could use a while over the regex to the data in the same format as raku's return, so it's not entirely unfamiliar 17:50
17:51 vrurg joined 17:58 ScotDog joined
ScotDog Hello Everyone! 17:58
18:00 reportable6 left
ScotDog Is anyone there? 18:01
18:02 reportable6 joined
ScotDog What is Raku? I have never heard of it. I am interested! 18:04
librasteve o/
raku is the new name for perl6
raku.org has some intro info 18:05
ScotDog Oh that is pretty cool 18:06
librasteve certainly is!
also the rakudo weekly news is worth a read - rakudoweekly.blog (have to say that or @lizmat will kill me) 18:09
ScotDog Thank you librasteve! I will check that out 18:11
18:19 ScotDog left 18:27 vrurg left 18:37 vrurg joined 18:47 deoac joined 18:54 jpn left 18:57 jpn joined, xinming_ left 18:59 xinming_ joined 19:10 jpn left 19:11 jpn joined 19:17 jpn left 19:23 jpn joined
gfldex m: spurt("/tmp/\xFEFF.txt", ‘oi‽’); slurp("/tmp/\xFEFF.txt").say; 19:56
camelia oi‽
gfldex m: shell('ls -la /tmp').say;
camelia total 4876
drwxrwxrwt 1 root root 56306 Jul 19 21:56 .
drwxr-xr-x 1 root root 136 Nov 17 2018 ..
drwxrwxrwt 1 root root 0 May 26 2015 .ICE-unix
drwxrwxrwt 1 root root 0 May 26 2015 .Test-unix
drwxrwxrwt 1 root …
gfldex m: shell('ls -la /tmp/*.txt').say; 19:57
camelia -rw-r--r-- 1 camelia users 5 Jul 19 21:56 /tmp/.txt
Proc.new(in => IO::Pipe, out => IO::Pipe, err => IO::Pipe, exitcode => 0, signal => 0, pid => 11654, command => ("ls -la /tmp/*.txt",))
gfldex I better stop now, before I break something. :->
:D Windows explorer RMB/Properties doesn't work on that filename. 20:00
No wait, it does! But it takes over a minute to open the dialog. 20:01
20:08 jpn left 20:12 jpn joined 20:19 jpn left, jpn joined 20:35 jpn left 20:39 jpn joined 20:48 sena_kun left 21:07 jpn left
jdv is there a ctags impl for raku anyone know about? 21:08
21:08 jpn joined
[Coke] blogs.perl.org/users/dmitri/2015/0...erl-6.html 21:11
github.com/universal-ctags/ctags/b...erl6.c#L28 21:12
jdv i just noticed that 21:13
is also maps weird extensions to "perl6"
21:13 jpn left
[Coke] just old. 21:16
jdv yeah...
21:21 jpn joined 21:29 deoac left 21:38 jpn left
[Coke] github.com/universal-ctags/ctags/issues/377 21:39
21:59 deoac joined
[Coke] jdv: github.com/universal-ctags/ctags/pull/3777 22:20
Seemed easy enough to take a stab at it, though I'm not sure it's complete.
jdv oh neat 22:57
22:57 deoac left 23:34 jpn joined 23:39 jpn left