ASCII lookup utility in Ada When working with old digital synthesizers from the 1980s and 1990s (and some newer ones too) I often have the need to quickly look up the identity of a byte that seems like an ASCII character code. For example, in MIDI System Exclusive format files there are often names of sound patches or "voices". When writing programs to process these formats it is handy to do a quick check, because even (or especially?) after nearly 40 years at this thing I still haven't memorized the ASCII codes. Why ASCII and not Unicode? For the simple reason that these old formats were created at a time when Unicode didn't even exist yet, or was in its very early times. A full-scale Unicode lookup utility would be great, but I haven't found one, or even looked very hard for one. I have done a utility like this earlier in Rust, and you can find asc-rs on GitHub. However, I wanted to learn more Ada, and also show how this kind of utility could be produced using GNAT. You don't need to know much of Ada to be able to follow this walkthrough, but I do assume that you know how to program in some other language like Java, C++, Python or Rust, just to name a few. Getting your Ada tools ready For this walkthrough I'll be working in a Unix-like environment (either Linux or macOS) in a terminal, so if you're using Microsoft Windows, you will need to adjust for Command Prompt or PowerShell. The utility itself will be a command-line tool, with no graphical user interface, so it should be highly portable across these mainstream operating systems. To install Ada development tools, I refer you to Ada on Windows and Linux: an installation guide by Adel Noureddine. You will need an Ada compiler (GNAT) and a build system (GPRBuild). For this utility I will not be using the Alire package manager, because I'm trying to get by without using any external libraries, only standard Ada. This is such a small program that it is better to work with Ada only and not introduce the complication...
First seen: 2025-04-15 06:07
Last seen: 2025-04-15 10:08