[Haskell-cafe] Found quote: One of the ineradicable illusions about C++ is that the compiler should be able to see through ...

2012-05-23 Thread KC
all the abstractions and obfuscations an “advanced” C++ program contains. First and foremost, C++ should be seen as a language that enables complexity management. The features one has grown fond of in this concept, like operator overloading, object orientation, automatic construction/destruction,

Re: [Haskell-cafe] Formalisation for types of monads

2012-05-23 Thread Yves Parès
Note about []: Don't even mention foldl. The folding combinator for lists is foldr, period. Yes, I do agree. I came to this when I realized foldr gave the church encoding of a list. (Well, actually, due to parameters ordering: *churchList list* z0 f = foldr f z0 list does)

Re: [Haskell-cafe] Formalisation for types of monads

2012-05-23 Thread Ertugrul Söylemez
Yves Parès yves.pa...@gmail.com wrote: Note about []: Don't even mention foldl. The folding combinator for lists is foldr, period. Yes, I do agree. I came to this when I realized foldr gave the church encoding of a list. Not only that. The foldr combinator has an identity fold and

Re: [Haskell-cafe] Can Haskell outperform C++?

2012-05-23 Thread Yves Parès
I understand your concerns about modifying the current ideology, it's fair enough. Actually I'm myself more in favor of adding strict couterparts, and export them conjointly, to support both the mathematical roots and the performances of the operations that are done most of time (Which kind of

[Haskell-cafe] HPC question

2012-05-23 Thread David Turner
Dear Haskell Cafe, I've been playing around with the -fhpc option to GHC and have come across some things being highlighted yellow in the HTML markup for which I can't work out the right way to 'cover' them. A cut down program that shows what I'm talking about is at http://hpaste.org/6

Re: [Haskell-cafe] cool tools

2012-05-23 Thread Chris Dornan
Indeed! I don't know why it wasn't obvious to me sooner. Sorry for any confusion. But as you say -- the main point stands. Chris -Original Message- From: haskell-cafe-boun...@haskell.org [mailto:haskell-cafe-boun...@haskell.org] On Behalf Of Brent Yorgey Sent: 22 May 2012 03:21 To:

Re: [Haskell-cafe] HPC question

2012-05-23 Thread Andres Löh
Hi David. Now, if I fiddle in the .tix file by hand to fake a usage of (/=) by changing the 52nd entry from 0 to 1, the Eq instance isn't highlighted any more in the HTML output. More strangely, if I then remove the usage of (==) by changing the 51st entry from 1 to 0, the Eq instance still

Re: [Haskell-cafe] HPC question

2012-05-23 Thread David Turner
On 23/05/2012 11:22, Andres Löh wrote: I've not looked at the .tix file, but a few tests seem to confirm what I'd suspect. For derived instances, you have to cover *all* methods, otherwise the type class will be shown as not covered. Ok, I see. It's going to take me a while to cover all

Re: [Haskell-cafe] Please critique my code (a simple lexer)

2012-05-23 Thread Lorenzo Bolla
On Tue, May 22, 2012 at 4:13 PM, John Simon zildjoh...@gmail.com wrote: data Lexer = Lexer String makeLexer :: String - Lexer makeLexer fn = Lexer fn `makeLexer` is redundant. You can simply use `Lexer`. L. ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] Correspondence between libraries and modules

2012-05-23 Thread Rustom Mody
On Tue, Apr 24, 2012 at 7:29 PM, Gregg Lebovitz glebov...@gmail.com wrote: On 4/23/2012 10:17 PM, Brandon Allbery wrote: On Mon, Apr 23, 2012 at 17:16, Gregg Lebovitz glebov...@gmail.comwrote: On 4/23/2012 3:39 PM, Brandon Allbery wrote: The other dirty little secret that is

[Haskell-cafe] Typed TemplateHaskell?

2012-05-23 Thread Ilya Portnov
Hello Haskell world. One well-known missfeature of TemplateHaskell is it's «untypedness». I mean, that if you have say an expression (Exp or Q Exp), you do not know it's type (does it represent String or Int or whatever). And GHC does not know too. So, one could easily construct bad-typed

Re: [Haskell-cafe] vector operations

2012-05-23 Thread Jake McArthur
Have you already verified that stream fusion won't just do this for you? On May 23, 2012 12:35 AM, Evan Laforge qdun...@gmail.com wrote: So I wanted to find the first index in a vector whose running sum is greater than a given number. The straightforward way is to create the running sum and

Re: [Haskell-cafe] HPC question

2012-05-23 Thread David Turner
On 23/05/2012 11:33, David Turner wrote: On 23/05/2012 11:22, Andres Löh wrote: I've not looked at the .tix file, but a few tests seem to confirm what I'd suspect. For derived instances, you have to cover *all* methods, otherwise the type class will be shown as not covered. Ok, I see. It's

[Haskell-cafe] Haskell Meeting Munich

2012-05-23 Thread Heinrich Hördegen
Dear all, our local hackathon in Munich on the 12th of May was a real success. Thanks to all those who joined! Look at the site for a picture: http://www.haskell-munich.de/dates Our next regular meeting is on Monday, the 28th of May at Cafe Puck at 19h30. This is a holiday in Germany. We

Re: [Haskell-cafe] Correspondence between libraries and modules

2012-05-23 Thread Gregg Lebovitz
Rustom, I am drafting a document that captures some of the social norms from the comments on this list, mostly from Brandon and Wren. I have captured the discussion about module namespace and am sorting out the comments on the relationship between libraries and

