Re: question about the multi in method

2020-06-08 Thread ToddAndMargo via perl6-users

On 2020-06-07 22:39, Peter Pentchev wrote:

I thought I explained that. The Rakudo developers are*never*  finished
with the development of some methods. Somebody*will*  want to extend
them in their own module. The Rakudo developers*want*  to declare some
methods as "multi" to allow the Rakudo users to write Raku programs that
extend some existing classes to make them do interesting things.


You did and I understood it.  Your explanation was well
though out/

What you missed was my point that the developers have a
process for checking in new code.  Part of that process
is updating the documentation.  That is the proper
time for documentation to be updated.  The purpose of
the documentation is not to keep places open for unicorns.

Now you are absolutely correct that the software is NEVER finished.  But 
Raku is not a "daily" release to the public.

They exist, but are not released to the general public.
Raku has releases.  When the new release his, the
documentation need to match the release.  It is
all part of the check in process.




What did you learn from going to Github? That you may call
.starts-with() without the :i or :m parameters? Was that not written in
the documentation? Or that you may call .starts-with() with a $needle
being Cool and not Str? Again, was that not written in the
documentation? So what did you learn from going to Github that was not
in the documentation?


Nothing I remember.  But that was not my point.


I addressed this in my original e-mail: the documentation is currently:
1. a reference manual


Targets at what audience?


2. some tutorials with more being written.


Always appreciated.


Yes, the documentation needs more work. Yes, it is being worked on.


But for what target audience?


The Perl 5 documentation has been worked on for literally 20 more years
than the Raku one. 


Good point.  Although I do not see the target audience
being altered for both the beginner and the advanced
user.  Just the advanced user that already know how to
use it and don't need it, except for a refresher.

Reminds me of that saying bad teachers in college use to
use: "It is intuitively obvious and let up to the student
figure out."

I love your writing by the way.

-T


Re: question about the multi in method

2020-06-08 Thread Fernando Santagata
On Mon, Jun 8, 2020 at 9:12 AM ToddAndMargo via perl6-users <
perl6-us...@perl.org> wrote:

> On 2020-06-07 22:39, Peter Pentchev wrote:
> > I addressed this in my original e-mail: the documentation is currently:
> > 1. a reference manual
>
> Targets at what audience?
>

I think that that point has been stressed countless times: you probably
want a User Manual, not a Reference.
The online Reference is well written and it's what most people need. To
learn more about Raku please refer to the numerous books on the topic:

https://perl6book.com/
https://raku.org/resources/

-- 
Fernando Santagata


Re: question about the multi in method

2020-06-08 Thread ToddAndMargo via perl6-users

On 2020-06-08 00:48, Fernando Santagata wrote:
On Mon, Jun 8, 2020 at 9:12 AM ToddAndMargo via perl6-users 
mailto:perl6-us...@perl.org>> wrote:


On 2020-06-07 22:39, Peter Pentchev wrote:

I addressed this in my original e-mail: the documentation is

currently:

1. a reference manual


Targets at what audience?


I think that that point has been stressed countless times: you
probably want a User Manual, not a Reference. The online Reference is
well written and it's what most people need. To learn more about Raku
please refer to the numerous books on the topic:

https://perl6book.com/ https://raku.org/resources/



User Manual and Reference Manual are synonyms.  Or
as the Raku web site calls it: Documentation.

The "online documentation" (not reference, if we are
slicing the baloney real thin) is what I am complaining
about.  It is not useful to beginners.

I have seen a lot of programming reference in my day.
I do not remember any one of them deliberately trying
to go over users heads.  (Does not mean they did not
at times, but it was not on purpose.)

By the way, I do use any reference I can get my hands
on.  Duck Duck Go and Google get hit a lot. And I
always have the documentation open in a window and
frequently refer to it.  And when I have to figure
out something the hard way, I write it down.  You
will see me posts these here at times.


Re: question about the multi in method

2020-06-08 Thread Peter Pentchev
On Mon, Jun 08, 2020 at 12:12:07AM -0700, ToddAndMargo via perl6-users wrote:
> On 2020-06-07 22:39, Peter Pentchev wrote:
> > I thought I explained that. The Rakudo developers are*never*  finished
> > with the development of some methods. Somebody*will*  want to extend
> > them in their own module. The Rakudo developers*want*  to declare some
> > methods as "multi" to allow the Rakudo users to write Raku programs that
> > extend some existing classes to make them do interesting things.
> 
> You did and I understood it.  Your explanation was well
> though out/
> 
> What you missed was my point that the developers have a
> process for checking in new code.  Part of that process
> is updating the documentation.  That is the proper
> time for documentation to be updated.  The purpose of
> the documentation is not to keep places open for unicorns.
> 
> Now you are absolutely correct that the software is NEVER finished.  But
> Raku is not a "daily" release to the public.
> They exist, but are not released to the general public.
> Raku has releases.  When the new release his, the
> documentation need to match the release.  It is
> all part of the check in process.

Nothing. Needs. To be. Updated.

For the last time. The methods are "multi" for two reasons:
- to allow other parts of Rakudo to use them *internally*
- to allow *module authors* and *application writers* like you and me
  to extend them in our own classes

Both of these are very valid reasons to declare some methods as "multi".

Nothing needs to change in the documentation.

> > What did you learn from going to Github? That you may call
> > .starts-with() without the :i or :m parameters? Was that not written in
> > the documentation? Or that you may call .starts-with() with a $needle
> > being Cool and not Str? Again, was that not written in the
> > documentation? So what did you learn from going to Github that was not
> > in the documentation?
> 
> Nothing I remember.  But that was not my point.

What is your point then? What *exactly* is lacking in the documetation
of the Str.starts-with() method, *and why*? Examples, please.
And no, *don't* say "the internal method without the :i and :m" without
explaining *why* you want it to be "documented".

G'luck,
Peter

-- 
Peter Pentchev  r...@ringlet.net r...@debian.org p...@storpool.com
PGP key:http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint 2EE7 A7A5 17FC 124C F115  C354 651E EFB0 2527 DF13


signature.asc
Description: PGP signature


Re: question about the multi in method

2020-06-08 Thread Fernando Santagata
On Mon, Jun 8, 2020 at 10:15 AM ToddAndMargo via perl6-users <
perl6-us...@perl.org> wrote:

> On 2020-06-08 00:48, Fernando Santagata wrote:
> > On Mon, Jun 8, 2020 at 9:12 AM ToddAndMargo via perl6-users
> > mailto:perl6-us...@perl.org>> wrote:
> >
> > On 2020-06-07 22:39, Peter Pentchev wrote:
> >> I addressed this in my original e-mail: the documentation is
> > currently:
> >> 1. a reference manual
> >
> > Targets at what audience?
> >
> > I think that that point has been stressed countless times: you
> > probably want a User Manual, not a Reference. The online Reference is
> > well written and it's what most people need. To learn more about Raku
> > please refer to the numerous books on the topic:
> >
> > https://perl6book.com/ https://raku.org/resources/
>
> User Manual and Reference Manual are synonyms.  Or
> as the Raku web site calls it: Documentation.
>

As far as I remember there were times when manuals were printed on real
paper and the Reference Manual was a dry thing used - well - as a
reference, while the User Manual addressed task-based topics.

For example, the User Manual would address the task of how to compile,
link, and run a simple program, while the Reference Manual would list all
the possible command line switches.

-- 
Fernando Santagata


Re: question about the multi in method

2020-06-08 Thread Richard Hainsworth

Ok Todd, let me have a go at this issue.

From what I understand, you see 'multi' and think 'there are more than 
one', which leads to the question 'where are they?'


My understanding of 'multi' is 'there COULD be more than one', which 
leads to the question 'are there any?'


This is actually a very powerful aspect of Raku.

There are (as has been stated in this thread) four types of which  multi 
= 'could be more than one' and only = 'only one' .


If the developer wrote 'only sub' then, no one else could write a sub 
with that name. For a developer of a program or a module, that might be 
OK, because it's unlikely anyone else would need/want to use that name. 
But for a compiler, the probability is reversed. Someone will want to 
use it. That is why in many other languages there are 'reserved words' 
which you are not allowed to use.


In Raku, if you develop a new type, for example say a quodion, and you 
want to 'add' quodions, then you CAN use + because it can be overloaded. 
It is defined as a multi.


Or in your most overused example 'needle' can be rewritten to take a 
quodion, which may yield a spectrum of results because that's what 
quodions are for.


Since needle is defined as a 'multi', if you write a 'needle' method for 
quodions, the needle for strings STILL exists, and Raku will correctly 
call the method you wrote for quodions if a quodion is implied, but call 
the default needle if a string (or any other type) is used.


Since you have developed the quodion method entirely for your paid 
subscribers, the module is NOT available to the public, so you wont tell 
anyone about it. So it doesn't have to be in the documentation.


Is this making any sense to you?

Richard

On 08/06/2020 09:25, Peter Pentchev wrote:

On Mon, Jun 08, 2020 at 12:12:07AM -0700, ToddAndMargo via perl6-users wrote:

On 2020-06-07 22:39, Peter Pentchev wrote:

I thought I explained that. The Rakudo developers are*never*  finished
with the development of some methods. Somebody*will*  want to extend
them in their own module. The Rakudo developers*want*  to declare some
methods as "multi" to allow the Rakudo users to write Raku programs that
extend some existing classes to make them do interesting things.

You did and I understood it.  Your explanation was well
though out/

What you missed was my point that the developers have a
process for checking in new code.  Part of that process
is updating the documentation.  That is the proper
time for documentation to be updated.  The purpose of
the documentation is not to keep places open for unicorns.

Now you are absolutely correct that the software is NEVER finished.  But
Raku is not a "daily" release to the public.
They exist, but are not released to the general public.
Raku has releases.  When the new release his, the
documentation need to match the release.  It is
all part of the check in process.

Nothing. Needs. To be. Updated.

For the last time. The methods are "multi" for two reasons:
- to allow other parts of Rakudo to use them *internally*
- to allow *module authors* and *application writers* like you and me
   to extend them in our own classes

Both of these are very valid reasons to declare some methods as "multi".

Nothing needs to change in the documentation.


What did you learn from going to Github? That you may call
.starts-with() without the :i or :m parameters? Was that not written in
the documentation? Or that you may call .starts-with() with a $needle
being Cool and not Str? Again, was that not written in the
documentation? So what did you learn from going to Github that was not
in the documentation?

Nothing I remember.  But that was not my point.

What is your point then? What *exactly* is lacking in the documetation
of the Str.starts-with() method, *and why*? Examples, please.
And no, *don't* say "the internal method without the :i and :m" without
explaining *why* you want it to be "documented".

G'luck,
Peter



Re: I need a GTK pop up with time out

2020-06-08 Thread ToddAndMargo via perl6-users

On 2020-06-06 22:46, ToddAndMargo via perl6-users wrote:

On 2020-06-04 04:35, Richard Hainsworth wrote:

Todd,

I wrote you one a very long time ago, after a question from you.

The module is called "Inform". Its on the modules site.

Since it was a long time ago, there may be some bit-rot. Let me know 
if there is .


The module should show how to use GTK, and there is a time-out function.

Richard, aka finanalyst

On 04/06/2020 02:55, ToddAndMargo via perl6-users wrote:

Hi All,

Okay, now I know I am pushing it.  Can anyone point me to
an example of a GTK information pop up with a time out
feature?  Or similar?

Many thanks,
-T


Hi Richard,

Line 29: $popup.show(...

I am not finding a method called "show" in the
documents.  What is it doing here?

-T



"show" is a method exported from Informative.pm6:

method show(
Str $str?,
Int :$timer,
Bool :$show-countdown
) {
self.init if $!reinit;
$!text = $str
with $str;
gtk_label_set_markup($!inf-lable, $!text.Str);

unless @!buttons.elems {
$!timer = $timer // $!timer;
$!show-countdown = $show-countdown // $!show-countdown;
$!text = $str // $!text;
self.make-text( $!timer );

if $!timer > 0 {
my $counter = $!timer - 1;
$!tap = $!sup.tap( {
self.make-text( $counter );
if ($counter <= 0) {
self.hide();
}
$counter--;
} );
self.deleted.tap( { self.hide; });
}
}

gtk_widget_show_all($!app);
gtk_main();
}


Re: I need a GTK pop up with time out

2020-06-08 Thread Richard Hainsworth

Todd,

Please see below. I'm leaving this in the list because you raise 
questions of style.


On 08/06/2020 03:45, ToddAndMargo via perl6-users wrote:

On 2020-06-07 08:45, Richard Hainsworth wrote:

By directions, I mean the (English) definition of
what each variable does. What do the following do:

:buttons,
:Response,
:timer,
:title,
:show-countdown,
data.response = <$data.response>;
etc.

They may be somewhere there, but I need a link
to them


In the example I gave in my README file (which I copied to a separate 
file and it runs as expected), I gave a way in which each argument is 
used. Also the names of the arguments are intended to be self-explanatory.


So buttons is about 'buttons', title is about the title, etc.

When I download a new module, I want to see how to use it, I don't find 
long word explanations to be much use.






print "data response is = < { $popup.response } >";


That has got me into trouble before.  I switched to
 print( "data = <" ~ $popup ~ ">\n" );
This will give you information about the object, as I explained in some 
detail before.

print( "data.response = <" ~ $data.response ~ ">\n" );

This is the same as putting {} into a "-enclosed string.


 data = >
So here you get the contents of data, which is an object, and this is 
the short way Raku tells you about objects.

data.response =    # or OK


And here you get the data you want. When the box came up, you clicked on 
the 'Cancel' button. The Cancel button was associated with the


string 'Cancel'. Try some of the other buttons and you get other 
strings. That's why I put various forms of nonsense in the example, to 
induce the reader to try to get the strings.



Also note that you have not defined $data.


oops.

What is with the weird
    data = >

$data holds an object of type Informing.




2) why do I have to have more than one button?
`:buttons( OK=>'OK Maybe' )` errors with

  Type check failed in binding to parameter
  '@buttons'; expected Positional but got Pair
  (:OK("OK Maybe"))


More than one button, possible!

But look at the error message. You have specified `OK => 'string'` 
which is the definition of a Pair, as the error message says.


But what is wanted is a Positional, as the error message says. An 
example of a Positional is an Array. So try this


`:buttons( [ :OK("OK Maybe") ] )

The [ ] creates an Array, which is a Positional.




In my example, I gave three Pairs separated by commas. That is 
interpreted by raku as a Sequence, which is also a Positional.


You could have written

:buttons(:OK("OK Maybe) , ) # note the trailing comma, which is 
essential here.


So it was the comma.  H
To be honest, I find Sequences, Arrays, Slip et al the MOST frustrating 
part of Raku. There is a whole tutorial in the Documentation about them. 
Its worth reading several times. But I can see that the reason for the 
very fine differentiation in Raku between Sequences and Array gives the 
language much more flexibility.


There is no reason why an Array can only have one item. But in order 
to make things generic, there needs to be a way to have more than one.


I have array's all the tme with only one element.  Then add t them 
latter.  Raku does not seem to care.  So I am confused


So am I. What does 'Then add t them latter' mean in English? Do you mean 
'Then add t to them later'? Why would you add 't'? Where would you add 't'?





how do I turn it into something useful to me?



5) What is popup suppose to show?

Say what?


$popup.show(


It 'show's $popup again. I thought this was being intuitive. Do I really 
need to say " $popup.show() shows popup again."


I know that is what JAVA does all the time, and I get really irritated 
saying "Something something is something". But the paradigm of Raku is 
to be intuitive in the way programs are written.






6) why is it not dismissing after 5 seconds?
I don't understand this. I am not prescient - I cannot see what is 
happening on your screen with your setup. It works fine on my computer.


It just sits there on my screen.  You example works though.

You gave me a screenshot,

https://ibb.co/X3sVxBV

Do you see the 20 in white in the lower right of the box? That is a 
countdown number. When it goes to zero, the box disappears.


The box sits there for 20 seconds with the counter going down. If you 
can't see the counter, 


I thought I was being clever in making the screen shot only just 
visible. If you didn't notice the countdown clock, then I was being too 
clever. I'll change it to red by default.


Here's an example.

https://ibb.co/C0x5P30

Note the responses in the terminal panel, eg. we have b2.

By the way, this is CommaIDE which is written by  Jonathan. It can be 
used on Windows.


https://ibb.co/b54K2Yn
https://ibb.co/vhFmT9L

This probably means I'll need to add a count-down color argument.





7) why is there no "show-countdown"?


There is! `:show-countdown` is named parameter to the method 'show', 
and an e

I need help finding a class for a method

2020-06-08 Thread ToddAndMargo via perl6-users

Hi All,

Over on

https://github.com/finanalyst/p6-inform/blob/master/lib/Informative.pm6

Line 144:

method show(
Str $str?,
Int :$timer,
Bool :$show-countdown
) {

where is the class that is linked to that method?

Many thanks,
-T


Re: I need a GTK pop up with time out

2020-06-08 Thread Richard Hainsworth

Todd,

I'm answering in the list again because I can't help you.

The problem shown in the screenshot seems to be a problem with GTK on 
Windows.


I don't have the same output on Ubuntu - as you can see from the images 
on my computer


https://ibb.co/C0x5P30

Since I don't know anything about Windows since the time Ubuntu started, 
I can't help you.


On 08/06/2020 04:34, ToddAndMargo via perl6-users wrote:

On 2020-06-07 19:47, ToddAndMargo via perl6-users wrote:

Hi Richard,

How do I stretch the box out so it will show
the entire title?

-T


Only one letter in the title shows
https://ibb.co/X3sVxBV


Re: I need help finding a class for a method

2020-06-08 Thread Richard Hainsworth

Look at line 10

class Informing {

On 08/06/2020 11:31, ToddAndMargo via perl6-users wrote:

Hi All,

Over on

https://github.com/finanalyst/p6-inform/blob/master/lib/Informative.pm6

Line 144:

    method show(
    Str $str?,
    Int :$timer,
    Bool :$show-countdown
    ) {

where is the class that is linked to that method?

Many thanks,
-T


Re: I need a GTK pop up with time out

2020-06-08 Thread ToddAndMargo via perl6-users

On 2020-06-08 03:29, Richard Hainsworth wrote:

This probably means I'll need to add a count-down color argument.


I did not see the white on my LCD monitor

I have tore

https://github.com/finanalyst/p6-inform/blob/master/lib/Informative.pm6

apart and I can not find how to set the countdown color.
How did you do it?


Re: I need help finding a class for a method

2020-06-08 Thread Fernando Santagata
…and line 3:

unit module Informative;

On Mon, Jun 8, 2020 at 12:35 PM Richard Hainsworth 
wrote:

> Look at line 10
>
> class Informing {
>
>
> On 08/06/2020 11:31, ToddAndMargo via perl6-users wrote:
>
> Hi All,
>
> Over on
>
> https://github.com/finanalyst/p6-inform/blob/master/lib/Informative.pm6
>
> Line 144:
>
> method show(
> Str $str?,
> Int :$timer,
> Bool :$show-countdown
> ) {
>
> where is the class that is linked to that method?
>
> Many thanks,
> -T
>
>

-- 
Fernando Santagata


What is the zef command to update a module?

2020-06-08 Thread ToddAndMargo via perl6-users



# zef update Informative
A plugin name was provided that does not exist or does not support 'update'

What am I doing wrong, this time?


Re: I need help finding a class for a method

2020-06-08 Thread ToddAndMargo via perl6-users

>> Hi All,
>>
>> Over on
>>
>> https://github.com/finanalyst/p6-inform/blob/master/lib/Informative.pm6
>>
>> Line 144:
>>
>> method show(
>> Str $str?,
>> Int :$timer,
>> Bool :$show-countdown
>> ) {
>>
>> where is the class that is linked to that method?
>>
>> Many thanks,
>> -T

On 2020-06-08 03:35, Richard Hainsworth wrote:

Look at line 10

class Informing {

On 08/06/2020 11:31, ToddAndMargo via perl6-users wrote:



It is my line 9

Line 8 through line 27 are all inside a comment.
Line 28 is the first blank line that ends the comment.

8: =comment code for the inform dialog box
9:class Informing {
10:has $!app;
...
27:  


I am confused.

:'(

-T


Re: I need help finding a class for a method

2020-06-08 Thread ToddAndMargo via perl6-users
On Mon, Jun 8, 2020 at 12:35 PM Richard Hainsworth 
mailto:rnhainswo...@gmail.com>> wrote:


Look at line 10

class Informing {

On 08/06/2020 11:31, ToddAndMargo via perl6-users wrote:

Hi All,

Over on

https://github.com/finanalyst/p6-inform/blob/master/lib/Informative.pm6


Line 144:

    method show(
    Str $str?,
    Int :$timer,
    Bool :$show-countdown
    ) {

where is the class that is linked to that method?

Many thanks,
-T


On 2020-06-08 03:38, Fernando Santagata wrote:
> …and line 3:
>
> unit module Informative;
>


3: unit module Informative;

Does not look like a class to me.  What am I missing?


Re: I need help finding a class for a method

2020-06-08 Thread Fernando Santagata
On Mon, Jun 8, 2020 at 1:20 PM ToddAndMargo via perl6-users <
perl6-us...@perl.org> wrote:

> On 2020-06-08 03:38, Fernando Santagata wrote:
>  > …and line 3:
>  >
>  > unit module Informative;
>  >
>
>
> 3: unit module Informative;
>
> Does not look like a class to me.  What am I missing?
>

It's a namespace declaration, see:

https://docs.raku.org/language/syntax#index-entry-declarator_unit-declarator_module-declarator_package-Package,_Module,_Class,_Role,_and_Grammar_declaration

That's the reason why the class name is Informative::Informing and not just
Informing.

-- 
Fernando Santagata


Re: I need help finding a class for a method

2020-06-08 Thread ToddAndMargo via perl6-users

On 2020-06-08 04:32, Fernando Santagata wrote:
On Mon, Jun 8, 2020 at 1:20 PM ToddAndMargo via perl6-users 
mailto:perl6-us...@perl.org>> wrote:


On 2020-06-08 03:38, Fernando Santagata wrote:
  > …and line 3:
  >
  > unit module Informative;
  >


3: unit module Informative;

Does not look like a class to me.  What am I missing?


It's a namespace declaration, see:

https://docs.raku.org/language/syntax#index-entry-declarator_unit-declarator_module-declarator_package-Package,_Module,_Class,_Role,_and_Grammar_declaration

That's the reason why the class name is Informative::Informing and not 
just Informing.


--
Fernando Santagata


Hi Fernando,

I see:

   Several packages may be declared in a single file.
   However, you can declare a unit package at the start
   of the file (preceded only by comments or use
   statements), and the rest of the file will be taken
   as being the body of the package. In this case, the
   curly braces are not required.

   unit module M;
   # ... stuff goes here instead of in {}'s

I thought methods had to be part of classes?  Or
how the above relates to the methods in the module.

I am confused.

-T


Re: I need help finding a class for a method

2020-06-08 Thread Fernando Santagata
On Mon, Jun 8, 2020 at 2:11 PM ToddAndMargo via perl6-users <
perl6-us...@perl.org> wrote:

> On 2020-06-08 04:32, Fernando Santagata wrote:
> > On Mon, Jun 8, 2020 at 1:20 PM ToddAndMargo via perl6-users
> > mailto:perl6-us...@perl.org>> wrote:
> >
> > On 2020-06-08 03:38, Fernando Santagata wrote:
> >   > …and line 3:
> >   >
> >   > unit module Informative;
> >
> > 3: unit module Informative;
> >
> > Does not look like a class to me.  What am I missing?
> >
> > It's a namespace declaration, see:
> >
> >
> https://docs.raku.org/language/syntax#index-entry-declarator_unit-declarator_module-declarator_package-Package,_Module,_Class,_Role,_and_Grammar_declaration
> >
> > That's the reason why the class name is Informative::Informing and not
> > just Informing.
>
> Hi Fernando,
>
> I see:
>
> Several packages may be declared in a single file.
> However, you can declare a unit package at the start
> of the file (preceded only by comments or use
> statements), and the rest of the file will be taken
> as being the body of the package. In this case, the
> curly braces are not required.
>
> unit module M;
> # ... stuff goes here instead of in {}'s
>
> I thought methods had to be part of classes?  Or
> how the above relates to the methods in the module.
>
> I am confused.


Methods are just subroutines which take an implicit first argument: the
object they are operating on.

All the methods in the module you mentioned are methods of the
Informative::Informing class. You can check it by matching the '{' at the
beginning of the class declaration with the corresponding '}'; method
show() is inside the class.

OTOH there's a "sub inform" in the "Informative" namespace which is not
inside a class and is indeed a simple sub, even if it has been localized in
that namespace. You can call that sub without prepending its namespace,
since it has been declared as "is export."

-- 
Fernando Santagata


Re: question about the multi in method

2020-06-08 Thread Peter Pentchev
On Mon, Jun 08, 2020 at 10:45:21AM +0100, Richard Hainsworth wrote:
> Ok Todd, let me have a go at this issue.

Thank you, Richard, for your help. I apologize to Todd and to everyone
on the list for my outburst in my last e-mail.

G'luck,
Peter

-- 
Peter Pentchev  r...@ringlet.net r...@debian.org p...@storpool.com
PGP key:http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint 2EE7 A7A5 17FC 124C F115  C354 651E EFB0 2527 DF13


signature.asc
Description: PGP signature


Re: What is the zef command to update a module?

2020-06-08 Thread Richard Hainsworth

Todd, Hi. Its

zef upgrade Informative

zef upgrade

will upgrade all the modules you have downloaded.

FYI

zef is now pulling v.1.0 of Informative, which has red countdown numbers 
as default.


Richard

On 08/06/2020 12:14, ToddAndMargo via perl6-users wrote:


# zef update Informative
A plugin name was provided that does not exist or does not support 
'update'


What am I doing wrong, this time?


Re: question about the multi in method

2020-06-08 Thread ToddAndMargo via perl6-users

On 2020-06-08 02:45, Richard Hainsworth wrote:

Ok Todd, let me have a go at this issue.

 From what I understand, you see 'multi' and think 'there are more than 
one', which leads to the question 'where are they?'


My understanding of 'multi' is 'there COULD be more than one', which 
leads to the question 'are there any?'


This is actually a very powerful aspect of Raku.

There are (as has been stated in this thread) four types of which  multi 
= 'could be more than one' and only = 'only one' .


If the developer wrote 'only sub' then, no one else could write a sub 
with that name. For a developer of a program or a module, that might be 
OK, because it's unlikely anyone else would need/want to use that name. 
But for a compiler, the probability is reversed. Someone will want to 
use it. That is why in many other languages there are 'reserved words' 
which you are not allowed to use.


In Raku, if you develop a new type, for example say a quodion, and you 
want to 'add' quodions, then you CAN use + because it can be overloaded. 
It is defined as a multi.


Or in your most overused example 'needle' can be rewritten to take a 
quodion, which may yield a spectrum of results because that's what 
quodions are for.


Since needle is defined as a 'multi', if you write a 'needle' method for 
quodions, the needle for strings STILL exists, and Raku will correctly 
call the method you wrote for quodions if a quodion is implied, but call 
the default needle if a string (or any other type) is used.


Since you have developed the quodion method entirely for your paid 
subscribers, the module is NOT available to the public, so you wont tell 
anyone about it. So it doesn't have to be in the documentation.


Is this making any sense to you?

Richard



Hi Richard,

You are perfectly clear and beautifully well written.
You did make me look up "quodion".

:-)

And I am feeling guilty because I did already know all
this and it looks like you spent a considerable amount of
time getting into my head to formulate an answer that
was perfect for me.

Here is the thing.  I have no objecting to the developer
calling something a "multi" or an "only" depending on his
needs.  That is entirely "HIS" call, "NOT" mine.

And I hope the above statement ends all the well meaning,
helpful folks who are trying the re-explain the concept
to me.  I got it a LONG time ago.

My objection is when there actually exists more than
one and they are not experimental or otherwise hidden
for some reason and are truly, actually part of the
distribution, then they also should be documented.
Updates to the documentation should be part of
the code check in process, and in all probability, are.

So, basically what I am saying is when multiples are
there and are open to the public, than it should be
documented.  In this situation, why would the
developer want his hard work hidden?

I am still marveling at the skill and thoughtfulness
you put into your letter.  Wow!

Feeling guilty,
-T


Re: question about the multi in method

2020-06-08 Thread ToddAndMargo

On 2020-06-08 08:05, Peter Pentchev wrote:

On Mon, Jun 08, 2020 at 10:45:21AM +0100, Richard Hainsworth wrote:

Ok Todd, let me have a go at this issue.


Thank you, Richard, for your help. I apologize to Todd and to everyone
on the list for my outburst in my last e-mail.

G'luck,
Peter




Hi Peter,

I was not offended in the least.  You are a mensch
and I am very, very grateful for your help.  I
also admire your technical skill, writing skill,
and thoughtfulness a great deal.

And I know I can be thick as a stone at times,
so I have to be tolerant of other's frustration
with me.

Wait, did you just get some fan mail from me?  Do I
have to wash my mouth out with soap?  or at
least wash my hands?  AHH 

:-)  :-)  :-)

-T

Why am I writing you again?  I hate when this
happens.  YOU KIDS GET OFF MY LAWN!!!  Is Teddy
still president?  I have a lawn?


Re: I need help finding a class for a method

2020-06-08 Thread ToddAndMargo via perl6-users

On 2020-06-08 05:35, Fernando Santagata wrote:
On Mon, Jun 8, 2020 at 2:11 PM ToddAndMargo via perl6-users 
mailto:perl6-us...@perl.org>> wrote:


On 2020-06-08 04:32, Fernando Santagata wrote:
 > On Mon, Jun 8, 2020 at 1:20 PM ToddAndMargo via perl6-users
 > mailto:perl6-us...@perl.org>
>> wrote:
 >
 >     On 2020-06-08 03:38, Fernando Santagata wrote:
 >       > …and line 3:
 >       >
 >       > unit module Informative;
 >
 >     3: unit module Informative;
 >
 >     Does not look like a class to me.  What am I missing?
 >
 > It's a namespace declaration, see:
 >
 >

https://docs.raku.org/language/syntax#index-entry-declarator_unit-declarator_module-declarator_package-Package,_Module,_Class,_Role,_and_Grammar_declaration
 >
 > That's the reason why the class name is Informative::Informing
and not
 > just Informing.

Hi Fernando,

I see:

     Several packages may be declared in a single file.
     However, you can declare a unit package at the start
     of the file (preceded only by comments or use
     statements), and the rest of the file will be taken
     as being the body of the package. In this case, the
     curly braces are not required.

     unit module M;
     # ... stuff goes here instead of in {}'s

I thought methods had to be part of classes?  Or
how the above relates to the methods in the module.

I am confused.


Methods are just subroutines which take an implicit first argument: the 
object they are operating on.


All the methods in the module you mentioned are methods of the 
Informative::Informing class. You can check it by matching the '{' at 
the beginning of the class declaration with the corresponding '}'; 
method show() is inside the class.


OTOH there's a "sub inform" in the "Informative" namespace which is not 
inside a class and is indeed a simple sub, even if it has been localized 
in that namespace. You can call that sub without prepending its 
namespace, since it has been declared as "is export."


--
Fernando Santagata



Hi Fernando,

I get all that and well written.  Thank you!

Here is my problem.  I am using Geany as it works well
over "ssh-X11" and I have to do a lot of work remotely.
And it is beautifully cross platform (I support Linux,
Windows, and Mac).

In Geany, the beginning "{" and ending "}" brackets color
blue (red if you forget one).  I CAN'T FIND THE ENDING
BRACKET!   I also can't find the "Informative::Informing
class" declaration.

This is me being blind, not misunderstanding.

Since you have found them, would you mind giving me
the line number for the "Informative::Informing class" declaration and 
the line numbers for the beginning

and ending curly brackets?

Many thanks,
-T


Re: I need help finding a class for a method

2020-06-08 Thread Richard Hainsworth

Todd,

The 'unit' in line 3 means something like 'this whole file is the 
Module' so there are no Begins/Ends/brackets.


The opening bracket for class Informing is on (or about) line 10 and the 
closing in at about line 630, with a comment 'end of Informing class'


Richard

On 08/06/2020 21:47, ToddAndMargo via perl6-users wrote:

On 2020-06-08 05:35, Fernando Santagata wrote:
On Mon, Jun 8, 2020 at 2:11 PM ToddAndMargo via perl6-users 
mailto:perl6-us...@perl.org>> wrote:


    On 2020-06-08 04:32, Fernando Santagata wrote:
 > On Mon, Jun 8, 2020 at 1:20 PM ToddAndMargo via perl6-users
 > mailto:perl6-us...@perl.org>
    >> wrote:
 >
 >     On 2020-06-08 03:38, Fernando Santagata wrote:
 >       > …and line 3:
 >       >
 >       > unit module Informative;
 >
 >     3: unit module Informative;
 >
 >     Does not look like a class to me.  What am I missing?
 >
 > It's a namespace declaration, see:
 >
 >
https://docs.raku.org/language/syntax#index-entry-declarator_unit-declarator_module-declarator_package-Package,_Module,_Class,_Role,_and_Grammar_declaration
 >
 > That's the reason why the class name is Informative::Informing
    and not
 > just Informing.

    Hi Fernando,

    I see:

     Several packages may be declared in a single file.
     However, you can declare a unit package at the start
     of the file (preceded only by comments or use
     statements), and the rest of the file will be taken
     as being the body of the package. In this case, the
     curly braces are not required.

     unit module M;
     # ... stuff goes here instead of in {}'s

    I thought methods had to be part of classes?  Or
    how the above relates to the methods in the module.

    I am confused.


Methods are just subroutines which take an implicit first argument: 
the object they are operating on.


All the methods in the module you mentioned are methods of the 
Informative::Informing class. You can check it by matching the '{' at 
the beginning of the class declaration with the corresponding '}'; 
method show() is inside the class.


OTOH there's a "sub inform" in the "Informative" namespace which is 
not inside a class and is indeed a simple sub, even if it has been 
localized in that namespace. You can call that sub without prepending 
its namespace, since it has been declared as "is export."


--
Fernando Santagata



Hi Fernando,

I get all that and well written.  Thank you!

Here is my problem.  I am using Geany as it works well
over "ssh-X11" and I have to do a lot of work remotely.
And it is beautifully cross platform (I support Linux,
Windows, and Mac).

In Geany, the beginning "{" and ending "}" brackets color
blue (red if you forget one).  I CAN'T FIND THE ENDING
BRACKET!   I also can't find the "Informative::Informing
class" declaration.

This is me being blind, not misunderstanding.

Since you have found them, would you mind giving me
the line number for the "Informative::Informing class" declaration and 
the line numbers for the beginning

and ending curly brackets?

Many thanks,
-T


Re: What is the zef command to update a module?

2020-06-08 Thread ToddAndMargo via perl6-users

> On 08/06/2020 12:14, ToddAndMargo via perl6-users wrote:
>>
>> # zef update Informative
>> A plugin name was provided that does not exist or does not support
>> 'update'
>>
>> What am I doing wrong, this time?


On 2020-06-08 10:35, Richard Hainsworth wrote:

Todd, Hi. Its

zef upgrade Informative

zef upgrade

will upgrade all the modules you have downloaded.

FYI

zef is now pulling v.1.0 of Informative, which has red countdown numbers 
as default.


Richard



Hi Richard,

"upgrade" instead of "update".  Hmmm.

I guess I am use to Fedora's dnf where they are synonyms.

And it "upgraded" perfectly.  And I caught your test count
down pop up during the upgrade!  Classy!  I love it!

Oh and it still won't install in Windows 10:

K:\Windows\NtUtil>zef install Informative
===> Searching for: Informative
===> Updating cpan mirror: 
https://raw.githubusercontent.com/ugexe/Perl6-ecosystems/master/cpan1.json
===> Updated cpan mirror: 
https://raw.githubusercontent.com/ugexe/Perl6-ecosystems/master/cpan1.json

Not enough positional arguments; needed at least 2




-T


Re: What is the zef command to update a module?

2020-06-08 Thread ToddAndMargo via perl6-users

On 2020-06-08 14:00, ToddAndMargo via perl6-users wrote:

 > On 08/06/2020 12:14, ToddAndMargo via perl6-users wrote:
 >>
 >> # zef update Informative
 >> A plugin name was provided that does not exist or does not support
 >> 'update'
 >>
 >> What am I doing wrong, this time?


On 2020-06-08 10:35, Richard Hainsworth wrote:

Todd, Hi. Its

zef upgrade Informative

zef upgrade

will upgrade all the modules you have downloaded.

FYI

zef is now pulling v.1.0 of Informative, which has red countdown 
numbers as default.


Richard



Richard also added "countdown-colour":

$data = inform( 'Note to the user',
:timer(10),
:title( "10 second Countdown test" ),
:show-countdown(True),
:countdown-colour
  );

Love it!

Now to get zef to work with it in Windows!


Re: question about the multi in method

2020-06-08 Thread Peter Pentchev
On Mon, Jun 08, 2020 at 01:28:34PM -0700, ToddAndMargo via perl6-users wrote:
> On 2020-06-08 02:45, Richard Hainsworth wrote:
> > Ok Todd, let me have a go at this issue.
> > 
> >  From what I understand, you see 'multi' and think 'there are more than
> > one', which leads to the question 'where are they?'
> > 
> > My understanding of 'multi' is 'there COULD be more than one', which
> > leads to the question 'are there any?'
> > 
> > This is actually a very powerful aspect of Raku.
> > 
> > There are (as has been stated in this thread) four types of which  multi
> > = 'could be more than one' and only = 'only one' .
> > 
> > If the developer wrote 'only sub' then, no one else could write a sub
> > with that name. For a developer of a program or a module, that might be
> > OK, because it's unlikely anyone else would need/want to use that name.
> > But for a compiler, the probability is reversed. Someone will want to
> > use it. That is why in many other languages there are 'reserved words'
> > which you are not allowed to use.
> > 
> > In Raku, if you develop a new type, for example say a quodion, and you
> > want to 'add' quodions, then you CAN use + because it can be overloaded.
> > It is defined as a multi.
> > 
> > Or in your most overused example 'needle' can be rewritten to take a
> > quodion, which may yield a spectrum of results because that's what
> > quodions are for.
> > 
> > Since needle is defined as a 'multi', if you write a 'needle' method for
> > quodions, the needle for strings STILL exists, and Raku will correctly
> > call the method you wrote for quodions if a quodion is implied, but call
> > the default needle if a string (or any other type) is used.
> > 
> > Since you have developed the quodion method entirely for your paid
> > subscribers, the module is NOT available to the public, so you wont tell
> > anyone about it. So it doesn't have to be in the documentation.
> > 
> > Is this making any sense to you?
> > 
> > Richard
> 
> 
> Hi Richard,
> 
> You are perfectly clear and beautifully well written.
> You did make me look up "quodion".
> 
> :-)
> 
> And I am feeling guilty because I did already know all
> this and it looks like you spent a considerable amount of
> time getting into my head to formulate an answer that
> was perfect for me.
> 
> Here is the thing.  I have no objecting to the developer
> calling something a "multi" or an "only" depending on his
> needs.  That is entirely "HIS" call, "NOT" mine.
> 
> And I hope the above statement ends all the well meaning,
> helpful folks who are trying the re-explain the concept
> to me.  I got it a LONG time ago.
> 
> My objection is when there actually exists more than
> one and they are not experimental or otherwise hidden
> for some reason and are truly, actually part of the
> distribution, then they also should be documented.
> Updates to the documentation should be part of
> the code check in process, and in all probability, are.
> 
> So, basically what I am saying is when multiples are
> there and are open to the public, than it should be
> documented.  In this situation, why would the
> developer want his hard work hidden?

OK, let me try to give you another example. If I'm too long-winded,
there will be an abstract at the end :)

Say somebody is writing a library that should serve as the standard
library for the C language. Now, there is a published, adopted standard
for the C language that all C compilers and C standard libraries
follow[1].

Now, the C language standard says that there may be more than one
library - one called "libc" as "the C library" providing pretty much all
of the functions, and another one called "libm" as "the mathematics
library" providing some additional functions for more-or-less precise
mathematical operations[2]. The standard says that the C library must
provide a function called printf() that prints out all kinds of things
according to a specific format, and that the maths library must provide
a function called trunc() that pretty much rounds a real number down to
the nearest integer that is not larger than it (so trunc(3.0) would return
3, trunc(4.5) would return 4, and trunc(-3.5) would return -4).

OK... So somebody is writing a "libc" that must provide the printf()
function, and they suddenly realize that, in order to be able to print
out real numbers with, say, two digits after the decimal point, one of
the easiest ways is to have a function that rounds a real number down.
So they write such a function, let's call it printf_trunc(), and they
hide it, they make it internal to the "libc" library, so your programs
can't see it. Right? Everything's fine, there is an internal function
that nobody can access.

So the next thing they do is turn to the maths library, and they realize
that they have to write a trunc() function, and the lightbulb comes on:
they have *already written* a function that rounds a real number down,
but for various reasons that *only matter to the author of the library*,
not 

Re: question about the multi in method

2020-06-08 Thread ToddAndMargo via perl6-users

On 2020-06-08 14:12, Peter Pentchev wrote:

On Mon, Jun 08, 2020 at 01:28:34PM -0700, ToddAndMargo via perl6-users wrote:

On 2020-06-08 02:45, Richard Hainsworth wrote:

Ok Todd, let me have a go at this issue.

  From what I understand, you see 'multi' and think 'there are more than
one', which leads to the question 'where are they?'

My understanding of 'multi' is 'there COULD be more than one', which
leads to the question 'are there any?'

This is actually a very powerful aspect of Raku.

There are (as has been stated in this thread) four types of which  multi
= 'could be more than one' and only = 'only one' .

If the developer wrote 'only sub' then, no one else could write a sub
with that name. For a developer of a program or a module, that might be
OK, because it's unlikely anyone else would need/want to use that name.
But for a compiler, the probability is reversed. Someone will want to
use it. That is why in many other languages there are 'reserved words'
which you are not allowed to use.

In Raku, if you develop a new type, for example say a quodion, and you
want to 'add' quodions, then you CAN use + because it can be overloaded.
It is defined as a multi.

Or in your most overused example 'needle' can be rewritten to take a
quodion, which may yield a spectrum of results because that's what
quodions are for.

Since needle is defined as a 'multi', if you write a 'needle' method for
quodions, the needle for strings STILL exists, and Raku will correctly
call the method you wrote for quodions if a quodion is implied, but call
the default needle if a string (or any other type) is used.

Since you have developed the quodion method entirely for your paid
subscribers, the module is NOT available to the public, so you wont tell
anyone about it. So it doesn't have to be in the documentation.

Is this making any sense to you?

Richard



Hi Richard,

You are perfectly clear and beautifully well written.
You did make me look up "quodion".

:-)

And I am feeling guilty because I did already know all
this and it looks like you spent a considerable amount of
time getting into my head to formulate an answer that
was perfect for me.

Here is the thing.  I have no objecting to the developer
calling something a "multi" or an "only" depending on his
needs.  That is entirely "HIS" call, "NOT" mine.

And I hope the above statement ends all the well meaning,
helpful folks who are trying the re-explain the concept
to me.  I got it a LONG time ago.

My objection is when there actually exists more than
one and they are not experimental or otherwise hidden
for some reason and are truly, actually part of the
distribution, then they also should be documented.
Updates to the documentation should be part of
the code check in process, and in all probability, are.

So, basically what I am saying is when multiples are
there and are open to the public, than it should be
documented.  In this situation, why would the
developer want his hard work hidden?


OK, let me try to give you another example. If I'm too long-winded,
there will be an abstract at the end :)

Say somebody is writing a library that should serve as the standard
library for the C language. Now, there is a published, adopted standard
for the C language that all C compilers and C standard libraries
follow[1].

Now, the C language standard says that there may be more than one
library - one called "libc" as "the C library" providing pretty much all
of the functions, and another one called "libm" as "the mathematics
library" providing some additional functions for more-or-less precise
mathematical operations[2]. The standard says that the C library must
provide a function called printf() that prints out all kinds of things
according to a specific format, and that the maths library must provide
a function called trunc() that pretty much rounds a real number down to
the nearest integer that is not larger than it (so trunc(3.0) would return
3, trunc(4.5) would return 4, and trunc(-3.5) would return -4).

OK... So somebody is writing a "libc" that must provide the printf()
function, and they suddenly realize that, in order to be able to print
out real numbers with, say, two digits after the decimal point, one of
the easiest ways is to have a function that rounds a real number down.
So they write such a function, let's call it printf_trunc(), and they
hide it, they make it internal to the "libc" library, so your programs
can't see it. Right? Everything's fine, there is an internal function
that nobody can access.

So the next thing they do is turn to the maths library, and they realize
that they have to write a trunc() function, and the lightbulb comes on:
they have *already written* a function that rounds a real number down,
but for various reasons that *only matter to the author of the library*,
not to the users of the library, that function needs to live in the
"libc" library, not in the "libm" library.

OK, but they do not want to do the work twice, they do not want to hav

RE: question about the multi in method

2020-06-08 Thread Mark Devine
Peter,

I applaud your excellent assistance with Raku.  Et. al. (you know the names)...

Outstanding community!

Mark

-Original Message-
From: Peter Pentchev  
Sent: Monday, June 8, 2020 17:13
To: perl6-us...@perl.org
Subject: Re: question about the multi in method

On Mon, Jun 08, 2020 at 01:28:34PM -0700, ToddAndMargo via perl6-users wrote:
> On 2020-06-08 02:45, Richard Hainsworth wrote:
> > Ok Todd, let me have a go at this issue.
> > 
> >  From what I understand, you see 'multi' and think 'there are more 
> > than one', which leads to the question 'where are they?'
> > 
> > My understanding of 'multi' is 'there COULD be more than one', which 
> > leads to the question 'are there any?'
> > 
> > This is actually a very powerful aspect of Raku.
> > 
> > There are (as has been stated in this thread) four types of which  
> > multi = 'could be more than one' and only = 'only one' .
> > 
> > If the developer wrote 'only sub' then, no one else could write a 
> > sub with that name. For a developer of a program or a module, that 
> > might be OK, because it's unlikely anyone else would need/want to use that 
> > name.
> > But for a compiler, the probability is reversed. Someone will want 
> > to use it. That is why in many other languages there are 'reserved words'
> > which you are not allowed to use.
> > 
> > In Raku, if you develop a new type, for example say a quodion, and 
> > you want to 'add' quodions, then you CAN use + because it can be overloaded.
> > It is defined as a multi.
> > 
> > Or in your most overused example 'needle' can be rewritten to take a 
> > quodion, which may yield a spectrum of results because that's what 
> > quodions are for.
> > 
> > Since needle is defined as a 'multi', if you write a 'needle' method 
> > for quodions, the needle for strings STILL exists, and Raku will 
> > correctly call the method you wrote for quodions if a quodion is 
> > implied, but call the default needle if a string (or any other type) is 
> > used.
> > 
> > Since you have developed the quodion method entirely for your paid 
> > subscribers, the module is NOT available to the public, so you wont 
> > tell anyone about it. So it doesn't have to be in the documentation.
> > 
> > Is this making any sense to you?
> > 
> > Richard
> 
> 
> Hi Richard,
> 
> You are perfectly clear and beautifully well written.
> You did make me look up "quodion".
> 
> :-)
> 
> And I am feeling guilty because I did already know all this and it 
> looks like you spent a considerable amount of time getting into my 
> head to formulate an answer that was perfect for me.
> 
> Here is the thing.  I have no objecting to the developer calling 
> something a "multi" or an "only" depending on his needs.  That is 
> entirely "HIS" call, "NOT" mine.
> 
> And I hope the above statement ends all the well meaning, helpful 
> folks who are trying the re-explain the concept to me.  I got it a 
> LONG time ago.
> 
> My objection is when there actually exists more than one and they are 
> not experimental or otherwise hidden for some reason and are truly, 
> actually part of the distribution, then they also should be 
> documented.
> Updates to the documentation should be part of the code check in 
> process, and in all probability, are.
> 
> So, basically what I am saying is when multiples are there and are 
> open to the public, than it should be documented.  In this situation, 
> why would the developer want his hard work hidden?

OK, let me try to give you another example. If I'm too long-winded, there will 
be an abstract at the end :)

Say somebody is writing a library that should serve as the standard library for 
the C language. Now, there is a published, adopted standard for the C language 
that all C compilers and C standard libraries follow[1].

Now, the C language standard says that there may be more than one library - one 
called "libc" as "the C library" providing pretty much all of the functions, 
and another one called "libm" as "the mathematics library" providing some 
additional functions for more-or-less precise mathematical operations[2]. The 
standard says that the C library must provide a function called printf() that 
prints out all kinds of things according to a specific format, and that the 
maths library must provide a function called trunc() that pretty much rounds a 
real number down to the nearest integer that is not larger than it (so 
trunc(3.0) would return 3, trunc(4.5) would return 4, and trunc(-3.5) would 
return -4).

OK... So somebody is writing a "libc" that must provide the printf() function, 
and they suddenly realize that, in order to be able to print out real numbers 
with, say, two digits after the decimal point, one of the easiest ways is to 
have a function that rounds a real number down.
So they write such a function, let's call it printf_trunc(), and they hide it, 
they make it internal to the "libc" library, so your programs can't see it. 
Right? Everything's fine, there is an internal fu

Re: question about the multi in method

2020-06-08 Thread Peter Pentchev
On Mon, Jun 08, 2020 at 02:39:10PM -0700, ToddAndMargo via perl6-users wrote:
> On 2020-06-08 14:12, Peter Pentchev wrote:
> > On Mon, Jun 08, 2020 at 01:28:34PM -0700, ToddAndMargo via perl6-users 
> > wrote:
> > > On 2020-06-08 02:45, Richard Hainsworth wrote:
> > > > Ok Todd, let me have a go at this issue.
> > > > 
> > > >   From what I understand, you see 'multi' and think 'there are more than
> > > > one', which leads to the question 'where are they?'
> > > > 
> > > > My understanding of 'multi' is 'there COULD be more than one', which
> > > > leads to the question 'are there any?'
> > > > 
> > > > This is actually a very powerful aspect of Raku.
> > > > 
> > > > There are (as has been stated in this thread) four types of which  multi
> > > > = 'could be more than one' and only = 'only one' .
> > > > 
> > > > If the developer wrote 'only sub' then, no one else could write a sub
> > > > with that name. For a developer of a program or a module, that might be
> > > > OK, because it's unlikely anyone else would need/want to use that name.
> > > > But for a compiler, the probability is reversed. Someone will want to
> > > > use it. That is why in many other languages there are 'reserved words'
> > > > which you are not allowed to use.
> > > > 
> > > > In Raku, if you develop a new type, for example say a quodion, and you
> > > > want to 'add' quodions, then you CAN use + because it can be overloaded.
> > > > It is defined as a multi.
> > > > 
> > > > Or in your most overused example 'needle' can be rewritten to take a
> > > > quodion, which may yield a spectrum of results because that's what
> > > > quodions are for.
> > > > 
> > > > Since needle is defined as a 'multi', if you write a 'needle' method for
> > > > quodions, the needle for strings STILL exists, and Raku will correctly
> > > > call the method you wrote for quodions if a quodion is implied, but call
> > > > the default needle if a string (or any other type) is used.
> > > > 
> > > > Since you have developed the quodion method entirely for your paid
> > > > subscribers, the module is NOT available to the public, so you wont tell
> > > > anyone about it. So it doesn't have to be in the documentation.
> > > > 
> > > > Is this making any sense to you?
> > > > 
> > > > Richard
> > > 
> > > 
> > > Hi Richard,
> > > 
> > > You are perfectly clear and beautifully well written.
> > > You did make me look up "quodion".
> > > 
> > > :-)
> > > 
> > > And I am feeling guilty because I did already know all
> > > this and it looks like you spent a considerable amount of
> > > time getting into my head to formulate an answer that
> > > was perfect for me.
> > > 
> > > Here is the thing.  I have no objecting to the developer
> > > calling something a "multi" or an "only" depending on his
> > > needs.  That is entirely "HIS" call, "NOT" mine.
> > > 
> > > And I hope the above statement ends all the well meaning,
> > > helpful folks who are trying the re-explain the concept
> > > to me.  I got it a LONG time ago.
> > > 
> > > My objection is when there actually exists more than
> > > one and they are not experimental or otherwise hidden
> > > for some reason and are truly, actually part of the
> > > distribution, then they also should be documented.
> > > Updates to the documentation should be part of
> > > the code check in process, and in all probability, are.
> > > 
> > > So, basically what I am saying is when multiples are
> > > there and are open to the public, than it should be
> > > documented.  In this situation, why would the
> > > developer want his hard work hidden?
> > 
> > OK, let me try to give you another example. If I'm too long-winded,
> > there will be an abstract at the end :)
> > 
> > Say somebody is writing a library that should serve as the standard
> > library for the C language. Now, there is a published, adopted standard
> > for the C language that all C compilers and C standard libraries
> > follow[1].
> > 
> > Now, the C language standard says that there may be more than one
> > library - one called "libc" as "the C library" providing pretty much all
> > of the functions, and another one called "libm" as "the mathematics
> > library" providing some additional functions for more-or-less precise
> > mathematical operations[2]. The standard says that the C library must
> > provide a function called printf() that prints out all kinds of things
> > according to a specific format, and that the maths library must provide
> > a function called trunc() that pretty much rounds a real number down to
> > the nearest integer that is not larger than it (so trunc(3.0) would return
> > 3, trunc(4.5) would return 4, and trunc(-3.5) would return -4).
> > 
> > OK... So somebody is writing a "libc" that must provide the printf()
> > function, and they suddenly realize that, in order to be able to print
> > out real numbers with, say, two digits after the decimal point, one of
> > the easiest ways is to have a function that rounds a real number down.
> > 

Re: I need help finding a class for a method

2020-06-08 Thread ToddAndMargo via perl6-users

On 2020-06-08 13:55, Richard Hainsworth wrote:

Todd,

The 'unit' in line 3 means something like 'this whole file is the 
Module' so there are no Begins/Ends/brackets.


Poop.  I spaced on that.  I start all my moduels with

1: unit module ;




The opening bracket for class Informing is on (or about) line 10 and the 
closing in at about line 630, with a comment 'end of Informing class'


Richard


Hi Richard,

Ah Ha!  and 626's bracket is not blue.  Geany
does that some times.


9:  class Informing {
626:} # end of Informing class

Okay now.  I missed this because of line 8:

8: =comment code for the inform dialog box
9:   class Informing {
has $!app;
has Bool $!reinit = True;
has $!inf-lable;
has $!box;
has $!btn-box;
has $!deleted_supply;
has $!title;
has $!position;
has $!timer-lable;
has @!buttons;
has @!entries;
has %.data = {};
has $.response;
has Supply $!sup = self.g-timeout(1000);
has Tap $!tap;
has Int $!timer = 10;
has Bool $!show-countdown = True;
27: has Str $.text is rw = "Say color=\"green\">something 
beautiful";

28: 

Everything from line 8 to line 27 is a "comment".  The
comment does not terminate until the first blank line,
which is 28.

Seems to me the comment rules are being violated here.
The comment does not terminate until the first blank
line.

What am I missing, again.

:'(

-T


Re: question about the multi in method

2020-06-08 Thread ToddAndMargo via perl6-users

On 2020-06-08 14:43, Mark Devine wrote:

Peter,

I applaud your excellent assistance with Raku.  Et. al. (you know the names)...

Outstanding community!

Mark


He is a force of nature, as are many on this list.


Re: I need help finding a class for a method

2020-06-08 Thread Peter Pentchev
On Mon, Jun 08, 2020 at 02:48:48PM -0700, ToddAndMargo via perl6-users wrote:
> On 2020-06-08 13:55, Richard Hainsworth wrote:
[snip]
> > The opening bracket for class Informing is on (or about) line 10 and the
> > closing in at about line 630, with a comment 'end of Informing class'
> > 
> > Richard
> 
> Hi Richard,
> 
> Ah Ha!  and 626's bracket is not blue.  Geany
> does that some times.
> 
> 
> 9:  class Informing {
> 626:} # end of Informing class
> 
> Okay now.  I missed this because of line 8:
> 
> 8: =comment code for the inform dialog box
> 9:   class Informing {
> has $!app;
> has Bool $!reinit = True;
> has $!inf-lable;
> has $!box;
> has $!btn-box;
> has $!deleted_supply;
> has $!title;
> has $!position;
> has $!timer-lable;
> has @!buttons;
> has @!entries;
> has %.data = {};
> has $.response;
> has Supply $!sup = self.g-timeout(1000);
> has Tap $!tap;
> has Int $!timer = 10;
> has Bool $!show-countdown = True;
> 27: has Str $.text is rw = "Say  color=\"green\">something
> beautiful";
> 28: 
> 
> Everything from line 8 to line 27 is a "comment".  The
> comment does not terminate until the first blank line,
> which is 28.
> 
> Seems to me the comment rules are being violated here.
> The comment does not terminate until the first blank
> line.
> 
> What am I missing, again.
> 
> :'(

OK, that is weird. I do not know why your editor is showing you that.
https://github.com/finanalyst/p6-inform/blob/master/lib/Informative.pm6
says that the "=comment" line is line 8, then there is a blank line 9,
and then there is a "class Informing {" on line 10.

G'luck,
Peter

-- 
Peter Pentchev  r...@ringlet.net r...@debian.org p...@storpool.com
PGP key:http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint 2EE7 A7A5 17FC 124C F115  C354 651E EFB0 2527 DF13


signature.asc
Description: PGP signature


Issues with "zef install Informative" under Windows

2020-06-08 Thread ToddAndMargo via perl6-users

Hi All,

Window 10-2005
Rakudo version 2020.05.1 built on MoarVM version 2020.05

Informative installs perfectly in Fedora (Linux), but
not Windows 10.  "--force-build" does not work either

Anyone know how to fix this?

Many thanks,
-T


K:\Windows\NtUtil>Issues with "zef install Informative"

===> Searching for: Informative
===> Building: Inform:ver<1.2>:auth
[Inform] At line:1 char:192
[Inform] + ... ystem.io.file]::openread((resolve-path $file -replace 
\"-\",\"\"  ...
[Inform] + 
   ~

[Inform] You must provide a value expression following the '-' operator.
[Inform] At line:1 char:192
[Inform] + ... -replace \"-\",\"\" } get-sha256 
C:\Users\tony\.zef\store\p6-inform.g ...
[Inform] + 
~
[Inform] Unexpected token '\",\"\" } get-sha256 
C:\Users\tony\.zef\store\p6-inform.git\7dd537445b8a20956fc4ab438941718415871999\
[Inform] resources\blib\lib\GTK\libatk-1.0-0.dll"' in expression or 
statement.
[Inform] + CategoryInfo  : ParserError: (:) [], 
ParentContainsErrorRecordException

[Inform] + FullyQualifiedErrorId : ExpectedValueExpression
[Inform]
[Inform] Effective index out of range. Is: -1, should be in 0..^Inf
[Inform]   in block  at 
C:\Users\tony\.zef\store\p6-inform.git\7dd537445b8a20956fc4ab438941718415871999\Build.pm 
line 53
[Inform]   in method build at 
C:\Users\tony\.zef\store\p6-inform.git\7dd537445b8a20956fc4ab438941718415871999\Build.pm 
line 47

[Inform]   in block  at -e line 1
[Inform] Actually thrown at:
[Inform]   in block  at 
C:\Users\tony\.zef\store\p6-inform.git\7dd537445b8a20956fc4ab438941718415871999\Build.pm 
line 90
[Inform]   in method build at 
C:\Users\tony\.zef\store\p6-inform.git\7dd537445b8a20956fc4ab438941718415871999\Build.pm 
line 47

[Inform]   in block  at -e line 1
===> Building [FAIL]: Inform:ver<1.2>:auth
Aborting due to build failure: Inform:ver<1.2>:auth 
(use --force-build to override)


Re: I need help finding a class for a method

2020-06-08 Thread ToddAndMargo via perl6-users

On 2020-06-08 14:54, Peter Pentchev wrote:

On Mon, Jun 08, 2020 at 02:48:48PM -0700, ToddAndMargo via perl6-users wrote:

On 2020-06-08 13:55, Richard Hainsworth wrote:

[snip]

The opening bracket for class Informing is on (or about) line 10 and the
closing in at about line 630, with a comment 'end of Informing class'

Richard


Hi Richard,

Ah Ha!  and 626's bracket is not blue.  Geany
does that some times.


9:  class Informing {
626:} # end of Informing class

Okay now.  I missed this because of line 8:

8: =comment code for the inform dialog box
9:   class Informing {
 has $!app;
 has Bool $!reinit = True;
 has $!inf-lable;
 has $!box;
 has $!btn-box;
 has $!deleted_supply;
 has $!title;
 has $!position;
 has $!timer-lable;
 has @!buttons;
 has @!entries;
 has %.data = {};
 has $.response;
 has Supply $!sup = self.g-timeout(1000);
 has Tap $!tap;
 has Int $!timer = 10;
 has Bool $!show-countdown = True;
27: has Str $.text is rw = "Say something
beautiful";
28: 

Everything from line 8 to line 27 is a "comment".  The
comment does not terminate until the first blank line,
which is 28.

Seems to me the comment rules are being violated here.
The comment does not terminate until the first blank
line.

What am I missing, again.

:'(


OK, that is weird. I do not know why your editor is showing you that.
https://github.com/finanalyst/p6-inform/blob/master/lib/Informative.pm6
says that the "=comment" line is line 8, then there is a blank line 9,
and then there is a "class Informing {" on line 10.

G'luck,
Peter



Poop!!!  (Not my actual word and not an admission that
I cuss.)

Richard has a new one out, so I am going to get the new
one ASAP

Thank you.  I though I was going nuts.


Re: I need help finding a class for a method

2020-06-08 Thread ToddAndMargo via perl6-users

On 2020-06-08 14:57, ToddAndMargo via perl6-users wrote:

On 2020-06-08 14:54, Peter Pentchev wrote:
On Mon, Jun 08, 2020 at 02:48:48PM -0700, ToddAndMargo via perl6-users 
wrote:

On 2020-06-08 13:55, Richard Hainsworth wrote:

[snip]
The opening bracket for class Informing is on (or about) line 10 and 
the

closing in at about line 630, with a comment 'end of Informing class'

Richard


Hi Richard,

Ah Ha!  and 626's bracket is not blue.  Geany
does that some times.


9:  class Informing {
626:    } # end of Informing class

Okay now.  I missed this because of line 8:

8: =comment code for the inform dialog box
9:   class Informing {
 has $!app;
 has Bool $!reinit = True;
 has $!inf-lable;
 has $!box;
 has $!btn-box;
 has $!deleted_supply;
 has $!title;
 has $!position;
 has $!timer-lable;
 has @!buttons;
 has @!entries;
 has %.data = {};
 has $.response;
 has Supply $!sup = self.g-timeout(1000);
 has Tap $!tap;
 has Int $!timer = 10;
 has Bool $!show-countdown = True;
27: has Str $.text is rw = "Say something
beautiful";
28: 

Everything from line 8 to line 27 is a "comment".  The
comment does not terminate until the first blank line,
which is 28.

Seems to me the comment rules are being violated here.
The comment does not terminate until the first blank
line.

What am I missing, again.

:'(


OK, that is weird. I do not know why your editor is showing you that.
https://github.com/finanalyst/p6-inform/blob/master/lib/Informative.pm6
says that the "=comment" line is line 8, then there is a blank line 9,
and then there is a "class Informing {" on line 10.

G'luck,
Peter



Poop!!!  (Not my actual word and not an admission that
I cuss.)

Richard has a new one out, so I am going to get the new
one ASAP

Thank you.  I though I was going nuts.



It did it again!  And into Leafpad this time too!

So, I hit fork and edit and copied and pasted it (then cancel).
This time it worked.

Ha!


Re: I need help finding a class for a method

2020-06-08 Thread Peter Pentchev
On Mon, Jun 08, 2020 at 02:57:58PM -0700, ToddAndMargo via perl6-users wrote:
> On 2020-06-08 14:54, Peter Pentchev wrote:
> > On Mon, Jun 08, 2020 at 02:48:48PM -0700, ToddAndMargo via perl6-users 
> > wrote:
> > > On 2020-06-08 13:55, Richard Hainsworth wrote:
> > [snip]
> > > > The opening bracket for class Informing is on (or about) line 10 and the
> > > > closing in at about line 630, with a comment 'end of Informing class'
> > > > 
> > > > Richard
> > > 
> > > Hi Richard,
> > > 
> > > Ah Ha!  and 626's bracket is not blue.  Geany
> > > does that some times.
> > > 
> > > 
> > > 9:  class Informing {
> > > 626:} # end of Informing class
> > > 
> > > Okay now.  I missed this because of line 8:
> > > 
> > > 8: =comment code for the inform dialog box
> > > 9:   class Informing {
> > >  has $!app;
> > >  has Bool $!reinit = True;
> > >  has $!inf-lable;
> > >  has $!box;
> > >  has $!btn-box;
> > >  has $!deleted_supply;
> > >  has $!title;
> > >  has $!position;
> > >  has $!timer-lable;
> > >  has @!buttons;
> > >  has @!entries;
> > >  has %.data = {};
> > >  has $.response;
> > >  has Supply $!sup = self.g-timeout(1000);
> > >  has Tap $!tap;
> > >  has Int $!timer = 10;
> > >  has Bool $!show-countdown = True;
> > > 27: has Str $.text is rw = "Say  > > color=\"green\">something
> > > beautiful";
> > > 28: 
> > > 
> > > Everything from line 8 to line 27 is a "comment".  The
> > > comment does not terminate until the first blank line,
> > > which is 28.
> > > 
> > > Seems to me the comment rules are being violated here.
> > > The comment does not terminate until the first blank
> > > line.
> > > 
> > > What am I missing, again.
> > > 
> > > :'(
> > 
> > OK, that is weird. I do not know why your editor is showing you that.
> > https://github.com/finanalyst/p6-inform/blob/master/lib/Informative.pm6
> > says that the "=comment" line is line 8, then there is a blank line 9,
> > and then there is a "class Informing {" on line 10.
> > 
> > G'luck,
> > Peter
> 
> 
> Poop!!!  (Not my actual word and not an admission that
> I cuss.)
> 
> Richard has a new one out, so I am going to get the new
> one ASAP
> 
> Thank you.  I though I was going nuts.

Eh, well...
https://github.com/finanalyst/p6-inform/blame/master/lib/Informative.pm6
...says that this blank line has been there for the past four years,
actually longer than both the comment line above it and the current
state of the class line below it :)

I'd start to wonder if it is possible that you deleted that line by
mistake. I *know* I've done that. I know I did it this week, and it's
only Monday :)

G'luck,
Peter

-- 
Peter Pentchev  r...@ringlet.net r...@debian.org p...@storpool.com
PGP key:http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint 2EE7 A7A5 17FC 124C F115  C354 651E EFB0 2527 DF13


signature.asc
Description: PGP signature


Re: Issues with "zef install Informative" under Windows

2020-06-08 Thread Richard Hainsworth

Todd,

I wrote Informative a while ago. So as to make it self-contained, I 
copied code from GTK::Simple (as stated in the comments).


The reason for this is that GTK::Simple itself is quite large with a lot 
of boilerplate for many functions.


So, does GTK::Simple install on Windows 10?

If so, I will edit the Informative to the newest version of GTK::Simple.

Regards,

Richard


On 08/06/2020 22:55, ToddAndMargo via perl6-users wrote:

Hi All,

Window 10-2005
Rakudo version 2020.05.1 built on MoarVM version 2020.05

Informative installs perfectly in Fedora (Linux), but
not Windows 10.  "--force-build" does not work either

Anyone know how to fix this?

Many thanks,
-T


K:\Windows\NtUtil>Issues with "zef install Informative"

===> Searching for: Informative
===> Building: Inform:ver<1.2>:auth
[Inform] At line:1 char:192
[Inform] + ... ystem.io.file]::openread((resolve-path $file 
-replace \"-\",\"\"  ...

[Inform] +    ~
[Inform] You must provide a value expression following the '-' operator.
[Inform] At line:1 char:192
[Inform] + ... -replace \"-\",\"\" } get-sha256 
C:\Users\tony\.zef\store\p6-inform.g ...

[Inform] + ~
[Inform] Unexpected token '\",\"\" } get-sha256 
C:\Users\tony\.zef\store\p6-inform.git\7dd537445b8a20956fc4ab438941718415871999\
[Inform] resources\blib\lib\GTK\libatk-1.0-0.dll"' in expression or 
statement.
[Inform] + CategoryInfo  : ParserError: (:) [], 
ParentContainsErrorRecordException

[Inform] + FullyQualifiedErrorId : ExpectedValueExpression
[Inform]
[Inform] Effective index out of range. Is: -1, should be in 0..^Inf
[Inform]   in block  at 
C:\Users\tony\.zef\store\p6-inform.git\7dd537445b8a20956fc4ab438941718415871999\Build.pm 
line 53
[Inform]   in method build at 
C:\Users\tony\.zef\store\p6-inform.git\7dd537445b8a20956fc4ab438941718415871999\Build.pm 
line 47

[Inform]   in block  at -e line 1
[Inform] Actually thrown at:
[Inform]   in block  at 
C:\Users\tony\.zef\store\p6-inform.git\7dd537445b8a20956fc4ab438941718415871999\Build.pm 
line 90
[Inform]   in method build at 
C:\Users\tony\.zef\store\p6-inform.git\7dd537445b8a20956fc4ab438941718415871999\Build.pm 
line 47

[Inform]   in block  at -e line 1
===> Building [FAIL]: Inform:ver<1.2>:auth
Aborting due to build failure: Inform:ver<1.2>:auth 
(use --force-build to override)


Re: I need help finding a class for a method

2020-06-08 Thread ToddAndMargo via perl6-users

On 2020-06-08 15:02, Peter Pentchev wrote:

On Mon, Jun 08, 2020 at 02:57:58PM -0700, ToddAndMargo via perl6-users wrote:

On 2020-06-08 14:54, Peter Pentchev wrote:

On Mon, Jun 08, 2020 at 02:48:48PM -0700, ToddAndMargo via perl6-users wrote:

On 2020-06-08 13:55, Richard Hainsworth wrote:

[snip]

The opening bracket for class Informing is on (or about) line 10 and the
closing in at about line 630, with a comment 'end of Informing class'

Richard


Hi Richard,

Ah Ha!  and 626's bracket is not blue.  Geany
does that some times.


9:  class Informing {
626:} # end of Informing class

Okay now.  I missed this because of line 8:

8: =comment code for the inform dialog box
9:   class Informing {
  has $!app;
  has Bool $!reinit = True;
  has $!inf-lable;
  has $!box;
  has $!btn-box;
  has $!deleted_supply;
  has $!title;
  has $!position;
  has $!timer-lable;
  has @!buttons;
  has @!entries;
  has %.data = {};
  has $.response;
  has Supply $!sup = self.g-timeout(1000);
  has Tap $!tap;
  has Int $!timer = 10;
  has Bool $!show-countdown = True;
27: has Str $.text is rw = "Say something
beautiful";
28: 

Everything from line 8 to line 27 is a "comment".  The
comment does not terminate until the first blank line,
which is 28.

Seems to me the comment rules are being violated here.
The comment does not terminate until the first blank
line.

What am I missing, again.

:'(


OK, that is weird. I do not know why your editor is showing you that.
https://github.com/finanalyst/p6-inform/blob/master/lib/Informative.pm6
says that the "=comment" line is line 8, then there is a blank line 9,
and then there is a "class Informing {" on line 10.

G'luck,
Peter



Poop!!!  (Not my actual word and not an admission that
I cuss.)

Richard has a new one out, so I am going to get the new
one ASAP

Thank you.  I though I was going nuts.


Eh, well...
https://github.com/finanalyst/p6-inform/blame/master/lib/Informative.pm6
...says that this blank line has been there for the past four years,
actually longer than both the comment line above it and the current
state of the class line below it :)


Eye balling it shows it clearly there.



I'd start to wonder if it is possible that you deleted that line by
mistake. I *know* I've done that. I know I did it this week, and it's
only Monday :)


Not a chance the third or forth time at it.  It is a
clipboard issue.  The secondary clipboard is a little
weird in Fedora 32.

Hmm, I wonder about the primary clipboard.  No, screwed
up in the primary clipboard too.

It may have something to do with the web site:


data-line-number="8">
=class="pl-e">comment code for the inform 
dialog box 

  

  
data-line-number="9">


  

  
data-line-number="10">
 
 class Informing 
{

  

Line 9 does seem a little weird.


Over on the fork and edit page, I get:


  class="form-control file-editor-textarea js-blob-contents 
js-code-textarea "

  rows="35" name="value"
  data-filename="Informative.pm6"
  data-codemirror-mode="text/x-perl"
  data-allow-unchanged=""
  placeholder="Enter file contents here"
  aria-label="Enter file contents here"
  spellcheck="false"
  autofocus>
use NativeCall;
use nqp;
unit module Informative;
=comment
The clever code is copied from GTK::Simple
The Windows code in particular comes from GTK::Simple.

=comment code for the inform dialog box

class Informing {
has $!app;

A lot better coding!


Re: Issues with "zef install Informative" under Windows

2020-06-08 Thread ToddAndMargo via perl6-users

On 2020-06-08 15:12, Richard Hainsworth wrote:

Todd,

I wrote Informative a while ago. So as to make it self-contained, I 
copied code from GTK::Simple (as stated in the comments).


The reason for this is that GTK::Simple itself is quite large with a lot 
of boilerplate for many functions.


So, does GTK::Simple install on Windows 10?

If so, I will edit the Informative to the newest version of GTK::Simple.

Regards,

Richard


On 08/06/2020 22:55, ToddAndMargo via perl6-users wrote:

Hi All,

Window 10-2005
Rakudo version 2020.05.1 built on MoarVM version 2020.05

Informative installs perfectly in Fedora (Linux), but
not Windows 10.  "--force-build" does not work either

Anyone know how to fix this?

Many thanks,
-T


K:\Windows\NtUtil>zef install GTK::Simple
===> Searching for: GTK::Simple
===> Updating cpan mirror: 
https://raw.githubusercontent.com/ugexe/Perl6-ecosystems/master/cpan1.json
===> Updated cpan mirror: 
https://raw.githubusercontent.com/ugexe/Perl6-ecosystems/master/cpan1.json
===> Updating p6c mirror: 
https://raw.githubusercontent.com/ugexe/Perl6-ecosystems/master/p6c1.json
===> Updated p6c mirror: 
https://raw.githubusercontent.com/ugexe/Perl6-ecosystems/master/p6c1.json

===> Building: GTK::Simple:ver<0.1.13>
===> Building [OK] for GTK::Simple:ver<0.1.13>
===> Testing: GTK::Simple:ver<0.1.13>
===> Testing [OK] for GTK::Simple:ver<0.1.13>
===> Installing: GTK::Simple:ver<0.1.13>


>zef install Informative still crashes

:'(


Re: I need help finding a class for a method

2020-06-08 Thread Peter Pentchev
On Mon, Jun 08, 2020 at 03:15:36PM -0700, ToddAndMargo via perl6-users wrote:
> On 2020-06-08 15:02, Peter Pentchev wrote:
> > On Mon, Jun 08, 2020 at 02:57:58PM -0700, ToddAndMargo via perl6-users 
> > wrote:
> > > On 2020-06-08 14:54, Peter Pentchev wrote:
> > > > On Mon, Jun 08, 2020 at 02:48:48PM -0700, ToddAndMargo via perl6-users 
> > > > wrote:
> > > > > On 2020-06-08 13:55, Richard Hainsworth wrote:
> > > > [snip]
> > > > > > The opening bracket for class Informing is on (or about) line 10 
> > > > > > and the
> > > > > > closing in at about line 630, with a comment 'end of Informing 
> > > > > > class'
> > > > > > 
> > > > > > Richard
> > > > > 
> > > > > Hi Richard,
> > > > > 
> > > > > Ah Ha!  and 626's bracket is not blue.  Geany
> > > > > does that some times.
> > > > > 
> > > > > 
> > > > > 9:  class Informing {
> > > > > 626:} # end of Informing class
> > > > > 
> > > > > Okay now.  I missed this because of line 8:
> > > > > 
> > > > > 8: =comment code for the inform dialog box
> > > > > 9:   class Informing {
> > > > >   has $!app;
> > > > >   has Bool $!reinit = True;
> > > > >   has $!inf-lable;
> > > > >   has $!box;
> > > > >   has $!btn-box;
> > > > >   has $!deleted_supply;
> > > > >   has $!title;
> > > > >   has $!position;
> > > > >   has $!timer-lable;
> > > > >   has @!buttons;
> > > > >   has @!entries;
> > > > >   has %.data = {};
> > > > >   has $.response;
> > > > >   has Supply $!sup = self.g-timeout(1000);
> > > > >   has Tap $!tap;
> > > > >   has Int $!timer = 10;
> > > > >   has Bool $!show-countdown = True;
> > > > > 27: has Str $.text is rw = "Say  > > > > color=\"green\">something
> > > > > beautiful";
> > > > > 28: 
> > > > > 
> > > > > Everything from line 8 to line 27 is a "comment".  The
> > > > > comment does not terminate until the first blank line,
> > > > > which is 28.
> > > > > 
> > > > > Seems to me the comment rules are being violated here.
> > > > > The comment does not terminate until the first blank
> > > > > line.
> > > > > 
> > > > > What am I missing, again.
> > > > > 
> > > > > :'(
> > > > 
> > > > OK, that is weird. I do not know why your editor is showing you that.
> > > > https://github.com/finanalyst/p6-inform/blob/master/lib/Informative.pm6
> > > > says that the "=comment" line is line 8, then there is a blank line 9,
> > > > and then there is a "class Informing {" on line 10.
> > > > 
> > > > G'luck,
> > > > Peter
> > > 
> > > 
> > > Poop!!!  (Not my actual word and not an admission that
> > > I cuss.)
> > > 
> > > Richard has a new one out, so I am going to get the new
> > > one ASAP
> > > 
> > > Thank you.  I though I was going nuts.
> > 
> > Eh, well...
> > https://github.com/finanalyst/p6-inform/blame/master/lib/Informative.pm6
> > ...says that this blank line has been there for the past four years,
> > actually longer than both the comment line above it and the current
> > state of the class line below it :)
> 
> Eye balling it shows it clearly there.
> 
> 
> > I'd start to wonder if it is possible that you deleted that line by
> > mistake. I *know* I've done that. I know I did it this week, and it's
> > only Monday :)
> 
> Not a chance the third or forth time at it.  It is a
> clipboard issue.  The secondary clipboard is a little
> weird in Fedora 32.
> 
> Hmm, I wonder about the primary clipboard.  No, screwed
> up in the primary clipboard too.

Wait. So you're copying and pasting the code?

I'd say do something like "dnf install git" and then

  git clone https://github.com/finanalyst/p6-inform.git

That way you'll get a p6-inform directory that will contain exactly what
Richard uploaded to his GitHub repository.

And if you need to later copy the code to your own file, either use
the "cp" command to start a whole new file, the same as another one in
the beginning, and then edit it to your liking, or use your editor to
copy certain lines to another file.

G'luck,
Peter

-- 
Peter Pentchev  r...@ringlet.net r...@debian.org p...@storpool.com
PGP key:http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint 2EE7 A7A5 17FC 124C F115  C354 651E EFB0 2527 DF13


signature.asc
Description: PGP signature


Re: I need help finding a class for a method

2020-06-08 Thread ToddAndMargo via perl6-users

On 2020-06-08 15:35, Peter Pentchev wrote:

On Mon, Jun 08, 2020 at 03:15:36PM -0700, ToddAndMargo via perl6-users wrote:

On 2020-06-08 15:02, Peter Pentchev wrote:

On Mon, Jun 08, 2020 at 02:57:58PM -0700, ToddAndMargo via perl6-users wrote:

On 2020-06-08 14:54, Peter Pentchev wrote:

On Mon, Jun 08, 2020 at 02:48:48PM -0700, ToddAndMargo via perl6-users wrote:

On 2020-06-08 13:55, Richard Hainsworth wrote:

[snip]

The opening bracket for class Informing is on (or about) line 10 and the
closing in at about line 630, with a comment 'end of Informing class'

Richard


Hi Richard,

Ah Ha!  and 626's bracket is not blue.  Geany
does that some times.


9:  class Informing {
626:} # end of Informing class

Okay now.  I missed this because of line 8:

8: =comment code for the inform dialog box
9:   class Informing {
   has $!app;
   has Bool $!reinit = True;
   has $!inf-lable;
   has $!box;
   has $!btn-box;
   has $!deleted_supply;
   has $!title;
   has $!position;
   has $!timer-lable;
   has @!buttons;
   has @!entries;
   has %.data = {};
   has $.response;
   has Supply $!sup = self.g-timeout(1000);
   has Tap $!tap;
   has Int $!timer = 10;
   has Bool $!show-countdown = True;
27: has Str $.text is rw = "Say something
beautiful";
28: 

Everything from line 8 to line 27 is a "comment".  The
comment does not terminate until the first blank line,
which is 28.

Seems to me the comment rules are being violated here.
The comment does not terminate until the first blank
line.

What am I missing, again.

:'(


OK, that is weird. I do not know why your editor is showing you that.
https://github.com/finanalyst/p6-inform/blob/master/lib/Informative.pm6
says that the "=comment" line is line 8, then there is a blank line 9,
and then there is a "class Informing {" on line 10.

G'luck,
Peter



Poop!!!  (Not my actual word and not an admission that
I cuss.)

Richard has a new one out, so I am going to get the new
one ASAP

Thank you.  I though I was going nuts.


Eh, well...
https://github.com/finanalyst/p6-inform/blame/master/lib/Informative.pm6
...says that this blank line has been there for the past four years,
actually longer than both the comment line above it and the current
state of the class line below it :)


Eye balling it shows it clearly there.



I'd start to wonder if it is possible that you deleted that line by
mistake. I *know* I've done that. I know I did it this week, and it's
only Monday :)


Not a chance the third or forth time at it.  It is a
clipboard issue.  The secondary clipboard is a little
weird in Fedora 32.

Hmm, I wonder about the primary clipboard.  No, screwed
up in the primary clipboard too.


Wait. So you're copying and pasting the code?

I'd say do something like "dnf install git" and then

   git clone https://github.com/finanalyst/p6-inform.git

That way you'll get a p6-inform directory that will contain exactly what
Richard uploaded to his GitHub repository.

And if you need to later copy the code to your own file, either use
the "cp" command to start a whole new file, the same as another one in
the beginning, and then edit it to your liking, or use your editor to
copy certain lines to another file.

G'luck,
Peter





Hi Peter,

It had better be EXACTLY the same thing as:

https://github.com/finanalyst/p6-inform/blob/master/lib/Informative.pm6

I copy and paste because I always forget how to do
Git, especially when I can't find the Git button
on the page.

-T


Re: I need help finding a class for a method

2020-06-08 Thread Peter Pentchev
On Mon, Jun 08, 2020 at 04:01:41PM -0700, ToddAndMargo via perl6-users wrote:
> On 2020-06-08 15:35, Peter Pentchev wrote:
> > On Mon, Jun 08, 2020 at 03:15:36PM -0700, ToddAndMargo via perl6-users 
> > wrote:
> > > On 2020-06-08 15:02, Peter Pentchev wrote:
> > > > On Mon, Jun 08, 2020 at 02:57:58PM -0700, ToddAndMargo via perl6-users 
> > > > wrote:
> > > > > On 2020-06-08 14:54, Peter Pentchev wrote:
> > > > > > On Mon, Jun 08, 2020 at 02:48:48PM -0700, ToddAndMargo via 
> > > > > > perl6-users wrote:
> > > > > > > On 2020-06-08 13:55, Richard Hainsworth wrote:
> > > > > > [snip]
> > > > > > > > The opening bracket for class Informing is on (or about) line 
> > > > > > > > 10 and the
> > > > > > > > closing in at about line 630, with a comment 'end of Informing 
> > > > > > > > class'
> > > > > > > > 
> > > > > > > > Richard
> > > > > > > 
> > > > > > > Hi Richard,
> > > > > > > 
> > > > > > > Ah Ha!  and 626's bracket is not blue.  Geany
> > > > > > > does that some times.
> > > > > > > 
> > > > > > > 
> > > > > > > 9:  class Informing {
> > > > > > > 626:} # end of Informing class
> > > > > > > 
> > > > > > > Okay now.  I missed this because of line 8:
> > > > > > > 
> > > > > > > 8: =comment code for the inform dialog box
> > > > > > > 9:   class Informing {
> > > > > > >has $!app;
> > > > > > >has Bool $!reinit = True;
> > > > > > >has $!inf-lable;
> > > > > > >has $!box;
> > > > > > >has $!btn-box;
> > > > > > >has $!deleted_supply;
> > > > > > >has $!title;
> > > > > > >has $!position;
> > > > > > >has $!timer-lable;
> > > > > > >has @!buttons;
> > > > > > >has @!entries;
> > > > > > >has %.data = {};
> > > > > > >has $.response;
> > > > > > >has Supply $!sup = self.g-timeout(1000);
> > > > > > >has Tap $!tap;
> > > > > > >has Int $!timer = 10;
> > > > > > >has Bool $!show-countdown = True;
> > > > > > > 27: has Str $.text is rw = "Say  > > > > > > color=\"green\">something > > > > > > color=\"red\">
> > > > > > > beautiful";
> > > > > > > 28: 
> > > > > > > 
> > > > > > > Everything from line 8 to line 27 is a "comment".  The
> > > > > > > comment does not terminate until the first blank line,
> > > > > > > which is 28.
> > > > > > > 
> > > > > > > Seems to me the comment rules are being violated here.
> > > > > > > The comment does not terminate until the first blank
> > > > > > > line.
> > > > > > > 
> > > > > > > What am I missing, again.
> > > > > > > 
> > > > > > > :'(
> > > > > > 
> > > > > > OK, that is weird. I do not know why your editor is showing you 
> > > > > > that.
> > > > > > https://github.com/finanalyst/p6-inform/blob/master/lib/Informative.pm6
> > > > > > says that the "=comment" line is line 8, then there is a blank line 
> > > > > > 9,
> > > > > > and then there is a "class Informing {" on line 10.
> > > > > > 
> > > > > > G'luck,
> > > > > > Peter
> > > > > 
> > > > > 
> > > > > Poop!!!  (Not my actual word and not an admission that
> > > > > I cuss.)
> > > > > 
> > > > > Richard has a new one out, so I am going to get the new
> > > > > one ASAP
> > > > > 
> > > > > Thank you.  I though I was going nuts.
> > > > 
> > > > Eh, well...
> > > > https://github.com/finanalyst/p6-inform/blame/master/lib/Informative.pm6
> > > > ...says that this blank line has been there for the past four years,
> > > > actually longer than both the comment line above it and the current
> > > > state of the class line below it :)
> > > 
> > > Eye balling it shows it clearly there.
> > > 
> > > 
> > > > I'd start to wonder if it is possible that you deleted that line by
> > > > mistake. I *know* I've done that. I know I did it this week, and it's
> > > > only Monday :)
> > > 
> > > Not a chance the third or forth time at it.  It is a
> > > clipboard issue.  The secondary clipboard is a little
> > > weird in Fedora 32.
> > > 
> > > Hmm, I wonder about the primary clipboard.  No, screwed
> > > up in the primary clipboard too.
> > 
> > Wait. So you're copying and pasting the code?
> > 
> > I'd say do something like "dnf install git" and then
> > 
> >git clone https://github.com/finanalyst/p6-inform.git
> > 
> > That way you'll get a p6-inform directory that will contain exactly what
> > Richard uploaded to his GitHub repository.
> > 
> > And if you need to later copy the code to your own file, either use
> > the "cp" command to start a whole new file, the same as another one in
> > the beginning, and then edit it to your liking, or use your editor to
> > copy certain lines to another file.
> 
> Hi Peter,
> 
> It had better be EXACTLY the same thing as:
> 
> https://github.com/finanalyst/p6-inform/blob/master/lib/Informative.pm6

It ought to be.

> I copy and paste because I always forget how to do
> Git, especially when I can't find the Git button
> on the page.

Yes, I know. Git does ta

Re: I need help finding a class for a method

2020-06-08 Thread ToddAndMargo via perl6-users

On 2020-06-08 16:08, Peter Pentchev wrote:

Yes, I know. Git does take some getting used to; any program does. With
time, you may find it useful.



The things you do all the time, you remember.  Since
I am IT support to small business and do EVERYTHING,
except the wiring, which I have guys that do that
for me, I have to write a lot of things down and
keep copious notes whenever I figure something
out.  Sometimes I forget I have already written
it down.

I forgot what /etc/services was called last week.
Really annoyed me.  I had to troubleshoot down
a "Carrier-grade NAT" reserved address blocking
SYN packets.   I probably won't do that again for
two years (Fedora has all the cool tools).