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.
>
> https://www.microsoft.com/en-us/windows/end-of-support ==> Windows7 
support ended January, 14 2020


No fear of a stupid M$ update destroying your system.
And no need to try to find replacements for perfectly
working mission critical software that has been
abandoned and will not run on current versions
of Windows.

I do not force my customer onto the latest just because
it is the latest.  There are conditions were they need
to be able to operate on older systems.  (I will
work on any system.  I occasionally still see DOS
computers.)

As far for security goes, M$'s security updates are
typically very late to the show and very poorly done.
A decent anti-virus fills i for you.  And there are
those instances were these older system are not even
on the Internet.  ESET still works wonderfully on
Windows 7.


> https://rakudo.org/downloads/star offers Star Bundles back to 2010.07


Which goes back to my question.  What is the last
one they published that supports Windows 7?

>
>
> What am I missing?

See above

>
> Regards
>   Anton


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

And yes, I know how to do it, but IT AIN'T PRETTY!
I want pretty.

-T


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:
>   13671 File(s)  3,265,285,462 bytes
>3917 Dir(s)  18,406,518,784 bytes free
> 
> And yes, I know how to do it,

It would be generally helpful to tell us the way that you already "know how to 
do it", so that if our guesswork is insufficiently astute, we don't waste time 
telling you what you already know.

> but IT AIN'T PRETTY!
> I want pretty.
> 
> -T

$ raku -e '.say for 1..1_000_000' > a.1
# Made a million-line file, for testing

$ time raku -e '.say for lines().tail(3)' a.1
98
99
100
real0m2.155s
user0m1.727s
sys 0m0.249s

On Unix or Mac systems (and maybe Windows, UnxUtils or CygWin or GnuWin32 or 
Microsoft's own "Windows Subsystem for Linux"), faster (and prettier) to pipe 
to `tail -3`.
$ tail -3 a.1
(and I presume)
C:\> dir /s /A:-D /d /a | tail -3

-- 
Hope this helps,
Bruce Gray (Util of PerlMonks)



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

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

And yes, I know how to do it,


It would be generally helpful to tell us the way that you already "know how to do 
it", so that if our guesswork is insufficiently astute, we don't waste time telling 
you what you already know.


but IT AIN'T PRETTY!
I want pretty.

-T


$ raku -e '.say for 1..1_000_000' > a.1
 # Made a million-line file, for testing

$ time raku -e '.say for lines().tail(3)' a.1
 98
 99
 100
 real   0m2.155s
 user   0m1.727s
 sys0m0.249s

On Unix or Mac systems (and maybe Windows, UnxUtils or CygWin or GnuWin32 or Microsoft's 
own "Windows Subsystem for Linux"), faster (and prettier) to pipe to `tail -3`.
$ tail -3 a.1
(and I presume)
C:\> dir /s /A:-D /d /a | tail -3



Thank you!

No time of that type in Windows.

This is my non-pretty way.  It takes about two seconds.


> dir . /s /A:-D /d /a  | raku -e "my Str $x=slurp(); $x~~s/ .* 
'File(s)  '//; $x~~s/ ' bytes' .*//; say $x"


3,275,857,307


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 \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
>>> 
>>> And yes, I know how to do it,
>> It would be generally helpful to tell us the way that you already "know how 
>> to do it", so that if our guesswork is insufficiently astute, we don't waste 
>> time telling you what you already know.
>>> but IT AIN'T PRETTY!
>>> I want pretty.
>>> 
>>> -T
>> $ raku -e '.say for 1..1_000_000' > a.1
>> # Made a million-line file, for testing
>> $ time raku -e '.say for lines().tail(3)' a.1
>> 98
>> 99
>> 100
>> real 0m2.155s
>> user 0m1.727s
>> sys  0m0.249s
>> On Unix or Mac systems (and maybe Windows, UnxUtils or CygWin or GnuWin32 or 
>> Microsoft's own "Windows Subsystem for Linux"), faster (and prettier) to 
>> pipe to `tail -3`.
>> $ tail -3 a.1
>> (and I presume)
>> C:\> dir /s /A:-D /d /a | tail -3
> 
> Thank you!
> 
> No time of that type in Windows.
> 
> This is my non-pretty way.  It takes about two seconds.
> 
> 
> > dir . /s /A:-D /d /a  | raku -e "my Str $x=slurp(); $x~~s/ .* 'File(s)  
> > '//; $x~~s/ ' bytes' .*//; say $x"
> 
> 3,275,857,307

You are welcome.

For that particular `dir` use, this is prettier, or at least shorter:
dir . /s /A:-D /d /a  | raku -e "say lines[*-2].words[2]"

FYI, I just stumbled on a issue with your `s/ .* 'File(s)  '//`code; because 
you have two spaces after the `(s)`, the program give the wrong answer when the 
total size of the files exceeds 10 GiB.
The directory tree I tried it on was that big, and so your code reported the 
size of the subdirectory immediately before the grand total!

-- 
Hope this helps,
Bruce Gray (Util of PerlMonks)




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 `.s()` method), but even in C language, you 
have to walk the directory tree and ask for the sizes of each file, then sum 
them yourself.

The File::Find module can handle the walking for you, allowing for this tight 
solution:

raku -e "use File::Find; say find(dir => <.>)».s.sum;"

-- 
Hope this helps,
Bruce Gray (Util of PerlMonks)

Re: folder size

2022-10-22 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 same function via the `.s()` method), but even in C language, you 
have to walk the directory tree and ask for the sizes of each file, then sum 
them yourself.

The File::Find module can handle the walking for you, allowing for this tight 
solution:

raku -e "use File::Find; say find(dir => <.>)».s.sum;"




Thank you!



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

2022-10-22 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!