Re: [Haskell-cafe] Concurrency performance problem

2013-03-05 Thread Nathan Howell
Depends on the application, of course. The (on by default) parallel GC tends to kill performance for me... you might try running both with +RTS -sstderr to see if GC time is significantly higher, and try adding +RTS -qg1 if it is. On Mon, Mar 4, 2013 at 2:23 PM, Łukasz Dąbek sznu...@gmail.com

Re: Race-condition in alternative 'System.Timeout.timeout' implementation

2013-02-25 Thread Nathan Howell
You might want to take a look at https://github.com/alphaHeavy/timeout-control/blob/master/System/Timeout/Control.hs#L72too, though I'd guess it is subject to the same race condition. I have a few other fixes (for dealing with lifted bracket iirc) I still need to merge back from a private branch.

Re: [Haskell-cafe] How far compilers are allowed to go with optimizations?

2013-02-09 Thread Nathan Howell
Inline. On Sat, Feb 9, 2013 at 1:50 AM, Johan Holmquist holmi...@gmail.com wrote: I guess I fall more to the reason about code side of the scale rather than testing the code side. Testing seem to induce false hopes about finding all defects even to the point where the tester is blamed for

Re: Dynamic libraries by default and GHC 7.8

2012-12-06 Thread Nathan Howell
Would the SxS loader (with associated manifests, etc) work? I've used it to support similar scenarios in a former job without any PE32 hacking. Unless things have changed recently, the APIs aren't super well documented but they are supported and there are a handful of tools for tracing the loader

Re: [Haskell-cafe] cabal-dev + haskell mode (vim)

2012-08-03 Thread Nathan Howell
On Fri, Aug 3, 2012 at 2:35 PM, Benjamin Edwards edwards.b...@gmail.com wrote: I am struggling to get ctags and / or haskell mode to work with cabal-dev. This is quite annoying. Has anyone worked around this? I use ghc-mod for vim and it sorta supports this... by adding arbitrary flags to GHC

Re: [Haskell-cafe] Martin Odersky on What's wrong with Monads

2012-06-26 Thread Nathan Howell
On Tue, Jun 26, 2012 at 3:19 PM, Tillmann Rendel ren...@informatik.uni-marburg.de wrote: A function to add up all integers in a tree:  amount:: Tree - Integer  amount (Leaf x) = x  amount (Branch t1 t2) = amountt1 + amountt2 All fine so far. Now, consider the following additional

[Haskell-cafe] Conduits and large ConduitResult chunks

2012-03-01 Thread Nathan Howell
I'm porting lzma-enumerator over to conduits and I've run into a snag. The output chunks from lzma can be quite large, so I'd like to stream the results out in smaller chunks instead of tens (or hundreds) of megabytes at a time. It seems as though this should be possible, as it is with

Re: parallelizing ghc

2012-01-26 Thread Nathan Howell
On Thu, Jan 26, 2012 at 3:44 PM, Evan Laforge qdun...@gmail.com wrote: I'd think apple would care about linker performance... I'm even a little surprised Xcode doesn't have something better than a lightly hacked gnu ld. Someone mentioned that it was on their wish-list at LLVM 2010

Re: [Haskell-cafe] C++ Parser?

2012-01-24 Thread Nathan Howell
On Tue, Jan 24, 2012 at 2:06 AM, Christopher Brown cm...@st-andrews.ac.ukwrote: I have stumbled across language-c on hackage and I was wondering if anyone is aware if there exists a full C++ parser written in Haskell? Check out clang: http://clang.llvm.org/ and

Re: GHC 7.2.2 RC 1

2011-11-11 Thread Nathan Howell
We're hitting something that looks similar with a Chan on 7.2.1, though they might be related.. On Fri, Nov 11, 2011 at 4:52 AM, Simon Marlow marlo...@gmail.com wrote: Sorry, no. That one has a workaround: define your own fixIO: fixIO :: (a - IO a) - IO a fixIO k = do m - newEmptyMVar

Re: GHC 7.2.2 RC 1

2011-11-10 Thread Nathan Howell
Any chance #5421 (loop in withMVar (reproducible, but with large test case) could be backported to 7.2.2? -n On Sun, Nov 6, 2011 at 5:18 AM, Ian Lynagh ig...@earth.li wrote: 7.2.2 will be a minimal bugfix release, fixing only bugs that cannot be worked around. Please let us know if you find

Re: Should GHC default to -O1 ?

2011-11-09 Thread Nathan Howell
On Tue, Nov 8, 2011 at 11:28 PM, wagne...@seas.upenn.edu wrote: I don't agree that GHC's user interface should be optimized for newcomers to Haskell. GHC is an industrial-strength compiler with some very advanced features; the majority of its target audience is professional programmers. Let

Re: [Haskell-cafe] Organizing big repository

2011-10-27 Thread Nathan Howell
On Thu, Oct 27, 2011 at 1:00 PM, Evan Laforge qdun...@gmail.com wrote: So as far as I know there isn't really a build system for larger or cross language haskell repos beyond make (I've played with waf some, that also might be a possibility). We use waf to drive cabal. It supports parallel

Re: [Haskell-cafe] Is it possible to get the information of instances of a type?

2011-10-26 Thread Nathan Howell
On Wed, Oct 26, 2011 at 6:53 AM, Magicloud Magiclouds magicloud.magiclo...@gmail.com wrote: But in Haskell, could I write a code to list the classes that a type instanced? TemplateHaskell as well. It's possible with TemplateHaskell. Look at classInstances and the ClassI data constructor.

Re: [Haskell-cafe] Fwd: LZMA for Haskell?

2011-10-04 Thread Nathan Howell
lzma.h is part of the xz-utils package, which is available here: http://tukaani.org/xz/ If you have any problems with the package let me know. On Tue, Oct 4, 2011 at 3:34 PM, Paulo Pocinho poci...@gmail.com wrote: (Thought it would be better to put this in the haskell-cafe list). Hello list.

#ifdef'd code in Printer.c

2011-09-25 Thread Nathan Howell
For production debugging, I find printObj and friends to be rather useful... and I wonder if it would be a good idea to make these part of the release builds, instead of being relegated to -debug? Alternatively, should these debugging functions be moved to a separate library? I have some other

Re: [Haskell-cafe] ANNOUNCE: Chell: A quiet test runner (low-output alternative to test-framework)

2011-08-11 Thread Nathan Howell
Is this different than the --hide-successes flag for test-framework? Looks like it was added a few months back: https://github.com/batterseapower/test-framework/commit/afd7eeced9a4777293af1e17eadab4bf485fd98f -n On Thu, Aug 11, 2011 at 8:21 AM, John Millikin jmilli...@gmail.com wrote: The

Re: [Haskell-cafe] haskell zlip read position

2011-07-20 Thread Nathan Howell
On Wed, Jul 20, 2011 at 11:50 AM, rahul gopin...@eecs.oregonstate.eduwrote: Unfortunately the binary protocol itself is external, so can't use a different type of compression Perhaps something like this would work: https://gist.github.com/1096039 I didn't test to make sure it works, but you

Re: [Haskell-cafe] haskell zlip read position

2011-07-20 Thread Nathan Howell
It was purely just for demonstration. I did update the code with a few more comments, but the enumerator package may not be the easiest thing to grok. You might try putting up your current code and someone might be able to recommend a better or easier approach. If the git pack headers have

Re: [Haskell-cafe] How to implement the mean function

2011-07-01 Thread Nathan Howell
(/) operates on a Fractional instance... but length returns an Int, which is not a Fractional. You can convert the Int to a Fractional instance: mean xs = sum xs / fromIntegral (length xs) or try an integer division: mean xs = sum xs `div` length xs -n On Thu, Jun 30, 2011 at 10:55 PM, Ruohao

Re: [Haskell-cafe] How to install GhC on a Mac without registering?

2011-06-03 Thread Nathan Howell
XCode 4 is for sale in the App Store for $5. You do need an account, but not a developer account... so it may be a bit more palatable. On Fri, Jun 3, 2011 at 1:03 PM, John D. Ramsdell ramsde...@gmail.comwrote: I rarely use a Mac because it is too cute, but I bought one for my wife. I'd like

Re: [Haskell-cafe] Using cmake with haskell

2011-05-15 Thread Nathan Howell
about tools if someone convinces me that my current negative impressions about them is wrong or outdated, so if you got waf to build a project with all four of those languages then that does definitely give it extra points in my book. :-) Cheers, Greg On 5/14/11 6:12 PM, Nathan Howell wrote

Re: [Haskell-cafe] Using cmake with haskell

2011-05-14 Thread Nathan Howell
Waf supports parallel builds and works with GHC without too much trouble. I use it in a mixed Haskell, C++, Scala and Python build. If there is interest I could conceivably clean up the ghc waf tool and release it. On Sat, May 14, 2011 at 5:32 PM, Gregory Crosswhite gcr...@phys.washington.edu

Re: Faster Array#/MutableArray# copies

2011-03-01 Thread Nathan Howell
On Mon, Feb 28, 2011 at 9:01 AM, Simon Marlow marlo...@gmail.com wrote: Ideally you'd want the heap check in the primop to be aggregated into the calling function's heap check, and the primop should allocate directly from the heap instead of calling out to the RTS allocate(). All this is a bit

Re: [Haskell-cafe] Question: mime-mail and base64 encoding

2010-12-06 Thread Nathan Howell
On Mon, Dec 6, 2010 at 8:42 PM, Michael Snoyman mich...@snoyman.com wrote: The request is to make both the HTML and plain text parts use base64 encoding by default. This *seems* to me to make a lot of sense, since it will ensure that your message arrives exactly as you intended it, and will

Re: [Haskell-cafe] An interesting paper on VM-friendly GC

2010-10-17 Thread Nathan Howell
On Sat, Oct 16, 2010 at 8:45 AM, Brandon S Allbery KF8NH allb...@ece.cmu.edu wrote: I thought Windows already had a system message for something like that.  Or at least it used to, although I can see why it would have been removed or at least deprecated. You're probably thinking of

Re: [Haskell-cafe] ADT patch/update

2010-08-12 Thread Nathan Howell
There is an existing implementation on hackage: http://hackage.haskell.org/packages/archive/gdiff/1.0/doc/html/Data-Generic-Diff.html On Thu, Aug 12, 2010 at 11:45 AM, Sergey Mironov ier...@gmail.com wrote: 2010/8/8 Stephen Tetley stephen.tet...@gmail.com: Maybe this paper is close?