comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: For the AdaOS folks
Date: Sun, 2 Jan 2005 12:50:47 +0100
Date: 2005-01-02T12:50:47+01:00	[thread overview]
Message-ID: <8rz51zshvp8k$.gvir0kpiedzk.dlg@40tude.net> (raw)
In-Reply-To: _gHBd.14666$0y4.10314@read1.cgocable.net

On Sat, 01 Jan 2005 19:31:56 -0500, Warren W. Gay VE3WWG wrote:

> Dmitry A. Kazakov wrote:
>> On Fri, 31 Dec 2004 11:24:40 -0500, Warren W. Gay VE3WWG wrote:
>>>Dmitry A. Kazakov wrote:
>>>>On Fri, 31 Dec 2004 06:30:51 -0500, Warren W. Gay VE3WWG wrote:
>>>All of the infrastructure that you talk about is built outside of
>>>the mk. The mk's purpose is to provide the basic needs for an OS, but
>>>_not_ be the OS itself. In fact, using a mk approach, application and
>>>OS modules conceptually run beside each other, perhaps only differing
>>>in the privileges they have (ports that they have rights to).
>> 
>> I agree in principle, but disagree in details, in what are these basic
>> needs. I think that a kind of "protected object" should be provided already
>> by the kernel as a building block.
> 
> Ok, but if your Ada RTL provides it, do you really care that
> much whether it is in or out of the OS?

Yes, because Ada's protected objects are local and cooperative. It'd like
to see system services exposed as protected objects, with entry queues and
data fully memory protected. Same with tasks. I like OO interface to OS, no
compromises.

>>>What does "object persistence" have more than a "set of values"? How
>>>is an "object container" any different than a directory/subdirectories
>>>containing "values"?
>> 
>> The difference is that the above is untyped or weakly typed. An object is
>> not just a value but also the methods to apply. This firstly would prevent
>> abuses, and secondly, we could define somewhere an abstract interface to be
>> implemented and so enforce proper behavior.
> 
> But a persistent object is nothing more than a blob of data
> recorded in a file (or something acting as a container). The
> fact that it might have methods makes no real difference. Who provides
> the methods?

The type of the object is known. So the operations defined on it as well.

> If you have to provide them, then you make matters
> worse (we're back to everybody writing their own way to save
> and retrieve data in their own way).

No, it is fundamentally different. First because there is no "save and
retrieve". The object is persistent. There is only create and delete. The
latter is automatic because of garbage collection through reference
counting. Any other operations apart from construction, copy-construction
and destruction are of no interest for the first level of abstraction. On
the second level we could define some relationships between application,
host and user objects.

>>>But you have not proposed any solution.  You keep saying that
>>>"I don't want to be responsible", but there is nobody/nothing
>>>left to fill that void.
>> 
>> In OO the object is responsible to provide an implementation. 
> 
> But who writes the object? The kernel writer can't. How is he
> going to anticipate all of your configuration needs for your
> application and mine?

Where is any problem? If the kernel provides persistence and your
application needs, say an integer parameter. Derive from the base
Application_Data_Type add a field, here you are.

> You already have Ada.Streams, but so what. I don't see that as
> an improvement for this purpose.

Yes, Ada.Streams illustrates the idea. But problems with it are:

1. Not portable
2. No constructors/destructors
3. Oriented on sequential I/O
4. Double dispatch is hard-wired
5. Cannot deal with object dependencies (not inheritance, but references)

Basically, Ada's ADT should be extended in a way, which would allow user
types acting in a way similar to Ada.Streams.

>>>So you don't want an API, and yet you want it to happen somehow.
>> 
>> No, I do not want to see Read_Block and Write_Block in API. 
> 
> Sure, but who was proposing that?

Is Read_String and Write_String any better?

>> Writing an Ada
>> program, I do not see LDA, STR, MOV. They are still there, somewhere
>> beneath in the Underwolrd, but I don't care. 
> 
> Of course. But when you want to know where GNAT is installed, it
> is very easy in Windows to lookup a registry key and get the
> pathname for it. If I want to know where APQ should be installed
> as an Ada binding, I can do another registry query and get the
> top level GNAT directory for bindings.
> 
> Is that so complicated?

Yes it is. You have to know the names you are looking for! The first step
is of course to define some naming convention. This is a bad way, because
it is not enforced. See what happens with /etc and HKEY_LOCAL_MACHINE. So
the second step is to provide API to query that names from an application.
But that is still not good. A better way, as I said, is OO. You ask an
application: give me your settings and the result is an object of those.
The last step is to ask yourself what for? There is GNAT, an object why
cannot I talk to it directly?

> Does it really need to be more
> complicated than that?

No it need to be much more simpler!

> How strongly typed do you make your pathnames in your programs? Do you
> really define a different string type for different pathnames and
> file names?

Why there should be any pathnames? A name is used only to get an object
from a text map, provided that there should be one. Once you have the
object forget about its name. It has a type and so the methods to call.

>> I also cannot imagine any
>> decent OO design of OS without MI, 
> 
> But the O/S has nothing to do with MI, unless it wants to sport
> an OO interface (which IMHO is unnecessary, at least for many
> APIs).

Yes, this is the real source of our disagreement. As long as OS API are
non-OO you will fall back to bits and bytes or String and Unbounded_String,
if you want.
 
>> MD and interface inheritance from
>> concrete objects. 
> 
> If you force everything into an object metaphore, you make
> it difficult for other languages.

Did UNIX care much about Ada? We'll make them see! (:-)) OK, Visual Basic
users will have a virtual machine, it is a conventional ways to do such
things.

> Frankly, for the services
> that you get from an O/S, I don't see much point in putting
> an OO face on it.
> 
> If you look around, you'll see a number of people are getting
> less fanatical about objects, and in some cases are talking
> "services" instead.

Call it service, that's no matter. I use the word OO only because it is a
known buzz word. Actually I meant ADT. The service should be a typed
object. Its entry points should have typed parameters. Type checks have to
be enforced both by the language and by the kernel. Further most of the
calls to the entry points have to be dispatching. Dispatching tables should
be memory-protected.

> And that is largely what the operating system
> provides. But if you say you must have OO interfaces, then
> the Ada RTL is there to let you model any way you see it.
> You could even write packages for this, or if you don't like
> the one you have write alternatives.

No, I cannot. The problem is that tasks and protected objects are not
tagged. As you probably saw, I do not want to build a fat sandwich
OO-interface->procedural API->OO-kernel. It clumsy, ugly, buggy and
inefficient. I want to directly talk to OS. For this its API have to
provide, say, protected objects. They need to be implemented on very
different basis, than the buil-in ones. If some of them have to be memory
protected, they might require context switches, if some of them are remote,
then queuing would require networking, data marshaling etc

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



  reply	other threads:[~2005-01-02 11:50 UTC|newest]

Thread overview: 80+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-27  5:09 For the AdaOS folks Wes Groleau
2004-12-27 10:56 ` Florian Weimer
2004-12-27 12:50   ` Georg Bauhaus
2004-12-27 13:12     ` Florian Weimer
2004-12-28  1:18   ` Wes Groleau
2004-12-27 13:46 ` Adrien Plisson
2004-12-27 16:28   ` Georg Bauhaus
2004-12-28  6:19   ` Microkernels & Ada (Was for the AdaOS folks) Warren W. Gay VE3WWG
2004-12-28 12:02     ` Adrien Plisson
2004-12-28 15:28       ` Warren W. Gay VE3WWG
2004-12-30  1:19 ` For the AdaOS folks Nick Roberts
2004-12-30 13:58   ` Warren W. Gay VE3WWG
2004-12-30 15:27     ` Dmitry A. Kazakov
2004-12-30 16:30       ` Warren W. Gay VE3WWG
     [not found]         ` <otb8t09dkjh54e1k5s5ccn23ggkqk6ndui@4ax.com>
2004-12-30 19:06           ` OT: Mach Ports (For the AdaOS folks) Warren W. Gay VE3WWG
2004-12-31 10:03         ` For the AdaOS folks Dmitry A. Kazakov
2004-12-31 11:30           ` Warren W. Gay VE3WWG
2004-12-31 12:31             ` Dmitry A. Kazakov
2004-12-31 16:24               ` Warren W. Gay VE3WWG
2004-12-31 17:57                 ` Marven Lee
2004-12-31 18:40                   ` Warren W. Gay VE3WWG
2004-12-31 19:22                     ` Warren W. Gay VE3WWG
2005-01-02 15:09                     ` Marven Lee
2005-01-02 20:06                       ` Luke A. Guest
2005-01-03  3:13                         ` Warren W. Gay VE3WWG
2005-01-03  6:40                           ` Luke A. Guest
2005-01-03 10:30                             ` Marven Lee
2005-01-03 15:52                             ` Warren W. Gay VE3WWG
2005-01-03 16:48                           ` Ad Buijsen
2005-01-03 18:49                             ` Warren W. Gay VE3WWG
2005-01-03 13:43                         ` Marven Lee
2005-01-04 23:36                         ` Nick Roberts
2005-01-03 16:22                       ` Warren W. Gay VE3WWG
2005-01-04 23:16                       ` Nick Roberts
2005-01-05  3:48                         ` Warren W. Gay VE3WWG
2005-01-05 13:14                           ` Nick Roberts
2005-01-01 12:53                 ` Dmitry A. Kazakov
2005-01-02  0:31                   ` Warren W. Gay VE3WWG
2005-01-02 11:50                     ` Dmitry A. Kazakov [this message]
2005-01-02 22:04                       ` Warren W. Gay VE3WWG
2005-01-03 10:30                         ` Dmitry A. Kazakov
2005-01-03 16:36                           ` Warren W. Gay VE3WWG
2005-01-03 17:05                             ` Dmitry A. Kazakov
2005-01-03 19:01                               ` Warren W. Gay VE3WWG
2005-01-03 19:55                                 ` Dmitry A. Kazakov
2005-01-03 20:44                                   ` Warren W. Gay VE3WWG
2005-01-04  0:02                                     ` Randy Brukardt
2005-01-04 17:44                                       ` Warren W. Gay VE3WWG
2005-01-04 20:14                                         ` Nick Roberts
2005-01-04  9:59                                     ` Dmitry A. Kazakov
2005-01-04 18:00                                       ` Warren W. Gay VE3WWG
2005-01-04 19:07                                         ` Dmitry A. Kazakov
2005-01-04 19:57                                           ` Warren W. Gay VE3WWG
2005-01-05  0:02                                             ` Nick Roberts
2005-01-05  4:37                                               ` Warren W. Gay VE3WWG
2005-01-05 18:54                                                 ` Nick Roberts
2005-01-05 20:04                                                   ` Warren W. Gay VE3WWG
2005-01-06  0:32                                                     ` Nick Roberts
2005-01-06  1:29                                                   ` Wes Groleau
2005-01-06 11:03                                                     ` Dmitry A. Kazakov
2005-01-05  9:39                                             ` Dmitry A. Kazakov
2005-01-05 11:20                                               ` Warren W. Gay VE3WWG
2005-01-05 12:18                                                 ` Dmitry A. Kazakov
2005-01-05 14:39                                                   ` Warren W. Gay VE3WWG
2005-01-05 17:16                                                     ` zest_fien
2005-01-05 19:44                                                       ` Larry Kilgallen
2005-01-04 20:09           ` Nick Roberts
2005-01-05 10:19             ` Dmitry A. Kazakov
2005-01-05 18:33               ` Nick Roberts
2005-01-05 20:15                 ` Dmitry A. Kazakov
2004-12-31 18:47     ` Nick Roberts
2004-12-31 20:36       ` Warren W. Gay VE3WWG
2005-01-04 18:22         ` Nick Roberts
2005-01-05  5:12           ` Warren W. Gay VE3WWG
2005-01-05 18:02             ` Nick Roberts
2005-01-05 19:55               ` Warren W. Gay VE3WWG
2005-01-06  0:57                 ` Nick Roberts
2005-01-06  2:34                   ` Warren W. Gay VE3WWG
  -- strict thread matches above, loose matches on Subject: below --
2005-01-05 12:14 Mike Brenner
2005-01-05 18:04 ` Warren W. Gay VE3WWG
replies disabled

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