comp.lang.ada
 help / color / mirror / Atom feed
From: Stephen Leake <stephen_leake@stephe-leake.org>
Subject: Re: What is the best way to get a process-list with Ada?
Date: Tue, 18 Oct 2011 07:21:33 -0400
Date: 2011-10-18T07:21:33-04:00	[thread overview]
Message-ID: <827h42v936.fsf@stephe-leake.org> (raw)
In-Reply-To: 2cb6641e-dcd7-40de-95bd-71d405571631@p1g2000yqk.googlegroups.com

Shark8 <onewingedshark@gmail.com> writes:

> I got into a bit of a debate with a friend who said something to the
> effect that to write drivers one needed to use C/C++... 

I use Ada for almost everything, but I write drivers for Lynx in C.

The reason is that the OS API is provided with C interface. I only need
a few functions from the OS API, and I keep the drivers as small as
possible (Lynx is efficient enough to let me do almost everything in
user code). Therefore writing and maintaining the Ada binding to the OS
API is not worth the effort. In addition, bug reports sent to support
will have to be rewritten in C

> anyway, he was irritated about not being able to use Java (which he's
> sort of been forced to use in this instance) to 1) get a process list,

This is not defined in any standard language that I'm aware of, so the
complaint is true of every language.

I guess you are saying "He could not find a Java binding to the OS
service that provides a process list". Finding a C binding is probably a
lot easier, since most OS APIs are provided in C.

> and 2) get window dimensions of a focused-window.

That's a typical operation in a GUI system; I'd be _very_ surprised if
the Java GUI packages on other OSs don't provide it. So again, it's a
matter of finding the binding to the necessary function.

-- 
-- Stephe



      parent reply	other threads:[~2011-10-18 11:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-16 21:10 What is the best way to get a process-list with Ada? Shark8
2011-10-16 23:21 ` anon
2011-10-17  9:33   ` Oliver Kleinke
2011-10-19  0:49     ` Shark8
2011-10-19  0:47   ` Shark8
2011-10-17  1:08 ` John B. Matthews
2011-10-18 11:21 ` Stephen Leake [this message]
replies disabled

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