Re: Handing over control
> > >>> >> On 3 Sep 2018, at 18:41, Parrot Raiser <1parr...@gmail.com> wrote: >> >>> >> In Perl 5, a program can hand over control to another with exec: >> >>> >> https://perldoc.perl.org/functions/exec.html >> >>> >> e.g perl -e 'exec vim' opens up vim >> >>> >> >> >>> >> What's the Perl 6 equivalent? >> > I can't fix the problems previously pointed out, and this won't help with Windows, but for Unixy systems, I put a little wrapper around exec* in the ecosystem, as Native::Exec perl6 -MNative::Exec -e "exec 'vim'"
Re: Handing over control
And the "exit" should be redundant in that case. On Mon, Sep 3, 2018 at 1:29 PM Parrot Raiser <1parr...@gmail.com> wrote: > But this: > > perl6 -e 'shell("vim sample"); exit' > > behaves acceptably. > > On 9/3/18, Parrot Raiser <1parr...@gmail.com> wrote: > > Is Windows really that brain-dead? Pity it has to sabotage everyone else. > > > > This invokes vim successfully, but leaves an ugly error message around: > > > > perl6 -e 'exit shell("vim sample")' > > No such method 'Int' for invocant of type 'Proc' > > in block at -e line 1 > > > > > > On 9/3/18, Brandon Allbery wrote: > >> It's not basic: Windows doesn't have it at all, it has to be simulated. > >> The > >> intent is that system dependent things like that should be external to > >> the > >> core. > >> > >> On Mon, Sep 3, 2018 at 12:56 PM Parrot Raiser <1parr...@gmail.com> > wrote: > >> > >>> Thanks for the reply. That didn't show up with any search string I > >>> could contrive. > >>> It's disappointing to lose a basic ability like handing over control > >>> to another program. > >>> > >>> On 9/3/18, Elizabeth Mattijsen wrote: > >>> > https://docs.perl6.org/language/5to6-perlfunc#exec > >>> > > >>> >> On 3 Sep 2018, at 18:41, Parrot Raiser <1parr...@gmail.com> wrote: > >>> >> > >>> >> In Perl 5, a program can hand over control to another with exec: > >>> >> https://perldoc.perl.org/functions/exec.html > >>> >> e.g perl -e 'exec vim' opens up vim > >>> >> > >>> >> What's the Perl 6 equivalent? > >>> > > >>> > >> > >> > >> -- > >> brandon s allbery kf8nh > >> allber...@gmail.com > >> > > > -- brandon s allbery kf8nh allber...@gmail.com
Re: Handing over control
But this: perl6 -e 'shell("vim sample"); exit' behaves acceptably. On 9/3/18, Parrot Raiser <1parr...@gmail.com> wrote: > Is Windows really that brain-dead? Pity it has to sabotage everyone else. > > This invokes vim successfully, but leaves an ugly error message around: > > perl6 -e 'exit shell("vim sample")' > No such method 'Int' for invocant of type 'Proc' > in block at -e line 1 > > > On 9/3/18, Brandon Allbery wrote: >> It's not basic: Windows doesn't have it at all, it has to be simulated. >> The >> intent is that system dependent things like that should be external to >> the >> core. >> >> On Mon, Sep 3, 2018 at 12:56 PM Parrot Raiser <1parr...@gmail.com> wrote: >> >>> Thanks for the reply. That didn't show up with any search string I >>> could contrive. >>> It's disappointing to lose a basic ability like handing over control >>> to another program. >>> >>> On 9/3/18, Elizabeth Mattijsen wrote: >>> > https://docs.perl6.org/language/5to6-perlfunc#exec >>> > >>> >> On 3 Sep 2018, at 18:41, Parrot Raiser <1parr...@gmail.com> wrote: >>> >> >>> >> In Perl 5, a program can hand over control to another with exec: >>> >> https://perldoc.perl.org/functions/exec.html >>> >> e.g perl -e 'exec vim' opens up vim >>> >> >>> >> What's the Perl 6 equivalent? >>> > >>> >> >> >> -- >> brandon s allbery kf8nh >> allber...@gmail.com >> >
Re: Handing over control
fork/exec is a Unix-specific idiom. shell throws (well, produces a Failure that is thrown when sunk), so you don't need the exit. On Mon, Sep 3, 2018 at 1:10 PM Parrot Raiser <1parr...@gmail.com> wrote: > Is Windows really that brain-dead? Pity it has to sabotage everyone else. > > This invokes vim successfully, but leaves an ugly error message around: > > perl6 -e 'exit shell("vim sample")' > No such method 'Int' for invocant of type 'Proc' > in block at -e line 1 > > > On 9/3/18, Brandon Allbery wrote: > > It's not basic: Windows doesn't have it at all, it has to be simulated. > The > > intent is that system dependent things like that should be external to > the > > core. > > > > On Mon, Sep 3, 2018 at 12:56 PM Parrot Raiser <1parr...@gmail.com> > wrote: > > > >> Thanks for the reply. That didn't show up with any search string I > >> could contrive. > >> It's disappointing to lose a basic ability like handing over control > >> to another program. > >> > >> On 9/3/18, Elizabeth Mattijsen wrote: > >> > https://docs.perl6.org/language/5to6-perlfunc#exec > >> > > >> >> On 3 Sep 2018, at 18:41, Parrot Raiser <1parr...@gmail.com> wrote: > >> >> > >> >> In Perl 5, a program can hand over control to another with exec: > >> >> https://perldoc.perl.org/functions/exec.html > >> >> e.g perl -e 'exec vim' opens up vim > >> >> > >> >> What's the Perl 6 equivalent? > >> > > >> > > > > > > -- > > brandon s allbery kf8nh > > allber...@gmail.com > > > -- brandon s allbery kf8nh allber...@gmail.com
Re: Handing over control
Is Windows really that brain-dead? Pity it has to sabotage everyone else. This invokes vim successfully, but leaves an ugly error message around: perl6 -e 'exit shell("vim sample")' No such method 'Int' for invocant of type 'Proc' in block at -e line 1 On 9/3/18, Brandon Allbery wrote: > It's not basic: Windows doesn't have it at all, it has to be simulated. The > intent is that system dependent things like that should be external to the > core. > > On Mon, Sep 3, 2018 at 12:56 PM Parrot Raiser <1parr...@gmail.com> wrote: > >> Thanks for the reply. That didn't show up with any search string I >> could contrive. >> It's disappointing to lose a basic ability like handing over control >> to another program. >> >> On 9/3/18, Elizabeth Mattijsen wrote: >> > https://docs.perl6.org/language/5to6-perlfunc#exec >> > >> >> On 3 Sep 2018, at 18:41, Parrot Raiser <1parr...@gmail.com> wrote: >> >> >> >> In Perl 5, a program can hand over control to another with exec: >> >> https://perldoc.perl.org/functions/exec.html >> >> e.g perl -e 'exec vim' opens up vim >> >> >> >> What's the Perl 6 equivalent? >> > >> > > > -- > brandon s allbery kf8nh > allber...@gmail.com >
Re: Handing over control
It's not basic: Windows doesn't have it at all, it has to be simulated. The intent is that system dependent things like that should be external to the core. On Mon, Sep 3, 2018 at 12:56 PM Parrot Raiser <1parr...@gmail.com> wrote: > Thanks for the reply. That didn't show up with any search string I > could contrive. > It's disappointing to lose a basic ability like handing over control > to another program. > > On 9/3/18, Elizabeth Mattijsen wrote: > > https://docs.perl6.org/language/5to6-perlfunc#exec > > > >> On 3 Sep 2018, at 18:41, Parrot Raiser <1parr...@gmail.com> wrote: > >> > >> In Perl 5, a program can hand over control to another with exec: > >> https://perldoc.perl.org/functions/exec.html > >> e.g perl -e 'exec vim' opens up vim > >> > >> What's the Perl 6 equivalent? > > > -- brandon s allbery kf8nh allber...@gmail.com
Re: Handing over control
Thanks for the reply. That didn't show up with any search string I could contrive. It's disappointing to lose a basic ability like handing over control to another program. On 9/3/18, Elizabeth Mattijsen wrote: > https://docs.perl6.org/language/5to6-perlfunc#exec > >> On 3 Sep 2018, at 18:41, Parrot Raiser <1parr...@gmail.com> wrote: >> >> In Perl 5, a program can hand over control to another with exec: >> https://perldoc.perl.org/functions/exec.html >> e.g perl -e 'exec vim' opens up vim >> >> What's the Perl 6 equivalent? >
Re: Handing over control
https://docs.perl6.org/language/5to6-perlfunc#exec > On 3 Sep 2018, at 18:41, Parrot Raiser <1parr...@gmail.com> wrote: > > In Perl 5, a program can hand over control to another with exec: > https://perldoc.perl.org/functions/exec.html > e.g perl -e 'exec vim' opens up vim > > What's the Perl 6 equivalent?
Handing over control
In Perl 5, a program can hand over control to another with exec: https://perldoc.perl.org/functions/exec.html e.g perl -e 'exec vim' opens up vim What's the Perl 6 equivalent?