These are chat archives for ramda/ramda

10th
Dec 2015
Hardy Jones
@joneshf
Dec 10 2015 02:46
function loop() {
return loop;
}
seems pretty free of points
Tobias Pflug
@gilligan
Dec 10 2015 10:52
and arguments
;)
craigdallimore @craigdallimore jumps in. Sees Y-Combinator. Jumps out.
Scott Sauyet
@CrossEye
Dec 10 2015 15:23
And free of recursion
Tobias Pflug
@gilligan
Dec 10 2015 18:22
I just realized that R.or(a,b) is merely a || b and does thus not return true or false as stated in the documentation but a a truthy or falsy value
Scott Sauyet
@CrossEye
Dec 10 2015 18:27
@gilligan: if you want to see extended discussions about this, see #1218 and #1335. Perhaps not the most civil debates we've enter held, though.
If you pass booleans, though, you'll get a boolean.
Tobias Pflug
@gilligan
Dec 10 2015 18:52
Oh that is a lot to read
;)
I skimmed some of it
Scott Sauyet
@CrossEye
Dec 10 2015 18:53
I did say "extended". :smile:
Tobias Pflug
@gilligan
Dec 10 2015 18:54
I wonder though- i get that there was resistance against dispatching but wouldn't Boolean( a || b) have made sense?
David Chambers
@davidchambers
Dec 10 2015 19:11
I don't think Boolean(a || b) makes sense. One of the properties of (<|>) is that the return value is always one of the inputs. The operation represents a choice between two possibilities. It would not make sense for 0 <|> 1 to evaluate to True. That's my view, at any rate.
Tobias Pflug
@gilligan
Dec 10 2015 19:17
but R.or is not in fact the alternative operator
and it does not pretend to be it either
Returns true if one or both of its arguments are true. Returns false if both arguments are false.
Scott Sauyet
@CrossEye
Dec 10 2015 19:19
It wasn't about dispatching. I argued that the language's basic behavior is one of its good parts, and that keeping Ramda's behavior close to it was a good idea that didn't interfere with people who wanted to use it as a plain boolean operator.
David Chambers
@davidchambers
Dec 10 2015 19:19
Well, if we restrict outselves to Boolean logic then we should only accept Boolean arguments. The handling of non-Boolean arguments is unspecified (I would prefer to throw, but that's not the Ramda way).
Scott Sauyet
@CrossEye
Dec 10 2015 19:21
#1335 was about changing the documentation to make it look like a boolean-only function, even though it wasn't so under the covers. I wasn't in favour, but grew weary of fighting it.
Tobias Pflug
@gilligan
Dec 10 2015 19:22
to me this kind of feels like fixing a problem by pretending it does not exist
I actually just did a PR where I used R.or(a,b) to pick a or b and someone commented "hey this should not work. R.or is documented to return true or false. You should use something else and file an upstream ticket" ;)
David Chambers
@davidchambers
Dec 10 2015 19:26
S.or provides the "alternative" implementation, by the way.
Tobias Pflug
@gilligan
Dec 10 2015 19:29
interesting ;)
just figured @CrossEye is on fp slack chat as well. i wish we could have the ui of slack combined with the practicality of gitter
David Chambers
@davidchambers
Dec 10 2015 19:34
Would be nice!
Tobias Pflug
@gilligan
Dec 10 2015 19:34
@davidchambers ever been on the fpslack chat ?
David Chambers
@davidchambers
Dec 10 2015 19:35
No, I have not. My forays into the world of Slack have been limited so far. We use HipChat at Plaid. :\
Tobias Pflug
@gilligan
Dec 10 2015 19:36
never used that
David Chambers
@davidchambers
Dec 10 2015 19:37
You're not missing much.
Tobias Pflug
@gilligan
Dec 10 2015 19:37
we actually have slack at holidaycheck
quite like it
@davidchambers do you think you have time to have another look at ramda/ramda#1529 later ?
David Chambers
@davidchambers
Dec 10 2015 19:46
Once you've normalized the formatting of .eslintrc I'm happy to merge it. Thanks for all your work on this!
Tobias Pflug
@gilligan
Dec 10 2015 19:48
oh sure, i'll just run jsonlint over it :)
David Chambers
@davidchambers
Dec 10 2015 19:49
Lint the linter! :)
Tobias Pflug
@gilligan
Dec 10 2015 19:54
oh.. yeah and there was actually a dangling comma in there haha
Tobias Pflug
@gilligan
Dec 10 2015 20:04
@davidchambers fixed!
think the next PR I will try is adding jsverify tests
David Chambers
@davidchambers
Dec 10 2015 20:06
That'll be sweet!
should probably be "neutral element" not "unit element"
urghs, it is probably not that hard to write the tests in most cases but I think I will need help to designate which properties should hold for which function ;--)
Tobias Pflug
@gilligan
Dec 10 2015 20:58
I opened #1540 to ask for some input on what functions folks would like to see which properties tested for ;)
Scott Sauyet
@CrossEye
Dec 10 2015 21:37
Don't know how much I'm going to be online in the next week. Maybe more than normal, maybe lots less. Finally taking my delayed (and reduced) trip to India. Cheers!
Tobias Pflug
@gilligan
Dec 10 2015 22:03
Wow, enjoy!
Scott Sauyet
@CrossEye
Dec 10 2015 22:28
Thanks. Work, not pleasure, but I'll try.