Re: Is irc.libera.chat down?

2024-04-19 Thread Todd Chester via perl6-users
On 4/19/24 03:09, Todd Chester via perl6-users wrote: A sex, 19-04-2024 às 02:36 -0700, Todd Chester via perl6-users escreveu: Hi All, Is https://kiwiirc.com/nextclient/irc.libera.chat/#raku down? -T On 4/19/24 03:03, David Santiago wrote: > > It works for me. >

Re: Is irc.libera.chat down?

2024-04-19 Thread Todd Chester via perl6-users
A sex, 19-04-2024 às 02:36 -0700, Todd Chester via perl6-users escreveu: Hi All, Is     https://kiwiirc.com/nextclient/irc.libera.chat/#raku down? -T On 4/19/24 03:03, David Santiago wrote: > > It works for me. > > Regards, > David > Hi David, The circle just goes r

Is irc.libera.chat down?

2024-04-19 Thread Todd Chester via perl6-users
Hi All, Is https://kiwiirc.com/nextclient/irc.libera.chat/#raku down? -T

Re: need native call help

2024-04-19 Thread Todd Chester via perl6-users
On 4/18/24 04:50, yary wrote: I did a lot of very deep windows programming in my previous job and reminding me that I would always use the 8.3 short name for file operations! dir /x will get it for you. Must be API called for it also. Probably only works on local volumes not network rounded

Re: Practical Raku projects

2020-12-24 Thread Todd Chester via perl6-users
On 12/24/20 12:23 AM, JJ Merelo wrote: Hi, El jue, 24 dic 2020 a las 3:55, Matthias Peng (>) escribió: May I ask if there is any practical perl6 project running? For example, homebrew by ruby, k8s by go, flask by python etc. I doubt there's any perl6

Re: I need help understanding ".contains" method construction

2020-12-23 Thread Todd Chester via perl6-users
On 12/23/20 4:39 PM, Ralph Mellor wrote: 1) why is it "$needle" and not "$!needle" on line 338? Is this because it is an internal variable and not a variable from the class declaration? Got it It's a parameter from line 337. If that's what you mean by "an internal variable", then y

Re: Is the cosine page wrong?

2020-12-23 Thread Todd Chester via perl6-users
Going back to the original question, should not the doc page say? method cos( Cool:D: --> Cool:D ) On 12/23/20 4:28 PM, Ralph Mellor wrote: > If a method does not explicitly specify its invocant type, it is set > to the type of the enclosing class. But it does not specify an invo

Re: New Raku 2020.10.02

2020-10-29 Thread Todd Chester via perl6-users
On 10/29/20 2:58 PM, Bruce Gray wrote: I don't know if you are*supposed* to have to do all this to "know what changed" (since I do not use those packages myself); I am just trying to answer the implied question. I wrote a program that checks about 70 programs I support and downloads new r

Re: Is thre a way to do an "if" on "use lib"?

2020-06-12 Thread Todd Chester via perl6-users
On 2020-06-07 18:49, ToddAndMargo via perl6-users wrote: ~ #!/usr/bin/env raku # Note: this has to be the first thing at the top my @LibPath; BEGIN {    for ('K:/Windows/NtUtil', 'X:/NtUtil') -> $candidate { push @LibPath, $candidate if $candidate.IO.d;  

Re: I reproduced one of the errors!

2020-06-05 Thread Todd Chester via perl6-users
On 2020-06-04 00:08, Peter Pentchev wrote: On Wed, Jun 03, 2020 at 07:00:53PM -0700, ToddAndMargo via perl6-users wrote: On 2020-06-03 02:21, Peter Pentchev wrote: On Wed, Jun 03, 2020 at 01:06:33AM -0700, ToddAndMargo via perl6-users wrote: On 2020-06-02 22:15, Peter Pentchev wrote: On Tu

Re: fill in form

2020-05-13 Thread Todd Chester via perl6-users
> On 12/05/2020 20:44, ToddAndMargo via perl6-users wrote: >>> On 12/05/2020 00:47, ToddAndMargo via perl6-users wrote: Hi All, I want to create a fill in form in Windows: city, state, etc., you fill in the data. Is there some library out there for that? Any

Re: tip: Windows, Git, and those nice Linux utilities

2020-04-11 Thread Todd Chester via perl6-users
On 10/04/2020 01:37, ToddAndMargo via perl6-users wrote: On 2020-04-09 09:39, Richard Hainsworth wrote: Am I missing something here? It would seem obvious to me that Git and Raku are not linked in any way, except of course for developers who only use Git with Raku, or who only have a dependen

