Comments (7)
@JakeGinnivan I read your blog post about bringing Rx into this project and I agree having a mutable message passing through the stream is far from ideal and is best avoided.
I have prototyped a working solution where the message is immutable on a standalone project just so I could try out. Also I managed to reduce the amount of code required by a fair degree.
I hope you are happy for me to take ownership of the issue. If so I will try and get it done very soon.
from carnac.
Hey @RolandPheasant
Would love to see what you are doing, I know @LeeCampbell has been working on this as well at #91
from carnac.
It is a bit radical. The concept is to create an intermediate object to handle the key press collations (as you suggested above). Then each change produces a new message which is a new object - an update which replaces the old item in the collection. This enables me to make KeysController a single line of code. I will try and get it done over the weekend then invite you to look at my branch. if you like it only then will I do a PR
from carnac.
@RolandPheasant, have you reviewed the #91 Refactor PR? It sounds like you are requesting something very similar to what I have already done. Just waiting on an approver to accept the PR (or reject with reasons!) cough cough.
from carnac.
@LeeCampbell just reviewed your code. I like it. Your solution is conceptually 80% the same as mine and I see you have been very thorough and paid excellent attention to detail. The main difference between our ideas is I used immutable intermediate objects to collate / aggregate the key presses leaving the resulting message as a simple state container with no logic.
Also in my PoC solution I added another layer which simplified the KeysController to a single line but that single line does not quite work with your solution. Anyway, before I jump in, I will wait first to see whether your changes are accepted. But whether they are or not I have enjoyed studying your solution.
from carnac.
@RolandPheasant have merged @LeeCampbell's PR, feel free to build on that then submit another PR
from carnac.
Cheers @RolandPheasant
My intention wasn't to create a perfect solution, but to help the guys take a few steps toward more idiomatic Rx. I wanted to get that work in before Jake gives a Presentation on Rx gotchas using Carnac as an example code base.
Most changes are basically my standard old tricks : Immutable where possible, Methods with their data, intention revealing naming...and not passing IObservable<T>
into methods ;-)
I am sure that there is still plenty of tweaks that can be applied!
from carnac.
Related Issues (20)
- After opening the software, the live wallpaper is still
- It doesn't show up when I use abaqus.
- It doesn't work with "foreign languages" keyboards HOT 1
- the escape keyword isn't working when keymaps files
- Carnac.exe - Assert Failure
- Options to set mouse clicks are missing HOT 1
- Source in OBS and XSplit
- Up arrow
- Functions different...
- No mouse input registered or displayed HOT 1
- Can MacOS support it HOT 1
- Doesn't work in Avid Pro Tools
- So, I like this tool a lot, but..
- Support Portable Version HOT 1
- How do I open the settings?
- Only detects 3x up arrow, but not 1. HOT 1
- Additional text does not fit
- Is it possible to disable additional text?
- proposing adding to homebrew-core to allow install through homebrew
- Troyane infested
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from carnac.