Re: [Haskell-cafe] Ray tracer

2007-07-15 Thread ajb
G'day all. Quoting Andrew Coppin [EMAIL PROTECTED]: 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

Re: [Haskell-cafe] Indentation Creep

2007-07-15 Thread Miguel Mitrofanov
TC dmin p = do TC mv - dmin' p TC case mv of TC Nothing - error dmin: no values TC Just (v,_) - return v TC dmin' p = do TC t - readTVar p TC case t of TC Empty - return Nothing TC Trie l m r - do TC mv - dmin' l TC case mv

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

2007-07-15 Thread Miguel Mitrofanov
ACP Daily traffic on the whole of the Usenet takes up a few ACP terabytes, and you presumably want to store more than one day ACP worth of Usenet traffic. You also need to keep in sync with the ACP other Usenet servers, as you are not the sole provider of ACP content. NNTP server are not

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

2007-07-15 Thread Miguel Mitrofanov
DL Ah! So here's another quick question: if mzero is the identity DL element, why isn't it part of the Monad class? Correct me if I'm DL wrong but aren't Monads (in the mathematical sense) required an DL identity element by definition? Yes, they do. And this identity element is called return in

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

2007-07-15 Thread Miguel Mitrofanov
SOR I've heard that Monads are in some way like Monoids, hence the SOR name. But I don't understand the explanation yet myself :( Just compare: Monoid: a set M with maps ident: M^0 - M and product: M^2 - M (here M^0 is a one-element set) Monad: a functor M with natural transformations return:

Re: [Haskell-cafe] Newbie question about tuples

2007-07-15 Thread Peter Verswyvelen
Donald: Yeah, there's some known low level issues in the code generator regarding heap and stack checks inside loops, and the use of registers on x86. But note this updated paper, http://www.cse.unsw.edu.au/~chak/papers/CLPKM07.html Add another core to your machine and it is no longer 4x

Re: [Haskell-cafe] Maintaining the community

2007-07-15 Thread Andrea Rossato
On Sat, Jul 14, 2007 at 11:24:36AM +0800, Michael T. Richter wrote: I've seen this pattern so often in communities. I've also seen it in management (the supervisor/manager who can do the job better than his underlings -- so he does) or in teaching (the popular teacher gets a heavier

Re: [Haskell-cafe] Newbie question about tuples

2007-07-15 Thread Donald Bruce Stewart
bf3: Donald: Yeah, there's some known low level issues in the code generator regarding heap and stack checks inside loops, and the use of registers on x86. But note this updated paper, http://www.cse.unsw.edu.au/~chak/papers/CLPKM07.html Add another core to your machine and it is no

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

2007-07-15 Thread apfelmus
Ian Lynagh wrote: 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. For example, if you were to write a couple of pages on type systems to the

Re: [Haskell-cafe] Maintaining the community

2007-07-15 Thread Andrea Rossato
On Sun, Jul 15, 2007 at 07:05:53PM +1000, Donald Bruce Stewart wrote: So how would you think we can approve? We have to help in more specific ways, and listen more carefully to what people are asking? I usually do this when I want a newcomer to join my community (for instance my research

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

2007-07-15 Thread Hugh Perkins
Sebastian, Why would I write a slow, complicated algorithm in C#? I'm not making these comparisons for some academic paper, I'm trying to get a feel for how the languages run in practice. And really in practice, I'm never going to write a prime algorithm using merge and so on, I'd just use the

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

2007-07-15 Thread Donald Bruce Stewart
hughperkins: Sebastian, Why would I write a slow, complicated algorithm in C#? I'm not making these comparisons for some academic paper, I'm trying to get a feel for how the languages run in practice. And really in practice, I'm never going to write a prime algorithm

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

2007-07-15 Thread Hugh Perkins
Hey, guys, I just realized this test is not really fair! I've been using the Microsoft .Net compiler ,which is a proprietary closed-source compiler. To be fair to Haskell, we should probably compare it to other open source products, such as g++ and mono? Here are the timings ;-) Haskell

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

2007-07-15 Thread Sebastian Sylvan
On 15/07/07, Hugh Perkins [EMAIL PROTECTED] wrote: Sebastian, Why would I write a slow, complicated algorithm in C#? I'm not making these comparisons for some academic paper, I'm trying to get a feel for how the languages run in practice. And really in practice, I'm never going to write a

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

2007-07-15 Thread Hugh Perkins
On 7/15/07, Sebastian Sylvan [EMAIL PROTECTED] wrote: [me thinks he doth protest too much] ;-) The rules of the competition are quite fair: both sides make an optimal algorithm using their preferred language. It's ok to hardcode the first 3 or 4 primes if you must, hardcoding the entire

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

2007-07-15 Thread Sebastian Sylvan
On 15/07/07, Hugh Perkins [EMAIL PROTECTED] wrote: On 7/15/07, Sebastian Sylvan [EMAIL PROTECTED] wrote: [me thinks he doth protest too much] ;-) The rules of the competition are quite fair: both sides make an optimal algorithm using their preferred language. It's ok to hardcode the first 3 or

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

2007-07-15 Thread Donald Bruce Stewart
hughperkins: Hey, guys, I just realized this test is not really fair! I've been using the Microsoft .Net compiler ,which is a proprietary closed-source compiler. To be fair to Haskell, we should probably compare it to other open source products, such as g++ and mono? Here

[Haskell-cafe] ANNOUNCE: CC-delcont-0.1; Delimited continuations for Haskell

2007-07-15 Thread Dan Doel
Hello, After a bit of hacking, and much documenting, I'm pleased to announce a preliminary release of a delimited continuation library for Haskell. The implementation is drawn from A Monadic Framework for Delimited Continuations[1] by Dybvig, Petyon Jones and Sabry, although it has some

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

2007-07-15 Thread Hugh Perkins
On 7/15/07, Donald Bruce Stewart [EMAIL PROTECTED] wrote: [snip] unsafeWrite[snip] [snip]unsafeRead[snip] Hi Donald, the idea is to use this for operational code, so avoiding unsafe operations is preferable ;-) You'll note that the C# version is not using unsafe operations, although to be

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

2007-07-15 Thread Donald Bruce Stewart
hughperkins: On 7/15/07, Donald Bruce Stewart [EMAIL PROTECTED] wrote: [snip] unsafeWrite[snip] [snip]unsafeRead[snip] Hi Donald, the idea is to use this for operational code, so avoiding unsafe operations is preferable ;-) You'll note that the C# version is not

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

2007-07-15 Thread Sebastian Sylvan
On 15/07/07, Donald Bruce Stewart [EMAIL PROTECTED] wrote: hughperkins: On 7/15/07, Donald Bruce Stewart [EMAIL PROTECTED] wrote: [snip] unsafeWrite[snip] [snip]unsafeRead[snip] Hi Donald, the idea is to use this for operational code, so avoiding unsafe operations is

[Haskell-cafe] Re: ANNOUNCE: CC-delcont-0.1; Delimited continuations for Haskell

2007-07-15 Thread Dan Doel
This is intended as an illustration of how one might use the CC-delcont library, and/or what it might be good for at all. For more, a mailing list search for 'oleg' would likely be fruitful, as this library is heavily derived from the delimited continuation implementation he's used in past mails.

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

2007-07-15 Thread Hugh Perkins
On 7/15/07, Donald Bruce Stewart [EMAIL PROTECTED] wrote: What C# version are you using, by the way? (So I can check if it does any tricks). - csc is in the Microsoft.Net Framework 2.0 runtime, which you can download from microsoft.com (free download). - gmcs/mono are from Mono 1.2.2.1 ,

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

2007-07-15 Thread Hugh Perkins
On 7/15/07, Sebastian Sylvan [EMAIL PROTECTED] wrote: unsafe' here just means direct array indexing. Same as the other languages. Haskell's 'unsafe' is a little more paranoid that other languages. Yes, I was kindof hoping it was something like that. Cool :-) Since the goal is to flip

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

2007-07-15 Thread Hugh Perkins
On 7/15/07, Hugh Perkins [EMAIL PROTECTED] wrote: On 7/15/07, Sebastian Sylvan [EMAIL PROTECTED] wrote: unsafe' here just means direct array indexing. Same as the other languages. Haskell's 'unsafe' is a little more paranoid that other languages. Yes, I was kindof hoping it was

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

2007-07-15 Thread Sebastian Sylvan
On 15/07/07, Hugh Perkins [EMAIL PROTECTED] wrote: On 7/15/07, Hugh Perkins [EMAIL PROTECTED] wrote: On 7/15/07, Sebastian Sylvan [EMAIL PROTECTED] wrote: unsafe' here just means direct array indexing. Same as the other languages. Haskell's 'unsafe' is a little more paranoid that other

Re: [Haskell-cafe] Indentation Creep

2007-07-15 Thread Thomas Conway
On 7/15/07, Miguel Mitrofanov [EMAIL PROTECTED] wrote: [nice solution deleted] Shiny. Everyone's suggestions show that in order to advance to a level 3 Haskell Mage[*], I need to spend a chunk of time learning to grok monad transformers. Thanks for the suggestions. If anyone cares I can

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

2007-07-15 Thread Hugh Perkins
On 7/15/07, Sebastian Sylvan [EMAIL PROTECTED] wrote: Well, *I* didn't say it but yes. Unsafe disables bounds checking (which in this case is safe). I think you can just stick an unsafe{} in the C# version to disable them. Oh well that's not good. Yes, you can use unsafe in C# too, but you

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

2007-07-15 Thread Hugh Perkins
Hey, I just realized I can shave off another 30% in C# ;-) So now the timings become: Safe Haskell = J:\dev\haskellghc -O2 -o primechaddai.exe PrimeChaddai.hs J:\dev\haskellprimechaddai number of primes: 664579 Elapsed time: 26.234 Unsafe Haskell === J:\dev\haskellghc

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

2007-07-15 Thread Sebastian Sylvan
On 15/07/07, Hugh Perkins [EMAIL PROTECTED] wrote: Hey, I just realized I can shave off another 30% in C# ;-) So now the timings become: Safe Haskell = J:\dev\haskellghc -O2 -o primechaddai.exe PrimeChaddai.hs J:\dev\haskellprimechaddai number of primes: 664579 Elapsed time: 26.234

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

2007-07-15 Thread Hugh Perkins
On 7/15/07, Sebastian Sylvan [EMAIL PROTECTED] wrote: I don't see what the point of this is? Why do timings of different algorithms? Of course you could do the same optimization in any language, so why do you think it's relevant to change the algorithm in *one* of the languages and then make

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

2007-07-15 Thread Sebastian Sylvan
On 15/07/07, Hugh Perkins [EMAIL PROTECTED] wrote: On 7/15/07, Sebastian Sylvan [EMAIL PROTECTED] wrote: I don't see what the point of this is? Why do timings of different algorithms? Of course you could do the same optimization in any language, so why do you think it's relevant to change the

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

2007-07-15 Thread Donald Bruce Stewart
hughperkins: On 7/15/07, Sebastian Sylvan [EMAIL PROTECTED] wrote: I don't see what the point of this is? Why do timings of different algorithms? Of course you could do the same optimization in any language, so why do you think it's relevant to change the

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

2007-07-15 Thread Sebastian Sylvan
On 15/07/07, Sebastian Sylvan [EMAIL PROTECTED] wrote: On 15/07/07, Hugh Perkins [EMAIL PROTECTED] wrote: On 7/15/07, Sebastian Sylvan [EMAIL PROTECTED] wrote: I don't see what the point of this is? Why do timings of different algorithms? Of course you could do the same optimization in any

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

2007-07-15 Thread Hugh Perkins
On 7/15/07, Donald Bruce Stewart [EMAIL PROTECTED] wrote: In this case it is fine. You're setting bits in the cache. Please use the same algorithm, or any conclusions are meaningless. No, I'm counting prime numbers. Somewhat faster it seems ;-) Let's put this into the real world a moment.

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

2007-07-15 Thread Hugh Perkins
On 7/15/07, Sebastian Sylvan [EMAIL PROTECTED] wrote: My GHC compiler is broken, I only have GHCi, but this is about twice for me as fast as the previous version you benchmarked, btw. Hi Sebastian, Here are the results: Haskell (Safe Haskell right?) == J:\dev\haskellghc -fglasgow-exts

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

