comp.lang.ada
 help / color / mirror / Atom feed
From: "Björn Lundin" <b.f.lundin@gmail.com>
Subject: Re: newbie, Spark 2014 or Ada 2012
Date: Tue, 07 Jul 2015 00:37:22 +0200
Date: 2015-07-07T00:37:22+02:00	[thread overview]
Message-ID: <mnevpv$e9i$1@dont-email.me> (raw)
In-Reply-To: <87615x9s3o.fsf@jester.gateway.sonic.net>

On 2015-07-06 18:19, Paul Rubin wrote:
> Björn Lundin <b.f.lundin@gmail.com> writes:
>>>> Python doesn't have Ada's high-reliability features or its
>>>> performance, but it's easier to learn and more productive for
>>>> slapping small, non-critical projects together.
>> That is a matter of taste. I still struggle with python.
> 
> Hmm, if you're having specific problems with Python, comp.lang.python
> and the Freenode #python channel are pretty helpful.

Thanks, I have sorted out my issues.
The python documentation is good.
But - I often fall into the IndentationException trap
when I have rewritten some code -
or find that I did not declare a variable
where I should, so after a change,
it is uninitialised when I read it -
which is same as reading an undeclared variable
and I get an exception.
Or not str(var) when I print it.

I know how to resolve the errors,
but it does not come as natural as Ada compile errors do.

I find it more fragile. Or I am to bad at testing.


>> And for Arduino, I've used winavr-ada based on avr-ada
>> http://sourceforge.net/p/avr-ada/wiki/Home/
> 
> How has that been going for you?  I had heard that avr-ada was very
> limited.  People usually program AVR's in C.  But I haven't looked into
> it much.

I guess it depends on your standard.
For me, it was my first try into
embedded, so I got blinky going,
and bought some ds1820 one-wire temp sensors,
and got 7 to work, reporting the temp over serial line
to a mac, over bluetooth. (with a serial to bluetoth adapter on the Nano. )

I then printed the temps on an LCD.

But I never got interrupts to work.
(for a hc-sr04 distance sensor)
Most likely my inexperience.
But the maillist is very friendly and helpful.

So it works for basic stuff for a beginner like me.
Without too much hassle.
But more complicated - I cannot say, but I see no reason why not.

>> There is a new book out, that discusses ada on arduino.
>> http://www.inspirel.com/articles/Ada_On_Cortex.html
> 
> There are some ARM-based Arduinos but usually Arduino refers to boards
> with 8-bit AVR processors.

yes, but I did not imply that Arduinos are not AVR.
In the book, there is a tip that compiling
 on a native ARM is ok, if you specify the cpu.

I guess it's like you can compile for i386 on a newer
intelbox, with correct switches.

example from the book is
 gcc -c -mcpu=cortex-m3 -mthumb program.adb

of course, other tools are applied later to the object file.
see chapter 2 and 3 of the book.

No - I did not try myself yet.


--
Björn


  reply	other threads:[~2015-07-06 22:37 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-06  0:28 newbie, Spark 2014 or Ada 2012 nomadlite
2015-07-06  1:30 ` Paul Rubin
2015-07-06  7:04   ` nomadfate
2015-07-06  7:20     ` Paul Rubin
2015-07-06  7:50     ` Jacob Sparre Andersen
2015-07-06 18:44       ` Jeffrey R. Carter
2015-07-06  9:34     ` Björn Lundin
2015-07-06 16:19       ` Paul Rubin
2015-07-06 22:37         ` Björn Lundin [this message]
2015-07-07  1:30           ` Paul Rubin
2015-07-07  9:35             ` darkestkhan
2015-07-07 17:26               ` David Botton
2015-07-07  3:46           ` Nasser M. Abbasi
2015-07-07  8:24             ` Björn Lundin
2015-07-07  8:57               ` Georg Bauhaus
2015-07-07 18:48                 ` Randy Brukardt
2015-07-07 22:56                   ` Paul Rubin
2015-07-08 19:50                     ` Randy Brukardt
2015-07-08 22:57                       ` Paul Rubin
2015-07-09 17:59                         ` Björn Lundin
2015-07-09 20:10                           ` Paul Rubin
2015-07-09 20:22                             ` Jeffrey R. Carter
2015-07-09 20:41                               ` Paul Rubin
2015-07-09 21:59                                 ` Jeffrey R. Carter
2015-07-09 22:37                                   ` Paul Rubin
2015-07-09 22:55                                     ` Jeffrey R. Carter
2015-07-09 23:25                                       ` Paul Rubin
2015-07-10 22:12                             ` Randy Brukardt
2015-07-06 19:20     ` David Botton
2015-07-06  2:16 ` David Botton
2015-07-06  6:56   ` nomadfate
2015-07-06 19:18     ` David Botton
2015-07-10 22:49 ` nomadfate
replies disabled

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