Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 31 2019 22:17
    CrossEye commented #2779
  • Jan 31 2019 21:04
    ArturAralin commented #2779
  • Jan 31 2019 20:08
    CrossEye commented #2779
  • Jan 31 2019 18:56
    buzzdecafe commented #2631
  • Jan 31 2019 18:09
    ArturAralin commented #2779
  • Jan 31 2019 16:18
    CrossEye commented #2779
  • Jan 31 2019 16:10
    CrossEye commented #2631
  • Jan 31 2019 16:06
    CrossEye commented #2777
  • Jan 31 2019 14:44
    ArturAralin opened #2779
  • Jan 31 2019 07:39
    inferusvv commented #2631
  • Jan 31 2019 03:07
    sespinozj commented #2771
  • Jan 31 2019 02:33
    machad0 commented #2771
  • Jan 31 2019 02:26
    JeffreyChan commented #2777
  • Jan 30 2019 14:30
    CrossEye closed #2777
  • Jan 30 2019 12:13
    vanyadymousky updated the wiki
  • Jan 30 2019 01:42
    JeffreyChan commented #2777
  • Jan 29 2019 21:06
    vanyadymousky updated the wiki
  • Jan 29 2019 16:28
    CrossEye commented #2777
  • Jan 29 2019 15:50
    mbostock commented #2772
  • Jan 29 2019 15:48
    CrossEye commented #2772
Tobias Pflug
@gilligan
best typo of the day R.pope
Denis Stoyanov
@xgrommx
Craig Dallimore
@craigdallimore
@gilligan R.pope(R.communionWith)
Tobias Pflug
@gilligan
@craigdallimore ;-}
Scott Sauyet
@CrossEye
@scott-christopher: what I'd like to see, though, is the ability to use a generator pretty much any place we'd use a list.
Our long-ago LazyList extension worked something like your code. The trouble with that approach is that you need to add to it every function you want to support. filter, find, take, etc. would all need dedicated code.
Scott Sauyet
@CrossEye
I'd prefer to have some generic way to loop and simply declare caveat emptor for cases where a user did something crazy like trying to zip an infinite generator with a finite list.
But to do this would probably involve rewriting every list function to handle a more abstract notion of itrtation. It's certainly possible, and write likely worth doing, but it's a big job.
Scott Sauyet
@CrossEye
If we were supporting es6 only, I'd happily replace our while loops with for-of ones and be done with it. But I don't see anything so convenient at the moment.
Keith Alexander
@kwijibo
would using babel to transpile down, relinquish too much control over the "actual" javascript?
Scott Sauyet
@CrossEye
I'm not sure. I'd like to see how well it might work.
Tobias Pflug
@gilligan
i'm quite happy with babel for my projects at work at least
Scott Sauyet
@CrossEye
I'm very happy with Babel for creating working code. The question, though, is how readable us the code it generates?
@CrossEye not exactly beautiful ;-)
Hardy Jones
@joneshf
@scott-christopher I don't think chain is right there.
Stefano Vozza
@svozza
the babel transpilation for for...of loops is quite ugly looking but other than that it's fine especially when the code is as vanillajs heavy as ramda is.
Hardy Jones
@joneshf
@CrossEye that's precisely what Traversable gives you. The ability to write the vast majority of iterations once and forall. If a data type has traverse, you can implement almost all of what ramda provides for arrays.
speaking ofbabel
it's kind of become the defacto for compiling js as of late
but its documentation is pretty much non-existent.
What other options are there for compiling js that have halfway decent documentation?
Tobias Pflug
@gilligan
I don't think that there is any worthwhile alternative
Well at least not that I know. Babel has a ton of support
Scott Sauyet
@CrossEye
@joneshf: of course, Iterable is similar, with some advantage of language support.
Tobias Pflug
@gilligan
evening
Scott Christopher
@scott-christopher
@joneshf What looks off about it? It seems to satisfy the monad laws: https://gist.github.com/scott-christopher/4f9ff47fee00feca88d3#file-tests-js
Brian Gates
@brian-gates
var log = function(){ console.log(arguments); };

var test = R.nAry(2, R.tap(log));

test(1,2); // expected { '0': 1, '1': 2 } got { '0': 1 }
what am I doing wrong here?
David Chambers
@davidchambers
@brian-gates, what's your high-level objective?
Brian Gates
@brian-gates
accept two params and call those into a function as an array
basically exactly my example up there
test(1,2) -> log([1, 2])
This message was deleted
David Chambers
@davidchambers
var test = R.apply(log); might be what you're after.
Brian Gates
@brian-gates
the opposite, I think
I want to convert the arguments into an array, not the other way around
but
unapply doesn't seem to do what I want either
jk it does.
I swear I tested that
my example was terrible, sorry
var log = function(){ console.log(arguments); };

var test = R.unapply(log);

test(1,2);// { '0': [ 1, 2 ] }
that's what I was going after, I'm too tired apparently
thanks :)
Fulton Byrne
@Freyert
Anyone have any recommendations for writing documentation?
David Chambers
@davidchambers
API documentation do you mean, @Freyert?
Fulton Byrne
@Freyert
Correct
David Chambers
@davidchambers
I'm pleased you got something working, @brian-gates.
Fulton Byrne
@Freyert
For instance, what is Ramda using, and would you prefer something else?