<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2800.1498" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=031545014-01062005>Game challenges are nice, they teach you
something (i wrote a game and only one person gave a crap despite it's
educational and practical value for ANY age! OK, no prob ;) so since we're all
professionals here, im more inclined towards suggesting a practical
threading model...</SPAN></DIV>
<DIV><SPAN class=031545014-01062005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=031545014-01062005><FONT face=Arial size=2>The threading is not
the problem... it's the transactional queuing and reporting that
is interesting... The same "game model" applies to many many applications -
waiting cabinets, post/mail-sending, delayed update synchronizations, cache
cleaning, etc... </FONT></SPAN></DIV>
<DIV><SPAN class=031545014-01062005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=031545014-01062005><FONT face=Arial size=2>The threading
transaction script is the following:</FONT></SPAN></DIV>
<DIV><SPAN class=031545014-01062005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=031545014-01062005><FONT face=Arial size=2>-- The bartending
example just used in memory to the old thinkC OOP class/event model
;)</FONT></SPAN></DIV>
<DIV><SPAN class=031545014-01062005><FONT face=Arial size=2>-- i dare not say
here which was the first C compiler i used!</FONT></SPAN></DIV>
<DIV><SPAN class=031545014-01062005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=031545014-01062005><FONT face=Arial size=2>on bartender
customerObj</FONT></SPAN></DIV>
<DIV><SPAN class=031545014-01062005><FONT face=Arial size=2> send
"MakeDrink" &&CustomerObj to me in GetQueueTime(me)</FONT></SPAN></DIV>
<DIV><SPAN class=031545014-01062005><FONT face=Arial size=2>on
taskdoer</FONT></SPAN></DIV>
<DIV><SPAN class=031545014-01062005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=031545014-01062005><FONT face=Arial size=2>on MakeDrink
obj</FONT></SPAN></DIV>
<DIV><SPAN class=031545014-01062005><FONT face=Arial size=2> get
ObjectBestCandidateDrink(obj)</FONT></SPAN></DIV>
<DIV><SPAN class=031545014-01062005><FONT face=Arial size=2> if is it
empty </FONT></SPAN></DIV>
<DIV><SPAN class=031545014-01062005><FONT face=Arial size=2> then
send "ask \"Drink Sir\" to" obj</FONT></SPAN></DIV>
<DIV><SPAN class=031545014-01062005><FONT face=Arial size=2> put
MakeDrink(obj) into drinkObj</FONT></SPAN></DIV>
<DIV><SPAN class=031545014-01062005><FONT face=Arial size=2> ServeDrink
drinkObj</FONT></SPAN></DIV>
<DIV><SPAN class=031545014-01062005><FONT face=Arial size=2>
StartTwoBitChatWith Obj</FONT></SPAN></DIV>
<DIV><SPAN class=031545014-01062005><FONT face=Arial size=2>end
MakeDrink</FONT></SPAN></DIV>
<DIV><SPAN class=031545014-01062005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=031545014-01062005><FONT face=Arial size=2>-- end of
script</FONT></SPAN></DIV>
<DIV><SPAN class=031545014-01062005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=031545014-01062005><FONT face=Arial size=2>Now, this will
surely thread-whizz a few drinks on the bar's tabletop nicely given few clients
without "in GetQueueTime(me)" question... </FONT></SPAN></DIV>
<DIV><SPAN class=031545014-01062005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=031545014-01062005><FONT face=Arial size=2>But if it's friday
night and you have to serve both drinks, chips bowls, clean dishes, check drink
stock + order disminishing fast, do checks, collect and account checks, you see
that it gets quite different - and more down to earth than just a game... The
barSim game in Rev, why not?</FONT></SPAN></DIV>
<DIV><SPAN class=031545014-01062005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=031545014-01062005><FONT face=Arial size=2>OK, What if
even with just drink making, you get many clients more than one drink... It gets
crowded on weekends, how do you prepare?</FONT></SPAN></DIV>
<DIV><SPAN class=031545014-01062005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=031545014-01062005><FONT face=Arial size=2>The best
GetQueueTime() function wins no matter how many clients and drinks are thrown at
the bartender...</FONT></SPAN></DIV>
<DIV><SPAN class=031545014-01062005><FONT face=Arial size=2>What if we have more
than one bartender (move the request drink script to the bar group holding
the bartender buttons... You can generalize or individualize the bartender
scripts as you wish naturally ;) </FONT></SPAN></DIV>
<DIV><SPAN class=031545014-01062005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=031545014-01062005><FONT face=Arial size=2>Seen the AI article
on Wired? </FONT></SPAN></DIV>
<DIV><SPAN class=031545014-01062005><FONT face=Arial size=2><A
href="http://www.wired.com/news/culture/0,1284,67659,00.html">http://www.wired.com/news/culture/0,1284,67659,00.html</A></FONT></SPAN></DIV>
<DIV><SPAN class=031545014-01062005><FONT face=Arial size=2>Cool! But hey, IT
industry is kind of sterile now and it's time to wake up the industry to
RunRev... Can RunRev do threading? No, I do have a working solution though. Of
course, no one will listen but it's part of the strategy to overturn the IT
empires with TAOO ;)</FONT></SPAN></DIV>
<DIV><SPAN class=031545014-01062005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=031545014-01062005><FONT face=Arial size=2>If this script is
well optimized we have a better chance at making Real time simulators or RPG/FPS
games in RunRev too.</FONT></SPAN></DIV>
<DIV><SPAN class=031545014-01062005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=031545014-01062005><FONT face=Arial size=2>maillist perenial
netTip:</FONT></SPAN></DIV>
<DIV><SPAN class=031545014-01062005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=031545014-01062005><FONT face=Arial size=2>Here's how to make
time-synchronized events in RunRev - however there's no guarantee that the
event will happen at the right time if another even is running (grrr). But with
the right queuing, we can make it work... We do have more processing power than
old mainframes PDP11 dont we? </FONT></SPAN></DIV>
<DIV><SPAN class=031545014-01062005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=031545014-01062005><FONT face=Arial size=2>Send "drawyourself"
to thisgraphic in 40 milliseconds </FONT></SPAN></DIV>
<DIV><SPAN class=031545014-01062005><FONT face=Arial size=2>-- 40 ms = 25
FPS frames per second = video - 80 = 12 FPS is animation quality. Would a
binary-easy number work better?</FONT></SPAN></DIV>
<DIV><SPAN class=031545014-01062005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=031545014-01062005><FONT face=Arial size=2>OK, so now, how do
you schedule it all? And have enough "send" bandwidth? </FONT></SPAN></DIV>
<DIV><SPAN class=031545014-01062005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=031545014-01062005><FONT face=Arial size=2>We can make this
into a cool game too later... But the real benefits is that you can thread
anything. This also works for web site client serving btw...
</FONT></SPAN></DIV>
<DIV><SPAN class=031545014-01062005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=031545014-01062005><FONT face=Arial size=2>Tip: while there are
polynomial ways of doing this kind of optimization, RunRev's speed of
calculation in matrices or arrays prohibits this (though it helps compared to
hypercard times ;) - There is simpler geometric way...</FONT></SPAN></DIV>
<DIV><SPAN class=031545014-01062005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=031545014-01062005><FONT face=Arial size=2>I've been sitting on
this one for about 9 years but it's the clustering event model in TAOO
which im proud to describe here - as i read on a sig today - information is only
of value if it is shared... How true...</FONT></SPAN></DIV>
<DIV><SPAN class=031545014-01062005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=031545014-01062005><FONT face=Arial size=2>Any Game Theory
adepts in the list?</FONT></SPAN></DIV>
<DIV><SPAN class=031545014-01062005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=031545014-01062005><FONT face=Arial size=2>cheers from
Lulucity</FONT></SPAN></DIV>
<DIV><SPAN class=031545014-01062005></SPAN><SPAN class=031545014-01062005><FONT
face=Arial size=2>Xavier</FONT></SPAN></DIV>
<DIV><SPAN class=031545014-01062005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=031545014-01062005><FONT face=Arial
size=2></FONT></SPAN> </DIV></BODY></HTML>