Re: [Haskell-cafe] haskell embedded

2009-08-08 Thread Bulat Ziganshin
Hello Kevin, Sunday, August 9, 2009, 5:24:02 AM, you wrote: > Hello,  Could someone point me in the the direction of any > references for using Haskell as an embedded language in an hugs documentation notes how to embed Hugs into application -- Best regards, Bulat

Re: [Haskell-cafe] Announce: EnumMap-0.0.1

2009-08-08 Thread Thomas DuBuisson
Inflating the number of elements in the test, I see: IntMap inserts: 5.3 seconds lookups: 2.0 seconds EnumMap inserts: 6.1 sec (15% slower) lookups: 2.5 sec (25% slower) EnumMap with SPECIALIZE of: {-# SPECIALIZE join :: Prefix -> EnumMap Int a -> Prefix -> EnumMap Int a -> EnumMap Int a #-} {-#

Re: [Haskell-cafe] Announce: EnumMap-0.0.1

2009-08-08 Thread John Van Enk
How bad is the lookup compared to normal? On Sat, Aug 8, 2009 at 9:02 PM, Thomas DuBuisson wrote: > On Sat, Aug 8, 2009 at 5:30 PM, Felipe Lessa wrote: >> On Sat, Aug 08, 2009 at 04:14:15PM -0700, Thomas DuBuisson wrote: >>> There exists a small but measurable performance hit for at least one >>>

Re: [Haskell-cafe] haskell embedded

2009-08-08 Thread Mark Wotton
On 09/08/2009, at 11:24 AM, Kevin Smith wrote: Hello, Could someone point me in the the direction of any references for using Haskell as an embedded language in an application. Xmonad seems to come to mind because the configuration files are written using Haskell. Any other information ?

[Haskell-cafe] haskell embedded

2009-08-08 Thread Kevin Smith
Hello, Could someone point me in the the direction of any references for using Haskell as an embedded language in an application. Xmonad seems to come to mind because the configuration files are written using Haskell. Any other information ? Thanks in advance. ___

Re: [Haskell-cafe] Announce: EnumMap-0.0.1

2009-08-08 Thread Thomas DuBuisson
On Sat, Aug 8, 2009 at 5:30 PM, Felipe Lessa wrote: > On Sat, Aug 08, 2009 at 04:14:15PM -0700, Thomas DuBuisson wrote: >> There exists a small but measurable performance hit for at least one >> test case (using Int as keys, obviously).  Perhaps the bias would be >> the other way if we were compari

Re: [Haskell-cafe] Announce: EnumMap-0.0.1

2009-08-08 Thread Felipe Lessa
On Sat, Aug 08, 2009 at 04:14:15PM -0700, Thomas DuBuisson wrote: > There exists a small but measurable performance hit for at least one > test case (using Int as keys, obviously). Perhaps the bias would be > the other way if we were comparing EnumMap to an IntMap wrapped with > to/from Enum. Per

Re: [Haskell-cafe] Announce: EnumMap-0.0.1

2009-08-08 Thread Thomas DuBuisson
There exists a small but measurable performance hit for at least one test case (using Int as keys, obviously). Perhaps the bias would be the other way if we were comparing EnumMap to an IntMap wrapped with to/from Enum. Thomas -- Using Data.IntMap [to...@mavlo Test]$ ghc --make -O2 im.hs [1 of 1

Re: [Haskell-cafe] Announce: EnumMap-0.0.1

2009-08-08 Thread John Van Enk
What if we say that Enum a generalization, rather than a wrapper, of Int? If the benchmarks are even, is there a reason to use the more specific structure rather than the general one? I don't know if Enum being "more complex" outweighs the benefits of it being "more general" (if the EnumMap matche

Re: [Haskell-cafe] Announce: EnumMap-0.0.1

2009-08-08 Thread Henning Thielemann
On Sat, 8 Aug 2009, John Van Enk wrote: That's originally how I was thinking about doing it, but I think that requires one to re-implement all the functions available in Data.IntMap as simple wrappers that do the toEnum/fromEnum conversion. I think making it into its own module is a little clea

Re: [Haskell-cafe] Using -Nx Option with GHC

2009-08-08 Thread Mark Wassell
That did it, thanks. Neil Mitchell wrote: Hi Mark, I compile with ghc --make -O2 -threaded That should work - try deleting all .o/.obj files and the executable and trying to compile again. Thanks Neil ___ Haskell-Cafe mailing list H

Re: [Haskell-cafe] Announce: EnumMap-0.0.1

2009-08-08 Thread John Van Enk
That's originally how I was thinking about doing it, but I think that requires one to re-implement all the functions available in Data.IntMap as simple wrappers that do the toEnum/fromEnum conversion. I think making it into its own module is a little cleaner. The conversion from EnumMap to IntMap i

Re: [Haskell-cafe] Using -Nx Option with GHC

2009-08-08 Thread Neil Mitchell
Hi Mark, > I compile with > > ghc --make -O2 -threaded That should work - try deleting all .o/.obj files and the executable and trying to compile again. Thanks Neil ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/

[Haskell-cafe] Using -Nx Option with GHC

2009-08-08 Thread Mark Wassell
Hi, I am trying to compile and run my program so that it utilises more than one core on my machine. I have looked at http://haskell.org/haskellwiki/Shootout/Parallel/BinaryTrees and am using parMap at a point in my code. I compile with ghc --make -O2 -threaded and run with the options +RT

Re: [Haskell-cafe] Announce: EnumMap-0.0.1

2009-08-08 Thread Henning Thielemann
On Sat, 8 Aug 2009, John Van Enk wrote: Hi List, I've uploaded a first version of EnumMap to hackage. EnumMap is a generalization of IntMap that constrains the key to Enum rather than forcing it to be Int. I have no idea what impact this has on performance, but it still passes all the tests t

[Haskell-cafe] Announce: EnumMap-0.0.1

2009-08-08 Thread John Van Enk
Hi List, I've uploaded a first version of EnumMap to hackage. EnumMap is a generalization of IntMap that constrains the key to Enum rather than forcing it to be Int. I have no idea what impact this has on performance, but it still passes all the tests that ship with IntMap. (My guess is that perf

Re: [Haskell-cafe] Hugs faster and more reliable than GHC for large list monad 'do' block

2009-08-08 Thread Henning Thielemann
On Thu, 6 Aug 2009, Don Stewart wrote: Someone please file a bug report, http://hackage.haskell.org/trac/ghc/newticket?type=bug Done, Don! http://hackage.haskell.org/trac/ghc/ticket/3424 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org ht

Re: [Haskell-cafe] Complex numbers and (**)

2009-08-08 Thread Henning Thielemann
On Sat, 8 Aug 2009, Paul Sargent wrote: First post to the cafe, so "Hello everybody!". Hope this is reasonable subject matter and not too long. I've been working on some algorithms that involved taking the n-th root of complex numbers. In my code I've implemented this as raising the complex n

Re: [Haskell-cafe] Examples

2009-08-08 Thread Henning Thielemann
On Sat, 8 Aug 2009, Andrew Coppin wrote: As some of you may remember, I recently released a couple of packages on Hackage. I'd like to also release some example programs using these packages, but I'm not sure of the best way to do this. Do I make the example programs part of the package itse

[Haskell-cafe] Haskell Weekly News: Issue 127 - August 8, 2009

2009-08-08 Thread Brent Yorgey
--- Haskell Weekly News http://sequence.complete.org/hwn/20090808 Issue 127 - August 08, 2009 --- Welcome to issue 127 of HWN, a newsletter covering

Re: [Haskell-cafe] Complex numbers and (**)

2009-08-08 Thread Lennart Augustsson
A2: Yes, this seem unfortunate, so perhaps a different definition for Complex is warranted. Or maybe the default implementation for (**) should be changed so that 0**x is 0, except if x is 0 (in which case I think it should be undefined). -- Lennart On Sat, Aug 8, 2009 at 2:55 PM, Paul Sargent

[Haskell-cafe] Complex numbers and (**)

2009-08-08 Thread Paul Sargent
Hi, First post to the cafe, so "Hello everybody!". Hope this is reasonable subject matter and not too long. I've been working on some algorithms that involved taking the n-th root of complex numbers. In my code I've implemented this as raising the complex number ('z') to 1/n using the (**) operat

[Haskell-cafe] Examples

2009-08-08 Thread Andrew Coppin
As some of you may remember, I recently released a couple of packages on Hackage. I'd like to also release some example programs using these packages, but I'm not sure of the best way to do this. Do I make the example programs part of the package itself? Do I release a seperate package which j

[Haskell-cafe] Re: What would be required to make a LLVM backend for GHC

2009-08-08 Thread Don Stewart
axman6: > Hi all, > > I've been talking to one of the LLVM developers, who's working on an > operating system called AuroraUX, which, among other things, is trying > to use LLVM as much as possible in the system (using clang as the > default compiler, compiler-rt [libgcc replacement from the