Re: Re[4]: [Haskell-cafe] In-place modification

2007-07-14 Thread Hugh Perkins
So no, using the form of my argument, it is NOT possible to prove anything about Haskell -vs- C. It is ONLY possible to make claims about Haskell *libraries* -vs- C *libraries*. You can claim anything you like, but if you want people to believe it you'd be best providing the code used so that

[Haskell-cafe] impossible to write type signature

2007-07-14 Thread jeff p
Hello, I managed to write a function, which ghc accepts, for which ghc rejects it's own type signature. I remember seeing a thread about this sometime in the last year or so, but I can't seem to find it. Does anyone remember this thread? thanks, Jeff

Re: [Haskell-cafe] Looking for final year project - using Haskell, or another functional language

2007-07-14 Thread Hugh Perkins
Hi Claus, Well, I read the website and it stated that it doesnt support alpha blending yet. Thats a pretty basic operation, so I assumed no-one is using hopengl for anything more than a few triangles. I'll check the docs you've linked to. On 7/13/07, Claus Reinke [EMAIL PROTECTED] wrote:

[Haskell-cafe] Re: impossible to write type signature

2007-07-14 Thread jeff p
Hello, I finally found the thread I was looking for: http://www.haskell.org/pipermail/haskell-cafe/2006-December/020481.html Sorry for the noise. -Jeff On 7/14/07, jeff p [EMAIL PROTECTED] wrote: Hello, I managed to write a function, which ghc accepts, for which ghc rejects it's own

Re: [Haskell-cafe] Looking for final year project - using Haskell, or another functional language

2007-07-14 Thread Hugh Perkins
Wow, ok, this does look amazingly comprehensive, cool :-) Might want to update the blurb on the website a little ;-) On 7/13/07, Claus Reinke [EMAIL PROTECTED] wrote: just be sure to ignore http://www.haskell.org/HOpenGL/ , which should be moved to the wiki or to /dev/null. instead, look at

Re: [Haskell-cafe] Looking for final year project - using Haskell, or another functional language

2007-07-14 Thread Stefan O'Rear
On Sat, Jul 14, 2007 at 08:18:58AM +0200, Hugh Perkins wrote: Hi Claus, Well, I read the website and it stated that it doesnt support alpha blending yet. Thats a pretty basic operation, so I assumed no-one is using hopengl for anything more than a few triangles. I'll check the docs you've

[Haskell-cafe] Re: sha1 implementation thats only 12 times slower then C

2007-07-14 Thread Dominic Steinitz
Anatoly Yakovenko aeyakovenko at gmail.com writes: So I tried implementing a more efficient sha1 in haskell, and i got to about 12 times slower as C. The darcs implementation is also around 10 to 12 times slower, and the crypto one is about 450 times slower. I haven't yet unrolled the loop

Re: [Haskell-cafe] Newbie question about tuples

2007-07-14 Thread Lukas Mai
Am Freitag, 13. Juli 2007 15:03 schrieb peterv: You see, in C++ I can write: [snip] So basically a wrapper around a fixed-size array of any length. Implementations of (+), (-), dot, length, normalize, etc... then work on vectors of any size, without the overhead of storing the size, and

Re: [Haskell-cafe] HDBC-ODBC build/install problem.

2007-07-14 Thread Bjorn Bringert
This is probably a HaskellDB or hs-plugins problem. DBDirect uses hs- plugins to load driver modules, and I believe hs-plugins has undergone some changes to work with GHC 6.6.1, which DBDirect might not take into account. I don't use the DBDirect executable myself, since it tends to run

Re: [Haskell-cafe] ANN: Finance.Quote.Yahoo 0.1 on hackage

2007-07-14 Thread Andrea Rossato
On Fri, Jul 13, 2007 at 09:24:48PM -0700, brad clawsie wrote: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/Finance-Quote-Yahoo-0.1 this is a simple module to get stock quote information from yahoo finance, considered alpha quality Hi, cool! I wanted to use it to write a small

[Haskell-cafe] Re: Defaulting to Rational [was: Number overflow]

2007-07-14 Thread Jon Fairbairn
Jonathan Cast [EMAIL PROTECTED] writes: On Friday 13 July 2007, Jon Fairbairn wrote: Henning Thielemann [EMAIL PROTECTED] writes: On Thu, 12 Jul 2007, Jon Fairbairn wrote: Surely the first few digits can be computed? That was my first thought, too. We can't define data Real =

Re: [Haskell-cafe] Haskell monads for newbies (was Functional dependencies *not* part of the next Haskell standard?)

2007-07-14 Thread Alexis Hazell
On Saturday 14 July 2007 05:21, Andrew Coppin wrote: Still, while the concept is simple, it's hard to sum up in just a few words what a monad is. (Especially given that Haskell has so many different ones - and they seem superficially to bear no resemblence to each other.) Well, how about

Re: [Haskell-cafe] Re: Indentation Creep

2007-07-14 Thread Thomas Conway
On 7/14/07, Aaron Denney [EMAIL PROTECTED] wrote: It might be a bit clearer if every level of the tree were a flat map of pointers. You can even parametrize on this map type... Yes, this would be an obvious generalization, though if I were to modify the details of the structure, I'd be

[Haskell-cafe] [weird stuff] The Dodgy Diagonal

2007-07-14 Thread Conor McBride
Scary words warning: Polynomial, Functor, Bifunctor, unsafeCoerce# Folks A peculiar query for folks who know more about the internals of Haskell compilers than I do. I attach the full code with all the bits and pieces, but let me pull out the essentials in order to state the problem. I've

Re: [Haskell-cafe] ANN: Finance.Quote.Yahoo 0.1 on hackage

2007-07-14 Thread Andrea Rossato
On Sat, Jul 14, 2007 at 10:20:56AM +0200, Andrea Rossato wrote: On Fri, Jul 13, 2007 at 09:24:48PM -0700, brad clawsie wrote: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/Finance-Quote-Yahoo-0.1 this is a simple module to get stock quote information from yahoo finance,

Re: [Haskell-cafe] ANN: Finance.Quote.Yahoo 0.1 on hackage

2007-07-14 Thread brad clawsie
But, in order to use it I would need to install: 2. MssingH (just for join, replace and split?) which in turns requires: the attached patch removes the MissingH requirement, the most important I believe. i'm not sure i understand - you want to rewrite these functions that are already

Re: [Haskell-cafe] ANN: Finance.Quote.Yahoo 0.1 on hackage

2007-07-14 Thread J. Pablo Fernández
On Saturday 14 July 2007 16:20:04 brad clawsie wrote: But, in order to use it I would need to install: 2. MssingH (just for join, replace and split?) which in turns requires: the attached patch removes the MissingH requirement, the most important I believe. i'm not sure i understand

[Haskell-cafe] Perfect shuffle on std. libs

2007-07-14 Thread Felipe Almeida Lessa
Hello! =) I wonder why Oleg's perfect shuffle[1] isn't on any standard library? Is there a reason or is it just a lack of patches? I'd personally like to have at least the function shuffle :: RandomGen g = g - [a] - [a] shuffle gen list = let len = length list ran = [r `mod` k |

Re: [Haskell-cafe] List of authors happy to have work moved to theHaskell wiki

2007-07-14 Thread Claus Reinke
I've created a page to track contributors who are happy to have their work moved to the Haskell wiki, and thus explicitly licensed under the `simple permissive license'. http://haskell.org/haskellwiki/Haskell_Cafe_migration Hi Don, i'm all for using mailinglist postings to improve the

Re: [Haskell-cafe] ANN: Finance.Quote.Yahoo 0.1 on hackage

2007-07-14 Thread Andrea Rossato
On Sat, Jul 14, 2007 at 08:20:04AM -0700, brad clawsie wrote: i'm not sure i understand - you want to rewrite these functions that are already implemented in Data.String? why? this is why hackage exists - so you don't have to rewrite these functions. MissingH is well maintained by an

Re: Re[4]: [Haskell-cafe] In-place modification

2007-07-14 Thread Henk-Jan van Tuyl
There was some discussion about prime number generators earlier this year: http://www.haskell.org/pipermail/haskell-cafe/2007-February/022347.html http://www.haskell.org/pipermail/haskell-cafe/2007-February/022699.html You can find several sources there. Met vriendelijke groet, Henk-Jan

Re: [Haskell-cafe] Re: [Haskell] AngloHaskell 2007, dates and venue confirmed

2007-07-14 Thread Andrew Coppin
Philippa Cowderoy wrote: On Fri, 13 Jul 2007, Neil Mitchell wrote: Hi, We are pleased to announce AngloHaskell 2007 http://www.haskell.org/haskellwiki/AngloHaskell Dates: 10th-11th of August (Friday-Saturday) Location: Cambridge, with talks at Microsoft Research on Friday Just to

Re: [Haskell-cafe] sha1 implementation thats only 12 times slower then C

2007-07-14 Thread Anatoly Yakovenko
-- Forwarded message -- From: Anatoly Yakovenko [EMAIL PROTECTED] Date: Jul 14, 2007 11:09 AM Subject: Re: Your SHA1 To: Dominic Steinitz [EMAIL PROTECTED] 1. Very good. Thanks, it was a fun experiment. 2. It has type hash::BS.ByteString - IO [Word] but hash is a pure

Re: [Haskell-cafe] Type system madness

2007-07-14 Thread Andrew Coppin
Jonathan Cast wrote: On Friday 13 July 2007, Andrew Coppin wrote: Stefan O'Rear wrote: Try not to care what other people think. LOL! If only that were in fact physically possible... Why not? I do it all the time... Clearly you don't know me... I spend 80% of my

[Haskell-cafe] Frisby (PEG parser) unbiased-choice thoughts

2007-07-14 Thread Isaac Dupree
since I don't like unexpected behavior happening when something not intended to happen, happens, and it's better documentation (a free assertion) -- I find myself making Haskell comments to specify whether the left-biasedness of each (//) is important, various places in my own code that uses

Re: [Haskell-cafe] Haskell monads for newbies

2007-07-14 Thread Andrew Coppin
Alexis Hazell wrote: On Saturday 14 July 2007 05:21, Andrew Coppin wrote: Still, while the concept is simple, it's hard to sum up in just a few words what a monad is. (Especially given that Haskell has so many different ones - and they seem superficially to bear no resemblence to each

Re: [Haskell-cafe] Maintaining the community

2007-07-14 Thread Andrew Coppin
Anthony Chaumas-Pellet wrote: From: Andrew Coppin [EMAIL PROTECTED] Really? Most web servers will accept a connection from anybody. (Unless it's *intended* to be an Intranet.) I'm not quite sure why somebody would configure their NNTP server differently... The scale of an NNTP

Re: [Haskell-cafe] Type system madness

2007-07-14 Thread Andrew Coppin
Stefan O'Rear wrote: On Fri, Jul 13, 2007 at 06:45:03PM -0400, Brandon S. Allbery KF8NH wrote: On Jul 13, 2007, at 15:11 , Stefan O'Rear wrote: There is no such thing as 8-bit ASCII - base assumes files contain ISO-8859-1. Hm, shouldn't it really be ISO-8859-15? (The

Re: [Haskell-cafe] Looking for final year project - using Haskell, or another functional language

2007-07-14 Thread Andrew Coppin
Donald Bruce Stewart wrote: We've got people working on it. Sean Lee[1] was running Haskell functions on his Nvidia GPU as of yesterday :-) Just the other day I was reading about nVidia's CUDA technology - and wishing I could compile Haskell to run on it. ...and then I find *this* in my

[Haskell-cafe] Ray tracer

2007-07-14 Thread Andrew Coppin
The Haskell ray tracer seems to be a pretty standard and widely-used example program. But has anybody ever seriously tried to make a production-grade implementation? (I.e., one that is user-friendly, efficient, and with lots of functionallity.) ___

[Haskell-cafe] Re: Type system madness

2007-07-14 Thread Aaron Denney
On 2007-07-14, Andrew Coppin [EMAIL PROTECTED] wrote: Stefan O'Rear wrote: On Fri, Jul 13, 2007 at 06:45:03PM -0400, Brandon S. Allbery KF8NH wrote: On Jul 13, 2007, at 15:11 , Stefan O'Rear wrote: There is no such thing as 8-bit ASCII - base assumes files contain ISO-8859-1.

Re: [Haskell-cafe] Re: Maintaining the community

2007-07-14 Thread Hugh Perkins
On 7/13/07, Philippa Cowderoy [EMAIL PROTECTED] wrote: This is a cultural thing, and assuming that it's a lack of sophistication on our part is a bad idea - on the contrary, some of the better reasons to avoid a web-based board are entirely about enabling sophistication. There's a very simple

Re: [Haskell-cafe] Looking for final year project - using Haskell, or another functional language

2007-07-14 Thread Hugh Perkins
Can someone post either a simple Hopengl example or a link to one please? (Something that displays a triangle or two, preferably rotatign slowly, ideally rotating when you move the mouse). ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re[2]: [Haskell-cafe] Newbie question about tuples

2007-07-14 Thread Bulat Ziganshin
Hello Donald, Saturday, July 14, 2007, 6:01:21 AM, you wrote: don't forget that laziness by itself makes programs an orders of magnitude slower :) Or orders of magnitude faster, depending on your data structure. :) compared to naive implementation - yes, it's possible. compared to handmade

Re[4]: [Haskell-cafe] Newbie question about tuples

2007-07-14 Thread Bulat Ziganshin
Hello peterv, Friday, July 13, 2007, 10:00:48 PM, you wrote: you still should select between strict algorithm which ghc can compile to non-lazy code and lazy algorithm which, as you belive, should make some other benefits :) actually, for rather large algorithms, strictness doesn't work (some

Re: [Haskell-cafe] Haskell monads for newbies

2007-07-14 Thread Hugh Perkins
On 7/14/07, Andrew Coppin andrewcoppin wrote: That is my recollection also. (Don't ask me *which* monads, mind you...) In the case in point, the law breakage never the less matches intuition; personally, I ignore the monad laws on the basis that if you're doing something sane, the laws will

Re: [Haskell-cafe] Indentation Creep

2007-07-14 Thread Bulat Ziganshin
Hello Thomas, Saturday, July 14, 2007, 12:59:16 AM, you wrote: case re of False - writeTVar m Nothing True - writeTVar p Empty All that case analysis causes indentation to creep, and lots of

Re: [Haskell-cafe] Haskell monads for newbies

2007-07-14 Thread Andrew Coppin
Hugh Perkins wrote: On 7/14/07, *Andrew Coppin* andrewcoppin wrote: That is my recollection also. (Don't ask me *which* monads, mind you...) In the case in point, the law breakage never the less matches intuition; personally, I ignore the monad laws on the basis that if you're doing something

Re: [Haskell-cafe] sha1 implementation thats only 12 times slower then C

2007-07-14 Thread Derek Elkins
On Sat, 2007-07-14 at 11:11 -0700, Anatoly Yakovenko wrote: yea, i agree, i am doing a lot of ugly hacks to get things going faster. Actually i think the cleaner approach would be to use Harpy extension and do the math with x86 assembly :). Extension? It's just a library.

Re[2]: [Haskell-cafe] Re: [Haskell] AngloHaskell 2007, dates and venue confirmed

2007-07-14 Thread Bulat Ziganshin
Hello Andrew, Saturday, July 14, 2007, 10:09:03 PM, you wrote: Ooo... that's not far from here... Does this mean if I turn up, I can meet random Haskellers? no, you will meet undefined Haskeller because randomness is impure concept -- Best regards, Bulat

Re[2]: [Haskell-cafe] Type system madness

2007-07-14 Thread Bulat Ziganshin
Hello Andrew, Friday, July 13, 2007, 11:01:24 PM, you wrote: definitely. for example, on windows it doesn't support unicode filenames nor files bigger than 4gb so i use my own lib, a thin layer around Windows API Has a bug been reported for this? Have you (or anyone else) thought about

Re: [Haskell-cafe] Haskell monads for newbies

2007-07-14 Thread Derek Elkins
On Sat, 2007-07-14 at 20:58 +0200, Hugh Perkins wrote: On 7/14/07, Andrew Coppin andrewcoppin wrote: That is my recollection also. (Don't ask me *which* monads, mind you...) In the case in point, the law breakage never the less matches intuition; personally, I ignore the monad laws on the

[Haskell-cafe] Displaying fractions of a second from a datediff?

2007-07-14 Thread Hugh Perkins
Hi, Pretty dumb question I know, but..how to I display fractions of a second from a datediff? ie: main = do starttime - gettime -- do something here that takes a few seconds endtime - gettime let timediff = diffClockTimes endtime starttime let timediffstring

Re: [Haskell-cafe] Haskell monads for newbies

2007-07-14 Thread Hugh Perkins
Well, can you provide an example of an implementation of bind that satisfies an intuitive definition of bind but does not satisfy the monad laws? On 7/14/07, Derek Elkins [EMAIL PROTECTED] wrote: -Documentation- damn well better have the monad laws. Something is not a monad if it does not

Re: [Haskell-cafe] Newbie question about tuples

2007-07-14 Thread Andrew Coppin
Lukas Mai wrote: You may be interested in http://okmij.org/ftp/Haskell/number-parameterized-types.html Thanks for that! It's all fascinating stuff... ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] [weird stuff] The Dodgy Diagonal

2007-07-14 Thread Stefan O'Rear
On Sat, Jul 14, 2007 at 12:06:30PM +0100, Conor McBride wrote: A peculiar query for folks who know more about the internals of Haskell compilers than I do. I attach the full code with all the bits and pieces, but let me pull out the essentials in order to state the problem. newtype Id

Re: [Haskell-cafe] Haskell monads for newbies

2007-07-14 Thread Derek Elkins
ListT IO (http://www.haskell.org/hawiki/ListTDoneRight) On Sat, 2007-07-14 at 21:34 +0200, Hugh Perkins wrote: Well, can you provide an example of an implementation of bind that satisfies an intuitive definition of bind but does not satisfy the monad laws? On 7/14/07, Derek Elkins [EMAIL

Re: [Haskell-cafe] [weird stuff] The Dodgy Diagonal

2007-07-14 Thread Conor McBride
Hi Stefan Thanks for a very enlightening reply. In GHC 6.7.20070712 and Yhc, this is perfectly safe. In GRIN based systems like Jhc, this is *not* safe, since after evaluation comparisons are done using the full tag. It's now occurred to me that at a cost of some noise, I could have

Re: Re[4]: [Haskell-cafe] Newbie question about tuples

2007-07-14 Thread Peter Verswyvelen
Thanks Bulat, but now you scattered my hopes that GHC would magically do all these optimizations for me ;-) I must say that although the performance of Haskell is not really a concern to me, I was a bit disappointed that even with all the tricks of the state monad, unboxing, and

[Haskell-cafe] Re: Displaying fractions of a second from a datediff?

2007-07-14 Thread Hugh Perkins
Ok, so for anyone who cares, the answer is, the negative picoseconds should be added to the seconds to get the final answer: let secondsfloat = realToFrac( tdSec timediff ) + realToFrac(tdPicosec timediff) / 1 ___ Haskell-Cafe

Re: Re[4]: [Haskell-cafe] In-place modification

2007-07-14 Thread Hugh Perkins
On 7/14/07, Henk-Jan van Tuyl [EMAIL PROTECTED] wrote: There was some discussion about prime number generators earlier this year: http://www.haskell.org/pipermail/haskell-cafe/2007-February/022347.html http://www.haskell.org/pipermail/haskell-cafe/2007-February/022699.html Ok, so using

Re: [Haskell-cafe] Haskell monads for newbies

2007-07-14 Thread Claus Reinke
Yeah, the laws confused me for a while as well. Hint to guys writing Haskell documentation, we're not all doing CS phD you know ;-) We just want to get things done ;-) teachers and tutorials making a fuss about some concept is the surest way to guarantee that learners will find that concept

Re: [Haskell-cafe] List of authors happy to have work moved to theHaskell wiki

2007-07-14 Thread Ian Lynagh
On Sat, Jul 14, 2007 at 05:26:27PM +0100, Claus Reinke wrote: (if you post material you may later want to use in your book, or interim results from your research projects; remember, anything on the wiki is free for all, so anyone could republish it if it ends up there..)? (sorry if you

Re: Re[4]: [Haskell-cafe] In-place modification

2007-07-14 Thread Chaddaï Fouché
That's over 500 times faster ;-) ... Did you really read the Haskell code ? You're comparing two completely unrelated algorithms, talk about a fair comparison ! Maybe a reading of http://en.literateprograms.org/Sieve_of_Eratosthenes_(Haskell) would help you ? Note that you C# code algorithm

Re: Re[4]: [Haskell-cafe] In-place modification

2007-07-14 Thread Hugh Perkins
As I say, I'm not a Haskell expert, so feel free to provide a better implementation. On 7/15/07, Chaddaï Fouché [EMAIL PROTECTED] wrote: ... Did you really read the Haskell code ? You're comparing two completely unrelated algorithms, talk about a fair comparison !

Re: [Haskell-cafe] List of authors happy to have work moved totheHaskell wiki

2007-07-14 Thread Claus Reinke
(sorry if you already know this, just want to clarify. All AIUI, IANAL, etc) neither am i!-) If you publish something under licence A, you still remain the copyright holder, and can later also publish it under licence B. You can also publish it combined with other material under licence B.

Re: Re[4]: [Haskell-cafe] In-place modification

2007-07-14 Thread Derek Elkins
Read http://www.cs.hmc.edu/~oneill/papers/Sieve-JFP.pdf On Sun, 2007-07-15 at 00:38 +0200, Hugh Perkins wrote: As I say, I'm not a Haskell expert, so feel free to provide a better implementation. On 7/15/07, Chaddaï Fouché [EMAIL PROTECTED] wrote: ... Did you really read the Haskell

Re: Re[4]: [Haskell-cafe] In-place modification

2007-07-14 Thread Hugh Perkins
There's really a tendency in this newsgroup to point people to huge documents, when a small copy and paste would make the answer so much more accessible ;-) Anyway... so reading through the paper, it looks like its using a priority queue? Which basically is changing the algorithm somewhat

Re: [Haskell-cafe] Looking for final year project - using Haskell, or another functional language

2007-07-14 Thread Claus Reinke
I've already sent an email to the haskell.org admin requesting that /HOpenGL be made publically unviewable. Stefan in the interim, there's now a bare-bones wiki page: http://www.haskell.org/haskellwiki/Opengl quite dreary, but at least visitors will no longer thing that the binding should

Re: [Haskell-cafe] Haskell monads for newbies

2007-07-14 Thread Andrew Coppin
Peter Verswyvelen wrote: Ouch, I should not have brought up these monads again! I should have known better ;-) Mmm... ;-) I hope the Haskell community understands that for outsiders / newbies who want to learn or just look at Haskell and then do some Googling, all this monad talk looks

Re: [Haskell-cafe] Haskell monads for newbies

2007-07-14 Thread Andrew Coppin
Claus Reinke wrote: teachers and tutorials making a fuss about some concept is the surest way to guarantee that learners will find that concept difficult Definitely has a ring of truth to it... the monadic interface gives you two operations, one to throw things into a monad thing, and one to

Re: Re[4]: [Haskell-cafe] In-place modification

2007-07-14 Thread Chaddaï Fouché
2007/7/15, Hugh Perkins [EMAIL PROTECTED]: There's really a tendency in this newsgroup to point people to huge documents, when a small copy and paste would make the answer so much more accessible ;-) I was pointing you on a document of quite honest size in my opinion, and not really hard to

[Haskell-cafe] Troubles with Exercise 4.9 from YAHT

2007-07-14 Thread michael
from YAHT Exercise 4.9 Write a function elements which returns the elements in a BinaryTree in a bottom-up, left-to-right manner (i.e., the ���rst element returned in the left-most leaf, followed by its parent���s value, followed by the other child���s value, and so on). The re-

Re: Re[4]: [Haskell-cafe] In-place modification

2007-07-14 Thread Derek Elkins
On Sun, 2007-07-15 at 00:53 +0200, Hugh Perkins wrote: There's really a tendency in this newsgroup to point people to huge documents, when a small copy and paste would make the answer so much more accessible ;-) Anyway... so reading through the paper, it looks like its using a priority

Re: [Haskell-cafe] List of authors happy to have work moved totheHaskell wiki

2007-07-14 Thread Donald Bruce Stewart
claus.reinke: (sorry if you already know this, just want to clarify. All AIUI, IANAL, etc) neither am i!-) If you publish something under licence A, you still remain the copyright holder, and can later also publish it under licence B. You can also publish it combined with other material

Re: Re[4]: [Haskell-cafe] In-place modification

2007-07-14 Thread Donald Bruce Stewart
derek.a.elkins: On Sun, 2007-07-15 at 00:53 +0200, Hugh Perkins wrote: There's really a tendency in this newsgroup to point people to huge documents, when a small copy and paste would make the answer so much more accessible ;-) Anyway... so reading through the paper, it looks like its

[Haskell-cafe] Re: Type system madness

2007-07-14 Thread Samuel J . J . Bronson
Andrew Coppin andrewcoppin at btinternet.com writes: I continue to be surprised at the things that don't seem to be on the Wiki... Google is typically no help at all with anything Haskell-related, because Haskell is so completely obscure. The various haddoc documentation is also

Re: [Haskell-cafe] Ray tracer

2007-07-14 Thread Donald Bruce Stewart
andrewcoppin: The Haskell ray tracer seems to be a pretty standard and widely-used example program. But has anybody ever seriously tried to make a production-grade implementation? (I.e., one that is user-friendly, efficient, and with lots of functionallity.) All the ones I know of are

Re: Re[4]: [Haskell-cafe] In-place modification

2007-07-14 Thread Hugh Perkins
Chaddai, Unfortunately, your program doesnt work ;-) The function needs to take a parameter, which is the upper limit on our sieve, and return a single value, which is the number of primes in that interval. Complex requirements I know ;-) ___

Re: Re[4]: [Haskell-cafe] Newbie question about tuples

2007-07-14 Thread Donald Bruce Stewart
bf3: Thanks Bulat, but now you scattered my hopes that GHC would magically do all these optimizations for me ;-) I must say that although the performance of Haskell is not really a concern to me, I was a bit disappointed that even with all the tricks of the state monad, unboxing, and

Re: [Haskell-cafe] Troubles with Exercise 4.9 from YAHT

2007-07-14 Thread Chaddaï Fouché
2007/7/15, [EMAIL PROTECTED] [EMAIL PROTECTED]: from YAHT Exercise 4.9 Write a function elements which returns the elements in a BinaryTree . Any clues on how to proceed? You have to use pattern-matching on the constructors of the BinaryTree, with a recursive function. Do you

Re: Re[4]: [Haskell-cafe] In-place modification

2007-07-14 Thread Chaddaï Fouché
Well, I see, it is indeed very complex requirement... Maybe you could do the very complex following operation to at least test the speed of this implementation : let lastPrime = primes !! 17983 -- Jedaï ___ Haskell-Cafe mailing list

Re[2]: [Haskell-cafe] Re: [Haskell] AngloHaskell 2007, dates and venue confirmed

2007-07-14 Thread Philippa Cowderoy
On Sat, 14 Jul 2007, Bulat Ziganshin wrote: Hello Andrew, Saturday, July 14, 2007, 10:09:03 PM, you wrote: Ooo... that's not far from here... Does this mean if I turn up, I can meet random Haskellers? no, you will meet undefined Haskeller because randomness is impure concept

Re: Re[4]: [Haskell-cafe] In-place modification

2007-07-14 Thread Hugh Perkins
On 7/15/07, Derek Elkins [EMAIL PROTECTED] wrote: Read http://www.cs.hmc.edu/~oneill/papers/Sieve-JFP.pdf Ok, so switched to using the Data.Map version from this paper, which looks like a lazy, but real, version of the sieve of Arostothenes. This does run quite a lot faster, so we're going

Re: Re[4]: [Haskell-cafe] In-place modification

2007-07-14 Thread Chaddaï Fouché
2007/7/15, Chaddaï Fouché [EMAIL PROTECTED]: Well, I see, it is indeed very complex requirement... Maybe you could do the very complex following operation to at least test the speed of this implementation : let lastPrime = primes !! 17983 Or if you really want a function with your

Re: Re[4]: [Haskell-cafe] In-place modification

2007-07-14 Thread Hugh Perkins
(Random observation: Hmmm, strange, in the Data.Map version of primes above, we are missing 5 primes?) Hi Chaddai, Your algorithm does work significantly better than the others I've posted here :-) So much so, that we're going for a grid of 1000 to get the timings in an easy-to-measure

Re: Re[4]: [Haskell-cafe] In-place modification

2007-07-14 Thread Sebastian Sylvan
On 14/07/07, Hugh Perkins [EMAIL PROTECTED] wrote: As I say, I'm not a Haskell expert, so feel free to provide a better implementation. It's not really about providing a better implementation as that would imply that the algorithms are the same, which they are not. You're comparing two quite

