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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED.Ry1GfOCil8z4iThfpbQjlA.user.gioia.aioe.org!not-for-mail From: "Nasser M. Abbasi" Newsgroups: comp.lang.ada Subject: Re: Script-like jobs in Ada (ideas for HAC) Date: Fri, 24 Apr 2020 19:11:41 -0500 Organization: Aioe.org NNTP Server Message-ID: References: <9a4ad55c-ef0d-42ab-a438-cabc71a491a6@googlegroups.com> Reply-To: nma@12000.org NNTP-Posting-Host: Ry1GfOCil8z4iThfpbQjlA.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 Content-Language: en-US X-Notice: Filtered by postfilter v. 0.9.2 Xref: reader01.eternal-september.org comp.lang.ada:58488 Date: 2020-04-24T19:11:41-05:00 List-Id: On 4/24/2020 2:45 PM, gautier_niouzes@hotmail.com wrote: > It's a poll - sort of. > > The question is: what kind of jobs do you prefer let a scripting language do and not Ada? > > My guess is that this kind of choice is related to toolsets, libraries and other aspects that are not necessarily related to languages. > For instance you would perhaps avoid using Ada for a 30-lines program that browses files and collects some information in those files (just an example). 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 more comfortable with a script that runs immediately without making garbage files. > > 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 convenient functions and libraries. It's all work-in-progress currently, and ideas of applications are welcome at this point of the development. > > Thanks for any input! > -- > [1] http://hacadacompiler.sf.net/ and https://github.com/zertovitch/hac > Main advantage of scripts, and by this I really mean bash, sh, python, and may be perl, is that these come pre-installed on Linux. i.e. once you install Linux, most likely you'll have bash, sh, python interpreter ready to be used. (for windows, it will be DOS scripts) Hence any script written will run as is, with no need to having to first "compile" it for that specific version of the OS. Also easy to email one a script and they run on their end. No need to install a compiler first, figure how to compile it, link it, etc... That is I think is the main advantage of scripts over compiled languages. Ease of use. --Nasser