6 ms·
The Evolution of a Haskell Programmer
- jdn 13y agoIt's quite amusing how accurate this is, knowing Haskell users across a number of these levels. It's quite a handy learning tool as well with the added explanations at the bottom.
- b3tta 13y agoSince the "original" mentioned at the top is not available anymore: http://web.archive.org/web/20071020011113/http://www.cse.ogi.edu/~diatchki/jokes/programmer.html http://web.archive.org/web/20071020011113/http://www.cse.ogi...
- agumonkey 13y agoWas there some new patterns since the last decade (the page updates stopped in 2001) ?
- ocharles 13y agoUnifying Recursion Schemes will be part of the ICFP 2013 papers (http://www.cs.ox.ac.uk/people/jeremy.gibbons/publications/urs.pdf http://www.cs.ox.ac.uk/people/jeremy.gibbons/publications/ur...) which is tangentially related to the penultimate entry using recursion, as we have another way of reasoning about them now.
- agumonkey 13y agoMany thanks
- wslh 13y agoIt misses the math Haskell programmer using the closed form expression: http://en.wikipedia.org/wiki/Fibonacci_number#Closed-form_expression http://en.wikipedia.org/wiki/Fibonacci_number#Closed-form_ex... What is the best way to implement it in Haskell since Phi and Psi are real numbers? Edit: as the user tome told me.... It was about the factorial function not about fibonacci. I blindly see fibonacci.
- freyrs3 13y agoNaive implementation might be: fib :: Integer -> Integer fib x = truncate $ ( 1 / sqrt 5 ) * ( phi ^ x - psi ^ x ) where phi = ( 1 + sqrt 5 ) / 2 psi = ( 1 - sqrt 5 ) / 2
- fhars 13y agoAlas, that version is only correct up to x = 25, because *Main> 1 / sqrt 5 * (((1 + sqrt 5) / 2) ^ 26 - ((1 - sqrt 5) / 2) ^ 26) 121392.99999999999 happens to be just on the wrong side of the truncate.
- tome 13y agoThat's not a Haskell question per se, but in any language you can implement it using two intergers (a, b) that represent the number a + b * sqrt(5).
- wslh 13y agoYes, it is a Haskell question more than you think ;-) since, for example, using types for fraction or other kind of patterns can work different in Haskell than in other languages. I think it's possible in Haskell to add symbolic manipulation as well like in http://christopherolah.wordpress.com/2012/06/01/hasksymb-an-experiment-in-haskell-symbolic-algebra/ http://christopherolah.wordpress.com/2012/06/01/hasksymb-an-... or http://homepages.inf.ed.ac.uk/wadler/realworld/docon2.html http://homepages.inf.ed.ac.uk/wadler/realworld/docon2.html Also, there are implementations in the list that can be implemented in the same way on non functional languages.
- tome 13y agoI think it would be neater doing it in Haskell than, say Java, but the fundamental idea would be the same in both.
- FreeFull 13y agoBut this is all about the factorial function, not the fibonacci sequence
- wreckimnaked 13y agoI really want to understand about morphisms and category theory after reading this. Can anyone point out any good introduction to the category theory behind those catamorphisms?
- sfvisser 13y agoMore of a programming than a CT introduction, but very useful nonetheless: Functional Programming with Bananas, Lenses, Envelopes and Barbed Wire (1991), by Erik Meijer, Maarten Fokkinga, Ross Paterson
- Toshio 13y agoThese slides may be of some help. http://yogsototh.github.com/Category-Theory-Presentation http://yogsototh.github.com/Category-Theory-Presentation
- gtani 13y agohere's some course materials http://www.cse.chalmers.se/edu/course/afp/lectures.html http://www.cse.chalmers.se/edu/course/afp/lectures.html http://www.scs.stanford.edu/11au-cs240h/notes/ http://www.scs.stanford.edu/11au-cs240h/notes/ http://www.seas.upenn.edu/~cis194/lectures.html http://www.seas.upenn.edu/~cis194/lectures.html
- davidp 13y agoI am simultaneously intrigued by the possibilities of functional programming, and horrified by the ways it can take people off into the weeds. Were I to use Haskell in a real-world project with teammates, I'd have to keep an iron grip on the complexity of the code the team writes. Maintainability (mainly readability/comprehensibility as far as I'm concerned) is far more important for the kind of work I do than theoretical purity and hypothetical applicability to classes of problems the team isn't facing. I could easily keep things on the rails on my own, but I suppose it's simply unsettling thinking about using Haskell for something sizable; probably due to my own lack of experience with it. I'd love to hear about sizable real-world Haskell projects, since I think FP is the future of software engineering.
- mwcampbell 13y agoYour concerns resonate with me. I think in most cases, particularly in commercial software development, we should value clarity, familiarity, and maintainability over cleverness, expressiveness, and terseness. I think that like Haskell, Scala's flexibility tends to take some people off into the weeds. See, for example, Coda Hale's concerns about using Scala at Yammer, from about 2 years ago: http://codahale.com/downloads/email-to-donald.txt http://codahale.com/downloads/email-to-donald.txt However, I think we need to be careful not to overvalue familiarity. Rich Hickey's talk "Simple Made Easy" is well-known, and I think he's correct to tell us that we should value simplicity over ease. I guess the answer is to use functional programming to make our software simpler, and not let cleverness take us off into the weeds.
- gtani 13y agoMost of these aren't detailed but it's a start. FP complete is a startup devoted to bringing haskell into more production systems http://www.joachim-breitner.de/blog/archives/606-Real-World-Haskell-Applications%20.html http://www.joachim-breitner.de/blog/archives/606-Real-World-... http://corp.galois.com/systems-software http://corp.galois.com/systems-software http://www.haskell.org/haskellwiki/Haskell_in_industry http://www.haskell.org/haskellwiki/Haskell_in_industry http://cufp.org/conference/schedule/2012 http://cufp.org/conference/schedule/2012 https://www.fpcomplete.com/business/resources/case-studies https://www.fpcomplete.com/business/resources/case-studies _____________ similar for scala http://typesafe.com/company/casestudies http://typesafe.com/company/casestudies
- ExpiredLink 13y agoHaskell? Just let it fade away!
- Peaker 13y agoIronically, Haskell is gaining traction while your comment is fading away :-)