Re: [Haskell-cafe] ghci session slows down over time.

2012-06-25 Thread Simon Hengel
Hi Jonathan, I'm seeing crazy amounts of slowdown in a ghci session after just a few executions of :r (reload). Using :set +r (revert top-level bindings) doesn't seem to help. What version of ghc are you using? Cheers, Simon ___ Haskell-Cafe

Re: [Haskell-cafe] About using type to do type alias.

2012-06-25 Thread Ivan Lazar Miljenovic
On 25 June 2012 12:50, Magicloud Magiclouds magicloud.magiclo...@gmail.com wrote: Hi,  There was another mail, but the subject might be confusing. So I write this one. The code is here: http://hpaste.org/70414  If I understand correct, generally, I could use 'type' to do alias to save the

[Haskell-cafe] ANNOUNCE : Leksah 0.12.1.3 (fix for GHCi locking up)

2012-06-25 Thread Hamish Mackenzie
This release fixes a problem where the GHCi integration would break when the first command set was from the debug scratch pane. Source is in Hackage and https://github.com/leksah Binary Installers Use ghc --version to work out which one you need. OS X

Re: [Haskell-cafe] Martin Odersky on What's wrong with Monads

2012-06-25 Thread Chris Dornan
On 24 June 2012 18:46, Alexander Solla alex.so...@gmail.com wrote: I sort of see where you're coming from. But I'm having a hard time seeing how this complaint would work with respect to Maybe and the other pure monads. In other words, I suspect the problem you're describing is particular

Re: [Haskell-cafe] Martin Odersky on What's wrong with Monads

2012-06-25 Thread Arlen Cuss
In standard ML you can start doing effect-based things inside a function without having to alter its type and they type of everything that uses it, and so on. This in turn causes a break-down in the type-system where weak type variables are introduced. We can see the pathological case for

Re: [Haskell-cafe] Request for optimizing help.

2012-06-25 Thread Johannes Waldmann
First, why do you think your code is non-optimal? you don't show your main program, so we don't know what you're measuring. Just by looking at some types (and not analysing the algorithm): 11 data FilterState a = FilterState { 14   , taps :: [a] -- current delay tap stored values the State

Re: [Haskell-cafe] Martin Odersky on What's wrong with Monads

2012-06-25 Thread Chris Dornan
On 24 June 2012 22:38, Tony Morris tonymor...@gmail.com wrote: ** Odersky is repeatedly wrong on this subject and specifically for the claim that you quote, the only response is simply not true. My point is this. 1. The monadic approach to effects reifies functions into those that are

Re: [Haskell-cafe] Martin Odersky on What's wrong with Monads

2012-06-25 Thread Anton Kholomiov
The class you're looking for is Applicative. The (*) operator handles application of effectful things to effectful things, whereas ($) handles the application of non-effectful things to effectful things. This situation is interesting because it highlights the fact that there is a distinction

[Haskell-cafe] ICFP Student Research Competition

2012-06-25 Thread Wouter Swierstra
= Student Research Competition Associated with the The 17th ACM SIGPLAN International Conference on Functional Programming (ICFP 2012) and

Re: [Haskell-cafe] About using type to do type alias.

2012-06-25 Thread Magicloud Magiclouds
Here is the code, I joined two modules in one paste. Both of them cannot pass compiling. http://hpaste.org/70418 On Mon, Jun 25, 2012 at 2:16 PM, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com wrote: On 25 June 2012 12:50, Magicloud Magiclouds magicloud.magiclo...@gmail.com wrote: Hi,  

Re: [Haskell-cafe] Unambiguous choice implementation

2012-06-25 Thread Heinrich Apfelmus
Bartosz Milewski wrote: I'm trying to understand Reactive Banana, but there isn't much documentation to go about. I haven't written any beginner documentation yet because the API is still in flux. The homepage http://www.haskell.org/haskellwiki/Reactive-banana and Stackoverflow

Re: [Haskell-cafe] About using type to do type alias.

2012-06-25 Thread Arlen Cuss
Magicloud, Try to reduce the particular problem you're having to the smallest possible example that reproduces the issue. None of us can compile your code, either, because we're missing many of the dependencies, and unfortunately the issue is no easier (for me) to track down with the full

Re: [Haskell-cafe] not enough fusion?

2012-06-25 Thread Dmitry Olshansky
s1 ~ sum $ map (sum . flip map [0..n] . gcd) [0..n] s2 ~ sum $ concatMap (flip map [0..n] . gcd) [0..n] There are some posts from Joachim Breitner investigated fusion for concatMap: http://www.haskell.org/pipermail/haskell-cafe/2011-December/thread.html#97227 2012/6/25 Johannes Waldmann

Re: [Haskell-cafe] About using type to do type alias.

2012-06-25 Thread Ivan Lazar Miljenovic
On 25 June 2012 19:04, Arlen Cuss a...@len.me wrote: Magicloud, Try to reduce the particular problem you're having to the smallest possible example that reproduces the issue. None of us can compile your code, either, because we're missing many of the dependencies, and unfortunately the

Re: [Haskell-cafe] About using type to do type alias.

2012-06-25 Thread Magicloud Magiclouds
Sorry, I forgot that. Magicloud.Map.mapM sure is a helper I use as lifted Data.Map.map. If I changed the type of the result of start, the Jobs module compiled. But still cannot compile with the other module (which uses start). And the error is on JobArgs. I post the function here, I am not sure

Re: [Haskell-cafe] not enough fusion?

2012-06-25 Thread Lorenzo Bolla
I wonder why this performs really badly, though (I would expect it to be the same as s2): s3 :: Int - Int s3 n = sum [gcd x y | x - [ 0 .. n-1 ], y - [ 0 .. n-1 ]] From the links posted by Dmitry, it might be that the code generated is made of 2 recursive calls: in fact, what I observe is a

Re: [Haskell-cafe] About using type to do type alias.

2012-06-25 Thread Magicloud Magiclouds
Interesting, seems like mapM did not effect the problem Let me try more with the first argument of mapM On Mon, Jun 25, 2012 at 5:04 PM, Arlen Cuss a...@len.me wrote: Magicloud, Try to reduce the particular problem you're having to the smallest possible example that reproduces the

Re: [Haskell-cafe] About using type to do type alias.

2012-06-25 Thread Magicloud Magiclouds
Even more weird, I installed container-0.5.0.0, and now it just compiled! I will dig more of that. Sorry to bother you guys. On Mon, Jun 25, 2012 at 5:53 PM, Magicloud Magiclouds magicloud.magiclo...@gmail.com wrote: Interesting, seems like mapM did not effect the problem Let me try more

Re: [Haskell-cafe] About using type to do type alias.

2012-06-25 Thread Arlen Cuss
Glad you worked it out! :) Usually isolating the part of concern in a mysterious error will help shed light on the source! Cheers, Arlen On Monday, 25 June 2012 at 8:00 PM, Magicloud Magiclouds wrote: Even more weird, I installed container-0.5.0.0, and now it just compiled! I will dig

Re: [Haskell-cafe] not enough fusion?

2012-06-25 Thread Dmitry Olshansky
In my test it works ~20% faster than s2 and ~20% slower than s1. Did you use -O2 flag? 2012/6/25 Lorenzo Bolla lbo...@gmail.com I wonder why this performs really badly, though (I would expect it to be the same as s2): s3 :: Int - Int s3 n = sum [gcd x y | x - [ 0 .. n-1 ], y - [ 0 .. n-1 ]]

Re: [Haskell-cafe] not enough fusion?

2012-06-25 Thread Lorenzo Bolla
You are right, probably I didn't because I cannot reproduce it now. Sorry for the noise. (Anyway, I am still surprised that list-comprehension gives a different result from do-notation in the list monad.) L. On Mon, Jun 25, 2012 at 11:55 AM, Dmitry Olshansky olshansk...@gmail.comwrote: In my

Re: [Haskell-cafe] not enough fusion?

2012-06-25 Thread Duncan Coutts
On 25 June 2012 02:04, Johannes Waldmann waldm...@imn.htwk-leipzig.de wrote: Dear all, while doing some benchmarking (*) I noticed that function  s1  is considerably faster than  s2 (but I wanted  s2  because it looks more natural) (for n = 1,  s1 takes 20 s, s2 takes 13 s; compiled by

Re: [Haskell-cafe] About using type to do type alias.

2012-06-25 Thread Ivan Lazar Miljenovic
On 25 June 2012 20:00, Magicloud Magiclouds magicloud.magiclo...@gmail.com wrote: Even more weird, I installed container-0.5.0.0, and now it just compiled! I will dig more of that. Sorry to bother you guys. Possibly your Magiclouds module was using a different version of containers or

Re: [Haskell-cafe] Martin Odersky on What's wrong with Monads

2012-06-25 Thread Alberto G. Corona
My pocket explanation: While e a function gives one only value of the codomain for each element of the domain set (and thus it can be evaluated a single time), a category is a generalization that accept many graphs that goes from each element of the domain to the codomain. For that matter getChar

Re: [Haskell-cafe] ghci session slows down over time.

2012-06-25 Thread Ketil Malde
Jonathan Geddes geddes.jonat...@gmail.com writes: Is this a known issue? More importantly, is there a known workaround? My experience is that ghci (typically run as an inferior Emacs process) often retains a lot of memory. Thus, I occasionally kill and restart it. (Not sure if that counts as a

Re: [Haskell-cafe] Origin of Delimited Continuation Operators

2012-06-25 Thread Stephen Tetley
You could try working back from the references in Dorai Sitaram's Handling Control 1993, which is an important paper in the Scheme community covering this area. http://www.cs.rice.edu/CS/PLT/Publications/Scheme/pldi93-s.ps.gz Shift for instance is referenced back to at least Davy and Filinski's

Re: [Haskell-cafe] Origin of Delimited Continuation Operators

2012-06-25 Thread Stephen Tetley
On 25 June 2012 18:02, Stephen Tetley stephen.tet...@gmail.com wrote: Shift for instance is referenced back to at least Davy and Filinski's Abstracting Control 1990. Typo - Olivier _Danvy_ not Davy ___ Haskell-Cafe mailing list

[Haskell-cafe] Galois is hiring!

2012-06-25 Thread Jason Dagit
We're looking for functional programmers, formal methods practitioners, and project leads, interested in either short term or permanent employment. For more information, see: http://corp.galois.com/careers Why Galois? At Galois, we believe in seeking out and solving important problems to

Re: [Haskell-cafe] ghci session slows down over time.

2012-06-25 Thread Jonathan Geddes
Thanks for the responses. I am using GHC 7.4.1 an Ubuntu. Shutting down and restarting ghci is my current workaround. I was hoping for something a bit less disruptive. :kickoffGC or something like that. --J Arthur On Mon, Jun 25, 2012 at 6:54 AM, Ketil Malde ke...@malde.org wrote: Jonathan

Re: [Haskell-cafe] Martin Odersky on What's wrong with Monads

2012-06-25 Thread Ernesto Rodriguez
Well, Monads are something optional at the end. Even the IO Monad is an optional pattern with unsafePerformIO, but we use it because one of the reasons we love Haskell is it's ability to differentiate pure and impure functions. But sadly this is one of the traits we love about Haskell but others

[Haskell-cafe] Munich Haskell Meeting

2012-06-25 Thread Heinrich Hördegen
Dear all, once again, we want to invite you to our monthly Munich Haskell Meeting at Thu, 28th of June, at 19h30. This time, the venue will be Max Emanuell Brauerei in Munich (http://www.max-emanuel-brauerei.de/). Be aware of that change! Thursday will also be the day of a local football

Re: [Haskell-cafe] Unambiguous choice implementation

2012-06-25 Thread Bartosz Milewski
Thanks, Heinrich. I looked at the examples and at the references you provided. I understand the semantic model, so I guess I'm mostly trying to understand the implementation. Conal's paper was mostly about refining data structures in order to provide better implementation. It's all beautiful up to

Re: [Haskell-cafe] Martin Odersky on What's wrong with Monads

2012-06-25 Thread MightyByte
Jonathan Geddes geddes.jonathan at gmail.com writes: Cafe, I was watching a panel on languages[0] recently and Martin Odersky (the creator of Scala) said something about Monads: What's wrong with Monads is that if you go into a Monad you have to change your whole syntax from scratch.

Re: [Haskell-cafe] Hackage 2 maintainership

2012-06-25 Thread Jeremy Shaw
On Wed, Jun 20, 2012 at 11:06 AM, Ben Gamari bgamari.f...@gmail.com wrote: This list is definitely a start. One of the issues that was also realized is the size of the server's memory footprint. Unfortunately acid-state's requirement that all data either be in memory or have no ACID