Re: Please take apart this stub line for me

2020-12-30 Thread ToddAndMargo via perl6-users
On 12/30/20 12:18 AM, JJ Merelo wrote: El mié, 30 dic 2020 a las 8:02, Veesh Goldman (>) escribió: No. I can't imagine that what you're doing now is productive. What are you actually trying to understand by reading the source. Probably proving his

Re: Please take apart this stub line for me

2020-12-30 Thread ToddAndMargo via perl6-users
On 12/29/20 11:02 PM, Veesh Goldman wrote: No. I can't imagine that what you're doing now is productive. What are you actually trying to understand by reading the source. Veesh, My brain is wired differently that most other people and I presume yours as well. Does not make one brain

Please take apart this stub line for me

2020-12-29 Thread ToddAndMargo via perl6-users
Hi All, Would someone please take apart this line for me? https://github.com/rakudo/rakudo/blob/5df809e29cd2e7ae496a33013b27d2f7b52c7f7d/src/Perl6/bootstrap.c/BOOTSTRAP.nqp#L54 54: my stub Cool metaclass Perl6::Metamodel::ClassHOW { ... }; 2) stub 4) Perl6 5) Metamodel 6) ClassHOW 7) {

Re: Is the cosine page wrong?

2020-12-29 Thread ToddAndMargo via perl6-users
On 12/29/20 7:05 AM, Peter Scott wrote: On 12/28/20 11:49 PM, ToddAndMargo via perl6-users wrote: I will accept your target audience:   "Someone who already knows how to program and   uses 'Raku.'" I will also accept that the documentation is not for me or anyone else tryin

Re: Is the cosine page wrong?

2020-12-29 Thread ToddAndMargo via perl6-users
On 12/29/20 3:51 AM, Richard Hainsworth wrote: What it is would be what you stated previously:       "Reference is written for a person who already       knows how to program and who uses Raku" This is taken out of context. I said the Raku community has come to a consensus

Re: Help with bug

2020-12-29 Thread ToddAndMargo via perl6-users
On 12/29/20 4:37 AM, David Santiago wrote: Hi! I need some help in debugging my script. Sometimes it hangs and i don't know why. Hi David, I do not know if it will help you, but in my longer programs I have found that "say" will print out the prior valuies of things and generally drove me

Re: Is the cosine page wrong?

2020-12-29 Thread ToddAndMargo via perl6-users
On 12/29/20 1:12 AM, Richard Hainsworth wrote: Hi Richard, When deciding to write a technical article, the VERY FIRST thing you have to do is determine your TARGET AUDIENCE. In a single sentence, please state for me what you believe the TARGET AUDIENCE is for the

Re: Is the cosine page wrong?

2020-12-29 Thread ToddAndMargo via perl6-users
On 12/29/20 12:10 AM, Francis Grizzly Smit wrote: I assume what you need is a set of tutorials for beginners try https://www.google.com/search?channel=fs=ubuntu=raku+programming++for+beginners and hope for the best I guess. sorry I cannot help more just now Hi Francis, I find this one

Re: Is the cosine page wrong?

2020-12-28 Thread ToddAndMargo via perl6-users
On 12/28/20 11:29 PM, Peter Scott wrote: On 12/28/20 10:57 PM, ToddAndMargo via perl6-users wrote: On 12/28/20 4:54 AM, Richard Hainsworth wrote: So please take what I say now as a plea for you to adapt a little, not to get pissed off with us even though you do seem to have pissed some of us

Re: Is the cosine page wrong?

2020-12-28 Thread ToddAndMargo via perl6-users
On 12/28/20 4:54 AM, Richard Hainsworth wrote: But they may be useful to someone. Even worse, it is not possible for me to find a collection of your keepers because they are in posts to this email list, and I am not going to search through thousands of emails for your keepers on something

Re: Is the cosine page wrong?

2020-12-28 Thread ToddAndMargo via perl6-users
On 12/28/20 4:54 AM, Richard Hainsworth wrote: So please take what I say now as a plea for you to adapt a little, not to get pissed off with us even though you do seem to have pissed some of us off. You have very definite ideas about what the documentation should and shouldn't be. You have

Re: Is the cosine page wrong?

2020-12-28 Thread ToddAndMargo via perl6-users
On 12/28/20 4:54 AM, Richard Hainsworth wrote: Todd, Some of what you have said in this email list over the years has been very valuable. You ask questions that get some very illuminating answers. I wrote a Module just for you (although I' still trying to get it to work on Windows) and it

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

2020-12-28 Thread ToddAndMargo via perl6-users
On 12/28/20 7:11 AM, Parrot Raiser wrote: "Definition of invoke transitive verb 1a : to petition for help or support b : to appeal to or cite as authority 2 : to call forth by incantation : conjure 3 : to make an earnest request for : solicit 4 :

Re: Is the cosine page wrong?

2020-12-28 Thread ToddAndMargo via perl6-users
On 12/25/20 8:10 AM, Ralph Mellor wrote: 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 invocant. It just leaves it blank This is how it works in Raku source

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

2020-12-27 Thread ToddAndMargo via perl6-users
On 12/26/20 2:50 PM, Ralph Mellor wrote: Is this .self with a better name? No. I know you've been progressing in your understanding of OO in general, and Raku's in particular, since you wrote this email. So I won't explain it for now, but rather just try to confirm you now know what that bit

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

2020-12-27 Thread ToddAndMargo via perl6-users
On 12/19/20 11:04 PM, ToddAndMargo via perl6-users wrote: Hi All, https://github.com/rakudo/rakudo/blob/master/src/core.c/Str.pm6 337:multi method contains(Str:D: Str:D $needle --> Bool:D) { 338:nqp::hllbool(nqp::isne_i(nqp::index($!value,$needle,0),-1)) 339:} I "presume" in

Re: Is self a C pointer?

2020-12-20 Thread ToddAndMargo via perl6-users
On 12/20/20 9:27 PM, Brad Gilbert wrote: It doesn't matter if it is a C pointer. Unless you are working on Moarvm, you should consider them arbitrary unique numbers. Like GUID. That said, yes I'm sure that they represent a location in memory. That explains it. Thank you! I used teh term

Is self a C pointer?

2020-12-20 Thread ToddAndMargo via perl6-users
Hi All, In the following: Example 3: class PrintTest { has Str $.Msg; method PrintMsg() { print "self = <" ~ self.Msg ~ ">\n"; print "self = <" ~ self.Str ~ ">\n"; } } my $x = PrintTest.new(Msg => "abc"); $x.PrintMsg self =

rakudo-pkg-2020.12-01 just hit

2020-12-20 Thread ToddAndMargo via perl6-users
Hi All, RakudoPkgFedora33-2020.12.x86_64.rpm just posted over at: https://github.com/nxadm/rakudo-pkg/releases :-) -T

Re: Is the cosine page wrong?

2020-12-20 Thread ToddAndMargo via perl6-users
On 12/20/20 1:18 PM, Bruce Gray wrote: On Dec 20, 2020, at 2:54 AM, ToddAndMargo via perl6-users wrote: —snip-- I obviously can't feed it a string. Obviously you cannot, but actually you can! $ raku -e 'say .cos for 42, "42", ("4" ~ &qu

Re: I need help with cosine and ()

2020-12-20 Thread ToddAndMargo via perl6-users
On 12/20/20 10:11 AM, Bruce Gray wrote: $a + $b - $c * $d / $e.foo , the .foo method is called on $e, not on the whole A-through-E sub-expression. That makes sense. It is the precidence. In college, we called it "algebraic operation". ** came before *; * came before +; etc In Raku, a

Found a wonderful tutorial on methods

2020-12-20 Thread ToddAndMargo via perl6-users
Hi All, I found a wonderful tutorial on methods: https://raku.guide/#_methods It is *very* well written. And not a refresher for those that already know what they are doing and don't need it. :-) :-) :-) -T

Re: I am having trouble declaring a method

2020-12-20 Thread ToddAndMargo via perl6-users
On 12/20/20 5:01 AM, ToddAndMargo via perl6-users wrote: On 12/20/20 2:24 AM, ToddAndMargo via perl6-users wrote: Hi All, Now what am I doing wrong? -T    class Angle {     # has num64 $.degrees;     method AngleCosine( Rat:D: --> Rat:D )  {    my Numeric $radians = sel

Re: I am having trouble declaring a method

2020-12-20 Thread ToddAndMargo via perl6-users
On 12/20/20 2:24 AM, ToddAndMargo via perl6-users wrote: Hi All, Now what am I doing wrong? -T   class Angle {    # has num64 $.degrees;    method AngleCosine( Rat:D: --> Rat:D )  {   my Numeric $radians = self*π/180;   print "self   = <&qu

Re: I need help with cosine and ()

2020-12-20 Thread ToddAndMargo via perl6-users
On Sun, Dec 20, 2020 at 02:05 ToddAndMargo via perl6-users mailto:perl6-users@perl.org>> wrote: Hi All, Why does this work? say (45*π/180).cos 0.7071067811865476 And this not? say 45*π/180.cos -236.22573454917193 Is not the math s

I am having trouble declaring a method

2020-12-20 Thread ToddAndMargo via perl6-users
Hi All, Now what am I doing wrong? -T class Angle { # has num64 $.degrees; method AngleCosine( Rat:D: --> Rat:D ) { my Numeric $radians = self*π/180; print "self = <" ~ self ~ "\n"; print "radians = <$radians>\n"; return

Re: Is the cosine page wrong?

2020-12-20 Thread ToddAndMargo via perl6-users
On 12/20/20 12:30 AM, Francis Grizzly Smit wrote: On 20/12/2020 19:17, ToddAndMargo via perl6-users wrote: Hi All, https://docs.raku.org/routine/cos     method cos() Where is the definition of what is fed to the method? Should it no be something like:     method cos( Cool:D --> Coo

Re: Is the cosine page wrong?

2020-12-20 Thread ToddAndMargo via perl6-users
On 12/20/20 12:17 AM, ToddAndMargo via perl6-users wrote: Hi All, https://docs.raku.org/routine/cos     method cos() Where is the definition of what is fed to the method? Should it no be something like:     method cos( Cool:D --> Cool:D ) What am I missing? -T https://github.

Is the cosine page wrong?

2020-12-20 Thread ToddAndMargo via perl6-users
Hi All, https://docs.raku.org/routine/cos method cos() Where is the definition of what is fed to the method? Should it no be something like: method cos( Cool:D --> Cool:D ) What am I missing? -T

I need help with cosine and ()

2020-12-20 Thread ToddAndMargo via perl6-users
Hi All, Why does this work? say (45*π/180).cos 0.7071067811865476 And this not? say 45*π/180.cos -236.22573454917193 Is not the math suppose to be done first? Confused again, -T

Re: I need help setting up a method

2020-12-19 Thread ToddAndMargo via perl6-users
On 12/19/20 8:21 PM, Bruce Gray wrote: With a custom `new` method, that could be shortened further to: say BadMath.new(2, 2).BadAdd; print BadMath.new(2, 2).BadAdd ~ "\n"; Default constructor for 'BadMath' only takes named arguments in block at line 1 What am I missing?

I need help understanding ".contains" method construction

2020-12-19 Thread ToddAndMargo via perl6-users
Hi All, https://github.com/rakudo/rakudo/blob/master/src/core.c/Str.pm6 337:multi method contains(Str:D: Str:D $needle --> Bool:D) { 338:nqp::hllbool(nqp::isne_i(nqp::index($!value,$needle,0),-1)) 339:} I "presume" in "abcd".contains("bc") "abcd" is `$!value`, and "bc" is $needle. Do

Re: I need help setting up a method

2020-12-19 Thread ToddAndMargo via perl6-users
On 12/19/20 8:21 PM, Bruce Gray wrote: On Dec 19, 2020, at 6:40 PM, ToddAndMargo via perl6-users wrote: Hi All, I have so far: class BadMath { has Int $.A; has Int $.B; method BadAdd() { my $Clinker = (-5..5).rand.truncate; return $!A + $!B

I need help setting up a method

2020-12-19 Thread ToddAndMargo via perl6-users
Hi All, I have so far: class BadMath { has Int $.A; has Int $.B; method BadAdd() { my $Clinker = (-5..5).rand.truncate; return $!A + $!B + $Clinker; } } my $TwoPlusTwo = BadMath.new( A => 2, B=> 2 ); print $TwoPlusTwo.BadAdd ~

Re: How do I address individual elements inside an object

2020-12-19 Thread ToddAndMargo via perl6-users
apples."; Is the "." at the end of the apples literal or syntax?

Re: .contains code?

2020-12-18 Thread ToddAndMargo via perl6-users
On 12/18/20 9:16 PM, ToddAndMargo via perl6-users wrote: Hi All, Can anyone point me to the class declaration for contains: https://docs.raku.org/routine/contains I am looking for something like:    class {   method contains... Many thanks, -T Kevin answered me off list

.contains code?

2020-12-18 Thread ToddAndMargo via perl6-users
Hi All, Can anyone point me to the class declaration for contains: https://docs.raku.org/routine/contains I am looking for something like: class { method contains... Many thanks, -T

Re: How do I address individual elements inside an object

2020-12-18 Thread ToddAndMargo via perl6-users
On 12/18/20 9:42 AM, William Michels via perl6-users wrote: Hi Laurent, I get: Fruitstand in Fruit<140431957910656>.location has  Fruit<140431957910656>.apples apples. [Rakudo v2020.10] Best, Bill. Hi Bill, From my notes in progress: -T *** addressing values inside and object ***

How do I address individual elements inside an object

2020-12-17 Thread ToddAndMargo via perl6-users
Hi All, class Fruit { has Str $.location; has UInt $.apples; has UInt $.oranges; has UInt $.bananas; } my $FruitStand = Fruit.new( location => "Cucamonga", apples => 400, oranges => 200,

Re: classes and objects questions

2020-12-17 Thread ToddAndMargo via perl6-users
On 12/14/20 2:33 PM, ToddAndMargo via perl6-users wrote: Hi All, https://docs.raku.org/language/classtut "A tutorial about creating and using classes in Raku" So far so good. "Raku has a rich built-in syntax for defining and using classes." Uhh

Re: classes and objects questions

2020-12-15 Thread ToddAndMargo via perl6-users
On 12/14/20 2:33 PM, ToddAndMargo via perl6-users wrote: Hi All, https://docs.raku.org/language/classtut "A tutorial about creating and using classes in Raku" So far so good. "Raku has a rich built-in syntax for defining and using classes." Uhh

Re: classes and objects questions

2020-12-15 Thread ToddAndMargo via perl6-users
On 12/15/20 12:34 AM, WFB wrote: JJ may be right about the OO thing, but it makes the tutorial pretty much useless.  How "class" and "object" *relate* to Raku needs to be explained. When we are talking about describing Classes and Objects in a few words, then I agree. Searching

Re: classes and objects questions

2020-12-15 Thread ToddAndMargo via perl6-users
On 12/15/20 7:00 AM, Parrot Raiser wrote: Raku allows for several different programming paradigms; procedural, functional, (as in languages like LISP), and object-oriented. It is possible to write purely procedural Raku, while ignoring O-O features completely, though it does take some dodging.

Re: classes and objects questions

2020-12-14 Thread ToddAndMargo via perl6-users
For starters, I need to have the definition of "class" and "object". Then I need their rules. -T On 12/14/20 10:33 PM, WFB wrote: Hi ToddAndMargo, Thanks for the effort to improve the Raku docs. However, this is a Raku not OO (Object Oriented

Re: classes and objects questions

2020-12-14 Thread ToddAndMargo via perl6-users
On 12/14/20 5:24 PM, Aureliano Guedes wrote: That's why, as a community-developed language (including docs) I'd like to suggest to you help to improve the docs. This way, when I have - with some lucky - free time, I may learn with you and all others that wrote these docs. Hi Aureliano, I

classes and objects questions

2020-12-14 Thread ToddAndMargo via perl6-users
Hi All, https://docs.raku.org/language/classtut "A tutorial about creating and using classes in Raku" So far so good. "Raku has a rich built-in syntax for defining and using classes." U. Forgot something did we? What is a "class"? Next up: "A default

Re: Need help understand "class"

2020-12-08 Thread ToddAndMargo via perl6-users
Hi All, In the following piece of code: use NativeCall; class CupsDest is repr('CStruct') { has Str $.name; has Str $.instance; has int32 $.is-default; has Pointer $.options; } sub cupsGetDests(Pointer is rw --> int32) is native('cups', v2) {} Would some kind soul

Need help understand "class"

2020-12-07 Thread ToddAndMargo via perl6-users
Hi All, In the following piece of code: use NativeCall; class CupsDest is repr('CStruct') { has Str $.name; has Str $.instance; has int32 $.is-default; has Pointer $.options; } sub cupsGetDests(Pointer is rw --> int32) is native('cups', v2) {} Would some kind soul please

Re: list of printers

2020-12-07 Thread ToddAndMargo via perl6-users
On 12/4/20 7:47 PM, ToddAndMargo via perl6-users wrote: Hi All, Fedora 33 I there a way to use what is on https://docs.raku.org/type/Semaphore to print out a list of my available printers? Many thanks, -T Hi All, With the help of Curt on Stack overflow and a few helpful hints from JJ

Re: list of printers

2020-12-06 Thread ToddAndMargo via perl6-users
On 12/4/20 8:55 PM, ToddAndMargo via perl6-users wrote: On 2020-12-04 20:28, Curt Tilmes wrote: On Fri, Dec 4, 2020 at 10:52 PM ToddAndMargo via perl6-users wrote: This is the C way, although it shows deleted printers as well: #include #include int main() { cups_dest_t* dests; int nCount

Re: The ,= operator

2020-12-05 Thread ToddAndMargo via perl6-users
Hi All, I am a little late to this conversation, but `,=` looks a lot like `push` to me. Am I missing something? -T

Re: list of printers

2020-12-04 Thread ToddAndMargo via perl6-users
On 2020-12-04 20:28, Curt Tilmes wrote: On Fri, Dec 4, 2020 at 10:52 PM ToddAndMargo via perl6-users wrote: This is the C way, although it shows deleted printers as well: #include #include int main() { cups_dest_t* dests; int nCount = cupsGetDests2(CUPS_HTTP_DEFAULT, ); for (int i = 0; i

Re: list of printers

2020-12-04 Thread ToddAndMargo via perl6-users
On 2020-12-04 19:47, ToddAndMargo via perl6-users wrote: Hi All, Fedora 33 I there a way to use what is on https://docs.raku.org/type/Semaphore to print out a list of my available printers? Many thanks, -T This is the C way, although it shows deleted printers as well: #include #include

list of printers

2020-12-04 Thread ToddAndMargo via perl6-users
Hi All, Fedora 33 I there a way to use what is on https://docs.raku.org/type/Semaphore to print out a list of my available printers? Many thanks, -T

msi of 2020.10?

2020-12-02 Thread ToddAndMargo via perl6-users
Any Raku developer reading this, May we please have an msi of 2020.10? 2020.10 msi? https://github.com/rakudo/rakudo/issues/4001 Many thanks, -T

Re: ps?

2020-11-22 Thread ToddAndMargo via perl6-users
On 2020-11-22 15:50, Peter Pentchev wrote: On Sat, Nov 14, 2020 at 03:29:13PM -0800, ToddAndMargo via perl6-users wrote: On 2020-11-13 18:26, Curt Tilmes wrote: On Fri, Nov 13, 2020 at 9:03 PM ToddAndMargo via perl6-users wrote: Fedora 33 I know I can get this information from a system call

Re: I need to run and release a program in the background

2020-11-16 Thread ToddAndMargo via perl6-users
On 2020-11-16 15:50, Andy Bach wrote: > this command runs OUTSIDE the shell.  There are no  environmental variables to be found such as $HOME Well, not exactly none, but a limited env $ raku -e 'my $pA = Proc::Async.new( "env" ); $pA.start;' ... Hi Andy, Limited indeed! I get around it

Re: I need to run and release a program in the background

2020-11-16 Thread ToddAndMargo via perl6-users
On 2020-11-14 12:23, ToddAndMargo via perl6-users wrote: Hi All, How do I use qqx or other to run and release a program in the background, like bash's "&"? Many thanks, -T My revised keeper: How to run and release a file: Note: this command runs OUT

Re: spurt and array question

2020-11-15 Thread ToddAndMargo via perl6-users
On 2020-11-14 23:56, Fernando Santagata wrote: Oh, now I see: you were asking that question in another thread. I was asking why the \n came out literal in another thread. It did not help I made a syntax boobo. I never got the other ways of writing out the array to work either.

Re: \n and array question

2020-11-14 Thread ToddAndMargo via perl6-users
On 2020-11-14 18:03, Bruce Gray wrote: On Nov 14, 2020, at 2:06 PM, ToddAndMargo via perl6-users wrote: —snip— But my question still holds. Why is the \n inside the cell printed literally? The two characters, backslash and `n`, are output literally, because you have *input* them

Re: ps?

2020-11-14 Thread ToddAndMargo via perl6-users
On 2020-11-13 18:26, Curt Tilmes wrote: On Fri, Nov 13, 2020 at 9:03 PM ToddAndMargo via perl6-users wrote: Fedora 33 I know I can get this information from a system call to "ps", but is there a way to tell if a program in running from Raku? Running ps is probably as good a

Re: spurt and array question

2020-11-14 Thread ToddAndMargo via perl6-users
On 2020-11-14 13:39, Fernando Santagata wrote: What do you mean by putting the \n in the variable? $ p6 'my @x = <>; for @x {"$_".print};' aaabbbccc Why are the \n's not being resolved in the above? Why do I have to add an \n to the print line? $ p6 'my @x = <>; for @x {"$_\n".print};' aaa

Re: I need to run and release a program in the background

2020-11-14 Thread ToddAndMargo via perl6-users
On 2020-11-14 13:14, ToddAndMargo via perl6-users wrote: On 2020-11-14 12:23, ToddAndMargo via perl6-users wrote: Hi All, How do I use qqx or other to run and release a program in the background, like bash's "&"? Many thanks, -T The guys on hte chat line figured it out for

Re: I need to run and release a program in the background

2020-11-14 Thread ToddAndMargo via perl6-users
On 2020-11-14 12:23, ToddAndMargo via perl6-users wrote: Hi All, How do I use qqx or other to run and release a program in the background, like bash's "&"? Many thanks, -T The guys on hte chat line figured it out for me: $ p6 'my $pA = Proc::Async.new( "/usr/bin/leaf

I need to run and release a program in the background

2020-11-14 Thread ToddAndMargo via perl6-users
Hi All, How do I use qqx or other to run and release a program in the background, like bash's "&"? Many thanks, -T -- A computer without Microsoft is like a chocolate cake without the mustard

Re: \n and array question

2020-11-14 Thread ToddAndMargo via perl6-users
On 2020-11-14 12:03, Brad Gilbert wrote:   I pretty quickly caught my booboo after I pressed send. A little eggs on the face. But my question still holds. Why is the \n inside the cell printed literally?

Re: spurt and array question

2020-11-14 Thread ToddAndMargo via perl6-users
On Sat, Nov 14, 2020 at 1:07 PM ToddAndMargo via perl6-users mailto:perl6-users@perl.org>> wrote: On 2020-11-14 06:00, Brad Gilbert wrote: > The purpose of `spurt` is to: > 1. open a NEW file to write to > 2. print a single string > 3. close the file

Re: spurt and array question

2020-11-14 Thread ToddAndMargo via perl6-users
On 2020-11-14 11:22, Fernando Santagata wrote: On Sat, Nov 14, 2020 at 8:07 PM ToddAndMargo via perl6-users mailto:perl6-users@perl.org>> wrote: On 2020-11-14 06:00, Brad Gilbert wrote: > The purpose of `spurt` is to: > 1. open a NEW file to write to > 2.

Re: spurt and array question

2020-11-14 Thread ToddAndMargo via perl6-users
On 2020-11-14 03:15, Tom Browder wrote: On Sat, Nov 14, 2020 at 01:59 ToddAndMargo via perl6-users mailto:perl6-users@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.    

Re: spurt and array question

2020-11-14 Thread ToddAndMargo via perl6-users
On 2020-11-14 03:59, Gianni Ceccarelli wrote: $Leafpadrc.put($_) for @LeafpadrcNew; Cannot resolve caller print(Str:D: BOOTStr); none of these signatures match: (Mu: *%_) in sub RunReport at ./XferParts.pl6 line 229 229: $Leafpadrc.put($_) for @LeafpadrcNew; --

Re: \n and array question

2020-11-14 Thread ToddAndMargo via perl6-users
>> On Nov 14, 2020, at 14:12, ToddAndMargo via perl6-users wrote: >> >> On 2020-11-14 11:08, Curt Tilmes wrote: >>> On Sat, Nov 14, 2020 at 2:03 PM ToddAndMargo via perl6-users >>> wrote: >>>> Just out of curiosity, why is the \n printed out

Re: \n and array question

2020-11-14 Thread ToddAndMargo via perl6-users
On 2020-11-14 11:08, Curt Tilmes wrote: On Sat, Nov 14, 2020 at 2:03 PM ToddAndMargo via perl6-users wrote: Just out of curiosity, why is the \n printed out literally here? p6 'my @x = <"aaa\n","bbb\n","ccc\n">; for @x {print @_};' Your 'word quoti

Re: spurt and array question

2020-11-14 Thread ToddAndMargo via perl6-users
On 2020-11-14 06:00, Brad Gilbert wrote: The purpose of `spurt` is to: 1. open a NEW file to write to 2. print a single string 3. close the file If you are calling `spurt` more than once on a given file, you are doing it wrong. You are forgetting that spurt comes with an `:append` option.

\n and array question

2020-11-14 Thread ToddAndMargo via perl6-users
Hi All, Just out of curiosity, why is the \n printed out literally here? $ alias p6 alias p6='perl6 -e' p6 'my @x = <"aaa\n","bbb\n","ccc\n">; for @x {print @_};' "aaa\n","bbb\n","ccc\n" Many thanks, -T -- ~~ Computers are like air conditioners. They

spurt and array question

2020-11-14 Thread ToddAndMargo via perl6-users
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 ); } If I spurt the array, it converts the array into a single text line.

ps?

2020-11-13 Thread ToddAndMargo via perl6-users
Hi All, Fedora 33 I know I can get this information from a system call to "ps", but is there a way to tell if a program in running from Raku? Many thanks, -T

New Raku 2020.10.02

2020-10-29 Thread ToddAndMargo via perl6-users
GetRaku new update downloaded 2020.10 --> 2020.10.02 https://github.com/nxadm/rakudo-pkg/releases I do not know what changed

New Raku

2020-09-27 Thread ToddAndMargo via perl6-users
GetRaku new update downloaded 2020.08.2 --> 2020.09 I don't know what has changed though https://github.com/nxadm/rakudo-pkg/releases

Re: Eject flash drive in Windows?

2020-09-23 Thread ToddAndMargo via perl6-users
On 2020-09-23 03:34, ToddAndMargo via perl6-users wrote: On 2020-09-22 22:55, Shlomi Fish wrote: Hi Todd! On Tue, 22 Sep 2020 20:33:47 -0700 ToddAndMargo via perl6-users wrote: Hi All, Anyone write any code to eject a flash drive in Windows? A duckduckgo search led me to this page

Re: Eject flash drive in Windows?

2020-09-23 Thread ToddAndMargo via perl6-users
On 2020-09-22 22:55, Shlomi Fish wrote: Hi Todd! On Tue, 22 Sep 2020 20:33:47 -0700 ToddAndMargo via perl6-users wrote: Hi All, Anyone write any code to eject a flash drive in Windows? A duckduckgo search led me to this page: https://stackoverflow.com/questions/85649/safely-remove-a-usb

Eject flash drive in Windows?

2020-09-22 Thread ToddAndMargo via perl6-users
Hi All, Anyone write any code to eject a flash drive in Windows? Many thanks, -T

Re: liens and :chomp question

2020-08-31 Thread ToddAndMargo via perl6-users
On 2020-08-30 08:16, yary wrote: Looking up https://docs.raku.org/routine/lines shows a Table of Contents with class Cool (Cool) routine lines class Supply (Supply) method lines class Str (Str) routine lines class IO::CatHandle (IO::CatHandle) method lines

Re: liens and :chomp question

2020-08-31 Thread ToddAndMargo via perl6-users
On 2020-08-30 08:16, yary wrote: Expanding on how to read the docs & signature a bit, from Tobias You confuse two methods that have the same name "lines". One of them, which exists in the IO::Path class, has a :chomp argument. The other, on IO::Handle does not.  

Re: How to I modify what is a new line in lines?

2020-08-31 Thread ToddAndMargo via perl6-users
On 2020-08-31 18:54, William Michels via perl6-users wrote: On Mon, Aug 31, 2020 at 6:07 PM ToddAndMargo via perl6-users wrote: On 2020-08-31 17:21, yary wrote: First part of my previous email on this thread! Re-read this bit First, you were looking at the docs for Path's "lines"

Re: How to I modify what is a new line in lines?

2020-08-31 Thread ToddAndMargo via perl6-users
On 2020-08-31 17:21, yary wrote: First part of my previous email on this thread! Re-read this bit First, you were looking at the docs for Path's "lines", but you are using a string "lines" and those docs say multi method lines(Str:D: $limit, :$chomp = True) multi method lines(Str:D: :$chomp

Re: print particular lines question

2020-08-31 Thread ToddAndMargo via perl6-users
On 2020-08-31 17:03, yary wrote: anonymous variable Would be safe thinking it had the same properties as `$_`?

Re: How to I modify what is a new line in lines?

2020-08-31 Thread ToddAndMargo via perl6-users
On 2020-08-30 08:42, yary wrote: You were close! First, you were looking at the docs for Path's "lines", but you are using a string "lines" and those docs say multi method lines(Str:D: $limit, :$chomp = True) multi method lines(Str:D: :$chomp = True) Files get "nl-in" due to the special

Re: print particular lines question

2020-08-31 Thread ToddAndMargo via perl6-users
adn fixed

Re: print particular lines question

2020-08-31 Thread ToddAndMargo via perl6-users
On 2020-08-31 16:57, ToddAndMargo via perl6-users wrote: On 2020-08-31 16:53, ToddAndMargo via perl6-users wrote: On Mon, Aug 31, 2020, 4:20 PM ToddAndMargo via perl6-users mailto:perl6-users@perl.org>> wrote:     On 2020-08-31 05:53, Brian Duggan wrote: > On Monday, August

Re: print particular lines question

2020-08-31 Thread ToddAndMargo via perl6-users
On 2020-08-31 16:53, ToddAndMargo via perl6-users wrote: On Mon, Aug 31, 2020, 4:20 PM ToddAndMargo via perl6-users mailto:perl6-users@perl.org>> wrote:     On 2020-08-31 05:53, Brian Duggan wrote: > On Monday, August 24, Curt Tilmes wrote: >> $ cat Lines.txt

Re: print particular lines question

2020-08-31 Thread ToddAndMargo via perl6-users
On Mon, Aug 31, 2020, 4:20 PM ToddAndMargo via perl6-users mailto:perl6-users@perl.org>> wrote: On 2020-08-31 05:53, Brian Duggan wrote: > On Monday, August 24, Curt Tilmes wrote: >> $ cat Lines.txt | raku -e '.say for lines()[3,2,5]' > > The -n f

Re: print particular lines question

2020-08-31 Thread ToddAndMargo via perl6-users
On 2020-08-31 05:53, Brian Duggan wrote: On Monday, August 24, Curt Tilmes wrote: $ cat Lines.txt | raku -e '.say for lines()[3,2,5]' The -n flag is an option here too: raku -ne '.say if $++ == 3|2|5' Lines.txt Brian Hi Bill, Works beatifically! And no bash pipe! $ raku -ne '.say

Re: lines :$nl-in question

2020-08-30 Thread ToddAndMargo via perl6-users
On 2020-08-30 07:43, yary wrote: The :foo syntax is called a "colon pair" Thank you!

Re: lines :$nl-in question

2020-08-30 Thread ToddAndMargo via perl6-users
> Origin & history: >   Derived from in- + vocō ("I call"). > > Verb: >   I invoke >   I call (by name) > > In fact that is pretty close to the same meaning as it is used in the Raku docs. > > It is the object that we are calling (aka invoking) a method on. Maybe we

How to I modify what is a new line in lines?

2020-08-30 Thread ToddAndMargo via perl6-users
Hi All, https://docs.raku.org/type/IO::Path#method_lines method lines(IO::Path:D: :$chomp = True, :$enc = 'utf8', :$nl-in = ["\x0A", "\r\n"], |c --> Seq:D) How do I change what lines sees as a new line. Is it :$nl-in? A tab in this case. Some of my missteps: $ p6 'my $x="a\tb\tc\td\t";

Re: lines :$nl-in question

2020-08-30 Thread ToddAndMargo via perl6-users
On Sat, Aug 29, 2020 at 9:05 PM ToddAndMargo via perl6-users mailto:perl6-users@perl.org>> wrote: And if you would not mind, what is the official name of variables that begin with ":" On 2020-08-30 00:43, Brad Gilbert wrote: There are no vari

Re: Reminder: Fill Raku's user survey!

2020-08-30 Thread ToddAndMargo via perl6-users
El dom., 30 ago. 2020 a las 11:34, ToddAndMargo (>) escribió: On 2020-08-30 02:26, JJ Merelo wrote: > Hi, > Here's the link > https://docs.google.com/forms/d/e/1FAIpQLSdRPBdn1iRN_sT8BMNMOBhVbEY1u8ngZWVwLyM37sqsa4OLwQ/viewform > >

Re: Reminder: Fill Raku's user survey!

2020-08-30 Thread ToddAndMargo via perl6-users
On 2020-08-30 02:26, JJ Merelo wrote: Hi, Here's the link https://docs.google.com/forms/d/e/1FAIpQLSdRPBdn1iRN_sT8BMNMOBhVbEY1u8ngZWVwLyM37sqsa4OLwQ/viewform It'll take you five minutes, top. Answers will be summarized and carefully considered. Thanks! -- JJ Hi JJ, I missed one when I

Re: lines :$nl-in question

2020-08-30 Thread ToddAndMargo via perl6-users
On 2020-08-30 02:00, Richard Hainsworth wrote: While your logical transitions move you down some interesting rabbit holes, if you are going to say stuff, at least check first. On 30/08/2020 00:39, ToddAndMargo via perl6-users wrote: On 2020-08-28 23:51, Tobias Boege wrote: You do realize

Re: lines :$nl-in question

2020-08-30 Thread ToddAndMargo via perl6-users
On 2020-08-30 00:48, Brad Gilbert wrote: Invocant is in the dictionary though. In fact it is from Latin. Origin & history:   Derived from in- + vocō ("I call"). Verb:   I invoke   I call (by name) In fact that is pretty close to the same meaning as it is used in the Raku docs. It is

<    1   2   3   4   5   6   7   8   9   10   >