🦋 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.
leont deepmap does recurse 00:00
atweiden-air_ leont: i think i get it. so .uc is being applied to each list, not to each list element? 00:02
leont Yeah. Map iterates over all elements of @a, which are lists, and calls .uc on them
atweiden-air_ makes sense 00:03
leont .uc and other stringy methods are defined on lists, and effectively do .Str.uc
tonyo .seen jjmerelo 00:56
tellable6 tonyo, I saw jjmerelo 2021-05-26T15:37:00Z in #raku: <jmerelo> No changes === good
tonyo wowza.
ToddAndMargo Windows 11 pro 22H2. 01:52
You guys have been helping me figure out NativeCall and Pointers.  I finally got it figured out.  I just posted an example over on the perl6 mailing list of use of pointers for calling Windows DLL's and for copying data out of structures when given a pointer to the structure.
I get a pointer and length from "GetComputerNameA" and then show how to use the pointers to copy the data pointed to with "memcpy_s".
pastebin.com/ni3J5hvD
Maybe someone would want to clean this up and post it in Raku's example section?
Thank you all for the help!
grondilu I was wondering: what's the point of the BEGIN phaser? I mean, shouldn't the compiler compile anything that it can anyway? 07:10
Nemokosch How do you define "what it can"? 08:44
I'm sure this is written down somewhere or we have talked about it - but how do array literals work? 09:20
[1] - this is a one-element array 09:21
[<a b c>] - this is a three-element array, despite the List inside
in fact, even [[1, 2]] "auto-flattens" 09:22
I know you can make it a scalar or add a comma, I'm just curious how this is processed
Geth advent: d5913364d3 | (Fernando Corrêa)++ | 2 files
Add RedFactory to the list of articles
09:40
advent: 4a1b3daf4f | (Fernando Correa de Oliveira)++ (committed using GitHub Web editor) | raku-advent-2022/articles/RedFactory.md
Update RedFactory.md
09:41
grondilu I may be wrong but it shouldn't be too hard to assess whether an expression can be compiled or not. For instance in my implementation of md5 (github.com/grondilu/libdigest-raku...t.rakumod) I have blobs and arrays defined in a BEGIN because they depend only on literals. It occurred to me later that the compiler could figure out by itself that these are constant arrays that could and ma 11:22
Nemokosch in that case, why don't you declare them as constants? 11:23
grondilu I did in previous versions, but it doesn't change the fact that it seemed superfluous to me. 11:24
Nemokosch What I don't know are the technical constraints - but frankly, I don't find the demand completely justified in the first place 11:25
code runs, well, at runtime, as a main rule
even in archmage C++
if you want to run code by the compiler, you indicate that 11:26
sounds sane to me
lizmat grondilu how do you know that Rakudo actually doesn't do that already ? 11:27
ok, looking at the code, that might actually be less than trivial :-) 11:29
grondilu lizmat: I had discussed few weeks ago here about whether it made sense to write `constant $ = Blob.new: some-code(@literal-values);` and I was told it did. Also we made some tests and it was quicker with `constant $ =` 11:30
well, not on first execution but on the next ones, IIRC
Nemokosch I think lizmat meant to say that there might already be optimizations of the kind you are looking for
but it turns out that maybe not? 11:31
if pure functions were strongly indicated in Raku, this could go further, I suppose
lizmat well, for instance: if you write "42 + 666", it will constant fold that to 708
grondilu To make sure I may write a specific test with a very expensive function I suppose.
lizmat and similar cases 11:32
if the static optimizer sees an expression consisting of constant values only, it will fold it
grondilu There is a pure trait that I considered using at some point, but I thought it was simpler to just use a BEGIN phaser
lizmat yeah, using BEGIN makes it easier to reason about as a developer 11:34
grondilu take for instance this : `blob32.new: map &floor ∘ * * 2**32 ∘ &abs ∘ &sin ∘ * + 1, ^64`. Do you think it would be compiled ASAP?
it's all constants and pure functions 11:35
or "constant fold", I'm not familiar with that terminology 11:36
I know I can just use BEGIN, but I like writing short code, and I'll take anything I can get to simplify things. 11:38
lizmat en.wikipedia.org/wiki/Constant_folding 11:40
Geth doc: Kaiepi++ created pull request #4146:
Document Metamodel::Primitives' parameterization cache API
12:56
tbrowder i need some help with class introspection, please 13:43
tbrowder i have the attribute list from self.^attributes and want the value of each 13:44
tbrowder i have tried: attr.get_value 13:45
self.attr.get_value 13:46
self.get_value: attr
i have done it successfully in the past but don't remember the syntax 13:47
btw, i think my problem here is the same on Todd has, the docs, just like the *nix man pages, don't show the basic use before jumping into meta land assuming the reader already knows a lot about the subject 13:49
lizmat I believe it is attr.get_value(self) 13:51
m: class A { has $.a = 42 }; say A.^attributes[0].get_value(A.new) # tbrowder 13:52
camelia 42
tbrowder thnx, i used attr.get_value: self 13:56
worked great. THANKS, lizmat
melezhik Anton Antonov please see my PR for your modules to migrate to SparrowCI, current builds fail due to absence of sparrow.yaml 14:23
Anton Antonov <@779471841270038528> Ok, I will do that in the next hour or so... Thanks! 14:26
Geth advent: p6steve++ created pull request #104:
add post
14:36
melezhik . 15:00
Nemokosch bisectable6: say :42z ~~ :42a; 15:10
bisectable6 Nemokosch, Will bisect the whole range automagically because no endpoints were provided, hang tight
tellable6 2022-12-01T13:29:35Z #raku <El_Che> Nemokosch: your wording makes it sound like Greco-Roman wrestling
2022-12-01T21:48:37Z #raku <[Coke]> nemokosch: aspirationally assigned that since you were working on the issue.
bisectable6 Nemokosch, Output on all releases: gist.github.com/5f0db399632d356eef...222175561d 15:11
Nemokosch, Bisecting by output (old=2021.12 new=2022.02) because on both starting points the exit code is 0
Nemokosch, bisect log: gist.github.com/03567ed5811c93feb2...14c079099b
Nemokosch, (2022-01-04) github.com/rakudo/rakudo/commit/02...53bc6f2ff9
Nemokosch, Output on all releases and bisected commits: gist.github.com/ed1f2d431ef660e6b5...09b4f9db79 15:12
melezhik . 15:58
Anton Antonov - I wonder why is raku 2022.06 is faster then 2022.07 when running tests for Raku-Data-Generators - ci.sparrowhub.io/report/1966 ? 15:59
Geth doc: 2colours++ created pull request #4148:
Pair.ACCEPTS documentation fix
Anton Antonov <@779471841270038528> I think it has something to do with the weighted random sampling over Mixes. (Good question!) 16:01
melezhik AA ++ 16:02
Anton Antonov I also, changed the logic of the default selection of random pet names in "Data::Generators", because it seemed slow with very modest sizes (e.g. 4000.) 16:03
melezhik I mean why it is slower for 2022.07 rakudo?
Anton Antonov Maybe the Mix sampling with `roll` was changed in some way between 2022.07 and 2022.06 ? 16:04
<@779471841270038528> It did not occur to me to check what is the speed with older rakudo versions... 16:11
Geth advent: 62314a49a0 | p6steve++ (committed using GitHub Web editor) | raku-advent-2022/authors.md
add post
16:27
advent: 91c0693a7b | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | 2 files
Merge branch 'master' into master
advent: 15a813991d | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | raku-advent-2022/authors.md
Merge pull request #104 from p6steve/master

add post
Geth doc: 86553739de | 2colours++ | doc/Type/Pair.pod6
Closes github.com/Raku/doc/issues/4147.

The description of the Pair ~~ Pair case has been updated to match the specification and contemporary Rakudo.
17:09
doc: 36454bad12 | (Will Coleda)++ (committed using GitHub Web editor) | doc/Type/Pair.pod6
Merge pull request #4148 from 2colours/master

Pair.ACCEPTS documentation fix
linkable6 Link: docs.raku.org/type/Pair
Geth doc: b97f1c70e9 | (Ben Davies)++ | 2 files
Document Metamodel::Primitives' parameterization cache API

This is *very* handy in MOP-heavy code, but is rather unintuitive.
Adds "parameterizer" and "noop" as words.
17:53
doc: 1c9f10bab1 | (Will Coleda)++ (committed using GitHub Web editor) | 2 files
Merge pull request #4146 from Kaiepi/param-cache

Document Metamodel::Primitives' parameterization cache API
tbrowder lizmat: while getting the class introspection syntax correct, i noticed the old pre-kabob-case names again, any thoughts on modernizing all that old stuff? wait for a new version, or just do it? (and same questions ref nqp) 18:35
lizmat A few years ago I asked the same question :-) 18:38
afk& 18:40
El_Che hi liz 20:05
Geth doc: 0rir++ created pull request #4151:
Consolidate quietly into statement-prefix.pod6 from control.pod6.
20:07
tbrowder i briefly looked for a rakudo issue ~~ kabob but found nothing...i'll poke around some more 20:18
Nemokosch kebab? 20:20
tbrowder as in var, sub, method names, raku ppl tend to prefer "some-name" instead of "some_name"; saves a keystroke and looks cooler 20:30
name is from look of food chunks on a skewer for cooking 20:31
both i think distinguish *nix ppl from windows ppl 20:33
oh, i used subious alternative spelling, sorry... 20:38
tbrowder ok, found it (again), @jnthn put that to rest, see closed issue #1292 20:45
NemokoschKiwi is the undersightable bot also gone? 21:35
melezhik ugexe  I would be interested to hear your thoughts in this - github.com/pdf-raku/PDF-Font-Loade...ku/pull/22 21:44
.tell  @dwarring - I would be interested to hear your thoughts in this - github.com/pdf-raku/PDF-Font-Loade...ku/pull/22 21:45
tellable6 melezhik, I cannot recognize this command. See wiki for some examples: github.com/Raku/whateverable/wiki/Tellable
melezhik .tell dwarring - I would be interested to hear your thoughts in this - github.com/pdf-raku/PDF-Font-Loade...ku/pull/22 21:46
tellable6 melezhik, I'll pass your message to dwarring
NemokoschKiwi AlexDaniel: good sir, do you know anything about the resolution of the undersightable bot?
Geth doc: 2colours++ created pull request #4152:
Altering Online communities section of the community page
23:49