Re: Tip: Rakudo-2023.05.01 upgrade issue

2023-06-11 Thread ToddAndMargo via perl6-users
On Sun, Jun 11, 2023 at 1:26 AM ToddAndMargo via perl6-users mailto:perl6-users@perl.org>> wrote: Hi All, Fedora 37 RakudoPkgFedora37-2023.05.01.x86_64.rpm https://github.com/nxadm/rakudo-pkg/releases <https://github.com/nxadm/rakudo-pkg/releases> I ju

Tip: Rakudo-2023.05.01 upgrade issue

2023-06-11 Thread ToddAndMargo via perl6-users
Hi All, Fedora 37 RakudoPkgFedora37-2023.05.01.x86_64.rpm https://github.com/nxadm/rakudo-pkg/releases I just up graded to 2023.05.01 and nothing pl6 worked. Upon investigation: $ GetUpdates.pl6 ===SORRY!=== Error while compiling /home/linuxutil/./GetUpdates.pl6 Failed to create directory

Re: my zenity adventure

2023-03-27 Thread ToddAndMargo via perl6-users
On 27 March 2023 01:35:39 CEST, ToddAndMargo via perl6-users wrote: Hi All, Fedora 36 zenity-3.43.0-3.fc37.x86_64 rakudo-pkg-2022.7.0-03.x86_64 My adventure with a zenity call! I just worked around a problem with a call to zenity: Note: zenity can

my zenity adventure

2023-03-26 Thread ToddAndMargo via perl6-users
Hi All, Fedora 36 zenity-3.43.0-3.fc37.x86_64 rakudo-pkg-2022.7.0-03.x86_64 My adventure with a zenity call! I just worked around a problem with a call to zenity: Note: zenity can not resolve Raku's "\n", so you have to preformat the "text" field with "sprintf". $NotifyStr = sprintf

Re: New doc site

2023-02-28 Thread ToddAndMargo via perl6-users
On Tue, Feb 28, 2023 at 1:12 AM ToddAndMargo via perl6-users wrote: http://raku.docs.org At first glance, this looks like a treasure trove. I did not see anything about GUI programming, but I did not look that close. On 2/28/23 16:32, Will Coleda wrote: > Sorry, there is no

Re: New doc site

2023-02-27 Thread ToddAndMargo via perl6-users
http://raku.docs.org At first glance, this looks like a treasure trove. I did not see anything about GUI programming, but I did not look that close.

Re: Name of calling program

2022-12-07 Thread ToddAndMargo via perl6-users
On 12/7/22 09:06, Gianni Ceccarelli wrote: On Wed, 7 Dec 2022 08:58:19 -0800 ToddAndMargo via perl6-users wrote: When I am in a module (pm6), is there one of those fancy system variables that will tell me the name of calling (pl6) program? https://docs.raku.org/language/variables#index

Name of calling program

2022-12-07 Thread ToddAndMargo via perl6-users
Hi All, When I am in a module (pm6), is there one of those fancy system variables that will tell me the name of calling (pl6) program? Many thanks, -T

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 condi

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 ~~

Re: When to use .new?

2022-12-07 Thread ToddAndMargo via perl6-users
On 12/5/22 11:19, Ralph Mellor wrote: I forgot to mention one other shortcut that is always available if you do have to use `.new` (which is the case for most types). You can write: ``` my $foo = 42; ``` The `42` on the RHS of the `=` is the shortest way to create an integer value corresponding

"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

Re: pointer confusion

2022-12-06 Thread ToddAndMargo via perl6-users
On 12/6/22 15:40, ToddAndMargo via perl6-users wrote: On 12/5/22 16:35, Ralph Mellor wrote: On Mon, Dec 5, 2022 at 10:20 PM ToddAndMargo via perl6-users wrote: use NativeCall; my Pointer $foo .= new: 42; say $foo;   # NativeCall::Types::Pointer<0x2a> print $foo; # NativeCall::Types::P

Re: pointer confusion

2022-12-06 Thread ToddAndMargo via perl6-users
On 12/5/22 16:35, Ralph Mellor wrote: On Mon, Dec 5, 2022 at 10:20 PM ToddAndMargo via perl6-users wrote: use NativeCall; my Pointer $foo .= new: 42; say $foo; # NativeCall::Types::Pointer<0x2a> print $foo; # NativeCall::Types::Pointer<5895604297984> `say` concatenates

Re: Raku opens a notepad when executing a .bat

2022-12-06 Thread ToddAndMargo via perl6-users
On 12/6/22 07:31, ToddAndMargo via perl6-users wrote: On 12/6/22 01:44, ToddAndMargo via perl6-users wrote: Hi All, Windows Pro Chromebook Edition 22H2  (W11) raku -v  Welcome to RakudoΓäó v2022.07. When ever I run the following, it opens a Notepad with the text of the calling raku program

Re: Raku opens a notepad when executing a .bat

2022-12-06 Thread ToddAndMargo via perl6-users
On 12/6/22 01:44, ToddAndMargo via perl6-users wrote: Hi All, Windows Pro Chromebook Edition 22H2  (W11) raku -v  Welcome to RakudoΓäó v2022.07. When ever I run the following, it opens a Notepad with the text of the calling raku program. raku -e "use lib '.'; use NativeWinUtils :RunCmd

Re: Raku opens a notepad when executing a .bat

2022-12-06 Thread ToddAndMargo via perl6-users
On 12/6/22 03:31, ToddAndMargo via perl6-users wrote: This is obviously not a raku issue, but a Windows issue. I think I misspoke. I do believe qqx is trying to run the sub from the module. I will put together a few tests in a couple of days to see if I can get it to repeat, then I will tag

Re: Raku opens a notepad when executing a .bat

2022-12-06 Thread ToddAndMargo via perl6-users
On 12/6/22 03:31, ToddAndMargo via perl6-users wrote: On 12/6/22 03:13, ToddAndMargo via perl6-users wrote: On 12/6/22 02:40, Ralph Mellor wrote: Please confirm that: * Entering `ls` at the command line prompt does what it says    on the tin, it does not open notepad. * A Raku program

Re: Raku opens a notepad when executing a .bat

2022-12-06 Thread ToddAndMargo via perl6-users
On 12/6/22 03:13, ToddAndMargo via perl6-users wrote: On 12/6/22 02:40, Ralph Mellor wrote: Please confirm that: * Entering `ls` at the command line prompt does what it says    on the tin, it does not open notepad. * A Raku program that consists of the single line `qqx 'ls'` does    what

Re: Raku opens a notepad when executing a .bat

2022-12-06 Thread ToddAndMargo via perl6-users
are true, then this code: ``` use lib '.'; use NativeWinUtils :RunCmd; say RunCmd(Q[ls]); ``` is NOT running the code you showed starting `sub RunCmd`. -- raiph On Tue, Dec 6, 2022 at 9:44 AM ToddAndMargo via perl6-users wrote: Hi All, Windows Pro Chromebook Edition 22H2 (W11) raku -v Welcome

Raku opens a notepad when executing a .bat

2022-12-06 Thread ToddAndMargo via perl6-users
Hi All, Windows Pro Chromebook Edition 22H2 (W11) raku -v Welcome to RakudoΓäó v2022.07. When ever I run the following, it opens a Notepad with the text of the calling raku program. raku -e "use lib '.'; use NativeWinUtils :RunCmd; say RunCmd(Q[ls]);" This is RunCmd sub RunCmd( Str

Re: pointer confusion

2022-12-05 Thread ToddAndMargo via perl6-users
On 12/5/22 09:25, Ralph Mellor wrote: On Sat, Dec 3, 2022 at 11:44 AM ToddAndMargo via perl6-users wrote: I am confused I think the following is a golf of your confusion: ``` use NativeCall; my Pointer $foo .= new: 42; say $foo; # NativeCall::Types::Pointer<0x2a> print $foo; # Nati

Re: Session ID

2022-12-05 Thread ToddAndMargo via perl6-users
On 12/5/22 09:17, Ralph Mellor wrote: On Mon, Dec 5, 2022 at 9:45 AM ToddAndMargo via perl6-users wrote: Answer 3: https://stackoverflow.com/questions/74665162/how-do-i-assign-the-value-in-carray-that-contains-a-memory-address-to-a-poi#74674303 Håkon Hægland is astonishing good at this stuff

Re: Session ID

2022-12-05 Thread ToddAndMargo via perl6-users
On 11/14/22 12:54, ToddAndMargo via perl6-users wrote: Hi All, Windows 11 22H2 Is there a way to find session ID of the current running program?  Any predefined system variable for that? Many thanks, -T Answer 3: https://stackoverflow.com/questions/74665162/how-do-i-assign-the-value

pointer confusion

2022-12-03 Thread ToddAndMargo via perl6-users
Hi All, NativeCall question: I am confused about how to assign an address to a pointer [1] > use lib '.'; use NativeCall; use NativeConstants Nil [2] > my $x=0xFE45DDCC; 4265991628 [3] > my Pointer $Ptr2Ptr = NativeCall::Types::Pointer[BYTES].new($x);

Tip: use of pointers example

2022-12-01 Thread ToddAndMargo via perl6-users
Hi All, Windows 11 pro 22H2 The following is a test example of the use of pointers for calling Windows DLL's and for copying data out of structures when given a pointer to the structure. Before you tell me there is an easier way to get the computer name out of "GetComputerNameA," this is to

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

When to use .new?

2022-11-30 Thread ToddAndMargo via perl6-users
Hi All, Why can I get away with my Str $x = ""; But I have to use .new here (an other places too) my $ppSession = NativeCall::Types::Pointer.new(); Is there some rule I can follow that let me know when I have to use .new and when I do not? (I am getting tired of figuring it out the

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
Hi All, In the following: use NativeCall; constant BYTE := uint8; constant LPDWORD := uint64;# long pointer to a DWORD constant LPSTR= CArray[BYTE]; # long pointer to a string constant DWORD:= uint32; constant HANDLE = Pointer[void]; sub WTSOpenServerA( #`{

Re: What is this "\t"?

2022-11-29 Thread ToddAndMargo via perl6-users
On 11/29/22 01:13, Francis Grizzly Smit wrote: Personally I never use \name are I hate how it looks, and so far I have never needed it, so unless I can find something it can do that I cannot do any other way, I'll keep on not using it I have seen it use and it was sneaky as all heck. Very

Re: What does this line mean?

2022-11-28 Thread ToddAndMargo via perl6-users
On 11/25/22 19:21, ToddAndMargo via perl6-users wrote: Hi All, I am confused! sub blob-from-pointer(Pointer:D \ptr, Int :$elems!, Blob:U :$type = Buf) is export { What is `Pointer:D \ptr`? Why the `\`? What is `:$elems!`? Why the `:`? Why the `!`? What is `Blob:U :$type = Buf

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

Re: What is this "\t"?

2022-11-28 Thread ToddAndMargo via perl6-users
On 11/28/22 17:40, ToddAndMargo wrote: Sigilless variable https://docs.raku.org/language/glossary#Sigilless_variable  Sigilless variables are actually aliases to the  value it is assigned to them, since they are  not containers. Once you assign a sigilless  variable (using 

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

Re: What is this "\t"?

2022-11-28 Thread ToddAndMargo via perl6-users
On 11/27/22 19:02, Clifton Wood wrote: @ToddAndMargo: These are all explained in the Raku documentation. For advanced users that already know what they are doing and do not need it Long story short: "my \t" -- this is a RAW definition. You can use it to hold types, as in this case. ".of"

What is this "\t"?

2022-11-27 Thread ToddAndMargo via perl6-users
Hi All, On https://github.com/salortiz/NativeHelpers-Blob/blob/master/lib/NativeHelpers/Blob.pm6 Line 96 my \t = ptr.of ~~ void ?? $type.of !! ptr.of; What is `\t`? What of `.of` What is `??`? What is `!!` Yours in confusion. -T

Re: What does this line mean?

2022-11-26 Thread ToddAndMargo via perl6-users
On 11/25/22 21:06, Bruce Gray wrote: On Nov 25, 2022, at 9:21 PM, ToddAndMargo via perl6-users wrote: Hi All, I am confused! The documentation at https://github.com/salortiz/NativeHelpers-Blob would certainly benefit from example code! No examples in the t/ directory use the `blob-from

What does this line mean?

2022-11-25 Thread ToddAndMargo via perl6-users
Hi All, I am confused! sub blob-from-pointer(Pointer:D \ptr, Int :$elems!, Blob:U :$type = Buf) is export { What is `Pointer:D \ptr`? Why the `\`? What is `:$elems!`? Why the `:`? Why the `!`? What is `Blob:U :$type = Buf` What does `Blob:U` mean? What does `:type` mean? Is

Bug in NativeCall

2022-11-24 Thread ToddAndMargo via perl6-users
Fedora 36 rakudo-pkg-2022.7.0-03.x86_64 say $ppSessionInf.deref.WHAT; Internal error: unhandled target type

bug in REPL

2022-11-24 Thread ToddAndMargo via perl6-users
Fedora 36 rakudo-pkg-2022.7.0-03.x86_64 > use NativeCall > $j =6; $k = CArray[uint8].new(0xFF xx $j ); print $j ~ "\n"; Cannot find method 'qast' on object of type NQPMu REPL does not like the $j.

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-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

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

Re: Pointer to bug question

2022-11-23 Thread ToddAndMargo via perl6-users
of the CArray. What type is BYTE, pray tell? - Cliff On Wed, Nov 23, 2022 at 9:08 PM ToddAndMargo via perl6-users mailto:perl6-users@perl.org>> wrote: removing my typos: On 11/23/22 18:22, Clifton Wood wrote: @ToddAndMargo <mailto:toddandma...@zoho.c

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 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
On 11/21/22 05:01, ToddAndMargo via perl6-users wrote: 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

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

Re: What is this handle?

2022-11-21 Thread ToddAndMargo via perl6-users
On Sat, Nov 19, 2022 at 10:13 PM, ToddAndMargo via perl6-users mailto:perl6-users@perl.org>> wrote: Hi All, Any of you familiar with native call? In the following C++ HANDLE WTSOpenServerA( [in] LPSTR pServerName ); Is HANDLE a DWO

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-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

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

What is this handle?

2022-11-19 Thread ToddAndMargo via perl6-users
Hi All, Any of you familiar with native call? In the following C++ HANDLE WTSOpenServerA( [in] LPSTR pServerName ); Is HANDLE a DWORD (32 bit integer)? I just noticed I have HANDLE defined in Raku as constant HANDLE = Pointer[void]; I do believe most C++ pointers are 32

Re: I can't fid my booboo

2022-11-17 Thread ToddAndMargo via perl6-users
On 11/17/22 21:26, ToddAndMargo via perl6-users wrote: > > On Thu, Nov 17, 2022 at 7:25 PM ToddAndMargo via perl6-users > mailto:perl6-users@perl.org>> wrote: > > Hi All, > > I need a second pair of eyes to look at my > code and tell me whe

Re: I can't fid my booboo

2022-11-17 Thread ToddAndMargo via perl6-users
> > On Thu, Nov 17, 2022 at 7:25 PM ToddAndMargo via perl6-users > mailto:perl6-users@perl.org>> wrote: > > Hi All, > > I need a second pair of eyes to look at my > code and tell me where I messed up. > > http://vpaste.net/ngl1h <http://vpast

I can't fid my booboo

2022-11-17 Thread ToddAndMargo via perl6-users
Hi All, I need a second pair of eyes to look at my code and tell me where I messed up. http://vpaste.net/ngl1h raku PopUpTest.pl6 ===SORRY!=== Error while compiling K:\Windows\NtUtil/PopUpTest.pl6 Unable to parse expression in argument list; couldn't find final ')' (corresponding starter was

Re: Exit is going bananas!

2022-11-14 Thread ToddAndMargo via perl6-users
On 11/11/22 21:23, ToddAndMargo via perl6-users wrote: Hi All, Windows 11 Pro 22H2 Rakudo 2022.07 for Windows Is there something about running as an Administrator I need to know about? Rakudo is going bananas with `exit(1)` and plain old `exit` when run as an administrator.  Run as a regular

Session ID

2022-11-14 Thread ToddAndMargo via perl6-users
Hi All, Windows 11 22H2 Is there a way to find session ID of the current running program? Any predefined system variable for that? Many thanks, -T

Re: Anyone code WTSSendMessageA?

2022-11-12 Thread ToddAndMargo via perl6-users
On 11/12/22 12:49, ToddAndMargo via perl6-users wrote: On 11/12/22 10:41, ToddAndMargo via perl6-users wrote: Hi All, I am not looking forward to coding WTSSendMessageA. https://learn.microsoft.com/en-us/windows/win32/api/wtsapi32/nf-wtsapi32-wtssendmessagea Anyone already do this? Many

Re: Anyone code WTSSendMessageA?

2022-11-12 Thread ToddAndMargo via perl6-users
On 11/12/22 10:41, ToddAndMargo via perl6-users wrote: Hi All, I am not looking forward to coding WTSSendMessageA. https://learn.microsoft.com/en-us/windows/win32/api/wtsapi32/nf-wtsapi32-wtssendmessagea Anyone already do this? Many thanks, -T It about killed me, but I got it coded. Note

Anyone code WTSSendMessageA?

2022-11-12 Thread ToddAndMargo via perl6-users
Hi All, I am not looking forward to coding WTSSendMessageA. https://learn.microsoft.com/en-us/windows/win32/api/wtsapi32/nf-wtsapi32-wtssendmessagea Anyone already do this? Many thanks, -T -- ~~ Computers are like air conditioners. They malfunction when

Exit is going bananas!

2022-11-11 Thread ToddAndMargo via perl6-users
Hi All, Windows 11 Pro 22H2 Rakudo 2022.07 for Windows Is there something about running as an Administrator I need to know about? Rakudo is going bananas with `exit(1)` and plain old `exit` when run as an administrator. Run as a regular user it is fine. Cowardly Exiting. Bummer Dude ...

Re: How do I all an interactive command?

2022-11-08 Thread ToddAndMargo via perl6-users
On 11/8/22 15:04, ToddAndMargo via perl6-users wrote: On 11/7/22 17:50, ToddAndMargo via perl6-users wrote: Hi All, I am scratching my head trying to figure out how to gather information fro a RAID controller from Raku for Windows. I need to issue the following commands to the controller's

Re: How do I all an interactive command?

2022-11-08 Thread ToddAndMargo via perl6-users
On 11/7/22 17:50, ToddAndMargo via perl6-users wrote: Hi All, I am scratching my head trying to figure out how to gather information fro a RAID controller from Raku for Windows. I need to issue the following commands to the controller's configuration utility:     hptraidconf     query array

Re: How do I all an interactive command?

2022-11-07 Thread ToddAndMargo via perl6-users
On 11/7/22 17:50, ToddAndMargo via perl6-users wrote: Hi All, I am scratching my head trying to figure out how to gather information fro a RAID controller from Raku for Windows. I need to issue the following commands to the controller's configuration utility:     hptraidconf     query array

How do I all an interactive command?

2022-11-07 Thread ToddAndMargo via perl6-users
Hi All, I am scratching my head trying to figure out how to gather information fro a RAID controller from Raku for Windows. I need to issue the following commands to the controller's configuration utility: hptraidconf query array exit I typically will creating a temporary

Re: regex: how to I pick out items in the middle?

2022-10-30 Thread ToddAndMargo via perl6-users
On 10/30/22 01:24, Elizabeth Mattijsen wrote: Which brings me back to the other of my criticisms of the documentation. The examples are high level users showing off their skills making for a totally useless example for beginners. They should show a simple example and then work up to the show

Re: regex: how to I pick out items in the middle?

2022-10-30 Thread ToddAndMargo via perl6-users
On 10/29/22 19:16, William Michels via perl6-users wrote: In the Raku REPL: $ raku Welcome to Rakudo™ v2022.07. Implementing the Raku® Programming Language v6.d. Built on MoarVM version 2022.07. To exit type 'exit' or '^D' [0] > #beginning Nil [1] > my Str $y="xx"; S/^ x ** 2 /QQ/.say

Re: regex: how to I pick out items in the middle?

2022-10-30 Thread ToddAndMargo via perl6-users
On 10/29/22 22:37, William Michels via perl6-users wrote: On Sat, Oct 29, 2022 at 7:29 PM ToddAndMargo via perl6-users mailto:perl6-users@perl.org>> wrote: >> On Sat, Oct 29, 2022 at 6:46 PM ToddAndMargo via perl6-users >> mailto:perl6-users@perl.org>

Re: regex: how to I pick out items in the middle?

2022-10-29 Thread ToddAndMargo via perl6-users
On Sat, Oct 29, 2022 at 6:46 PM ToddAndMargo via perl6-users mailto:perl6-users@perl.org>> wrote: Hi All, With a regex, how do I pick out items in the middle of the string? Two from the beginning or two from the end? 4] > my Str $y="xx"; $y ~~ s/ $([.

regex: how to I pick out items in the middle?

2022-10-29 Thread ToddAndMargo via perl6-users
Hi All, With a regex, how do I pick out items in the middle of the string? Two from the beginning or two from the end? 4] > my Str $y="xx"; $y ~~ s/ $([.*-2]) "x"/Q/; print $y ~ "\n" ===SORRY!=== Error while compiling: Malformed postfix call --> my Str $y="xx"; $y ~~ s/

Re: how do I do a literal string in the target of a regex?

2022-10-29 Thread ToddAndMargo via perl6-users
On 10/29/22 14:28, ToddAndMargo via perl6-users wrote: On 10/29/22 13:07, Elizabeth Mattijsen wrote: > $ echo "a/b/c/d" | raku -ne 'say .subst("/", Q/\\\/, :g)' > Hi Elizabeth, Thank you for the subst workaround! I created a keep of the subst. Got to lo

Re: how do I do a literal string in the target of a regex?

2022-10-29 Thread ToddAndMargo via perl6-users
On 10/29/22 13:02, ToddAndMargo via perl6-users wrote: Hi All, I am trying to change / into \\\ This works: $ echo "a/b/c/d" | raku -ne 'my $x=$_; $x~~s:g|$(Q[/])|\\|;print $x ~ "\n"' a\\\b\\\c\\\d But this does not: $ echo "a/b/c/d" | r

Re: how do I do a literal string in the target of a regex?

2022-10-29 Thread ToddAndMargo via perl6-users
On 29 Oct 2022, at 23:28, ToddAndMargo via perl6-users wrote: On 29 Oct 2022, at 22:02, ToddAndMargo via perl6-users wrote: Hi All, I am trying to change / into \\\ This works: $ echo "a/b/c/d" | raku -ne 'my $x=$_; $x~~s:g|$(Q[/])|\\|;print $x ~ "\n&

Re: how do I do a literal string in the target of a regex?

2022-10-29 Thread ToddAndMargo via perl6-users
On 29 Oct 2022, at 22:02, ToddAndMargo via perl6-users wrote: Hi All, I am trying to change / into \\\ This works: $ echo "a/b/c/d" | raku -ne 'my $x=$_; $x~~s:g|$(Q[/])|\\|;print $x ~ "\n"' a\\\b\\\c\\\d But this does not: $ echo "a/b/c/d&

how do I do a literal string in the target of a regex?

2022-10-29 Thread ToddAndMargo via perl6-users
Hi All, I am trying to change / into \\\ This works: $ echo "a/b/c/d" | raku -ne 'my $x=$_; $x~~s:g|$(Q[/])|\\|;print $x ~ "\n"' a\\\b\\\c\\\d But this does not: $ echo "a/b/c/d" | raku -ne 'my $x=$_; $x~~s:g|$(Q[/])|Q[\\\]|;print $x ~ "\n"' aQ[\]bQ[\]cQ[\]d How do I

Re: folder size

2022-10-24 Thread ToddAndMargo via perl6-users
On 10/23/22 21:56, ToddAndMargo via perl6-users wrote: On 10/22/22 21:30, ToddAndMargo via perl6-users wrote: Hi All, Does Raku have a folder size command (including sub folders) or is that a system call? Many thanks, -T My final code: sub RunCmd( Str $CommandStr, Bool $EchoOff = False

Re: folder size

2022-10-24 Thread ToddAndMargo via perl6-users
On Sun, Oct 23, 2022 at 9:56 PM ToddAndMargo via perl6-users mailto:perl6-users@perl.org>> wrote: On 10/22/22 21:30, ToddAndMargo via perl6-users wrote: > Hi All, > > Does Raku have a folder size command (including sub > folders) or is

Re: folder size

2022-10-24 Thread ToddAndMargo via perl6-users
On 10/24/22 10:12, ToddAndMargo via perl6-users wrote: On 10/24/22 09:14, Parrot Raiser wrote: This https://raku.land/zef:lizmat/path-utils might be what you're seeking. (So new the electrons have barely settled into their new orbits.) Not for this instance, but I can see where

Re: folder size

2022-10-24 Thread ToddAndMargo via perl6-users
On 10/24/22 09:14, Parrot Raiser wrote: This https://raku.land/zef:lizmat/path-utils might be what you're seeking. (So new the electrons have barely settled into their new orbits.) Not for this instance, but I can see where this will be really valuable in the future! Thank you!

Re: Rakudo for W7?

2022-10-24 Thread ToddAndMargo via perl6-users
On 10/20/22 20:37, ToddAndMargo via perl6-users wrote: Hi All, Where can I download the latest Rakudo Star that supports 64 bit Windows 7? Many thanks, -T I walked through them one at a time to find where they put the artificial block for Windows 7. It was on their last iteration

Re: folder size

2022-10-23 Thread ToddAndMargo via perl6-users
On 10/22/22 21:30, ToddAndMargo via perl6-users wrote: Hi All, Does Raku have a folder size command (including sub folders) or is that a system call? Many thanks, -T My final code: sub RunCmd( Str $CommandStr, Bool $EchoOff = False ) { my Str $BatFile = $PathIAm ~ ".bat";

Re: Aw: Rakudo for W7?

2022-10-23 Thread ToddAndMargo via perl6-users
On 10/23/22 15:14, Ralph Mellor wrote: On Sun, Oct 23, 2022 at 1:18 AM ToddAndMargo via perl6-users wrote: Which goes back to my question. What is the last one they published that supports Windows 7? I would say there isn't one, where "supports" is a present tense meaning. You

Re: Aw: Rakudo for W7?

2022-10-23 Thread ToddAndMargo via perl6-users
On Sat, Oct 22, 2022 at 8:18 PM, ToddAndMargo via perl6-users mailto:perl6-users@perl.org>> wrote: > Gesendet: Freitag, 21. Oktober 2022 um 05:37 Uhr > Von: "ToddAndMargo via perl6-users" mailto:perl6-users@perl.org>> > An: "perl

Re: Aw: Rakudo for W7?

2022-10-23 Thread ToddAndMargo via perl6-users
date where Windows 7 support ended. That seems like a fair method. On Sat, Oct 22, 2022 at 8:18 PM, ToddAndMargo via perl6-users mailto:perl6-users@perl.org>> wrote: > Gesendet: Freitag, 21. Oktober 2022 um 05:37 Uhr > Von: "ToddAndMargo via perl6

Re: How do I print the last three lines in a file?

2022-10-23 Thread ToddAndMargo via perl6-users
On 10/22/22 23:26, ToddAndMargo via perl6-users wrote: On 10/22/22 22:33, Bruce Gray wrote: dir . /s /A:-D /d /a  | raku -e "say lines[*-2].words[2]" It is pretty !  I like it.  Thank you! I just verified it works on Windows 7, 10, and 11 You have to be careful to double check.

Re: How do I print the last three lines in a file?

2022-10-23 Thread ToddAndMargo via perl6-users
On 10/22/22 22:33, Bruce Gray wrote: dir . /s /A:-D /d /a | raku -e "say lines[*-2].words[2]" It is pretty ! I like it. Thank you!

Re: folder size

2022-10-23 Thread ToddAndMargo via perl6-users
On 10/22/22 22:46, Bruce Gray wrote: On Oct 22, 2022, at 11:30 PM, ToddAndMargo via perl6-users wrote: Hi All, Does Raku have a folder size command (including sub folders) or is that a system call? There are system calls to get sizes of individual files (Raku IO objects provide

folder size

2022-10-22 Thread ToddAndMargo via perl6-users
Hi All, Does Raku have a folder size command (including sub folders) or is that a system call? Many thanks, -T -- ~~ Computers are like air conditioners. They malfunction when you open windows ~~

How do I print the last three lines in a file?

2022-10-22 Thread ToddAndMargo via perl6-users
Hi All, Is there a way to print only the last three lines in a long file (full on \n's). In Windows, I am trying to such the last the lines is > dir /s /A:-D /d /a ... Total Files Listed: 13671 File(s) 3,265,285,462 bytes 3917 Dir(s) 18,406,518,784 bytes free

Re: Aw: Rakudo for W7?

2022-10-22 Thread ToddAndMargo via perl6-users
Gesendet: Freitag, 21. Oktober 2022 um 05:37 Uhr Von: "ToddAndMargo via perl6-users" An: "perl6-users" Betreff: Rakudo for W7? Hi All, Where can I download the latest Rakudo Star that supports 64 bit Windows 7? Many thanks, -T On 10/21/22 08:48, no...@ist-einmalig.de wr

Rakudo for W7?

2022-10-20 Thread ToddAndMargo via perl6-users
Hi All, Where can I download the latest Rakudo Star that supports 64 bit Windows 7? Many thanks, -T -- ~~ Computers are like air conditioners. They malfunction when you open windows ~~

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 "compi

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

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

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

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

Re: sprintf and print question

2022-09-02 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&

<    1   2   3   4   5   6   7   8   9   10   >