Re: [Haskell-cafe] [weird stuff] The Dodgy Diagonal

2007-07-14 Thread Donald Bruce Stewart
ctm: Hi Stefan Thanks for a very enlightening reply. In GHC 6.7.20070712 and Yhc, this is perfectly safe. In GRIN based systems like Jhc, this is *not* safe, since after evaluation comparisons are done using the full tag. It's now occurred to me that at a cost of some noise, I

Re: [Haskell-cafe] Haskell monads for newbies

2007-07-14 Thread Steve Schafer
On Sun, 15 Jul 2007 00:21:50 +0100, you wrote: [quoting a generic attitude] basically everything I write programs for is mainly about I/O... It's funny how people always seem to think that, but if you look at what they're really doing, I/O is usually the least of their worries. Programming GUIs

Re: [Haskell-cafe] Haskell monads for newbies

2007-07-14 Thread Derek Elkins
On Sat, 2007-07-14 at 21:25 -0400, Steve Schafer wrote: On Sun, 15 Jul 2007 00:21:50 +0100, you wrote: [quoting a generic attitude] basically everything I write programs for is mainly about I/O... It's funny how people always seem to think that, but if you look at what they're really

Re: [Haskell-cafe] In-place modification

2007-07-14 Thread Jon Harrop
On Saturday 14 July 2007 23:45:57 Derek Elkins wrote: Read http://www.cs.hmc.edu/~oneill/papers/Sieve-JFP.pdf Wow, that is a really enlightening paper. :-) -- Dr Jon D Harrop, Flying Frog Consultancy Ltd. The OCaml Journal http://www.ffconsultancy.com/products/ocaml_journal/?e

Re: [Haskell-cafe] In-place modification

2007-07-14 Thread Jon Harrop
On Sunday 15 July 2007 00:31:12 Chaddaï Fouché wrote: The HaskellWiki repertory it under primes and it's at least 170 times faster than the extra-naive sieve you used in your comparison on my computer... (I have some doubts on the accuracy of the benchmark and System.Time at this level of

Re: [Haskell-cafe] In-place modification

2007-07-14 Thread Stefan O'Rear
On Sun, Jul 15, 2007 at 03:39:27AM +0100, Jon Harrop wrote: On Sunday 15 July 2007 00:31:12 Chaddaï Fouché wrote: The HaskellWiki repertory it under primes and it's at least 170 times faster than the extra-naive sieve you used in your comparison on my computer... (I have some doubts on the

[Haskell-cafe] Another monad question...

2007-07-14 Thread David LaPalomento
Hi everyone, I've been playing with the parsers decribed in Monadic Parser Combinators (http://www.cs.nott.ac.uk/~gmh/bib.html#monparsing) and I've gotten stumped. I'm trying to get comfortable working monadically, so please excuse my ignorance. Here's the relevant portions of my code: data

Re: [Haskell-cafe] Another monad question...

2007-07-14 Thread Stefan O'Rear
On Sat, Jul 14, 2007 at 11:26:56PM -0400, David LaPalomento wrote: I've been playing with the parsers decribed in Monadic Parser Combinators (http://www.cs.nott.ac.uk/~gmh/bib.html#monparsing) and I've gotten stumped. I'm trying to get comfortable working monadically, so please excuse my

[Haskell-cafe] Re: Perfect shuffle on std. libs

2007-07-14 Thread Dave Bayer
Felipe Almeida Lessa felipe.lessa at gmail.com writes: I wonder why Oleg's perfect shuffle[1] isn't on any standard library? This is incorrect terminology: A perfect shuffle is one where the cards interleave in a 1:1:1:1:1... pattern, achieving exactly the same permutation of the deck each

[Haskell-cafe] Frag

2007-07-14 Thread Jon Harrop
I just stumbled upon this fast action 3D shooter written entirely in Haskell: http://haskell.org/haskellwiki/Frag After 15 minutes trying to build it I find that it segfaults. Can anyone else get this to work? -- Dr Jon D Harrop, Flying Frog Consultancy Ltd. The OCaml Journal

Re: [Haskell-cafe] Frag

2007-07-14 Thread Donald Bruce Stewart
jon: I just stumbled upon this fast action 3D shooter written entirely in Haskell: http://haskell.org/haskellwiki/Frag After 15 minutes trying to build it I find that it segfaults. Can anyone else get this to work? Likely depends on your OpenGL version, and possibly even graphics

Re: [Haskell-cafe] Another monad question...

2007-07-14 Thread David LaPalomento
On 7/14/07, Stefan O'Rear [EMAIL PROTECTED] wrote: On Sat, Jul 14, 2007 at 11:26:56PM -0400, David LaPalomento wrote: I've been playing with the parsers decribed in Monadic Parser Combinators (http://www.cs.nott.ac.uk/~gmh/bib.html#monparsing) and I've gotten stumped. I'm trying to get

Re: [Haskell-cafe] Frag

2007-07-14 Thread Jon Harrop
On Sunday 15 July 2007 05:00:33 Donald Bruce Stewart wrote: Likely depends on your OpenGL version, and possibly even graphics card. Ok. Latest nVidia drivers with a GF7900GT. I use OpenGL a lot and everything from the drivers onwards is working beautifully. It's not been updated in about a

Re: [Haskell-cafe] Frag

2007-07-14 Thread Mark Wassell
Donald Bruce Stewart wrote: jon: I just stumbled upon this fast action 3D shooter written entirely in Haskell: http://haskell.org/haskellwiki/Frag After 15 minutes trying to build it I find that it segfaults. Can anyone else get this to work? Likely depends on your OpenGL

Re: [Haskell-cafe] Frag

2007-07-14 Thread Donald Bruce Stewart
mwassell: Donald Bruce Stewart wrote: jon: I just stumbled upon this fast action 3D shooter written entirely in Haskell: http://haskell.org/haskellwiki/Frag After 15 minutes trying to build it I find that it segfaults. Can anyone else get this to work? Likely depends on

Re: [Haskell-cafe] Another monad question...

2007-07-14 Thread Stefan O'Rear
On Sun, Jul 15, 2007 at 12:03:06AM -0400, David LaPalomento wrote: On 7/14/07, Stefan O'Rear [EMAIL PROTECTED] wrote: Your base case is subtly wrong - it should be return [], not mzero. Mzero always fails - mzero `mplus` x = x, by one of the MonadPlus laws. Ah! So here's another quick

Re: [Haskell-cafe] Frag

2007-07-14 Thread Jon Harrop
On Sunday 15 July 2007 05:15:52 Mark Wassell wrote: Builds easily and works for me with GHC 6.6.1 on widows (though). You need to specify a level when running it and you will get a series of messages about loading textures before the window appears. Does it get this far? Yes. Strictly

Re: [Haskell-cafe] Maintaining the community

2007-07-14 Thread Jonathan Cast
On Saturday 14 July 2007, Andrew Coppin wrote: Anthony Chaumas-Pellet wrote: From: Andrew Coppin [EMAIL PROTECTED] Really? Most web servers will accept a connection from anybody. (Unless it's *intended* to be an Intranet.) I'm not quite sure why somebody would configure their NNTP

Re: [Haskell-cafe] Another monad question...

2007-07-14 Thread Jonathan Cast
On Saturday 14 July 2007, Stefan O'Rear wrote: On Sun, Jul 15, 2007 at 12:03:06AM -0400, David LaPalomento wrote: On 7/14/07, Stefan O'Rear [EMAIL PROTECTED] wrote: Your base case is subtly wrong - it should be return [], not mzero. Mzero always fails - mzero `mplus` x = x, by one of the

Re: [Haskell-cafe] Indentation Creep

2007-07-14 Thread ajb
G'day. One small suggestion. Quoting Thomas Conway [EMAIL PROTECTED]: Just (v,e) - do case e of True - [...] False - [...] This works just as well: Just (v,True) - [...]