From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Building the 2021 source release of GnatStudio
Date: Thu, 29 Jul 2021 13:58:29 +0200 [thread overview]
Message-ID: <sdu554$1f79$1@gioia.aioe.org> (raw)
In-Reply-To: sdu3n0$buh$1@dont-email.me
On 2021-07-29 13:33, Stéphane Rivière wrote:
>> First, never ever use Python!
>
> If scripting capabilities are needed in GnatStudio, why not use HAC ?
> https://github.com/zertovitch/hac
>
> We use it at $job on a daily basis, replacing all our Bash and PHP
> scripting stuff...
>
> Seven times faster than Bash, tons times powerfull and maintanable and,
> even better, HAC source can be GNAT compiled from scratch (without
> changing a line). There is also a shebang to ease scripting like with
> any other scripting language...
Nothing of the shell sort. I think it is a major confusion on the side
of developers of Ada scripts.
For scripting an Ada application one needs support of
1. Loadable modules/packages, prebuilt, to call back to the Ada
application subprograms provided by the module/package;
2. Passing Ada in/out parameters down to a script's subprogram upon
invocation;
3. Returning parameters from the script's subprogram;
4. Precompiled script modules, GPS would use a huge number of scripts,
compiling them each time would be expensive;
5. Abortable calls and propagation of exceptions out of the script;
6. Concurrent script run-time with independent instances.
For example, this is what I use Python for, and this is just the same
case as in GPS:
http://www.dmitry-kazakov.de/ada/max_home_automation.htm#5.1
The user script refers to a preloaded module that offers communication
channel back to the application, e.g. GPS script interface.
In my case the script is called periodically and returns a persistent
object, which is passed down by the next call. Such objects must be
managed by the caller (the application).
And I load Python dynamically to break dependency on it.
--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
next prev parent reply other threads:[~2021-07-29 11:58 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-28 9:25 Building the 2021 source release of GnatStudio Rod Kay
2021-07-28 10:49 ` Emmanuel Briot
2021-07-28 14:29 ` Simon Wright
2021-07-29 10:29 ` Rod Kay
2021-07-29 0:49 ` Randy Brukardt
2021-07-29 7:49 ` Luke A. Guest
2021-07-29 8:41 ` Dmitry A. Kazakov
2021-07-29 11:33 ` Stéphane Rivière
2021-07-29 11:58 ` Dmitry A. Kazakov [this message]
2021-07-30 11:29 ` Stéphane Rivière
2021-07-30 11:51 ` Emmanuel Briot
2021-07-30 16:59 ` Shark8
2021-07-30 17:07 ` Simon Wright
2021-07-31 9:37 ` Stéphane Rivière
2021-07-31 10:30 ` Dmitry A. Kazakov
2021-07-31 11:58 ` Stéphane Rivière
2021-07-31 12:29 ` Dmitry A. Kazakov
2021-08-03 1:05 ` Shark8
2021-08-03 6:30 ` Dmitry A. Kazakov
2021-08-03 7:20 ` Stéphane Rivière
2021-08-28 0:08 ` Roger Mc
2021-07-30 0:21 ` Randy Brukardt
2021-07-29 10:37 ` Rod Kay
2021-07-29 14:37 ` J-P. Rosen
2021-07-29 17:43 ` Shark8
2021-07-29 17:23 ` Shark8
2021-07-29 1:09 ` Roger Mc
2021-07-29 10:47 ` Rod Kay
2021-08-27 9:58 ` Blady
2021-08-28 0:10 ` Roger Mc
2021-08-28 6:40 ` Jeffrey R. Carter
2021-08-28 7:16 ` Roger Mc
2021-08-28 7:21 ` Simon Wright
2021-08-28 9:14 ` Jeffrey R. Carter
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox