Re: [Haskell-cafe] Splittable random numbers

2011-01-21 Thread Ryan Newton
On Wed, Nov 10, 2010 at 11:33 AM, Lauri Alanko wrote: > So a naive implementation of split would be: > > split g = (mkGen seed, g') > where (seed, g') = random g Just to be clear, that is the same as Burton Smith's original proposal that Simon mentioned at the outset, right? Specifically, Smith

Re: [Haskell-cafe] Splittable random numbers

2011-01-21 Thread Ryan Newton
I'm not too familiar with all the Haskell API's for RNGs. This is the first time I've looked at CryptoRandomGen, but I can see the benefit of having a bytestring interface rather than the System.Random Int based one. Is there a reason that the AES implementation in the "AES" or "crypto" packages

Re: [Haskell-cafe] Proposal: Applicative => Monad: Call for consensus

2011-01-21 Thread Casey Hawthorne
uj supplied this: About the discussion "putStrLn (readLn + (5 :: Int))".. I'll write it as the following line, importing Control.Applicative main = (+) readLn (return 3) They look almost exactly same in my eyes.. On Fri, 21 Jan 2011 11:01:36 -0800, you wrote: >Interesting little paper, Ty

Re: [Haskell-cafe] source line annotations

2011-01-21 Thread Brandon S Allbery KF8NH
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 1/19/11 17:43 , Evan Laforge wrote: > My preprocessor works well, but occasionally I do have to go in and > fix yet another odd corner that came up. Initially I thought I would > only simplistically replace tokens and avoid using a full syntax > pa

Re: [Haskell-cafe] Data.Ranges show error

2011-01-21 Thread Aaron Gray
On 22 January 2011 02:32, Aaron Gray wrote: > I am getting the following error when trying to do a show on a Ranges > object :- > > C:\Languages\Haskell>ghci rangeTest.hs > GHCi, version 6.12.3: http://www.haskell.org/ghc/ :? for help > Loading package ghc-prim ... linking ... done. > Loading pa

[Haskell-cafe] Data.Ranges show error

2011-01-21 Thread Aaron Gray
I am getting the following error when trying to do a show on a Ranges object :- C:\Languages\Haskell>ghci rangeTest.hs GHCi, version 6.12.3: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done. Loading package integer-gmp ... linking ... done. Loading package bas

Re: [Haskell-cafe] Splittable random numbers

2011-01-21 Thread John Meacham
On Wed, Nov 10, 2010 at 11:33 AM, Lauri Alanko wrote: > So a naive implementation of split would be: > > split g = (mkGen seed, g') >  where (seed, g') = random g > > (Where mkGen creates a new state from some sufficiently big seed > data.) > > So what is the problem here? What kinds of observable

Re: [Haskell-cafe] windows network programming

2011-01-21 Thread Albert Y. C. Lai
On 11-01-21 03:13 AM, Tako Schotanus wrote: Just starting out here so I don't know what I'm doing yet, but this one doesn't compile for me. ping.hs:19:13: parse error on input `<-' The original code contains no parse error. When you tranfer it to your editor, you may accidentally change i

Re: [Haskell-cafe] Splittable random numbers

2011-01-21 Thread Ryan Newton
Hi cafe, I want to add the ability to use AES-NI instructions on Intel architectures to GHC. Mainly I'd like to do splittable random number generators based on AES as was suggested at the outset of this email. (I met Burton Smith last week and this topic came up.) I was just reading the below t

Re: [Haskell-cafe] Problems installing the haskell platform

2011-01-21 Thread Albert Y. C. Lai
On 11-01-19 08:52 AM, Henry Laxen wrote: Greetings. I've been using haskell for about a year now, though I will readily admit I still don't really know what I am doing when I get error messages. Today I decided to reset my haskell environment from scratch, avoiding the debian packages and going

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

2011-01-21 Thread Corentin Dupont
Hello Jeremy, I'm still trying to integrate web routes, but there is one thing I don't understand: how to deal with multiple forms? In my former application, each forms used to redirect to a subdirectory of the web site, and an appropriate handler was waiting there. But now with web routes I don't

Re: [Haskell-cafe] Proposal: Applicative => Monad: Call for consensus

2011-01-21 Thread Ryan Ingram
Interesting little paper, Tyson. You bring up other programming languages and 'ad-hoc systems for resolving ambiguities'; I agree with you that these systems generally have no strong theoretical basis, but I'm not sure that's a terribly bad thing. I think what a programmer actually wants from amb

Re: [Haskell-cafe] Proposal: Applicative => Monad: Call for consensus

2011-01-21 Thread Tyson Whitehead
On January 19, 2011 15:28:33 Conor McBride wrote: > In each case, the former has (++) acting on lists of strings as pure > values, > while the latter has (++) acting on strings as values given in > []-computations. > > The type [String] determines a domain, it does not decompose uniquely > to a >

[Haskell-cafe] CfP: The 9th International Conference on SOFTWARE ENGINEERING AND FORMAL METHODS (SEFM'11)

2011-01-21 Thread Juan Manuel Crespo
CALL FOR PAPERS - SEFM 2011 The 9th International Conference on SOFTWARE ENGINEERING AND FORMAL METHODS (SEFM) 14-18 November 2011 Montevideo, Uruguay URL: http://www.fing.edu.uy/inco/eventos/SEFM2011 ++ IMPORTANT DATES * Title and abstract submission de

Re: [Haskell-cafe] Looking for criticism and comments on web-mongrel2.

2011-01-21 Thread Henk-Jan van Tuyl
On Fri, 21 Jan 2011 13:30:07 +0100, Clint Moore wrote: After sufficient hand-wringing I finally uploaded web-mongrel2 up to hackage and I'm interested in criticism of my approach. The module itself is terribly simple as it's meant to provide a lightweight layer between an application or framew

Re: [Haskell-cafe] Are constructors strict?

2011-01-21 Thread Jan Christiansen
On 21.01.2011, at 11:52, Daryoush Mehrtash wrote: Do I have to have MonadPlus m or would any other Monad class work the same way? Not all monad instances satisfy undefined >>= return . Just = undefined if that's what you are asking for. For example, consider the identity monad. in

Re: [Haskell-cafe] [web-devel] Looking for criticism and comments on web-mongrel2.

2011-01-21 Thread Michael Snoyman
On Fri, Jan 21, 2011 at 3:55 PM, Clint Moore wrote: > On Fri, Jan 21, 2011 at 5:44 AM, Michael Snoyman wrote: >> Glad to hear you were already working on the bytestring switch, I hope >> I didn't focus on that too much ;). If you *are* planning on writing a > > Naw, you didn't.  Using bytestrings

Re: [Haskell-cafe] [web-devel] Looking for criticism and comments on web-mongrel2.

2011-01-21 Thread Clint Moore
On Fri, Jan 21, 2011 at 5:44 AM, Michael Snoyman wrote: > Glad to hear you were already working on the bytestring switch, I hope > I didn't focus on that too much ;). If you *are* planning on writing a Naw, you didn't. Using bytestrings as much as possible especially when dealing with network se

Re: [Haskell-cafe] [web-devel] Looking for criticism and comments on web-mongrel2.

2011-01-21 Thread Michael Snoyman
On Fri, Jan 21, 2011 at 3:40 PM, Clint Moore wrote: > On Fri, Jan 21, 2011 at 5:28 AM, Michael Snoyman wrote: >> On Fri, Jan 21, 2011 at 2:30 PM, Clint Moore wrote: >> Looks like you've done a good job so far, and have even put in a fair >> amount of docs. Impressive! Just some minor thoughts: >

Re: [Haskell-cafe] Looking for criticism and comments on web-mongrel2.

2011-01-21 Thread Clint Moore
On Fri, Jan 21, 2011 at 5:30 AM, Vo Minh Thu wrote: > The link given on hackage to git is broken, it seems to be > web-mongrel2 instead of haskell-mongrel2. If you click on the latest version the link should be correct. And yes, it's web-mongrel2 - I caught that SECONDS after uploading it to hac

Re: [Haskell-cafe] [web-devel] Looking for criticism and comments on web-mongrel2.

2011-01-21 Thread Clint Moore
On Fri, Jan 21, 2011 at 5:28 AM, Michael Snoyman wrote: > On Fri, Jan 21, 2011 at 2:30 PM, Clint Moore wrote: > Looks like you've done a good job so far, and have even put in a fair > amount of docs. Impressive! Just some minor thoughts: Well thanks for the encouragement! > * I think you should

Re: [Haskell-cafe] Looking for criticism and comments on web-mongrel2.

2011-01-21 Thread Michael Snoyman
On Fri, Jan 21, 2011 at 3:30 PM, Vo Minh Thu wrote: > 2011/1/21 Clint Moore : >> After sufficient hand-wringing I finally uploaded web-mongrel2 up to >> hackage and I'm interested in criticism of my approach.  The module >> itself is terribly simple as it's meant to provide a lightweight layer >>

Re: [Haskell-cafe] Looking for criticism and comments on web-mongrel2.

2011-01-21 Thread Vo Minh Thu
2011/1/21 Clint Moore : > After sufficient hand-wringing I finally uploaded web-mongrel2 up to > hackage and I'm interested in criticism of my approach.  The module > itself is terribly simple as it's meant to provide a lightweight layer > between an application or framework and Mongrel2, but if no

Re: [Haskell-cafe] [web-devel] Looking for criticism and comments on web-mongrel2.

2011-01-21 Thread Michael Snoyman
On Fri, Jan 21, 2011 at 2:30 PM, Clint Moore wrote: > After sufficient hand-wringing I finally uploaded web-mongrel2 up to > hackage and I'm interested in criticism of my approach.  The module > itself is terribly simple as it's meant to provide a lightweight layer > between an application or fram

[Haskell-cafe] Looking for criticism and comments on web-mongrel2.

2011-01-21 Thread Clint Moore
After sufficient hand-wringing I finally uploaded web-mongrel2 up to hackage and I'm interested in criticism of my approach. The module itself is terribly simple as it's meant to provide a lightweight layer between an application or framework and Mongrel2, but if nothing else, it's a start. Anywa

Re: [Haskell-cafe] hledger: mtl vs transformers

2011-01-21 Thread Simon Michael
On 1/20/11 10:02 PM, Michael Snoyman wrote: > Couldn't you depend on either version of mtl? I currently depend on "mtl", no version.. am I missing your point ? On 1/21/11 2:50 AM, Dmitry Astapov wrote: > something pulled in newer "process" in the process, which caused another wave of rebuilds.

Re: [Haskell-cafe] hledget: mtv vs transformers

2011-01-21 Thread Michael Snoyman
On Fri, Jan 21, 2011 at 12:50 PM, Dmitry Astapov wrote: > > > On Fri, Jan 21, 2011 at 8:02 AM, Michael Snoyman > wrote: >> >> Couldn't you depend on either version of mtl? > > Point is that in this particular case two different versions of mtl are > being pulled in the compilation by different de

Re: [Haskell-cafe] Are constructors strict?

2011-01-21 Thread Daryoush Mehrtash
> loop = MonadPlus m => m Bool > loop = loop > > If we apply Just to loop as follows > > test2 :: MonadPlus m => m (Maybe Bool) > test2 = loop >>= return . Just > > the evaluation of test2 does not terminate because >>= has to evaluate > loop. But this does not correctly reflect the behaviou

Re: [Haskell-cafe] hledget: mtv vs transformers

2011-01-21 Thread Dmitry Astapov
On Fri, Jan 21, 2011 at 8:02 AM, Michael Snoyman wrote: > Couldn't you depend on either version of mtl? > Point is that in this particular case two different versions of mtl are being pulled in the compilation by different dependencies. Plus, transformers 0.2.* is selected as well. Cabal reasons

Re: [Haskell-cafe] hledget: mtv vs transformers

2011-01-21 Thread Dmitry Astapov
On Fri, Jan 21, 2011 at 3:37 AM, Simon Michael wrote: > You mean mtl 2.*, right ? > > Yes that is a problem. I'm nervous about requiring mtl 2 because when I > bumped hledger 0.13's process dependency to 0.14 for similar reasons it made > all kinds of trouble for folks who just want to install th

Re: [Haskell-cafe] Where is the CABAL file for haskell-platform 2010.2.0.0?

2011-01-21 Thread Magnus Therning
On Fri, Jan 21, 2011 at 10:30, Gregory Collins wrote: > On Thu, Jan 20, 2011 at 4:38 PM, Magnus Therning wrote: >> % curl -s http://code.haskell.org/haskell-platform/haskell-platform.cabal | >> head >> ... >> Where can I find the cabal file for 2010.2.0.0 until 2011.1.0.0 is >> formally released

Re: [Haskell-cafe] Where is the CABAL file for haskell-platform 2010.2.0.0?

2011-01-21 Thread Gregory Collins
On Thu, Jan 20, 2011 at 4:38 PM, Magnus Therning wrote: > % curl -s http://code.haskell.org/haskell-platform/haskell-platform.cabal | > head > ... > Where can I find the cabal file for 2010.2.0.0 until 2011.1.0.0 is > formally released (or will it be 2011.2.0.0 as the release plan says)? > Will t

Re: [Haskell-cafe] Are constructors strict?

2011-01-21 Thread Sebastian Fischer
sorry, forgot to cc cafe. On Fri, Jan 21, 2011 at 7:12 PM, Sebastian Fischer wrote: > Hi Daryoush, > > On Fri, Jan 21, 2011 at 6:18 AM, Daryoush Mehrtash wrote: > >> I am having hard time understanding the following paragraph in "Purely >> functional Lazy non-deterministic programing" paper >> h

Re: [Haskell-cafe] windows network programming

2011-01-21 Thread Tako Schotanus
Just starting out here so I don't know what I'm doing yet, but this one doesn't compile for me. ping.hs:19:13: parse error on input `<-' So am I doing something stupid here or is there something wrong with the code? -Tako On Fri, Jan 21, 2011 at 04:48, Michael Litchard wrote: > freenode fi

Re: [Haskell-cafe] Are constructors strict?

2011-01-21 Thread Jan Christiansen
On 20.01.2011, at 22:18, Daryoush Mehrtash wrote: I am having hard time understanding the following paragraph in "Purely functional Lazy non-deterministic programing" paper http://www.cs.rutgers.edu/~ccshan/rational/lazy-nondet.pdf The problem with the naive monadic encoding of non-determi