Re: [Haskell-cafe] Strings in Haskell

2007-01-22 Thread Bryan Donlan
Neil Mitchell wrote: > Hi Alexy, > >> Now I'm reading a >> Haskell book which states the same. Is there a more efficient Haskell >> string-handling method? Which functional language is the most >> suitable for text processing? > > There are the Data.ByteString things, which are great, and have m

Re: [Haskell-cafe] Strings in Haskell

2007-01-22 Thread Neil Mitchell
Hi Alexy, Now I'm reading a Haskell book which states the same. Is there a more efficient Haskell string-handling method? Which functional language is the most suitable for text processing? There are the Data.ByteString things, which are great, and have much less overhead. But remember that

Re: [Haskell-cafe] Strings in Haskell

2007-01-22 Thread Spencer Janssen
On Jan 22, 2007, at 7:18 PM, Alexy Khrabrov wrote: Greetings -- I'm looking at several FP languages for data mining, and was annoyed to learn that Erlang represents each character as 8 BYTES in a string which is just a list of characters. Now I'm reading a Haskell book which states the same. T

Re: [Haskell-cafe] Strings in Haskell

2007-01-22 Thread Stefan O'Rear
On Mon, Jan 22, 2007 at 05:18:19PM -0800, Alexy Khrabrov wrote: > Greetings -- I'm looking at several FP languages for data mining, and > was annoyed to learn that Erlang represents each character as 8 BYTES > in a string which is just a list of characters. Now I'm reading a > Haskell book which s

[Haskell-cafe] Strings in Haskell

2007-01-22 Thread Alexy Khrabrov
Greetings -- I'm looking at several FP languages for data mining, and was annoyed to learn that Erlang represents each character as 8 BYTES in a string which is just a list of characters. Now I'm reading a Haskell book which states the same. Is there a more efficient Haskell string-handling meth

Re: [Haskell-cafe] Re: IO in lists

2007-01-22 Thread Dan Piponi
Magnus Therning asked: but how do I go about creating a finite list, e.g. a list that ends as soon as 'q' is pressed? A slightly different approach that doesn't use anything unsafe: What you want is to return something like an IO [Char] but it needs to be able to interleave IO. A list of type

[Haskell-cafe] Re: GHC concurrency runtime "breaks" every 497 (and a bit) days

2007-01-22 Thread Benjamin Franksen
Neil Davies wrote: > In investigating ways of getting less jitter in the GHC concurrency > runtime I've found the following issue: > > The GHC concurrency model does all of its time calculations in "ticks" > - a tick being fixed at 1/50th of a second. It performs all of these > calculations in ter

[Haskell-cafe] Resolution of time for threadDelay / registerDelay

2007-01-22 Thread Neil Davies
The GHC concurrency run time currently forces all delays to be resolved to 1/50th of second - independent of any of the run time settings (e.g. -V flag) - with rounding to the next 1/50th of second. This means that, in practice, the "jitter" in the time that a thread wakes as compared with can be

[Haskell-cafe] GHC concurrency runtime "breaks" every 497 (and a bit) days

2007-01-22 Thread Neil Davies
In investigating ways of getting less jitter in the GHC concurrency runtime I've found the following issue: The GHC concurrency model does all of its time calculations in "ticks" - a tick being fixed at 1/50th of a second. It performs all of these calculations in terms the number of these ticks s

[Haskell-cafe] strange behavior in Text.Regex.Posix

2007-01-22 Thread John MacFarlane
Can anyone help me understand this odd behavior in Text.Regex.Posix (GHC 6.6)? Prelude Text.Regex.Posix Text.Regex> subRegex (mkRegex "\\^") "he\350llo" "@" "[EMAIL PROTECTED]" Why does /\^/ match \350 here? Generally Text.Regex.Posix seems to work fine with unicode characters. For example, \35

[Haskell-cafe] Type infer

2007-01-22 Thread Marco TĂșlio Gontijo e Silva
Hello, I'm trying to define a partition__ function that is like Data.Set.partition, but use State Monad: > import Data.Set > import Control.Monad.State > partition__ f = > do > snapshot <- get > let > (firsts, rest) = Set.partition f snapshot > put rest > return first

[Haskell-cafe] ANN: regex-* updates and regex-tdfa 0.20 first release

2007-01-22 Thread Chris Kuklewicz
Greetings. I have several bits of news about regex-* packages. First: I have fixed a small bug in one instance of RegexContext, defined in Text.Regex.Contex in the regex-base class (included in GHC). The new version of regex-base is 0.80 and is available at http://darcs.haskell.org/packages/re

[Haskell-cafe] Haskell -> Tk

2007-01-22 Thread Peter Padawitz
Does anybody know O'Haskell or Timber and its interface Tk.hs to Tcl/Tk (see here )? I have the following problem: Tk.hs contains a record (structure) /Canvas/ with selectors line

Re: [Haskell-cafe] Problems using Storable.poke* from separate OS thread.

2007-01-22 Thread Corey O'Connor
On 1/21/07, Lemmih <[EMAIL PROTECTED]> wrote: Do you have a smaller test case? I couldn't reproduce the error after I pulled out the MacOS stuff. No, I don't have a smaller test case yet. I'm trying to reproduce the same environment as the CoreAudio IO proc using a real-time scheduled pthrea

Re: [Haskell-cafe] Fractional sqrt

2007-01-22 Thread Yitzchak Gale
I wrote: I added a new page for the Numeric Quest library... http://www.haskell.org/haskellwiki/Numeric_Quest I also updated the references to Numeric Quest on the Mathematics and Physics page. http://www.haskell.org/haskellwiki/Libraries_and_tools/Mathematics Henning Thielemann wrote I wou

Re: [Haskell-cafe] Fractional sqrt

2007-01-22 Thread Ian Lynagh
On Mon, Jan 22, 2007 at 03:26:38PM +0200, Yitzchak Gale wrote: > > Can someone with access to darcs.haskell.org > please fix this library? darcs get currently does not > seem to work for it. > > http://darcs.haskell.org/numeric-quest/ I've fixed the permissions, although applying patches in the

Re: [Haskell-cafe] Fractional sqrt

2007-01-22 Thread Henning Thielemann
On Mon, 22 Jan 2007, Yitzchak Gale wrote: > Henning Thielemann wrote: > > > > there is already an implementation of continued > > > > fractions for approximation of roots and transcendent functions by Jan > > > > Skibinski: > > > > http://darcs.haskell.org/numeric-quest/Fraction.hs > > I wrote:

Re: [Haskell-cafe] Fractional sqrt

2007-01-22 Thread Yitzchak Gale
Henning Thielemann wrote: there is already an implementation of continued fractions for approximation of roots and transcendent functions by Jan Skibinski: http://darcs.haskell.org/numeric-quest/Fraction.hs I wrote: Wow, nice. Now - how was I supposed to have found that? http://www.haskell.