-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RFC] Code simplification #9
Comments
I gave it a go and and implemented (iii) and (iv) on top if @dlech's PR #5. The code is not good enough to make a PR, however any comments would be appreciated. |
Maybe you should make a PR anyway so that it is easier to comment? |
Right, that make sense. Let me at least do a quick pass over comments and function names to remove (now obsolete) references to curio. Thanks! |
Just to make sure: will this proposal make possible such code: i.e. not have a separate |
@positron96: I'm afraid it would not and AFAIK it is not possible now anyways. However, I agree this is a limitation as one hub might not be enough for more creative models. I'd like separate the concept of a model (and it's
While I think this is desirable, such change is outside the (proposed) scope of this issue. |
@janvrany Hi, are all your changes which are mentioned in the PR also in the branch "simplify" in your forked repository? |
@justxi I'll check later today. |
@janvrany Thanks. |
Yes. Moreover, my current development version is in branch |
@janvrany I'm just stumbling on this now and wondering what you suggest as a starting point to test your changes? Should I test the 'simple' branch or your 'devel' one? For now I am trying the devel branch, but I'm also wondering if the documentation of methods has been updated? |
Sorry, not sure what do you mean. Can you elaborate? @virantha : are you still here? Any comments? |
'I tried to update comments in the code, the rest (doc, test) almost certainly is rotten (i.e, not up-to-date).' That answers my question, thanks. I have done just enough to get the Duplo train up and running and so far there are no crashes (that aren't my fault...) and it does seem more responsive. Thanks for the efforts. If it is all right with you I have one issue and I figure I should open it against you repository as it is more up-to-date, or should I put it here? |
Glad to hear that. I was wondering whether it works with anything but (my) technic hub, thanks!
I would say against mine, given that there's no response from @virantha for more than half a year now. |
Sounds good, I'm new to Python so there's nothing coming fast. Also there's no obligations coming from me, I understand life is busy. |
This is an RFC rather than a report of specific defect.
I'd like to discuss possible simplification of the code.
(i) As of now, the library uses special hacked version of BLEAK library (which I see as maintenance problem).
(ii) It looks that recent BLEAK supports also Windows and MacOS (or soon it will), therefore we can
remove support for other backends in bricknil and depend solely on BLEAK.
(iii) Once we do (i) we can remove dependency on curio and run everything in a single thread using asyncio (which is part of python3)
(iv) Once we do (iii), we can get rid of multiple "tasks" and message-passing through queue in
bleak_interface.py
, removing the file altogether.I prototyped changes for (i) and (iii) and not only it make things (little) simpler but also my 4x4 off-roader is much more responsive (using the original code the reactions are "slow" on my setup)
@virantha, what do you think? Shall it try to push these changes further?
The text was updated successfully, but these errors were encountered: