Re: [Haskell-cafe] Looking for feedback on my attempt at a tree construction edsl

2011-03-22 Thread C K Kashyap
Hi, I've tried a non-monadic version based on the suggestions here - https://github.com/ckkashyap/LearningPrograms/blob/master/Haskell/edsl/TreeWithoutMonad.hs This implementation seems to lack the "indentation based" approach that the do syntax allows. Would I be right if I said that the non-mona

Re: [Haskell-cafe] Computing the multiplication table of a group using the GHC inliner ; )

2011-03-22 Thread Antoine Latter
2011/3/22 Daniel Schüssler : > Hello, > > turns out that you can define the group operation of the symmetric group on 3 > elements in this abstract way (via the isomorphism to the group of bijective > functions from a three-element type to itself): > >        s3mult g2 g1 = fromFun (toFun g2 . toFu

Re: [Haskell-cafe] Install GTK on Windows

2011-03-22 Thread Andy Stewart
Daniel Díaz writes: > I have installed successfully the gtk package on Windows. > > GTK version: 2.16 > gtk package version: 0.12.0 > Haskell Platform version: 2010.2.0.0 > > I have detailed my steps (very similar to Mark Shroyer steps) here: > > http://deltadiaz.blogspot.com/2011/03/on-windows-h

[Haskell-cafe] Computing the multiplication table of a group using the GHC inliner ; )

2011-03-22 Thread Daniel Schüssler
Hello, turns out that you can define the group operation of the symmetric group on 3 elements in this abstract way (via the isomorphism to the group of bijective functions from a three-element type to itself): s3mult g2 g1 = fromFun (toFun g2 . toFun g1) and convince GHC to compile it

[Haskell-cafe] Haskell and friends in Spanish

2011-03-22 Thread Manuel Hernandez
Dear Haskellers, I have tried to compile from my own work and from several sources a university-level course in functional and logic programming, and the result is a prospect of a book (*right now only in Spanish*), which I have entitled "Programación declarativa". Perhaps someone coul

[Haskell-cafe] Bamse package virus false positive

2011-03-22 Thread Isaac Potoczny-Jones
We have realized that a file in the Bamse distribution in Hackage is being flagged by some virus scanners as malicious, including Symantec and McAfee. We have worked with Microsoft, Symantec, and McAfee to analyze the data. All parties have concluded that this file is not malicious, but we wa

Re: [Haskell-cafe] Looking for feedback on my attempt at a tree construction edsl

2011-03-22 Thread Antoine Latter
On Tue, Mar 22, 2011 at 2:20 PM, Edward Kmett wrote: > If you add an instance of IsString to handle leaf construction you can get > it down to >     "Fruits" +> do >        "Apple" >        "Mango" >     "Arbitrary" +> do >        "1" >        "..." > But I also don't see the point of doing this i

Re: [Haskell-cafe] wrong backquote in haskell 2010 report Prelude

2011-03-22 Thread Neil Mitchell
Hi Albert, Thanks for spotting this, it definitely looks wrong. On the line above I also see the ^ characters have got corrupted. I've emailed it onwards to the current report editor (Malcolm Wallace) Thanks, Neil On Thu, Mar 17, 2011 at 4:57 PM, Albert Y. C. Lai wrote: > Haskell 2010 report ch

Re: [Haskell-cafe] Looking for feedback on my attempt at a tree construction edsl

2011-03-22 Thread Stephen Tetley
Andy Gill uses a monad in his Dot library to allow graphs to have references as they are built. It's a pattern I like a lot and has been very useful for my graphics kit Wumpus. That said, while it's a good technique for graphs, its use is more equivocal for trees where nesting is more prominent. I

Re: [Haskell-cafe] Uncertainty analysis library?

2011-03-22 Thread Edward Kmett
I moved all of my repositories over to github back around June: http://twitter.com/#!/kmett/status/16174477854 I should update that link. -Edward On Mon, Mar 21, 2011 at 6:02 PM, Carter Schonwald < carter.schonw...@gmail.com> wrote: > i'm now seeing that they've been moved to github, never min

Re: [Haskell-cafe] Looking for feedback on my attempt at a tree construction edsl

2011-03-22 Thread Edward Kmett
If you add an instance of IsString to handle leaf construction you can get it down to "Fruits" +> do "Apple" "Mango" "Arbitrary" +> do "1" "..." But I also don't see the point of doing this in a monad. -Edward On Tue, Mar 22, 2011 at 1:15 PM, Yves Parès wrot

Re: [Haskell-cafe] ANNOUNCE: incremental-parser library package

2011-03-22 Thread Evan Laforge
> I have to admit I really do not like having Applicative and MonadPlus with > different behavior. Yes, one is redundant, but that is more an artifact of > language evolution, than an intentional opportunity for diverging behavior. > Every library I am aware of to date, save of course this one, has

Re: [Haskell-cafe] [Haskell] ANNOUNCE: incremental-parser library package

2011-03-22 Thread Mario Blažević
2011/3/22 Philippa Cowderoy > This is what newtypes are for, no? > I did not think of that approach. I'm not sure how well it would work out, but it would solve another problem I have, which is the duplication of combinators many, some, and optional. Each of these could exist in two forms, the

Re: [Haskell-cafe] ANNOUNCE: incremental-parser library package

2011-03-22 Thread Edward Kmett
2011/3/22 Mario Blažević > > This seems very interesting. One question: >> >> > The MonadPlus and the Alternative instance differ: the former's mplus >> > combinator equals the asymmetric <<|> choice. >> >> Why? >> > > > Good question. Basically, I see MonadPlus as a union of Monad and > Alt

[Haskell-cafe] ANN: clash-0.1.3.0 (Functional Hardware Descriptions)

2011-03-22 Thread Christiaan Baaij
Hello, I am pleased to announce an incremental update to CLaSH, version 0.1.3.0. CLaSH can translate a (semantic) subset of Haskell to RTL-style VHDL. Instead of being an embedded DSL like Lava or ForSyDe, CLaSH takes are more 'traditional' approach to synthesis/compilation. It uses the GHC API

Re: [Haskell-cafe] ANNOUNCE: incremental-parser library package

2011-03-22 Thread Mario Blažević
> This seems very interesting. One question: > > > The MonadPlus and the Alternative instance differ: the former's mplus > > combinator equals the asymmetric <<|> choice. > > Why? > Good question. Basically, I see MonadPlus as a union of Monad and Alternative. The class should not exist at al

Re: [Haskell-cafe] Looking for feedback on my attempt at a tree construction edsl

2011-03-22 Thread Yves Parès
You could turn 'insertSubTree' into and operator, and shorten "insertLeaf" createTree = do "Fruits" +> do leaf "Apple" leaf "Mango "Arbitrary" +> do leaf "1" -- and so on... It's a little bit more concise. But I fail to see the use of

Re: [Haskell-cafe] Install GTK on Windows

2011-03-22 Thread Daniel Díaz
I have installed successfully the gtk package on Windows. GTK version: 2.16 gtk package version: 0.12.0 Haskell Platform version: 2010.2.0.0 I have detailed my steps (very similar to Mark Shroyer steps) here: http://deltadiaz.blogspot.com/2011/03/on-windows-how-to-install-gtk.html It seems tha

[Haskell-cafe] Looking for feedback on my attempt at a tree construction edsl

2011-03-22 Thread C K Kashyap
Hi, With my "edsl", one can describe a tree like this - import TreeEdsl import Data.Tree createTree :: TreeContext String () createTree = do insertSubTree "Fruits" $ do insertLeaf "Apple" insertLeaf "Mango" insertSubTree "Arbitrary" $ do insertSubTree "Numbers" $ do insertLeaf "1" insertLeaf "2"

[Haskell-cafe] Berlin Haskell Meeting

2011-03-22 Thread Sönke Hahn
Hi all! It's been some time since the last Berlin Haskell Meeting, but we're doing it again: Date: Wednesday, March 30th Time: from 20:00 Location: c-base, Rungestrasse 20, 10179 Berlin If you're in Berlin and interested in Haskell, save the date! Cheers, Sönke

Re: [Haskell-cafe] Help optimising a Haskell program

2011-03-22 Thread Jason Dagit
On Tue, Mar 22, 2011 at 1:11 AM, David MacIver wrote: > On 22 March 2011 02:00, Jesper Louis Andersen > wrote: > > On Tue, Mar 22, 2011 at 00:59, David MacIver > wrote: > > > >> It's for rank aggregation - taking a bunch of partial rankings of some > >> items from users and turning them into an

Re: [Haskell-cafe] Help optimising a Haskell program

2011-03-22 Thread Jesper Louis Andersen
On Tue, Mar 22, 2011 at 09:11, David MacIver wrote: > >  Productivity  85.0% of total user, 85.0% of total elapsed > That is somewhat ok. So much for hoping GC tuning would yield an improvement. -- J. ___ Haskell-Cafe mailing list Haskell-Cafe@haskel

Re: [Haskell-cafe] ANNOUNCE: incremental-parser library package

2011-03-22 Thread Gábor Lehel
On Tue, Mar 22, 2011 at 3:14 PM, Mario Blažević wrote: >     The first version of incremental-parser has been released on Hackage > [1]. It's yet another parser combinator > library, providing the usual set of Applicative and Monad combinators. Apart > from this, it has three twists that make it >

[Haskell-cafe] ANNOUNCE: incremental-parser library package

2011-03-22 Thread Mario Blažević
The first version of incremental-parser has been released on Hackage [1]. It's yet another parser combinator library, providing the usual set of Applicative and Monad combinators. Apart from this, it has three twists that make it unique. First, the parser is incremental. That means it can

Re: [Haskell-cafe] Loops and ray casting with GPipe?

2011-03-22 Thread Henning Thielemann
On Tue, 22 Mar 2011, Jarkko Vilhunen wrote: Greetings, With OpenGL shaders it is possible to write code utilizing loops with unknown number of iterations, I'm wondering if the same can be done with GPipe? Fractals would be one use case and implicit surfaces another. Fragment Floats had to be c

Re: [Haskell-cafe] Loops and ray casting with GPipe?

2011-03-22 Thread Joachim Breitner
Hi, Am Dienstag, den 22.03.2011, 11:07 +0200 schrieb Jarkko Vilhunen: > which compiles fine but seems to concentrate on eating stack space > while running :) „if it compiles, it works“. Nobody ever said what exactly it would work on. Greetings, Joachim -- Joachim "nomeata" Breitner mail: m..

Re: [Haskell-cafe] Mime / Mail library

2011-03-22 Thread Mario Blažević
On Sun, Mar 20, 2011 at 10:50 AM, Christopher Done wrote: > On 20 March 2011 15:05, Pieter Laeremans wrote: > >> Hi all, >> >> The MIME package that can be found on hackage, uses String as input. >> Would i be considered better if there would be a version based on Text, or >> ByteString ? >> > >

Re: [Haskell-cafe] Asynchronous Arrows need Type Specialization - Help!

2011-03-22 Thread Peter Gammie
David, On 21/03/2011, at 4:18 PM, David Barbour wrote: > I was giving Control.Arrow a try for a reactive programming system. > The arrows are agents that communicate by sending and returning > time-varying state. Different agents may live in different 'vats' > (event-driven threads) to roughly mo

[Haskell-cafe] Loops and ray casting with GPipe?

2011-03-22 Thread Jarkko Vilhunen
Greetings, With OpenGL shaders it is possible to write code utilizing loops with unknown number of iterations, I'm wondering if the same can be done with GPipe? Fractals would be one use case and implicit surfaces another. Fragment Floats had to be compared with IfB from Data.Boolean, so I tried s

Re: [Haskell-cafe] Help optimising a Haskell program

2011-03-22 Thread David MacIver
On 22 March 2011 02:00, Jesper Louis Andersen wrote: > On Tue, Mar 22, 2011 at 00:59, David MacIver wrote: > >> It's for rank aggregation - taking a bunch of partial rankings of some >> items from users and turning them into an overall ranking (aka "That >> thing that Hammer Principle does"). > >