🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). This channel is logged for the purpose of keeping a history about its development | evalbot usage: 'm: say 3;' or /msg camelia m: ... | Log inspection is getting closer to beta. If you're a beginner, you can also check out the #raku-beginner channel!
Set by lizmat on 25 August 2021.
melezhik wow! SmokeMachine have done a lot of reviews/comments for some Raku/Perl modules on mybf.io - thanks a lot Ferdnando, way to go! 02:16
one of the feature of mybfi - one can quickly announce a release and get feedbacks from users - mybf.io/project/Red/reviews even though people don't see it strait away, they can write back latter, somewhat alternative to irc/tell thing ))) 02:19
melezhik or better say addition to irc/tell thing 02:21
Geth examples: 5f17abce45 | (Roman Baumer)++ | 2 files
It seems Pod::To::Perl is actually still used

for building the examples documtation using "raku htmlify.pl"
Revert "Remove unused Pod::To::Perl module" This reverts commit 52de88cd638d80c4760ffa34959171b1c863d966.
12:54
examples: 4409c18e07 | (Roman Baumer)++ | README.md
htmlify.p6 -> htmlify.pl
12:55
rba [Coke]: I made a git pull, rebuild of doc, so example.raku.org is on the latest update. 13:04
s/example.raku.org/examples.raku.org/
tbrowder hi, i just used DateTime.clone for the first time and it wouldn't let me use ":$seconds", sounds like a bug to me 15:26
ugexe isnt it :second? 15:27
tbrowder m: my $t = DateTime.now; my $u = $t.clone(:seconds(0))
camelia ( no output )
tbrowder supposedly, looking at the code, the plural form for most parts are acceptable 15:28
ugexe quickly looking at the code i do not draw the same conclusion 15:29
tbrowder hm, got to go but back later
ugexe maybe thats what $valid-units does though
tbrowder yes, that's what i see 15:30
bye
tbrowder ok, back. the problem is it takes the seconds but doesn’t use them 15:58
tbrowder m: my $t=DateTime.now; say $t.clone(:0second); say $t.clone(:0seconds); 16:00
camelia 2021-10-23T18:00:00+02:00
2021-10-23T18:00:34.404287+02:00
ugexe yeah it looks like the clone method doesnt take any named parameters 16:02
:year etc dont work either
nm i read the code wrong, although :year isnt working
oh jeez :year works fine, my example had a thinko 16:08
:years doesnt work in clone though, so maybe method clone needs to integrate that $valid-units 16:09
tbrowder roger 16:20
second works fine, but not seconds
tbrowder so roast needs a new test, too 16:32
ugexe maybe... it might be that its not in the spirit of .clone to also handle those type of variations on input parameters and instead only affect actual attributes 16:38
tbrowder well, i think that’s what the docs say: clone is used to modify attrs of a copy of an existing dt obj 17:02
ugexe yeah but $!seconds isnt an attribute of DateTime 17:10
its an alternative parameter name for a method yeah, but not an actual attribute 17:11
so in that respect its probably not a bug
tbrowder m: say DateTime.new(:2000year, :1month, :1day, :1hour, :2minutes, :3seconds) 17:37
camelia 2000-01-01T01:00:00Z
lizmat m: say DateTime.new(:2000year, :1month, :1day, :1hour, :2minute, :3second) 17:38
camelia 2000-01-01T01:02:03Z
lizmat hmmm
tbrowder hm, i thought i had used plurals before, must be losing my mind 17:39
lizmat it has the plurals for .later / .ealier 17:43
*earlier
allowing the plurals for DateTime.new, would make that a lot slower :-( 17:44
atroxaper lizmat: Hello. Please, add my new post about RaCoCo to the weekly.
lizmat link? :-) 17:45
m: say DateTime.new(2021,10,23,19,15,42) # tbrowder
camelia 2021-10-23T19:15:42Z
lizmat tbrowder: you can just specify them as positionals as well
atroxaper lizmat: rakurs.atroxaper.net/2021/10/23/co...erage.html The is a link to google translate version inside. 17:46
lizmat weekly: rakurs.atroxaper.net/2021/10/23/co...erage.html
notable6 lizmat, Noted! (weekly)
tbrowder gotcha, i just need to stop thinking plurals guess, OR we could add plurals for all just for fun!
lizmat atroxaper: that's how you note it for the weekly 17:47
tbrowder: not if it would make DateTime.new 20% slower
atroxaper lizmat: I didn't dare to do it on my own :)
lizmat atroxaper: please do so, it will make it easier for me to do the weekly 17:47
tbrowder oh, it would slow down the whole thing, not a good idea as you said 17:48
atroxaper lizmat: deal.
tbrowder but the positional approach is something i'll try, and i vaguely remember you mentioning that before... 17:49
ugexe my guess was it would just be replacing e.g. :$seconds parameters with :second(:$seconds) 17:50
or vice versa
not that i agree it should be done 17:51
tbrowder m: say DateTime.new(2000,1,1, 1, 1);
camelia Cannot resolve caller new(DateTime:U: Int:D, Int:D, Int:D, Int:D, Int:D); none of these signatures match:
(DateTime: $y, $mo, $d, $h, $mi, $s, :$timezone = 0, :&formatter, *%_ --> DateTime:D)
(DateTime: :$year!, :$month = 1, :$day = 1, :$h…
lizmat ugexe: well, maybe I should spectest that
*benchmark
tbrowder: yes, you must specify all 6 parameters that way :-) 17:52
tbrowder i see i need all the params
m: say DateTime.new(1000,1,1, 1,1,1) 17:53
camelia 1000-01-01T01:01:01Z
tbrowder m: my $t = DateTime.now; say $t.clone(:0hour, :0minute, :0second) 17:57
camelia 2021-10-23T00:00:00+02:00
tbrowder "raku to self: do NOT use plural attrs with DateTime!" 17:59
(or Date)
tbrowder without beating a dead horse, why doesn't DateTime throw when using named plurals that aren't recognized? (that sounds like a recent PR fix that may be in the next release) 18:09
ugexe no methods do that 18:32
only subroutines
lizmat indeed, this is one of TimToady's decisions 18:33
I hope to be able to provide a trait after RakuAST has landed to: 18:34
lizmat a. disallow unrecognized nameds in a method call 18:34
and allow dispatch to work on that 18:35
tbrowder ok, that will be very useful to me fer sure 18:57
Xliff What's the best way to re-export symbols like exceptions or subs? 19:00
lizmat create an EXPORT sub in the compunit that returns a Map with the name => what it is mapping 19:03
Xliff But doesn't that need to be OUTSIDE the compunit definition? 19:07
That means in the case of unit compunits it needs to be at the top of the file, which means a lot of predeclarations, yes?
Also, this EXPORT sub needs to make sure the default mechanism still works, so how do you reuse the existing "is default" mechanism? 19:08
lizmat sorry I wasn't clear
it needs to be at the compunit level
so if you indeed have a "unit module Foo" or "unit class Foo" it should be before it (can you actually do that)? 19:09
Xliff Yes! That's what I am asking without the parenthetical! 19:10
lizmat an extreme example: github.com/lizmat/P5built-ins/blob...ns.rakumod 19:11
ToddAndMargo Anyone on newbie duty today? 23:40
tellable6 2021-07-13T03:53:37Z #raku-dev <Xliff> ToddAndMargo class AA { has Str @.I is rw; submethod BUILD (:$data) { @!I[.key] = .value for $data.pairs }; method new(*%data) { self.bless( :data => %data ); }; }; AA.new(66 => 23, 10 => 1, 100 => 'a').gist.say;
hey ToddAndMargo, you have a message: gist.github.com/6324e746f164c4b2b8...10a1de95a6
[Coke] rba: thank you, that fixes the euler page issue, appreciate it 23:41
ToddAndMargo I am trying to slice up a web page. The following hangs on me `$NewRev ~~ s/ .*? ('Release Notes <strong>V') //;
` Is there a better way of doing putting special characters into a regex?
[Coke] rba: if there are more updates for examples, should we ping you again for a new build? 23:48
rba [Coke]: for the moment yes, I have to update it manually. Just ping me. 23:57