Re: 11.01 in binary

2019-09-03 Thread yary
b vs B changes the order to show the bits within each byte h vs H changes the order to show the nybbles within each byte I'm not so good at explaining, and I remember you saying you're not so good with docs such as https://en.wikipedia.org/wiki/Endianness - so I'll give you some more pack/unpack

Re: 11.01 in binary

2019-09-03 Thread ToddAndMargo via perl6-users
On 9/3/19 5:52 PM, yary wrote: I'm puzzled what you really want, what the end goal is. For looking at different representations of the same item, "pack" and "unpack" are useful. I've only used the perl5 versions of those, for p6 it is "experimental". Different machines will represent the same

Re: List in regexp

2019-09-03 Thread William Michels via perl6-users
Hi, > my $commasep ='abc,+'; abc,+ > say 'abc' ~~ / $( $commasep.split(',') ) /; Nil > say 'abc' ~~ / $( $commasep.split(',')[0] ) /; 「abc」 > say '123' ~~ / $( $commasep.split(',')[1] ) /; Nil > say 'abc' ~~ / $( $commasep.split(',')[0..*] ) /; Nil > say 'abc' ~~ / @( $commasep.split(',') )

Re: 11.01 in binary

2019-09-03 Thread yary
I'm puzzled what you really want, what the end goal is. For looking at different representations of the same item, "pack" and "unpack" are useful. I've only used the perl5 versions of those, for p6 it is "experimental". Different machines will represent the same real differently, and if I recall

Re: core dump

2019-09-03 Thread ToddAndMargo via perl6-users
*From:* ToddAndMargo via perl6-users *Sent:* Friday, August 30, 2019 7:21 PM *To:* perl6-us...@perl.org *Subject:* Re: core dump On 8/9/19 3:41 PM, ToddAndMargo via perl6-users wrote: Hi All, Fedora 30 rakudo-0.2019.03-2.fc30.x86_64 I have a weird question. I need to simulate a core dump

Re: 11.01 in binary

2019-09-03 Thread ToddAndMargo via perl6-users
Hi Fernando, Not sure how to do the blob thing, but it sound like what I am after What I want to do is to assign a value to a 32 bit real variable, then see what ones and zeros are in the variable. Is it possible to represent a real number as both a 32 bit integer and a 32 bit real number and

Re: Variable character class

2019-09-03 Thread William Michels via perl6-users
I'm wrong then. Nowhere on that reference page does the character construction "<{...}>" (block wrapped in angle brackets) appear. Per your reference, "pointy-blocks" seems to refer to an arrow in conjunction with a block, as mentioned three times on the 'Python-to-Perl6' page:

Re: Variable character class

2019-09-03 Thread The Sidhekin
On Tue, Sep 3, 2019 at 8:18 PM William Michels wrote: > PS Eirik, I think people might be referring to <{...}> as "pointy > blocks", but I'm really not sure... . > I'm pretty sure Perl6 pointy blocks still refer to block constructors with signatures, like: C<< my $add = -> $a, $b = 2 { $a +

Re: Variable character class

2019-09-03 Thread William Michels via perl6-users
Someone might get a kick out of this ;-). Clearly regexes are built on top of set theory, but as both Simon and Yary pointed out, my set-based code didn't return the matching string "8420" present in the target. Example A, Eirik's code used an array to generate a character class, and then tested

Re: Variable character class

2019-09-03 Thread Gianni Ceccarelli
On Tue, 3 Sep 2019 09:15:54 -0700 William Michels via perl6-users wrote: > Just a short note that Eirik's array-based code seems to work fine, > with-or-without backslash-escaping the first input string (minimal > testing, below): Oh, sure. But when the target string contains backslashes, it

Re: Variable character class

2019-09-03 Thread William Michels via perl6-users
Hi Gianni, Thank you for demonstrating use of the "Test" module in your code. Just a short note that Eirik's array-based code seems to work fine, with-or-without backslash-escaping the first input string (minimal testing, below): sub contains( Str $chars, Str $_ ) { my @arr = $chars.comb;

Re: core dump

2019-09-03 Thread Andy Bach
On my box, man core shows how to dump core using ctrl-backslash $ perl ^\Quit (core dumped) It also gives the example of creating a pipeline for core handling (.c file text below): $ cc -o core_pattern_pipe_test core_pattern_pipe_test.c $ su Password: #

Re: Rakudo Star 2019.07

2019-09-03 Thread Vadim Belman
Hi Patrick, I think any help would be useful with it. Perhaps, you could make a ticket on https://github.com/rakudo/star/issues with your proposals. Best regards, Vadim Belman > On Sep 3, 2019, at 3:03 AM, Patrick Spek via perl6-users > wrote: > > Hi

Re: Rakudo Star 2019.07

2019-09-03 Thread Patrick Spek via perl6-users
No, that's Rakudo (the compiler), not Rakudo Star (the Perl 6 distribution). On Tue, 3 Sep 2019 03:54:37 -0700 ToddAndMargo via perl6-users wrote: > On 9/3/19 12:03 AM, Patrick Spek via perl6-users wrote: > > Hi everyone, > > > > I'm using Rakudo Star to get Perl 6 on my machines. However, it

Re: 11.01 in binary

2019-09-03 Thread Fernando Santagata
I guess you're reading data from a file, since Perl 6 numbers (such as 11.01) might have a Rat representation. If so I guess you have that data in a Blob, then read the four bytes using read-uint8 (https://docs.perl6.org/routine/read-uint8) and apply .base(2) to each of them. On Tue, Sep 3, 2019

Re: 11.01 in binary

2019-09-03 Thread ToddAndMargo via perl6-users
On 9/3/19 5:21 AM, ToddAndMargo via perl6-users wrote: On Tue, Sep 3, 2019 at 1:15 PM ToddAndMargo via perl6-users mailto:perl6-us...@perl.org>> wrote:     Hi All,     How would I print out what a 32 real value of     11.01 (base 10) looks like in its raw     binary form (ones and zeros)?    

Re: 11.01 in binary

2019-09-03 Thread ToddAndMargo via perl6-users
On Tue, Sep 3, 2019 at 1:15 PM ToddAndMargo via perl6-users mailto:perl6-us...@perl.org>> wrote: Hi All, How would I print out what a 32 real value of 11.01 (base 10) looks like in its raw binary form (ones and zeros)? Many thanks, -T On 9/3/19 5:09 AM, Fernando

Re: List in regexp

2019-09-03 Thread The Sidhekin
On Tue, Sep 3, 2019 at 8:37 AM yary wrote: > I see. And that's discussed here (had to really look for it): >> https://docs.perl6.org/language/regexes#Quoted_lists_are_LTM_matches >> At first I was looking further down in the "Regex interpolation" >> section, where it's also touched on, though I

Re: 11.01 in binary

2019-09-03 Thread Fernando Santagata
Is this what you need? > (11.01).base(2) 1011.0011 On Tue, Sep 3, 2019 at 1:15 PM ToddAndMargo via perl6-users < perl6-us...@perl.org> wrote: > Hi All, > > How would I print out what a 32 real value of > 11.01 (base 10) looks like in its raw > binary form (ones and zeros)? > > Many thanks,

11.01 in binary

2019-09-03 Thread ToddAndMargo via perl6-users
Hi All, How would I print out what a 32 real value of 11.01 (base 10) looks like in its raw binary form (ones and zeros)? Many thanks, -T

Re: Rakudo Star 2019.07

2019-09-03 Thread ToddAndMargo via perl6-users
On 9/3/19 12:03 AM, Patrick Spek via perl6-users wrote: Hi everyone, I'm using Rakudo Star to get Perl 6 on my machines. However, it seems that the latest release is 2019.03, which is half a year old by now. Is anyone working on a 2019.07 (or different number) release right now, or are there

Rakudo Star 2019.07

2019-09-03 Thread Patrick Spek via perl6-users
Hi everyone, I'm using Rakudo Star to get Perl 6 on my machines. However, it seems that the latest release is 2019.03, which is half a year old by now. Is anyone working on a 2019.07 (or different number) release right now, or are there currently no maintainers for it? If it's the latter, can

List in regexp

2019-09-03 Thread yary
> > I see. And that's discussed here (had to really look for it): > https://docs.perl6.org/language/regexes#Quoted_lists_are_LTM_matches > At first I was looking further down in the "Regex interpolation" > section, where it's also touched on, though I kept missing it: > > When an array variable