Re: Help with macports port for zef

2023-12-31 Thread Tom Browder
On Mon, Nov 27, 2023 at 02:17 raf via perl6-users 
wrote:

>  Hi. I'm trying to create a macports portfile for zef so


I'm not a Mac user, but I've been struggling with another Rakudo
installation method for Linux and had similar problems. My solution has
been to install the binary code for linux by downloading it and putting it
in /opt.

Where are you getting the compiled code? Are you rearranging it in any way
before it gets to the final destination?

Best regards,

-Tom


Re: Test not working so well

2023-12-09 Thread Tom Browder
Try: say so $=

On Sat, Dec 9, 2023 at 18:22 ToddAndMargo via perl6-users <
perl6-us...@perl.org> wrote:

> Hi All,
>
> What am I doing wrong here?
>
>
> my $x="abc2def"; say  $x=/ ^ <[0..9]> ** 7 $ /;
> / ^ <[0..9]> ** 7 $ /
>
> [0] > my $x="abc2def"; say  $x=/ ^ <[l..z]> ** 7 $ /;
> / ^ <[l..z]> ** 7 $ /
>
> [0] >   my $x="abc2def"; say  $x~~/ ^ <[0..9]> ** 7 $ /;
> Nil
>
> [0] > my $x="abc2def"; say  $x~~/ ^ <[l..z]> ** 7 $ /;
> Nil
>
>
> I am looking for a True or a False.
>
> Many thanks,
> -T
>


Re: Marketing / PR / Branding

2023-10-31 Thread Tom Browder
On Tue, Oct 31, 2023 at 08:41 Fernando Santagata 
wrote:

> Hi Richard,
>
> Where is the Raku/Problem-solvers discussion about PR?
>

Ditto


Re: BEGIN {} question

2022-08-29 Thread Tom Browder
On Mon, Aug 29, 2022 at 12:31 PM ToddAndMargo via perl6-users
 wrote:
> On 8/29/22 08:41, Tom Browder wrote:
...
> > And I think you may be surprised how much speedup you may get by using
> > the precompiled-module "trick" for most of your 11,000-line program.
...
> Hi Tom,
> The .precomp workaround was never in question!
> But there are tines when it is impractical.
...
> So lots and lots of compiling that .precomp does not
> help me with.
...
> More information that you wanted.  Sorry.

No reason to apologize, Todd. I had forgotten how much you were
actually doing with your Raku code--a textbook example for sure!

But I apologize for my impatient replies.  :-)

Blessings,

-Tom


Re: BEGIN {} question

2022-08-29 Thread Tom Browder
On Mon, Aug 29, 2022 at 10:29 AM ToddAndMargo via perl6-users <
perl6-us...@perl.org> wrote:
...
> Does the compiler make a full pass through
> the code before firing off the BEGIN routine

NO.

And I think you may be surprised how much speedup you may get by using the
precompiled-module "trick" for most of your 11,000-line program.

-Tom


Re: Implementation of documented POD6 behaviour

2021-12-30 Thread Tom Browder
On Thu, Dec 30, 2021 at 07:17 Richard Hainsworth 
wrote:

> I plan to use the POD6 metadata functionality a lot in a new module. It
> would be far better to separate out the meta data into lines.
>
Richard, there are many pod things that haven’t been implemented yet. I
have planned for a long time to do some more, but I think it’s best to wait
until the Rakuast branch is implemented on the master branch.

FYI, my early efforts were not as good as they should have been because of
my tiny knowledge of the grammar, and I know of many places where things
could be improved. Some of those places require, IMHO, a major redo of some
pod constructs. Not many folks were interested in pod, but that is changing
as Raku is maturing and getting new blood and interest.

You should feel free to work on anything that interests you.

Happy New Year!


Re: file format extensions

2021-12-30 Thread Tom Browder
On Thu, Dec 30, 2021 at 06:26 Elizabeth Mattijsen  wrote:

> +1 from me.  Shouldn't that be a .rakudoc file ?  :-)


Or .rakupod?


Re: why not raku ?

2021-11-22 Thread Tom Browder
On Mon, Nov 22, 2021 at 12:13 PM Clifton Wood  wrote:
> Aureliano:
> You are correct. That is an effective workaround, but it will be a 
> maintenance nightmare for large C++ libraries if you have to wrap every 
> method.
> There has to be a better way.

Not so easy to find in the docs, but here is a useful module that
might be the first place to start helping with:

  https://github.com/Skarsnik/gptrixie

It says support for C++ is planned.

