Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    stanislasdrg
    @stanislasdrg
    @frankpepermans Thank you very much for the straightforward explanation, appreciate it.
    Byron Ferguson
    @byronferguson
    Evening all
    Dusting off a Flutter project and updating pubs
    _login
            .map<Request>(_formRequest)
            .doOnData((_) {
              _attemptLogin.sink.add(true);
            })
            .asyncMap(Auth.login)
            .doOnData((_) {
              _attemptLogin.sink.add(false);
            })
            .listen(_userAuth.sink.add);
    I can’t seem to get the latest version to execute the asyncMap()
    Frank Pepermans
    @frankpepermans
    Did the first doOnData trigger? Is Auth.login triggered?
    Frank Pepermans
    @frankpepermans
    Wheater
    @Wheater
    Not much going on in here. I'm a huge fan of RxJS and am moving over to dart to learn Flutter. I'd like to contribute in some way, is the doc a good place to start?
    Frank Pepermans
    @frankpepermans
    We can always use help :) rxdart is pretty stable currently, this channel is pretty quiet, so I assume most folks are just happy using it
    Wheater
    @Wheater
    Glad to pitch in when needed.
    Frank Pepermans
    @frankpepermans
    We're gearing up for a 1.0 release, there's a few issues on git regarding docs, or other ones
    Wheater
    @Wheater
    Awesome, I'll take a look tomorrow or Sunday hopefully.
    Frank Pepermans
    @frankpepermans
    See the current dev release, which is almost 1 to 1 with the master branch
    Wheater
    @Wheater
    What's the process to follow for PRs, fork then PR?
    Frank Pepermans
    @frankpepermans
    Yeah that's fine
    Usually @brianegan and myself review before merging, nothing special
    I guess our biggest focus is correctly informing newcomers about the differences between dart streams and observables. That remains a point of confusion for many
    Wheater
    @Wheater
    Sounds good. I am a professional dev, but new to open source, so it will take some getting used to.
    Frank Pepermans
    @frankpepermans
    No worries, we're here if you need help :)
    Wheater
    @Wheater
    Awesome! Thanks for the intro. I'll start out with docs to get familiar then move on wherever else needed :)
    Wheater
    @Wheater
    @frankpepermans which branch is the dev branch I should fork from?
    Wheater
    @Wheater
    Submitted a couple of PRs from the getting started issue set. One is a simple link change, the other is the interval operator.
    Frank Pepermans
    @frankpepermans
    Thanks! Master is the main branch
    Wheater
    @Wheater
    @frankpepermans build is passing now for the interval PR
    Wheater
    @Wheater
    @frankpepermans given my failure on the previous PR I submitted, where is a good place to get started with the next?
    Frank Pepermans
    @frankpepermans
    Not sure, we mostly act on incoming issues atm, is there anything from rxjs that you currently miss?
    Wheater
    @Wheater
    Nothing that I can tell of so far. Y'all have done a great job.
    Wheater
    @Wheater
    I will find another issue that looks interesting and work on it. I was curious about the combineLatest operator that was mentioned in: ReactiveX/rxdart#388
    If you think there is value in taking a look at that, I will work on it. It does seem nice to be able to chain combineLatest instead of using the static operators.
    Frank Pepermans
    @frankpepermans
    @Wheater sounds good, but keep in mind that the proposed extension in that issue is not good enough.
    Wheater
    @Wheater
    I will look more in-depth later. What are the known issues with it at the moment?
    Frank Pepermans
    @frankpepermans
    A stream can be single or broadcast, if we return combineLatest2 inside, then that specificity will be lost.
    ...so we need it as a transformer, I can help out tomorrow
    Wheater
    @Wheater
    I think the issue was referring to using it as an operator/transformer IIRC. I will check again later this evening.
    If I get a chance, I hope to have something out to review for tomorrow, but more likely later this week.
    Frank Pepermans
    @frankpepermans
    European timezone, so getting late here
    Sure no probs
    Wheater
    @Wheater
    Have a good evening!
    Frank Pepermans
    @frankpepermans
    U2!
    Wheater
    @Wheater
    @frankpepermans RxJS released a new creation function called "partition" which creates two observables from a true/false statement. I've been waiting for something like this for a while and think it would be a good add for RxDart. Thoughts?
    const [clicksOnH1$, clicksElsewhere$] = partition(clicks$, event => event.target.tagName === 'H1');
    Frank Pepermans
    @frankpepermans

    Yeah, was pondering about partition as well a while ago, thing is, it doesn't work out nicely without destructuring, e.g.
    final s1, s2 = stream.partition(...)

    If you yiled a List, then there is the danger of losing type safety, e.g.
    final list = stream.partition((event) => event is String);
    the List would need to be a List<Stream<dynamic>>

    Ultimately, using a new type, like Pair<S, T> could be best, to return a partition result. This object would then have 2 getters which can be typed

    (and Dart does not have destructuring, like Js does)
    Wheater
    @Wheater
    do you know if it's a planned feature?
    Frank Pepermans
    @frankpepermans
    yes, it will probably be added at some point, there is a proposal, I think they mention it in that issue
    Wheater
    @Wheater
    It would be a nice RxDart feature prior to destructuring, just with worse developer experience. It could be upgraded once destructuring is available. Though I wonder about the issue of breaking changes.
    Frank Pepermans
    @frankpepermans
    feel free to create a PR for it, or to add an issue so we can discuss it at github
    issue is probably safer
    Wheater
    @Wheater
    Sounds good
    Wheater
    @Wheater
    I submitted an issue for partition with example code. Let me know what you think.