Subject: RE: Cryptic Error Message

From: Jan Wielemaker <[email-masked]>
Date: Fri, 26 Nov 1999 12:06:52 +0100

> I figured I would upgrade to 3.3.0 beta upon this error.. and see if that
> would help.
> 
> It did.. Then though maybe it was probably just my overheated cpu :)... 
> Or bad NIC card.. cause the box locked up an hour later. 

Be careful with 3.3.0. There are many nice new features, but don't
expect everything to be stable. Several I/O problems have been
identified, generally involving error-recovery, often in relation to
close/1. Beta-4 should be there soon, but I'm hunting a dead-lock
problem in multi-threaded atom-garbage collection first.

> So after getting 3.3.0 working I am now upgrading the ~swi/library
> I had not realized how much I edited it up.. adding functions allot..
> Wondering which of the ~swi/library files are new in 3.3.0?
> And only make required changes to my old ones.

Not that much.  Various things have been added to backcomp.pl and
quintus.pl that have been replaced by ISO compliant predicates in
the kernel. New is threadutil.pl (thread goodies) and statistics.pl
(realising time/1 and profile/3).

Generally, put your own libraries in your own directory and use
:- asserta(library_directory(MyDir)) to load it before the system
ones if you want overruling.
 
> I wanted to mention I like the "%" in
>  %  quintus compiled into quintus 0.01 sec, 11,580 bytes
> 
> Have a prolog program that communicates entirely over sockets (the tcp.tgz
> from /ALPHA) and trying
>  to use write, listing.. all that is stdout messages.. 
> I want to change the stderr and stdout to a function like ...
> ... all writing to call the clauses
> mystderr(X)...
> mystdout(X)...

Try set_stream(Stream, alias(user_errpr)), etc. See also message_hook/3.

For sockets you can also consider the socket.c from the `clib' package
(but that it upto you).

	Regards --- Jan