Re: Q[] question

2025-01-13 Thread ToddAndMargo via perl6-users
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

Re: Q[] question

2025-01-13 Thread Elizabeth Mattijsen
> 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

Re: Q[] question

2025-01-11 Thread ToddAndMargo via perl6-users
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

Re: Q[] question

2025-01-11 Thread Kevin Pye
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

Q[] question

2025-01-11 Thread ToddAndMargo via perl6-users
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

Re: oop pre salt question

2024-12-16 Thread Elizabeth Mattijsen
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

Re: oop pre salt question

2024-12-16 Thread ToddAndMargo via perl6-users
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?

Re: oop pre salt question

2024-12-16 Thread ToddAndMargo via perl6-users
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

Re: oop pre salt question

2024-12-16 Thread Elizabeth Mattijsen
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

oop pre salt question

2024-12-16 Thread ToddAndMargo via perl6-users
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",

Re: Bug reporting etiquette question

2024-11-19 Thread ToddAndMargo via perl6-users
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

Re: Bug reporting etiquette question

2024-11-19 Thread Will Coleda
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

Bug reporting etiquette question

2024-11-15 Thread ToddAndMargo via perl6-users
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

Re: print in purple question

2024-11-09 Thread Brian Duggan
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'

Re: print in purple question

2024-11-05 Thread Bruce Gray
> 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

Re: print in purple question

2024-11-04 Thread ToddAndMargo via perl6-users
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

Re: print in purple question

2024-11-03 Thread ToddAndMargo via perl6-users
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

print in purple question

2024-11-03 Thread ToddAndMargo via perl6-users
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

for what's worth: a raku solution for stackexchange question

2024-10-09 Thread Marc Chantreux
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

Re: Array remove duplicates question

2024-05-06 Thread ToddAndMargo via perl6-users
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

Re: Array remove duplicates question

2024-05-06 Thread yary
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: > > >

Re: Array remove duplicates question

2024-05-06 Thread ToddAndMargo via perl6-users
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

Re: Array remove duplicates question

2024-05-06 Thread ToddAndMargo via perl6-users
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

Re: Array remove duplicates question

2024-05-06 Thread Elizabeth Mattijsen
$ 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

Array remove duplicates question

2024-05-05 Thread ToddAndMargo via perl6-users
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

Re: -c question

2024-02-06 Thread ToddAndMargo via perl6-users
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

Re: -c question

2024-02-06 Thread ToddAndMargo via perl6-users
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

Re: -c question

2024-02-06 Thread Bruce Gray
> 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/

Re: -c question

2024-02-06 Thread Elizabeth Mattijsen
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, >>>

Re: -c question

2024-02-06 Thread ToddAndMargo via perl6-users
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!===

Re: -c question

2024-02-06 Thread Elizabeth Mattijsen
$ 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

-c question

2024-02-05 Thread ToddAndMargo via perl6-users
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 ~~

Re: .contains question

2023-12-11 Thread ToddAndMargo via perl6-users
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,

Re: .contains question

2023-12-11 Thread Andy Bach
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 \

Re: .contains question

2023-12-11 Thread ToddAndMargo via perl6-users
"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

Re: .contains question

2023-12-11 Thread Elizabeth Mattijsen
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: >

Re: .contains question

2023-12-10 Thread ToddAndMargo via perl6-users
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

Re: .contains question

2023-12-10 Thread Elizabeth Mattijsen
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

.contains question

2023-12-10 Thread ToddAndMargo via perl6-users
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

Re: A question on AND

2023-07-01 Thread ToddAndMargo via perl6-users
> 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

Re: A question on AND

2023-06-30 Thread Andy Bach
;> 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

Re: A question on AND

2023-06-30 Thread yary
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

Re: A question on AND

2023-06-30 Thread Andy Bach
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

Re: A question on AND

2023-06-30 Thread Vadim Belman
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' " >

Re: A question on AND

2023-06-30 Thread yary
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

Re: A question on AND

2023-06-30 Thread Richard Hainsworth
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

A question on AND

2023-06-29 Thread ToddAndMargo via perl6-users
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

Re: "returns" question

2022-12-07 Thread ToddAndMargo via perl6-users
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

Re: "returns" question

2022-12-07 Thread ToddAndMargo via perl6-users
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 ~~

"returns" question

2022-12-07 Thread ToddAndMargo via perl6-users
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

Re: NativeCall and pointers question

2022-11-30 Thread ToddAndMargo via perl6-users
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

Re: NativeCall and pointers question

2022-11-30 Thread ToddAndMargo via perl6-users
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

NativeCall and pointers question

2022-11-30 Thread ToddAndMargo via perl6-users
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

Re: Pointer to bug question

2022-11-28 Thread ToddAndMargo via perl6-users
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

Re: Pointer to bug question

2022-11-28 Thread ToddAndMargo via perl6-users
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

Re: Pointer to bug question

2022-11-27 Thread Clifton Wood
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

Re: NativeCall pointer question?

2022-11-24 Thread ToddAndMargo via perl6-users
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

Re: Pointer to bug question

2022-11-24 Thread ToddAndMargo via perl6-users
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

Re: Pointer to bug question

2022-11-23 Thread Clifton Wood
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). > >>&

Re: Pointer to bug question

2022-11-23 Thread ToddAndMargo via perl6-users
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

Re: Pointer to bug question

2022-11-23 Thread ToddAndMargo via perl6-users
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 ~~

Re: Pointer to bug question

2022-11-23 Thread ToddAndMargo via perl6-users
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

Re: Pointer to bug question

2022-11-23 Thread Clifton Wood
>> 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

Re: Pointer to bug question

2022-11-23 Thread Clifton Wood
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. > >

Re: Pointer to bug question

2022-11-23 Thread ToddAndMargo via perl6-users
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

Pointer to bug question

2022-11-23 Thread ToddAndMargo via perl6-users
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

Re: NativeCall C++ structure question

2022-11-21 Thread ToddAndMargo via perl6-users
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?

NativeCall C++ structure question

2022-11-21 Thread ToddAndMargo via perl6-users
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

Re: NativeCall pointer question?

2022-11-20 Thread ToddAndMargo via perl6-users
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

Re: NativeCall pointer question?

2022-11-20 Thread Clifton Wood
@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

NativeCall pointer question?

2022-11-20 Thread ToddAndMargo via perl6-users
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

Re: BEGIN {} question

2022-09-10 Thread rir
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

Re: BEGIN {} question

2022-09-04 Thread ToddAndMargo via perl6-users
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,

Re: BEGIN {} question

2022-09-04 Thread Ralph Mellor
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

Re: BEGIN {} question

2022-09-03 Thread ToddAndMargo via perl6-users
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

Re: BEGIN {} question

2022-09-02 Thread ToddAndMargo via perl6-users
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

Re: BEGIN {} question

2022-09-02 Thread Elizabeth Mattijsen
. > > 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

Re: BEGIN {} question

2022-09-02 Thread ToddAndMargo via perl6-users
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

Re: BEGIN {} question

2022-09-02 Thread ToddAndMargo via perl6-users
Found something interesting $ raku -c GetUpdates.pl6 Syntax OK Will execute the BEGIN {}, not just syntax check it.

Re: sprintf and print question

2022-09-02 Thread ToddAndMargo via perl6-users
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

Re: sprintf and print question

2022-09-01 Thread ToddAndMargo via perl6-users
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

Re: BEGIN {} question

2022-09-01 Thread ToddAndMargo via perl6-users
am in question. Am I missing something?

Re: sprintf and print question

2022-09-01 Thread William Michels via perl6-users
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

Re: BEGIN {} question

2022-09-01 Thread Andinus via perl6-users
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

Re: sprintf and print question

2022-09-01 Thread Andinus 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 signature.as

Re: sprintf and print question

2022-09-01 Thread Norman Gaywood
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

sprintf and print question

2022-09-01 Thread ToddAndMargo via perl6-users
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

Re: BEGIN {} question

2022-09-01 Thread ToddAndMargo via perl6-users
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

Re: BEGIN {} question

2022-09-01 Thread ToddAndMargo via perl6-users
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

Re: BEGIN {} question

2022-09-01 Thread Richard Hainsworth
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

Re: BEGIN {} question

2022-08-30 Thread ToddAndMargo via perl6-users
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

Re: BEGIN {} question

2022-08-30 Thread Richard Hainsworth
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

Re: BEGIN {} question

2022-08-29 Thread ToddAndMargo via perl6-users
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

Re: BEGIN {} question

2022-08-29 Thread ToddAndMargo via perl6-users
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

Re: BEGIN {} question

2022-08-29 Thread ToddAndMargo via perl6-users
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

Re: BEGIN {} question

2022-08-29 Thread ToddAndMargo via perl6-users
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

Re: BEGIN {} question

2022-08-29 Thread Tom Browder
> 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

Re: BEGIN {} question

2022-08-29 Thread ToddAndMargo via perl6-users
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

Re: BEGIN {} question

2022-08-29 Thread Tom Browder
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

Re: BEGIN {} question

2022-08-29 Thread ToddAndMargo via perl6-users
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   2   3   4   5   6   7   8   9   10   >