Re: [Haskell-cafe] Code from Haskell School of Expression hanging.

2011-01-29 Thread Brandon S Allbery KF8NH
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 1/29/11 21:27 , michael rice wrote: > I'm using the OpenGL stuff (GLFW). Same set of problems? None of the lower level libraries support multithreading. If any of those libraries use FFI bindings that run in a bound thread, they'll fail in the thr

Re: [Haskell-cafe] Haskell for children? Any experience?

2011-01-29 Thread Brandon S Allbery KF8NH
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 1/30/11 00:24 , Brandon S Allbery KF8NH wrote: > Isn't there already a body of evidence that people who've never been exposed > to procedural languages find functional programming to be much more natural? Also worth pointing out is that kids get ma

Re: [Haskell-cafe] Haskell for children? Any experience?

2011-01-29 Thread Brandon S Allbery KF8NH
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 1/27/11 10:28 , aditya siram wrote: > Haskell's immutability is good for mathematics but doing anything else > takes a great deal of up-front patience and perseverance, two very > rare qualities in that demographic if my own childhood is any > indic

Re: [Haskell-cafe] Haskell for children? Any experience?

2011-01-29 Thread Brandon S Allbery KF8NH
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 1/27/11 10:26 , Stephen Tetley wrote: > John Peterson had some nice work using Haskore and Fran for elementary > teaching on the old Haskell.org website. Google's cache says the old > URL was here but its now vanished: > > www.haskell.org/edsl/camp

Re: [Haskell-cafe] Code from Haskell School of Expression hanging.

2011-01-29 Thread michael rice
The sample program (the "active" version) here runs fine, so  the OpenGL GLFW must have been installed properly. Must be the SOE stuff causing the problem. http://www.haskell.org/haskellwiki/GLFW Michael --- On Sat, 1/29/11, Daniel Fischer wrote: From: Daniel Fischer Subject: Re: [Haskell-c

Re: [Haskell-cafe] Code from Haskell School of Expression hanging.

2011-01-29 Thread michael rice
I'm using the OpenGL stuff (GLFW). Same set of problems? Michael --- On Sat, 1/29/11, Daniel Fischer wrote: From: Daniel Fischer Subject: Re: [Haskell-cafe] Code from Haskell School of Expression hanging. To: haskell-cafe@haskell.org Cc: "michael rice" Date: Saturday, January 29, 2011, 9:11 P

Re: [Haskell-cafe] Code from Haskell School of Expression hanging.

2011-01-29 Thread Daniel Fischer
On Sunday 30 January 2011 02:49:27, michael rice wrote: > I got Hudak's Haskell School of Expression today and just tried a couple > of the graphics programs from the software I downloaded at the book > site. Both seem to hang on opening a window. Is there a fix for this > problem? I'm on a Fedora

[Haskell-cafe] Code from Haskell School of Expression hanging.

2011-01-29 Thread michael rice
I got Hudak's Haskell School of Expression today and just tried a couple of the graphics programs from the software I downloaded at the book site. Both seem to hang on opening a window. Is there a fix for this problem? I'm on a Fedora 14 Linux (32-bit) box running GHC version 6.12.3. Michael =

Re: [Haskell-cafe] [Haskell] A few days to go before the old server goes down

2011-01-29 Thread Henk-Jan van Tuyl
On Sat, 29 Jan 2011 18:52:15 +0100, Henning Thielemann wrote: Is it possible to create a tarball of the contents of the oldhaskell.yale server in order to assert that nothing gets lost? We have already lost useful information contained in the old hawiki, now the same seems to happen with non-

Re: [Haskell-cafe] Fwd: web-routes and forms

2011-01-29 Thread Corentin Dupont
Thanks On Sat, Jan 29, 2011 at 11:33 AM, Jasper Van der Jeugt wrote: > Hello, > > I've backported the `inputHidden` combinator to the 0.0.2 branch, you > can find it on hackage as digestive-functors-blaze-0.0.2.2. > > Hope this helps, > Cheers, > Jasper > > On Fri, Jan 28, 2011 at 8:10 PM, Co

Re: [Haskell-cafe] Instantiation problem

2011-01-29 Thread Henning Thielemann
Patrick Browne schrieb: > Below is some code that is produces information about the *types* used > for measuring (e.g. metres). The following evaluation returns 1.00 > which the convert factor for metres. > > convertFactorToBaseUnit (unit (LengthInMetres 7)) > . > The next evaluation returns the

Re: [Haskell-cafe] tricky recursive type instance method

2011-01-29 Thread Henning Thielemann
Frank Kuehnel schrieb: > Hi folks, > > how do I make this work: I want a division algebra over a field k, and I want > to define > the conjugation of complex numbers, i.e. conj (C 1 2) but also the > conjugation of tensors of complex numbers > conj (C (C 1 2) (C 1 4)) > > ghci load that stuff b

[Haskell-cafe] Haddock : Synopsis box too big for monitor.

2011-01-29 Thread aditya siram
Hi all, The new Synopsis box in the API docs expands beyond the monitor for functions that have long signatures. An example is the TreeView documentation [1] in the gtk package. I have only tested Firefox. -deech [1] http://hackage.haskell.org/packages/archive/gtk/0.12.0/doc/html/Graphics-UI-G

Re: [Haskell-cafe] Playing sounds in Haskell

2011-01-29 Thread Edward Amsden
I believe that the SDL bindings provide a way to play sounds from a file. I know SDL works on windows, I'm not sure if the Haskell bindings do. I've also not had to use that capability of the bindings, so I can't speak to ease of use. However, it's something to look at. http://hackage.haskell.org/

Re: [Haskell-cafe] Using IsString with attoparsec

2011-01-29 Thread Yitzchak Gale
I wrote: >>> I suggest adding the following type-specialized variants to >>> Data.Attoparsec.Char8: >>> >>> (<*.) :: Applicative f => f a -> f ByteString -> f a >>> (<*.) = (<*) >>> >>> (.*>) :: Applicative f => f ByteString -> f a -> f a >>> (.*>) = (*>) Bryan O'Sullivan wrote: >> Sounds reasonab

Re: [Haskell-cafe] 3GB allocation, 75% CPU usage from a callback function

2011-01-29 Thread Bas van Dijk
On 29 January 2011 18:22, Neil Brown wrote: > ...you were also using an extra readIORef as part of the modifyIORef that you > didn't need... Indeed and writing the t+1 strictly to the ioref also makes it slightly faster (~2%): writeIORef ioref $! t+1 Bas __

[Haskell-cafe] ANNOUNCE: Parsec 3.1.1

2011-01-29 Thread Antoine Latter
Parsec is a monadic combinator library that is well-documented, simple to use, and produces good error messages. Parsec is not inherently lazy/incremental and is not well-suited to handling large quantities of simply formatted data. Parsec 3 added to Parsec the ability to use Parsec as a monad t

Re: [Haskell-cafe] [Haskell] A few days to go before the old server goes down

2011-01-29 Thread Henning Thielemann
Henk-Jan van Tuyl schrieb: > > L.S., > > Only four days until the old Haskell.org server disappears; I found the > following missing: > > http://www.haskell.org/yale/ > http://darcs.haskell.org/hfuse/ > http://haskell.org/gtk2hs/ > http://haskell.org/FranTk > http://www.haskell.org/yampa/ > http

Re: [Haskell-cafe] 3GB allocation, 75% CPU usage from a callback function

2011-01-29 Thread Edward Amsden
Thanks much! On Sat, Jan 29, 2011 at 12:01 PM, Daniel Fischer wrote: > On Saturday 29 January 2011 17:29:02, Edward Amsden wrote: >> (Note that the function produced by newSinWave is the one actually >> registered as a callback: >> >> newSinWave :: Int -> Float -> IO (CFloat -> IO CFloat) >> newS

Re: [Haskell-cafe] Playing sounds in Haskell

2011-01-29 Thread Henning Thielemann
Nikitiskiy Dmitriy schrieb: > 29.01.2011 18:03, Daniel Díaz пишет: >> Hi, cafe, >> >> I'm interested in write a program that plays sounds in real time. There is >> a library with functions able to play sounds, from a file? >> >> I'm on Windows, and I don't need special features, only play sounds in

Re: [Haskell-cafe] 3GB allocation, 75% CPU usage from a callback function

2011-01-29 Thread Neil Brown
Hi, First of all, don't be fooled by the alloc statistic. That is not 3GB memory residency, that's 3GB allocation, which was interspersed with lots of garbage collections, in the same way that measuring how many times malloc was called in a C program doesn't necessarily indicate memory resid

Re: [Haskell-cafe] Playing sounds in Haskell

2011-01-29 Thread Nikitiskiy Dmitriy
29.01.2011 18:03, Daniel Díaz пишет: > Hi, cafe, > > I'm interested in write a program that plays sounds in real time. There is > a library with functions able to play sounds, from a file? > > I'm on Windows, and I don't need special features, only play sounds in a > comfortable way. Thanks in adva

Re: [Haskell-cafe] 3GB allocation, 75% CPU usage from a callback function

2011-01-29 Thread Daniel Fischer
On Saturday 29 January 2011 17:29:02, Edward Amsden wrote: > (Note that the function produced by newSinWave is the one actually > registered as a callback: > > newSinWave :: Int -> Float -> IO (CFloat -> IO CFloat) > newSinWave sampleRate freq = > do ioref <- newIORef (0::Integer) > let multip

[Haskell-cafe] 3GB allocation, 75% CPU usage from a callback function

2011-01-29 Thread Edward Amsden
I recently got the jack package from hackage working again. For those unfamiliar, jack is a callback-based audio server. Writing a client entails importing the C library or its bindings (the Sound.JACK module in my case), creating a client and some ports (using provided library functions), and then

[Haskell-cafe] Playing sounds in Haskell

2011-01-29 Thread Daniel Díaz
Hi, cafe, I'm interested in write a program that plays sounds in real time. There is a library with functions able to play sounds, from a file? I'm on Windows, and I don't need special features, only play sounds in a comfortable way. Thanks in advance. -- Daniel Díaz _

[Haskell-cafe] Loading bitmap with xlib

2011-01-29 Thread Francesco Mazzoli
I am trying to load a bitmap and display it with the Xlib bindings, but I wasn't able to find a way. The C Xlib functions would be XReadBitmapFile() of XReadBitmapFileData() to read the data, but it seems that those functions haven't been included in the haskell bindings. From http://hackage.haskel

Re: [Haskell-cafe] Splittable random numbers

2011-01-29 Thread Ryan Newton
> > perhaps performance? Is this approach less robust with a faster, > non-cryptographic RNG? > Yes, I don't understand that either. Is there a reason that using a weaker PRNG in this case is WORSE than using it in the non-splitting case? Is that why there is more of an impetus to use the crypto

Re: [Haskell-cafe] Instantiation problem

2011-01-29 Thread Patrick Browne
Steffen, Thank you very much for taking the time to solve my problem. Pat On 29/01/2011 12:18, Steffen Schuldenzucker wrote: > unit l = Centimetre This message has been scanned for content and viruses by the DIT Information Services E-Mail Scanning Service, and is believed to be clean. http:/

Re: [Haskell-cafe] Instantiation problem

2011-01-29 Thread Steffen Schuldenzucker
Hi, Your definition of 'unit' in the instance MetricDescription LengthInCentimetres Centimetre is not well-typed. Maybe you want to write either unit (LengthInCentimitres 2.0) = Centimetre -- (pattern match fail for all (LengthInCentimetres l), l /= 2.0) or unit l = Centimetre -- i.e. unit

Re: [Haskell-cafe] Fwd: web-routes and forms

2011-01-29 Thread Jasper Van der Jeugt
Hello, I've backported the `inputHidden` combinator to the 0.0.2 branch, you can find it on hackage as digestive-functors-blaze-0.0.2.2. Hope this helps, Cheers, Jasper On Fri, Jan 28, 2011 at 8:10 PM, Corentin Dupont wrote: > Hello again, > is there a way to had a "hidden" field in digestive-f