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

2011-03-21 Thread Johan Tibell
You use a lot of (linked lists). Are they all used to represent streams or are they actually manifest during runtime? If it's the latter switch to a better data structure, like Vector. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.hask

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

2011-03-21 Thread Jesper Louis Andersen
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"). Two questions immediately begs themselves: * Can we go parall

[Haskell-cafe] Help optimising a Haskell program

2011-03-21 Thread David MacIver
Hi, I have a Haskell program I'm trying to optimise, and could use some assistance. 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"). The code is here: https://github.com

Re: [Haskell-cafe] Anyone recommend a VPS?

2011-03-21 Thread Pasqualino "Titto" Assini
Thanks for the info, it sounds reassuring. One question: is machine performance stable? Do you ever see your virtual machines slowing significantly? My experience in running virtual machines locally is that it is easy to use too much memory and end up with the machine badly swapping for a while.

Re: [Haskell-cafe] Uncertainty analysis library?

2011-03-21 Thread Henning Thielemann
On Mon, 21 Mar 2011, Tom Nielsen wrote: sampler = do x <- gauss 0.0 1.0 y <- gauss 0.0 1.0 return $ (2*x, x+y) main = do xys <- take 10 `fmap` runSamplerIO sampler print $ runStat (both (before varF fst) (before varF snd)) $ xys => (3.9988971177326498,2.01121231

Re: [Haskell-cafe] Uncertainty analysis library?

2011-03-21 Thread Carter Schonwald
i'm now seeing that they've been moved to github, never mind! On Mon, Mar 21, 2011 at 6:01 PM, Carter Schonwald < carter.schonw...@gmail.com> wrote: > by the way, the link to the patch-tag repo for your intervals lib seems to > be dead / patch-tag gets confused, > is it that the link is outdated

Re: [Haskell-cafe] Uncertainty analysis library?

2011-03-21 Thread Carter Schonwald
by the way, the link to the patch-tag repo for your intervals lib seems to be dead / patch-tag gets confused, is it that the link is outdated or that there are problems on patch-tag? -Carter On Mon, Mar 21, 2011 at 4:57 PM, Edward Kmett wrote: > > On Mon, Mar 21, 2011 at 2:42 PM, Edward Amsden

Re: [Haskell-cafe] Uncertainty analysis library?

2011-03-21 Thread Tom Nielsen
> The danger here is, of course, the side-condition of independence, which can > make inhabitants of that type very difficult to reason about. e.g. x + x and > 2*x in that world are very different. Yes. I was surprised (maybe i shouldn't have been): sampler = do x <- gauss 0.0 1.0 y <- gauss

Re: [Haskell-cafe] Uncertainty analysis library?

2011-03-21 Thread Edward Kmett
On Mon, Mar 21, 2011 at 2:42 PM, Edward Amsden wrote: > > So I'm feeling a bit elated that I've sparked my first theoretical > discussion in cafe, though I don't have much to contribute. :\ > > However in the interests of the original question, I guess I should > clarify. > > What we do in our ph

Re: [Haskell-cafe] Subsets and supersets

2011-03-21 Thread Henning Thielemann
Andrew Coppin schrieb: > Haskell has ADTs. Most of the time, these work great. As I've written in > several other places (but possibly not here), OO languages tend to > "factor" the problem the other way. That is, if I want a binary tree, an > OO language makes me split the type and all of its ope

Re: [Haskell-cafe] Parsing Haskell in Parsec

2011-03-21 Thread Alex Rozenshteyn
Thank you, everyone, for the suggestions. On Mon, Mar 21, 2011 at 12:28 PM, Johannes Waldmann < waldm...@imn.htwk-leipzig.de> wrote: > Alex Rozenshteyn gmail.com> writes: > > > as part of a larger project of porting > > http://www.cs.jhu.edu/~scott/pl/book/dist/ from ocaml to Haskell. > > Nice

Re: [Haskell-cafe] ANN: Monad.Reader special Poetry and Fiction Edition

2011-03-21 Thread Henning Thielemann
Andrew Coppin schrieb: > On 16/03/2011 03:05 PM, Brent Yorgey wrote: > >> This kind of "knot-tying" approach is nice for static graphs. > > I think we should have a wiki page somewhere which explains what all the > various Haskell-related terms mean. Terms like "typing the knot" and > "finally ta

Re: [Haskell-cafe] Uncertainty analysis library?

2011-03-21 Thread Edward Amsden
>> PS if you're a scientist and your accuracy estimate is on the same >> order as your rounding error, your are doing pretty well :-) At least >> in my field... > > > True enough, but in the case of interval arithmetic I like to be able to > preserve the invariant that if I am working with interval

Re: [Haskell-cafe] Uncertainty analysis library?

2011-03-21 Thread Edward Kmett
On Sun, Mar 20, 2011 at 5:46 PM, Tom Nielsen wrote: > Interval arithmetic is of course not the same as uncertainty, although > computer scientists like to pretend that is the case. (and uncertainty > estimates do not have the be "rough".) > Very true. > In general the propagation of errors dep

Re: [Haskell-cafe] Installation of Haskell Platform on CentOS 5.5

2011-03-21 Thread Ketil Malde
frode k writes: > (Note: I also installed GCC 4.4 (as mentioned by Mr Peterson) before I > retried installing Cabal and the Haskell Platform , but I do not think that > affected the build / compile process at all, since GHC and not GCC is used > here. And GCC 4.4 is also installed next to 4.1 tha

Re: [Haskell-cafe] unregisterised plan9 port

2011-03-21 Thread David Leimbach
I'd also love to see GHC on Plan 9. I don't have a lot of time to contribute to such an effort really though I do wish you well! On Mon, Mar 21, 2011 at 1:20 AM, * wrote: > Hi there. > > I am trying to get an unregisterised build of ghc 7.0.2 working and am > having problems turning mangling of

Re: [Haskell-cafe] Parsing Haskell in Parsec

2011-03-21 Thread Johannes Waldmann
Alex Rozenshteyn gmail.com> writes: > as part of a larger project of porting > http://www.cs.jhu.edu/~scott/pl/book/dist/ from ocaml to Haskell. Nice idea. I was using a similar approach (interpreters for various semantic domains) in a course on semantics(+ compilation). I modelled it after t

Re: [Haskell-cafe] Mime / Mail library

2011-03-21 Thread John Lato
> From: Christopher Done > > 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 ? > > > > I think the solution to

[Haskell-cafe] unregisterised plan9 port

2011-03-21 Thread *
Hi there. I am trying to get an unregisterised build of ghc 7.0.2 working and am having problems turning mangling off. When I build the compiler with GhcUnregisterized = YES GhcWithNativeCodeGen = NO SplitObjs = NO BeConservative = YES The 'evil mangler' is still used. When I disable