<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<font face="Georgia">Maybe 5 years before Genie. Here's the
ancestor:<br>
<br>
recognize | prv cdir result features char r s t dir |<br>
<br>
"Alan Kay's recognizer as of 1/31/96. This version preserved for
historical purposes, and also because it's still called by the
not-yet-deployed method recogPar. Within the current image, the
recognizer is now called via #recognizeAndDispatch:until:"<br>
<br>
<br>
"Inits" (p _ Pen new) defaultNib: 1; down.<br>
"for points" pts _ ReadWriteStream on: #().<br>
<br>
"Event Loop" <br>
[(Sensor mousePoint x) < 50] whileFalse:<br>
<br>
"First-Time" [pts reset. <br>
"will hold features" ftrs _ ''.<br>
<br>
(Sensor anyButtonPressed) ifTrue:<br>
[pts nextPut: (bmin _ bmax _ t _ s _ sts _
Sensor mousePoint).<br>
p place: sts. cdir _ nil.<br>
<br>
"Each-Time" [Sensor anyButtonPressed] whileTrue:<br>
[<br>
"ink raw input" p goto: (r _ Sensor mousePoint).<br>
"smooth it" s _ (0.5*s) + (0.5*r).<br>
"thin the stream" ((s x - t x) abs > 3 or:[(s y - t y)
abs > 3]) ifTrue:<br>
[ pts nextPut: t. <br>
"bounding box" bmin _ bmin min: s. bmax _ bmax max: s.<br>
"get current dir" dir _ (self fourDirsFrom: t to:
s). t _ s.<br>
dir ~= ' dot... ' ifTrue: [<br>
"store new dirs" cdir ~= dir ifTrue: [ftrs _
ftrs, (cdir _ dir)]].<br>
"for inked t's" p place: t; go: 1; place: r.<br>
].<br>
"End Each-Time Loop" ].<br>
<br>
"Last-Time" <br>
<br>
"save last points" pts nextPut: t; nextPut: r.<br>
"find rest of features" features _ self extractFeatures.<br>
"find char..." char _ CharacterDictionary at: features
ifAbsent:<br>
"...or get from user" [ result _ FillInTheBlank
request:<br>
'Not recognized. type char, or type
~: ', features.<br>
"ignore or..." result = '~' ifTrue: ['']<br>
"...enter new char" ifFalse: [CharacterDictionary at:
features put: result. result]].<br>
<br>
"control the editor" (char = 'cr' ifTrue: [Transcript cr]
ifFalse:<br>
[char = 'bs' ifTrue: [Transcript bs]
ifFalse:<br>
[char = 'tab' ifTrue:[Transcript tab]
ifFalse:<br>
[Transcript show: char]]]). <br>
<br>
"End First-Time Loop" ]. <br>
<br>
"End Event-Loop" ]. <br>
<br>
<br>
<br>
</font>
<div class="moz-cite-prefix">On 3/21/13 8:06 PM, Colin Putney wrote:<br>
</div>
<blockquote
cite="mid:CAD+=c1gUPF8SmhxWsQBshERKaLT44oRT_F5bhKTOZtqck=QG4g@mail.gmail.com"
type="cite">
<div dir="ltr"><br>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Thu, Mar 21, 2013 at 4:07 PM, Bert
Freudenberg <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:bert@freudenbergs.de" target="_blank">bert@freudenbergs.de</a>></span>
wrote:<br>
<blockquote class="gmail_quote"
style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div style="word-wrap:break-word">
The recognizer still works in the Etoys image.</div>
</blockquote>
<div><br>
</div>
<div>Was that Genie, or another system?</div>
<div><br>
</div>
<div>It seems like Genie is still available, though it
probably doesn't work in modern Squeak:</div>
<div><br>
</div>
<div><a moz-do-not-send="true"
href="http://bike-nomad.com/squeak/monticello/Genie/">http://bike-nomad.com/squeak/monticello/Genie/</a></div>
<div><br>
</div>
<div>Colin </div>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">
</pre>
</blockquote>
<br>
</body>
</html>