2006-05-30T00:15:24 <xorAxAx> heh, so e-mail doesnt work :)
2006-05-30T00:18:36 <fpletz> hehe
2006-05-30T00:32:12 <Kepplar> xorAxAx: can you explain that a little more?
2006-05-30T00:32:22 <xorAxAx> Kepplar: what exactly?
2006-05-30T00:33:27 <Kepplar> 21:00 < xorAxAx> Kepplar: i would like to see serialisable meta-data
2006-05-30T00:33:27 <Kepplar> 21:00 < xorAxAx> Kepplar: i.e. it should be possible to request a string that describes the metadata of a page and convert it back to your internal structures
2006-05-30T00:34:14 <Kepplar> it being serailisable or how it is is dependant on the storage implementation
2006-05-30T00:35:19 <xorAxAx> Kepplar: such code should reside in the item class
2006-05-30T00:35:40 <xorAxAx> Kepplar: the item should know how to read serialised data and serialise its own data
2006-05-30T00:35:41 <Kepplar> the item class would just delegate that to the storage implementation
2006-05-30T00:36:04 <Kepplar> nah as that would wreck everything for a OODB
2006-05-30T00:36:44 <Kepplar> we can write a default one in the storage implimentation abstract class
2006-05-30T00:36:50 <Kepplar> which can be overriden as requested
2006-05-30T00:36:53 <Kepplar> that would make sense
2006-05-30T00:37:21 <xorAxAx> no, this should NOT be delegated
2006-05-30T00:37:26 <Kepplar> why?
2006-05-30T00:37:32 <xorAxAx> as the serialised form has to be independent from the actual engine
2006-05-30T00:37:38 <xorAxAx> otherwise there was no point
2006-05-30T00:37:39 <Kepplar> disagreed
2006-05-30T00:37:45 <xorAxAx> but trust me, this is 5 lines of python code
2006-05-30T00:37:49 <xorAxAx> Kepplar: ?
2006-05-30T00:37:51 <Kepplar> i know this
2006-05-30T00:38:02 <Kepplar> but it should be in the storage implementation after all that controls HOW its stored
2006-05-30T00:38:11 <xorAxAx> Kepplar: thats a completly different point
2006-05-30T00:38:35 <Kepplar> not at all, how it serialises is dependant on the storage implemenation
2006-05-30T00:39:11 <xorAxAx> no, its not
2006-05-30T00:39:16 <Kepplar> how?
2006-05-30T00:39:28 <xorAxAx> the metadata consists of rdf tuples
2006-05-30T00:39:36 <xorAxAx> pagename, predicate, object
2006-05-30T00:39:47 <xorAxAx> every SE stores it differently
2006-05-30T00:40:01 <xorAxAx> in the wiki, i need a standardised serialisation format, though
2006-05-30T00:40:09 <xorAxAx> in order to process it further
2006-05-30T00:40:12 <Kepplar> oh you mean from the input?
2006-05-30T00:40:16 <Kepplar> from the wiki side?
2006-05-30T00:40:24 <xorAxAx> from the editing side? no
2006-05-30T00:40:30 <xorAxAx> i need this for sync :)
2006-05-30T00:40:40 <xorAxAx> i am not talking about actual storage
2006-05-30T00:40:45 <Kepplar> oh?
2006-05-30T00:41:56 <Kepplar> i need to head to bed, if you want to explain more ill read it in the morning :) nn
2006-05-30T00:42:34 <xorAxAx> i just want some method item.dumpMetadata() and expect a string
2006-05-30T00:42:40 <xorAxAx> Kepplar: is that clear? :)
2006-05-30T03:33:05 <aweil> is there some script to make a 'moin-tree' from a file tree?
2006-05-30T09:19:07 <ThomasWaldmann> aweil: no
2006-05-30T09:21:38 <ThomasWaldmann> xorAxAx: that dumpMetaData() can be ripped out of MetaDict class
2006-05-30T09:21:47 <ThomasWaldmann> (see wikiutil)
2006-05-30T10:23:30 <xorAxAx> aweil: wrong channel ;-)
2006-05-30T10:32:09 <Kepplar> metadict class?
2006-05-30T10:33:49 <xorAxAx> Kepplar: the one thomas has talked about a few times, i think its in wikiutil
2006-05-30T10:34:14 <Kepplar> what does it do?
2006-05-30T10:36:06 <xorAxAx> it simply offers serialisation/deserialisation support for metadata in a specific format
2006-05-30T10:36:19 <xorAxAx> and dict-like access
2006-05-30T10:37:46 <ThomasWaldmann> that just could be teared into 2 parts
2006-05-30T10:38:06 <ThomasWaldmann> one generic baseclass with serialisation to str
2006-05-30T10:38:29 <ThomasWaldmann> and one specific derived class that uses pickle and file storage to disk
2006-05-30T10:38:49 <xorAxAx> yeah, its nothing complex compared to the other problems Kepplar might encounter :)
2006-05-30T10:39:00 <Kepplar> lol
2006-05-30T10:39:50 <Kepplar> I want to get the api completed today (working on my industiral placement report this morning, so will be afternoon)
2006-05-30T12:43:10 <aweil> xorAxAx: maybe, at least here I got an answer! oh, morning to all!
2006-05-30T12:43:32 <xorAxAx> moin
2006-05-30T13:33:40 <mvirkkil> hi guys :)
2006-05-30T13:34:21 <mvirkkil> xorAxAx: I decided to rip out Petr's way of outputing the stuf, effectly killing Include-macro support.
2006-05-30T13:34:48 <mvirkkil> xorAxAx: But it was buggy with the include macro anyway, and that fixed the "no doctype"-bug.
2006-05-30T13:35:16 <xorAxAx> mvirkkil: ok, but you will need some include-like support anyway :)
2006-05-30T13:35:18 <mvirkkil> xorAxAx: I'll solve the include macro some other way, after all, I need it for implementing generation of multi-page-docbooks :)
2006-05-30T13:35:27 <xorAxAx> exactly :)
2006-05-30T13:35:28 <mvirkkil> xorAxAx: Yeah :P
2006-05-30T13:35:47 <mvirkkil> xorAxAx: Great minds think alike ;)
2006-05-30T13:36:05 <xorAxAx> hehe
2006-05-30T13:37:58 <mvirkkil> xorAxAx: My mentor went partying for the rest of the week (to a Redhat Summit somwhere), and I'd like to iron out some specifications next.. So I probably won't be working much with that part.
2006-05-30T13:38:52 <mvirkkil> xorAxAx: Instead I'll write some docbook specific unit tests. Stuff to test the most rudimentary stuff, like is the xml declaration there etc.
2006-05-30T13:39:25 <xorAxAx> good idea
2006-05-30T13:39:30 <mvirkkil> In hopes that with these tests, it won't break the same way again :)
2006-05-30T13:39:56 <xorAxAx> yeah
2006-05-30T13:40:08 <xorAxAx> maybe you can even try some rountripping tests :)
2006-05-30T13:40:13 <xorAxAx> round-tripping
2006-05-30T13:51:31 <mvirkkil> xorAxAx: What do you mean? Like first converting to wikisyntax and then back to docbook?
2006-05-30T13:52:00 <mvirkkil> xorAxAx: Because I currently havn't looked at any way to generate wiki syntax from docbooks?
2006-05-30T13:52:03 <mvirkkil> .
2006-05-30T13:52:32 <xorAxAx> mvirkkil: hmm
2006-05-30T13:52:44 <xorAxAx> mvirkkil: moin can generate html from docbook
2006-05-30T13:52:59 <mvirkkil> xorAxAx: Yeah, using xslt.
2006-05-30T13:53:16 <mvirkkil> xorAxAx: It basically just runs the standard docbook->html scripts inside moin.
2006-05-30T13:53:21 <xorAxAx> yeah, sure
2006-05-30T13:53:26 <xorAxAx> ok, that doesnt make sense
2006-05-30T13:53:51 <mvirkkil> xorAxAx: I don't think it calls any formatter methods.
2006-05-30T13:53:58 <mvirkkil> xorAxAx: But I'm not sure.
2006-05-30T13:54:05 <xorAxAx> yeah ...
2006-05-30T13:54:11 <mvirkkil> xorAxAx: I'm at work atm so I can't really check.
2006-05-30T14:11:34 <xorAxAx> no, forget my idea ...
2006-05-30T19:43:05 <Kepplar> moin
2006-05-30T19:47:08 <xorAxAx> hi Kepplar :)
2006-05-30T19:51:34 <Kepplar> dsl broke all afternoon :(
2006-05-30T19:51:55 <Kepplar> did a little more code
2006-05-30T19:52:06 <xorAxAx> thats the nice things about dvcs - you dont mind :)
2006-05-30T19:52:23 <Kepplar> wondering how to arrange the factory for the storage layer
2006-05-30T19:52:25 <Kepplar> createItem()
2006-05-30T19:52:29 <Kepplar> factory method
2006-05-30T19:52:48 <Kepplar> except how should one specify a class derived from item
2006-05-30T19:53:01 <Kepplar> seperate factory or parsing it with.. hmm maybe builder design pattern
2006-05-30T19:56:28 <ThomasWaldmann> moin
2006-05-30T19:56:46 <ThomasWaldmann> broken dsl helps coding :)
2006-05-30T19:57:47 <ThomasWaldmann> Kepplar: a generic item can instantiate and proxy the specific item
2006-05-30T19:57:55 <ThomasWaldmann> see moin 2.0 :)
2006-05-30T19:58:09 <Kepplar> where specifically?
2006-05-30T19:58:49 <ThomasWaldmann> http://hg.thinkmo.de/moin/2.0?f=712bd2d4253c;file=MoinMoin/Item.py
2006-05-30T19:58:56 <xorAxAx> Kepplar: what is a transcript? (cf. latest mail by LH on -accepted)
2006-05-30T19:59:57 <Kepplar> let me guess, they want uni transcript?
2006-05-30T20:00:08 <xorAxAx> the mail is not very specific
2006-05-30T20:00:12 <xorAxAx> what is a uni transcript?
2006-05-30T20:00:42 <ThomasWaldmann> "immatrikulationsbescheinigung" maybe?
2006-05-30T20:01:06 <xorAxAx> perhaps
2006-05-30T20:01:55 <Kepplar> proof your at uni
2006-05-30T20:02:04 <Kepplar> back in 15
2006-05-30T20:02:20 <Kepplar> or not
2006-05-30T20:02:21 <Kepplar> back
2006-05-30T20:02:21 <Kepplar> :)
2006-05-30T20:02:30 <ThomasWaldmann> 15ms
2006-05-30T20:03:17 <Kepplar> ok, i would like to firm up areas of the design
2006-05-30T20:03:25 <Kepplar> revisions are just different item objects?
2006-05-30T20:04:16 <xorAxAx> different version of an object of the same name
2006-05-30T20:04:34 <Kepplar> hmm
2006-05-30T20:04:35 <xorAxAx> ensuring a unique (interwiki-moniker, pagename, revno) tuple
2006-05-30T20:04:47 <Kepplar> moniker?
2006-05-30T20:04:52 <ThomasWaldmann> i guess we need an "Item" class and maybe also an "ItemRevision" class
2006-05-30T20:05:04 <Kepplar> Item Revisions within Item
2006-05-30T20:05:09 <xorAxAx> yes
2006-05-30T20:05:11 <ThomasWaldmann> (just to avoid the confusion the current code has sometimes)
2006-05-30T20:05:17 <Kepplar> Item class a new-style class inheriting from List?
2006-05-30T20:05:23 <xorAxAx> no
2006-05-30T20:05:36 <xorAxAx> __getitem__
2006-05-30T20:05:47 <xorAxAx> makes it accept slicing
2006-05-30T20:05:50 <xorAxAx> if somebody wants that
2006-05-30T20:06:05 <Kepplar> ?
2006-05-30T20:06:20 <xorAxAx> you dont need a list-subclass
2006-05-30T20:06:33 <xorAxAx> item[4] was possible if you define __getitem__
2006-05-30T20:06:40 <Kepplar> what the hell is __getitem__?
2006-05-30T20:06:40 <ThomasWaldmann> that would be nice. Item[0] = first ItemRevision, Item[-1] = latest stuff
2006-05-30T20:07:06 <xorAxAx> 0 is already defined as in-band signal for latest rev (which is problematic IMHO)
2006-05-30T20:07:12 <ThomasWaldmann> we also would change rev=0 to rev=-1 default for "latest stuff"
2006-05-30T20:07:26 <Kepplar> yep
2006-05-30T20:07:32 <Kepplar> existing stuff will go through adapters
2006-05-30T20:07:34 <Kepplar> so not a problem
2006-05-30T20:07:57 <xorAxAx> Kepplar: see 3.3.5 of the py ref manual
2006-05-30T20:08:32 <Kepplar> its still going to have a list inside it
2006-05-30T20:08:45 <xorAxAx> hmm, depends. it could delegate that :)
2006-05-30T20:08:59 <Kepplar> why would you want to?
2006-05-30T20:09:19 <xorAxAx> because you dont want to build a list of 1000 revs just because you created an item object
2006-05-30T20:09:36 <Kepplar> good point
2006-05-30T20:09:40 <xorAxAx> i dont see the point to let the item object cache all revs
2006-05-30T20:09:41 <ThomasWaldmann> maybe we could also have a dict { revno: ItemRev }
2006-05-30T20:09:48 <xorAxAx> caching etc. has to work on a lower level
2006-05-30T20:10:16 <Kepplar> ThomasWaldmann: ?
2006-05-30T20:10:43 <ThomasWaldmann> Kepplar: lists tend to be slow when they are large
2006-05-30T20:10:45 <xorAxAx> ThomasWaldmann: doesnt make sense on this level IMHO
2006-05-30T20:11:02 <xorAxAx> the SE should cache, if at all
2006-05-30T20:11:11 <xorAxAx> currently we dont have any kind of such caching
2006-05-30T20:11:14 <ThomasWaldmann> xorAxAx: is l[-1] fast?
2006-05-30T20:11:17 <Kepplar> i dont see the point of the dictionary
2006-05-30T20:11:19 <xorAxAx> ThomasWaldmann: sure
2006-05-30T20:11:22 <xorAxAx> ThomasWaldmann: O(1)
2006-05-30T20:11:23 <Kepplar> no
2006-05-30T20:11:31 <Kepplar> depends on what version of python
2006-05-30T20:11:35 <Kepplar> jython, cpython etc
2006-05-30T20:11:43 <xorAxAx> ThomasWaldmann: its an array, not a linked list
2006-05-30T20:12:21 <xorAxAx> Kepplar: i dont know any python implementation that uses linked lists or stuff like that for the list type
2006-05-30T20:12:37 <ThomasWaldmann> ok, so it will be fast enough as list
2006-05-30T20:12:50 <Kepplar> i read that jythons god slow on that sort of stuff
2006-05-30T20:13:00 <Kepplar> also
2006-05-30T20:13:04 <ThomasWaldmann> (we won't have performance problems on this level anyway)
2006-05-30T20:13:04 <Kepplar> why does data need to be an object?
2006-05-30T20:13:08 <Kepplar> and metadata
2006-05-30T20:13:34 <ThomasWaldmann> metadata is natural as derived from dict
2006-05-30T20:14:07 <Kepplar> yep
2006-05-30T20:14:14 <Kepplar> so just have the dict sitting in the item class
2006-05-30T20:14:24 <ThomasWaldmann> data can be just an attribute in ItemRevision class
2006-05-30T20:14:31 <Kepplar> good good
2006-05-30T20:14:35 <Kepplar> thats what i was thinking :)
2006-05-30T20:14:37 <Kepplar> just checking :)
2006-05-30T20:14:47 <Kepplar> im doing some UML
2006-05-30T20:18:23 <xorAxAx> ThomasWaldmann: the point is that moin should not build a list on item creation
2006-05-30T20:18:23 <xorAxAx> ThomasWaldmann: because it would make it O(n)
2006-05-30T20:18:24 <xorAxAx> so your question is not relevant here - because the [-1] access would hit a custom getitem implementation, not a list object
2006-05-30T20:18:25 <ThomasWaldmann> Kepplar: btw, also have a look at 2.0 storage.py (just as some idea feed)
2006-05-30T20:18:27 <ThomasWaldmann> xorAxAx: there could be a real rev LIST in item
2006-05-30T20:18:27 <xorAxAx> ThomasWaldmann: as i said, that would be fatal
2006-05-30T20:18:27 <xorAxAx> 20:15:21 < xorAxAx> ThomasWaldmann: the point is that moin should not build a list on item creation
2006-05-30T20:18:27 <xorAxAx> 20:15:29 < xorAxAx> ThomasWaldmann: because it would make it O(n)
2006-05-30T20:19:06 <xorAxAx> item object creation i mean
2006-05-30T20:19:12 <ThomasWaldmann> lazy eval
2006-05-30T20:19:27 <Kepplar> eugh, i really dislike no syntax hilighting
2006-05-30T20:19:32 <Kepplar> what IDE do you guys use?
2006-05-30T20:19:40 <ThomasWaldmann> vim or eric3
2006-05-30T20:19:51 <Kepplar> i found eric awful :/
2006-05-30T20:20:11 <ThomasWaldmann> you need to remove 60% of its icons
2006-05-30T20:20:29 <ThomasWaldmann> and 70% of its windows :)
2006-05-30T20:20:33 <Kepplar> heh
2006-05-30T20:20:38 <Kepplar> im using text file in Eclipse atm
2006-05-30T20:20:52 <ThomasWaldmann> except if you have 2 20" screen and xinerama :)
2006-05-30T20:20:53 <xorAxAx> ThomasWaldmann: still O(n)
2006-05-30T20:21:08 <Kepplar> should the item constructor automatically get the latest revision?
2006-05-30T20:21:19 <xorAxAx> Kepplar: no
2006-05-30T20:21:27 <xorAxAx> it has to be as lightweight as possible
2006-05-30T20:21:44 <xorAxAx> because moin creates a lot of page/item objects
2006-05-30T20:22:06 <xorAxAx> we had been optimising this for weeks (mainly nir back then :))
2006-05-30T20:22:08 <ThomasWaldmann> please read the latest ideas about current rev
2006-05-30T20:22:19 <Kepplar> ?
2006-05-30T20:22:33 <ThomasWaldmann> didnt you bookmark that page in the wiki already?
2006-05-30T20:22:41 <Kepplar> which?
2006-05-30T20:22:53 <ThomasWaldmann> having current rev at a fixed place (in file storage)
2006-05-30T20:23:04 <Kepplar> oh i know that
2006-05-30T20:23:08 <xorAxAx> ThomasWaldmann: thats an implementation details
2006-05-30T20:23:11 <xorAxAx> s/s$//
2006-05-30T20:23:19 <Kepplar> xorAxAx's right
2006-05-30T20:23:44 <Kepplar> hmm
2006-05-30T20:23:58 <ThomasWaldmann> maybe most of those ops accessing disk / db / whatever should be lazy eval
2006-05-30T20:23:59 <Kepplar> item class as method fetch_revision()
2006-05-30T20:24:20 <Kepplar> any ideas how we can supply an integer or a range?
2006-05-30T20:24:25 <ThomasWaldmann> so it will be done when needed
2006-05-30T20:24:28 * xorAxAx loves the term "implementation detail" - 2/3 of the pypy code base was called like that for a few months
2006-05-30T20:24:28 <Kepplar> range would make an wide operation faster
2006-05-30T20:24:57 <ThomasWaldmann> ?
2006-05-30T20:25:08 <xorAxAx> Kepplar: yes, there is a possibility
2006-05-30T20:25:09 <Kepplar> Item("Wikiname)
2006-05-30T20:25:13 <Kepplar> er
2006-05-30T20:25:17 <Kepplar> item = Item("Wikiname)
2006-05-30T20:25:22 <Kepplar> item.fetch_revision(0..12)
2006-05-30T20:25:42 <xorAxAx> foo[4, ..., 6] works
2006-05-30T20:25:46 <ThomasWaldmann> i guess we rarely need that
2006-05-30T20:25:48 <Kepplar> do i need to do anything special for Item(Wikiname).fetch_revision(0..12) to work?
2006-05-30T20:25:54 <xorAxAx> that would fetch 3 revs, but i agree to ThomasWaldmann
2006-05-30T20:26:05 <Kepplar> well we might need to fetch all
2006-05-30T20:26:10 <Kepplar> so have a seperate method for it?
2006-05-30T20:26:14 <Kepplar> fetch_all_revisions()
2006-05-30T20:26:22 <xorAxAx> Kepplar: how about Item(Wikiname)[0:12]?
2006-05-30T20:26:26 <xorAxAx> Kepplar: much more pythonic
2006-05-30T20:26:29 <Kepplar> nice
2006-05-30T20:26:33 <Kepplar> using __getitem__ ?
2006-05-30T20:26:36 <xorAxAx> yes!
2006-05-30T20:26:48 <xorAxAx> that would return a list of revs?
2006-05-30T20:27:04 <xorAxAx> its really a quite seldomly used feature
2006-05-30T20:27:11 <xorAxAx> but not very difficult to implement
2006-05-30T20:27:13 <Kepplar> leave it till later
2006-05-30T20:27:19 <Kepplar> i can see difficulty in the implementation
2006-05-30T20:27:39 <Kepplar> (aka, sql pre-processing to do them all from a single query
2006-05-30T20:28:26 <xorAxAx> you dont need one query ...
2006-05-30T20:28:37 <Kepplar> far more effective then 12
2006-05-30T20:28:42 <xorAxAx> and the item class shouldnt do sql, should it? :)
2006-05-30T20:28:50 <Kepplar> no
2006-05-30T20:28:57 <Kepplar> but it all must be thought about in design
2006-05-30T20:29:04 <Kepplar> best to get prioty 1 stuff done and dusted first
2006-05-30T20:29:10 <xorAxAx> yes
2006-05-30T20:29:39 <Kepplar> __repr__ in an item returns the data
2006-05-30T20:29:42 <Kepplar> agreeed?
2006-05-30T20:30:13 <ThomasWaldmann> no
2006-05-30T20:30:45 <Kepplar> ?
2006-05-30T20:30:47 <ThomasWaldmann> that should return some "readable" stuff rather
2006-05-30T20:30:51 <xorAxAx> no, a short representation of meta-data
2006-05-30T20:30:58 <Kepplar> why?
2006-05-30T20:31:12 <ThomasWaldmann> because we have binary data sometimes?
2006-05-30T20:31:13 <xorAxAx> <Item mimetype=foo length=1234 StorageEngine=foo ...>
2006-05-30T20:31:29 <xorAxAx> Kepplar: because __repr__ should return a string that is human-readble
2006-05-30T20:31:32 <xorAxAx> its used for debugging
2006-05-30T20:31:42 <xorAxAx> you dont need item contents while debugging
2006-05-30T20:32:08 <Kepplar> you dont just use it for debugging!
2006-05-30T20:32:12 <xorAxAx> thats what your debugger shows when you are stepping through the code
2006-05-30T20:32:14 <xorAxAx> you do
2006-05-30T20:32:28 <xorAxAx> as you are from the java world, __str__ is equiv. to toString
2006-05-30T20:32:32 <xorAxAx> if you mean that
2006-05-30T20:32:32 <Kepplar> i know
2006-05-30T20:32:42 <ThomasWaldmann> Kepplar: make a .data property
2006-05-30T20:32:46 <xorAxAx> which other repr-use cases can you think of?
2006-05-30T20:32:59 <Kepplar> xorAxAx: ones in my code :)
2006-05-30T20:33:02 <Kepplar> ThomasWaldmann: i have
2006-05-30T20:33:07 <xorAxAx> Kepplar: describe them :)
2006-05-30T20:33:09 <Kepplar> ThomasWaldmann: I dont know what type it should be
2006-05-30T20:33:20 <Kepplar> xorAxAx: <URL>
2006-05-30T20:33:21 <xorAxAx> "type"?
2006-05-30T20:33:30 <xorAxAx> Kepplar: i wont read all your code :)
2006-05-30T20:33:38 <ThomasWaldmann> .data is a str (possibly binary content)
2006-05-30T20:33:44 <Kepplar> yep thought so
2006-05-30T20:33:47 <ThomasWaldmann> same as stuff on disk / in db
2006-05-30T20:33:50 <Kepplar> Item.str_data i have
2006-05-30T20:34:04 <xorAxAx> ThomasWaldmann: and how do you get the unicode text data?
2006-05-30T20:34:09 <ThomasWaldmann> no types in name please
2006-05-30T20:34:28 <Kepplar> what?1
2006-05-30T20:35:05 <ThomasWaldmann> xorAxAx: could be a special .data property of TextItems maybe
2006-05-30T20:35:15 <ThomasWaldmann> but all other stuff is binary
2006-05-30T20:35:19 <Kepplar> having types in it actually makes the code readable
2006-05-30T20:35:28 <xorAxAx> Kepplar: what do you mean by types?
2006-05-30T20:35:31 <ThomasWaldmann> this is not java
2006-05-30T20:35:33 <Kepplar> Im *really* stuggling reading though the code of moin
2006-05-30T20:35:43 <Kepplar> because imho the bad naming convensions
2006-05-30T20:35:44 <ThomasWaldmann> nor C++
2006-05-30T20:35:48 <Kepplar> i realise that
2006-05-30T20:35:53 <Kepplar> thats no excuse though
2006-05-30T20:36:07 <xorAxAx> Kepplar: yeah, the style changes every 5 lines
2006-05-30T20:37:38 <xorAxAx> so you are suggesting a new style? :)
2006-05-30T20:37:46 <xorAxAx> that would make the code style change every 4 lines :)
2006-05-30T20:38:09 <Kepplar> no, im suggesting the storage engine which is already going to be the first bit of really modularised code in moin i've seen have a single style
2006-05-30T20:38:57 <ThomasWaldmann> no types in names, please :)
2006-05-30T20:38:59 <xorAxAx> and you are suggesting hungarian notation? please answer my question if you dont
2006-05-30T20:39:14 <Kepplar> hungarian notation?
2006-05-30T20:39:34 <ThomasWaldmann> rather use clear names that say what they are and do
2006-05-30T20:39:43 <Kepplar> thats still confusing
2006-05-30T20:40:06 <xorAxAx> Kepplar: so please specify what you mean
2006-05-30T20:40:29 <Kepplar> str_something
2006-05-30T20:40:32 <Kepplar> dct_something
2006-05-30T20:40:34 <Kepplar> lst_something
2006-05-30T20:40:35 <Kepplar> etc
2006-05-30T20:42:09 <ThomasWaldmann> TextItem_something? :-X
2006-05-30T20:42:32 <Kepplar> nah
2006-05-30T20:42:40 <Kepplar> i ususally shrink it down to 3-4
2006-05-30T20:42:47 <xorAxAx> Kepplar: that is fscked up hungarian notation :)
2006-05-30T20:42:47 <ThomasWaldmann> why not, it is also some "type"
2006-05-30T20:43:00 <Kepplar> yea
2006-05-30T20:43:01 <xorAxAx> Kepplar: and its considered evil in the python world
2006-05-30T20:43:05 <Kepplar> txi_something
2006-05-30T20:43:06 <ThomasWaldmann> but i would suggest called that attr just "item" :)
2006-05-30T20:43:13 <Kepplar> xorAxAx: considered byt SOME
2006-05-30T20:43:20 <Kepplar> nothings ever that straight forward =)
2006-05-30T20:43:22 <xorAxAx> considered by us
2006-05-30T20:43:36 <Kepplar> well then these a dilema
2006-05-30T20:43:36 <xorAxAx> add comments to the constructor if you cant remember the types ;-)
2006-05-30T20:43:43 <Kepplar> as I cannot code without a decent set of convension
2006-05-30T20:43:45 <Kepplar> it slows me down too much
2006-05-30T20:43:52 <xorAxAx> convesion?
2006-05-30T20:43:55 <xorAxAx> convension?
2006-05-30T20:43:58 <Kepplar> convension*
2006-05-30T20:44:07 <xorAxAx> convention?
2006-05-30T20:44:16 <ThomasWaldmann> confusion
2006-05-30T20:44:19 <Kepplar> yea, whatever :P
2006-05-30T20:44:38 <xorAxAx> Kepplar: PEP 8 or what do you mean?
2006-05-30T20:44:49 <Kepplar> PEP8 is fine
2006-05-30T20:45:04 <xorAxAx> do you mean the design?
2006-05-30T20:45:07 <Kepplar> I just really can't stand coding in a backward way
2006-05-30T20:45:15 <xorAxAx> thats unrelated to var names
2006-05-30T20:45:36 <xorAxAx> forwardly, you would look at use cases first
2006-05-30T20:45:45 <Kepplar> ??
2006-05-30T20:45:45 <xorAxAx> writing short unittests etc.
2006-05-30T20:46:05 <Kepplar> Right i need to take a break, im getting to stressed out
2006-05-30T20:46:22 <Kepplar> I will say though to keep my schedule in line, i will need to formalise the interfaces tonight
2006-05-30T20:46:56 <Kepplar> and for the record pythonic doesnt always mean good software architecture :)
2006-05-30T20:46:59 <Kepplar> afk 1 hour
2006-05-30T20:54:22 <ThomasWaldmann> fpletz: how's it going? :)
2006-05-30T20:55:46 <fpletz> ThomasWaldmann: sorry, I'm currently learning for my last exam tomorrow.. then the fun will begin ;)
2006-05-30T20:56:13 <ThomasWaldmann> ah, ok :) wish you a good exam tomorrow. :)
2006-05-30T20:56:27 <fpletz> thanks
2006-05-30T20:56:34 <ThomasWaldmann> about what is it?
2006-05-30T20:57:27 <fpletz> geography
2006-05-30T20:57:41 <fpletz> already finished maths and physics
2006-05-30T20:57:50 <fpletz> oh, and english
2006-05-30T20:59:13 <ThomasWaldmann> so the most interesting stuff is already over :)
2006-05-30T21:13:31 <ThomasWaldmann> - Misc: #543, #1011, #1005, #1287, #1337, #1383, #1079, #1492, #1189, #737, #872.
2006-05-30T21:13:43 <ThomasWaldmann> (from the great twistedweb changelog)
2006-05-30T21:20:15 <xorAxAx> hmm, we might sell our app to ibm with 3 letter acronyms :)
2006-05-30T21:40:51 <xorAxAx> Kepplar: good one! lets see how she answers :)
2006-05-30T21:43:45 <Kepplar> :)
2006-05-30T21:43:51 <Kepplar> btw, ive pushed a few updates
2006-05-30T21:44:30 <xorAxAx> i have seen some of them and made a comment already
2006-05-30T21:44:55 <xorAxAx> se, sei, IBM, ... :)
2006-05-30T21:45:17 <Kepplar> there a comment section?
2006-05-30T21:48:24 <xorAxAx> no, i meant my last message here
2006-05-30T21:52:06 <Kepplar> ah
2006-05-30T21:52:06 <Kepplar> hmm
2006-05-30T21:52:11 <ThomasWaldmann> Kepplar: we use speaking names usually, so "se" is no good
2006-05-30T21:52:12 <Kepplar> __add__, __radd__
2006-05-30T21:52:22 <Kepplar> ThomasWaldmann: ok
2006-05-30T21:52:34 <Kepplar> im thinking for items, since we got slicing
2006-05-30T21:52:36 <Kepplar> we could have
2006-05-30T21:52:40 <ThomasWaldmann> the module name could be "storage"
2006-05-30T21:53:02 <xorAxAx> add?
2006-05-30T21:53:12 <ThomasWaldmann> you don't need "Version: ..."
2006-05-30T21:53:19 <Kepplar> item[23].metadata + something
2006-05-30T21:53:23 <Kepplar> er
2006-05-30T21:53:24 <Kepplar> no
2006-05-30T21:53:25 <Kepplar> sorry
2006-05-30T21:53:27 <Kepplar> i mean
2006-05-30T21:53:30 <Kepplar> item + something
2006-05-30T21:53:33 <Kepplar> = creates new revision
2006-05-30T21:53:35 <Kepplar> hmm
2006-05-30T21:53:37 <Kepplar> maybe
2006-05-30T21:53:44 <Kepplar> not sure on the elegance
2006-05-30T21:53:49 <xorAxAx> Kepplar: too much magic
2006-05-30T21:53:54 <Kepplar> yea
2006-05-30T21:53:55 <xorAxAx> explicit is better than implicit
2006-05-30T21:53:59 <Kepplar> defaintly
2006-05-30T21:54:09 <ThomasWaldmann> you don't need to say that __init__ is a "Constructor"
2006-05-30T21:54:24 <Kepplar> ThomasWaldmann: i haven't finished the comments for that yet, i just put anything there :)
2006-05-30T21:55:00 <ThomasWaldmann> and we only use unicode internally
2006-05-30T21:55:06 <xorAxAx> # add 1+1
2006-05-30T21:55:09 <xorAxAx> a = 1+1
2006-05-30T21:56:22 <Kepplar> xorAxAx:
2006-05-30T21:56:32 <Kepplar> ThomasWaldmann: hmm?
2006-05-30T21:56:39 <xorAxAx> Kepplar: yeah?
2006-05-30T21:56:57 <ThomasWaldmann> encoding/decoding happens when leaving/entering moin code
2006-05-30T21:56:58 <Kepplar> xorAxAx: sorry, waht do you mean by a = 1+1 etc?
2006-05-30T21:57:20 <xorAxAx> Kepplar: nothing, just an illustration of bad comments :)
2006-05-30T21:57:22 <Kepplar> hmm, yea your right, ok
2006-05-30T21:59:28 <ThomasWaldmann> and if you want to document types, use epydoc strings, not attribute names
2006-05-30T22:04:43 <Kepplar> ThomasWaldmann: sure thing
2006-05-30T22:07:23 <Kepplar> does item renaming effect all revision or just the latest?
2006-05-30T22:07:50 <xorAxAx> all revisions
2006-05-30T22:08:57 <Kepplar> do we want to handle it like that now - im guessing a reason why that is so is because currently its just a directory rename :)
2006-05-30T22:09:48 <ThomasWaldmann> all (like it is)
2006-05-30T22:09:59 <xorAxAx> Kepplar: its most intuitive IMHO
2006-05-30T22:14:50 <Kepplar> hmm
2006-05-30T22:14:55 <Kepplar> interesting
2006-05-30T22:15:26 <Kepplar> we obviously don't want to duplicate the same item objects over and over again
2006-05-30T22:16:03 <Kepplar> im thinking we could half-singleton them, or have a list they register against for us to be able to pull out the results. I've done the latter on PygmyApply
2006-05-30T22:16:25 <Kepplar> fdfdsf = Item(Wikiname)
2006-05-30T22:16:30 <Kepplar> hhfghfg = Item(Wikiname)
2006-05-30T22:16:35 <Kepplar> = same reference
2006-05-30T22:17:12 <xorAxAx> Kepplar: this should be done on a lower level, yep
2006-05-30T22:17:20 <Kepplar> yea
2006-05-30T22:17:28 <xorAxAx> and there should be thoughts about thread-safety
2006-05-30T22:17:53 <Kepplar> Oh.. I been thinking from a CGI/Mod python perspective
2006-05-30T22:18:18 <xorAxAx> mod_py is threaded often
2006-05-30T22:18:31 <xorAxAx> depends on your workers model
2006-05-30T22:18:35 <xorAxAx> or how apache calls it
2006-05-30T22:18:36 <Kepplar> yea
2006-05-30T22:18:55 <Kepplar> So they can share the same namespace?
2006-05-30T22:19:29 <xorAxAx> if its threaded, all moin request have the same globals
2006-05-30T22:19:51 <xorAxAx> and then you want to either say "item etc. are thread safe" or "caching happens in a thread-local structure"
2006-05-30T22:21:16 <Kepplar> how does that work in an interepted language?
2006-05-30T22:21:38 <Kepplar> request comes in, request goes
2006-05-30T22:21:52 <Kepplar> - interpted language, wrong word
2006-05-30T22:22:45 <xorAxAx> thats not related to interpreted languages
2006-05-30T22:22:51 <xorAxAx> the problems are similar everywhere
2006-05-30T22:22:55 <Kepplar> yea hence i said wrong word :)
2006-05-30T22:23:12 <Kepplar> what i mean't want this isnt a pesistant environment
2006-05-30T22:25:11 <Kepplar> xorAxAx: just read article on Vodafone, not been following it at all
2006-05-30T22:25:28 <Kepplar> not that big actually
2006-05-30T22:25:38 <xorAxAx> you have to expect to run in both envs
2006-05-30T22:25:45 <xorAxAx> persistent, short shot
2006-05-30T22:26:01 <Kepplar> so its persistant as long as theres a continous set of requests?
2006-05-30T22:26:07 <xorAxAx> so dont rely on in memory caching, and dont break on threading :)
2006-05-30T22:26:17 <xorAxAx> no, cgi processes end after every request
2006-05-30T22:26:26 <xorAxAx> there are different kinds of servers!
2006-05-30T22:26:26 <Kepplar> not talking about cgi
2006-05-30T22:26:41 <xorAxAx> fastcgi processes end sometimes
2006-05-30T22:26:50 <xorAxAx> or run for very long periods of time
2006-05-30T22:27:10 <xorAxAx> mod_py often mixes threading and forking (which is similar to cgi)
2006-05-30T22:27:22 <xorAxAx> twisted is the only env that is fully persistent
2006-05-30T22:27:29 <Kepplar> Hmmm
2006-05-30T22:27:29 <xorAxAx> but that doesnt make it faster
2006-05-30T22:27:43 <xorAxAx> and the standalone server is persistent as well
2006-05-30T22:27:54 <xorAxAx> standalone and fcgi are the fastest, btw :)
2006-05-30T22:27:59 <Kepplar> I've got another project which i've been doing in J2EE - because its the only pesistant thing I knew of that worked and had grunt
2006-05-30T22:28:18 <Kepplar> standalone as in built in webserver?
2006-05-30T22:29:17 <xorAxAx> yes
2006-05-30T22:29:23 <xorAxAx> the one that MMDE uses
2006-05-30T22:29:42 <xorAxAx> yeah, J2EE is like "lets have the admin wait 5 minutes, then we can serve the first request"
2006-05-30T22:50:36 <xorAxAx> Kepplar: somehow i have the feeling that this transcript thing wasnt in the FAQ when i registered
2006-05-30T23:04:45 <Kepplar> xorAxAx: it was
2006-05-30T23:04:59 <Kepplar> but they didnt give a definition of a transcript
2006-05-30T23:05:05 <Kepplar> no way will they get what they want from me
2006-05-30T23:05:38 <xorAxAx> i think you could beat them up with the best lawyers
2006-05-30T23:16:44 <Kepplar> in the uk they would lose
2006-05-30T23:16:57 <Kepplar> Theres a "beyond reasonable doubt" sort of thing here
2006-05-30T23:17:17 <Kepplar> which in their case, it isnt
MoinMoin: MoinMoinChat/Logs/moin-dev/2006-05-30 (last edited 2021-01-19 20:18:02 by Bind)