[Haskell-cafe] Why don't my OS threads terminate?

2011-02-25 Thread Bas van Dijk
Dear all, At work, I'm developing a webapplication with happstack. When I let it run for some time ( 5min.) it crashes with the following message: failed to create OS thread: Resource temporarily unavailable This happens because the server continuously creates OS threads but never terminates

Re: [Haskell-cafe] Haskell platform installation failure on OS X 10.6.6 (intel)

2011-02-25 Thread Gregory Collins
On Thu, Feb 24, 2011 at 7:09 AM, Eugene Kirpichov ekirpic...@gmail.com wrote: Thanks Gregory, Indeed xcode was not installed - however I wonder, why is it a dependency? It seems quite a heavyweight thing to require for installing Haskell, and this requirement may very well be a good reason to

[Haskell-cafe] Proxy for cabal

2011-02-25 Thread Hauschild, Klaus (EXT)
Hi, Is it possible to configure a proxy server for cabal? When yes, how I configure it? Thanks. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] http://www.cs.cornell.edu/icfp/task.htm

2011-02-25 Thread Hauschild, Klaus (EXT)
Hi, Currently I'm trying to lern Haskell by doing. After doing some examples I plan to solve an ICFP task (see subject). In short: build an interpreter for a stack based language thata describes a 3D scene. Ray trace this scene in an image. My current source state can be found here:

Re: [Haskell-cafe] Proxy for cabal

2011-02-25 Thread Hauschild, Klaus (EXT)
Hi, I solved this problem by myself and google research: export HTTP_PROXY=... Von: haskell-cafe-boun...@haskell.org [mailto:haskell-cafe-boun...@haskell.org] Im Auftrag von Hauschild, Klaus (EXT) Gesendet: Freitag, 25. Februar 2011 10:38 An:

[Haskell-cafe] Haskell Platform install instructions

2011-02-25 Thread Michael Snoyman
Hi everyone, Some of the dependencies for Yesod (such as haskell-src) require happy. For the Yesod in Five Minutes page[1], I've given instructions to cabal install happy and then cabal install yesod. However, as Xavier Shay pointed out to me, this won't actually work on a vanilla install, since

[Haskell-cafe] Install GTK on Windows

2011-02-25 Thread Daniel Díaz
Hi, cafe, I know this has been treated many times, but I've tried install GTK so hard without any success that I decided to ask for help. Firstly, I followed the instructions listed in HaskellWiki [1]. No results. Then, I followed the instruction from the Mark Shroyer blog [2]. No results. I

Re: [Haskell-cafe] Install GTK on Windows

2011-02-25 Thread Daniel Díaz
El Vie, 25 de Febrero de 2011, 2:34 pm, aditya siram escribió: Hi Daniel, What is the value of PATH, PKG_CONFIG_PATH and INCLUDE in the shell from which you are invoking cabal install ...? -deech PATH: C:\Archivos de programa\Haskell\bin C:\Archivos de programa\Haskell

Re: [Haskell-cafe] Install GTK on Windows

2011-02-25 Thread Andy Stewart
Hi Daniel, Gtk2hs site is down by move server, sadly. The document on http://www.haskell.org/haskellwiki/Gtk2Hs is wrong. http://markshroyer.com/2010/10/gtk2hs-on-windows/ is right. From your error, you missing C libraries that gtk2hs need, or you have install GTK+ C library, but gtk2hs can't

Re: [Haskell-cafe] Install GTK on Windows

2011-02-25 Thread aditya siram
Maybe it's erroring out because you have C:\gtk\bin and C:\Documents ...\gtk+bundle...\bin in the same path. You shouldn't need both. I also don't see any path that mentions the libxml libraries which you will eventually need. When I installed GTK on Windows 7 I also followed the blog post you

Re: [Haskell-cafe] Fun with the ST monad

2011-02-25 Thread Luke Palmer
Lazy ST is capable of returning values lazily. Not naively -- eg. if you are writing elements to an STRef and then returning the contents of the STRef at the end, then of course it will not return gradually (who's to say that the last thing you do before you return isn't to write [] to the

Re: [Haskell-cafe] Fun with the ST monad

2011-02-25 Thread Kevin Quick
On Thu, 24 Feb 2011 13:45:59 -0700, Andrew Coppin andrewcop...@btinternet.com wrote: The input list is being read from disk by lazy I/O. With the original implementation, the input file gets read at the same time as the output file is written. But runST returns nothing until the *entire*

Re: [Haskell-cafe] http://www.cs.cornell.edu/icfp/task.htm

2011-02-25 Thread Vo Minh Thu
2011/2/25 Hauschild, Klaus (EXT) klaus.hauschild@siemens.com: Hi, Currently I'm trying to lern Haskell by doing. After doing some examples I plan to solve an ICFP task (see subject). In short: build an interpreter for a stack based language thata describes a 3D scene. Ray trace this scene

Re: [Haskell-cafe] Why don't my OS threads terminate?

2011-02-25 Thread sclv
Bas van Dijk-2 wrote: I believe the OS threads are created by my levmar library. This library uses bindings-levmar[4] which is a binding to a C library. bindings-levmar uses safe FFI calls because the levmar C procedures are reentrant (they need to call back into Haskell to execute the

Re: [Haskell-cafe] Why don't my OS threads terminate?

2011-02-25 Thread Bas van Dijk
On 25 February 2011 18:27, sclv s.clo...@gmail.com wrote: Bas van Dijk-2 wrote: I believe the OS threads are created by my levmar library. This library uses bindings-levmar[4] which is a binding to a C library. bindings-levmar uses safe FFI calls because the levmar C procedures are

Re: [Haskell-cafe] Fun with the ST monad

2011-02-25 Thread Andrew Coppin
On 25/02/2011 02:16 AM, wren ng thornton wrote: Given only this specification, the problem is overconstrained, which is why you get too much strictness. That is, your types are too general to allow you to do what you want (e.g., they allow the first Word16 to depend on the last Word8). Hmm,

Re: [Haskell-cafe] Fun with the ST monad

2011-02-25 Thread mokus
On Fri, February 25, 2011 11:24 am, Andrew Coppin wrote: On 25/02/2011 02:16 AM, wren ng thornton wrote: Or converting the whole thing to an iteratee-style computation which is more explicit about the type of stream processing involved and thus what kinds of laziness are possible. I've

Re: [Haskell-cafe] Install GTK on Windows

2011-02-25 Thread Daniel Díaz
Thanks for the responses, but my error remains. I wrote two scripts, following both different instructions. Script 1: @echo off title GTK Haskell Setup echo * Add GTK bin folder. set PATH=%PATH%;C:\Documents and Settings\User\Escritorio\GTK\GTKAIO\bin echo * Add GTK include folder. set

Re: [Haskell-cafe] Install GTK on Windows

2011-02-25 Thread Ryan Yates
In my experience cross platform tools do not work in the presence of spaces in paths. Because of this when on Windows I have the habit of putting any cross platform libraries or tools in a non-spaced path. Another option could be to use the short path names when setting the PATH. GHC and cabal

Re: [Haskell-cafe] Install GTK on Windows

2011-02-25 Thread Daniel Díaz
El Vie, 25 de Febrero de 2011, 10:38 pm, Ryan Yates escribió: In my experience cross platform tools do not work in the presence of spaces in paths. Because of this when on Windows I have the habit of putting any cross platform libraries or tools in a non-spaced path. Another option could

Re: [Haskell-cafe] http://www.cs.cornell.edu/icfp/task.htm

2011-02-25 Thread Tobias Schoofs
Hi Klaus, from your code I cannot tell where exactly you're stuck. A general hint may be to have a look at the parsec library. On 02/25/2011 09:51 AM, Hauschild, Klaus (EXT) wrote: Hi, Currently I'm trying to lern Haskell by doing. After doing some examples I plan to solve an ICFP task

Re: [Haskell-cafe] Fun with the ST monad

2011-02-25 Thread Stephen Tetley
On 25 February 2011 20:38, mo...@deepbondi.net wrote: The short version is that I think there is a more enlightening view of iteratees than as a kind of a fold.  For me, it makes a lot more sense to think of them as operations in a particular abstract monad which has one associated

Re: [Haskell-cafe] Haskell Platform install instructions

2011-02-25 Thread Albert Y. C. Lai
On 11-02-25 05:40 AM, Michael Snoyman wrote: Some of the dependencies for Yesod (such as haskell-src) require happy. For the Yesod in Five Minutes page[1], I've given instructions to cabal install happy and then cabal install yesod. However, as Xavier Shay pointed out to me, this won't actually

Re: [Haskell-cafe] Fun with the ST monad

2011-02-25 Thread wren ng thornton
On 2/25/11 2:24 PM, Andrew Coppin wrote: I've heard much about this iteratee things, but I've never looked into what the hell it actually is. Today I had a look at TMR #16, which is an explanation which I can just about follow. It seems that it's actually a kind of fold - not unlike the streams

Re: [Haskell-cafe] best way to deal with #defines when developing ffi's

2011-02-25 Thread John Millikin
When using c2hs, you can use the inline header commands to define global variables: -- #c const int HSMYLIBRARY_SOME_VAR = C_MY_VAR; const char *HSMYLIBRARY_OTHER_VAR = C_OTHER_VAR; #endc