[Haskell-cafe] Re: [Haskell] Making 'Super Nario Bros' in Haskell

2008-10-30 Thread Achim Schneider
Eli Ford [EMAIL PROTECTED] wrote: Is there a better way than IORefs The state Monad. Do you mean one state shared among all actors, like this? type MGame = State GameState newtype GameState = GameState { shared state } That gets part of the way, but I'm thinking of a

[Haskell-cafe] is there a way to pretty print a module?

2008-10-30 Thread Anatoly Yakovenko
is there a way to pretty print a module? like: module Main where import Language.Haskell.TH main = do print $ pprint Main ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Re: is there a way to pretty print a module?

2008-10-30 Thread Achim Schneider
Anatoly Yakovenko [EMAIL PROTECTED] wrote: is there a way to pretty print a module? like: module Main where import Language.Haskell.TH main = do print $ pprint Main haskell-src should be able to do that. -- (c) this sig last receiving data processing entity. Inspect headers for

Re: [Haskell-cafe] Password hashing

2008-10-30 Thread roger peppe
if you're prepared to expend a few cpu cycles, you can always use something like the following beating clocks algorithm, which should generate at least some genuine randomness, as long as you've got preemptive scheduling, and a few hardware interrupts around the place. module Clockbeat where

[Haskell-cafe] LAST CALL: Haskell Communities and Activities Report

2008-10-30 Thread Janis Voigtlaender
Dear Haskellers, It is not yet too late to contribute to the 15th edition of the HCA Report. In fact, I will wait for a few more days. If you haven't already, please write an entry for your new project or update your old entry. Please mail your entries to [EMAIL PROTECTED] in plain text or

Re: [Haskell-cafe] Password hashing

2008-10-30 Thread Thomas Hartman
In my happs-tutorial application I do the following to keep passwords. No salt, but apart from that, should be fine, right? thomas. ** import qualified Data.ByteString.Char8 as B import qualified Data.ByteString.Lazy.Char8 as L -- store passwords as md5 hash, as a security measure

Re: [Haskell-cafe] Password hashing

2008-10-30 Thread roger peppe
i'd be interested to know if you know of any studies on this. i know of at least one system that uses it as the basis for its crypto. superficially it's certainly an attractive method, with minimal external dependencies, and, i'd have thought, at least a useful addition to just using the system

[Haskell-cafe] HDBC Oracle bindings(?/!)

2008-10-30 Thread Thiago Arrais
Are there Oracle bindings for HDBC anywhere? The HDBC project page talks about Oracle backends but there isn't an Oracle-specific driver listed (I assume one can reach an Oracle backend through the ODBC interface?). I started writing Oracle bindings for HDBC based on the Takusen code. It was done

Re: [Haskell-cafe] HDBC Oracle bindings(?/!)

2008-10-30 Thread Henning Thielemann
On Thu, 30 Oct 2008, Thiago Arrais wrote: Are there Oracle bindings for HDBC anywhere? The HDBC project page talks about Oracle backends but there isn't an Oracle-specific driver listed (I assume one can reach an Oracle backend through the ODBC interface?). I started writing Oracle bindings

Re: [Haskell-cafe] HDBC Oracle bindings(?/!)

2008-10-30 Thread Daniil Elovkov
Thiago Arrais wrote: Are there Oracle bindings for HDBC anywhere? The HDBC project page talks about Oracle backends but there isn't an Oracle-specific driver listed (I assume one can reach an Oracle backend through the ODBC interface?). Yes, I was a bit confused by that, as well. I started

Re[2]: [Haskell-cafe] Password hashing

2008-10-30 Thread Bulat Ziganshin
Hello Thomas, Thursday, October 30, 2008, 3:32:46 PM, you wrote: No salt, but apart from that, should be fine, right? 1) without salt, it's not serious - easily breaked by dictionary attack 2) afair, md5 isn't condidered now as cryptographic hash -- Best regards, Bulat

Re: [Haskell-cafe] Re: is there a way to pretty print a module?

2008-10-30 Thread Anatoly Yakovenko
is there a way to pretty print a module? like: module Main where import Language.Haskell.TH main = do print $ pprint Main haskell-src should be able to do that. I think haskell-src requires you to read the module at run time. I want to embed the contents of the module in my program.

Re: [Haskell-cafe] HDBC Oracle bindings(?/!)

2008-10-30 Thread John Goerzen
On Thu, Oct 30, 2008 at 11:38:28AM -0300, Thiago Arrais wrote: Are there Oracle bindings for HDBC anywhere? The HDBC project page talks about Oracle backends but there isn't an Oracle-specific driver listed (I assume one can reach an Oracle backend through the ODBC interface?). That is the

Re: [darcs-users] [Haskell-cafe] Poll: Do you need to be able to build darcs from source on GHC 6.6?

2008-10-30 Thread David Roundy
On Thu, Oct 30, 2008 at 12:16:17PM +1100, Trent W. Buck wrote: David Roundy [EMAIL PROTECTED] writes: And as far as bundled versions, it's the desire to *remove* a bundled version that's apparently at issue. I'm not sure why this is considered desirable, but apparently some folks feel

Re: [Haskell-cafe] Poll: Do you need to be able to build darcs from source on GHC 6.6?

2008-10-30 Thread Duncan Coutts
On Thu, 2008-10-30 at 12:16 +1100, Trent W. Buck wrote: David Roundy [EMAIL PROTECTED] writes: And as far as bundled versions, it's the desire to *remove* a bundled version that's apparently at issue. I'm not sure why this is considered desirable, but apparently some folks feel strongly

Re: [Haskell-cafe] Re: is there a way to pretty print a module?

2008-10-30 Thread Jason Dagit
On Thu, Oct 30, 2008 at 10:15 AM, Anatoly Yakovenko [EMAIL PROTECTED] wrote: is there a way to pretty print a module? like: module Main where import Language.Haskell.TH main = do print $ pprint Main haskell-src should be able to do that. I think haskell-src requires you to read the

Re: Re[2]: [Haskell-cafe] Password hashing

2008-10-30 Thread Daniel B. Giffin
to expand on this: Bulat Ziganshin wrote: 1) without salt, it's not serious - easily breaked by dictionary attack and this: Thomas Schilling wrote: In general, it is recommended that password hash functions are comparatively *slow* in order to make offline attacks harder. You can somewhat

[Haskell-cafe] Re: [darcs-users] Poll: Do you need to be able to build darcs from source on GHC 6.6?

2008-10-30 Thread Juliusz Chroboczek
Also, note that Lenny has 6.8, and it is scheduled to become stable Real Soon Now. That's irrelevant. Lenny going stable will not cause my servers to automatically get upgraded. FWIW, the experimental server is scheduled to switch to lenny in the summer of 2009. There is no ETA for the

[Haskell-cafe] Re: [darcs-users] Poll: Do you need to be able to build darcs from source on GHC 6.6?

2008-10-30 Thread Jason Dagit
On Thu, Oct 30, 2008 at 1:22 PM, Juliusz Chroboczek [EMAIL PROTECTED] wrote: Also, note that Lenny has 6.8, and it is scheduled to become stable Real Soon Now. That's irrelevant. Lenny going stable will not cause my servers to automatically get upgraded. FWIW, the experimental server is

[Haskell-cafe] Re: [darcs-users] Poll: Do you need to be able to build darcs from source on GHC 6.6?

2008-10-30 Thread Juliusz Chroboczek
I wanted to know if anyone who is using distros with 6.6 need to be able to build current releases of darcs from source. If there turns out to be a significant issue with Darcs 1, I need to be able to build a recent version of Darcs in my Debian stable chroot. The alternative is to build a

Re: [Haskell-cafe] Re: Why 'round' does not just round numbers ?

2008-10-30 Thread Bertram Felgenhauer
George Pollard wrote: There's also the ieee-utils package, which provides an IEEE monad with `setRound`: http://hackage.haskell.org/packages/archive/ieee-utils/0.4.0/doc/html/Numeric-IEEE-RoundMode.html Hmm, this does not work well with the threaded RTS: import Numeric.IEEE.Monad import

Re: [Haskell-cafe] Re: is there a way to pretty print a module?

2008-10-30 Thread Bertram Felgenhauer
Jason Dagit wrote: Could you use haskell-src from TH and then unsafePerformIO to get the reading to work during compile time? I've done something like this in the past with Language.Haskell and TH. I described it here: http://blog.codersbase.com/2006/09/01/simple-unit-testing-in-haskell/

[Haskell-cafe] Re: [darcs-users] Poll: Do you need to be able to build darcs from source on GHC 6.6?

2008-10-30 Thread Jason Dagit
On Thu, Oct 30, 2008 at 1:20 PM, Juliusz Chroboczek [EMAIL PROTECTED] wrote: I wanted to know if anyone who is using distros with 6.6 need to be able to build current releases of darcs from source. If there turns out to be a significant issue with Darcs 1, I need to be able to build a recent

Re: [Haskell-cafe] Re: [darcs-users] Poll: Do you need to be able to build darcs from source on GHC 6.6?

2008-10-30 Thread Don Stewart
dagit: On Thu, Oct 30, 2008 at 1:20 PM, Juliusz Chroboczek [EMAIL PROTECTED] wrote: I wanted to know if anyone who is using distros with 6.6 need to be able to build current releases of darcs from source. If there turns out to be a significant issue with Darcs 1, I need to be able to

[Haskell-cafe] Re: Problems with Windows

2008-10-30 Thread Felix Martini
Hi John, You don't have to compile hsc2hs yourself. It is part of the standard GHC installation. Cabal should be able to find it. You can check if it does by running runghc Setup.hs configure -v when configuring a package. Compiling network-2.2.0.0 against parsec-3.0.0 with msys/mingw worked fine

Re: [Haskell-cafe] Re: is there a way to pretty print a module?

2008-10-30 Thread Anatoly Yakovenko
i guess am missing something: $ cat ./test.hs {-# LANGUAGE TemplateHaskell#-} module Main where import Language.Haskell.TH import qualified Data.ByteString as BS embedFile :: FilePath - Q BS.ByteString embedFile ff = runIO $ BS.readFile ff main = do me - runQ $ embedFile ./test.hs

[Haskell-cafe] Cabal packaging problem - Build-Depends name for Network.Curl.Download?

2008-10-30 Thread Brian Troutwine
Hello all, I'm having a small bit of trouble using cabal to package a program I'm calling aule. I cannot build the program using cabal but can compile it using ghc directly. Here's my aule.config: Name:Aule Version: 0.2.0 Cabal-Version: = 1.2 Build-type:

Re: [Haskell-cafe] Cabal packaging problem - Build-Depends name for Network.Curl.Download?

2008-10-30 Thread Don Stewart
goofyheadedpunk: Hello all, I'm having a small bit of trouble using cabal to package a program I'm calling aule. I cannot build the program using cabal but can compile it using ghc directly. Here's my aule.config: Name:Aule Version: 0.2.0 Cabal-Version:

Re: [Haskell-cafe] Re: is there a way to pretty print a module?

2008-10-30 Thread Anatoly Yakovenko
cool, i found this: http://www.nabble.com/template-haskellinclude-a-file--td19462913.html $ cat test.hs {-# LANGUAGE TemplateHaskell#-} module Main where import Language.Haskell.TH import EmbedStr me = $(embedStr $ readFile ./test.hs) main = do print $ me $ cat EmbedStr.hs {-#

Re: [Haskell-cafe] Password hashing

2008-10-30 Thread Brandon S. Allbery KF8NH
On 2008 Oct 30, at 8:43, Martijn van Steenbergen wrote: roger peppe wrote: if you're prepared to expend a few cpu cycles, you can always use something like the following beating clocks algorithm, which should generate at least some genuine randomness, as long as you've got preemptive

Re: [Haskell-cafe] Password hashing

2008-10-30 Thread Brandon S. Allbery KF8NH
On 2008 Oct 30, at 9:12, roger peppe wrote: i'd be interested to know if you know of any studies on this. i know of at least one system that uses it as the basis for its crypto. superficially it's certainly an attractive method, with minimal external dependencies, and, i'd have thought, at