🦋 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.
00:01 sourceable6 left, bisectable6 left, releasable6 left, notable6 left, coverable6 left, tellable6 left, evalable6 left, statisfiable6 left, greppable6 left, shareable6 left, bloatable6 left, benchable6 left, nativecallable6 left, unicodable6 left, linkable6 left, reportable6 left, committable6 left, quotable6 left 00:02 sourceable6 joined, linkable6 joined, committable6 joined, notable6 joined, benchable6 joined 00:03 statisfiable6 joined 00:04 bisectable6 joined, shareable6 joined, evalable6 joined 00:10 grondilu left 00:12 grondilu joined 00:37 jjido left 01:00 frost joined 01:01 bloatable6 joined 01:04 nativecallable6 joined, tellable6 joined 01:49 lichtkind left 02:02 greppable6 joined 02:04 releasable6 joined 02:16 Sgeo_ joined 02:17 Sgeo left 02:37 squashable6 joined 03:02 reportable6 joined 03:17 gabiruh left 03:19 gabiruh joined 04:04 unicodable6 joined 05:04 keutoi joined, coverable6 joined 05:21 Sgeo_ left 05:52 andrzejku joined 05:53 abraxxa joined 06:00 abraxxa left 06:02 abraxxa joined, reportable6 left 06:08 abraxxa left 06:12 andrzejku left 06:23 abraxxa joined 06:50 andrzejku joined 06:55 keutoi left, keutoi joined 07:03 quotable6 joined 07:04 reportable6 joined 08:04 linkable6 left, evalable6 left, dakkar joined 08:06 linkable6 joined 08:21 TempIRCLogger left, TempIRCLogger joined 08:23 TempIRCLogger left, TempIRCLogger joined 08:27 jjido joined 08:34 jjido left 08:51 jjido joined 08:58 jjido left 09:06 evalable6 joined 09:36 Altai-man_ left 09:37 Altai-man joined 10:32 jjido joined 10:44 lichtkind joined 10:48 jjido left 11:48 evalable6 left, linkable6 left 11:49 linkable6 joined 11:54 jjido joined 12:02 reportable6 left 12:04 reportable6 joined 12:24 frost left 12:27 jjido left 12:50 evalable6 joined 13:06 Xliff joined
Xliff \o 13:06
Altai-man o/ 13:11
[Coke] . 13:19
tellable6 2021-09-08T22:17:37Z #raku <tbrowder> [Coke] new doc PR is #3955, merged and closed, i think it is fine
13:29 Manifest0 left 13:34 andrzejku left 13:40 keutoi left, keutoi joined 13:46 Manifest0 joined 13:55 Sgeo joined
jdv lizmat: a very minor thing - could the logs live page be made a bit more updatey? maybe a meta refresh and a count of new lines or whatever in the title... 14:30
14:47 andrzejku joined 15:01 abraxxa left
lizmat jdv: that is being worked on! 15:21
in fact, I hope to be able to put the new layout live before the end of the month :-) 15:22
Geth doc/routine-multi: d418a61e72 | (Daniel Sockwell)++ (committed using GitHub Web editor) | doc/Language/variables.pod6
Note that &?ROUTINE refers to current multi

This commit adds a note that &?ROUTINE refers to the current multi candidate and compares it to callsame, which allows self-recursion to the entire proto.
15:23
doc: codesections++ created pull request #3957:
Note that &?ROUTINE refers to current multi
doc/samewith: 3faf5376e5 | (Daniel Sockwell)++ (committed using GitHub Web editor) | doc/Language/functions.pod6
Correct description of samewith

The docs previously stated that samewith calls the same multi _candidate_, but samewith calls the entire multi. This commit corrects that, and adds an example that illustrates samewith's behavior.
15:33
doc: codesections++ created pull request #3958:
Correct description of samewith
15:37
jdv lizmat: neat, thanks 15:42
15:43 andrzejku left
Geth doc: 01887df0a5 | (Daniel Sockwell)++ (committed by Juan Julián Merelo Guervós) | doc/Language/functions.pod6
Correct description of samewith

The docs previously stated that samewith calls the same multi _candidate_, but samewith calls the entire multi. This commit corrects that, and adds an example that illustrates samewith's behavior.
15:43
linkable6 Link: docs.raku.org/language/functions
15:44 japhb left 15:45 abraxxa-home joined 15:51 abraxxa-home left 16:03 japhb joined 16:34 dakkar left 16:46 jjido joined 16:54 jjido left 17:12 keutoi left 17:14 keutoi joined 17:26 lucs left 17:27 lucs joined
Geth doc: 1ef056b1fb | (Daniel Sockwell)++ (committed by Juan Julián Merelo Guervós) | doc/Language/variables.pod6
Note that &?ROUTINE refers to current multi

This commit adds a note that &?ROUTINE refers to the current multi candidate and compares it to callsame, which allows self-recursion to the entire proto.
17:34
linkable6 Link: docs.raku.org/language/variables
17:45 tejr left 17:56 Oshawott left 18:02 reportable6 left 18:04 reportable6 joined 18:09 keutoi left 18:27 squashable6 left 18:29 squashable6 joined 18:59 jjido joined
Geth doc: c730122bec | Coke++ | xt/word-variants.t
Add "call site" variant

Prefer over callsite, call-site
19:03
doc: 0caaea403a | Coke++ | doc/Language/functions.pod6
prefer 'call site'
linkable6 Link: docs.raku.org/language/functions
19:15 jjido left
Geth doc: 8966a49f14 | (Alexander Hartmaier)++ | doc/Language/operators.pod6
add Set operator character explanations
19:48
doc: 2d5418e10d | (Will Coleda)++ (committed using GitHub Web editor) | doc/Language/operators.pod6
Merge pull request #3919 from abraxxa/master