-Tom (aka 'tbrowder' on #raku)


Re: why not raku ?

2021-11-19 Thread Tom Browder
On Fri, Nov 19, 2021 at 07:48 Aureliano Guedes 
wrote:

> I am still defending that we need a package for data
> analysis/science/engineer (like the Perl5 PDL, Python Pandas or R
> data.table) and an IDE for streaming programming like jupyter or rstudio.
>

Speaking for myself, I agree, and I think there are more than a few of us
who would help if some expert took the stick and started such a project.

-Tom


Re: Docs on docs.raku.org need automated build

2021-11-15 Thread Tom Browder
On Mon, Nov 15, 2021 at 12:43 JJ Merelo  wrote:

> Done also for the official site, https://docs.raku.org
> Check it out.
>

Thank you, JJ--it looks great!

-Tom


Docs on docs.raku.org need automated build

2021-11-14 Thread Tom Browder
Doc site i see is several weeks old and missing my last merged  contrib on
example of programmatic use of ‘require’.

Any hope of a rebuild this month?

-Tom


Re: Windows tutorial needed (Todd?)

2021-11-06 Thread Tom Browder
On Sat, Nov 6, 2021 at 18:02 ToddAndMargo  wrote:

> On 7/11/21 02:31, Tom Browder wrote:
> > See https://github.com/Raku/docs <https://github.com/Raku/docs> issue
> #3913.
> >
> > -Tom (tbrowder)
>
> Hi Tom,
>
> I finally got around to writing your request up.  I will
> let you look it over, modify as needed, and place in
> the proper location.


Thanks, Todd, I’ll take a look. This is very timely since I have a captive
audience (most likely all Windows ppl) at our local library next Saturday
and will be mentioning Raku and Perl.

Blessings,

-Tom

P.S. The doc did make it with your previous email.

>


Re: ftp client yet?

2021-10-26 Thread Tom Browder
On Tue, Oct 26, 2021 at 00:22 Ralph Mellor  wrote:

> > This is what the more complicated stuff I am doing.

...

And if the code doesn't work because of a newly-found need of a go-between
Perl5 and Raku, the author of Inline::Perl5 is very helpful in finding a
fix and releasing a new version.

Best,

-Tom


Re: pod questions

2021-07-19 Thread Tom Browder
On Mon, Jul 19, 2021 at 09:20 Marcel Timmerman  wrote:

> On 7/19/21 2:29 PM, Tom Browder wrote:
>
> On Mon, Jul 19, 2021 at 06:57 Marcel Timmerman  wrote:
>
> Reading a bit, I came across old documents (with a warning that these are
>> out of date) https://design.raku.org/S02.html#Multiline_Comments . It
>> states that any unrecognized format name should be treated as a comment
>> block, which the above output shows, the renderers do not. Should I file an
>> issue?
>>
>
> Yes, please.
>
> -Tom
>
> Will do.
>
> What about the other questions?
>

Regarding the other questions:

1. I believe there are no reserved words for the '=begin/=end comment'.
However, nested comments I believe were an issue at one time but they
aren't now.

3. That depends on what you're doing. For example, currently the Raku
parser recognizes the nested pod code block, but it cannot handle pod codes
inside that pod code block.

If you just want to preserve whitespace using one of the two blocks alone
should be good enough.

-Tom


Re: pod questions

2021-07-19 Thread Tom Browder
On Mon, Jul 19, 2021 at 06:57 Marcel Timmerman  wrote:

Reading a bit, I came across old documents (with a warning that these are
> out of date) https://design.raku.org/S02.html#Multiline_Comments . It
> states that any unrecognized format name should be treated as a comment
> block, which the above output shows, the renderers do not. Should I file an
> issue?
>

Yes, please.

-Tom


Re: Windows tutorial needed (Todd?)

2021-07-12 Thread Tom Browder
On Mon, Jul 12, 2021 at 15:44 ToddAndMargo via perl6-users <
perl6-us...@perl.org> wrote:

I should be able to help with a few of those.  Do I post
> it back to the issue and have JJ formalize it?


Do you know how to write in Markdown or Raku POD?

Did you ever get your Github account?

IMHO, you (emphasis on YOU) should try to write a good draft we can comment
on, that means it would be best done on your own github account. Then you
can use the web interface and edit from any browser. Plus it's easy for
other users to peruse and comment on.

You have a reputation as the primo Raku Windows user (and Windows
professional expert), so you should run your draft up the old github flag
pole and we onlookers can suggest fine tuning edits.  ;-D

-Tom

P.S. And JJ can peek in once in awhile if he wants to.


Re: Windows tutorial needed (Todd?)

2021-07-12 Thread Tom Browder
On Sun, Jul 11, 2021 at 17:12 ToddAndMargo via perl6-users
 wrote:
> On 7/11/21 2:31 AM, Tom Browder wrote:
> > See https://github.com/Raku/docs <https://github.com/Raku/docs> issue #3913.
...
> Would you be a little more specific.  Are you looking for
> an install guide?  Or something else?

Todd, did you look at the issue in the corrected link submitted by
@yary? That pretty much describes (in order of most to least
importance) the main things I would like to see in the
tutorial/checklist.

If not, please look at:  <https://github.com/Raku/doc/issues/3913>.


Re: Windows tutorial needed (Todd?)

2021-07-12 Thread Tom Browder
On Sun, Jul 11, 2021 at 14:27 yary  wrote:

> The link for that issue is https://github.com/Raku/doc/issues/3913
> ("doc" not "docs")
>

Thanks, @yary, for noticing my FF (finger fumble :-D)!


Windows tutorial needed (Todd?)

2021-07-11 Thread Tom Browder
See https://github.com/Raku/docs issue #3913.

-Tom (tbrowder)


Re: How do a pe-salt an array inside an object?

2021-07-06 Thread Tom Browder
On Tue, Jul 6, 2021 at 14:53 ToddAndMargo via perl6-users <
perl6-us...@perl.org> wrote:
...

> writing out 2000 skips is not practical.


Todd, why don't you tell us what you're really trying to do, i.e., what is
your use case? Maybe the experts can suggest a better class design.

-Tom


Re: What's going on with "given (junction) {when (value)...}"

2021-06-01 Thread Tom Browder
On Tue, Jun 1, 2021 at 11:31 William Michels via perl6-users <
perl6-us...@perl.org> wrote:

> Hi Bruce,
> This is what I see with Rakudo 2020.10 (all code below performs
> delightfully as expected):
>

This whole thread looks like good stuff for some probably missing roast
tests.

-Tom


Re: Module Documentation

2021-03-16 Thread Tom Browder
On Tue, Mar 16, 2021 at 05:20 Elizabeth Mattijsen  wrote:

> > On 16 Mar 2021, at 04:22, Matthew Stuckwisch 
> wrote:
> >


I'm on board with this. I also use App::Mi6 after I saw from Elizabeth how
much  it helps with module development (and maintenance!).

And from almost the beginning with mi6 I put my README.md source in a
docs/README.pod location so the mi6 usage would not interfere with inline
pod in my modules (but don't forget to change the dist.ini file
accordingly).

-Tom


Re: Please create a Raku community channel

2021-03-13 Thread Tom Browder
On Sat, Mar 13, 2021 at 08:12 Joseph Brenner  wrote:

> Richard Hainsworth  wrote:
>
> > I found out yesterday by the intervention of a regular participant in
> > the community that a new documentation website is being worked on.
>
> I should say, I was surprised to hear about that project also.  I knew
> about Richard Hainsworth's work, but not about what the other team was
> doing.
>
Same here, and I have a very vested interest since I contributed a working
solution to the pre-documentable doc site that kept the Languag sub-section
titles sorted which is very important IMHO for easier browsing.


Re: Module Documentation

2021-03-02 Thread Tom Browder
On Tue, Mar 2, 2021 at 08:42 Daniel Sockwell 
wrote:

> Richard Hainsworth  wrote:
> > My suggestion is that some formal decision is made about documentation
> for Raku modules, that some
> > documentation good practices are put together and included in the
> Modules page.
>

I agree that's a good idea, but I think it needs to be part of a larger
idea of module best practices in general, including testing, and maybe a
"green" check as a module that approved as "meets standard" or
something like that.


Re: Help with bug

2020-12-29 Thread Tom Browder
On Tue, Dec 29, 2020 at 17:16 Elizabeth Mattijsen  wrote:

> Using an `await` inside a react, feels like a code smell to me.  An
> `await` will


I suggest using 'note' for debugging instead of print or say so info is not
delayed and goes straight to stderr.

-Tom


Re: spurt and array question

2020-11-14 Thread Tom Browder
On Sat, Nov 14, 2020 at 01:59 ToddAndMargo via perl6-users <
perl6-us...@perl.org> wrote:

> Hi All,
>
> I am writing out an array of text lines to a file.
> I just can't help but thinking I am doing it the
> hard way.
>
> unlink( $Leafpadrc );
> for @LeafpadrcNew -> $Line  { spurt( $Leafpadrc, $Line ~ "\n",
> :append ); }
>

Unless I misunderstand, why doesn't this work:

my $fh = open $Leafpadrc, :w;
$fh.say($_) for @Leafpadrc;

-Tom


Re: Raku User's Survey 2020 out now....

2020-08-28 Thread Tom Browder
On Thu, Aug 27, 2020 at 20:41 ToddAndMargo via perl6-users
 wrote:
> On 2020-08-27 16:53, Daniel Long Sockwell wrote:
> >> Very few of the other [methods are documented] this way.

Todd, I have one more suggestion: Why don't you put your "keepers" on Github?

Several advantages:

1. easy to change

2. easy to find

3. more eyes on it

4. PRs from interested parties to fix typos or maybe even errors

5. used Markdown format and can easily convert to pdf

6. maybe inspire you to publish your own Raku book

-Tom


Re: Extended identifiers in named attributes

2020-08-26 Thread Tom Browder
On Wed, Aug 26, 2020 at 07:31 Marcel Timmerman  wrote:

I was experimenting with extended identifiers and found that it is
>
> not possible to use it in named attributes. E.g.
>
> > sub a (:$x:y) { say $x:y; }
>
> Are you sure that is supposed to work without some kind of () or <> like a
module identifier? But a doc note would be helpful.

Best regards,

-Tom


Re: Any sign of a fix for the 10 second compile time?

2020-08-01 Thread Tom Browder
On Sat, Aug 1, 2020 at 12:30 Richard Hainsworth 
wrote:

> What you are asking for is not a bug, but a part of the current stage of
> design. It will probably get quicker.


Richard, you should find an appropriate place in the docs and add a section
on setting up your personal zef repo.

Thanks.

-Tom


Re: Any sign of a fix for the 10 second compile time?

2020-07-31 Thread Tom Browder
On Fri, Jul 31, 2020 at 5:38 PM ToddAndMargo via perl6-users
 wrote:
> >> Todd, a couple of questions:
> >> 1. In your modules that change all the time, do have "use lib ...;"
> >> statements in any of them?
> >
> > No.  If I do, they crash
>
> # use lib '/home/linuxutil/p6lib';   # may not be precompiled; calling
> program must take care of this


Just for "-O fun", set up your modules as if they were to be public,
i.e., add a META6.jso for the module collection.
The collection being "/path/to/MyModules" and in MyModules create:

 META6.json # create it and add all your modules in it just like
you were going to publish the whole mess.
 ./lib/
# my modules as moved or duped from "/home/linuxutil/p6lib"
 t/
00-meta-test.t # some basic test to check your META6.json file

Then, in dir "/path/to/MyModules" try:

$ zef install .  # <== that's a DOT/PERIOD, i.e., the current directory

If that works, then you should be able to "use" them from your program.

-Tom


Re: Any sign of a fix for the 10 second compile time?

2020-07-31 Thread Tom Browder
On Fri, Jul 31, 2020 at 14:55 ToddAndMargo via perl6-users <
perl6-us...@perl.org> wrote:

> >> On Fri, Jul 31, 2020, 04:45 ToddAndMargo via perl6-users
> >> mailto:perl6-us...@perl.org>> wrote:


Todd, a couple of questions:

1. In your modules that change all the time, do have "use lib ...;"
statements in any of them?

2. If the answer to 1. is true, did you know you can use zef to install
your own, non-published modules and then remove "use lib...;" statements
from your modules and your programs?

-Tom


Re: Baby steps to create a dataframe structure

2020-07-22 Thread Tom Browder
On Wed, Jul 22, 2020 at 06:51 JJ Merelo  wrote:

> The Raku wrapper for GSL is ready, specifically all matrix operations,
> check it out. It's extremely fast, and could be the foundation for these
> data frames.
>

Depending on your use of the GSL, as I recall the license restricts
commercial use.

Best regards,

-Tom


Re: Baby steps to create a dataframe structure

2020-07-21 Thread Tom Browder
On Tue, Jul 21, 2020 at 20:00 Warren Pang  wrote:

> I have the same feeling. Perl5 has PDL which we have been using for data
> analysis. While Raku seems to lack this.
>

I haven't looked into how it might work, but Raku does have the NativeCall
interface as well as Inline::Perl5 which may help.

I have had a lot of success with using CPAN's Perl modules with Raku
programs.

Best regards,

-Tom


Fwd: delimiters with more than one character? ...

2020-07-16 Thread Tom Browder
An opportunity for Raku golfers to show off Raku on the Debian users list.

Best regards,

-Tom

-- Forwarded message -
From: Albretch Mueller 
Date: Tue, Jul 14, 2020 at 07:52
Subject: delimiters with more than one character? ...
To: Debian Users ML 


 I have a string delimited by two characters: "\|"

 _S=" 34 + 45 \| abc \| 1 2 3 \| c\|123abc "

 which then I need to turn into a array looking like:

  _S_AR=(
" 34 + 45 "
" abc "
" 1 2 3 "
" c"
"123abc "
)

  I can't make awk or tr work in the way I need and all examples I
have found use only one character.

  Is it possible to do such things in bash?

  lbrtchx


Re: just curious to know

2020-06-14 Thread Tom Browder
On Sun, Jun 14, 2020 at 10:56 Richard Hainsworth 
wrote:

> Hi Radhakrishnan,
>
> If 'spreading wings over the information technology field' were to mean
> anything other than what is fashionable today, then C still reigns.


Richard, excellently said!

I would like to see that on our Raku.org site in a prominent place.

-Tom


Re: I need a GTK pop up with time out

2020-06-03 Thread Tom Browder
On Wed, Jun 3, 2020 at 20:56 ToddAndMargo via perl6-users <
perl6-us...@perl.org> wrote:
...

>  Can anyone point me to
> an example of a GTK information pop up with a time out
> feature?  Or similar?


Have you looked at the examples in the GTK::Simple repo?

Go to modules.raku.org, search on GTK, see link to repo.

-Tom


Re: bash "."?

2020-05-28 Thread Tom Browder
On Fri, May 15, 2020 at 20:38 ToddAndMargo via perl6-users <
perl6-us...@perl.org> wrote:

> On 2020-05-15 17:26, Tom Browder wrote:
> > On Fri, May 15, 2020 at 13:47 ToddAndMargo via perl6-users
> > mailto:perl6-us...@perl.org>> wrote:


Did you look at Raku modules:

   Config::INI
   Config
   ...

Go to modules.raku.org and search for "config".

-Tom


Re: I need help with IO.e

2020-05-19 Thread Tom Browder
On Tue, May 19, 2020 at 03:44 Richard Hainsworth 
wrote:

> The transcendental abundance of purple in Raku :)


Ah, Richard, thanks for a trip down memory lane! In my youth I discovered
the joys of science fiction a few years after that piece was published.

-Tom


Re: I need help with IO.e

2020-05-18 Thread Tom Browder
On Mon, May 18, 2020 at 17:51 ToddAndMargo via perl6-users <
perl6-us...@perl.org> wrote:

> On 2020-05-18 15:44, Tom Browder wrote:
> > On Mon, May 18, 2020 at 16:19 ToddAndMargo via perl6-users
> > mailto:perl6-us...@perl.org>> wrote:
> >
> > On 2020-05-18 13:28, Tom Browder wrote:
> >
> > ...
> >
> >  > Try:
> >  >
> >  > 'say so "test".IO.d'
> >
> >
> > Todd, you didn't try what I suggested. Once again, look a the line
> above^^
> >
> > There is no "if" there.
> >
> > -Tom
> >
>
> It was the "if" I was interested in.  "if" has to change
> a True or "useless text message" into a True or False.


Since you don't like to listen to advice I give up. The 'so' I was taught
by lizmat (or some other expert) a long time ago does the pretty much the
same thing  execpt it makes a valid statement, whereas I'm not sure the
other way does (hard to read your emails with all the superflous output).


Re: I need help with IO.e

2020-05-18 Thread Tom Browder
On Mon, May 18, 2020 at 16:19 ToddAndMargo via perl6-users <
perl6-us...@perl.org> wrote:

> On 2020-05-18 13:28, Tom Browder wrote:

...

> > Try:
> >
> > 'say so "test".IO.d'


Todd, you didn't try what I suggested. Once again, look a the line above^^

There is no "if" there.

-Tom


Re: I need help with IO.e

2020-05-18 Thread Tom Browder
On Mon, May 18, 2020 at 14:36 ToddAndMargo via perl6-users <
perl6-us...@perl.org> wrote:

> On 2020-05-17 22:28, Paul Procacci wrote:

...

> 'say if "test".IO.d',  and
> 'say "test".IO.d.Bool'


Try:

'say so "test".IO.d'


Re: bash "."?

2020-05-15 Thread Tom Browder
On Fri, May 15, 2020 at 13:47 ToddAndMargo via perl6-users <
perl6-us...@perl.org> wrote:

>
> >> On 15 May 2020, at 20:08, ToddAndMargo via perl6-users <
> perl6-us...@perl.org> wrote:
> >>
> >> On 2020-05-15 10:37, Elizabeth Mattijsen wrote:
> >>> There will never be a Perl 6 version.
> >>
> >>
> >> what would you use in place of it?


Todd, I haven't kept up with the details of what you really need, but I
really like the Raku module Config::TOML for my needs. It might not work if
you have to adhere to some other standard, but if you have control it's
pretty slick.

-Tom


[Raku/old-design-docs] 1a90f9: fix identifier in used context

2020-04-26 Thread Tom Browder
  Branch: refs/heads/master
  Home:   https://github.com/Raku/old-design-docs
  Commit: 1a90f942619e0d027f9c19228003e20a1997364d
  
https://github.com/Raku/old-design-docs/commit/1a90f942619e0d027f9c19228003e20a1997364d
  Author: Aliaksandr Zahatski 
  Date:   2020-04-26 (Sun, 26 Apr 2020)

  Changed paths:
M S26-documentation.pod

  Log Message:
  ---
  fix identifier in used context


  Commit: 93cc768ab2fe5c7440129e0e7630df3c666f6828
  
https://github.com/Raku/old-design-docs/commit/93cc768ab2fe5c7440129e0e7630df3c666f6828
  Author: Tom Browder 
  Date:   2020-04-26 (Sun, 26 Apr 2020)

  Changed paths:
M S26-documentation.pod

  Log Message:
  ---
  Merge pull request #127 from Raku/zag-patch-1

fix identifier in used context ( Synopsis 26 )


Compare: 
https://github.com/Raku/old-design-docs/compare/180b534bd6f0...93cc768ab2fe


Re: OAuth2?

2020-03-22 Thread Tom Browder
On Sun, Mar 22, 2020 at 17:05 ToddAndMargo via perl6-users <
perl6-us...@perl.org> wrote:

> On 2020-03-22 10:39, Tom Browder wrote:

> Have you folks checked out Raku module "OAuth2::Client::Google"?

...

> Any chance at a peakl at your code?  The example over
> on OAuth2::Client::Google is 404


What link are you using? Go to my account on <https://github.com/tbrowder>
and search for oauth2 and there's my code.

Also did you search on <http://modules.raku.org>? Are you aware of that
site?

-Tom


Re: OAuth2?

2020-03-22 Thread Tom Browder
On Sun, Mar 22, 2020 at 8:25 AM Gerard ONeill 
wrote:

> Just looked at the stackoverflow post — there are 3 updates with respect
> to needing to reauthenticate.
>

Have you folks checked out Raku module "OAuth2::Client::Google"?

I got it to work a bit for downloading mail.

-Tom

@tbrowder


Re: qqx with quotes

2020-02-26 Thread Tom Browder
On Wed, Feb 26, 2020 at 19:47 ToddAndMargo via perl6-users <
perl6-us...@perl.org>
...

> Hmm, this don't [sic] work either:
>
> perl6 -e "my $proc=run( 'dir', 'test 1', :out ); my @RtnStr  = $$proc.
> out.slurp-rest.lines; for @RtnStr -> $Line { say $Line;}"


Todd, sloppy copy/paste or error with double dollar signs. What resulted?

-Tom


Re: printf question

2020-02-04 Thread Tom Browder
On Tue, Feb 4, 2020 at 01:04 ToddAndMargo via perl6-users <
perl6-us...@perl.org> wrote:
...

> >> Who do I get it to print

>>
> >>   0b0100_


Look at my module Text::Utils and its "commify" sub taken from "The Perl
Cookbook." Its algorithm (similar to Paul's) should be able to do what you
want.

-Tom


Re: stolen uint's

2020-01-29 Thread Tom Browder
On Wed, Jan 29, 2020 at 12:34 PM ToddAndMargo via perl6-users
 wrote:
> On 2020-01-29 00:43, Tobias Boege wrote:
> > On Tue, 28 Jan 2020, ToddAndMargo via perl6-users wrote:
> >> This all came up when I tried to match
...
> if $ValueData.^name  ne "Int"  || $ValueData < 0  {   # UInt gets
> "boxed" to an Int
>$ErrStr = "ERROR: $SubName\n\n" ~
>  "   ValueData must be an Unsigned Integer when used
> with $ValueType\n\n" ~
>  "   Cowardly exiting\n\n";
>say $ErrStr;
>WinMsg( "ValueData Error", $ErrStr );
>exit;
> }
>
> Hm... I forgot the "Bummer Dude!"
>
> Would you like to see the actual code?  I am not
> posting it here as it is several hundred lines long

Todd, use your Github account to post real code. You can access your
account via a browser easily.

-Tom


Re: I need syntax to sub declare return a hash and an array

2020-01-23 Thread Tom Browder
On Thu, Jan 23, 2020 at 08:15 Elizabeth Mattijsen  wrote:

> >> Larry Wall once warned that the "return..." syntax may be removed at
> some point.
> > "return..." is a common idiom in many programming languages, and
> > keeping it around might help programmers ease their transition to
> > raku/perl6. So I'd hate to see "return" go away--at least for the
> > foreseeable future.
>
> I don't see 'return' disappearing.
>
> What was meant, I think, is the "returns" syntax:


Yes, Liz, good catch. That was a BAD typo!

Thanks!


Re: I need syntax to sub declare return a hash and an array

2020-01-21 Thread Tom Browder
On Tue, Jan 21, 2020 at 18:34 Todd Chester via perl6-users <
perl6-us...@perl.org> wrote:

> On 2020-01-21 16:09, Todd Chester via perl6-users wrote:
> >> 4) A block (that is the { ... } bit) will always 'return' the last
> >> expression evaluated.
> >
> > Seems to me I have see the last expression returned even without
> > the {...}.  Maybe I am misremembering.


Todd, the {} is the block defining the subroutine.

 > sub AplusB( $a, $b --> Int ){$a+$b;}


The above is the sub's definition.

>

> 


The above should generate an error because the mandatory args are missing,
depending on the context (don't quote me on that).

 > AplusB 2, 3
> 5
>
The above shows the sub being called with the required two args, and the 5
is the returned value which is probably shown in the REPL since there is no
semicolon after the call and the 5 is not usually seen otherwise.

As usual, you are a bit sloppy in your email text so it's not clear exactly
what you are doing and what the real result is and in what context the
question or statement is being shown.

-Tom


Re: I need syntax to sub declare return a hash and an array

2020-01-21 Thread Tom Browder
On Mon, Jan 20, 2020 at 22:16 ToddAndMargo via perl6-users <
perl6-us...@perl.org> wrote:

> On 2020-01-20 20:09, ToddAndMargo via perl6-users wrote:
> > On 2020-01-20 19:55, ToddAndMargo via perl6-users wrote:

...

> > I think this is it:
> >
> >  > sub x() returns Associative { my %h= A=>"a"; return %h}
> > 
> >  > x
> > {A => a}
> ...
> Yup, too high up the food chain:
>
>  > sub x() returns Hash { my %h= A=>"a"; return %h}


The preferred syntax is:

sub x(--> Hash) {...}

See that in the docs.

Larry Wall once warned that the "return..." syntax may be removed at some
point.

-Tom


Creating a doc PR

2020-01-19 Thread Tom Browder
There is recipe on the doc repo now which should be usable for a VERY
BASIC intro to creating a doc PR.

See it here:

  https://github.com/Raku/doc/blob/master/CONTRIBUTING_PRs.md


Re: Once again - You say one thing and do another Re: Bug to report: cardinal called an integer

2020-01-17 Thread Tom Browder
On Fri, Jan 17, 2020 at 1:44 PM ToddAndMargo via perl6-users
 wrote:
...
> Was this what you were referring to?
>
> https://github.com/Raku/doc/blob/master/CONTRIBUTING.md

No, check this link:

https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request

-Tom


Re: Once again - You say one thing and do another Re: Bug to report: cardinal called an integer

2020-01-17 Thread Tom Browder
On Fri, Jan 17, 2020 at 06:06 Todd Chester via perl6-users <
perl6-us...@perl.org> wrote:

>
>
> On 2020-01-17 00:12, Veesh Goldman wrote:
> > he's finally looked into making pull requests.
>
> Do you have a link to the pull requests for
> the documentation?  I'd like to add some examples
> to a few pages.


Todd, I don't think that link will help until you understand what actually
you need to contribute a PR.

As I said before, I'll be happy to give you a step-by-step recipe for
creating a PR for the docs after you decide on a clean directory to use for
cloning the doc repository. I think you said you are too busy at the moment.

If you can't find the time now, okay. In any event, you can look at the
Github help section and find out more about PRs. Better yet, go to the Git
home page and check out their documentation (which includes videos).
Website is:

  https://git-scm.com

-Tom


Re: Once again - You say one thing and do another Re: Bug to report: cardinal called an integer

2020-01-15 Thread Tom Browder
On Wed, Jan 15, 2020 at 18:38 ToddAndMargo via perl6-users <
perl6-us...@perl.org> wrote:

> On 2020-01-15 15:50, Laurent Rosenfeld via perl6-users wrote:
> > So, the way you behave with him is just nasty and evil. Please stop
> > doing that.
>
> That is in your own head.


Todd, why can't you clone the doc repo and take just one doc chunk you
think could be better, fix it, and submit a pull request?

-Tom

>


Re: Once again - You say one thing and do another Re: Bug to report: cardinal called an integer

2020-01-15 Thread Tom Browder
On Wed, Jan 15, 2020 at 4:19 PM Elizabeth Mattijsen  wrote:
>
> Thank you Richard for this long and thoughtful answer.

Amen, Liz!

-Tom (tbrowder)


Re: bitwise NOT

2020-01-15 Thread Tom Browder
guys, interesting thread, but it's "complement"

-Tom


Re: A grand idea on the documentation

2019-12-10 Thread Tom Browder
On Mon, Dec 9, 2019 at 12:49 Peter Scott  wrote:
...

Developers need reminders, in the most succinct form, to minimize time,
> of data that they should not need to memorize.  The documentation
> satisfies that need in the same way that a phone book satisfies the need
> to look up someone's number.  The phone book is not bloated with
> explanations of each person's favorite food or the history of the phone
> company.
>
> Your 'keeper' documents sound like they should be shared with others who
> may be in the same situation as you.  Please follow the suggestions for
> how to do that so you can see how they are received.


I have a suggestion that might be a solution, and I tried to get interest
in it in 2015 or 16 when the docs were starting to get a lot of attention:

+ Start something like a Cookbook similar to the printed one published by
O'Reilly for Perl (but watch out for copyright issues such as identical
sections and layout)

Put the cookbook on the current docs site. The docs could stay the way they
are, but, as suggested above, have links into the cookbook for recipes for
real use cases like Todd wants.

With the tooling in place, Todd could start adding his stuff in the
appropriate place, and it would be fair game for editing as necessary.

Also as suggested above, the layout and links to and from the (reference)
docs and the example docs could be automated.

-Tom


Re: looking for good project to learn perl6

2019-12-08 Thread Tom Browder
On Sun, Dec 8, 2019 at 10:38 AM Fernando Santagata
 wrote:
>
> Hello,
> I started writing a raw interface to Tensorflow, but I stopped for various 
> reasons [¹]. If anyone wants to work on it I can help and/or share what I've 
> produced so far.
>
> [¹] three main reasons:
...

Fernando, I'm on board with you on all three!

But doesn't the Apache Group have something similar that could be a
killer app without as much angst: Spark?

See also:

1.  
https://dzone.com/articles/the-complete-apache-spark-collection-tutorials-and?edition=549292_source=Weekly%20Digest_medium=email_campaign=Weekly%20Digest%202019-12-04

2. https://www.educba.com/tensorflow-alternatives/

Best regards,

-Tom


Re: My pop ups for windows module

2019-12-07 Thread Tom Browder
On Sat, Dec 7, 2019 at 05:41 ToddAndMargo via perl6-users <
perl6-us...@perl.org> wrote:

> Hi All,
>
> I wrote and extensive module for pop up in Windows.


Todd, you need to publish your module to the Raku module ecosystem. Many
people, including myself, want to see an easily-installable module with at
least some basic tests to give strangers confidence that it will not blow
up. Instructions are in the docs, and there are helper modules to get you
started.

I'll send you specific doc references later when I get a chance, but it's
probably better for you to dig around the doc site a bit more on your own.
Hint: in the search box, enter 'module'.

-Tom


>
> It does not contain a time out option.  Maybe some day I
> will work on the timer function.
>
> Thank you all for helping me with various parts of this!
>
> There are basically two subs to import
>  WinMsg  and  WinPopUp
>
> Here are some one liners to test it with:
>
> perl6 -e "use lib '.'; use WinPopUps :WinPopUp; say WinPopUp( 'Super
> Duper Title', 'What? You were expecting something witty?',
> 'Information', 'Ok'  );"
>
> perl6 -e "use lib '.'; use WinPopUps :WinPopUp; say WinPopUp( 'Super
> Duper Title', 'What? You were expecting something witty?', 'Question',
> 'YesNoCancel' );
>
> perl6 -e "use lib '.'; use WinPopUps :WinPopUp, :WinMsg; WinMsg( 'Super
> Duper Title', 'What? You were expecting something witty?' );"
>
> Let me know if you find any booboo's.
>
> -T
>
>
> 
> # unit module WinPopUps;
> # WinMsg.pm6
>
> #`{
>Reference:
>
>
> https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-messagebox
>
>
> https://stackoverflow.com/questions/59105696/how-can-i-create-pop-up-windows-for-perl6-in-windows
> }
>
> use NativeCall;
>
> sub WinPopUp( Str $TitleStr,
>Str $MessageStr,
>Str $Icons where   * ~~ "Exclamation" |
>"Warning" |
>"Information" |
>"Asterisk"|
>"Question"|
>"Stop"|
>"Error"   |
>"Hand",
>Str $Buttons where * ~~ "AbortRetryIgnore"|
>"CancelTryAgainContinue"  |
>"Help"|
>"Ok"  |
>"OkCancel"|
>"RetryCancel" |
>"YesNo"   |
>"YesNoCancel" )
>is export( :WinPopUp ) {
>
> #`{
>
>  Pop up a message box to the user.  Windows only.
>  Return what button was pressed
>
>  Note: you are constrainedthe the Icon and Button values shown in
> the sub declaration.
>
>  Test one liners:
>  perl6 -e "use lib '.'; use WinPopUps :WinPopUp; say WinPopUp(
> 'Super Duper Title', 'What? You were expecting something witty?',
> 'Information', 'Ok'  );"
>  perl6 -e "use lib '.'; use WinPopUps :WinPopUp; say WinPopUp(
> 'Super Duper Title', 'What? You were expecting something witty?',
> 'Question', 'YesNoCancel' );
>
> }
>
> my Str $SubName = &?ROUTINE.name;
> my Str $OS  = $*KERNEL.name;
>
> if not $OS eq "win32" { say "Sorry, $SubName only work in Windows.";
> exit; }
> my int32 $RtnInt = 0;
> my Str   $RtnStr = "";
> my int32 $IconInt;
> my int32 $ButtonInt;
> my int32 $UINT;
>
> # Note: these constants are 32 bit
> constant WCHAR  = uint16;
> constant INT= int32;
> constant UINT   = uint32;
> constant HANDLE = Pointer[void];
> constant LPWCTSTR   = CArray[WCHAR];
>
>
> constant MB_ICONEXCLAMATION   = 0x0030;
> constant MB_ICONWARNING   = 0x0030;
> constant MB_ICONINFORMATION   = 0x0040;
> constant MB_ICONASTERISK  = 0x0040;
> constant MB_ICONQUESTION  = 0x0020;
> constant MB_ICONSTOP  = 0x0010;
> constant MB_ICONERROR = 0x0010;
> constant MB_ICONHAND  = 0x0010;
>
>
> constant MB_ABORTRETRYIGNORE  = 0x0002;
> constant MB_CANCELTRYCONTINUE = 0x0006;
> constant MB_HELP  = 0x4000;
> constant MB_OK= 0x;
> constant MB_OKCANCEL  = 0x0001;
> constant MB_RETRYCANCEL   = 0x0005;
> constant MB_YESNO = 0x0004;
> constant MB_YESNOCANCEL   = 0x0003;
>
> constant DABORT =  3;
> constant IDCANCEL   =  2;
> constant IDCONTINUE = 11;
> constant 

Fwd: Raku, docs, help [was: Re: vulgar?]

2019-12-07 Thread Tom Browder
Forgot to reply to all.

-- Forwarded message -
From: Tom Browder 
Date: Sat, Dec 7, 2019 at 04:58
Subject: Raku, docs, help [was: Re: vulgar?]
To: ToddAndMargo 


On Fri, Dec 6, 2019 at 23:23 ToddAndMargo via perl6-users <
perl6-us...@perl.org> wrote:

> On 2019-12-06 18:34, Tom Browder wrote:
> > On Fri, Dec 6, 2019 at 17:31 ToddAndMargo via perl6-users
> >  wrote:
> >>
> >> On 2019-12-06 04:19, Tom Browder wrote:


Todd, I was a bit harsh in my last reply, but I do see a huge difference
between a bug report and a PR. In the PR, you have to show exactly what the
wording should be in its entire context, while in the bug report your
suggestions are less in context. To me, that automatically increases the
friction in the  conversation.

Some other points about help via comms other than email that are valuable
to me:

1. when using IRC, it is easy to put chunks of real code into a Github
gist. That way everyone can see it and discuss it by line number or other
reference

2. on the #raku channels, there is a built-in REPL so all can see your code
chunks in action

Finally, I really don't have any more good arguments about your discontent
with the docs, but I leave you with these words about my experience here:

Any help you can contribute to the docs will usually be greatly
appreciated, but you are better off to start in small bits, correcting
typos, improving grammar, etc.
And I agree with you that much of the descriptions are in "IEEE-ese." To
help with that I have added several "cookbook" examples in such areas, as
much to help me as to help others. Given the way I've seen you operate I
think that adding better examples from your "keepers" would be very useful.

Merry Christmas!

-Tom

P.S. One more thing about Perl vs. Raku docs: I believe over the years
there has been much money applied to the Perl infrastructure by commercial
users of Perl, especially in the early days of the Internet. On the other
hand, I believe Raku has had comparatively little commercial support and
has had to rely on those unpaid people who love the language and its
community and who freely donate their time to its improvement. It can only
get better, but maybe not with quite as steep a growth curve as Perl has
had.


Re: vulgar?

2019-12-06 Thread Tom Browder
On Fri, Dec 6, 2019 at 17:31 ToddAndMargo via perl6-users
 wrote:
>
> On 2019-12-06 04:19, Tom Browder wrote:
> > Todd, arguing via email is almost guaranteed to be fruitless. You need
> > to learn to use Github and make pull requests (PRs)  for the EXACT
> > changes you think should be made to the docs.
...
> Hi Tom,
> What makes you think I do not know how to use
> the bug reporting system?

Todd, a Pull Request is NOT a bug report. YOU get a Github account,
and YOU fork the Raku docs repository and YOU either make changes on
your Github fork via a browser or, better, clone your fork onto your
favorite local host and make desired changes there. Then, when you are
satisfied, you commit your changes, push them to your Github account,
and then submit a Pull Request which lets a member either approve your
changes or suggest something else.

I wish you could get over your aversion to reading what we have in the
docs. For example, one of the first things you should learned, a long
time ago was about the REPL which you just found about today.

The REPL is mentioned in several places, one place a person new to the
language wold be looking:

  On the home page (raku.org), select the "Download" menu tab on the top row.
  In the right column, in the second pane entitled "Introductory
Material", select the "Raku Guide"
  In the "Table of Contents" in the left column, select "1.4, Running Raku Code"

Granted, it isn't shouted out, but if you had looked around the
various pages you would have found it.

Also, if you would find an IRC client and join channel #raku, you
could ask questions AND try out code online while people are watching.

I realize we all don't search for things or learn them the same way,
but goodness knows the folks who have been helping you on this mailing
list have shown great patience in the face of a lot of criticism
without a lot of constructive help from you in return.

Best regards,

-Tom


Re: vulgar?

2019-12-06 Thread Tom Browder
On Fri, Dec 6, 2019 at 05:04 ToddAndMargo via perl6-users
 wrote:
> I have uncovered several booboos in the docs.  I find them
> to not be all that accurate either.  I really don't trust
> them.  And since they are written in IEEE-eese, booboos are
> really hard to spot.
...
> And when I do spot them, it is really hard to get a fix
> past the bug reporter's guard dog.  You have to argue and
> argue and argue.  I don't report a lot of bugs to them
> anymore do to this. It is far more effective to report
> them here.

Todd, arguing via email is almost guaranteed to be fruitless. You need
to learn to use Github and make pull requests (PRs)  for the EXACT
changes you think should be made to the docs. With apologies to you,
sometimes it is difficult for a simple man like me to help when your
code is too complex ("golfed") or incomplete to sort out easily in
your email. Your "keepers" could be a PR for changes to the docs.

Note the Perl docs have been refined, by experts, since the late
1980s, while the Raku docs have been expanding, by individuals with
itches to scratch and varying talents, for probably much less than 20
years.

Best regards,

-Tom


Re: vulgar?

2019-12-05 Thread Tom Browder
On Thu, Dec 5, 2019 at 03:57 Todd Chester via perl6-users <
perl6-us...@perl.org> wrote
...

> I really like this guys style of writing and examples
> for Perl6.
>
> But he can be a bit vulgar at times, which I ignore.
> Is he doing it on purpose?


Todd, I took a quick glance at the link you gave and all I saw was
reference to the Brain* language (whose author I believe should be ashamed
of himself for that name--something like "Braincramp" would have been
better).

I have all Andrew's books and read many of his blogs and never noticed any
trend of vulgarity (which, I too, am sensitive to).  I do see evidence of
several Perl and Raku people whose speech can sometimes be quite crude and
blasphemous, but I'm afraid that's the modern world: good manners and
civility have all but disappeared in public places. I will say, though,
that the #Raku IRC channel has much less coarse lingo and much more
kindness than most other places I visit.

I have had several email conversations with Andrew and he seems like a nice
person to me. I sometimes think non-native English speakers pick up bad
speech habits because of the absolutely sewer-mouthed "popular" folks on
Twitter.

Best regards,

-Tom


Re: FC31 can't find my module subs

2019-11-04 Thread Tom Browder
On Mon, Nov 4, 2019 at 7:40 AM ToddAndMargo via perl6-users
 wrote:
...

> I really think this is a Fedora 31 issue and not a Perl issue.
> And really want to keep my rpm database intact.

Ok, then please deal with @nxdm on the issue you filed. Using the git
interface is best I believe.

If you have much more trouble, I would file a bug with the FC folks.

In the future, with paying customers, I would some careful testing
before upgrading the OS. It has sure bitten me in the past!

Good luck!

-Tom


Re: FC31 can't find my module subs

2019-11-04 Thread Tom Browder
On Mon, Nov 4, 2019 at 6:59 AM Tom Browder  wrote:

I'm using almost latest master:

$ ./perl6-m -v
This is Rakudo version 2019.07-447-gc745d6b10 built on MoarVM version
2019.07.1-309-g48491b896
implementing Perl 6.d.

And I can run our test sandbox with no problems--weird!

Back to my system-wide Perl 6 which is:
This is Rakudo Star version 2019.03.1 built on MoarVM version 2019.03
implementing Perl 6.d.

Can you please try installing that version (2019.03.1) by package and
run our sandbox tests again?

If that still doesn't work, how would you feel about trying to install
Perl 6 (Raku) from source? It would (1) be a good experience and (2)
help troubleshoot your problem.

-Tom


Re: FC31 can't find my module subs

2019-11-04 Thread Tom Browder
On Mon, Nov 4, 2019 at 06:52 ToddAndMargo via perl6-users <
perl6-us...@perl.org> wrote:
...

Okay, that's sounding more like an FC/package interface issue. I'm going to
check my latest build of Rakudo against our little test sandbox and see
what happens.

In the meantime, why don't you try putting my original test command inside
a file and run it as a script and see how that works.

-Tom


Re: FC31 can't find my module subs

2019-11-04 Thread Tom Browder
On Mon, Nov 4, 2019 at 06:25 ToddAndMargo via perl6-users <
perl6-us...@perl.org> wrote:
...

Okay, now we're getting somewhere! That's just a warning, but it runs. I am
running an older version of Perl 6 (Raku) than you, so I don't get the
warning.

For the next step, try two things:

1. Run almost the same command but add an empty '()' after the last 'A'.

2. Run almost the same command with an ampersand in front of the 'A' and no
'()'.

Results?

-Tom


Re: FC31 can't find my module subs

2019-11-04 Thread Tom Browder
On Mon, Nov 4, 2019 at 04:44 ToddAndMargo via perl6-users
 wrote:
...

Todd, please don't be so careless in what you show us. It's difficult
to zero in on your problem.  Do me a favor and go to a clean, empty
directory somewhere named 'mytest', and create EXACTLY what I describe
here:

+ create a sub-directory named 'lib'
+ in the sub-directory create two files named 'A.pm6' and 'B.pm6'
+ the contents of 'A.pm6':

unit module A;
sub A is export(:A) { say "A" }
sub B is export(:B) { say "B" }

+ the contents of 'B.pm6':

unit module B;
sub A is export(:A) { say "A" }
sub B is export(:B) { say "B" }

+ back in directory 'mytest' run the following command
and you should get the same results I do: a single 'A'.

$ perl6 -e 'use lib ; use A :A; A'
A

Please show EXACTLY your command and the results, with no other
comment (and please DON'T TOP POST).

And do not make ANY changes to the test setup described above until I
ask you to.

-Tom


Re: FC31 can't find my module subs

2019-11-04 Thread Tom Browder
On Mon, Nov 4, 2019 at 02:25 JJ Merelo  wrote:

>
>
> El lun., 4 nov. 2019 a las 8:35, ToddAndMargo via perl6-users (<
> perl6-us...@perl.org>) escribió:
>
>>
>> Problem still occurs with selinux disabled
>
>
One thing I noticed, you are missing a line at the top of your modules that
should read something like "unit module MyModule;", and the
export(:some-key) is okay.

But then, in the calling programs, use them something like this:

use lib ; # MyModule.pm6 is in this dir
use MyModule :some-key1, :some-key2; # note comma

HTH,

-Tom


[perl6/specs] 4508e5: correct spelling for "resources" as in current usage

2019-10-02 Thread Tom Browder
  Branch: refs/heads/master
  Home:   https://github.com/perl6/specs
  Commit: 4508e535661ccd1366e492960d54aab97be87bbe
  
https://github.com/perl6/specs/commit/4508e535661ccd1366e492960d54aab97be87bbe
  Author: Tom Browder 
  Date:   2019-10-02 (Wed, 02 Oct 2019)

  Changed paths:
M S22-package-format.pod

  Log Message:
  ---
  correct spelling for "resources" as in current usage

Also makes the usage consistent with the other, already existing, uses in the 
file.


Re: zef uninstall .

2019-09-04 Thread Tom Browder
On Wed, Sep 4, 2019 at 05:53 Fernando Santagata 
wrote:

>
> On Wed, Sep 4, 2019 at 12:21 PM William Michels 
> wrote:
>
>> Hi Fernando, I'm not sure I understand. Is this for module
>> development? And you want to purge old versions of a module you're
>> developing, before doing a 'git push'?
>
>
I have never had a problem with:

cd my-module
zef install .
zef uninstall My::Module

-Tom


Re: I need one liner module import help

2019-06-12 Thread Tom Browder
On Wed, Jun 12, 2019 at 16:12 ToddAndMargo via perl6-users <
perl6-us...@perl.org> wrote:

> Hi Bruce,
>
> This has to do with the way I am importing subs from modules.
>
> When importing subs, I like to declare which subs I
> am importing.  Otherwise my code is a nightmare to maintain.
> "Where the heck did that subs comes from? Is its a system
> subs or "
>
>
> For instance, in  Perl 5:
>
>  use Term::ANSIColor qw ( BOLD BLUE RED GREEN RESET );
>
> imports "BOLD BLUE RED GREEN RESET".
>
>
> Perl 6 has improved on this with selective importing and exporting.
> The ":" is part of the tag:
>
> https://docs.perl6.org/language/modules#Exporting_and_selective_importing
>
> For instance:
>
> PrintColors.pm6 exports with:
>
>  sub PrintBlue  ( **@args ) is export( :PrintBlue )  { print
> color('bold'), color('blue'),  |@args, color('reset'); }
>
> The tag is `is export( :PrintBlue )`
>
> And imports with:
>
>   use PrintColors :PrintRed, :PrintGreen, :PrintBlue, :PrintErr,
> :PrintRedErr, :PrintGreenErr, :PrintBlueErr;
>
> What I am after is a way to run a one liner with
> this type of export using the "-M" switch".


I think you will have to file a Rakudo issue.

-Tom


Re: FatRat's falling back to Num's

2019-04-19 Thread Tom Browder
On Fri, Apr 19, 2019 at 17:27 Tom Browder  wrote:

> On Fri, Apr 19, 2019 at 17:07 Laurent Rosenfeld <
> laurent.rosenf...@googlemail.com> wrote:
>
>> Sure Tom,
>> for example, let's print the first 200 digits of pi.
>>
> ...
>
>>
Ah, part of the secret is to use print!  I was using say and not getting
over about 40 digits.

Thanks again.

-Tom


Re: FatRat's falling back to Num's

2019-04-19 Thread Tom Browder
On Fri, Apr 19, 2019 at 17:07 Laurent Rosenfeld <
laurent.rosenf...@googlemail.com> wrote:

> Sure Tom,
> for example, let's print the first 200 digits of pi.
>
...

>
Thanks, Laurent!

-Tom


Re: FatRat's falling back to Num's

2019-04-19 Thread Tom Browder
On Fri, Apr 19, 2019 at 08:37 Laurent Rosenfeld via perl6-users <
perl6-us...@perl.org> wrote:

> Hello,
>
> in the context of the Perl Weekly Challenge, I was trying to use one of
> Franco-Canadian mathematician Simon Plouffe's formulas to compute the
> digits of pi.
>

Laurent, now that you have the algorithm working as desired, can you show
how to print all the digits for any N?

Best,

-Tom


Re: valid values?

2019-03-04 Thread Tom Browder
On Mon, Mar 4, 2019 at 8:22 AM Brad Gilbert  wrote:
...
> Somewhere on the Internet I layed out the rules that I think that
> should normally be followed, but I am not sure where.
...

It would be nice to find it and add to the docs.

-Tom


Re: I need hash string help

2019-01-11 Thread Tom Browder
On Fri, Jan 11, 2019 at 20:15 ToddAndMargo via perl6-users <
perl6-us...@perl.org> wrote:
...
> $p6 'my $x = "acme"; my %Vendors = ( acme => { ContactName => "Larry",
> AccountNo => 1234 } ); my Str $y = %Vendors{$x}.Str; say $y;'

In my experience, it helps often to avoid using strict typing unless really
needed.

Best regards,

-Tom


Re: I need hash string help

2019-01-11 Thread Tom Browder
On Fri, Jan 11, 2019 at 19:09 ToddAndMargo via perl6-users <
perl6-us...@perl.org> wrote:

> Now what am I doing wrong?  I need to convert the value in a
> hash to a string:
>
> $ p6 'my $x = "acme"; my Str $y; my %Vendors = ( acme => ContactName =>
> "Larry" );


Try eliminating “acme =>” for a starter.

-Tom


Re: Pod Types that are *NOT* Pod::Block

2018-10-16 Thread Tom Browder
On Tue, Oct 16, 2018 at 10:11 JJ Merelo > wrote:

> Thanks for your answer, Tom.
>

You’re, welcome, JJ!

-Tom


Re: Pod Types that are *NOT* Pod::Block

2018-10-16 Thread Tom Browder
On Tue, Oct 16, 2018 at 08:55 Richard Hainsworth 
wrote:

> Tom
> I was trying not to bother you with all my questions 
>

Never a bother, Richard!

However I looked at all the classes of pod and they sub class block. So
> which do not
>

Pod::Config and Pod::Raw

I’ve not yet looked into their use in testing but I shall now!

Note I have plans to update docs on p6 pod but am waiting until I finish
adding a couple of unspecced (not yet implemented) features.  See Rakudo
repo rakudo/docs/rakudo-nqp-notes.md for more info on NYI pod.

-Tom


Re: Pod Types that are *NOT* Pod::Block

2018-10-16 Thread Tom Browder
On Tue, Oct 16, 2018 at 00:31 Richard Hainsworth 
wrote:

> In the type documentation for POD under Pod::Block it states:
>
> "Class for a Pod block, and base class for most other Pod classes."


The pod classes that currently exist are in Rakudo repo
rakudo/src/core/Pod.pm6. Naming has been a bit inconsistent, but most are
subclasses of Pod::Block, even though the name may not reflect it.

Not all are documented yet.  Your choice d is correct.

Documentation is in several places:

+ the “docs” (docs.perl6.org)

+ roast, mostly in dir S26* (githb.com/perl6/roast)

+ Speculations, mostly S26 (see the bottom-right corner of the home page of
perl6.org)

-Tom


Re: Malformed UTF-8 ???

2018-10-14 Thread Tom Browder
On Sun, Oct 14, 2018 at 5:13 AM Ralph Mellor  wrote:
>
> Almost certainly your problem is elsewhere.

What is the meaning of the double dollar sign ($$) in the problem code?

-Tom


Re: Landing page for Documentation

2018-10-03 Thread Tom Browder
On Wed, Oct 3, 2018 at 12:14 AM Richard Hainsworth
 wrote:
> I have just started a review of the documentation for perl6.
> When I hit `https://docs.perl6.org/language.html` I get a list of
> sections that is the same as the alphabetical list of pod files in
> `github.com/perl6/doc/tree/master/doc/Language` without 00-POD6-CONTROL.
> One of my biggest issues about the Language page is its unstructured
> listing.
> I looked at 00-POD6-CONTROL and found that the categories were much more
> useful than a straight enumeration of files.
...

I agree, Richard, and I started the reorg project but got shot down
because AlexDaniel and others didn’t like the way I separated the page
into the categories. I use an all-caps title in the right (or left if
desired) column.

The plan is for multi-page listing, categories on the first page, and
category breakout on a separate category page for each, but that is a
major effort.

However, in the interim, I sure think my simple solution is better
than what we have.

Thanks for the comment (and support)!

Best regards,

-Tom


Re: A comparison between P5 docs and p6 docs

2018-09-11 Thread Tom Browder
On Tue, Sep 11, 2018 at 10:39 AM Parrot Raiser <1parr...@gmail.com> wrote:
>
> One of the paradoxes of documentation, and the teaching of many
> abstract topics, is that those with the most in-depth knowledge of the
...

I agree with you for the most part.  But the docs DO have examples,
and any reader who sees the lack of a suitable one should file an
issue or contribute a suitable change.

I got my  start here as a noob p6 user (coming  from years of p5 use)
contributing to the docs. And I, too, found many examples too obtuse
for a noob, and have changed some of them.

As experienced as Todd seems to be in p5, he should be able to improve
the docs one way or the other (but get a good book in the meantime;
Andrew Shitov's "Perl 6 at a Glance" is short and sweet for a first
book, Laurent's "Think Perl 6: How to Think Like a Computer Scientist"
for a deeper look).

Cheers,

-Tom


Re: A comparison between P5 docs and p6 docs

2018-09-11 Thread Tom Browder
On Tue, Sep 11, 2018 at 10:31 AM Simon Proctor  wrote:
>
> It's a very good read. :)

Yes it is!


Re: A comparison between P5 docs and p6 docs

2018-09-11 Thread Tom Browder
Todd, some free advice:

1. DOCUMENTATION

The docs are a volunteer effort. You can help by contributing changes
and submitting issues.

Try to use the docs first instead of using an internet search.  That
will help you submit issues if you don't find what you are looking
for.

You really need to buy one of the fine Perl 6 books that are
available.  See the perl6.org webite and this page:

  https://perl6.org/resources/https://perl6.org/resources/ (look at
the bottom left-hand side)

See this page for book choice help:  https://perl6book.com/

Anyone on the #perl6 IRC (or this mailing list) will be happy to
explain their preferences.

2. DESIGN

The original Perl 6 specifications are here (linked from the
bottom-right of perl6.org):

  https://design.perl6.org/

The specifications are defined in the test suite (also linked from the
bottom-right of per6.org):

  https://github.com/perl6/roast

3. YOUR CODE USE

One of the great features of Perl 6, to me, is the ability to use kebab
case, e.g.,:

  my $some-var = 'a';

When you submit code examples, making them less wordy and "noisy"
would help us help you. Perl 6 code can be be written very sparsely.

Best regards,

-Tom


Re: start up delay?

2018-08-01 Thread Tom Browder
One thing you can do, depending on your code, is to put most of your
code in subroutines, put them in a module, and 'use' it in your main
script.  The module gets precompiled the first time you execute the
program, and the overall program should be faster after the first go.

The 'zef' program does that to great effect

Best regards,

-Tom

#perl6 tbrowder
On Wed, Aug 1, 2018 at 1:14 PM ToddAndMargo  wrote:
>
> Hi All,
>
> Is it just me or does Perl 6 take about three times as long to
> start up as Perl 5?  I do have a very fast machine and it takes
> about seven see for some of my Perl 6 stuff to get past the
> ruminating phase and start running.
>
> Any workaround for this, or is this just growing pains for Perl 6?
>
> Many thanks,
> -T


Re: Is there a built in recursive rmdir and mkdir?

2018-06-03 Thread Tom Browder
On Sun, Jun 3, 2018 at 3:13 PM, ToddAndMargo  wrote:
> Hi All,
>
> Does Perl 6 have a built in recursive rmdir
> equivalent to LINUX's `rmdir --parents path`?

Searching for "rmdir" on the docs site, and selecting the sub rmdir
entry, I see the following:

  To delete non-empty directory, see rmtree in File::Directory::Tree module

with a link to the module's github.com repo:

  https://github.com/labster/p6-file-directory-tree


-Tom


Re: CPAN and p6c

2018-03-23 Thread Tom Browder
On Fri, Mar 23, 2018 at 10:36 Fernando Santagata 
wrote:

> Hello *,
>
> It seems that the p6c ecosystem is soon to be deprecated, so I applied for
> a PAUSE id and uploaded a new module over there.
>
> Should I upload to CPAN the modules that I contributed to p6c in the past
> or am I supposed to leave them alone because I might mess with the way the
> whole system works?
>

I can only speak for myself, but I first installed
my ecosystem modules into cpan and then, when all looked well, I removed
them from the ecosystem.

Best,

-Tom


[perl #132632] [POD][NYI]. List and hash configuration value formats are not yet implemented (NYI)

2018-01-19 Thread Tom Browder via RT
closed also with tests in merged roast PR #371


[perl #130477] [BUG][POD] Pod config parses colopairs but simply stringifies whatever it matched

2018-01-19 Thread Tom Browder via RT
closed also with tests in merged roast PR #371


[perl #126742] [POD] config items should not include quotes for string values

2018-01-19 Thread Tom Browder via RT
closed also with tests in merged roast PR #371


[perl #124281] colonpairs in [POD] config options always produce strings

2018-01-19 Thread Tom Browder via RT
closed also with tests in merged roast PR #371


[perl #132632] [POD][NYI]. List and hash configuration value formats are not yet implemented (NYI)

2018-01-18 Thread Tom Browder via RT
closed by merge of rakudo PR #1339


[perl #130477] [BUG][POD] Pod config parses colopairs but simply stringifies whatever it matched

2018-01-18 Thread Tom Browder via RT
closed by merge of rakudo PR #1339


[perl #126742] [POD] config items should not include quotes for string values

2018-01-18 Thread Tom Browder via RT
closed by merge of rakudo PR #1339


[perl #124281] colonpairs in [POD] config options always produce strings

2018-01-18 Thread Tom Browder via RT
closed by merge of rakudo PR #1339


[perl #128221] [BUG] Weird internal error when parsing some very simple Pod with '-' in the first column of a table in Rakudo

2017-11-30 Thread Tom Browder via RT
tests added in roast PR #353


[perl #132348] [POD] tables should accept an inline comment (Z)

2017-11-30 Thread Tom Browder via RT
tests added in roast PR #353


  1   2   3   4   >