Skip to content
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

API or Interface #583

Open
the-moog opened this issue Oct 21, 2023 · 0 comments
Open

API or Interface #583

the-moog opened this issue Oct 21, 2023 · 0 comments

Comments

@the-moog
Copy link

Hi,
Great to see this project maturing. I even managed to add support for a new language despite having little knowledge of JS or Rust (the latter I really want to lean more of). It seems this project has a lot of synchronicity with projects like tree-sitter and VSCode, or rather VSCodium.

Just wondering, referencing #12 (closed) and PR #321 (merged in a commit but not on a tracked branch) and with reference to the following Issues:
#216
#367

I noticed the feature of being able to easily integrate with other tools not on the list of open feature requests so opened this issue to ask if that was now a possibility?

Incidentally, #12 was mentioned in response to my original suggestion to the prople involved with Meld over at GNOME that they might integrate with difftastic. I repled in #12 so that @luzpaz might feed that back to Meld.

Rather than a library linkage, (or should I say, as well as) Another idea would be a simple query interface via a socket or fifo or stdio server inside a difftastic instance. That would be easier to support without breaking every time a change to the internal structures is made? Another benefit might be that difftastic can split it's file reads into smaller, managable (even overlapping??) pieces, rather trying to fit the entire thing and the data to represent it in memory. I expect that would be good for integration into IDEs as it would be more responsive.

There may be an existing standard for this sort of thing (no, not SQL), but below is a straw man concept using, e.g. Apache Thrift (as a suggestion of an arbitrary random, portable interface1) EXI or EXI4JSON would also be a cood candidates. If this is a good idea, as I want a Rust project I'd be happy to give it a go?

Request keywords [all, count, get, next, prev, index, done]

(call from client app) execp("difft", "--server stdio", "left_file,c", "right_file.c");
...open
-> count
<- count=100+
-> get,10000
<- error:"Index out of range"
-> get,10,EXI
<- chunk[10]="<EXI...>"
-> all
<- all={key:12538cbefd73, size:1234567, chunks:1000}
-> get,key:12538cbefd73   (if you are brave!!, or.... )
-> next
<- chunk[11]="<Thrift/EXI/other....>
-> done
close...

Footnotes

  1. Other interface are available
    Fast-DDS looks interesting, https://github.com/eProsima/Fast-DDS
    (I'm an Electronics engineer so DDS to me means something completely different)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant