From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,1c8c283347cf0236 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!feeder2.cambriumusenet.nl!feeder3.cambriumusenet.nl!feed.tweaknews.nl!193.201.147.78.MISMATCH!feeder.news-service.com!85.214.198.2.MISMATCH!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: "Alex R. Mosteo" Newsgroups: comp.lang.ada Subject: C++/cmake project, injecting Ada... (was Re: If not Ada, what else...) Followup-To: comp.lang.ada Date: Thu, 28 Apr 2011 14:55:39 +0200 Organization: A noiseless patient Spider Message-ID: References: <8ee03ab1-6745-4aa4-82ee-be1eccc9afc9@p3g2000vbv.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7Bit Injection-Date: Thu, 28 Apr 2011 12:55:35 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="M7rP6jhm1IVgvmYaXQFuIA"; logging-data="13229"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19SPnE7PG+iSS9oQ12u1HYn" User-Agent: KNode/4.4.9 Cancel-Lock: sha1:Gsfd9j1MFdtpUncKEiuUASTxEmk= Xref: g2news1.google.com comp.lang.ada:19072 Date: 2011-04-28T14:55:39+02:00 List-Id: As I was writing this reply, I realized that focusing in a particular case at hand may provide better food for though and more precise solutions. So I have renamed the thread accordingly. Now, the scenario is like this: A fairly conventional open source project for doing some high-level simulations. C++ based, using cmake for building. Developers using an assortment of linux OSses: Ubuntu 10.04, 10.10, Fedora (last 2 or 3 versions). Eventually, MacOSX could enter the fray. Remember, this is loosely cooperative research, nobody mandates the devel platform to a particularly tight version. The project uses several libraries: boost, YARP, opencv, etc, which are located by cmake. Somehow all this compiles in such varied environments. Now, let's suppose the contributions are fairly self-contained (e.g., providing a particular class instance for an abstract base class). I know how to interface Ada and C/C++, don't mind to write glue code as needed, etc. The challenge: throwing Ada into this mix without disrupting everyone's workflow to an unreasonable level. The obstacles that I see, and for which your ideas are most welcome: 1) Compiler. Debian/Ubuntu could be easy (Debian in particular): the Ada compiler is packaged and uses the system gcc. No idea about Fedora. The AdaCore GPL package brings in its own gcc/g++ versions, which have to be used to compile the C/C++ parts. Thus, it forces people to throw the stock system compiler in favor of the one I need. Not nice in my book. No workaround that I can see. Perhaps the .cgpr file offers a way? My early conclusion: use stock Ada compilers, doable with Debian, no-go in Mac? 2) Build framework: I read somewhere that gprbuild should be used instead. Obviously, I don't like being the newcomer and having to propose that cmake has to go in favor of an unknown tool. Also, not sure of how gprbuild would deal with C/c++ libraries that can be packaged differently depending on OS versions. Alternatively, I confess not having any idea how a few Ada sources could be integrated with cmake. Would very much like to know if this is doable. I read quite some time ago about difficulties (that were solved IIRC) faced by the PlPlot project with their Ada binding; I failed when I tried to replicate that, mostly because my very limited knowledge of cmake. Anyone here has done it? 3) Ada compiler bugs: given my personal experience, better to stick to "conservative" Ada coding. No synchronized interfaces or other fancy novelties. A minor sacrifice. 4) ??? Basically, I'd like to blend in some Ada as painlessly as possible, if possible at all... Piotr Trojanek wrote: > On Apr 20, 12:39 pm, "Alex R. Mosteo" > wrote: >> Hello, >> >> I'm a big supporter of Ada, but I'm the only person that I know that uses >> it in my work environment (mobile robotics research). Everyone is using >> either C, C++, python or java. >> >> I ceased looking into other languages because I am so comfortable with >> Ada. I fear I may have missed some interesting boat. >> >> Do you know of other languages worth to look at (i.e. that will make an >> Ada programmer somewhat happy), that are at least as "popular" as Ada, >> besides these ones mentioned above? > > Alex, I am in a kind of similar position - in my robotics team all the > people > are using C++. I have simply decided not to bother and do my work with > Ada. < This was written before the scenario above: > I do that when it's my own code, that most likely nobody will touch. But it feels rude to impose an unknown (for the rest) language on a group of people which are not my subordinates (some might say that I would be doing them a favor ;-)). It's also a hard decision if you'd like to attract contributors in an open source project (which is the case for the one that I'm just starting). I guess a good chance is to keep using Ada in "boundary" things that may make people exposed to Ada without having to "fight" it head-on. The interested ones can go further. > > There are a lot of programming languages around and people use ALL of > them > to program their robots. Please take a look at the list of languages, > which > you can use for Lego NXT programming (Ada is also there!): > http://en.wikipedia.org/wiki/Lego_Mindstorms_NXT#Programming > > The question is what is your focus in a robotics research? If it is a > RT control, > than I see no point in not using Ada. If you are interested in AI, > then Lisp is > probably the way to go. It has been shown, that virtually any language > can be > used for a robotic research. I think you should simply pick a one, > which allows > you to focus on what is your primary goal. I'm actually into planning/task allocation (although I have to use robot hardware, but using non-RT libraries like player, ROS or YARP). Also lots of networking. So in my case Ada is a better choice than Lisp, I think. Alex. > > -- > Piotr