Re: [HOpenGL] Re: OpenGL/GLUT examples crashing: known problem?

2005-04-09 Thread Glynn Clements
Claus Reinke wrote: Btw, is there a way to reset the opengl system to a sane state in software? Or are there some invalid assumptions about default state in the other examples? If OpenGL is getting stuck in a non-functional state, that indicates a bug in the driver. -- Glynn Clements

RE: Process library and signals

2005-02-07 Thread Glynn Clements
. system/rawSystem now behave almost exactly like system() in C. The only difference is that you can't ignore SIGINT/SIGQUIT in the child, but I can fix that if necessary. I'm not sure how much it matters; system() isn't really of much use for real programs anyhow. -- Glynn Clements [EMAIL

Re: Bug in touchForeignPtr?

2004-11-22 Thread Glynn Clements
to be called for normal termination (exit() or return from main()), not for _exit() or fatal signals. -- Glynn Clements [EMAIL PROTECTED] ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Re: Is it safe to call getProcessExitCode more than once?

2004-10-28 Thread Glynn Clements
termination. -- Glynn Clements [EMAIL PROTECTED] ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

RE: Process library and signals

2004-10-27 Thread Glynn Clements
between the fork and the exec on Unix and ignored on Windows. AFAICT, that would expose the full functionality available on Unix without interfering with Windows usage or adding complexity. -- Glynn Clements [EMAIL PROTECTED] ___ Glasgow-haskell-users

Re: Is it safe to call getProcessExitCode more than once?

2004-10-27 Thread Glynn Clements
an exception. Or do I misunderstand something? No, that seems correct. Although, depending upon the OS, setting SIGCHLD to SIG_IGN may cause processes to be reaped automatically (i.e. not become zombies), so that's a possible alternative. -- Glynn Clements [EMAIL PROTECTED

Re: Is it safe to call getProcessExitCode more than once?

2004-10-26 Thread Glynn Clements
, where it just retries the waitpid() call), whereas getProcessExitCode will return Nothing. Both will throw an exception if the process terminated on a signal. -- Glynn Clements [EMAIL PROTECTED] ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED

Process library and signals

2004-10-26 Thread Glynn Clements
, as the handler functions won't exist after the execve(). -- Glynn Clements [EMAIL PROTECTED] ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Re: ANNOUNCE: GHC version 6.2.2

2004-10-15 Thread Glynn Clements
/val-tags: Read-only file system -- Glynn Clements [EMAIL PROTECTED] ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Re: newCString -- to 'free' or not?

2004-09-25 Thread Glynn Clements
the memory with malloc, and you have to free it yourself. OTOH, the with* functions allocate the memory with alloca, and it is freed automatically. Also, a ForeignPtr includes a finaliser which will free the data automatically when it is no longer referenced. -- Glynn Clements [EMAIL PROTECTED

RE: Network, sClose

2004-08-13 Thread Glynn Clements
wouldn't even be of use for toy programs). -- Glynn Clements [EMAIL PROTECTED] ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

RE: Network, sClose

2004-08-11 Thread Glynn Clements
may be roughly symmetric, at a higher level, the client and server ends of a connection aren't at all symmetric. -- Glynn Clements [EMAIL PROTECTED] ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow

Re: Network, sClose

2004-08-11 Thread Glynn Clements
and read data until the server closes the connection (usable with services such as systat, netstat, daytime etc). Similarly, sendFrom (i.e. accept a connection and send data) would be just as useful as recvFrom. -- Glynn Clements [EMAIL PROTECTED

Re: Network, sClose

2004-08-10 Thread Glynn Clements
the Network module, but to use Network.Socket instead. -- Glynn Clements [EMAIL PROTECTED] ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

RE: Socket Options

2004-06-28 Thread Glynn Clements
, and getsockopt reads it from there, although I haven't checked whether specific protocols honour those settings. -- Glynn Clements [EMAIL PROTECTED] ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo

Re: Socket Options

2004-06-25 Thread Glynn Clements
to set them, or is there a better way to specify general I/O timeouts than on the socket level? Non-blocking I/O and select/poll; although I don't know how well that is supported. -- Glynn Clements [EMAIL PROTECTED] ___ Glasgow-haskell-users mailing list

Re: Glasgow Haskell on different versions of Linux

2004-06-09 Thread Glynn Clements
flags in 2.3, in which case an unsigned short would no longer be sufficient). -- Glynn Clements [EMAIL PROTECTED] ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Re: Statically linked binary?

2004-05-21 Thread Glynn Clements
is affected. + Anything which supports the ~user syntax to refer to a specific user's home directory will need to use getpwnam(). + Anything which needs to translate between UIDs and usernames will need to use getpwnam() and/or getpwuid(). + Etc. -- Glynn Clements [EMAIL PROTECTED

Re: Problem with ghc on Windows ME

2004-01-29 Thread Glynn Clements
that the shell will eventually end up passing the desired argv[i] to the called program. -- Glynn Clements [EMAIL PROTECTED] ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Re: POpen, opening lots of processes

2004-01-10 Thread Glynn Clements
Nothing execv TrueNothing execvp False Just _ execve TrueJust _ execvpe [*] [*] execvpe() isn't a standard library function; it is implemented in hslibs/posix/cbits/execvpe.c using execve(). -- Glynn Clements [EMAIL PROTECTED

Re: POpen, opening lots of processes

2004-01-08 Thread Glynn Clements
or getAnyProcessStatus). -- Glynn Clements [EMAIL PROTECTED] ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Re: POpen, opening lots of processes

2004-01-08 Thread Glynn Clements
). -- Glynn Clements [EMAIL PROTECTED] ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Re: DiffArray Performance

2003-11-07 Thread Glynn Clements
referential transparency; if you break it, all bets are off. -- Glynn Clements [EMAIL PROTECTED] ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Re: Transmitting Haskell values

2003-10-29 Thread Glynn Clements
for communication between different architectures. -- Glynn Clements [EMAIL PROTECTED] ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Re: Transmitting Haskell values

2003-10-29 Thread Glynn Clements
of Storable. Each specific type would have to be handled separately, depending upon whether swapping is required and, if so, whether bytes are swapped in blocks of 2, 4, or 8 bytes. Also a 32-bit float might use a different byte order to a 32-bit int (so says a comment in glibc's endian.h). -- Glynn

Re: passing a Handle to a C function

2003-07-09 Thread Glynn Clements
, then fdopen() (in C, or write a foreign import) to get a FILE*. Also, don't forget about synchronisation issues between the C and Haskell interfaces to the descriptor (e.g. buffering). -- Glynn Clements [EMAIL PROTECTED] ___ Glasgow-haskell-users mailing

Re: Sending wide characters over the network socket

2003-07-05 Thread Glynn Clements
with ord and chr and either mod/div or the Bits library. -- Glynn Clements [EMAIL PROTECTED] ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Re: emacs haskell-ghci mode hook

2003-01-08 Thread Glynn Clements
? C-h m did not reveal any surprises to me.I only use the recommended setup: AKA func-menu.el: `function-menu' is an interactive autoloaded Lisp function -- autoloads from func-menu -- Glynn Clements [EMAIL PROTECTED] ___ Glasgow

Re: re-opening a closed stdin?

2002-11-21 Thread Glynn Clements
, for the specific case of a terminal on Unix, you can use Posix.getTerminalName; re-opening that will typically work. -- Glynn Clements [EMAIL PROTECTED] ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell

Re: Problem with Data.Dynamic

2002-10-25 Thread Glynn Clements
typeOf _ = mkAppTy fooTc [] or compile with -O, your program works. -- Glynn Clements [EMAIL PROTECTED] ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

RE: IO-System

2002-09-17 Thread Glynn Clements
be satisfied from the buffer and is passed down to the OS. For unbuffered input streams, this applies to all reads. Either of these approaches will confuse some set of users. Anything other than disabling buffering altogether will confuse users who are completely unaware of buffering. -- Glynn

Re: instances of Typable

2002-07-25 Thread Glynn Clements
Hal Daume III wrote: if I have newtype Foo = Foo Int and i want to make it an instance of typeable, how do I create a TypeRep object? fooTc :: TyCon fooTc = mkTyCon Foo instance Typeable Foo where typeOf _ = mkAppTy fooTc [] -- Glynn

RE: [HOpenGL] HOpenGL and --enable-threaded-rts

2002-06-18 Thread Glynn Clements
no idea as to the situation on Windows. -- Glynn Clements [EMAIL PROTECTED] ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users