Parrot IO fun

0 views
Skip to first unread message

Melvin Smith

unread,
Oct 30, 2003, 1:54:24 AM10/30/03
to perl6-i...@perl.org
Parrot fetched its first web page tonight. Its a baby step, but hey... :)

You can now stuff hostnames into a socket as well as a numeric IP address.

see examples/io/http.imc

-Melvin


Nicholas Clark

unread,
Oct 30, 2003, 7:09:14 PM10/30/03
to Melvin Smith, perl6-i...@perl.org

Can we do IPv6?

(Not meant to be a throw away question. As I understand it many hostname
functions were changed or tweaked for IPv6, and coping with it now is
better than retrofitting it later)

Nicholas Clark

Nicholas Clark

unread,
Oct 30, 2003, 7:11:12 PM10/30/03
to Melvin Smith, perl6-i...@perl.org
On Fri, Oct 31, 2003 at 12:09:14AM +0000, Nicholas Clark wrote:
> On Thu, Oct 30, 2003 at 01:54:24AM -0500, Melvin Smith wrote:
> > Parrot fetched its first web page tonight. Its a baby step, but hey... :)

I forgot to say:

Hey, cool! Nice work.

Today web pages, tomorrow self propagating worms? Muahahahaha

Nicholas Clark

Melvin Smith

unread,
Oct 30, 2003, 8:10:59 PM10/30/03
to Nicholas Clark, perl6-i...@perl.org

Sorry for delay on response, just got to my email.

Yes, I intend to encapsulate IPv4 and IPv6 in the same API.

Some of the changes are pretty simple (like instead of using inet_addr, use
inet_aton, etc.) while I'll not sure about the rest. It's been a while
since I did any socket projects but its all coming back pretty fast. :)

Luckily I have a very nice C++ library that I wrote over the past few years
so a lot of it will be cut and paste and a little rework.

-Melvin


David Robins

unread,
Oct 31, 2003, 9:16:30 AM10/31/03
to Melvin Smith, Nicholas Clark, perl6-i...@perl.org
On Thu, 30 Oct 2003, Melvin Smith wrote:

> At 12:09 AM 10/31/2003 +0000, Nicholas Clark wrote:
> >On Thu, Oct 30, 2003 at 01:54:24AM -0500, Melvin Smith wrote:
> > > Parrot fetched its first web page tonight. Its a baby step, but hey... :)
> >

> >Can we do IPv6?
<snip>


>
> Some of the changes are pretty simple (like instead of using inet_addr, use
> inet_aton, etc.) while I'll not sure about the rest. It's been a while
> since I did any socket projects but its all coming back pretty fast. :)

Speaking of which, (this version of) Solaris needs -lresolv to use inet_aton;
uname -a:

SunOS foobar 5.8 Generic_108528-10 sun4u sparc SUNW,Ultra-4

The error:

cc -o parrot -L/opt/SUNWspro/WS6/lib -g imcc/main.o blib/lib/libparrot.a
-lsocket -lnsl -ldl -lm
ild: the archive blib/lib/libparrot.a has entries with the same name --
consistency checks during incremental links are not possible for these
entries
ild: (undefined symbol) inet_aton -- referenced in the text segment of
blib/lib/libparrot.a(io_unix.o)
*** Error code 5
make: Fatal error: Command failed for target `parrot'

No error if I manually add -lresolv to C_LIBS in the Makefile.

--
Dave
Isa. 40:31

Melvin Smith

unread,
Oct 31, 2003, 11:24:45 AM10/31/03
to David Robins, Nicholas Clark, perl6-i...@perl.org
At 09:16 AM 10/31/2003 -0500, David Robins wrote:
>On Thu, 30 Oct 2003, Melvin Smith wrote:
>
> > At 12:09 AM 10/31/2003 +0000, Nicholas Clark wrote:
> > >On Thu, Oct 30, 2003 at 01:54:24AM -0500, Melvin Smith wrote:
> > > > Parrot fetched its first web page tonight. Its a baby step, but
> hey... :)
> > >
> > >Can we do IPv6?
><snip>
> >
> > Some of the changes are pretty simple (like instead of using inet_addr, use
> > inet_aton, etc.) while I'll not sure about the rest. It's been a while
> > since I did any socket projects but its all coming back pretty fast. :)
>
>Speaking of which, (this version of) Solaris needs -lresolv to use inet_aton;
>uname -a:
>
>SunOS foobar 5.8 Generic_108528-10 sun4u sparc SUNW,Ultra-4

Thanks for the report. I'll patch it. Time for be to get my old Sun box out of
the closet.

-Melvin


Reply all
Reply to author
Forward
0 new messages