🦋 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.
Xliff \o 01:54
Is there a &*ROUTINE analog for Blocks?
my $a = -> *@a { ... $*BLOCK or &*BLOCK doesn't work ... } 01:55
m: my $a = -> *@a { &?BLOCK.signature.params.say }; $a() 01:57
camelia (*@a)
Xliff \o/
m: sub a { &?BLOCK.signature.params.say }; a()
camelia ()
Xliff m: sub a { &?ROUTINE.signature.params.say }; a()
camelia ()
Xliff m: sub a { &*ROUTINE.signature.params.say }; a()
camelia Dynamic variable &*ROUTINE not found
in sub a at <tmp> line 1
in block <unit> at <tmp> line 1
Xliff m: sub a (*@a) { &?BLOCK.signature.params.say }; a() 01:58
camelia (*@a)
Xliff Ah! That's nice
m: sub a (*@a) { { &?BLOCK.signature.params.say } }; a() 01:59
camelia (Mu $_? is raw = OUTER::<$_>)
Xliff m: sub a (*@a) { rand -> $_ { &?BLOCK.signature.params.say } }; a() 02:01
camelia ===SORRY!=== Error while compiling <tmp>
Unexpected block in infix position (missing statement control word before the expression?)
at <tmp>:1
------> sub a (*@a) { rand⏏ -> $_ { &?BLOCK.signature.params.say }
expecting any…
Xliff m: sub a (*@a) { (^10).pick -> $_ { &?BLOCK.signature.params.say } }; a()
camelia ===SORRY!=== Error while compiling <tmp>
Unexpected block in infix position (missing statement control word before the expression?)
at <tmp>:1
------> sub a (*@a) { (^10).pick⏏ -> $_ { &?BLOCK.signature.params.say }
expecti…
Xliff m: sub a (*@a) { do (^10).pick -> $_ { &?BLOCK.signature.params.say } }; a()
camelia ===SORRY!=== Error while compiling <tmp>
Unexpected block in infix position (missing statement control word before the expression?)
at <tmp>:1
------> sub a (*@a) { do (^10).pick⏏ -> $_ { &?BLOCK.signature.params.say }
expe…
Xliff m: sub a (*@a) { $_ = (^10).pick; { &?BLOCK.signature.params.say } }; a()
camelia (Mu $_? is raw = OUTER::<$_>)
Xliff m: sub a (*@a) { $_ = (^10).pick; { &?BLOCK.signature.params.say ; .say} }; a()
camelia (Mu $_? is raw = OUTER::<$_>)
6
sortiz ToddAndMargo: My NativeHelpers::Blob module includes a blob-from-pointer sub. See: raku.land/github:salortiz/NativeHelpers::Blob 05:03
ToddAndMargo would you write out a sample so I can see what the syntax is?  I have a Pointer and I have the number of bytes.  How would I use them in your sub? 05:09
sortiz my Pointer[uint8] $P = get-a-pointer-somehow(...); my $buff = blob-from-pointer($P, 9); # Now buff is a Buf of size 9 taken from the memory pointed by $P 05:18
I'm using Pointer[uint8] for $P so it point to bytes. 05:22
sortiz Ups, the use is `… = blob-from-pointer($P :elems(9));` elems is a named argument, sorry. 05:27
In the code of some DBDIsh drivers you can see some real use-cases. For example github.com/raku-community-modules/...akumod#L76 05:31
ToddAndMargo Thank you! 05:48
tbrowder happy Thanksgiving for all US Rak[uu|oo]ns! 15:31
Nemokosch 😮 15:40
tbrowder ugexe: In a situation where two different modules have the same names for a bin prog. is there any way to get zef to warn about that before installation? 15:48
Geth advent: tbrowder++ created pull request #100:
update
16:03
advent: e6de99eb2c | (Tom Browder)++ | raku-advent-2022/articles/tbrowder.md
update
advent: 57d73c0813 | (Tom Browder)++ (committed using GitHub Web editor) | raku-advent-2022/articles/tbrowder.md
Merge pull request #100 from tbrowder/tbrowder

update
Anton Antonov @tbrowser Ditto... 🦃 16:23
Xliff tbrowder: Thanks! Happy Thanksgiving to you as well! 17:46
patrickb o/ 20:09
I'm currently debugging Cro::Client. It seems as if a supply is not doing what it should. Is there a way to introspect a supplier/supply pair to see what subscribers there are? 20:10
Nemokosch nine: can Inline::Python be used to import object from Python, or only for function calls? 21:13
[Coke] is there a way I can tell raku to ignore any installed modules? or setup a specific install directory so I can use just certain modules? 23:16