These are chat archives for ramda/ramda

10th
Feb 2016
Julien Goux
@jgoux
Feb 10 2016 09:10
Hello
Is there any difference between using Data.Task vs Ramda fantasy's Future ?
Why choose one over the other ?
Keith Alexander
@kwijibo
Feb 10 2016 12:04
@jgoux this might help a bit :point_up: January 26, 2016 1:02 PM
Keith Alexander
@kwijibo
Feb 10 2016 12:22
@jgoux another difference might be that you can require('data.task') on its own, whereas Future comes with all the other Ramda fantasy types
so if you want modularity vs a convenient collection of types
Julien Goux
@jgoux
Feb 10 2016 12:38
@kwijibo Cool ! :)
@kwijibo I don't mind about the modularity as it's for node.js purpose :)
Martin Broder
@mrtnbroder
Feb 10 2016 15:22
hm
Jethro Larson
@jethrolarson
Feb 10 2016 22:08
Folktale is probably more battle-hardened.
I'm not sure I'd recommend ramda-fantasy for prod work
Scott Christopher
@scott-christopher
Feb 10 2016 22:17
@jethrolarson Is there anything in particular that makes you say that?
Jethro Larson
@jethrolarson
Feb 10 2016 22:26
Documentation is probably the first one that comes to mind. I know that there's been a dramatic improvement to RF's recently but it is recent.
Also, has RF really settled down yet?
Scott Christopher
@scott-christopher
Feb 10 2016 22:27
There isn't a whole lot of change going on with it.
Jethro Larson
@jethrolarson
Feb 10 2016 22:28
Is that because it's settled or just low pulse?
Scott Christopher
@scott-christopher
Feb 10 2016 22:28
Well there's arguably less that needs to change with the datatypes.
They implement a fairly standardised set of specs.
Assuming those specs are upheld, the API is pretty stable
Jethro Larson
@jethrolarson
Feb 10 2016 22:35
RF doesn't have hawt site tho =P http://folktalejs.org/
Scott Christopher
@scott-christopher
Feb 10 2016 22:39
That is true :)
Don't think my awesome CSS-foo could help much on that front :D
Tobias Pflug
@gilligan
Feb 10 2016 23:01
Evening @scott-christopher aka mr profunctor ;)
Scott Christopher
@scott-christopher
Feb 10 2016 23:07
Haha. Morning @gilligan :)
Tobias Pflug
@gilligan
Feb 10 2016 23:12
how's it going ?
Scott Christopher
@scott-christopher
Feb 10 2016 23:13
Keeping busy, trying to juggle too many projects.
Tobias Pflug
@gilligan
Feb 10 2016 23:14
hah, yeah
i have to close that PR with jsverify tests for Ramda that I opened ages ago.. never got around to continue with it
or i need to start another one with a smaller scope
open end property tests for everything is just way too huge a task
Scott Christopher
@scott-christopher
Feb 10 2016 23:16
Yeah, might be good to pick a few good candidates to start with.
Tobias Pflug
@gilligan
Feb 10 2016 23:16
maybe i should look at some of the tests that you did in your PR - i found it hard to do meaningful tests for relatively simple functions.. not to mention something like R.lens
even like map seemed tricky to do in a way that it really covers a meaningful portion of your possible (co)-domains
Scott Christopher
@scott-christopher
Feb 10 2016 23:18
I find it helps to think in terms of what you want to say is upheld "for all" of a given type, and then work backwards to generate arbitrary values for those types
But some things are just quite difficult to test with property-based tests
Especially around some business logic, I'll find myself starting to reimplement the logic in the test.
Tobias Pflug
@gilligan
Feb 10 2016 23:21
nod.
Scott Christopher
@scott-christopher
Feb 10 2016 23:21
At which point you need to evaluate whether you're approaching your tests wrong, or whether the implementation can be refactored in a way that can better hold up to property testing.
Or whether a traditional test is simply more appropriate
Tobias Pflug
@gilligan
Feb 10 2016 23:22
yeah that might just be totally valid
in some cases i realised which property tests would make sense after writing unit tests
plus I prefer a combination of unit tests plus property tests anyway
well written unit tests just do a pretty good job at documenting what your function does while property tests are arguably better at guaranteeing that your code behaves according to the rules you laid out
that is my impression at least
Scott Christopher
@scott-christopher
Feb 10 2016 23:43
Regular unit tests definitely help with providing example use cases.