David Korn wrote:

Replacing ksh93-integration-discuss-bounces at opensolaris.org with
ksh93-integration-discuss at opensolaris.org in the headers, I guess noone
got your email... ;-((

> cc: roland.mainz at nrubsig.org
> Subject: Re: Re: [ksh93-integration-discuss] ksh alpha source
> --------
> 
> Were you able to test the I18N issues?  We were unable to test these here.

I did some tests and it seems to be fixed... but I am no i18n engineer
(that's why I have CC:'ed Ienup Sung (one of Sun's i18n gurus) and
previouly asked him whether he can make test binaries, too).

BTW: Totally offtopic: I forgot to announce that Ienup Sung made another
screenshot for the project gallery, this time showing the i18n
capabilities of the (fixed) ksh93r:
http://www.opensolaris.org/os/project/ksh93-integration/screenshots/ksh93-i18n_001.png

> > IMO there are four issues (compared to "ksh93r"):
> > - It would be nice to include the patch from
> > http://mail.opensolaris.org/pipermail/ksh93-integration-discuss/2006-May/000346.
> > html
> > (which adjusts the paths of all builtin commands to be as compatible as
> > possible to the native Solaris versions) as Solaris-only patch
>
> I will look at this.

Thanks! :-)

> > - "mkservice" still seems to be defunct
>
> I will investigate but I don't know whether it will be fixed or not.
> It is undocumened.

I know it's undocumented - but it would be a nice thing to have a way to
implement some network services using ksh...

> > - TAB following a TAB-TAB does not work in "emacs" mode. Instead a
> > second TAB-TAB is required to refresh the results (for comparisation:
> > readline/bash only needs one TAB after a TAB-TAB to refresh the results)
>
> I wasn't aware of this behavior.  What I would like to do is
> have
>         TAB-TAB <n> TAB
> substitute the n'th selection.  If <n> is omitted, it would refresh.
> Does this make sense?  It would work in all edit modes.

I see two problems:
1. It's getting to complex again. Think about non-IT people (in my case
people in a biological research lab (currently I am "abusing" them like
"lab rats" to test ksh93 in the real world... :-) )) - anything with
more than two states in the state machine is likely getting to complex
for fast and intuitive work. I already got reports that the TAB
completion is "broken" because people did not realise that it currently
(in ksh93r/r+) depends on whether there is something to expand or not
(e.g. at the end of a '/' etc.). That's why bash doesn't allow people to
input the TAB character at all directly (e.g. without quoting via
CTRL-V) and uses TAB/TAB-TAB _exclusively_ for the completion
functionality.
Another thing which is VERY annoying for users of TAB-TAB: A simple % cd
<TAB><TAB> results in a TAB character and not in a list of files/dirs.
The usual reaction is 1) Various curses about the "broken" TAB-TAB
completion in ksh93 in my direction and then 2) they simply enter "bash"
to get the desired behaviour (and I am not happy about that) ... ;-(

2. How do you want to enter numbers to expand the string manually after
the list has been shown ?
Example:
Three files in a directory called "foo122020", "foo122120", "foo12300".
The user types "foo12", the TAB (no change in string), the TAB-TAB to
display the list and then enters "2" + TAB-TAB to see only results which
start with "foo122". In your case it will select choice 2 with the first
TAB...

IMO it is sufficient to let the users use the current way using
<ESC>digits<ESC>= to select a choice. <ESC>digits<TAB><TAB>
unfortunately does not work always because the completion functionality
of TAB-TAB only kicks in if there is a character to expand at the
current cursor position, making this choice quite unpopular in our lab
staff... ;-(
BTW: Someone suggested that <ESC>= should print a message at the
beginning to inform the user that a choice can be selected using
<ESC>digits<ESC>= ... that may be usefull... or not... I am not sure. At
the first I was not happy, imaginating something horrible a la "clippy"
(the animated paper clip in MS Office products
(http://en.wikipedia.org/wiki/Clippy)) ... but then... that _may_ be
usefull. After all we have to deal with normal users... :-)

BTW: Is it possible to add a comment to the ksh93 manual page to the
section of <ESC>= to indicate that <ESC>digits<ESC>= will select the
n-th choice (n=digits) of a previously displayed list ?

> > - "gmacs" mode's TAB completion works like "emacs" mode and not like
> > readline/bash, e.g. TAB in a middle of a string does not try to complete
> > the left side nor is CTRL-V recognised as general sequence to enter any
> > other character (like ESC or TAB). The patch for that was in
> > http://mail.opensolaris.org/pipermail/ksh93-integration-discuss/2006-May/000354.
> > html
>
> The emacs and gmacs modes are documented as being the same except for ^T.
> I only left in gmacs mode for historical reasons.  The behavior of ^V is
> documented as displaying the version so I can't change that.  Perhaps ^Q
> should be used to quote the next character.

That may be an option, however how often do people use CTRL-V to display
the version in their daily work ? I only know about the option since I
read the sources, but usually I simply used % echo {.sh.version} # ...
BTW: AFAIK CTRL-Q may interfer with flow control on some old terminals
(e.g. press CTRL-S and then CTRL-Q to stop and resume the traffic) ...
CTRL-V is likely a better choice since I can't remember any terminal
which intercepts that sequence.

> > (please ignore the CTRL-L/|system("clear")| horror :-) ) ...
> >
> > Beyond that point it seems to work very well... keep up that good
> > work... :-)
> 
> With the changes to the math precision, the following can be
> used to generate all the float constants to the maximum precision
> provided by the compiler:
> ================================cut here=============================
> Math=(
>         float M_E=0 M_LOG2E M_LOG10E M_LN2 M_LN10 M_PI M_PI_2 M_PI_4 M_1_PI \
>         M_2_PI  M_2_SQRTPI M_SQRT2 M_SQRT1_2
> )
> (( Math.M_E = exp(1.0) ))
> (( Math.M_LOG2E = 1.0/log(2.0) ))
> (( Math.M_LOG10E = 1.0/log(10.0) ))
> (( Math.M_LN2 = log(2.0) ))
> (( Math.M_LN10 = log(10.0) ))
> (( Math.M_PI = 4*atan(1.0) ))
> (( Math.M_PI_2 = 2*atan(1.0) ))
> (( Math.M_PI_4 = atan(1.0) ))
> (( Math.M_1_PI = .25/atan(1.0) ))
> (( Math.M_2_PI = .5/atan(1.0) ))
> (( Math.M_2_SQRTPI =  1.0/sqrt(atan(1.0)) ))
> (( Math.M_SQRT2 = sqrt(2.0) ))
> (( Math.M_SQRT1_2 = 1./sqrt(2.0) ))
> ================================cut here=============================

What about adding some sort of standard math library for ksh93, e.g.
"math.sh" which contains the matching functions (but under which
location... C programs have there includes in /usr/include/ ... but
AFAIK there is no standard location for shell includes yet... ;-( ) ?

> I hope to add Nan and Inf for ksh93s.

That would be very cool... :-)

----

Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) roland.mainz at nrubsig.org
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 7950090
 (;O/ \/ \O;)

Reply via email to