[Haskell-cafe] Re: FASTER primes

2010-01-08 Thread Will Ness
Heinrich Apfelmus quantentunnel.de> writes: > > Will Ness wrote: > > But I get the impression that GHC isn't working through equational > > reasoning?.. > > I see all this talk about thunks etc. > > Sure it does. Concerning the thunks, they're part of the implementation > of the reduction mode

[Haskell-cafe] Re: FASTER primes

2010-01-08 Thread Will Ness
Daniel Fischer web.de> writes: > > Am Freitag 08 Januar 2010 19:45:47 schrieb Will Ness: > > Daniel Fischer web.de> writes: > > > It's not tail-recursive, the recursive call is inside a celebrate. It is (spMerge that is). It calls tail-recursive celebrate in a tail position. What you've don

Re: [Haskell-cafe] Capped lists and |append|

2010-01-08 Thread John Millikin
Everything here makes much more sense than the previous implementation -- I've upped 1.2, which splits up |append|, implements the instances in terms of Monoid, etc. Also included is |toList| and |toList_| , which are like functions defined in Felipe's earlier email to me. The first returns the ca

Re: [Haskell-cafe] Re: FASTER primes

2010-01-08 Thread Daniel Fischer
Am Freitag 08 Januar 2010 19:45:47 schrieb Will Ness: > Daniel Fischer web.de> writes: > > > > mergeSP :: Integral a => People a -> People a -> People a > > mergeSP p1@(P a _) p2 = P (a ++ vips mrgd) (dorks mrgd) > > where > > mrgd = spMerge (dorks p1) (vips p2) (dorks p2) > >

Re: [Haskell-cafe] Re: [arch-haskell] Upgrading Arch Linux Haskell Packages

2010-01-08 Thread Cetin Sert
Even while having a break he's blazing fast with his replies! 2010/1/8 Ivan Lazar Miljenovic > Don Stewart writes: > > There's a batch upgrade, I've just been travelling! > > Yeah, let Don have a break for once! > > Oh, since you're here Don, how do I do ... ? ;-) > > -- > Ivan Lazar Miljen

Re: [Haskell-cafe] Capped lists and |append|

2010-01-08 Thread Twan van Laarhoven
John Millikin wrote: Earlier today I uploaded the capped-list package; I didn't think there would be any interest, since it's a relatively trivial data structure, but already there's been three emails and an IRC convo about it. Since uploading, there's been a big problem pointed out to me regard

Re: [Haskell-cafe] Capped lists and |append|

2010-01-08 Thread Felipe Lessa
[Disclaimer: I didn't really read all the thread from which this data structure originated on Cafè =).] On Fri, Jan 08, 2010 at 03:38:15PM -0800, John Millikin wrote: > Since uploading, there's been a big problem pointed out to me > regarding this structure, namely the possible definitions of |app

[Haskell-cafe] Capped lists and |append|

2010-01-08 Thread John Millikin
Earlier today I uploaded the capped-list package; I didn't think there would be any interest, since it's a relatively trivial data structure, but already there's been three emails and an IRC convo about it. In short, this is Heinrich Apfelmus's "Train" type from

Re: [Haskell-cafe] Infix instance headers

2010-01-08 Thread Bas van Dijk
Simon, I discovered that the following example also won't parse in ghc-6.12.1 because of the infix 'MayOpen' constraint: with ∷ (Resource resource, MonadCatchIO pr) ⇒ resource → (∀ s. s `MayOpen` resource ⇒ RegionalHandle resource (RegionT s pr) → RegionT s pr α) → pr α Is this al

Re: [Haskell-cafe] Re: ANNOUNCE: Clutterhs 0.1

2010-01-08 Thread Felipe Lessa
(Sorry for replying to this old thread.) On Sun, Nov 29, 2009 at 08:09:18AM +0100, Gour wrote: > What do you think about binding Moblin's nbtk (now it's called mx) ? Just out of curiosity, did anyone do something about Moblin's toolkit and Haskell? Thanks! :) -- Felipe.

[Haskell-cafe] Re: FASTER primes

2010-01-08 Thread Will Ness
Will Ness yahoo.com> writes: > > > That might be why Daniel's structure is better: it plunges down faster than > mine. > > "treefold" structure was: > (2+4) + ( (4+8) + ( (8+16) + ( (16+32) + ( (32+64) + ... > dpths: 3 4 4 5 5 66 77 8 this sho

