Re: pint: Elizabeth, sort list???

2024-03-07 Thread Marc Chantreux
hello, > ==> sort({ | map { +$_ // $_ }, .split: /\d+/, :v }) ==> say() ok … so I'm lost but I'm not even curious to understand why (because of my lack of interest for the ==> operator :)) regards marc -- Marc Chantreux Pôle CESAR (Calcul et services avancés à la recherche) Université de

Re: pint: Elizabeth, sort list???

2024-03-07 Thread Fernando Santagata
Hi Marc, This works: ==> sort({ | map { +$_ // $_ }, .split: /\d+/, :v }) ==> say() As the documentation says here https://docs.raku.org/routine/%3D%3D%26gt%3B The precedence is very loose so you will need to use parentheses to assign the result On Thu, Mar 7, 2024 at 8:37 AM Marc

Re: pint: Elizabeth, sort list???

2024-03-07 Thread Marc Chantreux
hello, > How would you write that expression using the feed operator? I tried < afoo12 afoo2 > ==> {.sort: { | map { +$_ // $_ }, .split: /\d+/, :v }} ==> {map } and the error message is really interesting Only routine calls or variables that can '.append' may

Re: pint: Elizabeth, sort list???

2024-03-06 Thread Jim Bollinger
Hi Elizabeth! How would you write that expression using the feed operator? Thanks, Shimon > On Mar 3, 2024, at 7:22 AM, Elizabeth Mattijsen wrote: > >> On 3 Mar 2024, at 03:32, ToddAndMargo via perl6-users >> wrote: >> >>> On 3/2/24 05:13, Elizabeth Mattijsen wrote:

Re: pint: Elizabeth, sort list???

2024-03-05 Thread Marc Chantreux
Hi rakoons, On Sun, Mar 03, 2024 at 01:22:45PM +0100, Elizabeth Mattijsen wrote: > Actually, the expression can be refined a bit: > > say .sort(*.split(/\d+/, :v).map({ (try .Int) // $_}).List) Which is gorgeous! thanks for that. I read the documentation which is clear about all the magic in

Re: pint: Elizabeth, sort list???

2024-03-03 Thread Elizabeth Mattijsen
> On 3 Mar 2024, at 03:32, ToddAndMargo via perl6-users > wrote: > >> On 3/2/24 05:13, Elizabeth Mattijsen wrote: >>> .sort(*.split(/\d+/, :kv).map({ (try .Numeric) // $_}).List) > >> Hi Elizabeth, >> It works perfectly. Thank you! >> I have no idea why, I will ask you in another post > Would

Re: pint: Elizabeth, sort list???

2024-03-02 Thread ToddAndMargo via perl6-users
On 3/2/24 19:14, Clifton Wood wrote: .sort(*.split(/\d+/, :kv).map({ (try .Numeric) // $_}).List) Can you take apart the above for me?

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, > > >

pint: Elizabeth, sort list???

2024-03-02 Thread ToddAndMargo via perl6-users
On 3/2/24 05:13, Elizabeth Mattijsen wrote: .sort(*.split(/\d+/, :kv).map({ (try .Numeric) // $_}).List) Hi Elizabeth, It works perfectly. Thank you! I have no idea why, I will ask you in another post Hi Elizabeth, Would you take apart your sort piece by piece and explain each part?