TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: How to choose functional programming side projects?

6 pointsby CRUDmeariveralmost 9 years ago
I&#x27;ve been using functional programming languages in the workplace for about a year and a half now, first Scala and now Clojure. I am comfortable with basic FP operations (reduce, fold, map, etc) and the principles behind it, but I have yet to come across a reason to learn the more academic side of things (monads, applicative functors, currying, etc).<p>I&#x27;m trying to figure out a fun side project that will give me an opportunity to get deeper into the weeds of FP. I&#x27;m not sure whether to take a simple idea you could do in OO (i.e. a CRUD app) and do it in an FP language, or look for a problem that is more suited to the domain of FP.<p>What are the characteristics of a problem that is especially suited to FP? Or is it a pointless distinction? And how much of the theory is actually worth learning if I don&#x27;t plan on using Haskell?

5 comments

bbcbasicalmost 9 years ago
I would recommend having a look at <a href="http:&#x2F;&#x2F;haskellbook.com&#x2F;" rel="nofollow">http:&#x2F;&#x2F;haskellbook.com&#x2F;</a> which is written by someone who is seriously passionate about making Haskell understandable to regular programmers. Before writing the book he kept track of the best resources for learning Haskell but was always thinking the community needs something better for beginners. So I think it would be worth buying.<p>For parallel and concurrency programming this book is excellent <a href="http:&#x2F;&#x2F;chimera.labs.oreilly.com&#x2F;books&#x2F;1230000000929" rel="nofollow">http:&#x2F;&#x2F;chimera.labs.oreilly.com&#x2F;books&#x2F;1230000000929</a> and is free online to read. I am working through the concurrency chapters and it is blowing my mind how excellent concurrency support is in Haskell AND how someone who is smart enough to work on the GHC for 15 years can explain concurrency in a way that is accessible to someone fairly new to Haskell and concurrency. You&#x27;d probably need the grounding of haskellbook first though before reading this.<p>For a Haskell project I have decided to make a stock exchange using the concurrency I am learning from the above book. Eventually it may be good enough for someone wanting to run a bitcoin exchange or similar. Happy to have you help me if you like.<p>&gt; What are the characteristics of a problem that is especially suited to FP?<p>Really, any programming problem is suitable for FP. I think web applications and server applications are especially suited. Writing desktop applications is trickier mainly because of a lack of a really nice paradigm. The nicest thing I&#x27;ve seen so far in that respect is the Elm language - which is for the browser but the ideas could be applied to the native desktop too.<p>The classic applications for FP is compilers but Haskell is a general purpose language and ideal for producing the kind of business apps that Java&#x2F;C# is often used for.
评论 #11907725 未加载
AnimalMuppetalmost 9 years ago
To produce the benefits you want, you&#x27;re probably going to need a side project that you stick with for a while, one that pushes you to figure out how to do things that aren&#x27;t necessarily easy to do in (simple) FP. To me, the kind of side project that is likely to do that is one where <i>you care about the project</i>. Forget whether the problem is &quot;suited to FP&quot; or not. Do something you <i>want</i> to do.
eatonphilalmost 9 years ago
If you want to be boring, try writing purely functional data structures (check out Containers in the Ponyo source via ponyo.org). Otherwise, do something interesting like writing a web server from scratch or a wrapper to FastCGI. These are the kinds of things I do in every new language I want to learn (OCaml, SML, Scheme, etc.).
runT1MEalmost 9 years ago
Have you read Functional Programming in Scala?<p><a href="https:&#x2F;&#x2F;www.amazon.com&#x2F;Functional-Programming-Scala-Paul-Chiusano&#x2F;dp&#x2F;1617290653&#x2F;ref=sr_1_1?ie=UTF8&amp;qid=1465849313&amp;sr=8-1&amp;keywords=functional+programming+in+scala" rel="nofollow">https:&#x2F;&#x2F;www.amazon.com&#x2F;Functional-Programming-Scala-Paul-Chi...</a>
mericalmost 9 years ago
You could try implement monads in an OO language.