Re: slurp so many?

2018-10-07 Thread ToddAndMargo via perl6-users
On 10/7/18 8:13 PM, ToddAndMargo via perl6-users wrote: On 10/7/18 8:11 PM, Brandon Allbery wrote: Use the read method instead. I did say in my previous message that .read is for bytes, .readchars is for graphemes (UTF8 characters plus any modifiers). On Sun, Oct 7, 2018 at 11:03 PM

Re: slurp so many?

2018-10-07 Thread ToddAndMargo via perl6-users
On 10/7/18 8:11 PM, Brandon Allbery wrote: Use the read method instead. I did say in my previous message that .read is for bytes, .readchars is for graphemes (UTF8 characters plus any modifiers). On Sun, Oct 7, 2018 at 11:03 PM ToddAndMargo via perl6-users mailto:perl6-us...@perl.org>>

Re: What is the syntax of a reference pointer in p6?

2018-10-07 Thread ToddAndMargo via perl6-users
On 10/7/18 12:39 PM, Brad Gilbert wrote: Technically there is a way to reason about some Perl 6 features as pointers. It would probably complicate it to view it this way though. You can think about `is raw` as making it so that arguments are passed by as bare "pointers". sub foo ( $a is

Re: slurp so many?

2018-10-07 Thread Brandon Allbery
Use the read method instead. I did say in my previous message that .read is for bytes, .readchars is for graphemes (UTF8 characters plus any modifiers). On Sun, Oct 7, 2018 at 11:03 PM ToddAndMargo via perl6-users < perl6-us...@perl.org> wrote: > On 10/7/18 7:58 PM, ToddAndMargo via perl6-users

Re: slurp so many?

2018-10-07 Thread ToddAndMargo via perl6-users
On 10/7/18 7:58 PM, ToddAndMargo via perl6-users wrote: On 10/7/18 7:54 PM, ToddAndMargo via perl6-users wrote: On 10/7/18 4:53 PM, Curt Tilmes wrote: On Sun, Oct 7, 2018 at 7:42 PM ToddAndMargo via perl6-users mailto:perl6-us...@perl.org>> wrote:     I use `slurp` all the time, so of

Re: slurp so many?

2018-10-07 Thread ToddAndMargo via perl6-users
On 10/7/18 7:54 PM, ToddAndMargo via perl6-users wrote: On 10/7/18 4:53 PM, Curt Tilmes wrote: On Sun, Oct 7, 2018 at 7:42 PM ToddAndMargo via perl6-users mailto:perl6-us...@perl.org>> wrote:     I use `slurp` all the time, so of course, I can't     make heads or tails out of    

Re: slurp so many?

2018-10-07 Thread ToddAndMargo via perl6-users
On 10/7/18 4:52 PM, Brandon Allbery wrote: The whole point of slurp is (possibly lazily in the future) reading everything. I was just hoping for 1002 ways of doing tings. If you want to read by bytes, it's the read method; by lines, it's get; for extended characters / graphemes, it's

Re: slurp so many?

2018-10-07 Thread ToddAndMargo via perl6-users
On 10/7/18 4:53 PM, Curt Tilmes wrote: On Sun, Oct 7, 2018 at 7:42 PM ToddAndMargo via perl6-users mailto:perl6-us...@perl.org>> wrote: I use `slurp` all the time, so of course, I can't make heads or tails out of https://docs.perl6.org/routine/slurp I want to slurp the

Re: slurp so many?

2018-10-07 Thread ToddAndMargo via perl6-users
On 10/7/18 5:47 PM, Brad Gilbert wrote: I think the easiest way to get a 400 characters from a file is with .comb() on the file. 'example.txt'.IO.comb(400).head() On Sun, Oct 7, 2018 at 6:42 PM ToddAndMargo via perl6-users wrote: Hi All, I use `slurp` all the time, so of course, I can't

Re: slurp so many?

2018-10-07 Thread Brad Gilbert
I think the easiest way to get a 400 characters from a file is with .comb() on the file. 'example.txt'.IO.comb(400).head() On Sun, Oct 7, 2018 at 6:42 PM ToddAndMargo via perl6-users wrote: > > Hi All, > > I use `slurp` all the time, so of course, I can't > make heads or tails out of > >

Re: slurp so many?

2018-10-07 Thread Curt Tilmes
On Sun, Oct 7, 2018 at 7:42 PM ToddAndMargo via perl6-users < perl6-us...@perl.org> wrote: > I use `slurp` all the time, so of course, I can't > make heads or tails out of > > https://docs.perl6.org/routine/slurp > > I want to slurp the first 400 characters of > a file and close the handle.

Re: slurp so many?

2018-10-07 Thread Brandon Allbery
The whole point of slurp is (possibly lazily in the future) reading everything. If you want to read by bytes, it's the read method; by lines, it's get; for extended characters / graphemes, it's readchars. They all have rather different intents. On Sun, Oct 7, 2018 at 7:42 PM ToddAndMargo via

Re: websearches on "perl6"

2018-10-07 Thread ToddAndMargo via perl6-users
On 10/7/18 11:06 AM, Elizabeth Mattijsen wrote: On 7 Oct 2018, at 18:31, Joseph Brenner wrote: Would anyone happen to know if there's a duckduckgo trick to get just perl6 links and not perl5? If you just append "perl6" it'll be mostly perl6 info in the top ten, but there tends to be at least

Re: What is the syntax of a reference pointer in p6?

2018-10-07 Thread ToddAndMargo via perl6-users
On 10/7/18 9:55 AM, Brandon Allbery wrote: He was thinking "don't make perl 5 as incompatible with perl 4". Pass-by-reference objects make for a major change to the language's behavior; it and its consequences are a large part of why perl 6 is incompatible with perl 5. Hi Brandon, I am glad

slurp so many?

2018-10-07 Thread ToddAndMargo via perl6-users
Hi All, I use `slurp` all the time, so of course, I can't make heads or tails out of https://docs.perl6.org/routine/slurp I want to slurp the first 400 characters of a file and close the handle. Am I missing a `so many` parameter somewhere? Many thanks, -T

Re: What is the syntax of a reference pointer in p6?

2018-10-07 Thread Brad Gilbert
Technically there is a way to reason about some Perl 6 features as pointers. It would probably complicate it to view it this way though. You can think about `is raw` as making it so that arguments are passed by as bare "pointers". sub foo ( $a is raw ) { $a = 42; } my $b =

Re: websearches on "perl6"

2018-10-07 Thread Elizabeth Mattijsen
> On 7 Oct 2018, at 18:31, Joseph Brenner wrote: > Would anyone happen to know if there's a duckduckgo trick to get just > perl6 links and not perl5? > > If you just append "perl6" it'll be mostly perl6 info in the top ten, > but there tends to be at least some perl5 intermixed in it. Have you

Re: What is the syntax of a reference pointer in p6?

2018-10-07 Thread Brandon Allbery
He was thinking "don't make perl 5 as incompatible with perl 4". Pass-by-reference objects make for a major change to the language's behavior; it and its consequences are a large part of why perl 6 is incompatible with perl 5. On Sun, Oct 7, 2018 at 4:29 AM ToddAndMargo via perl6-users <

websearches on "perl6"

2018-10-07 Thread Joseph Brenner
Would anyone happen to know if there's a duckduckgo trick to get just perl6 links and not perl5? If you just append "perl6" it'll be mostly perl6 info in the top ten, but there tends to be at least some perl5 intermixed in it.

Re: What is the syntax of a reference pointer in p6?

2018-10-07 Thread ToddAndMargo via perl6-users
On 10/6/18 3:20 AM, JJ Merelo wrote: No, we don't have that in Perl 6, explicitly so. Hi JJ, Yippee ! P6 is a wonderful clean up of P5. I hated having to send arrays to subroutines as pointers. What was Larry thinking !?!?!? ( He has redeemed himself 1000+ times over with P6.) -T

j ?

2018-10-07 Thread ToddAndMargo via perl6-users
Hi All, I am going to possibly be writing binary code to my terminal. This can really screw up your terminal. THe solution is to enter sane^j on your keyboard. The ^ above is holding down your key. I would like to be able to send that code at the end of the binary print, just in case.