Re: [naive] hash assingment

2021-07-14 Thread Brad Gilbert
Honestly I would advise against using ==> at the moment.

For one thing it doesn't even work like it is intended.
Each side of it is supposed to act like a separate process.

There are also issues with the syntax that are LTA.
The fact that you have to tell it the left side is actually a list is one
such issue.

It isn't even all that clearer than just using a method call

> %a .map({.sqrt});

---

Using 「.Slip」 or 「|」 prefix works, but is the wrong thing.
You need to tell it that it is a list, so use 「.List」 or 「@(…)」

> @(%a) ==> map({.sqrt})
> %a.List ==> map({.sqrt})

Since a Slip is a type of List, using it works, but for the wrong reasons.


On Wed, Jul 14, 2021 at 2:58 PM Aureliano Guedes 
wrote:

> thank
>
> It is now more clear.
> And I like this notation |%a ==> map({.sqrt});
> less is more sometimes
>
>
>
> On Wed, Jul 14, 2021 at 4:41 PM Daniel Sockwell 
> wrote:
>
>> To expand slightly on what Clifton said, the reason that
>>
>> > %a = %a.map: { .sqrt };
>> > # (1 1.4142135623730951 1.7320508075688772 2 2.23606797749979)
>>
>> does what you mean but
>>
>> > %a{'column1'} ==> map( { .sqrt } )
>> > # (2.23606797749979)
>>
>> does not is that the method .map maps over *each item* in the Array,
>> whereas
>> ==> map maps over the Array as *one collection*.  When taking the square
>> root,
>> an Array needs to be treated as an number, which for Raku means treating
>> it as
>> a count of how many elements it has (i.e., its length).
>>
>> So `%a{'column1'} ==> map({.sqrt})` is the same as
>> `%a{'column1'}.elems.map({.sqrt})`
>>
>> If want to map over each item in the Array when using the ==> operator,
>> you need to
>> slip the items out of the Array before feeding them on.  You can do that
>> with either
>> of the following (equivalent) lines:
>>
>> > %a{'column1'}.Slip ==> map({.sqrt});
>> > |%a{'column1>'}==> map({.sqrt});
>>
>> (Also, you may already know this, but when the keys of your hash are
>> strings, you
>> can write %a instead of %a{'column1'}  )
>>
>> Hope that helps!
>>
>> –codesections
>>
>
>
> --
> Aureliano Guedes
> skype: aureliano.guedes
> contato:  (11) 94292-6110
> whatsapp +5511942926110
>


Re: [naive] hash assingment

2021-07-14 Thread Patrick R. Michaud
On Wed, Jul 14, 2021 at 07:41:14PM +, Daniel Sockwell wrote:
> (Also, you may already know this, but when the keys of your hash are 
> strings, you can write %a instead of %a{'column1'}  )

A minor nit: this only works if the string keys don't contain whitespace.
(The single angle bracket postfixes use the same parsing rules as qw().)

Pm


Re: [naive] hash assingment

2021-07-14 Thread William Michels via perl6-users
Hi Aureliano!

