[resent to group, sorry Egon]

On Fri, Aug 25, 2017 at 3:04 PM, Egon <egonel...@gmail.com> wrote:

> Try to find the first place where the processes diverge:
>
> 1. maybe find lists files in different order
>

Oh, YES! BINGO! THANKS A LOT.

find test/sim -type f* | sort* | ./fsimilar -i -d 12 -vv

gave me the correct output that i want.

Ah~, my algorithm is so fragile. :(


> 2. maybe something read input does things in different order
> 3. maybe some processing uses maps --> hence random order
> 4. etc...
>
> (of course run with -race, if you already haven't)
>
> On Friday, 25 August 2017 21:56:29 UTC+3, Tong Sun wrote:
>>
>>
>> Update,
>>
>>
>> On Fri, Aug 25, 2017 at 11:39 AM, Tong Sun <sunto...@gmail.com> wrote:
>>
>>> Hi,
>>>
>>> I'm experiencing a *very very* strange problem now -- the same Go code
>>> is producing different results *for me*.
>>> I'm not kidding, I can't believe that myself, so I've spent *the past
>>> few days* going back and forth to verify everything.
>>> Now, after all these days, the only conclusion that I can make is,
>>> albeit how bazzard it is, same code, different results.
>>>
>>> Can someone verify for me what you get please?
>>>
>>> go get github.com/go-dedup/fsimilar
>>>
>>> then
>>>
>>> cd go-dedup/fsimilar
>>> go build
>>> find test/sim -type f | ./fsimilar -i -d 12 -vv
>>>
>>> and tell me what's the last output that you got please.
>>>
>>> The problem is that *two *of my machines produce:
>>>
>>> [fsimilar] ## Similar items
>>>  map[Similars:[map[Hash:6184610222622303958 Dist:0 SizeRef:1 Name:GNU -
>>> 2001 - Python Standard Library Ext:.pdf Size:1 Dir:test/sim/] map[Name:GNU
>>> - Python Standard Library (2001) Ext:.rar Size:1 Dir:test/sim/
>>> Hash:6184610222622303958 Dist:0 SizeRef:1]]].
>>> *test/sim/GNU - 2001 - Python Standard Library.pdf*
>>> *test/sim/GNU - Python Standard Library (2001).rar*
>>>
>>> But another one, the *only one*, produce:
>>>
>>> [fsimilar] ## Similar items
>>>  map[Similars:[{(eBook) GNU - Python Standard Library 2001 .pdf 1
>>> test/sim/ 15408562819203262167 8 1} {GNU - 2001 - Python Standard Library
>>> .pdf 1 test/sim/ 6184610222622303958 0 1} {GNU - Python Standard Library
>>> (2001) .rar 1 test/sim/ 6184610222622303958 0 1} {Python Standard Library
>>> .zip 1 test/sim/ 6175699711939618002 11 1}]].
>>> *test/sim/(eBook) GNU - Python Standard Library 2001.pdf*
>>> *test/sim/GNU - 2001 - Python Standard Library.pdf*
>>> *test/sim/GNU - Python Standard Library (2001).rar*
>>> *test/sim/Python Standard Library.zip*
>>>
>>> which is what I actually want.
>>>
>>> The rest of the following output are exactly the same across all three
>>> machines:
>>>
>>> $ go version
>>> go version go1.8.1 linux/amd64
>>>
>>> $ lsb_release -a
>>> No LSB modules are available.
>>> Distributor ID: Ubuntu
>>> Description:    Ubuntu 17.04
>>> Release:        17.04
>>> Codename:       zesty
>>>
>>> $ git status
>>> On branch master
>>> Your branch is up-to-date with 'origin/master'.
>>> nothing to commit, working tree clean
>>>
>>>
>> - all the original source on three machines are pulled from the same
>> git, with same status.
>> - I copied the bad code into good machine, and compared the two folders,
>> and files are the same
>> - I ran the bad code in good machine, and the result is the bad code
>> works in the good machine.
>> - I copied the good code into bad machine, and the result is good code
>> doesn't work in bad machine any more.
>>
>> Adding *all these things* up *I'm sure the code are the same *-- the
>> only different is the machine/build environment.
>>
>> I installed from https://storage.googleapis.com/golang/go1.8.3.linux-
>> amd64.tar.gz to both machines. and Now both machines have go1.8.3:
>>
>> $ type go
>> go is hashed (/opt/bin/go)
>>
>> $ go version
>> go version go1.8.3 linux/amd64
>>
>>
>> And having updgraded `github.com/fatih/structs`
>> <http://github.com/fatih/structs> on the good machine, the following is
>> no longer an issue any more.
>>
>> Oh, I do get one difference to illustrate how strange things are -- for
>>> the same code of:
>>>
>>>                 verbose(2, "## Similar items\n *%v*.", m)
>>>
>>> The working machine produces (last two line):
>>>
>>> [fsimilar] ## Similar items
>>>  map[Similars:*[{*Improve Soccer Shooting Technique .mp4 10043873 ./Try
>>> These Soccer Drills/ 17777808297800170271 0 10043873} {Improve Soccer
>>> Shooting Technique .mp4 10043873 ./Top Soccer Training Videos/
>>> 17777808297800170271 0 10043873}]].
>>> [fsimilar] ## Similar items
>>>  map[Similars:*[{*Soccer Drills For Youth .mp4 11650500 ./Youth Soccer
>>> Training Drills/ 18062776733066936110 0 11650500} {Soccer Drills For Youth
>>> .mp4 11650500 ./Top Soccer Training Videos/ 18062776733066936110 0
>>> 11650500}]].
>>>
>>>
>>> while the machine with incorrect result produces (last two line):
>>>
>>> [fsimilar] ## Similar items
>>>  map[Similars:[*map*[Ext:.mp4 Size:10043873 Dir:./Try These Soccer
>>> Drills/ Hash:17777808297800170271 Dist:0 SizeRef:10043873 Name:Improve
>>> Soccer Shooting Technique] map[Size:10043873 Dir:./Top Soccer Training
>>> Videos/ Hash:17777808297800170271 Dist:0 SizeRef:10043873 Name:Improve
>>> Soccer Shooting Technique Ext:.mp4]]].
>>> [fsimilar] ## Similar items
>>>  map[Similars:[*map*[Dir:./Youth Soccer Training Drills/
>>> Hash:18062776733066936110 Dist:0 SizeRef:11650500 Name:Soccer Drills For
>>> Youth Ext:.mp4 Size:11650500] map[SizeRef:11650500 Name:Soccer Drills For
>>> Youth Ext:.mp4 Size:11650500 Dir:./Top Soccer Training Videos/
>>> Hash:18062776733066936110 Dist:0]]].
>>>
>>>
>>> even though the code is the same and their `go version` reported the
>>> same as well.
>>>
>>> The command to produce above is,
>>>
>>> ./fsimilar -i test/test1.lst -S -d 6 -vv 2> /tmp/log
>>>
>>> Then compare the two logs.
>>>
>>
>>
>>
>>  However, the good is *still *good, and the bad is *still *bad.
>>
>>
>>
>>
>>> I've spent *the past few days* to verify & double check everything, and
>>> now my mind is blocked and I'm out of ideas.
>>> Somebody help, Please.
>>>
>>>
>> Can someone try the above `find test/sim -type f | ./fsimilar -i -d 12
>> -vv` out for me and see what you got please?
>>
>>
>> I am afraid that you will get the first result. Please let me know.
>>
>>
>> THANKS!!
>>
>> --
> You received this message because you are subscribed to a topic in the
> Google Groups "golang-nuts" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/golang-nuts/uE99XUB08hw/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> golang-nuts+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to