tag:blogger.com,1999:blog-5837865295676240265.post5906940980160583215..comments2023-10-15T18:50:22.212+11:00Comments on Preposterous! Egregious!: A Year of Functional ProgrammingDavid Barrihttp://www.blogger.com/profile/05426582122438954031noreply@blogger.comBlogger36125tag:blogger.com,1999:blog-5837865295676240265.post-62079150963777564022014-12-24T05:36:56.930+11:002014-12-24T05:36:56.930+11:00You have revealed a great information about hire p...You have revealed a great information about <a href="http://hireprogrammer.co.uk/" rel="nofollow">hire programmers</a>,<a href="http://hireprogrammer.co.uk/" rel="nofollow">html programming</a>. Which are very helpful for everyone. ThanksAnonymoushttps://www.blogger.com/profile/11393880143463581564noreply@blogger.comtag:blogger.com,1999:blog-5837865295676240265.post-73459641049917515282014-06-19T01:44:56.323+10:002014-06-19T01:44:56.323+10:00nice read your post? you must put the academic pur...nice read your post? you must put the academic purpose in here? <a href="http://irwansulis.blogspot.com" rel="nofollow">Blogger</a> <a href="http://lapakiklangratis.com" rel="nofollow">Indonesian</a> thanksBos Informasihttps://www.blogger.com/profile/08271589637429493845noreply@blogger.comtag:blogger.com,1999:blog-5837865295676240265.post-33115907747647355232014-06-16T19:21:03.472+10:002014-06-16T19:21:03.472+10:00Nice post. I had a similar journey with decades of...Nice post. I had a similar journey with decades of C++/Java programming, then learned FP though Scala, progressed with Haskell and now looking at more advanced type systems like Idris (dependent typing) and LiquidHaskell/F* (refinement types). Now having to use C++ or Java again is physically painful because of the clumsy syntax and limited type systems when writing code in a functional style (I will never go back to the imperative/stateful style these languages encourage). My dream is to write all my code in a purely functional style, but unfortunately the software industry is really conservative and FPL are still not commonly used (even a modern software company like Google use C++/Java for most of their code which is both scary and hilarious at the same time).Jesper Nordenberghttps://www.blogger.com/profile/07589508061874776093noreply@blogger.comtag:blogger.com,1999:blog-5837865295676240265.post-23151538953081610722014-06-12T01:40:42.963+10:002014-06-12T01:40:42.963+10:00Genius!!! I teach haskell to my students (14-16 ye...Genius!!! I teach haskell to my students (14-16 years old), and I had only only only one doubt in what I was doing "I'm teaching ideas... but... the day of tomorrow they will touch the real-world and they will use python, ruby, and java... Am I doing the right thing?". Your post anwered my question, I AM DOING THE RIGHT THING, they are so young, so they will learn the rest of the thing latter, I will teach them ideas, laws, types, monoids, monads, and functors, and now I know it is so right, no dubts. Thank you for remember me what is good. I knew haskell so fast, and I "felt in love" with it too, not at first, but yes at the "second view", and then met Scala, and now I'm a student in a University here in Argentina, and I know that's the good path to follow. <br /><br />Best wishes for you my dude.Anonymoushttps://www.blogger.com/profile/05900777213852035953noreply@blogger.comtag:blogger.com,1999:blog-5837865295676240265.post-65935183197466669632014-06-11T23:07:53.032+10:002014-06-11T23:07:53.032+10:00Well thank you for reading. I totally get how some...Well thank you for reading. I totally get how some people can fear FP, especially with all the hype and math talk, but honestly it's no scarier than learning anything else. You just might need to slow down at first is all. As for the communities, I'm always reading the scala google groups, there's about 6 of them (scala-internals, scala-debate, scala-user, etc). There are great rooms on IRC, especially for beginners but I'm not really into chat, instead I am subscribed to a large number of blogs that I come across. Blogs are a great source of Scala and Haskell musings. Also reddit as well, although most of the haskell stuff on reddit goes over my head at the moment :|David Barrihttps://www.blogger.com/profile/05426582122438954031noreply@blogger.comtag:blogger.com,1999:blog-5837865295676240265.post-19265029141423677652014-06-11T23:03:25.638+10:002014-06-11T23:03:25.638+10:00Oh I'd say definitely get into FP earlier rath...Oh I'd say definitely get into FP earlier rather than later. The more OO you learn before you get into FP, the more you have to unlearn and the harder that entry will feel. If you'd like to hedge then learning both at the same time would be better than doing it sequentially.David Barrihttps://www.blogger.com/profile/05426582122438954031noreply@blogger.comtag:blogger.com,1999:blog-5837865295676240265.post-38783554918721315372014-06-11T23:00:36.755+10:002014-06-11T23:00:36.755+10:00Same here! It's amazing how much we didn't...Same here! It's amazing how much we didn't realise we didn't know. :DDavid Barrihttps://www.blogger.com/profile/05426582122438954031noreply@blogger.comtag:blogger.com,1999:blog-5837865295676240265.post-20009047199033016792014-06-11T15:28:06.747+10:002014-06-11T15:28:06.747+10:00A nice motivational post for all of us who fear fu...A nice motivational post for all of us who fear functional programming. Just one noob question. Where did u find scala or haskell community where u asked for help when u had queries. IRCs? pushkarpandey27https://www.blogger.com/profile/11046601932638523982noreply@blogger.comtag:blogger.com,1999:blog-5837865295676240265.post-24652701129089638682014-06-11T14:38:07.770+10:002014-06-11T14:38:07.770+10:00ThanksThanksJonathanhttps://www.blogger.com/profile/14458510124743863731noreply@blogger.comtag:blogger.com,1999:blog-5837865295676240265.post-56084248756716757962014-06-10T21:50:58.474+10:002014-06-10T21:50:58.474+10:00Good read.
I have been programming since i was a ...Good read.<br /><br />I have been programming since i was a kid (for about 10 years now) in assembly and C. In the last 3 years i added C++, C# to my repertoire. I have a lot more to learn though, particularly in C++. I would consider my skill level to be intermediate in C++, though maybe rough with a few of the basics. However, i have been hearing a lot about FP recently and it makes me think i should check it out. I was wondering if you think it would be better to focus on mastering C++ (OO programming) and then diving into FP, or take some time to learn functional programing first?elementalesthttps://www.blogger.com/profile/17060251455580411268noreply@blogger.comtag:blogger.com,1999:blog-5837865295676240265.post-25733953990063666822014-06-10T17:13:40.104+10:002014-06-10T17:13:40.104+10:00WL is cool (I have a license and I use it for prot...WL is cool (I have a license and I use it for prototypes) but at least in my experience it tends to be REALLY slow. For one of my most recent commercial projects I prototyped a genetic algorithm in WL and then ported to F# (which was nearly a literal translation), and went from ~5 seconds to nearly instant.Samhttps://www.blogger.com/profile/11483580642641936068noreply@blogger.comtag:blogger.com,1999:blog-5837865295676240265.post-64338829612655716222014-06-10T10:15:45.100+10:002014-06-10T10:15:45.100+10:00Yes that is a great way to describe it :-) I have ...Yes that is a great way to describe it :-) I have been programming professionally for 25+ years in C, C++ and C#. I thought I understood most things worth understanding in software development. Boy was I wrong. Haskell showed me that there is a whole new exciting world to explore :-)Morten Brodersenhttps://www.blogger.com/profile/12960208294305724095noreply@blogger.comtag:blogger.com,1999:blog-5837865295676240265.post-2298645261610243092014-06-10T10:04:46.382+10:002014-06-10T10:04:46.382+10:00There is a problem with those kind of examples: yo...There is a problem with those kind of examples: you are forced to stay within the subset of FP that makes sense for a person who only understands OO. So you are forced to show something you can already do in OO. But that is not where the real benefits are! Yes the code is typically a lot shorter in FP but that is not where the power of FP is. My breakthrough in understanding FP happened when I finally understood the problems and unbelievable complexity dealing with mutable states give you. However it is impossible in C++ or Java to NOT work with mutable state so an OO only thinking person won't be able to see examples of how it works in his/her language.Morten Brodersenhttps://www.blogger.com/profile/12960208294305724095noreply@blogger.comtag:blogger.com,1999:blog-5837865295676240265.post-41450016867211562612014-06-10T09:24:13.743+10:002014-06-10T09:24:13.743+10:00Cheers, Cowboy of Space!
I did look at Clojure ac...Cheers, Cowboy of Space!<br /><br />I did look at Clojure actually, I would've been about 2 yrs ago now. Honestly it didn't grab me. I did some exercises and they worked but for whatever reason I didn't come away convinced. Looking at it now I think I'd appreciate it much more but I wouldn't want to give up an expressive type system.<br /><br />Re literature, there's been heaps. Um, I started with "Theorems for free!" http://ttic.uchicago.edu/~dreyer/course/papers/wadler.pdf. The latest paper I read was http://www.diva-portal.org/smash/get/diva2:690270/FULLTEXT01.pdf<br />Oh actually it doesn't have to just be papers, there are some AWESOME bloggers out there, have a look at this: http://blog.higher-order.com/blog/2013/11/01/free-and-yoneda/David Barrihttps://www.blogger.com/profile/05426582122438954031noreply@blogger.comtag:blogger.com,1999:blog-5837865295676240265.post-2833656447480456752014-06-10T09:17:32.755+10:002014-06-10T09:17:32.755+10:00Ah yes, I dabbled in Clojure. Cool man, enjoy your...Ah yes, I dabbled in Clojure. Cool man, enjoy your journey!David Barrihttps://www.blogger.com/profile/05426582122438954031noreply@blogger.comtag:blogger.com,1999:blog-5837865295676240265.post-26762914047823294232014-06-10T09:16:22.400+10:002014-06-10T09:16:22.400+10:00Awesome, it's exciting, isn't it! It reign...Awesome, it's exciting, isn't it! It reignited a fire in me.David Barrihttps://www.blogger.com/profile/05426582122438954031noreply@blogger.comtag:blogger.com,1999:blog-5837865295676240265.post-20600494073216807612014-06-10T09:14:47.455+10:002014-06-10T09:14:47.455+10:00Thank you for reading and sharing!Thank you for reading and sharing!David Barrihttps://www.blogger.com/profile/05426582122438954031noreply@blogger.comtag:blogger.com,1999:blog-5837865295676240265.post-54432159873237069182014-06-10T09:14:05.721+10:002014-06-10T09:14:05.721+10:00Haha I don't think anything's wrong with y...Haha I don't think anything's wrong with you. I think everyone just needs to find the explanation or understanding that works for them. For example, I remember spending a month trying to learn these "monad" things. I must've read 30+ blog posts on it and I don't think I really got it. Then one day I saw it in use and it looked like a pipeline (like loadFile >>= fixStuff >>= saveFile or something) and I thought "gee that's concise, doesn't even need variables," and then it started making sense.<br /><br />The problem with learning on the internet is it's often hard to find stuff that makes sense when you're new to it. The people who feel monoids are an impassable wall, just take them away from the computer and ask them if they understand 4+1=5. Yes? What about 1+4=5? And 0+4+0=4? "Of course" they'll say, to which you can reply, "Great. Then you know what a monoid is." It's that simple :) The trick is then understanding what the hell 4+1+0=5 has to do with your code, and plan to write a follow up post on that.David Barrihttps://www.blogger.com/profile/05426582122438954031noreply@blogger.comtag:blogger.com,1999:blog-5837865295676240265.post-35673709328222935652014-06-10T09:00:30.721+10:002014-06-10T09:00:30.721+10:00Sure. The most recent one I read was http://www.di...Sure. The most recent one I read was http://www.diva-portal.org/smash/get/diva2:690270/FULLTEXT01.pdf<br /><br />The first one I read was<br />http://ttic.uchicago.edu/~dreyer/course/papers/wadler.pdf<br /><br />One of the ones I plan to read soon is http://www.cs.indiana.edu/~lkuper/papers/effectzoo-pldi14.pdfDavid Barrihttps://www.blogger.com/profile/05426582122438954031noreply@blogger.comtag:blogger.com,1999:blog-5837865295676240265.post-38127788429441339272014-06-10T08:56:45.088+10:002014-06-10T08:56:45.088+10:00No worries, I hear what you're saying. Actuall...No worries, I hear what you're saying. Actually I responded to this above. Please scroll up and read me reply there. Thanks!David Barrihttps://www.blogger.com/profile/05426582122438954031noreply@blogger.comtag:blogger.com,1999:blog-5837865295676240265.post-8848844590414336432014-06-10T08:52:53.850+10:002014-06-10T08:52:53.850+10:00Thank you. No, I don't think you'd have in...Thank you. No, I don't think you'd have individual tests for push/pop. If one law/property holds but you feel that things could still go wrong then that probably just means there's another property/law that you haven't expressed yet. Usually the kinds of errors for which you'd test methods individually, you can make impossible by using parametricity (eg. if pop returns an Int it could come from anywhere, needs tests; but if it returns generic-type T then there's usually only one place it could possibly come from).David Barrihttps://www.blogger.com/profile/05426582122438954031noreply@blogger.comtag:blogger.com,1999:blog-5837865295676240265.post-89448185104916568462014-06-10T08:44:56.368+10:002014-06-10T08:44:56.368+10:00Noted, friend. I will do. Thanks!Noted, friend. I will do. Thanks!David Barrihttps://www.blogger.com/profile/05426582122438954031noreply@blogger.comtag:blogger.com,1999:blog-5837865295676240265.post-12462768250455768492014-06-10T08:43:57.561+10:002014-06-10T08:43:57.561+10:00Hi. Yeah sorry for the lack of examples. I wrote w...Hi. Yeah sorry for the lack of examples. I wrote with the mindset of this-was-my-journey rather than this-is-why-you-should-change. I've got a different example (so not the endofunctor one) in my head that I'm thinking would make a good example and introduction so I'll make that it's own blog post soon.<br /><br />(FYI the endofunctor example was around text modification: trimming, making lowercase, normalising whitespace, replacing certain substrings, etc and a bunch of logic to use different subsets of these transformations depending on, whatever. Rewriting as String endofuctors, all my logic just came down to composition.)David Barrihttps://www.blogger.com/profile/05426582122438954031noreply@blogger.comtag:blogger.com,1999:blog-5837865295676240265.post-41051390675208218942014-06-10T07:59:35.750+10:002014-06-10T07:59:35.750+10:00I had the same experience with FP 6 years ago. But...I had the same experience with FP 6 years ago. But you expressed it much better than i could ever do, thank you !Van'Shttps://www.blogger.com/profile/13921826278309881415noreply@blogger.comtag:blogger.com,1999:blog-5837865295676240265.post-33265899110834430092014-06-10T07:44:47.556+10:002014-06-10T07:44:47.556+10:00So, you went from zero FP knowledge to Scala then ...So, you went from zero FP knowledge to Scala then Haskell, in just 8 months?<br />I'm impressed... Can you tell me more about your background?<br />I think that most people are just not smart enough to do the same.<br />There are a lot of programmers out there that don't know any math, and they can deal with imperative code just fine (by throwing more state at the problem until it's solved). However, endofunctors in the category of monoids are an impassable wall to them.<br />For me, learning FP (ocaml then haskell, more than ten years ago) was enlightening and enhanced my programming skills a lot (even in non-fully FP languages), but as of today I still consider it difficult to implement things using haskell.<br />Is something wrong with me?vzqhttps://www.blogger.com/profile/11555805438621899452noreply@blogger.com