comp.lang.ada
 help / color / mirror / Atom feed
From: Stephen Leake <stephen_leake@stephe-leake.org>
Subject: Re: Script-like jobs in Ada (ideas for HAC)
Date: Sat, 25 Apr 2020 11:52:08 -0700 (PDT)
Date: 2020-04-25T11:52:08-07:00	[thread overview]
Message-ID: <4a9f98ac-db16-4819-8cae-32b0817944d1@googlegroups.com> (raw)
In-Reply-To: <9a4ad55c-ef0d-42ab-a438-cabc71a491a6@googlegroups.com>

On Friday, April 24, 2020 at 12:45:34 PM UTC-7, gautier...@hotmail.com wrote:

> 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). 

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 done that once, in Visual Basic. I tried to redo it in Ada (using a Windows binding 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 more comfortable with a script that runs immediately without making garbage files.

I use Gnu make to run everything, no matter what language it is in, so "garbage files" are just transparent. I have a set of foo.make files that contain 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). 

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 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.

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, and with many "modern" platforms. That visual basic game broke with each release of Visual Basic, until I got tired of maintaining it. I have a small music 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 first time.

-- Stephe

-- Stephe

  parent reply	other threads:[~2020-04-25 18:52 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 [this message]
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
replies disabled

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