Fork me on GitHub
#off-topic
<
2018-02-28
>
sophiago03:02:15

Just stumbled upon this Haskell discussion... Frankly, I would recommend against LYAH. Imo, the best books are Graham Hutton's Programming in Haskell and _Haskell Programming from First Principles (http://haskellbook.com/). Both will cover Applicatives since as of 2014 they're a superset of Monads, whereas LYAH doesn't discuss them at all.

sophiago04:02:53

As for Applicatives, the type f (a -> b) -> f a -> f b means it takes two arguments (since Haskell is curried): a (higher order) function that f with input of a function from type variables a -> b and the same function f applied to an input of type a. It then returns an application of f to an input of type b. The most obvious example is fmap, which is a lot like Clojure's map but polymorphic in its return values. If you just apply the identity function to the function passed to it using Applicative's pure, which is defined as pure id <*> v = v , then you get fmap f x = pure f <*> x. I'm sure this sounds unnecessarily obfuscated, but it makes more sense if you know some common monad instances in which case you sometimes use the Applicative version instead and get a nice statically analyzable function.

sophiago04:02:25

For example, pure is the same as return in the Monad typeclass and <*> is the same as Monad's ap: ap :: (Monad m) => m (a -> b) -> m a -> m b (the part before => is a constraint, i.e. the type variable m must be an instance of Monad.

chrisblom10:02:49

you use f for both the function and the Applicative typeclass variable, which is super confusing IMO

borkdude12:02:29

@sophiago LYAH has a chapter on applicative functors

blueberry12:02:42

LYAH was a fantastic read IMHO, and a very approachable introduction to functors, applicatives, and monads.

borkdude13:02:51

I liked it too. I read LYAH and HaskellBook (both not 100% yet), but I like both.

roberto14:02:11

Brian Londsorf has a free course in Egghead about these concepts using JS. I learned a lot from that. And he talked about them in a practical context, and not just abstract math.

roberto14:02:41

yeah, thats his book too

roberto14:02:42

really good

qqq15:02:00

@blueberry: is there support for cublas from clojurecuda in the pipelines ?

jonathan18:02:20

Has anyone taken a look a Flutter (Google new Android/iOS UI framework using Dart)? I haven't done any sort of mobile app development (outside of higher level frameworks like ionic). Does Clojure have any future on mobile?

fellshard21:02:25

Didn't Clarity end up going dark?

fellshard21:02:49

It's no longer in their Greenhouse, I guess. Never mind, I'm blind.