Re: PostgreSQL: Raku as a "trusted" language?

2024-05-15 Thread William Michels via perl6-users
ersion of Rakudo (which, from what I can > tell, would need to be refactored at the NPQ level, since "trusted" versions > can't, for instance, access the filesystem) > > El mié, 17 abr 2024 a las 21:04, William Michels via perl6-users > (mailto:perl6-us...@perl.org&

Re: need native call help

2024-04-17 Thread William Michels via perl6-users
Hi Todd, Here are a few U StackExchange answers that I wrote using Raku's `unlink`: https://unix.stackexchange.com/questions/459521/how-to-truncate-file-to-maximum-number-of-characters-not-bytes/751267#751267

PostgreSQL: Raku as a "trusted" language?

2024-04-17 Thread William Michels via perl6-users
Hi, Thinking about which database to use with Raku, I started following a question from StackOverflow--here: "list of PostgreSQL trusted languages?" https://dba.stackexchange.com/questions/156631/list-of-postgresql-trusted-languages From that page I learned that there are both "trusted" and

Re: IO::Socket::INET timeout?

2024-01-20 Thread William Michels via perl6-users
Hi Paul, Did you get any resolution on this? I've only found these links: https://docs.raku.org/type/IO/Socket/INET https://stackoverflow.com/questions/72639883/how-to-deal-with-exceptions-in-iosocketinet I imagine a solution is possible using a Supply, but I haven't gotten there yet:

Re: run on regex line?

2024-01-20 Thread William Michels via perl6-users
Just want to elaborate on the two different ways of combining statements mentioned earlier. 1A. If you're using `-pe` command line flags, you use `s///` and combine statements with `;` semicolon: ~$ echo 'roses are red' | raku -pe 's/roses/lilacs/; s/red/blue/' lilacs are blue 1B. Using

Re: run on regex line?

2024-01-20 Thread William Michels via perl6-users
> On Jan 19, 2024, at 23:49, ToddAndMargo via perl6-users > wrote: > > Hi All, > > Can I do a run on line with a regex like I > just did with sed? > > $ zbarimg Screenshot.png | sed -e 's/.*?secret=//' -e 's/&.*//' > > Usually I just do two lines in Raku. > > Many thanks, > -T Hi Todd,

Re: Help with macports port for zef

2023-12-31 Thread William Michels via perl6-users
Hi raf (and Tom), You could try emailing the MacPorts-Users list: > Begin forwarded message: > > From: macports-users-requ...@lists.macports.org > Subject: macports-users Digest, Vol 208, Issue 21 > Date: December 31, 2023 at 04:00:01 PST > To: macports-us...@lists.macports.org > Reply-To:

Re: Test not working so well

2023-12-11 Thread William Michels via perl6-users
> On Dec 11, 2023, at 15:54, ToddAndMargo via perl6-users > wrote: > > On 12/11/23 15:48, William Michels via perl6-users wrote: >>> On Dec 10, 2023, at 23:22, ToddAndMargo via perl6-users >>> wrote: >>> > > Is there a list somewhere of all

Re: Test not working so well

2023-12-11 Thread William Michels via perl6-users
> On Dec 10, 2023, at 23:22, ToddAndMargo via perl6-users > wrote: > > On 12/10/23 22:26, William Michels via perl6-users wrote: > > Hi Bill, > Yes it does help. I am slowly getting there. > > If I do not know the length of the sting and have to ask > with

Re: Stepping down from rakudo packaging for Debian

2023-12-10 Thread William Michels via perl6-users
Thank you for all your hard work, Dominique! Do we have any Debian users on the mailing-list willing to step up? Best Regards, Bill. > On Dec 2, 2023, at 07:01, Dominique Dumont wrote: > > Hello > > After 10 years of maintaining rakudo and it modules for Debian, I've never > really managed

Re: Test not working so well

2023-12-10 Thread William Michels via perl6-users
Inline: > On Dec 10, 2023, at 12:25, ToddAndMargo via perl6-users > wrote: > > On 12/9/23 22:49, William Michels via perl6-users wrote: >> f $x.match( / ^ <+[0..9] + [a..z]> ** 7 $ / ) { do something...}; > > > What is the difference between > >

Re: Test not working so well

2023-12-09 Thread William Michels via perl6-users
> On Dec 9, 2023, at 22:12, ToddAndMargo via perl6-users > wrote: > > On 12/9/23 21:32, ToddAndMargo via perl6-users wrote: >> On 12/9/23 19:42, William Michels via perl6-users wrote: >>> >>>> On 12/9/23 17:44, Tom Browder wrote: >>>> >

Re: Test not working so well

2023-12-09 Thread William Michels via perl6-users
> On 12/9/23 17:44, Tom Browder wrote: > > Try: say so $= > > > > Would you give me a quick example? Hi Todd! In the Raku REPL (MoarVM 2023.05): [0] > my $x="abc2def"; say $x ~~ / ^ ** 7 $ /; 「abc2def」 alnum => 「a」 alnum => 「b」 alnum => 「c」 alnum => 「2」 alnum => 「d」 alnum => 「e」

Re: Raku IO IceDrive bug

2023-11-05 Thread William Michels via perl6-users
Won't adding a `\n` newline to the `spurt()` call eventually cause problems? What happens if you omit the `\n` below? Best, Bill. > On Oct 22, 2023, at 06:02, ToddAndMargo via perl6-users > wrote: > > spurt "$TestFile", "Old File Found\n"; > spurt "$TestFile", "New File Opened\n";

Re: What does `:_` and/or `:_:` signify?

2023-09-26 Thread William Michels via perl6-users
Hi Marton, Thanks for the reply. Below last example (in the REPL), does `dd` not work on Pairs? Or is this Indirect Object Notation at work? [3] > :_ _ => True [4] > dd :_ :_ Nil [5] > dd _ ===SORRY!=== Error while compiling: Undeclared name: _ used at line 1 [5] > dd :_: No such method

What does `:_` and/or `:_:` signify?

2023-09-24 Thread William Michels via perl6-users
Hello, While playing around in an attempt to define new operators, I stumbled upon some curious results. In the REPL, trying `say :_` returns a blank line. In the REPL, trying `say :_:` returns `_ => True`. What is the meaning of this? admin@mbp ~ % raku Welcome to Rakudo™ v2023.05.

Re: Raku regex assert doesn't match

2023-07-31 Thread William Michels via perl6-users
> FYI, the reason I spelled out the character class explicitly rather than > using > "" was because I wanted it strictly applied to ASCII chars and not > everything Unicode considers a char, and this seemed the best way to be > sure. > > -- Darren Duncan > > O

Re: Raku regex assert doesn't match

2023-07-30 Thread William Michels via perl6-users
Hi Darren (and Marcel), Two different approaches: https://docs.raku.org/language/regexes#Conjunction:_&; >From the docs: *"For example if you have a regex quoted that matches a quoted string, then `/ && <-[x]>* /` matches a quoted string that does not contain the character `x`."* Second

Re: Strange behavior with sequence of functions

2023-06-29 Thread William Michels via perl6-users
> On Jun 29, 2023, at 12:21, Sean McAfee wrote: > > I was trying to construct a sequence of functions using the sequence > operator, and encountered some very puzzling behavior. I was able to reduce > it down to some very simple examples. > > [1] > my @s = +*, -> { } ... * > [...] > [2]

Raku's `=finish`takes place of Perl's `__DATA__`

2023-06-19 Thread William Michels via perl6-users
Thank you, Richard! I was looking for the Raku equivalent of Perl's: `__DATA__`. Thanks to you I know now, it is: `=finish` (in/from Raku's POD6 Specification). Best Regards, Bill. PS Now, if we could just get brian d foy to blog about "Stupid `=finish` Tricks" !!

Re: `lines.contains( / \h / )` returning True for input strings not containing horizonal whitespace

2023-01-28 Thread William Michels via perl6-users
lines.map(*.contains(/ \h /)).put;' > False False False > > Thx, Bill. > > On Thu, Jan 26, 2023 at 12:12 PM Sean McAfee wrote: > >> On Thu, Jan 26, 2023 at 12:05 PM William Michels via perl6-users < >> perl6-us...@perl.org> wrote: >> >>> ~$ ra

Re: `lines.contains( / \h / )` returning True for input strings not containing horizonal whitespace

2023-01-26 Thread William Michels via perl6-users
Thanks Sean. Made some progress. I like this result better: ~$ raku -e 'put "1\n2\n3";' | raku -e 'lines.map(*.contains(/ \h /)).put;' False False False Thx, Bill. On Thu, Jan 26, 2023 at 12:12 PM Sean McAfee wrote: > On Thu, Jan 26, 2023 at 12:05 PM William Michels via perl6-us

`lines.contains( / \h / )` returning True for input strings not containing horizonal whitespace

2023-01-26 Thread William Michels via perl6-users
Hi, I'm seeing an issue where I try to write parallel code between `slurp` and `lines`, expecting that when I feed each one-liner a string with vertical whitespace (but not horizontal whitespace), the two methods will be differentiated--since lines autochomps by default. ~$ raku -e 'put

Fwd: $/ not always set after a regex match?

2022-12-31 Thread William Michels via perl6-users
RESENDING: The code examples below should read `` in all cases, not ``, although either works (erroneously?). --- Interested in answering the question: WHICH CODE EXAMPLE IS THE PRETTIEST? Vote for your favorite (or post your own): [#] > #REPL (line numbers altered to

Re: $/ not always set after a regex match?

2022-12-31 Thread William Michels via perl6-users
Interested in answering the question: WHICH CODE EXAMPLE IS THE PRETTIEST? Vote for your favorite (or post your own): [#] > #REPL (line numbers altered to differentiate) Nil [0] > $_ = 'gracefully' gracefully [1a] > put "The root of $_ is $/." if / .+ /; The root of gracefully is graceful.

Re: $/ not always set after a regex match?

2022-12-28 Thread William Michels via perl6-users
Doesn't it have to? At least for the following case? [0] > #REPL Nil [0] > say $/.Str if 9 ~~ /9/; 9 Best regards. --B On Wed, Dec 28, 2022, 09:49 Elizabeth Mattijsen wrote: > That's because it at one time was decided that smart-match would set $/ in > the caller's scope. Which is a pain for

Re: I can't fid my booboo

2022-11-17 Thread William Michels via perl6-users
Gee Todd, I don't know. 167-169: Maybe Raku doesn't like the `(` parens-enclosed signature `)` spread out over three lines? That's my best guess for now. Try those three lines all on one line and tell us how you go. Best Regards, Bill On Thu, Nov 17, 2022 at 7:25 PM ToddAndMargo via

Re: regex: how to I pick out items in the middle?

2022-10-29 Thread William Michels via perl6-users
> >> ===SORRY!=== Error while compiling: > >> Malformed postfix call > >> --> my Str $y="xx"; $y ~~ s/ $([.*⏏-2]) "x"/Q/; print $y ~ > "\n" > >> > >> > >> > >> I am trying to

Re: regex: how to I pick out items in the middle?

2022-10-29 Thread William Michels via perl6-users
In the Raku REPL: $ raku Welcome to Rakudo™ v2022.07. Implementing the Raku® Programming Language v6.d. Built on MoarVM version 2022.07. To exit type 'exit' or '^D' [0] > #beginning Nil [1] > my Str $y="xx"; S/^ x ** 2 /QQ/.say given $y; QQ [1] > #inner Nil [2] > my Str $y="xx"; S/^

Re: folder size

2022-10-24 Thread William Michels via perl6-users
Hi Todd, Thanks for the code! Unfortunately I see this error: Variable '$PathIAm' is not declared. Perhaps you forgot a 'sub' if this was intended to be part of a signature? at -:3 --> [32mmy Str $BatFile = [33m⏏ [31m$PathIAm ~ ".bat"; [0m On Sun, Oct 23, 2022 at 9:56 PM ToddAndMargo

Re: JPEG meta-data timestamps

2022-10-08 Thread William Michels via perl6-users
I looked at this issue recently and found the Perl5 executable "ExifTool": https://unix.stackexchange.com/a/676180/227738 https://exiftool.org/forum/index.php?topic=9224.msg47655#msg47655 https://exiftool.org/forum/index.php?topic=6330.msg31354#msg31354 https://exiftool.org/exiftool_pod.html

Re: steps of a path

2022-09-07 Thread William Michels via perl6-users
Apologies: the first code example in my previous email won't check for a given directory, and will print out bogus paths: ~$ echo "/Users/none/bogus_dir/" | raku -e 'for lines.IO -> $a is copy {$a.Str.say; repeat {$a.=parent andthen $a.Str.say;} until $a eq $*SPEC.rootdir};'

Re: steps of a path

2022-09-07 Thread William Michels via perl6-users
Hi Marc, Does this do what you want? I've omitted the call to `run` and used mostly IO::Path calls instead: ~$ echo "/Users/admin/logs" | raku -e 'for lines.IO -> $a is copy {$a.Str.say; repeat {$a.=parent andthen $a.Str.say;} until $a eq $*SPEC.rootdir;};' #returns: /Users/admin/logs

Re: steps of a path

2022-09-03 Thread William Michels via perl6-users
Hi Marc, There's also this conversation from March 2021 on the mailing list: https://www.nntp.perl.org/group/perl.perl6.users/2021/03/msg9857.html [Matthew's answer looks very interesting]. Anyway, HTH. --Bill. On Sat, Sep 3, 2022 at 2:51 PM Marc Chantreux wrote: > On Sat, Sep 03, 2022 at

Re: steps of a path

2022-09-03 Thread William Michels via perl6-users
Hi Marc (and Bruce)! Okay, I use our old friend `:exhaustive` adverb below: ~$ echo "/var/log/messages" | raku -ne '.say for m:ex/ ^ ["/" <.alpha>+:]**?{1..*} /;' 「/var」 「/var/log」 「/var/log/messages」 If you remove the `?` frugal quant-modifier, the output is the same--except in the reverse

Re: sprintf and print question

2022-09-01 Thread William Michels via perl6-users
Hi Todd, ~$ raku -e '(sprintf "%.4s", "andefghi" ).put;' ande ~$ raku -e 'put (sprintf "%.4s", "andefghi" );' ande If sprintf isn't a requirement, then: ~$ raku -e 'put substr("andefghi", 0..3);' ande HTH, Bill. On Thu, Sep 1, 2022 at 7:37 PM ToddAndMargo via perl6-users <

Re: rotor in comb?

2022-08-27 Thread William Michels via perl6-users
Heads-up: code was correct in my last post, but the output is as follows (Rakudo v2021.06): ~$ raku -e '++(my %digraphs){$_} for slurp.lc.match(:global, :exhaustive, /<[a..z]>**2/); .say for %digraphs.sort(-*.value);' richard3.txt or => 4 rs => 3 ho => 3 se => 3 gd => 1 in => 1 fo => 1 om => 1 do

Re: rotor in comb?

2022-08-27 Thread William Michels via perl6-users
Hi Marc (and Bruce)! I'm adapting a "word frequency" answer posted by Sean McAfee on this list. The key seems to be adding the `:exhaustive` adverb to the `match` call. AFAIK comb will not accept this adverb, so `match will have to do for now: Sample Input (including quotes): “A horse, a horse,

Re: Problems with defining a class

2022-08-23 Thread William Michels via perl6-users
It seems to work okay if I change `num` to `Num`: class A { has Num $!a is required is built; }; dd A.new(a => 0e0); #returns: A.new(a => 0e0) Note, I'm on a fairly old version of Rakudo [moar (2021.06). HTH, Bill. On Tue, Aug 23, 2022 at 6:47 PM Kevin Pye wrote: > > Hi, > >

Re: Confused after consuming hashish

2022-07-06 Thread William Michels via perl6-users
I'm assuming the `%` is the anonymous state variable (associative)? https://docs.raku.org/language/variables#The_%_variable Best guess for now, Bill. On Wed, Jul 6, 2022 at 8:10 PM rir wrote: > > Hi, > Sorry, my previous message got away from me a little to soon. > I'll stand by it without

Re: Is this zef or me: Inconsistent Ecosystem response

2022-06-29 Thread William Michels via perl6-users
Upgraded! Thank you Richard! admin@mbook:~$ ~/rakudo/rakudo-2021.06/zef/bin/zef upgrade Raku::Pod::Render ^[[A===> Searching for: Raku::Pod::Render ===> Updating fez mirror: http://360.zef.pm/ ===> Updating cpan mirror: https://raw.githubusercontent.com/ugexe/Perl6-ecosystems/master/cpan1.json

Re: [sf-perl] The SF Perl Raku Study Group, 06/19 at 1pm PDT

2022-06-21 Thread William Michels via perl6-users
At the last Raku Study Group (Meetup), Joseph brought up an issue he's noticed with Raku's capture markers, `<(`...`)>`. Just noting here (for posterity) that the SO issue below might be an identical--or related--observation:

Re: encode $encoding list ???

2022-06-20 Thread William Michels via perl6-users
On Sun, Jun 19, 2022 at 11:00 PM ToddAndMargo via perl6-users < perl6-us...@perl.org> wrote: > On 6/19/22 21:49, William Michels via perl6-users wrote: > > Hi Todd, I'm trying to follow what you're doing (below in Terminal app > > on MacOS): > > > > ~$ rak

Re: encode $encoding list ???

2022-06-19 Thread William Michels via perl6-users
Hi Todd, I'm trying to follow what you're doing (below in Terminal app on MacOS): ~$ raku Welcome to 퐑퐚퐤퐮퐝퐨™ v2021.06. Implementing the 퐑퐚퐤퐮™ programming language v6.d. Built on MoarVM version 2021.06. To exit type 'exit' or '^D' > print Buf.new(0x84, 0x73, 0x77, 0x84, 0x79).decode("utf8-c8") ~

Re: encode $encoding list ???

2022-06-19 Thread William Michels via perl6-users
" as possible values for > >>> "$encoding". > >>> > >>> I tool a guess and found out "utf16". > >>> > >>> Where are the rest of the values R > >>> > >>> -T > > > > On 6/1

Re: encode $encoding list ???

2022-06-19 Thread William Michels via perl6-users
Hi Todd, It's great that you've delved into the "encode" docs. However to answer your question, I think you want to look at the "encoding" routine page: https://docs.raku.org/routine/encoding#class_IO::Handle Here's the list on that page: utf8 utf16 utf16le utf16be utf8-c8 iso-8859-1

Re: trouble returning a value from sub

2022-06-16 Thread William Michels via perl6-users
Hi Rick (and Simon)! If I change the final (and only) call to `last`, and make it a call to `exit` instead, the `Nil` disappears. Helpful? Best Regards, Bill. On Thu, Jun 16, 2022 at 11:07 AM Simon Proctor wrote: > > I think, and I don't have my computer to hand to double check but I think

Re: checking MAIN arguments

2022-04-14 Thread William Michels via perl6-users
Works (퐑퐚퐤퐮퐝퐨™ v2021.06): admin@mbook:~$ raku Luca_Ferrari2.p6 Usage: Luca_Ferrari2.p6 [--dir=] admin@mbook:~$ raku Luca_Ferrari2.p6 --dir=foo foo But...warning "Specify the directory [$dir]" isn't printing when `--dir=foo` is omitted. HTH, Bill. On Tue, Apr 12, 2022 at 1:23 AM Luca Ferrari

Re: checking MAIN arguments

2022-04-14 Thread William Michels via perl6-users
Fails on 퐑퐚퐤퐮퐝퐨™ v2021.06. ~$ raku Luca_Ferrari.p6 Use of uninitialized value of type Any in string context. Methods .^name, .raku, .gist, or .say can be used to stringify it to something meaningful. in block at Luca_Ferrari.p6 line 1 Specify the directory [] in block at Luca_Ferrari.p6

Re: Help with promises, supplies and channels.

2022-04-08 Thread William Michels via perl6-users
nnel $ch .= new; > >> my Supply $p1 .= interval(1); > >> my ($senders, $receivers) = (2000,2); > >> my Int $count = 0; > >> my @sends = (1..$senders).map: { > >> start react { > >> whenever $p1 -> $interval { > >> $ch.send($_); > >>

Re: Help with promises, supplies and channels.

2022-04-05 Thread William Michels via perl6-users
Thanks for the bash loop. I'm seeing a few hangs, also some errors returned saying: "Unhandled exception in code scheduled on thread 4" (MacOS 11.11) On Tue, Apr 5, 2022 at 12:47 PM David Emanuel da Costa Santiago < deman...@gmail.com> wrote: > > Hi William, > > when it fails or hangs it

Re: Help with promises, supplies and channels.

2022-04-05 Thread William Michels via perl6-users
No problems so far. say $*VM; #add as last line, returns: moar (2021.06) On Tue, Apr 5, 2022 at 11:06 AM David Emanuel da Costa Santiago < deman...@gmail.com> wrote: > Hi, > > > > I'm trying to learn about promises, supplies and channels. So i made > this code: > > """ > > my $p1 =

Fosdem 2022 Videos published!

2022-02-07 Thread William Michels via perl6-users
Ten talks, online! https://fosdem.org/2022/schedule/track/raku/

Re: Removing ' characters

2022-01-10 Thread William Michels via perl6-users
Hi Richard, In a script: my $s = '\'\''; $s.subst( / "'" ~ "'" (.+) /, {$0}).put; put s/ \< .+ \/ \> /$// given $s; put s/ \' <( .+ )> \' /$// given $s; #all three return: HTH, Bill. On Mon, Jan 10, 2022 at 8:46 AM Simon Proctor wrote: > > Within the regex the ' character is just another

Re: Grammar Help

2021-12-26 Thread William Michels via perl6-users
Hi Paul, Quick check yesterday you have a stray "l" character between two code blocks: method objectKey($/) { make $.made; }l # <-- WHAT'S THIS? method pairlist($/) { make $>>.made.flat; } I defer to Brad and Simon, otherwise. Best, Bill.

Re: div & mod don't coerce arguments to Int?

2021-12-18 Thread William Michels via perl6-users
Does `mod` depend on `div`? I'm guessing that's what's going on. From Wikipedia's "Modulo operation" entry: "Although typically performed with a and n both being integers, many computing systems now allow other types of numeric operands." https://en.wikipedia.org/wiki/Modulo_operation Best,

Re: Date.new("2024-02-29").later( :1year)

2021-12-13 Thread William Michels via perl6-users
Anything here? https://www.iso.org/standard/70907.html https://www.iso.org/standard/70908.html https://www.iso.org/news/ref2379.html https://www.iso.org/news/2017/02/Ref2164.html Or here? https://www.cl.cam.ac.uk/~mgk25/iso-time.html

Re: hope we have the distributed computing perl6

2021-11-29 Thread William Michels via perl6-users
Hello Yonghua! I tried the link you sent but it did not work. Is this the paper you're referring to? "Efficiency Considerations of PERL and Python in Distributed Processing" Authors: Roger Eggen (presenter), Maurice Eggen https://www.unf.edu/~ree/PDP2170.pdf Best Regards, Bill. On Mon, Nov

Re: hope we have the distributed computing perl6

2021-11-29 Thread William Michels via perl6-users
Hi Piper, RE: https://github.com/perl-spark Thank you for the reply. There seems to be two issues here: 1) 'What is going on with Perl-Spark?' and 2). 'Can we make an effort to produce Raku-Spark?'. Below I only address the former question. The "perl-spark" Github project appears to contain 13

Re: hope we have the distributed computing perl6

2021-11-28 Thread William Michels via perl6-users
Hi Piper! Have you used SparkR (R on Spark)? https://spark.apache.org/docs/latest/sparkr.html I'm encouraged by the data-type mapping between R and Spark. It suggests to me that with a reasonable Spark API, mapping data types between Raku and Spark should be straightforward:

Re: can't make from a S/// ?

2021-11-21 Thread William Michels via perl6-users
Dear Marc, We may have version-specific issues, but I can't be certain at the moment because you changed the first two lines of your Grammar. #old: rule TOP {* %% \n } token line { * %% ',' } #new: rule TOP {* } token line { * %% ',' \n } If I change back to the #old lines

Re: can't make from a S/// ?

2021-11-20 Thread William Michels via perl6-users
> > Marc wrote: > i'm inclined to think that this is easier to read: > method col:sym ($/) { .make ~S:g/'""'/"/ } > That's not working for me. I'm on Moar (2021.06). This Is what I get back (first error below, note the "grammar CSV" line is the first line of the script, and method col:sym is on

Re: can't make from a S/// ?

2021-11-19 Thread William Michels via perl6-users
Hi Marc, The following line seems to work just fine, with-or-without the call to .Str at the end: method col:sym ($/) { make $/.subst(/'""'/, '"', :global).Str } #Gives the 12 element result below (in the context of your entire, previously-posted Grammar): .raku.say for CSV.parse(

Re: junctions with given/when

2021-11-04 Thread William Michels via perl6-users
I see the same as Joseph: $ raku Welcome to 퐑퐚퐤퐮퐝퐨™ v2021.06. Implementing the 퐑퐚퐤퐮™ programming language v6.d. Built on MoarVM version 2021.06. To exit type 'exit' or '^D' > say do given all(3,7) { when Int { "both are Int" }; default {"not similar"} }; not similar > say so do all(3,7) ~~ Int;

Re: how do I turn a real into and array of Integers?

2021-11-01 Thread William Michels via perl6-users
d: > > $ raku -e "say sqrt(2).comb(/\d/).join(', ');" > 1, 4, 1, 4, 2, 1, 3, 5, 6, 2, 3, 7, 3, 0, 9, 5, 1 > > If you want only the first 10 digits, then: > > $ raku -e "say sqrt(2).comb(/\d/)[^10].join(', ');" > 1, 4, 1, 4, 2, 1, 3, 5, 6, 2

Re: how do I turn a real into and array of Integers?

2021-11-01 Thread William Michels via perl6-users
You did great for not knowing Raku! ~$ raku -e "say sqrt(2).split(/\.|''/);" ( 1 4 1 4 2 1 3 5 6 2 3 7 3 0 9 5 1 ) ~$ raku -e "say sqrt(2).split(/\.|''/).raku;" ("", "1", "", "4", "1", "4", "2", "1", "3", "5", "6", "2", "3", "7", "3", "0", "9", "5", "1", "").Seq ~$ raku -e "say

Re: Rakudo-Star 2021.09 (Windows MSI and Linux RSTAR) packages

2021-09-22 Thread William Michels via perl6-users
Thank you, Anton! On Wed, Sep 22, 2021 at 11:57 AM wrote: > > Hi all. > > Who ever is interested in a Rakudo-Star "latest" Windows MSI or Linux RSTAR > package... you may want to get 2021.09 from here [1]. > Please be aware that the Linux RSTAR package changed a bit compared to its >

Re: [better solution] pairs of separators from a string

2021-09-20 Thread William Michels via perl6-users
;>> >>> CAUTION - EXTERNAL: >>> >>> Hi Bill, >>> >>> When building a range that's an arithmetic or geometric progression, the >>> sequence operator is a little quicker to type. And thus also more likely to >>> be understood mor

Re: Font used for raku welcome message

2021-08-28 Thread William Michels via perl6-users
Hello Norman! Just to clarify, these were the fonts that you had success with? https://savannah.gnu.org/projects/freefont/ FWIW, the (.otf) FreeMono -- Regular font works fine on my MacOS system (Terminal.app), with the words 퐑퐚퐤퐮퐝퐨™ and 퐑퐚퐤퐮™ appropriately showing up in Bold. Best, Bill. On

Re: [better solution] pairs of separators from a string

2021-08-25 Thread William Michels via perl6-users
e for "grep" > > Ranges also support arbitrary functions, the doc page shows a Fibonacci > number generator > https://docs.raku.org/language/operators#index-entry-sequence_operator > "This allows you to write > > say 1, 1, * + * ...^ *>= 100; > # OUTPUT: «(1 1 2 3

Re: [better solution] pairs of separators from a string

2021-08-24 Thread William Michels via perl6-users
Hi Marc, My understanding is that ranges are pretty cheap to construct, and in any case, the range @x[0..*-1] is just the index of all elements in @x. The .grep() approach may be most useful if you have a function (e.g. %, %%, and .is-prime shown below): > (0...9) (0 1 2 3 4 5 6 7 8 9) >

Re: pairs of separators from a string

2021-08-22 Thread William Michels via perl6-users
Hi Marc! Is it just even/odd elements that you want to separate out? If so, maybe .grep() is your friend here: > my $string0 = q!""''(){}[]! ""''(){}[] > $string0.comb[(0..*-1).grep(* %% 2)].say; (" ' ( { [) > $string0.comb[(0..*-1).grep(* % 2)].say; (" ' ) } ]) It sounds like you have some

Re: pairs of separators from a string

2021-08-22 Thread William Michels via perl6-users
Hi Marc (and yary)! I'll give this a shot, focusing on bracket pairs. It's not clear from your question whether there's any inherent order to the bracket characters in your string, or whether-or-not some might be nested within each other. You show a lone ampersand ("&") at the beginning of your

Fwd: Day 3 starts soon!

2021-08-08 Thread William Michels via perl6-users
-- Forwarded message - From: Raku Conference Date: Sun, Aug 8, 2021 at 7:31 AM Subject: Day 3 starts soon! To: TRC attendees OK, we are about to start the third day of the conference. It begins in half an hour. Here are the links to join: Zoom:

Fwd: Day 2 links

2021-08-07 Thread William Michels via perl6-users
-- Forwarded message - From: Raku Conference Date: Sat, Aug 7, 2021 at 7:02 AM Subject: Day 2 links To: TRC attendees Dear attendees of the Raku Conference, We are about to start Day 2! It starts in about one hour. Zoom platform link:

Fwd: Day 1 begins soon

2021-08-07 Thread William Michels via perl6-users
-- Forwarded message - From: Raku Conference Date: Fri, Aug 6, 2021 at 7:08 AM Subject: Day 1 begins soon To: TRC attendees Dear attendees of the First Raku Conference! Day 1 begins in about an hour. You can join the event using the following links: Zoom:

Re: REPL / Linenoise question (backslashes)

2021-07-21 Thread William Michels via perl6-users
oject.org/ https://github.com/jalvesaq/R-Vim-runtime On Tue, Jul 20, 2021 at 3:21 AM Brian Duggan wrote: > > On Monday, July 19, William Michels via perl6-users wrote: > > I don't see how the Raku REPL knows how to cycle from taking input at its > > prompt and moving to the read

Re: Why does .new initialize?

2021-07-20 Thread William Michels via perl6-users
Possibly relevant StackOverflow question: "Why does constraining a Perl 6 named parameter to a definite value make it a required value?" https://stackoverflow.com/questions/48166325/why-does-constraining-a-perl-6-named-parameter-to-a-definite-value-make-it-a-req On Mon, Jul 19, 2021 at 10:00 AM

Re: REPL / Linenoise question (backslashes)

2021-07-19 Thread William Michels via perl6-users
m /usr/bin/irb:12:in `' irb(main):008:0> exit HTH, Bill. On Sat, Jul 17, 2021 at 6:46 PM rir wrote: > On Wed, Jul 14, 2021 at 08:40:07AM -0700, William Michels via perl6-users > wrote: > > > > \ > > {} > > > \\ > > {} > > > \\\ > >

Re: XML module question?

2021-07-17 Thread William Michels via perl6-users
someone to > contribute. > > -- > Hope this helps, > Bruce Gray (Util of PerlMonks) > > > On Jul 16, 2021, at 2:53 PM, David Warring > wrote: > > > > The XML::Writer module side-steps any ordering issues by directly > serializing data structures to xml: > >

XML module question?

2021-07-15 Thread William Michels via perl6-users
Hi, I'm trying to put an answer together for SO, and I keep running into the same difficulty. Given a CSV file, how can one produce an XML file with latitude and longitude values properly quoted? Every time I get proper quoting, "lat" and "lon" are scrambled (i.e. sometimes "lat" first, sometimes

Re: [naive] hash assingment

2021-07-14 Thread William Michels via perl6-users
Hi Aureliano! Backing up a bit (and since you're favoring an array data structure), we had a discussion on StackOverflow regarding implementing R's concept of "named vectors" in Raku. See: "Is there a convenient way to replicate R's concept of 'named vectors' in Raku, possibly using Mixins?"

REPL / Linenoise question (backslashes)

2021-07-14 Thread William Michels via perl6-users
Hi, I've recently updated my Rakudo installation, and I wanted to test multi-line input in the REPL. By mistake I entered a backslash at the REPL command line: user@mbook:$ raku Welcome to 퐑퐚퐤퐮퐝퐨™ v2021.06. Implementing the 퐑퐚퐤퐮™ programming language v6.d. Built on MoarVM version 2021.06. To

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

2021-06-02 Thread William Michels via perl6-users
Hi Ralph, Both prefix/postfix 'when' look okay on my Rakudo_2020.10 install: user@mbook:~$ raku Welcome to 퐑퐚퐤퐮퐝퐨™ v2020.10. Implementing the 퐑퐚퐤퐮™ programming language v6.d. Built on MoarVM version 2020.10. To exit type 'exit' or '^D' > when 3 { say 'prefix when' } False > { say 'postfix when'

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

2021-06-01 Thread William Michels via perl6-users
Hi Bruce, This is what I see with Rakudo 2020.10 (all code below performs delightfully as expected): user@mbook:~$ raku Welcome to 퐑퐚퐤퐮퐝퐨™ v2020.10. Implementing the 퐑퐚퐤퐮™ programming language v6.d. Built on MoarVM version 2020.10. To exit type 'exit' or '^D' > ? (any(4,3) ~~ 3) True > ? (3 ~~

Re: File::Find using a junction with exclude

2021-05-25 Thread William Michels via perl6-users
Well spotted, Gianni! user@mbook:~$ raku -e 'my int $x = 2⁶³-1;say ++$x;' -9223372036854775808 user@mbook:~$ raku --version Welcome to 퐑퐚퐤퐮퐝퐨™ v2020.10. Implementing the 퐑퐚퐤퐮™ programming language v6.d. Built on MoarVM version 2020.10. On Tue, May 25, 2021 at 8:38 AM Gianni Ceccarelli wrote:

Re: File::Find using a junction with exclude

2021-05-24 Thread William Michels via perl6-users
Hi Andy, A quick test with my (older) Raku install and I was able to get one of the examples (Daniel's) below to work. However I had to use "Int" instead of "int": user@mbook:~$ raku Welcome to 퐑퐚퐤퐮퐝퐨™ v2020.10. Implementing the 퐑퐚퐤퐮™ programming language v6.d. Built on MoarVM version 2020.10.

Re: File::Find using a junction with exclude

2021-05-24 Thread William Michels via perl6-users
Apologies, that should be spelled "intriguing". --B. On Mon, May 24, 2021 at 12:41 PM William Michels wrote: > WATs are everywhere, and (I'm not trying to pick on one language > here), I find this SO question to be intruiging: > > https://stackoverflow.com/q/58340585/7270649 > > Joseph (and

Re: File::Find using a junction with exclude

2021-05-24 Thread William Michels via perl6-users
WATs are everywhere, and (I'm not trying to pick on one language here), I find this SO question to be intruiging: https://stackoverflow.com/q/58340585/7270649 Joseph (and Ralph): thanks for starting off this conversation! Fernando and Vadim: amazed at your code! Andy: good questions always

Re: File::Find using a junction with exclude

2021-05-24 Thread William Michels via perl6-users
But .EVAL is evil, right? --B. On Sun, May 23, 2021 at 9:38 PM Daniel Sockwell wrote: > > > For example, you can't get a count of the number of elements in a junction > > Well, if you're willing to stoop to ugly enough hacks, there's _always_ a > way :D > > any('a',

Re: File::Find using a junction with exclude

2021-05-21 Thread William Michels via perl6-users
I tried this--from your original file, not your most recent attempt--and couldn't get it to work. If you look below, "mothera" never gets excluded, except the last test (Exclude4), which is the control case (single regex, no any junction): my @exclude1 = ( rx/<|w>mothera$/, rx/<|w>camel$/ ); my

Correct enum incantation?

2021-05-05 Thread William Michels via perl6-users
Hello, I've been reading over an interesting Answer on StackOverflow by wamba: https://stackoverflow.com/a/67324175/7270649 I started trying to explore enums on my own and quickly realized that method calls on enums are different from simple key/value pairs. For enums, calling a `.key` or

Re: gather take eager syntax

2021-04-20 Thread William Michels via perl6-users
I can get this to work (in the Raku REPL): > my %h = gather { take("foo" => 1).eager} {foo => 1} > If I imagine that ":eager" is an adverb modifying take(), it fails: > my %h = gather { take(:eager) "foo" => 1} ===SORRY!=== Error while compiling: Two terms in a row --> my %h = gather {

Re: Working with a regex using positional captures stored in a variable

2021-03-20 Thread William Michels via perl6-users
Hi Yary, I ran your Raku code in a script (on MacOS) and in the REPL (MacOS with Linenoise). All results below with Rakudo_2020.10: #Script: my $word = /(\w+)/; my $AwithB = /$word' with '$word/; $_= 'Interpolating regexes with arbitrary captures is fun!'; say "Nested rx"; dd m/$AwithB.*'is

Re: Working with a regex using positional captures stored in a variable

2021-03-17 Thread William Michels via perl6-users
Dear Brad, 1. The list you posted is fantastic ("If the first character inside is anything other than an alpha it doesn't capture"). It should be added to the Raku Docs ASAP. 2. There are some shortcuts that don't seem to follow a set pattern. For example a named capture can be accessed using $

Re: Please create a Raku community channel

2021-03-15 Thread William Michels via perl6-users
Hello Richard (and all), The simplest solution seems to be reviving the historical mailing-lists pertaining to the Perl6 effort, in particular, the "perl6-announce" mailing list at perl6-annou...@perl.org . Daniel Sockwell wrote as much in his recent email. New subscribers can sign up at

Re: Newsgroups

2021-03-12 Thread William Michels via perl6-users
I think the priority should be keeping the community together and gradually migrating to a more appropriately-named list, possibly running dual lists for a while make sure we don't lose anyone in the transition. Best Regards, Bill. W. Michels, Ph.D. On Mon, Mar 8, 2021 at 12:36 PM Will Coleda

"rule" declarator: Different results for 'unadorned' match vs unnamed/named captures? (in re Grammars...).

2021-03-11 Thread William Michels via perl6-users
Hello, I've been chatting with raiph on SO regarding Grammar "tokens" vs "rules". The OP is here https://stackoverflow.com/q/62051742 and our discussion is here https://stackoverflow.com/a/62053666 . I think there's something going on with the examples below, as I'm seeing different results when

Re: Newsgroups

2021-03-04 Thread William Michels via perl6-users
Hi David, I see the archives are current: https://www.nntp.perl.org/group/perl.perl6.users/ Do you perhaps mean an RSS feed? I'll copy Ask Bjørn Hansen on this email to see what he says. Best Regards, Bill. On Thu, Mar 4, 2021 at 12:38 AM David Emanuel da Costa Santiago wrote: > > > Hi! > >

Re: Tip: Failed to mkdir: Permission denied with RakudoPkgFedora33-2020.12.04.x86_64.rpm

2021-02-14 Thread William Michels via perl6-users
'chmod 777' not 'chmod 755' ? What are the security implications? Thx, Bill. https://linuxhandbook.com/chmod-command/ On Sat, Feb 13, 2021 at 1:53 PM ToddAndMargo via perl6-users < perl6-us...@perl.org> wrote: > On 2/13/21 12:35 PM, ToddAndMargo via perl6-users wrote: > > Hi All, > > > >

  1   2   3   >