On 4/5/25 6:58 PM, ToddAndMargo via perl6-users wrote:
sub Directory
I changed the name to DirectoryExists
The new name is more human friendly
On 4/2/25 6:08 PM, Bruce Gray wrote:
On Apr 2, 2025, at 19:47, ToddAndMargo via perl6-users
wrote:
--snip--
raku -e "say
'\\192.168.240.10\oldserver\Backup\MyDocsBackup\backup1'.IO.d.Bool;"
False
--snip--
Moving this one-liner into a .raku file (to remove the complication of Wi
> On Apr 2, 2025, at 19:47, ToddAndMargo via perl6-users
> wrote:
--snip--
> raku -e "say
> '\\192.168.240.10\oldserver\Backup\MyDocsBackup\backup1'.IO.d.Bool;"
> False
--snip--
Moving this one-liner into a .raku file (to remove the complication of Windows
needing double-quotes for o
On 4/2/25 8:22 AM, Bruce Gray wrote:
my $CommandLine = CommandLineClass.new{
help => False,
debug => False,
UNC_BackupPath => Q[\\192.168.240.10\MyDocsBackup\backup1],
rotates => 2,
ParentDir => "/"
};
The problem is with the syntax of the `new`.
Y
On 4/2/25 9:53 PM, ToddAndMargo via perl6-users wrote:
On 4/2/25 6:26 PM, Will Coleda wrote:
Try printing the Str before you do anything with it to see what happens.
I moved to powershell
I mean I did a call to powershell to find if a directory existed
Try printing the Str before you do anything with it to see what happens.
(Hint - the backslash character escapes characters in literal strings)
On Wed, Apr 2, 2025 at 8:47 PM ToddAndMargo via perl6-users <
perl6-us...@perl.org> wrote:
> Hi All,
>
> Windows Server 2025 (souped up W11)
>
> raku -v
On 4/2/25 6:26 PM, Will Coleda wrote:
Try printing the Str before you do anything with it to see what happens.
I moved to powershell
On 4/2/25 6:08 PM, Bruce Gray wrote:
On Apr 2, 2025, at 19:47, ToddAndMargo via perl6-users
wrote:
--snip--
raku -e "say
'\\192.168.240.10\oldserver\Backup\MyDocsBackup\backup1'.IO.d.Bool;"
False
--snip--
Moving this one-liner into a .raku file (to remove the complication of Wi
Hi All,
Windows Server 2025 (souped up W11)
raku -v
Welcome to RakudoΓäó v2025.02.
I am trying to see if this directory exists:
\\192.168.240.10\oldserver\Backup\MyDocsBackup\backup1
This is what raku .IO.d.Bool give me:
raku -e "say
'\\192.168.240.10\oldserver\Backup\MyDocsBackup\back
> On Apr 2, 2025, at 05:47, ToddAndMargo via perl6-users
> wrote:
--snip--
> Hi Bruce,
>
> Sorry. I do know I am suppose to post some minimal code.
> I was programming for 11 straight hours and was not
> thinking too clearly.
I understand.
> I was trying to do what you said. Read it into
On 4/1/25 4:04 PM, Bruce Gray wrote:
On Apr 1, 2025, at 03:55, ToddAndMargo via perl6-users
wrote:
--snip--
I have the following run string:
raku C:\NtUtil\RLA.Backup.raku --rotates 345 --UNC_BackupPath
\\192.168.240.10\Backup\MyDocsBackup\backup1 --debug
use Getopt::Long; # get-opti
> On Apr 1, 2025, at 03:55, ToddAndMargo via perl6-users
> wrote:
--snip--
> I have the following run string:
> raku C:\NtUtil\RLA.Backup.raku --rotates 345 --UNC_BackupPath
> \\192.168.240.10\Backup\MyDocsBackup\backup1 --debug
>
>
> use Getopt::Long; # get-options
> get-options('debug'
Hi All,
Windows Server 2025 (souped up W11)
raku -v
Welcome to RakudoΓäó v2025.02.
Implementing the Raku® Programming Language v6.d.
Built on MoarVM version 2025.02.
https://raku.land/cpan:LEONT/Getopt::Long
I have the following run string:
raku C:\NtUtil\RLA.Backup.raku --rotates 345 --UNC_
Should have said "I need help with get-options"
On 1/16/25 1:41 AM, Todd Chester via perl6-users wrote:
First I should apologize for one of my earlier posts. The first token
was a bit of a jumble. I think now you just want the literal string
"download" to start your capture.
Hi Bill,
Don't apologize. You are teaching me at trans
light spe
Thank you!
On 1/13/25 18:20, William Michels via perl6-users wrote:
Hi Todd,
First I should apologize for one of my earlier posts. The first token was a bit of a
jumble. I think now you just want the literal string "download" to start your
capture.
As per usual I tried a few different appro
Hi Todd,
First I should apologize for one of my earlier posts. The first token was a bit
of a jumble. I think now you just want the literal string "download" to start
your capture.
As per usual I tried a few different approaches to your regex problem, and
posted what I thought was the best o
On 1/12/25 3:11 AM, ToddAndMargo via perl6-users wrote:
`?download ^` # positive look-behind, match but don`t capture `download `
# `^` means "look behind"
Opps, that should be:
`?before ^` # positive look-behind, match but don`t capture `download `
# `^` m
Hi Bill,
Please correct my notes.
Many thanks,
-T
Explanation:
my @y = $x ~~ m:g/ .*? | \h+ > /;
`m:g` # match and global
`\...\` # the constrains (beginning and end) of the match
`<...>` # constraints of instructions inside the match
First instruction: ``
`?download ^` # p
On 1/12/25 12:59 AM, William Michels via perl6-users wrote:
~$ /Users/admin/rakudo/rakudo-2024.09/rakudo-moar-2024.09-01-macos-
arm64-clang/bin/raku -e ' \
my Str $AltClickHere = lines[0]; \
my @AltArray =
($AltClickHere ~~ m:g/
download #literal
.*?
~$
/Users/admin/rakudo/rakudo-2024.09/rakudo-moar-2024.09-01-macos-arm64-clang/bin/raku
-e ' \
my Str $AltClickHere = lines[0]; \
my @AltArray =
($AltClickHere ~~ m:g/
download#literal
.*? #any-character, one-or-more, frugal
> #po
Hi All,
In another post, Bill gave me a wonderful match that took
a ridiculously long line of test and cut out what I wanted
and put it into cells of an array.
@ClickArray = $ClickPage ~~ m:g/ .*?
| \h+ > /;
I do not understand what he did.
m:g = match and global
<>= litteral
?
On Sat, Jan 30, 2021 at 05:52:54PM -0800, Joseph Brenner wrote:
> Which means there's some potential confusion if you really need
> to match quotes:
>
> my $str = 'string_632="The chicken says--", voice="high"';
>
> say
> $str ~~ m:g{ ( " .*? " ) }; # False
> say
> $str
On 1/30/21 5:52 PM, Joseph Brenner wrote:
I think ToddAndMargo was thinking of perl5 regexes, where [.] is
a good way of matching a literal dot-- though myself, I'm more
inclined to use \.
In Raku, the square brackets just do non-capturing grouping
much like (?: ... } in perl5. To do a characte
> My mistake was think that if a value at the end
> did not exist, I was given back a null. Now I know
> to look for a false.
> > say "1.33" ~~ m/(\d+) ** 3..4 % "." /
> False
That pattern says there has to be three or four fields of
digits, so if you don't have that many, the entire match has t
I think ToddAndMargo was thinking of perl5 regexes, where [.] is
a good way of matching a literal dot-- though myself, I'm more
inclined to use \.
In Raku, the square brackets just do non-capturing grouping
much like (?: ... } in perl5. To do a character class, you need
angles around the squares.
On 1/30/21 1:03 AM, William Michels via perl6-users wrote:
Hi Todd (and JJ),
On Fri, Jan 29, 2021 at 11:58 PM JJ Merelo wrote:
El sáb, 30 ene 2021 a las 7:24, ToddAndMargo via perl6-users
() escribió:
Hi All,
rakudo-pkg-2020.12-01.x86_64
Why does this work?
> $x = "1.33.222.4";
1.33
Hi Todd (and JJ),
On Fri, Jan 29, 2021 at 11:58 PM JJ Merelo wrote:
>
>
>
> El sáb, 30 ene 2021 a las 7:24, ToddAndMargo via perl6-users
> () escribió:
>>
>> Hi All,
>>
>> rakudo-pkg-2020.12-01.x86_64
>>
>> Why does this work?
>>
>> > $x = "1.33.222.4";
>> 1.33.222.4
>> > $x ~~ m/ (<:N>+) [.]
El sáb, 30 ene 2021 a las 7:24, ToddAndMargo via perl6-users (<
perl6-us...@perl.org>) escribió:
> Hi All,
>
> rakudo-pkg-2020.12-01.x86_64
>
> Why does this work?
>
> > $x = "1.33.222.4";
> 1.33.222.4
> > $x ~~ m/ (<:N>+) [.] (<:N>+) [.] (<:N>+) [.] (<:N>+) /;
> 「1.33.222.4」
> 0 => 「1」
> 1
Hi All,
rakudo-pkg-2020.12-01.x86_64
Why does this work?
> $x = "1.33.222.4";
1.33.222.4
> $x ~~ m/ (<:N>+) [.] (<:N>+) [.] (<:N>+) [.] (<:N>+) /;
「1.33.222.4」
0 => 「1」
1 => 「33」
2 => 「222」
3 => 「4」
But this does not?
--> Why the wrong number in $2?
--> Why no Nil for $3?
> $x = "
On 12/28/20 7:11 AM, Parrot Raiser wrote:
"Definition of invoke
transitive verb
1a : to petition for help or support
b : to appeal to or cite as authority
2 : to call forth by incantation : conjure
3 : to make an earnest request for : solicit
4 :
"Definition of invoke
transitive verb
1a : to petition for help or support
b : to appeal to or cite as authority
2 : to call forth by incantation : conjure
3 : to make an earnest request for : solicit
4 : to put into effect or operation : implement
On 12/26/20 2:50 PM, Ralph Mellor wrote:
Is this .self with a better name?
No.
I know you've been progressing in your understanding of
OO in general, and Raku's in particular, since you wrote
this email. So I won't explain it for now, but rather just try
to confirm you now know what that bit of
On 12/19/20 11:04 PM, ToddAndMargo via perl6-users wrote:
Hi All,
https://github.com/rakudo/rakudo/blob/master/src/core.c/Str.pm6
337:multi method contains(Str:D: Str:D $needle --> Bool:D) {
338:nqp::hllbool(nqp::isne_i(nqp::index($!value,$needle,0),-1))
339:}
I "presume" in
"abcd".con
> >> What kind of variable is .value?
> >
> > I don't see a `.value`, only a `$!value`.
>
> Is this .self with a better name?
No.
I know you've been progressing in your understanding of
OO in general, and Raku's in particular, since you wrote
this email. So I won't explain it for now, but rat
On 12/23/20 4:39 PM, Ralph Mellor wrote:
1) why is it "$needle" and not "$!needle" on line 338?
Is this because it is an internal variable and not
a variable from the class declaration?
Got it
It's a parameter from line 337. If that's what you mean by
"an internal variable", then y
>1) why is it "$needle" and not "$!needle" on line 338?
>Is this because it is an internal variable and not
>a variable from the class declaration?
It's a parameter from line 337. If that's what you mean by
"an internal variable", then yes. :)
>2) where is variable ".value" defined on lin
On 12/20/20 10:11 AM, Bruce Gray wrote:
$a + $b - $c * $d / $e.foo
, the .foo method is called on $e, not on the whole A-through-E sub-expression.
That makes sense. It is the precidence.
In college, we called it "algebraic operation".
** came before *; * came before +; etc
In Raku, a m
> On Dec 20, 2020, at 6:08 AM, ToddAndMargo via perl6-users
> wrote:
>
>>> On Sun, Dec 20, 2020 at 02:05 ToddAndMargo via perl6-users
>>> mailto:perl6-us...@perl.org>> wrote:
>>>Hi All,
>>>Why does this work?
>>> say (45*π/180).cos
>>> 0.7071067811865476
>>>And
On Sun, Dec 20, 2020 at 02:05 ToddAndMargo via perl6-users
mailto:perl6-us...@perl.org>> wrote:
Hi All,
Why does this work?
say (45*π/180).cos
0.7071067811865476
And this not?
say 45*π/180.cos
-236.22573454917193
Is not the math suppose
Hi All,
Why does this work?
say (45*π/180).cos
0.7071067811865476
And this not?
say 45*π/180.cos
-236.22573454917193
Is not the math suppose to be done first?
Confused again,
-T
On 12/19/20 8:21 PM, Bruce Gray wrote:
With a custom `new` method, that could be shortened further to:
say BadMath.new(2, 2).BadAdd;
print BadMath.new(2, 2).BadAdd ~ "\n";
Default constructor for 'BadMath' only takes named arguments
in block at line 1
What am I missing?
Hi All,
https://github.com/rakudo/rakudo/blob/master/src/core.c/Str.pm6
337:multi method contains(Str:D: Str:D $needle --> Bool:D) {
338:nqp::hllbool(nqp::isne_i(nqp::index($!value,$needle,0),-1))
339:}
I "presume" in
"abcd".contains("bc")
"abcd" is `$!value`, and
"bc" is $needle. Do
On 12/19/20 8:21 PM, Bruce Gray wrote:
On Dec 19, 2020, at 6:40 PM, ToddAndMargo via perl6-users
wrote:
Hi All,
I have so far:
class BadMath {
has Int $.A;
has Int $.B;
method BadAdd() {
my $Clinker = (-5..5).rand.truncate;
return $!A + $!B +
> On Dec 19, 2020, at 6:40 PM, ToddAndMargo via perl6-users
> wrote:
>
> Hi All,
>
> I have so far:
>
>
> class BadMath {
> has Int $.A;
> has Int $.B;
>
> method BadAdd() {
> my $Clinker = (-5..5).rand.truncate;
> return $!A + $!B + $Clinker;
>
Hi All,
I have so far:
class BadMath {
has Int $.A;
has Int $.B;
method BadAdd() {
my $Clinker = (-5..5).rand.truncate;
return $!A + $!B + $Clinker;
}
}
my $TwoPlusTwo = BadMath.new( A => 2, B=> 2 );
print $TwoPlusTwo.BadAdd ~ "\n"
On Tue, Dec 8, 2020 at 7:05 PM ToddAndMargo via perl6-users
wrote:
> I guess what I am missing is how
>
> int cupsEnumDests(unsigned flags, int msec, int *cancel, cups_ptype_t
> type, cups_ptype_t mask, cups_dest_cb_t cb, void *user_data);
>
> matches up with
>
> class CupsDest is repr('CStruct'
Hi All,
In the following piece of code:
use NativeCall;
class CupsDest is repr('CStruct') {
has Str $.name;
has Str $.instance;
has int32 $.is-default;
has Pointer $.options;
}
sub cupsGetDests(Pointer is rw --> int32) is native('cups', v2) {}
Would some kind soul pl
he "nativesizeof" gives the size of the struct, so the
$ptr + $i * nativesizeof(CupsDest)
moves the new Pointer down the list one struct at a time.
From: ToddAndMargo via perl6-users
Sent: Monday, December 7, 2020 10:36 PM
To: perl6-users
Subject: Need
Hi All,
In the following piece of code:
use NativeCall;
class CupsDest is repr('CStruct') {
has Str $.name;
has Str $.instance;
has int32 $.is-default;
has Pointer $.options;
}
sub cupsGetDests(Pointer is rw --> int32) is native('cups', v2) {}
Would some kind soul please exp
On 2020-06-08 16:08, Peter Pentchev wrote:
Yes, I know. Git does take some getting used to; any program does. With
time, you may find it useful.
The things you do all the time, you remember. Since
I am IT support to small business and do EVERYTHING,
except the wiring, which I have guys that d
On Mon, Jun 08, 2020 at 04:01:41PM -0700, ToddAndMargo via perl6-users wrote:
> On 2020-06-08 15:35, Peter Pentchev wrote:
> > On Mon, Jun 08, 2020 at 03:15:36PM -0700, ToddAndMargo via perl6-users
> > wrote:
> > > On 2020-06-08 15:02, Peter Pentchev wrote:
> > > > On Mon, Jun 08, 2020 at 02:57:58
On 2020-06-08 15:35, Peter Pentchev wrote:
On Mon, Jun 08, 2020 at 03:15:36PM -0700, ToddAndMargo via perl6-users wrote:
On 2020-06-08 15:02, Peter Pentchev wrote:
On Mon, Jun 08, 2020 at 02:57:58PM -0700, ToddAndMargo via perl6-users wrote:
On 2020-06-08 14:54, Peter Pentchev wrote:
On Mon,
On Mon, Jun 08, 2020 at 03:15:36PM -0700, ToddAndMargo via perl6-users wrote:
> On 2020-06-08 15:02, Peter Pentchev wrote:
> > On Mon, Jun 08, 2020 at 02:57:58PM -0700, ToddAndMargo via perl6-users
> > wrote:
> > > On 2020-06-08 14:54, Peter Pentchev wrote:
> > > > On Mon, Jun 08, 2020 at 02:48:48
On 2020-06-08 15:02, Peter Pentchev wrote:
On Mon, Jun 08, 2020 at 02:57:58PM -0700, ToddAndMargo via perl6-users wrote:
On 2020-06-08 14:54, Peter Pentchev wrote:
On Mon, Jun 08, 2020 at 02:48:48PM -0700, ToddAndMargo via perl6-users wrote:
On 2020-06-08 13:55, Richard Hainsworth wrote:
[sni
On Mon, Jun 08, 2020 at 02:57:58PM -0700, ToddAndMargo via perl6-users wrote:
> On 2020-06-08 14:54, Peter Pentchev wrote:
> > On Mon, Jun 08, 2020 at 02:48:48PM -0700, ToddAndMargo via perl6-users
> > wrote:
> > > On 2020-06-08 13:55, Richard Hainsworth wrote:
> > [snip]
> > > > The opening brack
On 2020-06-08 14:57, ToddAndMargo via perl6-users wrote:
On 2020-06-08 14:54, Peter Pentchev wrote:
On Mon, Jun 08, 2020 at 02:48:48PM -0700, ToddAndMargo via perl6-users
wrote:
On 2020-06-08 13:55, Richard Hainsworth wrote:
[snip]
The opening bracket for class Informing is on (or about) line
On 2020-06-08 14:54, Peter Pentchev wrote:
On Mon, Jun 08, 2020 at 02:48:48PM -0700, ToddAndMargo via perl6-users wrote:
On 2020-06-08 13:55, Richard Hainsworth wrote:
[snip]
The opening bracket for class Informing is on (or about) line 10 and the
closing in at about line 630, with a comment '
On Mon, Jun 08, 2020 at 02:48:48PM -0700, ToddAndMargo via perl6-users wrote:
> On 2020-06-08 13:55, Richard Hainsworth wrote:
[snip]
> > The opening bracket for class Informing is on (or about) line 10 and the
> > closing in at about line 630, with a comment 'end of Informing class'
> >
> > Richa
On 2020-06-08 13:55, Richard Hainsworth wrote:
Todd,
The 'unit' in line 3 means something like 'this whole file is the
Module' so there are no Begins/Ends/brackets.
Poop. I spaced on that. I start all my moduels with
1: unit module ;
The opening bracket for class Informing is on (or ab
Todd,
The 'unit' in line 3 means something like 'this whole file is the
Module' so there are no Begins/Ends/brackets.
The opening bracket for class Informing is on (or about) line 10 and the
closing in at about line 630, with a comment 'end of Informing class'
Richard
On 08/06/2020 21:47,
On 2020-06-08 05:35, Fernando Santagata wrote:
On Mon, Jun 8, 2020 at 2:11 PM ToddAndMargo via perl6-users
mailto:perl6-us...@perl.org>> wrote:
On 2020-06-08 04:32, Fernando Santagata wrote:
> On Mon, Jun 8, 2020 at 1:20 PM ToddAndMargo via perl6-users
> mailto:perl6-us...@perl.or
On Mon, Jun 8, 2020 at 2:11 PM ToddAndMargo via perl6-users <
perl6-us...@perl.org> wrote:
> On 2020-06-08 04:32, Fernando Santagata wrote:
> > On Mon, Jun 8, 2020 at 1:20 PM ToddAndMargo via perl6-users
> > mailto:perl6-us...@perl.org>> wrote:
> >
> > On 2020-06-08 03:38, Fernando Santagata w
On 2020-06-08 04:32, Fernando Santagata wrote:
On Mon, Jun 8, 2020 at 1:20 PM ToddAndMargo via perl6-users
mailto:perl6-us...@perl.org>> wrote:
On 2020-06-08 03:38, Fernando Santagata wrote:
> …and line 3:
>
> unit module Informative;
>
3: unit module Informati
On Mon, Jun 8, 2020 at 1:20 PM ToddAndMargo via perl6-users <
perl6-us...@perl.org> wrote:
> On 2020-06-08 03:38, Fernando Santagata wrote:
> > …and line 3:
> >
> > unit module Informative;
> >
>
>
> 3: unit module Informative;
>
> Does not look like a class to me. What am I missing?
>
It's
On Mon, Jun 8, 2020 at 12:35 PM Richard Hainsworth
mailto:rnhainswo...@gmail.com>> wrote:
Look at line 10
class Informing {
On 08/06/2020 11:31, ToddAndMargo via perl6-users wrote:
Hi All,
Over on
https://github.com/finanalyst/p6-inform/blob/master/lib/Informative.pm
>> Hi All,
>>
>> Over on
>>
>> https://github.com/finanalyst/p6-inform/blob/master/lib/Informative.pm6
>>
>> Line 144:
>>
>> method show(
>> Str $str?,
>> Int :$timer,
>> Bool :$show-countdown
>> ) {
>>
>> where is the class that is linked to tha
…and line 3:
unit module Informative;
On Mon, Jun 8, 2020 at 12:35 PM Richard Hainsworth
wrote:
> Look at line 10
>
> class Informing {
>
>
> On 08/06/2020 11:31, ToddAndMargo via perl6-users wrote:
>
> Hi All,
>
> Over on
>
> https://github.com/finanalyst/p6-inform/blob/master/lib/Informative.
Look at line 10
class Informing {
On 08/06/2020 11:31, ToddAndMargo via perl6-users wrote:
Hi All,
Over on
https://github.com/finanalyst/p6-inform/blob/master/lib/Informative.pm6
Line 144:
method show(
Str $str?,
Int :$timer,
Bool :$show-countdown
Hi All,
Over on
https://github.com/finanalyst/p6-inform/blob/master/lib/Informative.pm6
Line 144:
method show(
Str $str?,
Int :$timer,
Bool :$show-countdown
) {
where is the class that is linked to that method?
Many thanks,
-T
On 2020-05-30 20:08, ToddAndMargo via perl6-users wrote:
Follow up.
I just opened
An Example to consider adding to your documentation:
https://github.com/tadzik/perl6-Config-INI/issues/17
Follow up.
Special thanks to Peter and David!
I wrote a sample program to explain things in
my personal documentation:
-T
Raku: reading INI files:
Example:
~ini.test.pl6.ini ~~~
# Raku: Config::INI test INI
# edit at your own risk
IHave=NoSection
[Backup paramters]
target
On Fri, May 29, 2020 at 05:02:15PM -0700, ToddAndMargo via perl6-users wrote:
> Hi All,
>
> I an not figure out how to read the hash.
>
>
> ~~~ ini.test.pl6.ini ~
> # Raku: Confug::INI test INI
> # edit at your own risk
>
> [Backup paramters]
> target=B:\myDocsBackp\backup1
Hope this helps :-)
Basically the %hash variable contains another hash, and with spaces in
keys you cannot use them with "<>"
use Config;
use Config::INI;
my Str $IniFile = slurp "config.ini";
my %hash = Config::INI::parse($IniFile);
dd %hash;
print "\n";
for %hash.kv -> $section_name, %secti
Hi All,
I an not figure out how to read the hash.
~~~ ini.test.pl6.ini ~
# Raku: Confug::INI test INI
# edit at your own risk
[Backup paramters]
target=B:\myDocsBackp\backup1
partition=BACKUP
[eMail]
smtp=smtp.bozo.com
address=b...@theclown.com
port=587
~~~ /ini.te
On 2020-05-26 16:29, Brad Gilbert wrote:
There are various equality operators.
「==」 Tests for numeric equality
「eq」 Tests for string equality
「===」 Tests for value identity
「=:=」 Tests for pointer equality (Note that it looks a bit like 「:=」)
「eqv」 Tests for structure equivalence.
The 「==」 and
There are various equality operators.
「==」 Tests for numeric equality
「eq」 Tests for string equality
「===」 Tests for value identity
「=:=」 Tests for pointer equality (Note that it looks a bit like 「:=」)
「eqv」 Tests for structure equivalence.
The 「==」 and 「eq」 operators are special because they for
On Tue, May 26, 2020 at 4:24 PM ToddAndMargo via perl6-users
mailto:perl6-us...@perl.org>> wrote:
Hi All,
How do I turn this:
$ raku -e 'my $x="abc"; say $x.index( "q" );'
Nil
into a test?
$ raku -e 'my $x="abc"; if $x.index( "q" ) eq Nil {say "Nil"}else{say
"Exis
Generally you don't need to test for 「Nil」.
You can just test for defined-ness.
$ raku -e 'my $x="abc"; with $x.index( "q" ) {say "Exists"} else {say
"Nil";}'
Also 「Nil」 is not a 「Str」, so why would you use 「eq」?
$ raku -e 'Nil.Str'
Use of Nil in string context
If you really need to
Hi All,
How do I turn this:
$ raku -e 'my $x="abc"; say $x.index( "q" );'
Nil
into a test?
$ raku -e 'my $x="abc"; if $x.index( "q" ) eq Nil {say "Nil"}else{say
"Exists";}'
Use of Nil in string context
in block at -e line 1
Use of Nil in string context
in block at -e line 1
Nil
Many
On 2020-05-24 15:51, Patrick R. Michaud wrote:
On Mon, May 25, 2020 at 12:07:22AM +0200, Tobias Boege wrote:
@things.sort: {
.comb(/ \d+ | \D+ /)
.map({ .Int // .self })
}
Or how about even somethig like
@things.sort: *.Version;
which does handle a reasonable set of
On Mon, May 25, 2020 at 12:07:22AM +0200, Tobias Boege wrote:
> @things.sort: {
> .comb(/ \d+ | \D+ /)
> .map({ .Int // .self })
> }
Or how about even somethig like
@things.sort: *.Version;
which does handle a reasonable set of version semantics...?
(The .Version method was
On 2020-05-24 15:39, ToddAndMargo via perl6-users wrote:
On 2020-05-24 15:07, Tobias Boege wrote:
On Sun, 24 May 2020, Elizabeth Mattijsen wrote:
Hmmm... it appears we need to numerify the match to get numeric
comparison semantics, so we put a "+" before the match:
$ raku -e 'my @x=.sort: { +
On 2020-05-24 15:07, Tobias Boege wrote:
On Sun, 24 May 2020, Elizabeth Mattijsen wrote:
Hmmm... it appears we need to numerify the match to get numeric comparison semantics, so
we put a "+" before the match:
$ raku -e 'my @x=.sort: { +m/ \d+ $/ }; for @x { say $_; }'
a1
a2
a5
a123
a133
So
On Sun, 24 May 2020, Elizabeth Mattijsen wrote:
> Hmmm... it appears we need to numerify the match to get numeric comparison
> semantics, so we put a "+" before the match:
>
> $ raku -e 'my @x=.sort: { +m/ \d+ $/ }; for @x { say $_;
> }'
> a1
> a2
> a5
> a123
> a133
>
So I think this would be
:
>
>
>>> On 24 May 2020, at 10:43, ToddAndMargo via perl6-users
>>> wrote:
>>>
>>> Hi All,
>>>
>>> https://docs.raku.org/routine/sort
>>>
>>> I need help sorting a list.
>>>
>>> This is the list
On 2020-05-24 13:13, Tobias Boege wrote:
On Sun, 24 May 2020, ToddAndMargo via perl6-users wrote:
On 2020-05-24 02:24, Elizabeth Mattijsen wrote:
dd .sort: { m/ \d+ $/ }
Hi Elizabeth,
This seems to work:
$ raku -e 'dd .sort: { m/ \d+ $/ };'
("a5", "a6", "a33", "a111").Seq
But I c
On Sun, 24 May 2020, ToddAndMargo via perl6-users wrote:
> On 2020-05-24 02:24, Elizabeth Mattijsen wrote:
> > dd .sort: { m/ \d+ $/ }
> >
>
> Hi Elizabeth,
>
> This seems to work:
>
>$ raku -e 'dd .sort: { m/ \d+ $/ };'
>("a5", "a6", "a33", "a111").Seq
>
>
> But I can't figure out how
On 24 May 2020, at 10:43, ToddAndMargo via perl6-users
wrote:
Hi All,
https://docs.raku.org/routine/sort
I need help sorting a list.
This is the list of values I want to sort:
H:\MyDocsBackup\backup1
H:\MyDocsBackup\backup2
H:\MyDocsBackup\backup126
H:\MyDocsBackup\backup3
H
dd .sort: { m/ \d+ $/ }
> On 24 May 2020, at 10:43, ToddAndMargo via perl6-users
> wrote:
>
> Hi All,
>
> https://docs.raku.org/routine/sort
>
> I need help sorting a list.
>
> This is the list of values I want to sort:
>
> H:\MyDocsBackup\b
Hi All,
https://docs.raku.org/routine/sort
I need help sorting a list.
This is the list of values I want to sort:
H:\MyDocsBackup\backup1
H:\MyDocsBackup\backup2
H:\MyDocsBackup\backup126
H:\MyDocsBackup\backup3
H:\MyDocsBackup\backup33
H:\MyDocsBackup\backup6
This is what I want back:
H
On 2020-05-19 05:17, Peter Pentchev wrote:
...control structures, I mean.
G'luck,
Peter
No problem,
I appreciate all the help!
:-)
-T
On Tue, May 19, 2020 at 03:16:41PM +0300, Peter Pentchev wrote:
> On Mon, May 18, 2020 at 10:58:26PM -0700, ToddAndMargo via perl6-users wrote:
> > On 2020-05-18 17:14, Peter Pentchev wrote:
> > > On Mon, May 18, 2020 at 04:53:31PM -0700, ToddAndMargo via perl6-users
> > > wrote:
> > > > In 2020-0
On Mon, May 18, 2020 at 10:58:26PM -0700, ToddAndMargo via perl6-users wrote:
> On 2020-05-18 17:14, Peter Pentchev wrote:
> > On Mon, May 18, 2020 at 04:53:31PM -0700, ToddAndMargo via perl6-users
> > wrote:
> > > In 2020-05-18 16:11, Peter Pentchev wrote:
> > > > As an exercise for the reader: o
On Tue, May 19, 2020 at 03:44 Richard Hainsworth
wrote:
> The transcendental abundance of purple in Raku :)
Ah, Richard, thanks for a trip down memory lane! In my youth I discovered
the joys of science fiction a few years after that piece was published.
-Tom
Peter,
What a genius answer!
The transcendental abundance of purple in Raku :)
On 18/05/2020 22:26, Peter Pentchev wrote:
It's the internal representation of the program you told Raku to
parse
and execute; the truth is that, just like in a sci-fi story about
a machine that is supposed to answ
On 2020-05-18 22:58, ToddAndMargo via perl6-users wrote:
On 2020-05-18 17:14, Peter Pentchev wrote:
On Mon, May 18, 2020 at 04:53:31PM -0700, ToddAndMargo via perl6-users
wrote:
In 2020-05-18 16:11, Peter Pentchev wrote:
As an exercise for the reader: once the above sinks in, what exactly
will
On 2020-05-18 17:14, Peter Pentchev wrote:
On Mon, May 18, 2020 at 04:53:31PM -0700, ToddAndMargo via perl6-users wrote:
In 2020-05-18 16:11, Peter Pentchev wrote:
As an exercise for the reader: once the above sinks in, what exactly
will "say if 'h:/'.IO.d" do?
It returns the the result of th
On Mon, May 18, 2020 at 04:53:31PM -0700, ToddAndMargo via perl6-users wrote:
> In 2020-05-18 16:11, Peter Pentchev wrote:
> > As an exercise for the reader: once the above sinks in, what exactly
> > will "say if 'h:/'.IO.d" do?
>
> It returns the the result of the expression that
> "if" evaluated
In 2020-05-18 16:11, Peter Pentchev wrote:
As an exercise for the reader: once the above sinks in, what exactly
will "say if 'h:/'.IO.d" do?
It returns the the result of the expression that
"if" evaluated.
I do know all this. It is easier for me to read
the other way.
1 - 100 of 300 matches
Mail list logo