Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #37236

Re: Uniquely identifying each & every html template

Path csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder2.hal-mli.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <oscar.j.benjamin@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.000
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'algorithm': 0.03; 'wiki': 0.03; 'discard': 0.05; 'repository': 0.05; '-use': 0.07; 'filename': 0.07; 'tom': 0.07; 'python': 0.09; '(use': 0.09; '*is*': 0.09; 'directory)': 0.09; 'file"': 0.09; 'files:': 0.09; 'git': 0.09; 'timestamp': 0.09; 'useless': 0.09; 'cc:addr:python- list': 0.10; 'applies': 0.15; 'charset:iso-8859-7': 0.15; 'commit': 0.15; 'file,': 0.15; 'producing': 0.15; '100644': 0.16; 'attributes.': 0.16; 'benjamin': 0.16; 'cc:name:python list': 0.16; 'deleted:': 0.16; "file's": 0.16; 'hint': 0.16; 'identifiable': 0.16; 'task.': 0.16; 'string': 0.17; 'wrote:': 0.17; '>>>': 0.18; 'changes': 0.20; 'fairly': 0.21; 'file:': 0.22; 'init': 0.22; 'cc:2**0': 0.23; 'branch': 0.23; "i've": 0.23; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'url:wiki': 0.26; 'older': 0.27; 'skip:# 10': 0.27; 'message- id:@mail.gmail.com': 0.27; 'chris': 0.28; 'initial': 0.28; '>>>>': 0.29; 'cat': 0.29; 'hash': 0.29; 'initialized': 0.29; 'url:wikipedia': 0.29; 'no,': 0.29; 'reset': 0.29; '"the': 0.29; 'mode': 0.30; 'asking': 0.32; 'file': 0.32; 'problem': 0.33; 'another': 0.33; 'received:google.com': 0.34; 'done': 0.34; 'along': 0.35; 'said,': 0.35; 'pm,': 0.35; 'sometimes': 0.35; 'received:209.85': 0.35; 'something': 0.35; 'add': 0.36; 'but': 0.36; 'url:org': 0.36; "i'll": 0.36; 'beyond': 0.37; 'does': 0.37; 'two': 0.37; 'being': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'files': 0.38; 'mean': 0.38; 'some': 0.38; 'nothing': 0.38; 'url:en': 0.38; 'gives': 0.39; 'think': 0.40; 'identify': 0.61; 'tracking': 0.61; 'first': 0.61; 'here:': 0.62; 'subject: & ': 0.67; 'power': 0.74; 'article': 0.78; '(still': 0.84; '2013': 0.84; 'common,': 0.84; 'computers.': 0.84; 'oscar': 0.84; 'seriously,': 0.91
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type:content-transfer-encoding; bh=dYpkE2QPihAejDpUjOvydMGrISSHVqJaX7mygv7rW8M=; b=CZl2J9eH8TNQaWolEgeiSOvmBmkKA/Pl+/QgyxrD9+qSTI3I3Mh5/BiZ5T+mIlv0fz MFAn/LWFwxNS7shZ1ZG7fDgLN49lCnPfVrGquFBX+FMKZf7O/JIEppHbvfcBiPjT1Em6 i75vgR02SoRmZm2W9DdxMzgNQCxD2/yjpCtRh9KwBCmwXmvBOCOcjyN1EN+Er22IESoK orOVDTgyLVoHN6lEs75DIjDYOdtx9pQ1VxJ58n8ze8BuOFE0efl/wVvpxU2axU0WRlw4 SURp+ZBj5osXx84wnjWoxxVuu4Su0DmoaRQAbi4cXbF6pwfhCzj+k/Gmy04WlqxlKjId M9iQ==
MIME-Version 1.0
X-Received by 10.152.125.239 with SMTP id mt15mr5842675lab.26.1358811800513; Mon, 21 Jan 2013 15:43:20 -0800 (PST)
In-Reply-To <am5vmjFc7geU1@mid.individual.net>
References <8deb6f5d-ff10-4b36-bdd6-36f9eed58e1e@googlegroups.com> <mailman.655.1358546994.2939.python-list@python.org> <5dd4babd-716d-4542-ad36-e6a841b73ec3@googlegroups.com> <mailman.684.1358586035.2939.python-list@python.org> <03581a24-9330-4019-bde9-61a607000d3d@googlegroups.com> <mailman.729.1358752818.2939.python-list@python.org> <187d77e0-e948-46bf-acc5-668c446cf3aa@googlegroups.com> <mailman.733.1358760692.2939.python-list@python.org> <239abe33-fa5b-41a9-ae80-5260b9b1bd9c@googlegroups.com> <mailman.742.1358771967.2939.python-list@python.org> <am5vmjFc7geU1@mid.individual.net>
Date Mon, 21 Jan 2013 23:43:20 +0000
Subject Re: Uniquely identifying each & every html template
From Oscar Benjamin <oscar.j.benjamin@gmail.com>
To Tom P <werotizy@freent.dd>
Content-Type text/plain; charset=ISO-8859-7
Content-Transfer-Encoding quoted-printable
Cc Python List <python-list@python.org>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.770.1358811802.2939.python-list@python.org> (permalink)
Lines 108
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1358811802 news.xs4all.nl 6882 [2001:888:2000:d::a6]:46925
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:37236

Show key headers only | View raw


On 21 January 2013 23:01, Tom P <werotizy@freent.dd> wrote:
> On 01/21/2013 01:39 PM, Oscar Benjamin wrote:
>>
>> On 21 January 2013 12:06, Ferrous Cranus <nikos.gr33k@gmail.com> wrote:
>>>
>>> Τη Δευτέρα, 21 Ιανουαρίου 2013 11:31:24 π.μ. UTC+2, ο χρήστης Chris
>>> Angelico έγραψε:
>>>>
>>>>
>>>> Seriously, you're asking for something that's beyond the power of
>>>> humans or computers. You want to identify that something's the same
>>>> file, without tracking the change or having any identifiable tag.
>>>>
>>>> That's a fundamentally impossible task.
>>>
>>>
>>> No, it is difficult but not impossible.
>>> It just cannot be done by tagging the file by:
>>>
>>> 1. filename
>>> 2. filepath
>>> 3. hash (math algorithm producing a string based on the file's contents)
>>>
>>> We need another way to identify the file WITHOUT using the above
>>> attributes.
>>
>>
>> This is a very old problem (still unsolved I believe):
>> http://en.wikipedia.org/wiki/Ship_of_Theseus
>>
> That wiki article gives a hint to a poosible solution -use a timestamp to
> determine which key is valid when.

In the Ship of Theseus, it is only argued that it is the same ship
because people were aware of the incremental changes that took place
along the way. The same applies here: if you don't track the
incremental changes and the two files have nothing concrete in common,
what does it mean to say that a file is "the same file" as some older
file?

That being said, I've always been impressed with the way that git can
understand when I think that a file is the same as some older file
(though it does sometimes go wrong):

~/tmp$ git init
Initialized empty Git repository in /home/oscar/tmp/.git/
~/tmp$ vim old.py
~/tmp$ cat old.py
#!/usr/bin/env python

print('This is a fairly useless script.')
print("Maybe I'll improve it later...")
~/tmp$ git add old.py
~/tmp$ git status
# On branch master
#
# Initial commit
#
# Changes to be committed:
#   (use "git rm --cached <file>..." to unstage)
#
#   new file:   old.py
#
~/tmp$ git commit
[master (root-commit) 8e91665] First commit
 1 file changed, 4 insertions(+)
 create mode 100644 old.py
~/tmp$ ls
old.py
~/tmp$ cat old.py > new.py
~/tmp$ rm old.py
~/tmp$ vim new.py
~/tmp$ cat new.py
#!/usr/bin/env python

print('This is a fairly useless script.')
print("Maybe I'll improve it later...")

print("Although, I've edited it somewhat, it's still useless")
~/tmp$ git status
# On branch master
# Changes not staged for commit:
#   (use "git add/rm <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#
#   deleted:    old.py
#
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
#   new.py
no changes added to commit (use "git add" and/or "git commit -a")
~/tmp$ git add -A .
~/tmp$ git status
# On branch master
# Changes to be committed:
#   (use "git reset HEAD <file>..." to unstage)
#
#   renamed:    old.py -> new.py
#

So it *is* Theseus' ship!


Oscar

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Uniquely identifying each & every html template Ferrous Cranus <nikos.gr33k@gmail.com> - 2013-01-18 12:48 -0800
  Re: Uniquely identifying each & every html template John Gordon <gordon@panix.com> - 2013-01-18 20:59 +0000
    Re: Uniquely identifying each & every html template Ferrous Cranus <nikos.gr33k@gmail.com> - 2013-01-18 14:12 -0800
  Re: Uniquely identifying each & every html template Dave Angel <d@davea.name> - 2013-01-18 17:09 -0500
    Re: Uniquely identifying each & every html template Ferrous Cranus <nikos.gr33k@gmail.com> - 2013-01-19 00:39 -0800
      Re: Uniquely identifying each & every html template Dave Angel <d@davea.name> - 2013-01-19 04:00 -0500
        Re: Uniquely identifying each & every html template Ferrous Cranus <nikos.gr33k@gmail.com> - 2013-01-20 23:08 -0800
          Re: Uniquely identifying each & every html template Chris Angelico <rosuav@gmail.com> - 2013-01-21 18:20 +1100
            Re: Uniquely identifying each & every html template Ferrous Cranus <nikos.gr33k@gmail.com> - 2013-01-21 01:19 -0800
              Re: Uniquely identifying each & every html template Chris Angelico <rosuav@gmail.com> - 2013-01-21 20:31 +1100
                Re: Uniquely identifying each & every html template Ferrous Cranus <nikos.gr33k@gmail.com> - 2013-01-21 04:06 -0800
                Re: Uniquely identifying each & every html template Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2013-01-21 12:39 +0000
                Re: Uniquely identifying each & every html template alex23 <wuwei23@gmail.com> - 2013-01-21 04:55 -0800
                Re: Uniquely identifying each & every html template rusi <rustompmody@gmail.com> - 2013-01-21 19:24 -0800
                Re: Uniquely identifying each & every html template Chris Angelico <rosuav@gmail.com> - 2013-01-22 15:39 +1100
                Re: Uniquely identifying each & every html template Tom P <werotizy@freent.dd> - 2013-01-22 00:01 +0100
                Re: Uniquely identifying each & every html template Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2013-01-21 23:43 +0000
                Re: Uniquely identifying each & every html template Chris Angelico <rosuav@gmail.com> - 2013-01-22 11:04 +1100
                Re: Uniquely identifying each & every html template alex23 <wuwei23@gmail.com> - 2013-01-22 17:36 -0800
                Re: Uniquely identifying each & every html template Joel Goldstick <joel.goldstick@gmail.com> - 2013-01-21 07:47 -0500
                Re: Uniquely identifying each & every html template Ferrous Cranus <nikos.gr33k@gmail.com> - 2013-01-21 07:00 -0800
                Re: Uniquely identifying each & every html template Michael Torrie <torriem@gmail.com> - 2013-01-22 16:55 -0700
                Re: Uniquely identifying each & every html template Ferrous Cranus <nikos.gr33k@gmail.com> - 2013-01-23 01:12 -0800
                Re: Uniquely identifying each & every html template alex23 <wuwei23@gmail.com> - 2013-01-23 01:37 -0800
                Re: Uniquely identifying each & every html template Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-01-23 09:49 +0000
                Re: Uniquely identifying each & every html template Ferrous Cranus <nikos.gr33k@gmail.com> - 2013-01-23 02:29 -0800
                Re: Uniquely identifying each & every html template Joel Goldstick <joel.goldstick@gmail.com> - 2013-01-23 07:03 -0500
                Re: Uniquely identifying each & every html template Ferrous Cranus <nikos.gr33k@gmail.com> - 2013-01-23 04:26 -0800
                Re: Uniquely identifying each & every html template Ferrous Cranus <nikos.gr33k@gmail.com> - 2013-01-23 04:26 -0800
                Re: Uniquely identifying each & every html template alex23 <wuwei23@gmail.com> - 2013-01-23 06:25 -0800
                Re: Uniquely identifying each & every html template Dave Angel <d@davea.name> - 2013-01-23 07:38 -0500
                Re: Uniquely identifying each & every html template Chris Angelico <rosuav@gmail.com> - 2013-01-24 10:25 +1100
                Re: Uniquely identifying each & every html template Dave Angel <d@davea.name> - 2013-01-23 19:09 -0500
                Re: Uniquely identifying each & every html template Chris Angelico <rosuav@gmail.com> - 2013-01-24 11:39 +1100
                Re: Uniquely identifying each & every html template Dave Angel <d@davea.name> - 2013-01-23 19:53 -0500
                Re: Uniquely identifying each & every html template Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-01-23 16:01 -0500
                Re: Uniquely identifying each & every html template Ferrous Cranus <nikos.gr33k@gmail.com> - 2013-01-23 01:12 -0800
                Re: Uniquely identifying each & every html template Ferrous Cranus <nikos.gr33k@gmail.com> - 2013-01-21 07:00 -0800
                Re: Uniquely identifying each & every html template Dave Angel <d@davea.name> - 2013-01-21 17:26 -0500
                Re: Uniquely identifying each & every html template Ferrous Cranus <nikos.gr33k@gmail.com> - 2013-01-21 04:06 -0800
                Re: Uniquely identifying each & every html template Tim Roberts <timr@probo.com> - 2013-01-21 19:57 -0800
              Re: Uniquely identifying each & every html template Tim Roberts <timr@probo.com> - 2013-01-21 20:04 -0800
                Re: Uniquely identifying each & every html template Ferrous Cranus <nikos.gr33k@gmail.com> - 2013-01-21 22:49 -0800
                Re: Uniquely identifying each & every html template Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-01-22 16:08 -0500
                Re: Uniquely identifying each & every html template Ferrous Cranus <nikos.gr33k@gmail.com> - 2013-01-23 01:15 -0800
                Re: Uniquely identifying each & every html template Ferrous Cranus <nikos.gr33k@gmail.com> - 2013-01-23 01:15 -0800
            Re: Uniquely identifying each & every html template Ferrous Cranus <nikos.gr33k@gmail.com> - 2013-01-21 01:19 -0800
              Re: Uniquely identifying each & every html template alex23 <wuwei23@gmail.com> - 2013-01-21 04:56 -0800
                Re: Uniquely identifying each & every html template Ferrous Cranus <nikos.gr33k@gmail.com> - 2013-01-21 07:03 -0800
                Re: Uniquely identifying each & every html template alex23 <wuwei23@gmail.com> - 2013-01-21 15:35 -0800
              Re: Uniquely identifying each & every html template Piet van Oostrum <piet@vanoostrum.org> - 2013-01-21 21:48 +0100
                Re: Uniquely identifying each & every html template Ferrous Cranus <nikos.gr33k@gmail.com> - 2013-01-21 22:38 -0800
            Re: Uniquely identifying each & every html template Ferrous Cranus <nikos.gr33k@gmail.com> - 2013-01-21 07:07 -0800
              Re: Uniquely identifying each & every html template alex23 <wuwei23@gmail.com> - 2013-01-21 15:36 -0800
              Re: Uniquely identifying each & every html template rusi <rustompmody@gmail.com> - 2013-01-21 20:18 -0800
            Re: Uniquely identifying each & every html template Ferrous Cranus <nikos.gr33k@gmail.com> - 2013-01-21 07:07 -0800
        Re: Uniquely identifying each & every html template Ferrous Cranus <nikos.gr33k@gmail.com> - 2013-01-20 23:08 -0800
      Re: Uniquely identifying each & every html template Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-01-19 16:32 -0500
        Re: Uniquely identifying each & every html template Ferrous Cranus <nikos.gr33k@gmail.com> - 2013-01-20 22:52 -0800
        Re: Uniquely identifying each & every html template Ferrous Cranus <nikos.gr33k@gmail.com> - 2013-01-20 22:52 -0800
      Re: Uniquely identifying each & every html template John Gordon <gordon@panix.com> - 2013-01-22 16:35 +0000
    Re: Uniquely identifying each & every html template Ferrous Cranus <nikos.gr33k@gmail.com> - 2013-01-19 00:39 -0800

csiph-web