Add section to main page about "projects to work on"?

ada-lang.io

I created ada-lang.io to be a modern-looking, community-run open source site, since I came across a bunch of unmaintained, 90s-style sites while learning Ada around 2020-2021. Rust and Ocaml both have great sites that I was trying to mimic. The intent when I handed it off was a nice open source page to get people into the language. @onox made it look fantastic.

The feedback would need to be positive and the Website admins would have to approve it.

I set a bunch of people to be admins in the github organization which contains the site, so changes can be more easily made, so go be bold making content for it.

It was specifically created to host an updated MDX representation of the Ada Reference Manual I had developed by reverse engineering the ada-auth tool.

often used excuse as to why they can’t find any Ada programmers.

I found Ada super easy to learn. As a C++ programmer I was productive in it in a few weeks. The hardest things to wrap my head around were discriminants, entries, and that nowhere could I find a description of attributes.

stackoverflow survey

An interesting thing about the stack overflow survey is that the “admired” (want to continue using) score of Ada is much lower than I expected it to be.

Forum

OCaml, F#, Swift, Python and a lot of other languages have Discourse forums, so the forum seemed like a good idea. Discord would be great, but the Ada community is split across many time zones so I don’t know how sustainable it would be, though I don’t know if anyone has ever attempted to make one. However, @Irvise, it might be an easier way to do monthly meetings.

nodejs issues

I’ve got this too. Fortunately I was able to downgrade Node to 18 (because I did it in a docker) and then it worked.

I spent a few hours last week trying to upgrade Docusaurus and downgrading Node never occurred to me.

Ada “advocacy”

The best advocacy is positivity, great developer experience and successful projects. You don’t argue people into using a technology, you inspire them to try it.

3 Likes

Hey Paul, nice to see you around! I hope you are doing well :slight_smile:

I will take your advice. I think enough has been said in this thread and I should at least try to get the ball moving in Github ^^

I am not a great fan of Discord (I am a strong open source believer) and we already have the Gitter/Matrix room which was supposed to become the main chatting hub. It has indeed grown and there are quire a few people, even if there are days that not much happens. Nonetheless, I am not against someone creating a Discord channel for Ada :slight_smile: It is also true that the community lives all around the world and we do have quite some “old” people here that prefer the traditional communication channels, so it may be a bit difficult. But hey, everything needs to start somewhere!

I fully agree!

In the next weeks I hope to have a proof of concept about the proposal of this thread in Github and lets see how it develops :slight_smile:

Cheers,
Fer

3 Likes

Hi, absolutely valid argument. Even a few thousand a year to fix the obvious long standing bugs. However despite the endless talk about reliability and spark and all that when it comes to basic stuff in the compiler nobody bothers. For example use an uninitalised variable and it warns you, unless its in a condition;

i:Integer;
if condition then j:=i; end if;

no warning.

I programmed in C for 8 years C++ for 1 year and switched to Ada about 2 years ago for a big project. I love it but I hate a few things too. I expressed all this on adaworks.it because I got fed up with the casual approach of AdaCore. Of course all praises they contribute a fantastic amount to the language but why not fix these kind of bugs? Safety Critical? Of course when you have a disaster like C to deal with these niggles seem unimportant I have always loved the mentality of aviation and total quality management attitudes but it seems like Ada is going the other way at the moment. Sad, and then they ask why no one learns Ada. I believe Ada is a great language for my future company because I can start people off with it. So about AdaCore. Yes so much about it is good, why not clean up the dirt under the carpet?

My aspiration is that AdaCore will make adaworks.it totally irrelevant, but they haven’t yet.

Can’t make a living on a few grand a year.

What are you talking about, you get warnings:

procedure test is
   a : integer;
begin
   null;
end test;

$ gnatmake test.adb 
gcc -c test.adb
test.adb:2:04: warning: variable "a" is never read and never assigned [-gnatwv]
gnatbind -x test.ali
gnatlink test.ali
gnatlink: warning: executable name "test" may conflict with shell command

What’s adaworks?

What’s adaworks?

It’s http://adaworks.it

I’ve started using Discord, and it is convenient, but I agree with you about it not being open source. Revolt.chat is an open source and privacy-respecting Discord clone that might be an alternative. I haven’t tried it yet, but I got the impression that the Revolt client app can connect to both revolt and discord servers.

Could that be worked around in a similar way to Lombok for Java? It uses a clever library plus integration into IDEs with plugins.

Seems like I was probably wrong about that.

Dear all,

I finally had some time to get this proposal started. It is obviously at a very early stage, but feedback is already welcome. You can find the PR here Add section of Ideas/Projects to Work on by Irvise ¡ Pull Request #71 ¡ ada-lang-io/ada-lang-io ¡ GitHub

Bes regards,
Fer

I have finished my work there. Feel free to review it and fix it! Otherwise, I think we are done with this topic! :smiley:

I guess you’re using a different test case, but this gives a warning from GCC 7 onwards (even without -gnatwa):

GNAT 13.2.0
Copyright 1992-2023, Free Software Foundation, Inc.

Compiling: tom.adb
Source file time stamp: 2024-01-13 15:04:52
Compiled at: 2024-01-13 15:12:49

     1. procedure Tom (Condition : Boolean; J : out Integer) is
     2.    I : Integer;
           |
        >>> warning: variable "I" is read but never assigned [-gnatwv]

     3. begin
     4.    if Condition then
     5.       J := I;
     6.    end if;
     7. end Tom;

 7 lines: No errors, 1 warning

There is also a telegram chat.

Even HAC issues a warning:

hac -rv tom.adb
tom.adb: 2:4-4: warning: variable "I" is read but never written [-rv]

but currently the warning switch is not flipped by default (that will change in the future).


Edit: “the future is now” :wink: . The warning is enabled by default since this commit.

2 Likes

Merged, along with an ARM paragraph link fix as well.

2 Likes

Hi,

I did not want to create a new topic, so I am posting it here.

We could have some examples on the main tutorial/guide page of Ada-Lang that use very short programs as tutorials. I just saw this repo GitHub - kylelk/ada-examples: examples of the Ada programming language that more or less suites that ethos.

Let me know what you think,
Fer

The hardest things to wrap my head around were discriminants, entries, and that nowhere could I find a description of attributes.

Having started actively learning Ada recently, i found the lack of introduction to discriminants and attributes to be my primary frustrations. Which might primarily be due to contrast: overall, i found both the “Ada Programming” wikibook and the AdaCore “Intro to Ada” book to be well-written, and so i expected a more immediate and/or clear introduction to these topics. :slight_smile:

The “Ada Programming” wikibook (EPUB version)

A “Discriminated record” is introduced in section 12.4, about a quarter of the way through the book. The entirety of the section is:

Discriminated record

type Discriminated_Record (Size : Natural) is
   record
      A : String (1 .. Size);
   end record;

The next section is “Variant record”, which says:

The variant record is a special type of discriminated record where the presence of some components depend on the value of the discriminant.

and proceeds to give an example. But i was still left with no sense of what discriminants ‘are’.

The first reference to a notion of an “attribute” is in section 5.6.2, “Base type”, which says:

For scalar types, there is a special subtype of the anonymous type, called the base type, which is nameable with the 'Base attribute.

But an “attribute” isn’t defined, and we keep encountering references to “attributes” without that happening. For example, Section 8.1, “Operators and attributes”, says:

This position can be queried via the 'Pos attribute

with a reference to footnote 2, which mysteriously says:

Chapter 38 on page 305

and footnote 1 is simply:

Chapter 37 on page 301

It’s not until section 38, three-quarters of the way through, that we get to Section 38, “Attributes”, which finally explains things:

The concept of attributes is pretty unique to Ada. Attributes allow you to get - and sometimes set - information about objects or other language entities such as types.

The “Introduction to Ada” book (EPUB version)

The “Records with discriminant” section was reasonably good, and yet by the end of it, i still felt quite unsure as to what discriminants ‘are’. They sort of feel like dependent types? And yet not?

We first encounter attributes in:

Integer'Image is a function that takes an Integer and converts it to a String. It is an example of a language construct known as an attribute, indicated by the ' syntax, which will be covered in more detail later.

It’s only well after that, in the discussion of Ada integer types, that we get the explanation:

The Name'Attribute (optional params) notation is used for what is called an attribute in Ada. An attribute is a built-in operation on a type, a value, or some other program entity.

Which is great! But personally, i would have preferred to get this explanation much sooner.

The wikibook was never thought as a material which you could read from first chapter to last chapter, but more a reference and self-directed learning, so it depends more on the hyperlinks to define things, rather than giving a predefined learning path. Having been written by several authors also contributes to that effect, but it is also a guiding principle for the writers. That doesn’t mean that the default order of the book shouldn’t give enough context as a default path for learners. Consequently, I’ve added a definition to that section and a link to the corresponding page in the book.

Remember that the Wikibooks is open for anyone to edit, so if you have ideas about how to improve it, you are more than welcome to edit it.

By the way, where is that EPUB version located? I hope it has preserved hyperlinks, otherwise the book loses a lot of value.

It’s an option for downloadable version of Adacore Introduction to Ada at Learn Ada site.