Re: [Haskell-cafe] Repa: traverse delayed array multiple times

2013-01-14 Thread Dominic Steinitz
Andrey Yankin yankin013 at gmail.com writes: Greetings to all! repa?I wrote this rough sketch that shows what I am into. Apparently, program is severely slow. I think reason is:Every time an element is requested from a delayed array it is calculated anew, which means that delayed

Re: [Haskell-cafe] Where is the convergence point between Category Theory and Haskell?

2013-01-14 Thread Alfredo Di Napoli
Thanks everyone for the answers. Mine is just an experiment, but if I succeed in keeping it up and to come with something useful, I won't hesitate to poke you :) Btw, in case I succeed, posts will appear here: http://www.alfredodinapoli.com/posts.html and here:

Re: [Haskell-cafe] Where is the convergence point between Category Theory and Haskell?

2013-01-14 Thread Aleksandar Dimitrov
[1] For more discussion on this point, see n-Lab and n-Cafe: http://ncatlab.org/ http://golem.ph.utexas.edu/category/ Wren, thanks very much for these two links. I've been trying for forever to get a foot into metamathematics and type theory in particular (not having the option of

Re: [Haskell-cafe] Repa: traverse delayed array multiple times

2013-01-14 Thread Andrey Yankin
Hi, Dominic! Thanks for advice. I will definitely use it for now. When I wrote Do I have to call iterate only once at a time It was obscure and has wrong words. I was trying to ask if it is necessary to run computeP every time I want to modify(traverse) an array? I was contemplating similar

[Haskell-cafe] How to properly optimize MArray functions for speed?

2013-01-14 Thread Petr P
Dear Haskellers, I'm working on a sorting library for MArrays. Speed is important, so I want to optimize it as much as possible. Currently, I simply INLINE the sorting function. This speeds up the code more than 10 times. However this can easily explode code size if the function is used in

Re: [Haskell-cafe] ANN: crypto-pubkey: all your public key crypto algorithms belong to us.

2013-01-14 Thread Vincent Hanquez
On Sat, Jan 12, 2013 at 02:12:44PM +0100, Ertugrul Söylemez wrote: I've spend some good chunk of time adding KATs and tests, documentation, and making sure the performance was ahead of other haskell implementations. I suggest looking at Daniel Fischer's arithmoi [1] library, which

Re: [Haskell-cafe] Advice on type families and non-injectivity?

2013-01-14 Thread Simon Peyton-Jones
| {-# LANGUAGE TypeFamilies #-} | | type family F a | | foo :: F a | foo = undefined | | bar :: F a | bar = foo There is a real difficulty here with type-checking 'bar'. (And that difficulty is why 'foo' is also rejected.) Namely, when typechecking 'bar', we must instantiate

Re: [Haskell-cafe] ANN: crypto-pubkey: all your public key crypto algorithms belong to us.

2013-01-14 Thread Daniel Fischer
On Monday 14 January 2013, 12:36:22, Vincent Hanquez wrote: On Sat, Jan 12, 2013 at 02:12:44PM +0100, Ertugrul Söylemez wrote: I've spend some good chunk of time adding KATs and tests, documentation, and making sure the performance was ahead of other haskell implementations. I

Re: [Haskell-cafe] ANN: crypto-pubkey: all your public key crypto algorithms belong to us.

2013-01-14 Thread Ertugrul Söylemez
Vincent Hanquez t...@snarc.org wrote: Also for the particular purpose of generating safe primes I have written a blazingly fast implementation that uses intelligent sieving and finds even large primes (= 4096 bits) within seconds or minutes. It's on hpaste [2]. I might turn this into a

[Haskell-cafe] using/building ghc head?

2013-01-14 Thread Johannes Waldmann
Hi. I wanted to do some experiments with GHC Head but * I cannot use the snapshot bindist: ./configure --prefix=/opt checking for path to top of build tree... ./configure: line 2138: utils/ghc-pwd/dist-install/build/tmp/ghc-pwd-bindist: No such file or directory * I cannot compile snapshot from

Re: [Haskell-cafe] using/building ghc head?

2013-01-14 Thread Austin Seipp
Frankly I wouldn't be surprised if snapshots are dodgy, to be quite honest. As far as I'm aware, most people just build GHC HEAD themselves, from the git repository. And a snapshot build does not necessarily guarantee anything works in any case (there could be a million things wrong in the

Re: [Haskell-cafe] Advice on type families and non-injectivity?

2013-01-14 Thread Conal Elliott
There is a real difficulty here with type-checking 'bar'. (And that difficulty is why 'foo' is also rejected.) Oh! Is the definition of 'foo' rejected in recent versions of GHC? My 7.4.1 installation doesn't complain. -- Conal On Mon, Jan 14, 2013 at 3:39 AM, Simon Peyton-Jones

Re: [Haskell-cafe] Advice on type families and non-injectivity?

2013-01-14 Thread Conal Elliott
Thanks, Jake! This suggestion helped a lot. -- Conal On Sun, Jan 13, 2013 at 1:59 PM, Jake McArthur jake.mcart...@gmail.comwrote: I have a trick that loses a little convenience, but may still be more convenient than data families. {-# LANGUAGE TypeFamilies #-} import Data.Tagged type

Re: [Haskell-cafe] Advice on type families and non-injectivity?

2013-01-14 Thread Simon Peyton-Jones
Oh! Is the definition of 'foo' rejected in recent versions of GHC? My 7.4.1 installation doesn't complain. -- Conal Yes, it is rejected. Simon From: conal.elli...@gmail.com [mailto:conal.elli...@gmail.com] On Behalf Of Conal Elliott Sent: 14 January 2013 20:52 To: Simon Peyton-Jones Cc:

[Haskell-cafe] Cannot read a large integer on linux

2013-01-14 Thread Arnaud Bailly
Hello, I am encountering a strange issue while trying to read a string into an integer. On windows 7 64bit, I have: read 18780189038289e49 :: Integer =187801890382890 On linux (64bit, libgmp.so.3.5.2) I have: read 18780189038289e49 :: Integer

Re: [Haskell-cafe] Cannot read a large integer on linux

2013-01-14 Thread Artyom Kazak
Right, it was fixed in GHC 7.4.2. hackage.haskell.org/trac/ghc/ticket/5688 The trouble with old behaviour was that it had been creating a security breach (anybody could pass 1e1000 where an Integer was expected and cause a segmentation fault). 15.01.2013 2:41 пользователь Arnaud Bailly

Re: [Haskell-cafe] Cannot read a large integer on linux

2013-01-14 Thread Johannes Waldmann
read 18780189038289e49 :: Integer this might be related: http://hackage.haskell.org/trac/ghc/ticket/5688 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe