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/20/22

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 Clifton Wood
@ToddAndMargo I'm about to go to sleep for the night. I thought I sent you a link to a role that someone gave me for solving this problem. Please check out this role . Please feel free to download the entire file

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
@ToddAndMargo -- Also, Pointer cannot deref a Pointer, which I think is the real error. On Wed, Nov 23, 2022 at 9:21 PM Clifton Wood wrote: > @ToddAndMargo - Did you try my suggestion with > GLib::Roles::TypedBuffer? > > The "unhandled target type" occurs when NativeCall can't figure out how

Re: Pointer to bug question

2022-11-23 Thread Clifton Wood
@ToddAndMargo - Did you try my suggestion with GLib::Roles::TypedBuffer? The "unhandled target type" occurs when NativeCall can't figure out how to deref the referenced value. In this case, this would be the BYTE of the CArray. What type is BYTE, pray tell? - Cliff On Wed, Nov 23, 2022 at

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 DWORD (32

Re: What is this handle?

2022-11-21 Thread yary
Handle is a pointer and you can treat it as such. A handle is a pointer to another pointer! it has different uses but basically it is a pointer. Most pointers are a memory address of a value like a number or string, a handle is a memory address of a pointer (another address) to one of those. On

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/20/22

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

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 where I messed up. > >

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 > > raku PopUpTest.pl6

Re: I can't fid my booboo

2022-11-17 Thread William Michels via perl6-users
Gee Todd, I don't know. 167-169: Maybe Raku doesn't like the `(` parens-enclosed signature `)` spread out over three lines? That's my best guess for now. Try those three lines all on one line and tell us how you go. Best Regards, Bill On Thu, Nov 17, 2022 at 7:25 PM ToddAndMargo via

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

The SF Perl Raku Study Group, 11/20 at 1pm PDT

2022-11-17 Thread Joseph Brenner
"They're all like 20-year old single Silicon Valley men, of course they're afraid of commitment." -- Matt S. Trout, on the pletheroa of Javascript libraries "ES6: Almost an Acceptable Perl5?" (2017) The Raku Study Group: An informal meeting: drop by when you can, show us what you've got,

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: How in Raku can a symlink be edited to a new target, if the target is a directory.

2022-11-07 Thread Richard Hainsworth
Ignore this message. It turns out I had set up my file structure incorrectly, so the description below is wrong and the problem is elsewhere. Raku handles a symlink to a directory correctly. On 07/11/2022 9:55 am, Richard Hainsworth wrote: I want - in a Raku program - update a symlink from

How in Raku can a symlink be edited to a new target, if the target is a directory.

2022-11-07 Thread Richard Hainsworth
I want - in a Raku program - update a symlink from 'plug-v1' to 'plug-v2', where both plug-v1 and plug-v2 are sub-directories of 'src'. The symlink is 'plug'. I am using Ubuntu. First time I create symlink with 'src/plug-v1'.IO.symlink( 'plug' ); If now I want to change the link, then the

The SF Perl Raku Study Group, 10/06 at 1pm PDT

2022-11-02 Thread Joseph Brenner
"The FSF software distribution has added a third tape. The old Compiler tape has been split into a Languages and a Utilities tape. Some software has also moved from the Emacs tape to the other two tapes ..." --"GNU's Bulletin" (1992) The Raku Study Group November 6, 2022 1pm in California, 9pm

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 Elizabeth Mattijsen
> 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 off stuff. On that note, OOC, what

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 William Michels via perl6-users
On Sat, Oct 29, 2022 at 7:29 PM ToddAndMargo via perl6-users < perl6-users@perl.org> wrote: > >> 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

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/ $([.*-2]) "x"/Q/; print

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

2022-10-29 Thread William Michels via perl6-users
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 given $y; QQ [1] > #inner Nil [2] > my Str $y="xx"; 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 love Raku. 101 ways of doing

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" | raku -ne 'my $x=$_;

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"' a\\\b\\\c\\\d

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

2022-10-29 Thread Elizabeth Mattijsen
/ 'literal string in target' / > 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: >>>

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" | raku -ne 'my $x=$_;

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 that a system call? > >

Re: folder size

2022-10-24 Thread William Michels via perl6-users
Hi Todd, Thanks for the code! Unfortunately I see this error: Variable '$PathIAm' is not declared. Perhaps you forgot a 'sub' if this was intended to be part of a signature? at -:3 --> [32mmy Str $BatFile = [33m⏏ [31m$PathIAm ~ ".bat"; [0m On Sun, Oct 23, 2022 at 9:56 PM ToddAndMargo

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 this will be

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: folder size

2022-10-24 Thread Parrot Raiser
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.)

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 that

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"; my Str

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. Your question

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: "perl6-users" mailto:perl6-users@perl.org>> >

Re: Aw: Rakudo for W7?

2022-10-23 Thread Ralph Mellor
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. Your question is analogous to asking what is the

Re: Aw: Rakudo for W7?

2022-10-23 Thread ToddAndMargo via perl6-users
On Sun, Oct 23, 2022 at 9:32 AM yary > wrote: I interpreted the previous email as, here is the last date that we know Windows 7 was supported. And here is an archive that goes way back in time. find the listing in the archive that is close to that date

Re: Aw: Rakudo for W7?

2022-10-23 Thread Clifton Wood
I would try these (in this order): 2020.05 - https://rakudo.org/dl/star/rakudo-star-2020.05.1-01-win-x86_64-(JIT).msi.asc 2020.01 - https://rakudo.org/dl/star/rakudo-star-2020.01-01-win-x86_64-(JIT).msi 2019.03 - https://rakudo.org/dl/star/rakudo-star-2019.03-01-win-x86_64-(JIT).msi I would

Re: Aw: Rakudo for W7?

2022-10-23 Thread yary
I interpreted the previous email as, here is the last date that we know Windows 7 was supported. And here is an archive that goes way back in time. find the listing in the archive that is close to that date where Windows 7 support ended. That seems like a fair method. On Sat, Oct 22, 2022 at 8:18

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

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 the

Re: folder size

2022-10-22 Thread Bruce Gray
> 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 the same function via the

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

2022-10-22 Thread Bruce Gray
> On Oct 22, 2022, at 11:46 PM, ToddAndMargo via perl6-users > wrote: > > On 10/22/22 21:11, Bruce Gray wrote: >>> On Oct 22, 2022, at 10:28 PM, ToddAndMargo via perl6-users >>> wrote: >>> >>> Hi All, >>> >>> Is there a way to print only the last three lines >>> in a long file (full on

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

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

2022-10-22 Thread Bruce Gray
> On Oct 22, 2022, at 10:28 PM, ToddAndMargo via perl6-users > wrote: > > 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: >

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 wrote: > Hi. > >

The SF Perl Raku Study Group, 10/23 at 1pm PDT

2022-10-21 Thread Joseph Brenner
"None of us can fully realize what the minds of corporations are, any more than one of my brain-cells can know what the whole brain is thinking." -- C. S. Peirce, "Man's Glassy Essence" (1892) The Raku Study Group October 23, 2022 1pm in California, 9pm in the UK Zoom

Aw: Rakudo for W7?

2022-10-21 Thread notna
Hi.   https://www.microsoft.com/en-us/windows/end-of-support ==> Windows7 support ended January, 14 2020 https://rakudo.org/downloads/star offers Star Bundles back to 2010.07   What am I missing? Regards  Anton   Gesendet: Freitag, 21. Oktober 2022 um 05:37 Uhr Von: "ToddAndMargo via

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

SOS: Being Ignored is not the worst. Neither is loss of innocence.

2022-10-19 Thread Maneesh D. Sud
I told Larry as best as I could that I was the target of gynecide and hatred. I still have no legal representation or qualified doctor. The storm drain indicates that someone got a MAP and the building with Logistics indicates that I was heard. I did get the weird looking speaker and I already

Re: Problem defining factorial operator in .rakumod file

2022-10-19 Thread Brian Duggan
On Friday, October 14, Bruce Gray wrote: > because the `~` tilde character is not special to Raku. > Instead of: > use lib '~/Documents/myRaku/gitHub/SequenceHelper/lib'; > , you need either of these: > use lib "%*ENV/Documents/myRaku/gitHub/SequenceHelper/lib"; > use lib %*ENV ~

Re: Problem defining factorial operator in .rakumod file

2022-10-14 Thread Joseph Polanik
On 10/14/22 6:03 PM, Ralph Mellor wrote: On Fri, Oct 14, 2022 at 10:59 PM Joseph Polanik wrote: Update: ... all methods are reporting correct results. Thanks for the help. Good to see resolution of problems. :) Is everything now resolved or are some things still outstanding? -- love,

Re: Problem defining factorial operator in .rakumod file

2022-10-14 Thread Joseph Polanik
On 10/14/22 5:48 PM, Bruce Gray wrote: On Oct 14, 2022, at 3:23 PM, Joseph Polanik wrote: The script Run/run_SequenceHelper.raku contains only the following lines use lib '~/Documents/myRaku/gitHub/SequenceHelper/lib'; use SequenceHelper :ALL; --snip-- A possible piece of the puzzle is that

Re: Problem defining factorial operator in .rakumod file

2022-10-14 Thread Ralph Mellor
On Fri, Oct 14, 2022 at 10:59 PM Joseph Polanik wrote: > > Update: ... all methods are reporting correct results. > > Thanks for the help. Good to see resolution of problems. :) Is everything now resolved or are some things still outstanding? -- love, raiph

Re: Problem defining factorial operator in .rakumod file

2022-10-14 Thread Bruce Gray
> On Oct 14, 2022, at 3:23 PM, Joseph Polanik wrote: > >> The script Run/run_SequenceHelper.raku contains only the following lines >>> use lib '~/Documents/myRaku/gitHub/SequenceHelper/lib'; >>> use SequenceHelper :ALL; --snip-- A possible piece of the puzzle is that your `use` line is

Re: Problem defining factorial operator in .rakumod file

2022-10-14 Thread Vadim Belman
I like the way you use ~ in `use lib '~/...';`. Though it doesn't work as expected. But it's nice! :D Best regards, Vadim Belman > On Oct 14, 2022, at 4:05 PM, Joseph Polanik wrote: > > On 10/14/22 3:38 PM, Elizabeth Mattijsen wrote: >>> On 14 Oct 2022, at 21:15, Joseph Polanik >>>

Re: Problem defining factorial operator in .rakumod file

2022-10-14 Thread Joseph Polanik
On 10/14/22 4:53 PM, Elizabeth Mattijsen wrote: raku --ll-exception -Idir-with-module Run/run_SequenceHelper.raku I hope you changed "dir-with-module" by the actual directory name. I didn't. My bad. Now, four subs are producing correct results raku --ll-exception

Re: Problem defining factorial operator in .rakumod file

2022-10-14 Thread Elizabeth Mattijsen
> On 14 Oct 2022, at 22:23, Joseph Polanik wrote: > > On 10/14/22 4:15 PM, Elizabeth Mattijsen wrote: > >> The script Run/run_SequenceHelper.raku contains only the following lines >>> use lib '~/Documents/myRaku/gitHub/SequenceHelper/lib'; >>> use SequenceHelper :ALL; >> OOC, what happens if

Re: Problem defining factorial operator in .rakumod file

2022-10-14 Thread Joseph Polanik
On 10/14/22 4:15 PM, Elizabeth Mattijsen wrote: The script Run/run_SequenceHelper.raku contains only the following lines use lib '~/Documents/myRaku/gitHub/SequenceHelper/lib'; use SequenceHelper :ALL; OOC, what happens if you remove the :ALL here? No change that I can see: raku

Re: Problem defining factorial operator in .rakumod file

2022-10-14 Thread Elizabeth Mattijsen
> On 14 Oct 2022, at 22:05, Joseph Polanik wrote: > > On 10/14/22 3:38 PM, Elizabeth Mattijsen wrote: >>> On 14 Oct 2022, at 21:15, Joseph Polanik wrote: >>> Actually, I did create a factorial() sub, but that didn't get me out of my >>> present predicament. It works as expected when

Re: Problem defining factorial operator in .rakumod file

2022-10-14 Thread Joseph Polanik
On 10/14/22 3:38 PM, Elizabeth Mattijsen wrote: On 14 Oct 2022, at 21:15, Joseph Polanik wrote: Actually, I did create a factorial() sub, but that didn't get me out of my present predicament. It works as expected when invoked from the command line. However, when invoked from a test script (or

Re: Problem defining factorial operator in .rakumod file

2022-10-14 Thread Elizabeth Mattijsen
> On 14 Oct 2022, at 21:15, Joseph Polanik wrote: > Actually, I did create a factorial() sub, but that didn't get me out of my > present predicament. It works as expected when invoked from the command line. > However, when invoked from a test script (or the REPL) the error message is >

Re: Problem defining factorial operator in .rakumod file

2022-10-14 Thread Joseph Polanik
On 10/14/22 11:39 AM, Parrot Raiser wrote: The cause of the problem may well need to be fixed for other reasons, but re-purposing an almost universal operator like "!" ("not") sounds like a thoroughly bad idea, the route to non-standard code. If you must have a factorial operator, what's wrong

Re: Problem defining factorial operator in .rakumod file

2022-10-14 Thread Elizabeth Mattijsen
> On 14 Oct 2022, at 20:35, Joseph Polanik wrote: > Each of these results is correct. So, the problem remains that some subs are > not found when invoked either from a test script or from the REPL. > > Is there some cache that I must clear when changing a .rakumod file to > prevent my system

Re: Problem defining factorial operator in .rakumod file

2022-10-14 Thread Joseph Polanik
On 10/14/22 4:32 AM, Elizabeth Mattijsen wrote: I cannot reproduce: % cat lib/A.rakumod sub postfix: ($n) is export { when $n == 0 {return 1} default {$n * ($n - 1)!} } % raku -e 'use lib "lib"; use A; say 42!' 14050061177528798985431426062445115699363840 Very helpful. I

Re: Problem defining factorial operator in .rakumod file

2022-10-14 Thread Parrot Raiser
The cause of the problem may well need to be fixed for other reasons, but re-purposing an almost universal operator like "!" ("not") sounds like a thoroughly bad idea, the route to non-standard code. If you must have a factorial operator, what's wrong with defining "Fact"? On 10/14/22, Elizabeth

Re: Problem defining factorial operator in .rakumod file

2022-10-14 Thread Elizabeth Mattijsen
I cannot reproduce: % cat lib/A.rakumod sub postfix: ($n) is export { when $n == 0 {return 1} default {$n * ($n - 1)!} } % raku -e 'use lib "lib"; use A; say 42!' 14050061177528798985431426062445115699363840 % raku -v Welcome to Rakudo™ v2022.07-64-gce1af0fa0. Implementing the

Re: Problem defining factorial operator in .rakumod file

2022-10-13 Thread Ralph Mellor
On Fri, Oct 14, 2022 at 4:30 AM Joseph Polanik wrote: > > > It works for me. (v2022.02) > > When I use the REPL, the results are the same. The results are the same for ALL of us, for ALL Rakudo versions. Try the program 42!; Note how the error message is the same. The results are the same for

Re: Problem defining factorial operator in .rakumod file

2022-10-13 Thread Joseph Polanik
On 10/13/22 9:19 PM, Ralph Mellor wrote: On Fri, Oct 14, 2022 at 12:37 AM Joseph Polanik wrote: I am trying to define '!' as the factorial operator. The following works in a .raku script file: sub postfix: ($n) is export { when $n == 0 {return 1} default {$n * ($n - 1)!}

Re: Problem defining factorial operator in .rakumod file

2022-10-13 Thread Ralph Mellor
On Fri, Oct 14, 2022 at 12:37 AM Joseph Polanik wrote: > > I am trying to define '!' as the factorial operator. The following works > in a .raku script file: > >sub postfix: ($n) is export { > when $n == 0 {return 1} > default {$n * ($n - 1)!} >} > > However when I tried to move

Problem defining factorial operator in .rakumod file

2022-10-13 Thread Joseph Polanik
I am trying to define '!' as the factorial operator. The following works in a .raku script file:   sub postfix: ($n) is export {     when $n == 0 {return 1}     default {$n * ($n - 1)!}   } However when I tried to move this sub to a .rakumod file, it produces an error: Negation metaoperator

Re: JPEG meta-data timestamps

2022-10-09 Thread JJ Merelo
Chapter 2 of my Raku Recipes, published by APress, includes that as one of the recipes. Here's the code for that recipe: https://github.com/JJ/perl6-recipes-apress/blob/09a3465726ce96549946401970ae282baa4ba60d/Chapter-2/get-image-size.rk El dom, 9 oct 2022 a las 8:28, Fernando Santagata (<

Re: JPEG meta-data timestamps

2022-10-09 Thread Fernando Santagata
Actually there's a Raku module: https://raku.land/cpan:FRITH/Image::Libexif It's a thin-layer interface to the libexif, but it works. On Sat, Oct 8, 2022 at 10:21 PM rir wrote: > Are there any Raku modules for extracting meta-data from > JPEG files? I have looked but not found. > > At this

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