2007-05-02T00:05:35  <flowhase> re
2007-05-02T00:05:56  <xorAxAx> hi flowhase
2007-05-02T09:33:09  <ThomasWaldmann>  http://weblogs.mozillazine.org/preed/2007/04/version_control_system_shootou_1.html
2007-05-02T10:09:59  <johill> ho humm, why does moinmoin give error 500 all the time?
2007-05-02T10:10:34  <dreimark> moin
2007-05-02T10:30:21  <ThomasWaldmann> johill: retry
2007-05-02T10:41:04  <johill> yay, thanks
2007-05-02T10:41:33  <johill> that openid stuff is mostly documented on the new 1.7 docs btw
2007-05-02T10:42:00  <johill> I replied to rgl's question and sent him a link to that
2007-05-02T10:47:56  <ThomasWaldmann> johill: the 500 either comes from 1. lighttpd->fcgi->moin stopping to work or 2. from the lighttpd restart done regularly from cron because of 1.
2007-05-02T10:48:28  <johill> odd
2007-05-02T10:48:37  <johill> I never had apache/fcgi/moin stop working for me
2007-05-02T10:48:42  <johill> lighttpd bug?
2007-05-02T10:49:02  <ThomasWaldmann> no idea
2007-05-02T14:59:46  <dreimark> fpletz: how is it going on with xapian search? - always the same question ;)
2007-05-02T15:17:19  <ThomasWaldmann> maybe we need a nag bot :)
2007-05-02T15:24:43  <dreimark> :)
2007-05-02T15:39:43  <lanius> hi
2007-05-02T15:52:42  <ThomasWaldmann> moin lanius
2007-05-02T16:04:00  <lanius> xorAxAx: your also here?
2007-05-02T16:32:20  <dreimark> moin lanius
2007-05-02T16:35:42  <ThomasWaldmann> flowhase: mpathy suggests you look at the current development version of trac (trac's wiki part was forked from moin long time ago, but maybe you can steal some ideas from their genshi integration)
2007-05-02T16:39:35  <flowhase> oh
2007-05-02T16:40:22  <flowhase> when i talked with ffesti yesterday we talked about trac too, but i didn't thought that it was a moin derivate
2007-05-02T16:40:47  <flowhase> i will take a look then
2007-05-02T16:40:55  <ThomasWaldmann> it was forked from an ancient moin version
2007-05-02T16:41:51  <flowhase> how ancient are we talking?
2007-05-02T16:43:52  <ThomasWaldmann> 0.x iirc
2007-05-02T16:44:21  <flowhase> oh
2007-05-02T16:44:23  <flowhase> :>
2007-05-02T16:44:33  <flowhase> well i will investigage
2007-05-02T16:44:38  <flowhase> investigate
2007-05-02T16:51:23  <xorAxAx> lanius: now i am
2007-05-02T16:51:41  <xorAxAx> ThomasWaldmann: i couldnt find any common code
2007-05-02T16:51:47  <xorAxAx> it looks like a rewrite of the parser
2007-05-02T16:52:05  <xorAxAx> flowhase: are the results of your discussions available electronically?
2007-05-02T16:54:27  <lanius> xorAxAx: did you take a look at the file like interface? i also added some metadata keys that we need and the query function
2007-05-02T16:54:54  <xorAxAx> not yet, but i can do so now
2007-05-02T16:56:35  <xorAxAx> lanius: can you reduce methods with duplicate names to one with default arguments? python doesnt support overloading in this way :)
2007-05-02T16:57:13  <xorAxAx> """ Returns the last revision number of an item. """ <-- add "as an object" or (hopefully not) "as an integer" here please
2007-05-02T16:57:52  <xorAxAx> oh, sorry, of course thats an integer - but it shoul be added in the doc string
2007-05-02T16:58:08  <lanius> yes that's why i say number, but integer is more clera
2007-05-02T16:58:27  <xorAxAx> oh, indeed %-)
2007-05-02T16:59:03  <xorAxAx> lanius: wrt the databackend ... i think it makes more sense to move the open method to the storagebackend and rename the class
2007-05-02T16:59:38  <xorAxAx> because currently, its like an init function and you need to get 2 databackends for read/write cases
2007-05-02T17:00:01  <xorAxAx> and i think i said that it makes sense to have 2 different interfaces for reading and writing
2007-05-02T17:00:10  <xorAxAx> or did we drop that?
2007-05-02T17:00:54  <xorAxAx> hmm, i think its ok
2007-05-02T17:01:10  <xorAxAx> for "a" this way
2007-05-02T17:01:31  <xorAxAx> and for "w" as well, because "w" will truncate, right?
2007-05-02T17:01:38  <lanius> yes
2007-05-02T17:01:39  <mpathy> flowhase: Hi! You are using the xml-based part of genshi for the parsing, right?
2007-05-02T17:01:42  <xorAxAx> ok, then its fine
2007-05-02T17:01:56  <xorAxAx> lanius: do you agree to my open() hint?
2007-05-02T17:01:56  <lanius> the same is suboptimal i know
2007-05-02T17:02:33  <lanius> which one
2007-05-02T17:03:19  <xorAxAx> 16:59:03 < xorAxAx> lanius: wrt the databackend ... i think it makes more sense to move the open method to the storagebackend and rename the class
2007-05-02T17:03:22  <xorAxAx> 16:59:38 < xorAxAx> because currently, its like an init function and you need to get 2 databackends for read/write cases
2007-05-02T17:03:59  <lanius> hmm
2007-05-02T17:04:40  <lanius> in the current situation if you have opened it for e.g. reading you have to close it bevor you can open it for writing
2007-05-02T17:05:18  <xorAxAx> how is that enforced? ah, you need to add locking semantics to this model as well
2007-05-02T17:05:21  <xorAxAx> and some locking API
2007-05-02T17:05:49  <xorAxAx> (add that as a todo item)
2007-05-02T17:06:00  <johill> hm. why is it that e.g. current_revision is part of StorageBackend and not Item?
2007-05-02T17:06:27  <xorAxAx> johill: good question
2007-05-02T17:06:37  <xorAxAx> lanius: well, so there is a singleton?
2007-05-02T17:06:48  <xorAxAx> i think thats not very suitable at this point
2007-05-02T17:06:49  <johill> and similar too
2007-05-02T17:07:08  <johill> because most backends will probably need to instantiate an Item() for that if the actual filesystem code is there
2007-05-02T17:07:30  <xorAxAx> lanius: i was thinking about a speficic object that is generated
2007-05-02T17:07:34  <xorAxAx> johill: what do you mean?
2007-05-02T17:07:35  <johill> (iow, if I were designing this, I'd just have get_item() in storage backend, and do all other operations on that item)
2007-05-02T17:07:48  <flowhase> mpathy: yes
2007-05-02T17:08:17  <johill> maybe has_item() too for simplification in some places
2007-05-02T17:08:25  <flowhase> xorAxAx: i will update my pages soon
2007-05-02T17:08:32  <xorAxAx> lanius: where do you want to store the current revision?
2007-05-02T17:08:45  <lanius> too much information :D
2007-05-02T17:08:51  <lanius> not the revision, you ;)
2007-05-02T17:08:55  <mpathy> flowhase: okay.. thats good :) if I have suggestions can I write them on your wiki page?
2007-05-02T17:09:07  <lanius> well, i don't think you need access to it from outside so it's some internal thing i don't have specified yet
2007-05-02T17:09:13  <xorAxAx> lanius: well, make a list of questions and answer them serially :)
2007-05-02T17:09:29  <xorAxAx> lanius: i need explicit locking
2007-05-02T17:09:38  <lanius> that means
2007-05-02T17:09:44  <xorAxAx> lanius: because the syncronization needs to disallow edits for a short period of time
2007-05-02T17:09:55  <lanius> that means
2007-05-02T17:09:57  <xorAxAx> well, disallowing people from modifing an item
2007-05-02T17:10:09  <ThomasWaldmann> http://trac.pocoo.org/browser/tekisuto/trunk/tests/moinlexer.py < hey, that looks clean :)
2007-05-02T17:10:10  <lanius> a metadata key called locking
2007-05-02T17:10:23  <xorAxAx> lanius: so it would be an item method?
2007-05-02T17:10:29  <lanius> ye
2007-05-02T17:10:29  <lanius> s
2007-05-02T17:10:34  <xorAxAx> umm
2007-05-02T17:10:46  <xorAxAx> a meta-data key is revision-specific
2007-05-02T17:10:53  <xorAxAx> i want to lock an item though (no new revs please)
2007-05-02T17:11:18  <johill> metadata/items should probably also be immutable
2007-05-02T17:12:22  <lanius> brb
2007-05-02T17:12:22  <xorAxAx> johill: makes sense
2007-05-02T17:12:28  <ThomasWaldmann> johill: for normal use they could be immutable, but for special use, we need a way to modify them
2007-05-02T17:12:35  <johill> why?
2007-05-02T17:12:46  <ThomasWaldmann> e.g. conversion stuff
2007-05-02T17:12:56  <johill> hm
2007-05-02T17:13:09  <ThomasWaldmann> or globally adding some stuff that wasnt there before
2007-05-02T17:13:38  <johill> yeah, conversion makes sense
2007-05-02T17:13:46  <johill> and it's probably easier to handle anyway
2007-05-02T17:14:00  <johill> maybe for debugging a flag would help though, so you don't overwrite items anywhere or such. dunno
2007-05-02T17:14:20  <johill> anyway, this approach I see on the wiki page seems to be very top-down, all operations through the global backend object
2007-05-02T17:14:40  <johill> I generally very much prefer doing item operations on items, meta data operations on a meta data object etc.
2007-05-02T17:14:53  <johill> whether that internally calls to a ref to the backend doesn't matter to me ;)
2007-05-02T17:15:13  * ThomasWaldmann had similar thoughts when looking at the backend
2007-05-02T17:15:25  <johill> but of course it's lanius's design and I'm not even mentoring ;)
2007-05-02T17:19:27  <flowhase> mpathy: sure, go ahead
2007-05-02T17:19:45  <johill> battery dead, I'll look again later
2007-05-02T17:20:40  <mpathy> flowhase: I did.. I am no great programmer nor I have real detailed overview of the Moin code, but I sometimes have ideas and suggestions. If you encounter something stupid ;)
2007-05-02T17:20:51  <ThomasWaldmann> lanius: we currently have IP, hostname, userid in edit-log
2007-05-02T17:21:01  <mpathy> Have to go! Bye!
2007-05-02T17:28:38  <dreimark> bbl
2007-05-02T17:30:07  <xorAxAx> johill: why do you have to operate on the backend?
2007-05-02T17:30:14  <ThomasWaldmann> lanius: i added some comments
2007-05-02T17:30:16  <xorAxAx> johill:  the moin code will operate on the item instances
2007-05-02T17:46:50  <ThomasWaldmann> http://trac.pocoo.org/browser/tekisuto/trunk/tekisuto/__init__.py now we now why he needs utf-8 for his files :-P
2007-05-02T18:06:25  <lanius> johill: that's what we have, item operations on items, metadata operations on metadata and data operations on data, but you all need to map those to a backend, but that is code you never touch
2007-05-02T18:10:56  <lanius> ThomasWaldmann: xorAxAx: i don't think we get anywhere at the moment, when i added the changes you have 10 new things to add or change, and this can go on for month, we can't design a whole wiki, we have to decide which operations belong in the storage layer and which don't and i need your input, ideally you would just modify the page, i'll see the changes
2007-05-02T18:11:16  <xorAxAx> lanius: ok
2007-05-02T18:11:33  <xorAxAx> well, design is iterative
2007-05-02T18:11:47  <xorAxAx> esp. if not all requirements were collected before design started
2007-05-02T18:11:52  <xorAxAx> (--> reverse engineering)
2007-05-02T18:11:53  <lanius> yes it is, but i don't have the feeling we will ever come to and end
2007-05-02T18:12:12  <lanius> good software is rewritting 3x in it's lifecycle :D
2007-05-02T18:12:23  <lanius> rewritten
2007-05-02T18:14:09  <ThomasWaldmann> i guess you will need some patience when refactoring that stuff :)
2007-05-02T18:15:03  <ThomasWaldmann> i added some things to the metadata items
2007-05-02T18:16:21  <lanius> yes i see, that's good
2007-05-02T18:17:49  <lanius> ideally i would like to start coding yesterday, but that's impossible until we have a decent design
2007-05-02T18:22:33  <ThomasWaldmann> btw, StorageBackend.has_item docstring needs to be more clear
2007-05-02T18:22:57  <ThomasWaldmann> esp. when looking at current Page.exists() stuff
2007-05-02T18:24:11  <ThomasWaldmann> lanius: maybe add "even if the current revision is deleted, this will return True" if you meant it like that
2007-05-02T18:29:18  <lanius> ok
2007-05-02T18:31:57  <ThomasWaldmann> similar for remove_revision and _item
2007-05-02T18:33:27  <xorAxAx> well, either that layer knows about deleted items, or it does not
2007-05-02T18:33:37  <xorAxAx> if it doesnt, nobody needs to talk about deleted stuff :)
2007-05-02T18:34:05  <ThomasWaldmann> the problem is that some comments talk about "delete" (maybe rather meaning remove/nuke)
2007-05-02T18:34:33  <ThomasWaldmann> if delete is a metadata operation, that layer rather does not know about it
2007-05-02T18:35:04  <lanius> yes that layer does not know
2007-05-02T18:36:06  <ThomasWaldmann> btw, if we put the NAME into the metadata, list_items has one param less
2007-05-02T18:36:53  <ThomasWaldmann> but otoh, it would be slower for some storage backends
2007-05-02T18:37:33  <xorAxAx> no, the PK doesnt go into the metadata :)
2007-05-02T18:38:19  <ThomasWaldmann> well, it can go there when we need it :)
2007-05-02T18:38:43  <ThomasWaldmann> (that has some interesting applications, but maybe not now :)
2007-05-02T18:39:16  <ThomasWaldmann> lanius: the current code uses filtering functions, you use regex stuff
2007-05-02T18:39:34  <ThomasWaldmann> (for list_items)
2007-05-02T18:39:57  <ThomasWaldmann> did you think about the pros and cons?
2007-05-02T18:40:12  <lanius> no, i didn't think about filtering functions
2007-05-02T18:40:46  <ThomasWaldmann> can SQL handle regexes?
2007-05-02T18:40:52  <xorAxAx> no
2007-05-02T18:40:55  <lanius> python can
2007-05-02T18:41:28  <xorAxAx> well, selecting should be done on the lowest level possible :)
2007-05-02T18:42:22  <lanius> sql can't do filtering functions
2007-05-02T18:44:40  <xorAxAx> depends on the RDBM
2007-05-02T18:44:47  <ThomasWaldmann> lanius: there is another problem: you need to know whether it is a regex or not
2007-05-02T18:45:03  <xorAxAx> but it might make sense to define some keyword args that can be used to select
2007-05-02T18:45:03  <ThomasWaldmann> e.g. if i search for ... is that a re or not?
2007-05-02T18:45:14  <lanius> that would mean defining a whole new language
2007-05-02T18:45:20  <lanius> yes
2007-05-02T18:45:22  <xorAxAx> startswith="foo" or name="bar" or regex="baz.*baz"
2007-05-02T18:45:27  <xorAxAx> language?
2007-05-02T18:45:31  <lanius> a query languag
2007-05-02T18:45:32  <lanius> e
2007-05-02T18:45:36  <ThomasWaldmann> MQL
2007-05-02T18:45:44  <xorAxAx> lanius: moin has a query language
2007-05-02T18:45:54  <xorAxAx> ThomasWaldmann: ah, you are thinking about searches
2007-05-02T18:46:12  <xorAxAx> lanius: see HelpOnSearching
2007-05-02T18:46:34  <ThomasWaldmann> xorAxAx: no, I am still at list_items, but that seems to have search/filtering stuff
2007-05-02T18:47:03  <xorAxAx> ThomasWaldmann: regex based?
2007-05-02T18:47:07  <xorAxAx> who is using that?
2007-05-02T18:47:11  <ThomasWaldmann> lanius: maybe it is less painfull to do only very simple selection there
2007-05-02T18:48:19  <lanius> if you want to have fast searching you have to do it at this level
2007-05-02T18:48:49  <ThomasWaldmann> and i guess we have to split the mimetype field maybe
2007-05-02T18:48:56  <xorAxAx> i have an idea, lets rewrite moin in sql-on-rails
2007-05-02T18:49:03  <xorAxAx> ThomasWaldmann: why?
2007-05-02T18:49:16  <xorAxAx> lanius: you havent thought about the indexing stuff, right?
2007-05-02T18:49:39  <ThomasWaldmann> so you can list_item(major='text') # minor doesnt care
2007-05-02T18:49:40  <lanius> that is the indexing stuff
2007-05-02T18:50:33  <xorAxAx> lanius: hmm?
2007-05-02T18:50:36  <lanius> like the description says you can specify metadata keys to be indexes and the backend then cares for faster access to those indexes
2007-05-02T18:50:46  <xorAxAx> lanius: ok
2007-05-02T18:51:06  <xorAxAx> where does it say that?
2007-05-02T18:51:20  <lanius> in the description of list_item
2007-05-02T18:52:18  <xorAxAx> ok
2007-05-02T18:52:48  <xorAxAx> lanius: may i refactor the open method?
2007-05-02T18:52:54  <xorAxAx> or do you still disagree?
2007-05-02T18:55:18  <lanius> it's about concurrent reading and writing, right?
2007-05-02T18:55:41  * ThomasWaldmann has to go to LUG meeting, cu :)
2007-05-02T18:55:41  <xorAxAx> yes
2007-05-02T18:55:52  <lanius> ThomasWaldmann: have fun
2007-05-02T18:55:58  <xorAxAx> and about swapping DB blobs to disk
2007-05-02T18:56:13  <xorAxAx> if you have just one file, you have to swap it to disk for _every_ open()
2007-05-02T18:56:17  <xorAxAx> regardless of r or w
2007-05-02T18:56:24  <xorAxAx> s/file/& object/
2007-05-02T18:58:17  <xorAxAx> python doesnt have null
2007-05-02T18:58:20  <xorAxAx> its called None
2007-05-02T18:58:54  <lanius> of course
2007-05-02T18:59:01  <lanius> i don't understand this file stuff, i don't get the big picture
2007-05-02T19:01:03  <xorAxAx> hmm
2007-05-02T19:01:06  <xorAxAx> imagine this:
2007-05-02T19:01:13  <xorAxAx> there is a large ppt file in the database
2007-05-02T19:01:26  <xorAxAx> you want to let the user download the file
2007-05-02T19:01:35  <xorAxAx> requirement analysis - you need to read the file in blocks
2007-05-02T19:01:41  <xorAxAx> next use case:
2007-05-02T19:02:04  <xorAxAx> you want to add a new ppt file to the database. requirement analysis - you need to be able to write it in blocks
2007-05-02T19:02:19  <lanius> add a new or overwrite the old
2007-05-02T19:02:27  <xorAxAx> yes
2007-05-02T19:02:38  <xorAxAx> i think appending is not necessary
2007-05-02T19:02:46  <lanius> yes
2007-05-02T19:03:10  <xorAxAx> now you have a problem - if you just have a file-like object that is closed/opened in r/w, then you need to spill the 4 GB to disk, otherwise you wont be able to do writes
2007-05-02T19:04:26  <lanius> go on
2007-05-02T19:04:53  <xorAxAx> well, that would mean that you would need to copy the 4 GB from DB to the hard drive on the server for everybody who wants to download the file
2007-05-02T19:05:06  <xorAxAx> at least i dont see any other solution
2007-05-02T19:05:49  <xorAxAx> ok, i added my comments to the page
2007-05-02T19:05:55  <xorAxAx> hey, somebody edited
2007-05-02T19:06:15  <lanius> must have been me
2007-05-02T19:06:18  <xorAxAx> :-)
2007-05-02T19:06:34  <xorAxAx> lanius: now how would you implement the open() method?
2007-05-02T19:06:38  <lanius> you mean for every open / close operation the file must be cached again?
2007-05-02T19:06:46  <xorAxAx> no
2007-05-02T19:06:48  <xorAxAx> just once
2007-05-02T19:06:53  <xorAxAx> for the first open
2007-05-02T19:07:02  <xorAxAx> and that is not necessary at all
2007-05-02T19:07:10  <xorAxAx> well
2007-05-02T19:07:19  <lanius> and why would it differ with your solution
2007-05-02T19:07:43  <xorAxAx> hmm, "caching" on the drive is only problematic for append
2007-05-02T19:07:45  <xorAxAx> can we drop append? :)
2007-05-02T19:07:48  <xorAxAx> i dont see any need
2007-05-02T19:07:49  <lanius> yes
2007-05-02T19:07:52  <lanius> that was my change
2007-05-02T19:08:04  <xorAxAx> ok, another problematic idea:
2007-05-02T19:08:44  <xorAxAx> hmm, no, should work
2007-05-02T19:09:10  <xorAxAx> ok, then i just want to have a class rename (and a property instead of a method called get)
2007-05-02T19:09:26  <xorAxAx> how about data_file and DataFile?
2007-05-02T19:09:44  <xorAxAx> you can delete my "open must be moved" bullet item
2007-05-02T19:10:10  <lanius> but it must be clear that the backend must implement this interface
2007-05-02T19:10:27  <xorAxAx> ?
2007-05-02T19:10:37  <lanius> DataFile is something the Backend must provide
2007-05-02T19:10:40  <xorAxAx> yes, but not by choosing weird names, but by writing it in the docstring
2007-05-02T19:10:49  <xorAxAx> :-)
2007-05-02T19:11:37  <lanius> the Data class is the proxy between the Item Layer and the Storage Layer
2007-05-02T19:12:14  <xorAxAx> well, yes
2007-05-02T19:13:02  <lanius> and the save function is on the ItemCollection
2007-05-02T19:13:18  <lanius> and either we have setitem and a dict like interface or we use a array like interface
2007-05-02T19:14:05  <lanius> brb, just have to get something to eat before the shops are clothing
2007-05-02T19:14:34  <xorAxAx> please save, i wanted to cleanup my section (including the save stuff, yeah :))
2007-05-02T19:15:53  <lanius> i don't have it open anymore
2007-05-02T19:16:41  <xorAxAx> Diese Seite wurde zum letzten Mal um 2007-05-02 19:09:48 durch MOT43222 zum Editieren geƶffnet oder in der Vorschau angezeigt.
2007-05-02T19:16:56  <xorAxAx> still locked fr 4 minutes, you didnt cancel :)
2007-05-02T19:17:41  <xorAxAx> ok, added a line
2007-05-02T21:01:24  <xorAxAx> johill: you havent documented the Action macro since 2004
2007-05-02T21:01:26  <xorAxAx> johill: please fix that

MoinMoin: MoinMoinChat/Logs/moin-dev/2007-05-02 (last edited 2007-10-29 19:16:12 by localhost)