Re: Handing over control

2018-09-06 Thread Curt Tilmes
>
> >>> >> 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

2018-09-03 Thread Brandon Allbery
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

2018-09-03 Thread Parrot Raiser
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

2018-09-03 Thread Brandon Allbery
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

2018-09-03 Thread Parrot Raiser
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

2018-09-03 Thread Brandon Allbery
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

2018-09-03 Thread Parrot Raiser
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

2018-09-03 Thread Elizabeth Mattijsen
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

2018-09-03 Thread Parrot Raiser
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?