Re: Need dynamic variables help

2017-01-13 Thread ToddAndMargo

On 01/13/2017 08:14 AM, Brandon Allbery wrote:
This is also true for Perl 5, aside from it using . instead of ~ for 
concatenation.


An error I constantly make.  It is indeed a . not a + in Perl 5. Thank you!

--
~~
Computers are like air conditioners.
They malfunction when you open windows
~~


Re: JIT?

2017-01-13 Thread ToddAndMargo

On 01/13/2017 05:18 AM, Steve Mynott wrote:
The most important difference is that the JIT version is 64 bit and 
the "no JIT" is 32 bit.


So if you are running a modern Windows you almost certainly want the 
64 bit (JIT) version


Also the JIT version is a more recent version.

S


I missed that (32 vs 64).  Thank you!

--
~~
Computers are like air conditioners.
They malfunction when you open windows
~~


Re: panda's port?

2017-01-13 Thread ToddAndMargo

On 01/13/2017 05:09 PM, ToddAndMargo wrote:

Hi All,

   Anyone know what port and protocol (tcp, udp) panda uses
to install modules?

Many thanks,
-T



Figured it out.  It is using "git" or port 9418 tcp.

--
~~
Computers are like air conditioners.
They malfunction when you open windows
~~


panda install error

2017-01-13 Thread ToddAndMargo

Hi All,

   How do I fix this?

Many thanks,
-T

# /usr/share/perl6/site/bin/panda install Net::FTP
==> Fetching Net::FTP
==> Building Net::FTP
==> Testing Net::FTP
t/01-load.t . ok
t/02-login.t  ok
t/03-directory.t  ok
t/04-list.t . ok

# Failed test 'Get file stor.txt success'
# at t/05-put-get.t line 11

# Failed test 'Put file some.txt success'
# at t/05-put-get.t line 12
# Looks like you failed 2 tests of 2
t/05-put-get.t ..
Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/2 subtests
t/06-mkdir-rmdir.t .. ok

Test Summary Report
---
t/05-put-get.t(Wstat: 512 Tests: 2 Failed: 2)
  Failed tests:  1-2
  Non-zero exit status: 2
Files=6, Tests=21, 17 wallclock secs ( 0.04 usr  0.01 sys +  7.19 cusr  
0.52 csys =  7.76 CPU)

Result: FAIL
test stage failed for Net::FTP: 0
  in method install at 
/usr/share/perl6/site/sources/582CB7486602954A4601BDCE5A0EAC54B05DA58A 
(Panda) line 186
  in method resolve at 
/usr/share/perl6/site/sources/582CB7486602954A4601BDCE5A0EAC54B05DA58A 
(Panda) line 263
  in sub MAIN at 
/usr/share/perl6/site/resources/E0D978079BB5081DE986D058BB8AB08252F05CC8 
line 20
  in block  at 
/usr/share/perl6/site/resources/E0D978079BB5081DE986D058BB8AB08252F05CC8 
line 165



Failure Summary

Net::FTP(
*test stage failed for Net::FTP: 0)


--
~~
Computers are like air conditioners.
They malfunction when you open windows
~~


Re: Need dynamic variables help

2017-01-13 Thread Brandon Allbery
On Fri, Jan 13, 2017 at 4:33 AM, Todd Chester  wrote:

> Will "~"
> always replace "+" for this, or only with a dynamic variable?
>

~ is always string concatenation; + is never correct for strings unless you
want to coerce the string to a number (which is what led to your error
message). This is also true for Perl 5, aside from it using . instead of ~
for concatenation.


-- 
brandon s allbery kf8nh   sine nomine associates
allber...@gmail.com  ballb...@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonadhttp://sinenomine.net


Re: Subroutine question

2017-01-13 Thread ToddAndMargo

  
  
On 01/13/2017 06:53 PM, Brandon Allbery
  wrote:


  

  On Fri, Jan 13, 2017 at 9:50 PM,
ToddAndMargo 
wrote:

  Is their example a boo-boo? 
:$type,  # Optional

How is this "optional" when "!" is the default?

  
  
  You misunderstood that section: it is the default only for
  positional parameters.

  


Thank you!

I almost understand what you said.  What do you/they mean by 
"positional parameters"? 

I highlighted all "positional" on the page. But, it is just in not
sinking in.
  



Re: Any trick to installing a module in Windows?

2017-01-13 Thread ToddAndMargo

  
  
On 01/13/2017 07:47 PM, Brandon Allbery
  wrote:


  

  On Fri, Jan 13, 2017 at 10:45 PM,
ToddAndMargo 
wrote:

  I am
trying to install Net::FTP in Windows 7.  Panda's
install
is error city.

  
  
  I am guessing you have to either suppress the tests or
  (perhaps more likely) provide an FTP proxy of some kind, based
  on the errors you reported earlier.
  
  
  

  


What ports are panda using other than git?
-- 
~~
Computers are like air conditioners.
They malfunction when you open windows
~~
  



Any trick to installing a module in Windows?

2017-01-13 Thread ToddAndMargo

Hi All,

I am trying to install Net::FTP in Windows 7.  Panda's install
is error city.

Any trick to doing this?

Many thanks,
-T

--
~~
Computers are like air conditioners.
They malfunction when you open windows
~~


Subroutine question

2017-01-13 Thread ToddAndMargo

  
  
Hi All,

I am reading up on subroutines over at:
 https://en.wikibooks.org/wiki/Perl_6_Programming/Subroutines

The above states:

   In a subroutine declaration, named parameters must come after
   all required and optional positional parameters. Named
parameters 
   are treated as optional by default unless they are followed
by a !.
       Actually, you can put a ! after required
positional parameters as well, 
   but that's the default.

  sub mySub(
:$name!, # Required
:$type,  # Optional
:$method?# Still optional
)

Is their example a boo-boo? 
:$type,  # Optional

How is this "optional" when "!" is the default?

What am I missing?

Many thanks,
-T



-- 
~
I am Windows
I am the Blue Screen of Death
No one hears your screams
~

  



Re: Any trick to installing a module in Windows?

2017-01-13 Thread Brandon Allbery
On Fri, Jan 13, 2017 at 10:51 PM, ToddAndMargo 
wrote:

> What ports are panda using other than git?


This is not a fault in panda. The Net::FTP module implements the FTP
protocol, which runs on TCP ports 20 and 21 --- but in active mode it will
attempt to connect back to your machine, and in passive mode it will make
an outgoing connection to a port specified by the server on the command
channel. FTP is not a good idea behind restrictive firewalls; you will not
be able to get it to work without a smart firewall that tracks the FTP
command channel to open a hole for the requested port. If you don't
absolutely need this module, consider just not installing it; if you do
need it for some specific purpose, you probably want to talk to the
admin(s) of the site you are working with and try to get permission to use
a more modern protocol like scp or the sftp module of ssh.

-- 
brandon s allbery kf8nh   sine nomine associates
allber...@gmail.com  ballb...@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonadhttp://sinenomine.net


Re: Any trick to installing a module in Windows?

2017-01-13 Thread Brandon Allbery
On Fri, Jan 13, 2017 at 10:45 PM, ToddAndMargo 
wrote:

> I am trying to install Net::FTP in Windows 7.  Panda's install
> is error city.
>

I am guessing you have to either suppress the tests or (perhaps more
likely) provide an FTP proxy of some kind, based on the errors you reported
earlier.

-- 
brandon s allbery kf8nh   sine nomine associates
allber...@gmail.com  ballb...@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonadhttp://sinenomine.net


Re: Subroutine question

2017-01-13 Thread Brandon Allbery
On Fri, Jan 13, 2017 at 9:50 PM, ToddAndMargo  wrote:

> Is their example a boo-boo?
> :$type,  # Optional
>
> How is this "optional" when "!" is the default?
>
>
You misunderstood that section: it is the default only for positional
parameters.


-- 
brandon s allbery kf8nh   sine nomine associates
allber...@gmail.com  ballb...@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonadhttp://sinenomine.net


Re: Subroutine question

2017-01-13 Thread Brandon Allbery
On Fri, Jan 13, 2017 at 10:32 PM, ToddAndMargo 
wrote:

> I almost understand what you said.  What do you/they mean by
> "positional parameters"?
>

foo(1, 5, :bar)

1 and 5 are positional: what they represent can only be determined by
knowing their position in the parameter list. Which is why they're required
by default; if they could be optional, how would it know whether foo(5)
represented a missing first vs. missing second parameter?

:bar is a named parameter: it can occur anywhere, and can be meaningfully
optional because you have to name it to use it; whereas the positional
parameters can only be recognized by their position with respect to other
positional parameters.


-- 
brandon s allbery kf8nh   sine nomine associates
allber...@gmail.com  ballb...@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonadhttp://sinenomine.net


Re: Need dynamic variables help

2017-01-13 Thread Fernando Santagata
Hi,

As Siavash pointed out, the Perl6 concatenation operator is '~'.

On Fri, Jan 13, 2017 at 10:33 AM, Todd Chester 
wrote:

>
>
> On Fri, Jan 13, 2017 at 10:01 AM, Todd Chester 
> wrote:
>
>> Hi All,
>>
>> I am trying to understand how to read variables from the
>> shell's environment.  I am reading this:
>>
>> https://docs.perl6.org/language/variables#Dynamic_variables
>>
>> 
>> #!/usr/bin/perl6
>> # print "Display = " + %*ENV{'DISPALY'} + "\n";
>> print "Perl Version = " + $*PERL + "\n";
>> 
>>
>>
>> $ ./env.pl6
>> Cannot resolve caller Numeric(Perl: ); none of these signatures match:
>> (Mu:U \v: *%_)
>>   in block  at ./env.pl6 line 3
>>
>>
>> What am I missing?  I'd like to get the one I commented
>> out on line 2 working too.  That gives me the following error:
>>
>> Use of uninitialized value of type Any in numeric context
>>   in block  at ./env.pl6 line 2
>> Cannot convert string to number: base-10 number must begin with valid
>> digits or '.' in '⏏Display = ' (indicated by ⏏)
>>   in block  at ./env.pl6 line 2
>>
>>
>> Many thanks,
>> -T
>>
>
>
>
> --
> Fernando Santagata
>
>
> On 01/13/2017 01:20 AM, Fernando Santagata wrote:
>
> Try:
>
> print "Perl Version = " ~ $*PERL ~ "\n";
>
> or better:
>
> say "Perl Version = $*PERL";
>
> OTH
>
>
>
> Hi Fernando,
>
> That fixed it.  I was using Perl5's string concatenation.  Will "~"
> always replace "+" for this, or only with a dynamic variable?
>
> On line two, I misspelled "DISPLAY".
>
> 
> #!/usr/bin/perl6
> print "Display = " ~ %*ENV{'DISPLAY'} ~ "\n";
> print "Perl Version = " ~ $*PERL ~ "\n";
> 
>
> ./env.pl6
> Display = :0.0
> Perl Version = Perl 6
>
>
> Thank you!
> -T
>
>
>


-- 
Fernando Santagata


Re: Need dynamic variables help

2017-01-13 Thread Fernando Santagata
Try:

print "Perl Version = " ~ $*PERL ~ "\n";

or better:

say "Perl Version = $*PERL";

OTH

On Fri, Jan 13, 2017 at 10:01 AM, Todd Chester 
wrote:

> Hi All,
>
> I am trying to understand how to read variables from the
> shell's environment.  I am reading this:
>
> https://docs.perl6.org/language/variables#Dynamic_variables
>
> 
> #!/usr/bin/perl6
> # print "Display = " + %*ENV{'DISPALY'} + "\n";
> print "Perl Version = " + $*PERL + "\n";
> 
>
>
> $ ./env.pl6
> Cannot resolve caller Numeric(Perl: ); none of these signatures match:
> (Mu:U \v: *%_)
>   in block  at ./env.pl6 line 3
>
>
> What am I missing?  I'd like to get the one I commented
> out on line 2 working too.  That gives me the following error:
>
> Use of uninitialized value of type Any in numeric context
>   in block  at ./env.pl6 line 2
> Cannot convert string to number: base-10 number must begin with valid
> digits or '.' in '⏏Display = ' (indicated by ⏏)
>   in block  at ./env.pl6 line 2
>
>
> Many thanks,
> -T
>



-- 
Fernando Santagata


Re: Need dynamic variables help

2017-01-13 Thread Siavash

Hi,

`+` is addition operator:
https://docs.perl6.org/routine/$PLUS_SIGN#(Operators)_infix_+

String concatenation operator is `~`:
https://docs.perl6.org/routine/$TILDE#(Operators)_infix_~

So you should write:
print "Perl Version = " ~ $*PERL ~ "\n";

Or use `say` or `put` to add a newline:
say "Perl Version = $*PERL";

So for your commented line, you can write:
say "Display = %*ENV"

On 2017-01-13 09:01:32 GMT, Todd Chester wrote:
> Hi All,
>
> I am trying to understand how to read variables from the
> shell's environment.  I am reading this:
>
> https://docs.perl6.org/language/variables#Dynamic_variables
>
> 
> #!/usr/bin/perl6
> # print "Display = " + %*ENV{'DISPALY'} + "\n";
> print "Perl Version = " + $*PERL + "\n";
> 
>
>
> $ ./env.pl6
> Cannot resolve caller Numeric(Perl: ); none of these signatures match:
>  (Mu:U \v: *%_)
>in block  at ./env.pl6 line 3
>
>
> What am I missing?  I'd like to get the one I commented
> out on line 2 working too.  That gives me the following error:
>
> Use of uninitialized value of type Any in numeric context
>in block  at ./env.pl6 line 2
> Cannot convert string to number: base-10 number must begin with valid 
> digits or '.' in '⏏Display = ' (indicated by ⏏)
>in block  at ./env.pl6 line 2
>
>
> Many thanks,
> -T


Need dynamic variables help

2017-01-13 Thread Todd Chester

Hi All,

I am trying to understand how to read variables from the
shell's environment.  I am reading this:

https://docs.perl6.org/language/variables#Dynamic_variables


#!/usr/bin/perl6
# print "Display = " + %*ENV{'DISPALY'} + "\n";
print "Perl Version = " + $*PERL + "\n";



$ ./env.pl6
Cannot resolve caller Numeric(Perl: ); none of these signatures match:
(Mu:U \v: *%_)
  in block  at ./env.pl6 line 3


What am I missing?  I'd like to get the one I commented
out on line 2 working too.  That gives me the following error:

Use of uninitialized value of type Any in numeric context
  in block  at ./env.pl6 line 2
Cannot convert string to number: base-10 number must begin with valid 
digits or '.' in '⏏Display = ' (indicated by ⏏)

  in block  at ./env.pl6 line 2


Many thanks,
-T


panda?

2017-01-13 Thread Todd Chester

Hi All,

I am using Fedora Core 25.  There is no sign of "panda"
in the repo (or I don't know what it is called).

I need to install Net::FTP.  No sign of that in the repos either
(or I don't know what it is called either).

How do I install Net::FTP?

Many thanks,
-T


Re: Need dynamic variables help

2017-01-13 Thread Siavash

But in Perl 5 `.` is string concatenation operator, not `+`

On 2017-01-13 09:33:10 GMT, Todd Chester wrote:
>>
>> On Fri, Jan 13, 2017 at 10:01 AM, Todd Chester > > wrote:
>>
>> Hi All,
>>
>> I am trying to understand how to read variables from the
>> shell's environment.  I am reading this:
>>
>> https://docs.perl6.org/language/variables#Dynamic_variables
>> 
>>
>> 
>> #!/usr/bin/perl6
>> # print "Display = " + %*ENV{'DISPALY'} + "\n";
>> print "Perl Version = " + $*PERL + "\n";
>> 
>>
>>
>> $ ./env.pl6
>> Cannot resolve caller Numeric(Perl: ); none of these signatures match:
>> (Mu:U \v: *%_)
>>   in block  at ./env.pl6 line 3
>>
>>
>> What am I missing?  I'd like to get the one I commented
>> out on line 2 working too.  That gives me the following error:
>>
>> Use of uninitialized value of type Any in numeric context
>>   in block  at ./env.pl6 line 2
>> Cannot convert string to number: base-10 number must begin with
>> valid digits or '.' in '⏏Display = ' (indicated by ⏏)
>>   in block  at ./env.pl6 line 2
>>
>>
>> Many thanks,
>> -T
>>
>>
>>
>>
>> -- 
>> Fernando Santagata
>
> On 01/13/2017 01:20 AM, Fernando Santagata wrote:
>> Try:
>>
>> print "Perl Version = " ~ $*PERL ~ "\n";
>>
>> or better:
>>
>> say "Perl Version = $*PERL";
>>
>> OTH
>
>
> Hi Fernando,
>
> That fixed it.  I was using Perl5's string concatenation.  Will "~"
> always replace "+" for this, or only with a dynamic variable?
>
> On line two, I misspelled "DISPLAY".
>
> 
> #!/usr/bin/perl6
> print "Display = " ~ %*ENV{'DISPLAY'} ~ "\n";
> print "Perl Version = " ~ $*PERL ~ "\n";
> 
>
> ./env.pl6
> Display = :0.0
> Perl Version = Perl 6
>
>
> Thank you!
> -T


Re: panda?

2017-01-13 Thread Luca Ferrari
On Fri, Jan 13, 2017 at 10:16 AM, Todd Chester  wrote:
> Hi All,
>
> I am using Fedora Core 25.  There is no sign of "panda"
> in the repo (or I don't know what it is called).

I don't know why is not there, but searching panda on
 produces no result
at all (except for, ehm, python).
Now, you can try getting panda directly from github:
, it should not be so hard.
Or use rakudobrew  which can of
course install panda.

Hope this helps.


Re: JIT?

2017-01-13 Thread Steve Mynott
The most important difference is that the JIT version is 64 bit and the "no
JIT" is 32 bit.

So if you are running a modern Windows you almost certainly want the 64 bit
(JIT) version

Also the JIT version is a more recent version.

S


Re: Need dynamic variables help

2017-01-13 Thread Brandon Allbery
On Fri, Jan 13, 2017 at 4:33 AM, Todd Chester  wrote:

> I was using Perl5's string concatenation


That uses ., not +. Quite a few other languages use + though.

-- 
brandon s allbery kf8nh   sine nomine associates
allber...@gmail.com  ballb...@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonadhttp://sinenomine.net