Re: ps?

2020-11-22 Thread Peter Pentchev
any advantages to using pgrep over trying to parse the output of ps, except for the case when you invoke ps with a very, very specific set of options and columns, but... that's pretty much equivalent to running pgrep anyway ;) G'luck, Peter -- Peter Pentchev r...@ringlet.net r...@debian.org p.

Re: I need help finding a class for a method

2020-06-08 Thread Peter Pentchev
On Mon, Jun 08, 2020 at 04:01:41PM -0700, ToddAndMargo via perl6-users wrote: > On 2020-06-08 15:35, Peter Pentchev wrote: > > On Mon, Jun 08, 2020 at 03:15:36PM -0700, ToddAndMargo via perl6-users > > wrote: > > > On 2020-06-08 15:02, Peter Pentchev wrote: > > >

Re: I need help finding a class for a method

2020-06-08 Thread Peter Pentchev
On Mon, Jun 08, 2020 at 02:57:58PM -0700, ToddAndMargo via perl6-users wrote: > On 2020-06-08 14:54, Peter Pentchev wrote: > > On Mon, Jun 08, 2020 at 02:48:48PM -0700, ToddAndMargo via perl6-users > > wrote: > > > On 2020-06-08 13:55, Richard Hainsworth wrote: > &

Re: I need help finding a class for a method

2020-06-08 Thread Peter Pentchev
the comment rules are being violated here. > The comment does not terminate until the first blank > line. > > What am I missing, again. > > :'( OK, that is weird. I do not know why your editor is showing you that. https://github.com/finanalyst/p6-inform/blob/master/lib/Informati

Re: question about the multi in method

2020-06-08 Thread Peter Pentchev
On Mon, Jun 08, 2020 at 02:39:10PM -0700, ToddAndMargo via perl6-users wrote: > On 2020-06-08 14:12, Peter Pentchev wrote: > > On Mon, Jun 08, 2020 at 01:28:34PM -0700, ToddAndMargo via perl6-users > > wrote: > > > On 2020-06-08 02:45, Richard Hainsworth wrote: > >

Re: question about the multi in method

2020-06-08 Thread Peter Pentchev
ze that this is an internal, undocumented function that serves some purpose for the combination of "libc" and "libm" and that is *not* supposed to be used by anything outside these two libraries - so this somebody will shrug it off, say "hey, there's some kind of implementat

Re: question about the multi in method

2020-06-08 Thread Peter Pentchev
On Mon, Jun 08, 2020 at 10:45:21AM +0100, Richard Hainsworth wrote: > Ok Todd, let me have a go at this issue. Thank you, Richard, for your help. I apologize to Todd and to everyone on the list for my outburst in my last e-mail. G'luck, Peter -- Peter Pentchev r...@ringlet.net r...@debian.

Re: question about the multi in method

2020-06-08 Thread Peter Pentchev
On Mon, Jun 08, 2020 at 12:12:07AM -0700, ToddAndMargo via perl6-users wrote: > On 2020-06-07 22:39, Peter Pentchev wrote: > > I thought I explained that. The Rakudo developers are*never* finished > > with the development of some methods. Somebody*will* want to extend > &

Re: question about the multi in method

2020-06-07 Thread Peter Pentchev
On Sun, Jun 07, 2020 at 07:07:29PM -0700, ToddAndMargo via perl6-users wrote: > On 2020-06-07 14:20, Peter Pentchev wrote: > > On Sun, Jun 07, 2020 at 12:28:33PM -0700, ToddAndMargo via perl6-users > > wrote: > > > On 2020-06-07 08:19, Peter Pentchev wrote: > > >

Re: question about the multi in method

2020-06-07 Thread Peter Pentchev
On Mon, Jun 08, 2020 at 12:20:03AM +0300, Peter Pentchev wrote: > On Sun, Jun 07, 2020 at 12:28:33PM -0700, ToddAndMargo via perl6-users wrote: > > On 2020-06-07 08:19, Peter Pentchev wrote: > > > On Sun, Jun 07, 2020 at 09:04:45AM -0500, Brad Gilbert wrote: > > > >

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

2020-06-07 Thread Peter Pentchev
On Sun, Jun 07, 2020 at 05:33:43PM -0400, Will Coleda wrote: > On Sun, Jun 7, 2020 at 4:53 PM Peter Pentchev wrote: > > > > On Sun, Jun 07, 2020 at 12:32:09PM -0700, ToddAndMargo via perl6-users > > wrote: > > > On 2020-06-07 02:32, Peter Pentchev wrote: > >

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

2020-06-07 Thread Peter Pentchev
On Mon, Jun 08, 2020 at 12:26:42AM +0300, Peter Pentchev wrote: > On Mon, Jun 08, 2020 at 12:21:22AM +0300, Peter Pentchev wrote: > > On Sun, Jun 07, 2020 at 01:57:11PM -0700, ToddAndMargo via perl6-users > > wrote: > > > On 2020-06-07 13:53, Peter Pentchev wrote: >

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

2020-06-07 Thread Peter Pentchev
On Mon, Jun 08, 2020 at 12:21:22AM +0300, Peter Pentchev wrote: > On Sun, Jun 07, 2020 at 01:57:11PM -0700, ToddAndMargo via perl6-users wrote: > > On 2020-06-07 13:53, Peter Pentchev wrote: > > > $path = 'lib1'.IO.d ?? 'lib1' !! 'lib2'; > > > > Got it! Thank

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

2020-06-07 Thread Peter Pentchev
On Sun, Jun 07, 2020 at 01:57:11PM -0700, ToddAndMargo via perl6-users wrote: > On 2020-06-07 13:53, Peter Pentchev wrote: > > $path = 'lib1'.IO.d ?? 'lib1' !! 'lib2'; > > Got it! Thank you! > > I am not seeing the above enter the proper syntax: > > 'li

Re: question about the multi in method

2020-06-07 Thread Peter Pentchev
On Sun, Jun 07, 2020 at 12:28:33PM -0700, ToddAndMargo via perl6-users wrote: > On 2020-06-07 08:19, Peter Pentchev wrote: > > On Sun, Jun 07, 2020 at 09:04:45AM -0500, Brad Gilbert wrote: > > > On Sun, Jun 7, 2020 at 3:15 AM ToddAndMargo via perl6-users < > > &g

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

2020-06-07 Thread Peter Pentchev
On Sun, Jun 07, 2020 at 12:32:09PM -0700, ToddAndMargo via perl6-users wrote: > On 2020-06-07 02:32, Peter Pentchev wrote: > > > BEGIN { > > $path = 'lib1'.IO.d ?? 'lib1' !! 'lib2'; > > } > > Does the final "}" close the BEGIN? Well, there is an

Re: I need a GTK pop up with time out

2020-06-07 Thread Peter Pentchev
amples. Just a minor point: ITYM "a shortcut for show_countdown(False)" :) > Those shortcuts are becoming fairly common raku idioms. I didn't think it > would be necessary to document them. G'luck, Peter -- Peter Pentchev r...@ringlet.net r...@debian.org p...@storpool.com PGP key:

Re: question about the multi in method

2020-06-07 Thread Peter Pentchev
On Sun, Jun 07, 2020 at 06:19:29PM +0300, Peter Pentchev wrote: > On Sun, Jun 07, 2020 at 09:04:45AM -0500, Brad Gilbert wrote: > > On Sun, Jun 7, 2020 at 3:15 AM ToddAndMargo via perl6-users < > > perl6-users@perl.org> wrote: > > > > > Hi All, > &g

Re: question about the multi in method

2020-06-07 Thread Peter Pentchev
lly generated or not, or the efforts of everyone involved in producing it :) I am under the impression that it is, at least to some extent, automatically generated, so I'm genuinely curious what is it about the .starts-with() method that has caused it to lose its Cool :) ...and, of course, it may

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

2020-06-07 Thread Peter Pentchev
On Sun, Jun 07, 2020 at 11:37:43AM +0200, JJ Merelo wrote: > El dom., 7 jun. 2020 a las 11:32, Peter Pentchev () > escribió: > > > On Sun, Jun 07, 2020 at 12:28:36AM -0700, ToddAndMargo via perl6-users > > wrote: > > > Hi All, > > > > > > Is there

Re: changing name of module

2020-06-07 Thread Peter Pentchev
the p6-* name will load that first, then load the rk-* one, hence the nanoseconds delay. G'luck, Peter -- Peter Pentchev r...@ringlet.net r...@debian.org p...@storpool.com PGP key:http://people.FreeBSD.org/~roam/roam.key.asc Key fingerprint 2EE7 A7A5 17FC 124C F115 C354 651E EFB0 2527 DF13 signature.asc Description: PGP signature

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

2020-06-07 Thread Peter Pentchev
path; BEGIN { $path = 'lib1'.IO.d ?? 'lib1' !! 'lib2'; } use lib $path; use Foo; Foo.new.hello; ===== Hope that helps! G'luck, Peter -- Peter Pentchev r...@ringlet.net r...@debian.org p...@storpool.com PGP key:http://people.FreeBSD.org/~roam/roam.key

Re: Had a weird symptom calling raku

2020-06-05 Thread Peter Pentchev
ld not be called > from Cobian. Had one of those "ah poop" moments > > > -T > > 'K:/NtUtil' is the network drive I program my various > Windows virtual machines from. Since the shell I > use is in that directory, "." will suffice. G'luck, Peter -- P

Re: I reproduced one of the errors!

2020-06-04 Thread Peter Pentchev
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: > > >

Re: I reproduced one of the errors!

2020-06-03 Thread Peter Pentchev
On Wed, Jun 03, 2020 at 01:12:41PM +0300, Veesh Goldman wrote: > On Wed, Jun 3, 2020, 12:22 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: > > >

Re: I reproduced one of the errors!

2020-06-03 Thread Peter Pentchev
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 Tue, Jun 02, 2020 at 07:39:16PM -0700, ToddAndMargo via perl6-users > > wrote: > > > On 2020-06-01 23:02, Peter Pentchev wrote: > > >

Re: I reproduced one of the errors!

2020-06-02 Thread Peter Pentchev
On Tue, Jun 02, 2020 at 07:39:16PM -0700, ToddAndMargo via perl6-users wrote: > On 2020-06-01 23:02, Peter Pentchev wrote: > > https://docs.raku.org/language/classtut > > Error 522 Ray ID: 59d609616954eb79 • 2020-06-03 02:38:12 UTC > Connection timed out > > Poop! T

Re: I reproduced one of the errors!

2020-06-02 Thread Peter Pentchev
On Tue, Jun 02, 2020 at 09:34:30PM +0300, Peter Pentchev wrote: > On Tue, Jun 02, 2020 at 11:41:31AM -0400, Parrot Raiser wrote: > > I suspect that "methods" were originally distinguished from > > "subroutines" because it made the rain-dance about the new c

Re: I reproduced one of the errors!

2020-06-02 Thread Peter Pentchev
s thread's subject too much already, so I'll stop now :) G'luck, Peter -- Peter Pentchev r...@ringlet.net r...@debian.org p...@storpool.com PGP key:http://people.FreeBSD.org/~roam/roam.key.asc Key fingerprint 2EE7 A7A5 17FC 124C F115 C354 651E EFB0 2527 DF13 signature.asc Description: PGP signature

Re: I reproduced one of the errors!

2020-06-02 Thread Peter Pentchev
On Tue, Jun 02, 2020 at 08:52:37AM +0300, Peter Pentchev wrote: > On Mon, Jun 01, 2020 at 01:36:19PM -0700, ToddAndMargo via perl6-users wrote: [snip] > > A follow up question: > > > > Is there a booboo in the documentation here? > > > > https://docs.raku.org/rou

Re: I reproduced one of the errors!

2020-06-02 Thread Peter Pentchev
On Mon, Jun 01, 2020 at 01:38:48PM -0700, ToddAndMargo via perl6-users wrote: > On 2020-06-01 02:21, Peter Pentchev wrote: > > class Thing { > > multi method do-things(Int:D $value) { > > say "A thing can do things with an integer: $value"; > &g

Re: I reproduced one of the errors!

2020-06-01 Thread Peter Pentchev
On Mon, Jun 01, 2020 at 01:36:19PM -0700, ToddAndMargo via perl6-users wrote: > On 2020-06-01 02:21, Peter Pentchev wrote: > > On Mon, Jun 01, 2020 at 01:15:23AM -0700, ToddAndMargo via perl6-users > > wrote: > > > On 2020-05-31 17:13, Peter Pentchev wrote: > > >

Re: I reproduced one of the errors!

2020-06-01 Thread Peter Pentchev
On Mon, Jun 01, 2020 at 12:26:16PM +0300, Peter Pentchev wrote: > On Mon, Jun 01, 2020 at 12:21:37PM +0300, Peter Pentchev wrote: > > On Mon, Jun 01, 2020 at 01:15:23AM -0700, ToddAndMargo via perl6-users > > wrote: [snip] > > > Hi Peter, > > > > > > I s

Re: I reproduced one of the errors!

2020-06-01 Thread Peter Pentchev
On Mon, Jun 01, 2020 at 12:21:37PM +0300, Peter Pentchev wrote: > On Mon, Jun 01, 2020 at 01:15:23AM -0700, ToddAndMargo via perl6-users wrote: > > On 2020-05-31 17:13, Peter Pentchev wrote: > > > On Mon, Jun 01, 2020 at 03:12:05AM +0300, Peter Pentchev wrote: > > > >

Re: I reproduced one of the errors!

2020-06-01 Thread Peter Pentchev
On Mon, Jun 01, 2020 at 01:15:23AM -0700, ToddAndMargo via perl6-users wrote: > On 2020-05-31 17:13, Peter Pentchev wrote: > > On Mon, Jun 01, 2020 at 03:12:05AM +0300, Peter Pentchev wrote: > > > On Sun, May 31, 2020 at 04:29:55PM -0700, ToddAndMargo via perl6-users > >

Re: I reproduced one of the errors!

2020-05-31 Thread Peter Pentchev
On Mon, Jun 01, 2020 at 03:12:05AM +0300, Peter Pentchev wrote: > On Sun, May 31, 2020 at 04:29:55PM -0700, ToddAndMargo via perl6-users wrote: > > On 2020-05-31 04:58, Peter Pentchev wrote: > > > > > So my beef is when you feed these guys an undefined > > > >

Re: I reproduced one of the errors!

2020-05-31 Thread Peter Pentchev
On Sun, May 31, 2020 at 04:29:55PM -0700, ToddAndMargo via perl6-users wrote: > On 2020-05-31 04:58, Peter Pentchev wrote: > > > > So my beef is when you feed these guys an undefined > > > > variable, that they needs to tell you it requires > > > > a &quo

Re: I reproduced one of the errors!

2020-05-31 Thread Peter Pentchev
starts-with() that will accept an undefined object of the "Any" type as a parameter, so, yeah, getting close :) > Now what I would "like to see" (suggestion, not a demand), > is the Haystack complain in a similar fashion. For instance: > > starts-with'

Re: I reproduced one of the errors!

2020-05-31 Thread Peter Pentchev
On Sun, May 31, 2020 at 02:53:45PM +0300, Peter Pentchev wrote: > On Sat, May 30, 2020 at 04:22:56PM -0700, ToddAndMargo via perl6-users wrote: > > On 2020-05-30 04:19, Peter Pentchev wrote: > > > On Fri, May 29, 2020 at 04:36:41PM -0700, ToddAndMargo via perl6-users > >

Re: I reproduced one of the errors!

2020-05-31 Thread Peter Pentchev
On Sat, May 30, 2020 at 04:22:56PM -0700, ToddAndMargo via perl6-users wrote: > On 2020-05-30 04:19, Peter Pentchev wrote: > > On Fri, May 29, 2020 at 04:36:41PM -0700, ToddAndMargo via perl6-users > > wrote: > > > > Hi Peter, > > > > &

Re: I reproduced one of the errors!

2020-05-30 Thread Peter Pentchev
On Fri, May 29, 2020 at 04:36:41PM -0700, ToddAndMargo via perl6-users wrote: > On 2020-05-28 06:39, Peter Pentchev wrote: > > On Wed, May 27, 2020 at 03:12:01PM -0700, ToddAndMargo via perl6-users > > wrote: > > > > On 2020-05-27 14:32, Andy Bach wrote: > > >

Re: I need help with Config:INI

2020-05-30 Thread Peter Pentchev
smtp.bozo.com] > ~ /run the test > > > How do I read the hash so I get section > `[eMail]` `smtp`? (Or any of the other values > as well.) If you want that specific value, dd %hash If some of the keys are in variables, try this: my $sectio

Re: I reproduced one of the errors!

2020-05-28 Thread Peter Pentchev
tr:U (undefined string), and it cannot find such a method. It also tells you what methods it can find. It gives the same error message no matter what types the function/method can handle and no matter what type you are trying to call it on. From that point on Raku kind of expects you to know

Re: I need a second pair of eyes

2020-05-27 Thread Peter Pentchev
ay" and the place where you use the variable that could change the value? Are you also really, really, really sure that you have not mistyped one of the names? If so, is there a way you could create a minimal example, a short program that, when run on your system, always behaves this way, and post i

Re: I need help with IO.e

2020-05-19 Thread Peter Pentchev
On Tue, May 19, 2020 at 03:16:41PM +0300, Peter Pentchev wrote: > On Mon, May 18, 2020 at 10:58:26PM -0700, ToddAndMargo via perl6-users wrote: > > On 2020-05-18 17:14, Peter Pentchev wrote: > > > On Mon, May 18, 2020 at 04:53:31PM -0700, ToddAndMargo via perl6-users > >

Re: I need help with IO.e

2020-05-19 Thread Peter Pentchev
On Mon, May 18, 2020 at 10:58:26PM -0700, ToddAndMargo via perl6-users wrote: > On 2020-05-18 17:14, Peter Pentchev wrote: > > On Mon, May 18, 2020 at 04:53:31PM -0700, ToddAndMargo via perl6-users > > wrote: > > > In 2020-05-18 16:11, Peter Pentchev wrote: > > >

Re: I need help with IO.e

2020-05-18 Thread Peter Pentchev
On Mon, May 18, 2020 at 04:53:31PM -0700, ToddAndMargo via perl6-users wrote: > In 2020-05-18 16:11, Peter Pentchev wrote: > > As an exercise for the reader: once the above sinks in, what exactly > > will "say if 'h:/'.IO.d" do? > > It returns t

Re: I need help with IO.e

2020-05-18 Thread Peter Pentchev
t; since I expected the "if" statement to make Raku check whether 'h:/'.IO.d returns something that looks like truth and, if it does, to execute the "say 'foo'" part. I'm sorry, I assumed that you were familiar with the postfix "if" form (something if something-el

Re: I need help with IO.e

2020-05-18 Thread Peter Pentchev
On Mon, May 18, 2020 at 03:18:26PM -0700, ToddAndMargo via perl6-users wrote: > On 2020-05-18 14:35, Peter Pentchev wrote: > > My point is that you put a bare "say" without telling it*what* to say, > > which does something quite specific in both Perl and Raku. That shou

Re: I need help with IO.e

2020-05-18 Thread Peter Pentchev
On Mon, May 18, 2020 at 02:32:49PM -0700, ToddAndMargo via perl6-users wrote: > On 2020-05-18 14:22, Peter Pentchev wrote: > > Please note that in my example a couple of messages ago I did not write > > "say if 'h:/'.IO.d", I wrote "say 'yes' if 'h:/'.IO.d". T

Re: I need help with IO.e

2020-05-18 Thread Peter Pentchev
On Tue, May 19, 2020 at 12:22:55AM +0300, Peter Pentchev wrote: > On Mon, May 18, 2020 at 12:35:47PM -0700, ToddAndMargo via perl6-users wrote: > > On 2020-05-17 22:28, Paul Procacci wrote: > > > Don't 'say' anything.  Just let the optimizer spit out the QAST that you &g

Re: I need help with IO.e

2020-05-18 Thread Peter Pentchev
right question one already needs to know most of the answer. The QAST is most useful to those who already have some idea how a compiler generally works, how a pseudocode virtual machine works, how a just-in-time compiler works, and how they all handle different expressions and the relationships betwee

Re: I need help with IO.e

2020-05-17 Thread Peter Pentchev
On Sun, May 17, 2020 at 12:12:51PM -0700, ToddAndMargo via perl6-users wrote: > On 2020-05-17 03:36, Peter Pentchev wrote: > > On Sun, May 17, 2020 at 03:01:34AM -0700, ToddAndMargo via perl6-users > > wrote: > > > On 2020-05-17 02:30, Peter Pentchev wrote: > > &g

Re: I need help with IO.e

2020-05-17 Thread Peter Pentchev
On Sun, May 17, 2020 at 03:01:34AM -0700, ToddAndMargo via perl6-users wrote: > On 2020-05-17 02:30, Peter Pentchev wrote: > > You said that you would tack Bool at the end in "if" statements, too. > > Hi Peter, > > No wonder. I do not remember sayin

Re: I need help with IO.e

2020-05-17 Thread Peter Pentchev
On Sun, May 17, 2020 at 02:18:30AM -0700, ToddAndMargo via perl6-users wrote: > On 2020-05-17 01:23, Peter Pentchev wrote: > > On Sat, May 16, 2020 at 06:57:53PM -0700, ToddAndMargo via perl6-users > > wrote: > > > On 2020-05-16 17:44, Peter Pentchev wrote: > > >

Re: I need help with IO.e

2020-05-17 Thread Peter Pentchev
On Sat, May 16, 2020 at 06:57:53PM -0700, ToddAndMargo via perl6-users wrote: > On 2020-05-16 17:44, Peter Pentchev wrote: > > On Sat, May 16, 2020 at 03:19:05PM -0700, ToddAndMargo via perl6-users > > wrote: > > > On 2020-05-16 06:38, Peter Pentchev wrote: > > >

Re: Matching subpatterns in any order, conjunctions, negated matches

2020-05-16 Thread Peter Pentchev
On Sat, May 16, 2020 at 05:53:04PM -0700, Joseph Brenner wrote: > Peter Pentchev wrote: > > On Fri, May 15, 2020 at 07:32:50PM -0700, Joseph Brenner wrote: > >> Regex engines by their nature care a lot about order, but I > >> occasionally want to relax

Re: I need help with IO.e

2020-05-16 Thread Peter Pentchev
On Sat, May 16, 2020 at 03:19:05PM -0700, ToddAndMargo via perl6-users wrote: > On 2020-05-16 06:38, Peter Pentchev wrote: > > > $ raku *-e* "your one-liner script here" > > And also you might want to put some quotes around the paths to let Raku > > know t

Re: I need help with IO.e

2020-05-16 Thread Peter Pentchev
h:\MyDocsBackup'.IO.d. Failed to stat file: no such > > file or directory > > > > K:\Windows\NtUtil>raku "say 'h:/MyDocsBackup'.IO.d" > > Could not open say 'h:/MyDocsBackup'.IO.d. Failed to stat file: no such > > file or directory > > > > K:\Windows\NtUtil&

Re: Matching subpatterns in any order, conjunctions, negated matches

2020-05-16 Thread Peter Pentchev
> ).lines.grep({/qu/}).grep({/th/}).grep({!/ea/}); > # [Asquith discotheque discotheque's discotheques quoth] Maybe something like this? (note the "!" instead of "?") /^/ G'luck, Peter -- Peter Pentchev r...@ringlet.net r...@debian.org p...@storpool.com P

Re: fill in form

2020-05-16 Thread Peter Pentchev
On Fri, May 15, 2020 at 04:42:44PM -0700, ToddAndMargo via perl6-users wrote: > On 2020-05-15 15:23, Peter Pentchev wrote: > > On Fri, May 15, 2020 at 02:51:10PM -0700, ToddAndMargo via perl6-users > > wrote: > > > On 2020-05-13 14:05, Peter Pentchev wrote: > > >

Re: fill in form

2020-05-15 Thread Peter Pentchev
On Fri, May 15, 2020 at 02:51:10PM -0700, ToddAndMargo via perl6-users wrote: > On 2020-05-13 14:05, Peter Pentchev wrote: > > So... I believe Timo gave you that as an example how to use a grid to > > position the various controls (buttons, text labels, input fields). > >

Re: bash "."?

2020-05-15 Thread Peter Pentchev
s > > > > > > :'(  :'(  :'( > > > I downloaded it from git and the directions did not work Let's start with "you do realize that Config::IniFiles is a Perl 5 module, not a Raku one, right?"... of course, it might be possible to use it through Raku's Inli

Re: sqrt and Buf question

2020-05-14 Thread Peter Pentchev
he third set of numbers is the digits I want. https://rosettacode.org/wiki/Integer_roots > what is the second number (100)? https://rosettacode.org/wiki/Integer_roots > And what is `2 * 100 ** 2000 `? Is that `(2 x 100)^ 2000` > ((2 times 100) to the 2000 power? Point 1: exponentiat

Re: How do I handle Getopt::Long stray entries?

2020-05-14 Thread Peter Pentchev
On Fri, May 15, 2020 at 07:57:47AM +0300, Peter Pentchev wrote: > On Thu, May 14, 2020 at 06:46:17PM -0700, ToddAndMargo via perl6-users wrote: > > On 2020-05-11 21:19, Peter Pentchev wrote: > > > #!/usr/bin/env raku > > > > > > use v6.d; > > &

Re: How do I handle Getopt::Long stray entries?

2020-05-14 Thread Peter Pentchev
On Thu, May 14, 2020 at 06:46:17PM -0700, ToddAndMargo via perl6-users wrote: > On 2020-05-11 21:19, Peter Pentchev wrote: > > #!/usr/bin/env raku > > > > use v6.d; > > > > use Getopt::Long; > > > > sub cmd_install($cmd, Array[Str] :$enablerep

Re: bash "."?

2020-05-14 Thread Peter Pentchev
, they do both say they read .ini-style files. I think that they will both be able to read simple key=value files like the network definition sysconfig ones on RedHat-style systems that you seem to want. Keep in mind that the shell probably interprets a bit more, so some configuration-reading module

Re: fill in form

2020-05-13 Thread Peter Pentchev
t; > >> > >> https://ibb.co/hgKHgW4 > >> > >> I do not see the utility of what I am after. > >> > >> :'( > >> > >> -T > > On 2020-05-13 05:26, Timo Paulssen wrote: > > Is this not anything like what you're

Re: How do I handle Getopt::Long stray entries?

2020-05-11 Thread Peter Pentchev
On Mon, May 11, 2020 at 04:09:32PM -0700, ToddAndMargo via perl6-users wrote: > On 2020-05-11 11:48, Peter Pentchev wrote: > > On Mon, May 11, 2020 at 12:40:05AM -0700, ToddAndMargo via perl6-users > > wrote: > > > On 2020-05-10 23:47, Peter Pentchev wrote: > > >

Re: How do I handle Getopt::Long stray entries?

2020-05-11 Thread Peter Pentchev
On Mon, May 11, 2020 at 12:40:05AM -0700, ToddAndMargo via perl6-users wrote: > On 2020-05-10 23:47, Peter Pentchev wrote: > > On Sun, May 10, 2020 at 06:20:02PM -0700, ToddAndMargo via perl6-users > > wrote: > > > Hi All, > > > > > > https://mod

Re: How do I handle Getopt::Long stray entries?

2020-05-11 Thread Peter Pentchev
else { say 'No length specified'; } The "when" condition within the CATCH block will make it only handle these exceptions; any other errors will be handled (or passed through) in their own way. For more information about exceptions, see the documentation at https://docs.raku.org/lan

Re: endian

2020-01-24 Thread Peter Pentchev
On Fri, Jan 24, 2020 at 02:23:56PM -0800, ToddAndMargo via perl6-users wrote: > On 2020-01-24 13:49, Peter Pentchev wrote: > > On Fri, Jan 24, 2020 at 09:05:36AM -0800, ToddAndMargo via perl6-users > > wrote: > > > On 2020-01-24 01:17, Marcel Timmerman wrote: &g

Re: endian

2020-01-24 Thread Peter Pentchev
e you get the "what looks like big-endian" from - Marcel's point was that Raku's (or Perl's, or Python's, or...) integers and floats do not really look like big-endian, they do not look like little-endian, they are endian-agnostic. I'd bet that underneath moar and nqp do what is nat

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

2020-01-21 Thread Peter Pentchev
nds with a "}" character and contains a series of Raku expressions separated by semicolons. In your case the block only contains a single expression, "$a+$b", which represents the sum of the two arguments to the subroutine - this is *exactly* what Richard meant. If you were trying

Re: Ping JJ: string literals

2020-01-20 Thread Peter Pentchev
It is correct if you're talking about UTF-8, not UTF-16 :) G'luck, Peter -- Peter Pentchev roam@{ringlet.net,debian.org,FreeBSD.org} p...@storpool.com PGP key:http://people.FreeBSD.org/~roam/roam.key.asc Key fingerprint 2EE7 A7A5 17FC 124C F115 C354 651E EFB0 2527 DF13 signature.asc Description: PGP signature

Re: definition confusion of + and +^

2020-01-20 Thread Peter Pentchev
l always have a definite value, it will not be an undefined value. So this means that whatever you have in a variable $foo, you may write +^$foo and you will get an integer. G'luck, Peter -- Peter Pentchev roam@{ringlet.net,debian.org,FreeBSD.org} p...@storpool.com PGP key:http://people.F

Re: more unixish perl6?

2019-09-24 Thread Peter Pentchev
rograms do not need it. > aside: the perl6 error messages comes with escape caracters even if $*ERR > isn't tty. > this is unusual and makes things boring when you capture the error into > an editor or a filter. i don't know if it can be useful in some cases. G'luck, Peter -- Peter Pen

Re: I need help with "lines"

2019-03-15 Thread Peter Pentchev
On Fri, Mar 15, 2019 at 07:52:57AM -0700, Todd Chester via perl6-users wrote: > > > 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 alm

Re: I need help with "lines"

2019-03-15 Thread Peter Pentchev
On Fri, Mar 15, 2019 at 07:58:11AM -0700, Todd Chester via perl6-users wrote: > > > 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 i

Re: I need help with "lines"

2019-03-15 Thread Peter Pentchev
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 not correct. > and

Re: I need help with "lines"

2019-03-15 Thread Peter Pentchev
I know it's a lot :) Take a look at it, see if you can break it down into meaningful parts, see how those parts interplay; if you have any questions, feel free to ask. And, BTW, yes, on my Debian system this showed a process with ID 29673 running for more than 20 days and then a process with ID 23280 running for less than thirty minutes, so, yes, this is what you need, not the largest process ID. ...okay, okay, here goes the very complex line above changed into a somewhat readable program: #!/usr/bin/env perl6 use v6.c; sub pad-elapsed($elapsed) { my @ints = $elapsed.split(/<[-:]>/).map: *.Int; my @padded = (0, 0, 0, |@ints); return @padded[*-4..*]; } sub is-ours($line) { $line ~~ /^ \s* $ = [\d+] \s+ "zsh" \s .* \s+ $ = [ <[- \d :]> + ] $/ ?? (~$/ => pad-elapsed $/) !! Any } my @only-ours = $*IN.lines.map(); my @only-real-ones = @only-ours.grep(*.defined); my @sorted = @only-real-ones.sort(*.value); my $latest-pid = @sorted[0].key; say $latest-pid; 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. -- Peter Pentchev roam@{ringlet.net,debian.org,FreeBSD.org} p...@storpool.com PGP key:http://people.FreeBSD.org/~roam/roam.key.asc Key fingerprint 2EE7 A7A5 17FC 124C F115 C354 651E EFB0 2527 DF13 signature.asc Description: PGP signature

Re: How do I address bytes in a Buf/binary variable?

2018-10-08 Thread Peter Pentchev
On Mon, Oct 08, 2018 at 01:38:54AM -0700, ToddAndMargo via perl6-users wrote: > On 10/8/18 1:34 AM, Peter Pentchev wrote: > > On Mon, Oct 08, 2018 at 01:25:31AM -0700, ToddAndMargo via perl6-users > > wrote: > > > Hi All! > > > > > > Question: I a

Re: How do I address bytes in a Buf/binary variable?

2018-10-08 Thread Peter Pentchev
section "Routines supplied by role Positional", and the other one is that the very first example has a line saying "$b[1] = 42". So you can use a Buf object as an array of whatever it contains. G'luck, Peter -- Peter Pentchev roam@{ringlet.net,debian.org,FreeBSD.org}

Re: routine declaration line question

2018-10-04 Thread Peter Pentchev
gt; > returned. Am I suppose to pick that up from context? > > > > > > -T > > > On 10/3/18 10:02 PM, Brad Gilbert wrote: > > If a routine does not declare it's return type, absolutely anything > > can be returned. > > > > One reason may be that its return value isn't really useful. > > > > It could be that the writer didn't think to declare it. (or didn't want > to) > > > > Another possibility is that the potential returned values are of many > > different types. > > > > --- > > > > Note that any returned value that gets ignored will get sunk. > > (That means the `.sink()` method will get called) > > > > class Baz { > > method sink () { say 'the result of foo() was sunk' } > > } > > sub foo () { > > Baz.new > > } > > > > foo(); # the result of foo() was sunk > > > > So I suppose it is similar to Modula2, except it is up to the writer > > of the class if they shake their finger at you. > > On Wed, Oct 3, 2018 at 10:26 PM ToddAndMargo > > Thank you. The default return is Mu. That I get. > > How do I figure out what data is being returned? Trial and error? You just quoted Brad Gilbert's message. Please reread the part that starts with "If a routine does not declare a return type..." and goes on until "...of many different types." If the routine's documentation does not describe its return value, it probably falls under the "not useful" umbrella. If the documentation does describe it, there you have it. Before continuing on this abstract "how do I tell in general" part, let us know which routines exactly are you wondering right now about. G'luck, Peter -- Peter Pentchev roam@{ringlet.net,debian.org,FreeBSD.org} p...@storpool.com PGP key:http://people.FreeBSD.org/~roam/roam.key.asc Key fingerprint 2EE7 A7A5 17FC 124C F115 C354 651E EFB0 2527 DF13 signature.asc Description: PGP signature

