[Haskell-cafe] Evolving Faster Haskell Programs (now with LLVM!)

2010-03-01 Thread Don Stewart
http://donsbot.wordpress.com/2010/03/01/evolving-faster-haskell-programs-now-with-llvm/ … In which I use genetic algorithms to search for optimal LLVM optimizer passes to make Haskell programs faster … LLVM + GHC is a lot of fun. -- Don ___

Re: [Haskell-cafe] Re: Has Try Haskell! An interactive tutorial in your browser been announced yet?

2010-03-01 Thread Roel van Dijk
I think these reddit posts are relevant: First announcement: http://www.reddit.com/r/haskell/comments/b58rk/try_haskell/ Second announcement: http://www.reddit.com/r/haskell/comments/b7dil/try_haskell_now_with_t_and_wip_interactive/ ___ Haskell-Cafe

RE: [Haskell-cafe] View patterns

2010-03-01 Thread Simon Peyton-Jones
| However, as somebody pointed out, the Java version is polymorphic. | Assuming that length() is defined for multiple types of container, the | Java version works with lists, arrays, sets, etc. If you try to do this | in Haskell, you end up with A standard way to do it would be this: class

[Haskell-cafe] pddl parser

2010-03-01 Thread Vojtěch Knyttl
Has anyone seen any PDDL(Planning Domain Definition Language) parser in Haskell? Thanks. VK___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Re: Has Try Haskell! An interactive tutorial in your browser been announced yet?

2010-03-01 Thread Benjamin L. Russell
Hector Guilarte hector...@gmail.com writes: span class=Apple-style-span style=font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; Nice!I tried it and it worked perfectly, however I tried it again 45 minutes later and when I pressed Enter nothing happened. I couldn#39;t

Re: [Haskell-cafe] Computer Graphics and Haskell - Radiosity Methods

2010-03-01 Thread Serguey Zefirov
2010/3/1 Hector Guilarte hector...@gmail.com: Hello cafe, While I was studying for my computer graphics test I have tomorrow I realized that maybe some of the major problems I've read so far about Radiosity Rendering Algorithms may be reduced significantly if it was implemented in Haskell and

Re: [Haskell-cafe] Computer Graphics and Haskell - Radiosity Methods

2010-03-01 Thread Maarten Hazewinkel
2010/3/1 Hector Guilarte hector...@gmail.com: Hello cafe, While I was studying for my computer graphics test I have tomorrow I realized that maybe some of the major problems I've read so far about Radiosity Rendering Algorithms may be reduced significantly if it was implemented in Haskell

Re: [Haskell-cafe] Real-time garbage collection for Haskell

2010-03-01 Thread Peter Verswyvelen
Sounds like we need to come up with some benchmarking programs so we can measure the GC latency and soft-realtimeness... PS: Regarding Haskell and games: the University of Utrecht teaches Haskell in their brand new game technology course :-) On Mon, Mar 1, 2010 at 1:04 AM, Luke Palmer

Re: [Haskell-cafe] Real-time garbage collection for Haskell

2010-03-01 Thread Sönke Hahn
On Monday 01 March 2010 01:04:37 am Luke Palmer wrote: On Sun, Feb 28, 2010 at 2:06 AM, Pavel Perikov peri...@gmail.com wrote: Did you really seen 100ms pauses?! I never did extensive research on this but my numbers are rather in microseconds range (below 1ms). What causes such a long

[Haskell-cafe] Books for advanced Haskell

2010-03-01 Thread Günther Schmidt
Hi all, there seems to be a huge number of things that monads can be used for. And there are lots of papers, blog posts, etc. describing that, some more or less accessible. Apart from monads there are of course also Applicative Functors, Monoids, Arrows and what have you. But in short the

Re: [Haskell-cafe] Real-time garbage collection for Haskell

2010-03-01 Thread Thomas Schilling
On 28 February 2010 05:20, Luke Palmer lrpal...@gmail.com wrote: I have seen some proposals around here for SoC projects and other things to try to improve the latency of GHC's garbage collector.  I'm currently developing a game in Haskell, and even 100ms pauses are unacceptable for a

Re: [Haskell-cafe] passing cpp options to c2hs from cabal

2010-03-01 Thread Chris Casinghino
This works great, thanks! As a footnote: I doubt I will be the only one is confused because cc-options get passed to c2hs but cpp-options don't. Perhaps the cabal designers should revisit this choice. --Chris On Sat, Feb 27, 2010 at 3:44 PM, Daniel Fischer daniel.is.fisc...@web.de wrote: Am

Re: [Haskell-cafe] Linear programming in Haskell

2010-03-01 Thread Henning Thielemann
On Sun, 28 Feb 2010, Louis Wasserman wrote: It's an expensive operation, though -- since I don't track the set of all variables as the LP is built, I need to construct the set of all variables before generating new ones -- so it's recommended that you get all the variables you need in one or

[Haskell-cafe] Ghent Functional Programming Group: First Meeting on April 1, 2010

2010-03-01 Thread Jeroen Janssen
Dear All, The results of the doodle are in, and the result is that the first meeting of the Ghent Functional Programming Group will be held on April 1, 2010 at 7pm in meeting room Shannon in the Technicum building (Sint-Pietersnieuwstraat 41, 9000 Gent) of Ghent University. The automatic doors

Re: [Haskell-cafe] Books for advanced Haskell

2010-03-01 Thread David Leimbach
I don't think a Haskell-monad book would be terribly interesting. A book on taking the pieces of category theory, with a little bit more of the math, to apply to Haskell would be greatly interesting to me. Also a book on learning what to look for for measuring Haskell performance in space and

Re: [Haskell-cafe] Books for advanced Haskell

2010-03-01 Thread Stephen Tetley
Hi Günther For advanced programming with no special attention to monads, there is 'The Fun of Programming' edited by Jeremy Gibbons and Oege de Moor, contents in a funny tab-box on this on this page: http://www.palgrave.com/products/title.aspx?PID=265581 The Haskell 'maths' books - 'The Haskell

[Haskell-cafe] GHC's parallel garbage collector -- what am I doing wrong?

2010-03-01 Thread Michael Lesniak
Hello haskell-cafe, Sorry for this long post, but I can't think of a way to describe and explain the problem in a shorter way. I've (again) a very strange behaviour with the parallel GC and would be glad if someone could either reproduce (and explain) it or provide a solution. A similar but

[Haskell-cafe] Performance of Knight's Tour

2010-03-01 Thread Artyom Kazak
Hi! I'm learning Haskell, and now I'm trying to make framework for solving searching problems, such as Knight's Tour. For small boards it answers instantly. For 7x8 board - 23 seconds. For 8x8 board - more than 30 minutes (it hasn't finished yet). Where is the root of the evil? --program module

Re: [Haskell-cafe] Books for advanced Haskell

2010-03-01 Thread Johan Tibell
2010/3/1 David Leimbach leim...@gmail.com I don't think a Haskell-monad book would be terribly interesting. A book on taking the pieces of category theory, with a little bit more of the math, to apply to Haskell would be greatly interesting to me. Also a book on learning what to look for

Re: [Haskell-cafe] Real-time garbage collection for Haskell

2010-03-01 Thread Job Vranish
My current area of work is on realtime embedded software programming for avionics systems. We do most of our coding in Ada but I've been dreaming of using haskell instaed. However, the garbage collector is actually one of the larger obsticles to making this happen. All of our avionics software

Re: [Haskell-cafe] Real-time garbage collection for Haskell

2010-03-01 Thread Sebastian Sylvan
On Sun, Feb 28, 2010 at 5:20 AM, Luke Palmer lrpal...@gmail.com wrote: I have seen some proposals around here for SoC projects and other things to try to improve the latency of GHC's garbage collector. I'm currently developing a game in Haskell, and even 100ms pauses are unacceptable for a

Re: [Haskell-cafe] GHC's parallel garbage collector -- what am I doing wrong?

2010-03-01 Thread Daniel Fischer
Am Montag 01 März 2010 16:59:54 schrieb Michael Lesniak: I've (again) a very strange behaviour with the parallel GC and would be glad if someone could either reproduce (and explain) it or provide a solution. Sorry, can't reproduce it: $ for i in `seq 1 5`; do time ./mlPi 5000 +RTS -N1; done

Re: [Haskell-cafe] Books for advanced Haskell

2010-03-01 Thread Marc Weber
Excerpts from Stephen Tetley's message of Mon Mar 01 16:54:57 +0100 2010: Hi Günther For advanced programming with no special attention to monads, there is 'The Fun of Programming' edited by Jeremy Gibbons and Oege de Moor, contents in a funny tab-box on this on this page:

Re: [Haskell-cafe] Evolving Faster Haskell Programs (now with LLVM!)

2010-03-01 Thread John Van Enk
What's the chance you have generational graphs for the rest of your examples like you do with the first? I'd be interested to see those. On Mon, Mar 1, 2010 at 3:02 AM, Don Stewart d...@galois.com wrote: http://donsbot.wordpress.com/2010/03/01/evolving-faster-haskell-programs-now-with-llvm/

Re: [Haskell-cafe] Books for advanced Haskell

2010-03-01 Thread Günther Schmidt
Hello David, I do agree, Monads as *such* may not be super complicated. That said I see monads constructed by some of the Haskell big brains and used that would never ever occur to me. And then I read their papers, blog posts and everything I can get my hands on and still not get it. A

Re: [Haskell-cafe] What are free Monads?

2010-03-01 Thread Henning Thielemann
On Sat, 27 Feb 2010, Dan Doel wrote: Free structures originate (I think) in algebra. There you'll find talk of free groups, free rings, free monoids, etc. How about turning this post into a HaskellWiki article in Category:Glossary ? ___

Re: [Haskell-cafe] GHC's parallel garbage collector -- what am I doing wrong?

2010-03-01 Thread Michael Lesniak
Hello Daniel, Sorry, can't reproduce it: That's also very helpful, so thanks for this :-) Seems your system has a problem synchronising the cores for GC. Correct. Could you please tell me your system configuration (i.e. GHC compiler and OS?) Cheers, Michael

Re: [Haskell-cafe] Cabal pre-compiled packages

2010-03-01 Thread Henning Thielemann
On Sat, 27 Feb 2010, Diego Souza wrote: Hi, currently when one install a cabal package it compiles it and then install generated binaries. I wonder whether or not it would be useful to have pre-compiled binaries as many package managers usually do (e.g. apt). I often think that would save some

Re: [Haskell-cafe] Performance of Knight's Tour

2010-03-01 Thread Daniel Fischer
Am Montag 01 März 2010 17:07:46 schrieb Artyom Kazak: Hi! I'm learning Haskell, and now I'm trying to make framework for solving searching problems, such as Knight's Tour. For small boards it answers instantly. For 7x8 board - 23 seconds. For 8x8 board - more than 30 minutes (it hasn't

Re: [Haskell-cafe] Real-time garbage collection for Haskell

2010-03-01 Thread Henning Thielemann
On Sat, 27 Feb 2010, Luke Palmer wrote: I have seen some proposals around here for SoC projects and other things to try to improve the latency of GHC's garbage collector. I'm currently developing a game in Haskell, and even 100ms pauses are unacceptable for a real-time game. I'm calling out

Re: [Haskell-cafe] GHC's parallel garbage collector -- what am I doing wrong?

2010-03-01 Thread Daniel Fischer
Am Montag 01 März 2010 18:52:53 schrieb Michael Lesniak: Hello Daniel, Sorry, can't reproduce it: That's also very helpful, so thanks for this :-) Seems your system has a problem synchronising the cores for GC. Correct. Could you please tell me your system configuration (i.e. GHC

Re: [Haskell-cafe] Performance of Knight's Tour

2010-03-01 Thread Artyom Kazak
2010/3/1 Daniel Fischer daniel.is.fisc...@web.de: In the algorithm. You investigate far too many dead ends. Since for larger boards, the number of dead ends increases fast, larger boards take much much longer. With one little change, I get ... For a reason I don't understand, if the second

[Haskell-cafe] idioms ... for using Control.Applicative.WrapMonad or Control.Arrow.Kleisli?

2010-03-01 Thread Nicolas Frisby
Each time I find myself needing to use the wrapping functions necessary for this embeddings, I grumble. Does anyone have a favorite use-pattern for ameliorating these quickly ubiquitous conversions? For runKleisli, I was considering something like okKleisli :: (Control.Arrow.Kleisli m a b -

Re: [Haskell-cafe] Performance of Knight's Tour

2010-03-01 Thread Daniel Fischer
Am Montag 01 März 2010 19:29:45 schrieb Artyom Kazak: 2010/3/1 Daniel Fischer daniel.is.fisc...@web.de: In the algorithm. You investigate far too many dead ends. Since for larger boards, the number of dead ends increases fast, larger boards take much much longer. With one little change, I

Re: [Haskell-cafe] using haskell to serve with apache

2010-03-01 Thread Yitzchak Gale
brad clawsie wrote: should i just try out something based on fastcgi? Obviously it depends on exactly what you want to do. For a simple very low volume page, even cgi should be just fine. I use it all the time. Regards, Yitz ___ Haskell-Cafe mailing

Re: [Haskell-cafe] Real-time garbage collection for Haskell

2010-03-01 Thread Thomas Schilling
On 1 March 2010 16:27, Job Vranish job.vran...@gmail.com wrote: My current area of work is on realtime embedded software programming for avionics systems. We do most of our coding in Ada but I've been dreaming of using haskell instaed. Do you really think this is realistic? Garbage collector

Re: [Haskell-cafe] Real-time garbage collection for Haskell

2010-03-01 Thread John Van Enk
The whole concept of lazy evaluation seems to run counter to the idea of real-time systems. Hi Thomas, Lazy evaluation is okay since it has deterministic characteristics. We can predict what will happen quite accurately (heck, we can model it in simpler cases). It might take a while to get

Re: [Haskell-cafe] GHC's parallel garbage collector -- what am I doing wrong?

2010-03-01 Thread Bryan O'Sullivan
The parallel GC currently doesn't behave well with concurrent programs that uses multiple capabilities (aka OS threads), and the behaviour you see is the known symptom of this.. I believe that Simon Marlow has some fixes in hand that may go into 6.12.2. Are you saying that you see two different

Re: [Haskell-cafe] Performance of Knight's Tour

2010-03-01 Thread Artyom Kazak
2010/3/1 Daniel Fischer daniel.is.fisc...@web.de: Am Montag 01 März 2010 19:29:45 schrieb Artyom Kazak: 2010/3/1 Daniel Fischer daniel.is.fisc...@web.de: In the algorithm. You investigate far too many dead ends. Since for larger boards, the number of dead ends increases fast, larger boards

Re: [Haskell-cafe] Real-time garbage collection for Haskell

2010-03-01 Thread Job Vranish
On Mon, Mar 1, 2010 at 2:37 PM, Thomas Schilling nomin...@googlemail.comwrote: On 1 March 2010 16:27, Job Vranish job.vran...@gmail.com wrote: My current area of work is on realtime embedded software programming for avionics systems. We do most of our coding in Ada but I've been dreaming of

[Haskell-cafe] references for compiler optimizations for functional languages

2010-03-01 Thread Michael Vanier
Hi everyone, I'm interested in collecting good references for compiler optimizations for functional languages (lazy, strict, statically-typed or not). Any suggestions? Thanks in advance, Mike ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] GHC's parallel garbage collector -- what am I doing wrong?

2010-03-01 Thread Michael Lesniak
Hello Bryan, The parallel GC currently doesn't behave well with concurrent programs that uses multiple capabilities (aka OS threads), and the behaviour you see is the known symptom of this.. I believe that Simon Marlow has some fixes in hand that may go into 6.12.2. Are you saying that you

Re: [Haskell-cafe] Performance of Knight's Tour

2010-03-01 Thread Daniel Fischer
Am Montag 01 März 2010 21:40:16 schrieb Artyom Kazak: Maybe we were compiling with different options? I compiled with -O2 -fvia-C -optc-O3. ... Oh, I know! I slightly changed the code. import Data.Ord e ((x, y), arr) p = [(t, arr // [(t, p)]) | t - changes] where legit

Re: [Haskell-cafe] references for compiler optimizations for functional languages

2010-03-01 Thread Don Stewart
mvanier42: Hi everyone, I'm interested in collecting good references for compiler optimizations for functional languages (lazy, strict, statically-typed or not). Any suggestions? There's lots for what GHC implements on SimonPJ's site:

Re: [Haskell-cafe] Real-time garbage collection for Haskell

2010-03-01 Thread Neil Davies
I don't know that hanging your hat on the deterministic coat hook is the right thing to do. The way that I've always looked at this is more probabilistic - you want the result to arrive within a certain time frame for a certain operation with a high probability. There is always the

Re: [Haskell-cafe] references for compiler optimizations for functional languages

2010-03-01 Thread Michael Vanier
Awesome! Thanks, Don! Mike Don Stewart wrote: mvanier42: Hi everyone, I'm interested in collecting good references for compiler optimizations for functional languages (lazy, strict, statically-typed or not). Any suggestions? There's lots for what GHC implements on SimonPJ's

Re: [Haskell-cafe] Real-time garbage collection for Haskell

2010-03-01 Thread Thomas Schilling
On 1 March 2010 21:34, Neil Davies semanticphilosop...@googlemail.com wrote: I don't know that hanging your hat on the deterministic coat hook is the right thing to do. The way that I've always looked at this is more probabilistic - you want the result to arrive within a certain time frame for

Re: [Haskell-cafe] Optimizing hash array mapped tries

2010-03-01 Thread Edward Z. Yang
Excerpts from Don Stewart's message of Wed Feb 24 16:13:18 -0500 2010: Almost all the vector library generators fill a vector destructively, before doing an unsafeFreeze. Alright. Is there a standard idiom for filling vectors pointing to vectors destructively, and then unsafely freezing all of

Re: [Haskell-cafe] Real-time garbage collection for Haskell

2010-03-01 Thread Jeremy Shaw
I am just going to jump on the RT dogpile and mention that I too have wanted RT friendly GC in Haskell. I have attempted on more than one occasion to implement real-time audio applications in Haskell. But I tend to get a lot of buffer underruns, most likely due to GC. For audio apps, there is a

Re: [Haskell-cafe] Linear programming in Haskell

2010-03-01 Thread Louis Wasserman
If you're using the LPM monad, then this is about as easy as that: you use do(x1:x2:x3:_) - newVariables .. I mean, run is equivalent to run f = execLPM (newVariables = put . f) so...yeah, I think this is a reasonable solution. Alternatively, I'm almost positive there's a monad

Re: [Haskell-cafe] Real-time garbage collection for Haskell

2010-03-01 Thread Simon Cranshaw
On Sun, Feb 28, 2010 at 6:06 PM, Pavel Perikov peri...@gmail.com wrote: Did you really seen 100ms pauses?! I never did extensive research on this but my numbers are rather in microseconds range (below 1ms). What causes such a long garbage collection? Lots of allocated and long-living objects?

Re: [Haskell-cafe] What are free Monads?

2010-03-01 Thread Dan Doel
On Monday 01 March 2010 12:50:21 pm Henning Thielemann wrote: On Sat, 27 Feb 2010, Dan Doel wrote: Free structures originate (I think) in algebra. There you'll find talk of free groups, free rings, free monoids, etc. How about turning this post into a HaskellWiki article in

Re: [Haskell-cafe] Real-time garbage collection for Haskell

2010-03-01 Thread John Van Enk
Simon, Would a more predictable GC or a faster GC be better in your case? (Of course, both would be nice.) /jve On Mon, Mar 1, 2010 at 9:33 PM, Simon Cranshaw simon.crans...@gmail.comwrote: On Sun, Feb 28, 2010 at 6:06 PM, Pavel Perikov peri...@gmail.com wrote: Did you really seen 100ms

Re: [Haskell-cafe] Real-time garbage collection for Haskell

2010-03-01 Thread Simon Cranshaw
John, I suspect speed is more important than timing. In practice I don't mind a pause for a gc when nothing is happening in the market. It's when the market is moving fast that we particularly want to keep our response time low. Busy times may continue for long periods though and I'm not sure

[Haskell-cafe] Has anybody translated Douglas Hofstadter's Scientific American articles introducting Scheme to a general audience into Haskell?

2010-03-01 Thread Benjamin L. Russell
There is an interesting, if somewhat dated, suggestion on Lambda the Ultimate (see http://lambda-the-ultimate.org/node/1748) that someone translate Doug Hofstadter's Scientific American columns introducing Scheme to a general audience into Haskell. (I came across this link while adding full