native union struct

2021-06-01 Thread jm
Hi, I wanted to make a union to map some type to a byte array and back again so I started off like so; # example class I want to map to a byte array class N-GtkTargetEntry is repr('CStruct') is export {   has Str $.target;   has guint $.flags;   has guint $.info;   submethod BUILD ( Str

Re: What's going on with "given (junction) {when (value)...}"

2021-06-01 Thread Tom Browder
On Tue, Jun 1, 2021 at 11:31 William Michels via perl6-users < perl6-users@perl.org> wrote: > Hi Bruce, > This is what I see with Rakudo 2020.10 (all code below performs > delightfully as expected): > This whole thread looks like good stuff for some probably missing roast tests. -Tom

Re: What's going on with "given (junction) {when (value)...}"

2021-06-01 Thread William Michels via perl6-users
Hi Bruce, This is what I see with Rakudo 2020.10 (all code below performs delightfully as expected): user@mbook:~$ raku Welcome to 퐑퐚퐤퐮퐝퐨™ v2020.10. Implementing the 퐑퐚퐤퐮™ programming language v6.d. Built on MoarVM version 2020.10. To exit type 'exit' or '^D' > ? (any(4,3) ~~ 3) True > ? (3 ~~

Re: What's going on with "given (junction) {when (value)...}"

2021-06-01 Thread Ralph Mellor
Curiously, it works for postfix `when`: ``` $_ := any(4,3); {say 'postfix when'} when 3; # 3 when 3 { say 'prefix when' } # (no output) ``` -- love, raiph

Re: What's going on with "given (junction) {when (value)...}"

2021-06-01 Thread Ralph Mellor
On Tue, Jun 1, 2021 at 4:02 AM Larry Wall wrote: > > In my opinion, the most consistent approach is to disallow any > autothreading of the argument to .ACCEPTS That sounds like a really appropriate simplification as I write this. > All those other smartmatches are sugar for .ACCEPTS, and >

native union structure

2021-06-01 Thread Marcel Timmerman
Hi, (I reposted this because I did not saw it appear on the mailing list and added some new info) I wanted to make a union to map some type to a byte array and back again so I started off like so; # example class I want to map to a byte array class N-GtkTargetEntry is repr('CStruct') is

Re: File::Find using a junction with exclude

2021-06-01 Thread Ralph Mellor
On Fri, May 21, 2021 at 4:36 PM Ralph Mellor wrote: > > * Things multiply. If *two* function arguments are junctions, and > each junction has, say, three elements, the function is set to be > called *six* times. That should have been *nine* times. > * The combination has to follow