comp.lang.ada
 help / color / mirror / Atom feed
From: Trescott Jensen <trescott@trescott.jp>
Subject: Re: Script-like jobs in Ada (ideas for HAC)
Date: Fri, 1 May 2020 22:36:52 -0700 (PDT)
Date: 2020-05-01T22:36:52-07:00	[thread overview]
Message-ID: <008e9bdd-7b0e-4e6c-ac23-a9e00bf3a8ee@googlegroups.com> (raw)
In-Reply-To: <9a4ad55c-ef0d-42ab-a438-cabc71a491a6@googlegroups.com>

On Friday, April 24, 2020 at 1:45:34 PM UTC-6, gautier...@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

In my mind, one of the short-comings of shell scripts is the lack of ability 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-language support.

I have dreamed of having an Ada shell where I could interactively issue commands as I am working out how to complete a task, then generate a script/compile the instructions for reuse.

I really like the focus Ada has on the correctness of the code. I think scripts 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 the 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 and start from scratch. (But sometime it is best to just through out the crap and start over.)

      parent reply	other threads:[~2020-05-02  5:36 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-24 19:45 Script-like jobs in Ada (ideas for HAC) gautier_niouzes
2020-04-24 23:22 ` cantanima.perry
2020-04-25  0:11 ` Nasser M. Abbasi
2020-04-25 19:00   ` Stephen Leake
2020-04-25 23:35     ` Dennis Lee Bieber
2020-04-25 18:52 ` Stephen Leake
2020-04-26  6:49 ` mockturtle
2020-04-26  9:26 ` Jeffrey R. Carter
2020-04-26 14:49 ` Simon Wright
2020-04-27 18:50 ` Bojan Bozovic
2020-04-27 19:01   ` Optikos
2020-04-27 20:31   ` Dmitry A. Kazakov
2020-04-28  8:51 ` Jerry
2020-04-29 15:47 ` joakimds
2020-04-29 19:54 ` darek
2020-04-30  8:02 ` gautier_niouzes
2020-04-30  8:44   ` Dmitry A. Kazakov
2020-05-01  7:31     ` gautier_niouzes
2020-05-01  7:51       ` Dmitry A. Kazakov
2020-05-01 15:46         ` gautier_niouzes
2020-05-01 16:22           ` Dmitry A. Kazakov
2020-05-02  5:36 ` Trescott Jensen [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox