2006-07-10T08:50:20  <mvirkkil> xorAxAx: How did the rst formatter turn out?
2006-07-10T08:56:16  <felixw> mvirkkil: We're working on using Docutils' node tree as document tree for MoinMoin, but it may take some time till we have usable results.  The reST formatter already exists, though, and works fine.
2006-07-10T09:09:59  <mvirkkil> felixw: Nah, it uses rawhtml for everything --> doesn't work with the docbook formatter
2006-07-10T09:11:15  <mvirkkil> felixw: You are going to use the docutils' node tree as moinmoin's "native" representation of a document in memory? Will the old formatter interface get deprecated?
2006-07-10T10:13:14  <Kepplar> hey
2006-07-10T10:45:32  <felixw> mvirkkil: Yup, that's the plan.  The old formatter interface will persist for quite a long time, though, I'd assume.
2006-07-10T10:45:46  <felixw> Kepplar: Hey.
2006-07-10T10:46:07  <felixw> mvirkkil: And the old parser interface as well.
2006-07-10T10:46:54  <xorAxAx> rest formatter?
2006-07-10T10:46:55  <felixw> mvirkkil: Anyway, I'm not sure yet if this will eventually work at all.  I'll push my branch to a server soon, it's still heavily work in progress.
2006-07-10T10:46:59  <xorAxAx> felixw: what do you mean?
2006-07-10T10:47:17  <felixw> xorAxAx: reST parser, I meant.
2006-07-10T10:47:20  <xorAxAx> felixw: do you need some space on my server?
2006-07-10T10:47:31  <felixw> Yeah, I guess so.
2006-07-10T10:47:42  <felixw> Have a few minutes so I can upload my branch?
2006-07-10T10:51:00  <felixw> xorAxAx: BTW, I have the cabel (Klinke <-> Klinke) you left in Thomas' car.  Shall I drop it in your mail box (I'm away frmo 15 July to 5 August)?
2006-07-10T10:51:57  <xorAxAx> felixw: yes, please. lortzingweg 22
2006-07-10T10:52:13  <xorAxAx> felixw: --> query
2006-07-10T11:13:54  <mvirkkil> I've been thinking about extending the the {{{this is inline code}}} to support something like {{{#foo this is ''inline'' code}}}, where #foo would get mapped as a css class, and the contents would get parsed for markup. Thoughts?
2006-07-10T11:14:34  <mvirkkil> basically {{{#name text}}} --> <span class="name">text</span>
2006-07-10T11:14:40  <felixw> mvirkkil: Might well conflict with existing wiki code.
2006-07-10T11:14:53  <felixw> mvirkkil: But I'm not authoritative on this issue.
2006-07-10T11:15:06  <mvirkkil> felixw: Yes, it might.
2006-07-10T11:16:17  <xorAxAx> mvirkkil: broken
2006-07-10T11:18:17  <mvirkkil> xorAxAx: ok.
2006-07-10T11:18:19  <mvirkkil> :)
2006-07-10T11:19:07  <mvirkkil> I was just thinking that it would be similar to how you can write {{{#python\nprint hello world}}} now.
2006-07-10T11:19:22  <xorAxAx> but the latter one calls a parser
2006-07-10T11:20:10  <mvirkkil> xorAxAx: Yes.
2006-07-10T11:20:49  <mvirkkil> xorAxAx: But the user isn't really aware which route it takes. He just sees that it's styled when it comes out.
2006-07-10T11:21:10  <mvirkkil> xorAxAx: But I agree that this isn't a really great solution.
2006-07-10T11:21:20  <xorAxAx> mvirkkil: bzzzt
2006-07-10T11:21:24  <mvirkkil> xorAxAx: I'd just have a need to "tag" stuff.
2006-07-10T11:21:52  <mvirkkil> xorAxAx: Some way to say "The following piece of text is foo"
2006-07-10T11:22:05  <mvirkkil> [[Tag("foo
2006-07-10T11:22:26  <mvirkkil> A new macro would look like[[Tag("foo", "Hello world")]]
2006-07-10T11:22:38  <mvirkkil> But there are so many macros already
2006-07-10T11:28:50  <xorAxAx> felixw: here you can see it graphically: http://moin.pocoo.org:8080/moin-1.6-doctree?cmd=branchview
2006-07-10T11:31:41  <felixw> xorAxAx: Great; thanks!
2006-07-10T11:44:43  <mvirkkil> xorAxAx: Do you have a suggestion for what kind of markup moin could have for arbitrary tagging?
2006-07-10T11:45:09  <xorAxAx> mvirkkil: please explain your usecase
2006-07-10T11:46:24  <mvirkkil> xorAxAx: I want to include semantic information to a string of text. The usecase for the samantic tag would at least in the beginning be to affect the look of the text.
2006-07-10T11:47:04  <mvirkkil> So something like ctrl+a could look different.
2006-07-10T11:47:18  <mvirkkil> from just {{{ctrl+a}}}
2006-07-10T11:47:48  <mvirkkil> since we could in some way express that the "ctrl+a" is a key combination.
2006-07-10T11:48:17  <xorAxAx> and you want to map that to a docbook tag?
2006-07-10T11:48:31  <xorAxAx> it should be obvious that you cannot stack tags if you want to use anything else than xml
2006-07-10T11:48:47  <mvirkkil> xorAxAx: Well, if the output is docbook, then yes. But if the output is html I want to use it as a css class.
2006-07-10T11:49:03  <mvirkkil> xorAxAx: http://aski.hut.fi/ircohje/
2006-07-10T11:49:57  <mvirkkil> xorAxAx: There I've used two different classes of spans to style shortcuts and command lines differently.
2006-07-10T11:50:06  <xorAxAx> so?
2006-07-10T11:50:14  <xorAxAx> ah
2006-07-10T11:50:17  <mvirkkil> xorAxAx: I'd like to be able to do that in moin.
2006-07-10T11:50:46  <mvirkkil> xorAxAx: And when the target is docbook, I could map some of the tags to docbook elements, yes.
2006-07-10T11:51:27  <xorAxAx> but without nesting it somehow sucks because it doesnt scale
2006-07-10T11:52:24  <mvirkkil> Exactly. My suggestion was to extend the {{{#foo }}} to support nesting, if, and only if the "#foo" is specified. So something like  <span class="cmd">ssh <span class="replace">ktunnus</span>@kosh.hut.fi</span>
2006-07-10T11:52:54  <mvirkkil> would be {{{#cmd ssh {{{#replace ktunnus}}}@kosh.hut.fi}}}
2006-07-10T11:53:37  <xorAxAx> hmm
2006-07-10T11:54:18  <mvirkkil> xorAxAx: But I agree that using {{{ for this is not the best idea. It's just the only one I've thought up ;)
2006-07-10T11:54:29  <xorAxAx> how about [[[? :)
2006-07-10T11:55:05  <xorAxAx> [[[tt baz[[[pre foo]]]]]]]
2006-07-10T11:55:20  <xorAxAx> looks ugly as well
2006-07-10T11:55:35  <mvirkkil> yeah. Even worse, I think.
2006-07-10T11:56:02  <mvirkkil> <<foo|This is text>>
2006-07-10T11:56:10  <xorAxAx> %-)
2006-07-10T11:56:20  <mvirkkil> <<#tag This is text>>
2006-07-10T11:56:30  <mvirkkil> <<tag: This is text>>
2006-07-10T11:56:42  <xorAxAx> is dislike that #
2006-07-10T11:56:48  <mvirkkil> Hmm.. That last one looks okish..
2006-07-10T11:56:53  <xorAxAx> yeah
2006-07-10T11:57:16  <mvirkkil> <<cmd: ssh <<replace: ktunnus>>@kosh.hut.fi>>
2006-07-10T11:59:28  <mvirkkil> Using < and > is cool, because if someone wants to write "info: Use two greaterthan-signs, like this >>" it could be <<info: Use two greaterthan-signs, like this &gt;&gt>>
2006-07-10T11:59:42  <mvirkkil> And it would magically work.
2006-07-10T12:01:38  <mvirkkil> ThomasWaldmann: Thoughts about --^
2006-07-10T12:14:19  <Kepplar> So what you guys working on?
2006-07-10T12:14:50  <mvirkkil> Kepplar: xsl-templates to convert a docbook to the moinmoin syntax.
2006-07-10T12:14:58  <Kepplar> ah
2006-07-10T14:07:40  <mvirkkil> ThomasWaldmann: Did you have any comments about what was proposed?
2006-07-10T14:18:38  * ThomasWaldmann is busy
2006-07-10T15:34:13  <Kepplar> er
2006-07-10T15:34:19  <Kepplar> what does vars() do?
2006-07-10T15:34:26  <Kepplar> (please dont be what i think it does)
2006-07-10T15:34:27  <Kepplar> well
2006-07-10T15:34:31  <Kepplar> vars().update :S
2006-07-10T15:34:37  <Kepplar> better not be what i think it is ><
2006-07-10T15:34:42  * Kepplar spits on code
2006-07-10T15:47:10  <felixw> Kepplar: I suspect that writing to the vars() dictionary might be undefined.  ThomasWaldmann, can you have a look?
2006-07-10T15:47:24  <felixw> Because, I think MoinMoin is indeed writing to vars().
2006-07-10T15:47:40  <felixw> ./MoinMoin/config.py:        vars()[key] = val
2006-07-10T15:47:49  <felixw> ./MoinMoin/user.py:            vars(self)[key] = val
2006-07-10T15:52:32  <Kepplar> i wasnt actually refering to moin code :)
2006-07-10T15:52:53  <Kepplar> just looking at some code for a friend
2006-07-10T15:53:09  <Kepplar> and hes offloaded the dictionary he was handling to global namespace
2006-07-10T15:53:09  <Kepplar> :S
2006-07-10T17:25:37  <ThomasWaldmann> felixw: doesn't the code work or what's the problem?
2006-07-10T17:27:10  <felixw> ThomasWaldmann: It probably works (haven't tested), but it's prone to breakage, I'd assume.
2006-07-10T17:27:22  <felixw> ThomasWaldmann: Cause the results are undefined...
2006-07-10T17:29:02  <ThomasWaldmann> well, make and test a patch if you like :)
2006-07-10T17:29:44  <felixw> I don't care enough, sorry.  (We all are busy, I know...)
2006-07-10T17:32:39  <ThomasWaldmann> I guess at least the code in user.py is some years old and works since then
2006-07-10T19:47:04  <Kepplar> user.py will be completly revamped by storage tho
2006-07-10T19:47:12  <Kepplar> so dont need to worry :)
2006-07-10T20:15:06  <Kepplar> how do i write immutable classes?
2006-07-10T20:15:11  <Kepplar> well
2006-07-10T20:15:21  <Kepplar> how do i write classes for immutable instances?
2006-07-10T20:19:58  <felixw> Kepplar: Why don't you use Google?
2006-07-10T20:20:01  <felixw> http://groups.google.com/group/comp.lang.python/browse_frm/thread/c2e554b026a6fd26/5e99781e0a575f06?lnk=st&q=immutable+classes+group%3Acomp.lang.python&rnum=2#5e99781e0a575f06
2006-07-10T20:20:17  <felixw> Shorter: http://groups.google.com/group/comp.lang.python/browse_frm/thread/c2e554b026a6fd26/5e99781e0a575f06
2006-07-10T20:20:31  <Kepplar> i have googled for the last 20 min
2006-07-10T20:20:34  <Kepplar> nothing comes up :P
2006-07-10T20:20:47  <felixw> What about that thread?
2006-07-10T20:20:53  <felixw> And why do you need immutability?
2006-07-10T20:21:13  <Kepplar> (looking at it now)
2006-07-10T20:21:18  <Kepplar> Revisions are immutable
2006-07-10T20:21:48  <felixw> Why do you need to enforce immutability?
2006-07-10T20:22:41  <Kepplar> because changes arent allowed on the object
2006-07-10T20:22:55  <Kepplar> changes should automatically spawn newrevsiion
2006-07-10T20:23:14  <felixw> Sounds like magic.
2006-07-10T20:23:17  <felixw> Don't. :-)
2006-07-10T20:23:23  <Kepplar> ?
2006-07-10T20:23:45  <felixw> Don't automatically spawn new revisions (my guts instinct tells me, at least).
2006-07-10T20:23:53  <felixw> Explicit is better than implicit.
2006-07-10T20:23:54  <Kepplar> has to
2006-07-10T20:23:57  <Kepplar> true
2006-07-10T20:24:36  <Kepplar> able to modify the object may cause inconsistancies
2006-07-10T20:24:48  <felixw> Then you could override __setattr__.
2006-07-10T20:24:50  <felixw> Or something.
2006-07-10T20:25:18  <felixw> To make sure that once the object is completely created, nobody can modify it anymore.
2006-07-10T20:25:35  <felixw> But then, I'd recommend you take care of that later and get the functionality implemented.
2006-07-10T20:25:58  <Kepplar> but it may need to alter itself
2006-07-10T20:26:05  <felixw> It's not really worth bothering, I think.  Just write correct code (i.e. tests to make sure your code is correct).
2006-07-10T20:26:09  <felixw> Oh, OK.
2006-07-10T20:26:12  <felixw> But then it's not immutable.
2006-07-10T20:26:28  <Kepplar> plus i'd have a fiddly time creating a clone method
2006-07-10T20:26:29  <felixw> Why not ignore the issue?
2006-07-10T20:26:33  <Kepplar> as not everything is identical
2006-07-10T20:26:41  <Kepplar> felixw: i did
2006-07-10T20:26:46  <Kepplar> its now thrown up problems
2006-07-10T20:26:52  <felixw> Oh, OK.
2006-07-10T20:27:21  <Kepplar> what i need is external access readonly
2006-07-10T20:27:26  <Kepplar> internal read/write
2006-07-10T20:27:39  <Kepplar> and the ability to partially clone the object
2006-07-10T20:27:52  <felixw> Why don't you simply *not write* externally?
2006-07-10T20:27:55  <felixw> Why enforce it?
2006-07-10T20:28:00  <felixw> Do you have unit tests?
2006-07-10T20:28:03  <felixw> Or any other tests?
2006-07-10T20:28:08  <Kepplar> not at that stage
2006-07-10T20:28:12  <felixw> See.
2006-07-10T20:28:17  <felixw> You should write tests instead.
2006-07-10T20:28:20  <Kepplar> if i dont force it any accidental modification
2006-07-10T20:28:27  <Kepplar> will cause a massive system upset
2006-07-10T20:28:36  <felixw> Write it later.
2006-07-10T20:28:39  <Kepplar> simple principle of defensive programming
2006-07-10T20:28:58  <felixw> At the beginning, tests are for catching programming errors, not access restrictions.
2006-07-10T20:29:08  <Kepplar> ?
2006-07-10T20:29:14  <felixw> It's a lot of effort, and you might change your system later anyway.
2006-07-10T20:29:24  <felixw> So don't.  Write tests instead to make sure your code is correct.
2006-07-10T20:29:32  <felixw> You know test-driven development?
2006-07-10T20:29:35  <Kepplar> yes
2006-07-10T20:29:42  <felixw> Why not do it?
2006-07-10T20:29:51  <Kepplar> i kinda am
2006-07-10T20:29:54  <Kepplar> im writing everything
2006-07-10T20:30:00  <Kepplar> then running it through tests
2006-07-10T20:30:10  <Kepplar> just the way its all worked out since we ditched the flat api
2006-07-10T20:30:58  <Kepplar> i have started on the unit tests
2006-07-10T20:31:07  <Kepplar> just havent run them
2006-07-10T20:31:10  <Kepplar> as it changing too fast
2006-07-10T20:31:27  <felixw> Well, you *can* override __setattr__ and do magic like internally calling object.__setattr__(self, ...) to circumvent self.__setattr__.
2006-07-10T20:32:16  <Kepplar> how does that work?
2006-07-10T20:32:24  <felixw> Figure it out yourself
2006-07-10T20:32:29  <Kepplar> im using properties actually
2006-07-10T20:32:33  <felixw> If it takes too long, spend your time on better things.
2006-07-10T20:32:39  <felixw> Like getting your tests working.
2006-07-10T20:32:52  <felixw> And try to do step-by-step refactoring, not everything at once.
2006-07-10T20:33:09  <Kepplar> yes if you read my spec thats exactly what i proposed
2006-07-10T20:33:15  <Kepplar> but since my flat api was thrown out
2006-07-10T20:33:16  <felixw> Otherwise you'll have a hard time getting the system (and the tests) running after the big refactoring.
2006-07-10T20:33:33  <Kepplar> its making it nigh impossible for effective gradual implimentation
2006-07-10T20:33:46  <Kepplar> as a result i am implimenting storage mechaism and then migrating everything to it at once
2006-07-10T20:34:36  <felixw> *shrug*  It's dangerous to be sure.  You might consider writing a compatibility layer which you can throw away later, just to get step-by-step refactoring.
2006-07-10T20:34:43  <felixw> But I haven't your spec.
2006-07-10T20:34:47  <Kepplar> an adapter
2006-07-10T20:34:48  <felixw> I'm really just guessing.
2006-07-10T20:34:50  <felixw> Yeah.
2006-07-10T20:34:51  <Kepplar> which is what my specs said :)
2006-07-10T20:35:00  <Kepplar> its impossible now
2006-07-10T20:35:00  <Kepplar> well
2006-07-10T20:35:04  <Kepplar> its pointless now
2006-07-10T20:35:06  <Kepplar> way too much effort
2006-07-10T20:35:11  <Kepplar> because it isnt a flat api
2006-07-10T20:38:05  <Kepplar> hmm
2006-07-10T21:12:23  <Kepplar> mwha!
2006-07-10T21:12:25  <Kepplar> solved it
2006-07-10T21:46:24  <Kepplar> ThomasWaldmann: where is conflict management done?
2006-07-10T21:58:48  <ThomasWaldmann> you mean 2 people saving the same page?
2006-07-10T21:59:02  <Kepplar> yea
2006-07-10T21:59:11  <Kepplar> oh and does None in properties imply normal access?
2006-07-10T21:59:26  <Kepplar> ive got a cool system that sorts out everything =)
2006-07-10T21:59:27  <ThomasWaldmann> in PageEditor.py
2006-07-10T21:59:31  <Kepplar> ah cool
2006-07-10T21:59:34  <Kepplar> so its inscope
2006-07-10T21:59:35  <Kepplar> basically
2006-07-10T21:59:43  <ThomasWaldmann> inscope?
2006-07-10T21:59:47  <Kepplar> of the project
2006-07-10T21:59:55  <ThomasWaldmann> not of yours
2006-07-10T22:00:01  <Kepplar> well i have to hook it up :)
2006-07-10T22:00:50  <Kepplar> basically Item's have revisions inside them. you pull one put, it creates object, fetching metadata by default from disk. if you try to access the data it pulls it out on demand
2006-07-10T22:00:53  <Kepplar> right
2006-07-10T22:01:09  <Kepplar> but on item revision object creation within item it also runs lock()
2006-07-10T22:01:16  <Kepplar> which effectively makes it readonly
2006-07-10T22:01:32  <Kepplar> to create a new revision one uses clone() on the item revision
2006-07-10T22:01:42  <Kepplar> which creates a more or less identical copy but without lock on
2006-07-10T22:01:51  <Kepplar> this is then add() or __add()__ to the item
2006-07-10T22:02:05  <Kepplar> which "registers" the new version, giving it a revision number and saving it to storage
2006-07-10T22:02:27  <Kepplar> and once thats done, locks the object (incase for some reason its accessed)
2006-07-10T22:02:36  <ThomasWaldmann> you keep multi-process in mind?
2006-07-10T22:02:49  <Kepplar> thats the only bit im unsure about
2006-07-10T22:02:56  <Kepplar> I was hoping you could advise me on how to proceed
2006-07-10T22:03:19  <Kepplar> a locked item should be fine, as its just read access
2006-07-10T22:03:27  <ThomasWaldmann> well, you have to do the critical stuff on DISK
2006-07-10T22:03:36  <Kepplar> critical stuff like?
2006-07-10T22:04:39  <ThomasWaldmann> writelock, reading itemrev, incrementing it, storing it back, writelock release
2006-07-10T22:05:21  <ThomasWaldmann> and you have to first put data on disk, then metadata
2006-07-10T22:05:49  <Kepplar> sorry ive lost you right after writelock :)
2006-07-10T22:06:57  <ThomasWaldmann> there must not be 2 processes modifying item revision at the same time
2006-07-10T22:07:44  <Kepplar> you mean there must not be 2 processes in the process of creating a new revision?
2006-07-10T22:07:59  <ThomasWaldmann> yes
2006-07-10T22:08:06  <Kepplar> but you sorta can currently
2006-07-10T22:08:14  <Kepplar> and it does all that /!\ stuff
2006-07-10T22:08:41  <ThomasWaldmann> this is on a bigger scale
2006-07-10T22:09:04  <ThomasWaldmann> i am talking about the moment when it really gets put on disk
2006-07-10T22:09:13  <Kepplar> do we store (or does it generate) a diff between current revision and the immediate one before it .. or the originating revision if the new revision is a modification on an ancient revision?
2006-07-10T22:09:18  <Kepplar> oh
2006-07-10T22:09:18  <Kepplar> yea
2006-07-10T22:09:22  <Kepplar> thats SI stuff
2006-07-10T22:09:27  <Kepplar> so flatfile module
2006-07-10T22:09:37  <Kepplar> there was one issue i had actually.. er..
2006-07-10T22:09:45  <Kepplar> yea
2006-07-10T22:09:45  <ThomasWaldmann> we dont store diffs
2006-07-10T22:10:03  <Kepplar> whether sorting out revision number and stuff should be done in the abstraction layer or the storage implementation
2006-07-10T22:10:10  <Kepplar> as I can imagine things like CVS doing its own thing
2006-07-10T22:12:07  <ThomasWaldmann> sure. but maybe just implement a simple thing and dont make it too complicated or you will maybe not reach the goal.
2006-07-10T22:13:39  <Kepplar> ok
2006-07-10T22:13:49  <Kepplar> something we could always refactor later
2006-07-10T22:14:26  <Kepplar> ok, now that ive sorted this, i think only thing i really need to think about before test/intergrating/tidying up is renaming and deleting
2006-07-10T22:18:13  <ThomasWaldmann> deletion is current just saving an empty revision, so that shouldnt be too hard
2006-07-10T22:19:34  <ThomasWaldmann> renaming is a bigger problem, but I guess you should just keep that as is in the 1.5 storage
2006-07-10T22:20:15  <ThomasWaldmann> for the new fs storage, we need some mass rename of item and subitems, but we can do that later
2006-07-10T22:20:29  <Kepplar> yea
2006-07-10T22:20:35  <Kepplar> maybe in the future
2006-07-10T22:20:37  <ThomasWaldmann> what I would really like to see soon is some working code
2006-07-10T22:20:51  <Kepplar> i can implement __cmp__ between item revision's and it makes a diff!
2006-07-10T22:21:00  <ThomasWaldmann> maybe start with read-only stuff
2006-07-10T22:21:21  <ThomasWaldmann> cmp doesnt make diffs
2006-07-10T22:21:43  <Kepplar> yea, nothign will work until i finish up on this readonly access stuff (which is virtually done)
2006-07-10T22:22:17  <Kepplar> is there an OO way to cmp() strings?
2006-07-10T22:22:39  <Kepplar> (im comparing item revision data - i dont want to send stuff to storage if its identical
2006-07-10T22:22:47  <Kepplar> er hold on
2006-07-10T22:22:52  <Kepplar> its not going to storage anymore
2006-07-10T22:22:53  <Kepplar> hmm
2006-07-10T22:23:23  <Kepplar> hmm
2006-07-10T22:23:30  <Kepplar> how does attachments work if its too big for memory?
2006-07-10T22:23:45  <Kepplar> im going to need to run it slowly onto storage not at the end
2006-07-10T22:23:52  <ThomasWaldmann> i guess that would be quite slow
2006-07-10T22:24:30  <ThomasWaldmann> at least at upload time (POSTS complete thing over a form field)
2006-07-10T22:24:33  <Kepplar> hmm suppose it will auto page on system virtual memory
2006-07-10T22:24:36  <Kepplar> btw
2006-07-10T22:24:38  <Kepplar> i was thinking
2006-07-10T22:24:48  <Kepplar> prehaps a Moin hardware applience would be good thing to market :)
2006-07-10T22:25:24  <ThomasWaldmann> you want to have one? :)
2006-07-10T22:25:35  <Kepplar> well i thinking for companies :)
2006-07-10T22:32:49  <Kepplar> imagine the support contracts 8)
2006-07-10T22:33:59  <ThomasWaldmann> we do company support :)
2006-07-10T22:34:51  <Kepplar> does revision revert delete revision that are lost?
2006-07-10T22:35:08  <ThomasWaldmann> ?
2006-07-10T22:35:58  <Kepplar> you get all this spam
2006-07-10T22:36:07  <Kepplar> and you revert the revision
2006-07-10T22:36:10  <Kepplar> does that still get stored?
2006-07-10T22:36:22  <ThomasWaldmann> everything is stored
2006-07-10T22:37:00  <Kepplar> hmm
2006-07-10T22:38:41  <ThomasWaldmann> this is one of the things why wiki works
2006-07-10T22:39:02  <Kepplar> yea
2006-07-10T22:39:05  <ThomasWaldmann> you can implement a nuke() call at the end, if you have time left
2006-07-10T22:39:15  <Kepplar> should storage assume its being passed a filesystem safe wikiname?
2006-07-10T22:39:19  <ThomasWaldmann> but that won't be available for non-admins
2006-07-10T22:39:40  <Kepplar> doesnt matter if these no time for nuke, ill do it after SoC
2006-07-10T22:39:51  <ThomasWaldmann> of course it will get a Unicode object with the wikiname
2006-07-10T22:40:08  <ThomasWaldmann> ANY unicode name
2006-07-10T22:40:40  <Kepplar> im refering to the wikiutil functions to fs safe them
2006-07-10T22:41:15  <ThomasWaldmann> quotewikinamefs is what the fs storage will use to make it safe to store on the FS
2006-07-10T22:42:17  <Kepplar> ok
2006-07-10T22:42:21  <Kepplar> so flatfile module
2006-07-10T22:42:42  <Kepplar> you know that lock
2006-07-10T22:42:52  <Kepplar> the file system already has a lock mechaism for loaded files
2006-07-10T22:43:45  <ThomasWaldmann> what's the question exactly?
2006-07-10T22:44:45  <Kepplar> why dont we just handle the fs's eror that someones modifying the file and not had a manual semephore
2006-07-10T22:44:55  <Kepplar> as if another program entirely is editing a file it will miss it
2006-07-10T22:45:40  <ThomasWaldmann> maybe leave that for the optimization step
2006-07-10T22:49:07  <Kepplar> tomorrow i tidy up documentation
2006-07-10T22:49:29  <Kepplar> and i will probably start looking at replacing soem of the true/falses with exceptions
2006-07-10T22:49:38  <Kepplar> then get test cases in for the rest of the week
2006-07-10T22:49:45  <Kepplar> then start integration
2006-07-10T22:50:15  <ThomasWaldmann> keep an eye on your schedule
2006-07-10T22:51:09  <Kepplar> 5 weeks left?
2006-07-10T22:52:10  <ThomasWaldmann> well, rather look at total amount to do, time already gone, how much is done already and how much is left to do
2006-07-10T22:52:44  <Kepplar> way over half way if thats what you mean
2006-07-10T22:53:20  <ThomasWaldmann> you mean what's left?
2006-07-10T22:53:47  <Kepplar> you think there should be a seperate "new" revision and new "wikiname" functionality on the storage implementation or should set_metadata set_data assume if it doesnt exist, make?
2006-07-10T22:54:00  <Kepplar> only real thing left is integration and tidying up
2006-07-10T22:54:20  <Kepplar> never the less, i'll merge with main before i start that swap over
2006-07-10T22:55:35  <ThomasWaldmann> Kepplar: a save on a nonexisting item will create that item and its first revision
2006-07-10T22:55:56  <Kepplar> and do you think there should be a get latest revision number function directly?
2006-07-10T22:56:27  <ThomasWaldmann> I guess you underestimate the amount of time needed by that integration/tidying up part
2006-07-10T22:57:27  <Kepplar> yea, but there isnt a "Save revision" on the storage implementation only components like save data and save metadata, the whole "save revision" is what im tieing up at the moment. What im saying is should this "save revision" (in abstract layer) explicatly ask storage implementation to make directories or whatnot
2006-07-10T22:58:25  <Kepplar> or implicatly create them if set_metadata / data is hit?
2006-07-10T22:58:57  <ThomasWaldmann> i guess it doesn't matter. it just matters that it is done.
2006-07-10T22:59:42  <ThomasWaldmann> for the upper layer code some implicit creation would be easier i guess
2006-07-10T23:00:20  <ThomasWaldmann> btw, save data and save metadata is always used together.
2006-07-10T23:00:53  <ThomasWaldmann> that means, if you change data, it will create a new pair of (meta, data).
2006-07-10T23:01:25  <ThomasWaldmann> if you change meta by the user interface, it will also create a new pair of (meta, data), even if the data is unchanged.
2006-07-10T23:03:15  <ThomasWaldmann> so the revision number of the metadata file will always be the same as the one of the data file
2006-07-10T23:09:12  <Kepplar> uea
2006-07-10T23:09:33  <Kepplar> im starting to think of replacing setmetadata/data
2006-07-10T23:09:34  <Kepplar> or
2006-07-10T23:09:36  <Kepplar> easy wauy
2006-07-10T23:09:51  <Kepplar> make a wrapper that does both (takes list of them)
2006-07-10T23:09:58  <Kepplar> and have that exposed on the api
2006-07-10T23:10:00  <Kepplar> saves time
2006-07-10T23:10:05  <Kepplar> 2 min work
2006-07-10T23:10:08  <Kepplar> not a tuple though
2006-07-10T23:10:12  <Kepplar> as immutable = expensive and pointless
2006-07-10T23:11:39  <Kepplar> oh
2006-07-10T23:11:53  <Kepplar> what mimetype/itemtype should i assume first revision of a new item to be?
2006-07-10T23:12:17  <ThomasWaldmann> the one that is given :)
2006-07-10T23:13:46  <Kepplar> init(self, mimetype)
2006-07-10T23:13:48  <Kepplar> you mean?
2006-07-10T23:13:53  <Kepplar> shouldnt we have a default?
2006-07-10T23:13:54  <Kepplar> hmm
2006-07-10T23:14:04  <Kepplar> but when you goto a random page that doesnt exist
2006-07-10T23:14:14  <Kepplar> moin.cgi/NewPageHere
2006-07-10T23:14:17  <Kepplar> it doesnt know really
2006-07-10T23:15:04  <ThomasWaldmann> i guess it will offer you some choices. either upload some file and give mimetype, or create a text/wiki item or ..
2006-07-10T23:15:35  <ThomasWaldmann> but the mimetype is somehow decided by the user and the UI code, not the storage code.
2006-07-10T23:16:24  <ThomasWaldmann> the only thing the lower layer code could take care of is that there IS some mimetype defined
2006-07-10T23:16:42  <Kepplar> IS?
2006-07-10T23:16:51  <Kepplar> that normal though
2006-07-10T23:16:52  <Kepplar> ok
2006-07-10T23:16:54  <Kepplar> pushed todays stuff
2006-07-10T23:18:33  <ThomasWaldmann> +    def __new__ ():
2006-07-10T23:18:39  <ThomasWaldmann> what's this?
2006-07-10T23:20:47  <ThomasWaldmann> +        if self.lock is False:
2006-07-10T23:22:09  <ThomasWaldmann> if you do that once again, you will have to read pep8 and the python docs until you can recite them in your sleep >:)
2006-07-10T23:23:30  <ThomasWaldmann>          if self._str_output == None:   <- you forgot one of those at least
2006-07-10T23:26:32  <ThomasWaldmann> the semantics is "if TruthValue: ...", so if self.lock contains a truth value, you can directly use that (or use the negation of it, using "not self.lock")
2006-07-10T23:40:55  * ThomasWaldmann sleeps. gn.
2006-07-10T23:50:57  <Kepplar> ref: __new__ ... its like __init__ but prior to the object creation
2006-07-10T23:51:27  <Kepplar> ref: is/== i thought you said use is?
2006-07-10T23:51:42  <Kepplar> oh yea
2006-07-10T23:51:45  <Kepplar> i see what you mean
2006-07-10T23:51:56  <Kepplar> probably more expensive too
2006-07-10T23:52:03  <Kepplar> sorry im just a bit too explict
2006-07-10T23:52:26  <Kepplar> noim noim

MoinMoin: MoinMoinChat/Logs/moin-dev/2006-07-10 (last edited 2007-10-29 19:08:33 by localhost)