From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.6 Path: eternal-september.org!reader02.eternal-september.org!aioe.org!N/bBT90+fJ5f2hH/+d3Lnw.user.46.165.242.91.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Building the 2021 source release of GnatStudio Date: Thu, 29 Jul 2021 13:58:29 +0200 Organization: Aioe.org NNTP Server Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: gioia.aioe.org; logging-data="48361"; posting-host="N/bBT90+fJ5f2hH/+d3Lnw.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org"; User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 Content-Language: en-US X-Notice: Filtered by postfilter v. 0.9.2 Xref: reader02.eternal-september.org comp.lang.ada:62440 List-Id: 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