These are chat archives for ramda/ramda

27th
Mar 2016
Jonah
@jonahx
Mar 27 2016 00:05
@buzzdecafe yeah i assumed so :) but in a world where setoids are real, you never know...
James Forbes
@JAForbes
Mar 27 2016 00:15
@ashnur np, it's a great video! :)
Aldwin Vlasblom
@Avaq
Mar 27 2016 12:27
I just released Fluture@0.6.0-beta1 which introduces a system for automatic resource disposal and Future cancellation inspired by the API in @rpominov/basic-streams and completely optional to use. I intend to battle-test it a bit before taking it out of beta, and I'd love to know what you guys think.
Jonah
@jonahx
Mar 27 2016 14:41
@Avaq In general, how safe /battle tested is Fluture compared with data.Future?
Aldwin Vlasblom
@Avaq
Mar 27 2016 14:52

@jonahx data.task has been around a lot longer, and is part of Folktale, which sees a lot more use than Fluture. I can tell you straight off the bat data.task is more battle tested. I can tell you, however, that Fluture has seen extensive use in several applications that I work on personally. One of which is a web-crawler which is actively crawling about 90000 (and growing) URLs a day, and it uses Fluture as its only abstraction for asynchronous control flow. This application makes extensive use of all of the control flow helpers offered by Fluture. We closely monitor the memory footprint of the application, which has only really gone down since we switched from Ramda Fantasy to Fluture.

I've just now been working on putting the cancellation feature to use, and replacing some hacky code which dealt with that before, and it seems to be working like a charm in my local testing environment. I'll be testing it on a staging environment tomorrow at work.

Fluture also sees pretty extensive unit testing, both from its own unit tests, but also indirectly from the many other unit tests that live throughout the applications I'm using it in.
Aldwin Vlasblom
@Avaq
Mar 27 2016 15:04
The reason Fluture is not using the full semver version-space yet (0.x) is not because I don't consider it production-ready. It's because of stuff like Avaq/Fluture#3 which might make small changes to the API. I think I'll release 1.0.0 once the profunctor API has been decided upon, from there on out, API changes will not be likely.
Roman Pominov
@rpominov
Mar 27 2016 16:19
Are there any FL traversables available in http://ramdajs.com/repl/ ?
@Avaq Looks great, I always wanted a Future/Task with such API :+1:
Jonah
@jonahx
Mar 27 2016 17:10
@Avaq, thanks for the honest and detailed answer. appreciate it.
Jonah
@jonahx
Mar 27 2016 19:12

I’m missing something simple here, can anyone tell me what it is:

f1 = Failure(['test 1'])
f2 = Failure(['test 2'])

sequence(Validation.of, [f1, f2])

// ERROR:
// return this.Success(a)
//               ^

// TypeError: this.Success is not a function
//     at Validation.of (node_modules/data.validation/lib/validation.js:141:15)

I’m just trying to collect failures….

Aldwin Vlasblom
@Avaq
Mar 27 2016 20:09
@jonahx It seems, to my surprise, like Validation.of needs to be bound to Validation: sequence(Validation.of.bind(Validation), [f1, f2])
Hardy Jones
@joneshf
Mar 27 2016 20:28
whoa
that looks unfortunate
wonder why this line is not Validation.Success(a)?
In any case, you should be able to say sequence(Validation.Success, [f1, f2]) yeah?
Raine Revere
@raineorshine
Mar 27 2016 20:34
Is there a better way to write (a,b) => R.equals(f(a), f(b))? (i.e. compose across all arguments)
Hardy Jones
@joneshf
Mar 27 2016 20:38
@metaraine (a,b) => R.equals(f(a), f(b)) == R.eqBy(f).
Raine Revere
@raineorshine
Mar 27 2016 20:38
Beauty
David Chambers
@davidchambers
Mar 27 2016 23:12
@joneshf, see folktale/data.validation#11.
Jonah
@jonahx
Mar 27 2016 23:21
@Avaq @joneshf Sadly neither Validation.Success nor Validation.of.bind(Validation) fixes it for me.
@davidchambers Do you know if that fix is slated to be merged in soon? Do you recommend I just pull my install directly from the patch branch?
David Chambers
@davidchambers
Mar 27 2016 23:22
I don't know, I'm sorry.
Jonah
@jonahx
Mar 27 2016 23:22
@davidchambers Or perhaps use a different validation library?
What are you using?
David Chambers
@davidchambers
Mar 27 2016 23:23

I recommend adding a :+1: to the pull request.

I would like to add a Validation type to Sanctuary, but that's probably a couple of months away.

Jonah
@jonahx
Mar 27 2016 23:30
+1’d. any thoughts on monet’s validation?
David Chambers
@davidchambers
Mar 27 2016 23:30
I haven't used it. If you try it, please let me know what you think of it.
Jonah
@jonahx
Mar 27 2016 23:31
cool, i will. i guess you haven’t used bilby’s either?
David Chambers
@davidchambers
Mar 27 2016 23:32
Correct. In fact, it would be great to see a comparison of the various options to highlight the differences between them.
Jonah
@jonahx
Mar 27 2016 23:45
Yeah. And yet another option would be to just use Either (from folktale or somewhere else) possible wrapping it to get the validation semantics