Hi,
In my recent Ada Google searches, I’ve noticed there is this tutorial website that seems to be generating Ada tutorials on a daily basis, no doubt by using AI. See https://piembsystech.com/ada-language/
I don’t know how good the tutorials are, but maybe those who are new to Ada may consider trying them out and consider sharing their thoughts here about their quality and usefulness.
I had a look at the latest entry, Task Synchronization: Protected Objects in Ada Language. One of the examples (task_sync.adb
) didn’t compile out-of-the-box: it tried to create a discriminated task type with an in out
PO as the discriminant. Changing this to access
, using an instance of the PO type rather than the type, and declaring said instance before using it resulted in a compilation, which looked as though it worked, but the resulting code had a neat little example of a race: in the task type body,
C.Increment;
Put_Line("Task incremented value to: " & Integer'Image(C.Get_Value));
where C
is the PO concerned.
If this isn’t AI-generated, the writer hadn’t tried to build the code they presented. Thumbs down.
If it is AI-generated, it’s pretty impressive. We’d all better watch out!
This clearly looks like LLM generated content.