-
Notifications
You must be signed in to change notification settings - Fork 2
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
Try at implementing TransportLayer #4
base: master
Are you sure you want to change the base?
Conversation
…im implementation
Thank you for your interest in this project. The reason I'm pausing my work on this is at that time there was no good enough async lib around. If you are going to integrate it with a GUI app, it will be a horrible experience for user if you are using synchronous operation. It should be async or multi threaded. but using thread in nim is also really hard because of nim memory model. async should be more realistic. you can take a look at https://github.com/status-im/nim-chronos. it has async socket and pipe.
Don't worry, you will become more skilled as you working on more projects. |
Hiya thanks for the awesome explanation, I'll try to use
I did take a look at chronos and the json rpc implementation, but the chronos README also this under TODO:
So I thought it might have been better to use: https://github.com/cheatfate/asynctools
Haha, that's good to know, it's such low level intricate stuff! Fascinating nonetheless. |
So I'm having issues generating nim-chronos documentation, but it is it correct that for creating pipes I need to use this function: https://github.com/status-im/nim-chronos/blob/master/chronos/handles.nim#L157 ? Nim-chronos pipes are anonymous on Linux and for neovim I think I need named pipes specifically: https://github.com/cheatfate/asynctools/blob/master/asynctools/asyncipc.nim#L56 might be better to use |
I just tried using nvim_client and ran into the |
I think AsyncIPC from asynctools is the way to go, but I'm really new to all this async stuff in general, so I have some stuff written up but I'm pretty sure it's broken :(. |
They just merged cheatfate/asynctools#27 yesterday. That PR into asynctools combined with your changes from a few days ago make the tests at least pass for me now ( Edit: Nevermind. I just realized the tests are trying to run |
I found that Changing that, fully qualifying the |
I see there is more to do then only fixing up |
@zetashift Checking back in for the new year. Have you made any progress on this? |
Hiya! I want to attempt to write a GUI for neovim using Pixie and for that I need to have a nice neovim client, I was hoping to get this working but as soon as I dove in, I found out that this is pretty hard for a beginner!
So I'm hoping you can give some tips on how to implement the transport layer succesfully, if not then that's okay too! :P
First off I'm tackling named pipes, but as far as I know these are just special files on Unix so I'm just using stdlib's file methods to get these working, except I don't know how
readPipe
should be implemented.I also updated the nimble file.