comp.lang.ada
 help / color / mirror / Atom feed
* Advent of Code, Day 17
@ 2020-12-17 20:21 John Perry
  2020-12-18 16:40 ` John Perry
  0 siblings, 1 reply; 4+ messages in thread
From: John Perry @ 2020-12-17 20:21 UTC (permalink / raw)


Today we have another variant on the game of Life. I was determined to do it with arrays only, but got held up trying to define the types because I was stuck in a C way of thinking about multidimensional arrays. Once I got into the Ada way of thinking, things became simpler: it was really nice to have negative array indices available!

Alas, I discovered at least one bug in gnat, which I will report.

john perry

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Advent of Code, Day 17
  2020-12-17 20:21 Advent of Code, Day 17 John Perry
@ 2020-12-18 16:40 ` John Perry
  2020-12-18 19:47   ` Gautier Write-Only Address
  0 siblings, 1 reply; 4+ messages in thread
From: John Perry @ 2020-12-18 16:40 UTC (permalink / raw)


On Thursday, December 17, 2020 at 2:21:33 PM UTC-6, John Perry wrote:
> Alas, I discovered at least one bug in gnat, which I will report. 

*Very* quick reply from AdaCore: "Indeed, and this code compiles now fine in the development version of GNAT. We'll add your code as part of our testsuite to ensure this test won't regress in the future!"

Advent of Code hasn't been a *complete* waste of time. ;-)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Advent of Code, Day 17
  2020-12-18 16:40 ` John Perry
@ 2020-12-18 19:47   ` Gautier Write-Only Address
  2020-12-19 10:37     ` Maxim Reznik
  0 siblings, 1 reply; 4+ messages in thread
From: Gautier Write-Only Address @ 2020-12-18 19:47 UTC (permalink / raw)


> Advent of Code hasn't been a *complete* waste of time. ;-)

Far from that: now the major part of the test suite for HAC stems from AoC:

*******[ HAC ]*******   Compiler version: 0.083 dated 09-Dec-2020.
*******[ HAC ]*******   Caution: HAC is not a complete Ada compiler. Type "hac" for license.
. . . .[ HAC ]. . . .   Compiling from file: all_silent_tests.adb
. . . .[ HAC ]. . . .   Compilation finished in  0.000862600 seconds.
. . . .[ HAC ]. . . .   Starting p-code VM interpreter...
    ___________      ____________________________________________________________
   / *  HAC  * \    /  "Silent tests": when there is zero output, no compilation \
   |  Testing  |    |   error and no run-time error, then it's all fine.         |
   \___________/    \____________________________________________________________/

----> Launching tests (one instance of HAC each)...
. . . .[ HAC ]. . . .   Compiling and running from file: case_statement.adb
. . . .[ HAC ]. . . .   Compiling and running from file: constants.adb
. . . .[ HAC ]. . . .   Compiling and running from file: declarations.adb
. . . .[ HAC ]. . . .   Compiling and running from file: enumerations.adb
. . . .[ HAC ]. . . .   Compiling and running from file: floats.adb
. . . .[ HAC ]. . . .   Compiling and running from file: integers.adb
. . . .[ HAC ]. . . .   Compiling and running from file: loops.adb
. . . .[ HAC ]. . . .   Compiling and running from file: recursion.adb
. . . .[ HAC ]. . . .   Compiling and running from file: sorting_tests.adb
. . . .[ HAC ]. . . .   Compiling and running from file: strings.adb
. . . .[ HAC ]. . . .   Compiling and running from file: type_conversion.adb
. . . .[ HAC ]. . . .   Compiling and running from file: var_init.adb
. . . .[ HAC ]. . . .   Compiling and running from file: aoc_2020_02.adb
. . . .[ HAC ]. . . .   Compiling and running from file: aoc_2020_03.adb
. . . .[ HAC ]. . . .   Compiling and running from file: aoc_2020_04.adb
. . . .[ HAC ]. . . .   Compiling and running from file: aoc_2020_05.adb
. . . .[ HAC ]. . . .   Compiling and running from file: aoc_2020_06.adb
. . . .[ HAC ]. . . .   Compiling and running from file: aoc_2020_07.adb
. . . .[ HAC ]. . . .   Compiling and running from file: aoc_2020_08.adb
. . . .[ HAC ]. . . .   Compiling and running from file: aoc_2020_09.adb
. . . .[ HAC ]. . . .   Compiling and running from file: aoc_2020_10.adb
. . . .[ HAC ]. . . .   Compiling and running from file: aoc_2020_11.adb
. . . .[ HAC ]. . . .   Compiling and running from file: aoc_2020_12.adb
. . . .[ HAC ]. . . .   Compiling and running from file: aoc_2020_13.adb
. . . .[ HAC ]. . . .   Compiling and running from file: aoc_2020_15.adb
. . . .[ HAC ]. . . .   Compiling and running from file: aoc_2020_16.adb
. . . .[ HAC ]. . . .   Compiling and running from file: aoc_2020_17.adb
----> Done.
All tests passed.
Summary:
         27 successes
         0 failures
-------[ HAC ]-------   VM interpreter done after  35.307665400 seconds.
-------[ HAC ]-------   Execution of all_silent_tests.adb completed.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Advent of Code, Day 17
  2020-12-18 19:47   ` Gautier Write-Only Address
@ 2020-12-19 10:37     ` Maxim Reznik
  0 siblings, 0 replies; 4+ messages in thread
From: Maxim Reznik @ 2020-12-19 10:37 UTC (permalink / raw)


nice work!

PS My solution: https://github.com/reznikmm/ada-howto/blob/advent-2020/md/17/17.md

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-12-19 10:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-17 20:21 Advent of Code, Day 17 John Perry
2020-12-18 16:40 ` John Perry
2020-12-18 19:47   ` Gautier Write-Only Address
2020-12-19 10:37     ` Maxim Reznik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox