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 simonya...@me.com 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

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 m...@nh2.me 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

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 alist...@abayley.orgwrote: 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

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 midfi...@gmail.com 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

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: concat ::

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 bm...@hotmail.com wrote: Thank you. Your entry is great. Faster than fortran

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 bm...@hotmail.comwrote: 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

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 bm...@hotmail.comwrote: This time I have

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 bm...@hotmail.comwrote: Well, playing with Haskell I have literally trasnlated my c++ program http://shootout.alioth.debian.org/u64q/program.php?test=fannkuchreduxlang=gppid=3 and got decent performance but not that good in comparison with

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 bm...@hotmail.comwrote: Thanks ! Should I contribute your version on shootout site? Do whatever you like with it. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

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 shawj...@gmail.com 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

Re: [Haskell-cafe] Hackage Package Discoverability

2012-10-23 Thread Bryan O'Sullivan
On Tue, Oct 23, 2012 at 5:53 AM, Myles C. Maxfield myles.maxfi...@gmail.com 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

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 ekirpic...@gmail.comwrote: 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

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 giorgi...@gmail.comwrote: 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

[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

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 b...@serpentine.comwrote: 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: Just yesterday we

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 hessel...@gmail.com 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

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 hessel...@gmail.comwrote: 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.

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 miguelim...@yandex.ru 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

[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] 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 allber...@gmail.comwrote: 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;

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 davidleotho...@gmail.comwrote: 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

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, mrbuchm...@googlemail.com 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 thomas.dubuis...@gmail.com 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

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 r...@cse.unsw.edu.auwrote: 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

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 nomin...@googlemail.comwrote: 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

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 b...@serpentine.comwrote: 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-10 Thread Bryan O'Sullivan
On Wed, Jun 6, 2012 at 6:20 AM, Doug McIlroy d...@cs.dartmouth.eduwrote: 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

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 warrensomeb...@gmail.comwrote: 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

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

2012-05-24 Thread Bryan O'Sullivan
On Wed, May 23, 2012 at 10:52 PM, Richard O'Keefe o...@cs.otago.ac.nz 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

[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,

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 mich...@snoyman.comwrote: OK, issue created: https://github.com/bos/text/issues/19 I fixed the too-much-inlining bughttps://github.com/bos/text/commit/2b2cb084c4689c06f1a7851ff8eb1e412eb02c1btonight. As a bonus, Text literals are now decoded

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 allber...@gmail.comwrote: 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

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 rrnew...@gmail.com 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

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 robstewar...@googlemail.comwrote: 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

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 aslat...@gmail.com 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

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. This

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 gcrosswh...@gmail.comwrote: 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

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 gcrosswh...@gmail.comwrote: 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

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 chowell...@gmail.com 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

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 chowell...@gmail.com 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

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 it a

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 con...@metadecks.org 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

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 ke...@malde.org 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

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 rrnew...@gmail.com 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

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 rrnew...@gmail.com 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

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 rrnew...@gmail.com 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

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 kizzx2+hask...@gmail.com 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

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 kizzx2+hask...@gmail.com 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 (

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 qubi...@gmail.com 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

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 cresw...@galois.com 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

Re: [Haskell-cafe] External system connections

2011-07-11 Thread Bryan O'Sullivan
On Mon, Jul 11, 2011 at 10:49 AM, Michael Snoyman mich...@snoyman.comwrote: 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.

[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

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 tillmann.v...@rwth-aachen.de wrote: I looked at Data.Text http://hackage.haskell.org/** packages/archive/text/0.5/doc/**html/Data-Text.htmlhttp://hackage.haskell.org/packages/archive/text/0.5/doc/html/Data-Text.html and

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 dav.vire+hask...@gmail.com 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

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 dav.vire+hask...@gmail.com 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

Re: [Haskell-cafe] Attoparsec concatenating combinator

2011-06-07 Thread Bryan O'Sullivan
On Tue, Jun 7, 2011 at 1:40 AM, Simon Meier iridc...@gmail.com 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

Re: [Haskell-cafe] Attoparsec concatenating combinator

2011-06-06 Thread Bryan O'Sullivan
On Sun, Jun 5, 2011 at 11:00 AM, Yitzchak Gale g...@sefer.org 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

Re: [Haskell-cafe] Attoparsec concatenating combinator

2011-06-03 Thread Bryan O'Sullivan
On Fri, Jun 3, 2011 at 2:52 AM, Yitzchak Gale g...@sefer.org 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

Re: [Haskell-cafe] Attoparsec concatenating combinator

2011-06-02 Thread Bryan O'Sullivan
On Thu, Jun 2, 2011 at 7:02 AM, Yitzchak Gale g...@sefer.org 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

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] 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-pprint

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 stephen.tet...@gmail.comwrote: 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

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 nowg...@yahoo.com 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

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 fuz...@gmail.comwrote: 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.

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 g...@sefer.org 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

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 g...@sefer.org 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

[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

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 code

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 d.kahlenb...@gmail.comwrote: 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

Re: [Haskell-cafe] Is Hugs dead?

2011-04-22 Thread Bryan O'Sullivan
On Fri, Apr 22, 2011 at 5:16 AM, Robert Clausecker fuz...@gmail.com 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

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 pa...@bk.ru 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 wasserman.lo...@gmail.com 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)

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 v.dijk@gmail.com 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 felipe.le...@gmail.com 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

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 g...@sefer.org 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: [Haskell-cafe] parsec2 vs. parsec3... again

2011-01-14 Thread Bryan O'Sullivan
On Fri, Jan 14, 2011 at 5:54 PM, Evan Laforge qdun...@gmail.com 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

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 noden...@gmail.com wrote: I'm a beginner in Haskell (you can see where I'm at from my blog post Haskell Liftoff http://nodename.com/blog/2010/12/22/haskell-liftoff/) and I want to learn more, but I'm not sure what a hackathon is. Come along, write

[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 Viewhttp://maps.google.com/maps/place?cid=2122486601784397611q=hacker+dojogl=us . If you plan to attend, please fill in our sign-up

Re: [Haskell-cafe] Splittable random numbers

2010-11-12 Thread Bryan O'Sullivan
On Fri, Nov 12, 2010 at 12:34 PM, Luke Palmer lrpal...@gmail.com 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.

Re: [Haskell-cafe] Splittable random numbers

2010-11-12 Thread Bryan O'Sullivan
On Fri, Nov 12, 2010 at 1:28 PM, Richard Senington sc06...@leeds.ac.ukwrote: 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

[Haskell-cafe] Re: Splittable random numbers

2010-11-04 Thread Bryan O'Sullivan
On Thu, Nov 4, 2010 at 11:39 AM, Thomas DuBuisson thomas.dubuis...@gmail.com 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).  

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 mag...@therning.orgwrote: 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

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

2010-10-21 Thread Bryan O'Sullivan
[Blog copy of the announcement herehttp://www.serpentine.com/blog/2010/10/22/text-0-10-0-0-is-here/ .] I just pushed it to bitbucket http://bitbucket.org/bos/text and githubhttp://github.com/bos/text, and you can install it from the text site on Hackagehttp://hackage.haskell.org/package/text in

Re: [Haskell-cafe] profiling cabal libraries

2010-10-19 Thread Bryan O'Sullivan
On Tue, Oct 19, 2010 at 8:42 AM, Tom Hawkins tomahawk...@gmail.com 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

[Haskell-cafe] Re: Text: find

2010-10-17 Thread Bryan O'Sullivan
On Sun, Oct 17, 2010 at 1:51 PM, Antoine Latter aslat...@gmail.com 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

[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 d...@galois.com 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

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 mvanie...@gmail.com wrote: {- This doesn't work: -} newtype MyMonad a = MyMonad ((StateT (MyData a) (Either SomeError) a)) deriving (Monad, MonadState (MyData a), MonadError SomeError, Typeable) This

Re: [Haskell-cafe] Big Arrays

2010-10-03 Thread Bryan O'Sullivan
On Sun, Oct 3, 2010 at 11:54 AM, Henry Laxen nadine.and.he...@pobox.comwrote: 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

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 jmilli...@gmail.com 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

[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 11:21 AM, Edward Z. Yang ezy...@mit.edu 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

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 g...@gregorycollins.netwrote: 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

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 prokhoren...@gmail.comwrote: 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 prokhoren...@gmail.comwrote: 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

[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: -

[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:

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 da...@codersbase.com 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

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 daniel.is.fisc...@web.dewrote: 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

[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 daniel.is.fisc...@web.dewrote: 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

  1   2   3   4   5   >