These are chat archives for ReactiveX/RxJava

13th
Jul 2017
Stephen Berger
@GettingNifty
Jul 13 2017 04:20
I'm confused
Stephen Berger
@GettingNifty
Jul 13 2017 04:30
I think you need to schedule it or exit somehow
var source = Observable.Interval(TimeSpan.FromSeconds(0.1)).Take(10);
''var group = source.GroupBy(i => i % 3);
group.SelectMany(
grp =>
grp.Max()
.Select(value => new { grp.Key, value }))
.Dump("group");''
::hh::
How do u format
Yannick Lecaillez
@ylecaillez
Jul 13 2017 09:36

This is how i'm able to produce an OOME:

```java

Flowable.range(2, 200_000_000)
                .groupBy(e -> {
                    // First 100 000 000 in different group
                    if (e < 100_000_000) {
                        return e;
                    }
                    // Last 100 000 000 in the same group
                    return 1;
                })
                .subscribe(g -> {
                    if (g.getKey() == 1) {
                        g.subscribe(TestSubscriber.create(0));
                    } else {
                        g.subscribe(new DefaultSubscriber<Integer>() {
                            @Override
                            public void onNext(Integer t) {
                                if (t.intValue() % 100_000 == 0) {
                                    System.out.println("Received: " + t);
                                }
                                Schedulers.computation().scheduleDirect(this::cancel);
                            }

                            @Override
                            public void onError(Throwable t) {
                            }

                            @Override
                            public void onComplete() {
                            }
                        });
                    }
                });
You have to be patient but when 100.000.000 is reached, the following 100.000.000 will be queued internally by groupBy() because of the double request() bug (?)
Hope that helps.
Stephen Berger
@GettingNifty
Jul 13 2017 17:14
Can u email me that last piece of code
I need it for a scenegraph implementation
@ylecaillez
Stephen Berger
@GettingNifty
Jul 13 2017 17:23
I'm trying to move the body parts and it uses keys I need it for reference
Stephen Berger
@GettingNifty
Jul 13 2017 22:26
''' var taco= new Taco();'''
'''
'''
'''code'''
Ohhh
var code
Dorus
@Dorus
Jul 13 2017 22:29
Try:
```Java
code
```
Stephen Berger
@GettingNifty
Jul 13 2017 22:29
java code
I'm on mobile how do I line break
Dorus
@Dorus
Jul 13 2017 22:29
ctrl+\ or the button on the right on desktop. Not sure about mobile
Stephen Berger
@GettingNifty
Jul 13 2017 22:30
java \ code
Hmm idk
Dorus
@Dorus
Jul 13 2017 22:31
I think it's not possible. You could write your text somewhere else and copy-paste it?
That might work
Stephen Berger
@GettingNifty
Jul 13 2017 22:31
Ahh
Code
Hey
Dorus
@Dorus
Jul 13 2017 22:33
:+1:
Stephen Berger
@GettingNifty
Jul 13 2017 22:34
help
No boots
\help
Gitterbot helps kinda spammy but fun
I wish I could get the one from gamedev
Josh from undead labs knows the guy
Stephen Berger
@GettingNifty
Jul 13 2017 22:40
It can solve sentences and derivations and post images