Re: Replacement for GMP

2006-08-01 Thread Peter Tanski
Hey Esa, Another great instructive email! Thanks again! I will keep this response short because I am sure you are busy and you have been more than helpful so far. I also need to get back to working through the code... I hope my answer helps, but if it gets you more confused, maybe it'

Re: Replacement for GMP

2006-08-01 Thread Esa Ilari Vuokko
Hi Peter, Peter Tanski wrote: > (This may sound naieve): the in { size, used, payload, sign } are all > parts of the info-table for the payload and the RTS re-initialises the > mathlib on each invocation, right? I hope my answer helps, but if it gets you more confused, maybe it's just because I'

Re: Replacement for GMP

2006-08-01 Thread Peter Tanski
Esa, What I have written here might not be the most useful guide to start with, but maybe it is of help for other interested souls. Many thanks for the notes; it would probably be better if more than one programmer worked on it. * The memory handling: The idea on most bignum libs is

Re: Replacement for GMP as Bignum: ARPREC? Haskell?; OS-X andOpenSSL

2006-08-01 Thread Duncan Coutts
On Tue, 2006-08-01 at 17:05 +0100, Simon Marlow wrote: > Duncan Coutts wrote: > > So where do I put the Gtk+ .dlls? At the moment I seem to have no choice > > but to put them on the %PATH%. And thus the breakage ensues. Old > > versions of Gtk+ that people have on their systems can interfere. Lots

RE: Internships on GHC and Haskell at MSR Cambridge

2006-08-01 Thread Simon Peyton-Jones
| MSR Cambridge now takes interns *year-round*, not just in the summer months. Simon Marlow and I | are keen to attract motivated and well-qualified folk to work with us on our research, and on improving | or developing GHC. PS: concerning the enclosed, if you are interested in an internship at M

Re: returning to cost of Integer

2006-08-01 Thread John Meacham
On Tue, Aug 01, 2006 at 02:57:31PM +0400, Bulat Ziganshin wrote: > John, Integer values in many cases used just to keep small numbers > which can be larger than 2^32 (2^64) in rare cases. For example, > "type FileSize = Integer" used in IO library. so it's important to > keep operations on small In

Re: Replacement for GMP

2006-08-01 Thread Esa Ilari Vuokko
Hi Peter, Peter Tanski wrote: > In the July thread, (Repost) Replacement for GMP as Bignum: ARPREC? > Haskell?; OS X and OpenSSL, you wrote: > >> In past, I tried to get rid of GMP by replacing it with libtommath >> http://math.libtomcrypt.com/ >> But I have given up for now - because of related

Re: Replacement for GMP as Bignum: ARPREC? Haskell?; OS-X andOpenSSL

2006-08-01 Thread Simon Marlow
Duncan Coutts wrote: On Sun, 2006-07-30 at 20:02 +0100, Brian Hulley wrote: Suppose for a moment that GHC did dynamically link gmp.dll, or indeed HSbase.dll. Where exactly would these files go? I'd install them in the same directory as ghc.exe because this directory has to be on the %PATH%

Re: Rebuilding GHC on Mac OSX PPC

2006-08-01 Thread Gregory Wright
Hi, This is probably the libedit issue. On OS X, NetBSD's libedit is installed. Libedit provides a partial implementation of the readline API. On OS X, Apple has symlinked /usr/lib/libreadline.dylib to libedit. This is not a good idea. I submitted at patch to fix this and I think it w

Re: Rebuilding GHC on Mac OSX PPC

2006-08-01 Thread Simon Marlow
Joel Reymont wrote: I give up! Mac PPC doesn't like me now that I'm on Intel. This is PPC, btw, and I _do_ have readline installed. GHC from DarwinPorts compiles just fine. [snip] /usr/bin/ld: Undefined symbols: _rl_initialize _rl_reset_terminal _add_history _readline collect2: ld returned

Replacement for GMP

2006-08-01 Thread Peter Tanski
Esa, In the July thread, (Repost) Replacement for GMP as Bignum: ARPREC? Haskell?; OS X and OpenSSL, you wrote: In past, I tried to get rid of GMP by replacing it with libtommath http://math.libtomcrypt.com/ But I have given up for now - because of related and unrelated problems. Since I

Re: returning to cost of Integer

2006-08-01 Thread Lennart Augustsson
Actually, you can keep it to one test for add/subtract if you use a single word that is either a number or a pointer, the pointer being tagged in lowest bit. Then you can add first and check for tags after. Having tags is rare, so the machine should be told so, if possible. This way you can kee

Re[2]: returning to cost of Integer

2006-08-01 Thread Bulat Ziganshin
Hello John, Tuesday, August 1, 2006, 5:19:37 AM, you wrote: > This has made me wonder whether we are better off getting rid of the > small integer optimization and turning Integer into a straight > unboxable ForeignPtr to a GMP number. this would also mean we could use > the standard GMP that com

RE: --show-iface grammar?

2006-08-01 Thread Simon Peyton-Jones
The "right" thing to do is to use the GHC API to parse the interface files. That way, when the details change, your program won't get confused. However, the GHC API is neither well designed nor well documented at the moment. This is a bit chicken-and-egg-ish; until people start to use it, it'll

RE: returning to cost of Integer

2006-08-01 Thread Simon Peyton-Jones
If there was an alternative small/big rep, no matter how encoded, it'd still entail conditionals (2 for addition say) to check for that path. And the conditionals also hurt optimisations. But both possibilities would be an interesting thing to try. Simon | -Original Message- | From: