[Haskell-cafe] Haskell code contributions

2008-07-20 Thread Galchin, Vasili
Hello, I have a password to upload Haskell code contributions but I can't find the email with the password and I have forgotten who is the "gatekeeper". ?? Regards, Vasili ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.or

Re: [Haskell-cafe] carry "state" around ....

2008-07-20 Thread Galchin, Vasili
Thank you Duncan for your example. I will also read the RSA code. Regards, Vasili On Sun, Jul 20, 2008 at 6:51 AM, Duncan Coutts <[EMAIL PROTECTED]> wrote: > > On Sat, 2008-07-19 at 23:55 -0500, Galchin, Vasili wrote: > > yes Duncan I am trying to pass-by-value. I am familiar with > > ForeignPt

Re: [Haskell-cafe] Data.Complex.magnitude slow?

2008-07-20 Thread Jan-Willem Maessen
On Jul 20, 2008, at 8:11 PM, Richard A. O'Keefe wrote: I read this as "Is there any way to take a 32-bit float in a register and end up with a 32-bit int in a register, without going through memory, in GHC? How about the other way around? How about 64-bit floats a

Re: [Haskell-cafe] carry "state" around ....

2008-07-20 Thread Brandon S. Allbery KF8NH
On 2008 Jul 20, at 21:05, Richard A. O'Keefe wrote: For asynchronous I/O, this means that - you can allocate an aiocb object - an aiocb passed to aio_suspend, aio_error, aio_return, or aio_cancel should have been filled in by aio_read or aio_write and should be EXACTLY THE SAME object, no

[Haskell-cafe] GHC Error: "FATAL:Symbol _XJv_srt already defined."

2008-07-20 Thread Ron Alford
Anyone know what this is about? Removing parts makes problem go away, but it's not clear what parts to remove! (that, and I wrote those parts for a reason!). bash-3.2$ ghc --version The Glorious Glasgow Haskell Compilation System, version 6.8.3 bash-3.2$ uname -a Darwin silverback-wired.home 9.4.0

Re: [Haskell-cafe] carry "state" around ....

2008-07-20 Thread Richard A. O'Keefe
I think it may be time for a little clarity about aoicb's. From the Single Unix Specification: "The header shall define the aiocb structure which shall include AT LEAST the following members: int aio_fildes File descriptor. off_t aio_offset File offset.

Re: [Haskell-cafe] Help with optimization

2008-07-20 Thread Don Stewart
mmitar: > Hi! > > Profiling says that my program spends 18.4 % of time (that is around > three seconds) and 18.3 % of allocations in this function which is > saving the rendered image to a PPM file: > > saveImageList :: String -> Int -> Int -> [ViewportDotColor] -> IO () > saveImageList filename

Re: [Haskell-cafe] Data.Complex.magnitude slow?

2008-07-20 Thread Richard A. O'Keefe
On Fri, 18 Jul 2008, stefan kersten wrote: On 17.07.2008, at 21:46, Lennart Augustsson wrote: If scaleFloat and exponent are implemented with bit twiddling they can be quite fast. is there a way in ghc to 'cast' between float/int32 and double/ int64 (without going through memory)? I read

Re: [Haskell-cafe] Help with optimization

2008-07-20 Thread Mitar
Hi! 2008/7/20 Adrian Neumann <[EMAIL PROTECTED]>: > Maybe your image isn't strict enough and the computations are forced when > the image gets written to disc? But it still takes three seconds more than displaying to the screen. This is why I am also thinking that this code is to slow. This and t

Re: Re[2]: [Haskell-cafe] ansi2html - one program, several issues

2008-07-20 Thread Krzysztof Skrzętnicki
I played with another approach without any parser library, just with plain pattern matching. The idea was to create function to match all different cases of codes. Since I already got most of the code, it was quite easy to do. The core function consist of cases like those: > parse ('\ESC':'['

Re: [Haskell-cafe] Help with optimization

2008-07-20 Thread Adrian Neumann
Maybe your image isn't strict enough and the computations are forced when the image gets written to disc? Am 20.07.2008 um 14:13 schrieb Mitar: Hi! Profiling says that my program spends 18.4 % of time (that is around three seconds) and 18.3 % of allocations in this function which is saving

Re: [Haskell-cafe] ansi2html - one program, several issues

2008-07-20 Thread Isaac Dupree
Dan Doel wrote: On Sunday 20 July 2008, John Meacham wrote: I do not believe that is the case, since the return type of runParser "Either ParseError a" means that before you can extract the result of the parse from the 'Right' branch, it must evaluate whether the result is 'Left' or 'Right' mean

Re: Re[2]: [Haskell-cafe] ansi2html - one program, several issues

2008-07-20 Thread Krzysztof Skrzętnicki
On Sun, Jul 20, 2008 at 7:25 AM, Chaddaï Fouché <[EMAIL PROTECTED]> wrote: > > > That's exactly what I thought. But even if I remove the only 'try' I use > the > > memory consumption remains unchanged: > > It's true, but in your case your output is almost the raw input data, > which means that eve

[Haskell-cafe] Help with optimization

2008-07-20 Thread Mitar
Hi! Profiling says that my program spends 18.4 % of time (that is around three seconds) and 18.3 % of allocations in this function which is saving the rendered image to a PPM file: saveImageList :: String -> Int -> Int -> [ViewportDotColor] -> IO () saveImageList filename width height image = do

Re: [Haskell-cafe] carry "state" around ....

2008-07-20 Thread Duncan Coutts
On Sat, 2008-07-19 at 23:55 -0500, Galchin, Vasili wrote: > yes Duncan I am trying to pass-by-value. I am familiar with > ForeignPtr; however, I don't comprehend what you and Brandon are > suggesting to do. Could either of you provide a code illustration or > point at existing code to illustrate y