Giter Site home page Giter Site logo

Comments (8)

Robert-M-Muench avatar Robert-M-Muench commented on May 15, 2024

The first part is on module scope, the second part inside a constructor. When I use auto inside the constructor it works too, but that's not what I want.

from rx.

Robert-M-Muench avatar Robert-M-Muench commented on May 15, 2024

I cross-checked the v0.10.1 and v0.11.0 and there is a big change in filter.d which leads to the problem shown.

from rx.

lempiji avatar lempiji commented on May 15, 2024

It was intentional to remove the Voldemort types in the filter, but not the side effect of changing size.
It will be related to the compiler operation, so I will examine it in detail.

By wrapping FilterObservable! XXX in Observable! T and handling it, you may be able to achieve the desired operation at the expense of a little overhead.

from rx.

Robert-M-Muench avatar Robert-M-Muench commented on May 15, 2024

So, you are going to fix this?

I don't see how I can "wrap FilterObservable! XXX in Observable! T and handling it" can you give an example?

from rx.

lempiji avatar lempiji commented on May 15, 2024

So, you are going to fix this?

I still don't know if this can be fixed. It depends on the results of the survey we are going to do.

However, there is no future to remove the declaration of FilterObservable and FilterObserver.

can you give an example?

Well, There is an example using "observableObject".

private Observable!bool _canDecrementAge;
private Observable!bool _canClear;
private Observable!string _profile;
this()
{
_name = new BehaviorSubject!string("");
_age = new BehaviorSubject!int(0);
_canDecrementAge = _age.map!(age => age > 0).distinctUntilChanged()
.observableObject!bool();
_canClear = combineLatest(_name, _age).map!(t => t[0] != "" || t[1] != 0)
.distinctUntilChanged().observableObject!bool();
_profile = combineLatest!((a, b) => formatProfile(a, b))(_name, _age).distinctUntilChanged()
.observableObject!string();
}

This is like the inputRangeObject function for the InputRange interface.

from rx.

Robert-M-Muench avatar Robert-M-Muench commented on May 15, 2024

This problem still exists, and I'm lost what to do. The example doesn't help me at all. Don't understand how it solves the problem.

I don't understand what "survey" you reference too nor this part "no future to remove the declaration of FilterObservable and FilterObserver."

from rx.

Robert-M-Muench avatar Robert-M-Muench commented on May 15, 2024

Ok, seems I somehow managed to get it to work like this:

alias typeof(windows_message_streams[WM_MOUSEMOVE].filter!(win => (win.wParam & MK_LBUTTON)).observableObject!OS_State()) WM_MOUSEMOVE_LBUTTON_TYPE;
WM_MOUSEMOVE_LBUTTON_TYPE WM_MOUSEMOVE_LBUTTON_STREAM;

WM_MOUSEMOVE_LBUTTON_STREAM = windows_message_streams[WM_MOUSEMOVE].filter!(win => (win.wParam & MK_LBUTTON)).observableObject!OS_State();

Not sure what kind of side-effect this has.

from rx.

aberba avatar aberba commented on May 15, 2024

This problem still exists, and I'm lost what to do. The example doesn't help me at all. Don't understand how it solves the problem.

I don't understand what "survey" you reference too nor this part "no future to remove the declaration of FilterObservable and FilterObserver."

I think by survey, he meant researching into the problem to see how he can solve it.

And the future word should be a feature...probably he plans to remove FilterObservable and FilterObserver in the future.

I think since he translates with Google translate, there might be loss of some context.

from rx.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.