[alicebot-archcomm] Posix Standards
Dr. Richard S. Wallace
alicebot-archcomm@list.alicebot.org
Wed, 13 Mar 2002 20:00:15 -0800
It has become apparent to several of us that the extensibility of AIML with
<system> and <javascript> present several problems, not least of which is
portability between various implementations and platforms.
Linux succeeded in part because the developers coded an existing standard,
the Posix operating system standard.
I would think that we could "inherit" a lot of nice work in operating
systems interfaces, is we also chose to follow the Posix standard.
Some examples of stuff in the standard:
F = open() : open a file
close(F) : close it
read(F) : low-level read
write(F, data) : low level write
stat(F) : return 0 is the file F exists, 1 otherwise.
pid : returns process id.
tmpnam : Generate unique temporary file name
kill(p) : Send signal to process p.
also more stuff dealing with multiple processes, network sockets, and
waiting for I/O interrupts.
Our <system> tag is already quite close to the Posix system(3)
specification. I intentionally trying to resist the urge to make up any new
XML syntax for Posix concepts. Maybe someone has done this already? If
not, we could consider making up tags like <tmpnam/>, <kill pid="10"/> or
even the Unix <select>. In any case, I'd like to keep the converation for
now focused on whether or not adopting Posix standards for AIML is a good
idea, not what the tag syntax will be.
Our <gossip> tag might be defined as:
<category>
<pattern>GOSSIP *</pattern>
<template>
<set var="filename">gossip.txt</set>
<set var="F"><open mode="a"><get var="filename"/></open></set>
<write var="F"><star/></write>
<close>F</close>
</template>
</category>
One minor drawback to the Posix standard: Microsoft does not comply. But we
would probably not need the entire standard, and the parts we do need are
likely to have equivalent functions in the world of Microsoft.
Dr. Rich