Lightning Talk About Ada @ Irvine Underground
2026 Nov 14 (E: 2026 Nov 14)
- Concurrency demo
- Ada is case insensitive
- Which build system and package manager are you using?
- What are you doing with an st7789?
- RE: Dangling pointer slide
- CGI for a backend?
- What do the keywords in the concurrency demo mean?
- How are you calling functions from ESP-IDF from Ada?
- How was the drive from|to San Diego?
- Can you uncensor the screenshot of your sqlite3 database?
I did a lightning talk about programming in Ada in 2026 at Irvine Underground. I guesstimate this went for 1/3rd of an hour.
The slides (n=12) can be downloaded at /downloads/talk3.pdf.
This just so happens to be around one year after my first time speaking at DC858 (Nov 12, 2025). Previous talks are listed at /portfolio#talks.
If you visited my laptop after the talk, you got to see a concurrency demo and extra source code that doesn’t fit on a slide.
The extra commentary and questions about the talk were:
- Concurrency demo
- Ada is case insensitive
- Which build system and package manager are you using?
- What are you doing with an st7789?
- RE: Dangling pointer slide
- CGI for a backend?
- What do the keywords in the concurrency demo mean?
- How are you calling functions from ESP-IDF from Ada?
- How was the drive from|to San Diego?
- Can you uncensor the screenshots of your sqlite3 database?
Concurrency demo
The concurrency demo features the producer-consumer problem.
The demo can be downloaded at:
/downloads/concurrency_demo.adb
It is compiled with:
gcc -c concurrency_demo.adb
gnatbind concurrency_demo.ali
gnatlink concurrency_demo.ali
Sample output (varies):
$ ./concurrency_demo
producer: starting
producer: added a
producer: added b
consumer: starting
consumer: got a
consumer: got b
producer: added c
producer: added d
producer: added e
consumer: got c
consumer: got d
consumer: got e
all tasks completed.
Ada is case insensitive
Therefore,
ada.text_io.put_line("hello, world!");has the same effect as
Ada.Text_IO.Put_Line("hello, world!");Which build system and package manager are you using?
The contemporary build system and package manager for Ada is Alire.
What are you doing with an st7789?
st7789 is a TFT LCD device. It is the screen on a T-Deck, the ESP32-S3 device pictured in one of the slides.
Alire has a few packages for the st7789. This is the specific one I was using.
https://github.com/jklmnn/st7789-ada/
I also emailed this guy (Johannes Kliemann from AdaCore), and he sent me this pic.
RE: Dangling pointer slide
The slide about dangling pointers gives a short C snippet that is accepted by a C compiler that an Ada compiler would refuse the equivalent of.
The error message that demonstrates the difference between C and Ada resulted from:
https://codeberg.org/scuti/scutideck/src/branch/lcd/source/tdeck_pins.ads#L10
Where I had attempted to declare a pointer (aliased |
access) from a header and initialize the object in
main.
CGI for a backend?
Out of the other options to build a backend such as fCGI or a threaded server application, CGI is comparatively heavy. Ada compiles to machine language, so an interpreter does not launch and read a script file.
Since the program starts up in a few miliseconds and finishes, I find CGI okay for the backend of a personal website. For higher traffic projects like communities or platforms, AWA (Ada Web Application) framework at http://alire.ada.dev/crates/awa may be a better a fit.
What do the keywords in the concurrency demo mean?
| Ada Keyword | C Equivalent | Difference |
|---|---|---|
| task / task type | pthread_create() | First-class language construct |
| entry / accept | pthread_cond_t & mutex | Rendezvous1 |
| protected | Critical section | Concurrency mechanism2 |
| delay3 | sleep() | Language keyword, absolute/relative |
delay is actually part of the the T-Deck source code,
not the concurrency demo. I just wanted it part of the table.
How are you calling functions from ESP-IDF from Ada?
(ESP-IDF = Espressif Development Framework)
There is a project template for ESP32-S3 in Ada. However, I have not found a wrapper for the SPI and started writing one.
https://codeberg.org/scuti/scutideck/src/branch/lcd/source/wrap_esp_spi.ads
Ada can also call C functions with Interfaces.C;45
How was the drive from|to San Diego?
It’s great that rain forces people to drive carefully. As I drove south, rain started pelting my windshield, and I think I maxed out the windshield wipers.
Can you uncensor the screenshot of your sqlite3 database?
No, that would encourage the robot to come back.
Section ‘Rendezvous’ of Concurrency at learn.adacore.com, https://learn.adacore.com/courses/Ada_For_The_CPP_Java_Developer/chapters/11_Concurrency.html#rendezvous↩︎
Section ‘Protected objects’ of Concurrency at learn.adacore.com, https://learn.adacore.com/courses/Ada_For_The_CPP_Java_Developer/chapters/11_Concurrency.html#protected-objects↩︎
9.6 Delay Statements, Duration, and Time, Ada Reference Manual, https://www.adaic.org/resources/add_content/standards/05rm/html/RM-9-6.html↩︎
B.3 Interfacing with C and C++, Ada Reference Manual, https://www.adaic.org/resources/add_content/standards/05rm/html/RM-B-3.html↩︎
Interfacing with C at learn.adacore.com, https://learn.adacore.com/courses/intro-to-ada/chapters/interfacing_with_c.html↩︎
Thoughts (0)
Leave a comment.Do not enter your personal information.