-
Notifications
You must be signed in to change notification settings - Fork 0
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
Create algorithm plugin system #45
Comments
Adding to this. Should the plugins specify the version they were written for? One minus to this is that I might have to keep track of things in the main codebase. But a plus would be that I could change inputs and outputs for plugins relatively easy. I guess I should think about how likely the API is to change. |
I moved the meta package to the internal folder. I also created a plugin module. This would be the only thing that a plugin would need in order to be dependent on concards.
About half of this has been addressed in my latest refactor. |
Hmm.. I think plugins could be solved by using hooks. Why not? Kakoune does this. I think terraform kind of works like this. If I use hooks, then the plugin could be any executable. I just needs a specific name. I'm currently creating a basic listener hook as part of #109. I think this could be extended to algorithms later. A benefit of hooks is that information is communicated via stdout/stderr. This means the hook program could also be reused for other things. |
When I first had this idea, I was thinking that plugins could be in Python. I'm actually against that idea now for a few reasons. One reason is that it is more work to translate between languages. Another is that it forces an extra dependency. And another is that python has quite a big overhead.
But go-plugin looks promising. Technically, the plugin doesn't even have to be written in golang, it could be written in any language. The nice thing about it though is that there are no extra dependencies needed. And everything the plugin would want to use are already available in a module.
So this case is to research into and implement go-plugin or something similar. Plugins should be contained in a folder and the name of the file would be the algorithm name referenced in .concards-meta.
I like this idea. It's pretty solid now. And super lightweight.
The text was updated successfully, but these errors were encountered: