Re: [Haskell-cafe] Re: [ANN] bloomfilter 1.0 - Fast immutable and mutable Bloom filters

2008-05-31 Thread ajb
G'day all. Quoting Achim Schneider [EMAIL PROTECTED]: Please tell me that this isn't reversible. It isn't reversible. Cheers, Andrew Bromage ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Data.Tree.Zipper in the standard libraries

2008-05-31 Thread Krasimir Angelov
Hi again, I was silent for some time but in this time I created QuickCheck tests for Data.Tree.Zipper which achieve 100% coverage with HPC. I also created a ticket for it: Ticket #2324 http://hackage.haskell.org/trac/ghc/ticket/2324 The attached file is the current implementation and it

Re: [Haskell-cafe] [ANN] bloomfilter 1.0 - Fast immutable and mutable Bloom filters

2008-05-31 Thread David MacIver
On Fri, May 30, 2008 at 11:30 PM, Bryan O'Sullivan [EMAIL PROTECTED] wrote: I'm pleased to announce the availability of a fast Bloom filter library for Haskell. A Bloom filter is a probabilistic data structure that provides a fast set membership querying capability. It does not give false

[Haskell-cafe] Re: [Haskell] Programme terminates silently

2008-05-31 Thread Bertram Felgenhauer
(redirecting to haskell-cafe. the haskell mailing list is primarily for announcements) (sorry, Thomas, if you get this message twice) Thomas Bevan wrote: I've written the programme below. The lircLoop should never terminate. Unfortunately it does. Worse, no error messages are generated.

Re: [Haskell-cafe] Re: appending an element to a list

2008-05-31 Thread Tillmann Rendel
Abhay Parvate wrote: I think I would like to make another note: when we talk about the complexity of a function, we are talking about the time taken to completely evaluate the result. Otherwise any expression in haskell will be O(1), since it just creates a thunk. I don't like this notion of

[Haskell-cafe] Parsec, updateState, and failure

2008-05-31 Thread Dimitry Golubovsky
Hi, If a parser which updated user state fails, will such update be reverted? Suppose we have two parsers combined with | p = p1 | p2 p1 has the following: p1 = try $ do ... -- getting something from the input stream updateState (\st - ...) -- updated state based on what gotten from the

Re: [Haskell-cafe] is there some book about haskell and data struct and alg?

2008-05-31 Thread Robert Dockins
[snip] Without the equivalent Haskell source code, the code must be manually translated from Standard ML into Haskell. Does anybody know why the link is broken, when it may be fixed, and from where the Haskell source code can be currently obtained? Benjamin L. Russell If you are

[Haskell-cafe] Upd: Parsec, updateState, and failure

2008-05-31 Thread Dimitry Golubovsky
Hi, So far, I figured it out like this: updateState ... mbx - (p3 = return . Just) | (return Nothing) updateState ... case mbx of Just x - return x Nothing - pzero but this seems a bit clumsy - is there a more elegant solution? -- Forwarded message -- From: Dimitry

Re: [Haskell-cafe] [ANN] bloomfilter 1.0 - Fast immutable and mutable Bloom filters

2008-05-31 Thread Bryan O'Sullivan
David MacIver wrote: The Hashable stuff in there looks like it might be independently useful. Probably, yes. Any interest in splitting it out into an independent package or is it really intended to be something fairly specific to the Bloom filter implementation? I'll split them if there's

Re: [Haskell-cafe] Parsec, updateState, and failure

2008-05-31 Thread Jonathan Cast
On 31 May 2008, at 7:12 AM, Dimitry Golubovsky wrote: Hi, If a parser which updated user state fails, will such update be reverted? Suppose we have two parsers combined with | p = p1 | p2 p1 has the following: p1 = try $ do ... -- getting something from the input stream updateState

Re: [Haskell-cafe] [ANN] bloomfilter 1.0 - Fast immutable and mutable Bloom filters

2008-05-31 Thread David MacIver
On Sat, May 31, 2008 at 4:09 PM, Bryan O'Sullivan [EMAIL PROTECTED] wrote: David MacIver wrote: The Hashable stuff in there looks like it might be independently useful. Probably, yes. Any interest in splitting it out into an independent package or is it really intended to be something

[Haskell-cafe] Re: type-level integers using type families

2008-05-31 Thread Peter Gavin
Benedikt Huber wrote: data True data False type family Cond x y z type instance Cond True y z = y type instance Cond False y z = z I'm not sure if this is what you had in mind, but I also found that e.g. type instance Mod x y = Cond (y :: x) x (Mod (Sub x y) y) won't terminate, as

Re: [Haskell-cafe] [ANN] bloomfilter 1.0 - Fast immutable and mutable Bloom filters

2008-05-31 Thread Thomas Hartman
What kind of speed do you get on your laptop for Data.Set? How much faster is the bloom filter? thomas. 2008/5/30 Bryan O'Sullivan [EMAIL PROTECTED]: I'm pleased to announce the availability of a fast Bloom filter library for Haskell. A Bloom filter is a probabilistic data structure that

Re: [Haskell-cafe] Parsec, updateState, and failure

2008-05-31 Thread Andrew Coppin
Dimitry Golubovsky wrote: Hi, If a parser which updated user state fails, will such update be reverted? Without actually checking, I would strongly suspect that yes, if a parser fails, all its state modifications are thrown away. (This is usually what you would want...) Is there any

[Haskell-cafe] Re: Parsec, updateState, and failure

2008-05-31 Thread Achim Schneider
Dimitry Golubovsky [EMAIL PROTECTED] wrote: If a parser which updated user state fails, will such update be reverted? I have no idea, I gave up before investigating that far. You want to avoid state at any cost, even more so if the state would influence parsing: spaghetti and headaches lay

Re: [Haskell-cafe] Re: Parsec, updateState, and failure

2008-05-31 Thread Antoine Latter
On Sat, May 31, 2008 at 12:12 PM, Achim Schneider [EMAIL PROTECTED] wrote: Dimitry Golubovsky [EMAIL PROTECTED] wrote: If a parser which updated user state fails, will such update be reverted? I have no idea, I gave up before investigating that far. You want to avoid state at any cost,

[Haskell-cafe] Re: [ANN] bloomfilter 1.0 - Fast immutable and mutable Bloom filters

2008-05-31 Thread Aaron Denney
On 2008-05-30, Achim Schneider [EMAIL PROTECTED] wrote: Bryan O'Sullivan [EMAIL PROTECTED] wrote: A Bloom filter is a probabilistic data structure that provides a fast set membership querying capability. It does not give false negatives, but has a tunable false positive rate. (A false

[Haskell-cafe] hint / ghc api and reloading modules

2008-05-31 Thread Evan Laforge
I'm using hint, but since it's basically a thin wrapper around the GHC API, this is probably a GHC api question too. Maybe this should go to cvs-ghc? Let me know and I'll go subscribe over there. It's my impression from the documentation that I should be able to load a module interpreted, make

[Haskell-cafe] Re: [ANN] bloomfilter 1.0 - Fast immutable and mutable Bloom filters

2008-05-31 Thread Achim Schneider
Aaron Denney [EMAIL PROTECTED] wrote: On 2008-05-30, Achim Schneider [EMAIL PROTECTED] wrote: Bryan O'Sullivan [EMAIL PROTECTED] wrote: A Bloom filter is a probabilistic data structure that provides a fast set membership querying capability. It does not give false negatives, but has a

[Haskell-cafe] hmatrix

2008-05-31 Thread Anatoly Yakovenko
What is the most efficient way to update a position in a matrix or a vector? I came up with this: updateVector :: Vector Double - Int - Double - Vector Double updateVector vec pos val = vec `add` v2 where v2 = fromList $ (replicate (pos) 0.0) ++ ((val - (vec @ pos)):(replicate ((dim

Re: [Haskell-cafe] hmatrix

2008-05-31 Thread Thomas Hartman
what package do you install/import to get at Vector? 2008/5/31 Thomas Hartman [EMAIL PROTECTED]: what package do you install/import to get at Vector? 2008/5/31 Anatoly Yakovenko [EMAIL PROTECTED]: What is the most efficient way to update a position in a matrix or a vector? I came up with

Re: [Haskell-cafe] Re: [ANN] bloomfilter 1.0 - Fast immutable and mutable Bloom filters

2008-05-31 Thread Jim Snow
Achim Schneider wrote: Aaron Denney [EMAIL PROTECTED] wrote: On 2008-05-30, Achim Schneider [EMAIL PROTECTED] wrote: Bryan O'Sullivan [EMAIL PROTECTED] wrote: A Bloom filter is a probabilistic data structure that provides a fast set membership querying capability. It does not

[Haskell-cafe] Images and GUIs in Haskell

2008-05-31 Thread Ronald Guida
Two questions: 1. In a Haskell program, if all I want to do is output an image, like a graph or chart, what is the simplest library to use? N.B. Simpler := easier to get minimal functionality. I really don't want to wade through a bunch of boilerplate or climb a steep learning curve just to be

[Haskell-cafe] Re: type-level integers using type families

2008-05-31 Thread Peter Gavin
Replying to myself... I put a copy of the darcs repo at http://code.haskell.org/~pgavin/tfp, if anyone is interested. Pete Peter Gavin wrote: Has anyone else tried implementing type-level integers using type families? I tried using a couple of other type level arithmetic libraries

[Haskell-cafe] Re: Images and GUIs in Haskell

2008-05-31 Thread Achim Schneider
Ronald Guida [EMAIL PROTECTED] wrote: Two questions: 1. In a Haskell program, if all I want to do is output an image, like a graph or chart, what is the simplest library to use? N.B. Simpler := easier to get minimal functionality. I really don't want to wade through a bunch of

Re: [Haskell-cafe] Re: Images and GUIs in Haskell

2008-05-31 Thread Ronald Guida
I wrote: 1. In a Haskell program, if all I want to do is output an image, like a graph or chart, what is the simplest library to use? Achim Schneider wrote: http://hackage.haskell.org/packages/archive/pkg-list.html#cat:Graphics OK, Chart (the first package under Graphics) is obviously the

[Haskell-cafe] Re: Images and GUIs in Haskell

2008-05-31 Thread Achim Schneider
Ronald Guida [EMAIL PROTECTED] wrote: So I have a choice: OpenGL, HGL, SDL, ObjectIO(?), or even straight X11/Win32 :/ Let me ask both ways: 2a. Which of these (or perhaps something else) is the simplest/easiest to get started with? 2b. Could someone please point me to some advice to

Re: [Haskell-cafe] hint / ghc api and reloading modules

2008-05-31 Thread Daniel GorĂ­n
(Since this can be of interest to those using the ghc-api I'm cc-ing the ghc users' list.) Hi, Evan The odd behavior you spotted happens only with hint under ghc-6.8. It turns out the problem was in the session initialization. Since ghc-6.8 the newSession function no longer receives a

Re: [Haskell-cafe] hmatrix

2008-05-31 Thread Anatoly Yakovenko
http://perception.inf.um.es/~aruiz/darcs/hmatrix/doc/html/Data-Packed-Vector.html provided by hmatrix On Sat, May 31, 2008 at 3:20 PM, Thomas Hartman [EMAIL PROTECTED] wrote: what package do you install/import to get at Vector? 2008/5/31 Thomas Hartman [EMAIL PROTECTED]: what package do you

Re: [Haskell-cafe] type-level integers using type families

2008-05-31 Thread Bertram Felgenhauer
Peter Gavin wrote: Roberto Zunino wrote: Maybe he wants, given cond :: Cond x y z = x - y - z tt :: True true_exp :: a false_exp :: untypable that cond tt true_exp false_exp :: a That is the type of false_exp is lazily inferred, so that type errors do not make inference fail