Hello !
Probably that's a newbie question, but I'm really lost.
I want to declare an operator (like :-op(500,xfx,-:-).) in a module in a way
that I could use it from the application that uses this module.
--
Bartek Wilczynski
==============================================================================
Message: Address: Action:
help majordomo(a)clip.dia.fi.upm.es Info. on useful commands
subscribe ciao-users-request(a)clip.dia.fi.upm.es Subscribe to this list
unsubscribe ciao-users-request(a)clip.dia.fi.upm.es Unsubscribe from this list
<whatever> ciao-users(a)clip.dia.fi.upm.es Send message to list
-----------------------------------------------------------------------------
Archived messages: http://www.clip.dia.fi.upm.es/Mail/ciao-users/
-----------------------------------------------------------------------------
Hello,
I have a very simple question. I'm trying to download the content of a
web page using the pillow library with ECLIPSE Prolog.
The web page exists for sure, as I can access it via any browser,
including lynx. I can even download it using "lynx --source"
However, when I fetch it with fetch_url/3 I get a "Not found" reply!
[eclipse3]:url_info('http://www.espectador.com/dolina/principal.htm',UI), fetch_url(UI,[],R), member(status(X,C,RC),R), string_list(L,RC).
UI = http('www.espectador.com', 80, [47, 100, 111, 108, 105, 110, 97,
47, 112, 114, 105, 110, 99, 105, 112, 97, 108, 46, ...])
X = request_error
C = 404
R = [status(request_error, 404, [78, 111, 116, 32, 70, 111, 117, 110,
100]), message_date(date('Thursday', 1, 'August', 2002, '01:04:06')),
http_server([65, 112, 97, 99, 104, 101, 47, 49, 46, 51, 46, 50, 50, 32,
40, ...]), connection([99, 108, 111, 115, 101]), content_type(text,
html, [charset = 'iso-8859-1']), content([60, 33, 68, 79, 67, 84, 89,
80, 69, 32, 72, 84, ...])]
RC = [78, 111, 116, 32, 70, 111, 117, 110, 100]
L = `Not Found`
As you can see it returns with error 404, not found. The web page, you
can check, does exist: http://www.espectador.com/dolina/principal.htm
Notice it's not a problem of redirection, as the answer is an error.
I have had similar problems with ECLIPSE's http_client library so I
guess there is some relation with this problem. So far, this was the
only web page I had problem, but I really want to know if fetch_url/3
should work with ANY possible web page a browser can read (modulo
automatic redirection of course)
does anyone has a clue on this problem?
Thanks a lot!
Sebastian
==============================================================================
Message: Address: Action:
help majordomo(a)clip.dia.fi.upm.es Info. on useful commands
subscribe ciao-users-request(a)clip.dia.fi.upm.es Subscribe to this list
unsubscribe ciao-users-request(a)clip.dia.fi.upm.es Unsubscribe from this list
<whatever> ciao-users(a)clip.dia.fi.upm.es Send message to list
-----------------------------------------------------------------------------
Archived messages: http://www.clip.dia.fi.upm.es/Mail/ciao-users/
-----------------------------------------------------------------------------
I just got ciao yesterday, and for my first program in it I wrote a
little hello-server (accept connections, greet them, close them.)
Part of the hello-server is an announce-connection/1 that takes the
Socket stream and writes something like
"Recieved a connection from 1.0.1.0:12345"
... which is a little difficult to write in Ciao, because it doesn't
have any kind of getsockname. Servers in ciao have no way to know
who they're getting connections from!
I'd suggest
ip_socket_name/3 (+Socket, -Host, -Port)
(actually I'd suggest 'ip-socket-name', but the above is more
consistent.)
where Host is an atom such as as '1.0.1.0' and Port is an atom
such as 12345. The "ip-" in "ip-socket-name" is there because
the hostname/port part of a socket address structure is defined
at the IP level ("tcp-" would be inappropriate, since UDP sockets
have the same address structure).
_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com
==============================================================================
Message: Address: Action:
help majordomo(a)clip.dia.fi.upm.es Info. on useful commands
subscribe ciao-users-request(a)clip.dia.fi.upm.es Subscribe to this list
unsubscribe ciao-users-request(a)clip.dia.fi.upm.es Unsubscribe from this list
<whatever> ciao-users(a)clip.dia.fi.upm.es Send message to list
-----------------------------------------------------------------------------
Archived messages: http://www.clip.dia.fi.upm.es/Mail/ciao-users/
-----------------------------------------------------------------------------