Re: [Haskell-cafe] Unexpected behaviour with send and send-buffer setting

2013-09-04 Thread Bryan O'Sullivan
On Tue, Sep 3, 2013 at 3:56 PM, Simon Yarde wrote: > I'm new to Haskell and have reached an impasse in understanding the > behaviour of sockets. > Your question is actually not related to Haskell at all, but is a general "I don't understand socket programming" question. You're being misled by th

Re: [Haskell-cafe] sequence causing stack overflow on pretty small lists

2013-08-26 Thread Bryan O'Sullivan
On Mon, Aug 26, 2013 at 1:46 AM, Niklas Hambüchen wrote: > This is because sequence is implemented as > > sequence (m:ms) = do x <- m > xs <- sequence ms > return (x:xs) > > and uses stack space when used on some [IO a]. > This problem is

Re: [Haskell-cafe] Markdown extension for Haddock as a GSoC project

2013-04-27 Thread Bryan O'Sullivan
On Sat, Apr 27, 2013 at 1:47 PM, Ben wrote: > asciidoc has been mentioned a few times in comments, i think it's worth > looking at. > This is the problem I was afraid of: for every markup syntax under the sun, someone will come along to champion it. The choice of one or N syntaxes is ultimately

Re: [Haskell-cafe] Markdown extension for Haddock as a GSoC project

2013-04-27 Thread Bryan O'Sullivan
On Sat, Apr 27, 2013 at 2:23 AM, Alistair Bayley wrote: > How's about Creole? > http://wikicreole.org/ > > Found it via this: > > http://www.wilfred.me.uk/blog/2012/07/30/why-markdown-is-not-my-favourite-language/ > > If you go with Markdown, I vote for one of the Pandoc implementations, > probabl

Re: [Haskell-cafe] Stream fusion and span/break/group/init/tails

2013-04-24 Thread Bryan O'Sullivan
On Wed, Apr 24, 2013 at 10:47 AM, Duncan Coutts < duncan.cou...@googlemail.com> wrote: > I address it briefly in my thesis [1], Section 4.8.2. I think it's a > fundamental limitation of stream fusion. > See also concat, where the naive fusion-based implementation has quadratic performance: conca

Re: [Haskell-cafe] my Fasta is slow ;(

2012-12-28 Thread Bryan O'Sullivan
I've already submitted it, thanks. The Fortran program commits the same sin as the C++ one, of doing floating point arithmetic in the inner loop; that's why it's slow. On Dec 27, 2012, at 18:05, Branimir Maksimovic wrote: Thank you. Your entry is great. Faster than fortran entry! Dou you want

Re: [Haskell-cafe] my Fasta is slow ;(

2012-12-27 Thread Bryan O'Sullivan
On Tue, Dec 18, 2012 at 12:42 PM, Branimir Maksimovic wrote: > > Seems to me that culprit is in function random as I have tested rest of > code > and didn't found speed related problems. > The problem with your original program was that it was not pure enough. Because you stored your PRNG state

Re: [Haskell-cafe] my Fasta is slow ;(

2012-12-19 Thread Bryan O'Sullivan
I took your Haskell program as a base and have refactored it into a version that is about the same speed as your original C++ program. Will follow up with details when I have a little more time. On Tue, Dec 18, 2012 at 12:42 PM, Branimir Maksimovic wrote: > This time I have tried fasta benchmark

Re: [Haskell-cafe] Help optimize fannkuch program

2012-12-03 Thread Bryan O'Sullivan
On Mon, Dec 3, 2012 at 11:18 AM, Branimir Maksimovic wrote: > Thanks ! Should I contribute your version on shootout site? > Do whatever you like with it. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/hask

Re: [Haskell-cafe] Help optimize fannkuch program

2012-12-03 Thread Bryan O'Sullivan
On Sun, Dec 2, 2012 at 3:12 PM, Branimir Maksimovic wrote: > Well, playing with Haskell I have literally trasnlated my c++ program > > http://shootout.alioth.debian.org/u64q/program.php?test=fannkuchredux&lang=gpp&id=3 > and got decent performance but not that good in comparison > with c++ > On my

Re: [Haskell-cafe] Can a GC delay TCP connection formation?

2012-11-30 Thread Bryan O'Sullivan
On Tue, Nov 27, 2012 at 11:02 AM, Jeff Shaw wrote: > Once each minute, a thread of my program updates a global state, stored in > an IORef, and updated with atomicModifyIORef', based on query results via > HDBC-obdc. Incidentally, what kind of database are you talking to? Issues of FFI correctn

Re: [Haskell-cafe] Hackage Package Discoverability

2012-10-22 Thread Bryan O'Sullivan
On Tue, Oct 23, 2012 at 5:53 AM, Myles C. Maxfield wrote: > I am the author/maintainer of the 'punycode' hackage package. After 4 > months, I just found that punycode conversion already exists in the > Data.Encoding.BootString package inside the 'encoding' package. I'd like to > deprecate my pack

Re: [Haskell-cafe] Fast parsing of unboxed values without boxing them in the parser?

2012-10-22 Thread Bryan O'Sullivan
On Tue, Oct 23, 2012 at 3:26 AM, Eugene Kirpichov wrote: > I'm thinking that a CPS-style parser type could allow returning an > unboxed value as a result of the compiler inlining and fusing together > the parsing code and the code that consumes the parsed value. > > Are there any libraries that wo

Re: [Haskell-cafe] Call for discussion: OverloadedLists extension

2012-09-25 Thread Bryan O'Sullivan
On Mon, Sep 24, 2012 at 5:53 AM, George Giorgidze wrote: > Our second approach to OverloadedLists is to avoid the construction of > lists altogether. By typechecking and desugaring lists like > > [] ; [x,y,z] ; ['a' .. 'z'] ; > > as > > mempty ; singleton x `mappend` singleton y `mappend` singlet

[Haskell-cafe] Build regressions due to GHC 7.6

2012-08-29 Thread Bryan O'Sullivan
Since the release of the GHC 7.6 RC, I've been going through my packages and fixing up build problems so that people who upgrade to 7.6 will have a smooth ride. Sad to say, my experience of 7.6 is that it has felt like a particularly rough release for backwards incompatibility. I wanted to quantif

Re: [Haskell-cafe] Cabal install fails due to recent HUnit

2012-08-28 Thread Bryan O'Sullivan
On Mon, Aug 27, 2012 at 10:52 AM, Bryan O'Sullivan wrote: > The reason you're seeing build breakage is that the .cabal files of the > broken packages were edited in-place without communicating with any of the > package authors. > Not to flog a dead horse, but: J

Re: [Haskell-cafe] Cabal install fails due to recent HUnit

2012-08-27 Thread Bryan O'Sullivan
On Mon, Aug 27, 2012 at 11:39 AM, Erik Hesselink wrote: > > Yes, you are right. So the question is how long to support systems > with the old cabal 0.10. This is the one included with the previous > haskell platform (and thus lots of linux distro's), which is less than > a year old. But it's also

Re: [Haskell-cafe] Cabal install fails due to recent HUnit

2012-08-27 Thread Bryan O'Sullivan
On Mon, Aug 27, 2012 at 9:57 AM, Erik Hesselink wrote: > I'm seeing this again, on abstract-deque-0.1.6. Ross, can you fix it again? > Hang on a second. The reason you're seeing build breakage is that the .cabal files of the broken packages were edited in-place without communicating with any of

Re: [Haskell-cafe] Platform Versioning Policy: upper bounds are not our friends

2012-08-17 Thread Bryan O'Sullivan
On Fri, Aug 17, 2012 at 12:34 PM, MigMit wrote: > What if instead of upper (and lower) bounds we just specify our interface > requirements? We already have a simple versioning scheme for which, despite it being easy to grasp, we have amply demonstrated that we cannot make it work well, because

Re: [Haskell-cafe] Platform Versioning Policy: upper bounds are not our friends

2012-08-15 Thread Bryan O'Sullivan
On Wed, Aug 15, 2012 at 1:50 PM, David Thomas wrote: > Would it make sense to have a known-to-be-stable-though soft upper bound > added proactively, and a known-to-break-above hard bound added reactively, > so people can loosen gracefully as appropriate? > I don't think so. It adds complexity, but

Re: [Haskell-cafe] Platform Versioning Policy: upper bounds are not our friends

2012-08-15 Thread Bryan O'Sullivan
On Wed, Aug 15, 2012 at 1:02 PM, Brandon Allbery wrote: > > So we are certain that the rounds of failures that led to their being > *added* will never happen again? > Of course I am sure that problems will arise as a result of recommending that upper bounds be added reactively; didn't I say as mu

[Haskell-cafe] Platform Versioning Policy: upper bounds are not our friends

2012-08-15 Thread Bryan O'Sullivan
Hi, folks - I'm sure we are all familiar with the phrase "cabal dependency hell" at this point, as the number of projects on Hackage that are intended to hack around the problem slowly grows. I am currently undergoing a fresh visit to that unhappy realm, as I try to rebuild some of my packages to

Re: [Haskell-cafe] Haskell on Mac OS X Mountain Lion

2012-07-26 Thread Bryan O'Sullivan
On Thu, Jul 26, 2012 at 9:19 AM, wrote: > does the Haskell Platform (2012.2.0.0 I suppose) work on 10.8. > Yes. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] vector, alignment and SIMD through FFI

2012-07-06 Thread Bryan O'Sullivan
On Fri, Jul 6, 2012 at 1:43 PM, Thomas DuBuisson wrote: > The block of memory is sufficiently aligned for any of the basic > foreign types that fits into a memory block of the allocated size. > That's not the same thing as a guarantee of 16-byte alignment, note, as none of the standard foreign t

Re: [Haskell-cafe] Performance with do notation, mwc-random and unboxed vector

2012-06-15 Thread Bryan O'Sullivan
On Wed, Jun 13, 2012 at 12:56 AM, Roman Leshchinskiy wrote: > > It doesn't change the semantics of your program but it can make it > significantly slower (or faster, as in this case). The various state hack > related tickets on trac might give you an idea of what is happening here. > I filed a b

Re: [Haskell-cafe] attoparsec double precision, quickCheck and aeson

2012-06-11 Thread Bryan O'Sullivan
On Mon, Jun 11, 2012 at 10:57 AM, Bryan O'Sullivan wrote: > > In the case of the double-conversion library, this means that static > read-only arrays that it assumes to contain valid data are full of junk. > You can join in the fun over at > http://hackage.haskell.org/trac/ghc

Re: [Haskell-cafe] attoparsec double precision, quickCheck and aeson

2012-06-11 Thread Bryan O'Sullivan
On Mon, Jun 11, 2012 at 10:50 AM, Thomas Schilling wrote: > Bryan, do you remember what the issue is with C++ in this case? I > thought, adding a wrapper with extern "C" definitions should do the > trick for simpler libraries (as this one seems to be). Is the > interaction with the memory alloca

Re: [Haskell-cafe] attoparsec double precision, quickCheck and aeson

2012-06-10 Thread Bryan O'Sullivan
On Wed, Jun 6, 2012 at 6:20 AM, Doug McIlroy wrote: > Last I looked (admittedly quite a while ago), the state of > the art was strtod in http://www.netlib.org/fp/dtoa.c. > (Alas, dtoa.c achieves calculational perfection via a > murmuration of #ifdefs.) > That was indeed the state of the art for

Re: [Haskell-cafe] attoparsec double precision, quickCheck and aeson

2012-06-05 Thread Bryan O'Sullivan
On Tue, Jun 5, 2012 at 9:12 AM, Warren Harris wrote: > > which helps in many cases, but for some the parsing seems bi-stable, > alternating between two imprecise double values and causing the test to > fail. I was wondering if anyone could suggest a better work-around for this > problem, or explai

Re: [Haskell-cafe] Can Haskell outperform C++?

2012-05-23 Thread Bryan O'Sullivan
On Wed, May 23, 2012 at 10:52 PM, Richard O'Keefe wrote: > "Past century"? Insults, is it? > Do you fine gentlemen absolutely have to continue this endless, offtopic, unedifying back-and-forth in public? Please. ___ Haskell-Cafe mailing list Haskell-C

[Haskell-cafe] Heads up: importing the Cabal issue tracker to github next week

2012-05-16 Thread Bryan O'Sullivan
I am planning on doing this early next week, probably in two phases. As part of the import process, github will generate a *lot* of notification emails. I'm afraid there is nothing I can do to stem the tide, as github does not provide a mechanism to suppress these. If you have a github account, an

Re: [Haskell-cafe] Too much inlining on text package

2012-04-07 Thread Bryan O'Sullivan
On Sun, Mar 18, 2012 at 12:02 AM, Michael Snoyman wrote: > > OK, issue created: https://github.com/bos/text/issues/19 I fixed the too-much-inlining bugtonight. As a bonus, Text literals are now decoded straight from GHC

Re: [Haskell-cafe] getAddrInfo: does not exist

2012-02-22 Thread Bryan O'Sullivan
On Wed, Feb 22, 2012 at 11:14 AM, Brandon Allbery wrote: > > Note that FreeBSD handles IPv4 vs. IPv6 differently from Windows and > Linux, and is probably not well tested with the GHC libraries. It is not > impossible that there is a lingering bug. > Yeah. I got a bug report from someone about s

Re: [Haskell-cafe] Preventing leaked open file descriptors when catching exceptions

2012-02-21 Thread Bryan O'Sullivan
On Tue, Feb 21, 2012 at 8:16 AM, Ryan Newton wrote: > FYI, lsof confirms that there are indeed many many open connections to the > same FIFO: > Like all of the lowest-level I/O functions, openFD just gives you back an integer, and the Fd type has no notion that there's an underlying system resou

Re: [Haskell-cafe] STM atomic blocks in IO functions

2012-01-13 Thread Bryan O'Sullivan
On Fri, Jan 13, 2012 at 10:04 AM, Rob Stewart wrote: > > The question is a simple one. Must all operations on a TVar happen > within *the same* atomically block, or am I am I guaranteed thread > safety if, say, I have a number of atomically blocks in an IO > function. > If you want successive ope

Re: [Haskell-cafe] Package for QuickCheck instances

2012-01-06 Thread Bryan O'Sullivan
On Fri, Jan 6, 2012 at 8:43 AM, Antoine Latter wrote: > > I was writing some tests that involved a large number of quickcheck > properties which don't ship with the library itself, so I thought I > would package them all together and put the orphan instances on > Hackage. > That's a great idea.

Re: [Haskell-cafe] [Alternative] some/many narrative

2011-12-15 Thread Bryan O'Sullivan
On Wed, Dec 14, 2011 at 10:29 PM, Chris Wong < chrisyco+haskell-c...@gmail.com> wrote: >-- [Warning]: This is only defined for actions that eventually fail >-- after being performed repeatedly, such as parsing. For pure values > such >-- as 'Maybe', this will cause an infinite loop. >

Re: [Haskell-cafe] Splitting off many/some from Alternative

2011-12-14 Thread Bryan O'Sullivan
On Tue, Dec 13, 2011 at 10:23 PM, Gregory Crosswhite wrote: > This way users of the classes will know whether their type has > well-defined instance for some and many or not. > But that's *precisely* what the Alternative class is already for! If you are writing an Alternative instance *at all*,

Re: [Haskell-cafe] Splitting off many/some from Alternative

2011-12-12 Thread Bryan O'Sullivan
On Mon, Dec 12, 2011 at 9:42 AM, Carl Howells wrote: > > Well, as I read it, the whole point of this thread was "They don't > make sense for many instances of Alternative. They should be moved to > a different class." It sounded like you were arguing that any > instance of Alternative where the

Re: [Haskell-cafe] Splitting off many/some from Alternative

2011-12-12 Thread Bryan O'Sullivan
On Mon, Dec 12, 2011 at 9:23 AM, Carl Howells wrote: > > There is absolutely no implication of consuming anything in the > definitions > > of many or some. This is how they happen to behave when used in the > context > > of some parsing libraries, but that's all. If many or some always go > into

Re: [Haskell-cafe] Splitting off many/some from Alternative

2011-12-12 Thread Bryan O'Sullivan
On Sun, Dec 11, 2011 at 9:18 PM, Gregory Crosswhite wrote: > > It is only recently that I have been able to grok what some and many are > even about (I think), and they seem to only make sense in cases where > executing the Alternative action results in a portion of some input being > consumed or

Re: [Haskell-cafe] Recommended class instances for container type

2011-12-08 Thread Bryan O'Sullivan
On Thu, Dec 8, 2011 at 8:12 AM, Christoph Breitkopf < chbreitk...@googlemail.com> wrote: > > I'm in the process of implementing a container data type, and wonder what > class instances are generally considered necessary. E.g. is it ok to start > out with a Show that's adequate for debugging, or is

Re: [Haskell-cafe] Drawing charts over a lot of data

2011-11-21 Thread Bryan O'Sullivan
On Mon, Nov 21, 2011 at 3:47 PM, Conrad Parker wrote: > > zoom-cache is useful for managing time-series data. There is a > zoom-cache-gnuplot in development, and it would probably be useful to > make a tool that uses Chart. I'm happy to help with that :) > Be aware that Chart is pretty slow on l

Re: [Haskell-cafe] Efficient mutable arrays in STM

2011-10-25 Thread Bryan O'Sullivan
On Tue, Oct 25, 2011 at 1:24 PM, Ketil Malde wrote: > You must be a lot more confident than I if you say this without > benchmarking first. :-) IME, there are (at least) two possible problems > here, 1) transactions scale (quadratically, I think) with the number of > TVars touched, so if any tran

Re: [Haskell-cafe] why is Random in System?

2011-08-17 Thread Bryan O'Sullivan
On Wed, Aug 17, 2011 at 12:27 PM, Ryan Newton wrote: > The more fundamental problem is that splitting is neither well understood >> nor generally safe, and as such it should not be in the basic Random class. >> > > Would you mind elaborating? > Certainly. The purpose of splitting a PRNG is to cr

Re: [Haskell-cafe] why is Random in System?

2011-08-17 Thread Bryan O'Sullivan
On Wed, Aug 17, 2011 at 11:10 AM, Ryan Newton wrote: > The problem with Mersenne twister is that it doesn't split well. The main > reason for crypto prng in this package would not be to advertise to people > that "System.Random can be used for security-related apps" *but to make > splitting reas

Re: [Haskell-cafe] why is Random in System?

2011-08-17 Thread Bryan O'Sullivan
On Wed, Aug 17, 2011 at 8:56 AM, Ryan Newton wrote: > > I'm the maintainer of random. If people could decide on what the > alternative name would be we could put it through the library proposal > process. It seems that one problem at this moment is the lack of a single, > clear "right" answer.

Re: [Haskell-cafe] Analyzing slow performance of a Haskell program

2011-08-09 Thread Bryan O'Sullivan
On Tue, Aug 9, 2011 at 9:47 AM, Chris Yuen wrote: > > - I was using GHC 32-bit. Int is 32-bit there, so I needed Int64. It turns > out 64-bit operations in 32-bit programs are just darn slow. Maybe it's a > Windows problem. No, GHC calls out to C for 64-bit integer ops on all 32-bit platforms.

Re: [Haskell-cafe] Analyzing slow performance of a Haskell program

2011-08-08 Thread Bryan O'Sullivan
On Mon, Aug 8, 2011 at 9:24 AM, Chris Yuen wrote: > > For reference I have asked the same question on StackOverflow. One person > suggested that the reason might be that Int64 on Windows is broken ( > http://stackoverflow.com/questions/6970904/analyzing-slow-performance-of-a-haskell-program/69764

Re: [Haskell-cafe] trouble using the aeson package

2011-08-06 Thread Bryan O'Sullivan
On Sat, Aug 6, 2011 at 8:55 PM, anonymous wrote: > However when I try to use it I receive this error message: > Funny, I just spent some time documenting this earlier today. There are two bugs in GHCi that cause the problem you're seeing. They're documented here, with a workaround: https://gith

Re: [Haskell-cafe] ANN: cabal-dev 0.8

2011-07-18 Thread Bryan O'Sullivan
On Mon, Jul 18, 2011 at 1:10 PM, Rogan Creswick wrote: > We're happy to announce the release of cabal-dev 0.8! This version is > available on hackage now, and contains many bug fixes and improvements, > as outlined in the full release notes below. > Wonderful! This is absolutely one of those ind

Re: [Haskell-cafe] External system connections

2011-07-11 Thread Bryan O'Sullivan
On Mon, Jul 11, 2011 at 10:49 AM, Michael Snoyman wrote: > I did email Bryan about this a bit ago, but he didn't get back [...] > Thanks for jogging my memory. I've released an updated version of resource-pool that drops the dependency on that package. http://hackage.haskell.org/package/resource

[Haskell-cafe] Jenkins/Hudson support for GHC warnings?

2011-07-07 Thread Bryan O'Sullivan
Hi, folks - I know there are quite a few Haskell projects using the Jenkins (formerly Hudson) continuous build system, and I wonder if anyone has figured out how to get it reliably collecting errors and warnings from GHC. The standard warnings plugin

Re: [Haskell-cafe] Searching of several substrings (with Data.Text ?)

2011-07-05 Thread Bryan O'Sullivan
On Tue, Jul 5, 2011 at 11:01 AM, Tillmann Vogt wrote: > I looked at Data.Text http://hackage.haskell.org/** > packages/archive/text/0.5/doc/**html/Data-Text.html > and http://hackage.haskell.org/**packages/archive/strin

Re: [Haskell-cafe] [ANN] mysql-simple - your go-to package for talking to MySQL

2011-06-21 Thread Bryan O'Sullivan
On Tue, Jun 21, 2011 at 7:47 AM, David Virebayre wrote: > The problem isn't with the stored procedure, it works if I call it > from the mysql client. > Right - as I mentioned in my previous note, the problem is that stored procedures and multi-statement queries can both return multiple result se

Re: [Haskell-cafe] [ANN] mysql-simple - your go-to package for talking to MySQL

2011-06-21 Thread Bryan O'Sullivan
On Tue, Jun 21, 2011 at 4:45 AM, David Virebayre wrote: > > I had trouble accessing the documentation : the last versions on > hackage have a build failure, so the doc isn't available. I don't understand why that build failure occurs. You can always build documentation for a package locally usi

Re: [Haskell-cafe] Attoparsec concatenating combinator

2011-06-07 Thread Bryan O'Sullivan
On Tue, Jun 7, 2011 at 1:40 AM, Simon Meier wrote: > Why would you need 'unsafePerformIO'. You can scrutinise the 'PS' > constructors of the slice without dropping down to IO. True. Oops :-) > Using a Builder for concatentation makes sense, if you want to exploit > that copying a slice of the

Re: [Haskell-cafe] Attoparsec concatenating combinator

2011-06-06 Thread Bryan O'Sullivan
On Sun, Jun 5, 2011 at 11:00 AM, Yitzchak Gale wrote: > If behind the scenes the concat is copying directly from slices of the > original > input, then no, in principle we're not saving much then. > I thought there were *two* copies going on. > If you're using the specialised functions like atto

Re: [Haskell-cafe] Attoparsec concatenating combinator

2011-06-03 Thread Bryan O'Sullivan
On Fri, Jun 3, 2011 at 2:52 AM, Yitzchak Gale wrote: > I was thinking of even lower level: allocating a moderate chunk of > memory and writing the results directly into it consecutively as a > special case. > Surely that would save only one copy compared to creating a list of results and then co

Re: [Haskell-cafe] Attoparsec concatenating combinator

2011-06-02 Thread Bryan O'Sullivan
On Thu, Jun 2, 2011 at 7:02 AM, Yitzchak Gale wrote: > It seems the best I can do is to collect them all in a list and then > apply concat. But that still copies the text several times. > Right. I'd like a no-copy combinator for the same reasons, but I think it's impossible to do without some lo

Re: [Haskell-cafe] Policy for taking over a package on Hackage

2011-05-25 Thread Bryan O'Sullivan
On Wed, May 25, 2011 at 5:59 AM, Ivan Lazar Miljenovic < ivan.miljeno...@gmail.com> wrote: > Well, using the Char8 version. > Just because you *could* do that, it doesn't mean that you *should*. It's a bad idea to use bytestrings for manipulating text, yet the only plausible reason to have wl-ppr

Re: [Haskell-cafe] Policy for taking over a package on Hackage

2011-05-25 Thread Bryan O'Sullivan
On Wed, May 25, 2011 at 5:01 AM, Ivan Lazar Miljenovic < ivan.miljeno...@gmail.com> wrote: > With my wl-pprint-text package, Jason Dagit suggested to me on > #haskell that it would make sense to make such a pretty-printer be > class-based so that the same API could be used for String, ByteString,

Re: [Haskell-cafe] Hash table constructors return table in IO Monad. Why?

2011-05-12 Thread Bryan O'Sullivan
On Thu, May 12, 2011 at 12:59 PM, michael rice wrote: > > HashTable doesn't do it. Neither does Map. Was I dreaming? > multiInsert k v m = insertWith' (++) k [v] m ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/li

Re: [Haskell-cafe] Hash table constructors return table in IO Monad. Why?

2011-05-12 Thread Bryan O'Sullivan
On Thu, May 12, 2011 at 9:22 AM, Stephen Tetley wrote: > The hashtable needs to be been created in IO, after that, think of the > 'hashtable' as a analogous to a file handle. You have to pass it > around to do anything with it - but the only things you can do with it > are in IO. > The appropriat

Re: [Haskell-cafe] Using cmake with haskell

2011-05-11 Thread Bryan O'Sullivan
On Wed, May 11, 2011 at 12:54 PM, Robert Clausecker wrote: >Is it possible to use cmake for Haskell projects? > Yes, but you shouldn't. Just use the cabal build system instead. It solves the same kinds of problems, but requires far less effort than dealing with CMake. >I heard a

Re: [Haskell-cafe] Please add instance Semigroup Text

2011-05-03 Thread Bryan O'Sullivan
On Tue, May 3, 2011 at 1:14 PM, Yitzchak Gale wrote: > You are quite right. These should really be defined in their > respective packages. I don't think it's too onerous for them > to add a dependency on semigroups, even before you > reverse the few lightweight dependencies that semigroups has.

Re: [Haskell-cafe] Please add instance Semigroup Text

2011-05-03 Thread Bryan O'Sullivan
On Tue, May 3, 2011 at 8:00 AM, Yitzchak Gale wrote: > > Could you please add a Semigroup instance for Text? > I'd strongly recommend writing an instance for the text package's Builder type instead. Vastly more efficient for non-trivial jobs. > Once you're doing that, I suppose you'd also want

[Haskell-cafe] [ANN] mysql-simple - your go-to package for talking to MySQL

2011-05-01 Thread Bryan O'Sullivan
Hi, folks - Over the past few days, I've released two MySQL-related packages on Hackage that I think should be pretty useful. The first is mysql-simple: http://hackage.haskell.org/package/mysql-simple This is a mid-level binding to the MySQL client API. I aimed it squarely at being both fast and

Re: [Haskell-cafe] How to update the RNG per call (State monad) when generating QuickCheck arbitraries?

2011-04-26 Thread Bryan O'Sullivan
On Tue, Apr 26, 2011 at 9:16 AM, Daniel Kahlenberg wrote: > > hold on I'd like to have the genArray call generating distinctive > results in one IO execution The problem you're seeing is due to the fact that you're not taking the final RNG state from the first execution of your code and passing

Re: [Haskell-cafe] How to update the RNG per call (State monad) when generating QuickCheck arbitraries?

2011-04-26 Thread Bryan O'Sullivan
On Tue, Apr 26, 2011 at 3:04 AM, Daniel Kahlenberg < d.kahlenb...@googlemail.com> wrote: > Thought getRandom function would be the best place to inject my unGen > function > call, but cannot get it to type-check: > You haven't described what it is you're actually trying to do, and I'm afraid your

Re: [Haskell-cafe] Is Hugs dead?

2011-04-22 Thread Bryan O'Sullivan
On Fri, Apr 22, 2011 at 5:16 AM, Robert Clausecker wrote: > > Now my question is: Is Hugs dead? What's the status of development of > hugs? > It's been unmaintained for years now. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskel

Re: [Haskell-cafe] NOT Iteratee, ghc 6.12/7.0 strange behaviour -epollControl: permission denied (Operation not permitted)

2011-03-31 Thread Bryan O'Sullivan
On Thu, Mar 31, 2011 at 11:19 AM, Michael A Baikov wrote: > import System.Posix.IO > import GHC.Conc > > main = do >fd <- openFd "/etc/passwd" ReadOnly Nothing defaultFileFlags >threadWaitRead fd-- the big bang happens right here. >closeFd fd > There were a couple of bugs in

Re: [Haskell-cafe] ANN: unordered-containers - a new, faster hashing-based containers library

2011-02-22 Thread Bryan O'Sullivan
On Sat, Feb 19, 2011 at 11:58 AM, Louis Wasserman wrote: > > size takes O(n). That's just depressing. Really. > That's rather thoughtless wording for some code that's (a) free (b) faster than anything else currently available (c) in its very first release and (d) available in source form for y

Re: [Haskell-cafe] Faster timeout but is it correct?

2011-02-17 Thread Bryan O'Sullivan
On Thu, Feb 17, 2011 at 11:53 AM, Bas van Dijk wrote: > Then we can use the TimeoutKey as our Unique (Note that a TimeoutKey > is actually a newtype for a Unique): > That should be fine. It's not a public API, so changing it like that shouldn't be an issue. __

Re: [Haskell-cafe] [web-devel] http-enumerator: redirects, streaming and keep-alive

2011-02-07 Thread Bryan O'Sullivan
On Wed, Feb 2, 2011 at 1:01 PM, Felipe Almeida Lessa wrote: > > And what about connection limits? We shouldn't create a thousand > connections to the same host =). For what it's worth, I wrote a connection pool manager for the riak package that has to solve some of the same problems. https://

Re: [Haskell-cafe] Using IsString with attoparsec

2011-01-26 Thread Bryan O'Sullivan
On Tue, Jan 25, 2011 at 5:16 AM, Yitzchak Gale wrote: > I suggest adding the following type-specialized variants to > Data.Attoparsec.Char8: > > (<*.) :: Applicative f => f a -> f ByteString -> f a > (<*.) = (<*) > > (.*>) :: Applicative f => f ByteString -> f a -> f a > (.*>) = (*>) > Sounds re

Re: [Haskell-cafe] parsec2 vs. parsec3... again

2011-01-14 Thread Bryan O'Sullivan
On Fri, Jan 14, 2011 at 5:54 PM, Evan Laforge wrote: > Then I found out that > compiling with profiling enabled makes attoparsec slow and parsec > fast. Yes, the SCC annotations added by GHC have a fairly high cost. I think my short term solution is going to be remove -auto-all from > attopar

Re: [Haskell-cafe] The Bay Area Haskell Hackathon is coming up: Feb 11-13, 2011

2010-12-26 Thread Bryan O'Sullivan
On Fri, Dec 24, 2010 at 5:32 PM, Alan Shaw wrote: > I'm a beginner in Haskell (you can see where I'm at from my blog post Haskell > Liftoff ) > and I want to learn more, but I'm not sure what a hackathon is. > Come along, write code, meet peo

