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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,c98f618755b0ddcc X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!postnews.google.com!t23g2000yqt.googlegroups.com!not-for-mail From: jonathan Newsgroups: comp.lang.ada Subject: Re: Thinking of using Ada for a job at home. Couple of questions first. Date: Tue, 9 Mar 2010 14:54:06 -0800 (PST) Organization: http://groups.google.com Message-ID: <49fb3586-981d-46a8-a023-f43c8fa47c36@t23g2000yqt.googlegroups.com> References: <6ggto5p3g2p58839gdsut6idb2l621nv2c@4ax.com> NNTP-Posting-Host: 143.117.23.238 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1268175246 11369 127.0.0.1 (9 Mar 2010 22:54:06 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 9 Mar 2010 22:54:06 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: t23g2000yqt.googlegroups.com; posting-host=143.117.23.238; posting-account=Jzt5lQoAAAB4PhTgRLOPGuTLd_K1LY-C User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.18) Gecko/2010021719 Iceweasel/3.0.6 (Debian-3.0.6-3),gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:9502 Date: 2010-03-09T14:54:06-08:00 List-Id: On Mar 9, 9:57=A0pm, Charmed Snark wrote: > jonathan expounded in news:dc294dc4-c89d-4cc0-9826-ac2848277771 > @o3g2000yqb.googlegroups.com: > > > > > > > On Mar 9, 2:49=A0pm, Warren Gay wrote: > >> This is the one main issue that made me give up on Ada a few > >> years back. It seemed that every project that I wanted > >> to do, required me to create a "binding" for this and > >> another for that. Sing "It's a C/C++ world after all". > .. > >> Another approach might be to create a "binding translator". > >> Feed a C/C++ preprocessed output into the translator and > >> crank out some ugly but functional package(s). > > Some more detail on the AdaCore binding translator Jacob mentioned ... > > Recently I decided I wanted a binding to C package, googled for > > a tutorial, and found gem 59 and gem 60 > > >http://www.adacore.com/2009/02/23/gem-59/ > > > Thanks AdaCore! =A0I couldn't have written a binding myself even > > in the easiest limit. All I did was type (iirc) > > =A0 =A0 =A0 =A0g++ -c -fdump-ada-spec -C =A0file_name.h > > and it wrote the thing for me. =A0Lot's of tedious complications > > due to C strings and the like were taken care of. =A0A few things it > > did wrong, but not too bad .. even I could fix it. > > > Jonathan > > Hey, that is good news! I'll definitely check it out. > > Even if you have to run it on several platforms + tweak > each one, it would be a great time saver over the present > manual process. > > Warren I should add that I did not put it to a severe test. The binding it created was 22 files, about 1500 semicolons. I trimmed it to 1 file, 26 semicolons in length to get my program working. It would have been more work to fix everything (though once you figure out what can go wrong its not as hard). Jonathan