These are chat archives for ramda/ramda

Feb 2015
Eero Saynatkari
Feb 22 2015 01:09
Full, useful examples would be handy to have. Especially considering that concepts are being applied from a static, lazy language to a dynamic and strict one.
Hardy Jones
Feb 22 2015 02:03
@CrossEye no worries, did the explanation help any? Reader is just a unary function. That's all there is to it. So anytime you'd use a unary function, you can also use Reader
The only reason it's even a thing in haskell is because of ReaderT where it's a unary function that returns an m a, whatever m might be.
and you just make Reader from ReaderT by letting m = Identity (the data type not the function).
So i dunno, it seems like you'd get more mileage out of not having Reader in ramda-fantasy than you would out of actually having it.
Hardy Jones
Feb 22 2015 02:09
This is also kind of why it's difficult to explain the usefulness of these abstractions, because they VERY general
also, the real power of Reader/ReaderT (just going to say Reader from here on) is when you use any of the Functor hierarchy instances for it.
that's where the idea of passing around an implicit argument, dependency injection or whatever else of the motivations come from for Reader
So that's one way to think about reader, is passing around an implicit read only environment
Maybe it's an object you want to grab stuff from
or maybe it's simply a number
Another way to think of it is through dependency injection
except, it can't go wrong (assuming the Reader is implemented correctly)
or Function as it may be
But again, these are just motivations, not the only things it's useful for
Scott Sauyet
Feb 22 2015 15:29
Thanks @joneshf . There's some pretty good info at too. At least it was helpful to me.
Hardy Jones
Feb 22 2015 15:33
Raine Virta
Feb 22 2015 21:41
guys, any preferred opt parse libraries for node?
Robin Lambertz
Feb 22 2015 21:42
To parse argv ? I use yargs.
Graeme Yeates
Feb 22 2015 21:45
yeah use yargs
Raine Virta
Feb 22 2015 21:47
yep. just wondering what would go well with functional style
Raine Virta
Feb 22 2015 22:21
yargs doesn't really support commands as first class citizens
sort of, but not all the way