[Haskell-cafe] Re: What do _you_ want to see in FGL?

2010-05-15 Thread Heinrich Apfelmus
Ivan Lazar Miljenovic wrote: Heinrich Apfelmus writes: I'd be happy with either one. :) In both cases, I want to specify a custom vertex type. Except an abstract type isn't a custom vertex type... I can either do that directly if the library permits, though I think the solution with

[Haskell-cafe] Help debugging code broken after upgrading debian to GHC 6.12: invalid argument

2010-05-15 Thread Brandon Simmons
On May 14, 2010, at 20:24 , Brandon Simmons wrote: The other baffling thing is this: if the debugging line 426 is uncommented, then even running: $ runghc Befunge.hs --quiet mycology.b98 ...will fail. But all we're doing is a call to `putStr`! Why would that trigger an error?! Maybe

Re: [Haskell-cafe] Help debugging code broken after upgrading debian to GHC 6.12: invalid argument

2010-05-15 Thread Daniel Fischer
On Saturday 15 May 2010 15:18:28, Brandon Simmons wrote: On May 14, 2010, at 20:24 , Brandon Simmons wrote: The other baffling thing is this: if the debugging line 426 is uncommented, then even running: $ runghc Befunge.hs --quiet mycology.b98 ...will fail. But all we're doing is a

[Haskell-cafe] Help debugging code broken after upgrading debian to GHC 6.12: invalid argument

2010-05-15 Thread Brandon Simmons
GHC 6.12's runtime handles input and output encoding, instead of simply truncating Chars; my guess is it's locale-related. And sure enough, I see several non-ASCII characters in mycology.b98 which are likely to do the wrong thing if the runtime doesn't know which character set to use.

[Haskell-cafe] [reactive] A pong and integrate

2010-05-15 Thread Limestraël
Hello, I know there is a special mailing list for reactive, but I got no answers when sending to it. Also, maybe my problem is not totally reactive-centered, it concerns integration of an object speed to obtain its position with FRP. As a newbie with reactive, I'm trying to make a simple example,

Re: [Haskell-cafe] [reactive] A pong and integrate

2010-05-15 Thread Bulat Ziganshin
Hello Limestraël, Saturday, May 15, 2010, 7:02:38 PM, you wrote: But when I set my beat to tick every 60 times per second, the position is well updated, but I clearly see that the display dramatically slows down after a few seconds of execution. Too heavy rate for integrate? it may be due

Re: [Haskell-cafe] [reactive] A pong and integrate

2010-05-15 Thread Limestraël
Okay, guess I'll have to bring out the chapter 25 of my Real World Haskell... 2010/5/15 Bulat Ziganshin bulat.zigans...@gmail.com Hello Limestraėl, Saturday, May 15, 2010, 7:02:38 PM, you wrote: But when I set my beat to tick every 60 times per second, the position is well updated, but

Re: [Haskell-cafe] [reactive] A pong and integrate

2010-05-15 Thread Limestraël
I'm definitely not good at profiling... But I have something: 4,971,190,736 bytes allocated in the heap 4,392,735,248 bytes copied during GC 13,998,328 bytes maximum residency (573 sample(s)) 3,281,000 bytes maximum slop 38 MB total memory in use (0 MB lost due to

Re: [Haskell-cafe] [reactive] A pong and integrate

2010-05-15 Thread Don Stewart
Make sure you're profiling with -prof -auto-all And any packages you're using may need -auto-all as well. limestrael: I'm definitely not good at profiling... But I have something:    4,971,190,736 bytes allocated in the heap    4,392,735,248 bytes copied during GC   13,998,328 bytes

[Haskell-cafe] Re: [Haskell] ANNOUNCE: Introducing Sifflet, visual functional programming language

2010-05-15 Thread Henning Thielemann
Gregory D. Weber schrieb: Introducing Sifflet -- version 0.1.5, first public release! Sifflet is a visual, functional programming language. Cool - when do we get something like Gem Cutter? :-) http://resources.businessobjects.com/labs/cal/gemcutter-techpaper.pdf

[Haskell-cafe] ANNOUNCE: hmumps, a MUMPS interpreter in Haskell

2010-05-15 Thread Antoine Latter
Hi folks, As an educational project a few years back I started working on an interpreter for the MUMPS language in Haskell. It's got a REPL and can call into functions defined in external files. It doesn't support a lot of the built-in-functions, nor does it have support for on-disk persistent

Re: [Haskell-cafe] Speed of Error handling with Continuations vs. Eithers

2010-05-15 Thread Max Cantor
Where is my bind statement doing a case analysis? Isn't it just propagating, in a sense, the case analysis that came from values coming into the monad via return or via throwError? Also, why wouldn't callCC work here? I'm not that familiar with the ContT monad so any more details would be

[Haskell-cafe] Re: What makes Haskell difficult as .NET?

2010-05-15 Thread John Creighton
IIRC .Net interfaces cannot be added outside assembly (I may be wrong). On the other hand Haskell does not have inheritance. Generally         Haskell: newtype/data specify data (and type) while classes provides basic abstract operations on it.         C#/Java/...: Classes specify data AND

[Haskell-cafe] What Object Oriented Paradigms Does Haskell Support?

2010-05-15 Thread John Creighton
In response to the discussion What makes Haskell difficult as .NET? http://groups.google.ca/group/haskell-cafe/browse_thread/thread/f61ee38f2082dcbe?hl=en# I thought I'd start a discussion on what object oriented features Haskell supports. A good reference is: Haskell's Overlooked Object System

Re: [Haskell-cafe] Speed of Error handling with Continuations vs. Eithers

2010-05-15 Thread Derek Elkins
On Sat, May 15, 2010 at 2:28 PM, Max Cantor mxcan...@gmail.com wrote: Where is my bind statement doing a case analysis? Isn't it just propagating, in a sense, the case analysis that came from values coming into the monad via return or via throwError? What you did was reimplement the Either

[Haskell-cafe] Re: GADTs and Scrap your Boilerplate

2010-05-15 Thread John Creighton
On May 15, 2:19 pm, Oscar Finnsson oscar.finns...@gmail.com wrote: Hi, I'm writing a XML (de)serializer using Text.XML.Light and Scrap your Boilerplate (a thttp://github.com/finnsson/Text.XML.Generic) and so far I got working code for normal ADTs but I'm stuck at deserializing GADTs. I

Re: [Haskell-cafe] [reactive] A pong and integrate

2010-05-15 Thread David Leimbach
On Sat, May 15, 2010 at 8:42 AM, Limestraël limestr...@gmail.com wrote: Okay, guess I'll have to bring out the chapter 25 of my Real World Haskell... I find it's often the most practical chapter that I hit a lot during writes and changes to my server process I have in Haskell in our control

[Haskell-cafe] Numerical Analysis

2010-05-15 Thread Pierre-Etienne Meunier
Hello Cafe, Being a complete beginner in the field of numerical analysis, but anyway needing it to solve real problems, I wrote a few functions recently to solve systems of polynomial equations using the projected polyhedron method by Maekawa and Patrikakalis. This requires solving systems of

Re: [Haskell-cafe] Numerical Analysis

2010-05-15 Thread Don Stewart
pierreetienne.meunier: Hello Cafe, Being a complete beginner in the field of numerical analysis, but anyway needing it to solve real problems, I wrote a few functions recently to solve systems of polynomial equations using the projected polyhedron method by Maekawa and Patrikakalis. This

Re: [Haskell-cafe] Numerical Analysis

2010-05-15 Thread Pierre-Etienne Meunier
Perhaps you can look at the new array packages of the last few years: * vector An efficient implementation of Int-indexed arrays (both mutable and immutable), with a powerful loop fusion optimization framework . http://hackage.haskell.org/package/vector *

Re: [Haskell-cafe] Numerical Analysis

2010-05-15 Thread Don Stewart
pierreetienne.meunier: Perhaps you can look at the new array packages of the last few years: * vector An efficient implementation of Int-indexed arrays (both mutable and immutable), with a powerful loop fusion optimization framework .

Re: [Haskell-cafe] Numerical Analysis

2010-05-15 Thread Pierre-Etienne Meunier
I've also just noticed a lack in the vector library : multidimensional arrays seem to require indirections like in caml, whereas in C or in Data.Ix, there is a way to avoid this. This is especially important for avoiding cache misses with many dimensions, as well as for providing a clean

Re: [Haskell-cafe] GADTs and Scrap your Boilerplate

2010-05-15 Thread Tom Hawkins
I got the GADT data DataBox where   DataBox :: (Show d, Eq d, Data d) = d - DataBox [snip] but I can't figure out how to implement gunfold for DataBox. The error message is Text/XML/Generic.hs:274:23:     Ambiguous type variable `b' in the constraints: I had a similar difficultly in

[Haskell-cafe] Monadic style with Streams (as in Data.Array.Parallel.Stream)

2010-05-15 Thread Mark Wassell
Hi, This possibly might go against the spirit of what Stream programming is about but I having difficulties converting an imperative algorithm [1] into Haskell and think it would be easier if I was able to write it in a monadic style with operations to read and write from and to the streams.

Re: [Haskell-cafe] Speed of Error handling with Continuations vs. Eithers

2010-05-15 Thread Antoine Latter
On Fri, May 14, 2010 at 4:25 PM, Derek Elkins derek.a.elk...@gmail.com wrote: You did it wrong.  All you did was Church encode the Either type. Your bind is still doing a case-analysis.  All you have to do is use ContT r (Either e).  The bind implementation for ContT is completely independent

Re: [Haskell-cafe] Speed of Error handling with Continuations vs. Eithers

2010-05-15 Thread Derek Elkins
On Sat, May 15, 2010 at 9:20 PM, Antoine Latter aslat...@gmail.com wrote: On Fri, May 14, 2010 at 4:25 PM, Derek Elkins derek.a.elk...@gmail.com wrote: You did it wrong.  All you did was Church encode the Either type. Your bind is still doing a case-analysis.  All you have to do is use ContT

Re: [Haskell-cafe] Numerical Analysis

2010-05-15 Thread Ivan Lazar Miljenovic
Pierre-Etienne Meunier pierreetienne.meun...@gmail.com writes: Indeed... Looks cool ! I suppose I'll have to rewrite a few things. Do you know why they aren't (yet ?) integrated into the hierarchicals? What do you mean by this? If you're asking why they're not the default, it's because they're

Re: [Haskell-cafe] Re: What do _you_ want to see in FGL?

2010-05-15 Thread Ivan Lazar Miljenovic
Heinrich Apfelmus apfel...@quantentunnel.de writes: Ivan Lazar Miljenovic wrote: Heinrich Apfelmus writes: I'd be happy with either one. :) In both cases, I want to specify a custom vertex type. Except an abstract type isn't a custom vertex type... I can either do that directly if the