Functional Programming

Discussion in 'Programming General' started by SuF, Jun 9, 2014.

Functional Programming
  1. Unread #1 - Jun 9, 2014 at 7:42 AM
  2. SuF
    Joined:
    Jan 21, 2007
    Posts:
    14,212
    Referrals:
    28
    Sythe Gold:
    1,234
    Discord Unique ID:
    203283096668340224
    <3 n4n0 Two Factor Authentication User Community Participant Spam Forum Participant Sythe's 10th Anniversary

    SuF Legend
    Pirate Retired Global Moderator

    Functional Programming

    I love it. Haskell is by far my favorite language. Anyone else tried it or do it?
     
  3. Unread #2 - Jun 12, 2014 at 1:18 AM
  4. Blupig
    Joined:
    Nov 23, 2006
    Posts:
    7,145
    Referrals:
    16
    Sythe Gold:
    1,609
    Discord Unique ID:
    178533992981594112
    Valentine's Singing Competition Winner Member of the Month Winner MushyMuncher Gohan has AIDS Extreme Homosex World War 3 I'm LAAAAAAAME
    Off Topic Participant

    Blupig BEEF TOILET
    $5 USD Donor

    Functional Programming

    I poked around F# a bit out of curiosity...Didn't like it. We'll be doing Haskell next year in my degree program. Not looking forward to it :p
     
  5. Unread #3 - Jun 12, 2014 at 3:57 AM
  6. Darkest Dream
    Joined:
    Jun 26, 2013
    Posts:
    7,457
    Referrals:
    1
    Sythe Gold:
    544
    Vouch Thread:
    Click Here
    Discord Unique ID:
    624783392625524785
    Sythe RSPS Player Two Factor Authentication User In Memory of Jon Christmas 2015 Doge Halloween 2013 Sythe's 10th Anniversary Off Topic Participant Gohan has AIDS
    Heidy Lawrence

    Darkest Dream I prefer to have my nightmares with open eyes.
    Darkest Dream Donor

    Functional Programming

    I had to google this, looks kind of terrible to try and lean...
     
  7. Unread #4 - Jun 12, 2014 at 6:32 AM
  8. SuF
    Joined:
    Jan 21, 2007
    Posts:
    14,212
    Referrals:
    28
    Sythe Gold:
    1,234
    Discord Unique ID:
    203283096668340224
    <3 n4n0 Two Factor Authentication User Community Participant Spam Forum Participant Sythe's 10th Anniversary

    SuF Legend
    Pirate Retired Global Moderator

    Functional Programming

    Hit me up if you need help. I hated it at first until I went back to it. You can to think about issues in a completely different way. But map and folds are fucking awesome.
     
  9. Unread #5 - Jun 14, 2014 at 2:22 AM
  10. xhulic
    Joined:
    Oct 6, 2009
    Posts:
    380
    Referrals:
    0
    Sythe Gold:
    65
    Vouch Thread:
    Click Here
    Discord Unique ID:
    615053642453483532
    Discord Username:
    spodey#0001
    Two Factor Authentication User

    xhulic Forum Addict

    Functional Programming

    Check out Clojure. Recently learnt it at my internship. Hated it first. Then found it out how amazing functional languages can be.
     
  11. Unread #6 - Jun 16, 2014 at 2:45 PM
  12. Imagine
    Joined:
    May 31, 2010
    Posts:
    3,375
    Referrals:
    4
    Sythe Gold:
    5
    Chess Master

    Imagine Grand Master

    Functional Programming

    I <3 Haskell!

    Its like writing out math!

    I thought I'd always be a Python-masterrace person, but not anymore!
     
  13. Unread #7 - Jun 16, 2014 at 6:10 PM
  14. SuF
    Joined:
    Jan 21, 2007
    Posts:
    14,212
    Referrals:
    28
    Sythe Gold:
    1,234
    Discord Unique ID:
    203283096668340224
    <3 n4n0 Two Factor Authentication User Community Participant Spam Forum Participant Sythe's 10th Anniversary

    SuF Legend
    Pirate Retired Global Moderator

    Functional Programming

    Same with me and Haskell. Hated it until I kept doing it.

    It really is. I am a Haskell master race sort of person now.
     
  15. Unread #8 - Jun 16, 2014 at 8:44 PM
  16. Imagine
    Joined:
    May 31, 2010
    Posts:
    3,375
    Referrals:
    4
    Sythe Gold:
    5
    Chess Master

    Imagine Grand Master

    Functional Programming

    It seems like a hassle to learn at first, but it really changes the way you think about stuff. Like whenever I do python now I just think "Why doesn't this have a very convenient takeWhile" etc etc.

    Also the annotations are really nice.
     
  17. Unread #9 - Jun 16, 2014 at 9:44 PM
  18. SuF
    Joined:
    Jan 21, 2007
    Posts:
    14,212
    Referrals:
    28
    Sythe Gold:
    1,234
    Discord Unique ID:
    203283096668340224
    <3 n4n0 Two Factor Authentication User Community Participant Spam Forum Participant Sythe's 10th Anniversary

    SuF Legend
    Pirate Retired Global Moderator

    Functional Programming

    Yes. It is a whole different way of looking at problems. I also hate for loops now. Iterators are also stupid. Map is the the way of the future.
     
  19. Unread #10 - Jun 17, 2014 at 2:12 AM
  20. Caseus
    Joined:
    Jun 17, 2014
    Posts:
    39
    Referrals:
    0
    Sythe Gold:
    0

    Caseus Member
    Banned

    Functional Programming

    Haskell's fun if you're good at math.
    It's just weird to me, compared to other things.
     
  21. Unread #11 - Jun 17, 2014 at 10:46 AM
  22. Imagine
    Joined:
    May 31, 2010
    Posts:
    3,375
    Referrals:
    4
    Sythe Gold:
    5
    Chess Master

    Imagine Grand Master

    Functional Programming

    >inb4 iterate is a function in haskell

    Code:
    f x 
        | even x = x/2
        | odd x = (x*3) + 1
    
    take 5 . iterate f $ 23
    lel (inb4 code doesn't work - I haven't run this).

    But yes, I agree with you.
     
  23. Unread #12 - Jun 17, 2014 at 1:17 PM
  24. SuF
    Joined:
    Jan 21, 2007
    Posts:
    14,212
    Referrals:
    28
    Sythe Gold:
    1,234
    Discord Unique ID:
    203283096668340224
    <3 n4n0 Two Factor Authentication User Community Participant Spam Forum Participant Sythe's 10th Anniversary

    SuF Legend
    Pirate Retired Global Moderator

    Functional Programming

    They have their place but I find map much more useful.
     
  25. Unread #13 - Jun 17, 2014 at 10:04 PM
  26. Imagine
    Joined:
    May 31, 2010
    Posts:
    3,375
    Referrals:
    4
    Sythe Gold:
    5
    Chess Master

    Imagine Grand Master

    Functional Programming

    yeah, me too. I really like how you can use map to construct types and currying functions etc instead of just applying a function to a list of values.
     
  27. Unread #14 - Jun 17, 2014 at 10:07 PM
  28. SuF
    Joined:
    Jan 21, 2007
    Posts:
    14,212
    Referrals:
    28
    Sythe Gold:
    1,234
    Discord Unique ID:
    203283096668340224
    <3 n4n0 Two Factor Authentication User Community Participant Spam Forum Participant Sythe's 10th Anniversary

    SuF Legend
    Pirate Retired Global Moderator

    Functional Programming

    Yea. Abstracting away what a for loop essentially does is epic. It allows you to do such powerful stuff. Monads are another great example. Abstract shit enough and it all fits a very similar mold.
     
  29. Unread #15 - Jun 23, 2014 at 12:19 AM
  30. CallMeNick
    Joined:
    Jun 23, 2014
    Posts:
    211
    Referrals:
    0
    Sythe Gold:
    2

    CallMeNick Active Member
    Banned

    Functional Programming

    I've only ever done java, js, html, php. Read of functional but never got into it
     
  31. Unread #16 - Jul 10, 2014 at 8:08 AM
  32. SuF
    Joined:
    Jan 21, 2007
    Posts:
    14,212
    Referrals:
    28
    Sythe Gold:
    1,234
    Discord Unique ID:
    203283096668340224
    <3 n4n0 Two Factor Authentication User Community Participant Spam Forum Participant Sythe's 10th Anniversary

    SuF Legend
    Pirate Retired Global Moderator

    Functional Programming

    You can use underscore.js to write JS in a more functional way.
     
  33. Unread #17 - Jul 10, 2014 at 10:32 AM
  34. Imagine
    Joined:
    May 31, 2010
    Posts:
    3,375
    Referrals:
    4
    Sythe Gold:
    5
    Chess Master

    Imagine Grand Master

    Functional Programming

    .
     
    Last edited: Aug 16, 2022
  35. Unread #18 - Jul 22, 2014 at 8:05 PM
  36. SuF
    Joined:
    Jan 21, 2007
    Posts:
    14,212
    Referrals:
    28
    Sythe Gold:
    1,234
    Discord Unique ID:
    203283096668340224
    <3 n4n0 Two Factor Authentication User Community Participant Spam Forum Participant Sythe's 10th Anniversary

    SuF Legend
    Pirate Retired Global Moderator

    Functional Programming

    I wouldn't know off the top of my head. You can look at this source: http://hackage.haskell.org/package/base-4.7.0.1/docs/src/Data-List.html#permutations

    It seems kinda ugly but that is in the GHC standard library.
     
< How to Prevent Windows From Restarting Without Your Permission | Need Help With Creating Website! >

Users viewing this thread
1 guest


 
 
Adblock breaks this site