🦋 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.
[Coke]_ . 02:54
tonyo . 02:57
[Coke]_ dumb question: my reserved nick is already in use while I have a _ version?
tonyo there's some command to make them auth or rename 02:58
i think, /msg nickserv regain 02:59
[Coke] guess so, thanks! 03:02
tellable6 2022-10-17T16:42:19Z #raku <melezhik> [Coke] I am not sure if this a curlie bug, when I was creating the one, I thought this is Rakudo's one, at least someone told me that this could be a true ))
Geth advent: wimvanderbauwhede++ created pull request #94:
Update authors.md
11:39
advent: fd7e904d15 | (Wim Vanderbauwhede)++ (committed using GitHub Web editor) | raku-advent-2022/authors.md
Update authors.md
11:40
advent: d38b612cc8 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | raku-advent-2022/authors.md
Merge pull request #94 from wimvanderbauwhede/patch-1

Update authors.md
Xliff \o 13:36
If I see the following in a C struct: x __attribute__((aligned(val)))...what does that mean if I am trying to write nativecall bindings for it?
guifa I know I can get the symbols for a routine's caller 17:10
can I actually get the caller itself (e.g. the routine)? 17:11
Nemokosch What is the `dot:from<bin>` module? 18:14
github.com/Raku/Documentable/issues/135 18:16
ugexe if a script 'dot' is found in the path, i.e. if `run("dot", @args)` should run 18:22
Nemokosch interesting 18:23
Good to see you around - I have a more zef-related question, perhaps. 18:24
`File::Temp:ver<0.0.6>` doesn't seem to be available in the ecosystem
oh damn... it's not in REA either 18:25
I wanted to ask how I can tell zef to use REA but well, if this one really leaked... I'm not sure anything is left 18:26
ugexe you can disable ecosystems with e.g. --/fez --/cpan --/p6c --/rea 18:27
Nemokosch I'm trying to install the new docs site, by the way 18:28
can I somehow retrieve what exactly depends on this unknown legacy version of File::Temp? 18:30
tried `zef depends Documentable` and it gives `Failed to resolve some missing dependencies (use e.g. --exclude="File::Temp" to skip)`
the hint doesn't work anyway 18:31
ugexe zef install github.com/rbt/raku-File-Temp.git@...eca17d7a25 18:36
Nemokosch "Not found" 18:39
welp
ugexe run the command, its not a link
Nemokosch I'm building Documentable atm
ugexe you said "Not found", which is what that uri above shows if you try to visit it in a browser 18:40
if you run the command i showed it will install File::Temp:ver<0.0.6>
lizmat makes mental note to re-create missing module version from CPAN in the REA 18:41
Nemokosch yes, and I'm waiting for the installation of Documentable 18:42
ugexe ah i see
as far as what depends on it, `zef rdepends "File::Temp:ver<0.0.6>"` should show that
Nemokosch okay, it did install 18:43
now going backwards, rdepends first...
ugexe that command is taking forever to run on my laptop for whatever reason 18:44
maybe cause there was like 100 items lol 18:46
ugexe hmm maybe that isn't quite right 18:51
cause that will show everything i fulfills, including File::Temp aka File::Temp:ver<*>
Nemokosch yes, it was slow but it returned nothing 18:57
well well, why did the installation of the docs site complain, then
ugexe $ zef rdepends "File::Temp:ver<0.0.6>" 18:59
ABC:ver<0.6.12>:auth<zef:colomon>
Module2Rpm:ver<0.0.3>:auth<zef:wbiker>
ABC:ver<0.6.13>:auth<zef:colomon>
...
Nemokosch returned absolutely nothing for me 19:00
lizmat: re Ecosystem module - I saw there is a release-date attribute in the meta files corresponding to the modules; what do you think about allowing some sort of sorting/filtering based on that? 19:02
lizmat sounds like something nice to have... please make an issue for it :-)
Nemokosch Okay 😛 19:06
lizmat just about finished with the second "don't fear the grepper" blog post
Xliff \o/
Just crossed 800,000 lines of Raku! 19:07
And now... a nap... ;)
Nemokosch something completely unrelated - I'm jumping all around the Raku-related topics I'm trying to make progress with - is there a good name for \symbols, i.e "sigilless variables/constants"? Something that's less technical and more abstract 19:08
lizmat well, sigilless always means bound, but not all bound variables are sigilless, so that doesn't bring you much 19:18
Nemokosch . 20:01
So I was reading about this github.com/rakudo/rakudo/issues/5049
Nemokosch next interesting issue is coming soon
Nemokosch damn the lag :D 20:02
anyway
m: .say if 1 for <a b c>
camelia a
b
c
Nemokosch m: .say with 1 for <a b c>
camelia 1
Nemokosch peculiar indeed... does anybody have an idea how this result came to be? why did it only run once? 20:03
lizmat weekly: dev.to/lizmat/dont-fear-the-grepper-2-4ki5 20:06
notable6 lizmat, Noted! (weekly)
guifa Nemokosch that feels buggy 20:14
lizmat agree 20:15
Nemokosch `given` and `for` aren't allowed together, it seems 20:24
it can be argued that `with` is like `given` and also that `with` is like `if` 20:25
Nemokosch but it shouldn't be like something that downright ignores the `ḟor` :P But seriously, do you have an idea how to know what happened? 20:26
guifa I still can't figure out the difference between given and with, tbh 20:42
lizmat with only triggers for defined values 20:43
given sets the topic for any value
guifa ah, hence I never notice a difference lol
lizmat m: given Int { say "Int" }
camelia Int
lizmat m: with Int { say "Int" } 20:44
camelia ( no output )
guifa I can't think the last time I used with/given with undefined values
lizmat well, I use it a lot in things like:
with try foo -> $value { } 20:45
with try foo() -> $value { }
guifa ah yeah. I think in those cases I've tended to use if, since the pointy block kills the topicalization 20:46
but hey this is Raku
TIMTOWTDI :-)
I think one of my new favorite idioms to use is 20:55
.return with state $cache;
lizmat nice 20:56
I've become fond of
$foo = do if $cond { ... } elsif { ... } else { ... }
for those cases that are too complicated for ternaries 20:57
Nemokosch I use both `with` and `given` quite a lot 21:01
How can I generate a syntax tree from that questionable line? 21:02
guifa raku --target=ast -e '.say with 1 for <a b c>' IIRC 21:04
ugexe state isnt thread safe 21:05
lizmat sad but true :-( 21:06
ugexe i basically remove any uses of `state` in my code as i reencounter them
Nemokosch guifa: thankies 21:08
well, if state not being thread-safe is an issue... make it thread safe? 21:09
I'm rarely concerned with threads for one
ugexe why not make everything thread safe? because it would make the common case (single thread) slower
sometimes its fine for e.g. state to not be thread safe and to use it multithreaded 21:10
you just have to be aware what your constrains are
Nemokosch if it's the "common case", perhaps it's not that sad overall
insert good old Knuth saying 21:11
ugexe its only sad because its not intuitive for a beginner to know that 21:12
Nemokosch Well well, fortunately I don't think that's the case 21:15
That is actually something that is reasonably well-documented
Also, I for one think it's pretty intuitive but maybe it's only because I didn't think enough to realize why it wouldn't be. :D But that's kind of the point of intuition, so... :P 21:16
I seriously underestimated how unreadably the QAST output really is 21:17
unreadable
guifa ugexe: true. I definitely thought about it in my use cases, but for mine, it's not a huge deal. AFAICT, the worst case would be that two threads both find the value undefined, and afterwards, both set it to the same value, and thenceforth, no more issues 21:18
I basically just use it as a lazy loader 21:19
Nemokosch [] and <> (with no arguments) work the same way at the moment, right? 21:40
guifa yup 22:42
You also have {}  22:43
Seems weird that they're functionally equivalent, but the idea is to decontainerize, which is....identical regardless 22:44
deitemize, I guess more technically?
Nemokosch yes, I don't really mind this behavior 22:57