Re: irrational nubmer?

2020-03-11 Thread Todd Chester via perl6-users
On 2020-03-11 01:23, Todd Chester via perl6-users wrote: On 2020-03-10 22:55, Shlomi Fish wrote: Speaking of trivia, and off topic, did you know that √2 caused a major religious upheaval when the result of a 1,1,√2 triangle came out?  The poor Pythagoreans: all numbers had to be rational

Re: irrational nubmer?

2020-03-11 Thread Todd Chester via perl6-users
On 2020-03-10 22:55, Shlomi Fish wrote: Speaking of trivia, and off topic, did you know that √2 caused a major religious upheaval when the result of a 1,1,√2 triangle came out? The poor Pythagoreans: all numbers had to be rational. Hippasus even got murdered for blowing the whistle on √2.

Re: qqx with quotes

2020-02-28 Thread Todd Chester via perl6-users
On 2020-02-27 15:38, Andy Bach wrote: Win10 with a new raku install. would you do a perl6 -v for me?

Re: irrational nubmer?

2020-02-26 Thread Todd Chester via perl6-users
On 2020-02-20 22:32, Tobias Boege wrote: On Thu, 20 Feb 2020, ToddAndMargo via perl6-users wrote: On Fri, 21 Feb 2020 at 13:31, ToddAndMargo via perl6-users mailto:perl6-users@perl.org>> wrote: $ perl6 -e 'say sqrt(2).base-repeating();' No such method 'base-repeating' for invocant

Re: irrational nubmer?

2020-02-26 Thread Todd Chester via perl6-users
On 2020-02-23 03:07, Shlomi Fish wrote: Hi, just for the record - I was not talking about Raku, just about a hypothetical language with CAS-like capabilities (see https://en.wikipedia.org/wiki/Computer_algebra_system ) that would be able to do it. I was just using Raku-like syntax for famili

Re: REPL and arrows problem

2020-01-22 Thread Todd Chester via perl6-users
On 2020-01-21 21:44, Norman Gaywood wrote: On Wed, 22 Jan 2020 at 13:30, Todd Chester via perl6-users mailto:perl6-users@perl.org>> wrote: On 2020-01-21 16:38, Todd Chester via perl6-users wrote: > Fedora31 I have Fedora 31 and Readline does not seem to be working for

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

2020-01-21 Thread Todd Chester via perl6-users
On 2020-01-21 18:57, Tom Browder wrote: On Tue, Jan 21, 2020 at 18:34 Todd Chester via perl6-users mailto:perl6-users@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 l

Re: Using raku/perl6 as unix "cat"....

2020-01-21 Thread Todd Chester via perl6-users
On 2020-01-21 11:08, William Michels via perl6-users wrote: Good answers, all. Thanks to everyone for contributing. For anyone who wants a golfed "cat" replacement, command line arguments can give you shorter code: Hi William, I don't know if I contributed anything at all, but you are most

Re: REPL and arrows problem

2020-01-21 Thread Todd Chester via perl6-users
On 2020-01-21 16:38, Todd Chester via perl6-users wrote: Fedora31 Xfce 4.14 xfce4-terminal-0.8.9.1-1.fc31.x86_64 $ rpm -qa \*raku\* xfce4-terminal-0.8.9.1-1.fc31.x86_64 $ raku -v This is Rakudo version 2019.07.1 built on MoarVM version 2019.07.1 implementing Perl 6.d.

REPL and arrows problem

2020-01-21 Thread Todd Chester via perl6-users
Hi All, Fedora31 Xfce 4.14 xfce4-terminal-0.8.9.1-1.fc31.x86_64 I have the same setup on both computers. On my shop computer, in REPL, the arrow keys do not read correctly: > a todd special booboo^[[D^[[D^[[D^[[D^[[D How do I get my arrow back in REPL on mu shop computer? Many thanks, -T

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

2020-01-21 Thread Todd Chester via perl6-users
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. > sub AplusB( $a, $b --

how do you --> two variables?

2020-01-21 Thread Todd Chester via perl6-users
Hi All, What is the syntax for returning two variable from a sub? > sub x(--> Int, UInt) { return(-2,4) }; ===SORRY!=== Error while compiling: Malformed return value (return constraints only allowed at the end of the signature) --> sub x(--> Int⏏, UInt) { return(-2,4) }; Many thanks, -T

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

2020-01-21 Thread Todd Chester via perl6-users
On 2020-01-21 14:03, Elizabeth Mattijsen wrote: On 21 Jan 2020, at 22:37, Richard Hainsworth wrote: 2) 'returns' in the declaration (not the part in the block) used to be used, but for some arcane reason that I never really understood, it is deprecated. Not sure it is *the* reason, but the

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

2020-01-21 Thread Todd Chester via perl6-users
> On 21/01/2020 04:09, ToddAndMargo via perl6-users wrote: >> On 2020-01-20 19:55, ToddAndMargo via perl6-users wrote: >>> Hi All, >>> >>> What is the proper way to state that I am returning a >>> hash from a sub? `sub x() returns % {}` >>> >>> And an array? `sub x() returns @ {}` >>> >>> Many

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

2020-01-17 Thread Todd Chester via perl6-users
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.

Re: bitwise NOT

2020-01-14 Thread Todd Chester via perl6-users
On Tue, Jan 14, 2020 at 7:45 AM Paul Procacci > wrote: >> What is the syntax for a twos complement anyway? I'm not sure I understand the question. Two's compliment is +^ ... the routine you've been using. On Tue, Jan 14, 2020 at 12:33 AM ToddAndMargo

Re: NQPMu ??

2020-01-09 Thread Todd Chester via perl6-users
On 09/01/2020 19:16, ToddAndMargo via perl6-users wrote: On 2020-01-09 10:11, ToddAndMargo via perl6-users wrote: Hi All, What am I doing wrong here? Many thanks, -T $ raku To exit type 'exit' or '^D'  > my uint32 $c; 0  > $c = 0xFFAA; Cannot find method 'qast' on object of type NQPMu

Re: How do I convert integer to cardinal on the fly?

2020-01-07 Thread Todd Chester via perl6-users
On Tue, Jan 7, 2020 at 10:20 AM ToddAndMargo via perl6-users mailto:perl6-users@perl.org>> wrote: On 2020-01-06 22:54, ToddAndMargo via perl6-users wrote: > Hi All, > > What am I doing wrong here? > > > my int16 $x = 0xABCD; > -21555 > > > say $x.bas

Re: Cardinals

2020-01-03 Thread Todd Chester via perl6-users
On 2020-01-02 22:19, Darren Duncan wrote: On 2020-01-02 10:01 a.m., ToddAndMargo via perl6-users wrote: How do I do a 32 bit unsigned integer (cardinal)?  I have a situation where I need to be able to have the first bit be a one and not have Raku think it is a negative number. Why do you us

Re: Cardinals

2020-01-02 Thread Todd Chester via perl6-users
On 2020-01-02 10:14, Tobias Boege wrote: On Thu, 02 Jan 2020, ToddAndMargo via perl6-users wrote: Hi All, “He who asks is a fool for five minutes, but he who does not ask remains a fool forever.” ― Mark Twain This would be my five minutes. I will live. How do I do a 32 b

Re: I need helping understanding a pointer example

2019-12-31 Thread Todd Chester via perl6-users
On 2019-12-30 23:14, Veesh Goldman wrote: Method declares a method as opposed to a function. The difference is that in a method, the first argument passed to the function is bound to `self`, which represents the object the call was made on. In traditional perl style, when you call a method

Re: My Native Call notes

2019-12-30 Thread Todd Chester via perl6-users
On 2019-12-29 17:05, ToddAndMargo via perl6-users wrote: Native Call is tack the chr(0) at the end for you, most of the time Mistake on my part. No it won't. You have to add it yourself.

I need helping understanding a pointer example

2019-12-30 Thread Todd Chester via perl6-users
Hi All, Over at https://docs.raku.org/language/nativecall.html#Basic_use_of_pointers There is an example: useNativeCall; classFooHandleisrepr('CPointer') { # Here are the actual NativeCall functions. subFoo_init() returnsFooHandleisnative("foo") {*} subFoo_free(FooHandle) isnati

NativeCall Doc booboo

2019-12-30 Thread Todd Chester via perl6-users
Hi All, https://docs.raku.org/language/nativecall.html#Passing_and_returning_values Did anyone else discover the mistake, hopefully not the hard way like I did.  Anyone get weird gibberish printed out like I did? my$string="FOO"; # The lifetime of this variable must be equal to the requir

Re: modules and subsets

2019-12-13 Thread Todd Chester via perl6-users
On 2019-12-13 01:06, Fernando Santagata wrote: our $pi is export = 4.13; Thank you!

Re: modules and subsets

2019-12-12 Thread Todd Chester via perl6-users
On 2019-12-12 00:22, Fernando Santagata wrote: On Thu, Dec 12, 2019 at 3:46 AM Todd Chester <mailto:toddandma...@zoho.com>> wrote: On 2019-12-11 10:22, Fernando Santagata wrote: > File test.pm6 > > unit module test; > subset PosInt of Int

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

2019-12-11 Thread Todd Chester via perl6-users
On 2019-12-11 14:26, Joseph Brenner wrote: Joseph Brenner wrote: The signatures in the documentation are certainly helpful, but they're no substitute for code examples. I'd go after adding more code examples, rather than removing other stuff. But then, maybe I'm coming into this discussi

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

2019-12-11 Thread Todd Chester via perl6-users
On 2019-12-11 14:06, Joseph Brenner wrote: The signatures in the documentation are certainly helpful, but they're no substitute for code examples. I'd go after adding more code examples, rather than removing other stuff. Hi Joseph, I would compromise on that. I would also like to see th

Re: modules and subsets

2019-12-11 Thread Todd Chester
On 2019-12-11 10:22, Fernando Santagata wrote: File test.pm6 unit module test; subset PosInt of Int is export where * > 0; File test.p6 use lib '.'; use test; sub mytest(PosInt $a) { say $a } mytest(1); # output: 1 mytest(-1);    # output Constraint type check failed in binding to par

Re: modules and subsets

2019-12-11 Thread Todd Chester via perl6-users
On 2019-12-11 10:16, Elizabeth Mattijsen wrote: $ 6 'subset A of Int; dd OUR::.keys' ("A",).Seq Hi Elizabeth, subset A of Int; dd OUR::.keys ("A",).Seq Nil Would you explain how your are using dd and what your are showing me here? Also how it ties into my original question as to if the ca

Re: modules and subsets

2019-12-11 Thread Todd Chester via perl6-users
On 2019-12-11 09:54, JJ Merelo wrote: By default, the scope of anything (containers, classes, whatever) is lexical to the scope they are in. Hi JJ, Thank you for responding. By the way, I'd be a Golden. I don't understand how you are using the word "lexical". I may be mixing Modula2 with

Re: where is my map typo?

2019-12-05 Thread Todd Chester via perl6-users
On 2019-12-04 15:53, William Michels via perl6-users wrote: Do you not have a working Raku/Perl6 REPL install? Hi William, Being as I do not know what REPL is, I would have to say "no". This is the Perl I am using: https://github.com/nxadm/rakudo-pkg/releases/download/v2019.11/rakudo-pkg-

Re: hash and print question

2019-12-05 Thread Todd Chester via perl6-users
On 2019-12-05 01:59, Todd Chester via perl6-users wrote: put he space or the "t" before "the". Chuckle.

Re: hash and print question

2019-12-05 Thread Todd Chester via perl6-users
On Thu, Dec 5, 2019 at 10:52 AM Todd Chester via perl6-users mailto:perl6-users@perl.org>> wrote: Hi All, In the following, $ p6 'my %x= YesNo=>0xff, OkayCancel=>0x55; my $y="YesNo"; if %x<<$y>> {say %x<<$y >>.base(16)}e

vulgar?

2019-12-05 Thread Todd Chester via perl6-users
Hi All, 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? Or is there some translation error and he does not realize he is swearing? Warning: if you go here there are some dirty words in the titles:

hash and print question

2019-12-05 Thread Todd Chester via perl6-users
Hi All, In the following, $ p6 'my %x= YesNo=>0xff, OkayCancel=>0x55; my $y="YesNo"; if %x<<$y>> {say %x<<$y >>.base(16)}else{say "n"};' FF $ p6 'my %x= YesNo=>0xff, OkayCancel=>0x55; my $y="Help"; if %x<<$y>> {say %x<< $y >>.base(16)}else{say "n"};' n I have to use a space after $y

Re: Match operator: error with any() junction and user-defined $_ topic variable

2019-10-10 Thread Todd Chester via perl6-users
On 10/8/19 10:53 AM, Brad Gilbert wrote: Most operations with Junctions produce Junctions.     > 1 + any(2, 3)     any(3, 4) $ p6 'say 4 + any(44,66);' any(48, 70) Sweet! But what would you ever use it for? Would this be the intended use: add a number to all values in an array? $ p6 '

Re: I need help with "lines"

2019-03-15 Thread Todd Chester via perl6-users
On 3/15/19 7:58 AM, Todd Chester via perl6-users wrote: Never did figure out why everything went into @x[0] The entire pipe gets put into @x[0]. @x[1] is uninitialized

Re: I need help with "lines"

2019-03-15 Thread Todd Chester via perl6-users
On 3/15/19 3:02 AM, Peter Pentchev wrote: On Fri, Mar 15, 2019 at 11:52:15AM +0200, Peter Pentchev wrote: [snip] 3. The standard input stream in Perl 6 is called $*IN (think of it as mostly equivalent to what <<>> and <> would read from in Perl 5, ...sorry about this part, I know it's n

Re: I need help with "lines"

2019-03-15 Thread Todd Chester via perl6-users
On 3/15/19 2:52 AM, Peter Pentchev wrote: Hope that helped! G'luck, Peter [1] The "almost certainly" is because, yes, yes, I know, I also have that dusty old HP/UX crunching away in a customer's basement; still. Yes it does. Thank you! I remember zsh for my Solaris days. Or at leas

Re: I need help with "lines"

2019-03-15 Thread Todd Chester via perl6-users
On 3/15/19 2:52 AM, Peter Pentchev wrote: 1. Learn to use pgrep instead of the myriad variations of ps | grep; pgrep has been standardized by POSIX for a long time and is almost certainly available in all the installations that you will ever need to touch[1]. pgrep is interesting

Re: I need help with "lines"

2019-03-15 Thread Todd Chester via perl6-users
On 3/15/19 2:35 AM, Simon Proctor wrote: All looking good so far. what is it you're wanting from this data? Hi Simon, Thank you! What this is for is a backup routine. I am checking for the highest instance of any jammed running instances of [xfa]dump. If I find any, I "kill -9" it and wa

Re: I need help with "lines"

2019-03-15 Thread Todd Chester via perl6-users
On 3/14/19 10:05 PM, Todd Chester via perl6-users wrote: Hi All, What am I doing wrong here? ps ax | grep [f]irefox | perl6 -ne 'my @x = $_.words[0].lines.reverse; print @x[0] ~ "\n";' 7380 7581 7698 13023 13767 13908 Two problems: 1) "lines" is pu

Re: I need help with "lines"

2019-03-14 Thread Todd Chester via perl6-users
On Fri, 15 Mar 2019, 05:34 Todd Chester via perl6-users, mailto:perl6-users@perl.org>> wrote: On 3/14/19 10:05 PM, Todd Chester via perl6-users wrote: > Hi All, > > What am I doing wrong here? > > ps ax | grep [f]irefox | perl6 -ne &#

Re: I need help with "lines"

2019-03-14 Thread Todd Chester via perl6-users
On 3/14/19 10:05 PM, Todd Chester via perl6-users wrote: Hi All, What am I doing wrong here? ps ax | grep [f]irefox | perl6 -ne 'my @x = $_.words[0].lines.reverse; print @x[0] ~ "\n";' 7380 7581 7698 13023 13767 13908 Two problems: 1) "lines" is pu

print to a printer

2019-03-14 Thread Todd Chester via perl6-users
Hi All Fedora 29 Is there a way to print to a printer, other than a system call to lpr? Many thanks, -T

I need help with "lines"

2019-03-14 Thread Todd Chester via perl6-users
Hi All, What am I doing wrong here? ps ax | grep [f]irefox | perl6 -ne 'my @x = $_.words[0].lines.reverse; print @x[0] ~ "\n";' 7380 7581 7698 13023 13767 13908 Two problems: 1) "lines" is putting everything into @x[0] 2) "reverse" is ignoring me as there is no @x[1]. etc. The result I wa

Re: .payload

2019-02-28 Thread Todd Chester via perl6-users
On 2/28/19 2:06 PM, Timo Paulssen wrote: I just changed the docs to replace payload with message here. It's not a language bug, however. Here's the change on github: https://github.com/perl6/doc/commit/fb5d341036afe387f0ead0b76e09aef75205dcaf You are a force of nature Timo! :-)

Re: shift left syntax?

2019-02-07 Thread Todd Chester via perl6-users
On 2/7/19 10:36 PM, yary wrote: perl6 -e 'my $i = 0x5DAE; $i +<= 1; say $i.base(0x10);' BB5C -y Hi Yary, $ p6 'my Buf $x=Buf.new(0xAE,0x5D); my int32 $i=0x5DAE; say $x; say $i.base(0x10); $i +< 0x01; say $i.base(0x10);' WARNINGS for -e: Useless use of "+<" in expression "$i +

Re: print hex?

2019-02-07 Thread Todd Chester via perl6-users
On 2/7/19 11:22 AM, Curt Tilmes wrote: On Thu, Feb 7, 2019 at 2:14 PM ToddAndMargo via perl6-users mailto:perl6-users@perl.org>> wrote: What is the easiest way to get both print and say to print $i below in Hex? $ p6 'my Buf $x=Buf.new(0xAE,0x5D); my int16 $i=0x5DAE; say $x; say

buf to integer?

2019-02-07 Thread Todd Chester via perl6-users
Hi All, I am dealing with a Buf what includes 32 bit integers, but they are entered somewhat backwards as view with hexedit: AE 5D 5C 72 represents the number 725C5DAE This is what I have come up with to convert this type of number in a buffer to and integer $ p6 'my Buf $x=Buf.new(0xAE,0x5D,0

shift left syntax?

2019-02-07 Thread Todd Chester via perl6-users
Hi All, Is this the only way to shift left? $i = $i +< 0x01 $ p6 'my int32 $i=0x5DAE; say $i.base(0x10); $i = $i +< 0x01; say $i.base(0x10);' 5DAE BB5C Does we have any of those fancy += ~= ways of doing it? Many thanks, -T

Re: zef installs not working

2018-10-17 Thread Todd Chester via perl6-users
On 10/17/18 1:05 PM, Joseph Brenner wrote: Todd Chester wrote: What I do is to go to the github source for the module: Next I cd into the directory and install it with zef install . Yes, that much seems to work fine. It seems a little peculiar that I can search the repositories with

Re: zef installs not working

2018-10-16 Thread Todd Chester via perl6-users
On 10/16/18 8:20 PM, Joseph Brenner wrote: Lately zef hasn't been working for me to do module installation. I can do things like "zef --list" to get a list of available modules but when I actually try to do the installation I see things like this: zef install Array::Agnostic ===> Searc

Re: routine declaration line question

2018-10-12 Thread Todd Chester via perl6-users
On 10/12/18 3:47 AM, Curt Tilmes wrote: On Fri, Oct 12, 2018 at 6:08 AM Todd Chester via perl6-users mailto:perl6-users@perl.org>> wrote: > If nothing is being returned, it should really be indicated with --> Nil > since that can enable certain optimizations.

Re: routine declaration line question

2018-10-12 Thread Todd Chester via perl6-users
On 10/5/18 8:39 AM, Larry Wall wrote: On Thu, Oct 04, 2018 at 03:13:15PM -0400, Trey Harris wrote: : Right; that's what I meant by "stylistically" — a `--> Mu` can highlight : that something is being returned (and that side-effects are not the primary : purpose), while nothing indicates that t

Re: <> thank you

2018-10-05 Thread Todd Chester
On 10/5/18 4:51 AM, Laurent Rosenfeld via perl6-users wrote: You don't even need the quotes: > say [3,1]; (Nil cd) > Hi Laurent, A thing of beauty! Not to ask to stupid a question (when has that ever stooped me), but since [] is considered a subroutine, is <> also considered a subroutin

Re: <> thank you

2018-10-05 Thread Todd Chester
On 10/5/18 1:12 AM, Todd Chester wrote: Le ven. 5 oct. 2018 à 08:30, Todd Chester <mailto:toddandma...@zoho.com>> a écrit :     Hi All,     I went to reply to someone, I think it was Brandon for sending me     an eMail to my private address and the stinker disappeared!     Anywa

Re: <> thank you

2018-10-05 Thread Todd Chester
Le ven. 5 oct. 2018 à 08:30, Todd Chester <mailto:toddandma...@zoho.com>> a écrit : Hi All, I went to reply to someone, I think it was Brandon for sending me an eMail to my private address and the stinker disappeared! Anyway whoever sent me $ p6

<> thank you

2018-10-04 Thread Todd Chester
Hi All, I went to reply to someone, I think it was Brandon for sending me an eMail to my private address and the stinker disappeared! Anyway whoever sent me $ p6 'say [0,2];' (the brown) I was trying to figure out why this bombed: $ p6 ' say "a b c d"[3,1];' Index out of range

Re: bitwise or?

2018-10-04 Thread Todd Chester
On 10/4/18 12:13 PM, Brandon Allbery wrote: It's fine syntactically, but I think has no effect because it'd be '$v = $v' after the '+|='. Conceivably some future version of rakudo could warn about it having no effect. That explains it. Thank you!

Re: words[] question

2018-09-25 Thread Todd Chester
On 09/25/2018 11:37 PM, Todd Chester wrote: How about my `Str:D $input:` question? That chat line just told me it is an optional way of writing it. I like it!

Could this be any more obscure?

2018-09-25 Thread Todd Chester
Hi All, Over on https://docs.perl6.org/routine/words I see multi method words(Str:D $input: $limit = Inf --> Positional) HOW IN THE WORLD did they convert `$limit = Inf` into an array index!?!?! https://docs.perl6.org/type/Num#Inf And `Inf` means a number larger than Perl can handle or

Re: words[] question

2018-09-25 Thread Todd Chester
El mié., 26 sept. 2018 a las 8:27, Todd Chester (<mailto:toddandma...@zoho.com>>) escribió: >> El mié., 26 sept. 2018 a las 6:12, Todd Chester (mailto:toddandma...@zoho.com> >> <mailto:toddandma...@zoho.com <mailto:toddandm

Re: words[] question

2018-09-25 Thread Todd Chester
El mié., 26 sept. 2018 a las 6:12, Todd Chester (<mailto:toddandma...@zoho.com>>) escribió: Hi All, https://docs.perl6.org/routine/words is no help Not to ask too obvious a question, but why does words use a [] instead of a () ? On 09/25/2018 10:38 PM, JJ Mer

words[] question

2018-09-25 Thread Todd Chester
Hi All, https://docs.perl6.org/routine/words is no help Not to ask too obvious a question, but why does words use a [] instead of a () ? $ ls -al Win10_1803_English_x64.dd -rwxrwxrwx. 1 todd root 7927234560 May 9 21:14 Win10_1803_English_x64.dd $ ls -al Win10_1803_English_x64.dd | p6 'my $x

Re: .kv ?

2018-09-14 Thread Todd Chester
On 09/14/2018 04:18 AM, Simon Proctor wrote: Assigned, created or defined. Basically the object has a value. Not following. Are there three of them?

Re: .kv ?

2018-09-14 Thread Todd Chester
On Fri, Sep 14, 2018 at 7:08 AM Todd Chester <mailto:toddandma...@zoho.com>> wrote: On 09/14/2018 04:01 AM, Simon Proctor wrote: > :D is a type constraint requiring an instantiated (or defined) object of > the given type (or a subtype of it). >

Re: .new?

2018-09-14 Thread Todd Chester
On 09/14/2018 03:34 AM, Simon Proctor wrote: I think the docs of objects (sorry on my phone no link) describe object creation and the default new quite well. They most probably are and most developers would have no issues figuring them out. If a common user can't make heads or tails out of

Re: need p5/p6 :: help

2018-09-14 Thread Todd Chester
> On 14/09/2018 12:59, Todd Chester wrote: >> Hi All, >> >> I am in the process of converting a YUGE program I wrote in >> Perl 5 to Perl 6. I used "xx::yy" at lot for readability >> so I could tell where something came from. >> >> I take

Re: .kv ?

2018-09-14 Thread Todd Chester
On 09/14/2018 04:01 AM, Simon Proctor wrote: :D is a type constraint requiring an instantiated (or defined) object of the given type (or a subtype of it). :U is a type constraint saying you have a container specified for the given type that hasn't been instantiated. Hi Simon, Your went o

Re: I need -M help

2018-09-14 Thread Todd Chester
> On 14/09/2018 12:52, Todd Chester wrote: >> Hi All, >> >> With a one liner, how to I load a module that resides in the >> current directory? On 09/14/2018 03:58 AM, Timo Paulssen wrote: The equivalent of "use lib 'blah'" on the commandline is &q

Re: .new?

2018-09-14 Thread Todd Chester
On 09/14/2018 03:37 AM, Elizabeth Mattijsen wrote: Good catch! I am not sure exactly what I tripped across, but as I tell my wife "sometimes it pays to be an idiot." :-) -T

need p5/p6 :: help

2018-09-14 Thread Todd Chester
Hi All, I am in the process of converting a YUGE program I wrote in Perl 5 to Perl 6. I used "xx::yy" at lot for readability so I could tell where something came from. I take it "::" means something different is Perl 6 than Perl 5. $ p6 'use lib "/home/linuxutil"; use PrintColors; PrintColors:

I need -M help

2018-09-14 Thread Todd Chester
Hi All, With a one liner, how to I load a module that resides in the current directory? $ ls PrintColors.pm6 PrintColors.pm6 $ perl6 -MPrintColors -e 'PrintRed "Hi";' ===SORRY!=== Could not find PrintColors at line 1 in: /home/tony/.perl6 /opt/rakudo-pkg/share/perl6/site /opt/rakud

Re: .kv ?

2018-09-14 Thread Todd Chester
On Fri, 14 Sep 2018, 11:22 Todd Chester, <mailto:toddandma...@zoho.com>> wrote: Hi All, I adore the "kv" method: $ p6 'for "abc\n23\n4.56".lines.kv -> $i, $j { say "$i $j" };' 0 abc 1 23 2 4.56 So, I decided t

.new?

2018-09-14 Thread Todd Chester
Hi All, What exactly is going on with .new? https://docs.perl6.org/routine/new method new(Telemetry::Sampler: @instruments --> Telemetry::Sampler:D) The whole thing went over my head. It looks like specifications for the developers, but I really can't tell. And it looks like it might be r

.kv ?

2018-09-14 Thread Todd Chester
Hi All, I adore the "kv" method: $ p6 'for "abc\n23\n4.56".lines.kv -> $i, $j { say "$i $j" };' 0 abc 1 23 2 4.56 So, I decided to go and look at: https://docs.perl6.org/routine/kv multi method kv(Any:U: -->List) multi method kv(Any:D: -->List) Okay, here is what I see: "method" i

Re: Please explain this to me

2018-09-13 Thread Todd Chester
On 09/13/2018 10:24 PM, JJ Merelo wrote: Last time I counted, there were a dozen comments and 3 commits in the issue I created to try and improve the description. 2 files were modified by me. Is there some where I can look at these comments? That's rather a dynamic way of not budging.

Re: Please explain this to me

2018-09-13 Thread Todd Chester
On 09/12/2018 12:19 AM, Simon Proctor wrote: In answer to "why the : between Str:D and Cool:D and why Int(Cool:D) ?" can I just point out the video I linked (or the slides) which answer both of these questions. Hi Simon, Larry Wall, who has a unique gift for making the complex easy, explai

Re: Please explain this to me

2018-09-13 Thread Todd Chester
On 09/13/2018 10:24 PM, JJ Merelo wrote: Last time I counted, there were a dozen comments and 3 commits in the issue I created to try and improve the description. 2 files were modified by me. That's rather a dynamic way of not budging. Cheers JJ I wrote you off list giving you my reasoni

Re: Please explain this to me

2018-09-13 Thread Todd Chester
On 09/12/2018 10:34 AM, Larry Wall wrote: On Tue, Sep 11, 2018 at 10:28:27PM -0700, ToddAndMargo wrote: : Okay, foul! :Str:D: Cool:D $needle : why is there not a comma between "Str:D:" and "Cool:D"? : And what is with the extra ":". By chance is the extra ":" : a confusing way of using a

Re: Please explain this to me

2018-09-13 Thread Todd Chester
On 09/11/2018 05:05 AM, Simon Proctor wrote: Please note the Perl5 docs have had decades of people working on them the Perl6 ones less so. There's bound to be some difference in scope. Hi Simon, That you for the tutorial. I have it tagged to read over again really SSSLLLOOOWWLY As for

Re: Nil ?

2018-09-13 Thread Todd Chester
On 09/13/2018 02:24 PM, Elizabeth Mattijsen wrote: On 13 Sep 2018, at 23:21, ToddAndMargo wrote: $ p6 'my $x="\na\nb\nc\n"; for ( split "\n", $x ) -> $i {print "<$i>\n"};' <> <> with beginning and ending new lines. FWIW, a more Perl6ish way would be: $ p6 'my $x="\na\nb\nc\n"; for $

Re: how do I do this index in p6?

2018-09-13 Thread Todd Chester
Le jeu. 13 sept. 2018 à 23:12, ToddAndMargo > a écrit : $ p6 'constant c=299792458; say c ~" metres per second";' 299792458 metres per second Hm. Now I am wondering how to format the commas into the say. On 09/13/2018 02:43 PM, Laurent Ro

tip: grep and sed stopped working

2018-08-17 Thread Todd Chester
Hi All, I had the unfortunate experience of grep and sed stopping working in Fedora 28. I have to patch a bunch of scripts. It was a disaster. Anyway, in case my workarounds are of interest to you guys: Hope this doesn't happen to you guys! -T uname -r 4.17.9-200.fc28.x86_64 # rpm -qa gre

Re: how do I write this in P6?

2018-08-16 Thread Todd Chester
On 08/16/2018 10:19 PM, Todd Chester wrote: $ echo "a-b-c" | perl -pe 's/-//g' abc Figured it out: $ echo "a-b-c" | perl6 -pe 's:g/"-"//' abc $ echo "a-b-c" | perl6 -pe 's:g/\-//' abc I did not realize we had "-pe" available to us in p6!

how do I write this in P6?

2018-08-16 Thread Todd Chester
$ echo "a-b-c" | perl -pe 's/-//g' abc

  1   2   >