Integrated Dynamics

Integrated Dynamics

63M Downloads

Resource for learning the programming concepts?

Demolishun opened this issue · 2 comments

commented

Issue type:

  • ❓ Question

Question:

I have a background in C++ and other languages. I have been trying to learn Functional Programming (FP) concepts in C++ and have been introduced to Haskel. I see that Integrated Dynamics (ID) is taking a functional approach to programming. I also see what looks like a Haskel influence? Is there any kind of documentation anywhere that could show the programming concepts used in ID and how they match up with FP languages? I was struggling with taking a list, checking if the items in the list had a name that included some text, and then using that comparison to define which items stay in the list. I ended up doing this ItemList mapped by uniqueName, StringList filtered by name contains "string", StringList converted to list with items from unique names. Needless to say there had to be a simpler way. I think I found that I need to tank my uniqueName operator and use the . to put this as the first param of my string contains operator, then the string. I found this on some obscure post on the Minecraft channel in reddit.

Anyway, awesome mod. Helping me understand FP better.

To reiterate the question:
Is there any kind of documentation anywhere that could show the programming concepts used in ID and how they match up with FP languages? A one to one of Haskel would be awesome!

commented
  1. Come join Discord! We have a good community there https://discordapp.com/channels/386052815128100865/386054223688630272 . Pinned messages have a few links (a minute of a shameless self-PR)
  2. InDy mostly follows point-free programming style. https://wiki.haskell.org/Pointfree
  3. Point-free takes a significant mind effort to learn. It is really alien to stop thinking about function arguments (int x, char z) and start thinking in functions ( (>) 10), (== 4), (+1), if-then-else, map, etc). I can't recommend specific resources but I would suggest to start with normal Haskell (which has arguments and their names) and only then jump to poiint-free. Look up some quick start on google, ignoring most things except function declarations and type system.
  4. After you can somewhat read standard Haskell, try playing with http://pointfree.io/ . The results are not always human-readable but it can give you some guidance.
  5. Last but not least, C++ (especially C++11 and above) has some functional programming as well! Std headers <algorithm> and <functional> are perfect examples.
commented

@Yogghy Yeah, I am learning some of the C++ FP stuff now. I found some links to Haskel to start learning it a bit better. Thanks for the info on point free. My biggest hold back has been the seeming inversion of logic when thinking functionally. Its like twisting my brain inside out.