Re: Rakudo Star v2020.01

2020-03-03 Thread Patrick Spek via perl6-users
On Tue, 3 Mar 2020 16:41:47 -0500
Parrot Raiser <1parr...@gmail.com> wrote:

> I've managed to download 2020.01, and run it with an explicit path,
> but the directory structure that my script used to follow, is broken
> in some way.  (I'll investigate further, to see if I can spot the
> change, but a required directory tree might help me find it, if you
> could provide one.)
> 
> A fair number of references to "perl6" remain in the directories. How
> many references have to be untangled before it is consistently
> "rakudo"?

I have no plans currently to go through the existing infrastructure and
rename things. I'm not intimately familiar with the code in Rakudo
Star, and prefer to not touch what isn't broken. If references are
found and can be easily fixed, I'll gladly look into it, though. Of
course, patches to help out are much appreciated as well!

Also, please note that the language is called Raku, the compiler is
Rakudo.

-- 
With kind regards,

Patrick Spek


www:  https://www.tyil.nl/
mail: p.s...@tyil.nl
pgp:  1660 F6A2 DFA7 5347 322A  4DC0 7A6A C285 E2D9 8827

social: https://soc.fglt.nl/tyil
git:https://gitlab.com/tyil/


pgpOu8raJCR88.pgp
Description: OpenPGP digital signature


Rakudo Star v2020.01

2020-02-19 Thread Patrick Spek via perl6-users
Hi everyone!

Just now I've sent an announcement to perl6-compil...@perl.org, to
notify people that I've made a first non-rc release of Rakudo Star. For
those of you that use Rakudo Star, this may be a good time to try out
the latest version! The files are available from https://dist.tyil.nl:

- https://dist.tyil.nl/raku/rakudo-star/rakudo-star-2020.01.tar.gz
- https://dist.tyil.nl/raku/rakudo-star/rakudo-star-2020.01.tar.gz.asc
- https://dist.tyil.nl/raku/rakudo-star/rakudo-star-2020.01.tar.gz.checksums.txt

I've not had many people to test things, but the rakudo spectest
succeeds on all my machines, and I've been using it on my own machines
for a couple weeks now, so I have no reason not to believe this release
will work.

Do note, however, that I only use, and therefore test, on GNU+Linux.
This release does *not* contain a .msi (for Windows users) or a .dmg
(for Mac users). If anyone would like to help out by building those
files, please do not hesitate to reach out!

If you have any questions on how to install this (on GNU+Linux or
otherwise), please reply to the mailing list and I (or other people,
especially for Windows and Mac users) will do my (or our) best to help
you out.

Any feedback on how to best communicate these releases is also very
much appreciated.

Lastly, I do not have access to the sources of https://rakudo.org/ (as
far as I'm aware), and can therefore not update that website to mirror
the release files, nor update its documentation. If anyone knows who to
contact for this, please let me know.

-- 
With kind regards,

Patrick Spek


www:  https://www.tyil.nl/
mail: p.s...@tyil.nl
pgp:  1660 F6A2 DFA7 5347 322A  4DC0 7A6A C285 E2D9 8827

social: https://soc.fglt.nl/tyil
git:https://gitlab.com/tyil/


pgpmsAAanik24.pgp
Description: OpenPGP digital signature


Fw: [perl-foundation-outreach] Applications open tomorrow

2020-01-13 Thread Patrick Spek via perl6-users
Anyone with ideas for the Google Summer of Code, please share them! If
you don't have a GitHub account (or don't want to do the effort of
getting a PR merged), you can share them on the ML or in private mail,
and I'll do my best to get them on the GitHub repository.

Begin forwarded message:

On Mon, 13 Jan 2020 00:39:11 -0800 (PST)
JJ Merelo  wrote:

> So we really need to get this going.
> 
> You can send ideas via pull request 
> https://github.com/perl-foundation-outreach/gsoc-2020-ideas or
> discuss them in issues, same as last year. We need at least 10-15
> different project ideas students can engage with.
> 
> JJ

-- 
With kind regards,

Patrick Spek


www:  https://www.tyil.nl/
mail: p.s...@tyil.nl
pgp:  1660 F6A2 DFA7 5347 322A  4DC0 7A6A C285 E2D9 8827

social: https://soc.fglt.nl/tyil
git:https://gitlab.com/tyil/


pgpngfFz5KzsF.pgp
Description: OpenPGP digital signature


Re: rakudo.org outdated?

2020-01-13 Thread Patrick Spek via perl6-users
On Sun, 12 Jan 2020 13:59:43 -0800
yary  wrote:

> I downloaded the Rakudo Star 2019.11-rc1 source installer from
> https://dist.tyil.nl/raku/rakudo-star/ and built it on OS X 10.15.2
> "Catalina", rakudo-test complains about Native Call, and also that a
> couple TODO's pass
> 
> *Test Summary Report*
> t/04-nativecall/20-concurrent.t   (Wstat:
> 65280 Tests: 0 Failed: 0)
>   Non-zero exit status: 255
>   Parse errors: Bad plan.  You planned 3 tests but ran 0.
> t/09-moar/Line_Break__LineBreak.t (Wstat:
> 0 Tests: 2 Failed: 0)
>   TODO passed:   2
> t/09-moar/General_Category__extracted-DerivedGeneralCategory.t
> (Wstat: 0 Tests: 1 Failed: 0)
>   TODO passed:   1
> Files=103, Tests=1773, 84 wallclock secs ( 0.56 usr  0.22 sys +
> 247.48 cusr 24.06 csys = 272.32 CPU)
> Result: FAIL
> make[1]: *** [m-coretest5] Error 1
> make: *** [rakudo-test] Error 2
> 
> still "make install" got me a Raku that's good enough for me to keep
> tinkering with
> 
> -y

Thanks Yary!

I'm glad it works for you without too much troubles. I'm unsure what
exactly goes wrong with the NativeCall stuff, nor what might be
affected by it.

Perhaps a Raku core dev can tell us more about this?

-- 
With kind regards,

Patrick Spek


www:  https://www.tyil.nl/
mail: p.s...@tyil.nl
pgp:  1660 F6A2 DFA7 5347 322A  4DC0 7A6A C285 E2D9 8827

social: https://soc.fglt.nl/tyil
git:https://gitlab.com/tyil/


pgplwO6Hw5uid.pgp
Description: OpenPGP digital signature


Re: rakudo.org outdated?

2020-01-09 Thread Patrick Spek via perl6-users
On Mon, 6 Jan 2020 11:38:01 -0800
Darren Duncan  wrote:

> On 2020-01-06 1:18 a.m., Patrick Spek via perl6-users wrote:
> > On Sun, 5 Jan 2020 18:27:01 -0800 Darren Duncan wrote:
> >   
> >> The normal Rakudo Star releases so far are compiled, [...]  
> > 
> > For Mac and Windows, perhaps, but the release is similar as it
> > always was for GNU+Linux. And I'm mostly aiming for that since
> > that's what I use (and also what I can test). Hence, I need people
> > to verify they can make binaries for Windows and Mac (and actually
> > do it as well) before I can continue.
> >   
> >> If your version requires users to run a Makefile or make or cc or
> >> whatever or have a working C compiler, then it is a source release
> >> and not the same thing.  
> > 
> > I never intended to make a "binary" release. I intended to make a
> > Rakudo Star release, and I personally don't care if that'd be a
> > binary or source. In the case of GNU+Linux, it's a source release.  
> 
> As long as we know what to expect.  So it sounds like you're just
> making a single source release of Rakudo Star that users of any
> operating system would compile themselves, and not separate
> Linux/Mac/Win versions as had been the case before.  In that case, I
> can do basic build testing on MacOS for you.  I would just try
> following the same instructions as Linux users more or less. --
> Darren Duncan

Any additional testing is very much appreciated! I'd like to have
someone that can generate a .dmg as well if possible, though, so we can
continue to deliver some form of binary variant for mac users.

-- 
With kind regards,

Patrick Spek


www:  https://www.tyil.nl/
mail: p.s...@tyil.nl
pgp:  1660 F6A2 DFA7 5347 322A  4DC0 7A6A C285 E2D9 8827

social: https://soc.fglt.nl/tyil
git:https://gitlab.com/tyil/


pgpLHdLUvY0gc.pgp
Description: OpenPGP digital signature


Re: How to process command line options

2020-01-06 Thread Patrick Spek via perl6-users
On Sun, 5 Jan 2020 22:32:02 +
David Santiago  wrote:

> Hello.
> 
> I'm following
> https://docs.raku.org/language/5to6-nutshell#Getopt::Long but i still
> haven't figured it out how do i use a constraint in a named parameter
> when processing a command line.
> 
> I have this piece of code:
> 
> multi sub MAIN("apt",
> :$layout where $layout ~~
> /^<[12345]>\+[kk|1]$|^6\+$|^[studio|unusual]$/ #= Apartment layout.
> Values accepted: 1+kk,2+kk,...,5+kk, 6+, studio, unusual
> ) {
> say "Enter";
> }
> 
> however when i run it i get the --help message:
> 
> $ raku script.raku apt --layout '1+kk'
> Usage:
>   script.raku [--layout=] apartment
> 
>   --layout=Apartment layout. Values accepted:
> 1+kk,2+kk,...,5+kk, 6+, studio, unusual
> 
> 
> If i make layout a positional parameter then it works correctly. Is
> there a way to make this work with a named parameter?
> And how do i make possible to use the "--layout" option several times?
> Changing the parameter from $layout to @layout doesn't work.
> 
> 
> 
> Best regards,
> David Santiago

Hi David,

The default parameter handling of Raku requires you to use an "=" sign
between the option name and value. Additionally, the option needs to be
before any positional arguments. Try running it as follows:

raku script.raku --layout='1+kk' apt

As for the ability to add it several times, I believe using an @ sigil
instead of a $ sigil should work, but perhaps someone else has spotted
an issue that I missed here.

-- 
With kind regards,

Patrick Spek


www:  https://www.tyil.nl/
mail: p.s...@tyil.nl
pgp:  1660 F6A2 DFA7 5347 322A  4DC0 7A6A C285 E2D9 8827

social: https://soc.fglt.nl/tyil
git:https://gitlab.com/tyil/


pgpLtA2Fn_OvR.pgp
Description: OpenPGP digital signature


Re: rakudo.org outdated?

2020-01-06 Thread Patrick Spek via perl6-users
On Sun, 5 Jan 2020 18:27:01 -0800
Darren Duncan  wrote:

> The normal Rakudo Star releases so far are compiled, [...]

For Mac and Windows, perhaps, but the release is similar as it always
was for GNU+Linux. And I'm mostly aiming for that since that's what I
use (and also what I can test). Hence, I need people to verify they can
make binaries for Windows and Mac (and actually do it as well) before I
can continue.

