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
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-users@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
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,
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
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
$ 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
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,
a bug in say.
From: ToddAndMargo via perl6-users
Sent: Monday, December 11, 2023 3:24 PM
To: perl6-users@perl.org
Subject: Re: .contains question
CAUTION - EXTERNAL:
> "so" will collapse the junction into a Bool.
> "say" will append a \n for
"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" ||
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
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
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?
> 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
a list operator without the need
>> for
>> parentheses:
>>
>> unlink "alpha", "beta", "gamma"
>> or gripe(), next LINE;
>>
>> With the C-style operators that would have been wri
es:
>
> unlink "alpha", "beta", "gamma"
> or gripe(), next LINE;
>
> With the C-style operators that would have been written like this:
>
> unlink("alpha", "beta", "gamma")
>
pha", "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 Hainsworth
Cc: perl
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
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
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
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
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
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
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
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
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
On Sun, Nov 20, 2022 at 3:48 AM ToddAndMargo via perl6-users
mailto:perl6-users@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
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
t 9:46 PM ToddAndMargo via perl6-users <
perl6-users@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
gt; 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
2022 at 9:08 PM ToddAndMargo via perl6-users <
perl6-users@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.
>
> How d
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
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
On Sun, Nov 20, 2022 at 3:48 AM ToddAndMargo via perl6-users
mailto:perl6-users@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
@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
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
s one module, which then may
> use other modules, all of them in the same directory, under the lib/
> subdirectory. The distribution can then also contain simple tests under t/
> and development tests under xt/
>
> Regards,
>
> Richard
>
> On 30/08/2022 2:38 am, ToddAndM
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
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
ck it.
>
> 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
--
~~
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
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!
in question. Am I missing something?
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
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 <
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
On Fri, 2 Sept 2022 at 12:37, ToddAndMargo via perl6-users <
perl6-users@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
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
On Wed, 31 Aug 2022, 00:59 ToddAndMargo via perl6-users, <
perl6-users@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
Margo 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
variable values or declare
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
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 (r
On Mon, Aug 29, 2022 at 10:29 AM ToddAndMargo via perl6-users <
perl6-users@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"
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
> 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 anything before the BEG
On 8/28/22 19:11, Bruce Gray wrote:
On Aug 28, 2022, at 5:58 PM, 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
> On Aug 28, 2022, at 5:58 PM, 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
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, etc.?
Many thanks,
-T
On 6/19/22 03:06, ToddAndMargo via perl6-users wrote:
On 6/19/22 00:33, ToddAndMargo via perl6-users wrote:
Hi All,
I have a string:
> my Str $x = "1BB67AE85A";
1BB67AE85A
which has the hexadecimal values I want to
add to a buffer:
> my buf8 $y = buf8.new($x.base(16));
No such method
On 6/19/22 00:33, ToddAndMargo via perl6-users wrote:
Hi All,
I have a string:
> my Str $x = "1BB67AE85A";
1BB67AE85A
which has the hexadecimal values I want to
add to a buffer:
> my buf8 $y = buf8.new($x.base(16));
No such method 'base' for invocant of type 'Str'. Did you mean any of
On 6/19/22 00:33, ToddAndMargo via perl6-users wrote:
Hi All,
I have a string:
> my Str $x = "1BB67AE85A";
1BB67AE85A
which has the hexadecimal values I want to
add to a buffer:
> my buf8 $y = buf8.new($x.base(16));
No such method 'base' for invocant of type 'Str'. Did you mean any of
Hi All,
I have a string:
> my Str $x = "1BB67AE85A";
1BB67AE85A
which has the hexadecimal values I want to
add to a buffer:
> my buf8 $y = buf8.new($x.base(16));
No such method 'base' for invocant of type 'Str'. Did you mean any of
these: 'Bag', 'Date', 'Hash', 'are', 'asec', 'hash', 'take'?
Typo.
Should have been:
append to Buf question
And in my Keeper, I keep typing "bugger" instead
of "buffer". Can't win.
On 6/18/22 22:58, Bruce Gray wrote:
If all you want is to append 0xBB to $y, either of these will work:
$y ~= Buf.new(0xBB);
$y.append(0xBB);
Did not realize I could use buf new like that. Thank you!
Append numbers to a buffer:
> $x
Buf:0x<41 42 43 44>
> $x.append( 0xDD );
On 6/18/22 22:58, Bruce Gray wrote:
From just looking at your code, I am not clear on what you are trying to do.
I am updating my Keeper on buffers. I have four of them
that are a mess and I an going to consolidate them into
a single .ODT (open document text) file with an index.
> On Jun 18, 2022, at 11:13 PM, ToddAndMargo via perl6-users
> wrote:
>
> Hi All,
>
> What am I doing wrong here:
From just looking at your code, I am not clear on what you are trying to do.
> > my Buf $y = Buf.new( 0xFA xx 10);
> Buf:0x
>
> > $y ~= 0xBB.encode.Buf;
> Buf:0x
>
> I got
On 6/18/22 21:13, ToddAndMargo via perl6-users wrote:
Hi All,
What am I doing wrong here:
> my Buf $y = Buf.new( 0xFA xx 10);
Buf:0x
> $y ~= 0xBB.encode.Buf;
Buf:0x
I got three entries (31 38 37) instead of one (0xBB)
Some more goofing around:
> $y ~= 0xBB;
Stringification of a Buf is
On 6/18/22 22:12, ToddAndMargo via perl6-users wrote:
What am I doing wrong here too?
my $d = buf8.new( 0xDE..0xDB );
Buf[uint8]:0x<>
Not sure why the above did not work, but this does:
Presalt with swept entries:
> my buf8 $e = buf8.new(0x5..0x8);
Buf[uint8]:0x<05 06 07 08>
> my
What am I doing wrong here too?
my $d = buf8.new( 0xDE..0xDB );
Buf[uint8]:0x<>
--
~~
Computers are like air conditioners.
They malfunction when you open windows
~~
Hi All,
What am I doing wrong here:
> my Buf $y = Buf.new( 0xFA xx 10);
Buf:0x
> $y ~= 0xBB.encode.Buf;
Buf:0x
I got three entries (31 38 37) instead of one (0xBB)
Some more goofing around:
> $y ~= 0xBB;
Stringification of a Buf is not done with 'Str'. The 'decode' method
should be used
On 6/11/22 02:28, ToddAndMargo via perl6-users wrote:
On 6/9/22 22:54, ToddAndMargo via perl6-users wrote:
Hi All,
I can easily get away with this in Modula2, but
how can I do this with Raku?
I wish to create a single variable that can be
manipulated in two ways:
1) as a fixed length string
> On Jun 11, 2022, at 4:41 AM, ToddAndMargo via perl6-users
> wrote:
>
> Hi All,
>
> In the following paper on Big Root:
>
> https://newbedev.com/how-can-i-set-the-level-of-precision-for-raku-s-sqrt
>
>
> > use BigRoot;
> > BigRoot.precision = 7;
> > say (BigRoot.newton's-sqrt:
Hi All,
In the following paper on Big Root:
https://newbedev.com/how-can-i-set-the-level-of-precision-for-raku-s-sqrt
> use BigRoot;
> BigRoot.precision = 7;
> say (BigRoot.newton's-sqrt: 2;).base(10)
1.4142136
> say (BigRoot.newton's-sqrt: 2;).base(16)
1.6A09E7
That is a base(10) precision.
1 - 100 of 657 matches
Mail list logo