Re: pint: Elizabeth, sort list???

2024-03-02 Thread Clifton Wood
https://gist.github.com/Xliff/286f1359e40d192d724ed9b900354015 On Sat, Mar 2, 2024 at 9:32 PM ToddAndMargo via perl6-users < perl6-users@perl.org> wrote: > > On 3/2/24 05:13, Elizabeth Mattijsen wrote: > >> .sort(*.split(/\d+/, :kv).map({ (try .Numeric) // > $_}).List) > > > Hi Elizabeth, > > >

Re: I need sorting help

2024-03-02 Thread Clifton Wood
Easy multisort! my @h = ( { name => "albert", age => 40, size => 2 }, { }, { ); # ({age => 40, name => albert, size => 2} {age => 69, name => albert, size => 3} {age => 22, name => andy, size => 3}) On Sat, Mar 2, 2024 at 9:29 PM ToddAndMargo via perl6-users < perl6-users@perl.org> wrote:

Re: Pointer to bug question

2022-11-27 Thread Clifton Wood
On 11/24/22 20:55, Clifton Wood wrote: > > Heh! I had a bug in my code and you pretty much mimic'd it. That's on > > me. Line 114 should read: > > > > "my $a = GLib::Roles::TypedBuffer[WTS_SESSION_INFOA].new($ppSessionInf);" > > > > Let me know ho

Re: What is this "\t"?

2022-11-27 Thread Clifton Wood
@ToddAndMargo: These are all explained in the Raku documentation. Long story short: "my \t" -- this is a RAW definition. You can use it to hold types, as in this case. ".of" is a method for Parametric Roles. It generally returns a type "??" is the trinary operator. (expr) ?? !! If you are

Re: Pointer to bug question

2022-11-23 Thread Clifton Wood
r to by > >>> # $ppSessionInf loaded into > >>> my BYTES $Sessions = CArray[BYTE].new( 0xFF xx $pCount ); > >>> > >>> $Sessions = $ppSessionInf.deref; > >>> > >>> Which obviously do

Re: Pointer to bug question

2022-11-23 Thread Clifton Wood
@ToddAndMargo -- Also, Pointer cannot deref a Pointer, which I think is the real error. On Wed, Nov 23, 2022 at 9:21 PM Clifton Wood wrote: > @ToddAndMargo - Did you try my suggestion with > GLib::Roles::TypedBuffer? > > The "unhandled target type" occurs when NativeCal

Re: Pointer to bug question

2022-11-23 Thread Clifton Wood
@ToddAndMargo - Did you try my suggestion with GLib::Roles::TypedBuffer? The "unhandled target type" occurs when NativeCall can't figure out how to deref the referenced value. In this case, this would be the BYTE of the CArray. What type is BYTE, pray tell? - Cliff On Wed, Nov 23, 2022 at

Re: NativeCall pointer question?

2022-11-20 Thread Clifton Wood
@ToddAndMargo, Two ways: - Use "my CArray[uint32] $p", use $p as your parameter, and access the value as "$p[0]" or - Use "my Pointer[uint32] $p" and use "$p.deref" My personal preference is the former, as it is the best way to access AND set the actual former value. The latter can only

Re: Aw: Rakudo for W7?

2022-10-23 Thread Clifton Wood
I would try these (in this order): 2020.05 - https://rakudo.org/dl/star/rakudo-star-2020.05.1-01-win-x86_64-(JIT).msi.asc 2020.01 - https://rakudo.org/dl/star/rakudo-star-2020.01-01-win-x86_64-(JIT).msi 2019.03 - https://rakudo.org/dl/star/rakudo-star-2019.03-01-win-x86_64-(JIT).msi I would

Regex surprises

2022-09-14 Thread Clifton Wood
Hi Brian, I would think this would become pretty easy. Consider: sub MAIN ( $replacement, :$x, :$y ) { my regex x {<{ $x }> } my regex y { <{$y}> } S:g! ! <{ $replacemement }> ! if $x; S:g! ! <{ $replacement }> ! if $y } Is this what you are looking for or did I miss something?

Re: How to use WHY on a object's method?

2022-01-17 Thread Clifton Wood
You need the method object, and you can't get that from $a.test -- Try using the following: when X::AdHoc { say $a.^lookup('test').WHY; # TODO: This is wrong :-( } I've tested it here ( https://replit.com/@Xliff/ThinDutifulExtensions#main.raku) and it works! :) -X On Mon, Jan 17, 2022 at

Re: Phasers Suggestions

2021-12-12 Thread Clifton Wood
Tim, Love the suggestions, but some of the syntax is a little confusing. Let me see if I can reword these a bit: First off, the good: BEGIN {} COMPILE ENTER {} CHECK {} COMPILE LEAVE {} INIT {} RUNTIME ENTER {} END {} RUNTIME LEAVE {} DOC * DOC * (No change) ENTER {} ENTER {} (No change)

why not raku ?

2021-11-22 Thread Clifton Wood
Tom: Thanks for the mention of gptrixie. I am aware of it. When C++ support is added, I will circle back to it. > Not so easy to find in the docs, but here is a useful module that might be > the first place to start helping with: https://github.com/Skarsnik/gptrixie > It says support for C++ is

Re: why not raku ?

2021-11-22 Thread Clifton Wood
; Actually, I really hope to see in some near future the NativeCall working > easy and well with C++ libs. > > > > On Mon, Nov 22, 2021 at 2:50 PM Clifton Wood > wrote: > >> Aureliano: >> >> How are you attempting to call xframe functions? >> >&g

Re: why not raku ?

2021-11-22 Thread Clifton Wood
Aureliano: How are you attempting to call xframe functions? On Mon, Nov 22, 2021 at 11:24 AM Aureliano Guedes < guedes.aureli...@gmail.com> wrote: > Hi Clifton Wood, > Here it is. > https://andrewshitov.com/2020/01/08/calling-cpp-and-fortran-functions-from-raku-using-the-nativ

Re: why not raku ?

2021-11-22 Thread Clifton Wood
Aureliano, where was this example for C++? I'd love to take a look at it! Raku could really use a dose of Qt. On Mon, Nov 22, 2021 at 8:52 AM Salve J Nilsen wrote: > Piper H said: > > > Has Larry Wall joined the development team of raku? > > He's been part of it since the very beginning. He's

Re: why not raku ?

2021-11-21 Thread Clifton Wood
built to handle output to the user while pre-compiling, but I've decided that's something that can wait for the future. I guess I'll be releasing the first lib sometime soon. - Xliff On Sun, Nov 21, 2021 at 10:28 PM Clifton Wood wrote: > Piper: That would be zef > > https://github.com/

Re: why not raku ?

2021-11-21 Thread Clifton Wood
Piper: That would be zef https://github.com/ugexe/zef On Sun, Nov 21, 2021 at 8:51 PM Piper H wrote: > What's the package management tool for raku? > The stuff like gem/bundle for ruby and cpanm for perl5. > > Thanks. > > On Mon, Nov 22, 2021 at 9:43 AM Ralph Mellor > wrote: > >> My 2c: >> >>

Re: Segmentation Fault

2021-08-07 Thread Clifton Wood
Joseph, It would help if you could post links to some of your source code, especially some of the classes in question. On Sat, Aug 7, 2021 at 1:04 PM Joseph Polanik wrote: > I'm trying to develop classes to replace repetitive portions of an > existing set of scripts. However, I'm having a

Re: [naive] hash assingment

2021-07-14 Thread Clifton Wood
Unfortunately, given this: my %a = 'column1' => [1...5], 'column2' => ['a'...'e'] > column1 and column2 cannot yet be referenced to create column3. You need to do that on another line: %a = %a.map: { .sqrt }; Which gives the following: > %a.gist.say # {column1 => [1 2 3 4 5], column2 => [a b

Re: How do a pe-salt an array inside an object?

2021-07-12 Thread Clifton Wood
@ToddandMargo wrote: Now I understand. You are using Str as a > skip, skip, drop 2, skip, drop 4 > This is a sequential workaround. > Also I was confused as I though Str was only > a type declaration and could be used this way. > What I would like to see is direct access, without the >