Coder Social home page Coder Social logo

dtl's People

Contributors

cubicdaiya avatar jamesjer avatar wlawski avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dtl's Issues

Make include guards unique

๐Ÿ’ญ I find that include guards like โ€œDTL_Hโ€ and โ€œDTL_SES_Hโ€ are too short for the safe reuse of your header files (when they belong to an application programming interface).

There is a bug

Steps to reproduce:

#include "3rdparty/dtl/dtl.hpp"
#include <iostream>
#include <vector>

int main(int argc, char *argv[]) {
    std::vector<char> a = {'a','b','c','d'};
    std::vector<char> b = {'a','b','c','d','e','f'};

    std::cout << "a: " << "abcd" << "\n";
    std::cout << "b: " << "abcdef" << "\n";

    dtl::Diff<char,std::vector<char>> d(b,a);
    d.compose();
    d.onHuge();
    d.composeUnifiedHunks();
    d.printUnifiedFormat();

    return 0;
}

Output:

a: abcd
b: abcdef
@@ -2,5 +2,3 @@
 b
 c
 d
-e
-f

Does anyone know why the first element 'a' is not defined as common to sequences? Is there any way around this mistake without losing performance?

New release

The latest release (v1.19) is from 2016. Even though there has been only one change to the library, I think it might be a good idea to have a new release, such as v1.20.

Diff3 merge is broken

std::string base_code_ = "0";
std::string left_code_ = "100";
std::string right_code_ = "200";

dtl::Diff3<char, std::string> diff3(base_code_, left_code_, right_code_);
diff3.compose();
if (!diff3.merge())
{
    std::cout << "Conflict" << std::endl;
}
else
{
    std::string merged = diff3.getMergedSequence(); // 20 here
}

I expect conflict

substring matching

Hi,

Please consider adding an option to diff by substrings.
E.g. column 4-10 of file a and b instead of the whole line.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.