Send Beginners mailing list submissions to beginners@haskell.org To subscribe or unsubscribe via the World Wide Web, visit http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners or, via email, send a message with subject or body 'help' to beginners-requ...@haskell.org
You can reach the person managing the list at beginners-ow...@haskell.org When replying, please edit your Subject line so it is more specific than "Re: Contents of Beginners digest..." Today's Topics: 1. is Haskell practical? (Dennis Raddle) 2. Re: is Haskell practical? (Alexander Berntsen) 3. Re: is Haskell practical? (Martin Vlk) 4. Re: is Haskell practical? (Dennis Raddle) 5. Re: Simple function comparison (Francesco Ariis) ---------------------------------------------------------------------- Message: 1 Date: Wed, 25 Nov 2015 04:37:30 -0800 From: Dennis Raddle <dennis.rad...@gmail.com> To: Haskell Beginners <beginners@haskell.org> Subject: [Haskell-beginners] is Haskell practical? Message-ID: <cakxlvoqanjduedthwpn1ymcbgmha7qkmwruf1w3rftkk3be...@mail.gmail.com> Content-Type: text/plain; charset="utf-8" I've been using Haskell for several years, but only really got into the power of the typeclasses recently. It's marvelous how pretty abstract concepts like Monoid, Monad, Functor, etc. can be used. 1. First it's remarkable how many instances they have on useful data structures. So the concepts become less abstract and more applied. 2. Second it's remarkable how the use of these concepts leads to expressive power and conciseness. Haskell is therefore a very beautiful language that seems to either be exploiting some mighty amazing coincidences or on the other hand is actually plumbing beautiful truths about the universe. But what if someone came along and said, "Well, conciseness isn't all that important. Having to type more isn't much of a drawback -- it doesn't really increase the time it takes to write a program once you consider that there is a greater time spent in requirements collection, overall design, debugging, and documentation. The real drawback of concise/expressive Haskell is the difficulty in understanding and using it fluently. Ultimately Haskell is just mathematicians having fun, but not very practical." Now, I would be sad to see someone argue this point of view, as I find Haskell to be beautiful and fun. But the learning difficulties are very real... 16 years of using imperative languages have hardly prepared my brain at all for concise/expressive Haskell. I only use it for a single hobby project and will probably never get beyond learning the list and Maybe instances of a few typeclasses. (It blows my mind to read the docs and see a dozen instances for certain typeclasses.... yikes! When would I ever be able to learn and use those?) I would just wonder what you, the reader, would say in response to an argument against the practicality of Haskell for these specific reasons: (1) conciseness isn't that important (2) it requires too much of an advanced mathematician's brain to use well. I have read it has advantages in parallel computing. What else? Or maybe you would say -- "It's not practical. So EMBRACE it. Have fun." Dennis -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.haskell.org/pipermail/beginners/attachments/20151125/e56279af/attachment-0001.html> ------------------------------ Message: 2 Date: Wed, 25 Nov 2015 13:56:10 +0100 From: Alexander Berntsen <alexan...@plaimi.net> To: beginners@haskell.org Subject: Re: [Haskell-beginners] is Haskell practical? Message-ID: <5655afea.4020...@plaimi.net> Content-Type: text/plain; charset=windows-1252 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 If the tables were turned and denotative programming were the norm and imperative programming the fringe community (not that denotative programming is entirely fringe as it were), you would no doubt have posed the opposite question. However, the tables aren't turned, and you aren't posing the opposite question, so let me give you a brief answer: Yes, Haskell is practical. To elaborate some: it is used in academia and industry. Not as much as some languages, but then again more than some other languages. Big universities like Chalmers use it, and big companies like Facebook use it. It is the primary language I myself use in industry as well. Let me repeat myself: Yes, Haskell is practical! If you have more specific questions, do not hesitate to ask. - -- Alexander alexan...@plaimi.net https://secure.plaimi.net/~alexander -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCgAGBQJWVa/pAAoJENQqWdRUGk8BZ4cP/2jDPmnDKB8m5uqQmvWl1yei 0nBAv7HcWD4c3Vlo6xTn2c/KwaYZGiNwobVxnE0qiZsFZqc/GD7aThPBULDVPl2U dCmDLN4lQzXdu6k/SmHrWMZZl60U3AJ+LBkPGGJbiEa+Pi1NX1/7Jr7/755zx/K7 IIWLLa6E4ZGDBsX30raxfQzTr6A97QeBjUhFF8DMr/aVAyZR8hA+Zd3CswWtYnq4 Z5YCs7K3sFnqZafgp2el8gkJgoiSpUgB5yF/+6yn2aiX9Ez7kCwI/16CHu7DkJ/n 7WaONsPh8Q7ENirgl0rzWRTD2QpD1QWm2TAKK31ZSJVHbeOWHvP4GzGLZBg27RKR GKRTywOPCe8nsl4zP1NByxwIVVv0FTLrBFwpOHnO42mumRTn/VkUvl7w6wFf3c1A u2KCpz/wHGTnYJhukmCdmTw1DK13vLDjzqFG8JJMb5RX2IvYrFEn0RZpzjD1t+Gw mBeMqicivBC41TNgy6HlPzw8mqYcBRvMzYteuhab3WLJDnWA0DZfhvRiF6OFMFmo BWrqiD7NtojsmxIiimHb8d+2U4pYFub5M1zDZ+6RVqrn6TE4R1qz7KHsQKl7W8kL vsD4rp+04LCQCbyPGmlzJCULd/EUGN1jR+wRI/0ByUT0xcbII4kNINgJYGdhhjT0 Xu4Zq40PdC6t1yvMke4Y =Nz0V -----END PGP SIGNATURE----- ------------------------------ Message: 3 Date: Wed, 25 Nov 2015 13:07:43 +0000 From: Martin Vlk <mar...@vlkk.cz> To: beginners@haskell.org Subject: Re: [Haskell-beginners] is Haskell practical? Message-ID: <5655b29f.2070...@vlkk.cz> Content-Type: text/plain; charset=windows-1252 Hey Dennis, I've been learning Hakell for a bit more than half year now. Like you, I've had all kind of doubts and I have experienced first-hand the steep learning curve. I too have asked myself whether it's worth the effort for an ordinary (read: not academically inclined and gifted) programmer to learn the language with all its high level abstractions. I have chosen to learn properly, from the ground up, using the "http://haskellbook.com/progress.html" for that, and it is taking me quite some time, because my brain is used to very different way of going about programming. I am not beyond all this, yet.. but recently I have decided to finally go and use the langage on a real project. I picked one of the issues in cabal, marked as "easy", worked out the fix for it and contributed a pull request to cabal on github. And to my surprise, I am not finding it difficult anymore to understand Haskell code, and even produce my own. I can feel that I have crossed some kind of threshold and it is not looking that haunting anymore. So I think there is no question that the language and the underlying abstractions are practical. It's more that it is a good bit unconventional in relation to the mainstream and therefore one has to switch gears before being able to use Haskell. Martin Dennis Raddle: > I've been using Haskell for several years, but only really got into the > power of the typeclasses recently. It's marvelous how pretty abstract > concepts like Monoid, Monad, Functor, etc. can be used. > > 1. First it's remarkable how many instances they have on useful data > structures. So the concepts become less abstract and more applied. > > 2. Second it's remarkable how the use of these concepts leads to expressive > power and conciseness. > > Haskell is therefore a very beautiful language that seems to either be > exploiting some mighty amazing coincidences or on the other hand is > actually plumbing beautiful truths about the universe. > > But what if someone came along and said, "Well, conciseness isn't all that > important. Having to type more isn't much of a drawback -- it doesn't > really increase the time it takes to write a program once you consider that > there is a greater time spent in requirements collection, overall design, > debugging, and documentation. The real drawback of concise/expressive > Haskell is the difficulty in understanding and using it fluently. > Ultimately Haskell is just mathematicians having fun, but not very > practical." > > Now, I would be sad to see someone argue this point of view, as I find > Haskell to be beautiful and fun. But the learning difficulties are very > real... 16 years of using imperative languages have hardly prepared my > brain at all for concise/expressive Haskell. I only use it for a single > hobby project and will probably never get beyond learning the list and > Maybe instances of a few typeclasses. (It blows my mind to read the docs > and see a dozen instances for certain typeclasses.... yikes! When would I > ever be able to learn and use those?) > > I would just wonder what you, the reader, would say in response to an > argument against the practicality of Haskell for these specific reasons: > (1) conciseness isn't that important (2) it requires too much of an > advanced mathematician's brain to use well. > > I have read it has advantages in parallel computing. What else? > > Or maybe you would say -- "It's not practical. So EMBRACE it. Have fun." > > Dennis > > > > _______________________________________________ > Beginners mailing list > Beginners@haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners > ------------------------------ Message: 4 Date: Wed, 25 Nov 2015 05:52:46 -0800 From: Dennis Raddle <dennis.rad...@gmail.com> To: The Haskell-Beginners Mailing List - Discussion of primarily beginner-level topics related to Haskell <beginners@haskell.org> Subject: Re: [Haskell-beginners] is Haskell practical? Message-ID: <CAKxLvooZCk=YZVqdboWGfXafxNOeXp+PgKW8mVOtU0=yO=rn=q...@mail.gmail.com> Content-Type: text/plain; charset="utf-8" On Wed, Nov 25, 2015 at 4:56 AM, Alexander Berntsen <alexan...@plaimi.net> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA512 > > If the tables were turned and denotative programming were the norm and > imperative programming the fringe community (not that denotative > programming is entirely fringe as it were), you would no doubt have > posed the opposite question. > I don't agree. Having worked for 16 years in a government aerospace contractor doing C++ and Python programming, what I saw is that maybe half the programmers struggled with precise thinking and abstraction. They thought of programs as step-by-step recipes and implemented those recipes in exactly the same way they themselves had always thought about a problem. Also having worked as a math tutor, I see many people who struggle with abstract thinking. So my feeling is that at least half of the programmers I knew would reject Haskell outright and would feel it was pointlessly non-intuitive. Would they have thought it was intuitive if they were raised on it? I don't think so, because I think these same people were among those who struggle with all forms of abstract thought, like math students who may someday be able to appreciate a little math but are light years away from being math majors. We can pose a world in which the "tables were turned" but for that world to come into existence a lot of things would have to be changed about the current world, particularly increasing interest in abstract math from a young age. Okay, having written all that, please feel free to tear holes in my argument. I would like to be wrong and I don't have experience outside one workplace (and some math tutoring). My workplace was much better than a contractor we briefly hired. Those folks had about a 90% struggle ratio with using things like object orientation. "Just get it done, quick and dirty" was how they thought. My own workplace had some very intelligent people but between the high numbers who were just barely competent programmers, and a more "practical" orientation in the management (documentation was highly emphasized, testing was highly emphasized, but elegant code was practically unimportant), I just can't see the adoption of Haskell by them, not in this lifetime, not in this universe. Can an "okay" imperative programmer become an "okay" Haskell programmer? Does the necessary skill, work, motivation, and talent to program at an "ordinary" imperative level serve as a sufficient prerequisite for functional programming? I really don't think so, but I could be wrong. > > However, the tables aren't turned, and you aren't posing the opposite > question, so let me give you a brief answer: Yes, Haskell is practical. > > To elaborate some: it is used in academia and industry. Not as much as > some languages, but then again more than some other languages. Big > universities like Chalmers use it, and big companies like Facebook use > it. It is the primary language I myself use in industry as well. > > Let me repeat myself: Yes, Haskell is practical! > > > If you have more specific questions, do not hesitate to ask. > Yes, I do have more specific questions. For example is the conciseness part of what makes it practical in these uses? Is the conciseness somehow bound up with what makes it practical? In other words, could we imagine a simpler language with the same level of practicality but less of a learning curve? By the way, I *love* conciseness and have experienced the possibility of it becoming intuitive. It's amazing once I understand an elegant piece of Haskell, once I have wired my brain to think in harmony with it, that it becomes immediately legible. So I know it's possible to make progress. I'm not saying that conciseness must forever remain an obtuse language. But I wonder if the same mechanisms that make Haskell concise (which are some of the things that make it hard) also are bound up with its practical advantages so that they can't be separated. Dennis -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.haskell.org/pipermail/beginners/attachments/20151125/20dd17c4/attachment-0001.html> ------------------------------ Message: 5 Date: Wed, 25 Nov 2015 15:20:48 +0100 From: Francesco Ariis <fa...@ariis.it> To: beginners@haskell.org Subject: Re: [Haskell-beginners] Simple function comparison Message-ID: <20151125142048.ga3...@casa.casa> Content-Type: text/plain; charset=utf-8 On Wed, Nov 25, 2015 at 11:39:15AM +0000, Stephen Renehan wrote: > Hi, > > I'm looking to do a comparison between 2 simple functions to see if > they are equivalent but I appear to be running into some problems if > anyone can help. > > The two functions I want to compare are f (g a) and g (f a). > > I have f defined and g defined as > f :: a -> a > f = undefined > > g :: a -> a. > g = undefined > > The compiler was complaining about the type signature lacking a > binding so added undefined to get around the error. I understand that > I must be missing something very basic as they look incomparable in > this form. Any suggestions of what changes I should make such a > comparison practical? Hello Stephen, I don't think there is a way to /prove/ f (g a) == g (f a) if their domain is not finite inside Haskell (you could do it with pen and paper). If you have two functions and a finite domain you can do, say: -- function function domain compfun :: (Eq a) => (a -> a) -> (a -> a) -> [a] -> Bool compfun f g d = and $ map (\x -> (f . g) x == (g . f) x) d ?> compfun (+1) (+17) [1..10] True ?> compfun (*5) (+17) [1..10] False Of course this is a toy example, use a proper library (quickcheck, etc.) if you are writing a real program. ------------------------------ Subject: Digest Footer _______________________________________________ Beginners mailing list Beginners@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners ------------------------------ End of Beginners Digest, Vol 89, Issue 43 *****************************************