comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Custom Storage Pool questions
Date: Sat, 16 Oct 2021 11:00:05 +0200	[thread overview]
Message-ID: <ske4ak$l4c$1@gioia.aioe.org> (raw)
In-Reply-To: skd08t$33p$1@franka.jacob-sparre.dk

On 2021-10-16 00:44, Randy Brukardt wrote:
> "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> wrote in message 
> news:skbdb5$u50$1@gioia.aioe.org...
>> On 2021-10-15 02:36, Randy Brukardt wrote:
>>> "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> wrote in message 

> In the case you describe, you'd have a binding that abstracts the
> two underlying libraries, and you'd unit test that. Assuming it
> passes with both implementations, it shouldn't matter which is used
> in a particular program.

You need to test switching between implementations. In the case of 
static linking that part is not even code and thus non-testable. You 
must test each concrete assembly of components each time and each 
assembly with have alternating code. Why do you think people keep on 
asking for Ada preprocessor in c.l.a?

>> Yes, but it is not economically viable anymore. Nobody would pay 
>> for that.
> 
> Has software gotten so 
> bad that no one cares about that?

Yes, and worse.

> I certainly would never do that to
>  our customers (and I hate support anyway, I want to reduce it as
> much as possible).

Compilers are not ware anymore. We live in a post-market era with 
neo-feudal economic relationships.

> There's no plug-ins in a statically linked system. What would be the
> point? I'm assuming that we're talking about Ada interfaced
> libraries here (C is a different kettle of fish), so you're talking
> about switching implementations of a single Ada spec. We've done that
> going back to the beginning of Ada time; it's managed by decent build
> tools and has gotten pretty simple in most Ada compilers. So what
> would a plug-in buy?

Yes, that is about build tools to develop and maintain, because 
dependencies handling and adjusting the code invoking optional 
components is specific to the problem domain. Such stuff does exist, 
e.g. this is how VxWorks or Yokto Linux images are configured. No way 
regular software could go this way.

>>> I don't see any way that such loading could work with Ada 
>>> semantics; there is an assumption that all of your ancestors 
>>> exist before you can do anything. The elaboration checks were 
>>> intended to check that.
>> 
>> We have a core libraries which are import libraries for the 
>> plug-in. When a plug-in is loaded, the core libraries are 
>> elaborated unless already loaded, the plug-in library itself is not
>> elaborated, because automatic elaboration would deadlock under 
>> Windows. Then a dedicated entry point is called in the plug-in 
>> library. The first thing it does is a call to the plug-in 
>> elaboration code. GNAT generates an <library-name>init entry for 
>> that. After this the plug-in registers itself providing a tagged 
>> object, which primitive operations are basically the library's true
>> interface.
>> 
>> I know it sounds horrific, but it works pretty well.
> 
> It does sound horrific, and it doesn't seem to buy much.

We started with a monolithic solution and were forced to redesign it 
when it became unmaintainable. Apart from the the fact that it bluntly 
refused to fit in 256K RAM of a target platform ...

> A tag is a property of a type in Ada, and it includes the dispatch 
> table.

No, it is just one possible implementation. It has a disadvantage that 
you must search a global map tag->vptr and you must keep the whole table 
per each tagged type. I suppose one could exchange the map tag->ptr with 
ptr->tag. Then dispatching will be cheaper and X'Tag more expensive. In 
any case you must adjust either map when elaborating the library.

> You can't unload a library until all of the things that depend upon 
> it have been unloaded, so from the perspective of a compiler, it acts
> like library-level. The whole mess about loading/unloading is on the
> user (which is what I meant about "unsafe" yesterday), and if you get
> it wrong, your program is erroneous and can do any manner of things.
> It's no more worth it for a compiler to worry about bad unloading
> than it is to worry about dangling pointers.

Still arguing for collections, huh? (:-))

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

  reply	other threads:[~2021-10-16  9:00 UTC|newest]

Thread overview: 97+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-13  0:53 Custom Storage Pool questions Jere
2021-09-13  5:29 ` Randy Brukardt
2021-09-14  1:04   ` Jere
2021-09-21  0:06     ` Randy Brukardt
2021-09-18 11:32   ` Simon Wright
2021-09-20  0:31   ` Jere
2021-09-20  6:34     ` Niklas Holsti
2021-09-20  6:48       ` Emmanuel Briot
2021-09-20  7:35         ` Dmitry A. Kazakov
2021-09-20 16:59         ` Shark8
2021-09-21  0:50         ` Randy Brukardt
2021-09-21 23:08           ` Jere
2021-09-28  4:42             ` Randy Brukardt
2021-10-02 23:19               ` Jere
2021-10-03  8:52                 ` Dmitry A. Kazakov
2021-10-14  1:26                   ` Randy Brukardt
2021-09-13 11:12 ` J-P. Rosen
2021-09-14  0:48   ` Jere
2021-09-14  6:08     ` J-P. Rosen
2021-09-15  0:39       ` Jere
2021-09-15  7:01         ` Simon Wright
2021-09-16 23:32           ` Jere
2021-09-20 23:51             ` Randy Brukardt
2021-09-21 22:40               ` Jere
2021-09-14  6:23     ` Dmitry A. Kazakov
2021-09-14  6:42       ` J-P. Rosen
2021-09-14  7:00         ` Dmitry A. Kazakov
2021-09-20 23:58         ` Randy Brukardt
2021-09-15  0:21       ` Jere
2021-09-15  6:54         ` Dmitry A. Kazakov
2021-09-20 23:48       ` Randy Brukardt
2021-09-14 10:54     ` Egil H H
2021-09-15  0:11       ` Jere
2021-09-15 16:43 ` Simon Wright
2021-09-15 17:03   ` Simon Wright
2021-09-15 19:07   ` Dmitry A. Kazakov
2021-09-15 20:40     ` Simon Wright
2021-09-16  7:12       ` Emmanuel Briot
2021-09-16 23:21         ` Jere
2021-09-17  7:08           ` Emmanuel Briot
2021-09-17  7:18           ` Simon Wright
2021-09-17 13:56           ` Dmitry A. Kazakov
2021-09-17 19:46             ` Simon Wright
2021-09-17 20:39               ` Dmitry A. Kazakov
2021-09-17 21:17                 ` Niklas Holsti
2021-09-18  7:49                   ` Dmitry A. Kazakov
2021-09-18  9:03                     ` Niklas Holsti
2021-09-18 10:22                       ` Dmitry A. Kazakov
2021-09-18 15:59                         ` Niklas Holsti
2021-09-18 16:19                           ` Dmitry A. Kazakov
2021-09-19 10:36                             ` Niklas Holsti
2021-09-19 11:41                               ` Dmitry A. Kazakov
2021-09-20  7:05                                 ` Niklas Holsti
2021-09-20  7:35                                   ` Dmitry A. Kazakov
2021-09-20  8:08                                     ` Niklas Holsti
2021-09-20  8:28                                       ` Dmitry A. Kazakov
2021-09-21  0:45                                         ` Randy Brukardt
2021-09-21  0:40                                       ` Randy Brukardt
2021-09-21  0:30                                 ` Randy Brukardt
2021-09-21  0:37                                 ` Randy Brukardt
2021-09-21  6:28                                   ` Dmitry A. Kazakov
2021-09-28  4:38                                     ` Randy Brukardt
2021-09-28  7:00                                       ` Dmitry A. Kazakov
2021-09-21  0:26                         ` Randy Brukardt
2021-09-21  6:51                           ` Dmitry A. Kazakov
2021-09-28  4:31                             ` Randy Brukardt
2021-09-28  6:56                               ` Dmitry A. Kazakov
2021-09-28  7:52                                 ` Simon Wright
2021-09-28  8:07                                   ` Dmitry A. Kazakov
2021-09-28 22:04                                     ` Randy Brukardt
2021-09-29  7:57                                       ` Dmitry A. Kazakov
2021-09-29 14:41                                         ` Shark8
2021-09-29 15:16                                           ` Dmitry A. Kazakov
2021-09-30  0:16                                             ` Randy Brukardt
2021-09-30  8:08                                               ` Dmitry A. Kazakov
2021-10-01  0:04                                                 ` Randy Brukardt
2021-10-01  8:25                                                   ` Dmitry A. Kazakov
2021-10-02  9:06                                                     ` Randy Brukardt
2021-10-02 10:18                                                       ` Dmitry A. Kazakov
2021-10-03  4:33                                                         ` Randy Brukardt
2021-10-03  8:40                                                           ` Dmitry A. Kazakov
2021-10-14  1:21                                                             ` Randy Brukardt
2021-10-14  3:12                                                               ` philip...@gmail.com
2021-10-14  7:31                                                               ` Dmitry A. Kazakov
2021-10-15  0:36                                                                 ` Randy Brukardt
2021-10-15  8:08                                                                   ` Stephen Leake
2021-10-15  8:18                                                                     ` Dmitry A. Kazakov
2021-10-15 22:22                                                                     ` Randy Brukardt
2021-10-15  8:15                                                                   ` Dmitry A. Kazakov
2021-10-15 22:44                                                                     ` Randy Brukardt
2021-10-16  9:00                                                                       ` Dmitry A. Kazakov [this message]
2021-10-16 14:32                                                                         ` Simon Wright
2021-10-16 15:06                                                                           ` Dmitry A. Kazakov
2021-10-18 14:23                                                                             ` Shark8
2021-09-21  0:19                     ` Randy Brukardt
2021-09-21  0:18                 ` Randy Brukardt
2021-09-16  8:41       ` Dmitry A. Kazakov
replies disabled

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