Re: [Haskell-cafe] ANNOUNCE: text 0.8.0.0, fast Unicode text support

2010-09-01 Thread Ivan Lazar Miljenovic
On 1 September 2010 15:14, John Millikin jmilli...@gmail.com wrote: [aside] does anybody know how to get a list of what packages somebody's uploaded to Hackage? I think I've updated all mine for the new text version dependency, but I'm worried I forgot some. Unfortunately, no; I've often

Re: [Haskell-cafe] ANNOUNCE: text 0.8.0.0, fast Unicode text support

2010-09-01 Thread Tako Schotanus
On Wed, Sep 1, 2010 at 07:14, John Millikin jmilli...@gmail.com wrote: Don't forget, you can always improve the text library yourself. I love to receive patches, requests for improvement, and bug reports. Are there any areas in particular you'd like help with, for either library? I'm

Re: [Haskell-cafe] Statically tracking validity - suggestions?

2010-09-01 Thread Sebastian Fischer
does anybody know of anything on Hackage for testing whether two values are approximately equal? http://hackage.haskell.org/package/approximate-equality -- Underestimating the novelty of the future is a time-honored tradition. (D.G.) ___

Re: [Haskell-cafe] ANNOUNCE: text 0.8.0.0, fast Unicode text support

2010-09-01 Thread David Virebayre
2010/9/1 Tako Schotanus t...@codejive.org: As a Haskell noob I'm curious about this statement, is there something intrinsically wrong with String? String is just a linked list of Char which are unicode code points; which is probably not the optimal way to store text. For intensive use of text

[Haskell-cafe] Re: ANNOUNCE: text 0.8.0.0, fast Unicode text support

2010-09-01 Thread Kevin Jardine
Hi Tako, The issues involved with String, ByteString, Text and a few related libraries were discussed at great length recently in this thread: http://groups.google.com/group/haskell-cafe/browse_thread/thread/52a21cf61ffb21b0/ Basically, Chars are 32 bit integers and Strings are represented as a

[Haskell-cafe] Re: questions about Arrows

2010-09-01 Thread Maciej Piechotka
On Tue, 2010-08-31 at 20:39 -0700, Ben wrote: Hello -- Three related questions, going from most specific to most general : 1 ) Consider the stream processing arrow which computes a running sum, with two implementations : first using generic ArrowCircuits (rSum); second using Automaton

[Haskell-cafe] Three new implementations of multi-prompt delimited control

2010-09-01 Thread oleg
The monadic framework for delimited continuations described in the paper by Dybvig, Peyton Jones and Sabry (JFP 2007) has found many applications, for example, fair backtracking search, final zippers, direct-style web programming, direct-style code generation, and probabilistic programming. The

Re: [Haskell-cafe] :Trace has no history

2010-09-01 Thread Pepe Iborra
The debugger only instruments interpreted code, so evaluations occurring inside library code do not show up in :trace. This is not a terrible problem in practice, since usually seeing the evaluations occurring in your code is what you need to debug the problem. But since :trace is not showing you

[Haskell-cafe] Re: Projects that could use student contributions?

2010-09-01 Thread George Giorgidze
Brent Yorgey byorgey at seas.upenn.edu writes: Hi all, This fall I'll be teaching a half-credit introduction to Haskell to some undergrads. As a final project I am thinking of giving them the option of (instead of developing some program/project of their own) contributing to an

Re: [Haskell-cafe] Re: ANNOUNCE: text 0.8.0.0, fast Unicode text support

2010-09-01 Thread Tako Schotanus
Hi Kevin, thanks for the pointer, although I was aware of the thread and had followed it quite closely, it was quite interesting. But it never explained if and why String should be avoided, all I read is test and decide depending on the circumstances, which in itself is good advise, but I'd like

[Haskell-cafe] Re: Announce: Significant performance improvements for Data.Map

2010-09-01 Thread Johannes Waldmann
darcs get http://code.haskell.org/~dons/code/containers/ I was giving this a try, and this soon hosed ghc (6.12.3): * (starting from a pristine ghc, from a binary package) * cabal install for containers-0.4.0.0 (the above package) * then cabal install for some package that uses

[Haskell-cafe] Re: Fwd: Semantics of iteratees, enumerators, enumeratees?

2010-09-01 Thread Heinrich Apfelmus
Tilo Wiklund wrote: Daniel Fischer wrote: [...] Well, I just gave an example where one would want chunking for reasons other than performance. That iteratees don't provide the desired functionality is a different matter. [...] In the case of hashing, wouldn't it be more reasonable to consider

Re: [Haskell-cafe] ANNOUNCE: text 0.8.0.0, fast Unicode text support

2010-09-01 Thread Daniel Fischer
On Wednesday 01 September 2010 06:08:07, Bryan O'Sullivan wrote: New in this release: - Substantial performance improvements. - Bug fixes, and better quality assurance via automated QuickCheck and HPC tests and coverage. - An even nicer API than before. Good job. The text

Re: [Haskell-cafe] ANNOUNCE: text 0.8.0.0, fast Unicode text support

2010-09-01 Thread Bryan O'Sullivan
Hi, Daniel - Thanks for taking the new code for a test drive! The interesting part is the comparison between text and vanilla String I/O, the difference is smaller than I expected for text-0.8.0.0. Yes. Much of this is due to the new encoding stuff on Handles in GHC 6.12, which is slow. Its

Re: [Haskell-cafe] ANNOUNCE: text 0.8.0.0, fast Unicode text support

2010-09-01 Thread Bryan O'Sullivan
On Tue, Aug 31, 2010 at 10:14 PM, John Millikin jmilli...@gmail.com wrote: Is there a summary of the API changes available? I see a new module, but Precis is choking on Data.Text and Data.Text.Lazy, so I'm not sure what existing signatures have been modified. Ouch. I'll try to do a diff and

[Haskell-cafe] Re: ICFP Hotel Room

2010-09-01 Thread Michael D. Adams
I've found a roommate now. So I don't need any more replies. :-) On Sun, Aug 29, 2010 at 11:45 PM, Michael D. Adams mdmko...@gmail.com wrote: Hi all, I'm a graduate student (male) and am looking for a (male) roommate to split the cost of a hotel room at ICFP.  If anyone is interested in

Re: [Haskell-cafe] open and closed

2010-09-01 Thread Gábor Lehel
This is probably widely known already but I just realized you can sort-of have closed classes as it is: module SomeModule( SomeClass, someMethod ) where class SomeClassInternal a where someMethodInternal :: a - Integer instance SomeClassInternal Integer where someMethodInternal = id

Re: [Haskell-cafe] Re: questions about Arrows

2010-09-01 Thread Ben
Thanks for the prompt reply. Some questions / comments below : On Wed, Sep 1, 2010 at 12:33 AM, Maciej Piechotka uzytkown...@gmail.com wrote: rSum2 :: ArrowCircuit a = a Int Int rSum2 = proc x - do    rec out - delay 0 - out + x    returnA - out + x Wow, that was simple. I guess I never

Re: [Haskell-cafe] Re: questions about Arrows

2010-09-01 Thread Maciej Piechotka
On Wed, 2010-09-01 at 11:49 -0700, Ben wrote: Thanks for the prompt reply. Some questions / comments below : On Wed, Sep 1, 2010 at 12:33 AM, Maciej Piechotka uzytkown...@gmail.com wrote: rSum2 :: ArrowCircuit a = a Int Int rSum2 = proc x - do rec out - delay 0 - out + x

Re: [Haskell-cafe] ANNOUNCE: text 0.8.0.0, fast Unicode text support

2010-09-01 Thread Daniel Fischer
On Wednesday 01 September 2010 18:15:19, Bryan O'Sullivan wrote: Hi, Daniel - Thanks for taking the new code for a test drive! The interesting part is the comparison between text and vanilla String I/O, the difference is smaller than I expected for text-0.8.0.0. Yes. Much of this is due

[Haskell-cafe] Laziness bug in Data.List.intersperse (was: ANNOUNCE: text 0.8.0.0, fast Unicode text support)

2010-09-01 Thread Daniel Fischer
On Wednesday 01 September 2010 21:29:47, Daniel Fischer wrote: that's where you definitely get a space leak, because intersperse             :: a - [a] - [a] intersperse _   []      = [] intersperse _   [x]     = [x] intersperse sep (x:xs)  = x : sep : intersperse sep xs isn't lazy enough.

Re: [Haskell-cafe] On to applicative

2010-09-01 Thread Tillmann Rendel
michael rice wrote: Prelude Data.Either let m = Just 7 Prelude Data.Either :t m m :: Maybe Integer So to create a value of type (Maybe ...), you can use Just. Prelude Data.Either let l = 2:[] Prelude Data.Either :t l l :: [Integer] So to create a value of type [...], you can use (:) and

[Haskell-cafe] ArrowCircuit, delay and space leaks

2010-09-01 Thread Ben
Hello Arrow-theorists -- In a previous email Maciej Piechotka showed me how to construct a recursive function I wanted via ArrowCircuits. This computes the running sum of a stream of Ints. rSum :: ArrowCircuit a = a Int Int rSum = proc x - do rec let next = out + x out - delay 0 - next

[Haskell-cafe] Unnecessarily strict implementations

2010-09-01 Thread Jan Christiansen
Hi, there is a new ticket that Data.List.intersperse is not as non-strict as possible (http://hackage.haskell.org/trac/ghc/ticket/4282). I have observed some other functions which are unnecessarily strict and it might be advantageous to change their definitions as well. I think it is

Re: [Haskell-cafe] On to applicative

2010-09-01 Thread michael rice
Hi Tillman, Prelude Control.Monad Control.Monad.Instances Control.Applicative let f = \x - x:[] Prelude Control.Monad Control.Monad.Instances Control.Applicative :t f f :: a - [a] Prelude Control.Monad Control.Monad.Instances Control.Applicative let g = \x - Just x Prelude Control.Monad

Re: [Haskell-cafe] Statically tracking validity - suggestions?

2010-09-01 Thread John Meacham
On Mon, Aug 30, 2010 at 11:24:06PM -0700, strejon wrote: I'm aware of phantom types and the like, but I've been unable to work out how to use them (or another type system extension) to properly track validity on the type level. I'd want something like: validate :: Certificate Possibly_Valid

[Haskell-cafe] Re: ArrowCircuit, delay and space leaks

2010-09-01 Thread Ben
My apologies, my space leak was in my implementation of runAuto. Ignore me! b On Wed, Sep 1, 2010 at 3:01 PM, Ben midfi...@gmail.com wrote: Hello Arrow-theorists -- In a previous email Maciej Piechotka showed me how to construct a recursive function I wanted via ArrowCircuits.  This

Re: [Haskell-cafe] Unnecessarily strict implementations

2010-09-01 Thread Daniel Fischer
On Thursday 02 September 2010 00:05:03, Jan Christiansen wrote: Hi, there is a new ticket that Data.List.intersperse is not as non-strict as possible (http://hackage.haskell.org/trac/ghc/ticket/4282). It's not that it's not as non-strict as possible per se. (Sorry, had to :) It's that

Re: [Haskell-cafe] ANNOUNCE: text 0.8.0.0, fast Unicode text support

2010-09-01 Thread Brandon S Allbery KF8NH
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 09/01/2010 02:44 AM, Ivan Lazar Miljenovic wrote: On 1 September 2010 16:27, David Virebayre dav.vire+hask...@gmail.com wrote: Sometimes I'd love if I could program using String and the compiler would automatically convert that to Text, or

Re: [Haskell-cafe] HDBC-postgresql and safe/unsafe FFI calls

2010-09-01 Thread Jason Dagit
On Wed, Sep 1, 2010 at 7:40 PM, David Powell da...@drp.id.au wrote: Greetings, I'm having an issue with the HDBC-postgresql package that requires me to manually patch it before installation for most of my use cases. All the FFI calls in this package are marked unsafe.  Unfortunately, this

Re: [Haskell-cafe] HDBC-postgresql and safe/unsafe FFI calls

2010-09-01 Thread David Powell
Thanks Jason, I think I had read that - I quite enjoy Edward's posts. Re-reading, seems to confirm what I thought, most (all?) of the FFI calls in HDBC-postgresql should be changed to safe. -- David On Thu, Sep 2, 2010 at 2:47 PM, Jason Dagit da...@codersbase.com wrote: On Wed, Sep 1, 2010 at

Re: [Haskell-cafe] HDBC-postgresql and safe/unsafe FFI calls

2010-09-01 Thread Jason Dagit
On Wed, Sep 1, 2010 at 10:00 PM, David Powell da...@drp.id.au wrote: Thanks Jason, I think I had read that - I quite enjoy Edward's posts. Re-reading, seems to confirm what I thought, most (all?) of the FFI calls in HDBC-postgresql should be changed to safe. Yes I think so. Unless you know