Re: JIT?

2017-01-11 Thread ToddAndMargo

  
  
On 01/11/2017 06:43 PM, yary wrote:


  
You don't need JIT! It's an
  implementation detail that doesn't affect functionality. In
  theory it improves speed at which Perl6 code runs. In
  practice, it won't make a bit of difference with FTP
  client/server programs.
  


Thank you!


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



perl 6 equivalent of "use warnings"

2017-01-11 Thread ToddAndMargo

Hi All,

Is there a perl 6 equivalent of perl 5's "use warnings"?

Many thanks,
-T


Re: [perl #130540] [BUG] || && and or cannot be "overloaded"

2017-01-11 Thread Lloyd Fournier
There is a :<&&> which might be where some confusion comes from. I
guess that's there for meta operators. For example:

multi sub infix:<&&>("foo","bar") { "win" };
say "foo" && "bar" # bar
say  Z&&  # win

so it does kinda work actually just not as you might expect.

LL

On Thu, Jan 12, 2017 at 9:21 AM jn...@jnthn.net via RT <
perl6-bugs-follo...@perl.org> wrote:

> On Tue, 10 Jan 2017 17:59:05 -0800, c...@zoffix.com wrote:
> > On Tue, 10 Jan 2017 16:23:18 -0800, fernandocor...@gmail.com wrote:
> > > If I write another || operator it will continue to use the original
> > > version.
> > >
> > > https://irclog.perlgeek.de/perl6/2017-01-10#i_13895823
> > > 
> >
> > To save other readers sifting through the chan log... Even an only sub
> > doesn't take root:
> >
> >  m: sub infix:<||> ($, $) {"hi"}; say 42 || 55
> >  rakudo-moar 9a11ea: OUTPUT«42␤»
> >
> > This applies to &&, and, or, and I'd guess any shortcurcuiting
> > operator.
>
> These are special compiler forms that receive special code-gen, due to
> their shortcircuiting nature, and so do not result in sub calls. Thus
> there's no sub to override.
>


Simple windows code example needed

2017-01-11 Thread ToddAndMargo

Hi All,

Please forgive me being a mooch here.  Would some kind person please
write me a simple Windows perl 6 script so that I can see the headers?
A simple write "hello" to the screen will suffice.

Many thanks,
-T



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


Re: Simple windows code example needed

2017-01-11 Thread Lloyd Fournier
say "hello world";
or on the command line:
perl6 -e 'say "hello world"'

There are no headers :)

LL


On Thu, Jan 12, 2017 at 2:28 PM ToddAndMargo  wrote:

Hi All,

Please forgive me being a mooch here.  Would some kind person please
write me a simple Windows perl 6 script so that I can see the headers?
A simple write "hello" to the screen will suffice.

Many thanks,
-T



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


Re: perl 6 equivalent of "use warnings"

2017-01-11 Thread Lloyd Fournier
Nope. Perl6 warns you without asking for it.

LL

On Thu, Jan 12, 2017 at 2:43 PM ToddAndMargo  wrote:

Hi All,

 Is there a perl 6 equivalent of perl 5's "use warnings"?

Many thanks,
-T


Re: modules in windows?

2017-01-11 Thread Lloyd Fournier
The module installers I know of are:

https://github.com/ugexe/zef
https://github.com/tadzik/panda

They should be able to do what you need :)

On Thu, Jan 12, 2017 at 1:50 PM ToddAndMargo  wrote:

> Hi All,
>
> In Windows, other than writing for it and having it crash, how
> do I tell if I have a module installed?
>
> I want this one, among others:
> https://github.com/araraloren/Net-FTP
>
> If I don't have the module, how do I install it?
>
> Many thanks,
> -T
>
> --
> ~~
> Computers are like air conditioners.
> They malfunction when you open windows
> ~~
>


Re: perl 6 equivalent of "use warnings"

2017-01-11 Thread Brandon Allbery
Instead of enabling warnings, you disable them on a case by case basis with
"quietly" e.g. perl6 -e 'my $foo; quietly say "is $foo"'. Likewise,
"strict" is the default.

On Thu, Jan 12, 2017 at 12:12 AM, Lloyd Fournier 
wrote:

> Nope. Perl6 warns you without asking for it.
>
> LL
>
> On Thu, Jan 12, 2017 at 2:43 PM ToddAndMargo 
> wrote:
>
> Hi All,
>
>  Is there a perl 6 equivalent of perl 5's "use warnings"?
>
> Many thanks,
> -T
>
>


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


Re: perl 6 equivalent of "use warnings"

2017-01-11 Thread Siavash

Hi,

>From https://docs.perl6.org/language/5to6-nutshell#warnings

"Warnings are now on by default.

no warnings is currently NYI, but putting things in a quietly {} block will 
silence."

On 2017-01-12 03:42:22 GMT, ToddAndMargo wrote:
> Hi All,
>
>  Is there a perl 6 equivalent of perl 5's "use warnings"?
>
> Many thanks,
> -T


Re: JIT?

2017-01-11 Thread yary
You don't need JIT! It's an implementation detail that doesn't affect
functionality. In theory it improves speed at which Perl6 code runs. In
practice, it won't make a bit of difference with FTP client/server programs.


modules in windows?

2017-01-11 Thread ToddAndMargo

Hi All,

In Windows, other than writing for it and having it crash, how
do I tell if I have a module installed?

I want this one, among others:
https://github.com/araraloren/Net-FTP

If I don't have the module, how do I install it?

Many thanks,
-T

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


Re: Simple windows code example needed

2017-01-11 Thread Lloyd Fournier
Ah. If that's the case I have nothing useful to contribute :|

LL

On Thu, Jan 12, 2017 at 4:15 PM Brandon Allbery  wrote:

>
> On Thu, Jan 12, 2017 at 12:11 AM, Lloyd Fournier 
> wrote:
>
> say "hello world";
> or on the command line:
> perl6 -e 'say "hello world"'
>
> There are no headers :)
>
>
> I parsed that request as asking how to write a GUI program, fwiw.
>
>
> --
> brandon s allbery kf8nh   sine nomine
> associates
> allber...@gmail.com
> ballb...@sinenomine.net
> unix, openafs, kerberos, infrastructure, xmonad
> http://sinenomine.net
>


JIT?

2017-01-11 Thread ToddAndMargo

Hi All,

I was looking for downloading Perl 6 for windows from
http://rakudo.org/downloads/star/

rakudo-star-2016.11-x86_64 (JIT).msi
rakudo-star-2016.01-x86 (no JIT).msi

Supposedly JIT is "Runtime optimization of hot code paths
during execution"

Don't have a clue what that is.   The code I was going
to write was to manipulate data on an FTP server.
Do I need JIT?

Many thanks,
-T

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


Re: Simple windows code example needed

2017-01-11 Thread Brandon Allbery
On Thu, Jan 12, 2017 at 12:11 AM, Lloyd Fournier 
wrote:

> say "hello world";
> or on the command line:
> perl6 -e 'say "hello world"'
>
> There are no headers :)
>

I parsed that request as asking how to write a GUI program, fwiw.

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


Introducing Inform, was Re: zenity sub

2017-01-11 Thread Richard Hainsworth
This request actually was something I wanted a lot, but since 
experimenting with GTK::Simple, something seemed possible.


Hence the Inform (actually Informative) module.

It's in the modules ecosystem and installs with Panda. (Panda install 
Inform)


To get a popup dialog box inside a Perl 6 program:

use Informative;

...

inform( "You have mails waiting");


Other options include adding buttons and entry widgets (which will also 
handle passwords).


Not as complex as zenity. But directly answering the question posed by 
ToddAndMargo


inform( $InfoText, :title($ExtraTitle));

Richard Hainsworth

On Thursday, December 01, 2016 08:00 PM, ToddAndMargo wrote:

Hi All,

In Perl 6 running on Linux, what would be the best way
to get rid of the following system informational pop up
(this from a bash script)?  I other words, how do I
do a window pop up in Perl6 for Linux?

zenity --info --title="$0 $ExtraTitle" --text "$InfoText"

Many thanks,
-T



[perl #130520] [RFC] Deprecate `flatmap`

2017-01-11 Thread Zoffix Znet via RT
On Wed, 11 Jan 2017 03:03:29 -0800, sml...@gmail.com wrote:
> Okay, I get it, I shouldn't have tried to be cute in how I phrased
> that.

Right, it's a bit weird to base your argument on a fictional survey with 
results you made up :)

> But do you really think I'm wrong in considering each of the four
> behaviors listed at the top as something that a reasonable Perl 6 user
> might expect a routine called `flatmap` to do

In a way, yeah. deepmap doesn't do a combination of .deep and .map called in a 
particular order. I'd expect .flatmap to do something that *can't* be 
replicated by putting a dot in its name to make two other method calls. But it 
does, so IMO .flatmap is kinda useless.


[perl #130437] [RFC] Ranges with Infs on endpoints could be smarter ((0..Inf)[99999999999])

2017-01-11 Thread Zoffix Znet via RT
On Thu, 29 Dec 2016 13:49:40 -0800, sml...@gmail.com wrote:
> So maybe this is more of a performance bug/oversight than an RFC?
> I think all cases should give the same result that they do now.
> They just should do it in O(1) instead of O(n).

It's a bit more involved than that due to floating point math and its host of 
issues creeping up in many of the cases. The fast range observed by OP is an 
Int range that doesn't suffer from those.

For the rest of the range types, the current complexity for many cases is not 
0(n), but 0(Inf), because it just infiniloops trying to get a .succ of an 
element, but precision isn't available for such a fine grain.

For example, .elems on range (2e89..2e100) would return Inf if it could ever 
complete and all elements in that range are 2e89, never reaching the end point, 
because there's no precision available to store +1 increment.

I created a branch to play around with this ticket, but I'm already hitting 
issues just trying to make .elems figure out the result fast. How many elements 
are in ranges (2e0..2e100), (2e20..2e100), (2e40..2e100), (2e60..2e100), 
(2e75..2e100), and (2e85..2e100)? The answer for all of them is 2e+100 elements 
because of lack of precision bits.

How many elements there are in range 
2.000_000_000_000_001e20..2.000_000_000_000_002e20? If we do the math in our 
heads, we get 100_000 elements, but thanks to floating point math precision, 
the actual answer is ONE element, and it's 2e+20. Note that this element is 
LOWER than the lowest end point of the range we used.

Another example is (^2e20)[*-1]. The last element is 2e20, but the end point is 
excluded, so what do we return?; considering (2e20-1) is still 2e20. And it'd 
continue to give that number as value for the next 50 elements or so 
(counting from end), until it'd switch to giving 1.99e+20 as the 
element for another half a million elements. And most of that range is in these 
chunks.

So is a weird, chunked, unpredictable, and at-times absolutely wrong result 
better than correct but slow range, that at large enough values can be made to 
be non-increasing, infinite, and one that hangs when you attempt to fully reify 
it?

I think Rats can be improved, so I'll still hack around on this ticket in that 
scope, but I'm not so sure the Num ranges should be changed.


[perl #130542] \c[BELL] returns the U+0007 control code not U+1F514 BELL

2017-01-11 Thread via RT
# New Ticket Created by  Samantha McVey 
# Please include the string:  [perl #130542]
# in the subject line of all future correspondence about this issue. 
# https://rt.perl.org/Ticket/Display.html?id=130542 >


Fudged test in S02-literals/char-by-name.t

is "\c[BELL]", "", '\c[BELL] returns , BELL symbol not the control 
character'


[perl #130540] [BUG] || && and or cannot be "overloaded"

2017-01-11 Thread jn...@jnthn.net via RT
On Tue, 10 Jan 2017 17:59:05 -0800, c...@zoffix.com wrote:
> On Tue, 10 Jan 2017 16:23:18 -0800, fernandocor...@gmail.com wrote:
> > If I write another || operator it will continue to use the original
> > version.
> >
> > https://irclog.perlgeek.de/perl6/2017-01-10#i_13895823
> > 
> 
> To save other readers sifting through the chan log... Even an only sub
> doesn't take root:
> 
>  m: sub infix:<||> ($, $) {"hi"}; say 42 || 55
>  rakudo-moar 9a11ea: OUTPUT«42␤»
> 
> This applies to &&, and, or, and I'd guess any shortcurcuiting
> operator.

These are special compiler forms that receive special code-gen, due to their 
shortcircuiting nature, and so do not result in sub calls. Thus there's no sub 
to override.


Re: [perl #130437] [RFC] Ranges with Infs on endpoints could be smarter ((0..Inf)[99999999999])

2017-01-11 Thread Parrot Raiser
> "So is a weird, chunked, unpredictable, and at-times absolutely wrong result 
> better than correct but slow range, that at large enough values can be made 
> to be non-increasing, infinite, and one that hangs when you attempt to fully 
> reify it?"

"I'm sorry, Dave, I can't do that". In some cases, a refusal to
cooperate might be the least objectionable behaviour. How much would a
feasibility check beforehand affect performance?