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:a05:620a:c8c:: with SMTP id q12mr6851034qki.74.1588397812936; Fri, 01 May 2020 22:36:52 -0700 (PDT) X-Received: by 2002:a9d:6016:: with SMTP id h22mr6533775otj.206.1588397812641; Fri, 01 May 2020 22:36:52 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!aioe.org!peer03.ams4!peer.am4.highwinds-media.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 1 May 2020 22:36:52 -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=73.52.142.200; posting-account=SpXAAQoAAABT25_edRotQEssNixvBUFY NNTP-Posting-Host: 73.52.142.200 References: <9a4ad55c-ef0d-42ab-a438-cabc71a491a6@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <008e9bdd-7b0e-4e6c-ac23-a9e00bf3a8ee@googlegroups.com> Subject: Re: Script-like jobs in Ada (ideas for HAC) From: Trescott Jensen Injection-Date: Sat, 02 May 2020 05:36:52 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Received-Bytes: 3716 X-Received-Body-CRC: 1718119209 Xref: reader01.eternal-september.org comp.lang.ada:58550 Date: 2020-05-01T22:36:52-07:00 List-Id: On Friday, April 24, 2020 at 1:45:34 PM UTC-6, gautier...@hotmail.com wrote= : > It's a poll - sort of. >=20 > The question is: what kind of jobs do you prefer let a scripting language= do and not Ada? >=20 > My guess is that this kind of choice is related to toolsets, libraries an= d other aspects that are not necessarily related to languages. > 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). Or a little math / stats program? Or a small game? > 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. >=20 > 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). Now I'd be curious of examples= of scripts you'd consider writing in Ada with HAC, if it supplied the conv= enient functions and libraries. It's all work-in-progress currently, and id= eas of applications are welcome at this point of the development. >=20 > Thanks for any input! > -- > [1] http://hacadacompiler.sf.net/ and https://github.com/zertovitch/hac In my mind, one of the short-comings of shell scripts is the lack of abilit= y to call library functions. If I need to use a library API, I have to turn= to a compiled language or at least a scripting language that has cross-lan= guage support. I have dreamed of having an Ada shell where I could interactively issue com= mands as I am working out how to complete a task, then generate a script/co= mpile the instructions for reuse. I really like the focus Ada has on the correctness of the code. I think scr= ipts tend to be brittle because there are a lot of assumptions builtin and = they are written in a quick-n-dirty way. Which I think is fine for one-off = use or proof-of-concept work. But I would love to have the ability to do th= e fast-n-loose work to get my head around a problem, then when I understand= it, clean-up/reuse the work I've done without having to switch languages a= nd start from scratch. (But sometime it is best to just through out the cra= p and start over.)