2007-06-30T00:00:02  <lanius> " But, conversely, when designing software at a system level, performance issues should always be considered from the beginning."
2007-06-30T00:00:16  <xorAxAx> we are not at the system level
2007-06-30T00:00:18  <xorAxAx> next quote please
2007-06-30T00:00:23  <xorAxAx> :-)
2007-06-30T00:00:31  <lanius> define system level
2007-06-30T00:00:45  <xorAxAx> system calls, operation system
2007-06-30T00:00:59  <xorAxAx> cf. the guys who wanted to write an OS in python
2007-06-30T00:01:02  <lanius> from the view of moinmoin the storage is the lowest level
2007-06-30T00:01:10  <xorAxAx> yes, but not the system level
2007-06-30T00:01:30  <xorAxAx> nevertheless, this should be postponed because it is nothing that would require large refactorings afterwards
2007-06-30T00:01:35  <xorAxAx> only additions to the code base
2007-06-30T00:01:40  <lanius> :-) in the end it is really no big issue since you just can add the call to the storage layer later and use it from the existing interface in ItemCollection
2007-06-30T00:02:01  <lanius> i'm just interested in the results ;)
2007-06-30T00:02:26  <xorAxAx> yeah, controllers love useless numbers as well
2007-06-30T00:02:36  <lanius> i should become a controller
2007-06-30T00:02:39  <xorAxAx> yes!
2007-06-30T00:02:46  <xorAxAx> :-)
2007-06-30T00:02:47  <lanius> ok bye then :D
2007-06-30T00:02:55  <xorAxAx> after SOC of course :)
2007-06-30T00:03:06  <lanius> aaah, right, the thing called SOC, i remember
2007-06-30T00:03:13  <xorAxAx> no, wait, after 10 years of contribution to an OSS project of your choice
2007-06-30T00:05:18  <lanius> 10 years, i can give you about 5, compared to my years of live that is 25%
2007-06-30T00:06:50  <xorAxAx> but it would be less than 25% in 5 years :)
2007-06-30T00:07:00  <lanius> that's the problem
2007-06-30T00:07:15  <lanius> no, in fact it would be even more
2007-06-30T00:07:48  <lanius> at least that's what python tells me
2007-06-30T00:07:55  <lanius> so it must be True
2007-06-30T00:09:13  <xorAxAx> 5/25 < 5/30?
2007-06-30T00:09:22  <lanius> 5/25 < 10/30
2007-06-30T00:09:34  <xorAxAx> why 10?
2007-06-30T00:09:37  <lanius> 5+5
2007-06-30T00:09:42  <xorAxAx> why the other 5?
2007-06-30T00:09:50  <lanius> if i already have 5 and add another 5
2007-06-30T00:09:56  <lanius> and its not 25 and 30 but 20 and 25
2007-06-30T00:10:04  <xorAxAx> ok :)
2007-06-30T00:31:06  <CIA-20> moin: Heinrich Wendel <h_wendel@cojobo.net> * 2108:92056b89482f 1.7-storage-hwendel/MoinMoin/PageGraphicalEditor.py: remove unused code
2007-06-30T00:31:10  <CIA-20> moin: Heinrich Wendel <h_wendel@cojobo.net> * 2109:56f61b635f7e 1.7-storage-hwendel/MoinMoin/storage/ (5 files in 2 dirs): return the created/removed revision
2007-06-30T12:19:18  <ThomasWaldmann> moin
2007-06-30T13:57:34  <grzywacz> moin
2007-06-30T14:00:48  <xorAxAx> moin my student
2007-06-30T15:06:12  <CIA-20> moin: Heinrich Wendel <h_wendel@cojobo.net> * 2110:002b6f35ad6e 1.7-storage-hwendel/MoinMoin/storage/ (6 files in 2 dirs): implement rename action
2007-06-30T15:06:14  <CIA-20> moin: Heinrich Wendel <h_wendel@cojobo.net> * 2111:36e9a5119ec0 1.7-storage-hwendel/MoinMoin/storage/ (_tests/test_external.py external.py): implement copy action
2007-06-30T15:41:53  <CIA-20> moin: Heinrich Wendel <h_wendel@cojobo.net> * 2112:10a14c4c175f 1.7-storage-hwendel/MoinMoin/storage/ (4 files in 2 dirs): add check for empty newname; more unit tests
2007-06-30T15:41:54  <CIA-20> moin: Heinrich Wendel <h_wendel@cojobo.net> * 2113:f3dc4d6ff9de 1.7-storage-hwendel/MoinMoin/ (4 files in 2 dirs): PageEditor.copyPage and PageEditor.renamePage use the storage code now
2007-06-30T15:43:49  <ThomasWaldmann> moin lanius :)
2007-06-30T15:45:50  <ThomasWaldmann> lanius: +        assert not ("asdf" in self.item_collection) you dont need () there, you can even write "asdf" not in ... if you feel better that way
2007-06-30T15:50:31  <ThomasWaldmann> lanius: fs_moin16.rename_item the two checks must get swapped
2007-06-30T15:51:43  <lanius> moin Thomas
2007-06-30T15:52:28  <ThomasWaldmann> lanius: +            _handle_error(self, err, name, message = "Failed to rename item %r to %r." % (name, newname))  raise PEP8Exception :)
2007-06-30T15:52:36  <lanius> ^^
2007-06-30T15:52:45  <lanius> couldn't find a pylint switch that shows me this errors
2007-06-30T15:53:32  <lanius> you mean swap not newname and name == newname?
2007-06-30T15:54:42  <ThomasWaldmann> it is is the same name, it of course also exists
2007-06-30T15:55:27  <lanius> so?
2007-06-30T15:55:51  <ThomasWaldmann> the second if will never trigger
2007-06-30T15:56:35  <lanius> sorry, be more precise please, you mean the if self.has_item() ... ?
2007-06-30T15:56:40  <ThomasWaldmann> (except maybe if you try to rename a non-existing item to the same name)
2007-06-30T15:56:55  <lanius> ah maybe you are looking at the wrong diff
2007-06-30T15:57:02  <lanius> i swapped them already in the last one
2007-06-30T15:57:08  <ThomasWaldmann> first you have to check for name == newname, then for hasitem(newname)
2007-06-30T15:57:11  <ThomasWaldmann> oh, ok
2007-06-30T15:57:46  <lanius> please comment further, i'll be back later
2007-06-30T15:58:01  <ThomasWaldmann> (same for copy_item?)
2007-06-30T15:58:08  <lanius> same
2007-06-30T15:59:02  <ThomasWaldmann> +                newitem.new_revision(rev)   maybe the code would be prettier if this just returned the new revision
2007-06-30T15:59:30  <ThomasWaldmann> so you don't need newitem[rev] to use it
2007-06-30T16:01:26  <ThomasWaldmann> btw, if you are writing generic code (not moin_fs16 code), please rather use "item" than "page". maybe even for the fs16 code...
2007-06-30T16:02:23  <ThomasWaldmann> (otherwise users might be confused, if they rename some image item and get an error msg about some "page")
2007-06-30T17:30:46  <CIA-20> moin: Thomas Waldmann <tw AT waldmann-edv DOT de> * 2264:b0031a34f96d 1.7/MoinMoin/conftest.py: fixed some typos
2007-06-30T17:48:56  <xorAxAx> lanius: it would be nice if you split test_fs_moin16.py into some generic base class and the moin16 specific part
2007-06-30T17:49:09  <xorAxAx> lanius: py.test.raises(BackendError, self.backend.rename_item, pages[0], "") would go to the base class for example
2007-06-30T17:51:15  <xorAxAx> lanius: and it would be nice if you could watch the atomicness of your commits - in f3dc4d6ff9de you rename a lot of attribs but also change orthogonal semantics
2007-06-30T17:51:56  <xorAxAx> lanius: and i am still seeing a lot of nines :)
2007-06-30T17:52:52  <xorAxAx> lanius: you moved some error handling into the backend layer. but you forgot to add a pseudo _() call to the lower level strings. this is very important
2007-06-30T18:17:31  <vpv> One interesting question: should I make one token/putPage multicall per man page or pack all the man pages of an import "session" to the same multicall, which could then be quite long?
2007-06-30T18:17:59  <xorAxAx> vpv: i would batch them
2007-06-30T18:18:07  <xorAxAx> maybe 10 pages at once
2007-06-30T18:18:17  <xorAxAx> sounds most reasonable
2007-06-30T18:19:09  <vpv> ok, that's definitely doable
2007-06-30T18:35:44  <lanius> xorAxAx: what is a pseudo _() call=
2007-06-30T18:38:36  <xorAxAx> _ = lambda x:x
2007-06-30T18:39:03  <xorAxAx> the idea is that localisable text strings areonly catched iff they are enclosed into _() calls
2007-06-30T18:39:16  <xorAxAx> and currently the error message is enclosed nowhere in such _() calls
2007-06-30T18:39:54  <lanius> how does that work
2007-06-30T18:40:27  <xorAxAx> which part?
2007-06-30T18:40:43  <lanius> where does the _() method come from
2007-06-30T18:40:48  <xorAxAx> _ = lambda x:x
2007-06-30T18:40:53  <xorAxAx> in the backend
2007-06-30T18:40:59  <xorAxAx> and request._ in the itemcollection etc.
2007-06-30T18:42:30  <xorAxAx> every localisable string literal has to be wrapped by _()
2007-06-30T18:42:50  <lanius> so i just add _() and _ = lambda x:x for now?
2007-06-30T18:43:00  <xorAxAx> not only for now, thats the final solution :)
2007-06-30T18:43:18  <lanius> well "_ lambda x:x" does not do too much
2007-06-30T18:43:30  <xorAxAx> yes
2007-06-30T18:43:40  <lanius> so this might get changed
2007-06-30T18:43:42  <xorAxAx> but you have to call _() in the itemcollection code
2007-06-30T18:43:43  <xorAxAx> no
2007-06-30T18:43:50  <lanius> then there is no use
2007-06-30T18:43:53  <xorAxAx> ?
2007-06-30T18:44:07  <xorAxAx> 18:42:29 < xorAxAx> every localisable string literal has to be wrapped by _()
2007-06-30T18:44:11  <xorAxAx> thats the use
2007-06-30T18:44:22  <xorAxAx> thats how gettext works
2007-06-30T18:44:29  <lanius> but if _ = lambda x:x does nothing?
2007-06-30T18:44:37  <xorAxAx> yes, why should it do anything?
2007-06-30T18:44:42  <lanius> so where is the use
2007-06-30T18:44:46  <lanius> if it does nothing
2007-06-30T18:44:52  <xorAxAx> the gettext scanner will see the _() call
2007-06-30T18:44:59  <lanius> ah, ok
2007-06-30T18:45:25  <xorAxAx> so basically it looks like to calls for every message on every code path
2007-06-30T18:45:30  <xorAxAx> s/to/2/
2007-06-30T18:52:40  <lanius> xorAxAx: there is not really much which can be put into the super test class, the thing you mention is one of two things i find
2007-06-30T18:53:06  <xorAxAx> maybe this means that it should become more :)
2007-06-30T18:56:08  <ThomasWaldmann> hehe
2007-06-30T18:56:35  <ThomasWaldmann> does someone run a 1.5 wiki that is not at / url?
2007-06-30T19:06:53  <CIA-20> moin: Heinrich Wendel <h_wendel@cojobo.net> * 2114:b6da0d97f652 1.7-storage-hwendel/MoinMoin/storage/ (_tests/test_external.py external.py fs_moin16.py): small fixes
2007-06-30T19:06:55  <CIA-20> moin: Heinrich Wendel <h_wendel@cojobo.net> * 2115:4db5c88d688a 1.7-storage-hwendel/MoinMoin/storage/ (backends.py external.py fs_moin16.py): localize messages
2007-06-30T19:06:56  <CIA-20> moin: Heinrich Wendel <h_wendel@cojobo.net> * 2116:7b9006578b56 1.7-storage-hwendel/MoinMoin/storage/_tests/ (__init__.py test_backends.py test_fs_moin16.py): Make some things from the unittests common
2007-06-30T19:21:21  <vpv> putting many man pages in one multicall doesn't work, ValueError: too many values to unpack
2007-06-30T19:22:08  <vpv> besides, it takes too much time without the possibility to tell the user what's happening, so maybe I'll go with one page per multicall, at least for now
2007-06-30T19:22:23  <xorAxAx> then you are doing something wrong if you get that valueerror
2007-06-30T19:23:39  <vpv> oh, well that's always possible, I'll check everything again
2007-06-30T19:24:16  <xorAxAx> it means that you dont have enough names in the tuple on the left side
2007-06-30T19:53:44  <lanius> what does the deprecated thing do?
2007-06-30T19:54:00  <xorAxAx> which deprecated thing?
2007-06-30T19:55:12  <lanius> PageEditor._write_file has a deprecated keyword
2007-06-30T19:55:21  <lanius> but i don't think it is used atm
2007-06-30T19:55:49  <xorAxAx> well, that sounds pretty weird
2007-06-30T19:56:07  <xorAxAx> because people have breaking moin apis ever since without ever using a deprecated-thingie
2007-06-30T19:56:07  <lanius> ah it's a metadata key
2007-06-30T19:56:08  <lanius> hm
2007-06-30T19:56:18  <xorAxAx> ah, ok
2007-06-30T19:56:20  <lanius> what does it mean then
2007-06-30T19:56:25  <xorAxAx> see the HelpOnProcessingInstructions
2007-06-30T19:56:27  <vpv> xorAxAx: I'm doing the multicall like here http://docs.python.org/lib/node657.html so I have two values, what could be wrong?
2007-06-30T19:56:43  <xorAxAx> vpv: show me your code, not the docs :)
2007-06-30T19:57:28  <lanius> so when setting deprecated and you change the page there should be no new revision, right?
2007-06-30T19:57:33  <vpv> I'll push it soon...
2007-06-30T19:58:07  <xorAxAx> lanius: yes, and the last and the one before that revision is shown
2007-06-30T19:58:15  <lanius> and what is do_revision_backup
2007-06-30T19:58:40  <xorAxAx> it means that the pageedit save call will actually create a new revision
2007-06-30T19:58:45  <xorAxAx> otherwise it will overwrite the last one
2007-06-30T19:59:06  <lanius> ok
2007-06-30T20:03:15  <CIA-20> moin: Ville-Pekka Vainio <vpivaini AT cs DOT helsinki DOT fi> * 2295:425816ff885f 1.7-maninfo-vpv/MoinMoin/script/xmlrpc/manimport.py: First attempt at actually downloading and extracting the man files from the archives. Adds all the converted XML files to the same multicall, which crashes in the end, but all the man files get added.
2007-06-30T20:03:18  <CIA-20> moin: Thomas Waldmann <tw AT waldmann-edv DOT de> * 2296:b0031a34f96d 1.7-maninfo-vpv/MoinMoin/conftest.py: fixed some typos
2007-06-30T20:03:19  <CIA-20> moin: Ville-Pekka Vainio <vpivaini AT cs DOT helsinki DOT fi> * 2297:e480d0cc6c75 1.7-maninfo-vpv/MoinMoin/conftest.py: merge from main
2007-06-30T20:04:29  <vpv> xorAxAx: so here's the file http://hg.moinmo.in/moin/1.7-maninfo-vpv/file/425816ff885f/MoinMoin/script/xmlrpc/manimport.py
2007-06-30T20:05:05  <vpv> make_wiki_page() starts at line 70
2007-06-30T20:06:03  <xorAxAx> vpv: well, mc() will return a tuple that contains an applyauthtoken result and len(filenames) other results
2007-06-30T20:06:08  <xorAxAx> i.e. more than 2
2007-06-30T20:09:02  <vpv> ok, I have not found that good documentation on it anywhere and of course that worked for one putPage... thanks, I'll see what I can come up with ;)
2007-06-30T20:34:58  <lanius> xorAxAx: deprecated is funny, try it out, it will show the page text two times
2007-06-30T20:35:07  <xorAxAx> lanius: as i explained above
2007-06-30T20:35:44  <lanius> ah, hm, still strange formatting
2007-06-30T20:38:08  <xorAxAx> yes, one of most unintuitive "features" of moin
2007-06-30T20:47:44  <CIA-20> moin: Heinrich Wendel <h_wendel@cojobo.net> * 2117:aa18d84b16b5 1.7-storage-hwendel/MoinMoin/ (6 files in 3 dirs): PageEdtior._writeFile now uses the new storage engine
2007-06-30T20:49:34  * xorAxAx has horrible keppy flashbacks :)
2007-06-30T20:52:56  <lanius> which hopefully have nothing to do with my commit
2007-06-30T20:55:16  <xorAxAx> well, only indirectly
2007-06-30T20:55:40  <xorAxAx> because it contains the words "new storage engine" :)
2007-06-30T20:56:59  <xorAxAx> lanius: i cant see where you defined _ http://hg.alexanderweb.de/moin-1.7-storage-hwendel/file/4db5c88d688a/MoinMoin/storage/backends.py
2007-06-30T20:57:09  <CIA-20> moin: Ville-Pekka Vainio <vpivaini AT cs DOT helsinki DOT fi> * 2298:cb9fdda937a9 1.7-maninfo-vpv/MoinMoin/script/xmlrpc/manimport.py: Hopefully fix the multicall bug and the 'yum.conf.5' style man pages not working correctly bug
2007-06-30T20:59:13  <lanius> xorAxAx: at the bottom
2007-06-30T20:59:37  <xorAxAx> confusing :)
2007-06-30T21:03:54  <CIA-20> moin: Ville-Pekka Vainio <vpivaini AT cs DOT helsinki DOT fi> * 2299:f93d7157095c 1.7-maninfo-vpv/MoinMoin/script/xmlrpc/manimport.py: uncomment the tempdir removal code now that things work again
2007-06-30T21:09:00  <xorAxAx> lanius: +            newrev = self._item[0]
2007-06-30T21:09:01  <xorAxAx> wrong
2007-06-30T21:09:05  <xorAxAx> umm
2007-06-30T21:09:09  <xorAxAx> confusing!
2007-06-30T21:09:22  <xorAxAx> its totally b0rked imho
2007-06-30T21:09:39  <CIA-20> moin: Thomas Waldmann <tw AT waldmann-edv DOT de> * 2265:a607b0329922 1.7/MoinMoin/_tests/test_wikiutil.py: add tests for parsing and making of query strings
2007-06-30T21:09:40  <xorAxAx> to use 0 as inbandsignalling for a special case in the sequence protocol
2007-06-30T21:09:59  <xorAxAx> pythonic would be e.g. -1
2007-06-30T21:10:03  <xorAxAx> at this point
2007-06-30T21:10:19  <xorAxAx> i mean, for method calls its ok (on the backend level)
2007-06-30T21:10:35  <xorAxAx> but not for the sequence protocol of the item
2007-06-30T21:10:39  <xorAxAx> lanius: what do you think=
2007-06-30T21:11:43  <ThomasWaldmann> if 0 means current rev as parameter, why shouldnt it be [0] in the sequence? our sequence is reverse, so this is true anyway.
2007-06-30T21:11:56  <xorAxAx> because it looks like it is the first revision
2007-06-30T21:12:04  <xorAxAx> revisions are indexed starting from 0 in python
2007-06-30T21:12:35  <ThomasWaldmann> python does not have revisions :)
2007-06-30T21:12:44  <xorAxAx> umm, sequences
2007-06-30T21:13:35  <xorAxAx> +        for revno in olditem:
2007-06-30T21:13:35  <xorAxAx> +            if revno != 0:
2007-06-30T21:13:42  <ThomasWaldmann> so you want revno == list index?
2007-06-30T21:13:57  <ThomasWaldmann> what is if we purge some old revs?
2007-06-30T21:14:10  <xorAxAx> no, the point is that 0 should be gone on the sequence level
2007-06-30T21:14:33  <xorAxAx> and indeed, its not a sequence, so lets say mapping
2007-06-30T21:14:45  <xorAxAx> and the above loop looks weird
2007-06-30T21:14:54  <xorAxAx> the current rev is the last element returned in the loop
2007-06-30T21:15:07  <xorAxAx> so you dont need 0 on this semantic level
2007-06-30T21:15:47  <xorAxAx> so IMHO everything that operates on the itemcollection should not use 0 but -1
2007-06-30T21:16:00  <xorAxAx> which is an alias for the current rev
2007-06-30T21:16:07  <xorAxAx> 0 should not be returned when iterating
2007-06-30T21:16:12  <xorAxAx> but the last rev number
2007-06-30T21:18:10  <ThomasWaldmann> well, i guess it will be confusing at some places no matter what way you choose (as we have current==0 everywhere)
2007-06-30T21:18:15  <xorAxAx> so that it is clear that -1 is an alias and not some object in a "virtual" mapping
2007-06-30T21:18:15  <lanius> bad idea if i have to change everyting :D
2007-06-30T21:18:25  <xorAxAx> ThomasWaldmann: its not just the number
2007-06-30T21:18:33  <lanius> it is just a number
2007-06-30T21:18:36  <xorAxAx> its also the issue that he is storing the 0 and returning it
2007-06-30T21:18:48  <xorAxAx> IMHO it shall never be stored or returned
2007-06-30T21:18:57  <xorAxAx> but always just used as in alias for input parameters
2007-06-30T21:19:06  <xorAxAx> because it is useless as itself
2007-06-30T21:19:11  <lanius> no it is not
2007-06-30T21:19:11  <xorAxAx> esp. in concurrency scenarios
2007-06-30T21:19:27  <xorAxAx> 0 might mean something completly different in a few jiffies
2007-06-30T21:19:35  <lanius> that's why it is documented
2007-06-30T21:19:38  <xorAxAx> its just an invalid handle
2007-06-30T21:19:42  <xorAxAx> well, thats broken ...
2007-06-30T21:19:53  <lanius> i don't see the difference between 0 and -1
2007-06-30T21:20:13  <xorAxAx> as we concluded that its a mapping and not a list, its fine to stay with 0
2007-06-30T21:20:20  <xorAxAx> but please dont return 0 or store it
2007-06-30T21:20:31  <lanius> you mean in the fs_moin16?
2007-06-30T21:20:39  <xorAxAx> no
2007-06-30T21:20:43  <xorAxAx> external.py
2007-06-30T21:21:04  <xorAxAx> +        for revno in olditem:
2007-06-30T21:21:04  <xorAxAx> +            if revno != 0:
2007-06-30T21:21:06  <xorAxAx> is broken
2007-06-30T21:21:23  <lanius> yeah, right
2007-06-30T21:21:38  <xorAxAx> btw, i still think -1 would be nicer here
2007-06-30T21:21:47  <xorAxAx> because if you rewrite that loop like this:
2007-06-30T21:21:56  <xorAxAx> latest = olditem[0]
2007-06-30T21:22:06  <xorAxAx> for revno in olditem:
2007-06-30T21:22:13  <xorAxAx>   if revno != latest.rev ...
2007-06-30T21:22:35  <xorAxAx> then somebody might think that it could be written like above more easily like if it was -1
2007-06-30T21:24:09  <xorAxAx> s/like/than/
2007-06-30T21:24:52  <xorAxAx> the problem is inband signalling
2007-06-30T21:25:20  <xorAxAx> and -1 is not positive
2007-06-30T21:40:17  <CIA-20> moin: Thomas Waldmann <tw AT waldmann-edv DOT de> * 2111:2e5f0b2dec4e 1.6/MoinMoin/stats/ (hitcounts.py useragents.py): stats: hitcounts: use fixed date format for cache, use utc in any case, use pickle, useragents: use pickle
2007-06-30T21:53:14  <CIA-20> moin: Heinrich Wendel <h_wendel@cojobo.net> * 2118:9b581d6ee52f 1.7-storage-hwendel/MoinMoin/ (5 files in 3 dirs): Don't return 0 as revision.
2007-06-30T21:59:07  <xorAxAx> +            odlrev = olditem[revno]
2007-06-30T21:59:08  <xorAxAx> lanius:
2007-06-30T22:04:52  <lanius> yes
2007-06-30T22:06:25  <xorAxAx> do you spot the typo? :)
2007-06-30T22:06:56  <lanius> yes#
2007-06-30T22:06:57  <lanius> ;)
2007-06-30T22:29:06  <CIA-20> moin: Heinrich Wendel <h_wendel@cojobo.net> * 2119:9825594fce22 1.7-storage-hwendel/MoinMoin/storage/external.py: small fixes

MoinMoin: MoinMoinChat/Logs/moin-dev/2007-06-30 (last edited 2007-10-29 19:11:42 by localhost)