Re: [Haskell-cafe] Can Haskell outperform C++?

2012-05-23 Thread Isaac Gouy
From: Richard O'Keefe o...@cs.otago.ac.nz Sent: Tuesday, May 22, 2012 7:59 PM But string processing and text I/O using the java.io.* classes aren't brilliant. Wait just a moment - Are you comparing text I/O for C programs that process bytes against Java programs that process double-byte

Re: [Haskell-cafe] Typed TemplateHaskell?

2012-05-23 Thread Tillmann Rendel
Hi Ilya, Ilya Portnov wrote: As far as can I see, using features of last GHC one could write typed TH library relatively easily, and saving backwards compatibility. For example, now we have Q monad and Exp type in template-haskell package. Let's imagine some new package, say

Re: [Haskell-cafe] Can Haskell outperform C++?

2012-05-23 Thread Isaac Gouy
From: wren ng thornton w...@freegeek.org Sent: Tuesday, May 22, 2012 9:30 PM -snip- FWIW, that matches my expectations pretty well. Naive/standard Java performing slower than Smalltalk; highly tweaked Java using non-standard data types performing on-par with or somewhat faster than

Re: [Haskell-cafe] A functional programming solution for Mr and Mrs Hollingberry

2012-05-23 Thread Richard O'Keefe
On 21/05/2012, at 5:33 AM, Andreas Pauley wrote: With this in mind I've created a programming exercise where I imagine an OO programmer would use an object hierarchy with subtype polymorphism as part of the solution. Being unfamiliar with git, I've submitted an AWK answer by e-mail. I've

[Haskell-cafe] Haskell Weekly News: Issue 228

2012-05-23 Thread Daniel Santa Cruz
Welcome to issue 228 of the HWN, an issue covering crowd-sourced bits of information about Haskell from around the web. This issue covers the week of May 13 to 19, 2012. Announcements Stefan Wehr issued a call for presentations for the Commercial Users of Functional Programmers (CUFP 2012)

[Haskell-cafe] Most C++ compilers will not optimize x^2.0 as x*x but instead will do an expensive ...

2012-05-23 Thread KC
exponentiation and logarithm. So, I believe this C++ versus Haskell versus (your language of choice) is a Penn Teller misdirection. Whereas, another level of indirection solves everything. -- -- Regards, KC ___ Haskell-Cafe mailing list

[Haskell-cafe] question about linking with sqlite3

2012-05-23 Thread Canhua
Hi, I made a cabal package that use HDBC-sqlite3 on Windows. When cabal install it, I got an error from ld.exe: cannot find -lsqlite3. How can I tell ld.exe where sqlite3.dll is plcaed? Thanks. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] [Haskell-beginners] Most C++ compilers will not optimize x^2.0 as x*x but instead will do an expensive ...

2012-05-23 Thread Brandon Allbery
On Wed, May 23, 2012 at 9:47 PM, KC kc1...@gmail.com wrote: exponentiation and logarithm. So, I believe this C++ versus Haskell versus (your language of choice) is a Penn Teller misdirection. Whereas, another level of indirection solves everything. Is it me or is this style of message —

Re: [Haskell-cafe] Most C++ compilers will not optimize x^2.0 as x*x but instead will do an expensive ...

2012-05-23 Thread Bardur Arantsson
On 05/24/2012 04:13 AM, Brandon Allbery wrote: On Wed, May 23, 2012 at 9:47 PM, KC kc1...@gmail.com wrote: exponentiation and logarithm. So, I believe this C++ versus Haskell versus (your language of choice) is a Penn Teller misdirection. Whereas, another level of indirection solves

Re: [Haskell-cafe] Most C++ compilers will not optimize x^2.0 as x*x but instead will do an expensive ...

2012-05-23 Thread Brandon Allbery
On Wed, May 23, 2012 at 10:19 PM, Bardur Arantsson s...@scientician.netwrote: This has come up before -- this KC person probably has a broken mail client which doesn't set appropriate References headers. That, however, ignores the rest of it; the lack of references in this case forms a

Re: [Haskell-cafe] [Haskell-beginners] Most C++ compilers will not optimize x^2.0 as x*x but instead will do an expensive ...

2012-05-23 Thread Tom Murphy
Just to play devil's advocate, if you look back at the list, KC has written a lot of helpful and informative messages in the past. Tom On 5/23/12, Bardur Arantsson s...@scientician.net wrote: On 05/24/2012 04:31 AM, Brandon Allbery wrote: On Wed, May 23, 2012 at 10:19 PM, Bardur Arantsson

Re: [Haskell-cafe] Parallel cooperative multithreading?

2012-05-23 Thread Mario Blažević
On 12-05-22 09:55 AM, Benjamin Ylvisaker wrote: Has anyone ever worked on implementing something like this in Haskell? http://www.cs.hmc.edu/~stone/papers/ocm-unpublished.pdf The outline of the idea: - Concurrent programming is really hard with the popular frameworks today. - For most

Re: [Haskell-cafe] Can Haskell outperform C++?

2012-05-23 Thread Richard O'Keefe
On 24/05/2012, at 4:39 AM, Isaac Gouy wrote: From: Richard O'Keefe o...@cs.otago.ac.nz Sent: Tuesday, May 22, 2012 7:59 PM But string processing and text I/O using the java.io.* classes aren't brilliant. Wait just a moment - Are you comparing text I/O for C programs that process