These are chat archives for ramda/ramda

24th
Mar 2015
Jethro Larson
@jethrolarson
Mar 24 2015 00:00
Finally! A use case that makes sense!
Ludwig Magnusson
@TheLudd
Mar 24 2015 07:09
@buzzdecafe That did work.
I also implemented a parallel ap which works with lift. Not sure it is correct according to the spec though
An it isn't pretty :P
Danny Arnold
@despairblue
Mar 24 2015 11:05
is there something like a noop function? I could use something like R.noop = R.always(undefined) for this, but I was wondering if there is already such a function.
Michael Hurley
@buzzdecafe
Mar 24 2015 11:06
ramda/ramda#701

Finally! A use case that makes sense!

:laughing: i know right? i've been waiting for this moment!

Danny Arnold
@despairblue
Mar 24 2015 11:08
:D
so, should I +1 it, or how would I go about it? ^^
Michael Hurley
@buzzdecafe
Mar 24 2015 11:10
IMO it's not gonna happen. but you can pitch it and fight for it if you want.
i get overruled often
Danny Arnold
@despairblue
Mar 24 2015 11:11
It would make sense in a cond expression IMO.
Ludwig Magnusson
@TheLudd
Mar 24 2015 11:15
noop has already been rejected AFAIK
Danny Arnold
@despairblue
Mar 24 2015 11:18
yeah, in the issue @buzzdecafe mentioned
I'm trying to figure out a way to not use it in my cond statement and thus make a use case for including it, since if I don't use it and use not, or and and for this it starts to look disgusting...gimme a minute ^^
Danny Arnold
@despairblue
Mar 24 2015 11:27
I added my use case to the issue, what do the people here think about it? Is it valid or do I overlook something?
Ludwig Magnusson
@TheLudd
Mar 24 2015 11:47
@buzzdecafe Did some more testing with commute. It breaks if the Future is rejected. What would be expected here?
correction: It breaks if at least one Future is rejected
Hardy Jones
@joneshf
Mar 24 2015 15:19
Does commute actually run in parallel?
oh, nvm I see
@TheLudd breaks how?
breaks like there's an error thrown, or breaks like it does not continue computation?
if the latter, that sounds like what should happen.
Jason Marmon
@jtmarmon
Mar 24 2015 15:31
is there an alternative to R.not as an operation on functions other than just using R.compose(R.not, func)
Raine Virta
@raine
Mar 24 2015 15:34
R.not(func)
Jason Marmon
@jtmarmon
Mar 24 2015 15:34
changed in 0.12
ramda/ramda#953
Raine Virta
@raine
Mar 24 2015 15:37
ah, i'm running old version
explains
Ludwig Magnusson
@TheLudd
Mar 24 2015 15:37
@joneshf It crashed. But now I can't seem to reproduce it, let me get back to it later if I notice the error again
Jason Marmon
@jtmarmon
Mar 24 2015 15:48
/giphy praying for 1.0
Jason Marmon
@jtmarmon
Mar 24 2015 15:57
now fearing the fact that I don't have 100% test coverage
Jethro Larson
@jethrolarson
Mar 24 2015 16:51
Is noop just R.F?
Ludwig Magnusson
@TheLudd
Mar 24 2015 17:21
No. F returns false.
Scott Sauyet
@CrossEye
Mar 24 2015 18:19
noop is R.always(undefined)
@jtmarmon's giphy: we're hoping to hit 1.0 in May or June.
Jason Marmon
@jtmarmon
Mar 24 2015 18:28
awesome. where are we celebrating?
Scott Sauyet
@CrossEye
Mar 24 2015 18:28
Wherever there are functions!
Jason Marmon
@jtmarmon
Mar 24 2015 18:29
cop out :laughing:
i'm having a party with or without yall in nyc
for real though are there Ramda meetups? there should be
Scott Sauyet
@CrossEye
Mar 24 2015 18:30
no ones organized those yet, so far as I know.
Jason Marmon
@jtmarmon
Mar 24 2015 18:30
I could probably throw one together if enough people are interested in being in the big apple
Scott Sauyet
@CrossEye
Mar 24 2015 18:32
I'm several hours from NYC, but I might consider one around the 1.0 timeframe. Let's worry about it as we get closer to the release.
Jason Marmon
@jtmarmon
Mar 24 2015 18:32
sounds like a plan
Raine Virta
@raine
Mar 24 2015 18:37
ramda meet up sounds great. let's have it in sweden. about time i visited stockholm again 😜
Danny Arnold
@despairblue
Mar 24 2015 18:43
well, I'm all for berlin :P
Ludwig Magnusson
@TheLudd
Mar 24 2015 19:21
First ramda conference ever. I'll go if it is in Stockholm :D
Walle Cyril
@GrosSacASac
Mar 24 2015 20:18
luxembourg
or Trier
Michael Hurley
@buzzdecafe
Mar 24 2015 21:01
RamdaConf: Tahiti please
Kyle J. Kress
@toastal
Mar 24 2015 22:44
Hey all. I'm using Ramda in a project and I have a general FP question.
split(prop('slug'), prop('link'))(head(stories))
I'm trying to get story.slug, story.link into split() but I'm unsure how to do that.
Raine Virta
@raine
Mar 24 2015 22:52
is forEach against Ramda's side effect principles?
Michael Hurley
@buzzdecafe
Mar 24 2015 22:54
forEach was added reluctantly
but it's there to enable working with things like the DOM
@toastal can you give more info about what is the input, and what exactly should the output be
Kyle J. Kress
@toastal
Mar 24 2015 23:01
stories is a list of story type. story type is an Object mostly with properties of type String. both slug and link are of type String.
Kyle J. Kress
@toastal
Mar 24 2015 23:06
the split() is a part of a long composition that I'm looking to have curried
Michael Hurley
@buzzdecafe
Mar 24 2015 23:07
so if i pass in a story {link: 'a-b', slug:'-'} do you want to get out ['a', 'b']?
Kyle J. Kress
@toastal
Mar 24 2015 23:07
yes :)
Michael Hurley
@buzzdecafe
Mar 24 2015 23:08
gotcha
This message was deleted
that didn't work ....
Kyle J. Kress
@toastal
Mar 24 2015 23:14
nope... I've still got my FP training wheels on so I'm trying to stay as higher-order as possible
Michael Hurley
@buzzdecafe
Mar 24 2015 23:15
function ss(s) {
  return R.split(s.slug, s.link);
}
of course, but you are looking for a point-free solution?
Kyle J. Kress
@toastal
Mar 24 2015 23:15
define point-free??
Michael Hurley
@buzzdecafe
Mar 24 2015 23:16
creating a function without reference to its arguments (points)
Kyle J. Kress
@toastal
Mar 24 2015 23:16
exactly
the ap() of() solution was attempting to partially apply?
Michael Hurley
@buzzdecafe
Mar 24 2015 23:18
yes, tried to go point-free extemperaneously
Kyle J. Kress
@toastal
Mar 24 2015 23:19
on a positive note... the solution you DID supply worked :)
This message was deleted
Michael Hurley
@buzzdecafe
Mar 24 2015 23:24
var s = {
  link: 'a.b.c',
  slug: '.'
};

f = R.compose(R.apply(R.split), R.ap([R.prop('slug'), R.prop('link')]), R.of);

f(s)
i might just use the lambda there. it's a lot simpler
Kyle J. Kress
@toastal
Mar 24 2015 23:26
And on another side note: my pull request to the Wappalyzer browser plugin now shows Ramda as a JS lib on the current release as of a couple days ago. I was super excited about the transducers pull request in 0.12 and I try to convince my coworkers of the merits Ramda over lodash. You guys rock for this library!
Ah. That composition was where my head was trying to go to. I agree though... the lambda is more concise and easier to grok
Michael Hurley
@buzzdecafe
Mar 24 2015 23:28
Wappalyzer -- haven't heard of that one, thanks for submitting the PR
"No data available at this time."
Kyle J. Kress
@toastal
Mar 24 2015 23:30
Yeah they've not had time to get any data yet since it was like 2 days ago.
I also pushed in Elm + Haskell, Snap, Yesod + Erlang, Cowboy :)
Raine Virta
@raine
Mar 24 2015 23:49
if you remember my question about templating libraries, i ended up using jade with some hyperscript