2007-10-31T09:19:49 <ThomasWaldmann> moin
2007-10-31T09:41:13 <dreimark> moin
2007-10-31T09:50:47 <ThomasWaldmann> bbl
2007-10-31T13:21:07 <johill> aehm
2007-10-31T13:21:07 <johill> http://johannes.sipsolutions.net/files/moin-dom-bug.txt
2007-10-31T13:21:47 <xorAxAx> try the docbook branch :)
2007-10-31T13:22:20 <johill> ???
2007-10-31T13:22:25 <johill> why is that in the main branch if it's known to not work?
2007-10-31T13:23:01 <xorAxAx> because there are no unittests? :)
2007-10-31T13:23:14 <xorAxAx> and it had been working at some time
2007-10-31T13:23:20 <johill> ahrg
2007-10-31T13:23:22 <johill> well
2007-10-31T13:26:13 <johill> we really need to replace the request framework
2007-10-31T13:26:16 <johill> maybe then we can write tests
2007-10-31T13:27:51 <johill> I played with paste yesterday
2007-10-31T13:27:53 <johill> not bad
2007-10-31T13:34:44 <johill> but I wasn't able to solve the DOM problem with macros
2007-10-31T13:35:49 <johill> I think the solution will be to make any node expandable and require that it be expanded by its same type
2007-10-31T13:41:47 <CIA-32> moin: Johannes Berg <johannes AT sipsolutions DOT net> default * 2937:3fcf13189a45 1.7/MoinMoin/ (request/__init__.py util/clock.py): split Clock into an extra util package
2007-10-31T13:41:50 <CIA-32> moin: Johannes Berg <johannes AT sipsolutions DOT net> default * 2938:bdd5df911941 1.7/MoinMoin/request/ (__init__.py request_wsgi.py): remove request.reset_output
2007-10-31T14:24:26 <xorAxAx> johill: did you have a look at paste fixture?
2007-10-31T14:24:45 <johill> not yet
2007-10-31T14:28:58 <xorAxAx> (just to see how the problem is solved by others)
2007-10-31T14:29:14 <johill> why not just use that?
2007-10-31T14:29:26 <johill> why does moin have its own request framework anyway rather than just doing wsgi?
2007-10-31T14:30:02 <xorAxAx> hmm? paste is not a request framework :)
2007-10-31T14:30:22 <xorAxAx> yes, moin should use wsgi as a common abstraction to ease code maintainenance
2007-10-31T14:30:42 <xorAxAx> paste doesnt even have any server connectors
2007-10-31T14:30:51 <johill> yeah, flup
2007-10-31T14:30:53 <xorAxAx> but it has a few other helpful tools
2007-10-31T14:30:59 <xorAxAx> flup is bad
2007-10-31T14:31:12 <xorAxAx> but there are usable forks
2007-10-31T14:31:32 <johill> it doesn't really matter
2007-10-31T14:31:35 <johill> other people do it so we don't
2007-10-31T14:31:39 <johill> have to
2007-10-31T14:32:49 <xorAxAx> johill: well, flup is surely a much worse solution in some cases, thats why the trac people forked it
2007-10-31T14:33:00 <xorAxAx> maybe we need to care for it as well ...
2007-10-31T14:33:09 <xorAxAx> but anyway, the nice aspect is the separation of logic
2007-10-31T14:33:37 <johill> well then maybe we have to reimplement it
2007-10-31T14:33:45 <johill> doesn't matter much but it's separate
2007-10-31T14:33:52 <johill> it can even have a different repository
2007-10-31T14:33:55 <xorAxAx> no, we take the trac fork :)
2007-10-31T14:34:02 <johill> yup
2007-10-31T14:34:19 <johill> what about authkit?
2007-10-31T14:34:32 <xorAxAx> useless
2007-10-31T14:34:40 <xorAxAx> badly maintained and documented
2007-10-31T14:35:05 <xorAxAx> maybe parts of it could be used, but i am not sure if it makes sense to have it as a central part
2007-10-31T14:36:11 <johill> openid for sure makes little sense that way
2007-10-31T14:40:14 <johill> but I looked into it and it's pretty much impossible
2007-10-31T14:40:26 <johill> request is such a grab-bag in moin there's no way to clean it up
2007-10-31T14:40:48 <xorAxAx> yeah
2007-10-31T14:41:15 <johill> so I dunno
2007-10-31T14:41:20 <johill> I guess at some point moin will just collapse
2007-10-31T14:42:57 <xorAxAx> and twiki will come out of the dust :)
2007-10-31T14:43:04 <johill> hah
2007-10-31T14:44:05 <johill> yeah that's likely
2007-10-31T14:46:54 <johill> I think I'll have another look at the macro vs. dom problem
2007-10-31T14:47:46 <johill> but the thing is that almost all parts of moin are crufty enough to not want to port them to a new request architecture
2007-10-31T14:48:19 <xorAxAx> i dont see how other parts need any porting
2007-10-31T14:49:27 <johill> everything in moin abuses the request object
2007-10-31T14:53:19 <xorAxAx> well, not really
2007-10-31T14:53:30 <xorAxAx> many things use it as a store for attribs
2007-10-31T14:53:34 <xorAxAx> thats fine IMHO :)
2007-10-31T14:53:51 <xorAxAx> thats what you call pythonic :)
2007-10-31T14:54:02 <johill> no, because the reset behaviour is not well defined
2007-10-31T14:54:04 <xorAxAx> and it would work fine with any other "request architecture"
2007-10-31T14:54:15 <xorAxAx> reset behaviour? every request lives for one request
2007-10-31T14:54:19 <johill> you wish
2007-10-31T14:54:21 <xorAxAx> no reset needed, nor?
2007-10-31T14:54:29 <xorAxAx> well, where is this assumption broken?
2007-10-31T14:54:55 <johill> somehow sometimes you render two things within a single request, something with editing, I forgot
2007-10-31T14:55:12 <xorAxAx> thats still a single request
2007-10-31T14:55:38 <johill> yeah but much of the code assumes that each rendering resets the reqeuest state
2007-10-31T14:55:46 <johill> because it was never defined
2007-10-31T14:55:56 <johill> pythonic isn't "just do shit on an object because you can"
2007-10-31T14:56:22 <xorAxAx> oh, it is :)
2007-10-31T14:56:34 <xorAxAx> well, its defined that a request object lives for one request
2007-10-31T14:57:02 <johill> well then the code that assumes 'for one rendering' is wrong
2007-10-31T14:57:16 <johill> in any case, the problem is that none of these assumptions are (a) documented and (b) enforced
2007-10-31T14:58:18 <johill> even in the Linux kernel you continually have to enforce assumptions to stop creative API abuse
2007-10-31T14:58:29 <johill> this is worse in python where you can access pretty much everything from everywhere
2007-10-31T14:58:40 <johill> and experience shows that documenting it just doesn't help
2007-10-31T14:59:08 <xorAxAx> its much worse that its not tested
2007-10-31T14:59:15 <xorAxAx> having some asserts in the kernel is some kind of test
2007-10-31T14:59:23 <xorAxAx> still no unittest but better than nothing :)
2007-10-31T14:59:57 <johill> no no, unit tests aren't the panacea
2007-10-31T15:00:14 <johill> it's like lockdep
2007-10-31T15:00:22 <johill> there's no way to design unit tests for that
2007-10-31T15:00:26 <johill> it just doesn't work
2007-10-31T15:00:47 <xorAxAx> why not?
2007-10-31T15:01:05 <johill> you can design unit tests for an API, both failing and non-failing
2007-10-31T15:01:18 <johill> but you can't design unit tests against people who access things that should be internal to the API
2007-10-31T15:01:26 <xorAxAx> and we are not talking about low level semaphores and timing race conditions but about some specified attr behaviour or whatever
2007-10-31T15:01:36 <xorAxAx> johill: well, sure!
2007-10-31T15:01:44 <xorAxAx> johill: but you will notice too late
2007-10-31T15:01:50 <johill> ??
2007-10-31T15:01:57 <xorAxAx> because their tests will break when you validly modify internal things
2007-10-31T15:02:06 <johill> *their* tests
2007-10-31T15:02:07 <johill> look
2007-10-31T15:02:07 <xorAxAx> and yes, in the end this is a sanity question
2007-10-31T15:02:09 <xorAxAx> yes
2007-10-31T15:02:13 <johill> your assumptions break down at that point
2007-10-31T15:02:18 <xorAxAx> dont allow for insane changesets
2007-10-31T15:02:21 <johill> external macro writers and such are never going to write tests
2007-10-31T15:02:33 <johill> especially not such tests
2007-10-31T15:02:42 <xorAxAx> yes, but thats their issue if they fail with internal stuff
2007-10-31T15:02:47 <johill> so the only option is to make the 'unpythonic' compromise and hide the internal stuff
2007-10-31T15:02:57 <xorAxAx> not at all
2007-10-31T15:03:05 <xorAxAx> no need to hide, documentation and decisions are enough
2007-10-31T15:03:08 <xorAxAx> and still missing
2007-10-31T15:03:23 <johill> you're too optimistic
2007-10-31T15:03:30 <xorAxAx> many people committing to moin keep changing the /public/ API, ignoring the callers
2007-10-31T15:03:43 <xorAxAx> thats already one step to far - ignorance
2007-10-31T15:03:48 <johill> that's because there is no defined public API
2007-10-31T15:03:53 <xorAxAx> yes
2007-10-31T15:04:01 <johill> because the public API is all over the place
2007-10-31T15:04:08 <johill> and there isn't even way to make things public
2007-10-31T15:04:09 <johill> heck
2007-10-31T15:04:16 <johill> in moin stuff even accesses request._something in many places
2007-10-31T15:04:30 <johill> and that's supposed to tell you 'stop, internal'
2007-10-31T15:04:32 <xorAxAx> well, an insane changeset introduce that
2007-10-31T15:04:51 <johill> so you're overestimating the sanity of your fellow living beings
2007-10-31T15:05:03 <johill> look, it's easy: what can be done wrong will be done wrong at some point
2007-10-31T15:05:15 <johill> and you can't watch everything
2007-10-31T15:05:31 <xorAxAx> no, thats the wrong approach
2007-10-31T15:05:39 <xorAxAx> you cannot solve social problems with technical solutions
2007-10-31T15:05:46 <johill> it's not a social problem
2007-10-31T15:05:50 <xorAxAx> sure it is
2007-10-31T15:05:57 <johill> no
2007-10-31T15:06:00 <xorAxAx> see how twisted solves it
2007-10-31T15:06:09 <johill> twisted solves something?
2007-10-31T15:06:11 <xorAxAx> do you know their workflow?
2007-10-31T15:06:17 <xorAxAx> well, this engineering problem, yes :)
2007-10-31T15:06:23 <johill> no, I don't
2007-10-31T15:06:30 <xorAxAx> then query exarkun :)
2007-10-31T15:07:07 <johill> huh
2007-10-31T15:07:09 <xorAxAx> they have code review and only allow committed changesets if they have an acompanied unittest and if all unittests are still running
2007-10-31T15:07:27 <xorAxAx> well, and i did code review and often people ignored my comments
2007-10-31T15:07:50 <johill> I still think that's overly optimistic
2007-10-31T15:08:01 <johill> I just design APIs that warn/error when you abuse them in any way
2007-10-31T15:08:09 <johill> scales much better
2007-10-31T15:08:10 <xorAxAx> that as well, yes
2007-10-31T15:08:25 <johill> rather than me having to check every changeset for use of that API
2007-10-31T15:08:29 <xorAxAx> how does that interfere with the solutions i described above?
2007-10-31T15:08:36 <xorAxAx> johill: code review is necessary
2007-10-31T15:08:51 <xorAxAx> only checking at "api boundaries" using code catches only minor stuff
2007-10-31T15:08:51 <johill> it doesn't, but it requires some stricter internal checking
2007-10-31T15:09:09 <xorAxAx> it doesnt help if the changeset is completly nuts
2007-10-31T15:09:09 <johill> that's why I make sure that the details cannot be accessed
2007-10-31T15:09:25 <johill> but that only happens when people intentionally get it wrong
2007-10-31T15:09:33 <xorAxAx> well, you dont want any bad code at all in a project
2007-10-31T15:09:36 <johill> most of the time it's accidental, people misunderstand the API docs or wahtever
2007-10-31T15:09:43 <xorAxAx> for third-party stuff, your approach is all you can do
2007-10-31T15:09:44 <johill> and checking things there helps a lot
2007-10-31T15:09:49 <xorAxAx> but internally, it doesnt work
2007-10-31T15:10:17 <johill> depends what you mean by internal
2007-10-31T15:10:21 <xorAxAx> in moin
2007-10-31T15:10:31 <johill> sure, if somebody manipulates my API because they want access to internals that's not going to help
2007-10-31T15:10:40 <xorAxAx> "manipulates my API"?
2007-10-31T15:10:54 <johill> sya code instead of API
2007-10-31T15:11:26 <johill> so anyway
2007-10-31T15:11:45 <xorAxAx> sya?
2007-10-31T15:11:52 <johill> typo, say
2007-10-31T15:12:02 <xorAxAx> why is that not going to help?
2007-10-31T15:12:17 <johill> I mean I can't protect against that
2007-10-31T15:12:41 <johill> but as long as I hide all the internals nobody can access them without changing the code
2007-10-31T15:12:51 <johill> so the net result is that I only need to monitor the code I wrote for bad changes
2007-10-31T15:12:54 <johill> rather than all the code
2007-10-31T15:13:00 <johill> which scales much better
2007-10-31T15:13:04 <johill> but python makes that extremely hard
2007-10-31T15:14:06 <xorAxAx> makes sense, yes
2007-10-31T15:14:21 <johill> say the formatter API
2007-10-31T15:14:42 <johill> right now you can add methods to the html formatter and call them without ever noticing
2007-10-31T15:15:06 <johill> ah scratch that, this leads too far
2007-10-31T15:15:16 <xorAxAx> but nobody does that :)
2007-10-31T15:15:23 <johill> you wish
2007-10-31T15:15:30 <xorAxAx> you do? :)
2007-10-31T15:15:43 <johill> 1.7 TOC fell over because ThomasWaldmann added a method to the formatter API without adding it to the toc formatter
2007-10-31T15:15:52 <xorAxAx> ah, you mean it like that
2007-10-31T15:16:02 <xorAxAx> i thought about monkey patching the class
2007-10-31T15:16:24 <xorAxAx> well, then he didnt add it to the base class
2007-10-31T15:16:42 <xorAxAx> and unittests would have caught this issue as well
2007-10-31T15:17:02 <xorAxAx> in fact, there is a test that runs syntaxreference through all formatters and purely checks for exceptions
2007-10-31T15:17:21 <xorAxAx> some formatters in this unittests are disabled because they are known to be broken
2007-10-31T15:17:25 <xorAxAx> which is bad
2007-10-31T15:17:29 <johill> yeah they should be deleted from the repo
2007-10-31T15:17:51 <xorAxAx> that doesnt increase test coverage absolutely, though
2007-10-31T15:18:56 <johill> heh
2007-10-31T15:18:57 <johill> no
2007-10-31T15:21:44 <johill> but I wouldn't get docbook exceptions in my wiki
2007-10-31T15:26:15 <johill> anyway
2007-10-31T15:26:41 <johill> the net result is that every time I look at cleaning up a part of moin I realise that it's all intermingled too tightly to do it
2007-10-31T15:27:43 <johill> what, for example, is this with formatter using theme and theme using formatter?
2007-10-31T15:32:12 <johill> is routes any useful?
2007-10-31T15:46:59 <xorAxAx> not really
2007-10-31T15:47:17 <xorAxAx> the portion of routes that would be used by moin is equivalent to 10 lines of python code
2007-10-31T15:47:37 <johill> yeah just figured that out too
2007-10-31T15:47:43 <johill> what does pylons do?
2007-10-31T15:47:55 <johill> I can't seem to make sense out of it other than the weird config stuff
2007-10-31T15:49:11 <johill> I wrote a trivial wsgi app with paste easy enough
2007-10-31T15:49:25 <ThomasWaldmann> xorAxAx: see inbox
2007-10-31T15:50:35 <xorAxAx> johill: pylons does marketing :)
2007-10-31T15:50:43 <xorAxAx> johill: see my webphoto app for some pylons app
2007-10-31T15:50:48 <xorAxAx> hg.thinkmo.de/webphoto
2007-10-31T15:51:05 <johill> yeah I have that code
2007-10-31T15:51:09 <johill> I just don't understand a bit of it
2007-10-31T15:51:26 <xorAxAx> hehe
2007-10-31T15:51:31 <johill> what does pylons do for you?
2007-10-31T15:51:35 <xorAxAx> not a lot
2007-10-31T15:51:46 <xorAxAx> well, nothing that i could write myself
2007-10-31T15:51:53 <xorAxAx> its loading the controller modules and doing the dispatching
2007-10-31T15:51:56 <johill> you mean couldn't?
2007-10-31T15:52:13 <xorAxAx> yes
2007-10-31T15:52:19 <xorAxAx> and it integrates beaker
2007-10-31T15:52:21 <johill> ok so the obvious question is why?
2007-10-31T15:52:24 <xorAxAx> and provides interfaces to genshi
2007-10-31T15:52:41 <xorAxAx> because i dislike rewriting code that is already existing and proofed to be useful?
2007-10-31T15:52:54 <johill> the configuration file syntax scares me ;)
2007-10-31T15:53:03 <xorAxAx> pylons doesnt have any config files
2007-10-31T15:53:10 <xorAxAx> its using paste script
2007-10-31T15:53:17 <xorAxAx> so you mean the paste script syntax
2007-10-31T15:53:20 <johill> ah right
2007-10-31T15:53:33 <johill> but pylons talks all about it while I could use paste easily without
2007-10-31T15:53:42 <xorAxAx> yes
2007-10-31T15:53:49 <xorAxAx> thats why pylons is mainly marketing for paste :)
2007-10-31T15:53:54 <xorAxAx> and some glue code
2007-10-31T15:54:11 <xorAxAx> (see the source)
2007-10-31T15:54:17 <johill> I'm trying
2007-10-31T15:54:24 <johill> but even the trivial app example doesn't make senes to me
2007-10-31T15:55:18 <johill> what's with all the egg foo
2007-10-31T15:56:21 <xorAxAx> thats for deployment
2007-10-31T15:56:35 <xorAxAx> it has some larger issues in the design, though
2007-10-31T15:56:46 <johill> it just confuses me to tell the truth
2007-10-31T15:56:53 <johill> I don't see the point in writing more and more config files
2007-10-31T15:58:59 <johill> so what's a trivial pylons web app without eggs?
2007-10-31T16:03:22 <johill> I thought webhpoto uses genshi not cheetah
2007-10-31T16:07:30 <johill> ahrg the install requires cheetah
2007-10-31T16:07:34 <johill> what crap
2007-10-31T16:07:49 <johill> sorry, but I'm not convinced
2007-10-31T16:08:00 <johill> the middleware stuff looks good, and wsgi too
2007-10-31T16:08:09 <johill> but paste and all the setup 'help' is just useless
2007-10-31T16:10:29 <xorAxAx> johill: paste is necessary
2007-10-31T16:10:35 <xorAxAx> johill: but the broken dependencies suck
2007-10-31T16:10:37 <johill> paste, fine
2007-10-31T16:10:41 <xorAxAx> it even depends on nose
2007-10-31T16:10:42 <johill> but all the setup stuff is crap
2007-10-31T16:10:55 <johill> readme makes it so easy:
2007-10-31T16:10:57 <johill> three paste commands
2007-10-31T16:11:02 <johill> but each of them fails with a different exception
2007-10-31T16:12:53 <xorAxAx> in webphoto?
2007-10-31T16:12:59 <xorAxAx> or the example?
2007-10-31T16:13:06 <johill> webphoto
2007-10-31T16:13:14 <xorAxAx> well, that might be because of webphoto :)
2007-10-31T16:13:27 <johill> yeah one of them is, my sqlalchemy doesn't have DynamicMetaData
2007-10-31T16:13:40 <johill> AttributeError: 'dict' object has no attribute 'template_engines'
2007-10-31T16:13:42 <xorAxAx> then you have got 0.4 which is too new
2007-10-31T16:13:44 <johill> just doesn't make sense though
2007-10-31T16:14:01 <xorAxAx> hmm, that sounds like a too new pylons but my requirements should avoid that
2007-10-31T16:14:11 <johill> your code tries config.template_engines
2007-10-31T16:14:23 <johill> anyway
2007-10-31T16:14:27 <xorAxAx> well, it came from a template, so its not "mine" :)
2007-10-31T16:14:43 <johill> yeah that's another thing
2007-10-31T16:14:45 <johill> huge code templates
2007-10-31T16:14:50 <johill> that's almost never right
2007-10-31T16:15:16 <xorAxAx> yes, at least not in python :)
2007-10-31T16:15:48 <johill> yup
2007-10-31T16:16:19 <johill> I guess the problem is that this stuff tries to do everything in one
2007-10-31T16:16:36 <johill> btw your dependency is SQLAlchemy>=0.3.6
2007-10-31T16:16:39 <johill> maybe you want <=?
2007-10-31T16:18:06 <xorAxAx> no, i dont
2007-10-31T16:18:16 <xorAxAx> yes, it does too much at once
2007-10-31T16:18:20 <xorAxAx> no clear separation :)
2007-10-31T16:18:25 <johill> yeah
2007-10-31T16:18:28 <xorAxAx> well, 0.4 is pretty new
2007-10-31T16:18:59 <johill> so you probably always want >=0.3.6,<0.4 assuming they change API at those revisions
2007-10-31T16:19:20 <johill> anyway
2007-10-31T16:19:34 <johill> I'm not going to bother with this any longer, it's just not worth my time
2007-10-31T16:19:54 <johill> the wsgi stuff from paste is nice
2007-10-31T16:33:25 <dreimark> bbl
2007-10-31T16:45:38 <johill> haha
2007-10-31T17:16:41 <xorAxAx> johill: hmm?
MoinMoin: MoinMoinChat/Logs/moin-dev/2007-10-31 (last edited 2007-12-22 22:45:02 by IrcLogImporter)