Re: Bug: pm and pm6 get mixed up

2019-04-24 Thread ToddAndMargo via perl6-users
On Tue, Apr 23, 2019 at 9:33 PM ToddAndMargo via perl6-users 
mailto:perl6-users@perl.org>> wrote:


Hi All,

I found out the hard way after upgrading Perl 6

$ perl6 -v
This is Rakudo version 2019.03 built on MoarVM version 2019.03
implementing Perl 6.d.

That 2019.03 can no longer tell the difference between
Perl 5 modules (*.pm) and Perl 6 modules (*.pm6) and
will read in the Perl 5 module and bitch about you coding
in Perl 5


For example.  I have both a Pause.pm and a Pause.pm6 module.
Perl 6 reads the wrong one.

$ perl6 -I. -MPause
===SORRY!=== Error while compiling:
This appears to be Perl 5 code. If you intended it to be Perl 6 code,
please use a Perl 6 style declaration like "unit package Foo;" or "unit
module Foo;", or use the block form instead of the semicolon form.
--> package Pause;⏏


 !! 

Hope this does not bite any of the rest of you.

-T



On 4/24/19 8:11 AM, yary wrote:
Is this from having your own p5 and p6 modules in the same directory? 
Seems like separating them into p5lib, p6lib directories is a quick 
solution.


If you have been pointing both zef and cpan to install in the same 
directory, no easy answer comes to mind. Maybe there's a way to adjust 
what rakudo thinks are acceptable extensions for modules, but then if 
you start fiddling with that, you code will break on future perl6 
modules that start using ".pm".


-y


Hi Yary,

I "did" mix my p5 and p6 modules in the same directory.
Not any more.  I used grep to go througn all more code and
manually edit "lib".   Don't know if I got everything,
but as thing show up broken, I will know.  Not all of
my code is in this directory.  Some are scattered out
amongst the operating system, so this regression was not
really appreciated.

As far a breaking future code, this is a regression from previous
version, which demanded that p6 modules' extension was ".pm6".
Now it seems it will read anything.

And so far, p5 will not read p6's modules, which is nice of them.

At the minimum, I would like to see you guys place a specification
as to what the extension of modules can be, not just start
adding them at the whim of the developer.

-T


Re: Why so slow

2019-04-24 Thread ToddAndMargo via perl6-users





Hi All,

One liners are fast, but my own programs are very slow to start.

I download

https://github.com/perl6/gtk-simple/blob/master/examples/05-bars.pl6

To check it out and it also takes ten second to start.

What gives?

Many thanks,
-T



On 4/24/19 5:13 AM, Brad Gilbert wrote:> For one it has the following line:
>
>  use lib 'lib';
>
> That is going to slow everything down if you have anything in the
> `lib` directory.
> The more things in that directory, the slower it will get.
>
> You should really install the modules with `zef`. (It can download and
> install the modules itself.)
>
> Also it isn't until the very last line of that program that anything
> visible happens.
>
> Basically it has a lot of work to do before it can make itself visible.
>
> On Wed, Apr 24, 2019 at 2:46 AM ToddAndMargo via perl6-users
>  wrote:

Hi Brad,

I just used that as an example that could be downloaded, rather than
posting my own code.  Commenting out the "use lib" made no
difference.  It takes ten second for my code to start.

Also, I do not understand what you mean by "zef".  If I don't
use zef to install the modules called out, my code won't run.

-T


Re: Bug: pm and pm6 get mixed up

2019-04-24 Thread yary
Is this from having your own p5 and p6 modules in the same directory? Seems
like separating them into p5lib, p6lib directories is a quick solution.

If you have been pointing both zef and cpan to install in the same
directory, no easy answer comes to mind. Maybe there's a way to adjust what
rakudo thinks are acceptable extensions for modules, but then if you start
fiddling with that, you code will break on future perl6 modules that start
using ".pm".

-y


On Tue, Apr 23, 2019 at 9:33 PM ToddAndMargo via perl6-users <
perl6-users@perl.org> wrote:

> Hi All,
>
> I found out the hard way after upgrading Perl 6
>
> $ perl6 -v
> This is Rakudo version 2019.03 built on MoarVM version 2019.03
> implementing Perl 6.d.
>
> That 2019.03 can no longer tell the difference between
> Perl 5 modules (*.pm) and Perl 6 modules (*.pm6) and
> will read in the Perl 5 module and bitch about you coding
> in Perl 5
>
>
> For example.  I have both a Pause.pm and a Pause.pm6 module.
> Perl 6 reads the wrong one.
>
> $ perl6 -I. -MPause
> ===SORRY!=== Error while compiling:
> This appears to be Perl 5 code. If you intended it to be Perl 6 code,
> please use a Perl 6 style declaration like "unit package Foo;" or "unit
> module Foo;", or use the block form instead of the semicolon form.
> --> package Pause;⏏
>
>
>  !! 
>
> Hope this does not bite any of the rest of you.
>
> -T
>


Re: Why so slow

2019-04-24 Thread Brad Gilbert
For one it has the following line:

use lib 'lib';

That is going to slow everything down if you have anything in the
`lib` directory.
The more things in that directory, the slower it will get.

You should really install the modules with `zef`. (It can download and
install the modules itself.)

Also it isn't until the very last line of that program that anything
visible happens.

Basically it has a lot of work to do before it can make itself visible.

On Wed, Apr 24, 2019 at 2:46 AM ToddAndMargo via perl6-users
 wrote:
>
> Hi All,
>
> One liners are fast, but my own programs are very slow to start.
>
> I download
>
> https://github.com/perl6/gtk-simple/blob/master/examples/05-bars.pl6
>
> To check it out and it also takes ten second to start.
>
> What gives?
>
> Many thanks,
> -T


Re: gtk widget?

2019-04-24 Thread Marcel Timmerman
Please take note that the package is using GTK::V3 and that quite a few 
things are different compared to GTK::Simple. For that information 
please look at https://github.com/MARTIMM/gtk-v3


Good luck (because the documentation is still in its infancy :-o)
Marcel

On 4/22/19 2:56 PM, Timo Paulssen wrote:

Please check out Marcel Timmermann's GTK::Glade module. Here's the readme:

https://github.com/MARTIMM/gtk-glade

Sadly, modules.perl6.org is currently not available, however, you can
download the distribution here:

https://www.cpan.org/authors/id/M/MA/MARTIMM/Perl6/gtk-glade-0.8.3.tar.gz

or you can git clone the repository and "zef install ." from inside it.

There's a little pdf file in the docs/ folder about using the module itself.

In order to build a glade file to use with this library, you can install
the program "glade". This allows you to graphically put a GUI together.

https://glade.gnome.org/


Good Luck!
   - Timo


On 22/04/2019 05:44, ToddAndMargo via perl6-users wrote:

Hi All,

I see

https://github.com/perl6/gtk-simple/tree/master/examples

but I have no clue what is going on.

Is there some kind of gtk widget that you can graphically
design these windows with?

Many thanks,
-T



Why so slow

2019-04-24 Thread ToddAndMargo via perl6-users

Hi All,

One liners are fast, but my own programs are very slow to start.

I download

https://github.com/perl6/gtk-simple/blob/master/examples/05-bars.pl6

To check it out and it also takes ten second to start.

What gives?

Many thanks,
-T