unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* scheme@(guile-user)> considered ugly
@ 2010-10-01  9:45 Andy Wingo
  2010-10-01 22:55 ` Ludovic Courtès
  0 siblings, 1 reply; 3+ messages in thread
From: Andy Wingo @ 2010-10-01  9:45 UTC (permalink / raw)
  To: guile-devel

Hey all,

I'm thinking that our prompt is really ugly. Sure, it's useful to know
what language and module you're in (though you probably know the
language). But I was just going over some docs and the prompt really
makes it hard to read. The interaction transcript went like this:

     scheme@(guile-user)> (define abc "hello")
     scheme@(guile-user)> abc
     $1 = "hello"
     scheme@(guile-user)> aBc
     <unknown-location>: warning: possibly unbound variable `aBc'
     ERROR: In procedure module-lookup:
     ERROR: Unbound variable: aBc
     Entering a new prompt.  Type `,bt' for a backtrace or `,q' to continue.
     scheme@(guile-user) [1]> (read-options 'help)
     copy              no    Copy source code expressions.
     positions         yes   Record positions of source code expressions.
     case-insensitive  no    Convert symbols to lower case.
     keywords          #f    Style of keyword recognition: #f, 'prefix or 'postfix.
     r6rs-hex-escapes  no    Use R6RS variable-length character and string hex escapes.
     square-brackets   yes   Treat `[' and `]' as parentheses, for R6RS compatibility.
     scheme@(guile-user) [1]> (read-enable 'case-insensitive)
     $2 = (square-brackets keywords #f case-insensitive positions)
     scheme@(guile-user) [1]> ,q
     scheme@(guile-user)> aBc
     $3 = "hello"

But what if we elide the language and deparen the module:

     guile-user> (define abc "hello")
     guile-user> abc
     $1 = "hello"
     guile-user> aBc
     <unknown-location>: warning: possibly unbound variable `aBc'
     ERROR: In procedure module-lookup:
     ERROR: Unbound variable: aBc
     Entering a new prompt.  Type `,bt' for a backtrace or `,q' to continue.
     guile-user [1]> (read-options 'help)
     copy              no    Copy source code expressions.
     positions         yes   Record positions of source code expressions.
     case-insensitive  no    Convert symbols to lower case.
     keywords          #f    Style of keyword recognition: #f, 'prefix or 'postfix.
     r6rs-hex-escapes  no    Use R6RS variable-length character and string hex escapes.
     square-brackets   yes   Treat `[' and `]' as parentheses, for R6RS compatibility.
     guile-user [1]> (read-enable 'case-insensitive)
     $2 = (square-brackets keywords #f case-insensitive positions)
     guile-user [1]> ,q
     guile-user> aBc
     $3 = "hello"

Is that better? Or is there a better way to make things readable? Like
an extra fresh line before the prompt:

     guile-user> (define abc "hello")

     guile-user> abc
     $1 = "hello"

     guile-user> aBc
     <unknown-location>: warning: possibly unbound variable `aBc'

     ERROR: In procedure module-lookup:
     ERROR: Unbound variable: aBc
     Entering a new prompt.  Type `,bt' for a backtrace or `,q' to continue.
     guile-user [1]> (read-options 'help)
     copy              no    Copy source code expressions.
     positions         yes   Record positions of source code expressions.
     case-insensitive  no    Convert symbols to lower case.
     keywords          #f    Style of keyword recognition: #f, 'prefix or 'postfix.
     r6rs-hex-escapes  no    Use R6RS variable-length character and string hex escapes.
     square-brackets   yes   Treat `[' and `]' as parentheses, for R6RS compatibility.

     guile-user [1]> (read-enable 'case-insensitive)
     $2 = (square-brackets keywords #f case-insensitive positions)

     guile-user [1]> ,q

     guile-user> aBc
     $3 = "hello"

But that doesn't look quite right. I have the feeling that the
traditional, minimalist prompt (">") is better, but I'll hold off making
any change for now.

Andy
-- 
http://wingolog.org/



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: scheme@(guile-user)> considered ugly
  2010-10-01  9:45 scheme@(guile-user)> considered ugly Andy Wingo
@ 2010-10-01 22:55 ` Ludovic Courtès
  2010-10-03 10:20   ` Andy Wingo
  0 siblings, 1 reply; 3+ messages in thread
From: Ludovic Courtès @ 2010-10-01 22:55 UTC (permalink / raw)
  To: guile-devel

Hello!

Andy Wingo <wingo@pobox.com> writes:

> I'm thinking that our prompt is really ugly. Sure, it's useful to know
> what language and module you're in (though you probably know the
> language). But I was just going over some docs and the prompt really
> makes it hard to read. The interaction transcript went like this:

I agree that this example is hard to read.  That said, in reality,
there’d be some color (hello jao! :-)) and a blinking cursor, which make
things much better.

Also, FWIW, it’s customary to have $PS1 = ‘[\u@\h:\w]\$’, which is
graphically close to ‘LANG@(MODULE)>’.

> But what if we elide the language and deparen the module:
>
>      guile-user> (define abc "hello")

Yes, that’s clearer.

Still, I had got used to seeing the language name, and it’s probably
good marketing-wise (though currently only Scheme works at the REPL, but
shh!)  So I don’t know.  No strong feelings.

Another option would be to keep the prompt but use a simpler one in the
manual, as is often done with shell transcripts.

Thanks,
Ludo’.




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: scheme@(guile-user)> considered ugly
  2010-10-01 22:55 ` Ludovic Courtès
@ 2010-10-03 10:20   ` Andy Wingo
  0 siblings, 0 replies; 3+ messages in thread
From: Andy Wingo @ 2010-10-03 10:20 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guile-devel

On Sat 02 Oct 2010 00:55, ludo@gnu.org (Ludovic Courtès) writes:

> Another option would be to keep the prompt but use a simpler one in the
> manual, as is often done with shell transcripts.

I think I prefer this option, for now. I'll do this the next time our
prompt bothers me in the manual :)

Andy
-- 
http://wingolog.org/



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-10-03 10:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-01  9:45 scheme@(guile-user)> considered ugly Andy Wingo
2010-10-01 22:55 ` Ludovic Courtès
2010-10-03 10:20   ` Andy Wingo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).