Re: [Haskell-cafe] ifdef based on which OS you're on

2013-02-16 Thread kudah
__WIN32__ use mingw32_HOST_OS __MACOSX__ darwin_HOST_OS On Sat, 16 Feb 2013 01:05:13 +1100 Andrew Cowie and...@operationaldynamics.com wrote: I've got a piece of code that looks like this: baselineContextSSL :: IO SSLContext baselineContextSSL = do ctx -

Re: [Haskell-cafe] ifdef based on which OS you're on

2013-02-16 Thread Donn Cave
As counterpoint to Vincent Hanquez' note about the certificate store on MacOS Windows, I'd like to cast some doubt on the notion that you can reliably find the cert store here on Linux or the *BSDs. So, if my experience with platforms like that is any guide, you'd rather not hard code this value

[Haskell-cafe] how to release (on hackage) a package that needs foreign libs?

2013-02-16 Thread Johannes Waldmann
What is the recommended approach for publishing (on hackage) a package that depends on external libraries? In my case, the current version of http://hackage.haskell.org/package/satchmo (sources at https://github.com/jwaldmann/satchmo) depends on minisat-haskell-bindings (in Haskell),

[Haskell-cafe] What magic has the new parallel io manager done to improve performance?

2013-02-16 Thread yi huang
I'm curious about the design and trade offs in IO manager, I can point out two changes that should boost performance: 1. Run an IO manager thread on each capability. 2. Use ONESHOT flag to save a system call. I wonder is there anything else? It must be interesting. --

Re: [Haskell-cafe] tls talking to certificate stores (was Re: ...)

2013-02-16 Thread Vincent Hanquez
On 02/16/2013 12:51 AM, Andrew Cowie wrote: Windows certificate and macos X certificate are stored in a reliably discoverable place. That openssl provide no way to get to it is a different story and one reason to have tls. Is talking to the Windows and Mac OS certificate stores something that

[Haskell-cafe] What magic has the new IO manager done to improve performance ?

2013-02-16 Thread yi huang
I' m curious about the design and trade offs behind the new IO manager. I see two changes from the code: 1. Run IO manager thread on each capability. 2. Use ONESHOT flag to save a system call. Is there other interesting things to know? Is it possible to use epoll's ET mode to save even more

Re: [Haskell-cafe] What magic has the new parallel io manager done to improve performance?

2013-02-16 Thread yi huang
Sorry for the duplicate post, please ignore this one. On Sunday, February 17, 2013, yi huang wrote: I'm curious about the design and trade offs in IO manager, I can point out two changes that should boost performance: 1. Run an IO manager thread on each capability. 2. Use ONESHOT flag to

Re: [Haskell-cafe] Text.JSON and utf8

2013-02-16 Thread Iavor Diatchki
Hello Martin, the change that you propose seems to already be in json-0.7. Perhaps you just need to 'cabal update' and install the most recent version? About your other question: I have not used CouchDB but a common mistake is to mix up strings and bytes. Perhaps the `getDoc` function does

Re: [Haskell-cafe] What magic has the new IO manager done to improve performance ?

2013-02-16 Thread Johan Tibell
Hi, On Saturday, February 16, 2013, yi huang wrote: I' m curious about the design and trade offs behind the new IO manager. I see two changes from the code: 1. Run IO manager thread on each capability. 2. Use ONESHOT flag to save a system call. Is there other interesting things to know?

Re: [Haskell-cafe] Netwire, keyboard events, and games

2013-02-16 Thread Ertugrul Söylemez
Patrick Hurst lightqu...@amateurtopologist.com wrote: I'm using netwire to build a game; one of the things the player can do is move around using WASD. I want to use key *events* as the 'basis' of my wires, not the entire state vector of the keyboard so that, for example, a press event on D

Re: [Haskell-cafe] Netwire, keyboard events, and games

2013-02-16 Thread Kata Recurse
On Feb 16, 2013, at 18:14, Ertugrul Söylemez e...@ertes.de wrote: Patrick Hurst lightqu...@amateurtopologist.com wrote: I'm using netwire to build a game; one of the things the player can do is move around using WASD. I want to use key *events* as the 'basis' of my wires, not the entire

Re: [Haskell-cafe] Netwire, keyboard events, and games

2013-02-16 Thread Ertugrul Söylemez
Kata Recurse lightqu...@amateurtopologist.com wrote: This is the approach that I currently use; it was pointed out to me that polling the state of the keys on every input is considered bad practice since it means that key clicks that happen in between physics updates don't get registered at