2007-07-15 Thread Hugh Perkins
On 7/15/07, Sebastian Sylvan [EMAIL PROTECTED] wrote: [Argh, no way can a Microsoft language be better than Haskell] Well, if you scan higher in the thread, there are two benchmarks. The prime numbers benchmark was a simple 10 minute benchmark to compare the computational speed (something

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

2007-07-15 Thread Sebastian Sylvan
On 15/07/07, Hugh Perkins [EMAIL PROTECTED] wrote: On 7/15/07, Sebastian Sylvan [EMAIL PROTECTED] wrote: [Argh, no way can a Microsoft language be better than Haskell] Well, if you scan higher in the thread, there are two benchmarks. The prime numbers benchmark was a simple 10 minute

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

2007-07-15 Thread Donald Bruce Stewart
hughperkins: Hey, I just realized I can shave off another 30% in C# ;-) So now the timings become: Ok. So do the same thing to the Haskell program. The compilers should produce pretty much identical assembly. {-# OPTIONS -O2 -optc-O -fbang-patterns #-} import Control.Monad.ST

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

2007-07-15 Thread Sebastian Sylvan
On 15/07/07, Donald Bruce Stewart [EMAIL PROTECTED] wrote: hughperkins: Hey, I just realized I can shave off another 30% in C# ;-) So now the timings become: Ok. So do the same thing to the Haskell program. The compilers should produce pretty much identical assembly. {-# OPTIONS

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

2007-07-15 Thread Hugh Perkins
On 7/15/07, Sebastian Sylvan [EMAIL PROTECTED] wrote: Surely you can remove the read here, and just always do the write? Ah you'd think so, but if it's anything like the C# version, strangely that would be slower. In his last message Don explains that this is because the write dirties the

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

2007-07-15 Thread Sebastian Sylvan
On 15/07/07, Hugh Perkins [EMAIL PROTECTED] wrote: On 7/15/07, Sebastian Sylvan [EMAIL PROTECTED] wrote: Surely you can remove the read here, and just always do the write? Ah you'd think so, but if it's anything like the C# version, strangely that would be slower. In his last message Don

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

2007-07-15 Thread Donald Bruce Stewart
dons: hughperkins: Hey, I just realized I can shave off another 30% in C# ;-) So now the timings become: Ok. So do the same thing to the Haskell program. The compilers should produce pretty much identical assembly. Oh, and I forgot you count up by two now. Here's the Haskell

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

2007-07-15 Thread Donald Bruce Stewart
dons: dons: hughperkins: Hey, I just realized I can shave off another 30% in C# ;-) So now the timings become: Ok. So do the same thing to the Haskell program. The compilers should produce pretty much identical assembly. Oh, and I forgot you count up by two now.

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

2007-07-15 Thread Sebastian Sylvan
On 15/07/07, Donald Bruce Stewart [EMAIL PROTECTED] wrote: dons: dons: hughperkins: Hey, I just realized I can shave off another 30% in C# ;-) So now the timings become: Ok. So do the same thing to the Haskell program. The compilers should produce pretty much identical

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

2007-07-15 Thread Hugh Perkins
On 15/07/07, Donald Bruce Stewart [EMAIL PROTECTED] wrote: Oh! Much faster. Looks like Haskell is 100x faster than C#. Who gets fired? :) Well, you've switched back to using unsafe operations there, Donald ;-) Anyway, before you guys get too narked at me ;-) I'd just like to say that I'm

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

2007-07-15 Thread Bulat Ziganshin
Hello Chaddai, Sunday, July 15, 2007, 3:31:12 AM, you wrote: Due to the nature of Haskell, it's not so easy to do the same thing (write a C program in Haskell as you wrote a C program in C#), so the conclusion is obviously to Haskell disadvantage. it's possible to directly rewrite C code in

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

2007-07-15 Thread Brandon S. Allbery KF8NH
On Jul 15, 2007, at 7:53 , Sebastian Sylvan wrote: Still, I think youre methodology sucks. If you want to compare languages you should implement the same algorithm. (...) If this is about comparing languages, you should compare them fairly. But is it comparing them fairly if you use an

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

2007-07-15 Thread Brandon S. Allbery KF8NH
On Jul 15, 2007, at 8:45 , Donald Bruce Stewart wrote: main = print $( let x = pureSieve 1000 in [| x |] ) I'm reminded of the C++ expert in CMU SCS who used to amuse himself by making template expansion do all the real work at compile time. (Yes, including a prime sieve.) --

Re: [Haskell-cafe] Maintaining the community

2007-07-15 Thread Michael T. Richter
On Sun, 2007-15-07 at 10:56 +0200, Andrea Rossato wrote: I've seen this pattern so often in communities. I may be wrong, but I think you do not get the specificity of the Haskell community, that is quite peculiar, I'd say. I think you're wrong. ;) The specifics of motivation and style

Re: [Haskell-cafe] Maintaining the community

2007-07-15 Thread Brandon S. Allbery KF8NH
On Jul 15, 2007, at 0:47 , Jonathan Cast wrote: Usenet is a giant network of NNTP servers (and UUCP servers before that...) that ISPs (and various Unix sites before that) maintained at one time (most seem to have given up on it now), with thousands of general-purpose newsgroups that at one

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

2007-07-15 Thread Steve Schafer
On Sun, 15 Jul 2007 14:15:03 +0200, you wrote: ...a simple 10 minute benchmark to compare the computational speed... We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil. - Donald Knuth (paraphrasing Tony Hoare) Haskell is about

Re: [Haskell-cafe] Maintaining the community

2007-07-15 Thread Jules Bean
Andrea Rossato wrote: I may be wrong, but I think you do not get the specificity of the Haskell community, that is quite peculiar, I'd say. Interesting. I've just read your message three times, and you argue eloquently, and coherently. But I feel a bit of a disconnection. I don't recognise

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

2007-07-15 Thread Hugh Perkins
Brandon wrote: Seems to me you get the best picture by picking two algorithms, one which favors C# and one which favors Haskell, and implementing both in both languages. Sounds good to me. What is a good problem that favors Haskell? ___

Re: [Haskell-cafe] Haskell monads for newbies

2007-07-15 Thread Andrew Coppin
Steve Schafer wrote: 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 is about the only reasonably common I/O-related

Re: [Haskell-cafe] Haskell monads for newbies

2007-07-15 Thread Andrew Coppin
Derek Elkins wrote: 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

Re: [Haskell-cafe] Ray tracer

2007-07-15 Thread Andrew Coppin
[EMAIL PROTECTED] wrote: G'day all. Quoting Andrew Coppin [EMAIL PROTECTED]: 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,

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

2007-07-15 Thread Donald Bruce Stewart
hughperkins: Brandon wrote: Seems to me you get the best picture by picking two algorithms, one which favors C# and one which favors Haskell, and implementing both in both languages. Sounds good to me. What is a good problem that favors Haskell? NO. We just

Re: [Haskell-cafe] Newbie question about tuples

2007-07-15 Thread Andrew Coppin
Donald Bruce Stewart wrote: bf3: Maybe this is yet another newbie stupid question, but do you mean that GHC does automatic multi-threading? (Haskell seems very suitable for that) Otherwise adding an extra core does not really help does it? No, though that would be nice! You do have to

Re: [Haskell-cafe] Maintaining the community

2007-07-15 Thread Alex Queiroz
Hallo, On 7/14/07, Michael T. Richter [EMAIL PROTECTED] wrote: While it is understandable, given the intense interest most grognards of any language have in playing with the language, for people to enjoy conversations that go into the ever-more-esoteric, it is decidedly not helpful to the

Re: [Haskell-cafe] Newbie question about tuples

2007-07-15 Thread Donald Bruce Stewart
andrewcoppin: Donald Bruce Stewart wrote: bf3: Maybe this is yet another newbie stupid question, but do you mean that GHC does automatic multi-threading? (Haskell seems very suitable for that) Otherwise adding an extra core does not really help does it? No, though that would be nice!

[Haskell-cafe] Multicode madness [was: Newbie question about tuples]

2007-07-15 Thread Andrew Coppin
Donald Bruce Stewart wrote: andrewcoppin: I read somewhere that GHC's SMP support has been tested up to 40 cores. Pray tell me, what the heck kind of machine has 40 cores? (And where can I buy mine from?? :-D LOL!) 40 cpus. It's a midrange Sun Fire server, something like this one

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

2007-07-15 Thread Hugh Perkins
On 7/15/07, Donald Bruce Stewart [EMAIL PROTECTED] wrote: However, if you're keen, and agreeing to implement the same algorithm on both systems, Sorry, the rule is you use what's available in your chosen language, otherwise I have to restrict myself only to use things available in Haskell,

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

2007-07-15 Thread Bulat Ziganshin
Hello Donald, Sunday, July 15, 2007, 8:22:33 PM, you wrote: usually 2-4x slower. Really poor at lightweight concurrency. both systems, I'd have a go in C# at 'chameneos', a concurrency benchmark, shootout contains only two or three tests that compare quality of code generated by compiler

Re: [Haskell-cafe] Ray tracer

2007-07-15 Thread Philippa Cowderoy
On Sun, 15 Jul 2007, Andrew Coppin wrote: [EMAIL PROTECTED] wrote: G'day all. Quoting Andrew Coppin [EMAIL PROTECTED]: 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

Re: [Haskell-cafe] Maintaining the community

2007-07-15 Thread Andrew Coppin
This is a bit tangental, but... One problem I sometimes have is not knowing the status of things. E.g., you read about Associated Types, and then you go hey, is this implemented now? is it being implemented soon? etc. (Don't all rush in and tell me about ATs - I'm only picking it as an

Re: [Haskell-cafe] Ray tracer

2007-07-15 Thread Andrew Coppin
Philippa Cowderoy wrote: On Sun, 15 Jul 2007, Andrew Coppin wrote: By production grade I don't mean you can put Pixar to shame, I just mean it's not an experimental research project - it's something designed to actually be used by normal users. Or to put it another way, that the

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

2007-07-15 Thread Andrew Coppin
Does this mean if I turn up, I can meet random Haskellers? no, you will meet undefined Haskeller because randomness is impure concept Assuming that haskellers are all pure may be a bad idea... ...and who says Haskell nerds don't have humour? :^)

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

2007-07-15 Thread Hugh Perkins
On 7/15/07, Hugh Perkins [EMAIL PROTECTED] wrote: I'd have a go in C# at 'chameneos', a concurrency benchmark, http://shootout.alioth.debian.org/gp4/benchmark.php?test=chameneoslang=all Errr this is kindof a strange problem, the answer is always N * 2? And there we see why I dislike

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

2007-07-15 Thread Sebastian Sylvan
On 15/07/07, Hugh Perkins [EMAIL PROTECTED] wrote: On 7/15/07, Donald Bruce Stewart [EMAIL PROTECTED] wrote: However, if you're keen, and agreeing to implement the same algorithm on both systems, Sorry, the rule is you use what's available in your chosen language, otherwise I have to restrict

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

2007-07-15 Thread Hugh Perkins
Just for laughs, here's my solution to Chameneos. J:\dev\haskellcsc /nologo Chameneos2.cs J:\dev\haskellchameneos2 200 elapsed time: 0 Compares quite favorably to the Haskell solution: J:\dev\haskellghc -fglasgow-exts -O2 -o Chameneos.exe Chameneos.hs J:\dev\haskellchameneos 200 number

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

2007-07-15 Thread Hugh Perkins
Oh wait, hmmm, might have misread the question :-D ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Ray tracer

2007-07-15 Thread Sebastian Sylvan
On 15/07/07, Andrew Coppin [EMAIL PROTECTED] wrote: Philippa Cowderoy wrote: On Sun, 15 Jul 2007, Andrew Coppin wrote: By production grade I don't mean you can put Pixar to shame, I just mean it's not an experimental research project - it's something designed to actually be used by normal

Re: [Haskell-cafe] Maintaining the community

2007-07-15 Thread Derek Elkins
On Sun, 2007-07-15 at 17:49 +0100, Andrew Coppin wrote: This is a bit tangental, but... One problem I sometimes have is not knowing the status of things. E.g., you read about Associated Types, and then you go hey, is this implemented now? is it being implemented soon? etc. (Don't all

Re: [Haskell-cafe] Maintaining the community

2007-07-15 Thread Andrew Coppin
Derek Elkins wrote: On Sun, 2007-07-15 at 17:49 +0100, Andrew Coppin wrote: This is a bit tangental, but... One problem I sometimes have is not knowing the status of things. E.g., you read about Associated Types, and then you go hey, is this implemented now? is it being implemented soon?

Re: [Haskell-cafe] Haskell monads for newbies

2007-07-15 Thread Derek Elkins
On Sun, 2007-07-15 at 17:11 +0100, Andrew Coppin wrote: Derek Elkins wrote: 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...

Re: [Haskell-cafe] In-place modification

2007-07-15 Thread Jon Harrop
On Sunday 15 July 2007 11:19:29 Hugh Perkins wrote: Not only does mono come close to the Microsoft .Net time, both mono and Microsoft .Net are faster than g++ ;-) and whack Haskell. This should tell you that your C++ is not very good. This is several times faster, for example: #include

Re: [Haskell-cafe] Maintaining the community

2007-07-15 Thread Derek Elkins
On Sun, 2007-07-15 at 18:47 +0100, Andrew Coppin wrote: Derek Elkins wrote: On Sun, 2007-07-15 at 17:49 +0100, Andrew Coppin wrote: This is a bit tangental, but... One problem I sometimes have is not knowing the status of things. E.g., you read about Associated Types, and then you

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

2007-07-15 Thread Hugh Perkins
On 7/15/07, Hugh Perkins [EMAIL PROTECTED] wrote: On 7/15/07, Hugh Perkins [EMAIL PROTECTED] wrote: I'd have a go in C# at 'chameneos', a concurrency benchmark, http://shootout.alioth.debian.org/gp4/benchmark.php?test=chameneoslang=all Errr this is kindof a strange problem,

Re: [Haskell-cafe] In-place modification

2007-07-15 Thread Hugh Perkins
On 7/15/07, Jon Harrop [EMAIL PROTECTED] wrote: This should tell you that your C++ is not very good. This is several times faster, for example: For some reason you were using C-style allocation rather than the C++ STL to implement a bit vector. The STL implementation is optimized. Yes good

RE: [Haskell-cafe] Newbie question about tuples

2007-07-15 Thread Peter Verswyvelen
Add another core to your machine and it is no longer 4x slower :) Add 15 more cores and its really no longer 4x slower : Maybe this is yet another newbie stupid question, but do you mean that GHC does automatic multi-threading? (Haskell seems very suitable for No, though that would be nice!

Re: [Haskell-cafe] Haskell monads for newbies

2007-07-15 Thread Andrew Coppin
Derek Elkins wrote: On Sun, 2007-07-15 at 17:11 +0100, Andrew Coppin wrote: I'm still really really fuzzy on why this exists... What? xmonad. The reason I pointed it out is that it (a window manager) is something one usually thinks of as being nothing but IO, yet this is not at

Re: [Haskell-cafe] Maintaining the community

2007-07-15 Thread Andrew Coppin
Derek Elkins wrote: On Sun, 2007-07-15 at 18:47 +0100, Andrew Coppin wrote: I could have sworn I heard somewhere that the debugger would be in GHC 6.6.1... but, apparently, I am mistaken. I have no idea which version it *is* going to be in... (Presumably the next one.) On the very

Re: [Haskell-cafe] Haskell monads for newbies

2007-07-15 Thread Brandon S. Allbery KF8NH
On Jul 15, 2007, at 14:23 , Andrew Coppin wrote: More... featureful...? It's a minimalistic WM. It even says so on the tin. Either it's minimal or it isn't... minimalistic != minimal The disconnect here is that most people don't want a *truly* minimal WM. They want one which stays out

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

2007-07-15 Thread Hugh Perkins
On 7/15/07, Sebastian Sylvan [EMAIL PROTECTED] wrote: I thought the point wasn't to compare programmer's creativity, but to compare languages? Sebastian, you cant directly compare languages, you can only compare the results of a pairing between developers and those languages. There's no

Re: [Haskell-cafe] Haskell monads for newbies

2007-07-15 Thread Hugh Perkins
On 7/15/07, Andrew Coppin [EMAIL PROTECTED] wrote: Anyway, I have pointed out that somebody once wrote a Quake clone in Haskell Really? Do you have a link? This would be quite hard to do, so I'm going to assume that someone who took the effort to do this would make an effort to publicize

Re: [Haskell-cafe] Haskell monads for newbies

2007-07-15 Thread Brandon S. Allbery KF8NH
On Jul 15, 2007, at 14:34 , Hugh Perkins wrote: On 7/15/07, Andrew Coppin [EMAIL PROTECTED] wrote: Anyway, I have pointed out that somebody once wrote a Quake clone in Haskell Really? Do you have a link? This would be quite hard to do, so I'm going to assume that someone who took the

[Haskell-cafe] Haskell shootout game

2007-07-15 Thread Hugh Perkins
Had an idea: a real shootout game for Haskell. The way it would work is: - you email a haskell program to a specific address - it shows up on a web-page The webpage shows the last submitted solution for each person - anyone can select two solutions and click Fight - the scripts fight in an

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

2007-07-15 Thread David LaPalomento
On 7/15/07, Miguel Mitrofanov [EMAIL PROTECTED] wrote: SOR I've heard that Monads are in some way like Monoids, hence the SOR name. But I don't understand the explanation yet myself :( Just compare: Monoid: a set M with maps ident: M^0 - M and product: M^2 - M (here M^0 is a one-element set)

[Haskell-cafe] SHA1 again

2007-07-15 Thread Malte Milatz
See the following link for a purely functional and straight-forward implementation of SHA1. Disclaimer: Please be kind to me, I haven't done much Haskell (yet). And I know nothing about SHA1 except its specification. http://hpaste.org/1695#a2 It performs better than the SHA1 algorithm

Re: [Haskell-cafe] Haskell monads for newbies

2007-07-15 Thread Paul Moore
On 15/07/07, Andrew Coppin [EMAIL PROTECTED] wrote: I guess because in most normal programming languages you can do I/O anywhere you damn like, it doesn't occur to most programmers that it's possible to make a seperation. (Most seem to realise that, e.g., mixing business logic with GUI code is a

Re: [Haskell-cafe] Maintaining the community

2007-07-15 Thread Claus Reinke
This is a bit tangental, but... One problem I sometimes have is not knowing the status of things. E.g., you read about Associated Types, and then you go hey, is this implemented now? is it being implemented soon? etc. (Don't all rush in and tell me about ATs - I'm only picking it as an

Re: [Haskell-cafe] Indentation Creep

2007-07-15 Thread Claus Reinke
Everyone's suggestions show that in order to advance to a level 3 Haskell Mage[*], I need to spend a chunk of time learning to grok monad transformers. let's see whether we can get from the initial version to the suggested final version without any magic, in a somewhat long sequence of minor

Re: [Haskell-cafe] Haskell monads for newbies

2007-07-15 Thread Jonathan Cast
On Sunday 15 July 2007, Paul Moore wrote: On 15/07/07, Andrew Coppin [EMAIL PROTECTED] wrote: I guess because in most normal programming languages you can do I/O anywhere you damn like, it doesn't occur to most programmers that it's possible to make a seperation. (Most seem to realise that,

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

2007-07-15 Thread Sebastian Sylvan
On 15/07/07, Hugh Perkins [EMAIL PROTECTED] wrote: On 7/15/07, Sebastian Sylvan [EMAIL PROTECTED] wrote: I thought the point wasn't to compare programmer's creativity, but to compare languages? Sebastian, you cant directly compare languages, you can only compare the results of a pairing

[Haskell-cafe] Re: SHA1 again

2007-07-15 Thread Dominic Steinitz
Malte Milatz malte at gmx-topmail.de writes: See the following link for a purely functional and straight-forward implementation of SHA1. Disclaimer: Please be kind to me, I haven't done much Haskell (yet). And I know nothing about SHA1 except its specification.

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

2007-07-15 Thread Hugh Perkins
On 7/15/07, Sebastian Sylvan [EMAIL PROTECTED] wrote: Hi Sebastian, There are literally thousands of problems at http://topcoder.com. I'm totally fine with using any of these as a benchmark. Can you find one that shows off the strengths of Haskell? You don't think that multiple agents

Re: [Haskell-cafe] Haskell shootout game

2007-07-15 Thread David LaPalomento
On 7/15/07, Hugh Perkins [EMAIL PROTECTED] wrote: Had an idea: a real shootout game for Haskell. The way it would work is: - you email a haskell program to a specific address - it shows up on a web-page The webpage shows the last submitted solution for each person - anyone can select two

Re: [Haskell-cafe] Re: SHA1 again

2007-07-15 Thread Malte Milatz
Dominic Steinitz: Malte Milatz: http://hpaste.org/1695#a2 It performs better than the SHA1 algorithm in Crypto: It is faster by a factor of approximately e. It is also competitive (regarding time) with the »unsafe« SHA1 implementation posted here some days ago, Great. Can you

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

2007-07-15 Thread Hugh Perkins
On 7/15/07, Donald Bruce Stewart [EMAIL PROTECTED] wrote: or maybe 'pidigits', a lazy pi generator, http://shootout.alioth.debian.org/gp4/benchmark.php?test=pidigitslang=ghcid=0 This is I/O bound, which isnt interesting, unless you really want to benchmark I/O to console? We can improve

  1   2   >