comp.lang.ada
 help / color / mirror / Atom feed
From: "Nick Roberts" <nickroberts@callnetuk.com>
Subject: Re: scripting/extension ... [off topic]
Date: 2000/02/16
Date: 2000-02-16T00:00:00+00:00	[thread overview]
Message-ID: <38a9fdb8@eeyore.callnetuk.com> (raw)
In-Reply-To: 38A6F3D6.2D9C7296@earthlink.net

I sent this (warning: highly discursive) post to Pascal as an e-mail by
accident (instead of to the group), which very likely bewildered him
entirely. I've got no reply from him, anyway!

The kind of 'Ada interpreter' suggested has existed for a long time, albeit
in a form that (to my knowledge) was never really finished off. It was
called 'ACE' (the Ada Command Executive), and was was one of the (numerous)
developments under the STARS programme. I have a copy of the source code and
docs (somewhere on my hard disk, I think!), if anyone's interested. I think
it was a nice idea, but surely the amount of typing you have to do to do
something 'simple' would come a screaming culture shock to anyone used to
the 'sh' family.

I have invented, pretty well in my head, an Application eXtension System:
AXS (pron. 'axis').

It's not a language. The idea is that every element that would make up a
traditional script program (large or small) is replaced, in essence, by a
dialog box, that garners the necessary information for the element, and
which simply invokes further dialogs for component elements.

For example, a sequence of actions would be entered in a dialog box that
displayed the actions in a 'list box'; there would be a button to add a new
action, one to insert an action, one to delete an action, and one to edit an
action. Actions could be rearranged by drag-and-drop (or by two arrow
buttons). Editing an action would pop up a dialog for that purpose; of
course, one of the options would be another (nested) sequence.

I shan't get deeply into the details, but I think I've dealt with the
various problems associated with doing this sort of thing. AXS seems to be a
great way of programming GUIs a la RAD. The main advantages of AXS could be
set out as below.

1. No language has to remembered by the 'programmer'. Syntax errors are not
generally possible. Selecting actions is generally a matter of 'point and
click'.

2. Each dialog box ensures that all the necessary parameters are filled in,
and can be validated (to some extent) at entry time. Entry of values can
generally be made very easy (e.g. a calendar for dates). Variables can be
selected by 'point and click'.

3. No distinction is made between actions and data values. This has the
double advantage of making activity easily data-directed, and of making it
particularly easy to program the automated manipulation (and construction)
of procedures.

4. Certain data that would be difficult or impossible to encode in textual
script language can be straightforwardly dealt with by AXS (until it comes
to manifesting it in XML, of course). For example, in AXS, an icon could be
entered by simply popping up an 'icon editor' dialog box, without the
programmer having to deal with files or filenames in any way.

The downside (there always is one :-) is that programming the sub-AXS
modules is relatively elaborate. I don't think this is too much of a
problem, so long as most modules have a reasonable expectation of a high
level of re-use.

Undoubtedly there will be some constructs that will actually be more easily
entered and edited as text than by dialogs, e.g. complicated mathematical
expressions. However, a textual alternative could always be offered by a
dialog (further complicating the implementation, of course).

An AXS procedure could be manifested in XML, if necessary. E.g. (I've used
square instead of angle brackets here, so as not to confuse certain viewing
software):

[procedure]
  [identifier]activate_ppp[/identifier]
  [name]Activate a PPP session on a modem[/name]
  [desc]This procedure causes a modem to dial up an external ...[/desc]
  [help]/usr/axs/doc/ppp/activate_ppp.html[/help]
  [option]
    [identifier]debug[/identifier]

[actuals][input][identifier]level[/identifier][value]3[/value][/input][/actu
als]
  [/option]
  [parameters]
    [input]
      [type]string[/type]
      [identifier]phone_number[/identifier]
      [name]Telephone number to dial[/name]
      [desc]This is the telephone number the modem is to dial to get
...[/desc]
    [/input]
    ...
  [/parameters]
  [action]
    [sequence]
      [call]
        [identifier]reset_modem[/identifier]
        [name]Reset a modem to a known state[/name]
        [actuals]

Okay, I've stopped there, but you get the flavour.

I think I'm touching on something that Dr Robert Leif has being saying
recently (about XML having great importance for the future of programming
languages). There are some well-argued advantages to using XML for this sort
of purpose (one of the most obvious being the flexibility in formatting and
presenting printouts, but it goes much deeper than that).

However, touching on the mention of Scheme in this thread (am I imagining
that?), it seems to me that languages such as LISP and Prolog could be very
readily used in place of 'traditional' script languages.

Prolog could offer particularly powerful facilities when it comes to
pattern-matching. If external procedures were to be provided such as
env:obj(Obj) to instantiate with every object in the 'current object' (i.e.
every file in the current directory), env:attr(Name,Attr) to instantiate
with object attributes (e.g. "name", "mime-type", "mdate", etc.), and
env:value(Obj,Attr,Val) to instantiate with the value of an attribute for an
object, some pretty sophisticated searches could be programmed very
concisely:

mail_me_my_files(CO) :-
    my_email(Me),
    my_initials(Init),
    Search = "Author: "//Init,
    env:within(CO, (
        env:attr("name",NameAttr),
        env:obj(Obj),
        env:value(Obj,NameAttr,Name),
        env:run("search",[Search,Name],0),
        Subj = "Found my file: "//Name,
        env:run("sendmail",["-s",Subj,Me,Name],0) ) ).

A really good debugging environment would be important. Fifth generation
languages like these could very aptly be used for implementing AXS.

The potential exists for some rather 'intelligent' things to be done with
software that isn't frozen in brick. It's strange, but I'm beginning to get
a more concrete sensation that the days of 'programming', as such, are not
so far from being over as many of us would prefer to think. It's an old idea
(dating back to the sixties); computers are nearly getting to the point
where they are actually powerful enough (while remaining affordable) to
realise the dream.

Maybe the little chip in The Terminator's* head isn't all that far away
after all :-o

--
Nick Roberts
http://www.adapower.com/lab/adaos


*TM Carolco, 1984+







  reply	other threads:[~2000-02-16  0:00 UTC|newest]

Thread overview: 80+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-01-27  0:00 tagged types extensions - language design question Vladimir Olensky
2000-01-27  0:00 ` Matthew Heaney
2000-01-27  0:00   ` Charles Hixson
2000-01-28  0:00   ` Vladimir Olensky
2000-01-28  0:00     ` Matthew Heaney
2000-01-28  0:00       ` Charles Hixson
2000-01-28  0:00         ` Matthew Heaney
2000-02-01  0:00           ` Charles Hixson
2000-02-01  0:00             ` Matthew Heaney
2000-01-29  0:00       ` Vladimir Olensky
2000-01-29  0:00         ` Matthew Heaney
2000-01-31  0:00           ` Vladimir Olensky
2000-01-31  0:00             ` Matthew Heaney
2000-01-31  0:00               ` Vladimir Olensky
2000-01-29  0:00         ` Matthew Heaney
2000-01-27  0:00 ` Laurent Guerby
2000-01-28  0:00   ` Vladimir Olensky
2000-01-28  0:00     ` Andy
2000-01-28  0:00       ` Vladimir Olensky
2000-01-29  0:00         ` Andy
2000-01-31  0:00           ` Vladimir Olensky
2000-01-27  0:00 ` Fraser
2000-01-28  0:00 ` Tucker Taft
2000-01-31  0:00   ` Vladimir Olensky
2000-02-01  0:00   ` Charles Hixson
2000-02-01  0:00     ` Matthew Heaney
2000-02-01  0:00       ` Brian Rogoff
2000-02-03  0:00         ` scripting/extension language for Ada (was : Re: tagged types extensions) root
2000-02-03  0:00           ` Brian Rogoff
2000-02-04  0:00             ` Ray Blaak
2000-02-04  0:00               ` Stanley R. Allen
2000-02-04  0:00                 ` Samuel T. Harris
2000-02-05  0:00                   ` Lionel Draghi
2000-02-05  0:00                     ` Samuel T. Harris
2000-02-06  0:00                       ` Bryce Bardin
2000-02-08  0:00                         ` Samuel T. Harris
2000-02-06  0:00                       ` Lionel Draghi
2000-02-05  0:00                 ` Ray Blaak
2000-02-05  0:00                 ` Lionel Draghi
2000-02-04  0:00               ` Robert A Duff
2000-02-05  0:00                 ` blaak
2000-02-05  0:00                   ` Brian Rogoff
2000-02-09  0:00                   ` Robert A Duff
2000-02-09  0:00                     ` Ted Dennison
2000-02-10  0:00                       ` Samuel T. Harris
2000-02-05  0:00                 ` Ehud Lamm
2000-02-10  0:00                 ` Pascal Martin
2000-02-10  0:00                   ` Ray Blaak
2000-02-11  0:00                     ` scripting/extension language for Ada (we have an opportunity here) Tarjei T. Jensen
2000-02-11  0:00                       ` Robert I. Eachus
2000-02-12  0:00                         ` Pascal Martin
2000-02-13  0:00                           ` Robert I. Eachus
2000-02-16  0:00                             ` Nick Roberts [this message]
2000-02-16  0:00                               ` scripting/extension ... [off topic] Ray Blaak
2000-02-12  0:00                         ` scripting/extension language for Ada (we have an opportunity here) Tarjei Tj�stheim Jensen
2000-02-12  0:00                           ` Samuel T. Harris
2000-02-14  0:00                             ` Robert A Duff
2000-02-15  0:00                               ` Samuel T. Harris
2000-02-16  0:00                                 ` Robert A Duff
2000-02-16  0:00                                   ` Samuel T. Harris
2000-02-16  0:00                                     ` Robert A Duff
2000-02-17  0:00                                       ` Samuel T. Harris
2000-02-12  0:00                           ` root
2000-02-12  0:00                         ` Samuel T. Harris
2000-02-12  0:00                         ` blaak
2000-02-11  0:00                     ` scripting/extension language for Ada (was : Re: tagged types extensions) David Starner
2000-02-12  0:00                       ` blaak
2000-02-15  0:00                         ` Brian Rogoff
2000-02-12  0:00                       ` Pascal Martin
2000-02-14  0:00                     ` Robert A Duff
2000-02-05  0:00             ` scripting/extension language for Ada (was : Re: tagged typesextensions) Lionel Draghi
2000-02-05  0:00           ` scripting/extension language for Ada (was : Re: tagged types extensions) Ehud Lamm
2000-02-06  0:00             ` Lionel Draghi
2000-02-06  0:00               ` scripting/extension language for Ada Terry Westley
2000-02-06  0:00               ` scripting/extension language for Ada (was : Re: tagged types extensions) Ehud Lamm
2000-02-09  0:00               ` Robert A Duff
2000-01-31  0:00 ` tagged types extensions - language design question Mark Lundquist
2000-02-01  0:00   ` Ehud Lamm
2000-02-01  0:00   ` Vladimir Olensky
2000-02-01  0:00   ` Simon Wright
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox