On 1/13/25 2:25 AM, Elizabeth Mattijsen wrote:
On 12 Jan 2025, at 04:46, Kevin Pye wrote:
On Sun, 12 Jan 2025, at 14:01, ToddAndMargo via perl6-users wrote:
Hi All,
Is
Q[...]
the same thing as
<...>
?
No.
Q[…] is the bare quoting construct. There'll be no interpolation of variable
> On 12 Jan 2025, at 04:46, Kevin Pye wrote:
>
> On Sun, 12 Jan 2025, at 14:01, ToddAndMargo via perl6-users wrote:
>> Hi All,
>>
>> Is
>>Q[...]
>>
>> the same thing as
>><...>
>> ?
>
> No.
>
> Q[…] is the bare quoting construct. There'll be no interpolation of
> variables, no splitt
On 1/11/25 7:46 PM, Kevin Pye wrote:
On Sun, 12 Jan 2025, at 14:01, ToddAndMargo via perl6-users wrote:
Hi All,
Is
Q[...]
the same thing as
<...>
?
No.
Q[…] is the bare quoting construct. There'll be no interpolation of variables,
no splitting into words, nothing other than creat
On Sun, 12 Jan 2025, at 14:01, ToddAndMargo via perl6-users wrote:
> Hi All,
>
> Is
> Q[...]
>
> the same thing as
> <...>
> ?
No.
Q[…] is the bare quoting construct. There'll be no interpolation of variables,
no splitting into words, nothing other than creating a bare string.
But Q als
Hi All,
Is
Q[...]
the same thing as
<...>
?
my Str $z=Q[ab#\n]
ab#\n
my Str $z=Q{ab[#\n}
ab[#\n
my Str $z=
ab#\n
my Str $z=
ab[#\n
Many thanks,
-T
Yes
> On 16 Dec 2024, at 11:52, ToddAndMargo via perl6-users
> wrote:
>
> On 12/16/24 02:27, Elizabeth Mattijsen wrote:
>> class Fruit {
>> has Str $.location is rw = "Cucamonga";
>> has UInt $.apples is rw = 400;
>> has UInt $.oranges is rw = 200;
>> has UInt $.bana
On 12/16/24 02:27, Elizabeth Mattijsen wrote:
class Fruit {
has Str $.location is rw = "Cucamonga";
has UInt $.apples is rw = 400;
has UInt $.oranges is rw = 200;
has UInt $.bananas is rw = 50;
``}
Is the `` at the end a typo?
On 16 Dec 2024, at 10:49, ToddAndMargo via perl6-users
wrote:
Hi All,
In the following;
class Fruit {
has Str $.location is rw;
has UInt $.apples is rw;
has UInt $.oranges is rw;
has UInt $.bananas is rw;
}
# Pre-salted:
my $FruitStand = Fr
class Fruit {
has Str $.location is rw = "Cucamonga";
has UInt $.apples is rw = 400;
has UInt $.oranges is rw = 200;
has UInt $.bananas is rw = 50;
``}
> On 16 Dec 2024, at 10:49, ToddAndMargo via perl6-users
> wrote:
>
> Hi All,
>
> In the following;
>
> class
Hi All,
In the following;
class Fruit {
has Str $.location is rw;
has UInt $.apples is rw;
has UInt $.oranges is rw;
has UInt $.bananas is rw;
}
# Pre-salted:
my $FruitStand = Fruit.new( location => "Cucamonga",
2024 at 4:49 AM ToddAndMargo via perl6-users us...@perl.org <mailto:perl6-us...@perl.org>> wrote:
Hi All,
I am about to report a regression bug over on
https://github.com/rakudo/rakudo/issues/new <https://github.com/
rakudo/rakudo/issues/new>
A question about bug r
rl6-us...@perl.org> wrote:
> Hi All,
>
> I am about to report a regression bug over on
>
> https://github.com/rakudo/rakudo/issues/new
>
> A question about bug reporting etiquette:
>
> 1) to reproduce the bug is 150 line of code. Do
> I attach the code to the bug or
Hi All,
I am about to report a regression bug over on
https://github.com/rakudo/rakudo/issues/new
A question about bug reporting etiquette:
1) to reproduce the bug is 150 line of code. Do
I attach the code to the bug or do I post it
up on vpaste.net?
2) I have two different revision of
For the full range of RGB colors in the console, you can also
use Terminal::ANSI. For example:
use Terminal::ANSI::OO :t;
say t.color('#dd00dd') ~ 'light purple' ~ t.text-reset;
say t.color('#7e1e9c') ~ 'dark purple' ~ t.text-reset;
say t.color(255,100,255) ~ 'another light purple'
> On Nov 3, 2024, at 22:12, ToddAndMargo via perl6-users
> wrote:
>
> Hi All,
>
> Fedora 41
> rakudo-pkg-2024.7.0-01.x86_64
> bash-5.2.32-1.fc41.x86_64
>
> I am looking at
> https://metacpan.org/pod/Term::ANSIColor
>
> trying to figure out how to print in dark purple.
> I have see dnf5 d
On 11/3/24 22:04, Bruce Gray wrote:
On Nov 3, 2024, at 22:12, ToddAndMargo via perl6-users
wrote:
Hi All,
Fedora 41
rakudo-pkg-2024.7.0-01.x86_64
bash-5.2.32-1.fc41.x86_64
I am looking at
https://metacpan.org/pod/Term::ANSIColor
trying to figure out how to print in dark purple.
I have
On 11/3/24 22:04, Bruce Gray wrote:
On Nov 3, 2024, at 22:12, ToddAndMargo via perl6-users
wrote:
Hi All,
Fedora 41
rakudo-pkg-2024.7.0-01.x86_64
bash-5.2.32-1.fc41.x86_64
I am looking at
https://metacpan.org/pod/Term::ANSIColor
trying to figure out how to print in dark purple.
I have
Hi All,
Fedora 41
rakudo-pkg-2024.7.0-01.x86_64
bash-5.2.32-1.fc41.x86_64
I am looking at
https://metacpan.org/pod/Term::ANSIColor
trying to figure out how to print in dark purple.
I have see dnf5 do this, so I know it is possible.
Now one of the hurdles is that purple is not an
actual colo
hello people,
I saw this post
https://unix.stackexchange.com/questions/783990/merge-multiple-files-using-full-join-by-the-first-column/784240#784240
and just had fun writing the following solution but there is no way I'll
create an account on stackexchange. feel free to reuse if you think it's
h
On 5/6/24 05:45, yary wrote:
I thought you wanted them sorted also?
[1] > (8,7,6,7,5,4,2,1).unique
(8 7 6 5 4 2 1)
[2] > (8,7,6,7,5,4,2,1).unique.sort
(1 2 4 5 6 7 8)
-y
Hi Yary,
Not in this instance. But the the command is
really sweet. Thank you!
This time I am going the extract IP add
I thought you wanted them sorted also?
[1] > (8,7,6,7,5,4,2,1).unique
(8 7 6 5 4 2 1)
[2] > (8,7,6,7,5,4,2,1).unique.sort
(1 2 4 5 6 7 8)
-y
On Mon, May 6, 2024 at 6:15 AM ToddAndMargo via perl6-users <
perl6-us...@perl.org> wrote:
> On 5/6/24 03:07, ToddAndMargo via perl6-users wrote:
> >
>
On 5/6/24 03:07, ToddAndMargo via perl6-users wrote:
On 6 May 2024, at 04:35, ToddAndMargo via perl6-users
wrote:
Hi All,
I have thought of how to do it and pretty sure
it would work, but just in case Raku have one
of those sweet utilities, does Raku have a
utility that will take an array a
On 6 May 2024, at 04:35, ToddAndMargo via perl6-users
wrote:
Hi All,
I have thought of how to do it and pretty sure
it would work, but just in case Raku have one
of those sweet utilities, does Raku have a
utility that will take an array and remove all
the duplicates and rearrange the cells
$ raku -e 'my @a = 1,2,3,6,7,1,2,8; @a .= unique; say @a'
[1 2 3 6 7 8]
https://docs.raku.org/type/Any#method_unique
> On 6 May 2024, at 04:35, ToddAndMargo via perl6-users
> wrote:
>
> Hi All,
>
> I have thought of how to do it and pretty sure
> it would work, but just in case Raku have one
Hi All,
I have thought of how to do it and pretty sure
it would work, but just in case Raku have one
of those sweet utilities, does Raku have a
utility that will take an array and remove all
the duplicates and rearrange the cells back
in order?
Many thanks,
-T
On 2/6/24 09:03, Bruce Gray wrote:
On Feb 6, 2024, at 10:52, ToddAndMargo via perl6-users
wrote:
On 6 Feb 2024, at 00:39, ToddAndMargo via perl6-users
wrote:
Hi All,
Is there a way to syntax a module? Sort of like the "-c"
option on main programs?
Many thanks,
-T
On 2/6/24 01:34, E
On 6 Feb 2024, at 17:52, ToddAndMargo via perl6-users
wrote:
On 6 Feb 2024, at 00:39, ToddAndMargo via perl6-users
wrote:
Hi All,
Is there a way to syntax a module? Sort of like the "-c"
option on main programs?
Many thanks,
-T
On 2/6/24 01:34, Elizabeth Mattijsen wrote:
$ raku -c
> On Feb 6, 2024, at 10:52, ToddAndMargo via perl6-users
> wrote:
>
>>> On 6 Feb 2024, at 00:39, ToddAndMargo via perl6-users
>>> wrote:
>>>
>>> Hi All,
>>>
>>> Is there a way to syntax a module? Sort of like the "-c"
>>> option on main programs?
>>>
>>> Many thanks,
>>> -T
>
> On 2/6/
Do you have some "use lib 'foo'" setting in your program?
If so, use that on the command-line, e.g.:
$ raku -Ifoo -c bar.rakumod
> On 6 Feb 2024, at 17:52, ToddAndMargo via perl6-users
> wrote:
>
>>> On 6 Feb 2024, at 00:39, ToddAndMargo via perl6-users
>>> wrote:
>>>
>>> Hi All,
>>>
On 6 Feb 2024, at 00:39, ToddAndMargo via perl6-users
wrote:
Hi All,
Is there a way to syntax a module? Sort of like the "-c"
option on main programs?
Many thanks,
-T
On 2/6/24 01:34, Elizabeth Mattijsen wrote:
> $ raku -c foo.rakumod
> Syntax OK
>
$ raku -c WinMessageBox.pm6
===SORRY!===
$ raku -c foo.rakumod
Syntax OK
> On 6 Feb 2024, at 00:39, ToddAndMargo via perl6-users
> wrote:
>
> Hi All,
>
> Is there a way to syntax a module? Sort of like the "-c"
> option on main programs?
>
> Many thanks,
> -T
>
>
>
> --
> ~~
> Computers are l
Hi All,
Is there a way to syntax a module? Sort of like the "-c"
option on main programs?
Many thanks,
-T
--
~~
Computers are like air conditioners.
They malfunction when you open windows
~~
On 12/11/23 14:47, Andy Bach wrote:
I have found that when using `say` for debugging, it has been known to print
out the
previous value of a variable and not the current value. `print` does not do
this.
That would certainly be a surprise to me. I'd think I was
misunderstanding my program,
than a bug in say.
From: ToddAndMargo via perl6-users
Sent: Monday, December 11, 2023 3:24 PM
To: perl6-us...@perl.org
Subject: Re: .contains question
CAUTION - EXTERNAL:
> "so" will collapse the junction into a Bool.
> "say" will append a \
"so" will collapse the junction into a Bool.
"say" will append a \n for you, so you don't have to.
On 11 Dec 2023, at 01:52, ToddAndMargo via perl6-users
wrote:
On 10 Dec 2023, at 21:36, ToddAndMargo via perl6-users
wrote:
Hi All,
my Str $x="abc3defg"; if $x.contains( "a" || "b" || "3
my $x="abc45def";
my @y=; say so $x.contains(any @y);
"so" will collapse the junction into a Bool.
"say" will append a \n for you, so you don't have to.
> On 11 Dec 2023, at 01:52, ToddAndMargo via perl6-users
> wrote:
>
>>> On 10 Dec 2023, at 21:36, ToddAndMargo via perl6-users
>>> wrote:
>
On 10 Dec 2023, at 21:36, ToddAndMargo via perl6-users
wrote:
Hi All,
my Str $x="abc3defg"; if $x.contains( "a" || "b" || "3" ) { print "True\n"; } else {
print "False\n" };
True
Is there a way to tell .contains that you want to know
if any of a sequence characters is in a string other that
my @letters = ;
if $x.contains(any @letters) {
...
> On 10 Dec 2023, at 21:36, ToddAndMargo via perl6-users
> wrote:
>
> Hi All,
>
> my Str $x="abc3defg"; if $x.contains( "a" || "b" || "3" ) { print "True\n";
> } else { print "False\n" };
> True
>
> Is there a way to tell .contains that yo
Hi All,
my Str $x="abc3defg"; if $x.contains( "a" || "b" || "3" ) { print
"True\n"; } else { print "False\n" };
True
Is there a way to tell .contains that you want to know
if any of a sequence characters is in a string other that
repeating || over and over. Any [a..z] or [0..9] option?
Many
> On 30/06/2023 06:06, ToddAndMargo via perl6-users wrote:
>> if @*ARGS.elems > 0 && "@*ARGS[0]".lc eq "debug" {...}
On 6/30/23 02:40, Richard Hainsworth wrote:
I tried this and it worked without any problem.
And today is is working for me as well without
a problem. I must have had somethin
;> that you can safely use them after a list operator without the need
>> for
>> parentheses:
>>
>> unlink "alpha", "beta", "gamma"
>> or gripe(), next LINE;
>>
>> With the C-style
out the need for
> parentheses:
>
> unlink "alpha", "beta", "gamma"
> or gripe(), next LINE;
>
> With the C-style operators that would have been written like this:
>
> unlink("alpha", "beta", "ga
s(unlink("alpha", "beta", "gamma")) {
gripe();
next LINE;
}
Using "or" for assignment is unlikely to do what you want; see below.
From: yary
Sent: Friday, June 30, 2023 8:45 AM
To: Richard
And then nobody mentions that `and` has low priority. Try `say 42 & 13` and
`say 42 and 13`.
Best regards,
Vadim Belman
> On Jun 30, 2023, at 9:45 AM, yary wrote:
>
> Most of Richard's parting suggestions I understand & agree with, but not
> this: " why are you using '&&' and not 'and' "
>
Most of Richard's parting suggestions I understand & agree with, but not
this: " why are you using '&&' and not 'and' "
My habit (from Perl 5 days) is to use && || for expressions, and reserve
"and" "or" for "do this if assignment/function call without parens
succeeds/fails" – is there a refinemen
I tried this and it worked without any problem.
Here's the whole program:
use v6.d;
say @*ARGS.raku;
if @*ARGS.elems > 0 && "@*ARGS[0]".lc eq "debug" {
say 'got' }
and at the terminal:
$ raku todd-test.raku debug --debug=50
["debug", "--debug=50"]
got
FWIW
why are you quoting ARGS? The .l
Hi All,
This gets the finger wagged at me for a "Nil"
when @*ARGS.elems equals zero:
if @*ARGS.elems > 0 && "@*ARGS[0]".lc eq "debug" {...}
I have to do this instead:
if @*ARGS.elems > 0 {
if "@*ARGS[0]".lc eq "debug" {...}
}
Do I misunderstand something? In an AND, is
not the test
On 12/7/22 02:02, ToddAndMargo via perl6-users wrote:
On my sub declarations, I like to use "export"
I had been doing a lot of module coding.
I should have said "returns", not "export[s]"
--
~~
Computers are like air conditioners.
They malfunction when yo
On 12/7/22 02:02, ToddAndMargo via perl6-users wrote:
use "export"
"exports", I forgot the "s"
--
~~
Computers are like air conditioners.
They malfunction when you open windows
~~
Hi All,
On my sub declarations, I like to use "export"
sub abc() returns Str {...}
becasue it makes eh sub easier to figure out at
a glance when I go to maintain it.
Two exports I have not figured out are
1) an array,
2) an object created from a custom class.
returns @
gets the
On 11/30/22 12:53, ToddAndMargo via perl6-users wrote:
Let me ask this question a little simpler:
To answer my own questions, which I figured out
the hard way.
1) how to I tell NativeCall I only want the
C pointer back, not what it points to?
By declaring it as a pointer and creating it
Let me ask this question a little simpler:
1) how to I tell NativeCall I only want the
C pointer back, not what it points to?
2) how do I tell NativeCall I am sending it
a C pointer?
Many thanks,
-T
t;)
returns DWORD
{ * };
NativeCall is resolving the pointers automatically
for me. It is taking $pServerName, which is a
Long Pointer to String (LPSTR) and creating the
pointer for me. This is appreciated.
It also returns and resolves the value of “HANDLE”
which is a C Pointer DWORD..
Questi
On 11/27/22 19:13, Clifton Wood wrote:
ToddAndMargo: Why are you referencing NativeHelpers::Blob when I've
linked to the code you need. The bug was in the code snippet I've sent.
NONE of my stuff is available via zef because CURI (and hence zef) have
problems with large scale code that I am sti
On 11/27/22 19:13, Clifton Wood wrote:
ToddAndMargo: Why are you referencing NativeHelpers::Blob when I've
linked to the code you need. The bug was in the code snippet I've sent.
NONE of my stuff is available via zef because CURI (and hence zef) have
problems with large scale code that I am sti
ToddAndMargo: Why are you referencing NativeHelpers::Blob when I've linked
to the code you need. The bug was in the code snippet I've sent. NONE of my
stuff is available via zef because CURI (and hence zef) have problems with
large scale code that I am still trying to resolve.
You should be able t
On Sun, Nov 20, 2022 at 3:48 AM ToddAndMargo via perl6-users
mailto:perl6-us...@perl.org>> wrote:
Hi All,
In one of my native call, I get returned a
pointer to a DWORD (uint32).
How do I turn that into the actual value
in the DWORD?
Many thanks,
-T
On 11/20/22 16
On 11/23/22 20:01, Clifton Wood wrote:
Long story short:
my $a = GLib::Roles::TypedBuffer[.new($ppSessionInf);
$a.setSize($pCount, :forced);
my @sessions = $a.Array;
That should return you an array of objects.
raku PopUpTest2.pl6
===SORRY!=== Error while compiling K:\Windows\NtUtil/PopUpT
022 at 9:46 PM ToddAndMargo via perl6-users <
perl6-us...@perl.org> wrote:
> >>> Hi All,
> >>>
> >>> This is driving me nuts!
> >>>
> >>> Native Call question. I have a Pointer ($ppSessionInf).
> >>&
Hi All,
This is driving me nuts!
Native Call question. I have a Pointer ($ppSessionInf).
It points to a structure of $pCount bytes.
How do I load what $ppSessionInf points to into $Sessions
# something gets assigned to it from an API call
On 11/23/22 18:21, Clifton Wood wrote:
What type is BYTE, pray tell?
constant BYTE := uint8;
--
~~
Computers are like air conditioners.
They malfunction when you open windows
~~
On 11/23/22 18:07, ToddAndMargo via perl6-users wrote:
removing my typos:
Hi All,
This is driving me nuts!
Native Call question. I have a Pointer ($ppSessionInf).
It points to a structure of $pCount bytes.
How do I load what $ppSessionInf points to into $Sessions
# something gets
>> removing my typos:
>>
>>
>> Hi All,
>>
>> This is driving me nuts!
>>
>> Native Call question. I have a Pointer ($ppSessionInf).
>>
>> It points to a structure of $pCount bytes.
>>
>> How do I load what $ppSessi
v 23, 2022 at 9:08 PM ToddAndMargo via perl6-users <
perl6-us...@perl.org> wrote:
> removing my typos:
>
>
> Hi All,
>
> This is driving me nuts!
>
> Native Call question. I have a Pointer ($ppSessionInf).
>
> It points to a structure of $pCount bytes.
>
>
removing my typos:
Hi All,
This is driving me nuts!
Native Call question. I have a Pointer ($ppSessionInf).
It points to a structure of $pCount bytes.
How do I load what $ppSessionInf points to into $Sessions
# something gets assigned to it from an API call
my Pointer $ppSessionInf
Hi All,
This is driving me nuts!
Native Call question. I have a Pointer ($ppSessionInf).
It points to a structure of $pCount bytes.
How do I read that into a Buf of $ my DWORD $pCount = 0; bytes?
my Pointer $ppSessionInf = Pointer.new();
my DWORD $pCount = 32 times
e running your program from the Task
Scheduler
Oh and I almost forgot: A H !
Another question:
Is there a way to use the returned pointer and
the pCount to to read the data into a Raku
Buf or similar?
Hi All,
Windows ChromeBook Edition (W11-22H2).
I have been doing a lot of head scratching here.
I have a project were I need to use
BOOL WTSEnumerateSessionsA(
[in] HANDLE hServer,
# WTS_CURRENT_SERVER_HANDLE to use the RD Session Host server that
hosts your applica
On Sun, Nov 20, 2022 at 3:48 AM ToddAndMargo via perl6-users
mailto:perl6-us...@perl.org>> wrote:
Hi All,
In one of my native call, I get returned a
pointer to a DWORD (uint32).
How do I turn that into the actual value
in the DWORD?
Many thanks,
-T
On 11/20/22 1
@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 dere
Hi All,
In one of my native call, I get returned a
pointer to a DWORD (uint32).
How do I turn that into the actual value
in the DWORD?
Many thanks,
-T
tware, I may
> have three or four different modules under the lib/ directory. The top level
> program (I try to make it one line only), uses one module, which then may
> use other modules, all of them in the same directory, under the lib/
> subdirectory. The distribution can then also con
On 9/4/22 04:23, Ralph Mellor wrote:
On Sun, Sep 4, 2022 at 5:07 AM ToddAndMargo via perl6-users
wrote:
For the fun of it, I placed a "booboo;"
Interesting!
You might like to think of `BEGIN` as a signal to the "compiler":
"Please do more than just "compile" this code. Please also run it,
On Sun, Sep 4, 2022 at 5:07 AM ToddAndMargo via perl6-users
wrote:
>
> For the fun of it, I placed a "booboo;"
>
> Interesting!
You might like to think of `BEGIN` as a signal to the "compiler":
"Please do more than just "compile" this code. Please also run it,
right now, before "compiling" any m
On 9/2/22 18:14, ToddAndMargo via perl6-users wrote:
On 9/2/22 13:52, ToddAndMargo via perl6-users wrote:
On 9/2/22 00:13, ToddAndMargo via perl6-users wrote:
Found something interesting
$ raku -c GetUpdates.pl6
Syntax OK
Will execute the BEGIN {}, not just
syntax check it.
The guys on the
On 9/2/22 13:52, ToddAndMargo via perl6-users wrote:
On 9/2/22 00:13, ToddAndMargo via perl6-users wrote:
Found something interesting
$ raku -c GetUpdates.pl6
Syntax OK
Will execute the BEGIN {}, not just
syntax check it.
The guys on the chat line said this is normal
as `BEGIN` runs a compil
.
>
> The guys on the chat line said this is normal
> as `BEGIN` runs a compile time
How short *is* your memory?
> From: Elizabeth Mattijsen
> Subject: Re: BEGIN {} question
> Date: 29 August 2022 at 09:44:30 CEST
> To: ToddAndMargo via perl6-users
>
>> Question, wo
On 9/2/22 00:13, ToddAndMargo via perl6-users wrote:
Found something interesting
$ raku -c GetUpdates.pl6
Syntax OK
Will execute the BEGIN {}, not just
syntax check it.
The guys on the chat line said this is normal
as `BEGIN` runs a compile time
--
~~
Com
Found something interesting
$ raku -c GetUpdates.pl6
Syntax OK
Will execute the BEGIN {}, not just
syntax check it.
On 9/1/22 23:50, ToddAndMargo via perl6-users wrote:
On 9/1/22 19:37, ToddAndMargo via perl6-users wrote:
Hi All,
Is there a cleaner way to do this?
$ raku -e 'print( (sprintf "%.4s", "andefghi" ) ~ "\n";)'
ande
I want to print the first four letter s to STDOUT.
-T
$ raku -e 'p
On 9/1/22 19:37, ToddAndMargo via perl6-users wrote:
Hi All,
Is there a cleaner way to do this?
$ raku -e 'print( (sprintf "%.4s", "andefghi" ) ~ "\n";)'
ande
I want to print the first four letter s to STDOUT.
-T
$ raku -e 'printf "%.4s\n", "andefghi";'
ande
Thank you all!
-T
am in question. Am I missing something?
Hi Todd,
~$ raku -e '(sprintf "%.4s", "andefghi" ).put;'
ande
~$ raku -e 'put (sprintf "%.4s", "andefghi" );'
ande
If sprintf isn't a requirement, then:
~$ raku -e 'put substr("andefghi", 0..3);'
ande
HTH, Bill.
On Thu, Sep 1, 2022 at 7:37 PM ToddAndMargo via perl6-users <
perl6-us...@perl.or
ToddAndMargo via perl6-users @ 2022-09-01 10:30 -07:
> On 9/1/22 00:45, Richard Hainsworth wrote:
>> Treat the regexes as data for a program. Compile the program once.
>> Run the regexes as often as you need.
>
> Please elucidate. That could save me boat loads
> of time.
You could take the rege
ToddAndMargo via perl6-users @ 2022-09-01 19:37 -07:
> Is there a cleaner way to do this?
>
> $ raku -e 'print( (sprintf "%.4s", "andefghi" ) ~ "\n";)'
> ande
>
> I want to print the first four letter s to STDOUT.
You can use substr,
| put "andefghi".substr(0, 4)
ande
signature.as
On Fri, 2 Sept 2022 at 12:37, ToddAndMargo via perl6-users <
perl6-us...@perl.org> wrote:
> Is there a cleaner way to do this?
>
> $ raku -e 'print( (sprintf "%.4s", "andefghi" ) ~ "\n";)'
> ande
>
> I want to print the first four letter s to STDOUT.
>
$ raku -e 'printf "%.4s\n","andef
Hi All,
Is there a cleaner way to do this?
$ raku -e 'print( (sprintf "%.4s", "andefghi" ) ~ "\n";)'
ande
I want to print the first four letter s to STDOUT.
-T
On 9/1/22 00:45, Richard Hainsworth wrote:
Raku and Perl are two different languages in the same family. They
evolved with different targets, perl to react quickly to internet
requests, Raku to be a better programming language. This may not be the
take the actual developers have, but it's what
On 9/1/22 00:45, Richard Hainsworth wrote:
Work with Raku rather than expect it to be the same as Perl.
Oh I intent too! I program in Top Down. Perl 5's
subroutines are a nightmare. I ADORE Perl 6's subroutines.
By saying above / below, this indicates a linear view of
code at the same tim
On Wed, 31 Aug 2022, 00:59 ToddAndMargo via perl6-users, <
perl6-us...@perl.org> wrote:
> On 8/30/22 13:34, Richard Hainsworth wrote:
> > Hi Todd,
> >
>
> > Since you continue for ever to complain about 'compile' time issues,
>
> "Stage parce" is specifically what I am whining about
>
> > rather
On 8/30/22 13:34, Richard Hainsworth wrote:
Hi Todd,
Long time no see.
Re your 'keeper'. There is a reason why things are called the way they
are in Raku (aka Perl6). BEGIN is NOT a special subroutine.
BEGIN is a phaser. And it introduces a block. Blocks are not subroutines
(subs). Even tho
The distribution can then also contain
simple tests under t/ and development tests under xt/
Regards,
Richard
On 30/08/2022 2:38 am, ToddAndMargo via perl6-users wrote:
On 8/28/22 15:58, ToddAndMargo via perl6-users wrote:
Hi All,
I am thinking of using
BEGIN {}
to fire up a splash screen
On 8/28/22 15:58, ToddAndMargo via perl6-users wrote:
Hi All,
I am thinking of using
BEGIN {}
to fire up a splash screen (libnotify).
Question: is what happens between the brackets
isolated from the rest of the code? If I set
variable values or declare variables, are they
wiped out
On 8/29/22 13:03, ToddAndMargo via perl6-users wrote:
On 8/28/22 15:58, ToddAndMargo via perl6-users wrote:
Hi All,
I am thinking of using
BEGIN {}
to fire up a splash screen (libnotify).
Question: is what happens between the brackets
isolated from the rest of the code? If I set
On 8/28/22 15:58, ToddAndMargo via perl6-users wrote:
Hi All,
I am thinking of using
BEGIN {}
to fire up a splash screen (libnotify).
Question: is what happens between the brackets
isolated from the rest of the code? If I set
variable values or declare variables, are they
wiped out
ne program.
...
Hi Tom,
The .precomp workaround was never in question!
But there are tines when it is impractical.
...
So lots and lots of compiling that .precomp does not
help me with.
...
More information that you wanted. Sorry.
No reason to apologize, Todd. I had forgotten how much you wer
> Hi Tom,
> The .precomp workaround was never in question!
> But there are tines when it is impractical.
...
> So lots and lots of compiling that .precomp does not
> help me with.
...
> More information that you wanted. Sorry.
No reason to apologize, Todd. I had forgotten how much you
speedup you may get by using
the precompiled-module "trick" for most of your 11,000-line program.
-Tom
Hi Tom,
The .precomp workaround was never in question!
But there are tines when it is impractical.
Most of the programs I have written for customers
run in the background (raku
On Mon, Aug 29, 2022 at 10:29 AM ToddAndMargo via perl6-users <
perl6-us...@perl.org> wrote:
...
> Does the compiler make a full pass through
> the code before firing off the BEGIN routine
NO.
And I think you may be surprised how much speedup you may get by using the
precompiled-module "trick" fo
On 8/29/22 00:44, Elizabeth Mattijsen wrote:
Question, would BEGIN go at the top or the bottom
of my code? Seems the compiler would hit it first
at the top, but I do not know if it makes a full
pass of everything before firing off the BEGIN.
BEGIN runs at *compile* time.
This means that
1 - 100 of 1020 matches
Mail list logo