run "...", :out forgetting about the exit code?

2016-02-02 Thread Peter Pentchev
1.1 built on MoarVM version 2016.01 implementing Perl 6.c. My system is Debian testing: Linux straylight 4.3.0-1-amd64 #1 SMP Debian 4.3.3-5 (2016-01-04) x86_64 GNU/Linux Thanks in advance for any clarifications, including "what the *bleep*, just read this line of the documentation alr

Re: run "...", :out forgetting about the exit code?

2016-02-02 Thread Peter Pentchev
On Wed, Feb 03, 2016 at 01:37:18AM +0200, Peter Pentchev wrote: > Hi, > > [roam@straylight ~]$ perl6 -e 'use v6.c; use strict; my $p = run "false"; say > $p.exitcode;'1 > [roam@straylight ~]$ perl6 -e 'use v6.c; use strict; my $p =

Re: run "...", :out forgetting about the exit code?

2016-02-02 Thread Peter Pentchev
On Wed, Feb 03, 2016 at 01:37:18AM +0200, Peter Pentchev wrote: > Hi, > > [roam@straylight ~]$ perl6 -e 'use v6.c; use strict; my $p = run "false"; say > $p.exitcode;'1 > [roam@straylight ~]$ perl6 -e 'use v6.c; use strict; my $p =

Re: run "...", :out forgetting about the exit code?

2016-02-02 Thread Peter Pentchev
On Tue, Feb 02, 2016 at 06:41:12PM -0500, Brandon Allbery wrote: > On Tue, Feb 2, 2016 at 6:37 PM, Peter Pentchev <r...@ringlet.net> wrote: > > > So, uhm, what am I missing? Shouldn't $p.exitcode remain 1 no matter > > whether > > I've invoked run() with or with

Re: Failed to install latest Rakudo

2016-02-02 Thread Peter Pentchev
w, it always left me at the known-good version after an upgrade, it never switched automatically to the just-built one; I've always had to "rakudobrew switch" by hand. It's possible that earlier versions would switch automatically, but the current behavior actually sounds reasonable fro

Re: Nice-to-have class methods

2016-01-27 Thread Peter Pentchev
On Wed, Jan 27, 2016 at 02:14:17PM +, Philip Hazelden wrote: > On Wed, Jan 27, 2016 at 1:43 PM Peter Pentchev <r...@ringlet.net> wrote: > > > On Wed, Jan 27, 2016 at 07:00:11AM -0600, Tom Browder wrote: > > > Given so many handy methods for built-in classes, i

Re: Nice-to-have class methods

2016-01-27 Thread Peter Pentchev
ndeed. So a function that would remove *any* filename extensions, that is, anything after and including the first dot, would produce really weird results if applied to filenames created by such people. G'luck, Peter -- Peter Pentchev r...@ringlet.net r...@freebsd.org p...@storpool.com PGP key: