Re: [Haskell-cafe] Errors in non-monadic code

2013-08-19 Thread Patrick Mylund Nielsen
On Mon, Aug 19, 2013 at 5:24 PM, Tom Ellis tom-lists-haskell-cafe-2...@jaguarpaw.co.uk wrote: On Mon, Aug 19, 2013 at 05:15:39PM -0400, jabolo...@google.com wrote: But I would like to see more code move away from exceptions and into types like Maybe or Either or other types defined for the

Re: [Haskell-cafe] question about indentation conventions

2013-07-01 Thread Patrick Mylund Nielsen
I prefer the other style--as do others, evidently (see the example in my first reply.) I agree that this was a good discussion, but let's not conclude so easily that the entire community is in favor of one thing or the other. On Mon, Jul 1, 2013 at 8:24 PM, Richard Cobbe co...@ccs.neu.edu wrote:

Re: [Haskell-cafe] question about indentation conventions

2013-06-30 Thread Patrick Mylund Nielsen
The Haskell Style Guide is quite popular: https://github.com/tibbe/haskell-style-guide/blob/master/haskell-style.md (accompying elisp module: https://github.com/tibbe/haskell-style-guide/blob/master/haskell-style.el) I am not sure what the verdict is on functions spanning multiple lines, other

Re: [Haskell-cafe] how do i get cabal to reinstall dependencies with profiling enabled?

2013-04-17 Thread Patrick Mylund Nielsen
My simple way is to move ~/.ghc (or ~/.ghc and ~/.cabal) somewhere else, then make (e.g. by running cabal update) or edit ~/.cabal/config to say library profiling, executable profiling and documentation: True, then run cabal install on one of my projects. On Wed, Apr 17, 2013 at 5:13 PM,

Re: [Haskell-cafe] websockets client

2013-02-21 Thread Patrick Mylund Nielsen
Yes, Jasper's websockets has a client in recent versions that works really nicely since server and client have the same APIs. The example was a little hidden: https://github.com/jaspervdj/websockets/blob/master/example/client.hs On Thu, Feb 21, 2013 at 10:09 PM, Stephen Olsen

Re: [Haskell-cafe] 9.3 - (2 * 4.5) = 0.3000000000000007

2013-01-16 Thread Patrick Mylund Nielsen
Fun with floating point! # ghci GHCi, version 7.4.2: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done. Loading package integer-gmp ... linking ... done. Loading package base ... linking ... done. Prelude 9223372036854775807.0 == 9223372036854775808 True

Re: [Haskell-cafe] 9.3 - (2 * 4.5) = 0.3000000000000007

2013-01-16 Thread Patrick Mylund Nielsen
This may be of interest if you want full-precision decimals: http://www.haskell.org/haskellwiki/Libraries_and_tools/Mathematics#Decimal_numbers On Wed, Jan 16, 2013 at 7:30 AM, Patrick Mylund Nielsen hask...@patrickmylund.com wrote: Fun with floating point! # ghci GHCi, version 7.4.2: http

Re: [Haskell-cafe] Fighting research paper bit-rot

2012-12-21 Thread Patrick Mylund Nielsen
Thanks, this had me pretty confused too. STM.check itself also differs from in earlier versions of the library where it returned () or undefined. On Fri, Dec 21, 2012 at 8:35 PM, cheater cheater cheate...@gmail.comwrote: Hi guys, after yet another episode of trying to figure out why library

Re: [Haskell-cafe] [Security] Put haskell.org on https

2012-10-28 Thread Patrick Mylund Nielsen
PGP tends to present many usability issues, and in this case it would make more sense/provide a clearer win if there were many different, semi-untrusted hackage mirrors. Just enable HTTPS and have Cabal validate the server certificate against a CA pool of one. PKI/trusting obscure certificate

Re: [Haskell-cafe] [Security] Put haskell.org on https

2012-10-28 Thread Patrick Mylund Nielsen
), have Google/the browser vendors pin the public cert for haskell.org. On Mon, Oct 29, 2012 at 12:45 AM, Patrick Mylund Nielsen hask...@patrickmylund.com wrote: PGP tends to present many usability issues, and in this case it would make more sense/provide a clearer win if there were many different

Re: [Haskell-cafe] [Security] Put haskell.org on https

2012-10-28 Thread Patrick Mylund Nielsen
*. On 28/10/12 23:55, Patrick Mylund Nielsen wrote: Of course, as long as Cabal itself is distributed through this same https-enabled site, you have the same PKI-backed security as just about any major website. This model has problems, yes, but it's good enough, and it's easy to use. If you really

Re: [Haskell-cafe] Am I the only one having problems with RWH?

2012-10-06 Thread Patrick Mylund Nielsen
I'm not totally sure if you're having problems with RWH, or think it's too easy, but here are my thoughts on both: Both RWH and LYAH (http://learnyouahaskell.com/) are intended for beginners/people who just want to get started, and RWH tends to be regarded as the hardest to understand (read LYAH

Re: [Haskell-cafe] a parallel mapM?

2012-09-28 Thread Patrick Mylund Nielsen
Check out the parallel combinators in parallel-io: http://hackage.haskell.org/packages/archive/parallel-io/0.3.2/doc/html/Control-Concurrent-ParallelIO-Global.html On Fri, Sep 28, 2012 at 1:01 PM, Greg Fitzgerald gari...@gmail.com wrote: I'm new to concurrent programming in Haskell. I'm