From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Building the 2021 source release of GnatStudio
Date: Sat, 31 Jul 2021 12:30:31 +0200 [thread overview]
Message-ID: <se38o7$153e$1@gioia.aioe.org> (raw)
In-Reply-To: se0nra$h84$1@dont-email.me
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
next prev parent reply other threads:[~2021-07-31 10:30 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
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 [this message]
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