Simple ASCII art editor in Ada (town)

Hi there,

I have just made a little ASCII art editor in Ada.
It can be used to make small artworks using the standard ASCII character set.

Terminal handling is done through a small wrapper of terminal control functions. It was actually simpler than I thought to do this without curses. I am only using classic VT100 sequences.

NOTE: Be aware that the cursors are moved with hjkl,HJKL and the arrows will not work.

6 Likes

Please excuse my harsh words, but this is terrible software. Not one line of comments, incomplete manual, incomplete Gnat project.

[2026-10-18 13:17:17] C:\Users\Admin\Desktop\town\town.gpr:1:06: imported project file “config/town_config.gpr” not found
[2026-10-18 13:17:17] C:\Users\Admin\Desktop\town\town.gpr:6:32: unknown package or project “Town_Config”
[2026-10-18 13:17:17] C:\Users\Admin\Desktop\town\town.gpr:12:40: unknown package or project “Town_Config”
[2026-10-18 13:17:19] Language server: Unable to load project file: C:\

This is one of my issues with Alire. The project seems to be based on alire, which automatically creates the config directory with is needed by gprbuild, which is what you seem to be using directly. I would love for alire to generate gprbuild files that would be 100% self-sustaining, that way non-alire users would be able to use the code just as nicely…

What do you see if you use alr build?

Best regards,
Fer

This is a point of friction we should avoid for anyone starting with Ada or with Alire. Every distributed open source software should include a README to explain how to build it and other significant matters. Maybe Alire should generate a simple README.md as part of alr init to include the initial information there.

Another option is to include the files generated in config by Alire in Git. I’ve sometimes done that for the sake of non-Alire users, but it’s a pain in the back for the developer, as any change in profile will make Git tell you about modified files.

Hi, no problem.

I have never tried putting out something for others to perhaps use so I am a noob in it. Just addressed some of your issues.

  • Created README .
  • Ditched alire for just a simple gpr file .
  • Some cleanup, not much .
  • Trivial: updated MANUAL to show how to run it .

For the missing comments, for the moment I will add none, since it is so small and the design is currently lacking consistency .

1 Like

Hi,

Thanks for the info. Finally just figured I would just use a single gpr file, which is simpler and more straightforward to use and maintain for this tiny project.

Cheers
– zen

Hi,

Just for the record, in my case I did not put a README intentionally, thinking it would not be necessary.

As @Nordic_Dogsledding pointed out, this was a bad idea.

I am inclined to believe that having a README file present would have made me fill it out just for the sake of it. :person_shrugging:

1 Like

You do not really understand. It’s not just a ReadMe, this gives only an overview what this sw is all about.
What I do mean:
Please look into the Ada RM how there each single operation is described. This is what a well documented code is about. I admit, this detailed documentation is difficult to reach, it’s the far aim.
But:

procedure Open_Session;
procedure Close_Session;

procedure Flush;
procedure Clear;

No word what they do. I can guess, but guessing is not software engineering. You may say
“the code is the documentation”, again no. What happens if Open/Close_Session is not called? An exception?
A spec must be clearly understandable without looking at the body and without examining how it is used in the examples.
From where do I read characters, where do I print characters to?

This is what I mean - undocumented software is flooding the net.

Enough of the harsh rant. Your software here is very small. Writing a sufficient amount of comments should not take more than just an hour.

So welcome to your Art Editor! By the way, what is an art editor?

Christoph

Thanks for your tips! :slight_smile: I have now documented the package specifications.

This editor is for making ASCII art. Here is an example of ASCII art:

   __             .                   qt
 .' .`---.        |        ... - -->    
  '._._.-.'      .^.                    
                 | |    _.-.-.-.        
 -.-    _.-_-'-./```\ .'. . . . |   ,   
       '._ . .  |-.-| `.___.---'        
          `----'|-|-|             .-.--'
    -.-.-.-    /_,^,_\     ...   | .  . 
     -.-.-    |=:=:=:=|          '-_.-__
      -.-      |''.''|                  
   .   .   .   |``|``|   .   .   .   .  
.  .  .  .  . /``/ \``\ .  .  .  .  .  .
. __. . . . _/``/___\``\_ . . . . . ____
 |88| _  .. \,.,.,.,.,.,/ ..  _ .. /____
'=.-.' '---./  _.-'-._  \ .--' `---' - -
O_oOOo_o_O_/``/ _.'._ \``\o_oOo_ooOo_oOo
OoOooOoOoO/``|=/- - -\=|``\oooOooOOOooOo
oOOoOooOo'---'// :-: \\`---'oOooOoooOOoo
=============/- - - - -\================

4 Likes

Looks impressive :slight_smile:

1 Like