Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-20 Thread Jonathan Cast
On Tue, 2009-01-20 at 23:41 +0100, Henning Thielemann wrote: > On Thu, 15 Jan 2009, John Goerzen wrote: > > > One thing that does annoy me about Haskell- naming. Say you've > > noticed a common pattern, a lot of data structures are similar to > > the difference list I described above, in that t

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-20 Thread Henning Thielemann
John Goerzen schrieb: > Though if all we're talking about is naming, I would still maintain that > newbie-friendly naming is a win. We can always say "HEY MATHEMETICIANS: > APPENDABLE MEANS MONOID" in the haddock docs ;-) We already have a problem with this: Haskell 98 uses intuitive names for t

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-20 Thread Henning Thielemann
On Thu, 15 Jan 2009, John Goerzen wrote: One thing that does annoy me about Haskell- naming. Say you've noticed a common pattern, a lot of data structures are similar to the difference list I described above, in that they have an empty state and the ability to append things onto the end. No

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-20 Thread Tristan Seligmann
* Andrew Coppin [2009-01-16 22:20:35 +]: > A problem I see a lot of [and other people have mentioned this] is that > a lot of documentation presents highly abstracted things, and gives *no > hint* of why on earth these might possibly be useful for something. I think this is definitely

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-20 Thread Tristan Seligmann
* John Goerzen [2009-01-15 10:15:36 -0600]: > If you're learning Haskell, which communicates the idea more clearly: > > * Appendable > > or > > * Monoid > > I can immediately figure out what the first one means. I think that's deceptively misleading. Sure, list1 `mappend` list2 is concaten

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-19 Thread George Pollard
On Thu, 2009-01-15 at 18:10 -0500, Cale Gibbard wrote: > My personal preference would be: > > class Monoid m where >zero :: m >(++) :: m -> m -> m > > (in the Prelude of course) > > - Cale I've tried doing this (and making more widespread use of typeclassed operations) by writing my ow

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-18 Thread Don Stewart
david.waern: > 2009/1/18 Don Stewart : > > ross: > >> On Sat, Jan 17, 2009 at 09:12:32PM -0500, a...@spamcop.net wrote: > >> > And FWIW, I agree with everyone who has commented that the documentation > >> > is inadequate. It'd be nice if there was some way to contribute better > >> > documentation

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-18 Thread David Waern
2009/1/18 Don Stewart : > ross: >> On Sat, Jan 17, 2009 at 09:12:32PM -0500, a...@spamcop.net wrote: >> > And FWIW, I agree with everyone who has commented that the documentation >> > is inadequate. It'd be nice if there was some way to contribute better >> > documentation without needing checkin

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-18 Thread Don Stewart
ross: > On Sat, Jan 17, 2009 at 09:12:32PM -0500, a...@spamcop.net wrote: > > And FWIW, I agree with everyone who has commented that the documentation > > is inadequate. It'd be nice if there was some way to contribute better > > documentation without needing checkin access to the libraries. > >

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-18 Thread Ross Paterson
On Sat, Jan 17, 2009 at 09:12:32PM -0500, a...@spamcop.net wrote: > And FWIW, I agree with everyone who has commented that the documentation > is inadequate. It'd be nice if there was some way to contribute better > documentation without needing checkin access to the libraries. There is. The cur

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-18 Thread Robin Green
On Sun, 18 Jan 2009 08:51:10 +0100 david48 wrote: > On Sat, Jan 17, 2009 at 11:19 PM, Dan Piponi > wrote: > > On Sat, Jan 17, 2009 at 1:47 AM, david48 > > wrote: > > >> why would I > >> need to write a running count this way instead of, for example, a > >> non monadic fold, which would probabl

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-17 Thread david48
On Sat, Jan 17, 2009 at 11:19 PM, Dan Piponi wrote: > On Sat, Jan 17, 2009 at 1:47 AM, david48 wrote: >> why would I >> need to write a running count this way instead of, for example, a non >> monadic fold, which would probably result in clearer and faster code? > > Maybe my post here will answe

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-17 Thread Jonathan Cast
On Sat, 2009-01-17 at 10:47 +0100, david48 wrote: > On Fri, Jan 16, 2009 at 4:04 PM, Jonathan Cast > wrote: > > > On Fri, 2009-01-16 at 14:16 +0100, david48 wrote: > >> Part of the problem is that something like a monoid is so general that > >> I can't wrap my head around why going so far in the

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-17 Thread Jonathan Cast
On Sat, 2009-01-17 at 11:07 +, Andrew Coppin wrote: > Anton van Straaten wrote: > > Niklas Broberg wrote: > >>> I still think existential quantification is a step too far though. :-P > >> > >> Seriously, existential quantification is a REALLY simple concept, that > >> you would learn week two (

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-17 Thread ajb
G'day all. Quoting John Goerzen : If I see Appendable I can guess what it might be. If I see "monoid", I have no clue whatsoever, because I've never heard of a monoid before. Any sufficiently unfamiliar programming language looks like line noise. That's why every new language needs to use cu

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-17 Thread Dan Piponi
On Sat, Jan 17, 2009 at 1:47 AM, david48 wrote: > why would I > need to write a running count this way instead of, for example, a non > monadic fold, which would probably result in clearer and faster code? Maybe my post here will answer some questions like that: http://sigfpe.blogspot.com/2009/0

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-17 Thread David Leimbach
On Sat, Jan 17, 2009 at 7:33 AM, Lennart Augustsson wrote: > Thinking that Functor allows you to apply a function to all elements > in a collection is a good intuitive understanding. But fmap also > allows applying a function on "elements" of things that can't really > be called collections, e.g.

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-17 Thread Lennart Augustsson
Thinking that Functor allows you to apply a function to all elements in a collection is a good intuitive understanding. But fmap also allows applying a function on "elements" of things that can't really be called collections, e.g., the continuation monad. -- Lennart On Sat, Jan 17, 2009 at 11:

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-17 Thread Eugene Kirpichov
2009/1/17 Andrew Coppin : > Cory Knapp wrote: >> >> Actually, that was part of my point: When I mention Haskell to people, and >> when I start describing it, they're generally frightened enough by the focus >> on pure code and lazy evaluation-- add to this the inherently abstract >> nature, and we

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-17 Thread Andrew Coppin
Cory Knapp wrote: Actually, that was part of my point: When I mention Haskell to people, and when I start describing it, they're generally frightened enough by the focus on pure code and lazy evaluation-- add to this the inherently abstract nature, and we can name typeclasses "cuddlyKitten", a

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-17 Thread Andrew Coppin
Anton van Straaten wrote: Niklas Broberg wrote: I still think existential quantification is a step too far though. :-P Seriously, existential quantification is a REALLY simple concept, that you would learn week two (or maybe three) in any introductory course on logic. In fact, I would argue th

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-17 Thread david48
On Fri, Jan 16, 2009 at 4:04 PM, Jonathan Cast wrote: > On Fri, 2009-01-16 at 14:16 +0100, david48 wrote: >> Part of the problem is that something like a monoid is so general that >> I can't wrap my head around why going so far in the abstraction. >> For example, the writer monad works with a mon

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-16 Thread Cory Knapp
Andrew Coppin wrote: Cory Knapp wrote: As far as I know, one of the draws of Haskell is the inherent mathematical nature of it. It's also simultaneously one of the biggest things that puts people off. Perhaps as we can curb this with sufficient documentation, as others have suggested. Actu

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-16 Thread Derek Elkins
On Fri, 2009-01-16 at 15:21 -0800, Jonathan Cast wrote: > On Fri, 2009-01-16 at 18:14 -0500, Anton van Straaten wrote: > > Niklas Broberg wrote: > > >> I still think existential quantification is a step too far though. :-P > > > > > > Seriously, existential quantification is a REALLY simple concep

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-16 Thread Niklas Broberg
On Sat, Jan 17, 2009 at 12:14 AM, Anton van Straaten wrote: >>> I still think existential quantification is a step too far though. :-P >> >> Seriously, existential quantification is a REALLY simple concept, that >> you would learn week two (or maybe three) in any introductory course >> on logic. I

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-16 Thread Jonathan Cast
On Fri, 2009-01-16 at 18:14 -0500, Anton van Straaten wrote: > Niklas Broberg wrote: > >> I still think existential quantification is a step too far though. :-P > > > > Seriously, existential quantification is a REALLY simple concept, that > > you would learn week two (or maybe three) in any intro

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-16 Thread Anton van Straaten
Niklas Broberg wrote: I still think existential quantification is a step too far though. :-P Seriously, existential quantification is a REALLY simple concept, that you would learn week two (or maybe three) in any introductory course on logic. In fact, I would argue that far more people probably

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-16 Thread Niklas Broberg
> I still think existential quantification is a step too far though. :-P Seriously, existential quantification is a REALLY simple concept, that you would learn week two (or maybe three) in any introductory course on logic. In fact, I would argue that far more people probably know what existential

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-16 Thread Andrew Coppin
Anton van Straaten wrote: Andrew Coppin wrote: Abstraction is a great thing to have. I'd just prefer it to not look so intimidating; What makes it look intimidating? If the answer is "it looks intimidating because the documentation consists of nothing more than a mathematical term, without a

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-16 Thread Andrew Coppin
Cory Knapp wrote: As far as I know, one of the draws of Haskell is the inherent mathematical nature of it. It's also simultaneously one of the biggest things that puts people off. Perhaps as we can curb this with sufficient documentation, as others have suggested. But there's a deeper probl

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-16 Thread Anton van Straaten
Andrew Coppin wrote: Duncan Coutts wrote: [Monoids are] used quite a lot in Cabal. Package databases are monoids. Configuration files are monoids. Command line flags and sets of command line flags are monoids. Package build information is a monoid. OK, well then my next question would be "i

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-16 Thread Anton van Straaten
Andrew Coppin wrote: Abstraction is a great thing to have. I'd just prefer it to not look so intimidating; What makes it look intimidating? If the answer is "it looks intimidating because the documentation consists of nothing more than a mathematical term, without a definition, and a referen

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-16 Thread Conal Elliott
Thanks, Bob! I'm with on both counts: Monad is misrepresented as central in code composition; and (Monad m) => (a -> m b) -> (m a -> m b) is a much nicer type (for monadic extension), only in part because it encourages retraining away from sequential thinking. I encountered this nicer formulation

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-16 Thread Ketil Malde
Steve Schafer writes: > But if the building is a run-of-the-mill design, then the engineer > checking it is unlikely to use anything beyond simple algebra. It's only > in case of unusual structures and one-offs (skyscrapers, most anything > built in Dubai these days, etc.) that engineers will rea

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-16 Thread Andrew Coppin
Ketil Malde wrote: The problem is that many Haskell constructs are so abstract and so general that precise names will be obscure to anybody with no background in logic (existential quantification), algebra (monoid) or category theory (monad). This level of abstraction is a great benefit, since i

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-16 Thread Anton van Straaten
Philippa Cowderoy wrote: On Fri, 16 Jan 2009, Duncan Coutts wrote: If you or anyone else has further concrete suggestions / improvements then post them here now! :-) Spell out what associativity means It probably makes sense to do as Jeremy Shaw suggests and explicitly list the monoid la

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-16 Thread Ian Lynagh
On Thu, Jan 15, 2009 at 10:39:18PM -0600, Creighton Hogg wrote: > > For you folks who work on GHC, is it acceptable to open tickets for > poor documentation of modules in base? Personally, I don't think that doing so would make it more likely that someone would actually write the documentation; i

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-16 Thread David Menendez
On Fri, Jan 16, 2009 at 12:19 PM, Ross Paterson wrote: > On Fri, Jan 16, 2009 at 12:00:40PM -0500, David Menendez wrote: >> It would be nice to explain what operations have been chosen for the >> Monoid instances of Prelude data types. (Maybe this belongs in the >> Prelude documentation.) > > The

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-16 Thread Ross Paterson
On Fri, Jan 16, 2009 at 12:00:40PM -0500, David Menendez wrote: > A reference to the writer monad and to Data.Foldable might be helpful. > So far as I know they are the only uses of the Monoid abstraction in > the standard libraries. > > It's probably a good idea to explicitly state the three mono

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-16 Thread Steve Schafer
On Thu, 15 Jan 2009 20:18:50 -0800, you wrote: >Really. So the engineer who designed the apartment building I'm in at >the moment didn't know any physics, thought `tensor' was a scary math >term irrelevant to practical, real-world engineering, and will only read >books on engineering that replace

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-16 Thread David Menendez
On Fri, Jan 16, 2009 at 8:39 AM, Duncan Coutts wrote: > Ross just updated the documentation for the Monoid module. Here is how > it reads now: > > The module header now reads simply: > >A class for monoids (types with an associative binary operation >that has an identity) with var

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-16 Thread Jeremy Shaw
Hello, Personally, I would like to see the laws more explicitly listed. Some like: -- The Monoid Laws: -- -- 1. Associative: -- --x `mappend` (y `mappend` z) == (x `mappend` y) `mappend` z -- -- 2. Left Identity: -- -- mempty `mappend` y == y -- -- 3. Right identity: -- -- x `mappend` me

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-16 Thread Jonathan Cast
On Fri, 2009-01-16 at 14:16 +0100, david48 wrote: > Part of the problem is that something like a monoid is so general that > I can't wrap my head around why going so far in the abstraction. > For example, the writer monad works with a monoid; using the writer > monad with strings makes sense becaus

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-16 Thread Philippa Cowderoy
On Fri, 16 Jan 2009, Duncan Coutts wrote: > If you or anyone else has further concrete suggestions / improvements > then post them here now! :-) > Spell out what associativity means and what it means for that operation to have an identity. List a few examples (stating that they're not all inst

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-16 Thread Philippa Cowderoy
On Thu, 15 Jan 2009, John Goerzen wrote: > Several people have suggested this, and I think it would go a long way > towards solving the problem. The problem is: this documentation can > really only be written by those that understand the concepts, > understand how they are used practically, and h

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-16 Thread Philippa Cowderoy
On Thu, 15 Jan 2009, Andrew Coppin wrote: > I was especially amused by the assertion that "existential quantification" is > a more precise term than "type variable hiding". (The former doesn't even tell > you that the feature in question is related to the type system! Even the few > people in my p

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-16 Thread Duncan Coutts
On Fri, 2009-01-16 at 14:16 +0100, david48 wrote: > Upon reading this thread, I asked myself : what's a monoid ? I had no > idea. I read some posts, then google "haskell monoid". > > The first link leads me to Data.Monoid which starts with > > << > Description > The Monoid class with various gen

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-16 Thread Dougal Stanton
On Fri, Jan 16, 2009 at 1:23 PM, Philippa Cowderoy wrote: > On Thu, 15 Jan 2009, Lennart Augustsson wrote: > >> If I see Monoid I know what it is, if I didn't know I could just look >> on Wikipedia. > > And if you're a typical programmer who is now learning Haskell, this will > likely make you wan

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-16 Thread Philippa Cowderoy
On Thu, 15 Jan 2009, Andrew Coppin wrote: > I don't know about you, but rather than knowing that joinFoo is associative, > I'd be *far* more interested in finding out what it actually _does_. A good many descriptions won't tell you whether it's associative though, and sometimes you need to know

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-16 Thread Philippa Cowderoy
On Thu, 15 Jan 2009, Lennart Augustsson wrote: > If I see Monoid I know what it is, if I didn't know I could just look > on Wikipedia. And if you're a typical programmer who is now learning Haskell, this will likely make you want to run screaming and definitely be hard to understand. We at leas

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-16 Thread Duncan Coutts
On Thu, 2009-01-15 at 18:41 -0500, Cale Gibbard wrote: > 2009/1/15 Andrew Coppin : > > OK, well then my next question would be "in what say is defining > > configuration files as a monoid superior to, uh, not defining them as a > > monoid?" What does it allow you to do that you couldn't otherwise?

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-16 Thread david48
On Fri, Jan 16, 2009 at 5:39 AM, Creighton Hogg wrote: > For you folks who work on GHC, is it acceptable to open tickets for > poor documentation of modules in base? I think leaving the > documentation to the tragedy of the commons isn't the best move, but > if even a few of us could remember to

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-16 Thread Manuel M T Chakravarty
I have to say, I agree with Lennart here. Terms like monoid have had a precise definition for a very long time. Replacing an ill-defined term by a vaguely defined term only serves to avoid facing ones ignorance - IMHO an unwise move for a technical expert. Learning Haskell has often been

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-16 Thread Immanuel Litzroth
It's a criticism already voiced by the great David Bowie: "My Brain Hurt like a warehouse, it had no room to spare I had to cram so many things to store everything in there" Immanuel On Thu, Jan 15, 2009 at 4:34 PM, John Goerzen wrote: > Hi folks, > > Don Stewart noticed this blog post on Ha

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-16 Thread Paul Moore
2009/1/15 Derek Elkins : > On Thu, 2009-01-15 at 18:27 +, Lennart Augustsson wrote: >> On Thu, Jan 15, 2009 at 6:04 PM, Paul Moore wrote: >> > >> > Mathematical precision isn't appropriate in all disciplines. >> > >> That's very true. But programming is one where mathematical precision >> is

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-16 Thread Ketil Malde
On Thu, Jan 15, 2009 at 07:46:02PM +, Andrew Coppin wrote: > If we *must* insist on using the most obscure possible name for > everything, I don't think anybody even suggests using obscure names. Some people insist on precise names. The problem is that many Haskell constructs are so a

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-15 Thread Thomas Davie
On 15 Jan 2009, at 16:34, John Goerzen wrote: Hi folks, Don Stewart noticed this blog post on Haskell by Brian Hurt, an OCaml hacker: http://enfranchisedmind.com/blog/2009/01/15/random-thoughts-on- haskell/ It's a great post, and I encourage people to read it. I'd like to highlight one pa

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-15 Thread Creighton Hogg
On Thu, Jan 15, 2009 at 10:18 PM, Jonathan Cast wrote: > On Thu, 2009-01-15 at 17:06 -0500, Steve Schafer wrote: >> On Thu, 15 Jan 2009 13:21:57 -0800, you wrote: >> >> >Where, in the history of western civilization, has there ever been an >> >engineering discipline whose adherents were permitted

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-15 Thread Jonathan Cast
On Thu, 2009-01-15 at 17:06 -0500, Steve Schafer wrote: > On Thu, 15 Jan 2009 13:21:57 -0800, you wrote: > > >Where, in the history of western civilization, has there ever been an > >engineering discipline whose adherents were permitted to remain ignorant > >of the basic mathematical terminology a

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-15 Thread Cory Knapp
Perhaps as a math/CS major I'm a bit biased here, but as a haskell neophyte, I think my opinion is at least somewhat relevant... The immediate problem is certainly documentation. No one would groan more than once after hearing a term from abstract math if there was sufficient Haskell-oriented

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-15 Thread John A. De Goes
+1 to that Regards, John On Jan 15, 2009, at 4:10 PM, Cale Gibbard wrote: 2009/1/15 Sittampalam, Ganesh : Lennart Augustsson wrote: I think the documentation should be reasonably newbie-friendly too. But that doesn't mean we should call Monoid Appendable. Appendable is just misleading, sin

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-15 Thread Bertram Felgenhauer
Andrew Wagner wrote: > I think perhaps the correct question here is not "how many instances of > Monoid are there?", but "how many functions are written that can use an > arbitrary Monoid". E.g., the fact that there are a lot of instances of Monad > doesn't make it useful. There are a lot of instan

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-15 Thread Dan Weston
Richard Feinman once said: "if someone says he understands quantum mechanics, he doesn't understand quantum mechanics". But what did he know... Luke Palmer wrote: On Thu, Jan 15, 2009 at 7:02 PM, Michael Giagnocavo > wrote: >Your talk of undergraduate courses

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-15 Thread Luke Palmer
On Thu, Jan 15, 2009 at 7:02 PM, Michael Giagnocavo wrote: > >Your talk of undergraduate courses to concat two lists isn't grounded > >in any kind of reality, muddies the waters, and probably scares people > >away from Haskell by giving the impression that it's much harder than > >it is. > > I've

RE: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-15 Thread Michael Giagnocavo
>Your talk of undergraduate courses to concat two lists isn't grounded >in any kind of reality, muddies the waters, and probably scares people >away from Haskell by giving the impression that it's much harder than >it is. I've been studying Haskell a bit to understand and learn more about function

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-15 Thread Luke Palmer
On Thu, Jan 15, 2009 at 9:15 AM, John Goerzen wrote: > If you're learning Haskell, which communicates the idea more clearly: > > * Appendable > > or > > * Monoid But Appendable is wrong. merge :: Ord a => [a] -> [a] -> [a] merge [] ys = ys merge xs [] = xs merge (x:xs) (y:ys) | x <= y = x :

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-15 Thread John Goerzen
Derek Elkins wrote: > No one doubts that there is room for improvement. However, the > direction is better documentation, not different names. Better names is > fine, but I have not heard any remotely convincing alternative for any > of the above terms. After thinking about it, I think you are

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-15 Thread Derek Elkins
On Thu, 2009-01-15 at 18:21 -0500, Cale Gibbard wrote: > While you're absolutely correct and I agree with you, to be fair, > essentially all mathematicians have a sense of "rigourisability" > (whether they recognise it or not), which is a peculiar standard that > they apply to everything they hear

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-15 Thread Derek Elkins
On Thu, 2009-01-15 at 21:59 +, Thomas DuBuisson wrote: > > How does forcing them to learn proposed terminology such as `Appendable' > > help here? Learners of Haskell do still need to learn what the new word > > means. > > The contention is that 'Appendable' is an intuitive naming that people

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-15 Thread Derek Elkins
On Thu, 2009-01-15 at 14:11 -0600, John Goerzen wrote: > On Thu, Jan 15, 2009 at 07:46:02PM +, Andrew Coppin wrote: > > John Goerzen wrote: > > > > If we *must* insist on using the most obscure possible name for > > everything, can we at least write some documentation that doesn't > > requi

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-15 Thread Cale Gibbard
2009/1/15 Andrew Coppin : > OK, well then my next question would be "in what say is defining > configuration files as a monoid superior to, uh, not defining them as a > monoid?" What does it allow you to do that you couldn't otherwise? I'm not > seeing any obvious advantage, but you presumably did

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-15 Thread Dan Doel
On Thursday 15 January 2009 6:21:28 pm David Menendez wrote: > On Thu, Jan 15, 2009 at 5:32 PM, Andrew Coppin > > wrote: > > As an aside, the integers form two different monoids. Haskell can't > > [easily] handle that. Does anybody know of a language that can? > > Some of the ML-derived languages

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-15 Thread Jonathan Cast
On Thu, 2009-01-15 at 15:25 -0800, Max Rabkin wrote: > On Thu, Jan 15, 2009 at 3:16 PM, Cale Gibbard wrote: > > However, "Appendable" carries baggage with it which is highly > > misleading. Consider, for instance, the monoid of rational numbers > > under multiplication (which, by the way, is quite

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-15 Thread Max Rabkin
On Thu, Jan 15, 2009 at 3:16 PM, Cale Gibbard wrote: > However, "Appendable" carries baggage with it which is highly > misleading. Consider, for instance, the monoid of rational numbers > under multiplication (which, by the way, is quite useful with the > writer transformed list monad for dealing

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-15 Thread Manlio Perillo
John Goerzen ha scritto: Hi folks, Don Stewart noticed this blog post on Haskell by Brian Hurt, an OCaml hacker: http://enfranchisedmind.com/blog/2009/01/15/random-thoughts-on-haskell/ It's a great post, and I encourage people to read it. I'd like to highlight one particular paragraph: On

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-15 Thread Jonathan Cast
On Thu, 2009-01-15 at 16:16 -0600, John Goerzen wrote: > On Thu, Jan 15, 2009 at 01:50:11PM -0800, Jonathan Cast wrote: > > On Thu, 2009-01-15 at 10:56 -0600, John Goerzen wrote: > > > Lennart Augustsson wrote: > > > > Most people don't understand pure functional programming either. Does > > > > t

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-15 Thread David Menendez
On Thu, Jan 15, 2009 at 5:32 PM, Andrew Coppin wrote: > > As an aside, the integers form two different monoids. Haskell can't [easily] > handle that. Does anybody know of a language that can? Some of the ML-derived languages can do that. Essentially, your code takes another module which implement

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-15 Thread Cale Gibbard
While you're absolutely correct and I agree with you, to be fair, essentially all mathematicians have a sense of "rigourisability" (whether they recognise it or not), which is a peculiar standard that they apply to everything they hear or read. The level of rigour at which mathematicians communicat

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-15 Thread Cale Gibbard
> If you're learning Haskell, which communicates the idea more clearly: > > * Appendable > > or > > * Monoid > > I can immediately figure out what the first one means. With the second, > I could refer to the GHC documentation, which does not describe what a > Monoid does. Or read a wikipedia ar

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-15 Thread Derek Elkins
Actually programming requires -far more- precision than mathematics ever has. The standards of "formal" and "precise" that mathematicians use are a joke to computer scientists and programmers. Communication is also more important or at least more center stage in mathematics than programming. Mat

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-15 Thread Cale Gibbard
2009/1/15 Sittampalam, Ganesh : > Lennart Augustsson wrote: >> I think the documentation should be reasonably newbie-friendly too. >> But that doesn't mean we should call Monoid Appendable. >> Appendable is just misleading, since Monoid is more general than >> appending. > > Then why does it have a

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-15 Thread Cale Gibbard
> off the top of their head what the difference between an epimorphism and a > hylomorphism is? They're not even from the same branch of mathematics. Epimorphisms are defined in category theory, as arrows which can be cancelled when they appear on the right of a composite, that is, if f is an epi

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-15 Thread pepe
On 15/01/2009, at 23:27, Duncan Coutts wrote: On Thu, 2009-01-15 at 21:21 +, Andrew Coppin wrote: OK, well then my next question would be "in what say is defining configuration files as a monoid superior to, uh, not defining them as a monoid?" What does it allow you to do that you could

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-15 Thread David Menendez
On Thu, Jan 15, 2009 at 5:27 PM, Duncan Coutts wrote: > On Thu, 2009-01-15 at 21:21 +, Andrew Coppin wrote: > >> OK, well then my next question would be "in what say is defining >> configuration files as a monoid superior to, uh, not defining them as a >> monoid?" What does it allow you to do

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-15 Thread Dan Piponi
On Thu, Jan 15, 2009 at 2:24 PM, Miguel Mitrofanov wrote: > If, however, you category is a category of endofunctors of some category D > (that is, functors D -> D), and T is composition, then our "monoids" become > monads on D: I is an identity functor, first morphism is "return", and > second on

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-15 Thread Peter Verswyvelen
> > I'm not sure having a Monoid class is actually useful for anything - but if > we must have it, there seems to be little better possible name for something > so vague. > IMO the Monoid class is useful since, if you define mempty and mappend, you get mconcat for free. I don't see what the proble

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-15 Thread Andrew Coppin
Duncan Coutts wrote: By making a type an instance of Monoid instead of exporting emptyFoo, joinFoo functions it makes the API clearer because it shows that we are re-using an existing familiar concept rather than inventing a new one. It also means the user already knows that joinFoo must be assoc

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-15 Thread Duncan Coutts
On Thu, 2009-01-15 at 21:21 +, Andrew Coppin wrote: > OK, well then my next question would be "in what say is defining > configuration files as a monoid superior to, uh, not defining them as a > monoid?" What does it allow you to do that you couldn't otherwise? I'm > not seeing any obvious

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-15 Thread Miguel Mitrofanov
On 16 Jan 2009, at 01:10, Dan Weston wrote: Maybe you can explain that again? Sure. Consider the following setting: a category C and a bifunctor T : C x C -> C, which is associative and have a (left and right) unit I. This is what is called "monoidal category". A "monoid" is an object

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-15 Thread Duncan Coutts
On Thu, 2009-01-15 at 21:59 +, Thomas DuBuisson wrote: > > How does forcing them to learn proposed terminology such as `Appendable' > > help here? Learners of Haskell do still need to learn what the new word > > means. > > The contention is that 'Appendable' is an intuitive naming that people

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-15 Thread John Goerzen
On Thu, Jan 15, 2009 at 01:50:11PM -0800, Jonathan Cast wrote: > On Thu, 2009-01-15 at 10:56 -0600, John Goerzen wrote: > > Lennart Augustsson wrote: > > > Most people don't understand pure functional programming either. Does > > > that mean we should introduce unrestricted side effects in Haskell

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-15 Thread Dan Weston
Maybe you can explain that again? I see how the subset of Kleisli arrows (a -> m a) forms a monoid (a, return . id, >>=), but what to do with (a -> m b)? (>>=) is not closed under this larger set. Dan Miguel Mitrofanov wrote: Notice that "monoid" sounds almost *exactly* like "monad". And yet

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-15 Thread Steve Schafer
On Thu, 15 Jan 2009 13:21:57 -0800, you wrote: >Where, in the history of western civilization, has there ever been an >engineering discipline whose adherents were permitted to remain ignorant >of the basic mathematical terminology and methodology that their >enterprise is founded on? Umm, all of

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-15 Thread Dan Piponi
On Thu, Jan 15, 2009 at 1:29 PM, Andrew Coppin wrote: > But you > really *should not* need to do an undergraduate course in mathematical > theory just to work out how to concat two lists. That's absurd. Some kind of > balance needs to be found. Balance is good, but it's hard to find a balance whe

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-15 Thread Duncan Coutts
On Thu, 2009-01-15 at 16:03 -0500, Andrew Wagner wrote: > I think perhaps the correct question here is not "how many instances > of Monoid are there?", but "how many functions are written that can > use an arbitrary Monoid". E.g., the fact that there are a lot of > instances of Monad doesn't make i

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-15 Thread Jonathan Cast
On Thu, 2009-01-15 at 21:59 +, Thomas DuBuisson wrote: > > How does forcing them to learn proposed terminology such as `Appendable' > > help here? Learners of Haskell do still need to learn what the new word > > means. > > The contention is that 'Appendable' is an intuitive naming that people

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-15 Thread Jonathan Cast
On Thu, 2009-01-15 at 21:29 +, Andrew Coppin wrote: > Jonathan Cast wrote: > > Where, in the history of western civilization, has there ever been an > > engineering discipline whose adherents were permitted to remain ignorant > > of the basic mathematical terminology and methodology that their

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-15 Thread Thomas DuBuisson
> How does forcing them to learn proposed terminology such as `Appendable' > help here? Learners of Haskell do still need to learn what the new word > means. The contention is that 'Appendable' is an intuitive naming that people will already have a rudimentary grasp of. This as opposed to Monoid

Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-15 Thread Jonathan Cast
On Thu, 2009-01-15 at 21:17 +, Andrew Coppin wrote: > Sebastian Sylvan wrote: > > > > > > On Thu, Jan 15, 2009 at 7:46 PM, Andrew Coppin > > mailto:andrewcop...@btinternet.com>> wrote: > > > > The sad thing is, it's not actually complicated. The documentation > > just makes it seem lik

RE: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-15 Thread Jonathan Cast
On Thu, 2009-01-15 at 17:13 +, Sittampalam, Ganesh wrote: > Lennart Augustsson wrote: > > Most people don't understand pure functional programming either. > > Does that mean we should introduce unrestricted side effects in > > Haskell? > > No, just that we should seek to minimise the new st

  1   2   >