add Set operator character explanations
linkable6 Link: docs.raku.org/language/operators
20:02 guifa joined
guifa So my google fu failed me and I forgot to note it. What do we do for testing out the new-disp branch? Just build it or are there any flags we need to set? 20:03
ah here we go 20:24
--gen-nqp=new-disp
gfldex perl Configure.pl --force-rebuild --gen-moar=new-disp --gen-nqp=new-disp --make-install 20:26
guifa: ^^^ from the last weekly
guifa boos Google for requiring about two dozen different combination of search terms to find it haha
moon-child m: 0x_5 20:37
camelia WARNINGS for <tmp>:
Useless use of constant integer 0x_5 in sink context (line 1)
moon-child m: 0_x5
camelia 5===SORRY!5=== Error while compiling <tmp>
Confused
at <tmp>:1
------> 0307⏏5_x5
expecting any of:
whitespace
moon-child :/
20:38 ecocode__ joined 20:39 ecocode_ joined 20:42 ecocode__ left 21:06 tejr joined
Rogue Is there a way to specify that a captured type needs to be a parameterizable role with one parameter? 21:22
For example in Scala one can say `trait Functor[F[_]]` 21:23
So the Raku equivalent would look something like `role Functor[::F ??? ]` 21:24
moon-child I think you can use 'where' 21:25
21:28 jess joined
Rogue I was thinking the same but I'm not sure how to check those things with the MOP 21:29
I guess part of it can be done with `where *.HOW ~~ Metamodel::ParametricRoleHOW` 21:31
moon-child that will also match roles with multiple parameters though 21:32
Rogue yeah
moon-child you could check whether *.^parameterize(Any) errors, but that's ugly
err, no
Rogue It would be nice to have syntax for this that doesn't involve touching the metamodel 21:33
which is technically not part of the lang spec
moon-child you want to look at the contents of metaobjects. What tool could you wish for other than a metaobject protocol? 21:34
Rogue I mean yeah 21:35
But I could wish for some nice syntax for this particular case, like what Scala provides :) 21:37
moon-child here we go! 21:41
T.^candidates.map(*.^body_block.arity).any == 2
Rogue Wow, that's next-level 21:42
Hm, apparently we "Cannot do non-typename cases of type_constraint yet" according to my Rakudo 21:44
moon-child hmm. I was going to say, you should be able to work around that with a subset. But it doesn't seem to work here 21:46
oh, yes, you can 21:47
subset OneParameter of Mu where *.^candidates.map(*.^body_block.arity).any == 2; role Functor[OneParameter ::T] { ... } 21:48
should work, I think
oh, you need to check arity <= 2 <= count 21:51
22:11 squashable6 left 22:12 squashable6 joined 22:31 tejr left 22:38 sono joined 22:45 tejr joined 22:49 tejr left
Xliff m: DateTime.new(1).gist.say 22:52
camelia 1970-01-01T00:00:01Z
Xliff How can I get that to read properly in my TZ?
So 1/1/70 00:00:01 -04:00
Datetime should have a new-local, I think. 22:53
[Coke] github.com/raku-community-modules/...e-TimeZone
gfldex m: DateTime.new(1, :timezone(-4*3600)).say 22:54
camelia 1969-12-31T20:00:01-04:00
Xliff hehehe
[Coke] perhaps github.com/alabamenhu/DateTimeTimezones
gfldex m: DateTime.new(1).in-timezone(-4*3600).say
camelia 1969-12-31T20:00:01-04:00
Xliff [Coke]: Is that availble via zef? 22:55
gfldex: Trust me, I've tried most of the variants of that and still get a value in 1969.
[Coke] I found it on the modules site, so probably. 22:57
I didn't try either of them, let me try the latter.
.... as soon as MTGA is done launching, jeez.
Xliff "zef install DateTimeTimezones" does not work. 22:58
[Coke] ah. "(NYI) The formatter has been changed to indicate the timezone. This makes it incompatible with RFC 3339. The use option 'rfc3339' will restore the original formatter. 23:01
it's "DateTime::Timezones" - search for it on modules.raku.org, then use the name its listed under there.
Xliff Aaand... "Passed bad arguments to DateTime somehow 23:02
in method <anon> at /home/cbwood/Projects/rakudobrew/versions/moar-blead/install/share/perl6/site/sources/BF8DC17C7D061DE407BA1FC82207D0F56C81DFEE (DateTime::Timezones) line 127"
raku -e 'use DateTime::Timezones; my $dt = DateTime.new(DateTime.new(1).offset + 1, timezone => DateTime.now.offset); $dt.gist.say; $dt.is-dst.say'
[Coke] sorry. :( 23:14
guifa Ooops
guifa will take a look
(it's my module)
Xliff guifa: No worries! 23:15
So... the way I see it is that a .new-local for DateTime would need to set the TZ FIRST, and then assign the value.
To set the TZ after the value is set will always resolve a value in the past for negative timezones. 23:16
guifa Xliff: so you're wanting the timezone to print out with 00:00 if the timezone is GMT? 23:31
Z is one of the standard ways to indicate "timezone offset of 0"
Xliff guifa: No. I want a way to create a DateTime value with .new that has the local timezone. 23:40
So DateTime.new(1) == 1/1/70 00:01 23:41
That's GMT
Try and get that value with TZ = -04:00
guifa Ah okay.
I'd probably use 23:43
m: say DateTime.new: 1, :timezone($*TZ)
camelia 1970-01-01T02:00:01+02:00
23:44 melezhik joined
melezhik . 23:44
guifa by definition Raku uses the variable $*TZ, so unless you've overridden it in some way, it's gonna line up with your timezone
23:45 melezhik left