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 X-Received: by 2002:a37:6415:: with SMTP id y21mr15412384qkb.258.1587840729091; Sat, 25 Apr 2020 11:52:09 -0700 (PDT) X-Received: by 2002:a4a:d355:: with SMTP id d21mr1734627oos.66.1587840728709; Sat, 25 Apr 2020 11:52:08 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!news.gegeweb.eu!gegeweb.org!usenet-fr.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sat, 25 Apr 2020 11:52:08 -0700 (PDT) In-Reply-To: <9a4ad55c-ef0d-42ab-a438-cabc71a491a6@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: google-groups.googlegroups.com; posting-host=76.77.182.20; posting-account=W2gdXQoAAADxIuhBWhPFjUps3wUp4RhQ NNTP-Posting-Host: 76.77.182.20 References: <9a4ad55c-ef0d-42ab-a438-cabc71a491a6@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <4a9f98ac-db16-4819-8cae-32b0817944d1@googlegroups.com> Subject: Re: Script-like jobs in Ada (ideas for HAC) From: Stephen Leake Injection-Date: Sat, 25 Apr 2020 18:52:09 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader01.eternal-september.org comp.lang.ada:58489 Date: 2020-04-25T11:52:08-07:00 List-Id: On Friday, April 24, 2020 at 12:45:34 PM UTC-7, gautier...@hotmail.com wrot= e: > For instance you would perhaps avoid using Ada for a 30-lines program tha= t browses files and collects some information in those files (just an examp= le).=20 On the contrary; I often do exactly that, because I know I can do anything = I need to in Ada. In bash (and other scripting languages I've tried), first= I have to consult the web oracle to see if what I want to do is possible. = It's just faster to use Ada. > Or a little math / stats program? Or a small game? Ditto. Unless the game involves interacting with images on a screen. I've only don= e that once, in Visual Basic. I tried to redo it in Ada (using a Windows bi= nding I wrote), and it was very painful. > But maybe the real reason (even if it is unconscious) you'd avoid Ada is = because the compiler you are using is slow, or because it spits objects and= executable files each time you change your small program. And you'd be mor= e comfortable with a script that runs immediately without making garbage fi= les. I use Gnu make to run everything, no matter what language it is in, so "gar= bage files" are just transparent. I have a set of foo.make files that conta= in the rules for all the languages I use. > A goal of the HAC compiler [1] is precisely to blur the border between a = script and an Ada program: from the command line, you write "hax myprog.adb= " and it just runs (that's already working).=20 On my systems, that's what "make myprog.run" does; no big deal. > Now I'd be curious of examples of scripts you'd consider writing in Ada w= ith HAC, if it supplied the convenient functions and libraries. It's all wo= rk-in-progress currently, and ideas of applications are welcome at this poi= nt of the development. None. I trust AdaCore to stay in business as long as I'm writing code, and = I trust that any Ada code I write will work as long as I need it. Reliability/longevity is the biggest problem with "scripting" languages, an= d with many "modern" platforms. That visual basic game broke with each rele= ase of Visual Basic, until I got tired of maintaining it. I have a small mu= sic playing app I wrote for Android; it breaks with each release of Android= . I never did get the car dashboard controls working after they broke the f= irst time. -- Stephe -- Stephe