46 CPU)
Result: FAIL
make[1]: *** [m-spectest5] Error 1
but install worked
andy@ANDY-HP:~/src/rakudo-star-2016.11$ perl6 -v
This is Rakudo version 2016.11 built on MoarVM version 2016.11
implementing Perl 6.c.
--
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
l/bin/moar (noticing it was saying "found a install/bin/moar version
xx, using that) and re-re-ran rakudobuild and that one worked.
--
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
rew line 58.
main::run("/usr/local/bin/perl Configure.pl --backends=moar --gen-moar
-"...) called at /Users/afbach/.rakudobrew/bin/rakudobrew line 386
main::build_impl("moar", undef, "") called at
/Users/afbach/.rakudobrew/bin/rakudobrew line 116
--
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
Hi,
Turns out this bug was filed for p5 (I thought I was looking at the p6 bug
list) but I saw this exactly today, trying to build, via rakudobrew, on my
mac book. Just checking if this is a known thing or not.
--
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
get/put test might be ftp connection failures, though. Configuration
and/or firewall problems. If the rest all passed, you might just force the
install and see if it works.
Net::FTP guide:
http://www.perlmonks.org/?node_id=190020
--
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
fore, e.g.
my $y="blah(bad stuff abc)yuk(more yuk)";
$y =~ m |.*\(([^)]*)\)|; # $0 has "bad stuff abc
my $x="blah[good stuff 123]yuk"; # wrong brackets
$x =~ m |.*\(([^)]*)\)|;
# $0 still has "bad stuff abc"
if ( defined $0 ) {
# probably not what you wanted.
--
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
gt;
Just checking but there are no "continue" blocks for loop control stmts
anymore, P6? Google suggested maybe foreach loops but that was back in 2011.
--
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
cursor
O - open a line above
for pasting see
:help paste
but vim also supports yanking into name buffers, so you can save as many as
you want (well, 26?) and the put from them
:help yank
:help put
vim does everything, you just have to find it. ;->
--
a
Andy Bach,
afb...@gmail.com
608 658-1
an be block too:
https://docs.perl6.org/language/5to6-nutshell.html#Flow_Control_statements
my $str = '';
for 1..5 {
next if $_ % 2 == 1;
$str ~= $_;
NEXT {
$str ~= ':'
}
}
--
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
uot;hi mom\n")' > /dev/null
hi mom
"note" appears to append a new line and p6 warn appears to always add the
extra info. Looking at
https://docs.perl6.org/routine/warn
I see warn is doing even more that.
Thanks.
On Fri, Sep 15, 2017 at 3:58 PM, ToddAndMargo <toddandma...@zoho.c
or it at one time.
>>
>
> Everyone does at one time :) It's really useful for debugging, but you
> generally strip it out of production code.
>
> --
> brandon s allbery kf8nh sine nomine
> associates
> allber...@gmail.com
> ballb...@sinenomine.net
> unix, openafs, kerberos, infrastructure, xmonad
> http://sinenomine.net
>
--
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
r note on <<>> and such. This example
> > puzzles me. Why the space?
>
> It's the same as in perl5, an array interpolated in a string shows its
> elements with spaces in between. Your example has an array stored in
> $y.
>
> perl -e 'my @y=("ab",12,"xx");print "y=@x\n"'
> y=ab 12 xx
>
> perl6 -e 'my $y=("ab",12,"xx");print "y=$x\n"'
> y=ab 12 xx
>
>
> -y
>
--
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
shIndexTest.pl6
> DebugTrace = 1
> smtp = smtps://smtp.zoho.com
> port = 465
> username = la...@zoho.com
> password = NaYukYukYuk
> from = la...@zoho.com
> to = cu...@zoho.com m...@zoho.com
>Subject = Stooges
> Text = Certainly!
> FileName =
>
> FileName =
> Text = Certainly!
>Subject = Stooges
> to = cu...@zoho.com m...@zoho.com
> from = la...@zoho.com
> password = NaYukYukYuk
> username = la...@zoho.com
> port = 465
> smtp = smtps://smtp.zoho.com
> DebugTrace = 1
>
--
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
)
> say qww{$a b c}.perl
("\$a", "b", "c")
On Wed, Oct 4, 2017 at 10:22 PM, Todd Chester <toddandma...@zoho.com> wrote:
> On 10/04/2017 08:20 PM, Todd Chester wrote:
>
>> So in this context "{$x}" means insert (interpolate) a
>> variable into the list? I was thinking it meant to
>> insert a variable into a string. Did saying <<>>
>> automatically tell Perl6 that this was a list
>> and not a sting?
>>
>
>
> is
><<>>
> synonymous with
>qw[]
> ?
>
--
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
creating a blank
> template.\n" );
> PrintRedErr ( "Please edit this template and try again. Cowardly
> existing. Bummer dude.\n\n" );
> exit 2;
> }
>
> CreateSmtpIni();
>
>
>
> # CheckRaid.pl6
> key = value =<>
> key = value =<>
> write bytes requires an object with REPR MVMOSHandle (got VMNull with REPR
> Null)
> in sub CreateSmtpIni at ./CheckRaid.pl6 line 52
> in sub GetSmtpIni at ./CheckRaid.pl6 line 62
> in block at ./CheckRaid.pl6 line 143
>
> Line 52 is
> else { $SmtpHandle.print( "$key=\n" ); }
>
> # cat CheckRaid.pl6.ini
> # SmtpIni file for for CheckRaid.pl6
> #This file must be owned by root.root and have a permission of 400
> #Do not use a space after the = sign.
> #
> Subject=
>
--
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
there seems to be:
>>
>> > my $x = "abc"
>> abc
>> > $x [R~]= "xyz"
>> xyzabc
>> > $x
>> xyzabc
>>
>>
> :'(
>
> What am I doing wrong?
>
>
> $ perl6 -e 'my $x="abc"; $x [R~]= "yyz"
$y=$y";'
>>> $x=abc $y=xyz abc def
>>>
>>>
>>>
>>> Many thanks,
>>> -T
>>>
>>>
>>>
>>> Hi Guys,
>>>
>>> I am trying to document for mys
the *use* keyword, followed by explicit parameters, which
is followed by a block that can use those parameters and return a value.
But I don't quite (er, okay, at all) understand what the point is. Just
curious if P6 has anything along this sort thing.
--
a
Andy Bach,
afb...@gmail.com
608 658
o count
>> > graphemes
>> > > or codepoints?
>> > >
>> >
>> > I want to know the number of letters A..Z (ascii 65..90), a..z
>> > (ascii 97..122),
>> >
>> > and the numbers of numbers 0..9 (ascii 48..57) and decimal points
>> > (ascii 46).
>> >
>> >
>> > Once again, that's not so simple. You don't want other kind of numbers?
>> > Would á count as one a and one '?
>> >
>> >
>> > I won't have an weird characters in these stings, such as !@#$^&%(
>> >
>> >
>> > Whoa, whoa, whoa, you calling á and ñ weird?
>> >
>> > Anyway, if that's what you want, just filter those precise graphemes
>> and
>> > count the number of graphemes.
>> >
>> > Cheers
>> >
>> > JJ
>>
>> "abcrd-12.3.4" would be five letters, six numbers, and one
>> I don't care.
>>
>
>
> --
> JJ
>
>
>
--
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
I do have to use `.*?` in the middle when matching two things
>>
>> $ perl6 -e 'my $x="abcsdd1efg1234xyz"; $x ~~ m/(sd..).*?(12..)/; say
>> "$0, $1"'
>> sdd1, 1234
>>
>
> The '?' is not necessary ;-)
>
> perl6 -e 'my $x="abcsdd1efg1234xyz"; $x ~~ m/(sd..).*(12..)/; say "$0, $1"'
> sdd1, 1234
>
>
> Cheers!
--
a
Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk
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:
#
> , 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") for
and perl just gets the first as the "program"
From: William Michels via
> Still, it's just "works for me":
seq 100 | time perl6 -ne 'my $y += $_; END { print $y; }'
I think that's still the wrong one - your missing the "Int"
$ seq 100 | perl6 -ne 'my Int $y += $_; END { print $y; }'
5050
though that works here, admittedly, my p6 is sort old
This is
g, as $y is scoped to the -n while loop ;->
From: William Michels
Sent: Thursday, September 26, 2019 3:01 PM
To: yary
Cc: perl6 ; Andy Bach ;
Joseph Brenner ; Elizabeth Mattijsen ; Marc
Chantreux ; Vittore Scolari
Subject: Re: anything faster than say [+] lines?
Hi Yary,
Honestly, I just tried r
-e
Cannot put a type constraint on an 'our'-scoped variable
at -e:1
--> our Int $y⏏ += $_; END { say $y; }
expecting any of:
constraint
From: Brad Gilbert
Sent: Thursday, September 26, 2019 9:52 PM
To: Andy Bach
Cc: William Michels ; yary ; perl6
;
> At the top of all my Perl 6 programs, I place
> #!/usr/bin/env perl6
>
> So I decided to run env by itself and see what I got:
>
> $ /usr/bin/env perl6
> You may want to `zef install Readline` or `zef install
> Linenoise` or use rlwrap for a line editor
>
> To exit
uedes
Sent: Tuesday, February 11, 2020 7:00 PM
To: Andy Bach ; perl6-users
Subject: Re: variable as subroutine?
Sorry, I sent my answer just for you.
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 $
Try:
$foo(2).say
or
s
Wednesday, February 12, 2020 1:27 PM
To: Aureliano Guedes
Cc: Andy Bach ; perl6-users
Subject: Re: variable as subroutine?
On Wed, Feb 12, 2020 at 8:12 AM Aureliano Guedes
mailto:guedes.aureli...@gmail.com>> wrote:
On Wed, Feb 12, 2020 at 1:09 PM Andy Bach
mailto:andy_b...@wiwb.usco
@Result = qqx { C:/Windows/System32/fsutil.exe usn readdata \"$FileName\"
}.lines;
Doesn't windows do something special for files with spaces in them? Hm,
$ type "hi mom" > "test 1"
$ dir test
$ dir "test 1"
but, you're right, I couldn't find a combination of dbl, single, q, qq, qqx, qx
rakudo 2020.01 built on moar 2020.01.1 implementing perl 6.d
From: Todd Chester via perl6-users
Sent: Friday, February 28, 2020 4:57 AM
To: perl6-users@perl.org
Subject: Re: qqx with quotes
On 2020-02-27 15:38, Andy Bach wrote:
> Win10 with a new raku inst
org
Subject: Re: qqx with quotes
On 2020-02-27 11:05, Andy Bach wrote:
> This did work
> my $file = 'hi mom'
> $file ~~ s:g/\s+/*/;
> my $res = qqx(dir $file);
> say $res;
Hi Andy,
What OS did you test this on?
-T
This did work
my $file = 'hi mom'
$file ~~ s:g/\s+/*/;
my $res = qqx(dir $file);
say $res;
From: Andy Bach
Sent: Wednesday, February 26, 2020 4:16 PM
To: ToddAndMargo via perl6-users
Subject: Re: qqx with quotes
@Result = qqx { C:/Windows/System32/fsutil.exe
I have a few less related questions
>> those are 3 ways to write the same sub:
sub foo ($x) { $x * $x }
my = -> $x { $x * $x }
my = * * *;
> A Note on Marc's comment:
my = * * *
is not the same as:
my = -> $x { $x * $x }
it is the same as:
my = -> $x, $y { $x * $y }
Okay, "* *
From: Simon Proctor
Sent: Tuesday, February 11, 2020 9:27 AM
To: Andy Bach
Cc: perl6-users
Subject: Re: variable as subroutine?
The * * * call generates a WhateverCode block. This is expecting 2 arguments.
-> $x { $x * $x } is taking one argument.
The best document
" 'while' ...will stop when it encounters a false line--typically an
empty line or '0' ".
Wasn't that the point of p5's defined
while ( defined(my $line = <> ) ) {
or (previously lexified '$val'):
print "$val\n" while defined($val = pop(@ary));
From: William
Just a guess, but isn't it possible that this is a quoting problem? Doing work
from the Winx cmd line and trying to match up the single/double
quote/multi-line mess is a way towards madness ... if you put your "-e" program
in a file and run that, do you get a different error?
Just my 2 cents,
To get access to them:
--> sysdm.cpl
--> Advanced (tab at the top)
--> Environmental Variables (button, lower right)
--> Path, Edit, add to the end
;C:\Program Files\Git\usr\bin
I edited my local user path before installing:
C:\Program Files (x86)\Common
> my %stash = monsters => @monsters, rocks => @rocks
{monsters => [godzilla grendel wormface blob fingfangfoom tingler], rocks =>
[marble sandstone granite chert pumice limestone]}
> my @more_rocks = << marble sandstone granite chert pumice limestone >>
[marble sandstone granite chert pumice
rror while compiling:
Undeclared routine:
morerocks used at line 1
>> say @(%stash{*}).[0].[0]
morerocks => [marble sandstone granite chert pumice limestone]
a
____
From: Vadim Belman
Sent: Friday, March 13, 2020 12:50 PM
To: Andy Bach
Cc: Willia
e colons are/are not doing. And we can get to
those "inner" array elements via
> say %stash[1]
sandstone
From: Vadim Belman
Sent: Friday, March 13, 2020 12:50 PM
To: Andy Bach
Cc: William Michels via perl6-users ; Joseph Brenner
; Timo Paulssen ; yary
Subject: Re: stashin
ine 1
...
AA
but the named doesn't
raku -e 'for -> $alpha { for (1..14) { state $sv = $alpha; say $sv;
$sv++; printf("d: %s\n", $sv ) } }'
AA
d: AB
AB
d: AC
From: William Michels
Sent: Tuesday, September 1, 2020 5:30 PM
To: Andy Bach
Cc: y
AA
d2: 1
AB
d2: 2
...
By Geoffrey, I think I almost have it!
Thanks!
From: yary
Sent: Tuesday, September 1, 2020 6:16 PM
To: Andy Bach
Cc: William Michels ; perl6-users
Subject: Re: print particular lines question
Every time $ shows up, it is a differe
I'm barely hanging on with the "$" so ... so from:
raku -e 'for -> $alpha { for (1..14) { print (state $ = $alpha)++ ~ "
" } }'
AA AB AC AD AE AF
I tried an actual, er, non-anon var
# raku -e 'for -> $alpha { for (1..14) { print (state $sv = $alpha)++
~ " " } }'
AA AB AC AD AE AF ...
> raku -ne '.say if $++ == 3|2|5' Lines.txt
OT, maybe, but is
perl -ne 'print if $. =~ /\b[325]\b/' Lines.txt
or
perl -ne 'print if $c++ =~ /\b[436]\b/' Lines.txt
the best you can do in P5?
a
Andy Bach, BS, MSCMECFA
Systems Mangler
Internet: andy_b...@wiwb.uscourts.gov<mailto:
rom: William Michels
Sent: Monday, August 31, 2020 10:28 AM
To: Brian Duggan
Cc: Andy Bach ; perl6-users
Subject: Re: print particular lines question
How would P5 handle line numbers > 10 ? Not getting back line #11 with
the P5 examples below:
$ raku -ne '.say if ++$ == 3|2|5|11' test_lin
7,3]; " lines.txt
Though:
C:\> "\Program Files (x86)\rakudo\bin\raku.exe" -ne "my @x = lines(); say
@x[0,1,7,3]; " lines.txt
(Line 1 Line 2 Line 8 Line 4)
Cannot do 'get' on a handle in binary mode
in block at -e line 1
a
Andy Bach, BS, MSCMECFA
Systems Mangler
Int
> Assigning `my @x=$_.lines` puts everything into $x[0]
Trying this on windows
C:\> raku.exe -e "my @x = 'lines.txt'.IO.lines; say @x[1,7,3].join(qq~\n~); "
Line 1
Line 7
Line 3
or
C:\> raku.exe -e " say 'lines.txt'.IO.lines[1,7,3].join(qq~\n~); "
Line 1
Li
quot; -ne "my @x =
$*IN.lines(); say @x[0,1,7,3]; "
(Line 1 Line 2 Line 8 Line 4)
a
Andy Bach, BS, MSCMECFA
Systems Mangler
Internet: andy_b...@wiwb.uscourts.gov<mailto:andy_b...@wiwb.uscourts.gov>
Voice: (608) 261-5738, Cell: (608) 658-1890
"The three great problems o
ind a $. raku-ism.
https://docs.raku.org/language/variables#Special_variables
Pretty cool - I didn't know about the bare "$" as a magic state var.
a
Andy Bach, BS, MSCMECFA
Systems Mangler
Internet: andy_b...@wiwb.uscourts.gov<mailto:andy_b...@wiwb.uscourts.gov>
Voice: (608) 2
r code executes.
a
p.s.
"cryptogram", at least in my newspaper, is a quote and author's name encoded in
a substitution cipher (G for A etc) to solve.
Andy Bach, BS, MSCMECFA
Systems Mangler
Internet: andy_b...@wiwb.uscourts.gov<mailto:andy_b...@wiwb.uscourts.gov>
Voice: (608) 261-573
#!/usr/bin/env raku
my Str $x;
if $x.starts-with( "[" ) &&
$x.contains( "]" )
{ say "Passed"; } else { say "Failed"; }
K:\Windows\NtUtil>raku Contains.Test.pl6
Cannot resolve caller starts-with(Str:U: Str:D); none of these
signatures match
(Cool:D: Cool:D $needle, :i(:$ignorecase)!,
>> Repeating any of this material won't help you. So what is a method to
>> you? How do you think it might be used?
> Some times methods are great for human readability. I would like to have
> both in my tool chest.
Not sure that's really answering the question Richard was asking. I believe
> Would some kind soul please explain to me what is going on line by line with
> the "class" statement.
> cupsGetDests definition can be found at:
https://www.cups.org/doc/cupspm.html
The point of the class is to create a "template" in raku matching the C
structure of the cups stuct. That
> this command runs OUTSIDE the shell. There are no environmental variables
> to be found such as $HOME
Well, not exactly none, but a limited env
$ raku -e 'my $pA = Proc::Async.new( "env" ); $pA.start;'
TERM=xterm
XDG_RUNTIME_DIR=/run/user/1000
XDG_SESSION_TYPE=tty
> try out these
3 .. 7
3 ..^ 7
3 ^.. 7
3 ^..^ 7
Is the last one called the kitten or the bat operator? ;->
Happy New Year to all those for whom the year ends tonight. For the rest Happy
Tomorrow!
From: yary
Sent: Wednesday, December 30, 2020 9:06 PM
To:
> Cannot sent this email in 'plain text' mode as ATOM SYMBOL disappears.
I was impressed I could copypasted that in the text/terminal sesion of raku's
REPL and have it work. As a matter of fact:
> sub foo($) { ++⚛$c }('a' | 'b,b' | 'c');
any(1, 2, 3)
> say $c;
3
but, trying it without the
ttps://docs.raku.org/type/atomicint
https://docs.raku.org/language/unicode_ascii#index-entry-%E2%9A%9B
As to "this completely lost me": there was a mistype and "taking" shoud've been
"talking". Sorry for this.
"Weird/will Ass Thing" made me totally lost as I've no idea wh
object of type NQPMu
> my Int $g = 0;
0
> sub foo($) { ++$g }('a' | 'b,b' | 'c');
any(1, 2, 3)
>
HTH, Bill.
On Mon, May 24, 2021 at 2:40 PM Andy Bach
mailto:andy_b...@wiwb.uscourts.gov>> wrote:
> Cannot sent this email in 'plain text' mode as ATOM SYMBOL disappears.
I was
my atomicint $c = 0;
sub foo($) { ++⚛$c }('a' | 'b,b' | 'c');
say $c;
I was sort of hanging on by my fingertips (this completely lost me:
>Or, taking about tricks:
('a' | 'b,b' | 'c')».&(-> $ { ++⚛$c });
) but what's that cabbage thing before $c? Oh, and WAT is" Weird/will Ass
Thing"?
퐚퐤퐮™ programming language v6.d.
Built on MoarVM version 2020.10.
On Tue, May 25, 2021 at 8:38 AM Gianni Ceccarelli
mailto:dak...@thenautilus.net>> wrote:
On Tue, 25 May 2021 15:16:03 +0000
Andy Bach mailto:andy_b...@wiwb.uscourts.gov>>
wrote:
> > However I had to use "Int&quo
Very impressive and complete explanation, thanks!
> I'm inclined to view it as pretty good. I also think it might be seriously
> hard to improve.
As we're looking a known "trap" could this one append of those (my favorite
kind) leading questions "Did you mean to pass ...?"
I "misread"
say 1, 1, * + * ...^ *>= 100;
thinking "shouldn't it be '<=' as you want the total to be less than 100?" but
$ raku -e 'say 1, 1, * + * ...^ *<= 100;'
===SORRY!=== Error while compiling -e
Whitespace required before <= operator
at -e:1
--> say 1, 1, * + * ...^ *<= 100;⏏
Check out the following GitHub repo - it has a Perl6 and a Raku section, along
with pretty much every other language!
https://github.com/EbookFoundation/free-programming-books/blob/master/books/free-programming-books-langs.md#perl
> raku is now my tool of choice when
* manipulexity is important
I had to look it up
Larry Wall: Manipulexity and Whipuptitude - Fortune
If you were a Unix programmer you either programmed in C or shell. And there
really wasn't much in between. There were these little languages that we used
on
> I'd thought that that would confirm that both elements were Int:
say do given all(3,7) { when Int { "both are Int" }; default {"not similar"}
};
## not similar
I get a different result
$ raku -e ' say do given all(3,7) { when Int { "both are Int" }; default
{"not similar"} };'
both are
> You could think: what does "comb(2)" do? Perhaps look at the documentation?
> And then maybe realize that Simon forgot that the comb(2) should be a method
> on $hex? Otherwise, how would it know what to parse?
Ah, I did wonder why $hex wasn't in the 2nd line in any way.
> my $hex =
cured the issue. The first run of
> a pl6 program after that took about a minute to
> compile, but after that happy camping returned.
>
> HTH someone else,
> -T
>
--
Andy Bach
afb...@gmail.com
Not at my desk
I always took [1]
As alternatives to "&&" and "||" when used for control flow, Perl provides
the "and" and "or" operators (see below). The short-circuit behavior is
identical. The precedence of "and" and "or" is much lower, however, so
that you can safely use them after a list
ice_2 is only evaluated if the $answer got assigned a false
> value, and then it gets evaluated in void context, discarding its value.
>
> Try this in Raku - what does it say? Do you still prefer "or" over "||" ?
>
> my $answer = 0 or 5;
>
> say
> I have found that when using `say` for debugging, it has been known to print
> out the
> previous value of a variable and not the current value. `print` does not do
> this.
That would certainly be a surprise to me. I'd think I was misunderstanding my
program, rather than a bug in say.
70 matches
Mail list logo