KeyWeeUsr / emacs-syncthing

Emacs client for Syncthing
GNU General Public License v3.0
23 stars 4 forks source link

Interested in collaborating? #1

Closed progfolio closed 6 months ago

progfolio commented 8 months ago

I have some ideas for how this package could be rewritten to be more flexible and performant. As it stands, the package would need to be mostly re-written to achieve these goals. Do you have any interest in working on a re-write together?

KeyWeeUsr commented 8 months ago

Sure, why not. I kind of expect it to be rewritten anyway, especially the handling of JSON and the overall state keeping kind of into a way React forces the state to be treated as the approach it very similar with :action and :notify on parent-children widget relationships.

What do you have in mind?

progfolio commented 8 months ago

Sure, why not.

Glad to hear it.

What do you have in mind?

As you point out, the data from the server needs to be stored somewhere. It also should be computed independently of drawing the "view" of the client. Both of these can be solved by making use of a server struct.

Starting there will make everything else easier to implement. Does that make sense?

I've roughed out an implementation here:

https://github.com/progfolio/emacs-syncthing/blob/rewrite/syncthing.el

KeyWeeUsr commented 7 months ago

@progfolio I wonder about the Common Lisp requirements, shouldn't we stick just to ELisp? And I presume the faces and the rest were removed for simplicity to showcase the rewrite, right?

Overall it looks awesome, mainly the automatic JSON parsing. I'm not that familiar with CommonLisp and as you see my ELisp knowledge is quite rusty too. I'll take a look over the weekend and if there isn't any strict blocker that would make it unavailable from let's say allowing it to work in older Emacs versions I'll implement most things from it.

Unless, of course, you want to submit a patch, but for that case please keep the faces and other defcustom values there :yum:

progfolio commented 7 months ago

@progfolio I wonder about the Common Lisp requirements, shouldn't we stick just to ELisp?

cl-lib is a common library. There's no real harm in using it. Of course, things can be rewritten sans its macros/functions, too.

And I presume the faces and the rest were removed for simplicity to showcase the rewrite, right?

Yes. The style should come after the functionality, IMO. Once a solid design is there it's very easy to add some face properties to strings.

Overall it looks awesome, mainly the automatic JSON parsing. I'm not that familiar with CommonLisp and as you see my ELisp knowledge is quite rusty too. I'll take a look over the weekend and if there isn't any strict blocker that would make it unavailable from let's say allowing it to work in older Emacs versions I'll implement most things from it.

Unless, of course, you want to submit a patch, but for that case please keep the faces and other defcustom values there 😋

Take a look at things and keep working at it. Let me know if you have any questions.

KeyWeeUsr commented 7 months ago

cl-lib is a common library. There's no real harm in using it.

Alright, let's keep it, it looks leaner that way :+1:

KeyWeeUsr commented 6 months ago

Closing as most of the ideas have been implemented :tada: