Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[perl #70297] [BUG] No explicit ^D and no newline after ^D in the REPL in Rakudo

2 views
Skip to first unread message

Carl Mäsak

unread,
Nov 6, 2009, 11:50:45 AM11/6/09
to bugs-bi...@netlabs.develooper.com
# New Ticket Created by "Carl Mäsak"
# Please include the string: [perl #70297]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=70297 >


kaye:~ masak$ perl6
> kaye:~ masak$

Compare irb and python:

$ irb
>> ^Dkaye:~ masak$

kaye:~ masak$ python
Python 2.6.1 (r261:67515, Jul 7 2009, 23:51:51)
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> ^D
kaye:~ masak$

Irb shows a '^D'. Python does both that and puts in an extra newline
to unclutter things. Python has it right, IMHO.

Will Coleda

unread,
Nov 6, 2009, 1:10:45 PM11/6/09
to perl6-c...@perl.org, bugs-bi...@netlabs.develooper.com

To provide another interactive shell example (but not a vote):

(I hit ^D after the %)

$ tclsh8.5
% $


--
Will "Coke" Coleda

Geoffrey Broadwell

unread,
Nov 6, 2009, 2:47:33 PM11/6/09
to Will Coleda, perl6-c...@perl.org, bugs-bi...@netlabs.develooper.com
I have always preferred the look that masak++ suggests: ^D or ^C or ^Z
(as appropriate) followed by newline. Thus I vote +1, as long as the
correct character can be determined in the current environment. I also
like to see "Received SIGFOO, exiting.\n" for signals that we interpret
as ending the REPL session.


-'f


Carl Mäsak via RT

unread,
Jan 22, 2013, 9:29:29 AM1/22/13
to perl6-c...@perl.org
On Sat Oct 01 15:16:23 2011, masak wrote:
> On Sat Oct 01 04:22:04 2011, moritz wrote:
> > Now a EOF (Ctrl+D) is answered with a newline, and the REPL exits.
> >
> > Closing without spectests, because the REPL isn't specced.
>
> As the original submitter, I'm reopening the ticket because only one of
> the two expected behaviours is observed. The newline is there, but not
> the "^D".

...and now, in 2013, we have neither "^D" nor newline.

Will Coleda via RT

unread,
May 10, 2016, 12:45:01 PM5/10/16
to perl6-c...@perl.org
On Sat Jul 18 08:07:40 2015, lue wrote:
> None of the interpreters I tried (which include irb, python, python3,
> and ghci) show "^D" upon pressing Ctrl-D, so I don't think this is
> something the Perl 6 REPL should do. Whether it should print a newline
> or not is still a question, however (currently it doesn't, the other
> interpreters I tried do).

Here's my REPL today, first exiting with ^D.

$ perl6
To exit type 'exit' or '^D'
> 2+20
22
>

$

Then with exit:

$ perl6
To exit type 'exit' or '^D'
> 3+4
7
> exit
$


I think this meets the criteria of the original request. Closable with tests.


--
Will "Coke" Coleda
0 new messages