Re: [Haskell-cafe] Rotating backdrop (aka learning Haskell)

2008-06-03 Thread Yann Golanski
First version is available at: http://www.kierun.org/backdropper-1.0.tbz2 It is minimal but does the trick of randomly rotating backgrounds. Features to add are only rotate during work hours, making sure that all images are shown within a day and a nice GUI. Criticism welcome. -- [EMAIL

Re: [Haskell-cafe] Rotating backdrop (aka learning Haskell)

2008-05-25 Thread Lauri Alanko
On Tue, May 20, 2008 at 09:15:57AM +0100, Yann Golanski wrote: 1- Get a list out of a file: I managed to do that using the following: parseImageFile :: FilePath - IO [String] parseImageFile file = do inpStr - readFile file return $ filter (/=) (breaks (=='\n')

Re: [Haskell-cafe] Rotating backdrop (aka learning Haskell)

2008-05-21 Thread Yann Golanski
Quoth Derek Elkins on Tue, May 20, 2008 at 11:45:57 -0500 On Tue, 2008-05-20 at 10:55 +0200, Ketil Malde wrote: Yann Golanski [EMAIL PROTECTED] writes: 1- Get a list out of a file: I managed to do that using the following: parseImageFile :: FilePath - IO [String] parseImageFile

[Haskell-cafe] Rotating backdrop (aka learning Haskell)

2008-05-20 Thread Yann Golanski
To help me learn Haskell, I decided on a simple (AH!) problem: given a list of images, display a random one as my desktop backdrop. After some time, change the image. Simple? What I actually want to do is a little more specific: Read a list of images (one per line) from a file. Given that a

Re: [Haskell-cafe] Rotating backdrop (aka learning Haskell)

2008-05-20 Thread Ketil Malde
Yann Golanski [EMAIL PROTECTED] writes: 1- Get a list out of a file: I managed to do that using the following: parseImageFile :: FilePath - IO [String] parseImageFile file = do inpStr - readFile file return $ filter (/=) (breaks (=='\n') inpStr) Nice, simple and I

Re: [Haskell-cafe] Rotating backdrop (aka learning Haskell)

2008-05-20 Thread Spencer Janssen
On Tue, May 20, 2008 at 09:15:57AM +0100, Yann Golanski wrote: To help me learn Haskell, I decided on a simple (AH!) problem: given a list of images, display a random one as my desktop backdrop. After some time, change the image. Simple? What I actually want to do is a little more

Re: [Haskell-cafe] Rotating backdrop (aka learning Haskell)

2008-05-20 Thread Bulat Ziganshin
Hello Yann, Tuesday, May 20, 2008, 12:15:57 PM, you wrote: To help me learn Haskell, I decided on a simple (AH!) problem: given a list of images, display a random one as my desktop backdrop. After some time, change the image. Simple? what you try to implements looks like too large

Re: [Haskell-cafe] Rotating backdrop (aka learning Haskell)

2008-05-20 Thread Derek Elkins
On Tue, 2008-05-20 at 10:55 +0200, Ketil Malde wrote: Yann Golanski [EMAIL PROTECTED] writes: 1- Get a list out of a file: I managed to do that using the following: parseImageFile :: FilePath - IO [String] parseImageFile file = do inpStr - readFile file

Re: [Haskell-cafe] Rotating backdrop (aka learning Haskell)

2008-05-20 Thread Ryan Ingram
Rather than golfing your questions (which seems popular), I'll try to give you some concrete answers. First off, I agree with Bulat that this is probably too large of a first project; doing it in pieces seems like it would be a lot simpler. In particular if the file changes, ... isn't a