🦋 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.
lizmat .tell tbrowder__ it's set up 09:13
tellable6 lizmat, I'll pass your message to tbrowder__
tbrowder__ .tell lizmat thank you! i'll pass it on 11:03
tellable6 tbrowder__, I'll pass your message to lizmat
SmokeMachine antononcube: I found an old advent calendar post (writer by me) that shows that was that way once ago (perl6advent.wordpress.com/2016/12/...-testing/) and for some reason I have changed that… 12:07
tbrowder__ SmokeMachine: cool, i'll check it out 14:11
tellable6 2023-07-23T09:13:44Z #raku <lizmat> tbrowder__ it's set up
arco whats the point of raku(perl 6)? 14:20
well im kinda new to perl. having 2 languages that do almost the same thing seems confusing to me. 14:21
lizmat well, historically, Perl 6 was intended to be the next version of the Perl language
arco so why is its botched? 14:22
lizmat realistically, the Perl community decided it was not going to be the next version, so it made sense to rename the Perl 6 effort
what is botched?
arco never mind
tonyo , 14:23
SmokeMachine: i don't want fuzz, i think an LLM comparison to it would be interesting for a talk
antononcube Dully noted. 14:28
arco when to use raku over perl? 14:34
lizmat generally: use Raku, unless you have compelling reasons to use Perl 14:35
but then I'm biased 14:36
arco raku doesnt have cpan
lizmat it does have raku.land
antononcube @arco There are several factors to consider when deciding whether to use Raku (formerly known as Perl 6) over Perl: 1. Language features: Raku offers a more modern and expressive syntax compared to Perl. It includes features like built-in support for object-oriented programming, functional programming, concurrency, and grammars for parsing. 2. Community and ecosystem: Perl has a much larger and more mature 14:37
community and ecosystem compared to Raku. It has a vast number of modules and libraries available, making it easier to find solutions to common problems. Raku, being a relatively newer language, has a smaller community and a smaller ecosystem of modules, which may make it a less ideal choice for certain projects. 3. Legacy codebase: If you have an existing Perl codebase, it may be more practical to stick with Perl rather than
migrating to Raku. Perl and Raku are distinct languages, and migrating code from Perl to Raku can require significant effort and changes. 4. Performance: Raku generally has a reputation for being slower than Perl, especially for certain tasks. If performance is a critical factor for your project, Perl might be a better choice. 5. Personal preference: Ultimately, the choice between Raku and Perl may also depend on personal
preferences and familiarity with the languages. If you are already proficient in Perl and comfortable with its syntax and features, there may not be a strong motivation to switch to Raku unless you specifically require the additional features it offers.
@arco The answer above is by OpenAI / ChatGPT. 14:38
lizmat arco: also, if you install raku.land/cpan:NINE/Inline::Perl5 you have 99.99% of CPAN on your fingertips
arco alright 14:39
will go with it
antononcube Hmmm... I should generate another "templated" document with 12-steps of replacing Perl with Raku.
Xliff m: my $d = DateTime.new( year => 2023, month => 6, day => 25 ); $d.say 15:58
camelia 2023-06-25T00:00:00Z
Xliff m: my $d = DateTime.new( year => 2023, month => 6, day => 25 ); my $e = DateTime.new( year => 2023, month => 8, day => 25 ); $e.say
camelia 2023-08-25T00:00:00Z
Xliff m: my $d = DateTime.new( year => 2023, month => 6, day => 25 ); my $e = DateTime.new( year => 2023, month => 8, day => 25 ); say $d..$e 15:59
camelia DateTime.new(2023,6,25,0,0,0)..DateTime.new(2023,8,25,0,0,0)
Xliff m: my $d = DateTime.new( year => 2023, month => 6, day => 25 ); my $e = DateTime.new( year => 2023, month => 8, day => 25 ); say ($d..$e).Array
camelia Range cannot be iterated over because its starting point
'DateTime.new(2023,6,25,0,0,0)' does not have a '.succ' method
in block <unit> at <tmp> line 1
Xliff WTF?
I thought you could iterated between DateTime endpoints using Range.
m: role DateTimeSucc { method succ { self.later( :1day ) }; }; my $d = DateTime.new( year => 2023, month => 6, day => 25 ) but DateTimeSucc; my $e = DateTime.new( year => 2023, month => 8, day => 25 ); say ($d..$e).Array 16:00
camelia No such method 'succ' for invocant of type 'DateTime'. Did you mean
any of these: 'sum', 'utc'?
in block <unit> at <tmp> line 1
Xliff m: role DateTimeSucc { method succ { self.later( :1day ) }; }; my $d = DateTime.new( year => 2023, month => 6, day => 25 ) but DateTimeSucc; my $e = DateTime.new( year => 2023, month => 8, day => 25 ) but DateTimeSucc; say ($d..$e).Array 16:01
camelia [2023-06-25T00:00:00Z 2023-06-26T00:00:00Z 2023-06-27T00:00:00Z 2023-06-28T00:00:00Z 2023-06-29T00:00:00Z 2023-06-30T00:00:00Z 2023-07-01T00:00:00Z 2023-07-02T00:00:00Z 2023-07-03T00:00:00Z 2023-07-04T00:00:00Z 2023-07-05T00:00:00Z 2023-07-06T00:00:00…
lizmat Xliff: I seem to recall having made a module for that at some time
Xliff m: role DateTimeSucc { method succ { self.later( :1day ) }; }; my $d = DateTime.new( year => 2023, month => 6, day => 25 ) but DateTimeSucc; my $e = DateTime.new( year => 2023, month => 8, day => 25 ) but DateTimeSucc; my @a = $d..$e; @a.elems.say
camelia 62
lizmat Xliff: raku.land/zef:lizmat/Interval
Xliff lizmat: Thanks. Will check it out.
m: role DateTimeSucc { method succ { self.later( :1day ) }; }; my $d = DateTime.new( year => 2023, month => 6, day => 25 ) but DateTimeSucc; my $e = DateTime.new( year => 2023, month => 8, day => 25 ) but DateTimeSucc; my @a = $d..$e; @a.map( *.day ).gist.say 16:02
camelia (25 26 27 28 29 30 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25)
Xliff Well THAT went pair-shaped.
lizmat cherry-shaped? 16:04
Xliff lizmat; Methinks bitrot has seeped into Interval. 16:09
P6opaque: no such attribute '$!second' on type Interval in a Interval when trying to bind a value
lizmat Xliff: interesting, /me checks
Xliff: tests are ok for me... how did you make it bomp lioke that ? 16:10
*like
Xliff This triggers error: 'use Interval :refine; my $s = DateTime.now; $s = $s.earlier( day => $s.day.pred ); $s = $s.truncated-to("week").earlier( :1day );'
This is on a fairly freshly squeezed raku.
lizmat checks again
Xliff v2023.06-119-g60a96bb6e0 16:11
lizmat hmm looks like a thinko of about 2.5 years ago: e6c0b5e919 16:17
running tests on a fix 16:18
Xliff Ouch!
lizmat it only affects sub-classes of DateTime doing .truncated-to 16:19
Xliff Kinda need that one... 16:21
lizmat yeah, fix forthcoming
Xliff Huh... can't find that revision hash "e6c0b5e919" 16:24
lizmat in rakudo?
Xliff Oh! I thought you meant Interval. LOL!
lizmat nope, Interval is ok
it's a core issue 16:25
Xliff O I C. I will leave you to it, then.
lizmat running tests with the final version of the fix now
Xliff: github.com/rakudo/rakudo/commit/b58bf6db30 :-) 16:32
Xliff Thanks, lizmat! 17:08
thebb Installed 23 core modules in 9.732086748 seconds! 18:00
new laptop, breaking records 18:01
[Coke] META6:ver<0.0.29>:auth<zef:jonathanstowe>:api<1.0> failing to install on HEAD 18:40
module hasnt been updated for a year 18:41
bisecting... 18:44
lizmat I think that's a known issue, currently under investigation
lizmat vrurg knows more I think 18:49
[Coke] should script this. or use whateverable somehow 19:15
vrurg [Coke]: It's been discussed here: github.com/raku-community-modules/.../issues/7, and here: github.com/raku-community-modules/...256a7a92cf 19:27
[Coke] vrurg, thanks 19:33