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

initialise diff chapter #49

Merged
merged 1 commit into from
Apr 20, 2024
Merged

Conversation

hristog
Copy link
Contributor

@hristog hristog commented Mar 30, 2024

Summary:

  • Initialises the diff chapter.
  • Proposes an outline of the chapter.
  • Discusses what's in scope (subject to time constraints, in terms of reader persona guidelines) and out of scope.

@hristog hristog force-pushed the diff-chapter-init branch from 6b9a58d to 1d57642 Compare March 30, 2024 12:14
@hristog hristog force-pushed the diff-chapter-init branch from 1d57642 to 6e118c9 Compare March 30, 2024 12:23
@hristog
Copy link
Contributor Author

hristog commented Apr 7, 2024

I'll use this PR to share some progress update as well.

I've completed end-to-end implementations, associated with the following increments (some of following bullet-points correspond to a single increment):

  • Recursive LCS for identification of an arbitrary longest common sequence between two given sequences.
  • Dynamic Programming LCS, with a table representation, allowing recovering all longest common sequences via backtracking.
  • Heuristic for identifying a diff-friendly LCS solution (amongst multiple possible LCS solutions).
  • Rudimentary formatting, which is relatively close to diff's Unified format.
  • Parametrised filtering of diff results, so that it could facilitate different forms of diff formatting.
    • In this case, the implementation introduces one parameter corresponding to the maximum length of matches on either side, which should be displayed as a context in a diff solution.

Naturally flowing next steps:

  • Formatting the output using common formats:
    • Normal format.
    • Unified format.
  • A tiny refactoring, in order to enable the solution to work on generic sequences (i.e., lists of any type that supports equality).

@gvwilson gvwilson force-pushed the main branch 4 times, most recently from 1541c01 to 96e9963 Compare April 10, 2024 20:01
@gvwilson
Copy link
Collaborator

I realize this is in progress, but may I merge what you have so that I have something when I start rearranging order?

@hristog
Copy link
Contributor Author

hristog commented Apr 20, 2024

My apologies, @gvwilson - it appears that I've misunderstood the purpose of the chapter sub-directories and the associated PR increments.

The initialisation of the sub-directory was in response to this comment from the associated issue:

👍 thank you - I'll mark this one down as yours. Can you please create a sub-directory under the project root called "diff" and put your work there along with an index.md file with point-form notes as you go along?

But I wasn't sure at what frequencies should we have expected the PR increments to be merged into the repository here. I confirm I've been writing the draft of my chapter (and complete code examples) in parallel (i.e., whilst waiting for this initialisation PR to be merged).

Should I seek to update this PR with my draft work, or should that be part of a separate PR? I confirm, either way, I'll be able to provide a much better idea about the content of the chapter this weekend.

Basically (and it seems - entirely caused by my misunderstanding), I was waiting for this PR to be merged in first, so that I could subsequently raise other PRs corresponding to draft version increments.

@gvwilson
Copy link
Collaborator

Hi @hristog - please don't apologize, we're making this up as we go along :-) I have one more week until I start a new job, and would like to tidy up what we have before then, so I've been firing off requests for merge more hastily than I should have. You've done everything right; I'll go ahead and merge this as it is and then we can see where we are. Apologies on my part for being confusing.

@gvwilson gvwilson merged commit 349906d into roc-lang:main Apr 20, 2024
@hristog
Copy link
Contributor Author

hristog commented Apr 20, 2024

Understood, @gvwilson! Thank you once again for confirming!

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

Successfully merging this pull request may close these issues.

2 participants