Re: [Chicken-users] readline egg v2.0 feedback

2015-01-27 Thread Peter Bex
On Tue, Jan 27, 2015 at 09:10:31AM +0100, Shawn Rutledge wrote:
 On 26 January 2015 at 00:02, Matt Welland mattrwell...@gmail.com wrote:
  From http://wiki.call-cc.org/man/4/Using%20the%20interpreter the
 ,commands are called toplevel commands and you can define them with:
 
  (toplevel-command SYMBOL PROC [HELPSTRING])
 
 Where does this tradition come from?  Is it related somehow to the use of
 the comma as unquote inside a quasiquote?

I suppose so: at the toplevel, you can enter any expression, so for
example just entering X will evaluate it.  For that reason you'll
need a special character to indicate that you're talking to the
interpreter itself instead of evaluating something at the toplevel.

You can't unquote anything outside a quasiquote expression, so it's
kind of natural to use that as a prefix: it's one of the few undefined
characters to use without adding additional restrictions to the lexical
syntax of symbols, for example.

 It always seems unintuitive to
 me to start anything with a comma.

I've gotten used to it already, but then I'd used vi for such a long time
that starting a command with a colon seems intuitive to me also :)

Cheers,
Peter


signature.asc
Description: Digital signature
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] readline egg v2.0 feedback

2015-01-27 Thread Evan Hanson
Hi Alexej,

My tuppence:

On 2015-01-27  4:01, Alexej Magura wrote:
 I don't think I'll use the toplevel-command stuff after all: I can't promise
 that the toplevel symbols readline exports won't get overwritten, and I'm
 not entirely sure readline has any business providing private toplevel
 symbols that are only applicable to it. It might confuse less-experienced
 users*, for one, and for another there's the already mentioned possibility
 of symbol collision, unless somebody more knowledge on this subject can
 prove otherwise.

It's your call of course, but I'd urge you not to let this stop you if
you'd otherwise like to provide this feature. If all commands are
prefixed by rl, for example, the ease of use would outweight any risk
of conflicts, IMO. After all, extensions are expected to provide
commands; that's part of what the feature's there for. chicken-doc uses
it to great effect, for example.

Perhaps you could address the concern that users will mistake
readline-provided commands for builtins by adding a note that they come
from the readline egg to the commands' help strings?

Cheers,

Evan

___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] readline egg v2.0 feedback

2015-01-27 Thread Shawn Rutledge
On 26 January 2015 at 00:02, Matt Welland mattrwell...@gmail.com wrote:
 From http://wiki.call-cc.org/man/4/Using%20the%20interpreter the
,commands are called toplevel commands and you can define them with:

 (toplevel-command SYMBOL PROC [HELPSTRING])

Where does this tradition come from?  Is it related somehow to the use of
the comma as unquote inside a quasiquote?  It always seems unintuitive to
me to start anything with a comma.
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] readline egg v2.0 feedback

2015-01-27 Thread Alexej Magura
I don't think I'll use the toplevel-command stuff after all: I can't 
promise that the toplevel symbols readline exports won't get 
overwritten, and I'm not entirely sure readline has any business 
providing private toplevel symbols that are only applicable to it. It 
might confuse less-experienced users*, for one, and for another there's 
the already mentioned possibility of symbol collision, unless somebody 
more knowledge on this subject can prove otherwise.


* In the sense that they may not realize that it's part of readline and 
so may expect it's behavior to remain consistent even when readline is 
not in use.


On 01/27/2015 01:36 AM, Peter Bex wrote:

On Tue, Jan 27, 2015 at 09:10:31AM +0100, Shawn Rutledge wrote:

On 26 January 2015 at 00:02, Matt Welland mattrwell...@gmail.com wrote:

 From http://wiki.call-cc.org/man/4/Using%20the%20interpreter the

,commands are called toplevel commands and you can define them with:

(toplevel-command SYMBOL PROC [HELPSTRING])

Where does this tradition come from?  Is it related somehow to the use of
the comma as unquote inside a quasiquote?

I suppose so: at the toplevel, you can enter any expression, so for
example just entering X will evaluate it.  For that reason you'll
need a special character to indicate that you're talking to the
interpreter itself instead of evaluating something at the toplevel.

You can't unquote anything outside a quasiquote expression, so it's
kind of natural to use that as a prefix: it's one of the few undefined
characters to use without adding additional restrictions to the lexical
syntax of symbols, for example.


It always seems unintuitive to
me to start anything with a comma.

I've gotten used to it already, but then I'd used vi for such a long time
that starting a command with a colon seems intuitive to me also :)

Cheers,
Peter


___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users