mma.
>>
>>
>> Richard Hainsworth wrote:
>> > A semicolon is the syntax used for multidimensional arrays.
>> >
>> > See https://docs.perl6.org/language/subscripts#Multiple_dimensions
>> >
>> >
>> > On 14/04/2019 15:07, William Miche
Hello,
I've been working through Patrick Michaud's excellent videos from the
The Perl Conference 2016. At about 35:45 of the following 2016 video
(Part 1 of 2), Patrick discusses arrays:
https://www.youtube.com/watch?v=ySch4xpoPA0
At this point in the video, Patrick also discusses push() and
Thank you Yary. It's not often I have to prepend a "4" to a mixed list
items of containing numbers, but your code is perfect for extracting
the numbers and prepending a dollar sign ($):
> .say for (325, '44a', 555, 6).grep(/^\d+$/).map( '$' ~ * )
$325
$555
$6
Best Regards,
Bill.
On Mon, Jun
>From Joseph Brenner, who gave me this link a few months back:
https://docs.perl6.org/perl6.html
On Fri, Jun 21, 2019 at 1:22 PM Parrot Raiser <1parr...@gmail.com> wrote:
>
> Is there a convenient way to download the Perl 6 specification as one
> file, rather than having to download each topic
om the push() issue. --B.
On Sun, Apr 14, 2019 at 12:39 AM Richard Hainsworth
wrote:
>
> A semicolon is the syntax used for multidimensional arrays.
>
> See https://docs.perl6.org/language/subscripts#Multiple_dimensions
>
>
> On 14/04/2019 15:07, William Michels via perl6-user
ingler) ()]
>>
>> It seems a bit LTA, though it might be unavoidable because this is valid:
>>
>>my @monsters = ('ghidora', 'mothera'; 'frankenstein',
>> 'wolfman';'purple-people-eater')
>>[(ghidora mothera) (frankenstein wolfman) purple-people-eater]
>
I've put up two name suggestions for Perl 6:
NUPERL:
www.nuperl.orgwww.nuperl.comwww.nuperl.net
NEUPERL:
www.neuperl.orgwww.neuperl.comwww.neuperl.net
Specifics:
https://github.com/perl6/problem-solving/issues/81#issuecomment-520960546
I'm not sure why this decision has to be
Dear Shlomi, Thank you for that StackOverflow link! --Bill.
On Thu, Aug 1, 2019 at 12:28 AM Shlomi Fish wrote:
>
> On Wed, 31 Jul 2019 14:28:11 -0700
> William Michels via perl6-users wrote:
>
> > Hi Patrick, I used both your examples as perl6 one-liners. I'm not
>
Hi Richard, I'm not able to come to the same conclusions.
Specifically, the previous code examples starting with 'for lines()'
always have to have parentheses following 'lines' (as in 'lines()
{...}'), otherwise Perl_6 balks (examples 6 and 7 previously posted).
This is whether 'information is
It looks like it works if you call the .Seq method on a scalar $index :
> my @array = 9 ... 0
[9 8 7 6 5 4 3 2 1 0]
> my $index = map { $_, $_ + 1 }, ^9
((0 1) (1 2) (2 3) (3 4) (4 5) (5 6) (6 7) (7 8) (8 9))
> say @array[$index.Seq]
((9 8) (8 7) (7 6) (6 5) (5 4) (4 3) (3 2) (2 1) (1 0))
> put
Thanks to Brad Gilbert's code contribution in this thread, I re-wrote
a small snippet of his code (code that incrementally checks a series
of regex matches), to have it return the last position of each match.
Testing with three 'matches' and one 'willnotmatch' returns three
positional values, as
Hi Aureliano, It's a good question. The short answer is I haven't had
any memory problems with the toy examples so far, but I haven't scaled
up the regex to know how it behaves when testing for hundreds (or
thousands) of matches. I suppose there might be some way to restrict
array values to
Hi Raymond, Wow that's exciting! I'm sure others will chime in with
their thoughts.
I wrote two more test cases for your "incremental P5-like parser",
that can be appended to the code you posted yesterday (personally I
think of incremental matching as being important for matching the
linear order
, 2019 at 5:51 PM yary wrote:
>
> If you do make this a grammar, I think there's more than one way to
> have " {@a.push($/.pos)}/" fire after every match, and not repeat that
> code snippit on each rule... keep that in mind as a goal...
>
> -y
>
> On Tue, Aug 20, 2
Hi Wesley,
Andy's being modest. In addition to the official Perl6 docs at:
http://docs.perl6.org (as Andy suggests), Check out his many Perl6
resources (including videos) at:
https://perl6.online/
https://perl6.online/contents/
https://perl6.online/category/talks/
I'm using Andy Shitov's "Perl6
Lookahead/lookbehind assertions: maybe the mnemonic "ABBA" will help?
In Markdown:
'Use *A*fter for a look-*B*ehind, use *B*efore for a look-*A*head',
or...
'For a look-*A*head' use *B*efore, for a look-*B*ehind" use *A*fter'.
As a trivial example of the first mnemonic in practice, below are
Hi Yary and Paul and Simon,
I ran into the same difficulties as Yary with repeated characters, so
I tried the .unique method. Then after a while, I realized that
problems like this might best be treated as "Set" problems in Perl6.
Note the Set Intersection operator "(&)" below:
sub
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;
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(',') )
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
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:
Thanks Simon, good point. I ran into the same trouble as others trying
to get the answer via regex, and switched over to sets as an
alternative. I'll confess I completely missed that Yary's Perl5 code
returned the substring "8420" present in his test "19584203" string,
and that was the answer he
8 0]
>
> sub matching_chars(Str $a, Str $b) {
>my @c = $a.comb.unique;
>my @d = $b.comb.unique;
>return ~[@c (&) @d];
> }
>
> say matching_chars("24680", "1234567890"); # says 2 0 8 4
>
> On Mon, Sep 2, 2019 at 1:20 AM William Michels via
Sorry Paul, I don't get the correct answer in any of the three cases I
tried. Here's what 6Pad returns:
https://perl6.github.io/6pad/
sub matching_chars(Str $chars_to_match, Str $str) {
# warnings, treats as string not variable
$str ~~ /<$_>/ given "<[$chars_to_match]>";
}
say
Hi Sean, From the docs:
Lookbehind assertions:
https://docs.perl6.org/language/regexes#Lookbehind_assertions
"To check that a pattern appears after another pattern, use a
lookbehind assertion via the after assertion. This has the form:
"Therefore, to search for the string bar immediately
Hi Fernando, I'm not sure I understand. Is this for module
development? And you want to purge old versions of a module you're
developing, before doing a 'git push'?
I'm not sure about an anonymous uninstall in the pwd ("."), but there
might be a way to set up a separate 'DevDir', and then use the
Bill.
On Thu, Sep 5, 2019 at 6:25 AM Gianni Ceccarelli wrote:
>
> On Wed, 4 Sep 2019 21:44:29 -0700
> William Michels via perl6-users wrote:
>
> > Hi Gianni, I'm not sure of the Perl5 case, but what you're saying is,
> > if your target string is backslashed, be sure to
On Wed, Sep 4, 2019 at 7:22 AM Fernando Santagata
wrote:
>
> On Wed, Sep 4, 2019 at 4:07 PM Tom Browder wrote:
>>
>> On Wed, Sep 4, 2019 at 05:53 Fernando Santagata
>> wrote:
>>>
>>>
>>> On Wed, Sep 4, 2019 at 12:21 PM William Michels
>>> wrote:
Hi Fernando, I'm not sure I
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
{ say .split(':')[0, 2, 1, 5].join("\t") }
>
> Pm
>
>
> On Mon, Jul 29, 2019 at 12:49:51PM -0700, William Michels via perl6-users
> wrote:
> > Hello, Just a short backgrounder to say that this question arose this
> > past weekend at a Perl6 Meetup (Oakland
>
On Wed, Jul 31, 2019 at 3:28 PM Andy Bach wrote:
>
> > , but I had to change .split(':') either to .split(":") or
>
> because your -e ' .... ' quotes are the same, so bash breaks it up into 3
> chunks
> say .split(
> :
> )[0, 2, 1, 5].join("\t&qu
Hi Richard, I'm trying to figure out when the parentheses in 'lines()'
can be dropped, and 'lines' used instead. Any pointers? I have about
nine or so working examples below, but formulating a clear
rule-of-thumb is proving elusive. Any help appreciated, --Best, Bill.
# test file: six_fruits1.txt
Hello, Just a short backgrounder to say that this question arose this
past weekend at a Perl6 Meetup (Oakland, CA). Specifically we were
looking at how to write a Perl6 version of some introductory Perl5
code in "Learning Perl", 7th Edition by Tom Phoenix, brian d foy,
Randal L. Schwartz:
#Perl 5
> without special handling:
>
> for map {…}, lines() {…}
>
> map {…}, lines;
>
> ---
>
> One of the design goals of Perl6 is to have as few special cases as possible.
> Having `map` accept a block is really useful, so now all functions can take a
> block.
> (Th
Thank you Richard, for taking time to explain this. I've put comments
below (inline):
On Mon, Aug 5, 2019 at 10:26 AM Richard Hainsworth
wrote:
>
> William,
>
> I saw others were replying and between what Brad had said and what I had
> said, I thought the explanations were pretty clear.
>
> So
languages.)
>
> The worst part is we keep trying to tell you this, and trying to correct
> those wrong assumptions, but you keep making the same assumptions.
>
> I don't know of a nicer way to tell you this.
>
> ---
>
> I really want you to know the syntax rules, but I don
Hi Rui, Have you considered just installing Perl 6 ?
https://rakudo.org
https://www.perl6.org
Spoiler alert: the Perl6 code you posted works with no errors on my
Perl6 install.
Best Regards, Bill.
On Thu, Aug 8, 2019 at 1:07 PM Rui Fernandes wrote:
>
> Greetings
>
> I have this Perl 6
"Declaring a list of variables with lexical (my) or package (our) scope"
https://docs.perl6.org/language/variables#index-entry-declaring_a_list_of_variables
my:
https://docs.perl6.org/syntax/my
our:
https://docs.perl6.org/syntax/our
Paul, hoping the above points you in the right direction.
avgdata
> > 74188maxresident)k
> > 63424inputs+0outputs (32major+15409minor)pagefaults 0swaps
> >
> >
> > perl6 --version
> > This is Rakudo Star version 2019.03.1 built on MoarVM version 2019.03
> > implementing Perl 6.d.
> >
> > uname -a
> &
MoarVM version 2019.03
>
> implementing Perl 6.d.
>
>
> -y
>
>
> On Thu, Sep 26, 2019 at 2:24 PM William Michels via perl6-users
> wrote:
>>
>> Thank you, Andy and Joseph!
>>
>>
>> On Thu, Sep 26, 2019 at 8:47 AM Andy Bach
>> w
Hi Caitlin!
There was a thread earlier in this month, with Patrick, Vadim, and
Todd all participating:
https://www.nntp.perl.org/group/perl.perl6.users/2019/09/msg6979.html
You can look at the official Rakudo Star releases here:
https://rakudo.org/files/star
In addition, Tom Browder seems to
Hi, thought I'd chime in here with a good starting point: the
modules.perl6.org website. You can search for 'http' or 'web' or
'server', which gives you more results that you might find by using
tags:
(60 results) https://modules.perl6.org/search/?q=http
(44 results)
I'm seeing a strange error. I started trying out Marc's original code,
then tried to adapt some Perl5-type solutions from SO to see how they
performed when re-written as Perl6. One thing I wanted to explicitly
test was how restricting to an "Int" type affected performance.
However, I found a
names to make understanding and
> communication easier?
>
> On 11/5/19, William Michels via perl6-users wrote:
> > Thank you Patrick!
> >
> > On Tue, Nov 5, 2019 at 8:52 AM JJ Merelo wrote:
> >
> >> Thanks a lot, Patrick.
> >>
> >> El ma
Thank you Patrick!
On Tue, Nov 5, 2019 at 8:52 AM JJ Merelo wrote:
> Thanks a lot, Patrick.
>
> El mar., 5 nov. 2019 a las 14:28, Patrick Spek via perl6-users (<
> perl6-us...@perl.org>) escribió:
>
>> Hello everyone,
>>
>> I've seen people ask about 2019.07.1 in multiple avenues, myself
>>
Hi Yary,
I went over this with Joe as well, and I was equally confused. So if I
understand what you're saying correctly, if we see something like
"Bool :$match" that says we should drop the dollar-sign ($) and enter
":match" to set "Bool" = True, and thus return the list of match
objects?
On
Hello Timo, and thank you for taking the time to explain how "comb"
routine signatures work. I have no doubt your description is the
correct way to use comb routine(s) in Raku/Perl6.
First of all, I should preface my remarks by saying that I'm using
Rakudo (moar) 2019.07.1, with the Linenoise
I've seen this message as well. I believe it's the default message you
get when you start up the Perl6 (Raku) REPL, but don't have Readline
or Linenoise installed (or your machine needs help knowing where to
look).
Maybe try 'echo $PATH' at a terminal prompt, and see if your new
machine has the
Hi Marc, I did a search for 'semicolon' on the following page and
found the interesting text below. Semicolons are used to create
multidimensional lists, maybe that's what's going on in your code?
https://docs.perl6.org/language/list
"Lists of Lists can also be created by combining comma and
inline:
On Fri, Nov 22, 2019 at 7:20 AM Bruce Gray wrote:
>
>
>
> > On Nov 22, 2019, at 9:06 AM, Marc Chantreux wrote:
> >
> > hello,
> >
> > On Fri, Nov 22, 2019 at 03:07:28PM +0100, Patrick Spek via perl6-users
> > wrote:
> >> Could you post some input and expected output? That would make it
> which led me to this solution:
> fix () perl6 -e '
> lines.classify(*.split(",").head(2)).pairs.map: {
> .say for .key, |.value.map({ "\t" ~ .key });
> }
> '
Hi Marc, I tried the first solution you posted and the "subheaders"
are returned out of order (e.g.
On Wed, Dec 4, 2019 at 2:22 AM ToddAndMargo via perl6-users
wrote:
>
> Hi All,
>
> I am going through the examples on
> https://docs.perl6.org/type/Map.html
>
> $ p6 "my $map = Map.new('a', 1, 'b', 2); say $map{'a'}; say $map{ 'a',
> 'b' };"
> ===SORRY!=== Error while compiling -e
> Malformed
Hi Todd,
Chapter 9 (Associatives) of "Learning Perl 6" by brian d foy has a
section on Maps, "the immutable mapping of zero or more keys to
values". In that section there are subsections entitled 'Checking
Keys', 'Creating from a Positional' and 'Checking Allowed Values.'
HTH, Bill.
On Wed, Dec
Hi Todd,
Do you not have a working Raku/Perl6 REPL install? If you do, when
copying (single-quoted) code out of https://docs.raku.org , you could
try the following strategy of pasting into the REPL first, before
pasting code at the command line:
> my $repl_code = Q[my $map = Map.new('a', 1, 'b',
some feedback as to where
to look in the docs for further instruction.
Best Regards, Bill.
On Fri, Dec 6, 2019 at 12:15 AM ToddAndMargo via perl6-users
wrote:
>
> On 2019-12-05 23:19, ToddAndMargo via perl6-users wrote:
> > On 2019-12-05 03:09, William Michels via perl6-users w
ich "are gone
from Raku" (Ref#3 below):
1. https://docs.raku.org/language/5to6-perlvar#$ARG,_$_
2. https://docs.raku.org/syntax/$$SOLIDUS
3.
https://docs.raku.org/language/5to6-perlvar#Variables_related_to_regular_expressions
HTH, Bill.
On Fri, Dec 6, 2019 at 9:28 PM ToddAndMarg
gt; > Cannot modify an immutable Str (abc)
>> >> > in block at line 1
>> >> > >
>> >> >
>> >> > No matter how "discouraged' a particular syntax is, people are going
>> >> > to run into these disallowed syntax
Hi Tom,
My vote would be for someone to take on the task of writing
"mailing-list" software in Raku/Perl6, and/or writing
"mailing-list-archiving" software (e.g. an NNTP server) in Raku/Perl6.
First of all, for your group this would be a relatively-high profile
project, with the potential for
n 'abc'
> >
> > > given 'abc' {
> > > my $r = S/b/./
> > > …
> > > }
> >
> > > my $_ = 'abc'
> > > my $r = S/b/./
> >
> > > my $r = 'abc' ~~ -> $_ { S/b/./ }
> >
> > > my $r = 'ab
On Fri, Dec 6, 2019 at 10:54 PM ToddAndMargo via perl6-users
wrote:
>
> On 2019-12-06 22:38, ToddAndMargo via perl6-users wrote:
> >>> On Fri, Dec 6, 2019 at 9:28 PM ToddAndMargo via perl6-users
> >>> wrote:
> >>>>
> >>>> On 2019-12-
On Sat, Dec 7, 2019 at 9:36 PM ToddAndMargo via perl6-users
wrote:
>
> On 2019-12-07 18:30, Mark Senn wrote:
> >> Corrected section
> >>
> >> my %h = a => "x", b=>"r", c=>"z";
> >> if %h { say "exists"; } else { say "DOES NOT exist"; }
> >> DOES NOT exist
> >>
> >>
gt;
> > my $_ = 'abc'
> > my $r = S/b/./
>
> > my $r = 'abc' ~~ -> $_ { S/b/./ }
>
> > my $r = 'abc' ~~ sub ( $_ ) { S/b/./ }
>
> > my $r = 'abc' ~~ anon sub foo ( $_ ) { S/b/./ }
> ---
>
> One of design goals of Raku is to have
gt;> > > a.c
>> > >
>> > > Note that it warns you try to use S/// with ~~
>> > >
>> > > > my $r = 'abc' ~~ S/b/./
>> > > Potential difficulties:
>> > > Smartmatch with S/// is not useful. You can use give
I can confirm what Yary is seeing with respect to the "lines(:!chomp)"
call. Below I can print things out on a single line (using "print"),
but the use of "print" or "put" appears to be controlling, not
manipulating the "chomp" option of "lines()".
> mbook:~ homedir$ cat abc_test.txt
line
Hi Joe,
Just a quick note to say that "Learning Perl 6" by brian d foy has a
section on reading binary files (pp.155-157). Check out the "Buf"
object type, the ":bin" adverb, and the ".read" method. In particular,
".read" takes an argument specifying how many octets you want to read
in.
HTH,
Hi Richard,
Have you gotten a response to your query? I'd be interested to know
how this documentation is progressing.
Best Regards, Bill.
On Sat, Nov 16, 2019 at 8:28 AM Richard Hainsworth
wrote:
>
> Hi,
>
> I'm sending an email rather than IRC to catch more feedback.
>
> There are several
Inline:
> -- Forwarded message -
> From: Simon Proctor
> Date: Sat, Nov 23, 2019 at 3:34 AM
> Subject: Re: for by 3?
> To: ToddAndMargo
> Cc: perl6-users
>
> If you want to read you lines in groups of 3 then you want batch :
> for @x.lines.batch(3) -> @b
> If you just want the
On Sat, Nov 30, 2019 at 12:05 AM ToddAndMargo via perl6-users
wrote:
>
> On 2019-11-29 23:49, William Michels via perl6-users wrote:
> > On Fri, Nov 29, 2019 at 8:33 PM ToddAndMargo via perl6-users
> > wrote:
> >>
> >> Hi All,
> >>
> >> Wi
On Fri, Nov 29, 2019 at 8:33 PM ToddAndMargo via perl6-users
wrote:
>
> Hi All,
>
> Windows 7, sp1, x64
> rakudo-star-2019.03-x86_64 (JIT).msi
>
> Why does this type of line keep giving me heartburn?
>
> print( "Drive $Drive" ~ ":" ~ '\' ~ " dismounted\n\n" );
>
> K:\Windows\NtUtil>perl6 -c
Looks like your Perl6/Raku code is missing the "-e" command line flag:
mbook:~ homedir$ perl6 ' my @x=; for @x.rotor(3) ->
($,$,$third) { dd $third };'
Could not open my @x=; for @x.rotor(3) -> ($,$,$third)
{ dd $third };. Failed to stat file: no such file or directory
mbook:~ homedir$ perl6
Greetings:
I tried the following regular expression code, working generally from
"Learning Perl 6" by brian d foy (Chapter 15). Everything works fine
including the any() junction below, as long as the topic $_ variable
isn't defined beforehand. However specifically in combination with a
ntime issue. The compiler's name is Rakudo, so the
> appropriate repository would be https://github.com/rakudo/rakudo.
> Since you found the issue, I think you should create the issue in the bug
> tracker.
> (Mainly because that is a common first stepping stone to getting involved.)
&g
9.07.1)
HTH, Bill.
On Fri, Oct 11, 2019 at 4:24 PM ToddAndMargo via perl6-users
wrote:
>
> On 10/11/19 2:46 AM, William Michels via perl6-users wrote:
> > Below works:
> >
> > mbook:~ homedir$ perl6 -e 'my $x = (44, 66); say $x; say $x.any < 43'
> > (44 66)
>
Inline:
On Fri, Oct 11, 2019 at 8:33 PM ToddAndMargo via perl6-users
wrote:
>
> On 10/11/19 8:09 PM, William Michels via perl6-users wrote:
> > Hi Todd, Per the REPL, $x looks to be a List:
> >
> > mbook:~ homedir$ perl6
> > To exit type 'exit' or '^D'
> &
Below works:
mbook:~ homedir$ perl6 -e 'my $x = (44, 66); say $x; say $x.any < 43'
(44 66)
any(False, False)
#
mbook:~ homedir$ perl6 -e 'my $x = (44, 66); say $x; say $x.any < 50'
(44 66)
any(True, False)
#
mbook:~ homedir$ perl6 -e 'my $x=0; my $any=2|4|8; $x==$any ?? put "x
exists, value= $x"
nd prompt?
Best Regards, Bill.
On Thu, Dec 5, 2019 at 2:22 AM Todd Chester via perl6-users
wrote:
>
>
>
> On 2019-12-04 15:53, William Michels via perl6-users wrote:
> > Do you not have a working Raku/Perl6 REPL install?
>
> Hi William,
>
> Being as I do not know what RE
Hi Todd,
There's a well-known, non-English-based computer language with an
unfortunate name here:
https://en.wikipedia.org/wiki/Brainfuck
https://rosettacode.org/wiki/Rosetta_Code:Brainf***
I trust you'll find Andy Shitov meant no vulgarity on his blog. I've
been meaning to invite more people
If you want to view a publisher-authorized preview of brian d foy's
"Learning Perl 6" book, here's a good place to start (there's also a
link to purchase an eBook):
https://books.google.com/books?id=sbRqDwAAQBAJ
Todd, you could try searching in the search box for: "Checking Allowed Values".
On Wed, Feb 12, 2020 at 8:12 AM Aureliano Guedes
wrote:
>
>
> On Wed, Feb 12, 2020 at 1:09 PM Andy Bach
> wrote:
>
>> > So, the problem is you didn't call the same var you had declared.
>>
>> my $foo = * **2;
>>
>> > Then you call
>>
>> foo(2).say
>>
>> > Missing the $
>> D'oh! Thanks.
>>
>> >
This code below seems to accurately return the number of "repeating
digits" (576) using Perl6 alone:
mbook: homedir$ perl6 -e 'say
ly an
empty line or '0' ".
Best Regards, Bill.
On Mon, Jan 20, 2020 at 4:13 PM Trey Harris wrote:
>
> On Mon, Jan 20, 2020 at 19:03 Trey Harris wrote:
>>
>> On Mon, Jan 20, 2020 at 02:59 William Michels via perl6-users
>> wrote:
>>>
>>> Hi Yary (
Hi Yary (and Todd),
Thank you both for your responses. Yary, the problem seems to be with
"get". I can change 'while' to 'for' below, but using 'get' raku/perl6
actually returns fewer lines with "for" than it did with "while":
[1]mydir$ cat testthis_abc_def.txt
a
b
c
d
e
f
[2]mydir$ perl6 -e
Hi Joe, I tested the code you put up using the REPL, and I have to
start off by saying that I was unable to reproduce your results,
specifically where you creat the "@m" array. This could be a
REPL-specific issue, or a version-specific issue (mine is 2019.07.1
Perl 6.d):
mbook:~ homedir$ perl6
To
Hi Timo and thank you for the note.
Yes, since I was working in the REPL, I tried compacting Joe's code by
eliminating the "my %stash" line at the top, and adding "my" to the third
line.
I figured since Joe's code looked like a closure (curly brackets and all),
it wouldn't be an issue.
But the
On Tue, Jan 21, 2020 at 5:00 AM Tom Browder wrote:
>
> On Mon, Jan 20, 2020 at 22:16 ToddAndMargo via perl6-users
> wrote:
>>
>> On 2020-01-20 20:09, ToddAndMargo via perl6-users wrote:
>> > On 2020-01-20 19:55, ToddAndMargo via perl6-users wrote:
>
> ...
>>
>> > I think this is it:
>> >
>> >
> "I am not posting it here as it is several hundred lines long and then I'd
> get the finger wagged at me. Everything is spread across several modules."
On the contrary, this email list is the perfect place to put up
nascent Raku/Perl6 that you're having problems with. The issue is you
making
Todd, are you looking for a range smartmatch, or possibly the
".in-range" method (Rakudo-only, below)?
> my $u = 248
248
> say (-128..127).in-range($u);
Value out of range. Is: 248, should be in -128..127
in block at line 1
> my int8 $v = 0xF8;
-8
> say (-128..127).in-range($v);
True
>
"In
Agreed. Thank you Trey!
Trey (or anyone else in the know), when Perl6 was developed, was there
any consideration given to implementing pure "three-valued" (Kleene or
Priest) logical operators, similar to SQL and/or R ? Just curious.
https://en.wikipedia.org/wiki/Three-valued_logic
On Thu, Feb 20, 2020 at 2:25 PM ToddAndMargo via perl6-users
wrote:
>
> On 2020-02-19 23:21, Shlomi Fish wrote:
> > Hi Paul,
> >
>
> > Well, it is not unthinkable that a
> > https://en.wikipedia.org/wiki/Computer_algebra_system (CAS)-like system
> > will be
> > able to tell that the abstract
Hello All,
I've been reviewing literature that discusses using raku/perl6 as a
replacement for common unix utilities. One important unix utility is
"cat". I looked at docs/blogs and found a recommendation to use "$*IN"
along with "slurp" (references at bottom). Using a seven-line test
file
On Wed, Jan 1, 2020 at 10:57 AM ToddAndMargo via perl6-users
wrote:
>
> On 2020-01-01 01:58, JJ Merelo wrote:
>
>
>
> El mar., 31 dic. 2019 a las 21:56, ToddAndMargo via perl6-users
> () escribió:
>>
>> On 2019-12-31 09:17, JJ Merelo wrote:
>> > Hi,
>> >
>> > El mar., 31 dic. 2019 a las 5:54,
; [marble sandstone granite chert pumice limestone]}
> > my %together = monsters => @monsters, rocks => @rocks
> {monsters => [godzilla grendel wormface blob fingfangfoom tingler], rocks =>
> [marble sandstone granite chert pumice limestone]}
>
>
> -y
>
>
Regarding a recent discussion on flattening hash values. Here are some
posted answers:
>#Konrad Bucheli
> my %hash-with-arrays = a => [1,2], b => [2,3];
{a => [1 2], b => [2 3]}
> %hash-with-arrays.values>>.map({$_}) #makes a List
((1 2) (2 3))
> %hash-with-arrays.values>>.map({$_}).flat
(2 3 1
Hi Joe,
I was able to run the code you posted and reproduced the exact same
result (Rakudo version 2020.02.1..1 built on MoarVM version
2020.02.1 implementing Raku 6.d). I tried playing with file encodings a bit
(e.g. UTF8-C8), but I didn't see any improvement.
Yary has an issue posted
On Fri, May 15, 2020 at 7:33 PM Joseph Brenner wrote:
>
> Regex engines by their nature care a lot about order, but I
> occasionally want to relax that to match for multiple
> multicharacter subpatterns where the order of them doesn't
> matter.
>
> Frequently the simplest thing to do is just to
Hi Todd,
Yes, ** stands for exponentiation. And exponentiation has higher
precedence than multiplication. See below (I dropped a few zeros to
help clarify):
> put 2 * 10 ** 20
2
> put (2 * 10) ** 20
1048576
> put 2 * (10 ** 20)
2
> 20
Hello,
I'm interested in knowing the differences between the return values
when "say" is used compared to "put". My understanding is that "put"
returns Raku's internal representation of a value held by a variable,
while "say" is merely "put" with the .gist method called on it (a
"human readable",
Hello,
Can anyone answer why--in a one-liner using the "-pe" flag--the s///
and tr/// functions do not require a "." (dot) preceding the function
call? Clearly adding a "." (dot) before either one results in an error
(code below). Also, adding a ".=" (dot-equals) sign before the either
the s///
Thank you, Gianni (and Laurent). I really appreciate you both taking
the time to explain the intricacies of Raku/Perl6. Sincerely, Bill.
On Wed, May 6, 2020 at 3:46 AM Gianni Ceccarelli wrote:
>
> On 2020-05-06 William Michels via perl6-users
> wrote:
> > So if the following co
On Tue, May 5, 2020 at 8:01 AM Gianni Ceccarelli wrote:
>
> On 2020-05-05 William Michels via perl6-users
> wrote:
> > mbook:~ homedir$ perl6 -ne 'put .chop' demo1.txt
> > this is a test
> > I love Unix
> > I like Linux too
> > mbook:~ homedir$ perl6 -
1 - 100 of 295 matches
Mail list logo