From: skip@tacky.cs.olemiss.edu (Skip 'AdaX' Sauls)
Newsgroups: comp.windows.x
Subject: Re: Ada multitasking with X-windows
Date: 12 Apr 92 15:31:44 GMT
Organization: University of Mississippi, Dept. of Computer Science

In article <1992Apr12.030236.4632@sparky.imd.sterling.com> dwb@IMD.Sterling.COM (David Boyd) writes:
>In article <1992Apr10.020331.24966@flood.com> tom@flood.com (Tom Chatt) writes:
>>
>(Lots of interesting stuff on how to solve Ada / C interface problems)
>>
>>As I have said, I don't think that you have to completely reimplement
>>X in order to provide some decent bindings. You just have to make sure
>>that the Ada RTS gets in *between* X and Unix. Probably the best way
>>to do this would be to replace at least part of libc, such that when
>>you linked your program, the X calls to, e.g., select(2), would be
>>getting the Ada RTS version of select, and not the "real" Unix one
>>(at least not directly).
>>
>>Doing it "right" would probably entail something like:
>>
>>    application
>>    -------------
>>    X Ada bindings (massages data, then calls C routines)
>>    -------------
>>    libXt, libX, etc. (C routines, off the shelf from MIT or wherever)
>>    -------------
>>    Ada RTS libc emulations / real libc
>>    -------------
>>    Unix kernel
>>
>>Not a reimplementation. Not a "strict binding". Rather, an Ada
>>package for X that allows its applications users to worry about
>>their own problems rather than those of the package. That's my
>>idea of a good binding.
>>
>	And the government wants to know why developing X applications
>in Ada costs so much!!  I am old enough to remember the tail end of JOVIAL
>(a previous government developed language) and someone asking us to develop
>bindings between our FORTRAN libraries and JOVIAL.  The problems were very
>similar and the solutions equally ugly in many cases and JOVIAL was not as
>different from FORTRAN as Ada is from C.  

The result of my thesis will hopefully be a "free" set of bindings that is
easier to use.

>	The solution is for someone to
>completely re-implement not only the X library and intrinsics with a
>design geared toward Ada but the GUIs libraries (OLIT & MOTIF) as well.
>The resulting implementation would probably look nothing like the X, Xt, and
>Xm libraries of today. 

I am going to be working on just such an implementation over the next few
months and will gladly accept any suggestions/needs/wants.

>	The real problem is the government issuing specs that call for
>development of code in Ada using Motif and X. (Note my current contract has
>this specified).  They then wonder why the project overruns budget, and the
>software is both unmaintainable and unportable.

A software engineering class here is working on a project for IBM FSD that
has those specs also.  We are using the STARS Motif bindings on an RS/6000
and have been successful in solving many of the problems with callbacks and
more recently tasking.  My job has been to fix bugs in the bindings and to
provide workarounds, if possible.  It is tough at times, but I have been 
having more fun with this than anything else computer-related.

I would love to work on an Ada X implementation built from the bottom up
instead of being grafted onto the existing C libraries, but that may not
be a realistic wish.

>David W. Boyd	             UUCP:     uunet!sparky!dwb
>Sterling Software IMD        INTERNET: dwb@IMD.Sterling.COM
>1404 Ft. Crook Rd. South     Phone:    (402) 291-8300 
>Bellevue, NE. 68005-2969     FAX:      (402) 291-4362

Skip Sauls                     //    Graduate Student & Instructor
skip@tacky.cs.olemiss.edu    \X/     CS Department, University of Mississippi