[Sussex] AppleScript and Red Hat 8.0
Geoff Teale
Geoff.Teale at claybrook.co.uk
Thu Oct 24 09:57:02 UTC 2002
Morning SLUGS,
Tony wrote:
-----------
> Evening all - anyone alive?
Morning :)
I sense that Tony feels he has a closing argument here... if so he has
underestimated my bloody mindedness on an epic scale ;)
> Geoff, I don't think we are talking about the same thing here
> at all. The
> EventQueue on the Mac is fundamental to the system, not an
> OOP technology.
> When a key is pressed an event is posted to the queue, when
> the mouse is
> moved it's new position is posted and in due course
> processed. Apps either
> post directly or via system calls such as opening a new window. The
> EventQueue is a channel for communicating with the system
> rather than IPC
> per se - on the PC you would use hardware interrupts, here it
> is done by
> software.
Yes, because of the use of the name "Event" I was assuming that AppleScript
was doing this at a higher level so as to include actions from within the
application in addition to external processes.
You are talking about the systems message queue - the underlying structure
that is used for communication between processes. A lot of simplified
languages shield you from this because, from an application control point of
view, it is an unnecessarily complex methodology. The term "Event" is
almost always used as a simplified abstraction - we talk about "Event"
driven languages (not specifically in an OOP context) as those which fire
subroutines "magically" when a user performs some action upon the software.
Moreover simplification is nearly always used to give the programmer the
false impression that everthing is running in a single process.
<sidetrack reason="technical point">
I would debate the idea that this is any different for Apple machines than
it is for PC's. Message queues are common to most modern operating systems.
There are still hardware interrupts involved in all cases - the hardware
interrupt triggers the software action that inserts messages into the queue,
if there were no hardware interrupts then nothing would ever happen.
Moreover I would argue that this _is_ IPC and infact is one of the better
methods of doing the job. The system is afterall just another series of
processes. QNX, BeOS and importantly the Mach microkernel in particular
favour message queues for all interprocess communication. As Mach is the
core of Darwin (which is the core of OS X) I would suggest that the message
queue is the most important IPC mechanism on the entire OS X platform.
</sidetrack>
Having sidetracked I shall return to the original topic of discussion -
Scripting control.
If as you say, the level of scripting control provided by AppleScript is
such that it controls applications by reading from, and writing to their
message queues then I have a point to make:
1. UNIX has message queues and several languages can read from them and
write to them. TCL/Tk for example is a gui scripting combination that can
handle "events" in XFree86 applications in exactly the manner you describe.
2. To control an application beyond simply simulating human interaction, the
program will have to be written to accept additional commands via the
message queue. These additional commands will have to be well documented
for you to use them. Effectively we are in the same situation as if we had
an API.
> > We're getting there!
> >
> Nope. At least 20 years behind. Contrast Linux with an
> advanced GUI system
> of 20 years ago and there is no comparison - Linux is far
> less easy to setup
> and use. The system I am thinking of is the Lisa, forerunner
> to the Mac, amd
> was actually a Unix based system (until the first Mac was
> released and they
> ported the singleuser Mac OS to the Lisa before killing it off).
One of the things OS X has done really well is give UNIX a shunt in terms of
UI. For years we've been aiming to match Windows - OS X is a different ball
game. However there are still a number of annoyances. For a start the way
that windows maximise under the dock is frankly ameteurish and the need to
hold down keys along with the mouse button to access certain functionality
is, despite Mr Jobs thoughts on the subject, far less intuitive than having
a second mouse button. Going back to your point about Lisa, I'd argue with
that very strongly:
1. LISA was extremely expensive. If I could ship LINUX based machines at an
equivalent modern price I could afford to make the UI fantastic. Of course
history tells us that this doesn't work - LISA was important in Apples
mindshift towards the Mac but in itself it was a complete commercial
failure. A lot of people criticised Xerox for not cashing in on the work at
PARC that Apple was *ahem* inspired by, the Xerox executives of the time
however felt (quite rightly) that there was no market for US$4000 personal
computers.
2. LINUX's capabilities are far beyond LISA's in every major respect - power
requires complexity. I don't take anybody seriously when they claim that
IIS is better than Apache because it has a GUI front end by default. I do
however feel that Microsoft Word XP is a far better solution for most office
users than WordPerfect 5.1 for DOS. This doesn't mean that Word XP is the
best solution - a far simpler world processer would win hands down in ever
case. Here OS X is great because it provides the best of both worlds.
LINUX these days is capable of this to and getting better at it suprisingly
fast.
3. If you pick up a distribution designed for ease of use (i.e one designed
for the desktop) you will have difficulty justifying that arguement. The
real problem here is that LINUX offers you too much choice as a new user and
not all applications are built on a common basis. Simplified distro's take
away that choice and, increasingly, they retitle "start" menus to replace
cryptic names with generic functions. Red Hat 8.0 is the first Red Hat
version that falls into this category. Unfortunately the world's opinions of
LINUX are pretty much driven by what Red Hat does, and while the 6.x and 7.x
series had plenty of other strengths the desktop environment and userland
tools have left a lot to be desired. Red Hat 8.0 then is a refreshing
combinations of a nice UI for the hard of understanding and no real
restiction on the power of the system (a problem which Lycoris Desktop LX is
particularly prone to!). The default desktop or workstation installs
provide you with an environment that is an ease of use match for Windows
2000 and actually leaves the user with less to do in order to get going (Red
Hat's hardware detection and setup was faultless even on my weirdo hardware
setup). So far, apart from compiling a program of my own in gcc I have
never once had to use the command line to get by in Red Hat 8.0 so far.
> But you are right in saying that it is fast developing -
> another couple of
> major system releases and it may actually work straight out
> of the box.
Red Hat 8.0 and SuSE 8.1 both work straight out of the box for 99.9% of PC's
and both could be installed by a trained chimp. I put my hand on my heart
and say I belive they'd work on more PC's straight off than Windows XP
would. Apple again benefits from having complete control of it's platform.
OS X never has to worry about weird hardware except in PowerMac's - and even
then we're talking about a limited subset.
>Once
> Linux is fit for the workplace I am sure that it will replace
> Windows for
> many users.
I believe so, and I am increasingly of the belief that the day is nearly
here - already the big finance companies in the city are crossing over.
> > Good talking to you..
> And complete agreemenr here - thanx for your views
And thank you for your! I enjoy nothing more than this kind of debate.
It's only by discussing these things and arguing the case for and against
things that we can bring them into true perspective and take action to make
things better.
--
GJT
geoff.teale at claybrook.co.uk
The above information is confidential to the addressee and may be privileged. Unauthorised access and use is prohibited.
Internet communications are not secure and therefore this Company does not accept legal responsibility for the contents of this message.
If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful.
Claybrook Computing Limited is a subsidiary of Claybrook Computing (Holdings) Limited
Registered Office: Abbey House. 282 Farnborough Road, Farnborough, Hampshire GU14 7NJ
Registered in England and Wales No 1287205
A Hogg Robinson plc company
More information about the Sussex
mailing list