• Ada versus Pascal

    From 711 Spooky Mart@21:1/5 to All on Thu Oct 21 22:29:15 2021
    The little snippets of Ada code I've seen look _alot_ like Pascal.

    What degree of learning curve is there to learn Ada, coming from a
    Pascal background? What kind of rough timeframes to get comfortable with programming without always looking to the manuals?

    Where is the best starting point for a Pascal programmer to get up and
    running with Ada?

    --
    ┏━━━━┓──┏━━┓───┏━━┓── ┌────────────────────────┐ ┌────────┐
    ┗━━┓─┃──┗┓─┃───┗┓─┃── │ Spooky Mart [chan] 711 │ │ always │
    ───┃─┃──┏┛─┗┓──┏┛─┗┓─ │ https://bitmessage.org │ │ open │
    ───┗━┛──┗━━━┛──┗━━━┛─ └────────────────────────┘ └────────┘

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Paul Rubin@21:1/5 to 711@spooky.mart on Thu Oct 21 23:40:51 2021
    711 Spooky Mart <711@spooky.mart> writes:
    What degree of learning curve is there to learn Ada, coming from a
    Pascal background? What kind of rough timeframes to get comfortable with programming without always looking to the manuals?

    Ada is not that hard to get started with, but it has orders of magnitude
    more stuff in it than Pascal does, and getting familiar with all the intricacies is a big task. I've fooled with Ada a little, I consider
    myself a language geek, I've been following this newsgroup on and off
    for years, but I can't understand that many of the discussions I see
    here.

    If I wanted to do something serious with Ada, I'd start by working
    through an in-depth textbook rather than just an intro or tutorial.

    For just getting started, I used "Ada Distilled" (easy to find online).
    It is pretty good, but there is an enormous amount of material that it
    doesn't cover.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From ldries46@21:1/5 to All on Fri Oct 22 08:18:07 2021
    Op 22-10-2021 om 5:29 schreef 711 Spooky Mart:
    The little snippets of Ada code I've seen look _alot_ like Pascal.

    What degree of learning curve is there to learn Ada, coming from a
    Pascal background? What kind of rough timeframes to get comfortable with programming without always looking to the manuals?

    Where is the best starting point for a Pascal programmer to get up and running with Ada?

    I have learned programming in 1966/1967 in Algol 60. As seen i the Algol
    report that can be found on internet Algol 60 is mostly a language for
    defining algorithms. It does not defines Input and Output procedures.
    Pascal is one of the languages that have Algol 60 as a predecessor as is
    Ada. I did learn Pascal  from some course and later on I did learn Ada,
    the latter by just reading the book "Software Engineering with Ada" by
    Grady Booch. That was Ada 85. The first version of Ada. Ada is stricter
    than other languages and is meant to have NO Operating system dependant
    items, so if you cannot go around something there must be a package on
    each operating system having the same interface everywhere.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Niklas Holsti@21:1/5 to All on Fri Oct 22 11:57:17 2021
    On 2021-10-22 6:29, 711 Spooky Mart wrote:
    The little snippets of Ada code I've seen look _alot_ like Pascal.


    Yes. Pascal syntax had a lot of influence on Ada syntax. But, as others
    have said, (current) Ada has a lot more features than (original) Pascal.

    Very roughly speaking, and off the cuff, Ada has evolved as follows,
    which also gives you a list of the main things to learn, in addition to
    the Pascal base:

    - Ada 83: Pascal + much improved type system + modules (packages) +
    exception handling + generic programming + concurrency (tasks)

    - Ada 95: added modular (unsigned) integer types, object-oriented
    programming (classes = tagged types), package hierarchies (child
    packages), and asynchronous inter-task communication (protected objects)

    - Ada 2005: added Java-like interface types (limited multiple
    inheritance), a standard container library, and further standard libraries

    - Ada 2012: added support for program proof and logical run-time checks (preconditions, postconditions, type predicates), more forms of
    expressions (if expressions, case expressions, quantified expressions),
    and more standard libraries.

    - Ada 2022 (upcoming): adds fine-grained parallel execution, extends the ability to do static (compile-time) computations, adds library packages
    for arbitrary-precision and arbitrary-range integer and real arithmetic ("bignums"), and makes lots of sundry improvements.


    What degree of learning curve is there to learn Ada, coming from a
    Pascal background? What kind of rough timeframes to get comfortable with programming without always looking to the manuals?


    As you can see from the list above, there is quite a lot to learn before
    you know _all_ of Ada. A Pascal-like subset should not be hard to learn,
    and if you learn the rest of the features in more or less the same order
    as they were added to Ada, you will pass from one consistent, working
    language subset to a larger such subset at each step.

    The only point where I suggest to learn features in a different order is
    in inter-task communication: asynchronous communication via protected
    objects is much easier than was the original, synchronous rendez-vous
    method in Ada 83 (but which is of course still supported).


    Where is the best starting point for a Pascal programmer to get up and running with Ada?


    I think this depends a lot on how you like to learn - by reading
    technical text (manuals) or by experimentation. I'm a "read the manual"
    type (I learned Ada from the Ada 83 Reference Manual) so perhaps I would
    start with the Ada Wikibook at
    https://en.m.wikibooks.org/wiki/Ada_Programming, which extends up to the
    2012 Ada standard (or so it claims, I haven't really read it, but I've
    heard good reports of it).

    Perhaps you could take one of your smaller Pascal programs and translate
    it to Ada as a first step? As the next step, you could divide that
    program into packages, then add exception handling. And then take a new
    problem and write an Ada program from scratch.

    Ask for help here, or in some other Ada forum, whenever in doubt about something.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From 711 Spooky Mart@21:1/5 to All on Fri Oct 22 04:59:25 2021
    On 10/22/21 1:18 AM, ldries46 wrote:

    [...]

    Ada is stricter
    than other languages and is meant to have NO Operating system dependant items, so if you cannot go around something there must be a package on
    each operating system having the same interface everywhere.

    By this do you mean the same syntax and libs will run on all target
    systems without fiddling with {IFDEF} and architecture compiler switch
    woo foo for USES and repetitive cross-arch boilerplate?

    One thing I can't stand about Pascal is the totally different functions
    and logic from several operating systems that MUST be re-written several
    times in the same code base to do the same job. This drives me mad. In
    fact it irks me so much I was thinking of writing some libraries for
    things I do that would handle this all automatically across arches.
    There would go a couple months of Sundays.

    Think IPC with Pascal. Get a good IPC routine going for Linux in your
    app, then you have to re-write it for MAC and Windows, and even some
    other flavors of *nix.

    So am I to understand that the Ada compiler has somehow eliminated this problem, by ensuring every target OS has a syntactically conformant
    package to execute its methods using the same statements?

    If I'm understanding you rightly, even though Ada sounds like a much
    more complex language than Pascal, it also sounds like it would have
    less surprises across arches.

    Please elaborate if I'm misunderstanding. And thanks to everyone else
    who has responded.

    711

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jeffrey R.Carter@21:1/5 to All on Fri Oct 22 13:49:11 2021
    On 10/22/21 05:29, 711 Spooky Mart wrote:

    What degree of learning curve is there to learn Ada, coming from a
    Pascal background? What kind of rough timeframes to get comfortable with programming without always looking to the manuals?

    Pascal was the starting point for the Green language, which became Ada
    in 1980 (and also for the Blue, Red, and Yellow languages, which did
    not). Ada is firmly in the ALGOL family of languages.

    There is a sequential subset of Ada that Pascal users can learn very
    quickly: the sequential language + packages (packages [modules] are
    fundamental to Ada, and you can't do anything useful without them). One
    should then quickly learn generics, as much of the standard library is
    generic. Ada's features are mostly orthogonal, so one can use this
    subset without surprises from the other aspects of the language.

    One can then learn programming by type extension (tagged types and
    interfaces) and concurrent programming (tasks and their friends) to
    complete your understanding of the language.

    I generally recommend /Ada Distilled/ (https://www.adaic.org/wp-content/uploads/2010/05/Ada-Distilled-24-January-2011-Ada-2005-Version.pdf)
    to those familiar with another imperative language. It's ISO/IEC
    8652:2007 Ada, but you can easily pick up the new Ada-12 features when
    you've finished. (There's also now an Ada-12 version available on Amazon.)

    --
    Jeff Carter
    "Make it right before you make it faster."
    "Keep it right when you make it faster."
    "Make it clear before you make it faster."
    Elements of Programming Style
    197

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Niklas Holsti@21:1/5 to All on Fri Oct 22 18:12:49 2021
    On 2021-10-22 12:59, 711 Spooky Mart wrote:
    On 10/22/21 1:18 AM, ldries46 wrote:

    [...]

    Ada is stricter
    than other languages and is meant to have NO Operating system dependant
    items, so if you cannot go around something there must be a package on
    each operating system having the same interface everywhere.

    By this do you mean the same syntax and libs will run on all target
    systems without fiddling with {IFDEF} and architecture compiler switch
    woo foo for USES and repetitive cross-arch boilerplate?


    I'm not ldries46, but here is an answer: Ada standardizes _some_
    functions for which some other languages use "OS" services, principally threading, which in Ada is the "tasking" feature. Indeed Ada tasking
    works in the same way whichever OS is used, and also in the "bare
    board", no-OS situation. This is very useful for developing
    multi-threaded embedded SW, because the Ada tasking code can be tested
    on desk-top workstations and then executed on the target system
    unchanged. (and no "ifdefs").

    But real operating systems (as opposed to simpler real-time kernels)
    provide many services that are not standardized in Ada, for example inter-process communication.


    One thing I can't stand about Pascal is the totally different functions
    and logic from several operating systems that MUST be re-written several times in the same code base to do the same job. This drives me mad. In
    fact it irks me so much I was thinking of writing some libraries for
    things I do that would handle this all automatically across arches.
    There would go a couple months of Sundays.

    Think IPC with Pascal. Get a good IPC routine going for Linux in your
    app, then you have to re-write it for MAC and Windows, and even some
    other flavors of *nix.


    Indeed.


    So am I to understand that the Ada compiler has somehow eliminated this problem, by ensuring every target OS has a syntactically conformant
    package to execute its methods using the same statements?


    Sadly no.

    However, there are some rudiments:

    - There is a standardized Ada interface (binding) to POSIX services.
    This is implemented in an Ada library called Florist. If you find or
    make a Florist implementation for the OSes you use, your Ada program can
    use the same OS service interfaces on all those OSes.

    - The gcc-based Ada compiler GNAT comes with a GNAT-specific library
    that provides some OS services with the same Ada API on any OS that GNAT supports. This includes some IPC, but I don't know exactly how far that
    goes, and the library may of course change from one GNAT version to the
    next.

    - There is an Ada library called Win32Ada that provides an extensive set
    of Microsoft Windows services, but it is a "thin binding" meaning that
    even the API is Windows-specific.

    The Ada applications I have created and worked with have needed only a
    few OS services, basically some IPC: text in and out via pipes to and
    from a child process. We implemented our own binding to the required OS services (pipe and process creation and destruction). The interface
    consisted of a package declaration (.ads file) that was basically the
    same for all the supported OSes (Windows, Linux, Mac OS X) but had
    different OS-specific package body files (implementations, .adb files).
    In practice I think the Linux and Mac OS X implementations were the same
    and used direct binding to fork() and pipe() etc. The Windows
    implementation used Win32Ada.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dmitry A. Kazakov@21:1/5 to Niklas Holsti on Fri Oct 22 17:47:59 2021
    On 2021-10-22 17:12, Niklas Holsti wrote:

    I'm not ldries46, but here is an answer: Ada standardizes _some_
    functions for which some other languages use "OS" services, principally threading, which in Ada is the "tasking" feature. Indeed Ada tasking
    works in the same way whichever OS is used, and also in the "bare
    board", no-OS situation. This is very useful for developing
    multi-threaded embedded SW, because the Ada tasking code can be tested
    on desk-top workstations and then executed on the target system
    unchanged. (and no "ifdefs").

    But real operating systems (as opposed to simpler real-time kernels)
    provide many services that are not standardized in Ada, for example inter-process communication.

    Ada 83 predates threads. Initially a task meant to be either scheduled internally or mapped onto system processes. It is not late now. One
    could allow the pragma Import for tasks (and protected objects) in order
    to communicate to an external process using rendezvous and protected
    actions.

    However, there are some rudiments:

    - There is a standardized Ada interface (binding) to POSIX services.
    This is implemented in an Ada library called Florist. If you find or
    make a Florist implementation for the OSes you use, your Ada program can
    use the same OS service interfaces on all those OSes.

    - The gcc-based Ada compiler GNAT comes with a GNAT-specific library
    that provides some OS services with the same Ada API on any OS that GNAT supports. This includes some IPC, but I don't know exactly how far that
    goes, and the library may of course change from one GNAT version to the
    next.

    It provides sockets and serial I/O, one or both are vital for many applications.

    - There is an Ada library called Win32Ada that provides an extensive set
    of Microsoft Windows services, but it is a "thin binding" meaning that
    even the API is Windows-specific.

    - There is the annex E providing RPC and shared objects. Unfortunately
    it is very vague and underdocumented. I failed to provide an
    implementation of for a GNAT compiler.

    - The simple components library provides inter-process communication primitives: mutexes, events, streams, pools, RPCs etc.

    --
    Regards,
    Dmitry A. Kazakov
    http://www.dmitry-kazakov.de

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dennis Lee Bieber@21:1/5 to All on Fri Oct 22 13:05:01 2021
    On Thu, 21 Oct 2021 22:29:15 -0500, 711 Spooky Mart <711@spooky.mart>
    declaimed the following:

    The little snippets of Ada code I've seen look _alot_ like Pascal.

    No surprise. The teams that took part in the DoD competition to design a language to replace the mish-mash of languages being used in the 70s
    tended to choose Pascal as the starting point (Modula-2 hadn't escaped ETH-Zurich yet <G>).

    The main difference is that Ada incorporated block closing syntax at the base, finding Pascal (and C) [begin/end, {/} respectively] usage error-prone (dangling else, etc.) along with using ; as a terminator
    instead of separator. Oh, and using (/) for both function arguments and
    array indexing (back then, most US keypunches didn't support [/] or {/} ).

    Declarations do not have a defined sequence (type, constant, variable).

    Also, Pascal of the era typically did not support separate compilation and/or include files -- programs were all single monolithic files, any
    change required recompiling the entire program.

    Pascal also had a relatively limited I/O system -- with the bad quirk that it did "pre-reads" of files. Made interactive/console programs
    difficult (or required special handling by the run-time startup) --
    starting a program would result in stdin reading at the least one
    character, if not one line, into the file buffer variable... But the
    program may not want the data until after lots of initialization and
    prompts.

    What degree of learning curve is there to learn Ada, coming from a
    Pascal background? What kind of rough timeframes to get comfortable with >programming without always looking to the manuals?

    If all one is writing is "Pascal" type applications, without using complex data types (ie; defining specific types for each "concept") -- it shouldn't take too long.

    Tasking, rendezvous, protected objects (not to be confused with private objects), and generics, may take longer to get comfortable with.

    The appendices of the LRM will tend to get lots of usage; there are many subtleties to the standard libraries.


    --
    Wulfraed Dennis Lee Bieber AF6VN
    wlfraed@ix.netcom.com http://wlfraed.microdiversity.freeddns.org/

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Gautier write-only address@21:1/5 to All on Fri Oct 22 13:00:45 2021
    What degree of learning curve is there to learn Ada, coming from a
    Pascal background? What kind of rough timeframes to get comfortable with programming without always looking to the manuals?

    You don't need to read more manuals than you were used for Pascal (so, it can be a wide range, depending on your way of learning).
    The most outstanding difference between both languages is the degree of unification.

    Here a couple of links, with a Pascal-then-Ada perspective, that could be useful:
    http://p2ada.sourceforge.net/pascada.htm
    http://p2ada.sourceforge.net/

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Paul Rubin@21:1/5 to Dennis Lee Bieber on Fri Oct 22 17:29:26 2021
    Dennis Lee Bieber <wlfraed@ix.netcom.com> writes:
    Also, Pascal of the era typically did not support separate
    compilation and/or include files -- programs were all single
    monolithic files, any change required recompiling the entire program.

    I thought Ada was originally like that too. The program could be split
    into multiple files, but they were expected to all be compiled together.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Randy Brukardt@21:1/5 to Paul Rubin on Fri Oct 22 20:17:02 2021
    "Paul Rubin" <no.email@nospam.invalid> wrote in message news:87ilxod1nd.fsf@nightsong.com...
    Dennis Lee Bieber <wlfraed@ix.netcom.com> writes:
    Also, Pascal of the era typically did not support separate
    compilation and/or include files -- programs were all single
    monolithic files, any change required recompiling the entire program.

    I thought Ada was originally like that too. The program could be split
    into multiple files, but they were expected to all be compiled together.

    No. Some implementations were like that, but most supported fully separate compilations from the beginning. Janus/Ada certainly did (once we got
    packages implemented, and Ada without packages really isn't Ada at all). You might have been thinking about the original permission to require generic bodies to be available when compiling an instantiation, but that only
    applied to generic units, never "regular" units. And some compilers (like Janus/Ada) never used that permission.

    Randy.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From ldries46@21:1/5 to All on Sat Oct 23 09:13:37 2021
    Op 22-10-2021 om 17:12 schreef Niklas Holsti:
    On 2021-10-22 12:59, 711 Spooky Mart wrote:
    On 10/22/21 1:18 AM, ldries46 wrote:

    [...]

    Ada is stricter
    than other languages and is meant to have NO Operating system dependant
    items, so if you cannot go around something there must be a package on
    each operating system having the same interface everywhere.

    By this do you mean the same syntax and libs will run on all target
    systems without fiddling with {IFDEF} and architecture compiler switch
    woo foo for USES and repetitive cross-arch boilerplate?


    I'm not ldries46, but here is an answer: Ada standardizes _some_
    functions for which some other languages use "OS" services,
    principally threading, which in Ada is the "tasking" feature. Indeed
    Ada tasking works in the same way whichever OS is used, and also in
    the "bare board", no-OS situation. This is very useful for developing multi-threaded embedded SW, because the Ada tasking code can be tested
    on desk-top workstations and then executed on the target system
    unchanged. (and no "ifdefs").

    But real operating systems (as opposed to simpler real-time kernels)
    provide many services that are not standardized in Ada, for example inter-process communication.

    Of course there are system functions that are in OS that are not
    implemented in standard Ada. That type users must implement themselves.
    In fact some users are doing that and are present these solutions to the
    world. For these packages the latter line of my earlier comment is
    applicable.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Simon Wright@21:1/5 to Niklas Holsti on Sat Oct 23 15:08:25 2021
    Niklas Holsti <niklas.holsti@tidorum.invalid> writes:

    Indeed Ada tasking works in the same way whichever OS is used, and
    also in the "bare board", no-OS situation.

    Most bare-board runtimes use a subset (the Ravenscar profile) of full
    Ada's tasking facilities. That said, code intended for the bare-board
    can be developed on the desktop.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dennis Lee Bieber@21:1/5 to All on Sat Oct 23 13:24:19 2021
    On Fri, 22 Oct 2021 17:29:26 -0700, Paul Rubin <no.email@nospam.invalid> declaimed the following:

    Dennis Lee Bieber <wlfraed@ix.netcom.com> writes:
    Also, Pascal of the era typically did not support separate
    compilation and/or include files -- programs were all single
    monolithic files, any change required recompiling the entire program.

    I thought Ada was originally like that too. The program could be split
    into multiple files, but they were expected to all be compiled together.

    No... Pretty much every build system for Ada focused on only rebuilding the parts affected by a changed file -- by following WITH statements to
    find required units (see the LRM for what a "unit" comprises) /and/
    determining if that unit requires compilation. Timestamps or intermediate
    files may be used in that determination. Changes in implementation (body) require the body to be recompiled, but if the specification did not change, then units WITHing the specification don't need to be compiled -- they just need relinking with the updated body.

    GNAT's build system -- using the host OS filesystem as the "database" -- required that separate files are generated for each unit. (cf: GNATCHOP) All-in-One was the optional source file format accepted by some compilers
    -- but other than the early language reference manuals, I haven't
    encountered any text books that use that means of presenting code examples (unless it is discussing the use of GNATCHOP itself <G>).

    https://www.adahome.com/History/Stoneman/stoneman.htm
    is the requirements document that DoD used to define the desired
    environment around Ada development.
    """
    4.E APSE TOOLSET REQUIREMENTS
    4.E.1 The tools in an APSE shall support the development of programs in
    the Ada language as defined by the Ada reference manual. In particular an
    APSE shall support the separate compilation features of the language.
    """
    NOTE the last sentence


    --
    Wulfraed Dennis Lee Bieber AF6VN
    wlfraed@ix.netcom.com http://wlfraed.microdiversity.freeddns.org/

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jerry@21:1/5 to All on Sat Oct 23 21:33:14 2021
    This thread began as a comparison of Ada and original Pascal. So how does Ada compare to Free Pascal Compiler and Delphi which have gone far past original Pascal?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From J-P. Rosen@21:1/5 to All on Sun Oct 24 09:04:29 2021
    Le 23/10/2021 à 19:24, Dennis Lee Bieber a écrit :
    https://www.adahome.com/History/Stoneman/stoneman.htm
    is the requirements document that DoD used to define the desired
    environment around Ada development.

    Please don't provide links to adahome, this site is frozen since 1998,
    and there are copyrigh issues with the owner.

    Stoneman can be obtained from: https://en.wikisource.org/wiki/Stoneman_requirements

    --
    J-P. Rosen
    Adalog
    2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX
    Tel: +33 1 45 29 21 52
    https://www.adalog.fr

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From ldries46@21:1/5 to All on Sun Oct 24 08:32:01 2021
    Op 24-10-2021 om 6:33 schreef Jerry:
    This thread began as a comparison of Ada and original Pascal. So how does Ada compare to Free Pascal Compiler and Delphi which have gone far past original Pascal?
    You can also ask can you compile a Free Pascal program in Delphi or in
    the other direction. Ada was intended to do so and to keep it that way

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Gautier write-only address@21:1/5 to All on Sun Oct 24 09:51:26 2021
    Le dimanche 24 octobre 2021 à 06:33:15 UTC+2, Jerry a écrit :
    This thread began as a comparison of Ada and original Pascal. So how does Ada compare to Free Pascal Compiler and Delphi which have gone far past original Pascal?

    You find a very partial answer in the comparison here: http://p2ada.sourceforge.net/pascada.htm#tables
    Made around year 2000, so ~30 after original Pascal but ~20 years ago.

    Note that both FPC and Delphi descend from Turbo Pascal, which is itself completely different from other extensions like ISO Extended Pascal.
    In a nutshell, Pascal is an extreme example of fragmentation of a language into dialects.
    Ada is on the other extremity: you can build the same source sets (I mean exactly the same sources, without preprocessing gimmicks) on completely different compilers & OSes.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From 711 Spooky Mart@21:1/5 to Gautier on Sun Oct 24 18:24:21 2021
    On 10/24/21 11:51 AM, Gautier write-only address wrote:
    Le dimanche 24 octobre 2021 à 06:33:15 UTC+2, Jerry a écrit :
    This thread began as a comparison of Ada and original Pascal. So how does Ada compare to Free Pascal Compiler and Delphi which have gone far past original Pascal?

    You find a very partial answer in the comparison here: http://p2ada.sourceforge.net/pascada.htm#tables
    Made around year 2000, so ~30 after original Pascal but ~20 years ago.

    Note that both FPC and Delphi descend from Turbo Pascal, which is itself completely different from other extensions like ISO Extended Pascal.
    In a nutshell, Pascal is an extreme example of fragmentation of a language into dialects.
    Ada is on the other extremity: you can build the same source sets (I mean exactly the same sources, without preprocessing gimmicks) on completely different compilers & OSes.

    I think that answers the important original query.

    Does modern Ada have facility for writing boot loaders, inline Assembly, kernels, etc.?

    --
    ──┏━━━━┓──┏━━┓───┏━━┓── ┌────────────────────────┐ ┌────────┐
    ──┗━━┓─┃──┗┓─┃───┗┓─┃── │ Spooky Mart [chan] 711 │ │ always │
    ─────┃─┃──┏┛─┗┓──┏┛─┗┓─ │ https://bitmessage.org │ │ open │
    ─────┗━┛──┗━━━┛──┗━━━┛─ └────────────────────────┘ └────────┘

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Niklas Holsti@21:1/5 to All on Mon Oct 25 11:23:49 2021
    On 2021-10-25 2:24, 711 Spooky Mart wrote:


    Does modern Ada have facility for writing boot loaders, inline Assembly, kernels, etc.?


    In-line assembly is supported by most of the Ada compilers I have used,
    but the syntax may differ across compilers.

    The run-time systems (real-time kernels) associated with Ada compilers
    for bare-board embedded systems are typically written in Ada, with minor amounts of assembly language inserted for the very HW-specific parts
    such as HW context saving and restoring.

    I'm not very familiar with boot loaders, but I see no reason why a boot
    loader could not be written in Ada. However, usually (and as for other languages) there will be a small start-up routine in assembly language
    to initialize the processor, set up a stack, and so forth. The "Ada Bare
    Bones" project is doing something like this, I believe: https://wiki.osdev.org/Ada_Bare_bones.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Luke A. Guest@21:1/5 to Niklas Holsti on Mon Oct 25 09:40:38 2021
    On 25/10/2021 09:23, Niklas Holsti wrote:
    On 2021-10-25 2:24, 711 Spooky Mart wrote:


    Does modern Ada have facility for writing boot loaders, inline Assembly,
    kernels, etc.?


    Boot loaders and kernels are just another application area any general
    purpose language can target, even Ada.

    I'm not very familiar with boot loaders, but I see no reason why a boot loader could not be written in Ada. However, usually (and as for other

    If you're talking x86 on PC's, then you'll need to read up on the x86
    boot process in which x86 starts up in 16-bit (real) mode, then has to
    be taken into protected and then long modes. You would need a GCC that
    can target all those modes.

    languages) there will be a small start-up routine in assembly language
    to initialize the processor, set up a stack, and so forth. The "Ada Bare Bones" project is doing something like this, I believe: https://wiki.osdev.org/Ada_Bare_bones.

    Thanks for pointing out my project :) It's out of date and doesn't build
    as is any more, but others have written Ada pages on that site since.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Luke A. Guest@21:1/5 to Luke A. Guest on Mon Oct 25 14:34:33 2021
    On 25/10/2021 09:40, Luke A. Guest wrote:

    Thanks for pointing out my project :) It's out of date and doesn't build
    as is any more, but others have written Ada pages on that site since.

    IIRC, the changes that need to happen is that gprbuild
    --target=arm-<whatever> be used instead of arm-<whatever>-gprbuild.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)