> If your version requires users to run a Makefile or make or cc or
> whatever or have a working C compiler, then it is a source release
> and not the same thing.

I never intended to make a "binary" release. I intended to make a
Rakudo Star release, and I personally don't care if that'd be a binary
or source. In the case of GNU+Linux, it's a source release.

-- 
With kind regards,

Patrick Spek


www:  https://www.tyil.nl/
mail: p.s...@tyil.nl
pgp:  1660 F6A2 DFA7 5347 322A  4DC0 7A6A C285 E2D9 8827

social: https://soc.fglt.nl/tyil
git:https://gitlab.com/tyil/


pgp3rzWwzHAye.pgp
Description: OpenPGP digital signature


Re: rakudo.org outdated?

2020-01-05 Thread Patrick Spek via perl6-users
On Sat, 4 Jan 2020 22:23:30 -0800
Darren Duncan  wrote:

> Last I recall, there was no Mac installer for Rakudo Star at all, nor
> was there any need for one.  The compiled project is simply in a zip
> file which the end-uaer unzips and then the resulting folder is ready
> to use as is.  Don't know about Windows.  If anything, on the Mac,
> having an installer has always been a misfeature, and most
> applications don't have one. -- Darren Duncan

Looking at the archives on rakudo.org[1], there are .dmg files, which
are packages for Mac I believe. Though, I'm not using a Mac, so please
tell me if these are just Mac specific archives to be unzipped.

The tarball I've created requires compilation in addition to just
"unzipping", though. I'm not sure if that's a problem for regular Mac
users. If it's not, I guess the Mac part is not an obstacle for getting
a release out.

[1]: https://rakudo.org/files/star

-- 
With kind regards,

Patrick Spek


www:  https://www.tyil.nl/
mail: p.s...@tyil.nl
pgp:  1660 F6A2 DFA7 5347 322A  4DC0 7A6A C285 E2D9 8827

social: https://soc.fglt.nl/tyil
git:https://gitlab.com/tyil/


pgpC8_dRQ7VG9.pgp
Description: OpenPGP digital signature


Re: rakudo.org outdated?

2020-01-04 Thread Patrick Spek via perl6-users
On Sat, 4 Jan 2020 15:43:37 -0800
Darren Duncan  wrote:

> Isn't there typically automated test suites that can prove in a few
> minutes that Rakudo works on a particular platform?  Would running
> this typically be good enough to show that nothing broke in an
> update? -- Darren Duncan

I wrote automated tests for GNU+Linux using GitLab CI, which are being
introduced in this release. However, I can't "test" making a Windows or
Mac installer, and then test if they also work. I have no idea how
installers for either of these platforms are made, and I also don't
think I can use GitLab CI for either of those platforms.

-- 
With kind regards,

Patrick Spek


www:  https://www.tyil.nl/
mail: p.s...@tyil.nl
pgp:  1660 F6A2 DFA7 5347 322A  4DC0 7A6A C285 E2D9 8827

social: https://soc.fglt.nl/tyil
git:https://gitlab.com/tyil/


pgp4muyDtKhi8.pgp
Description: OpenPGP digital signature


Re: Working at FOSDEM

2020-01-04 Thread Patrick Spek via perl6-users
On Fri, 3 Jan 2020 15:43:23 +0100
Andrew Shitov  wrote:

> Hi,
> 
> On 1-2 Feb, I have secured a table at the FOSDEM exhibition area.
> Unfortunately, I found nobody who confirmed they can help at the
> location for at least 1/2 day. What needs to be done there is to talk
> to people passing by and tell them about Raku and its advantages.
> Please let me know if somebody wants to join.
> 
> Regards
> 
> --
> Andrew Shitov
> __
> a...@shitov.ru | http://shitov.ru

I am planning to be in Brussels for FOSDEM, and I can more than likely
spend some time at the Raku table!

-- 
With kind regards,

Patrick Spek


www:  https://www.tyil.nl/
mail: p.s...@tyil.nl
pgp:  1660 F6A2 DFA7 5347 322A  4DC0 7A6A C285 E2D9 8827

social: https://soc.fglt.nl/tyil
git:https://gitlab.com/tyil/


pgpW3Dua0lHUD.pgp
Description: OpenPGP digital signature


Re: rakudo.org outdated?

2020-01-04 Thread Patrick Spek via perl6-users
On Fri, 3 Jan 2020 23:28:38 +0100
Laurent Rosenfeld via perl6-users  wrote:

> Hi Patrick,
> 
> I'm sure you have plenty of things to do and I don't want to put too
> much pressure on you, but it would be really nice to have a good and
> more recent  Rakudo Star version available, especially in view of the
> recent renaming of the language.

I agree with you, especially the "good" part. Since Rakudo Star has to
work for more people than just me, I'm a little hesitant to move
quickly with it. I can't test it on Mac or Windows, for instance, but
there are users on both platforms, and having a good but old release is
probably better for them than new but broken.

However, if the community would rather I mark the current -rc1 as a
proper release, I can do that too. I just don't want to harm the
community at large.

> And, by the way, more generally, having a nine-month-old release to
> offer on the main download site looks quite bad anyway. It's not you,
> but something must be wrong in the process.

It used to be on a three month interval, and I'd like to go to a two or
three month interval myself as well. I can try to make that happen once
I know for certain that the current release process works.

-- 
With kind regards,

Patrick Spek


www:  https://www.tyil.nl/
mail: p.s...@tyil.nl
pgp:  1660 F6A2 DFA7 5347 322A  4DC0 7A6A C285 E2D9 8827

social: https://soc.fglt.nl/tyil
git:https://gitlab.com/tyil/


pgpJzd4GQMVhw.pgp
Description: OpenPGP digital signature


Re: rakudo.org outdated?

2020-01-03 Thread Patrick Spek via perl6-users
On Fri, 3 Jan 2020 14:21:14 +0100
Marc Chantreux  wrote:

> hello people,
> 
> i read an annoncement for rakudo 2019.11
> and the last github release confirms that.
> 
> so i started to update the guix package
> before discovering that the rakudo.org page
> still points to 2019.03.
> 
> is there a problem with the last version or
> os rakudo.org just outdated?
> 
> regards.
> 
> marc

Hi Marc,

I've been working on Rakudo Star 2019.11-rc1, which is available from
my file server[1]. However, I don't think I've made a regular (non -rc)
release out of it, as I'm waiting on Naoum to test the release for
Windows first.

I don't see it listed on the releases page[2] on the GitHub repository
either, can you tell me where you saw this?

[1]: https://dist.tyil.nl/raku/rakudo-star/
[2]: https://github.com/rakudo/star/releases

-- 
With kind regards,

Patrick Spek


www:  https://www.tyil.nl/
mail: p.s...@tyil.nl
pgp:  1660 F6A2 DFA7 5347 322A  4DC0 7A6A C285 E2D9 8827

social: https://soc.fglt.nl/tyil
git:https://gitlab.com/tyil/


pgplPfrNCjGax.pgp
Description: OpenPGP digital signature


Re: Stack Exchange

2019-12-23 Thread Patrick Spek via perl6-users
On Sun, 22 Dec 2019 14:51:52 -0800
ToddAndMargo via perl6-users  wrote:

> Hi All,
> 
> I have posted a few times to Stack Exchange.  There is a
> lot of intellectual property over there.  This I do like.
> 
> What I do not like, is that it is hard to carry on a
> conversation do their their comments being so short
> and lacking in formatting.  They expect you to add
> extra comments under your original porting which
> totally ruins the flow of the converstation.

StackOverflow is a Q&A-style website, that's their intended flow. If
you want more of a conversation-style help, this mailing list is a much
better option to go towards.

> And, worse, the feel it is appropriate to actually
> go into your posts and edit your content.  The
> called it correcting your grammar.   This is offensive.

What you find offensive isn't set in stone for others. There's also a
lot of value in ensuring everything is constructed in a similar way.
This enables people to not have to learn each person's style and
grammar choices all over whenever they are looking for an answer to a
problem of theirs.

> Is there another forum out there like Stack exchange without these 
> negative issues?

They may be a negative to you personally because you dislike being
corrected on grammar, but they're not "negative issues" for the
community at large. However, this very ML seems to be the kind of thing
you're looking for, no?

> Many thanks,
> -T

-- 
With kind regards,

Patrick Spek


www:  https://www.tyil.nl/
mail: p.s...@tyil.nl
pgp:  1660 F6A2 DFA7 5347 322A  4DC0 7A6A C285 E2D9 8827

social: https://soc.fglt.nl/tyil
git:https://gitlab.com/tyil/


pgp3L87TSGtiu.pgp
Description: OpenPGP digital signature


Re: split to walk into an HoH ?

2019-11-22 Thread Patrick Spek via perl6-users
Could you post some input and expected output? That would make it
easier for me (and perhaps others) to see what exactly you're trying to
accomplish, in practical terms.

On Fri, 22 Nov 2019 14:39:33 +0100
Marc Chantreux  wrote:

> hello people,
> 
> removing shell scripts is a good way to learn raku and compare.
> today i want to replace this:
> 
> fix () {
> awk -F, '{print $1"   "$2}' |
> sort -u   |
> awk -F"   " '{
> if   (seen == $1) print "\t"$2;
> else { seen = $1; print $1 }
> }'
> }
> 
> and i got this:
> 
> fix () perl6 -e '
> my %section;
> lines.map: {
> my ($s,$ss) = .split(",");
> %section{$s;$ss} = 1;
> }
> %section.keys.map:
> { .say for $_ , |%section{$_}.keys.map: {"\t$_"} }
> '
> 
> ";" to walk in the hoh is really awesome but i don't know even know
> from where i know it and what's the object underneath.
> it isn't listed in the list of operators
> (https://docs.perl6.org/language/operators).
> 
> i would like to know because it would be nice to make this block
> 
> my ($s,$ss) = .split(",");
> %section{$s;$ss} = 1;
> 
> a one liner so i'm searching for something like
> 
> %section{ .split(",").walkTheHash } = 1;
> 
> any help will be warmly welcome.
> 
> regards
> marc



-- 
With kind regards,

Patrick Spek


www:  https://www.tyil.nl/
mail: p.s...@tyil.nl
pgp:  1660 F6A2 DFA7 5347 322A  4DC0 7A6A C285 E2D9 8827

social: https://soc.fglt.nl/tyil
git:https://gitlab.com/tyil/


pgpCNSMENxBRN.pgp
Description: OpenPGP digital signature


Re: Rakudo Star 2019.07.1

2019-11-06 Thread Patrick Spek via perl6-users
Ah, that has been a mistake on my part, apologies. I can use a
more "correct" naming scheme in the future.

Are there any rules besides this one that release names should adhere
to? I'll write up a document about it so I have it documented, and
other people know what to expect as well.

On Wed, 6 Nov 2019 09:35:32 -0500
Parrot Raiser <1parr...@gmail.com> wrote:

> When I report a problem, I try to supply as complete a picture as
> possible, without imposing my filter on the data. So many times I've
> had a vital clue omitted by someone who "didn't think that X was
> important".
> 
> With so many parties involved, it's not surprising that errors reveal
> issues entirely outside your ken; those capable of fixing them may see
> the report and fix them.
> 
> > I'm not sure what you mean with "-n vs .n for sub-version ids". I  
> 
> The Rakudo* convention for normal releases was .MM, for
> experimental or supplemental releases was .MM-N, so my download
> script inserted "-" as the separator if given a third parameter, while
> you're using .MM.N I just changed the script, but again reported
> it in case someone else also uses a script.



-- 
With kind regards,

Patrick Spek


www:  https://www.tyil.nl/
mail: p.s...@tyil.nl
pgp:  1660 F6A2 DFA7 5347 322A  4DC0 7A6A C285 E2D9 8827

social: https://soc.fglt.nl/tyil
git:https://gitlab.com/tyil/


pgpQO9iprHxTP.pgp
Description: OpenPGP digital signature


Re: Rakudo Star 2019.07.1

2019-11-06 Thread Patrick Spek via perl6-users
The problem is clearly with the Linenoise module, I'll have to look
into that and see if it's something I can fix.

The path name you see is "an implementation detail" of Zef, I've been
told before. I have no clue how it actually calculates them, and no
idea where to find any documentation on that. That is something I
cannot fix, and as far as I understand, there's no way this will be
changed on the Zef side of things.

I'm not sure what you mean with "-n vs .n for sub-version ids". If this
is causing issues or unclarities while trying to get Rakudo Star
installed, I'll need some additional information in order to see if
this is something I should fix or even can fix.

On Tue, 5 Nov 2019 17:15:26 -0500
Parrot Raiser <1parr...@gmail.com> wrote:

> After a few difficulties caused by subtly different paths and version
> identification (like -n vs .n for sub-version ids) the download and
> installation appears to have worked, but trying the REPL produced the
> following error message:
> 
> "I ran into a problem while trying to set up Linenoise: Failed to open
> file 
> /home/guru/rakudo/rakudo-star-2019.07.1/install/share/perl6/site/dist/91857A0CE92503F53D56DEBB6F633402878D0FF0:
> No such file or directory
> Continuing without tab completions or line editor"
> 
> I assume that horrendous filename is a SHA hash if some sort. To
> whoever is involved with that part of the system, is there any chance
> of generating shorter filenames to make understanding and
> communication easier?
> 

-- 
With kind regards,

Patrick Spek


www:  https://www.tyil.nl/
mail: p.s...@tyil.nl
pgp:  1660 F6A2 DFA7 5347 322A  4DC0 7A6A C285 E2D9 8827

social: https://soc.fglt.nl/tyil
git:https://gitlab.com/tyil/


pgpDw8KRWaBYG.pgp
Description: OpenPGP digital signature


Rakudo Star 2019.07.1

2019-11-05 Thread Patrick Spek via perl6-users
Hello everyone,

I've seen people ask about 2019.07.1 in multiple avenues, myself
included. Since there was little response, I've set out to build it
myself. The first results have been made, with a PR on the Rakudo Star
repository to fix a number of issues.

Additionally, I've uploaded the 2019.07.1 tarball to my servers for
people to test[1]. Those looking for a newer version can download this
variant, and see if it works for them. If anyone spots any issues,
please let me know, either through this mailing list, the GitHub
repository[2] or the GitLab repository[3]. I'm trying to track all of
these places, and try to resolve all issues people find.

I plan to also release a 2019.10 version of Rakudo Star before the end
of this year, but whether that's viable depends on the number of
severity of the issues people may find.

I hope we can continue the Rakudo Star releases on a regular basis in
2020!

[1]: https://dist.tyil.nl/raku/rakudo-star/
[2]: https://github.com/rakudo/star
[3]: https://gitlab.com/tyil/rakudo-star/

-- 
With kind regards,

Patrick Spek


www:  https://www.tyil.nl/
mail: p.s...@tyil.nl
pgp:  1660 F6A2 DFA7 5347 322A  4DC0 7A6A C285 E2D9 8827

social: https://soc.fglt.nl/tyil
git:https://gitlab.com/tyil/


pgpRdiemaFV2l.pgp
Description: OpenPGP digital signature


Re: perl6 for web development

2019-09-30 Thread Patrick Spek via perl6-users
It's a library for making a web application. One could also make a
framework out of it, if they wished to do so.

Jonathan has made this distinction in the past, referring to Cro as a
library explicitly, as opposed to a framework, as a framework is
(usually) highly opinionated. Cro is not.

That said, Cro has been quite smooth sailing for me, so I too would
suggest you taking a look there. There's also Bailador[1], which is an
actual framework for creating web applications as well. There's also a
tutorial for it on YouTube[2], if that's interesting to you.

[1]: https://github.com/Bailador/Bailador
[2]: https://www.youtube.com/watch?v=zmQ3FQCIXmk

On Sun, 29 Sep 2019 15:03:58 +0300
Veesh Goldman  wrote:

> No, it's a web framework.
> 
> On Sun, Sep 29, 2019, 14:33 星沉  wrote:
> 
> > On 2019/9/29 7:23 下午, Laurent Rosenfeld wrote:  
> > > you probably want to take a look at Cro.   
> >
> > hello,
> >
> > is this the replacement to perl5's coro?
> >
> > regards.
> >  



-- 
With kind regards,

Patrick Spek


www:  https://www.tyil.nl/
mail: p.s...@tyil.nl
pgp:  1660 F6A2 DFA7 5347 322A  4DC0 7A6A C285 E2D9 8827

social: https://soc.fglt.nl/tyil
git:https://gitlab.com/tyil/


pgpFNUr7chCaB.pgp
Description: OpenPGP digital signature


Re: Rakudo Star 2019.07

2019-09-03 Thread Patrick Spek via perl6-users
No, that's Rakudo (the compiler), not Rakudo Star (the Perl 6
distribution).

On Tue, 3 Sep 2019 03:54:37 -0700
ToddAndMargo via perl6-users  wrote:

> On 9/3/19 12:03 AM, Patrick Spek via perl6-users wrote:
> > Hi everyone,
> > 
> > I'm using Rakudo Star to get Perl 6 on my machines. However, it
> > seems that the latest release is 2019.03, which is half a year old
> > by now. Is anyone working on a 2019.07 (or different number)
> > release right now, or are there currently no maintainers for it?
> > 
> > If it's the latter, can anyone point me to some documentation (if
> > there is any) on how to make a Rakudo Star release? If it's easily
> > automated, I can look into setting one up (at least for GNU+Linux
> > users). 
> 
> Does this help?
> 
> https://github.com/rakudo/rakudo/releases



-- 
With kind regards,

Patrick Spek


www:  https://www.tyil.nl/
mail: p.s...@tyil.nl
pgp:  1660 F6A2 DFA7 5347 322A  4DC0 7A6A C285 E2D9 8827

social: https://soc.fglt.nl/tyil
git:https://gitlab.com/tyil/


pgpSSO8sHRG0j.pgp
Description: OpenPGP digital signature


Rakudo Star 2019.07

2019-09-03 Thread Patrick Spek via perl6-users
Hi everyone,

I'm using Rakudo Star to get Perl 6 on my machines. However, it seems
that the latest release is 2019.03, which is half a year old by now. Is
anyone working on a 2019.07 (or different number) release right now, or
are there currently no maintainers for it?

If it's the latter, can anyone point me to some documentation (if there
is any) on how to make a Rakudo Star release? If it's easily automated,
I can look into setting one up (at least for GNU+Linux users).

-- 
With kind regards,

Patrick Spek


www:  https://www.tyil.nl/
mail: p.s...@tyil.nl
pgp:  1660 F6A2 DFA7 5347 322A  4DC0 7A6A C285 E2D9 8827

social: https://soc.fglt.nl/tyil
git:https://gitlab.com/tyil/


pgpfriiV6OHog.pgp
Description: OpenPGP digital signature


Re: perl6-regex: retaining $/.pos after an unsuccesful match without a temporary variable?

2019-08-19 Thread Patrick Spek via perl6-users
On Sun, 18 Aug 2019 13:45:27 -0300
Aureliano Guedes  wrote:

> Even being another language, Perl6 should be inheriting Perl5's
> regexes or even improving it not making it uglier and harder.
> 
> Or I'm seeing how to use it in an easy way. Also, dunno if there is
> some GOOD documentation to Perl6 regexes.

Beauty is in the eye of the beholder. While I'm much more proficient
with PCRE than P6CRE, I do find the Perl 6 variants to be much cleaner
and easier to understand when reading regexes of others.

If you find that there's a lack of documentation explaining things
clearly to you, that'd be an issue to solve in the documentation. This
takes a lot of effort, and if you would be so kind as to improve it
where you think it's needed, it would be a great help to everyone (we
can't really see how or where you're looking for what, after all).

-- 
With kind regards,

Patrick Spek


www:  https://www.tyil.nl/
mail: p.s...@tyil.nl
pgp:  1660 F6A2 DFA7 5347 322A  4DC0 7A6A C285 E2D9 8827

social: https://soc.fglt.nl/tyil
git:https://gitlab.com/tyil/


pgp_hI1f46tLe.pgp
Description: OpenPGP digital signature


Re: while(<>){...} analog?

2019-07-29 Thread Patrick Spek via perl6-users
In Perl 6, you also don't need to explicitly use $_ in this case if
you use the method form of say.

for lines() {
   .say
}

On Sun, 28 Jul 2019 23:13:08 -0700
Joseph Brenner  wrote:

> [...]
> 
> The perl6 version would be something like:
> 
>   #!/usr/bin/env perl6
>   use v6;
>   for lines() {
>   say $_;
>   }
> 
> [...]

-- 
With kind regards,

Patrick Spek


www:  https://www.tyil.nl/
mail: p.s...@tyil.nl
pgp:  1660 F6A2 DFA7 5347 322A  4DC0 7A6A C285 E2D9 8827

social: https://soc.fglt.nl/tyil
git:https://gitlab.com/tyil/


pgpStZXcRId3W.pgp
Description: OpenPGP digital signature


Re: LogP6 not working as I expect

2019-05-10 Thread Patrick Spek via perl6-users
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

Aha!

That works for me!

I don't particularly need it to be a constant, I just used constants
before to make sigil-less variables. I generally don't use `my \foo`
because I don't like how instantiation and use differ (one uses the `\`
sigil, which is no longer afterwards).

But it works for this particular instance, and is also used in their
own documentation. I didn't know the `constant` would differ in a way
like this.

Thanks for the help!

On Fri, 10 May 2019 15:32:58 +0200
Timo Paulssen  wrote:

> Hi Patrick,
> 
> It could be that compile time is too early for the logger object to
> properly be set up; try to see if "my \Log" instead of "constant Log"
> fixes it, then we can perhaps find a better solution that still has
> "constant" (for example a feature request for LogP6)
> 
> Kind Regards
>   - Timo



- -- 
With kind regards,

Patrick Spek


www:  https://www.tyil.nl/
mail: p.s...@tyil.nl
pgp:  1660 F6A2 DFA7 5347 322A  4DC0 7A6A C285 E2D9 8827

social: https://pleroma.tyil.nl/tyil
git:https://git.tyil.nl/

-BEGIN PGP SIGNATURE-

iQEzBAEBCgAdFiEEtvaXdC78r18jzlHVAx1lkC6ECCEFAlzWITkACgkQAx1lkC6E
CCGsdAgAk+P4nx63uSYLw4mGMYK2OvnkfGW0WD1VoKHkxjFFaK0VdQepsF26z32B
kD8uRKKcxlh/8zBXw2oJdtb5ZgrOFTo/c4Hq3tKDXcAsev5rkH6eOmhnv+qvpGU0
nEO0YIO2PeyazLNlldwEKJa7VCoG/mGqQA3wcwm0LLbZI/XmS7cloxlBvj5vsClB
SsCcVcJ0EfdWDViLRcWXQkNYu6g67FTaYuVlaYdAnyPhpppA2IQNWr35USuen/2h
78SBfSlCtg6l188o7y2NgncitXTsS9vxSzxTBAVafx9x9Y1vN3pvuZufOwI+17Gr
EoAhT40Ko+37wmi6zthq4uOb8om41A==
=XnBV
-END PGP SIGNATURE-


LogP6 not working as I expect

2019-05-10 Thread Patrick Spek via perl6-users
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

Hi all,

I'm trying to use LogP6 in one of my projects, but it's not working the
way I was expecting it to work. Presumably I'm overlooking something
simple, but I can't seem to figure out what or why. I have the
following code:


use App::CPAN::Repositories::Migration;
use Terminal::ANSIColor;
use LogP6 :configure;

unit module App::CPAN::Bin::Migrate;

filter(:name(''), :level($trace), :update);

constant Log = $?MODULE.^name.&get-logger;
constant MigrationRepo = App::CPAN::Repositories::Migration;

#| Undo the latest migration
multi sub MAIN (
  Bool:D :$down!
) is export {
  CATCH {
when .message ~~ / "relation \"_migrations\" does not exist" / {
  $?MODULE.^name.&get-logger.warn("why have you forsaken me");
  dd Log;
  Log.warn("No migrations left to undo");
  exit 1
}
  }

  my $last = MigrationRepo::last();

  MigrationRepo::down($last);

  say "Ran downgrade migration {color("bold")}{$last}{color("reset")}";
}


When running the program, I see the output "why have you forsaken me",
but not the output "No migrations left to undo". I added the `dd` call
to ensure that the `Log` constant is available, which it is. Why is the
log call of `Log.warn()` not being shown, but the
`$?MODULE.^name.&get-logger.warn()` is?

- -- 
With kind regards,

Patrick Spek


www:  https://www.tyil.nl/
mail: p.s...@tyil.nl
pgp:  1660 F6A2 DFA7 5347 322A  4DC0 7A6A C285 E2D9 8827

social: https://pleroma.tyil.nl/tyil
git:https://git.tyil.nl/

-BEGIN PGP SIGNATURE-

iQEzBAEBCgAdFiEEtvaXdC78r18jzlHVAx1lkC6ECCEFAlzVKVEACgkQAx1lkC6E
CCGPbAf/ZirLlQvfS7bncgVdJ4tFKvtXVbPFMfCFRZqUQ5Zj48EnMR51K26hjDwy
5BJhXB8HNzAuwzf7jjqbyYiOkkq4vHhWcsDfhdQ2zdgtapApaCFliGoUbDKAQQRR
1iTXXlxY3P4JmBuTXw+uenFcI7eBhhNTn0SRfFtpqqEdtBKO3Oc3Ff9HQP1OTBoJ
QxTWCh/okYYnR8y+G4Od9aVNOpPOSChiEoeQ9ZjLNlT9ZjeoQSH5FPW/AbsFhqyM
zFp+7U5gWf0qy/3m4uKiKnIns3zz5ydGoZgA4P5mWAqDPGMfsqq2TRnlDm6mDu5A
qGn/ww/eC6kFK7sfn8sHxLZBiueobg==
=WLEV
-END PGP SIGNATURE-


Re: filever.exe sub?

2019-01-30 Thread Patrick Spek via perl6-users
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

A quick search yields me the program `pev`:
http://pev.sourceforge.net/doc/manual/en_us/

Maybe this can help you out. If it performs the tasks you need it to
perform, you could browse the source code and rewrite it into a Perl 6
project :)

On Tue, 29 Jan 2019 21:57:28 -0800
ToddAndMargo via perl6-users  wrote:

> On 1/29/19 9:53 PM, ToddAndMargo via perl6-users wrote:
> > Hi All,
> > 
> > Windows provides a utility called filever.exe which will
> > tell you the revision of and exe file.  (You can also see this
> > through the gui with properties).
> > 
> > Currently I run filever.exe through Wine.  It is cumbersome,
> > especially since Wine floods STDERR.  I work around it.
> > 
> > Do we have a module for the file's version?  If so, does
> > it run in Linux?
> > 
> > If not, does anyone know where the version information is
> > stored in and .exe file so I can write one myself?
> > 
> > Many thanks,
> > -T  
> 
> Sorry.  I keep using "and" instead of "an".  Stinkin' typos.

-BEGIN PGP SIGNATURE-

iQEzBAEBCgAdFiEEtvaXdC78r18jzlHVAx1lkC6ECCEFAlxRuQMACgkQAx1lkC6E
CCFC0gf/T4if9Gt3YUcTLWDobaWlvo6ewwsxcXJQlD7u8O46ImcAlVSyJRBjAkkN
5Lbatc/UleyzIk3qJmWSCgJyzEV0ZgakdcBAtumB9mrxZrg0cPWBNblDDo+pnSJA
qjpkB690KqlUNuZmBhfp/Xh6E2wWi7PhoDWlYtrJ/1j+AF8iGonuV1/93cXXw1fO
MCs+S9Rn41hb4SqTJShaELLxzR39UmdE3/f0istOFOq3bsaE/WOxxJ4ovccuIEJw
/xdS7tOLHMQoTSQTH/xjx7BdyUmCTfspsEmqqfoh2NgD+IOuo4lt3Ns3INPFfNfO
4EwZc2IgWaFrJPe1lf2Hmag/0pPoyg==
=TCki
-END PGP SIGNATURE-


Re: Perl6 use cases

2018-11-04 Thread Patrick Spek via perl6-users
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

Hi,

I've been using Perl 6 in my personal projects to create an IRC bot
(using IRC::Client), a number of modules, and currently trying to set
up a new mail environment with a management API built with Cro.

At work, I've used Perl 6 to deal with DMARC notifications from Google.

In my experience, it allows me to write out my thoughts to working code
with very little effort, and still keep it readable.

On Sun, 04 Nov 2018 23:18:53 -0500
N6ghost  wrote:

> Hi all,
> 
> Been looking around trying to find, anyone who is actually using
> Perl6. and what they are using it for.
> 
> and if they are, what are there thoughts on it?
> 
> Thanks
> 
> -N6Ghost



- -- 
With kind regards,

Patrick Spek


www:  https://www.tyil.work/
mail: p.s...@tyil.nl
pgp:  EB9E A484 1672 2D37 16F5  A799 9ACF E193 FFBC 1F50

mastodon: @tyil@mastodon.social
github:   @Tyil
gitlab:   @tyil

-BEGIN PGP SIGNATURE-

iQEzBAEBCgAdFiEEtvaXdC78r18jzlHVAx1lkC6ECCEFAlvf6XsACgkQAx1lkC6E
CCGPCgf/QZRciqw4HCLVEpqAeKVVk66Z2+qZS01uKZsWYgHggKo32NU2wy24Ef9y
eQbH81W7pLmtVFOybNH82XNHIj8kg4nGZDgqsM9Jlccsv5mh5Gea5x4MPUiaVP2X
jgDnaK5ZsgSm/2ThNJ+1QboFHyrcLYNq6oT8b/tgeOWfXt0I10BxCfK8+8HKSj7w
Y6urFks/L5bqsoNbNS6UDKZI/qUbR8gGeB3ArjFN04n464uwg/Wc4fUXTZR8hEkG
YDcsCkQx5Uyc4aRPVUFa61KaHIU1BvfWirW2+leaYIgkzBcjw4pyd6Nq2bZ2dFfC
qiDsrFZ2Vk/5/KKNIGyDs0bAG9Hbtg==
=+huv
-END PGP SIGNATURE-


Re: Installing Perl6 on shared server

2018-09-25 Thread Patrick Spek via perl6-users
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

On Wed, 26 Sep 2018 11:20:49 +0800
Richard Hainsworth  wrote:

> a) Is there a rakudo package for debian Stretch I can install? (I'm
> just asking, but I doubt it).

https://github.com/nxadm/rakudo-pkg/releases

I believe Stretch is Debian 9, so you would want to try out
https://github.com/nxadm/rakudo-pkg/releases/download/v2018.09/rakudo-pkg-Debian9_2018.09-01_amd64.deb
as the deb of your choice. You should be able to install it with `dpkg
- -i`, however, I believe it requires root powers in order to do so.

If you have Docker as an option, there's the `rakudo-star` image
available as well.

When all else fails, remember that a VPS nowadays ranges from 1 to 10
euro a month, and then you get root access to the machine. This might
be the least effort to get you going.

- -- 
With kind regards,

Patrick Spek


www:  https://www.tyil.work/
mail: p.s...@tyil.nl
pgp:  EB9E A484 1672 2D37 16F5  A799 9ACF E193 FFBC 1F50

mastodon: @tyil@mastodon.social
github:   @Tyil
gitlab:   @tyil

-BEGIN PGP SIGNATURE-

iQEzBAEBCgAdFiEEtvaXdC78r18jzlHVAx1lkC6ECCEFAlurKggACgkQAx1lkC6E
CCEYFggAoFaCJVhHTNRQWH0vZ4Dr47RSIqkS8hwGBguoOQSxdNtAYDhEj3Nn+Or9
5IisdNMW2EGfRniD7AR6szlFv3Ti+J0+GL473CIgPlYlx98WTATDxsDpn6FKoOWu
vG9BGVN9mnBE5w7d82k9rRJBe7g9XlUoWEgKoFYQ3MI5y3cL1HX9x42+WBxGbfgq
/4lAlVmMhyC28lFhr5Bb0hQbo3VG7XVcZnF0yrFm40hhGyUR1Ql/jv3qn5B8qBxm
U7B0itZUeJfsRacUBHyUWdmHqONLqU16mcGus4mQRLfSbmWkQJGWvK5Vh3CY93L4
9ZO+UTKkjGMzUmBtJzengKis3WiTZw==
=bHzt
-END PGP SIGNATURE-


Re: A grammar to provide substitution

2018-08-29 Thread Patrick Spek via perl6-users
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

It's supposed to be simple, since I don't need much. The most basic of
substitution is all I care about right now. I've implemented it with a
simple regex now, and it seems to work just fine. It's available as a
module[1] now, and it's used in another module of mine[2]. If anybody
wants to improve it, feel free to submit a MR on the repository[3].

Thanks everyone for your help!

[1]: https://modules.perl6.org/dist/I18n::Simple:cpan:TYIL
[2]: https://gitlab.com/tyil/perl6-app-assixt
[3]: https://gitlab.com/tyil/perl6-i18n-Simple

On Wed, 29 Aug 2018 19:28:56 +0200
Timo Paulssen  wrote:

> I should point out that the trans method has a mode that lets you pass
> placeholders and substitutions and it will Do The Right Thing
> regarding overlaps and order and everything.
> 
> 
> On 29/08/18 16:21, Timo Paulssen wrote:
> > There's a problem with your code, if any of the substitutions
> > contains something that looks like the placeholder thing, and if it
> > comes later in the iteration of the hash keys (which is randomized
> > now) it will substitute again. This is very likely not what you
> > want, though.
> >
> > HTH
> >   - Timo
> >
> > On 28/08/18 20:04, Laurent Rosenfeld via perl6-users wrote:  
> > > Hi Patrick, > > for note that this codeline: > > my Str $input =
> > > "Here be a  
> > $(placeholder), for $(purpose) purposes."; > > will not compile
> > because Perl will try to interpolate $(placeholder) and $(purpose)
> > as vairables that have not been declared. > > You need to use non
> > interpolating quotes: > > my Str $input = 'Here be a $(placeholder),
> > for $(purpose) purposes.'; > > Then, I would probably use simple
> > substitutions, as with this example: > > my Str $input = 'Here be a
> > $(placeholder), for $(purpose) purposes.'; > > sub format-string
> > ($input, %substitutions) { > my $str = $input; > for keys
> > %substitutions -> $key { > $str ~~ s/$key/%substitutions{$key}/;
> > > } > return $str; > } > my %substitutes = '$(placeholder)' =>
> > "placeholder", '$(purpose)' => "testing"; > my $output =
> > format-string($input, %substitutes); > say $output; > > This is the
> > output running this under the REPL: > > > my Str $input = 'Here be a
> > $(placeholder), for $(purpose) purposes.'; > Here be a
> > $(placeholder), for $(purpose) purposes. > > > > sub format-string
> > ($input, %substitutions) { > * my $str = $input; > * for keys
> > %substitutions -> $key { > * $str ~~ s/$key/%substitutions{$key}/;
> > > * } > * return $str; > * } > sub format-string ($input,
> > > %substitutions) {
> > #`(Sub|214745424) ... } > > my %substitutes = '$(placeholder)' =>
> > "placeholder", '$(purpose)' => "testing"; > {$(placeholder) =>
> > placeholder, $(purpose) => testing} > > my $output =
> > format-string($input, %substitutes); > Here be a placeholder, for
> > testing purposes. > > say $output; > Here be a placeholder, for
> > testing purposes. > > I hope this helps. > > Cheers, > Laurent. > >
> > >  
> > > > Le mar. 28 août 2018 à 12:25, Patrick Spek via perl6-users  
> > mailto:perl6-us...@perl.org>> a écrit : >  
> >> Hi all,
> >>
> >> I'm trying to substitute parts of a string, and thought this might
> >> be a good use of a grammar. Sadly, grammars aren't my strong suit,
> >> so I thought I'd ask the wider community for help. Maybe you guys
> >> know an even better solution than using a grammar here.
> >>
> >> So, consider a string, "Here be a $(placeholder), for $(purpose)
> >> purposes.". I want to be able to put that into a sub, along with
> >> some Pairs, and get a string with the placeholders replaced back.
> >>
> >>     my Str $input = "Here be a $(placeholder), for $(purpose)
> >> purposes."; my Str $output = format-string(
> >>     $input,
> >>     placeholder => "placeholder",
> >>     purpose => "testing",
> >>     );
> >>
> >>     dd $output; # "Here be a placeholder, for testing purposes."
> >>
> >> The `format-string` sub would call the grammar and apply the actual
> >> substitution, and that's where I need your help. I am not quite
> >> sure how I would implement the grammar (and presumably it's
> >> actions) to do what I want.
> >>
> >> Thanks in advance for your help!
> >>
> > >  
> >  
> 



- -- 
With kind regards,

Patrick Spek


www:  https://www.tyil.work/
mail: p.s...@tyil.nl
pgp:  EB9E A484 1672 2D37 16F5  A799 9ACF E193 FFBC 1F50

mastodon: @tyil@mastodon.social
github:   @Tyil
gitlab:   @tyil

-BEGIN PGP SIGNATURE-

iQEzBAEBCAAdFiEE4eL662U9iK2ST2MqN/W6H45XOE8FAluHBKQACgkQN/W6H45X
OE8I/wf/YWLWKCxj0AUvJt9xaosRPYYw2A3z8IgejA95S6UjeIgCzswal3xp0YiU
FfkUL0eSiuXc2fw3FLFl/FK0R6KzpW8V+kBpKZaB0bcU9tErpwTYwLQFyxvdgYjQ
FUiCZ+sM6963RihCJZwVMF8pzwZDOcKMmuxg67Ufd/syOHE7yZT2MV8FxXAA0xAT
pGRA00XrlSIzJTY1VQcWY5JjrbM+aD9U/QsfWiVc8oKrbAKGExJ096UQ3bcDhFzf
EwMhdGBUrkQjfGj7TPWhC9w2fmth+DiNx2EhSYZCKs7Qn0+XmaOMsznC6/Dm23sv
ok27sdgL+jr/P0x1CjrpAlxX5jgJiA==
=fDhH
-END PGP SIGNATURE-


A grammar to provide substitution

2018-08-28 Thread Patrick Spek via perl6-users
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Hi all,

I'm trying to substitute parts of a string, and thought this might be a
good use of a grammar. Sadly, grammars aren't my strong suit, so I
thought I'd ask the wider community for help. Maybe you guys know an
even better solution than using a grammar here.

So, consider a string, "Here be a $(placeholder), for $(purpose)
purposes.". I want to be able to put that into a sub, along with some
Pairs, and get a string with the placeholders replaced back.

my Str $input = "Here be a $(placeholder), for $(purpose) purposes.";
my Str $output = format-string(
$input,
placeholder => "placeholder",
purpose => "testing",
);

dd $output; # "Here be a placeholder, for testing purposes."

The `format-string` sub would call the grammar and apply the actual
substitution, and that's where I need your help. I am not quite sure
how I would implement the grammar (and presumably it's actions) to do
what I want.

Thanks in advance for your help!

- -- 
With kind regards,

Patrick Spek


www:  https://www.tyil.work/
mail: p.s...@tyil.nl
pgp:  EB9E A484 1672 2D37 16F5  A799 9ACF E193 FFBC 1F50

mastodon: @tyil@mastodon.social
github:   @Tyil
gitlab:   @tyil

-BEGIN PGP SIGNATURE-

iQEzBAEBCAAdFiEE4eL662U9iK2ST2MqN/W6H45XOE8FAluFIw0ACgkQN/W6H45X
OE+9pAgAry3KwoOS+A5g+y9V0hPHx24nQ6U8TcbZh/HIuvwwbinkCi4oxfhGwTBX
FXeogYj18OF+K7KEq45fAtB7sqrAelo59elu+ZCXZmiFH1BNHFNWbINkKKWQdHAs
uYTL7poMwSQ+XQVBTCu3dY32jVl3qasSr4dAM0g6za8TTtgw0TTblF/aNO6A0KC6
cf757hWxZ7VqprIbpPfvQnB/0BreVu467Va7EGdzZDwi3WfQTg9R0H1NTSkpdS0M
fyhMJ21rjBhhiUZt+DOHThcd5s7ikk1d1fX5x/hEgRNIcmbQVZ7N3STGSxtqFm6h
thQ2zhTXGgE/VrTaOHP0a8NiqPamEQ==
=RlqT
-END PGP SIGNATURE-


Re: start up delay?

2018-08-06 Thread Patrick Spek via perl6-users
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

If you're writing a runnable script in Perl 6, I would recommend to
*always* use a MAIN sub[1]. If you're using that, you can easily
achieve the precompilation as well, with 1 line of code less.

You'd have your code in lib/Your/Program/Main.pm6:

sub MAIN (
# You can let Perl 6 handle arguments here
) is export {
# Program code here
}

Next, the script that you actually run would be in bin/program, and
contain the following code:

use lib "./";
use Your::Program::Main;

This should give you all of the Perl 6 MAIN goodness, and a faster
program.

[1]: https://docs.perl6.org/language/functions#index-entry-MAIN

On Mon, 6 Aug 2018 10:56:43 +0100
Simon Proctor  wrote:

> So Perl6 is a lot like Python in that modules get compiled to byte
> code making them a lot faster to parse the second time around.
> 
> If you're running a 6000 line script then a lot of time is going to be
> spent parsing your script every time you run it. If you instead take
> all your script code and pop it into a module and have a script along
> the lines of :
> 
> use lib "./";
> use System;
> 
> System::start();
> 
> (Where your module code is called System.pm6 and start is the entry
> point subroutine).
> 
> I think you'd find this improves the speed of the script
> significantly.
> 
> On Mon, 6 Aug 2018 at 10:38 ToddAndMargo 
> wrote:
> 
> > On 08/06/2018 02:07 AM, ToddAndMargo wrote:  
> > > On 08/06/2018 01:02 AM, Simon Proctor wrote:  
> > >> Sorry I wrote my earlier email on my phone without a computer to
> > >> hand. Here's a quick rundown on what I'm talking about.
> > >>
> > >> --stagestats gives you the breakdown on how much time is spent
> > >> doing various steps (note that using time instead of date; date
> > >> gives you a better timing of how long something took.
> > >>
> > >> time perl6 --stagestats -e ""
> > >> Stage start  :   0.000
> > >> Stage parse  :   0.089
> > >> Stage syntaxcheck:   0.000
> > >> Stage ast:   0.000
> > >> Stage optimize   :   0.001
> > >> Stage mast   :   0.004
> > >> Stage mbc:   0.000
> > >> Stage moar   :   0.000
> > >>
> > >> real0m0.144s
> > >> user0m0.155s
> > >> sys0m0.032s
> > >>
> > >> And generally that's going to be the case for most short
> > >> programs, in these cases especially moving to having the core of
> > >> your code in modules with give you a speed boost.
> > >>
> > >> Sorry if my comments earlier were unhelpful.
> > >>
> > >> Simon
> > >>
> > >> On Mon, 6 Aug 2018 at 08:56 ToddAndMargo  > >> > wrote:
> > >>  
> > >>  >> On Sun, 5 Aug 2018, 23:45 Elizabeth Mattijsen,
> > >>  >>  > >>   
> > >>  >> >> wrote:
> > >>  >>  
> > >>  >>  > On 1 Aug 2018, at 20:14, ToddAndMargo  
> > >> mailto:toddandma...@zoho.com>  
> > >>  >>  > >> >> wrote:  
> > >>  >>  > Is it just me or does Perl 6 take about three
> > >>  >>  > times as  
> > >> long to  
> > >>  >>  > start up as Perl 5?  I do have a very fast
> > >>  >>  > machine and it  
> > >> takes  
> > >>  >>  > about seven see for some of my Perl 6 stuff to
> > >>  >>  > get past  
> > >> the  
> > >>  >>  > ruminating phase and start running.  
> > >>  >>
> > >>  >> Seven seconds?  Seven?  That seems *very* long
> > >>  >> indeed.
> > >>  >>
> > >>  >> How long does it take to do:
> > >>  >>
> > >>  >> perl6 -e ‘’
> > >>  >>
> > >>  >> ?  That should be in the order of 130 msecs.  If
> > >>  >> that’s the  
> > >> case,  
> > >>  >> then you’re probably doing a lot of grammar changes
> > >>  >> to Perl  
> > >> 6.  But  
> > >>  >> without the actual code, this remains guessing.
> > >>  >>
> > >>  >>  
> > >>  >>  > Any workaround for this, or is this just growing
> > >>  >>  > pains  
> > >> for Perl 6?  
> > >>  >>
> > >>  >> Not sure  :-)
> > >>  >>
> > >>  >>
> > >>  >>
> > >>  >> Liz
> > >>  >>
> > >>  >> --
> > >>  >> Simon Proctor
> > >>  >> Cognoscite aliquid novum cotidie  
> > >>
> > >> On 08/05/2018 10:57 PM, Simon Proctor wrote:  
> > >>  > Have you tried running with --stagestats which gives you
> > >>  > a break  
> > >> down of  
> > >>  > where the time is being spent?
> > >>  >
> > >>  > On thing is if you are running large script files it came
> > >>  > take a  
> > >> while.  
> > >>  > Moving your code into modules, which get precompiled can
> > >>  > give a significant speed boost.  
> > >>
> > >> Does this tell you anything?
> > >>
> > >> $ curl --fail --head https://google.com; echo $?
> > >> H

Re: return code?

2018-07-29 Thread Patrick Spek via perl6-users
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

I'd gladly help you get your first module published.

First off, you'll need to have a META6.json describing which files your
module will provide, and which dependencies it needs. You always will
need this json file, even if you have no dependencies.

Additionally, you will probably want to move the module files into a
lib/ subdirectory, as this is the standard for Perl 6 modules to live
in.

Your README.md could use a little extending as well, with information
on what problems it solves, how people can install it, but most
importantly, some examples on how people can use it. Many people also
add their license information in the README file, which I'd recommend
as well.

On the matter of licensing, your module currently is not licensed,
which means in most legal jurisdictions that it is not freely usable. I
am not a lawyer, though, so I may be completely wrong. I'd still
recommend you use a free software license to clear out any doubt, so
people know what they can and cannot do. I'm a personal proponent of
the GNU General Public License, but you should check out
ChooseALicense[1]. This site can help you pick a suitable license for
your code.

For some shameless self promotion, I have a module that can help you in
creating new modules: Assixt[2]. You can install it with zef:

zef install App::Assixt

Once installed, you can create a new module skeleton directory using

assixt new

It will ask you a couple questions, which it will use to create a
correct META6.json file for you. If you're planning on making more
modules, you can configure some default values for a number of these
questions with

assixt bootstrap config

Once you've created the new module skeleton, change to the new
directory and add the files you want to have added:

assixt touch class Command
assixt touch class Command::Result
cp ../old-dir/Command.pm6 lib/Command.pm6
cp ../old-dir/Command/Result.pm6 lib/Command/Result.pm6

The assixt calls will generate skeleton class files, and update the
META6.json to reflect these new files. But, since you already have the
actual files, you can just cp them into the new directory to take the
place of the generated skeleton files.

Once you've done this, make sure everything still works. I would
recommend adding some tests[3] as well. You can generate empty test
files in the right directory with

assixt touch test 

Assixt will have made a default Travis[4] configuration as well, so you
can enable automated testing on each commit that you push to Github. I
personally prefer GitLab, so there's also a GitLab-CI configuration
available by default. The GitLab-CI tests run *much* quicker, as there
is no need to install Perl 6 as a seperate action.

So, to reiterate, you should:

- - Put your files into the right locations
- - Have a META6.json
- - Add a license
- - Add some tests (and actually run them!)

Once all this is done, you're ready to publish your module. You can
either add them to the Perl 6 ecosystem repository[5], or upload them
to PAUSE[6]. Adding to the ecosystem repo is simply adding an entry
through a PR. I personally prefer PAUSE, which is what I'll cover here
for you.

You'll have to request a PAUSE account on their website[7]. This can
take a couple minutes up to a day or two before these requests get
processed. It looks more scary than it actually is, so just pick a
fancy username and mention that you want to contribute your Perl 6
modules to the community.

Once you have gained access to PAUSE, you can upload your module. The
easiest way to do this, is using Assixt again. When you're in the root
folder of your project, run the following:

assixt bump
assixt dist

The first command will "bump" up the version number. You can not
replace an existing version on PAUSE (and you shouldn't do it outside
PAUSE either), so you will have to increase the version number before
each release.

The second command will create a module distribution. This is just a
tarball that contains the files that other users will need to use your
module. Some files will be filtered out by Assixt, since they are
unneeded and would just bloat the distribution (such as
the .git, .gitignore and other such files). Assixt will also tell you
where it saved this distribution. You need to know where it was saved
to continue to uploading the distribution:

assixt upload 

Assixt will ask your username and password for PAUSE, and attempt to
upload it for you and store it in the right location. If your username
or password is incorrect, uploading will fail. You can just retry it in
that case.

If you're doing this more often, you can shorten the past three steps to

assixt push

This will basically run bump, dist and upload in one go. I prefer to
explain them all seperately so you know what's going on first. This
also helps you to understand that you can just rerun the upload command
if only that step failed on the push command.

If an

Re: return code?

2018-07-29 Thread Patrick Spek via perl6-users
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

I get the idea that you're trying to get a list of lines with the

@ReturnAry = split "\n", qqx ( curl $TimeOutStr -L $Url -o
$FileName; echo \$\? );

You can use the lines[1] sub for exactly this. Similarly for this line

for @ReturnAry[ 0 .. @ReturnAry.elems - 3 ]  -> $Line

You can use the head[2] sub to write it as

for @ReturnAry.head(*.elems - 3) -> $line

Also, on the

$ReturnStr += $Line

If you're trying to concatenate a string, you should use the ~ instead
of the +, so it'd become

$ReturnStr ~= $Line

[1]: https://docs.perl6.org/routine/lines
[2]: https://docs.perl6.org/routine/head

On Sat, 28 Jul 2018 23:46:30 -0700
ToddAndMargo  wrote:

> On 07/28/2018 01:37 AM, ToddAndMargo wrote:
> > Hi All,
> > 
> > How do I get the bash return code ("$?") from
> > the following?
> > 
> > $ReturnStr = qqx ( curl $TimeOutStr -L $Url -o $FileName ).lines;
> > 
> > 
> > Many thanks,
> > -T  
> 
> 
> Followup:
> 
> This is what I came up with:
> 
> if $ProgressBar {
># This need a space ofter the qqx
># $ p6 'my $x="cat /etc/hosts; echo \$\?"; my @y = split "\n", 
> qqx ( $x ); say @y[@y.elems-2];'
># 0
># 
> 
> 
>@ReturnAry = split "\n", qqx ( curl $TimeOutStr -L $Url -o 
> $FileName; echo \$\? );
>for @ReturnAry[ 0 .. @ReturnAry.elems - 3 ]  -> $Line { 
> $ReturnStr += $Line; }
>print "\n";
>$ReturnCode = @ReturnAry[ @ReturnAry.elems - 2 ];
> 
> } else {
>( $ReturnStr, $ReturnCode ) = RunNoShell ( "curl $TimeOutStr
> -L $Url -o $FileName" );
> }
> return ( $ReturnStr, $ReturnCode );

-BEGIN PGP SIGNATURE-

iQEzBAEBCAAdFiEE4eL662U9iK2ST2MqN/W6H45XOE8FAltdkOYACgkQN/W6H45X
OE+73gf+Ko8Wrm3aySxtsMsuVAWT+V4iNanSpEo8jj27+OUgQCmC1vY0yR7BkrJS
vb1WnM2TvzrxBlc/L9QF7dJaJfBkcB2Nera+PJWkdZlYegvmA9vKHbjyxl/Nvyi6
8M1GjtsmTKUFz3OT3T60fXYiRwiu2vG+OBeN4riWDI4HO9OiXw+kqcuUsymavNo3
6YdXXhwyfKLx+kdsIT1UAfSfWY+B53attz/XwTkiz8VH3cSP1zQtvx+zh5KbvA+i
CViRZQAvkeasQ77d70H9fd+oYhgJqHCF5/SSlB1MDP2Rn9YZDxhfDgsHuNEWjplm
7NTZDIMBn5JXLgSOkyulC+xIBG0sXg==
=Dk+C
-END PGP SIGNATURE-


Re: Bailador vs. Cro

2018-07-09 Thread Patrick Spek via perl6-users
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

I've only done some very basic stuff with both Cro and Bailador. From
what I can tell, Cro requires less code to get something going in, but
Bailador is easier to get a regular MVC model working in.

Have you read through the Cro SPA tutorial?
https://cro.services/docs/intro/spa-with-cro

It details setup for an API with a React+Redux frontend.

On Mon, 9 Jul 2018 03:01:34 +0200
mimosinnet  wrote:

> Hi all,
> 
> Appart from pure hobbyist pleasure, I use Perl for some personal web 
> development. I have (solely) used Mojolicious, really had fun, and 
> learned Perl using it. I have been for some time looking for a Perl6 
> framework for web development (Perl6 bewitched me), and Bailador
> looks like an attractive Perl6 starting point.
> 
> While trying to build an application with Bailador, I came across
> with Cro. While it looked quite complicated at the beginning, after
> watching Jonathan Worthington presentation [1] Cro looks quite
> versatile, close to new Perl6 features and very Promising ("anything
> can be put behind a Promise, but they can also be broken"). This
> weekend, I have been trying to build a simple web application with
> Cro [2], and it more or less worked out (and learned a lot of Perl6).
> 
> Before investing more time in this project, I wonder if you have any 
> advice or suggestions on Bailador, Cro (or another framework like
> Hiker [3]). Also, I would appreciate if you could point to some
> working examples (like [4]  or [5] ).
> 
> Many thanks! 
> 
> [1] https://www.youtube.com/watch?v=6CsBDnTUJ3A
> [2] https://github.com/mimosinnet/Cro-Personal-Web
> [3] https://github.com/tony-o/perl6-hiker
> [4] https://github.com/lancew/MyJudo
> [5] https://github.com/szabgab/Perl6-Maven
> 

-BEGIN PGP SIGNATURE-

iQEzBAEBCAAdFiEE4eL662U9iK2ST2MqN/W6H45XOE8FAltDRkYACgkQN/W6H45X
OE/plQf9H4WsdaYSnG44JFUBMWlPuS7RAjbeVmZw7SQ2nj7buBmDpQqteu7XdBY7
659myZLGQuBjC9c3yeQqWycdF3u9pAvyP9YNLWNlTGcwTv3ODfuxoHNCg+Xbf+zK
00xBsaebyvU32904w7I/CYueQIzVGxGhnuvtFKnisyIs2qy/EzxlSGNLk75yj4J0
R0nta5YD/cH5X66zbyvQ7grd4j7fh/VlhiGZx2z7VF/mLJxfTPIHUjflgSjNDioC
VoUXAfi++jPN6GnMFqkvmtdMZZMz39/H1w7HkqoSF15z2wH61a2wYrwoJvSBgc4c
xVDJ1oIg8vmt80f7DTcXzmUMkSk6pA==
=KSuY
-END PGP SIGNATURE-


Re: need help with zef error

2018-06-13 Thread Patrick Spek via perl6-users
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

I just tried this myself:

tyil@bast:~ » zef install IO::Socket::SSL
===> Searching for: IO::Socket::SSL
===> Updated cpan mirror: 
https://raw.githubusercontent.com/ugexe/Perl6-ecosystems/master/cpan.json
===> Updated p6c mirror: http://ecosystem-api.p6c.org/projects.json
===> Searching for missing dependencies: OpenSSL
===> Testing: OpenSSL:ver<0.1.19>:auth
# NETWORK_TESTING was not set
# NETWORK_TESTING was not set
===> Testing [OK] for OpenSSL:ver<0.1.19>:auth
===> Testing: IO::Socket::SSL:ver<0.0.1>:auth
# NETWORK_TESTING was not set
===> Testing [OK] for IO::Socket::SSL:ver<0.0.1>:auth
===> Installing: OpenSSL:ver<0.1.19>:auth
===> Installing: IO::Socket::SSL:ver<0.0.1>:auth

No problems detected. I do have a Perl 6 installed differently than
you, but that shouldn't be an issue on itself.

My `perl6 -v` output is

This is Rakudo Star version 2018.04.1 built on MoarVM version
2018.04.1 implementing Perl 6.c.

Can I ask you which distro you're using and what your `perl6 -v` output
is?

On Wed, 13 Jun 2018 23:40:31 -0700
Todd Chester  wrote:

> $ /opt/rakudo-pkg/bin/zef install IO::Socket::SSL
> ===> Searching for: IO::Socket::SSL
> ===> Searching for missing dependencies: OpenSSL
> ===> Fetching [FAIL]:
> IO::Socket::SSL:ver('0.0.1'):auth('github:sergot') from
> git://github.com/sergot/io-socket-ssl.git Aborting due to fetch
> failure: IO::Socket::SSL:ver('0.0.1'):auth('github:sergot')(use
> --force to override) in code  at 
> /home/todd/.perl6/sources/3192BD24F21B007D17D5398A1BEB41886A372215 
> (Zef::Client) line 205
>in method fetch at 
> /home/todd/.perl6/sources/3192BD24F21B007D17D5398A1BEB41886A372215 
> (Zef::Client) line 173
>in method fetch at 
> /home/todd/.perl6/sources/3192BD24F21B007D17D5398A1BEB41886A372215 
> (Zef::Client) line 161
>in sub MAIN at 
> /home/todd/.perl6/sources/16B60ECDC98BB269498FB2064857E4355FBF945D 
> (Zef::CLI) line 120
>in block  at 
> /home/todd/.perl6/resources/09C71DE0BF8C31A0E3291B1471D521114E17F384
> line 1 in sub MAIN at /opt/rakudo-pkg/bin/zef line 2
>in block  at /opt/rakudo-pkg/bin/zef line 2

-BEGIN PGP SIGNATURE-

iQEzBAEBCAAdFiEE4eL662U9iK2ST2MqN/W6H45XOE8FAlsiEA8ACgkQN/W6H45X
OE9wLgf/Wx9FCM+aPnesx5rzf5ThL2yJj2QBKzm5NZPj5AZNuhcFBLX7PVXNQJW5
iHG8VH3NVLqM8z+lxCljgBidzii6zyXAlmBkX1YZBez0ddpz6pSZSKp9ghB1mVR5
OU7760asVbKbO/5GmSnqTvhNI+AiPZvhLFkLZ00VSsjhcmecY05GxSYFN2/Ie1Q8
ZUSHrglCdKKJ/+t/5oYYwDYk4ATZ5fd5SIktkhQZCjG2Oa7LIKN5wn4H9VOobvt8
pnDceVAjRF0RdPoPyvz9UlK36IlQw0mDOjjoR4+d5PvBju/69+7urhwxncjh8KVC
DvW2YnZbosfMkjSwrZ3kDUpdWjzM+A==
=izqA
-END PGP SIGNATURE-


Re: How to print colorized text to the terminal

2018-06-03 Thread Patrick Spek via perl6-users
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

In proper Perl fashion, there's a module for this:
https://github.com/tadzik/Terminal-ANSIColor

I haven't used it myself, so I'm not sure how well it works, but it's
worth a shot at least.

On Sun, 3 Jun 2018 20:41:32 -0400
Xin Cheng  wrote:

> Hi,
> 
> I am trying to make a program to do grep with perl6 regular
> expression, and I would like to colorize the matched part to the
> terminal. So the following is what I wrote 
> 
> sub MAIN(Str $pattern,Str $filename){
> for $filename.IO.lines -> $line  {
> my Str $temp = $line;
> if $temp ~~ s/ (<$pattern>) /\\x1b\[31m$0\\x1b\[0m/ {say
> $temp}; # if no <> surrounding $pattern it becomes literal. }
> }
> 
> And I named the program as grep6, and I tried it in zsh as
> 
> > grep6 'M.*N' =grep6  
> 
> And I got,
> 
> sub \x1b[31mMAIN\x1b[0m(Str $pattern,Str $filename){
> 
> How do I turn the string into color?
> 
> Thanks!
> 
> Xin
-BEGIN PGP SIGNATURE-

iQEzBAEBCAAdFiEE4eL662U9iK2ST2MqN/W6H45XOE8FAlsUlAUACgkQN/W6H45X
OE99fAgAjm1X4aRFUcWcJM2pLnbxy69XxaG//1ZvGROm/+iO96s2/WlTFMf5httI
DJeJFQ5XTzGSwKQUn5PJXhMTCEqzcl8Niqtb/Armat8WCPgXW4DWjhlc9i+4nLiJ
mEv+TljWn1oEUEcC7jO4M60SfddXl9Uy+v5VUnl59NNcX3LwgGRYKQ9e3eDjyIGW
0aKL4KvDw3LvchxGJdc8BeNXvlvQLmyeousaP/xIWLNObphsRME3VDd4myL7dUxJ
bQreldZEFztz4ogTh7a/KnjHGZ46NyaY6LJZh1fa7cRvYNNkIMR8em5Js0/9dSAA
NCTm3why/Z6EBiWrWhPyBNNvRbiYaQ==
=EDFv
-END PGP SIGNATURE-


Re: need second pair of eyes

2018-06-03 Thread Patrick Spek via perl6-users
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

No problem!

To be precise, -e can be easily remembered from "evaluate" (which I
think is also what it actually stands for).

On Sun, 3 Jun 2018 16:08:04 -0700
ToddAndMargo  wrote:

> On 06/03/2018 03:57 PM, Patrick Spek via perl6-users wrote:
> > It's not that it particularly dislikes it, but you have to think
> > about it in what the options do, and what you want to accomplish.
> > 
> > In a regular Perl 6 script, you'd also have to consider the order in
> > which you do a similar thing. First, you need to make sure the
> > include paths are correct, so the module can be found. Then, you
> > have to `use` the module, so that you can access the subs and
> > classes it exports. Finally, you want to let it run some piece of
> > code that gets you where you want to go.
> > 
> > This is what -I, -M and -e do, respectively, when ran as a one-liner
> > from the shell.  
> 
> Makes total sense.  -e means go do something.
> 
> My goof up was my alias
> 
> $ alias p6
> alias p6='perl6 -e'
> 
> I had to write the thing out.
> 
> I mainly use one liners to test out syntax, especially
> regex's before stitching them into my programs.
> 
> And, now that I have your recommendations written down,
> I should not forget them again.
> 
> Thank you for the help!

-BEGIN PGP SIGNATURE-

iQEzBAEBCAAdFiEE4eL662U9iK2ST2MqN/W6H45XOE8FAlsUd+gACgkQN/W6H45X
OE/SaQf/Rvll52ckA+KRmpH6E0YHKarxDSQA6xeSnWHVpIh3r3FgQUvLX8FZEgcv
3mOsNNrglACC2+w9jO78zN/TCMFiInr0CAWyebgLLH0JbhLzyereZx6CtDfV17Qt
StsSAzAHK51DAFkqOwJILkZ0aMIk/ooqaXzeAU4SWP3oeBBg0DpzdWRDvh9/t1S7
UTX0AzMraR0P1cx8Y1h6lCyohHL1ynqjxNsq9Ut1OvTFXatwZZBoQpYEK/GkKQRn
AOWMNjiPv5PqPleAZrYQJv18toqbGAfRPHyt8wmMh79IXljPJZogohVheWUFa78R
UlugiKqSOJPVkJBsWrozuR+5CXbKXA==
=t7Ue
-END PGP SIGNATURE-


Re: need second pair of eyes

2018-06-03 Thread Patrick Spek via perl6-users
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

It's not that it particularly dislikes it, but you have to think about
it in what the options do, and what you want to accomplish.

In a regular Perl 6 script, you'd also have to consider the order in
which you do a similar thing. First, you need to make sure the include
paths are correct, so the module can be found. Then, you have to `use`
the module, so that you can access the subs and classes it exports.
Finally, you want to let it run some piece of code that gets you where
you want to go.

This is what -I, -M and -e do, respectively, when ran as a one-liner
from the shell.

On Sun, 3 Jun 2018 15:47:06 -0700
ToddAndMargo  wrote:

> >>   On Sun, 3 Jun 2018 15:22:17
> >> - -0700 ToddAndMargo  wrote:
> >>   
> >>> On 06/03/2018 03:06 PM, Brad Gilbert wrote:  
> >>>> It's -I. not -I  
> >>>
> >>> perl6 -I. -MRunNoShell '( my $a, my $b ) = RunNoShell("ls
> >>> \*.pm6"); say $a;' Could not open ( my $a, my $b ) =
> >>> RunNoShell("ls \*.pm6"); say $a;. Failed to stat file: no such
> >>> file or directory  
> 
> On 06/03/2018 03:39 PM, Patrick Spek via perl6-users wrote:
> > -BEGIN PGP SIGNED MESSAGE-
> > Hash: SHA256
> > 
> > You're missing `-e` here, it should be
> > 
> >  perl6 -I. -MRunNoShell -e '( my $a, my $b ) = RunNoShell("ls
> > \*.pm6");
> > 
> > For further clarification, the `.` after `-I` indicates the
> > directory that is being added to the paths Perl 6 checks for
> > libraries that are being used. Hence the `.` is needed to indicate
> > the current directory. I'm not sure if `-I` arguments get appended
> > or prepended to the list of paths.
> > 
> > The `-e` is for the expression that is to be run. Otherwise, it'll
> > try to open the argument as if it were a filename, which is why you
> > get the "no such file or directory" error.
> >   
> 
> Indeed!  Thank you!  I am putting this in my Keepers one liner file!
> 
> perl6 -I. -MRunNoShell -e '( my $a, my $b ) = RunNoShell("ls"); say
> $a;'
> 
> And it does not like the -e until after the I and the M

-BEGIN PGP SIGNATURE-

iQEzBAEBCAAdFiEE4eL662U9iK2ST2MqN/W6H45XOE8FAlsUcmUACgkQN/W6H45X
OE/imQf/dNAwMg2/ufFx+5lukuoNjDqEsHsmuOIfR8hk/UZANfC0FYTW5vD6wHXb
DFjwXzmSddAKn9FQkp3A0LuRb01RXn7Bd1i9aUI+a/1Q4djXRyD4TJDVhrE3OAXo
o4/T3DKnNQchcvyMjxog1fimPUZspC9jGz57FJUnA3Q3lKgS7HHsT+aUIs34lyC7
HiTtuWXrL1EFxGgww96ig6ce+/yaRT8oFzadGBcokmo+mP6b4oCufqmJYRXohjUh
oQxSRnduzgnHyIoxFeUFpIqZYK/8471wD4Eqz//QyBBOltQR8s2Bj2BaFDpnB2Gy
3XWRmdgCVJlKvkWH+dHumsWR9ZiaYw==
=/+hA
-END PGP SIGNATURE-


Re: need second pair of eyes

2018-06-03 Thread Patrick Spek via perl6-users
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

You're missing `-e` here, it should be

perl6 -I. -MRunNoShell -e '( my $a, my $b ) = RunNoShell("ls \*.pm6");

For further clarification, the `.` after `-I` indicates the directory
that is being added to the paths Perl 6 checks for libraries that are
being used. Hence the `.` is needed to indicate the current directory.
I'm not sure if `-I` arguments get appended or prepended to the list of
paths.

The `-e` is for the expression that is to be run. Otherwise, it'll try
to open the argument as if it were a filename, which is why you get the
"no such file or directory" error.

 On Sun, 3 Jun 2018 15:22:17
- -0700 ToddAndMargo  wrote:

> On 06/03/2018 03:06 PM, Brad Gilbert wrote:
> > It's -I. not -I  
> 
> perl6 -I. -MRunNoShell '( my $a, my $b ) = RunNoShell("ls \*.pm6");
> say $a;' Could not open ( my $a, my $b ) = RunNoShell("ls \*.pm6");
> say $a;. Failed to stat file: no such file or directory

-BEGIN PGP SIGNATURE-

iQEzBAEBCAAdFiEE4eL662U9iK2ST2MqN/W6H45XOE8FAlsUbgcACgkQN/W6H45X
OE8tcwf8DObCw9+ZDF2cNGfy8p4fc69HFS/FYjcfEGISFYZwi+s+xluQ7N1OTmKx
8Eiw0h5JFXh3CQTB2gFchjRzMjxhuXR1dqhPTUqak89s9919oiNcxQUvF5iJ61o+
SIB8xXDvqfrV6ogTX8fetqWPWL3MN2o0j6UewelCzh/TyG0etZ8b/QhJCZe3pYi7
FTHTMrgFjhb2bZhrP7qFchc/GzvhNedN9Gz5ppti8tdxDNSPLDQiHyTxCULi1Zqo
/afENk+qyGn6u3x03WFCdMMN7m0G5Xxcn8spvApbBwjWJYL8o183oxEFJkHyic8J
BwNwa7oMN1/ZovFHdhFsSh5s+8KcCQ==
=u8yi
-END PGP SIGNATURE-


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

2018-06-03 Thread Patrick Spek via perl6-users
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

On Sun, 3 Jun 2018 13:13:31 -0700
ToddAndMargo  wrote:

> Does Perl 6 have a built in recursive rmdir
> equivalent to LINUX's `rmdir --parents path`?

For this, there's `rmtree` in the `File::Directory::Tree` module. It is
referenced in the docs: https://docs.perl6.org/routine/rmdir

> Also, does Perl6 have a built in recursive mkdir
> equivalent to LINUX's `mkdir --parents path`?

Also in the docs here: https://docs.perl6.org/routine/mkdir. This
behaviour you're looking for is the default behaviour of `mkdir` in
Pelr 6. To quote from the docs: 

> Also creates parent directories, as needed (similar to *nix utility
> mkdir with -p option); that is, mkdir "foo/bar/ber/meow" will create
> foo, foo/bar, and foo/bar/ber directories if they do not exist, as
> well as foo/bar/ber/meow.
-BEGIN PGP SIGNATURE-

iQEzBAEBCAAdFiEE4eL662U9iK2ST2MqN/W6H45XOE8FAlsUT2MACgkQN/W6H45X
OE9tPQf/RUGmdavSEDye4RIAbHpIkkikaIfj7dK0ym+63tsb/d1SceBtjK6AX6j8
5mu7/uNYAYWrbOKaxbLCk7lPbT3U20Ata9ntNKadi7irDAo8q9b7y/3GVi2avuQS
j9H2HAEtOfwjXhbBpvCo+Hq2XrTT8/wRyDyHFtm59Uqdx8njtpPwmEcDx/+GQj3r
d/ASoyTNo12CsL0sxTTpE8P93Gcj/lR7xRdmXAieVjSdz3HM7QNaAYsMi4I//qxq
dXONoPtzPrTpH4NJdnfyV+qGG8aHlPEeXAPvKHom92D/TVLu5KQICwqWRddaai9C
pFpDXUu/Tsm2DfFIte6QhKdWXq8tKA==
=rA+y
-END PGP SIGNATURE-


Re: <> question

2018-06-03 Thread Patrick Spek via perl6-users
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

The < > syntax is a bit like qw<> from Perl 5. You'll get a List (or
Array, not sure which type exactly from it. So



is a list with two elements, "myfile1" and "myfile2". If you want to
use a variable, you can just provide it with one or more variables:

chmod 0o755, $myfile
chmod 0o755, ($myfile1, $myfile2)

On Sun, 3 Jun 2018 13:08:26 -0700
ToddAndMargo  wrote:

> On 06/03/2018 11:01 AM, Brandon Allbery wrote:
> > Is there something missing in the examples at the link?  
> 
> Well, a bit.  When I see
> 
>  chmod 0o755, ;
> 
> I think `myfile1` and `myfile2` are "functions", not
> data.
> 
> I instead look for something like
> 
>  chmod 0o755, < $myfile1   $myfile2 >;
> or  chmod 0o755, < "myfile1"  "myfile2" >;
> 
> And to make matter worse, the example does not work:
> 
> $ touch a b c
> $ p6 'chmod 0o777 < a b c >;'
> ===SORRY!=== Error while compiling -e
> Preceding context expects a term, but found infix > instead.
> at -e:1
> --> chmod 0o777 < a b c >⏏;  
> 
> 
> $ p6 'chmod 0o777 < "a" "b" "c" >;'
> ===SORRY!=== Error while compiling -e
> Two terms in a row
> at -e:1
> --> chmod 0o777 < "a"⏏ "b" "c" >;  
>  expecting any of:
>  infix
>  infix stopper
>  postfix
>  statement end
>  statement modifier
>  statement modifier loop
> 
> 
> $ p6 'chmod 0o777 < "a", "b", "c" >;'
> ===SORRY!=== Error while compiling -e
> Missing required term after infix
> at -e:1
> --> chmod 0o777 < "a", "b", "c" >⏏;  
>  expecting any of:
>  prefix
>  term

-BEGIN PGP SIGNATURE-

iQEzBAEBCAAdFiEE4eL662U9iK2ST2MqN/W6H45XOE8FAlsUTrcACgkQN/W6H45X
OE/ILwf/X7mElQ7bPzRBA3i7Vm4pi3E6/bUpf2SMz5LB3UhfVKHNSV5/fXGE1a/W
9oa5klItWioH5m+NF+3KeOyufxc1tDm+hN5I2iac8xNTkE4bHfna9tOK03xvQXLf
t3x/jMTW1YN0jsvOWJLCi4UgBOqs/1B5Z3HzV6X1XPXjU1qNphYRf8huRtg+lxBb
CQWFQgKljNzvNVqSWlG3J3XTTXdQZ69juW5LQC+a3C7y0/44jvas0eS/C3uGG48y
O7rDG75V6y8ZfWBzFSIiCycH0fOcnYxE64brsPiaP0limVgMyac4YU15ixrEocxK
Q83aFB+yIYVNSlfYl8Llw2ZofOlM9Q==
=SSBB
-END PGP SIGNATURE-