Normal view

There are new articles available, click to refresh the page.
Before yesterdayAda Forum - Latest topics

Ada page on Wikipedia audience

21 January 2023 at 10:23

Hits on diverse spoken/read languages on Wikipedia Ada (programming language)

i.e Who is interested in Ada programming technology ? (guess beginners …)

on a 30 day period:

Lang on 2023-01-20
en (ww) 18250 56%
ru 4 456 14%
fr (ww) 2 079 6%
de 2005 6%
es (ww) 1 176 4%
ja 1 062 3%
it 655 2%
zh 464 1%
pt (ww) 402 1%
pl 379 1%
se 300 1%
tr 264 1%
ko 204 1%
ar 164 1%
nl 130 0%
he 130 0%
no 83 0%
ro 73 0%
da 39 0%
Total 32315 100%

3 posts - 2 participants

Read full topic

Combine .ads and .adb to one .ada file

By: mhatzl
16 January 2023 at 20:52

Hello everyone,

some days ago I proposed the feature to combine .ads and .adb files to one .ada file
in the ada-spark-rfc repository.

I have been thinking about this for quite some time now.
When comparing Ada to other modern languages, splitting definition and implementation into two files, and not being able to have “use before defined” feels outdated to me. For me, it makes code harder to read, change, and maintain.

Happy to hear your takes on this :slight_smile:

29 posts - 15 participants

Read full topic

Does Initialize_Scalars require a Full runtime or does light need s-scaval.ads?

By: kevlar700
16 January 2023 at 14:34

When I add
pragma Initialize_Scalars

To my local configuration pragmas on a light runtime.

I get

hal.ads:164:04: error: construct not allowed in configurable run-time mode
hal.ads:164:04: error: file s-scaval.ads not found
hal.ads:164:04: error: entity “System.Scalar_Values.Is_Isf” not available

The complete output follows.

gprbuild --target=arm-eabi -d -P/mnt/crypt/elansys/code/Ada/stm32l4r9_hal/stm32l4r9_hal.gpr -XMODE=Compile -XADAFLAGS= -g -j12 -gnat2022 -largs -Wl,-Map=map.txt
Compile
[Ada] stm32_svd-spi.ads
[Ada] stm32_svd-swpmi.ads
[Ada] stm32_svd-rcc.ads
[Ada] stm32_svd-lcd.ads
[Ada] stm32_svd-fpu.ads
[Ada] stm32_svd-opamp.ads
[Ada] stm32_svd-dma.ads
[Ada] stm32_svd-octospim.ads
[Ada] stm32_svd-rtc.ads
[Ada] stm32_svd-syscfg.ads
[Ada] stm32_svd-octospi.ads
[Ada] stm32_svd-crc.ads
hal.ads:164:04: error: construct not allowed in configurable run-time mode
hal.ads:164:04: error: file s-scaval.ads not found
hal.ads:164:04: error: entity “System.Scalar_Values.Is_Isf” not available
hal.ads:164:04: error: construct not allowed in configurable run-time mode
hal.ads:164:04: error: file s-scaval.ads not found
hal.ads:164:04: error: entity “System.Scalar_Values.Is_Isf” not available
hal.ads:164:04: error: construct not allowed in configurable run-time mode
hal.ads:164:04: error: file s-scaval.ads not found
hal.ads:164:04: error: entity “System.Scalar_Values.Is_Isf” not available
hal.ads:164:04: error: construct not allowed in configurable run-time mode
hal.ads:164:04: error: file s-scaval.ads not found
hal.ads:164:04: error: entity “System.Scalar_Values.Is_Isf” not available
hal.ads:164:04: error: construct not allowed in configurable run-time mode
hal.ads:164:04: error: file s-scaval.ads not found
hal.ads:164:04: error: entity “System.Scalar_Values.Is_Isf” not available
hal.ads:164:04: error: construct not allowed in configurable run-time mode
hal.ads:164:04: error: file s-scaval.ads not found
hal.ads:164:04: error: entity “System.Scalar_Values.Is_Isf” not available
hal.ads:164:04: error: construct not allowed in configurable run-time mode
hal.ads:164:04: error: file s-scaval.ads not found
hal.ads:164:04: error: entity “System.Scalar_Values.Is_Isf” not available
hal.ads:164:04: error: construct not allowed in configurable run-time mode
hal.ads:164:04: error: file s-scaval.ads not found
hal.ads:164:04: error: entity “System.Scalar_Values.Is_Isf” not available
hal.ads:164:04: error: construct not allowed in configurable run-time mode
hal.ads:164:04: error: file s-scaval.ads not found
hal.ads:164:04: error: entity “System.Scalar_Values.Is_Isf” not available
hal.ads:164:04: error: construct not allowed in configurable run-time mode
hal.ads:164:04: error: file s-scaval.ads not found
hal.ads:164:04: error: entity “System.Scalar_Values.Is_Isf” not available
hal.ads:164:04: error: construct not allowed in configurable run-time mode
hal.ads:164:04: error: file s-scaval.ads not found
hal.ads:164:04: error: entity “System.Scalar_Values.Is_Isf” not available
hal.ads:164:04: error: construct not allowed in configurable run-time mode
hal.ads:164:04: error: file s-scaval.ads not found
hal.ads:164:04: error: entity “System.Scalar_Values.Is_Isf” not available

compilation of stm32_svd-crc.ads failed
compilation of stm32_svd-octospi.ads failed
compilation of stm32_svd-syscfg.ads failed
compilation of stm32_svd-rtc.ads failed
compilation of stm32_svd-octospim.ads failed
compilation of stm32_svd-dma.ads failed
compilation of stm32_svd-opamp.ads failed
compilation of stm32_svd-fpu.ads failed
compilation of stm32_svd-lcd.ads failed
compilation of stm32_svd-rcc.ads failed
compilation of stm32_svd-swpmi.ads failed
compilation of stm32_svd-spi.ads failed

gprbuild: *** compilation phase failed
[2023-01-16 14:11:59] process exited with status 4, 23% (27/113), elapsed time: 00.31s

7 posts - 3 participants

Read full topic

Adopt the Ada Horizon logo for all public Ada Community Web-sites

13 January 2023 at 11:48

Dear all

With the latest Ada «Horizon» Logo proposal and the ongoing movement for the adoption of an unified Ada logo,

It would be outstanding if we could have a (long awaited) homogeneous representation of our community to the outside world .

I mean, adopt it for the main public websites :
Discourse Forum, Reddit, Gitter-Ada, Wikipedia, Wikibooks, Wikiversity, Forge, are all kind of public Web info to serve the Ada Community.

There is already a poll set by Jeremy to apply the new Horizon Logo to this site (Forum).
But I think we could extend the thought to a larger horizon :wink:

@JeremyGrosser Could you please set-up some polling support about this ? (global question, or per web-site/service?)

To all: What is your comment about this ?

Cheers, William

Ref: Fabien’s logo presentation
Some Samples:

ada_logo_examples

ada_logo-3

4 posts - 3 participants

Read full topic

Our Contribution to the Ada Logo Discussion (blog.adacore.com)

By: Fabien.C
10 January 2023 at 16:07

AdaCore is releasing the Ada Horizon logo in the public domain:

ada-png-black-transparent_square

There’s also a small website to make your own version: ada-logo-editor | Static website that provides easy customization of the Ada horizon logo

20 posts - 9 participants

Read full topic

New process for submitting comments about Ada Reference Manual and Ada evolution process

By: sttaft
5 January 2023 at 14:36

The Ada Rapporteur Group (ARG) of Working Group 9 (ISO WG9), within ISO/IEC JTC1 SC22, is responsible for maintaining and advancing the International Ada Programming Language Standard. In the past we have used an “ada-comment” mailing list as the official place to file comments or suggestions about the Standard. Over the past six months we have been moving to an online approach using a website and a GitHub issue repository. The new process seems to be working, so we ask all those with comments about the Ada Standard or the Ada Reference Manual to visit the new ARG website:

arg.adaic.org

and select the “Community Input” page. There you will find forms for filing comments, or for requesting the formation of a “language study group” to focus on particular thorny topics associated with the language (an example might be “distributed computing” or “tree pattern matching”).

Rather than filling out a form, you can head over to the ARG GitHub repository:

github.com/Ada-Rapporteur-Group/User-Community-Input

and select the GitHub “issue” tab to post your comments, or join a discussion on issues already there.

We would also welcome “meta” comments if you have thoughts on how to improve the ARG process itself.

Thanks!
-Tucker Taft on behalf of the Ada Rapporteur Group

2 posts - 2 participants

Read full topic

Gnat arm elf 12.2.1 (alire) undefined reference to strlen

By: kevlar700
29 December 2022 at 19:33

Merry xmas all.

I simplified my Last Chance Handler by using

Interfaces.C.Strings.Value

The compiler output undefined reference to ‘strlen’

light-cortex-m4f/adalib/libgnat.a(i-cstrin.o)

I could go back to my manual string null termination finding function. Or should I look into Gnat. Could someone point me to the right place to report and or submit a patch (is it gerrit that GCC uses or something)?

7 posts - 3 participants

Read full topic

`alr --bin init` creates crates GPS can't make sense of?

By: cantanima
29 December 2022 at 03:52

I do the following, per the Alire Quickstart instructions:

alr init --bin my_proj
cd my_proj
alr build
alr run

Next I try to edit it:

alr edit

The most recent gnatstudio is in my path, so the editor pops up in the crate. Trouble is, it doesn’t seem to understand the project file at all. (Screenshot below.) To wit:

  • src has a source file in it, but the icon isn’t expandable.
  • While there are “build” and “run” buttons, they doesn’t actually build and run the program; rather, they seem good only for generating Uncaught Exceptions; see output below.
  • This is not a problem with pre-existing alire crates; it’s only a problem for anything I try to generate now.

Weirdly, this was working earlier today, which makes me think I broke something at some point. Does anyone have any suggestions for figuring out how to fix it?

Uncaught exception in workflows:
Traceback (most recent call last):
  File "/path/to/opt/gnatstudio/share/gnatstudio/support/ui/workflow_buttons.py", line 133, in build_main
    r0 = yield builder.wait_on_execute(main_name)
  File "/path/to/opt/gnatstudio/share/gnatstudio/support/ui/workflows/promises.py", line 1108, in wait_on_execute
    self.__target.execute(main_name=main_name,
  File "/path/to/opt/gnatstudio/share/gnatstudio/support/core/extensions/__init__.py", line 380, in execute
    self._internal_execute(
GPS.Unexpected_Exception: unexpected internal exception raised CONSTRAINT_ERROR : gnatcoll-projects.adb:5729 index check failed
[/path/to/opt/gnatstudio/bin/../lib/gnatstudio/libgnatcoll.so.23.0w]
0x7f1c6cc179c1 gnatcoll__projects__compute_scenario_variables__register_untyped_var.1798.constprop.0 at ???
0x7f1c6cc17d06 gnatcoll__projects__compute_scenario_variables__register_var.1778 at ???
0x7f1c6cc238c7 gnatcoll__projects__for_each_external_variable_declaration at ???
0x7f1c6cc26235 gnatcoll__projects__compute_scenario_variables at ???
0x7f1c6cc271aa gnatcoll__projects__scenario_variables__3.part.0 at ???
0x7f1c6cc27319 gnatcoll__projects__scenario_variables at ???
[/path/to/opt/gnatstudio/bin/gnatstudio_exe]
0x3cdd374

…and after that, a bunch more hexadecimal numbers and suchnot.

Screenshot_20221228_214507

6 posts - 3 participants

Read full topic

Day 25: Full of Hot Air

By: cantanima
25 December 2022 at 06:28

I’m not sure why he didn’t call this one SNAFU, but it was easy and fun, which I think is typical on Day 25.

Anyone add up the numbers using SNAFU arithmetic, or did everyone convert to decimal, add, then convert back?

PS If I may be allowed a personal remark: This is my third time doing AoC, but the first one I’ve completed it in time: for the 2020 competition I finished up around New Year’s instead of Christmas Day; then I went back and completed the 2019 competition, and then I took a break until this year. Having thsi forum to discuss things with, even to vent frustration once or twice, was helpful. I really enjoyed learning from everyone. Maybe I’ll go back and complete some other years… after getting some :sleeping_bed: first. :grin:

4 posts - 4 participants

Read full topic

Opening a file Ada.Text_IO.Open (...) using GNAT compiler makes a heap allocation

24 December 2022 at 13:48

While doing advent of code challenges and making sure the solutions do not make any heap allocations during run-time except for application start up (elaboration time), I’ve discovered that opening a file with Ada.Text_IO.Open (…) generates a heap allocation. It means that if one does not closes the file, either deliberately or by mistake due to raising of an exception not only would make an application leak file handles but also memory.

One may wonder about why this is so. I did not expect a heap allocation opening a file. Maybe this is applies only to the implementation of the standard library Ada.Text_IO package of the GNAT compiler, but not for example to the Ada.Streams.Stream_IO package (I haven’t checked!). One reason that I can imagine is usage of Taft Types (Opaque types). It means a File_Type is defined in the public part of the specification package of Text_IO but the exact details of File_Type is defined in the body of the Text_IO package. It is smart because one only needs to replace the body of Text_IO package when porting the standard library to another platform or operating system. The down side is that Taft Types, introduced in Ada83, is closely connected with heap allocations (my experience is that it is hard to avoid heap allocations when using Taft Types).

Any other reason for making heap allocation when opening file?

5 posts - 4 participants

Read full topic

Day 24: Blizzard Basin

By: cantanima
24 December 2022 at 08:48

Part 1 is another spoiler. I wasted too much time getting the blizzard logic wrong. I knew what to do; I just kept getting the math wrong! I did at least have the presence of mind spoiler.

Part 2 was also pretty straightforward, once Part 1 is done. Interesting that the result is not three times the value of Part 1, but not especially surprising, given how the blizzards move around.

Glancing over at the Reddit Solutions Megathread, some commenters have noticed that spoiler (It certainly would be in my case.)

9 posts - 4 participants

Read full topic

Day 23: Unstable Diffusion

By: cantanima
23 December 2022 at 07:32

Another one that I thought was fun! The input proved helpful, and was not so different from the example today as it was yesterday. Then again, it would be hard to diverge as greatly from the example to the input as yesterday did…

My solution spoiler To determine the direction an elf considers, spoiler

Is there a way to determine how many variants an enumerated type has?

I have an idea for a visualization, and if I find time I’ll do it later.

Added later: Now that I review the discussion on Reddit, I notice that a lot of people missed something that I almost missed myself: spoiler Yeah, watch out for that.

11 posts - 4 participants

Read full topic

Day 22: Monkey Map

By: cantanima
22 December 2022 at 09:37

This was fun. Even the debugging was fun. Even though the example was once again naughty, at least for Part 2, this was fun. (If anyone’s input creates a cube in the same way as the example, I’d like to know!)

Only one hint / comment from me: in part 2, spoiler.

I thought about drawing the paths onto the map, but it’s pretty late where I am, so maybe tomorrow. In lieu of that, here’s an aid I made to help with Part 2.
Day_22_cube

3 days left!

10 posts - 3 participants

Read full topic

2022 Day 21: Monkey Math

By: cantanima
21 December 2022 at 07:38

I really enjoyed today’s puzzle! Observations / hints / spoilers:

  • The example does not cover all the cases you need to check in Part 2. Interestingly, the input is relatively small if you look at it right, so even though I got Part 2 wrong the first time, it didn’t take me long to work through the example and find my mistake.
  • In part 1, spoiler
  • In part 2, spoiler

4 days left!!!

7 posts - 4 participants

Read full topic

AEiC 2023 - Ada-Europe conference - Call for Contributions

20 December 2022 at 17:22

The 27th Ada-Europe International Conference on Reliable Software Technologies (AEiC 2023) will take place in Lisbon, Portugal, in the week of 13-16 June.

The conference schedule comprises a journal track, an industrial track, a work-in-progress track, a vendor exhibition, parallel tutorials, and satellite workshops.

Deadlines: 13 February 2023 for journal-track papers (extended); 27 February 2023 for industrial-track and work-in-progress-track papers, tutorial and workshop proposals.

Full details are available on the conference site, including an extensive list of topics and more information on the call for various kinds of contributions.

http://www.ada-europe.org/conference2023

#AEiC2023 #AdaEurope #AdaProgramming

2 posts - 1 participant

Read full topic

❌
❌