comp.lang.ada
 help / color / mirror / Atom feed
From: e.s.harney@gmail.com
Subject: Re: How (or Where?) to get started on Ada? (Properly)
Date: Wed, 4 Sep 2013 09:05:19 -0700 (PDT)
Date: 2013-09-04T09:05:19-07:00	[thread overview]
Message-ID: <2e821865-60c7-4056-91b1-165a6e7748ac@googlegroups.com> (raw)
In-Reply-To: <9ec51e40-081f-4ec7-b17f-7c73dbdcd10a@googlegroups.com>

> Extensive should mean coverage tests, I suppose. Not the number of times
the same function with same parameters was called and nobody noticed it
crashed? 

Perhaps my choice of words wasn't ideal.. What I really meant was not really tested in the context of unit tests, but something that is widely used or at least part of a widely used library (and thus checked/analyzed for conformance/compatibility/vulnerabilities, as well as optimized). 

I realize this isn't ideal, but popularity is pretty much the only metric I have to determining the quality of 3rd party libraries, considering that I probably lack the domain knowledge (as well as the large amounts of time) necessary to do this myself..

> Since Ada can return #1 of unknown in advance size
> on the stack, you almost never need #3. 

Yes, I remember using this in some exercises, because I didn't want to bother with learning how proper heap allocations work in Ada. 

Back then though, I thought of this as more of a hack, since I was creating lots of small functions that essentially just worked around the fact of not having a heap. Is this accepted practice when working with Ada?

How does Ada do these stack-allocations of variable size? Is there any performance downside to it? (e.g. by having to relocate things on the stack, or stacks getting huge?)

> This is an orthogonal issue. A string is an array of code points. As such
it cannot be UTF-8 or not. 

"Idealized" Spec and "conventions" (libraries/APIs) sort of drift apart here in most languages in my experience, which is why I haven't really perceived this as an orthogonal issue so far. (Things like the length function counting non-bmp "code points" differently depending on how the run time is compiled in python or counting always only the size in bytes in Go, or having no surrogate-aware substring functionality in Java, etc.)

Thank you for explaining what things look like in Ada, this is what I was looking for.

> the good people on Usenet can be very valuable, too

Yes, I'm pleasantly surprised by all the responses here. I did not expect this much activity, considering the age of the other threads.


On Wednesday, September 4, 2013 11:14:55 AM UTC+2, e.s.h...@gmail.com wrote:
> Some general details on my situation (that may be useful or not for the question; feel free to skip down to the "TL;DR" marker if you don't want to read them):
> 
> 
> 
> As a programmer that has spent most of his time in managed environments so far (Java mostly, with some PHP and Python here and there), I have been trying to get more into "native code" recently, in order to be able to control things like memory layout and get deterministic resource usage (and thus deterministic run time performance). 
> 
> 
> 
> Initially I started looking at C/C++, but soon realized that the intricate semantics of C++ were a deal-breaker (and not necessary for what I was looking for anyways) and that C lacked too many libraries (hash tables, file systems, threading, etc.) to be useful for one-man-projects these days (yes there's things like APR or GLib but those are quite a bit of a hassle). 
> 
> 
> 
> Looking at the other options available currently, Ada seemed like the best one (still actively maintained; competitive compiler; windows/linux-portability; .. at times I wonder if we'd be seeing thing like Rust or Go if Ada didn't still have its Pascal syntax...)
> 
> 
> 
> So here I am, looking into learning Ada.. I have dabbled in it (as well as Turbo Pascal) at various points in time for school/university courses, but those have been very shallow experiences.
> 
> 
> 
> TL;DR:
> 
> What I am struggling the most when learning new languages is knowing virtually nothing about what the syntax actually does. I have tried some online tutorials that manage to walk me through the compilation process and then slowly introduce new languages pieces through example programs, but (for me at least) that has been a rather frustrating experience, considering that I'm essentially just copy-pasting code (and having to ignore irrelevant bits in the code that are not relevant yet, but still necessary for it to run)..
> 
> 
> 
> What I'm looking for is a text that starts from the other way, i.e. explains the language blocks, the data/object model, etc. first, and only after that goes on to provide full examples of working code. I guess this is something I'll only be able to find in a book.
> 
> 
> 
> I did look on Amazon about available books, but all of them seem fairly dated. "Programming in Ada 2005" by John Barnes did look interesting judging by the reviews, yet I'm not sure of how helpful it will be in covering all details that are relevant to writing useful software these days (things like utf8, interfacing with C, etc.).
> 
> 
> 
> Do you have any recommendations for me?


  parent reply	other threads:[~2013-09-04 16:05 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-04  9:14 How (or Where?) to get started on Ada? (Properly) e.s.harney
2013-09-04  9:40 ` Gour
2013-09-04 10:15 ` G.B.
2013-09-04 10:25 ` G.B.
2013-09-04 11:01   ` e.s.harney
2013-09-04 11:22     ` Peter C. Chapin
2013-09-04 12:15     ` Dmitry A. Kazakov
2013-09-04 15:32     ` G.B.
2013-09-04 12:04 ` mockturtle
2013-09-04 12:25 ` Austin Obyrne
2013-09-04 15:00 ` Eryndlia Mavourneen
2013-09-04 16:05 ` e.s.harney [this message]
2013-09-04 16:55   ` Dmitry A. Kazakov
2013-09-04 18:46   ` Jeffrey R. Carter
2013-09-04 20:35     ` Alan Jump
2013-09-05  8:42     ` Jacob Sparre Andersen
2013-09-05 14:34       ` Jeffrey R. Carter
2013-09-04 16:09 ` Dan'l Miller
2013-09-05  0:13   ` e.s.harney
2013-09-05 14:37     ` Mike H
2013-09-10  9:16   ` Maurizio Tomasi
2013-10-03 13:34 ` grodzicky_j
replies disabled

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