[Haskell-cafe] The Bay Area Haskell Hackathon is coming up: Feb 11-13, 2011

2010-12-23 Thread Bryan O'Sullivan
Mark Lentczner and I are organizing, and it will be held at Hacker Dojo in Mountain View . If you plan to attend, please fill in our sign-up form

Re: [Haskell-cafe] Splittable random numbers

2010-11-12 Thread Bryan O'Sullivan
On Fri, Nov 12, 2010 at 1:28 PM, Richard Senington wrote: > Thankyou for the advice, but since I am just learning about some of this > stuff, how about I have ago at implementing some of their tests? > Sure. See http://www.iro.umontreal.ca/~simardr/testu01/tu01.html for the current state of the a

Re: [Haskell-cafe] Splittable random numbers

2010-11-12 Thread Bryan O'Sullivan
On Fri, Nov 12, 2010 at 12:34 PM, Luke Palmer wrote: > > Yeah I think a package of randomness tests could be really useful. Cool > :-) > There are already well-established suites of very thorough PRNG tests, such as Diehard and Big Crush. Please don't invent another. ___

[Haskell-cafe] Re: Splittable random numbers

2010-11-04 Thread Bryan O'Sullivan
On Thu, Nov 4, 2010 at 11:39 AM, Thomas DuBuisson wrote: > Before we bother to do that I think it would be worth deciding what > level of performance we are trying to achieve.  On my laptop (Core2 > 2.5Ghz) I generate 4MB of random values in less than 900ms (HashDRBG). >  What is StdGen getting, w

Re: [Haskell-cafe] New repo location for the network package

2010-10-28 Thread Bryan O'Sullivan
On Thu, Oct 28, 2010 at 8:06 AM, Magnus Therning wrote: > Fair enough. Do you have enough buy-in to make sure that the github > organisation becomes the best location for *all* HP packages? > > That is, can I stop going to Hackage to find the home for HP packages? That's never been our intentio

[Haskell-cafe] [ANNOUNCE] text 0.10.0.0 - fast Unicode text handling

2010-10-21 Thread Bryan O'Sullivan
[Blog copy of the announcement here .] I just pushed it to bitbucket and github, and you can install it from the text site on Hackage

Re: [Haskell-cafe] profiling cabal libraries

2010-10-19 Thread Bryan O'Sullivan
On Tue, Oct 19, 2010 at 8:42 AM, Tom Hawkins wrote: > > I "cabal install -p" a local package I am testing, and I compile a > test of the library using "-prof -auto-all". But the profiling report > only lists a CAF entry for the library, but does not detail any of the > library's top level functi

[Haskell-cafe] Re: Text: find

2010-10-17 Thread Bryan O'Sullivan
On Sun, Oct 17, 2010 at 1:51 PM, Antoine Latter wrote: > > What would the definition of a function of the form: > > > find :: (Text -> Bool) -> Text -> Maybe Text > > look like? > Can you be more specific? I assume you mean that the only sensible return values are Nothing or the entire Text for

[Haskell-cafe] Re: Notes from "Haskell takes over the world" BoF at ICFP

2010-10-06 Thread Bryan O'Sullivan
On Wed, Oct 6, 2010 at 12:10 PM, Don Stewart wrote: > Here are the notes transcribed from the Future of Haskell BoF held > after the Haskell Symposium last week. > Thanks for sending out the notes, Don! It was a very helpful and constructive session for me, to let me see some interesting opport

Re: [Haskell-cafe] Big Arrays

2010-10-03 Thread Bryan O'Sullivan
On Sun, Oct 3, 2010 at 11:54 AM, Henry Laxen wrote: > > I am trying to create a (relatively) big array, > but it seems I cannot make anything larger > than 2^30 or so. Here is the code: > Use a 64-bit machine, where Int is 64 bits wide. Trying to create a larger array on a 32-bit machine doesn't

Re: [Haskell-cafe] Problem with monad transformer stack

2010-10-03 Thread Bryan O'Sullivan
On Sun, Oct 3, 2010 at 9:40 PM, Michael Vanier wrote: > > {- This doesn't work: -} > newtype MyMonad a = > MyMonad ((StateT (MyData a) (Either SomeError) a)) > deriving (Monad, >MonadState (MyData a), >MonadError SomeError, >Typeable) > This simply isn't all

Re: [Haskell-cafe] ANNOUNCE: text 0.9.0.0 and text-icu 0.4.0.0

2010-09-20 Thread Bryan O'Sullivan
On Sun, Sep 19, 2010 at 9:37 PM, John Millikin wrote: > > What's new in text-0.9 ? All I see in darcs is a newtype'd param in > the Foreign module. > That is all that's new, but the PVP suggests that this requires a version bump, since it changes an existing interface. The purpose of the newtyp

[Haskell-cafe] ANNOUNCE: text 0.9.0.0 and text-icu 0.4.0.0

2010-09-19 Thread Bryan O'Sullivan
I've issued new releases of the text and text-icu packages, the fast, comprehensive Unicode text manipulation libraries. http://hackage.haskell.org/package/text http://hackage.haskell.org/package/text-icu Features of text: - Compact array-based data representation. - Library code based on

Re: [Haskell-cafe] Re: Cleaning up threads

2010-09-14 Thread Bryan O'Sullivan
On Tue, Sep 14, 2010 at 12:04 PM, Gregory Collins wrote: > That's surprising to me -- this is how we kill the Snap webserver > (killThread the controlling thread...). > It's one thing to design code to work that way and test it all the time, but it would be quite another to claim that killThread

Re: [Haskell-cafe] Re: Cleaning up threads

2010-09-14 Thread Bryan O'Sullivan
On Tue, Sep 14, 2010 at 11:21 AM, Edward Z. Yang wrote: > > Pure code can always be safely asynchronously interrupted (even code > using state like the ST monad), and IO code can be made to interact > correctly with thread termination simply by using appropriate bracketing > functions that would

Re: [Haskell-cafe] Data.Text performance problem

2010-09-13 Thread Bryan O'Sullivan
On Mon, Sep 13, 2010 at 3:26 AM, Petr Prokhorenkov wrote: > I really didn't expect mapAccumL to have quadratic complexity. Thank you a > lot for the fix! No problem. By the way, in my benchmarks, mapAccumL on Text is now faster than on ByteString :-) _

Re: [Haskell-cafe] Data.Text performance problem

2010-09-12 Thread Bryan O'Sullivan
On Sun, Sep 12, 2010 at 12:23 PM, Petr Prokhorenkov wrote: > I experienced a following problem while dealing with some text processing. > Thanks for the report and the test case. There's nothing wrong with your code - read on for details. You ran into one of the few functions in Data.Text that I

[Haskell-cafe] ANNOUNCE: text-icu 0.4.0.0

2010-09-10 Thread Bryan O'Sullivan
The text-icu library is the more practical cousin to the text library, implementing a myriad of Unicode-related functionality that is not yet otherwise available in Haskell. It is implemented as bindings to the widely used ICU library. http://hackage.haskell.org/package/text-icu Features: - L

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

2010-09-07 Thread Bryan O'Sullivan
On Wed, Sep 1, 2010 at 12:29 PM, Daniel Fischer wrote: > I'm on Linux. I guess that's another point in favour of it:) > Do you happen to know why it's slower on a Mac? I'd guess because of something to do with the system iconv. > So I tentatively believe most of the difference is spent doing t

Re: [Haskell-cafe] Proposal: Form a haskell.org committee

2010-09-07 Thread Bryan O'Sullivan
On Sun, Sep 5, 2010 at 9:34 PM, Jason Dagit wrote: > The darcs project uses the Software Freedom Conservancy as a sort of > legal entity to hold on to funds and also to help in case anyone takes > legal action against darcs or darcs needs to take legal action. > I have only the highest praise fo

[Haskell-cafe] PSA: using MySQL from Haskell programs

2010-09-07 Thread Bryan O'Sullivan
If you are using HDBC-mysql or HDBC-odbc to access MySQL databases, you may have run into problems with your programs failing due to connection errors. In this blog posting, I describe what's happening and how to work around it: http://www.serpentine.com/blog/2010/09/04/dealing-with-fragile-c-libr

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

2010-09-04 Thread Bryan O'Sullivan
On Wed, Sep 1, 2010 at 1:00 PM, Daniel Fischer wrote: > I'm not keen on subscribing to libraries@ to follow the official proposal > process, any takers? > I'll take it up. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mai

  1   2   3   4   5   >