[Haskell] ANNOUNCE: OmegaGB, Haskell Game Boy Emulator

2007-03-01 Thread Bit Connor
OmegaGB is an emulator for the Nintendo Game Boy, written in pure haskell. It's in a very early state, and only barely shows the title screen of a few games. It uses gtk2hs for the user interface, but there is also a version that doesn't require gtk2hs and uses ascii art. The main problem I am

[Haskell] Laziness and the IO Monad (randomness)

2007-03-01 Thread Dave Tapley
Hi all, I am having a problem with the implementation of a program (a genetic algorithm) which requires randomness in it. It all hinges on the ability to generate something (in the example below an Int), then provide a function to update it such that the prelude's iteratefunction (or an

Re: [Haskell] Laziness and the IO Monad (randomness)

2007-03-01 Thread Taral
On 3/1/07, Dave Tapley [EMAIL PROTECTED] wrote: My question asks why this is the case, when laziness should ensure only the first 10 cases need to be computed. Basically, because the IO monad is strict, not lazy. If you want laziness, don't use the IO monad. -- Taral [EMAIL PROTECTED] You

Re: [Haskell] Laziness and the IO Monad (randomness)

2007-03-01 Thread Paul Johnson
David Brown wrote: Dave Tapley wrote: This code show a trivial case where randomness (and hence the IO monad) is not used and the first 10 elements of the produced list are printed: You don't need the IO monad to achieve pseudy-randomness. Why not use 'randoms' from System.Random

Re: [GHC] #1176: Infinite loop when printing error message

2007-03-01 Thread GHC
#1176: Infinite loop when printing error message ---+ Reporter: [EMAIL PROTECTED] | Owner: Type: bug| Status: new Priority: low|

Re: [GHC] #669: negative indentation in Text.PrettyPrint.HughesPJ

2007-03-01 Thread GHC
#669: negative indentation in Text.PrettyPrint.HughesPJ --+- Reporter: [EMAIL PROTECTED] | Owner: Type: bug | Status: new Priority: normal

Re: [GHC] #249: -caf-all bugs

2007-03-01 Thread GHC
#249: -caf-all bugs -+-- Reporter: simonmar | Owner: igloo Type: merge| Status: closed Priority: low | Milestone: 6.6.1 Component: Profiling|

Re: [GHC] #839: Generate documentation for built-in types and primitve operations

2007-03-01 Thread GHC
#839: Generate documentation for built-in types and primitve operations ---+ Reporter: simonpj| Owner: igloo Type: merge | Status: closed Priority: normal |

Re: [GHC] #1176: Infinite loop when printing error message

2007-03-01 Thread GHC
#1176: Infinite loop when printing error message ---+ Reporter: [EMAIL PROTECTED] | Owner: Type: bug| Status: new Priority: low|

[GHC] #1185: can't do I/O in the child of forkProcess with -threaded

2007-03-01 Thread GHC
#1185: can't do I/O in the child of forkProcess with -threaded ---+ Reporter: simonmar| Owner: Type: bug | Status: new Priority: normal | Milestone:

Re: [GHC] #1185: can't do I/O in the child of forkProcess with -threaded

2007-03-01 Thread GHC
#1185: can't do I/O in the child of forkProcess with -threaded +--- Reporter: simonmar| Owner: Type: bug | Status: new Priority: low |

Re: [GHC] #1156: usleep hangs indefinitely when using -threaded

2007-03-01 Thread GHC
#1156: usleep hangs indefinitely when using -threaded +--- Reporter: Eelis | Owner: Type: bug | Status: closed Priority: normal

Re: [GHC] #850: threaded RTS uses SIGALRM

2007-03-01 Thread GHC
#850: threaded RTS uses SIGALRM +--- Reporter: simonmar| Owner: Type: bug | Status: new Priority: normal | Milestone: 6.6.1 Component: Runtime

Re: [GHC] #1093: Windows: haddock-html fields are wrong in package.conf

2007-03-01 Thread GHC
#1093: Windows: haddock-html fields are wrong in package.conf --+- Reporter: simonmar | Owner: igloo Type: bug | Status: new Priority: normal| Milestone:

Re: [GHC] #970: GHCi crashes under Windows Millenium

2007-03-01 Thread GHC
#970: GHCi crashes under Windows Millenium --+- Reporter: guest | Owner: Type: bug | Status: closed Priority: normal| Milestone: 6.6.1 Component: GHCi

Re: [GHC] #976: GHCi crashes on Windows 98

2007-03-01 Thread GHC
#976: GHCi crashes on Windows 98 --+- Reporter: [EMAIL PROTECTED] | Owner: Type: bug | Status: closed Priority: normal| Milestone: 6.6.1 Component: GHCi

Re: ghc -fasm declared not too shabby

2007-03-01 Thread Simon Marlow
Donald Bruce Stewart wrote: Got some initial nobench numbers for ghc head -fvia-C versus -fasm, on amd64: http://www.cse.unsw.edu.au/~dons/nobench/x86_64/results.html Overall all of nobench, ghc -fasm averages 3% slower. Not too shabby! There's some wider variation on the microbenchmarks

Re: ghci and ghc -threaded broken with pipes forking

2007-03-01 Thread Simon Marlow
Ok, what happens here is that in the forked process there is only a single thread, the runtime kills all the other threads (as advertised). Unfortunately this includes the I/O manager thread, so as soon as you do some I/O in the forked process, you block. It might be possible to fix this,

Re: ghci and ghc -threaded broken with pipes forking

2007-03-01 Thread John Goerzen
On Thu, Mar 01, 2007 at 03:06:22PM +, Simon Marlow wrote: Ok, what happens here is that in the forked process there is only a single thread, the runtime kills all the other threads (as advertised). Unfortunately this includes the I/O manager thread, so as soon as you do some I/O in the

Re: ghci and ghc -threaded broken with pipes forking

2007-03-01 Thread Simon Marlow
John Goerzen wrote: On Thu, Mar 01, 2007 at 03:06:22PM +, Simon Marlow wrote: Ok, what happens here is that in the forked process there is only a single thread, the runtime kills all the other threads (as advertised). Unfortunately this includes the I/O manager thread, so as soon as you

Re: ghci and ghc -threaded broken with pipes forking

2007-03-01 Thread John Goerzen
On Thu, Mar 01, 2007 at 04:21:45PM +, Simon Marlow wrote: Between that and the lack of support for forkProcess in Hugs, this renders anything that needs to fork and then do I/O as being usable only in GHC-compiled code. Which is sub-optimal, but livable anyway. I guess I'm really

Re: ghci and ghc -threaded broken with pipes forking

2007-03-01 Thread Jeremy Shaw
At Thu, 1 Mar 2007 11:38:54 -0600, John Goerzen wrote: On Thu, Mar 01, 2007 at 04:21:45PM +, Simon Marlow wrote: Between that and the lack of support for forkProcess in Hugs, this renders anything that needs to fork and then do I/O as being usable only in GHC-compiled code. Which is

Re: ghci and ghc -threaded broken with pipes forking

2007-03-01 Thread Duncan Coutts
On Thu, 2007-03-01 at 11:04 -0800, Jeremy Shaw wrote: Some open questions are: a) how do you detect that you are running in the threaded RTS Currently the nearest approximation is: Control.Concurrent.rtsSupportsBoundThreads :: Bool Duncan ___

Re: [Haskell-cafe] State monad in the wikibood article

2007-03-01 Thread TJ
Matthew Brecknell: Note the lambda abstraction (\st - ...) at the beginning of the definition. This means that (container = fn) returns a *function* that maps an input state to the result of (container2 st2). It doesn't return the result of (container st2) directly. Ah. Silly me :D Thanks

[Haskell-cafe] Re: bytestring vs polymorphic contiguous lists

2007-03-01 Thread Duncan Coutts
On Thu, 2007-03-01 at 00:22 +, Claus Reinke wrote: The main example of course is ByteString fusion as presented in our recent paper: http://www.cse.unsw.edu.au/~dons/papers/CSL06.html btw, why did you restrict yourself to improving [Char], rather than [a]? We're not finished! :-) It's

Re: [Haskell-cafe] Re: OO Design in Haskell Example (Draft)

2007-03-01 Thread Steve Downey
The composite design pattern implemented using record types, where the named elements are the interface to the object Overall, I think I agree with Tim that the record types are simpler to code. I'm not sure, though, what would happen if I tried to add state to the types. With the previous

Re: [Haskell-cafe] splitting strings

2007-03-01 Thread Thomas Hartman
I think you want Text.Regex. splitRegex or something very much like it. http://haskell.org/hoogle/?q=String-%3E%5BString%5D 2007/3/1, h. [EMAIL PROTECTED]: Hello, I wrote the following split function for Strings: splitS :: String - String - [String] splitS a b = splitA a b where

Re: [Haskell-cafe] Automatic Recognition of Functors

2007-03-01 Thread Nicolas Frisby
This link might be what you are after: http://okmij.org/ftp/Haskell/typecast.html#deepest-functor On 3/1/07, Walter Potter [EMAIL PROTECTED] wrote: Folks, Given f:: a - b it is very natural to lift f to P f :: P a - P b where P is the power set functor. Or L f :: [a] - [b]. We are modeling

[Haskell-cafe] ANN: HSH 1.0.0

2007-03-01 Thread John Goerzen
Hello, I'm pleased to announce the first release of HSH. HSH is designed to let you mix and match shell expressions with Haskell programs. With HSH, it is possible to easily run shell commands, capture their output or provide their input, and pipe them to/from other shell commands and arbitrary

[Haskell-cafe] Whatever happened to Trex.hs

2007-03-01 Thread Adam Wyner
Hi, I'd been using trex.hs for extensible records and programmed a bit using it. I liked it for what it did and also because it had very nice documentation on how to use it. I know there are other proposals and implementations in Haskell for records (HaskellDB and HList), but for the time

Re: [Haskell-cafe] Re: OO Design in Haskell

2007-03-01 Thread P. R. Stanley
Hi folks forgive my ignorance but I thought functional programming was a mathematically sound framework unlike Object Oriented programming. Isn't using Haskell for OOP kind of defeating the whole object? And the pun wasn't deliberate./ Honest! Regards Paul

Re: [Haskell-cafe] Re: OO Design in Haskell

2007-03-01 Thread Neil Mitchell
Hi forgive my ignorance but I thought functional programming was a mathematically sound framework unlike Object Oriented programming. Referentially transparent is a better term than mathematically sound here. This is the property that x = y means that instances of x can be replaced with y.

Re: [Haskell-cafe] Build failed - hidden package ?

2007-03-01 Thread Ian Lynagh
On Tue, Feb 27, 2007 at 05:36:29AM +0100, Dunric wrote: Graphics/UI/SDL/Rotozoomer.hs:15:7: Could not find module `Foreign.C': it is a member of package base, which is hidden This is normally caused by forgetting to include build-depends: base in a .cabal file. When cabal

Re: [Haskell-cafe] Literate haskell format unclear (implementation and specification inconsistencies)

2007-03-01 Thread Ian Lynagh
On Wed, Feb 28, 2007 at 05:48:09PM -0500, Isaac Dupree wrote: Trying to implement literate haskell[*], I realized several ways in which the correct behavior for unliterating (especially with regard to errors) was unclear. I have several cases which ghc, hugs and Haskell 98 have differing

Re: [Haskell-cafe] Re: OO Design in Haskell

2007-03-01 Thread P. R. Stanley
Hi forgive my ignorance but I thought functional programming was a mathematically sound framework unlike Object Oriented programming. Referentially transparent is a better term than mathematically sound here. This is the property that x = y means that instances of x can be replaced with y.

Re: [Haskell-cafe] splitting strings

2007-03-01 Thread Matthew Brecknell
h. said: splitS :: String - String - [String] splitS a b = splitA a b where z = length b - 1 splitA [] _ = [] splitA (c:cs) (d:ds) | c == d fst s == ds = : splitA (snd s) b | otherwise = (c : head r) : tail r where r =