[Haskell-cafe] Re: FASTER primes

2010-01-08 Thread Will Ness
Daniel Fischer web.de> writes: > roll   = scanl (+) > wheel  = 2:4:2:4:6:2:6:4:2:4:6:6:2:6:4:2:6:4:6:8:4:2:4:2: >    4:8:6:4:6:2:4:6:2:6:6:4:2:4:6:2:6:4:2:4:2:10:2:10:wheel > wheel11 = res > where > snms = scanl (+) 11 (take 47 wheel) > nums = tail $ scanl (

Re: [Haskell-cafe] Testing for statistical properties

2010-01-08 Thread Gregory Crosswhite
Thanks! I had reached the same conclusion, so I am glad to see that you already wrote code to do this for me. :-) There is a bug in the version that you posted, though: you missed one of the terms in the u < 0.755 case, so the c2 constant goes completely unused. Here is my modified version

[Haskell-cafe] Re: FASTER primes

2010-01-08 Thread Will Ness
Daniel Fischer web.de> writes: > > > The below code is now a well-behaved memory citizen (3MB for the 100 millionth prime, about the same as the PQ code). It still is considerably slower than the PQ code. > In terms of MUT times as reported by +RTS -sstderr - as well as (MUT+GC) times - (mea

Re: [Haskell-cafe] telling ghc to run several jobs in parallel

2010-01-08 Thread Daniel Peebles
There is no such option yet, but there was some work recently on making GHC more amenable to doing jobs in parallel (from what I understand there's a global variable or two that makes it hard). Dan On Fri, Jan 8, 2010 at 6:33 PM, Paul Brauner wrote: > Hi, > > I have to processors but ghc --make

[Haskell-cafe] Re: FASTER primes

2010-01-08 Thread Will Ness
Daniel Fischer web.de> writes: > > > Am Donnerstag 07 Januar 2010 11:43:44 schrieb Heinrich Apfelmus: > > Will Ness wrote: > > > > Hm? In my world view, there is only reduction to normal form and I don't > > see how "allocate its own storage" fits in there. Okasaki having shown > > something to

[Haskell-cafe] telling ghc to run several jobs in parallel

2010-01-08 Thread Paul Brauner
Hi, I have to processors but ghc --make only uses one of them, even if some files could be compiled in parallel. Is there some option similar to the -j one of the make tool ? (I read the manual but didn't find it) Regards, Paul ___ Haskell-Cafe mailin

Re: [Haskell-cafe] Typed Configuration Files

2010-01-08 Thread Bulat Ziganshin
Hello Sebastian, Friday, January 8, 2010, 3:53:53 PM, you wrote: > Neil Mitchell's cmdargs package [1] is pretty neat. It can be used to > parse command-line arguments into a user-defined data structure. > Is there something similar for parsing config files? Lua language may be used to describe

Re: [Haskell-cafe] Typed Configuration Files

2010-01-08 Thread Neil Mitchell
Hi, >> Seriously, cmdargs is *brilliant*.  It's also magic (to me). > > Not only to you in fact it is black magic since it uses unsafePerformIO :( The problem isn't that it's black magic or that it uses unsafePerformIO - the problem is that it's horribly impure, so doesn't obey referential transp

Re: [Haskell-cafe] Typed Configuration Files

2010-01-08 Thread Nicolas Pouillard
Excerpts from Magnus Therning's message of Fri Jan 08 16:25:31 +0100 2010: > On Fri, Jan 8, 2010 at 12:53 PM, Sebastian Fischer > wrote: > > Dear Café, > > > > Neil Mitchell's cmdargs package [1] is pretty neat. It can be used to parse > > command-line arguments into a user-defined data structure.

Re: [Haskell-cafe] Typed Configuration Files

2010-01-08 Thread Magnus Therning
On Fri, Jan 8, 2010 at 12:53 PM, Sebastian Fischer wrote: > Dear Café, > > Neil Mitchell's cmdargs package [1] is pretty neat. It can be used to parse > command-line arguments into a user-defined data structure. > > Is there something similar for parsing config files? If you write one I most cert

Re: [Haskell-cafe] space leaks and optimizations

2010-01-08 Thread David Leimbach
> > > 2) While each step is predictable, the overall behavior of a lazy > program can be rather surprising. So one must be very careful. GHC > provides two ways to control the evaluation order, seq and bang > patterns, but I am not sure which of these (if any) is the right tool. > Consider the foll

[Haskell-cafe] ANNOUNCE: SourceGraph-0.6.0.1

2010-01-08 Thread Ivan Lazar Miljenovic
I realised soon after I sent the announcement email that there was a bug in one of the new "subtle" features that I didn't list, namely the background shading of directories in import visualisation. As such, SourceGraph 0.6.0.1 contains this fix. There were also two other features in 0.6.0.0 that

[Haskell-cafe] Splitting a Hackage project (was ANN: Streaming Component Combinators 0.4)

2010-01-08 Thread Mario Blazevic
I couldn't find any Hackage policy guideline on the appropriate balance between the package list size and package size, so I'll just ask the question. I have released the version 0.4 of my SCC package yesterday. In this particular release, there is at least one module that's nicely self-con

[Haskell-cafe] ANNOUNCE: SourceGraph-0.6.0.0 and Graphalyze-0.9.0.0

2010-01-08 Thread Ivan Lazar Miljenovic
I'm pleased to announce the latest releases of SourceGraph [1] and Graphalyze [2]. [1]: http://hackage.haskell.org/package/SourceGraph [2]: http://hackage.haskell.org/package/Graphalyze SourceGraph is a program that performs static code analysis on Haskell projects on the by applying graph theore

[Haskell-cafe] Typed Configuration Files

2010-01-08 Thread Sebastian Fischer
Dear Café, Neil Mitchell's cmdargs package [1] is pretty neat. It can be used to parse command-line arguments into a user-defined data structure. Is there something similar for parsing config files? There are a number of config file parsers on Hackage. But even the most sophisticated one I

[Haskell-cafe] ANN: hakyll-0.4

2010-01-08 Thread Jasper Van der Jeugt
Hello, I am announcing the release of hakyll-0.4. Hakyll is a static site generator library written Haskell. It is written in a very configurable way and uses an xmonad-like DSL for configuration. Notable changes since the last big release (0.1) include: - CSS compression - Dependency handling (a

[Haskell-cafe] space leaks and optimizations

2010-01-08 Thread Alexei Kitaev
Dear Haskellers, Recently I have been looking for a programming language that would be suitable for small scientific and recreational projects and palatable to a picky person like me. (I do theoretical physics and some math; I do not program very often.) Haskell and Clean look attractive from a m

Re: [Haskell-cafe] Testing for statistical properties

2010-01-08 Thread Tom Nielsen
Hi Greg, Assuming this is a one-dimensional distribtution, you should use a kolmogorov-smirnov test to test this: http://en.wikipedia.org/wiki/Kolmogorov-Smirnov_test I've implemented to the KS distribution from the CERN code linked in the wikipedia article, here: http://github.com/glutamate/sa

Re: [Haskell-cafe] Re: [arch-haskell] Upgrading Arch Linux Haskell Packages

2010-01-08 Thread Ivan Lazar Miljenovic
Don Stewart writes: > There's a batch upgrade, I've just been travelling! Yeah, let Don have a break for once! Oh, since you're here Don, how do I do ... ? ;-) -- Ivan Lazar Miljenovic ivan.miljeno...@gmail.com IvanMiljenovic.wordpress.com ___ Ha

[Haskell-cafe] Re: [arch-haskell] Upgrading Arch Linux Haskell Packages

2010-01-08 Thread Don Stewart
cetin.sert: > Hi, > > Is there a way to manually upgrade Haskell packages in the aur repository of > Arch Linux which were previously contributed automatically by arch-haskell? > Or is there a batch upgrade planned for the near future? > What is the mailing list for arch There's a batch upgrade,

[Haskell-cafe] Upgrading Arch Linux Haskell Packages

2010-01-08 Thread Cetin Sert
Hi, Is there a way to manually upgrade Haskell packages in the aur repository of Arch Linux which were previously contributed automatically by arch-haskell? Or is there a batch upgrade planned for the near future? What is the mailing list for arch Best Regards, Cetin _