These are chat archives for ramda/ramda

21st
Jun 2015
Asaf
@asaf-romano
Jun 21 2015 06:10
At the risk of being very impolite, implying the need for another composition function, was convergeP ever discussed? Or, if [compose|pipe]P will, someday, become the default [compose|pipe], would it make sense for converge to also deal with promises?
David Chambers
@davidchambers
Jun 21 2015 06:11
That’s a good question. I haven’t yet composed promises myself, so I haven’t run into this limitation. I’d need to look at the implementation of R.composeP to see what it actually does.
Promise may actually be the problem. If one were to use a Fantasy Land -compatible Future one could use regular function composition, I believe.
Asaf
@asaf-romano
Jun 21 2015 06:15
Promises are becoming a key part of es6/7, so it's a little hard to ignore them.
David Chambers
@davidchambers
Jun 21 2015 06:15
Yeah. :|
Haha, that’s not how I imagined :| would render.
Asaf
@asaf-romano
Jun 21 2015 06:16
(async function returns a promise etc.)
It actually renders the idea quite nicely ;)
I'm having a constant problem with this pattern: http://bit.ly/1Fu0MGo
The only way to compose something like that would be with convergeP (along with some flips, I guess)
regarding fantasy-land types, they really do need better docs :-/
David Chambers
@davidchambers
Jun 21 2015 06:48
I agree.
Asaf
@asaf-romano
Jun 21 2015 07:04
how do you all get js-syntax coloring in github comments
David Chambers
@davidchambers
Jun 21 2015 07:04
```javascript
console.log('hello');
```
Asaf
@asaf-romano
Jun 21 2015 07:25
cool, thanks!
Scott Sauyet
@CrossEye
Jun 21 2015 14:17
(you can also abbreviate javascript as js in those comments)
Simon Friis Vindum
@paldepind
Jun 21 2015 14:41
@CrossEye That is nice! I didn't know.
Raine Virta
@raine
Jun 21 2015 15:24
(not in gitter though)
Scott Sauyet
@CrossEye
Jun 21 2015 15:48
It's funny that I can teach anyone anything, no matter how small, about GitHub. I still feel like such a dolt with it! :smile:
David Chambers
@davidchambers
Jun 21 2015 16:40
I don’t recall the last time you got a branch into a mess, @CrossEye. You’re levelling up!
Scott Sauyet
@CrossEye
Jun 21 2015 16:43
Just not showing off my mistakes so often.!
David Chambers
@davidchambers
Jun 21 2015 18:11
There’s so much interesting Ramda activity at the moment! I’m loving it. :smile:
Scott Sauyet
@CrossEye
Jun 21 2015 18:35
yes!
Joseph Abrahamson
@tel
Jun 21 2015 19:43
@joneshf I just tried that with some "pure profunctor" lenses: https://gist.github.com/tel/9aca29952f3d1e9d9b04
Worked pretty well!
The only sketchy bit is that I had to overload things like dimap and left for regular functions. I guess I could monkeypatch? But that seems ugly.
@davidchambers I'm interested in talking through pure profunctor lenses, too
but uh, they're a bit more heady than regular van laarhoven ones
The main reason I wrote it up is that they really show off the duality between Lens and Prism
as just arising from the duality between Meet and Join (as I call them here)
which are Product and Sum
or Tuple and Either
all depending upon your lingo
Joseph Abrahamson
@tel
Jun 21 2015 19:54
Function.prototype.dimap = function(fore, hind) { 
  var self = this; 
  return function(x) { 
    return hind(self(fore(x)))
  } 
}
petrifying
Tobias Pflug
@gilligan
Jun 21 2015 20:24
Wah.. So much going in here
Hi @tel ;)
Joseph Abrahamson
@tel
Jun 21 2015 20:38
hi :)
David Chambers
@davidchambers
Jun 21 2015 23:47
Is http://ramdajs.com down, or is the problem at my end?
Scott Christopher
@scott-christopher
Jun 21 2015 23:58
Seems to load for me.