These are chat archives for ramda/ramda

24th
Jul 2015
Ben Johnson
@benfjohnson
Jul 24 2015 00:26
Hey all -- anyone know if ramda can be used commercially? Thought I saw a thread on reddit/javascript the other day where one of the authors of ramda answered in the affirmative, but then I saw this license on ramdajs.com that makes me think otherwise. Would also love feedback on whether or not the framework's enterprise-ready at present. Thanks!
David Chambers
@davidchambers
Jul 24 2015 00:29
The software itself is licensed under the MIT License (LICENSE.txt). The CC may apply to the website content rather than the Ramda source code. I’ll defer to @CrossEye on this.
What are the requirements that a project must satisfy in order to be “enterprise-ready”? I use Ramda at work, but I work at a smallish company.
Scott Sauyet
@CrossEye
Jul 24 2015 00:41
One of our core contributors is married to the artist and children's book author/illustrator J.C. Phillips. She created our logo, and licensed it under that license. Everything else is under MIT. If that logo license is a problem, we might be able to ask for a second license as well, but I've never worried about it particularly.
So yes, commercial usage is certainly fine. Ramda has just been approved at a very large, conservative financial services company.
Tobias Pflug
@gilligan
Jul 24 2015 09:08
i am planning to put it into our stack soon as well
replacing lodash
Michael Zinn
@RedNifre
Jul 24 2015 12:20
Good day.
I have a text file, a parse function String -> Stuff and a callback (err, Stuff) -> ?. When my read file function was optimistic I was doing readFile(pipe(parse, callback), filename), but I think I should change it to the classical readFile that calls the callback with (err, text). But then I can no longer pipe the parse function like that since it only takes the text parameter, not (err, text). I guess this means I need more applicatives / monads... is it possible to do this in a clean way with ramda?
Michael Zinn
@RedNifre
Jul 24 2015 12:26
Maybe I need an IO monad that handles all these (err, data) callbacks and a do-notation into which I can bind my parse :: String -> Stuff function to turn it into something that takes (err, String) -> Stuff and performs a callback? Or am I overcomplicating things?
Hardy Jones
@joneshf
Jul 24 2015 12:57
Anytime you convert to that callback style you are overcomplicating things
Hardy Jones
@joneshf
Jul 24 2015 13:03
What is usually easier to reason about is a data type that handles each computational effect separately. Common ones in this case are Either a b, Future a b, and Validation a b. You choose which one based on what you want to do.
Michael Zinn
@RedNifre
Jul 24 2015 13:23
So how to read a file and to something with the content the ramda way?
I currently have this homebrew version, can ramda simplify this? parse.event is String -> Event http://pastebin.com/j202C0Sr
Ben Johnson
@benfjohnson
Jul 24 2015 13:42
@davidchambers @CrossEye thanks for the clarification -- I'm really enjoying the library!