[Haskell-cafe] ANN: combinatorics

wren ng thornton wren at freegeek.org
Sun Feb 5 23:55:10 CET 2012

On 2/5/12 5:40 PM, Daniel Fischer wrote:
> On Sunday 05 February 2012, 23:14:35, wren ng thornton wrote:
>> On 2/5/12 10:21 AM, Daniel Fischer wrote:
>>> Why not use one of the packages on hackage which offer faster prime
>>> generators?
>> Mostly because I hadn't looked, having had the code already laying
>> around.
> Yeah, that's fine, it was just
>>> I'll  probably trade it in for your algorithm though.
> that made me wonder.

Well, I would've looked around before making the change :)

>> I'm not opposed to it, however another goal is to remain
>> portable to other compilers, which means being H98/H2010 compliant.
> A noble goal.

By which I really mean H98/H2010 plus all the things that were already 
'standard' in the days of GHC 6.6 and Hugs. MPTCs and some of the 
related extensions for making type classes more flexible really need to 
be added to the standard, despite the valid political reasons for 
wanting to wait for the FD vs TF/AT issues to get resolved.

>> NumberSieves uses BangPatterns, but that would be easily remedied if the
>> author is willing; arithmoi looks quite nice, however it is GHC-only.
> The curse of striving for efficiency.
> "Portability is on the to-do list (with low priority, however)."
> It just climbed a place.

Unless I'm doing something that by its nature requires GHC extensions, 
I've been doing my best to avoid them in published packages. Not that I 
have anything against them, but rather that I'd like to support JHC, 
UHC, and other alternatives (just as I used to support Hugs before it 
died). I think there's great value in compiler competition, so I'd like 
to foster it as much as I can. There're quite a number of efficiency 
hacks you can do while remaining in standard Haskell (and you can always 
hide the GHC-only parts with CPP).

Live well,

More information about the Haskell-Cafe mailing list