Backing up a bit (and since you're favoring an array data structure), we
had a discussion on StackOverflow regarding implementing R's concept of
"named vectors" in Raku. See:

"Is there a convenient way to replicate R's concept of 'named vectors' in
Raku, possibly using Mixins?"
https://stackoverflow.com/q/66926663

Right now I'd say my favorite answer is the one posted by Luis F. Uceta,
although for a more general solution I'd opt for conversion to 'Num'
instead of 'Int':

https://stackoverflow.com/a/67005703

HTH, Bill.

W. Michels, Ph.D.



On Wed, Jul 14, 2021 at 12:58 PM Aureliano Guedes <
guedes.aureli...@gmail.com> wrote:

> thank
>
> It is now more clear.
> And I like this notation |%a ==> map({.sqrt});
> less is more sometimes
>
>
>
> On Wed, Jul 14, 2021 at 4:41 PM Daniel Sockwell 
> wrote:
>
>> To expand slightly on what Clifton said, the reason that
>>
>> > %a = %a.map: { .sqrt };
>> > # (1 1.4142135623730951 1.7320508075688772 2 2.23606797749979)
>>
>> does what you mean but
>>
>> > %a{'column1'} ==> map( { .sqrt } )
>> > # (2.23606797749979)
>>
>> does not is that the method .map maps over *each item* in the Array,
>> whereas
>> ==> map maps over the Array as *one collection*.  When taking the square
>> root,
>> an Array needs to be treated as an number, which for Raku means treating
>> it as
>> a count of how many elements it has (i.e., its length).
>>
>> So `%a{'column1'} ==> map({.sqrt})` is the same as
>> `%a{'column1'}.elems.map({.sqrt})`
>>
>> If want to map over each item in the Array when using the ==> operator,
>> you need to
>> slip the items out of the Array before feeding them on.  You can do that
>> with either
>> of the following (equivalent) lines:
>>
>> > %a{'column1'}.Slip ==> map({.sqrt});
>> > |%a{'column1>'}==> map({.sqrt});
>>
>> (Also, you may already know this, but when the keys of your hash are
>> strings, you
>> can write %a instead of %a{'column1'}  )
>>
>> Hope that helps!
>>
>> –codesections
>>
>
>
> --
> Aureliano Guedes
> skype: aureliano.guedes
> contato:  (11) 94292-6110
> whatsapp +5511942926110
>


Re: [naive] hash assingment

2021-07-14 Thread Aureliano Guedes
thank

It is now more clear.
And I like this notation |%a ==> map({.sqrt});
less is more sometimes



On Wed, Jul 14, 2021 at 4:41 PM Daniel Sockwell 
wrote:

> To expand slightly on what Clifton said, the reason that
>
> > %a = %a.map: { .sqrt };
> > # (1 1.4142135623730951 1.7320508075688772 2 2.23606797749979)
>
> does what you mean but
>
> > %a{'column1'} ==> map( { .sqrt } )
> > # (2.23606797749979)
>
> does not is that the method .map maps over *each item* in the Array,
> whereas
> ==> map maps over the Array as *one collection*.  When taking the square
> root,
> an Array needs to be treated as an number, which for Raku means treating
> it as
> a count of how many elements it has (i.e., its length).
>
> So `%a{'column1'} ==> map({.sqrt})` is the same as
> `%a{'column1'}.elems.map({.sqrt})`
>
> If want to map over each item in the Array when using the ==> operator,
> you need to
> slip the items out of the Array before feeding them on.  You can do that
> with either
> of the following (equivalent) lines:
>
> > %a{'column1'}.Slip ==> map({.sqrt});
> > |%a{'column1>'}==> map({.sqrt});
>
> (Also, you may already know this, but when the keys of your hash are
> strings, you
> can write %a instead of %a{'column1'}  )
>
> Hope that helps!
>
> –codesections
>


-- 
Aureliano Guedes
skype: aureliano.guedes
contato:  (11) 94292-6110
whatsapp +5511942926110


Re: [naive] hash assingment

2021-07-14 Thread Daniel Sockwell
To expand slightly on what Clifton said, the reason that

> %a = %a.map: { .sqrt };
> # (1 1.4142135623730951 1.7320508075688772 2 2.23606797749979)

does what you mean but 

> %a{'column1'} ==> map( { .sqrt } )
> # (2.23606797749979)

does not is that the method .map maps over *each item* in the Array, whereas
==> map maps over the Array as *one collection*.  When taking the square root,
an Array needs to be treated as an number, which for Raku means treating it as 
a count of how many elements it has (i.e., its length).

So `%a{'column1'} ==> map({.sqrt})` is the same as 
`%a{'column1'}.elems.map({.sqrt})`

If want to map over each item in the Array when using the ==> operator, you 
need to
slip the items out of the Array before feeding them on.  You can do that with 
either
of the following (equivalent) lines:

> %a{'column1'}.Slip ==> map({.sqrt});
> |%a{'column1>'}==> map({.sqrt});

(Also, you may already know this, but when the keys of your hash are strings, 
you 
can write %a instead of %a{'column1'}  )

Hope that helps!

–codesections


Re: [naive] hash assingment

2021-07-14 Thread Aureliano Guedes
Yes, it does help.

So, to create a new pair *k*ey/*v*alue on the fly in a hash given another
pair k/v, or even modify it will be a problem, then maybe will better
use an array instead of a hash.

> my @a = [ 1..5, 'a'..'e' ]
[1..5 "a".."e"]
> @a[2] = [@a[0][] ==> map( { .sqrt} )]
> @a[2]
[1 1.4142135623730951 1.7320508075688772 2 2.23606797749979]

On Wed, Jul 14, 2021 at 3:55 PM Clifton Wood  wrote:

> Unfortunately, given this:
>
> my %a = 'column1' => [1...5], 'column2' => ['a'...'e']
>>
>
> column1 and column2 cannot yet be referenced to create column3.
>
> You need to do that on another line:
>
> %a = %a.map: { .sqrt };
>
> Which gives the following:
>
> > %a.gist.say
> # {column1 => [1 2 3 4 5], column2 => [a b c d e], column3 => (1
> 1.4142135623730951 1.7320508075688772 2 2.23606797749979)}
>
> Does this help?
>
> - X
>
> On Wed, Jul 14, 2021 at 2:32 PM Aureliano Guedes <
> guedes.aureli...@gmail.com> wrote:
>
>> Thanks JJ, Marcel, Matthew
>>
>> That's help me a lot to understand how Raku hashes work;
>> Little bit complex compared to Perl5.
>>
>> But now I got another question
>>
>> given
>> my %a = 'column1' => [1...5], 'column2' => ['a'...'e']
>>
>> I want to calculate sqrt and store in column3
>> > %a{'column1'}.map({ .sqrt })
>> (1 1.4142135623730951 1.7320508075688772 2 2.23606797749979)
>> > %a{'column3'} = %a{'column1'}.map({ .sqrt })
>> > %a{'column3'}
>> (1 1.4142135623730951 1.7320508075688772 2 2.23606797749979)
>> > %a.keys
>> (column1 column3 column2)
>>
>> But...
>> > %a{'column1'} ==> map( { .sqrt } )
>> (2.23606797749979)
>>
>> How I access the array's values within the hash?
>>
>>
>> On Wed, Jul 14, 2021 at 2:55 PM Marcel Timmerman 
>> wrote:
>>
>>> On 7/14/21 7:43 PM, Aureliano Guedes wrote:
>>>
>>> Hi all,
>>>
>>> Trying to knowing a little bit more about Raku lang, I decided to write
>>> a simple (as possible) lib to became similar to R/dplyr or Python/Pandas
>>> method to data wrangle.
>>>
>>> So, Raku gives us the possibility to deal with data in a functional way,
>>> given the native pipe operator, which is wonderful for newbies.
>>> > @a = 1..100
>>> > @a ==> map( { .sqrt } )
>>> > @a ==> HYPER( { .sqrt } ) # faster map
>>> Even it is being *too verbose*, is good enough for the first moment to
>>> a data scientist.
>>>
>>> So I'm trying to decide the best way to abstract columns.
>>> First, I decide to use a hash where the key is the column name and the
>>> value is the oriented list ou array.
>>>
>>> > my %a = {'column1' => [1...5], 'column2' => ['a'...'e']}
>>> Potential difficulties:
>>> Useless use of hash composer on right side of hash assignment; did
>>> you mean := instead?
>>> at line 2
>>> --> ⏏
>>> {column1 => [1 2 3 4 5], column2 => [a b c d e]}
>>>
>>> It is a warning, not an error!
>>>
>>> But let's obey the warning.
>>> > my %a = {'column1' := [1...5], 'column2' := ['a'...'e']}
>>> ===SORRY!=== Error while compiling:
>>> Cannot use bind operator with this left-hand side
>>> --> n1' := [1...5], 'column2' := ['a'...'e']⏏}
>>>
>>>
>>> ':=' in the error is meant to replace the assignment so you are binding
>>> directly to the hash.
>>> So write,
>>>
>>> my %a := {'column1' => [1...5], 'column2' => ['a'...'e']}
>>>
>>> Without the binding you could write instead
>>>
>>> my %a = 'column1' => [1...5], 'column2' => ['a'...'e']
>>>
>>> See also https://docs.raku.org/type/Hash and
>>> https://docs.raku.org/routine/:=
>>>
>>>
>>> Now we got an error.
>>>
>>> Someone may explain me why I got this error??
>>>
>>> Thanks in advance
>>>
>>>
>>>
>>>
>>> --
>>> Aureliano Guedes
>>> skype: aureliano.guedes
>>> contato:  (11) 94292-6110
>>> whatsapp +5511942926110
>>>
>>>
>>>
>>
>> --
>> Aureliano Guedes
>> skype: aureliano.guedes
>> contato:  (11) 94292-6110
>> whatsapp +5511942926110
>>
>

-- 
Aureliano Guedes
skype: aureliano.guedes
contato:  (11) 94292-6110
whatsapp +5511942926110


Re: [naive] hash assingment

2021-07-14 Thread Clifton Wood
Unfortunately, given this:

my %a = 'column1' => [1...5], 'column2' => ['a'...'e']
>

column1 and column2 cannot yet be referenced to create column3.

You need to do that on another line:

%a = %a.map: { .sqrt };

Which gives the following:

> %a.gist.say
# {column1 => [1 2 3 4 5], column2 => [a b c d e], column3 => (1
1.4142135623730951 1.7320508075688772 2 2.23606797749979)}

Does this help?

- X

On Wed, Jul 14, 2021 at 2:32 PM Aureliano Guedes 
wrote:

> Thanks JJ, Marcel, Matthew
>
> That's help me a lot to understand how Raku hashes work;
> Little bit complex compared to Perl5.
>
> But now I got another question
>
> given
> my %a = 'column1' => [1...5], 'column2' => ['a'...'e']
>
> I want to calculate sqrt and store in column3
> > %a{'column1'}.map({ .sqrt })
> (1 1.4142135623730951 1.7320508075688772 2 2.23606797749979)
> > %a{'column3'} = %a{'column1'}.map({ .sqrt })
> > %a{'column3'}
> (1 1.4142135623730951 1.7320508075688772 2 2.23606797749979)
> > %a.keys
> (column1 column3 column2)
>
> But...
> > %a{'column1'} ==> map( { .sqrt } )
> (2.23606797749979)
>
> How I access the array's values within the hash?
>
>
> On Wed, Jul 14, 2021 at 2:55 PM Marcel Timmerman  wrote:
>
>> On 7/14/21 7:43 PM, Aureliano Guedes wrote:
>>
>> Hi all,
>>
>> Trying to knowing a little bit more about Raku lang, I decided to write a
>> simple (as possible) lib to became similar to R/dplyr or Python/Pandas
>> method to data wrangle.
>>
>> So, Raku gives us the possibility to deal with data in a functional way,
>> given the native pipe operator, which is wonderful for newbies.
>> > @a = 1..100
>> > @a ==> map( { .sqrt } )
>> > @a ==> HYPER( { .sqrt } ) # faster map
>> Even it is being *too verbose*, is good enough for the first moment to a
>> data scientist.
>>
>> So I'm trying to decide the best way to abstract columns.
>> First, I decide to use a hash where the key is the column name and the
>> value is the oriented list ou array.
>>
>> > my %a = {'column1' => [1...5], 'column2' => ['a'...'e']}
>> Potential difficulties:
>> Useless use of hash composer on right side of hash assignment; did
>> you mean := instead?
>> at line 2
>> --> ⏏
>> {column1 => [1 2 3 4 5], column2 => [a b c d e]}
>>
>> It is a warning, not an error!
>>
>> But let's obey the warning.
>> > my %a = {'column1' := [1...5], 'column2' := ['a'...'e']}
>> ===SORRY!=== Error while compiling:
>> Cannot use bind operator with this left-hand side
>> --> n1' := [1...5], 'column2' := ['a'...'e']⏏}
>>
>>
>> ':=' in the error is meant to replace the assignment so you are binding
>> directly to the hash.
>> So write,
>>
>> my %a := {'column1' => [1...5], 'column2' => ['a'...'e']}
>>
>> Without the binding you could write instead
>>
>> my %a = 'column1' => [1...5], 'column2' => ['a'...'e']
>>
>> See also https://docs.raku.org/type/Hash and
>> https://docs.raku.org/routine/:=
>>
>>
>> Now we got an error.
>>
>> Someone may explain me why I got this error??
>>
>> Thanks in advance
>>
>>
>>
>>
>> --
>> Aureliano Guedes
>> skype: aureliano.guedes
>> contato:  (11) 94292-6110
>> whatsapp +5511942926110
>>
>>
>>
>
> --
> Aureliano Guedes
> skype: aureliano.guedes
> contato:  (11) 94292-6110
> whatsapp +5511942926110
>


Re: [naive] hash assingment

2021-07-14 Thread Aureliano Guedes
Thanks JJ, Marcel, Matthew

That's help me a lot to understand how Raku hashes work;
Little bit complex compared to Perl5.

But now I got another question

given
my %a = 'column1' => [1...5], 'column2' => ['a'...'e']

I want to calculate sqrt and store in column3
> %a{'column1'}.map({ .sqrt })
(1 1.4142135623730951 1.7320508075688772 2 2.23606797749979)
> %a{'column3'} = %a{'column1'}.map({ .sqrt })
> %a{'column3'}
(1 1.4142135623730951 1.7320508075688772 2 2.23606797749979)
> %a.keys
(column1 column3 column2)

But...
> %a{'column1'} ==> map( { .sqrt } )
(2.23606797749979)

How I access the array's values within the hash?


On Wed, Jul 14, 2021 at 2:55 PM Marcel Timmerman  wrote:

> On 7/14/21 7:43 PM, Aureliano Guedes wrote:
>
> Hi all,
>
> Trying to knowing a little bit more about Raku lang, I decided to write a
> simple (as possible) lib to became similar to R/dplyr or Python/Pandas
> method to data wrangle.
>
> So, Raku gives us the possibility to deal with data in a functional way,
> given the native pipe operator, which is wonderful for newbies.
> > @a = 1..100
> > @a ==> map( { .sqrt } )
> > @a ==> HYPER( { .sqrt } ) # faster map
> Even it is being *too verbose*, is good enough for the first moment to a
> data scientist.
>
> So I'm trying to decide the best way to abstract columns.
> First, I decide to use a hash where the key is the column name and the
> value is the oriented list ou array.
>
> > my %a = {'column1' => [1...5], 'column2' => ['a'...'e']}
> Potential difficulties:
> Useless use of hash composer on right side of hash assignment; did you
> mean := instead?
> at line 2
> --> ⏏
> {column1 => [1 2 3 4 5], column2 => [a b c d e]}
>
> It is a warning, not an error!
>
> But let's obey the warning.
> > my %a = {'column1' := [1...5], 'column2' := ['a'...'e']}
> ===SORRY!=== Error while compiling:
> Cannot use bind operator with this left-hand side
> --> n1' := [1...5], 'column2' := ['a'...'e']⏏}
>
>
> ':=' in the error is meant to replace the assignment so you are binding
> directly to the hash.
> So write,
>
> my %a := {'column1' => [1...5], 'column2' => ['a'...'e']}
>
> Without the binding you could write instead
>
> my %a = 'column1' => [1...5], 'column2' => ['a'...'e']
>
> See also https://docs.raku.org/type/Hash and
> https://docs.raku.org/routine/:=
>
>
> Now we got an error.
>
> Someone may explain me why I got this error??
>
> Thanks in advance
>
>
>
>
> --
> Aureliano Guedes
> skype: aureliano.guedes
> contato:  (11) 94292-6110
> whatsapp +5511942926110
>
>
>

-- 
Aureliano Guedes
skype: aureliano.guedes
contato:  (11) 94292-6110
whatsapp +5511942926110


Re: [naive] hash assingment

2021-07-14 Thread Marcel Timmerman

On 7/14/21 7:43 PM, Aureliano Guedes wrote:

Hi all,

Trying to knowing a little bit more about Raku lang, I decided to 
write a simple (as possible) lib to became similar to R/dplyr or 
Python/Pandas method to data wrangle.


So, Raku gives us the possibility to deal with data in a 
functional way, given the native pipe operator, which is wonderful for 
newbies.

> @a = 1..100
> @a ==> map( { .sqrt } )
> @a ==> HYPER( { .sqrt } ) # faster map
Even it is being *too verbose*, is good enough for the first moment to 
a data scientist.


So I'm trying to decide the best way to abstract columns.
First, I decide to use a hash where the key is the column name and the 
value is the oriented list ou array.


> my %a = {'column1' => [1...5], 'column2' => ['a'...'e']}
Potential difficulties:
    Useless use of hash composer on right side of hash assignment; did 
you mean := instead?

    at line 2
    --> ⏏
{column1 => [1 2 3 4 5], column2 => [a b c d e]}

It is a warning, not an error!

But let's obey the warning.
> my %a = {'column1' := [1...5], 'column2' := ['a'...'e']}
===SORRY!=== Error while compiling:
Cannot use bind operator with this left-hand side
--> n1' := [1...5], 'column2' := ['a'...'e']⏏}


':=' in the error is meant to replace the assignment so you are binding 
directly to the hash.

So write,

my %a := {'column1' => [1...5], 'column2' => ['a'...'e']}

Without the binding you could write instead

my %a = 'column1' => [1...5], 'column2' => ['a'...'e']

See also https://docs.raku.org/type/Hash and 
https://docs.raku.org/routine/:=




Now we got an error.

Someone may explain me why I got this error??

Thanks in advance




--
Aureliano Guedes
skype: aureliano.guedes
contato:  (11) 94292-6110
whatsapp +5511942926110




Re: [naive] hash assingment

2021-07-14 Thread JJ Merelo
El mié, 14 jul 2021 a las 19:43, Aureliano Guedes (<
guedes.aureli...@gmail.com>) escribió:

> Hi all,
>
> Trying to knowing a little bit more about Raku lang, I decided to write a
> simple (as possible) lib to became similar to R/dplyr or Python/Pandas
> method to data wrangle.
>
> So, Raku gives us the possibility to deal with data in a functional way,
> given the native pipe operator, which is wonderful for newbies.
> > @a = 1..100
> > @a ==> map( { .sqrt } )
> > @a ==> HYPER( { .sqrt } ) # faster map
>

This is not going to be faster in the general case, only when the
operations done at every step take enough time, and the array is big
enough. In the general case, this might be even slower. Also, it's lower
case hyper, and it must go before the operation to be "hypered", like map.


> So I'm trying to decide the best way to abstract columns.
> First, I decide to use a hash where the key is the column name and the
> value is the oriented list ou array.
>
> > my %a = {'column1' => [1...5], 'column2' => ['a'...'e']}
> Potential difficulties:
> Useless use of hash composer on right side of hash assignment; did you
> mean := instead?
> at line 2
> --> ⏏
> {column1 => [1 2 3 4 5], column2 => [a b c d e]}
>
> It is a warning, not an error!
>

Yep, you can just write:
my %a = 'column1' => [1...5], 'column2' => ['a'...'e']

Raku knows it's a hash, it can figure out the two Pairs go there.

>
> But let's obey the warning.
> > my %a = {'column1' := [1...5], 'column2' := ['a'...'e']}
> ===SORRY!=== Error while compiling:
> Cannot use bind operator with this left-hand side
> --> n1' := [1...5], 'column2' := ['a'...'e']⏏}
>
> Now we got an error.
>

:= is for variable binding; you could do something like

my %a := {'column1' => [1...5], 'column2' => ['a'...'e']}

Which will bind lhs to rhs, saying: yes, I know that's a hash, that's
exactly what I want. No warning then. That's where you had to use binding.


> Someone may explain me why I got this error??
>

Hope that helps. You might want to have a look at the documentation, too:
https://docs.raku.org/routine/:=

Cheers

JJ


[naive] hash assingment

2021-07-14 Thread Aureliano Guedes
Hi all,

Trying to knowing a little bit more about Raku lang, I decided to write a
simple (as possible) lib to became similar to R/dplyr or Python/Pandas
method to data wrangle.

So, Raku gives us the possibility to deal with data in a functional way,
given the native pipe operator, which is wonderful for newbies.
> @a = 1..100
> @a ==> map( { .sqrt } )
> @a ==> HYPER( { .sqrt } ) # faster map
Even it is being *too verbose*, is good enough for the first moment to a
data scientist.

So I'm trying to decide the best way to abstract columns.
First, I decide to use a hash where the key is the column name and the
value is the oriented list ou array.

> my %a = {'column1' => [1...5], 'column2' => ['a'...'e']}
Potential difficulties:
Useless use of hash composer on right side of hash assignment; did you
mean := instead?
at line 2
--> ⏏
{column1 => [1 2 3 4 5], column2 => [a b c d e]}

It is a warning, not an error!

But let's obey the warning.
> my %a = {'column1' := [1...5], 'column2' := ['a'...'e']}
===SORRY!=== Error while compiling:
Cannot use bind operator with this left-hand side
--> n1' := [1...5], 'column2' := ['a'...'e']⏏}

Now we got an error.

Someone may explain me why I got this error??

Thanks in advance




-- 
Aureliano Guedes
skype: aureliano.guedes
contato:  (11) 94292-6110
whatsapp +5511942926110


REPL / Linenoise question (backslashes)

2021-07-14 Thread William Michels via perl6-users
Hi, I've recently updated my Rakudo installation, and I wanted to test
multi-line input in the REPL. By mistake I entered a backslash at the REPL
command line:

user@mbook:$ raku
Welcome to 퐑퐚퐤퐮퐝퐨™ v2021.06.
Implementing the 퐑퐚퐤퐮™ programming language v6.d.
Built on MoarVM version 2021.06.

To exit type 'exit' or '^D'
> \
{}
> \\
{}
> \\\
{}
> exit

Curiously, I seem to create an object in my REPL environment when I enter
either a single-, double-, or triple-backslash. But I'm not sure how to
confirm or refute this assertion (i.e. is there a way to get a list of REPL
objects?). Anyway, is this the expected behavior?

EDIT: Just tested with Rakudo_2020.10 and I see the same result.

Best, Bill.