Re: [Haskell-cafe] *GROUP HUG*
From from what I see here, Haskell at work seems to target web development. I should try this soon... What is everyone using? Yesod? 2011/6/4 Michael Xavier nemesisdes...@gmail.com I just wanted to echo this a bit. I'm a Ruby on Rails developer in my day job. While I still enjoy ruby, I was very proud that my studies of Haskell helped me identify a problem a week or so ago that would be much more difficult to solve in an imperative language and benefits from laziness. While the role of this tool will be limited compared to what I do day by day, I can finally say that I'm using Haskell at work. If anyone is curious, the project is essentially a service that determines the optimum order for a comparison shopping engine. On Thu, Jun 2, 2011 at 11:52 AM, Yves Parès limestr...@gmail.com wrote: Learning Haskell will pay off much less than learning PHP, if your goal is to find a job. Amen. I cannot agree with this for practical reasons. I'm using Haskell for real world commercial applications, and I'm very productive with it. I wish so much I could say that... Out of curiosity, what are you using Haskell for? 2011/6/2 Ertugrul Soeylemez e...@ertes.de Alberto G. Corona agocor...@gmail.com wrote: Haskell is an academic asset as well as a fun asset. I cannot agree with this for practical reasons. I'm using Haskell for real world commercial applications, and I'm very productive with it. There is however a variation of this statement, with which I could agree, namely: Learning Haskell will pay off much less than learning PHP, if your goal is to find a job. It takes a lot longer and there are a lot less companies in need of Haskell programmers. Greets, Ertugrul -- nightmare = unsafePerformIO (getWrongWife = sex) http://ertes.de/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe -- Michael Xavier http://www.michaelxavier.net ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] *GROUP HUG*
On Fri, 2011-06-03 at 10:03 +0200, Ketil Malde wrote: Gresham's law states roughly that bad money drives out good. I thus propose a corollary: bad languages drive out good. That's not entirely true - http://en.wikipedia.org/wiki/Gresham's_law. which states that when government compulsorily overvalues one money and undervalues another, the undervalued money will leave the country or disappear into hoards, while the overvalued money will flood into circulation i.e. bad money drives out good *if their exchange rate is set by law*. Regards signature.asc Description: This is a digitally signed message part ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] *GROUP HUG*
Yves Parès limestr...@gmail.com wrote: From from what I see here, Haskell at work seems to target web development. I should try this soon... That's one of the main use cases for Haskell in real world projects (in my opinion). However, I also use Haskell for network servers. What is everyone using? Yesod? Personally I use Yesod, but that's mainly a matter of taste. I think, the other big framework is Happstack. There is also a framework called Salvia. It comes with a very nice AJAX wiki/blog demo. You should check it out. The reason why I use Yesod is twofold: Firstly and mainly because I'm used to it. Secondly because I didn't like Happstack that much. I'm amazed by how you can get very productive with very little code, but that reasoning probably also holds for the other frameworks. One important note about Yesod, however: To really exploit it to its full power you should understand very well and be willing to use some of the Haskell extensions, most notably type families, quasiquoting and Template Haskell. Many people view this as a downside. Greets, Ertugrul -- nightmare = unsafePerformIO (getWrongWife = sex) http://ertes.de/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] *GROUP HUG*
Michael Litchard mich...@schmong.org writes: I disagree. I'm by no means proficient in Haskell. And, I never bothered learning PHP. I will when I need to. PHP programmers are a dime a dozen. ..and since PHP programmers are a dime a dozen, any decent manager (who, after all, has an MBA and knows that employees¹ are expendable and interchangeable means of production) will select PHP as the technology for her next project. Gresham's law states roughly that bad money drives out good. I thus propose a corollary: bad languages drive out good. It's been my experience that Haskell is a tool one may use to distinguish oneself from the hoi-poloi. This is important when you live in an area where the baker down the street has a CS degree. Are you saying CS degrees are a dime a baker's dozen? -k ¹) With the sole exception of managers, of course. -- If I haven't seen further, it is by standing in the footprints of giants ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] *GROUP HUG*
I just wanted to echo this a bit. I'm a Ruby on Rails developer in my day job. While I still enjoy ruby, I was very proud that my studies of Haskell helped me identify a problem a week or so ago that would be much more difficult to solve in an imperative language and benefits from laziness. While the role of this tool will be limited compared to what I do day by day, I can finally say that I'm using Haskell at work. If anyone is curious, the project is essentially a service that determines the optimum order for a comparison shopping engine. On Thu, Jun 2, 2011 at 11:52 AM, Yves Parès limestr...@gmail.com wrote: Learning Haskell will pay off much less than learning PHP, if your goal is to find a job. Amen. I cannot agree with this for practical reasons. I'm using Haskell for real world commercial applications, and I'm very productive with it. I wish so much I could say that... Out of curiosity, what are you using Haskell for? 2011/6/2 Ertugrul Soeylemez e...@ertes.de Alberto G. Corona agocor...@gmail.com wrote: Haskell is an academic asset as well as a fun asset. I cannot agree with this for practical reasons. I'm using Haskell for real world commercial applications, and I'm very productive with it. There is however a variation of this statement, with which I could agree, namely: Learning Haskell will pay off much less than learning PHP, if your goal is to find a job. It takes a lot longer and there are a lot less companies in need of Haskell programmers. Greets, Ertugrul -- nightmare = unsafePerformIO (getWrongWife = sex) http://ertes.de/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe -- Michael Xavier http://www.michaelxavier.net ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] *GROUP HUG*
On Thursday 02 June 2011 01:12:37, Tom Murphy wrote: How about this: myFoldr :: (a - b - b) - b - [a] - b myFoldr f z xs = foldl' (\s x v - s (x `f` v)) id xs $ z Cheers, Ivan Great! Now I really can say Come on! It's fun! I can write foldr with foldl! Unfortunately, you can't, not quite. A left fold cannont return anything before it has reached the end of the list, so it doesn't work on infinite lists. With a suitable combining function (and suitable input), a right fold can start delivering the result early, hence right folds (can) produce results for infinite lists (and my example was meant to draw attention to that fact). Cheers, Daniel ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] *GROUP HUG*
Alberto G. Corona agocor...@gmail.com wrote: Haskell is an academic asset as well as a fun asset. I cannot agree with this for practical reasons. I'm using Haskell for real world commercial applications, and I'm very productive with it. There is however a variation of this statement, with which I could agree, namely: Learning Haskell will pay off much less than learning PHP, if your goal is to find a job. It takes a lot longer and there are a lot less companies in need of Haskell programmers. Greets, Ertugrul -- nightmare = unsafePerformIO (getWrongWife = sex) http://ertes.de/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] *GROUP HUG*
Ivan Tarasov ivan.tara...@gmail.com wrote: myFoldr :: (a - b - b) - b - [a] - b myFoldr f z xs = foldl' (\s x v - s (x `f` v)) id xs $ z That's not foldr. It's a function similar to foldr in Haskell and equal to foldr in a different language, which lacks bottom. Greets, Ertugrul -- nightmare = unsafePerformIO (getWrongWife = sex) http://ertes.de/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] *GROUP HUG*
Learning Haskell will pay off much less than learning PHP, if your goal is to find a job. Amen. I cannot agree with this for practical reasons. I'm using Haskell for real world commercial applications, and I'm very productive with it. I wish so much I could say that... Out of curiosity, what are you using Haskell for? 2011/6/2 Ertugrul Soeylemez e...@ertes.de Alberto G. Corona agocor...@gmail.com wrote: Haskell is an academic asset as well as a fun asset. I cannot agree with this for practical reasons. I'm using Haskell for real world commercial applications, and I'm very productive with it. There is however a variation of this statement, with which I could agree, namely: Learning Haskell will pay off much less than learning PHP, if your goal is to find a job. It takes a lot longer and there are a lot less companies in need of Haskell programmers. Greets, Ertugrul -- nightmare = unsafePerformIO (getWrongWife = sex) http://ertes.de/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] *GROUP HUG*
Yves Parès limestr...@gmail.com wrote: I cannot agree with this for practical reasons. I'm using Haskell for real world commercial applications, and I'm very productive with it. I wish so much I could say that... Out of curiosity, what are you using Haskell for? I use the Yesod web framework for web development and a combination of many libraries for network servers. Greets, Ertugrul -- nightmare = unsafePerformIO (getWrongWife = sex) http://ertes.de/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] *GROUP HUG*
I disagree. I'm by no means proficient in Haskell. And, I never bothered learning PHP. I will when I need to. PHP programmers are a dime a dozen. It's been my experience that Haskell is a tool one may use to distinguish oneself from the hoi-poloi. This is important when you live in an area where the baker down the street has a CS degree. On Thu, Jun 2, 2011 at 11:52 AM, Yves Parès limestr...@gmail.com wrote: Learning Haskell will pay off much less than learning PHP, if your goal is to find a job. Amen. I cannot agree with this for practical reasons. I'm using Haskell for real world commercial applications, and I'm very productive with it. I wish so much I could say that... Out of curiosity, what are you using Haskell for? 2011/6/2 Ertugrul Soeylemez e...@ertes.de Alberto G. Corona agocor...@gmail.com wrote: Haskell is an academic asset as well as a fun asset. I cannot agree with this for practical reasons. I'm using Haskell for real world commercial applications, and I'm very productive with it. There is however a variation of this statement, with which I could agree, namely: Learning Haskell will pay off much less than learning PHP, if your goal is to find a job. It takes a lot longer and there are a lot less companies in need of Haskell programmers. Greets, Ertugrul -- nightmare = unsafePerformIO (getWrongWife = sex) http://ertes.de/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] *GROUP HUG*
I got hired at a company because one of the interviewers was impressed that I taught myself Haskell. I basically never use it at work, but I did in my old job. Dave On Thu, Jun 2, 2011 at 2:23 PM, Michael Litchard mich...@schmong.orgwrote: I disagree. I'm by no means proficient in Haskell. And, I never bothered learning PHP. I will when I need to. PHP programmers are a dime a dozen. It's been my experience that Haskell is a tool one may use to distinguish oneself from the hoi-poloi. This is important when you live in an area where the baker down the street has a CS degree. On Thu, Jun 2, 2011 at 11:52 AM, Yves Parès limestr...@gmail.com wrote: Learning Haskell will pay off much less than learning PHP, if your goal is to find a job. Amen. I cannot agree with this for practical reasons. I'm using Haskell for real world commercial applications, and I'm very productive with it. I wish so much I could say that... Out of curiosity, what are you using Haskell for? 2011/6/2 Ertugrul Soeylemez e...@ertes.de Alberto G. Corona agocor...@gmail.com wrote: Haskell is an academic asset as well as a fun asset. I cannot agree with this for practical reasons. I'm using Haskell for real world commercial applications, and I'm very productive with it. There is however a variation of this statement, with which I could agree, namely: Learning Haskell will pay off much less than learning PHP, if your goal is to find a job. It takes a lot longer and there are a lot less companies in need of Haskell programmers. Greets, Ertugrul -- nightmare = unsafePerformIO (getWrongWife = sex) http://ertes.de/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] *GROUP HUG*
Being able to use Haskell at such an early stage of my programming career has given me high expectations of what comes next. On Thu, Jun 2, 2011 at 3:22 PM, David Leimbach leim...@gmail.com wrote: I got hired at a company because one of the interviewers was impressed that I taught myself Haskell. I basically never use it at work, but I did in my old job. Dave On Thu, Jun 2, 2011 at 2:23 PM, Michael Litchard mich...@schmong.org wrote: I disagree. I'm by no means proficient in Haskell. And, I never bothered learning PHP. I will when I need to. PHP programmers are a dime a dozen. It's been my experience that Haskell is a tool one may use to distinguish oneself from the hoi-poloi. This is important when you live in an area where the baker down the street has a CS degree. On Thu, Jun 2, 2011 at 11:52 AM, Yves Parès limestr...@gmail.com wrote: Learning Haskell will pay off much less than learning PHP, if your goal is to find a job. Amen. I cannot agree with this for practical reasons. I'm using Haskell for real world commercial applications, and I'm very productive with it. I wish so much I could say that... Out of curiosity, what are you using Haskell for? 2011/6/2 Ertugrul Soeylemez e...@ertes.de Alberto G. Corona agocor...@gmail.com wrote: Haskell is an academic asset as well as a fun asset. I cannot agree with this for practical reasons. I'm using Haskell for real world commercial applications, and I'm very productive with it. There is however a variation of this statement, with which I could agree, namely: Learning Haskell will pay off much less than learning PHP, if your goal is to find a job. It takes a lot longer and there are a lot less companies in need of Haskell programmers. Greets, Ertugrul -- nightmare = unsafePerformIO (getWrongWife = sex) http://ertes.de/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] *GROUP HUG*
Adrien Haxaire schrieb: I fully agree. These are two of the three reasons which made me choose haskell as the functional language to learn. Coding fortran all day, I wanted a new approach on programming. The strong scientific roots of haskell would give me stuff to learn and discover for a lot of time. The atmosphere/halo around haskell was intriguing too: come on! it's fun! i can write foldr with foldl! is not the kind of enthusiasm I was used too :) Really, you can write foldr in terms of foldl? So far I was glad I could manage the opposite direction. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] *GROUP HUG*
On Wed, 01 Jun 2011 11:46:36 +0200, Henning Thielemann wrote: Really, you can write foldr in terms of foldl? So far I was glad I could manage the opposite direction. i didn't try it, that was just an example of how strange/interesting the enthusiasm appeared to me when i started Haskell. good exercise though, as even if it cannot be done (for which i have no clue), the explanation of it is interesting too. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] *GROUP HUG*
On Wednesday 01 June 2011 12:25:06, Adrien Haxaire wrote: On Wed, 01 Jun 2011 11:46:36 +0200, Henning Thielemann wrote: Really, you can write foldr in terms of foldl? So far I was glad I could manage the opposite direction. i didn't try it, that was just an example of how strange/interesting the enthusiasm appeared to me when i started Haskell. good exercise though, as even if it cannot be done (for which i have no clue), the explanation of it is interesting too. Spoiler alert, don't look down too early. foldr (++) (repeat No way! ) ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] *GROUP HUG*
On Wed, Jun 1, 2011 at 3:28 AM, Daniel Fischer daniel.is.fisc...@googlemail.com wrote: On Wednesday 01 June 2011 12:25:06, Adrien Haxaire wrote: On Wed, 01 Jun 2011 11:46:36 +0200, Henning Thielemann wrote: Really, you can write foldr in terms of foldl? So far I was glad I could manage the opposite direction. foldr (++) (repeat No way! ) How about this: myFoldr :: (a - b - b) - b - [a] - b myFoldr f z xs = foldl' (\s x v - s (x `f` v)) id xs $ z Cheers, Ivan ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] *GROUP HUG*
How about this: myFoldr :: (a - b - b) - b - [a] - b myFoldr f z xs = foldl' (\s x v - s (x `f` v)) id xs $ z Cheers, Ivan Great! Now I really can say Come on! It's fun! I can write foldr with foldl! ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] *GROUP HUG*
http://stackoverflow.com/questions/6172004/writing-foldl-using-foldr/6172270#6172270 Thank Graham Hutton and Richard Bird. On Wed, Jun 1, 2011 at 7:12 PM, Tom Murphy amin...@gmail.com wrote: How about this: myFoldr :: (a - b - b) - b - [a] - b myFoldr f z xs = foldl' (\s x v - s (x `f` v)) id xs $ z Cheers, Ivan Great! Now I really can say Come on! It's fun! I can write foldr with foldl! ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] *GROUP HUG*
On 11-06-01 07:15 PM, Don Stewart wrote: http://stackoverflow.com/questions/6172004/writing-foldl-using-foldr/6172270#6172270 Thank Graham Hutton and Richard Bird. Another one along the same line: http://www.vex.net/~trebla/haskell/natprim.xhtml Yet one more, along the tangent: http://www.vex.net/~trebla/haskell/scanl.xhtml ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] *GROUP HUG*
Evan, On 24 May 2011 19:57, Evan Laforge qdun...@gmail.com wrote: On the catMaybes thing, I have a function 'mapMaybe = Maybe.catMaybes . map'. I turns out I only ever used catMaybes after mapping a Maybe function, so I hardly ever use catMaybes anymore. I suppose it should have been maybeMap for consistency with concatMap. Just wanted to point out, that function is already defined in Data.Maybe: http://hackage.haskell.org/packages/archive/base/latest/doc/html/Data-Maybe.html#v:mapMaybe Hugs :) Ozgur ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] *GROUP HUG*
On Tue, May 31, 2011 at 11:31 AM, Ozgur Akgun ozgurak...@gmail.com wrote: Evan, On 24 May 2011 19:57, Evan Laforge qdun...@gmail.com wrote: On the catMaybes thing, I have a function 'mapMaybe = Maybe.catMaybes . map'. I turns out I only ever used catMaybes after mapping a Maybe function, so I hardly ever use catMaybes anymore. I suppose it should have been maybeMap for consistency with concatMap. Just wanted to point out, that function is already defined in Data.Maybe: http://hackage.haskell.org/packages/archive/base/latest/doc/html/Data-Maybe.html#v:mapMaybe Hugs :) Indeed it is, somehow I missed that one and wrote my own instead. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] *GROUP HUG*
fluency in Scala is an industry asset, since it runs in the Java VM, while Haskell is an academic asset as well as a fun asset. The value of an industry asset grows with the lack of competence of others. Therefore competing guys are not welcome. There are enoug crocodiles in the pond. Alberto. 2011/5/24 Ketil Malde ke...@malde.org: Juan Daugherty j...@acm.org writes: Every computing culture is different. Definitely. I've just given up on several cultures which are just too vitriolic. Scala is on my list of interesting stuff to look at some day, but if I'm going to be flamed for asking questions about the language, I can easily find something else to fill my time with. Being in the habit of asking questions you should be able to answer yourself is not a good idea. Maybe not. Is it a good idea to flame people who do this? If you look at two case studies: the Scala thread where Gregory was involved, and the recent mail here, basically asking for 'catMaybes'. Replying whoosh, or otherwise producing non-informative, arrogant feedback results in a long thread, culminating in a more useful answer, as well as a lot of noise. Replying with a pointer to 'catMaybes' resulted in (most likely) the author going off to finish/improve his program, and some more interesting discussion on alternative ways to do this. The point is that at face value, being rude and arrogant may drive away naive questions, but is much more likely to result in endless threads of discussions of etiquette, usually laced with ample amounts of hostility. This actually decreases signal to noise. Also it not only drives away the naive questions, it drives away the people asking them. People who might at some point become informed, contributing members of the community. I don't know, maybe Scala is big enough that they can afford to behave that way. Some people quit haskell-cafe for other (better policed?) forums, so perhaps we are too liberal? I hope not. Although Haskell comm. is necessarily welcoming due to the learning curve and lack of popular adoption there are limits here too. My theory is that flaming cultures arise around people who are technically brilliant, but somewhat lacking socially, either through arrogance or ineptitude. Members of communities where such people become central respect them for their brilliance, and then emulate, echo or support them. (I guess the implicit rationale is that if the smart people are assholes, being an asshole will make people - or myself - think I'm smart, too). Why have we managed to avoid this? Partly because of the heavy academic slant, usually academia tends to reserved politeness. Also, there's a lot of theory floating around, so although I might get impatient with some people, I can't really grow arrogant, since there's so *much* I'm obviously completely ignorant at. (Sorry about the long off-topic rant.) -k -- If I haven't seen further, it is by standing in the footprints of giants ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] *GROUP HUG*
Le 31/05/2011 21:15, Alberto G. Corona a écrit : Haskell is an academic asset as well as a fun asset. I fully agree. These are two of the three reasons which made me choose haskell as the functional language to learn. Coding fortran all day, I wanted a new approach on programming. The strong scientific roots of haskell would give me stuff to learn and discover for a lot of time. The atmosphere/halo around haskell was intriguing too: come on! it's fun! i can write foldr with foldl! is not the kind of enthusiasm I was used too :) The third reason is, as you already now, the community. Never have seen so much encouragements, help, time, humility, jokes,... crossing the gap takes some time, but when you feel that lots of people are glad you're here, it's just constant joy. group hug ! ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] *GROUP HUG*
come on! it's fun! i can write foldr with foldl! And when you try to explain that to your java-ITC-formatted friends, they utterly surprisingly seem not to care about it ^^ 2011/5/31 Adrien Haxaire adr...@adrienhaxaire.org Le 31/05/2011 21:15, Alberto G. Corona a écrit : Haskell is an academic asset as well as a fun asset. I fully agree. These are two of the three reasons which made me choose haskell as the functional language to learn. Coding fortran all day, I wanted a new approach on programming. The strong scientific roots of haskell would give me stuff to learn and discover for a lot of time. The atmosphere/halo around haskell was intriguing too: come on! it's fun! i can write foldr with foldl! is not the kind of enthusiasm I was used too :) The third reason is, as you already now, the community. Never have seen so much encouragements, help, time, humility, jokes,... crossing the gap takes some time, but when you feel that lots of people are glad you're here, it's just constant joy. group hug ! ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] *GROUP HUG*
On 25/05/2011, at 12:41 AM, Johannes Waldmann wrote: Yves Parès limestrael at gmail.com writes: For instance, one of my friends asked me once why the operation of calculating the length of list has an O(n) complexity, since to his opinion, you could just store the size inside the list and increment it when elements are appended. Then tell me, why does calculating the length of a (Haskell) list has O(n) complexity. Because it is a rather rare operation and the cost of doing this would be far higher than you think. I could just store the length of the list Let's take abcdef as an example. This is a list of length 6, containing a list of length 5, containing a list of length 4, containing a list of length 3, containing a list of length 2, containing a list of length 1, containing a list of length 0 (which can be shared). So for this little example, you're saying why not store six more numbers? And I say, why push up the space and time requirements so high for something that is so very seldom useful? Then of course there are lists like fibs = 1 : 1 : zipWith (+) fibs (tail fibs) that don't _have_ a finite length. On the other hand, there are implementations of strict sequences with an O(1) size implemenation. http://hackage.haskell.org/packages/archive/containers/0.4.0.0/doc/html/Data-Sequence.html#v:length The O(1) size comes at a cost; if all you need is what lists do well, it's a good idea to avoid finger trees. If you DO need the things that finger trees do well, by all means use them. The contrast here is not that Haskell doesn't store the length of lists and Java does, but that Java doesn't do plain lists at all, and Haskell does. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] *GROUP HUG*
On 24/05/11 22:41, Johannes Waldmann wrote: Then tell me, why does calculating the length of a (Haskell) list has O(n) complexity. Infiniticity aside, tail would become O(n) if you store a length with each cons cell. -- Tony Morris http://tmorris.net/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] *GROUP HUG*
Why so? I think it wouldn't. data FList a = FNil | FCons Int a (FList a) empty = FNil len FNil = 0 len (FCons n _) = n cons x xs = FCons (1 + len xs) x xs tail (FCons _ _ xs) = xs 2011/5/24 Tony Morris tonymor...@gmail.com: On 24/05/11 22:41, Johannes Waldmann wrote: Then tell me, why does calculating the length of a (Haskell) list has O(n) complexity. Infiniticity aside, tail would become O(n) if you store a length with each cons cell. -- Tony Morris http://tmorris.net/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe -- Eugene Kirpichov Principal Engineer, Mirantis Inc. http://www.mirantis.com/ Editor, http://fprog.ru/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] *GROUP HUG*
On 25/05/11 16:46, Eugene Kirpichov wrote: data FList a = FNil | FCons Int a (FList a) empty = FNil len FNil = 0 len (FCons n _) = n cons x xs = FCons (1 + len xs) x xs tail (FCons _ _ xs) = xs My mistake, sorry. Currently looking for original reason to have accidentally come to believe that. -- Tony Morris http://tmorris.net/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] *GROUP HUG*
Tony Morris schrieb: On 25/05/11 16:46, Eugene Kirpichov wrote: data FList a = FNil | FCons Int a (FList a) empty = FNil len FNil = 0 len (FCons n _) = n cons x xs = FCons (1 + len xs) x xs tail (FCons _ _ xs) = xs My mistake, sorry. Currently looking for original reason to have accidentally come to believe that. Maybe you thought of 'take'. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] *GROUP HUG*
Richard O'Keefe o...@cs.otago.ac.nz writes: Then tell me, why does calculating the length of a (Haskell) list has O(n) complexity. Because it is a rather rare operation and the cost of doing this would be far higher than you think. I suspect that if you store the length non-strictly, it would build up thunks, causing a stack overflow when evaluated. If it is strict, it would make a lot of operations that are O(1) today into O(n) operations. -k -- If I haven't seen further, it is by standing in the footprints of giants ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] *GROUP HUG*
So it seconds my initial point: you can't store the size because it has no sense. 2011/5/25 Ketil Malde ke...@malde.org Richard O'Keefe o...@cs.otago.ac.nz writes: Then tell me, why does calculating the length of a (Haskell) list has O(n) complexity. Because it is a rather rare operation and the cost of doing this would be far higher than you think. I suspect that if you store the length non-strictly, it would build up thunks, causing a stack overflow when evaluated. If it is strict, it would make a lot of operations that are O(1) today into O(n) operations. -k -- If I haven't seen further, it is by standing in the footprints of giants ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] *GROUP HUG*
Just laugh mate. It's the best possible outcomes sometimes. On 24/05/11 15:10, Gregory Crosswhite wrote: Hey everyone, Okay, this will sound silly, but I ventured into the Scala mailing list recently and asked an ignorant question on it, and I was shocked when people reacted not by enlightening me but by jumping on me and reacting with hostility. I bring this up not to badmouth the Scala community (they are apparently going through growing pains and will hopefully mature with time!) but just because it made me appreciate just how awesome you guys are, so I just feel the need to publicly express my admiration and thank to everyone on this list for having fostered such an incredibly professional, fanatically nonhostile, and generally pleasant place to talk about Haskell!!! *GROUP HUG* Okay, I'm done now. :-) Cheers, Greg ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe -- Tony Morris http://tmorris.net/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] *GROUP HUG*
Every computing culture is different. Being in the habit of asking questions you should be able to answer yourself is not a good idea. Why did you ask a question which you yourself characterize as ignorant? Although Haskell comm. is necessarily welcoming due to the learning curve and lack of popular adoption there are limits here too. On Tue, May 24, 2011 at 5:34 AM, max ulidtko ulid...@gmail.com wrote: 2011-05-23 22:10 -0700, Gregory Crosswhite: Hey everyone, Okay, this will sound silly, but I ventured into the Scala mailing list recently and asked an ignorant question on it, and I was shocked when people reacted not by enlightening me but by jumping on me and reacting with hostility. I bring this up not to badmouth the Scala community (they are apparently going through growing pains and will hopefully mature with time!) but just because it made me appreciate just how awesome you guys are, so I just feel the need to publicly express my admiration and thank to everyone on this list for having fostered such an incredibly professional, fanatically nonhostile, and generally pleasant place to talk about Haskell!!! *GROUP HUG* Okay, I'm done now. :-) Cheers, Greg Wow. I subscribed to the list just an hour ago or so, and already receiving hugs! That's kinda... striking, you know. Yay! Newbie hug to everyone too! - max ulidtko ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe -- === j...@acm.org | Juan.Daugherty on Skype | 01 716 524 0542 === ---PGP SIGNATURE Attached If Signed---= ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] *GROUP HUG*
On 2011 May 24, at 09:37, Juan Daugherty wrote: Every computing culture is different. Being in the habit of asking questions you should be able to answer yourself is not a good idea. Why did you ask a question which you yourself characterize as ignorant? I would guess it is because he was attempting to reduce his ignorance. That, to me, is one of the more noble reasons for asking questions. What would be the point of asking a non-ignorant question, unless it is a rhetorical one? It is tempting to infer from what you wrote above, that you believe all ignorant questions are ones which you should be able to answer yourself. I respectfully disagree. Then there is the whole class of questions which you could answer yourself, but the effort required to do so can be reduced by many orders of magnitude with some external input. Another good reason to ask questions. If you ask questions, and then stubbornly ignore good advice that people give you, then you shouldn't be surprised if they turn hostile. But if they are hostile merely because you asked an ignorant question, then I do find that surprising. Signed, an ignoramus who is constantly trying to chip away at his own ignorance (and that of others). ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] *GROUP HUG*
Why did you ask a question which you yourself characterize as ignorant? Juan, I think it is the kind of question whose answer is obvious to people with at least a little practice of the language. For instance, one of my friends asked me once why the operation of calculating the length of list has an O(n) complexity, since to his opinion, you could just store the size inside the list and increment it when elements are appended. Once you got the clue about lazy lists, the answer is obvious [1], but to a Java-trained mind, it is right it can at first sight seem like a lack of optimisation. I'm curious Gregory, what was the question you asked and how were you brushed off? And what are those troubles the Scala community is undergoing? It would be a real shame if the Scala community wasn't up to its terrific language... [1] And if it is not, then to find it your homework shall be ;) 2011/5/24 Juan Daugherty j...@acm.org Every computing culture is different. Being in the habit of asking questions you should be able to answer yourself is not a good idea. Why did you ask a question which you yourself characterize as ignorant? Although Haskell comm. is necessarily welcoming due to the learning curve and lack of popular adoption there are limits here too. On Tue, May 24, 2011 at 5:34 AM, max ulidtko ulid...@gmail.com wrote: 2011-05-23 22:10 -0700, Gregory Crosswhite: Hey everyone, Okay, this will sound silly, but I ventured into the Scala mailing list recently and asked an ignorant question on it, and I was shocked when people reacted not by enlightening me but by jumping on me and reacting with hostility. I bring this up not to badmouth the Scala community (they are apparently going through growing pains and will hopefully mature with time!) but just because it made me appreciate just how awesome you guys are, so I just feel the need to publicly express my admiration and thank to everyone on this list for having fostered such an incredibly professional, fanatically nonhostile, and generally pleasant place to talk about Haskell!!! *GROUP HUG* Okay, I'm done now. :-) Cheers, Greg Wow. I subscribed to the list just an hour ago or so, and already receiving hugs! That's kinda... striking, you know. Yay! Newbie hug to everyone too! - max ulidtko ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe -- === j...@acm.org | Juan.Daugherty on Skype | 01 716 524 0542 === ---PGP SIGNATURE Attached If Signed---= ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] *GROUP HUG*
Juan Daugherty j...@acm.org writes: Every computing culture is different. Definitely. I've just given up on several cultures which are just too vitriolic. Scala is on my list of interesting stuff to look at some day, but if I'm going to be flamed for asking questions about the language, I can easily find something else to fill my time with. Being in the habit of asking questions you should be able to answer yourself is not a good idea. Maybe not. Is it a good idea to flame people who do this? If you look at two case studies: the Scala thread where Gregory was involved, and the recent mail here, basically asking for 'catMaybes'. Replying whoosh, or otherwise producing non-informative, arrogant feedback results in a long thread, culminating in a more useful answer, as well as a lot of noise. Replying with a pointer to 'catMaybes' resulted in (most likely) the author going off to finish/improve his program, and some more interesting discussion on alternative ways to do this. The point is that at face value, being rude and arrogant may drive away naive questions, but is much more likely to result in endless threads of discussions of etiquette, usually laced with ample amounts of hostility. This actually decreases signal to noise. Also it not only drives away the naive questions, it drives away the people asking them. People who might at some point become informed, contributing members of the community. I don't know, maybe Scala is big enough that they can afford to behave that way. Some people quit haskell-cafe for other (better policed?) forums, so perhaps we are too liberal? I hope not. Although Haskell comm. is necessarily welcoming due to the learning curve and lack of popular adoption there are limits here too. My theory is that flaming cultures arise around people who are technically brilliant, but somewhat lacking socially, either through arrogance or ineptitude. Members of communities where such people become central respect them for their brilliance, and then emulate, echo or support them. (I guess the implicit rationale is that if the smart people are assholes, being an asshole will make people - or myself - think I'm smart, too). Why have we managed to avoid this? Partly because of the heavy academic slant, usually academia tends to reserved politeness. Also, there's a lot of theory floating around, so although I might get impatient with some people, I can't really grow arrogant, since there's so *much* I'm obviously completely ignorant at. (Sorry about the long off-topic rant.) -k -- If I haven't seen further, it is by standing in the footprints of giants ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] *GROUP HUG*
I've been lurking around, and yes, I also think the Haskell community is very civilized. I think having people asking all kinds of questions is a good sign that people are interested. And as a member of the community, especially if you are an experienced member (i.e. you have invested time and energy in this because you like this technology), it is probably a good thing for you too if the community is vibrant, and if it attracts new members. Sometimes, you know the question is dumb, and you have a huntch that the answer is very simple, but it just doesn't click. You might stare at it for hours or days, without any solution, and it might probably take someone a fraction of a second to point it out, and just a little hint, and you are set to go. That's why it's very important to be nice to newbies or oldies, even if you think the question is really dumb. I've been writing C/C++ for over 15 years, and Java over 10 years. On a daily basis. But sometimes, I can stare at a f*ing error and have no clue why it is an error. When I learn to program Haskell, I'm just lurking around to see how is the community before committing time and energy on it. So yes, please keep it that way. xp ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] *GROUP HUG*
Hi Gregory, I had a similar experience on the scala-user list some time ago. I found most of the responses to my questions to be rather unproductive and superficial. I love the haskell-cafe community for their helpfulness and analytical approach. I left scala-user not long afterward partly because of the aforementioned issues and partly because lurking there and reading threads did not provide any enlightenment on using Scala. With haskell-cafe, I can just read and (attempt to) absorb new knowledge. At least for me, the signal-to-noise ratio is higher on haskell-cafe than scala-user. (YMMV, of course.) I'm not sure that the problem for the Scala community is growing pains. The Haskell community has been this way from the very beginning. In fact, the growing mix of people introduced to Haskell has lead to a great diversity of reactions: academic, hobbyist, getting-things-done, etc. For Scala, I think it's really due to the type of people that are attracted to the community. My impression is that more people are coming from Java programming than from academia. This probably has an effect on the community dynamics. (This is not meant to slight Java programmers. Rather, I think that the common perspective is more that of getting-things-done than deep-insight-into-the-problem.) I also applaud the Haskell community for being very open and helpful. I would like to thank everyone who contributes to this environment. Group hug, indeed! ;) Regards, Sean ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] *GROUP HUG*
For Scala, I think it's really due to the type of people that are attracted to the community. My impression is that more people are coming from Java programming than from academia. Java developpers who whould be interested in doing things in a clean, expressive and manageable way? Maybe salvation is on sale today... (Btw, this *is** *meant to slight Java programmers ^^). |--| | Please do not feed the troll* | |-||---**| || || || || || * 2011/5/24 Sean Leather leat...@cs.uu.nl Hi Gregory, I had a similar experience on the scala-user list some time ago. I found most of the responses to my questions to be rather unproductive and superficial. I love the haskell-cafe community for their helpfulness and analytical approach. I left scala-user not long afterward partly because of the aforementioned issues and partly because lurking there and reading threads did not provide any enlightenment on using Scala. With haskell-cafe, I can just read and (attempt to) absorb new knowledge. At least for me, the signal-to-noise ratio is higher on haskell-cafe than scala-user. (YMMV, of course.) I'm not sure that the problem for the Scala community is growing pains. The Haskell community has been this way from the very beginning. In fact, the growing mix of people introduced to Haskell has lead to a great diversity of reactions: academic, hobbyist, getting-things-done, etc. For Scala, I think it's really due to the type of people that are attracted to the community. My impression is that more people are coming from Java programming than from academia. This probably has an effect on the community dynamics. (This is not meant to slight Java programmers. Rather, I think that the common perspective is more that of getting-things-done than deep-insight-into-the-problem.) I also applaud the Haskell community for being very open and helpful. I would like to thank everyone who contributes to this environment. Group hug, indeed! ;) Regards, Sean ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] *GROUP HUG*
Well, Yves, we can't know since the question in question was about Scala not Haskell. I think some respondents are confusing the sensed of ignorant conveyed with the objective condition of a lack of knowledge. In any case, IMHO IRC or some other similar real-time venue and not a mailing list is the proper place for such queries. On Tue, May 24, 2011 at 4:06 AM, Yves Parès limestr...@gmail.com wrote: Why did you ask a question which you yourself characterize as ignorant? Juan, I think it is the kind of question whose answer is obvious to people with at least a little practice of the language. For instance, one of my friends asked me once why the operation of calculating the length of list has an O(n) complexity, since to his opinion, you could just store the size inside the list and increment it when elements are appended. Once you got the clue about lazy lists, the answer is obvious [1], but to a Java-trained mind, it is right it can at first sight seem like a lack of optimisation. I'm curious Gregory, what was the question you asked and how were you brushed off? And what are those troubles the Scala community is undergoing? It would be a real shame if the Scala community wasn't up to its terrific language... [1] And if it is not, then to find it your homework shall be ;) 2011/5/24 Juan Daugherty j...@acm.org Every computing culture is different. Being in the habit of asking questions you should be able to answer yourself is not a good idea. Why did you ask a question which you yourself characterize as ignorant? Although Haskell comm. is necessarily welcoming due to the learning curve and lack of popular adoption there are limits here too. On Tue, May 24, 2011 at 5:34 AM, max ulidtko ulid...@gmail.com wrote: 2011-05-23 22:10 -0700, Gregory Crosswhite: Hey everyone, Okay, this will sound silly, but I ventured into the Scala mailing list recently and asked an ignorant question on it, and I was shocked when people reacted not by enlightening me but by jumping on me and reacting with hostility. I bring this up not to badmouth the Scala community (they are apparently going through growing pains and will hopefully mature with time!) but just because it made me appreciate just how awesome you guys are, so I just feel the need to publicly express my admiration and thank to everyone on this list for having fostered such an incredibly professional, fanatically nonhostile, and generally pleasant place to talk about Haskell!!! *GROUP HUG* Okay, I'm done now. :-) Cheers, Greg Wow. I subscribed to the list just an hour ago or so, and already receiving hugs! That's kinda... striking, you know. Yay! Newbie hug to everyone too! - max ulidtko ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe -- === j...@acm.org | Juan.Daugherty on Skype | 01 716 524 0542 === ---PGP SIGNATURE Attached If Signed---= ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe -- === j...@acm.org | Juan.Daugherty on Skype | 01 716 524 0542 === ---PGP SIGNATURE Attached If Signed---= ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] *GROUP HUG*
Yves Parès limestrael at gmail.com writes: For instance, one of my friends asked me once why the operation of calculating the length of list has an O(n) complexity, since to his opinion, you could just store the size inside the list and increment it when elements are appended. Then tell me, why does calculating the length of a (Haskell) list has O(n) complexity. I could just store the length of the list - as an additional argument to the Cons constructor that is automatically initialized on construction (and you never need to change it later, since Haskell objects are immutable, in the words of Java programmers) In Haskell, the reason for not doing this (besides simplicity, and inertia) actually is (I think) laziness: you don't want to evaluate the length field of the second argument of the cons prematurely. Well, unless you look at the length field of the constructed object, it won't be evaluated, but a pile of thunks will be constructed instead, and I think that's what you really want to avoid. On the other hand, there are implementations of strict sequences with an O(1) size implemenation. http://hackage.haskell.org/packages/archive/containers/0.4.0.0/doc/html/Data-Sequence.html#v:length J.W. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] *GROUP HUG*
In Haskell, the reason for not doing this (besides simplicity, and inertia) actually is (I think) laziness: you don't want to evaluate the length field of the second argument of the cons prematurely. Yes, this is what I meant. I shouldn't have spoken about complexity, it was irrelevant as you pointed it out. 2011/5/24 Johannes Waldmann waldm...@imn.htwk-leipzig.de Yves Parès limestrael at gmail.com writes: For instance, one of my friends asked me once why the operation of calculating the length of list has an O(n) complexity, since to his opinion, you could just store the size inside the list and increment it when elements are appended. Then tell me, why does calculating the length of a (Haskell) list has O(n) complexity. I could just store the length of the list - as an additional argument to the Cons constructor that is automatically initialized on construction (and you never need to change it later, since Haskell objects are immutable, in the words of Java programmers) In Haskell, the reason for not doing this (besides simplicity, and inertia) actually is (I think) laziness: you don't want to evaluate the length field of the second argument of the cons prematurely. Well, unless you look at the length field of the constructed object, it won't be evaluated, but a pile of thunks will be constructed instead, and I think that's what you really want to avoid. On the other hand, there are implementations of strict sequences with an O(1) size implemenation. http://hackage.haskell.org/packages/archive/containers/0.4.0.0/doc/html/Data-Sequence.html#v:length J.W. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] *GROUP HUG*
And I thought Hugs was dead. :-) On 24 May 2011 06:10, Gregory Crosswhite gcr...@phys.washington.edu wrote: Hey everyone, Okay, this will sound silly, but I ventured into the Scala mailing list recently and asked an ignorant question on it, and I was shocked when people reacted not by enlightening me but by jumping on me and reacting with hostility. I bring this up not to badmouth the Scala community (they are apparently going through growing pains and will hopefully mature with time!) but just because it made me appreciate just how awesome you guys are, so I just feel the need to publicly express my admiration and thank to everyone on this list for having fostered such an incredibly professional, fanatically nonhostile, and generally pleasant place to talk about Haskell!!! *GROUP HUG* Okay, I'm done now. :-) Cheers, Greg ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe -- Colin Adams Preston, Lancashire, ENGLAND () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] *GROUP HUG*
On 24 May 2011 13:41, Johannes Waldmann waldm...@imn.htwk-leipzig.de wrote: I could just store the length of the list - as an additional argument to the Cons constructor that is automatically initialized on construction (and you never need to change it later, since Haskell objects are immutable, in the words of Java programmers) In Haskell, the reason for not doing this (besides simplicity, and inertia) actually is (I think) laziness: you don't want to evaluate the length field of the second argument of the cons prematurely. Neither OCaml nor PLT Scheme cache the length or they didn't a year of two ago when someone asked this question on the Haskell Beginners list and I checked the respective source trees. As the PLT Scheme list was implemented in C at the time (maybe it still is?) I was a bit surprised by this. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] *GROUP HUG*
On May 24, 2011, at 4:46 AM, Ketil Malde wrote: Replying with a pointer to 'catMaybes' resulted in (most likely) the author going off to finish/improve his program, and some more interesting discussion on alternative ways to do this. What's more, the thread added many other possible implementations, and a discussion why using filter ((/=) Nothing) is a bad thing (even though it seems like a nice and simple check) because it adds an additional Eq constraint an whatever is inside the Maybe. I think THAT, ie, not only accepting and giving useful answers to simple questions, but even expanding upon them and using them as learning tools for more advanced topics, is what makes the haskell community such a fun place to be. Because while I, a medium level haskell noobie, already knew about the catMaybes function and could have built the filters or searched on Hoogle for it, I had not thought about the advantages to using isNothing instead of (== Nothing), or that there was any difference at all.___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] *GROUP HUG*
Firstly, I would definitely like to second the group hug! I'd say best learning community on the net, that I know of. On 5/24/11, Ketil Malde ke...@malde.org wrote: The point is that at face value, being rude and arrogant may drive away naive questions, but is much more likely to result in endless threads of discussions of etiquette, usually laced with ample amounts of hostility. This actually decreases signal to noise. Also it not only drives away the naive questions, it drives away the people asking them. People who might at some point become informed, contributing members of the community. It also drives away people who don't know if their question is naive or not. When you don't want to be yelled at, you have a strong tendency to err on the side of not asking. This slows down learning significantly, and decreases the number of people who can answer others' questions in the future. Some people quit haskell-cafe for other (better policed?) forums, so perhaps we are too liberal? I hope not. Does anybody know how much this has happened? I'm very interested in how we can maintain this amazing resource as Haskell's user base grows. Will the same etiquette work when we start to get lots of questions from Java programmers? :) Tom ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] *GROUP HUG*
Will the same etiquette work when we start to get lots of questions from Java programmers? :) If you mean will we have to maintain the same etiquette? then, sadly, yes. (And I said we were done trolling! ;) ) 2011/5/24 Tom Murphy amin...@gmail.com Firstly, I would definitely like to second the group hug! I'd say best learning community on the net, that I know of. On 5/24/11, Ketil Malde ke...@malde.org wrote: The point is that at face value, being rude and arrogant may drive away naive questions, but is much more likely to result in endless threads of discussions of etiquette, usually laced with ample amounts of hostility. This actually decreases signal to noise. Also it not only drives away the naive questions, it drives away the people asking them. People who might at some point become informed, contributing members of the community. It also drives away people who don't know if their question is naive or not. When you don't want to be yelled at, you have a strong tendency to err on the side of not asking. This slows down learning significantly, and decreases the number of people who can answer others' questions in the future. Some people quit haskell-cafe for other (better policed?) forums, so perhaps we are too liberal? I hope not. Does anybody know how much this has happened? I'm very interested in how we can maintain this amazing resource as Haskell's user base grows. Will the same etiquette work when we start to get lots of questions from Java programmers? :) Tom ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] *GROUP HUG*
On Tue, May 24, 2011 at 10:03 AM, Stephen Tetley stephen.tet...@gmail.com wrote: Neither OCaml nor PLT Scheme cache the length or they didn't a year of two ago when someone asked this question on the Haskell Beginners list and I checked the respective source trees. As the PLT Scheme list was implemented in C at the time (maybe it still is?) I was a bit surprised by this. I dunno, I hardly ever use length and when I do it's always lists I know are very short. And it tends to be shortcuts like 'drop (length prefix) word' because I'm too lazy to write a special function. Lists are variable length and homogenous, so the main thing you do is iterate over them, I don't see much call for getting their length. Length is handy for arrays because you iterate with an index, but lists are different. Adding an int to every cons cell would make lists larger by 2/3x and could hurt more than help. That would be a pretty heavy price to speed up a rarely used function. I'm not familiar with java and c++ list implementations, but I imagine they don't share tails, presumably because of mutability. So a cached length is reasonable for them, especially because they're probably expecting it to be used as an array with fast splicing, which implies it's probably large. After all, if you simply wanted to iterate over something small you would have used an array. So, it's a different situation. On the catMaybes thing, I have a function 'mapMaybe = Maybe.catMaybes . map'. I turns out I only ever used catMaybes after mapping a Maybe function, so I hardly ever use catMaybes anymore. I suppose it should have been maybeMap for consistency with concatMap. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] *GROUP HUG*
On Tue, 2011-05-24 at 15:37 +0100, Colin Adams wrote: And I thought Hugs was dead. :-) I think we have explanation for the friendliness of Haskell community - even the compiler hugs. Regards signature.asc Description: This is a digitally signed message part ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] *GROUP HUG*
Hey everyone, Okay, this will sound silly, but I ventured into the Scala mailing list recently and asked an ignorant question on it, and I was shocked when people reacted not by enlightening me but by jumping on me and reacting with hostility. I bring this up not to badmouth the Scala community (they are apparently going through growing pains and will hopefully mature with time!) but just because it made me appreciate just how awesome you guys are, so I just feel the need to publicly express my admiration and thank to everyone on this list for having fostered such an incredibly professional, fanatically nonhostile, and generally pleasant place to talk about Haskell!!! *GROUP HUG* Okay, I'm done now. :-) Cheers, Greg ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] *GROUP HUG*
The community plays a large part of why I am using Haskell professionally. The Haskell ecosystem is first-rate all by itself, but I would have been dead in the water months ago without the community. On Mon, May 23, 2011 at 10:10 PM, Gregory Crosswhite gcr...@phys.washington.edu wrote: Hey everyone, Okay, this will sound silly, but I ventured into the Scala mailing list recently and asked an ignorant question on it, and I was shocked when people reacted not by enlightening me but by jumping on me and reacting with hostility. I bring this up not to badmouth the Scala community (they are apparently going through growing pains and will hopefully mature with time!) but just because it made me appreciate just how awesome you guys are, so I just feel the need to publicly express my admiration and thank to everyone on this list for having fostered such an incredibly professional, fanatically nonhostile, and generally pleasant place to talk about Haskell!!! *GROUP HUG* Okay, I'm done now. :-) Cheers, Greg ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] *GROUP HUG*
2011-05-23 22:10 -0700, Gregory Crosswhite: Hey everyone, Okay, this will sound silly, but I ventured into the Scala mailing list recently and asked an ignorant question on it, and I was shocked when people reacted not by enlightening me but by jumping on me and reacting with hostility. I bring this up not to badmouth the Scala community (they are apparently going through growing pains and will hopefully mature with time!) but just because it made me appreciate just how awesome you guys are, so I just feel the need to publicly express my admiration and thank to everyone on this list for having fostered such an incredibly professional, fanatically nonhostile, and generally pleasant place to talk about Haskell!!! *GROUP HUG* Okay, I'm done now. :-) Cheers, Greg Wow. I subscribed to the list just an hour ago or so, and already receiving hugs! That's kinda... striking, you know. Yay! Newbie hug to everyone too! - max ulidtko signature.asc Description: This is a digitally signed message part ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe