These are chat archives for ramda/ramda

24th
Feb 2016
Richard Seldon
@arcseldon
Feb 24 2016 01:15
@kujon @CrossEye - thanks for your suggestions regarding SOF question. I updated answer to include a SortBy solution. It looks like the Sales pitch worked too :) thanks for the support all.
David Chambers
@davidchambers
Feb 24 2016 03:35
I just used map as the function argument to reduce. Am I one step closer to enlightenment?
Hardy Jones
@joneshf
Feb 24 2016 03:47
@davidchambers yes
because...
const juxt = R.flip(R.reduce(R.flip(R.map)))
or something
it's juxt day
David Chambers
@davidchambers
Feb 24 2016 03:49
:smile:
Jethro Larson
@jethrolarson
Feb 24 2016 06:01
does that mean you have recommended reading on juxt?
I have a strict one-flip rule per function
Jethro Larson
@jethrolarson
Feb 24 2016 06:17
just saw that it was added in .19
"juxt applies a list of functions to a list of values."
That doesn't exactly match the signature
[fns] -> (args...) -> [b]
Jethro Larson
@jethrolarson
Feb 24 2016 06:23
of course the variable arity stuff makes for ugly sigs
Keith Alexander
@kwijibo
Feb 24 2016 11:30
is there a way (with lens perhaps?) to go from { x: Future("abcd") } to Future({x: "abcd"}) ?
Raine Virta
@raine
Feb 24 2016 11:33
oh I found a sweet use-case for ramda-cli
parsing and filtering account transactions exported as TSV
empty fields? 'map pick-by complement is-empty'
Jakub Korzeniowski
@kujon
Feb 24 2016 11:37
@kwijibo if the object has only got one key:
R.compose(R.map(R.objOf('x')), R.prop('x'))({ x: Future("abcd") });
wait, that's wrong
*actually that's right, sorry ^^
James Forbes
@JAForbes
Feb 24 2016 11:45
@raine I need to try ramda-cli again, it wasn't working on windows when I first gave it a go, love the idea
Raine Virta
@raine
Feb 24 2016 11:46
hmm, does the concept of standard input exist on windows command line?
James Forbes
@JAForbes
Feb 24 2016 11:48
yep
Raine Virta
@raine
Feb 24 2016 11:48
what was the issue if you can recall?
James Forbes
@JAForbes
Feb 24 2016 11:49
I'm using a project called gow, which has win32 native compiled unix utils, and I've also got ubuntu dual booted, and I use the same commands interchangeably on both os's without a hitch
I can't recall, but I will give it a go tomorrow and let you know
Jakub Korzeniowski
@kujon
Feb 24 2016 11:52
@kwijibo all keys: http://goo.gl/UYatrm (using Identity so that it displays nicely)
Berry
@bberry6
Feb 24 2016 14:13
I'm a ramda noob. I have 2 objects like var ob1 = {foo: 1, bar: 2}; var ob2 = {foo:1, bar: 3}; and id like to do a shallow equals comparison of the values (from o1 to o2). I would think that eqProps would be my best bet, but im not sure how to use it
I was trying to do something like R.keys(ob1).every(R.eqProps(R.__, ob1, ob2)); but im not sure if that is how its intended to be used...
Jakub Korzeniowski
@kujon
Feb 24 2016 14:18
R.equals({foo: 1, bar: 2}, {foo: 1, bar: 2});
@ram-bot R.equals({foo: 1, bar: 2}, {foo: 1, bar: 2});
ram-bot
@ram-bot
Feb 24 2016 14:19
true
Berry
@bberry6
Feb 24 2016 14:19
haha... im dumb! ty
Scott Sauyet
@CrossEye
Feb 24 2016 14:21
But note that this is a deep equality test, not shallow. Ramda deals with value equality, not reference equality, almost everywhere.
Berry
@bberry6
Feb 24 2016 14:23
oh i see. interesting.