08:11 dakkar joined 08:17 lizmat_ left, lizmat joined
Nemokosch hello, I have the following task 15:19
I have two ordered files with lines of data, I need to compare them 15:20
What I did the last time with Python was taking an iterator for both sides of the comparison and call next depending on the current positions, so much like a merge 15:26
lizmat what should be the outcome of the comparison? a Bool ? 15:52
Nemokosch it should show the differences at least 15:54
at the end of the day, the lines will have a key-value structure and there will be 4 different outcomes for each row: a) only left b) only right c) complete match d) different value to the key 15:56
we don't care about c) but the rest is needed 15:57
lizmat is the order important ? 16:28
Nemokosch not really; the only important thing is that we shouldn't detect matchable rows as extra rows 16:30
16:37 dakkar left
lizmat what about duplicates ? 16:37
Nemokosch There will be no duplicates 16:41
lizmat make a hash of the lines in the first file, check the lines of the second file with that hash 16:45
Nemokosch Isn't that a bit costly when I have a 5 digit number of "records"? 16:47
avuserow lines() is lazy, maybe that would get you what you need to mimic the python solution? 20:07
Nemokosch that's what I'm going to try 20:39
I was curious whether I miss something obvious