These are chat archives for ramda/ramda

13th
May 2016
Emilio Srougo
@Emilios1995
May 13 2016 04:15
Hi, I have a question about currying and pointfree in Ramda
var setSelected = map(assoc('selected', ifElse(equals(prop('id'), 22), true, false)))
How can I make that function work while keeping it point free?
It should take an array of objects and set the object's property 'selected' if its 'id' equals 22
Lewis
@6ewis
May 13 2016 04:29
@Emilios1995


const dataSource = [{id: 1, language: 'Clojure'}, 
                   {id: 22, language: 'Ruby'},
                   {id: 43, language: 'javascript'}];

const setSelectedProperty =
  R.when(R.propEq('id', 22), R.assoc('selected', "set!"));

R.map(setSelectedProperty, dataSource);
Emilio Srougo
@Emilios1995
May 13 2016 04:42
that was smart @6ewis . Thanks!
Chris Maloney
@Klortho
May 13 2016 07:29
ramda on npm doesn't have any dependencies that are native, does it? I just tried installing on my mac, and had some node-gyp problems.
Jose Luis
@josete89
May 13 2016 07:57
Hi @Klortho Coudl you check your xcode version?
Scott Christopher
@scott-christopher
May 13 2016 09:27
@Klortho Ramda has no runtime dependencies. https://github.com/ramda/ramda/blob/master/package.json#L51
Chris Maloney
@Klortho
May 13 2016 09:41
I just upgraded to el capitan, must have been a glitch. Thanks, I am reassured.
Lewis
@6ewis
May 13 2016 11:56
@Emilios1995 you're welcome
Lewis
@6ewis
May 13 2016 15:15
does anyone use immutable.js (or similar) in conjunction with Ramda for performance?
Lewis
@6ewis
May 13 2016 15:30
I noticed that it tends to be slow on fridays
Brad Compton (he/him)
@Bradcomp
May 13 2016 15:30
@6ewis Immutable or the gitter? ;)
I've used immutable for one project on the back end for a data processing thing.
Lewis
@6ewis
May 13 2016 15:57
@Bradcomp the gitter tends to be slow on fridays =)
@Bradcomp I was randomly wondering why Ramda doesn't add performance as a focus so we won't have to use yet again another tool like immutable.js
Vladimir Starkov
@iamstarkov
May 13 2016 16:28
Ramda' slowness is also
Bothering me for a while
David Chambers
@davidchambers
May 13 2016 16:54
You think Ramda is slow? Try Sanctuary. ;)
Muuuch slooower.
Denis Stoyanov
@xgrommx
May 13 2016 16:55
lazy.js incredible fast!
Brad Compton (he/him)
@Bradcomp
May 13 2016 16:57
@davidchambers is the unchecked version of Sanctuary also much slower than Ramda?
David Chambers
@davidchambers
May 13 2016 16:58
Probably not.
At some I'll make a concerted effort to reduce the cost of the type checking. Turning off type checking in production defeats the point, to a large extent. Currently it's necessary due to the performance impact.
Stefano Vozza
@svozza
May 13 2016 22:09
i'd say the unchecked version is actually really fast because it doesn't deal with variable arity functions or defending against bad input types but obviously that makes the functions more brittle.