comp.lang.ada
 help / color / mirror / Atom feed
* GNAT and Florist
@ 2004-08-10  7:09 fabio de francesco
  2004-08-10 19:24 ` Mark Lorenzen
  2004-08-11  9:02 ` Pascal Obry
  0 siblings, 2 replies; 6+ messages in thread
From: fabio de francesco @ 2004-08-10  7:09 UTC (permalink / raw)


Hello,

I'm trying to learn Ada95 since a couple of months, coming from C/C++.
I must say that I find Ada much more powerful for writing code that
works without hours of debugging like in C/C++ and that it is much
more readable than the latters.

I use GNAT compiler on Linux and I want to write an Ada program that
has to use the TCP/IP Socket API and maybe other POSIX API.
It's not clear to me which packages I have to use, because I have
heard of a library named Florist that would provide Sockets bindings (
and othe POSIX bindings while I also found a package Ada.Sockets in
GNAT.

My question is about when and why anyone should choose packages
provided by Florist instead than the ones by GNAT.

Thank you all in advance,

Fabio De Francesco.



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

* Re: GNAT and Florist
  2004-08-10  7:09 GNAT and Florist fabio de francesco
@ 2004-08-10 19:24 ` Mark Lorenzen
  2004-08-11 11:56   ` fabio de francesco
  2004-08-11  9:02 ` Pascal Obry
  1 sibling, 1 reply; 6+ messages in thread
From: Mark Lorenzen @ 2004-08-10 19:24 UTC (permalink / raw)


fmdf@tiscali.it (fabio de francesco) writes:

> Hello,
> 
> I'm trying to learn Ada95 since a couple of months, coming from C/C++.
> I must say that I find Ada much more powerful for writing code that
> works without hours of debugging like in C/C++ and that it is much
> more readable than the latters.
> 
> I use GNAT compiler on Linux and I want to write an Ada program that
> has to use the TCP/IP Socket API and maybe other POSIX API.
> It's not clear to me which packages I have to use, because I have
> heard of a library named Florist that would provide Sockets bindings (
> and othe POSIX bindings while I also found a package Ada.Sockets in
> GNAT.
> 
> My question is about when and why anyone should choose packages
> provided by Florist instead than the ones by GNAT.
> 
> Thank you all in advance,
> 
> Fabio De Francesco.

Florist is an implementation of the ISO/IEC standard 14519 and defines
a binding the system calls and library functions defined by POSIX.

The socket bindings in GNAT are good enough if you want to do socket
programming, but they are not a complete binding to POSIX. If you want
to use other POSIX functions such as shared memory, memoty locking,
process signalling, select() system call, address resolver, read(),
write(), readv(), writev() etc., then you should go for Florist.

The ISO/IEC 14519 standard consists of nearly 900 pages, but it is
very clear and informative. It is actually a much better source for
learning POSIX than the usual C API.

Regards,
- Mark Lorenzen



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

* Re: GNAT and Florist
  2004-08-10  7:09 GNAT and Florist fabio de francesco
  2004-08-10 19:24 ` Mark Lorenzen
@ 2004-08-11  9:02 ` Pascal Obry
  1 sibling, 0 replies; 6+ messages in thread
From: Pascal Obry @ 2004-08-11  9:02 UTC (permalink / raw)



fmdf@tiscali.it (fabio de francesco) writes:

> My question is about when and why anyone should choose packages
> provided by Florist instead than the ones by GNAT.

Choosing a GNAT specific libraries is... GNAT specific :) So you won't be able
to port easily your code to other compilers. But using GNAT specific package
is the easiest path... no need to configure/build/install external libraries.
BTW, if you want a socket binding that can be used with different compilers,
have a look at AdaSockets.

Pascal.

-- 

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



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

* Re: GNAT and Florist
  2004-08-10 19:24 ` Mark Lorenzen
@ 2004-08-11 11:56   ` fabio de francesco
  2004-08-11 16:11     ` Mark Lorenzen
  0 siblings, 1 reply; 6+ messages in thread
From: fabio de francesco @ 2004-08-11 11:56 UTC (permalink / raw)


Mark Lorenzen <mark.lorenzen@ofir.dk> wrote in message news:<m3wu066bkw.fsf@0x53586c42.boanxx18.adsl-dhcp.tele.dk>...

> Florist is an implementation of the ISO/IEC standard 14519 and defines
> a binding the system calls and library functions defined by POSIX.
> 
> The socket bindings in GNAT are good enough if you want to do socket
> programming, but they are not a complete binding to POSIX. If you want
> to use other POSIX functions such as shared memory, memoty locking,
> process signalling, select() system call, address resolver, read(),
> write(), readv(), writev() etc., then you should go for Florist.
> 
> The ISO/IEC 14519 standard consists of nearly 900 pages, but it is
> very clear and informative. It is actually a much better source for
> learning POSIX than the usual C API.
> 
> Regards,
> - Mark Lorenzen

Thank you. Is there any documentation on the use and the design of the
Florist Library?

Ciao,
Fabio De Francesco.



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

* Re: GNAT and Florist
  2004-08-11 11:56   ` fabio de francesco
@ 2004-08-11 16:11     ` Mark Lorenzen
  2004-08-11 20:25       ` Ludovic Brenta
  0 siblings, 1 reply; 6+ messages in thread
From: Mark Lorenzen @ 2004-08-11 16:11 UTC (permalink / raw)


fmdf@tiscali.it (fabio de francesco) writes:

> Mark Lorenzen <mark.lorenzen@ofir.dk> wrote in message news:<m3wu066bkw.fsf@0x53586c42.boanxx18.adsl-dhcp.tele.dk>...
> 
> > Florist is an implementation of the ISO/IEC standard 14519 and defines
> > a binding the system calls and library functions defined by POSIX.
> > 
> > The socket bindings in GNAT are good enough if you want to do socket
> > programming, but they are not a complete binding to POSIX. If you want
> > to use other POSIX functions such as shared memory, memoty locking,
> > process signalling, select() system call, address resolver, read(),
> > write(), readv(), writev() etc., then you should go for Florist.
> > 
> > The ISO/IEC 14519 standard consists of nearly 900 pages, but it is
> > very clear and informative. It is actually a much better source for
> > learning POSIX than the usual C API.
> > 
> > Regards,
> > - Mark Lorenzen
> 
> Thank you. Is there any documentation on the use and the design of the
> Florist Library?
> 
> Ciao,
> Fabio De Francesco.

Yes, the ISO standard itself. Unfortunately it isn't free (as in free
beer). If you wan't to buy a PDF version of it, then follow the link
http://www.iso.org/iso/en/CatalogueDetailPage.CatalogueDetail?CSNUMBER=34354&ICS1=35&ICS2=60&ICS3=

Regards,
- Mark Lorenzen



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

* Re: GNAT and Florist
  2004-08-11 16:11     ` Mark Lorenzen
@ 2004-08-11 20:25       ` Ludovic Brenta
  0 siblings, 0 replies; 6+ messages in thread
From: Ludovic Brenta @ 2004-08-11 20:25 UTC (permalink / raw)


I would like to add that Florist sockets are not exactly standard (as
in POSIX) because that part of POSIX never got approved formally.  The
README file in Florist says:

> Beware of the packages POSIX_Sockets, POSIX_Sockets.Internet,
> POSIX_Sockets.Local, POSIX_Sockets.ISO, POSIX_XTI,
> POSIX_XTI.Internet, POSIX_XTI.ISO, POSIX_XTI.MOSI,
> POSIX_Event_Management.  These are parts of a POSIX.5c prototype
> effort that stalled during the ballot/revision process.  We have
> since made some improvements, notably in the socket interfaces, but
> this is far from a finished work.  These package interfaces SHOULD
> NOT BE ASSUMED TO CONFORM to the approved POSIX.5c standard, nor are
> they fully implemented.

That being said, I see no reason why the "proposed" sockets API in
Florist should not work.

-- 
Ludovic Brenta.



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

end of thread, other threads:[~2004-08-11 20:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-10  7:09 GNAT and Florist fabio de francesco
2004-08-10 19:24 ` Mark Lorenzen
2004-08-11 11:56   ` fabio de francesco
2004-08-11 16:11     ` Mark Lorenzen
2004-08-11 20:25       ` Ludovic Brenta
2004-08-11  9:02 ` Pascal Obry

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