These are chat archives for ramda/ramda

8th
Sep 2015
Gas Creature
@GasCreature
Sep 08 2015 05:14
Hi. Just starting with Ramda and hitting a wall. With the expression
R.map(item => item.quantity * item.price)(lineItems)
Nodejs complains about the => so I'm wondering, do I have to run the code through a transpiler?
David Chambers
@davidchambers
Sep 08 2015 05:15
Are you using Node? If so, which version?
Gas Creature
@GasCreature
Sep 08 2015 05:16
Nodejs v0.12.4 on the Mac
David Chambers
@davidchambers
Sep 08 2015 05:16
You may need node --harmony foo.js rather than node foo.js.
Gas Creature
@GasCreature
Sep 08 2015 05:16
--harmony brings in ES6 features?
David Chambers
@davidchambers
Sep 08 2015 05:16
That’s right. Some of them, at least.
Gas Creature
@GasCreature
Sep 08 2015 05:17
Fixed! Thanks, David.
David Chambers
@davidchambers
Sep 08 2015 05:17
No problem! Welcome to the Ramda community. :)
Gas Creature
@GasCreature
Sep 08 2015 05:18
Looking forward to
That was a curried expression ;)
David Chambers
@davidchambers
Sep 08 2015 05:18
I’m awaiting the second argument.
hemanth.hm
@hemanth
Sep 08 2015 08:14
reading the docs, in search of MayBe
Raine Virta
@raine
Sep 08 2015 08:25
const reduce1 = curry((fn, arr) =>
  reduce(fn, head(arr), tail(arr)));

const maximumBy = useWith(reduce1, maxBy, identity);
Raine Virta
@raine
Sep 08 2015 08:35
@hemanth MayBe?
Alex Schenkman
@alesch
Sep 08 2015 09:12
Folks, do I still need Immutable.js if using ramda?
or phrased differently: how do I achieve immutable collections with rambda?
Thanks!
Raine Virta
@raine
Sep 08 2015 09:19
@alesch what problem are you trying to solve with immutable collections?
Alex Schenkman
@alesch
Sep 08 2015 09:34
@raine I’m using React, and was looking into using Immutable.js.
Scott Sauyet
@CrossEye
Sep 08 2015 11:10
Ramda does not do what mori or Immutable do, offering actual immutable collections. But Ramda will not mutate your data. Ever.
So depending on exactly what you want to do, Ramda may already help you with it.
Raine Virta
@raine
Sep 08 2015 11:16
Alex Schenkman
@alesch
Sep 08 2015 11:41
@CrossEye as this project would be within a team of non-functional programmers, I guess enforcing immutability would be a requirement.
Scott Sauyet
@CrossEye
Sep 08 2015 12:22
@raine 3, then 1, then 2. Functions of many parameters scare me. But explicit is still better than implicit.
@alesch: I haven't really used Immutable, so I don't know how much it changes your normal use of the language. We are giving some consideration to making Ramda integrate better with Immutable, but it's not clear how seamless that will ever become.
Alex Schenkman
@alesch
Sep 08 2015 17:15
@CrossEye There is mori also out there.
Scott Sauyet
@CrossEye
Sep 08 2015 17:17
@alesch: mori's design is much closer to Ramda's functional api, but, paradoxically, that makes it almost impossible for us to offer the same sort of integration.
Stefano Vozza
@svozza
Sep 08 2015 19:44
yay, node v4 released today
David Chambers
@davidchambers
Sep 08 2015 20:04
What do you mean, @svozza?
Sergey Rubanov
@chicoxyzzy
Sep 08 2015 20:04
node.js v4.0
David Chambers
@davidchambers
Sep 08 2015 20:05
Oh I see!
Stefano Vozza
@svozza
Sep 08 2015 20:22
arrow functions ftw!
Raine Virta
@raine
Sep 08 2015 20:26
without harmony flags?
Stefano Vozza
@svozza
Sep 08 2015 20:40
yup