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: Sat, 31 Jul 2021 12:30:31 +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="37998"; 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:62464 List-Id: On 2021-07-30 13:29, Stéphane Rivière wrote: >> For scripting an Ada application one needs support of > > I don't see anything that HAC couldn't do, natively or with adaptations, > both on the side of HAC and GNATStudio, considering the enormous amount > of time that has been spent to integrate Python into GNATStudio. It would help to provide a minimal example: -------------------------------------------- with Ada.Text_IO; use Ada.Text_IO; procedure Scripwriter is function Square (X : Float) return Float is begin return X*X; end Square; Argument : constant Float := 2.0; Result : Float; begin Load_HAC_Module (...); -- Load custom module making Square callable Result := Call_HAC (..., Argument); -- Call script with Argument Put_Line ( "Square of" & Float'Image (Argument) & " =" & Float'Image (Result) ); end Scripwriter ; -------------------------------------------- The script would be sort of: -------------------------------------------- with Custom_Module; procedure Whatever (X : Float) is begin return Custom_Module.Square (X); end Whatever; -------------------------------------------- The HAC script must take Argument, call Square (accessible via the module), return the result of Square (Argument). > But, imho, this is all history, GNATStudio is scriptable in Python, > GNATStudio is very difficult to build, Adacore is known to love Python > and GNAT CE, as a whole, is a wonderful tool. We have to live with it ;) For AdaCore it is not really much work, they only have to provide a module to interface GPS engine. Their customers would decide witch script they would use. What AdaCore *must* do is to remove static linking to Python. The GPS user should choose the script language per preferences that would look for the corresponding script run-time e.g. Python or HAC or whatever. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de