Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
Vladimir Gorej
@char0n
666.png
6 everywhere ;]
Pedr Browne
@Undistraction
Thinking it would be nice to get #348 and #349 defined and added. These little utils are really helpful avoiding silly mistakes.
Vladimir Gorej
@char0n
@Undistraction let's finish char0n/ramda-adjunct#494 and char0n/ramda-adjunct#437 to push out 2.7.0 ASAP
then we'll create a new milestone and define a feature set for next release
Pedr Browne
@Undistraction
Sorry. Going to be away from my machine until Saturday. Will get #437 finished when back.
Vladimir Gorej
@char0n
@Undistraction no problem we have all the time in the world ;]
Pedr Browne
@Undistraction
Was thinking - might be nice to write a short Medium article for each release introducing any new functions we have added. I always find the problem with libs is that you miss things that have been added. Think this is the perfect lib for a focused article per release. What do you think?
Pedr Browne
@Undistraction
@char0n I mentioned RA on the Ramda Gitter in response to a guy asking about lenses. A different guy replied with some comments about the implementation of RA.lensIso and RA.lensTraverse which you might be interested in reading and maybe responding to.
Rocky Madden
@rockymadden
He is the author of https://github.com/calmm-js/partial.lenses/. I use it all the time now, sweet little lens library.
Pedr Browne
@Undistraction
@rockymadden It does look really good. I was kind of put off by the size of the API which is probably silly, but I'll give it a serious look. You find it integrates pretty seamlessly with Ramda?
Rocky Madden
@rockymadden
As with anything, it matters what I'm doing. If the task can be most elegantly solved via a lens approach, I'll favor it. If not, yeah, I end up usually favoring Sanctuary first and then Ramda/Ramda Adjunct where possible for sure. If you look through the docs, it itself uses Ramda in examples.
I mitigate returning undefined by leveraging Sanctuary's Maybe. At times, this has been a real pro with adoption internally, because I don't have to both sell lenses and monads at the same time. After speaking with him, I see why he is doing it too.
Vladimir Gorej
@char0n
@Undistraction read it, he has interesting points. Already got in touch with him about lensTraverse. I hit the limitations of R.over/view he is describing, that is why it consumes explicitly the UNIT function. I did not want to create separate RA.view/over just for this function. Let's see what we'll come up with.
Vladimir Gorej
@char0n

@/all I've just released v2.7.0 containing 3 new utils. Great job everyone! If you have twitter and linkedin accounts please reshare this posts

https://twitter.com/vladimirgorej/status/989015824487931904
https://www.linkedin.com/feed/update/urn:li:activity:6394781213374189568/

Shane Keulen
@SeeThruHead

hey, i'm a little confused about lensISO

import * as R from 'ramda';
import qs from 'qs';

const queryString = 'foo=bar&bar=baz';

const queryStrLens = R.lens(qs.parse, qs.stringify);

const view = R.view(queryStrLens, queryString);
const modified = R.over(queryStrLens, R.assoc('bob', true), queryString);

document.getElementById("app").innerHTML = `
  ${JSON.stringify(view, null, 2)}
  ${JSON.stringify(modified, null, 2)}
`;

i'm doing a workshop at work about lenses and always assumed i could just use R.lens to make isomorphic lenses, and my testing seems to work, so what is lensISO for?

Vladimir Gorej
@char0n

@SeeThruHead pls refer to this article: https://www.linkedin.com/pulse/functional-lenses-javascript-isos-vladim%C3%ADr-gorej/

It contains the justification why it exists. The important part that your code it missing is reverting the isomorphism. When you need to reverse your isomorphism you have to create additional lens for it. RA.lensIso already knows how to do that and will create it for you. Observe

const queryStrLens = RA.lensIso(qs.parse, qs.stringify);
const queryString = 'foo=bar&bar=baz';
const parsedQueryString = qs.parse(queryString);

const view = R.view(RA.lensIso.from(queryStrLens), parsedQueryString);
Vladimir Gorej
@char0n
RA.lensIso is basically a factory for creating isomorphic lenses. You're declaratively saying that this lens is going to be isomoprhism and you get the reversion mechanism for free if you do so. That's what we try to do in Ramda-Adjunct. Create a compositions for common problems with descriptive declarative names.
Shane Keulen
@SeeThruHead
ah, thank you.
Pedr Browne
@Undistraction
@/all
Vladimir Gorej
@char0n
@SeeThruHead are you using Ramda-Adjunct at your work ?
Pedr Browne
@Undistraction
@/all We have a lot of potential features which is great, but its getting a little difficult to track. We are currently adding 'discussion' labels to new ideas and elevating then to 'feature' when we have decided they are worth adding. Can I suggest we add a new label - something like 'parked' for items we have discussed that we are still unclear about. That way we can clearly differentiate between 1. active discussions, 2. definite features 3. things we haven't rejected but aren't sure about. Obviously anything we decide is not worth adding or invalid we will close so that isn't a problem.
Pedr Browne
@Undistraction
In fact should we have a separate gitter to discuss things like this between collaborators as this is public.
Vladimir Gorej
@char0n
@Undistraction agree new labels make sense to structure the issues more. Regarding separate gitter, IMHO we are doing opensource and I'd like to keep all our discussions public and tracka-ble.
Pedr Browne
@Undistraction
@char0n Sure. Just thought it made sense to separate the admin stuff from stuff related to the API.
Vladimir Gorej
@char0n
@Undistraction the medium article about the release is a good idea. It would be great if you could do that before each release. I'll link it from my usual linkedin and twitter posts
Pedr Browne
@Undistraction
I'm happy to do this. I might try and do one for the last one, though I'm pretty busy for the next couple of weeks.
Pedr Browne
@Undistraction
@char0n What naming convention do you follow when naming lenses, views and sets? Something like:
const lAlpha = lensProp('alpha')
const getAlpha = view(lAlpha)
const setAlpha = set(lAlpha)
I can't seem to settle on a convention I'm happy with.
Vladimir Gorej
@char0n
@/all v2.8.0 is out, thank you all for contributing to RA, really great job is being done. Our download stats are going rapidly up and we are already on 3rd position when searching for ramda
@Undistraction feel free to write a medium article follow up. I've already created posts on linkedin and twitter.

@Undistraction this partially describes my lens naming conventions: https://www.linkedin.com/pulse/composing-lenses-ramda-vladim%C3%ADr-gorej/

But if I do something similar like you do in your code fragment I'm too using get and set prefixes for derived functions

Pedr Browne
@Undistraction
@char0n Thanks.
@/all I'm thinking we should reduce the number of issues. I know many are ideas and discussions, but there are still a lot. I suggest we close out anything we don't plan on actioning in the short term and make decisions about any potential features. If there are ones that we are genuinely undecided on we'll leave them open otherwise we elevate them to feature or close. What do you think?
Vladimir Gorej
@char0n
@Undistraction yep agree, I'm actually trying to find some consistent block of time to do that for a month now ;]
Vladimir Gorej
@char0n
@/all v2.9.0 is out. Thank you all for your work! https://github.com/char0n/ramda-adjunct/blob/master/CHANGELOG.md
Vladimir Gorej
@char0n
@Undistraction we're first now in npm search while searching for ramda utils. Nicely done ;]
Vladimir Gorej
@char0n

@/all milestone for next release of 2.10.0 - https://github.com/char0n/ramda-adjunct/milestone/13

Let's see what we can manage, we can operatively do some infra related issues, and we should start planning going through all the issues. I am already trying to find some block of consistent time to go through them. We can do it in async or sync mode (using this chat)

Pedr Browne
@Undistraction
@char0n Nice. I thought that would do the trick.
Vladimir Gorej
@char0n
Spent some extended time to get the greenkeeper updates in. There last for sinon that needs some additional changes in configs. After merging it we should be able to get some milestons goals done.
Vladimir Gorej
@char0n
seems like we are not in the results on https://www.npmjs.com/ when searching for ramda. Something must be wrong
Guillaume ARM
@guillaumearm

Hi guys !
Sorry for my absence lately, I recently joined the Team Station (http://getstation.com) and I had to learn typescript.
So, I did not have the time to commit on ramda-adjunct repo.

I just introduced ramda and ramda-adjunct to my team. (I'm very glad about that :D)

I would be more active on ramda-adjunct now.

Vladimir Gorej
@char0n
No problem we all have a lot oan our plates lately ;) and cogratz on new job
Vladimir Gorej
@char0n
600K downloads monthly. Congratz guys ;]
Vladimir Gorej
@char0n
almost 700K now
@/all wanted to talk to you guys about some shit that went down last month. Oracle suggested that I can work on the library during my paid work hours, but they require that I put additional Oracle copyright notice into license file or add Oracle as a contributor to README. What do you think about this ? Can having an Oracle written anywhere inside library damage the library popularity somehow ? Share your thoughts pls
Vladimir Gorej
@char0n
Pedr Browne
@Undistraction
@char0n They would be effectively sponsoring the library (with your time), so I don't see crediting them as a problem, but adding copyright? That is a potential minefield. What would the copyright notice contain?
Guillaume ARM
@guillaumearm
@char0n On the one hand I think it's good thing if you can spend more of your time on ramda-adjunct and Oracle as contributor will bring more weight to this library (I mean in term of popularity), but on the other hand, I like the fact ramda-adjunct is a small independent library, what's going to happen with this copyright ? is oracle going to become the owner of ramda-adjunct ?
What are the cons ?
Vladimir Gorej
@char0n

@Undistraction @guillaumearm I'm still in the discussion with legal, but what I know is that copyright notice will look like this in our license file: Copyright (c) 2018 Oracle and/or its affiliates along with the one that is already there. And the oracle will claim ownership of the commits I make during my employment. Technically every contributor to the library so far has right to request that we add copyright notice with his name; the author of the commits is the IP holder of the code. They can come and request removal of their code from the library too... It's perfectly within their rights. We don't use CLAs.

The question is more about do we want to have Oracle owned code inside the library ? And an explicit copyright notice in our license file ? Some companies/people will think twice before using this library if they see this notice there.