comp.lang.ada
 help / color / mirror / Atom feed
* Thinking of using Ada for a job at home. Couple of questions first.
@ 2010-03-03 16:19 John McCabe
  2010-03-03 18:22 ` Jeffrey R. Carter
                   ` (3 more replies)
  0 siblings, 4 replies; 30+ messages in thread
From: John McCabe @ 2010-03-03 16:19 UTC (permalink / raw)


Guys

I was hoping you'd be able to help me. Some of this I could probably
find out by re-reading my books but I'm sure this is the sort of thing
some of you guys are doing every day so could probably give a clearer
answer. The other one, I just don't know and a search on Google was a
bit useless.

Basically I have a synthesizer that's not very well supported on the
software front, mainly because not many of them were sold and built.
I'd like to create an application that runs on MS Windows, probably
using Qt that will be able to manage, dump, load patches etc using
MIDI.

So the first question is do any of you know of any bindings to MS
Windows MIDI (presumably the multimedia system) functions that already
exist and are open source or something like that? I searched on Google
for "ada midi" but it looks like there's a product called that so it
came up with loads of stuff. I'm aware there are some binding to Win32
from Ada but, as I've not been doing Ada in anger for a long time, I'm
not sure if there's something for Ada 2005.

The second question is related to the implementation of the System
Exclusive messages. Basically this is part of the reason I thought Ada
would be good for this task. The SysEx messages basically consist of a
smallish header and a variety of different structures that are
differentiated by the "Function" type in the header. Now I seem to
remember from when I did use Ada that it's possible to define the
record representation of a variant record such that the discriminant
is held within the body of the record. This would mean (I think) that
I could read a block of data from the synthesizer straight in to a
buffer that overlaid the variant record and essentially automatically
created a record that could be read as the particular variant related
to the incoming data. However I also seem to remember that's not quite
a 'recommended' way of doing that sort of thing. The other thing that
guided me in Ada's direction is that the structure of the SysEx
messages requires a lot of bit-fields and I'm well aware that Ada's
representation clauses are fantastic for that sort of thing.

So, in principle, would that be the way to do this, or would you be
able to suggest a better mechanism?

Finally, is there a straightforward way to do that sort of thing using
tagged records? E.g. could I define a record which is the header
format, then extend that in a number of different tagged extensions to
create each individual message as a separate tagged record and use the
OO and dispatching facilities to work with them?

Any advice you've got the time to give on this would be very much
appreciated.

John



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

* Re: Thinking of using Ada for a job at home. Couple of questions first.
  2010-03-03 16:19 Thinking of using Ada for a job at home. Couple of questions first John McCabe
@ 2010-03-03 18:22 ` Jeffrey R. Carter
  2010-03-03 20:09   ` John McCabe
  2010-03-03 18:58 ` Hibou57 (Yannick Duchêne)
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 30+ messages in thread
From: Jeffrey R. Carter @ 2010-03-03 18:22 UTC (permalink / raw)


John McCabe wrote:
> 
> The second question is related to the implementation of the System
> Exclusive messages. Basically this is part of the reason I thought Ada
> would be good for this task. The SysEx messages basically consist of a
> smallish header and a variety of different structures that are
> differentiated by the "Function" type in the header. Now I seem to
> remember from when I did use Ada that it's possible to define the
> record representation of a variant record such that the discriminant
> is held within the body of the record. This would mean (I think) that
> I could read a block of data from the synthesizer straight in to a
> buffer that overlaid the variant record and essentially automatically
> created a record that could be read as the particular variant related
> to the incoming data. However I also seem to remember that's not quite
> a 'recommended' way of doing that sort of thing. The other thing that
> guided me in Ada's direction is that the structure of the SysEx
> messages requires a lot of bit-fields and I'm well aware that Ada's
> representation clauses are fantastic for that sort of thing.
> 
> So, in principle, would that be the way to do this, or would you be
> able to suggest a better mechanism?

That is the way I would approach this, though I might keep the buffer and record 
separate and use Unchecked_Conversion.

I can't tell you whether the tagged approach would work, because programming by 
extension is a bad idea, and I avoid it whenever possible.

-- 
Jeff Carter
"Clear? Why, a 4-yr-old child could understand this
report. Run out and find me a 4-yr-old child. I can't
make head or tail out of it."
Duck Soup
94



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

* Re: Thinking of using Ada for a job at home. Couple of questions first.
  2010-03-03 16:19 Thinking of using Ada for a job at home. Couple of questions first John McCabe
  2010-03-03 18:22 ` Jeffrey R. Carter
@ 2010-03-03 18:58 ` Hibou57 (Yannick Duchêne)
  2010-03-03 20:17   ` John McCabe
  2010-03-03 19:17 ` Dmitry A. Kazakov
  2010-03-03 19:52 ` Gautier write-only
  3 siblings, 1 reply; 30+ messages in thread
From: Hibou57 (Yannick Duchêne) @ 2010-03-03 18:58 UTC (permalink / raw)


Le Wed, 03 Mar 2010 17:19:31 +0100, John McCabe  
<john@nospam.assen.demon.co.uk> a écrit:
Hello,
> So the first question is do any of you know of any bindings to MS
> Windows MIDI (presumably the multimedia system) functions that already
> exist and are open source or something like that? I searched on Google
> for "ada midi" but it looks like there's a product called that so it
> came up with loads of stuff. I'm aware there are some binding to Win32
> from Ada but, as I've not been doing Ada in anger for a long time, I'm
> not sure if there's something for Ada 2005.
If there are possible funding, I would enjoy to re-organize my time to  
honor this target under whatever license you may request.

If you ever you are interested in another stuff in the same area, I've  
also started some times ago, but not terminated, an Ada binding to the VST  
architecture. I've temporarily dropped the project for an undetermined  
amount of time, because I need a project which could give me some earn. I  
can't give a date, however, I'm pretty sure I will come back to it in the  
future (at least, I hope I could)

> The second question is related to the implementation of the System
> Exclusive messages. Basically this is part of the reason I thought Ada
> would be good for this task. The SysEx messages basically consist of a
> smallish header and a variety of different structures that are
> differentiated by the "Function" type in the header. Now I seem to
> remember from when I did use Ada that it's possible to define the
> record representation of a variant record such that the discriminant
> is held within the body of the record. This would mean (I think) that
> I could read a block of data from the synthesizer straight in to a
> buffer that overlaid the variant record and essentially automatically
> created a record that could be read as the particular variant related
> to the incoming data. However I also seem to remember that's not quite
> a 'recommended' way of doing that sort of thing.
Excuse me, I'm not sure I've understood your words. Could you give a  
concrete example of a process ?

Just to tell about what immediately comes into my mind : I'm not sure  
variant record would be Ok for whole MIDI data sequences, as it comes into  
sequence and not as a single block. The content of some MIDI messages are  
splitted into multiple units which comes as a sequence. A variant record,  
to be coherent, must be a whole, you cannot have something related to a  
discriminant which remains dangling until some more data later arrives.

All this comment provided I've understood a bit of what you were to mean  
(I apologize if I'm wrong).

> The other thing that
> guided me in Ada's direction is that the structure of the SysEx
> messages requires a lot of bit-fields and I'm well aware that Ada's
> representation clauses are fantastic for that sort of thing.
Another reason to use Ada : Ada is also a good choice in this area, due to  
its tasking capabilities. This kind of application typically heavily  
relies on multiple tasks (and even more heavily if you have to deal with  
multiple synthesizers, what is a common case)

> So, in principle, would that be the way to do this, or would you be
> able to suggest a better mechanism?
>
> Finally, is there a straightforward way to do that sort of thing using
> tagged records? E.g. could I define a record which is the header
> format, then extend that in a number of different tagged extensions to
> create each individual message as a separate tagged record and use the
> OO and dispatching facilities to work with them?
I gonna go back to my docs to remind me about what's the layout of these  
messages exactly.

> Any advice you've got the time to give on this would be very much
> appreciated.
You're welcome


-- 
No-no, this isn't an oops ...or I hope (TM) - Don't blame me... I'm just  
not lucky



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

* Re: Thinking of using Ada for a job at home. Couple of questions first.
  2010-03-03 16:19 Thinking of using Ada for a job at home. Couple of questions first John McCabe
  2010-03-03 18:22 ` Jeffrey R. Carter
  2010-03-03 18:58 ` Hibou57 (Yannick Duchêne)
@ 2010-03-03 19:17 ` Dmitry A. Kazakov
  2010-03-03 20:38   ` John McCabe
  2010-03-03 19:52 ` Gautier write-only
  3 siblings, 1 reply; 30+ messages in thread
From: Dmitry A. Kazakov @ 2010-03-03 19:17 UTC (permalink / raw)


On Wed, 03 Mar 2010 16:19:31 +0000, John McCabe wrote:

> So the first question is do any of you know of any bindings to MS
> Windows MIDI (presumably the multimedia system) functions that already
> exist and are open source or something like that? I searched on Google
> for "ada midi" but it looks like there's a product called that so it
> came up with loads of stuff. I'm aware there are some binding to Win32
> from Ada but, as I've not been doing Ada in anger for a long time, I'm
> not sure if there's something for Ada 2005.

I vaguely remember that there is no proper API for that (either in Ada or
in C). It is communicated over the Windows messages or worse at the process
level. I don't remember. Anyway if there exists proper C API, there is no
problem to convert it to Ada. It is a matter of a pair minutes of work.

> So, in principle, would that be the way to do this, or would you be
> able to suggest a better mechanism?

In practice that usually does not work well. The approach I am using is
reading the octet stream or else what is natural for the device or the
protocol at hand, and then constructing the necessary Ada objects on the
fly. I don't mess with representation clauses. If 100 nanoseconds overhead
impose a serious performance problem to your program it won't work anyway.
And under Windows we are talking about 1ms jitter at least. So no reason to
worry about that.

> Finally, is there a straightforward way to do that sort of thing using
> tagged records?

Yes, as above. This is the way I usually do it.

>  E.g. could I define a record which is the header
> format, then extend that in a number of different tagged extensions to
> create each individual message as a separate tagged record and use the
> OO and dispatching facilities to work with them?

No, why do you need message objects? What for? Once a message is received
and interpreted there is no need to keep it in any form, so to have a
Message type [or an hierarchy of]. Instead of that you create a tagged
Connection type, with primitive higher-level operations invoked by the
driver as it reads incoming messages.

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



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

* Re: Thinking of using Ada for a job at home. Couple of questions first.
  2010-03-03 16:19 Thinking of using Ada for a job at home. Couple of questions first John McCabe
                   ` (2 preceding siblings ...)
  2010-03-03 19:17 ` Dmitry A. Kazakov
@ 2010-03-03 19:52 ` Gautier write-only
  2010-03-03 20:57   ` John McCabe
  3 siblings, 1 reply; 30+ messages in thread
From: Gautier write-only @ 2010-03-03 19:52 UTC (permalink / raw)


For MIDI, it could be worth having a look at this:
  http://www.huygens-fokker.org/scala/
HTH
______________________________________________________________
Gautier's Ada programming -- http://gautiersblog.blogspot.com/



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

* Re: Thinking of using Ada for a job at home. Couple of questions first.
  2010-03-03 18:22 ` Jeffrey R. Carter
@ 2010-03-03 20:09   ` John McCabe
  2010-03-03 21:00     ` Simon Wright
  0 siblings, 1 reply; 30+ messages in thread
From: John McCabe @ 2010-03-03 20:09 UTC (permalink / raw)


Hi Jeff

"Jeffrey R. Carter" <spam.jrcarter.not@spam.acm.org> wrote:

>John McCabe wrote:
>> 
>> The second question is related to the implementation of the System
>> Exclusive messages. Basically this is part of the reason I thought Ada
>> would be good for this task. The SysEx messages basically consist of a
>> smallish header and a variety of different structures that are
>> differentiated by the "Function" type in the header. Now I seem to
>> remember from when I did use Ada that it's possible to define the
>> record representation of a variant record such that the discriminant
>> is held within the body of the record. This would mean (I think) that
>> I could read a block of data from the synthesizer straight in to a
>> buffer that overlaid the variant record and essentially automatically
>> created a record that could be read as the particular variant related
>> to the incoming data. However I also seem to remember that's not quite
>> a 'recommended' way of doing that sort of thing. The other thing that
>> guided me in Ada's direction is that the structure of the SysEx
>> messages requires a lot of bit-fields and I'm well aware that Ada's
>> representation clauses are fantastic for that sort of thing.
>> 
>> So, in principle, would that be the way to do this, or would you be
>> able to suggest a better mechanism?
>
>That is the way I would approach this, though I might keep the buffer and record 
>separate and use Unchecked_Conversion.

Thanks for taking the time to answer that. The Unchecked_Conversion
option was the other thing I was thinking of.

>I can't tell you whether the tagged approach would work, because programming by 
>extension is a bad idea, and I avoid it whenever possible.

It's a good laugh though, and can be a useful think to know about if
your work doesn't involve anything that needs to be particularly fast,
reliable or safe :-}




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

* Re: Thinking of using Ada for a job at home. Couple of questions first.
  2010-03-03 18:58 ` Hibou57 (Yannick Duchêne)
@ 2010-03-03 20:17   ` John McCabe
  2010-03-04  6:22     ` Hibou57 (Yannick Duchêne)
  0 siblings, 1 reply; 30+ messages in thread
From: John McCabe @ 2010-03-03 20:17 UTC (permalink / raw)


Hibou57 (Yannick Duch�ne) <yannick_duchene@yahoo.fr> wrote:

>Le Wed, 03 Mar 2010 17:19:31 +0100, John McCabe  
><john@nospam.assen.demon.co.uk> a �crit:
>Hello,
>> So the first question is do any of you know of any bindings to MS
>> Windows MIDI (presumably the multimedia system) functions that already
>> exist and are open source or something like that? I searched on Google
>> for "ada midi" but it looks like there's a product called that so it
>> came up with loads of stuff. I'm aware there are some binding to Win32
>> from Ada but, as I've not been doing Ada in anger for a long time, I'm
>> not sure if there's something for Ada 2005.
>If there are possible funding, I would enjoy to re-organize my time to  
>honor this target under whatever license you may request.

Unfortunately there's not funding available. I've found a library
called libjdkmidi that, if it would look easier to bind to than direct
to Win32's mmsystem functions, might be worth doing. I suspect though
that it encapsulates some of the functionality you mention later in
relation to tasking etc, although I haven't looked that closely yet.

>If you ever you are interested in another stuff in the same area, I've  
>also started some times ago, but not terminated, an Ada binding to the VST  
>architecture. I've temporarily dropped the project for an undetermined  
>amount of time, because I need a project which could give me some earn. I  
>can't give a date, however, I'm pretty sure I will come back to it in the  
>future (at least, I hope I could)

Thanks, I'll bear that in mind.

>> The second question is related to the implementation of the System
>> Exclusive messages. Basically this is part of the reason I thought Ada
>> would be good for this task. The SysEx messages basically consist of a
>> smallish header and a variety of different structures that are
>> differentiated by the "Function" type in the header. Now I seem to
>> remember from when I did use Ada that it's possible to define the
>> record representation of a variant record such that the discriminant
>> is held within the body of the record. This would mean (I think) that
>> I could read a block of data from the synthesizer straight in to a
>> buffer that overlaid the variant record and essentially automatically
>> created a record that could be read as the particular variant related
>> to the incoming data. However I also seem to remember that's not quite
>> a 'recommended' way of doing that sort of thing.
>Excuse me, I'm not sure I've understood your words. Could you give a  
>concrete example of a process ?

Well basically you define a variant record that contains variants that
apply to all the SysEx messages then (dodgily) locate a buffer (e.g.
of bytes, integers, whatever) in the same place and write the incoming
data in to the buffer. When you come to read it later as a record
object rather than just as bytes it's essentially a valid variant
record (at least, I believe from what I remember that it is!). I think
Jeff's Unchecked_Conversion is a more appropriate way to do it though.

>Just to tell about what immediately comes into my mind : I'm not sure  
>variant record would be Ok for whole MIDI data sequences, as it comes into  
>sequence and not as a single block. The content of some MIDI messages are  
>splitted into multiple units which comes as a sequence. A variant record,  
>to be coherent, must be a whole, you cannot have something related to a  
>discriminant which remains dangling until some more data later arrives.

The application I'm trying to do is a patch editor so it will
essentially deal only with expected messages that are sent from the
synth in response to requests. I don't think the synth intersperses
any other midi data within those messages. It's a Kawai K1 by the way.

>All this comment provided I've understood a bit of what you were to mean  
>(I apologize if I'm wrong).

No need to apologise; if it's not clear to you then I'm sure there are
others in the same position.

>> The other thing that
>> guided me in Ada's direction is that the structure of the SysEx
>> messages requires a lot of bit-fields and I'm well aware that Ada's
>> representation clauses are fantastic for that sort of thing.

>Another reason to use Ada : Ada is also a good choice in this area, due to  
>its tasking capabilities. This kind of application typically heavily  
>relies on multiple tasks (and even more heavily if you have to deal with  
>multiple synthesizers, what is a common case)

I don't need to deal with multiple synthesizers but yes, the tasking
was another reason Ada sounded appropriate as the synth sends all
sorts of junk while it's idling that I need to be able to receive and
just dump, and I need a GUI as well.

>> So, in principle, would that be the way to do this, or would you be
>> able to suggest a better mechanism?
>>
>> Finally, is there a straightforward way to do that sort of thing using
>> tagged records? E.g. could I define a record which is the header
>> format, then extend that in a number of different tagged extensions to
>> create each individual message as a separate tagged record and use the
>> OO and dispatching facilities to work with them?
>I gonna go back to my docs to remind me about what's the layout of these  
>messages exactly.
>
>> Any advice you've got the time to give on this would be very much
>> appreciated.
>You're welcome

Thanks for taking the time to respond. Hope I've made it a little
clearer but if not, just let me know.




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

* Re: Thinking of using Ada for a job at home. Couple of questions first.
  2010-03-03 19:17 ` Dmitry A. Kazakov
@ 2010-03-03 20:38   ` John McCabe
  2010-03-03 20:56     ` Simon Wright
  2010-03-03 22:20     ` Dmitry A. Kazakov
  0 siblings, 2 replies; 30+ messages in thread
From: John McCabe @ 2010-03-03 20:38 UTC (permalink / raw)



"Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> wrote:

>> So, in principle, would that be the way to do this, or would you be
>> able to suggest a better mechanism?
>
>In practice that usually does not work well. The approach I am using is
>reading the octet stream or else what is natural for the device or the
>protocol at hand, and then constructing the necessary Ada objects on the
>fly. I don't mess with representation clauses. If 100 nanoseconds overhead
>impose a serious performance problem to your program it won't work anyway.
>And under Windows we are talking about 1ms jitter at least. So no reason to
>worry about that.

Thanks for that suggestion.

>>  E.g. could I define a record which is the header
>> format, then extend that in a number of different tagged extensions to
>> create each individual message as a separate tagged record and use the
>> OO and dispatching facilities to work with them?
>
>No, why do you need message objects? What for? Once a message is received
>and interpreted there is no need to keep it in any form, so to have a
>Message type [or an hierarchy of]. Instead of that you create a tagged
>Connection type, with primitive higher-level operations invoked by the
>driver as it reads incoming messages.

Well the data coming in represents synth patches, which I want to be
able to save to a file (as raw bytes in a SysEx format - not sure if
it's standard or not, but I've seen quite a few of them), or
manipulate, or load back in or dump back to the synth. Essentially I
want to be able to keep the patches in some format or other, because
you can load a bank of patches at a time. The header though doesn't
apply to a patch, it applies to a message. So you can load one patch
in which you case you put a header on it and send it out, or a set of
patches in which case you put on one header then send multiple
patches.

As for the tagged Connection type, I'm not sure what you mean. Would
you mind elaborating on that please?

BTW - in case anyone's interested, the MIDI format for the synth I'm
interested in is defined at:

http://www.kawaius-tsd.com/OM/K_SYNTH/K1WAVE~1.PDF




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

* Re: Thinking of using Ada for a job at home. Couple of questions first.
  2010-03-03 20:38   ` John McCabe
@ 2010-03-03 20:56     ` Simon Wright
  2010-03-03 21:00       ` John McCabe
  2010-03-03 21:35       ` tmoran
  2010-03-03 22:20     ` Dmitry A. Kazakov
  1 sibling, 2 replies; 30+ messages in thread
From: Simon Wright @ 2010-03-03 20:56 UTC (permalink / raw)


John McCabe <john@nospam.assen.demon.co.uk.nospam> writes:

> BTW - in case anyone's interested, the MIDI format for the synth I'm
> interested in is defined at:
>
> http://www.kawaius-tsd.com/OM/K_SYNTH/K1WAVE~1.PDF

You're going to have fun using unchecked conversion (whether by
Unchecked_Conversion or overlay), considering that the data dumps are
indefinite length (EOX-terminated). Won't you just have to read 4 octets
at a time until EOX? (rather like an HTTP request).

I think I agree with Dmitry, "reading the octet stream or else what is
natural for the device or the protocol at hand, and then constructing
the necessary Ada objects on the fly".



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

* Re: Thinking of using Ada for a job at home. Couple of questions first.
  2010-03-03 19:52 ` Gautier write-only
@ 2010-03-03 20:57   ` John McCabe
  0 siblings, 0 replies; 30+ messages in thread
From: John McCabe @ 2010-03-03 20:57 UTC (permalink / raw)


Gautier write-only <gautier_niouzes@hotmail.com> wrote:

>For MIDI, it could be worth having a look at this:
>  http://www.huygens-fokker.org/scala/

Thanks for that suggestion, I'll check it out.



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

* Re: Thinking of using Ada for a job at home. Couple of questions first.
  2010-03-03 20:56     ` Simon Wright
@ 2010-03-03 21:00       ` John McCabe
  2010-03-03 21:10         ` John McCabe
  2010-03-04  6:39         ` Hibou57 (Yannick Duchêne)
  2010-03-03 21:35       ` tmoran
  1 sibling, 2 replies; 30+ messages in thread
From: John McCabe @ 2010-03-03 21:00 UTC (permalink / raw)


Simon Wright <simon@pushface.org> wrote:

>John McCabe <john@nospam.assen.demon.co.uk.nospam> writes:
>
>> BTW - in case anyone's interested, the MIDI format for the synth I'm
>> interested in is defined at:
>>
>> http://www.kawaius-tsd.com/OM/K_SYNTH/K1WAVE~1.PDF
>
>You're going to have fun using unchecked conversion (whether by
>Unchecked_Conversion or overlay), considering that the data dumps are
>indefinite length (EOX-terminated). Won't you just have to read 4 octets
>at a time until EOX? (rather like an HTTP request).

Nah - they're fixed length in this case.

>I think I agree with Dmitry, "reading the octet stream or else what is
>natural for the device or the protocol at hand, and then constructing
>the necessary Ada objects on the fly".

Thanks for that. I'll bear it in mind but, as I sort of mentioned, for
this synth and for the purposes I want it it looks like the data is a
fixed length, and they're all terminated with EOX anyway.

That is unless (as I hope is NOT the case) any other MIDI data is
interspersed with the SysEx messages. I would hope not but you never
know. Guess it depends on a number of things.



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

* Re: Thinking of using Ada for a job at home. Couple of questions first.
  2010-03-03 20:09   ` John McCabe
@ 2010-03-03 21:00     ` Simon Wright
  0 siblings, 0 replies; 30+ messages in thread
From: Simon Wright @ 2010-03-03 21:00 UTC (permalink / raw)


John McCabe <john@nospam.assen.demon.co.uk.nospam> writes:
> "Jeffrey R. Carter" <spam.jrcarter.not@spam.acm.org> wrote:

>>I can't tell you whether the tagged approach would work, because
>>programming by extension is a bad idea, and I avoid it whenever
>>possible.
>
> It's a good laugh though, and can be a useful think to know about if
> your work doesn't involve anything that needs to be particularly fast,
> reliable or safe :-}

Not my experience. Though the example I have in mind uses extension in
the framework; most project-specific code doesn't.



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

* Re: Thinking of using Ada for a job at home. Couple of questions first.
  2010-03-03 21:00       ` John McCabe
@ 2010-03-03 21:10         ` John McCabe
  2010-03-04  6:39         ` Hibou57 (Yannick Duchêne)
  1 sibling, 0 replies; 30+ messages in thread
From: John McCabe @ 2010-03-03 21:10 UTC (permalink / raw)


John McCabe <john@nospam.assen.demon.co.uk.nospam> wrote:

>>I think I agree with Dmitry, "reading the octet stream or else what is
>>natural for the device or the protocol at hand, and then constructing
>>the necessary Ada objects on the fly".

>Thanks for that. I'll bear it in mind but, as I sort of mentioned, for
>this synth and for the purposes I want it it looks like the data is a
>fixed length, and they're all terminated with EOX anyway.

>That is unless (as I hope is NOT the case) any other MIDI data is
>interspersed with the SysEx messages. I would hope not but you never
>know. Guess it depends on a number of things.

Just checked the MIDI implementation doc; the SysEx messages are all
fixed length starting with a Status octet (16#F0# - nearly gave away
what I've been using recently by writing 0xF0 there :-) and ending in
EOX (16#F7#). Those are the only two octets in the stream that will
have their most significant bit set so I'd need to check anything that
comes in with a set MSB and dump it unless it's a status or EOX octet.
Everything else in the meantime can be shoved in the buffer until the
number of bytes I expect are received.

In saying that, it suggests that, as I'm only ever interested in SysEx
messages I've explicitly requested, then I should be in a position to
just create an object of the expected message type and fill it in on
the fly anyway.

Thanks for that.




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

* Re: Thinking of using Ada for a job at home. Couple of questions first.
  2010-03-03 20:56     ` Simon Wright
  2010-03-03 21:00       ` John McCabe
@ 2010-03-03 21:35       ` tmoran
  2010-03-04  6:43         ` Hibou57 (Yannick Duchêne)
  1 sibling, 1 reply; 30+ messages in thread
From: tmoran @ 2010-03-03 21:35 UTC (permalink / raw)


>I think I agree with Dmitry, "reading the octet stream or else what is
>natural for the device or the protocol at hand, and then constructing
>the necessary Ada objects on the fly".

  CLAW's bitmap routines have an abstract Root_DIBitmap_Type, with monochrome,
VGA, 24 bit color, etc derived types.  For reading a bmp file
    function Read (Filename : in String)
        return Claw.Bitmaps.Root_DIBitmap_Type'class;
internally reads the header bytes, then creates an object of the correct
derived type, reads the data into it, and returns that.  Works just fine.

I don't know about MIDI, but for wav and video Windows generally assumes
you can't do accurate timing, but it can.  So your routines either operate
at a high level or are called as callbacks if they have to execute at an
accurate time.  Ada tasking works just fine for me with audio/video stuff.



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

* Re: Thinking of using Ada for a job at home. Couple of questions first.
  2010-03-03 20:38   ` John McCabe
  2010-03-03 20:56     ` Simon Wright
@ 2010-03-03 22:20     ` Dmitry A. Kazakov
  1 sibling, 0 replies; 30+ messages in thread
From: Dmitry A. Kazakov @ 2010-03-03 22:20 UTC (permalink / raw)


On Wed, 03 Mar 2010 20:38:01 +0000, John McCabe wrote:

> As for the tagged Connection type, I'm not sure what you mean. Would
> you mind elaborating on that please?

I meant something like this:

type Abstract_Connection is tagged ...;
procedure On_XYZ (Link : in out Connection) is abstract;
...

task type Driver (Link : not null access Abstract_Connection'Class);

task body Driver is
begin
   loop
       -- read a message (could be polymorphic or not)
       ...
       -- process the message (usually polymorphic)
       case ... is
           when XYZ => -- XYZ is here
                Link.On_XYZ; -- Do what has to be done
           when ... =>
               ...
       end case;
   end loop;
exception
   when Shut_Down_Exception =>
        null;
   when Error : others =>
        Put ("I am dead! " & Exception_Information (Error));
end Driver;

type My_Fancy_MIDI_Connection is new Abstract_Connection with private;
overriding procedure On_XYZ (Link : in out My_Fancy_MIDI_Connection);
...

I usually have a driver task which deals with a class-wide Connection
object that implements the lower-level communication protocol (the part
that reads messages) and the higher-level semantic call-backs (the part
that reacts to the messages read).

If the communication library is built on callbacks (i.e. already has a
hidden Driver task), then I pass the connection object as user parameter to
the callback, and the loop body above is what to be done in the callback
routine.

The advantage of having Connection tagged is that I can implement layered
protocols and semantic actions incrementally. In complex cases I add
further mix-ins as access discrimnants to Connection, usually when I need
to make lower layers pluggable. But that would be over the top in your
case.

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



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

* Re: Thinking of using Ada for a job at home. Couple of questions first.
  2010-03-03 20:17   ` John McCabe
@ 2010-03-04  6:22     ` Hibou57 (Yannick Duchêne)
  2010-03-04 11:39       ` John McCabe
  0 siblings, 1 reply; 30+ messages in thread
From: Hibou57 (Yannick Duchêne) @ 2010-03-04  6:22 UTC (permalink / raw)


Le Wed, 03 Mar 2010 21:17:12 +0100, John McCabe  
<john@nospam.assen.demon.co.uk.nospam> a écrit:
> I've found a library
> called libjdkmidi that, if it would look easier to bind to than direct
> to Win32's mmsystem functions, might be worth doing.
Keep in mind it's a C++ library, not Ada

-- 
No-no, this isn't an oops ...or I hope (TM) - Don't blame me... I'm just  
not lucky



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

* Re: Thinking of using Ada for a job at home. Couple of questions first.
  2010-03-03 21:00       ` John McCabe
  2010-03-03 21:10         ` John McCabe
@ 2010-03-04  6:39         ` Hibou57 (Yannick Duchêne)
  1 sibling, 0 replies; 30+ messages in thread
From: Hibou57 (Yannick Duchêne) @ 2010-03-04  6:39 UTC (permalink / raw)


Le Wed, 03 Mar 2010 22:00:21 +0100, John McCabe  
<john@nospam.assen.demon.co.uk.nospam> a écrit:
> That is unless (as I hope is NOT the case) any other MIDI data is
> interspersed with the SysEx messages. I would hope not but you never
> know. Guess it depends on a number of things.
I would say it's unlikely to be the case, as the status byte, which  
identify the kind of message, only appears as the first byte of a sequence  
which composes a MIDI message.

-- 
No-no, this isn't an oops ...or I hope (TM) - Don't blame me... I'm just  
not lucky



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

* Re: Thinking of using Ada for a job at home. Couple of questions first.
  2010-03-03 21:35       ` tmoran
@ 2010-03-04  6:43         ` Hibou57 (Yannick Duchêne)
  0 siblings, 0 replies; 30+ messages in thread
From: Hibou57 (Yannick Duchêne) @ 2010-03-04  6:43 UTC (permalink / raw)


Le Wed, 03 Mar 2010 22:35:03 +0100, <tmoran@acm.org> a écrit:
> I don't know about MIDI, but for wav and video Windows generally assumes
> you can't do accurate timing, but it can.
For accurate timing, there is an audio driver interface, called ASIO4All,  
which provides the ASIO interface for none-ASIO sound cards. It bypass the  
normal Windows API audio stack, thus get better timing and less delay. But  
be aware that ASIO4All is not a panacea for everyones, as it is sometime a  
pain to use.


-- 
No-no, this isn't an oops ...or I hope (TM) - Don't blame me... I'm just  
not lucky



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

* Re: Thinking of using Ada for a job at home. Couple of questions first.
  2010-03-04  6:22     ` Hibou57 (Yannick Duchêne)
@ 2010-03-04 11:39       ` John McCabe
  2010-03-09 14:49         ` Warren Gay
  0 siblings, 1 reply; 30+ messages in thread
From: John McCabe @ 2010-03-04 11:39 UTC (permalink / raw)


On Thu, 04 Mar 2010 07:22:34 +0100, Hibou57 (Yannick Duch�ne)
<yannick_duchene@yahoo.fr> wrote:

>Le Wed, 03 Mar 2010 21:17:12 +0100, John McCabe  
><john@nospam.assen.demon.co.uk.nospam> a �crit:
>> I've found a library
>> called libjdkmidi that, if it would look easier to bind to than direct
>> to Win32's mmsystem functions, might be worth doing.
>Keep in mind it's a C++ library, not Ada

Of course, as otherwise I wouldn't need to bind to it!



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

* Re: Thinking of using Ada for a job at home. Couple of questions first.
  2010-03-04 11:39       ` John McCabe
@ 2010-03-09 14:49         ` Warren Gay
  2010-03-09 15:33           ` Jacob Sparre Andersen
                             ` (3 more replies)
  0 siblings, 4 replies; 30+ messages in thread
From: Warren Gay @ 2010-03-09 14:49 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1552 bytes --]

John McCabe expounded in news:kv6vo5d48def3ptdou0r2nndu03nsittp8@4ax.com:

> On Thu, 04 Mar 2010 07:22:34 +0100, Hibou57 (Yannick Duch�ne)
> <yannick_duchene@yahoo.fr> wrote:
> 
>>Le Wed, 03 Mar 2010 21:17:12 +0100, John McCabe  
>><john@nospam.assen.demon.co.uk.nospam> a �crit:
>>> I've found a library
>>> called libjdkmidi that, if it would look easier to bind to than 
direct
>>> to Win32's mmsystem functions, might be worth doing.
>>Keep in mind it's a C++ library, not Ada
> 
> Of course, as otherwise I wouldn't need to bind to it!

This is the one main issue that made me give up on Ada a few
years back. It seemed that every project that I wanted
to do, required me to create a "binding" for this and 
another for that. Sing "It's a C/C++ world after all". 

But I miss designing in Ada, to be sure.

So I keep coming back to the same problem:

  * How can this be solved?

One approach would be open sourced "binding" projects for
the platforms of choice. I started APQ for example, to 
scratch just one itch. But binding projects are tedious.

Another approach might be to create a "binding translator". 
Feed a C/C++ preprocessed output into the translator and 
crank out some ugly but functional package(s). 

The later approach would help on the portability front. Then if 
I have a project that must run on almost any POSIX platform, then
the make process can run the translator on the appropriate
"files" and produce a local platform specific Ada binding.

This approach is probably naive, but I can't help
wish for it.

Warren



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

* Re: Thinking of using Ada for a job at home. Couple of questions first.
  2010-03-09 14:49         ` Warren Gay
@ 2010-03-09 15:33           ` Jacob Sparre Andersen
  2010-03-09 20:22           ` jonathan
                             ` (2 subsequent siblings)
  3 siblings, 0 replies; 30+ messages in thread
From: Jacob Sparre Andersen @ 2010-03-09 15:33 UTC (permalink / raw)


Warren Gay wrote:

> Another approach might be to create a "binding translator".  Feed a
> C/C++ preprocessed output into the translator and crank out some ugly
> but functional package(s).

IIRC, the most recent release of GNAT GPL has this feature for C++.

Greetings,

Jacob
-- 
Photos from the Faroe Islands:
       http://billeder.sparre-andersen.dk/The_Faroe_Islands/



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

* Re: Thinking of using Ada for a job at home. Couple of questions first.
  2010-03-09 14:49         ` Warren Gay
  2010-03-09 15:33           ` Jacob Sparre Andersen
@ 2010-03-09 20:22           ` jonathan
  2010-03-09 21:57             ` Charmed Snark
  2010-03-09 20:32           ` Simon Wright
  2010-03-10  6:42           ` J-P. Rosen
  3 siblings, 1 reply; 30+ messages in thread
From: jonathan @ 2010-03-09 20:22 UTC (permalink / raw)


On Mar 9, 2:49 pm, Warren Gay <ve3...@gmail.com> wrote:


> This is the one main issue that made me give up on Ada a few
> years back. It seemed that every project that I wanted
> to do, required me to create a "binding" for this and
> another for that. Sing "It's a C/C++ world after all".
>
> But I miss designing in Ada, to be sure.
>
> So I keep coming back to the same problem:
>
>   * How can this be solved?
>
> One approach would be open sourced "binding" projects for
> the platforms of choice. I started APQ for example, to
> scratch just one itch. But binding projects are tedious.
>
> Another approach might be to create a "binding translator".
> Feed a C/C++ preprocessed output into the translator and
> crank out some ugly but functional package(s).
>
Some more detail on the AdaCore binding translator Jacob mentioned ...
Recently I decided I wanted a binding to C package, googled for
a tutorial, and found gem 59 and gem 60

http://www.adacore.com/2009/02/23/gem-59/

Thanks AdaCore!  I couldn't have written a binding myself even
in the easiest limit. All I did was type (iirc)
       g++ -c -fdump-ada-spec -C  file_name.h
and it wrote the thing for me.  Lot's of tedious complications
due to C strings and the like were taken care of.  A few things it
did wrong, but not too bad .. even I could fix it.

Jonathan





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

* Re: Thinking of using Ada for a job at home. Couple of questions first.
  2010-03-09 14:49         ` Warren Gay
  2010-03-09 15:33           ` Jacob Sparre Andersen
  2010-03-09 20:22           ` jonathan
@ 2010-03-09 20:32           ` Simon Wright
  2010-03-10  6:42           ` J-P. Rosen
  3 siblings, 0 replies; 30+ messages in thread
From: Simon Wright @ 2010-03-09 20:32 UTC (permalink / raw)


Warren Gay <ve3wwg@gmail.com> writes:

> Another approach might be to create a "binding translator". 
> Feed a C/C++ preprocessed output into the translator and 
> crank out some ugly but functional package(s).

c2ada and SWIG are two projects in this area. I wouldn't recommend c2ada
(although I am at present a developer), because at some point before the
migration to Sourceforge someone had the grand idea of translating C
bodies as well as headers, but failed to carry it through. Haven't used
SWIG.

As Jacob says, GNAT includes this ability. As I recall, the generated
code will be OS-specific; provided the original headers were reasonably
sane this should be OK.



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

* Re: Thinking of using Ada for a job at home. Couple of questions first.
  2010-03-09 20:22           ` jonathan
@ 2010-03-09 21:57             ` Charmed Snark
  2010-03-09 22:54               ` jonathan
  0 siblings, 1 reply; 30+ messages in thread
From: Charmed Snark @ 2010-03-09 21:57 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1363 bytes --]

