Genie on iPaq..comments

Kevin Fisher kgf at golden.net
Thu Mar 15 12:45:23 UTC 2001


Hi Nathanael:


> Kevin,
> 
> Thanks for your comments.
> I thought that performance could be a little problem on smaller machines
> like the iPaq. However, I was thinking that the time Genie needs for the
> Gesture lookup would be the main problem. Genie basically works like that:
> 
> 1) While you enter the Gesture, Genie only captures the points and generates
> the trail as a feedback for the user. That's it, nothing else is done here.
> 
> 2) After the gesture is completed, Genie tries to find the best match in the
> dictionary that is associated to the Morph where you entered the gesture.
> There are some quite sophisticated algorithms involved here and they take
> some time. This time grows (but fortunately less than linear) with the size
> of the dictionary and it can be influenced with the speed option of the
> dictionary. The amount of time spent in this phase is exactly the time until
> a character appears after you've completely entered it.
> 
> As you see, dictionary size and speed option only affect phase 2. But as far
> as I understood, phase 1 is the main reason for the performance problem.
> That's kind of strange because Genie only captures the points during this
> phase. Therefore it must have something to do with displaying and updating
> the trail. At the beginning I used a polygon morph to do that, but this was
> even slower and so I implemented a fast LineMorph class (CRLineMorph). I'll
> have a look at that soon and I'm quite optimistic to find a way to increase
> performance of that part.

I guess I should have been a bit more specific..the most 'immediate' slowdown 
to me was the lagging pen-trail, but there is indeed quite a delay in the 
lookup, as you say there should be.  It seems to vary with the complexity of 
the gesture.

I did some more tests at different screen depths and didn't see any real 
performance increase...the pen still lagged behind the stylus.  Of course this 
doesn't affect the lookup time at all.


> 
> Concerning the speed option, I have to say that it is not really linear.
> This means that there might be a bigger difference between 80% and 90% than
> between 60% and 80%.
> 

I stopped at 80% because the accuracy had dropped enough to be uncomfortable. 
:)


> I talked about writing a primitive for the main lookup algorithm that has to
> be executed in phase 2. I think hat this would dramatically improve the
> speed and I'm really considering to do it. If I can also find a way to
> improve performance of phase 1, everything will be much faster.
>

I'm not sure what could be the cause of the drawing slowness.  It certainly 
isn't system load, as I'm basically only running an X-server and Squeak (no 
window managers or anything else).

Generally Morphic is considerably slower on the iPaq, but as I mentioned, the 
CharRecog pen trail isn't laggy at all by comparison.

 
[snip]

> ---
> 
> Some people seem to have problems understanding how to use Genie. I'm
> thinking of how I could improve the introduction. Do you have any
> suggestions?
> 

Hmm...well, I read the introduction myself and was able to dive right in 
without too much difficulty.  The only thing I can think of that might help 
things would be to provide a built-in 'default' gesture dictionary for Text 
classes.  I believe at the end of the intro you have pointers to external 
dictionaries for download...perhaps providing a default built-in 
'Graffiti'-style dictionary for example purposes would be useful.  Being able 
to see and change an existing sample dictionary would go a long way, I think, 
as opposed to having to get through the entire document first before seeing a 
working example.

I guess there are two distinct areas that need to be addressed:  1) the 
general user that just wants to start writing and 2) the programmer or more 
'hardcore' user that wants to be able to change/add gesture dictionaries.  
Perhaps starting with a a simple example on Text morphs is a better way to 
start, and then expand the discussion to all morphs.

I think that the first thing anyone wants to do is to see Genie in 
action...out of the box right now you have to either hunt down a gesture 
dictionary from the web, or define one of your own.


> I'm also thinking which of Genie's features should be explained better
> there. You could help me by answering the following questions:
> 
> - Keyboard actions: Did you understand how to define gestures for shift,
> capsLock, commandKey and other special keys?
> 

Ah, this took some experimentation. :)  I don't recall it being specifically 
spelled out in the introduction, but I eventually found the scrollbar-menu in 
the "Enter a character" popup that had all the predefined symbols for these 
characters.  I think providing a small list of valid symbols in the 
introduction would be helpful...I only found them by accident, as it were.

> - Mouse actions: Did you understand how to define gestures for mouse
> commands (bring up the halo, simulate other mouse buttons, etc)? In
> particular, have you associated the gesture point (just go down and up with
> the pen without moving it) to "red mouse click"?
> 

Hmm, this I haven't tried.  I've only dealt with Text-based gestures, for the 
moment. :)


> - Focus on a Morph: Do you know that you can focus Genie on a Morph and that
> this is quite helpful if you have to enter some characters into a small
> Morph. (You can start the Gesture anywhere on the screen and not only in the
> specific Morph).

I haven't tried this one either!  This is a very useful feature though, 
especially where small text fields are involved.

> 
> - Switch case: Do you know that you can define a gesture in order to switch
> the case of the last entered character?
> 

Yes, this was easy enough to define with the right symbol for the 'shift' key.
Incidentally, I noticed that the 'shift' key symbol doesn't apply to 
non-alphabetic characters...for example, if I perform the 'shift' gesture, and 
then the '1' gesture, I don't get the character for '!'.


> - Inspect last gesture and gesture dictionary: Do you know that you can
> define a gesture that shows the previous gesture and how it was looked up?
> (If this gesture was not looked up as you expected, you can instantly assign
> this gesture to the character you want to. Like that, you can optimize your
> dictionaries "on the fly"). Do you know that you can define a gesture to
> open the gesture dictionary associated to the target Morph?
> 

Hmm, no I didn't know this. :)

> - Squeak code: Do you know that you can assign any kind of Squeak code to a
> gesture?
> 

Ah, I knew this was possible, but I haven't had a chance to try it yet.

> 
> Talking of Squeak code that is assigned to a gesture. Have you noticed that
> you can associate a gesture dictionary to the World (PasteUpMorph) and that
> you can use that in order to open a workspace, a browser, a TextMorph, an
> EllipseMorph, or ... at any place in your World? If not, you may want to
> have a look at my example dictionary called "WorldExample". (Note that this
> dictionary has some options that differ from the default values. (Relevance
> of size, start/end point and shape (means aspect ratio) is set to 0%. Like
> that it recognizes an ellipse or a rectangle independent of its size and of
> the aspect ratio)).

I haven't tried this either.  To be honest, I haven't had the need to try any 
of your example dictionaries yet.  By the time I got to that part of the 
document, I had already created a nice workable dictionary for myself (for 
Text morphs,
anyway).

> 
> Oh, and one last tip: If you want to enter code on your iPaq you might want
> to define a dictionary that contains some common programming constructs
> ("ifTrue: []", etc.). Note that you can use "longer" (more complex) gestures
> for that (maybe a gesture that looks like "it" for "ifTrue: []"). However,
> if a gesture gets too long (too complex), recognition quality is not so good
> anymore. I found a way to improve that but I couldn't find the time to
> implement it yet...
>

Yes, -this- would be very useful.  I've tried doing some basic programming in 
a workspace on my iPaq, and given the speed of things right now having 
predefined gestures for various structures would be very helpful.
 
> 
> Cheers,
> Nathanael
> 
> 
> 





More information about the Squeak-dev mailing list