🦋 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.
ugexe you can now set `ZEF_INSTALL_TO=...` to set the default `--install-to=...` parameter to zef 01:47
probably useful to people including zef in containers/environments 01:48
ugexe A lot of modules that use a Build.[rakumod|pm6|pm] could probably use Distribution::Builder::MakeFromJSON. Updating such distributions could be a good hacktoberfest contribution. see: github.com/ugexe/zef/commit/daf496...5ccc92e102 02:28
nine converted a bunch of these years ago (although never submitted PRs because the implementation in zef wasn't ubiquitous yet) so its certainly possible 02:30
the reason to do this is because its declarative unlike he Build.whatever file way 02:31
one reason being declarative is important is because it can help build more detailed dependency graphs before actually downloading and running code 02:35
El_Che ugexe++ 09:20
lizmat in the words of gfldex: lolibloggedalittle dev.to/lizmat/its-time-to-rak-part-1-30ji :-) 11:36
Nemokosch > It's also possible to could include the pattern to search for and/or the location to search 11:47
sorry, is this the remnant of rewriting a sentence? "possible to could" is beyond my English capabilities
lizmat yeah, that was a remnant, fixed, thanks! 11:52
s/could//
Nemokosch now I hopefully managed to add a comment as well 😄 11:56
lizmat thanks for your kind words :-) 11:58
lizmat reminds people that the Raku Advent Calendar 2022 is coming up, and that it needs writers apart from readers :-) github.com/Raku/advent/blob/master...authors.md 12:35
Geth ecosystem/main: 9f5171d7fe | (Elizabeth Mattijsen)++ | META.list
Digest::HIMAC lives in the zef ecosystem now
13:04
guifa So I'm adding a new method to Timezones::ZoneInfo to calculate when the next DST transition will occur 17:32
in some cases, there might not be one, though (e.g. if someone's using GMT) 17:33
What would be the best return value in this case? Type object, Nil, Empty?
Somehow create a DateTime with an infinity value?
lizmat and yet another Rakudo Weekly News hits the Net: rakudoweekly.blog/2022/10/10/2022-...our-phone/ 17:36
Nemokosch yeeey, the new docs site is coming 🥳 18:01
leont ugexe: making Build.* more declarative sounds like an excellent idea. I've always been bothered by the current system. 18:27
lucs Which functions/classes help with obtaining and changing file ownership (IO::Path appears to handle only permissions)? 19:36
lizmat lucs: I don't think that's in Raku because that's really OS / filesystem dependent ? 19:40
lucs Hmm... Makes sense.
lizmat having said that 19:41
raku.land/zef:lizmat/path-utils#path-uid is at least for obtaining ? 19:42
lucs It'll get me halfway there :)
I can shell out to change it. 19:44
lizmat you could check if there is a libuv API for what you want: if there is, then there's a chance it can be implemented in Raku
the UID fetching logic *is* in nqp, but not exposed in Raku 19:46
lucs Yep, libuv appears to do it (uv_fs_chown). 19:48
lizmat then either make an issue and/or a PR :-) 19:50
lucs The former at best, sorry :) 19:51
Nemokosch hello hello 20:36
modules.raku.org/search/?q=p5 I can see quite a couple of relatively new (updated within a year) modules 20:37
labster Hi folks. I decided to unbreak my module which broke about the time of The Christmas, which is to say a quite a long time. I found something where the behavior changed from 6.b, and having golfed, I'm not sure if this is a bug or not. 20:42
m: my $mt = "fifty-six" ~~ / $<first>=[ \w+ ] '-' $<second>=[ \w+ ] /; dd $mt, $mt<first>.Str, $mt<second>».Str;
camelia Match $mt = Match.new(:orig("fifty-six"), :from(0), :pos(9), :hash(Map.new((:first(Match.new(:orig("fifty-six"), :from(0), :pos(5))),:second(Match.new(:orig("fifty-six"), :from(6), :pos(9)))))))
"fifty"
()
labster That hyperop is resulting in an empty array, not sure why. 20:43
Rog Anyone had this error before when trying to install a module on windows? `[YAMLish] Extracting with plugin Zef::Service::Shell::tar+{<anon|1>} aborted. No such method 'IO' for invocant of type 'Any'...`
I suspect it's failing to locate the `tar` executable
Nemokosch uh oh
Rog I do have it, and it's in my %PATH%
labster m: dd "foo"».Str # this works like I'd expect, just not as a match 20:44
camelia ("foo",)
Nemokosch okay, I think we have an accumulation point here... 20:45
Rog Nevermind, it's not because it can't find tar 20:53
something with YAMLish specifically...
Nemokosch labster: trynna take a look at it 20:55
should check the .list method for Match objects 20:57
melezhik . 20:57
Nemokosch <@708833051253407804> found it, documented behavior: docs.raku.org/type/Match#method_list 20:58
> Returns a list of positional submatches. 20:59
Labster You're going to need to explain that how that's documented. Wouldn't it just return a list of a single item? That's what I'd expect.
melezhik I read minutes from the last RSC , on building alpine packages , I wonder if Raku alpine repo could be helpful ? 21:00
El_Che (the raports are rather anemic, difficult to make heads of tails from them) 21:01
Nemokosch I mean, I pointed out both the part and the link
the match object has no captures -> "the list of positional submatches" is empty
Labster right, because there's a new match object. 21:02
Nemokosch how familiar are you with regexes? 21:04
melezhik Or maybe there is something already in mind with that regard ? ...
Labster <@297037173541175296> Extremely familiar. Match objects are a whole other thing. 21:06
Nemokosch I'm pretty sure "positional submatches" refers to captures
in particular, captures that aren't named 21:07
Labster It does.
labster m: my $mt = "forty-fifty-six" ~~ / [$<first>=[ \w+ ] '-' ]+ $<second>=[ \w+ ] /; dd $mt<first>».Str, $mt<second>».Str; # I just expect parallel constructions to work, and they don't 21:08
camelia ["forty", "fifty"]
()
Nemokosch well then boom, we know why a match to /foo/ has no elements as a list
labster (does camelia work from Discord btw?) 21:09
Nemokosch not in this channel 21:10
it does work in other channels
Labster you mean "she" works in other channels 🙂
Nemokosch I only see a raku-bot 😛
Labster #misgenderedrobots
El_Che camelia: say "👋" 21:11
Nemokosch I have to say the behavior is fairly reasonable this case 21:12
$<first> is an Array
why? because it was used inside a +, and produced multiple matches 21:14
unlike $<second>, which is a sole match object
they don't have the same dimension
... it should be easy to fix though 21:14
Labster oh, it's an incredibly easy fix
labster m: my $mt = "fifty-six" ~~ / [$<first>=[ \w+ ] '-' ]+ $<second>=[ \w+ ] /; dd $mt<first>».Str, $mt<second>».Str; # this actually knows if it's potentially an array
camelia ["fifty"]
()
21:15
Labster Yep, looks like I'm wrong. Or, rakudo was wrong 10 years ago and let me get away with it 😉 21:16
Nemokosch I learned something interesting yesterday 21:20
leont has been meaning to propose a method like snip for a long long time, lizmat++ 21:27
Nemokosch so what I was trying to say is that 21:35
modules.raku.org/search/?q=p5 yields quite some, relatively new results
raku.land/?q=p5 barely returns anything
melezhik . 21:54
[Coke] (zef install failures on windows) yup 22:17
e.g.: github.com/lizmat/App-Rak/issues/15 22:18
guifa m: Instant.new: 2 ** 63 - 1 22:44
camelia Cannot make a Instant object using .new
in block <unit> at <tmp> line 1
guifa m: Instant.from-posix: 2 ** 63 - 1
camelia ( no output )
guifa m: DateTime.new: 2 ** 63 - 1 22:45
camelia ( no output )
guifa Interestingly, this doesn't seem to always work on all versions of Rakudo.
[Coke] based on version or based on system arch? 22:46
guifa unclear … need to do more systematic testing 23:00
but seems like newest versions do okay — just concerned about using that as a constant to be passed to a core data type lol
m: Instant.from-posix(2 ** 63 - 1).DateTime.say 23:02
camelia Cannot unbox 64 bit wide bigint into native integer
in block <unit> at <tmp> line 1
guifa m: Instant.from-posix(2 ** 63 - 28).DateTime.say 23:03
camelia +292277026596-12-04T15:29:40Z
guifa m: Instant.from-posix(2 ** 63 - 27).DateTime.say 23:04
camelia Cannot unbox 64 bit wide bigint into native integer
in block <unit> at <tmp> line 1
guifa [Coke] there we go, still can strigger it on recent versions it seems 23:05
guifa oh 23:18
duh
27 is the current number of leapseconds and Instant is leapsecond-aware 23:19
Although the fact that Instant is officially not tied to an epoch is problematic if it's stored as int128, because Instant is used to compared DateTimes which don't have the same limitations 23:22
ugexe that "Cannot create a Zef::Distribution from non-existent path" looks like the Windows path length limitation issue, although I would have expected that to be occuring with all the versions shown in that ticket 23:28
Roq: I wonder if its an incompatible version of the tar command since indeed it sees that it is there. you can poke around by running he code in this synopsis which shows how to extract a file the way zef internals do. Also curious what version of zef you see that error, because I think I may have fixed that (to be a better error message rather) a couple of versions back 23:35
the code in the synopsis i referred to -- github.com/ugexe/zef/blob/main/lib...od#L16-L37
ugexe what i suspect that error was is (similar to a previous comment I just made) it hit the windows path limitation when it extracted the file. in an older version of zef such an error would end up causing that "cannot call .IO" error. One way that sometimes works around that is setting TMPDIR to something short similar to what i do for appveyor builds 23:43
github.com/ugexe/zef/blob/3398a89d...yml#L9-L10
non-core tooling should probably start using something that 40 character sha1s though, since they usually end up encoded in paths multiple times between folder names and file names 23:47
less than 40 character sha1s^