jonathan expounded in news:dc294dc4-c89d-4cc0-9826-ac2848277771
@o3g2000yqb.googlegroups.com:

> On Mar 9, 2:49�pm, Warren Gay <ve3...@gmail.com> wrote:
>> This is the one main issue that made me give up on Ada a few
>> years back. It seemed that every project that I wanted
>> to do, required me to create a "binding" for this and
>> another for that. Sing "It's a C/C++ world after all".
..
>> Another approach might be to create a "binding translator".
>> Feed a C/C++ preprocessed output into the translator and
>> crank out some ugly but functional package(s).

> Some more detail on the AdaCore binding translator Jacob mentioned ...
> Recently I decided I wanted a binding to C package, googled for
> a tutorial, and found gem 59 and gem 60
> 
> http://www.adacore.com/2009/02/23/gem-59/
> 
> Thanks AdaCore!  I couldn't have written a binding myself even
> in the easiest limit. All I did was type (iirc)
>        g++ -c -fdump-ada-spec -C  file_name.h
> and it wrote the thing for me.  Lot's of tedious complications
> due to C strings and the like were taken care of.  A few things it
> did wrong, but not too bad .. even I could fix it.
> 
> Jonathan

Hey, that is good news! I'll definitely check it out. 

Even if you have to run it on several platforms + tweak 
each one, it would be a great time saver over the present 
manual process.

Warren



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

* Re: Thinking of using Ada for a job at home. Couple of questions first.
  2010-03-09 21:57             ` Charmed Snark
@ 2010-03-09 22:54               ` jonathan
  2010-03-10 17:46                 ` Charmed Snark
  0 siblings, 1 reply; 30+ messages in thread
From: jonathan @ 2010-03-09 22:54 UTC (permalink / raw)


On Mar 9, 9:57 pm, Charmed Snark <sn...@cogeco.ca> wrote:
> jonathan expounded in news:dc294dc4-c89d-4cc0-9826-ac2848277771
> @o3g2000yqb.googlegroups.com:
>
>
>
>
>
> > On Mar 9, 2:49 pm, Warren Gay <ve3...@gmail.com> wrote:
> >> This is the one main issue that made me give up on Ada a few
> >> years back. It seemed that every project that I wanted
> >> to do, required me to create a "binding" for this and
> >> another for that. Sing "It's a C/C++ world after all".
> ..
> >> Another approach might be to create a "binding translator".
> >> Feed a C/C++ preprocessed output into the translator and
> >> crank out some ugly but functional package(s).
> > Some more detail on the AdaCore binding translator Jacob mentioned ...
> > Recently I decided I wanted a binding to C package, googled for
> > a tutorial, and found gem 59 and gem 60
>
> >http://www.adacore.com/2009/02/23/gem-59/
>
> > Thanks AdaCore!  I couldn't have written a binding myself even
> > in the easiest limit. All I did was type (iirc)
> >        g++ -c -fdump-ada-spec -C  file_name.h
> > and it wrote the thing for me.  Lot's of tedious complications
> > due to C strings and the like were taken care of.  A few things it
> > did wrong, but not too bad .. even I could fix it.
>
> > Jonathan
>
> Hey, that is good news! I'll definitely check it out.
>
> Even if you have to run it on several platforms + tweak
> each one, it would be a great time saver over the present
> manual process.
>
> Warren

I should add that I did not put it to a severe test.
The binding it created was 22 files, about 1500 semicolons.
I trimmed it to 1 file, 26 semicolons in length to get
my program working.  It would have been more work
to fix everything (though once you figure out what can
go wrong its not as hard).

Jonathan



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

* Re: Thinking of using Ada for a job at home. Couple of questions first.
  2010-03-09 14:49         ` Warren Gay
                             ` (2 preceding siblings ...)
  2010-03-09 20:32           ` Simon Wright
@ 2010-03-10  6:42           ` J-P. Rosen
  3 siblings, 0 replies; 30+ messages in thread
From: J-P. Rosen @ 2010-03-10  6:42 UTC (permalink / raw)


Warren Gay a �crit :
> Another approach might be to create a "binding translator". 
> Feed a C/C++ preprocessed output into the translator and 
> crank out some ugly but functional package(s). 
> 
There are already two of them:
cbind (http://vagul.tripod.com/cbind4win32.zip)
c2ada (http://sourceforge.net/projects/c2ada/)

Happy ;-) ?

-- 
---------------------------------------------------------
           J-P. Rosen (rosen@adalog.fr)
Visit Adalog's web site at http://www.adalog.fr



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

* Re: Thinking of using Ada for a job at home. Couple of questions first.
  2010-03-09 22:54               ` jonathan
@ 2010-03-10 17:46                 ` Charmed Snark
  2010-03-10 19:12                   ` jonathan
  0 siblings, 1 reply; 30+ messages in thread
From: Charmed Snark @ 2010-03-10 17:46 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1828 bytes --]

jonathan expounded in news:49fb3586-981d-46a8-a023-f43c8fa47c36
@t23g2000yqt.googlegroups.com:

> On Mar 9, 9:57�pm, Charmed Snark <sn...@cogeco.ca> wrote:
>> jonathan expounded in news:dc294dc4-c89d-4cc0-9826-ac2848277771
>> @o3g2000yqb.googlegroups.com:
>> > On Mar 9, 2:49�pm, Warren Gay <ve3...@gmail.com> wrote:
>> >> This is the one main issue that made me give up on Ada a few
>> >> years back. It seemed that every project that I wanted
>> >> to do, required me to create a "binding" for this and
>> >> another for that. Sing "It's a C/C++ world after all".
>> ..
>> >> Another approach might be to create a "binding translator".
>> >> Feed a C/C++ preprocessed output into the translator and
>> >> crank out some ugly but functional package(s).
>> > Some more detail on the AdaCore binding translator Jacob mentioned 
...
>> > Recently I decided I wanted a binding to C package, googled for
>> > a tutorial, and found gem 59 and gem 60
>>
>> >http://www.adacore.com/2009/02/23/gem-59/
>>
>> > Thanks AdaCore! �I couldn't have written a binding myself even
>> > in the easiest limit. All I did was type (iirc)
>> > � � � �g++ -c -fdump-ada-spec -C �file_name.h
>> > Jonathan
>>
>> Hey, that is good news! I'll definitely check it out.
>> Warren
> 
> I should add that I did not put it to a severe test.
> The binding it created was 22 files, about 1500 semicolons.
> I trimmed it to 1 file, 26 semicolons in length to get
> my program working.  It would have been more work
> to fix everything (though once you figure out what can
> go wrong its not as hard).
> 
> Jonathan

I do most of my work under cygwin (laptop) since that is
what I have with me on the road and at work. But the current
cygwin versions don't seem to support -fdump-ada-spec.

But hopefully someday, it'll be everywhere.

Warren




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

* Re: Thinking of using Ada for a job at home. Couple of questions first.
  2010-03-10 17:46                 ` Charmed Snark
@ 2010-03-10 19:12                   ` jonathan
  2010-03-10 20:41                     ` Simon Wright
  0 siblings, 1 reply; 30+ messages in thread
From: jonathan @ 2010-03-10 19:12 UTC (permalink / raw)


On Mar 10, 5:46 pm, Charmed Snark <sn...@cogeco.ca> wrote:
> jonathan expounded in news:49fb3586-981d-46a8-a023-f43c8fa47c36
> @t23g2000yqt.googlegroups.com:
>
>
>
>
>
> > On Mar 9, 9:57 pm, Charmed Snark <sn...@cogeco.ca> wrote:
> >> jonathan expounded in news:dc294dc4-c89d-4cc0-9826-ac2848277771
> >> @o3g2000yqb.googlegroups.com:
> >> > On Mar 9, 2:49 pm, Warren Gay <ve3...@gmail.com> wrote:
> >> >> This is the one main issue that made me give up on Ada a few
> >> >> years back. It seemed that every project that I wanted
> >> >> to do, required me to create a "binding" for this and
> >> >> another for that. Sing "It's a C/C++ world after all".
> >> ..
> >> >> Another approach might be to create a "binding translator".
> >> >> Feed a C/C++ preprocessed output into the translator and
> >> >> crank out some ugly but functional package(s).
> >> > Some more detail on the AdaCore binding translator Jacob mentioned
> ...
> >> > Recently I decided I wanted a binding to C package, googled for
> >> > a tutorial, and found gem 59 and gem 60
>
> >> >http://www.adacore.com/2009/02/23/gem-59/
>
> >> > Thanks AdaCore! I couldn't have written a binding myself even
> >> > in the easiest limit. All I did was type (iirc)
> >> > g++ -c -fdump-ada-spec -C file_name.h
> >> > Jonathan
>
> >> Hey, that is good news! I'll definitely check it out.
> >> Warren
>
> > I should add that I did not put it to a severe test.
> > The binding it created was 22 files, about 1500 semicolons.
> > I trimmed it to 1 file, 26 semicolons in length to get
> > my program working.  It would have been more work
> > to fix everything (though once you figure out what can
> > go wrong its not as hard).
>
> > Jonathan
>
> I do most of my work under cygwin (laptop) since that is
> what I have with me on the road and at work. But the current
> cygwin versions don't seem to support -fdump-ada-spec.
>
> But hopefully someday, it'll be everywhere.
>
> Warren

I used the GNAT GPL for Linux.  There are several
GPL versions for Windows, but I don't know how they
will interact with cygwin.

https://libre.adacore.com/libre/download/

To start, I just registered, installed in /tmp, and
tried it out to see if it worked. I am looking forward
to the 2010 version!

Jonathan




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

* Re: Thinking of using Ada for a job at home. Couple of questions first.
  2010-03-10 19:12                   ` jonathan
@ 2010-03-10 20:41                     ` Simon Wright
  2010-03-10 21:00                       ` Pascal Obry
  0 siblings, 1 reply; 30+ messages in thread
From: Simon Wright @ 2010-03-10 20:41 UTC (permalink / raw)


jonathan <johnscpg@googlemail.com> writes:

>  There are several
> GPL versions for Windows, but I don't know how they
> will interact with cygwin.

My work project is using a (rather old) GNATpro with Cygwin, also rather
old; the only issue was to do with cyggnat.dll vs cygwin.dll vs gdb, and
it was simply a matter of copying the right one to the right place as
per AdaCore's instructions. I don't know what the current position is.



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

* Re: Thinking of using Ada for a job at home. Couple of questions first.
  2010-03-10 20:41                     ` Simon Wright
@ 2010-03-10 21:00                       ` Pascal Obry
  0 siblings, 0 replies; 30+ messages in thread
From: Pascal Obry @ 2010-03-10 21:00 UTC (permalink / raw)


Simon,

> My work project is using a (rather old) GNATpro with Cygwin, also rather
> old; the only issue was to do with cyggnat.dll vs cygwin.dll vs gdb, and
> it was simply a matter of copying the right one to the right place as
> per AdaCore's instructions. I don't know what the current position is.

The cygnat.dll was used for gdb. The recent GNAT versions come with a
MingW based version of GDB. So there is no more cygwin in GNAT package.

I'm still using Cygwin to get a decent shell on Windows plus sshd and cron.

Pascal.

-- 

--|------------------------------------------------------
--| Pascal Obry                           Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--|    http://www.obry.net  -  http://v2p.fr.eu.org
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver keys.gnupg.net --recv-key F949BD3B




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

end of thread, other threads:[~2010-03-10 21:00 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-03 16:19 Thinking of using Ada for a job at home. Couple of questions first John McCabe
2010-03-03 18:22 ` Jeffrey R. Carter
2010-03-03 20:09   ` John McCabe
2010-03-03 21:00     ` Simon Wright
2010-03-03 18:58 ` Hibou57 (Yannick Duchêne)
2010-03-03 20:17   ` John McCabe
2010-03-04  6:22     ` Hibou57 (Yannick Duchêne)
2010-03-04 11:39       ` John McCabe
2010-03-09 14:49         ` Warren Gay
2010-03-09 15:33           ` Jacob Sparre Andersen
2010-03-09 20:22           ` jonathan
2010-03-09 21:57             ` Charmed Snark
2010-03-09 22:54               ` jonathan
2010-03-10 17:46                 ` Charmed Snark
2010-03-10 19:12                   ` jonathan
2010-03-10 20:41                     ` Simon Wright
2010-03-10 21:00                       ` Pascal Obry
2010-03-09 20:32           ` Simon Wright
2010-03-10  6:42           ` J-P. Rosen
2010-03-03 19:17 ` Dmitry A. Kazakov
2010-03-03 20:38   ` John McCabe
2010-03-03 20:56     ` Simon Wright
2010-03-03 21:00       ` John McCabe
2010-03-03 21:10         ` John McCabe
2010-03-04  6:39         ` Hibou57 (Yannick Duchêne)
2010-03-03 21:35       ` tmoran
2010-03-04  6:43         ` Hibou57 (Yannick Duchêne)
2010-03-03 22:20     ` Dmitry A. Kazakov
2010-03-03 19:52 ` Gautier write-only
2010-03-03 20:57   ` John McCabe

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