Fork me on GitHub

@nha: yep - it's working out pretty well so far :)


An understanding of monads […]
@mccraigmccraig do you use monads anywhere in your code? simple_smile


I am asking because I spent >3 years in Scala world and even there the only guys who were using category theory in commercial projects were Haskell devs who started coding in Scala


Speaking for @mccraigmccraig. In the past he has pointed to httpurr/promesa/cats libraries from funcool ( which implement/use them


@jan.zy: all over - both front and back end, mostly as a way of sanely dealing with async and error-handling


and how do you like it? from my experience features like control over side effects, better composability etc. are counterbalanced with larger and harder to read codebase


i haven't found the codebase to be larger or harder to read - do/applicative-do (mlet/alet in cats) syntax makes things pretty easy to read... the principal problem i've had is overlooking return types and not finding out about it until runtime and getting a weird error - but i got to recognize that class of error pretty quickly


i see. problem of return types is not specific to monadic programming style so it looks like choosing this particular programming style is not a big advantage nor disadvantage simple_smile


thanks for your comments simple_smile


the big advantage for me is straightforward presentation of step-wise async code with error-handling... there are other solutions e.g. chain on manifold/deferred but i find the let style approach of do-syntax somewhat more readable and flexible, and it's certainly nice to use the same lib on both front-end and back-end


e.g. here's a function which updates an entity's unique keys in a cassandra model... it reads very straightforwardly, but each step in the mlet is an async call with early termination on error


that fn could certainly be improved some... it's an age since i wrote it, and i've learned a lot since then simple_smile


ok.. this looks nice


and I just realized that I spent lots of time coding like that in my previous language of choice 😉


was that scala ?


what brought you over to the dark^h^h^h^h untyped side ?


@mccraigmccraig: in that example, is there some error handling other than early termination going on? e.g. logging?


@jstaffans: no - i've got some plans to throw a writer in to the mix in some cases, to get some structured logging out, but i haven't implemented yet


ok. thanks for the interesting code!


@mccraigmccraig: - C++ FTW! - Java: nice, it has garbage collector so I don't have to take care of malloc. but why do I need to learn all this design patterns? and this JEE stuff.. - Scala: FP and no design patterns but after some time I started asking myself why I need types everywhere? libraries are smaller and more powerful - Clojure: FP, no design patterns, types only when I need them, libs come in even smaller packages = better composability 😉


this is a short story of my languages of choice 😉


not dissimilar to mine, though i digressed through ruby rather than scala


@jan.zy no design patterns in languages other than java? I think u misunderstand what a design pattern is. The monad is a design pattern


yeah, for Scala and Clojure I should write ‘less design patterns. good practices are enforced by better grammar of the language’ simple_smile


We're still looking for a front end developer who wants to do ClojureScript full time:


@hans: could have a chat about this during ClojureD?


@thomas: certainly. i will be there, of course simple_smile


Hey, gang! I was contacted about this job position but I’m currently engaged so he asked if I would pass it along to you lot. Here’s the description he sent me: 'I am working with a privately held 3rd Party Logistics company working on a Functional Programming (Clojure Based application) The Director of Data Sciences is a highly intelligent guy with a VERY laid back work life balance outlook. You can work remotely 100% and rarely are you tied to any type of 9-5 hours. Currently the team has a Raleigh based and a Florida based developer and they are looking to add to the team! I was curious if you, or anyone in your network might be interested in an opening like this. The base pay is targeted right around that 6-figure mark with some bonus opportunity as well!’ If you’re interested, contact Sean Devin at <mailto:[email protected]|[email protected]>.


U.S. based. Not sure if they’re accepting international candidates but it should be worth asking.