Re: steps of a path

2022-09-07 Thread William Michels via perl6-users
Apologies: the first code example in my previous email won't check for a given directory, and will print out bogus paths: ~$ echo "/Users/none/bogus_dir/" | raku -e 'for lines.IO -> $a is copy {$a.Str.say; repeat {$a.=parent andthen $a.Str.say;} until $a eq $*SPEC.rootdir};'

Re: steps of a path

2022-09-07 Thread The Sidhekin
On Wed, Sep 7, 2022 at 6:27 PM Parrot Raiser <1parr...@gmail.com> wrote: > > > > That said, right now gmail is claiming whipupitude is misspelled... > > > An alternative is "whipitupitude" (the difference being the first "it". > > Given the examples I've seen over the years, there's a need for an

Re: steps of a path

2022-09-07 Thread Parrot Raiser
> > That said, right now gmail is claiming whipupitude is misspelled... > An alternative is "whipitupitude" (the difference being the first "it". Given the examples I've seen over the years, there's a need for an opposite to "idiomatic", for programming that arrives at a solution by a Rube

Re: steps of a path

2022-09-07 Thread William Michels via perl6-users
Hi Marc, Does this do what you want? I've omitted the call to `run` and used mostly IO::Path calls instead: ~$ echo "/Users/admin/logs" | raku -e 'for lines.IO -> $a is copy {$a.Str.say; repeat {$a.=parent andthen $a.Str.say;} until $a eq $*SPEC.rootdir;};' #returns: /Users/admin/logs

Re: steps of a path

2022-09-07 Thread Ralph Mellor
On Wed, Sep 7, 2022 at 1:20 AM Marc Chantreux wrote: > > Actually what I really like the most from all your answers was the fact > that I learned a lot not only about the langage but also some idoms. That sounds cool. :) I know what *I* think of when I write "idiom" in the context of