🦋 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:07 guifa_ left 00:08 reportable6 left 00:11 reportable6 joined 00:17 guifa joined, guifa left 00:28 djerius left 00:30 djerius joined 00:57 lichtkind left 01:28 linkable6 joined 01:35 Kaiepi joined 01:41 D5n9sMatrix joined 02:00 perlbot left 02:01 simcop2387 left 02:02 simcop2387 joined 02:05 perlbot joined 02:41 D5n9sMatrix left 03:18 mahafyi joined 03:33 lainon joined 03:37 lainon left 04:37 evalable6 left, coverable6 left, releasable6 left, committable6 left, greppable6 left, sourceable6 left, squashable6 left, shareable6 left, statisfiable6 left, reportable6 left, notable6 left, nativecallable6 left, bisectable6 left, unicodable6 left, quotable6 left, benchable6 left, bloatable6 left, tellable6 left, linkable6 left 04:38 tellable6 joined, linkable6 joined 04:39 committable6 joined, nativecallable6 joined, releasable6 joined, quotable6 joined, coverable6 joined 04:40 bloatable6 joined, reportable6 joined
Xliff How are constants handled in Parameter? 05:35
05:35 CIAvash joined
Xliff Rather, if the Parameter is a constant value, how can I retrieve it from the Parameter object? 05:35
05:38 shareable6 joined, Garbanzo_ left, statisfiable6 joined 05:39 bisectable6 joined 05:40 notable6 joined
Xliff Arg! Constant values are constraints! LOL. 06:03
I have to dig 'em out with nqp.
nqp:hllize( nqp::getattr( nqp::decont($parameter), Parameter, '@!post_constraints').head 06:04
06:08 reportable6 left 06:32 discord-raku-bot left, discord-raku-bot joined 06:37 discord-raku-bot left, discord-raku-bot joined 06:38 unicodable6 joined, greppable6 joined 06:39 benchable6 joined 06:51 jjido joined 07:10 reportable6 joined 07:40 evalable6 joined 08:18 Sgeo left 08:30 lichtkind joined 08:31 abraxxa joined 08:34 BinGOs left 08:35 vodkra left 08:36 m_athias left, nine left, abraxxa left, nine joined, m_athias joined, abraxxa joined, vodkra joined 08:38 bingos joined 08:40 mexen joined
Od1n1 hello rakoons. 08:54
09:05 bingos is now known as BinGOs, dakkar joined 09:18 hasrthur joined 09:38 sourceable6 joined, hasrthur_ joined, hasrthur left 09:50 jjido left 09:58 mahafyi left 10:00 andinus` left
lizmat Od1n1 o/ 10:01
Xliff \o lizmat 10:21
10:37 jjido joined 10:38 squashable6 joined 10:39 euandreh left 11:16 whatnext joined 11:25 sena_kun joined 11:39 frost joined, jjido left 12:08 reportable6 left 12:14 frost left 12:15 whatnext left 12:23 jjido joined 12:25 mahafyi joined 12:54 Averna joined 13:05 hasrthur_ left
lizmat and yet another Rakudo Weekly News hits the Net: rakudoweekly.blog/2022/01/31/2022-05-foo-is-42/ 13:06
13:08 hasrthur joined, reportable6 joined 13:09 hasrthur_ joined 13:13 hasrthur left 13:17 Darkcoal joined 13:22 hasrthur_ left 13:29 D5n9sMatrix joined 13:33 A26F64 joined, cetjs2 joined 13:36 rypervenche joined 13:55 discord-raku-bot left 13:56 discord-raku-bot joined 14:13 jjido left 14:14 hasrthur joined 14:29 guifa joined 14:30 Darkcoal left 14:31 ychaouche joined
guifa o/ 14:31
[Coke] heh. was just about to describe a delay I was seeing in zef, and as I finished typing the send here, it moved t the next step. :) 14:32
ychaouche hi all 14:33
[Coke] hi 14:35
14:50 Sgeo joined
gfldex I still don't understand how Tomasz managed to put "Raku" and "Speedrun" into the same heading. He must have a special tool for that. 14:53
14:53 hasrthur left
guifa me when I woke up: I dunno if I'm going to have time to finish my basic BASIC slang proof-of-concept in time for the weekly 14:55
me when I had my coffee: oh, lizmat++ already published the weekly. I get another week now :-)
lizmat hehe... there's always a pro for every con :-) 14:56
gfldex: the SpeedRun describes how much time Tomasz spends on it
?
gfldex Maybe I'm just slow. :) 14:57
guifa I just have to finish up the signature processing (yeah, I'm going custom signatures even!) and finish writing the VM-within-a-VM code in RakuAST
lizmat guifa++ 15:00
15:03 hasrthur joined
guifa I'm going alzy though. A hash and an array, hash is lineNumber => codeIndex, and the array is just each line of code haha. But proof of concepts don't have to be efficient I figure 15:12
15:17 jjido joined
lizmat nope :-) 15:25
15:26 hasrthur left
MasterDuke m: sub a("b") {}; say &a.signature.params[0].constraint_list[0]  # Xliff 15:30
camelia b
cetjs2 lizmat, in gsoc 2022 raku will participaTE? 15:44
lizmat I guess an application will be made, just like last year 15:45
only last year it wasn't accepted :-(
cetjs2 lizmat, ага. I understood 15:46
guifa lizmat actually just now reading up on it. apparently some of them were CRAZY inefficient (or I guess, did the best they could at the time) and would scan forward/backward character by character for new lines. ouch 15:51
lizmat ah, yes, BASIC :-) 15:52
if you only have a few K of memory :-)
Xliff MasterDuke: Huh. Missed that. Thanks! 15:53
16:07 ychaouche left 16:20 D5n9sMatrix left
clarkema Is there a clean way of checking whether a resource exists before trying to use it? At the moment I've got `if %?RESOURCES<header.ttl>.IO ~~ Slip {`, which does work but seems less than ideal 16:31
16:33 D5n9sMatrix joined
CIAvash `IO.e`? 16:36
clarkema You'd think so, but it returns a Slip from the .IO call and then can't call .e on that 16:38
guifa ah yes
I had the %?RESOURCES issue back a while ago
lemme remember exactly how I solved it
clarkema would be nice to be able to call .e on the resource directly 16:39
guifa Agreed, but I think there was some work being done in that area, but not sure what the status is 16:40
I guess I actually used something more complicated than checking for a Slip 16:41
github.com/alabamenhu/Intl-CLDR/bl...guages.pm6
clarkema I assume it has something to do with library resources 16:42
thanks guifa, I'll take a look
16:43 D5n9sMatrix left
guifa Yeah. When installing a module, the resources aren't stored with the same names/structure that you see. I'd love for us to get to a point that resources are fully introspectable (e.g. list all the files in a directory) but I don't think that's been a priority since, presumably, module authors should know exactly what resources they have 16:44
clarkema Yeah, I know I control the resources directory and could just add the file and charge ahead, but the error message when it's missing is very non-obvious and I prefer not leaving landmines lying around for my future-self's foot 16:46
guifa instead of `if %?RESOURCES<foo>.IO ~~ Slip { … }`, perhaps you could consider a define `sub resource (Str $file) { given %?RESOURCES{$file} { when Slip { die "File $file not located in resources. Maybe you should add it?" }; default { .return } } }` 16:51
obviously, modifying the result of a non-existent file based on your needs 16:52
clarkema Looks like that's going to be the best approach, thanks :) 16:57
17:03 A26F64 left, hasrthur joined 17:05 abraxxa left 17:20 Averna left 17:27 djerius left 17:28 djerius joined 17:29 cetjs joined 17:33 cetjs2 left 17:36 dakkar left 17:41 hasrthur left, hasrthur joined 17:44 [Coke] left 17:47 [Coke] joined 17:48 Sgeo_ joined 17:50 Sgeo left
ugexe in what case would a file listed in %?RESOURCES not exist? 17:52
lizmat when it got deleted at some point after installation ? 17:53
clarkema or a typo during development
ugexe it makes me sad we continue to treat %?RESOURCES as a file when it could be any type of io source 17:54
17:55 jjido left
clarkema such as? 17:56
ugexe a socket
clarkema what would be the benefit vs the socket API? 17:58
ugexe well, uh, you could use a socket 17:59
17:59 jjido joined
ugexe CompUnit::Repository::[Tar|Github] dont load code off the filesystem (well ::Tar does, but it streams the bytes out of the file, they don't go to an actual file somewhere first) 18:02
when you hard couple %?RESOURCES to being a file path your code can't work with those things 18:03
clarkema sure, but then there should be some equally generic way of signalling 'there are no bytes at this named place' 18:04
ugexe same with a theoretical CompUnit::Repository::FatPack::PureRaku
clarkema Especially if you're not using; if you're streaming resources from the network then then chances of failure are way higher than loading a file that 'should' be known good in the resources directory
s/not using/& files/ 18:05
ugexe I'd probably check $?DISTRIBUTION.content('resources/name-of-file').slurp
maybe %?RESOURCES<whatever>.slurp will work without the .IO 18:06
in which case that is equally ok
$?DISTRIBUTION.content('resources/name-of-file').open.slurp rather
18:06 reportable6 left 18:08 reportable6 joined
ugexe raku -e 'my $dist = CompUnit::Repository::FileSystem.new(prefix => $*CWD).distribution; for $dist.meta<resources>.flat -> $r { say "Missing $r" unless try $dist.content("resources/$r").open.slurp }' 18:10
18:10 sena_kun left
ugexe that will also work for the auto platform naming of stuff placed in resources/libraries/ 18:13
18:34 D5n9sMatrix joined 18:37 hasrthur_ joined, hasrthur left 19:04 D5n9sMatrix left 19:38 hasrthur joined, hasrthur_ left 19:58 jjido left 20:01 jjido joined 20:13 jjido left 20:56 epony left 20:59 ecocode_ left 21:06 jjido joined
[Coke] --version output on git bash on windows is fine as is, in the VS command prompt, needs chcp 65001, which is expected. Looks much better now without the bold text. 21:07
(this is probably old news) 21:08
Xliff m: sub a () { 42; }; &a.WHERE # <- Can that change? 21:20
camelia ( no output )
21:20 ecocode joined
Xliff m: sub a () { 42; }; &a.WHERE.say # <- Can that change? 21:20
camelia 2852129596152
MasterDuke i think .WHERE is generally allowed to change, but in practice maybe it won't for compile time things like subs. you'd need to ask someone like nine or timo to be sure 21:37
m: sub a() { say "hi" }; say &a.WHERE; for ^1_000_000 { my @b = .comb; }; say &a.WHERE 21:39
camelia 2741538338400
2741534130296
21:44 cetjs left
moon-child I see no reason why you would want to disallow .WHERE changing for compile-time things. I think mvm is not currently globally compacting, but that might change in the future 21:44
21:49 stoned75 joined, stoned75 left 21:51 hasrthur_ joined, hasrthur left 21:55 dextercd joined 22:02 hasrthur_ left 22:03 curiosa joined 22:04 curiosa left
SmokeMachine Sorry for not golfing it, but does anyone have any idea of why would this be happening when the code is inside a whenever and a start only on the 2 first iterations? github.com/FCO/Red/issues/537#issu...1026262630 22:13
timo yeah, where will change, usually only up to once, though? there's a mechanism to get an id that's stable for the program's runtime for one object, which is called "objectid" 22:18
MasterDuke moon-child: not really disallow, just some stuff is created right away in gen2 or because we know it'll stick around and i don't know if .WHERE will *actually* change for them, even though you shouldn't rely on that 22:21
Xliff m: class A { }; A.new.objectid.say 22:42
camelia No such method 'objectid' for invocant of type 'A'
in block <unit> at <tmp> line 1
Xliff ^^ timo
ugexe m: use nqp; say nqp::objectid($*CWD) 22:43
camelia 4369382167664
22:51 dextercd left
timo yeah it's not a method 22:52
it's internal
i believe WHICH on some things uses it? 22:53
22:56 jjido left 23:56 committable6 left, reportable6 left, coverable6 left, sourceable6 left, linkable6 left, greppable6 left, unicodable6 left, notable6 left, tellable6 left, nativecallable6 left, bisectable6 left, statisfiable6 left, shareable6 left, bloatable6 left, benchable6 left, squashable6 left, quotable6 left, releasable6 left, evalable6 left, coverable6 joined, linkable6 joined 23:57 sourceable6 joined, greppable6 joined, releasable6 joined, unicodable6 joined, notable6 joined 23:58 squashable6 joined, bisectable6 joined, committable6 joined, reportable6 joined, quotable6 joined