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

2013-01-15 Thread Vincent Hanquez
On Mon, Jan 14, 2013 at 01:49:44PM +0100, Daniel Fischer wrote:
 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 suggest looking at Daniel Fischer's arithmoi [1] library, which
   implements very fast Integer operations and should provide most
   functionality needed.  However, beware of timing attacks.
  
  Very cool library and very similar to what crypto-numbers provides albeit
  less sophisticated.
 
 I see you're doing a lot of x `shiftR` 1 with Integers. That's pretty bad for 
 performance (at least for integer-gmp, might be not for integer-simple or 
 implementations other than GHC [last I looked, JHC didn't have arbitrary 
 precision Integers and used 64-bit ones, so it'd be fast there]).

Yes, the performance are terrible in term of integers. As the library is
specific to public key algorithm, i just can't reasonable work on 64 bits
integer :-), and multiprecision integers is the only way to go.

I'm on-and-off working on some mutable mpi library to be able to
define pure function that do the necessary stuff (i.e. expmod, mulmod, etc..)

I'm hoping this could be reasonably competitive with a C mpi library,
but time will tell.

-- 
Vincent

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] hackage builds stopped?

2013-01-15 Thread Alberto G. Corona
What is the schedule of the hackage builds?.

My package has been uploaded  since three days ago, and it has not been
compiled yet...

-- 
Alberto.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] hackage builds stopped?

2013-01-15 Thread Alberto G. Corona
It seems that other packages have been build.

Mine is

http://hackage.haskell.org/package/MFlow-0.2.0.3

the previous uploads that I sent the past week have been compiled (error
logs produced).  But this last version don't. Are there some processing
policy that I may don´t know?


2013/1/15 Alberto G. Corona agocor...@gmail.com

 What is the schedule of the hackage builds?.

 My package has been uploaded  since three days ago, and it has not been
 compiled yet...

 --
 Alberto.




-- 
Alberto.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


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

2013-01-15 Thread Ertugrul Söylemez
Vincent Hanquez t...@snarc.org wrote:

 Yes, the performance are terrible in term of integers. As the library
 is specific to public key algorithm, i just can't reasonable work on
 64 bits integer :-), and multiprecision integers is the only way to
 go.

 I'm on-and-off working on some mutable mpi library to be able to
 define pure function that do the necessary stuff (i.e. expmod, mulmod,
 etc..)

 I'm hoping this could be reasonably competitive with a C mpi library,
 but time will tell.

It's a waste of time.  In my benchmarks Haskell Integer outperformed
equivalent (sane) C implementations using GMP's mpz_* interface.  You
would be reinventing GMP's mpn_* interface and a custom memory manager
to be able to match the speed of Integer.

The things that were slower than equivalent C code were not related to
Integer, but mostly to data structures like Set in my case, which was
the motivation for me to write the 'quickset' library.


Greets,
Ertugrul

-- 
Not to be or to be and (not to be or to be and (not to be or to be and
(not to be or to be and ... that is the list monad.


signature.asc
Description: PGP signature
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Makefile for a Haskell Project

2013-01-15 Thread John D. Ramsdell
This is the Makefile used by CPSA.  It requires GNU make.

John

# Haskell/Cabal Makefile
# Requires GNU Make
# The all target creates a default configuration if need be.

PACKAGE := $(wildcard *.cabal)
CONFIG  = dist/setup-config
SETUP   = runhaskell Setup.hs

all:$(CONFIG)
$(SETUP) build

Makefile:
@echo make $@

$(PACKAGE):
@echo make $@

$(CONFIG):  $(PACKAGE)
$(SETUP) configure $(CABALFLAGS) --ghc --user --prefix=${HOME}

%:  force
$(SETUP) $@

.PHONY: all force

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] How to disable document in .cabal file?

2013-01-15 Thread Albert Y. C. Lai

On 13-01-15 12:06 AM, Magicloud Magiclouds wrote:

   I have enabled document in .cabal/config, so I could get document
every time I installed libraries or so.
   But when I compile my own applications, it also takes time on
generating non-exist documents. How to disable it just for this project?


If cabal install: add --disable-documentation.
See also cabal install --help.

If cabal configure and cabal build etc: nothing to do, just omit 
cabal haddock.


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] How to disable document in .cabal file?

2013-01-15 Thread Magicloud Magiclouds
So the only way is to use param every time I build this certain project?
Really hoping I could disable it in project.cabal 


On Wed, Jan 16, 2013 at 6:45 AM, Albert Y. C. Lai tre...@vex.net wrote:

 On 13-01-15 12:06 AM, Magicloud Magiclouds wrote:

I have enabled document in .cabal/config, so I could get document
 every time I installed libraries or so.
But when I compile my own applications, it also takes time on
 generating non-exist documents. How to disable it just for this project?


 If cabal install: add --disable-documentation.
 See also cabal install --help.

 If cabal configure and cabal build etc: nothing to do, just omit
 cabal haddock.


 __**_
 Haskell-Cafe mailing list
 Haskell-Cafe@haskell.org
 http://www.haskell.org/**mailman/listinfo/haskell-cafehttp://www.haskell.org/mailman/listinfo/haskell-cafe




-- 
竹密岂妨流水过
山高哪阻野云飞

And for G+, please use magiclouds#gmail.com.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] How to disable document in .cabal file?

2013-01-15 Thread Ivan Lazar Miljenovic
On 16 January 2013 13:10, Magicloud Magiclouds
magicloud.magiclo...@gmail.com wrote:
 So the only way is to use param every time I build this certain project?
 Really hoping I could disable it in project.cabal 

Well, it's an option for the cabal-install tool, not for the Cabal build system.

Note that you don't need to use this parameter every time you build
your project, only every time you configure it (so if you don't change
the .cabal file much and just tend to build it as you hack on it you
don't need the extra params).



 On Wed, Jan 16, 2013 at 6:45 AM, Albert Y. C. Lai tre...@vex.net wrote:

 On 13-01-15 12:06 AM, Magicloud Magiclouds wrote:

I have enabled document in .cabal/config, so I could get document
 every time I installed libraries or so.
But when I compile my own applications, it also takes time on
 generating non-exist documents. How to disable it just for this project?


 If cabal install: add --disable-documentation.
 See also cabal install --help.

 If cabal configure and cabal build etc: nothing to do, just omit
 cabal haddock.


 ___
 Haskell-Cafe mailing list
 Haskell-Cafe@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-cafe




 --
 竹密岂妨流水过
 山高哪阻野云飞

 And for G+, please use magiclouds#gmail.com.

 ___
 Haskell-Cafe mailing list
 Haskell-Cafe@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-cafe




-- 
Ivan Lazar Miljenovic
ivan.miljeno...@gmail.com
http://IvanMiljenovic.wordpress.com

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] How to disable document in .cabal file?

2013-01-15 Thread Magicloud Magiclouds
The problem is, I enabled it in ~/.cabal/config file. So by default, when I
install, it build the document.
Sorry I used build term, by which I meant install


On Wed, Jan 16, 2013 at 10:16 AM, Ivan Lazar Miljenovic 
ivan.miljeno...@gmail.com wrote:

 On 16 January 2013 13:10, Magicloud Magiclouds
 magicloud.magiclo...@gmail.com wrote:
  So the only way is to use param every time I build this certain project?
  Really hoping I could disable it in project.cabal 

 Well, it's an option for the cabal-install tool, not for the Cabal build
 system.

 Note that you don't need to use this parameter every time you build
 your project, only every time you configure it (so if you don't change
 the .cabal file much and just tend to build it as you hack on it you
 don't need the extra params).

 
 
  On Wed, Jan 16, 2013 at 6:45 AM, Albert Y. C. Lai tre...@vex.net
 wrote:
 
  On 13-01-15 12:06 AM, Magicloud Magiclouds wrote:
 
 I have enabled document in .cabal/config, so I could get document
  every time I installed libraries or so.
 But when I compile my own applications, it also takes time on
  generating non-exist documents. How to disable it just for this
 project?
 
 
  If cabal install: add --disable-documentation.
  See also cabal install --help.
 
  If cabal configure and cabal build etc: nothing to do, just omit
  cabal haddock.
 
 
  ___
  Haskell-Cafe mailing list
  Haskell-Cafe@haskell.org
  http://www.haskell.org/mailman/listinfo/haskell-cafe
 
 
 
 
  --
  竹密岂妨流水过
  山高哪阻野云飞
 
  And for G+, please use magiclouds#gmail.com.
 
  ___
  Haskell-Cafe mailing list
  Haskell-Cafe@haskell.org
  http://www.haskell.org/mailman/listinfo/haskell-cafe
 



 --
 Ivan Lazar Miljenovic
 ivan.miljeno...@gmail.com
 http://IvanMiljenovic.wordpress.com




-- 
竹密岂妨流水过
山高哪阻野云飞

And for G+, please use magiclouds#gmail.com.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] How to disable document in .cabal file?

2013-01-15 Thread Ivan Lazar Miljenovic
On 16 January 2013 13:26, Magicloud Magiclouds
magicloud.magiclo...@gmail.com wrote:
 The problem is, I enabled it in ~/.cabal/config file. So by default, when I
 install, it build the document.
 Sorry I used build term, by which I meant install

How often do you install that this is a problem?

If you install more without documentation, disable it in your
~/.cabal/config file, and use --enable-documentation when you actually
want it.



 On Wed, Jan 16, 2013 at 10:16 AM, Ivan Lazar Miljenovic
 ivan.miljeno...@gmail.com wrote:

 On 16 January 2013 13:10, Magicloud Magiclouds
 magicloud.magiclo...@gmail.com wrote:
  So the only way is to use param every time I build this certain project?
  Really hoping I could disable it in project.cabal 

 Well, it's an option for the cabal-install tool, not for the Cabal build
 system.

 Note that you don't need to use this parameter every time you build
 your project, only every time you configure it (so if you don't change
 the .cabal file much and just tend to build it as you hack on it you
 don't need the extra params).

 
 
  On Wed, Jan 16, 2013 at 6:45 AM, Albert Y. C. Lai tre...@vex.net
  wrote:
 
  On 13-01-15 12:06 AM, Magicloud Magiclouds wrote:
 
 I have enabled document in .cabal/config, so I could get document
  every time I installed libraries or so.
 But when I compile my own applications, it also takes time on
  generating non-exist documents. How to disable it just for this
  project?
 
 
  If cabal install: add --disable-documentation.
  See also cabal install --help.
 
  If cabal configure and cabal build etc: nothing to do, just omit
  cabal haddock.
 
 
  ___
  Haskell-Cafe mailing list
  Haskell-Cafe@haskell.org
  http://www.haskell.org/mailman/listinfo/haskell-cafe
 
 
 
 
  --
  竹密岂妨流水过
  山高哪阻野云飞
 
  And for G+, please use magiclouds#gmail.com.
 
  ___
  Haskell-Cafe mailing list
  Haskell-Cafe@haskell.org
  http://www.haskell.org/mailman/listinfo/haskell-cafe
 



 --
 Ivan Lazar Miljenovic
 ivan.miljeno...@gmail.com
 http://IvanMiljenovic.wordpress.com




 --
 竹密岂妨流水过
 山高哪阻野云飞

 And for G+, please use magiclouds#gmail.com.



-- 
Ivan Lazar Miljenovic
ivan.miljeno...@gmail.com
http://IvanMiljenovic.wordpress.com

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] How to disable document in .cabal file?

2013-01-15 Thread Albert Y. C. Lai

On 13-01-15 09:10 PM, Magicloud Magiclouds wrote:

So the only way is to use param every time I build this certain project?
Really hoping I could disable it in project.cabal 


The param is for cabal install only. So don't use cabal install.

cabal configure  # may be skipped usually
cabal build
cabal copy

If your project is a library (as opposed to an executable): add
cabal register

Why this is not controlled in project.cabal: The author of the project 
should not control whether users build docs or not.



P.S. Ivan, --enable-documentation and --disable-documentation are not 
even valid flags to cabal configure.


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe