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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: Paul Rubin Newsgroups: comp.lang.ada Subject: Re: How to get Ada to ?cross the chasm?? Date: Mon, 07 May 2018 22:46:41 -0700 Organization: A noiseless patient Spider Message-ID: <87y3gun1ha.fsf@nightsong.com> References: <1c73f159-eae4-4ae7-a348-03964b007197@googlegroups.com> <87po2la2qt.fsf@nightsong.com> <87in8buttb.fsf@jacob-sparre.dk> <87wowqpowu.fsf@nightsong.com> <16406268-83df-4564-8855-9bd0fe9caac0@googlegroups.com> <87o9i2pkcr.fsf@nightsong.com> <87in88m43h.fsf@nightsong.com> <87efiuope8.fsf@nightsong.com> <322f9b26-01de-4753-bb50-6ef2f3d993d8@googlegroups.com> <87a7th9pd1.fsf@nightsong.com> <87h8no1nli.fsf@nightsong.com> <87po2cyty7.fsf@nightsong.com> <87bmdwhwob.fsf@nightsong.com> <6746d7d1-406e-4891-8293-9424aed76215@googlegroups.com> <877eoezy6e.fsf@nightsong.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: reader02.eternal-september.org; posting-host="52b5ce8581a197e35f17678a348070d7"; logging-data="31569"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+lRE+3R5mEsnjf01uN/wxk" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) Cancel-Lock: sha1:xGwQ5PTpJDkNRr2HrON7dhL1NjY= sha1:e7j5rXhrSnVqnF8R1r8azpnhA44= Xref: reader02.eternal-september.org comp.lang.ada:52089 Date: 2018-05-07T22:46:41-07:00 List-Id: gautier_niouzes@hotmail.com writes: > https://unzip-ada.sourceforge.io/ ) I downloaded this and found: 1) the file fizzip.adb didn't compile because it used 'Image in an improper way in a bunch of places. I found on Stack Overflow that there's a GNAT attribute 'Img that got it to work. 2) gprbuild made a zipada program but no unzipada. Unzip is commented out of the .prj file. 3) The bunzip program it builds is around 25% slower than the default Linux one, which is reasonable if it's safer, i.e. specifically if it's free of potentially unsafe memory accesses. I heard somewhere that optimized GNAT turns off subscript checking by default, which seems un-Ada-like. But, from C++ stdlib containers, I think subscript checks are cheaper than most people might expect. 4) The lzma_enc program it builds runs noticeably faster than xz --format=lzma, but it also doesn't compress as well, so I suspect the algorithms are similar but the parameters are different. I don't see a way to set the compression level in the Ada version. I might experiment with xz's settings to find one that matches lzma_enc. I'm very glad that someone implemented those programs in Ada since there have historically been various bugs in the C versions that allowed code injection exploits etc. Regarding crossing the chasm, it would sure be nice if Ada (at least GNAT) were more interoperable with C and C++ on Linux, in the sense of using the same makefiles and similar command line tools. Ada seems to want to be in its own world of Gprbuild and .prj files.