2007-07-21T00:11:03  <grzywacz> hrmpf
2007-07-21T00:11:09  <grzywacz> Something is eating my exceptions...
2007-07-21T00:12:26  * rayvd burps
2007-07-21T00:12:27  <rayvd> not me!
2007-07-21T00:12:59  * grzywacz looks at rayvd in a suspicious manner
2007-07-21T00:14:14  <grzywacz> Strange. I get an unicode error, but it's not shown anywhere. No backtrace, no anything.
2007-07-21T00:14:24  <grzywacz> And I have no bare "except"s
2007-07-21T00:21:04  <ThomasWaldmann> so how do you know it is an unicode error?
2007-07-21T00:21:51  <grzywacz> I made an except, and printed whatever was caught. 8)
2007-07-21T00:21:59  <grzywacz> But it's invisible without it...
2007-07-21T00:23:53  <grzywacz> ...
2007-07-21T00:42:24  <grzywacz> I don't understand it.
2007-07-21T00:42:51  <ThomasWaldmann> where does the exception happen?
2007-07-21T00:44:40  <grzywacz> In pyxmpp code.
2007-07-21T00:44:48  <grzywacz> It gets propagated back to my xmlrpc bot.
2007-07-21T00:45:00  <grzywacz> Then it vanishes... somewhere.
2007-07-21T00:45:09  <grzywacz> Are there any exception-tracking methods?;)
2007-07-21T00:48:19  <ThomasWaldmann> there is one except Exception: in xmlrpcbot
2007-07-21T00:48:33  <grzywacz> It happens in xmppbot.
2007-07-21T00:50:07  <ThomasWaldmann> i dont see an exception handler there
2007-07-21T00:50:16  <xorAxAx> re
2007-07-21T00:51:41  * grzywacz prints the stack and goes digging in pyxmpp
2007-07-21T00:51:55  <grzywacz> If trunk eats exceptions, then... :X
2007-07-21T00:52:54  <xorAxAx> lanius: dont you really need some linux account?
2007-07-21T00:53:09  <xorAxAx> because you seem to be dependant on thomas test output
2007-07-21T00:56:00  <grzywacz> THIS ATE YOUR EXCEPTION HAHAHAAAAAAAA
2007-07-21T00:56:01  <grzywacz> ....
2007-07-21T00:56:03  <grzywacz> Found it.
2007-07-21T00:56:13  <grzywacz> Print debugging ftw.
2007-07-21T00:56:22  <xorAxAx> eat the author!
2007-07-21T00:56:57  <xorAxAx> lanius: it shouldnt be too hard to do some ssh machine 'cd foo; hg pull -u; ~/py.test'
2007-07-21T00:57:43  <grzywacz> The funny thing is, it's the same code as in stable.
2007-07-21T00:57:55  <grzywacz> So either I've never triggered it at this point, or... dunno.
2007-07-21T00:59:25  <xorAxAx> and why was it surpressed?
2007-07-21T00:59:45  <grzywacz> xorAxAx, if I have a few nested try blocks, catch an exception in the innermost one and raise again, it won't omit remaining finally: blocks, right?
2007-07-21T01:00:19  <xorAxAx> it will never do so, right
2007-07-21T01:00:37  <grzywacz> xorAxAx, http://pyxmpp.jajcus.net/trac/browser/trunk/pyxmpp/xmlextra.py
2007-07-21T01:00:43  <grzywacz> Search for endElement
2007-07-21T01:00:45  <xorAxAx> except if you use os.kill or os._exit
2007-07-21T01:01:25  <grzywacz> xorAxAx, http://rafb.net/p/EUyCe315.html
2007-07-21T01:01:32  <grzywacz> Relevant part of stack.
2007-07-21T01:01:36  <xorAxAx>        except:
2007-07-21T01:01:48  <grzywacz> Yes.
2007-07-21T01:02:37  <grzywacz> So, like... He's gonna hate me. :P
2007-07-21T01:02:37  <xorAxAx> so you will need to wrap handle_message into a try/except block
2007-07-21T01:03:09  <grzywacz> Yes, that's a proper workaround for the moment, but still... :X
2007-07-21T01:03:12  <xorAxAx> OMG, this finally: del stuff is so weird
2007-07-21T01:03:15  <xorAxAx> well
2007-07-21T01:03:39  <xorAxAx> its bad style to propagate your exceptions into his code
2007-07-21T01:03:47  <xorAxAx> nevertheless he should ignore any exception
2007-07-21T01:03:54  <xorAxAx> +not
2007-07-21T01:05:40  <grzywacz> Well, when I write my code I don't keep in mind all the time that I'm actually in a callback.
2007-07-21T01:06:57  <xorAxAx> thats bad
2007-07-21T01:06:59  <grzywacz> (In fact, it's an exception from his own code)
2007-07-21T01:07:10  <xorAxAx> hmm?
2007-07-21T01:07:23  <xorAxAx> you mean your callback calls his code?
2007-07-21T01:07:47  <grzywacz> Yes. I create a Message to send.
2007-07-21T01:07:58  <grzywacz> And it's raised there.
2007-07-21T01:08:21  <grzywacz> Then propagates through my code (because I didn't expect UnicodeErrors :D), and vanishes without a trace in pyxmpp again.
2007-07-21T01:08:41  <grzywacz> But in the meantime a piece of my code get omitted. ;)
2007-07-21T01:08:44  <grzywacz> *gets
2007-07-21T01:10:03  <grzywacz> Doesn't matter. I'll fix it in my code and notify him about the problem when I see him.
2007-07-21T01:10:09  <xorAxAx> grzywacz: http://hg.alexanderweb.de/moin-1.7-jabber-knowak/rev/76f87ae87759 -- how should thta fix any bug?
2007-07-21T01:10:23  <xorAxAx> grzywacz: the control flow doesnt end in the if block above that getattr op
2007-07-21T01:10:24  <grzywacz> Yes.
2007-07-21T01:10:28  <xorAxAx> grzywacz: please write tests
2007-07-21T01:10:49  <xorAxAx> to avoid such void checkins :)
2007-07-21T01:10:50  <grzywacz> xorAxAx, missing return
2007-07-21T01:10:57  <grzywacz> void?
2007-07-21T01:11:10  <xorAxAx> well, it didnt fix anything
2007-07-21T01:11:15  <xorAxAx> so its void :)
2007-07-21T01:11:17  <grzywacz> It does.
2007-07-21T01:11:24  <grzywacz> Wait.
2007-07-21T01:11:25  <grzywacz> No. :P
2007-07-21T01:11:43  <grzywacz> I tested with return in another branch and forgot to add it here. ;)
2007-07-21T01:12:48  <xorAxAx> oh well, use reproducible test cases, write unit tests :)
2007-07-21T01:14:11  <xorAxAx> ThomasWaldmann: where did you get that nifty pep8 regex?
2007-07-21T01:19:42  <ThomasWaldmann> which?
2007-07-21T01:20:35  <xorAxAx> for the operator whitespace check
2007-07-21T01:20:40  <xorAxAx> its long
2007-07-21T01:20:51  <ThomasWaldmann> self-made :)
2007-07-21T01:20:58  <xorAxAx> hand-written?
2007-07-21T01:20:59  <xorAxAx> hehe
2007-07-21T01:21:02  <ThomasWaldmann> but should be improved
2007-07-21T01:21:36  <ThomasWaldmann> it seems to not detect some cases correctly
2007-07-21T01:21:51  <xorAxAx> ThomasWaldmann: prius vs. hummer - http://www.heise.de/tp/r4/artikel/25/25774/1.html
2007-07-21T01:22:24  <grzywacz> xorAxAx, http://pyxmpp.jajcus.net/trac/ticket/14 ;)
2007-07-21T01:22:44  <xorAxAx> 14 already!
2007-07-21T01:22:53  <grzywacz> Yay. ;)
2007-07-21T01:23:03  <grzywacz> I'm going to add at least one more. :p
2007-07-21T01:25:54  <xorAxAx> +    users = get_by_filter(request, 'jid', jabber_id)[0]
2007-07-21T01:25:55  <xorAxAx> +    if len(users) > 0:
2007-07-21T01:25:58  <xorAxAx> +    users = get_by_filter(request, 'email', email_address)
2007-07-21T01:25:59  <xorAxAx> +    if len(users) > 0:
2007-07-21T01:26:03  <xorAxAx> lanius: explain the difference
2007-07-21T01:36:47  <ThomasWaldmann> xorAxAx: nice tp article.
2007-07-21T01:40:52  <grzywacz> xorAxAx, http://kolos.math.uni.lodz.pl/~grzywacz/pyxmpp_unicode.patch ;s
2007-07-21T01:43:03  <ThomasWaldmann> grzywacz: file a pep8 bug, too
2007-07-21T01:44:06  <grzywacz> ThomasWaldmann, what? ;)
2007-07-21T01:44:45  <ThomasWaldmann> for pyxmpp
2007-07-21T01:45:49  <grzywacz> ThomasWaldmann, it doesn't affect my code, so I won't do that.
2007-07-21T01:48:48  <grzywacz> xorAxAx, and filled in: http://pyxmpp.jajcus.net/trac/ticket/15
2007-07-21T01:50:39  <xorAxAx> keep me up to date, my student :)
2007-07-21T01:51:16  <grzywacz> Will do.
2007-07-21T01:53:03  <grzywacz> xorAxAx, I wonder what I should do about my workarounds in bot code regarding the utf<->unicode issue...
2007-07-21T01:53:19  <grzywacz> Try to submit an unicode string, as advised by docs, catch exception, re-submit a plain str?
2007-07-21T01:54:30  <xorAxAx> maybe you can check the library version somehow?
2007-07-21T01:54:37  <xorAxAx> otherwise you will need to take that path, ye
2007-07-21T01:54:40  <xorAxAx> s
2007-07-21T01:56:10  <grzywacz> I can check a revision, yes.
2007-07-21T01:57:16  <grzywacz> But there's no fix as of yet, so...
2007-07-21T02:18:02  <grzywacz> http://en.wikipedia.org/wiki/QR_Code
2007-07-21T02:18:03  <grzywacz> Funny.
2007-07-21T02:38:08  <grzywacz> test_packages.py[2] F.
2007-07-21T02:38:11  <grzywacz> In 1.7.
2007-07-21T02:38:28  <grzywacz> ThomasWaldmann
2007-07-21T02:38:31  <CIA-27> moin: Thomas Waldmann <tw AT waldmann-edv DOT de> * 2468:c9949c55ff5e 1.7-jabber-knowak/MoinMoin/ (29 files in 14 dirs): add coverage_modules attribute for coverage testing
2007-07-21T02:38:32  <CIA-27> moin: Johannes Berg <johannes AT sipsolutions DOT net> * 2469:fa3aca6aacd4 1.7-jabber-knowak/MoinMoin/userprefs/suid.py: make pep8 checker happy
2007-07-21T02:38:35  <CIA-27> moin: Thomas Waldmann <tw AT waldmann-edv DOT de> * 2470:3d08f1cb4429 1.7-jabber-knowak/MoinMoin/ (10 files in 9 dirs): pep8 whitespace fixes
2007-07-21T02:38:43  <CIA-27> moin: Thomas Waldmann <tw AT waldmann-edv DOT de> * 2471:ac7f57165c9a 1.7-jabber-knowak/MoinMoin/userprefs/suid.py: merged main
2007-07-21T02:38:46  <CIA-27> moin: Karol 'grzywacz' Nowak <grzywacz@sul.uni.lodz.pl> * 2472:7131fda5e82d 1.7-jabber-knowak/MoinMoin/ (40 files in 23 dirs): Merge main.
2007-07-21T02:38:54  <CIA-27> moin: Karol 'grzywacz' Nowak <grzywacz@sul.uni.lodz.pl> * 2473:b0185066e802 1.7-jabber-knowak/jabberbot/xmlrpcbot.py: Handle exceptions in get_language_by_jid
2007-07-21T02:39:00  <CIA-27> moin: Karol 'grzywacz' Nowak <grzywacz@sul.uni.lodz.pl> * 2474:4030f9321319 1.7-jabber-knowak/jabberbot/xmlrpcbot.py: Fix local variable reference prior to assignment.
2007-07-21T02:39:08  <CIA-27> moin: Karol 'grzywacz' Nowak <grzywacz@sul.uni.lodz.pl> * 2475:33eb7652cc0a 1.7-jabber-knowak/jabberbot/xmppbot.py: Actually fix what 76f87ae87759 tried. Finally work around pyxmpp problems (?).
2007-07-21T02:39:16  <CIA-27> moin: Thomas Waldmann <tw AT waldmann-edv DOT de> * 2476:839b360413a9 1.7-jabber-knowak/MoinMoin/filter/_tests/test_filter.py: tests: add some basic filter tests
2007-07-21T02:39:22  <CIA-27> moin: Karol 'grzywacz' Nowak <grzywacz@sul.uni.lodz.pl> * 2477:41e79a4df6b6 1.7-jabber-knowak/jabberbot/ (xmlrpcbot.py xmppbot.py): Whitespace fixes.
2007-07-21T02:39:30  <CIA-27> moin: Karol 'grzywacz' Nowak <grzywacz@sul.uni.lodz.pl> * 2478:fe625067fa0f 1.7-jabber-knowak/MoinMoin/ (events/_tests/test_events.py _tests/test_events.py): Move test_events to MoinMoin/events/_tests
2007-07-21T02:39:38  <CIA-27> moin: Karol 'grzywacz' Nowak <grzywacz@sul.uni.lodz.pl> * 2479:0c66cfd93cd9 1.7-jabber-knowak/ (54 files in 30 dirs): Merge main.
2007-07-21T02:39:46  <CIA-27> moin: Karol 'grzywacz' Nowak <grzywacz@sul.uni.lodz.pl> * 2480:8fb3dc91df77 1.7-jabber-knowak/ (5 files in 4 dirs): Merge devel.
2007-07-21T02:42:01  <grzywacz> Hm.
2007-07-21T02:42:18  <grzywacz> Or maybe something's odd with my copy again...
2007-07-21T02:49:21  <grzywacz> No idea why it fails.
2007-07-21T02:51:24  <grzywacz> Like that: http://rafb.net/p/IMoxvJ51.html
2007-07-21T09:58:47  <ThomasWaldmann> grzywacz: it doesnt happen in main branch
2007-07-21T12:46:05  <dreimark> moin
2007-07-21T13:29:35  <neagulm> hello dreimark
2007-07-21T13:30:00  <CIA-27> moin: Marian Neagul marian@info.uvt.ro work * 2514:034a90ad7b18 1.7-classify-mneagul/MoinMoin/_tests/test_classifier.py: Check for remote classifier in SpamBayesRPC benchmark
2007-07-21T13:30:06  <CIA-27> moin: Marian Neagul marian@info.uvt.ro work * 2515:81ed34b5c376 1.7-classify-mneagul/MoinMoin/classifier/SpamBayes.py: Added comment about locking problem
2007-07-21T13:30:12  <CIA-27> moin: Marian Neagul marian@info.uvt.ro work * 2516:798a81121e15 1.7-classify-mneagul/MoinMoin/classifier/SpamBayesRPC.py: Coding style fixes
2007-07-21T13:30:20  <CIA-27> moin: Marian Neagul marian@info.uvt.ro work * 2517:d7e9834aee30 1.7-classify-mneagul/MoinMoin/classifier/__init__.py: A try to fix the SpamBayes locking problem
2007-07-21T13:30:31  <CIA-27> moin: Marian Neagul marian@info.uvt.ro work * 2518:d2a69e69bf2d 1.7-classify-mneagul/MoinMoin/classifier/__init__.py: Add classifier autoselection
2007-07-21T13:37:20  <grzywacz> ThomasWaldmann, I have no idea how's that test supposed to work
2007-07-21T13:46:37  <dreimark> hi neagulm
2007-07-21T13:47:23  <neagulm> dreimark, what is your opinion about a recommendation system for MoinMoin ?
2007-07-21T13:49:01  <dreimark> neagulm: I think its a good idea.
2007-07-21T13:49:54  <dreimark> where do you want to add it into the theme?
2007-07-21T13:50:08  <neagulm> dreimark, I'm searching for the best approach... but I think that a mixed implementation (collaborative+content based) might be the right one
2007-07-21T13:51:43  <dreimark> I think too or one the user in preferences or the admin in wikiconfig could select
2007-07-21T13:52:28  <neagulm> dreimark, in the modern theme i would position the recommendations in a position similar to the position of bar in rightsidebar theme
2007-07-21T13:54:54  <dreimark> neagulm: floating right on top ?
2007-07-21T13:55:33  <dreimark> or depends on how much it is right of action menue
2007-07-21T13:58:00  <neagulm> brb
2007-07-21T14:02:50  <dreimark> ThomasWaldmann: is the Badcontent checked for file upload too, for the name of the file? and neagulm did you check this name too?
2007-07-21T14:07:52  <neagulm> dreimark, yes
2007-07-21T14:11:09  <neagulm> in Timisoara is very hot: 41 degrees Celsius :( last night the temperature was ~29 degrees...
2007-07-21T14:13:54  <dreimark> neagulm: thats sounds for a temperature I would not be able to sleep
2007-07-21T14:15:11  <neagulm> dreimark, the whole last week had temperatures grater then 39 over day and > 26 over night
2007-07-21T14:19:47  <dreimark> we have now a sunny weekend and almost rain the last days, but last year it was similiar to your weather
2007-07-21T14:25:16  <neagulm> dreimark, should I add some userpreferences to the current spam classification (enable/disable notification, change threshold)
2007-07-21T14:25:20  <neagulm> dreimark, ?
2007-07-21T14:25:42  <neagulm> dreimark, or should we leave this only for the admin ?
2007-07-21T14:29:49  <dreimark> neagulm: should be done in wikiconfig, otherwise a spammer could disable it
2007-07-21T14:31:26  <dreimark> recommendation should be controlled from the user
2007-07-21T14:34:59  <xorAxAx> neagulm: how would such a system work?
2007-07-21T14:36:04  <neagulm> xorAxAx, we have 2 choices: social recommendations or content based recommendations
2007-07-21T14:36:17  <xorAxAx> what do you mean by "recommendation"?
2007-07-21T14:36:34  <neagulm> xorAxAx, suggest pages that might be of interest for the user
2007-07-21T14:36:59  <xorAxAx> on page view?
2007-07-21T14:37:16  <neagulm> xorAxAx, yes
2007-07-21T14:37:18  <neagulm> xorAxAx, one social like system was developed last year by a student for drupal, http://drupal.org/project/cre
2007-07-21T14:37:52  <xorAxAx> so did you drop the multi-category  stuff for now?
2007-07-21T14:39:50  <neagulm> no, machine learning algorithms can be used for content based recommendations
2007-07-21T14:41:34  <xorAxAx> yeah
2007-07-21T14:41:42  <xorAxAx> but what about the multi-cat stuff, whats your plan?
2007-07-21T14:43:58  <neagulm> the original idea was to allow the user to add predefined "tags" for a page (or propose new tags). Based on these tags we should be able to attach new tags to untagged pages.
2007-07-21T14:44:20  <neagulm> in my vision: tags~=category's
2007-07-21T14:45:05  <neagulm> xorAxAx, dreimark brb, i going outside to buy some mineral water, :D ~10mintes
2007-07-21T14:46:03  <xorAxAx> yes, but implementing the suggestions is one step further from implementing multi-category classification
2007-07-21T15:04:23  <lanius_> xorAxAx: no, i have a linux account and after thomas said it failed i tested it there
2007-07-21T15:04:31  <xorAxAx> ok
2007-07-21T15:04:35  <lanius_> xorAxAx: and the error was not linux specific,but something general with mercurial
2007-07-21T15:04:48  <xorAxAx> mercurial?
2007-07-21T15:05:02  <xorAxAx> you mean the directories missing?
2007-07-21T15:05:04  <lanius_> mercurial seems not to add empty directoires
2007-07-21T15:05:06  <lanius_> yes
2007-07-21T15:07:15  <lanius_> rayvd: strange, i don't get this error
2007-07-21T15:37:06  <xorAxAx> lanius: your index stuff doesnt help rayvd at all ...
2007-07-21T15:37:17  <xorAxAx> because the subscribed pages are regexes
2007-07-21T15:38:15  <xorAxAx> (his problem needs to be solved differently)
2007-07-21T15:57:20  <lanius> xorAxAx: but the only thing were pagenames are stored is in subscribe.py which stores the whole pagename
2007-07-21T15:57:29  <lanius> so we could drop that regex thing since it is not used
2007-07-21T15:57:55  <xorAxAx> lanius: ?
2007-07-21T15:58:02  <xorAxAx> lanius: the regexes are used of course
2007-07-21T15:58:08  <xorAxAx> you can enter them via userprefs
2007-07-21T15:58:30  <xorAxAx> mmcgrath once said that the fedora wiki even has a significant amount of users of regexes
2007-07-21T16:02:56  <lanius> xorAxAx: ah there, strange somehow that is missing in my local wiki, maybe just deactivated
2007-07-21T16:10:02  <xorAxAx> yes, the whole stuff is only shown if mails are enabled
2007-07-21T16:14:58  <xorAxAx> dreimark: the packages test is still failing and  i think it cant be fixed. you broke it when you added the "added" message for addrevision
2007-07-21T16:15:05  <xorAxAx> dreimark: what do you suggest to fix it?
2007-07-21T16:15:31  <xorAxAx> we could manually prune the page before running the debug script
2007-07-21T16:15:35  <xorAxAx> or add a prune command
2007-07-21T16:17:59  <dreimark> xorAxAx: test_packages.py does not fail for me do you have a different one?
2007-07-21T16:18:16  <xorAxAx> dreimark: it fails in some cases
2007-07-21T16:18:25  <xorAxAx> dreimark: karol has a workdir where it fails
2007-07-21T16:18:36  <xorAxAx> the problem is that deletepage doesnt prune the page
2007-07-21T16:18:57  <xorAxAx> maybe he can give you details when he comes online
2007-07-21T16:20:26  <dreimark> waiting ....
2007-07-21T16:29:34  <lanius> xorAxAx: well, it could be solved with some kind of filter functions instead of the plain key=value pairs, but i'm thinking how to implement filter functions efficiently with databases
2007-07-21T16:30:24  <xorAxAx> lanius: well, you cannot, at least not the general problem
2007-07-21T16:30:43  <xorAxAx> lanius: so my suggestion was to filter out regexes on save into a custom bucket
2007-07-21T16:30:54  <xorAxAx> lanius: and traverse them linearly
2007-07-21T16:31:05  <xorAxAx> for the normal pagenames, the index stuff could be used, then
2007-07-21T16:31:13  <xorAxAx> and then the regex bucket is traversed
2007-07-21T16:31:31  <xorAxAx> which would map regex -> user id
2007-07-21T16:33:46  <lanius> xorAxAx: the problem is that these are no real regexes but, string which *could* be regexes
2007-07-21T16:35:58  <xorAxAx> yes, some heuristic is enough
2007-07-21T16:36:09  <xorAxAx> and  i am not sure if this should be solved on the storage layer
2007-07-21T16:36:25  <xorAxAx> can you think of some way to add something like this on the metadata layer?
2007-07-21T16:36:29  <xorAxAx> maybe some observable system
2007-07-21T16:36:36  <xorAxAx> some metadata changed event
2007-07-21T16:37:08  <neagulm> dreimark, bbl
2007-07-21T16:39:31  <lanius> xorAxAx: well it is some kind of querying the metadata, so i would like to solve it with the query interface, how the indexes are stored internally is another question
2007-07-21T16:41:17  <xorAxAx> lanius: no, this is not solvable with query-time only code
2007-07-21T16:41:42  <xorAxAx> and i think its completly solvable by introducing some metadata changed event
2007-07-21T16:41:56  <xorAxAx> without modifying any moin code (just adding new)
2007-07-21T16:42:14  <xorAxAx> ok, the subscription search code would have to be changed to use the new stuff
2007-07-21T16:42:24  <xorAxAx> lanius: but i dont think that this is your task :)
2007-07-21T16:43:12  <lanius> how does that metadata changed event help?
2007-07-21T16:44:26  <xorAxAx> it would see the changed subscription list, calculate the delta, filter it by regexes only and update the regex->uid mapping
2007-07-21T16:45:45  <lanius> and store this mapping in the cache?
2007-07-21T16:45:52  <ThomasWaldmann> re
2007-07-21T16:45:58  <lanius> hi THomas
2007-07-21T16:46:37  <xorAxAx> lanius: yes
2007-07-21T16:48:14  <ThomasWaldmann> dreimark: when deleting the test wiki, the packages test will fail
2007-07-21T16:49:05  <dreimark> trying
2007-07-21T16:49:21  <ThomasWaldmann> dreimark: and I have seen 2 kind of failures: one because there is no "Page added", another because there are 2 "Page added" strings.
2007-07-21T16:51:32  <lanius> xorAxAx: so do you see any need for a query interface or indexes at all
2007-07-21T16:52:15  <xorAxAx> lanius: for this particular problem?
2007-07-21T16:52:25  <lanius> for this problem and generally
2007-07-21T16:52:38  <xorAxAx> well
2007-07-21T16:53:29  <xorAxAx> previously, only the user data benefitted from a O(n) to O(log n) speedup using some name2id tuple
2007-07-21T16:53:36  <xorAxAx> generally indexes make searches faster
2007-07-21T16:53:51  <xorAxAx> the imagined selection by mimetype would benefit from it
2007-07-21T16:54:31  <dreimark> moin-1.7$ rm -r tests/wiki and then py.test gives 0 failure
2007-07-21T16:54:45  <dreimark> ThomasWaldmann: strange
2007-07-21T16:57:03  <lanius> xorAxAx: so you would just keep the key=value mapping with no extension?
2007-07-21T16:58:39  <xorAxAx> lanius: generally i cannot think of a use case for e.g. preprocessed (collated) index data
2007-07-21T16:59:01  <xorAxAx> does the metadata currently support multiple values per key per item?
2007-07-21T16:59:21  <lanius> yes
2007-07-21T16:59:34  <lanius> e.g. the ACL code uses it
2007-07-21T16:59:36  <xorAxAx> how? isnt there a dict-like interface everywhere?
2007-07-21T17:00:00  <lanius> yes and if there are multiple values the value of a dict key is a list
2007-07-21T17:00:25  <xorAxAx> ah
2007-07-21T17:00:57  <xorAxAx> imagine this: for the mimetype key, the index should not only contain text/plain, but also text
2007-07-21T17:01:23  <xorAxAx> on the other hand, you could do multiple queries afterwards ...
2007-07-21T17:01:44  <xorAxAx> i think collations make most sense if you want to be able to query index keys case-insensitively
2007-07-21T17:02:37  <lanius> collations?
2007-07-21T17:03:04  <xorAxAx> 16:57:03 < lanius> xorAxAx: so you would just keep the key=value mapping with no extension?
2007-07-21T17:03:10  <xorAxAx> collations are the only extension i can think of
2007-07-21T17:03:33  <xorAxAx> well, mapping functions is a better term
2007-07-21T17:03:51  <xorAxAx> so you actually store a different value than you get into your backend operation
2007-07-21T17:03:57  <xorAxAx> like storing text/ and text/plain
2007-07-21T17:04:02  <lanius> ah, i just wondered about the term collations, but ok
2007-07-21T17:04:06  <xorAxAx> but thats no simplification
2007-07-21T17:04:18  <lanius> but wouldn't that be solved by regexes again?
2007-07-21T17:04:34  <xorAxAx> no
2007-07-21T17:04:44  <xorAxAx> you cannot do anything sane with regexes
2007-07-21T17:04:56  <xorAxAx> you cannot build indexes for data that you want to query with general regexes
2007-07-21T17:05:13  <xorAxAx> and the solution is proposed above to fedoras problem is pretty orthogonal to indexes
2007-07-21T17:05:28  <lanius> ah so out of text/plain you would build two keys in the index, one is text/ and one is text/plain?
2007-07-21T17:05:36  <xorAxAx> yes, but thats pointless
2007-07-21T17:05:48  <lanius> pointless?
2007-07-21T17:05:58  <xorAxAx> yes, because you can simply do queries
2007-07-21T17:06:04  <xorAxAx> that wont increase the complexity
2007-07-21T17:06:11  <lanius> what kind of queries
2007-07-21T17:06:19  <xorAxAx> query for text and for text/plain
2007-07-21T17:06:31  <lanius> that means the answer to my question is no?
2007-07-21T17:06:49  <xorAxAx> yes, because i dont want to, i was just thinking about it
2007-07-21T17:06:57  <lanius> i see
2007-07-21T17:07:03  <xorAxAx> but if somebody wants to search for text/, you would actually need such a mapping function
2007-07-21T17:07:12  <xorAxAx> so maybe rather think about how to add it to the system :-)
2007-07-21T17:07:48  <xorAxAx> some backend-agnostic mapping metadata-key-name to function
2007-07-21T17:08:12  <xorAxAx> (how to handle on metadata modification?)
2007-07-21T17:09:19  <lanius> xorAxAx: if i would have the mapping function each key must be checked if it matches the function, right?
2007-07-21T17:09:41  <xorAxAx> not a mapping function
2007-07-21T17:09:43  <xorAxAx> a dictionary
2007-07-21T17:10:03  <lanius> explain further please
2007-07-21T17:10:23  <xorAxAx> {"mimetype": generate_all_mimetypes}
2007-07-21T17:11:17  <lanius> where would this thing fit in, in the query or in the store part
2007-07-21T17:12:29  <xorAxAx> storage
2007-07-21T17:14:26  <lanius> what speaks against my solution with filter functinos in the query part?
2007-07-21T17:14:56  <xorAxAx> how would that work?
2007-07-21T17:15:32  <lanius> each key in the index will be checked if it matches the filter function, if yes the values will be append to the list of items
2007-07-21T17:16:07  <lanius> that would add a maximum of flexibility
2007-07-21T17:16:10  <xorAxAx> "matches the filter function"?
2007-07-21T17:16:37  <lanius> you only have text/plain in the dict with values [page1,page2]
2007-07-21T17:16:55  <lanius> the filterfunct would be somethin like "text/" in key: return True
2007-07-21T17:17:05  <xorAxAx> ?
2007-07-21T17:17:05  <lanius> which would match text/plain
2007-07-21T17:17:23  <xorAxAx> when would you call the function?
2007-07-21T17:17:33  <lanius> when querying
2007-07-21T17:17:43  <xorAxAx> ???
2007-07-21T17:17:54  <dreimark> ThomasWaldmann: new tests in karols branch
2007-07-21T17:18:05  <dreimark> so I have 1 failure too
2007-07-21T17:18:08  <xorAxAx> but how do you want to use indexes if there is a function?
2007-07-21T17:18:20  <xorAxAx> you would increase the query complexity to O(n) again
2007-07-21T17:18:26  <xorAxAx> which makes them pointless
2007-07-21T17:18:48  <lanius> yes, but there is still a point since the io overhead is down to just one file istead of n files
2007-07-21T17:19:52  <xorAxAx> thats irrelevant IMHO
2007-07-21T17:20:14  <lanius> i think the io overhead is the bigger performance killer
2007-07-21T17:20:22  <xorAxAx> the stuff is in the cache
2007-07-21T17:20:31  <xorAxAx> indexes need to be constructed so that they reduce the query complexity to O(log n)
2007-07-21T17:20:35  <lanius> not for users
2007-07-21T17:20:41  <xorAxAx> ?
2007-07-21T17:20:45  <lanius> you can't cache users
2007-07-21T17:20:49  <lanius> or user objects
2007-07-21T17:21:04  <xorAxAx> your OS does
2007-07-21T17:21:24  <lanius> i would not be too sure of that
2007-07-21T17:21:30  <xorAxAx> so, your suggestion is not sensible at all IMHO
2007-07-21T17:21:47  <lanius> if your os caches that, then the user regex subscriptoin stuff would be no problem
2007-07-21T17:22:20  <xorAxAx> the problem is decoding thousands of files and parsing regexes
2007-07-21T17:23:09  <xorAxAx> your suggestion only drops some overhead because iterating would involve the particular key
2007-07-21T17:23:10  <lanius> parsing regexes can't be solved, can it`? then replace io/overhead by decoding thousands of files
2007-07-21T17:23:13  <xorAxAx> and drop other metadata keys
2007-07-21T17:23:18  <xorAxAx> lanius: that can be solved
2007-07-21T17:23:23  <xorAxAx> as i described above
2007-07-21T17:23:38  <lanius> how
2007-07-21T17:23:52  <lanius> and still the decoding thousand of files part has gone with my solution
2007-07-21T17:24:19  <xorAxAx> for you its "iterating over thousands of data values"
2007-07-21T17:24:33  <xorAxAx> how do you store lists in the db btw?
2007-07-21T17:25:01  <lanius> which had to be done before as well, just with the decoding part added
2007-07-21T17:25:08  <xorAxAx> my suggestion will only iterate only over log n + m values, m being the suspected regexes
2007-07-21T17:25:10  <lanius> you mean if a value is a list?
2007-07-21T17:25:13  <xorAxAx> yes
2007-07-21T17:25:23  <lanius> i store a key for each list value
2007-07-21T17:25:38  <lanius> suspected regexes?
2007-07-21T17:25:41  <xorAxAx> so bsddb supports multi-sets?
2007-07-21T17:25:49  <lanius> multi-sets?
2007-07-21T17:25:50  <xorAxAx> the heuristic i talked about above
2007-07-21T17:25:57  <lanius> explain it again please
2007-07-21T17:26:05  <xorAxAx> a bsddb in python is a string2string dictionary on disk, no?
2007-07-21T17:26:17  <xorAxAx> a multi set is a set where items may occur multiple times
2007-07-21T17:26:17  <lanius> yes, that's why i use pickle on the right side
2007-07-21T17:26:27  <xorAxAx> see, so you pickle
2007-07-21T17:26:34  <xorAxAx> which means that you have an unpickling overhead
2007-07-21T17:26:46  <xorAxAx> and need to keep all subscriptions in memory
2007-07-21T17:26:48  <xorAxAx> 2 times
2007-07-21T17:27:18  <xorAxAx> the heuristic determines whether to add the line to the regex cache
2007-07-21T17:28:01  <xorAxAx> but thats all orthogonal to the storage layer, it should be implemented using the observer pattern as pointed out above
2007-07-21T17:28:22  <lanius> so on each new page/page rename/page copy you have to match all regex to update the cache, and on all regex changes
2007-07-21T17:28:28  <xorAxAx> furthermore, tell me how you want to run a query like "give me all text/* mimetyped items" without introducing the stuff i described above
2007-07-21T17:28:34  <xorAxAx> lanius: nope
2007-07-21T17:28:41  <xorAxAx> lanius: that would be an extension
2007-07-21T17:28:49  <lanius> extension?
2007-07-21T17:28:54  <xorAxAx> lanius: the initial plan is to simply traverse the list on every modification event
2007-07-21T17:29:05  <lanius> modification of what
2007-07-21T17:29:05  <xorAxAx> extension as in "could be done as a second step"
2007-07-21T17:29:08  <xorAxAx> a page
2007-07-21T17:29:16  <xorAxAx> PageModificationEvent
2007-07-21T17:29:25  <lanius> which wouldn't make it any faster then the current solution, would it
2007-07-21T17:29:31  <xorAxAx> it would make it much faster
2007-07-21T17:29:39  <xorAxAx> 15 times i would say
2007-07-21T17:29:40  <lanius> you still have to check all regexes
2007-07-21T17:29:52  <xorAxAx> yes, but only very few users use regular expressions
2007-07-21T17:30:09  <xorAxAx> esp. most users dont subscribe pages at all
2007-07-21T17:30:50  <xorAxAx> and the idea is that static subscriptions can be yielded in sub-linear time
2007-07-21T17:31:07  <lanius> but how can you decide if it is an regex or an static subscription
2007-07-21T17:31:16  <xorAxAx> by a simple heuristic
2007-07-21T17:31:17  <lanius> furthermore you have to update the list on each user change
2007-07-21T17:31:23  <lanius> tell me the heuristic
2007-07-21T17:31:29  <xorAxAx> yes, using events like i described above
2007-07-21T17:31:49  <xorAxAx> "if it contains only characters or cannot be compiled as a regex, dont put it into the list"
2007-07-21T17:31:51  <lanius> yes, but this is some kind of UserChangedEvent, not PageChangedEvent
2007-07-21T17:31:56  <xorAxAx> wont give you any incorrect results
2007-07-21T17:33:43  <lanius> an isWikiName check would do, which must only be performend when the user is changed, so this is not very expensive
2007-07-21T17:33:49  <lanius> ok
2007-07-21T17:33:52  <lanius> i see
2007-07-21T17:34:06  <xorAxAx> isWikiName!?!?
2007-07-21T17:34:14  <lanius> you check if the subscription is a valid wikiname
2007-07-21T17:34:21  <xorAxAx> thats an incorrect attempt
2007-07-21T17:34:25  <lanius> why
2007-07-21T17:34:32  <xorAxAx> because you can subscribe to pages that are not valid wikinames
2007-07-21T17:34:42  <xorAxAx> checking for characters is easier as well
2007-07-21T17:34:44  <lanius> e.g.
2007-07-21T17:34:51  <xorAxAx> This is a pagename
2007-07-21T17:35:37  <lanius> then it would be a isValidPageName check, but i understand now
2007-07-21T17:35:51  <xorAxAx> no
2007-07-21T17:35:51  <lanius> about the MetadataChangedEvent, it's just a matter of inserting at the right position of code
2007-07-21T17:36:01  <xorAxAx> .* is a valid pagename as well
2007-07-21T17:36:06  <xorAxAx> and it should end up in the list
2007-07-21T17:36:14  <xorAxAx> lanius: yes
2007-07-21T17:36:22  <xorAxAx> well, now lets talk about text/ again
2007-07-21T17:36:34  <xorAxAx> did you understand that there is something necessary to make it work?
2007-07-21T17:37:01  <lanius> yes
2007-07-21T17:37:32  <xorAxAx> i have no idea how to get it right for metadata modification or deletion
2007-07-21T17:37:37  <xorAxAx> but you surely will find a way :)
2007-07-21T17:38:31  <lanius> where is your problem with it?
2007-07-21T17:39:00  <xorAxAx> hmm, for modification, you might need to delete all related stuff in the index and write it again
2007-07-21T17:39:18  <lanius> that's what i already do
2007-07-21T17:39:26  <xorAxAx> ok
2007-07-21T17:40:55  <ThomasWaldmann> lanius: did you try to subscribe to the .* page? :D
2007-07-21T17:41:35  <lanius> i just tried if it is really a valid wiki name :D
2007-07-21T17:41:38  <lanius> pagename
2007-07-21T17:46:35  <ThomasWaldmann> dreimark: http://hg.moinmo.in/moin/1.7-classify-mneagul/rev/798a81121e15 that +, dbfile=dbase looks strange
2007-07-21T17:47:01  <ThomasWaldmann> dreimark: +        # sbayes.score has a realy strange behaviour       typo
2007-07-21T17:48:19  <ThomasWaldmann> dreimark: +        """Try to instanciate the first available classifier     typo
2007-07-21T17:48:28  <dreimark> looks like a wrong insert
2007-07-21T17:48:40  <ThomasWaldmann> dreimark: sorry that I just bother you when your student is offline :)
2007-07-21T17:49:08  <dreimark> no problem I 'll tell him later
2007-07-21T17:49:22  <dreimark> ThomasWaldmann: I found the difference between my test wiki and Karols
2007-07-21T17:49:38  <ThomasWaldmann> dreimark: this is one of the reasons why I always tell "read your diffs before commit". There is quite some chance finding such stuff then.
2007-07-21T17:49:56  <ThomasWaldmann> what was it?
2007-07-21T17:50:34  <dreimark> looks like my test wiki is not clean it copies example pages from my standalone wiki and edit-log and so on
2007-07-21T17:51:02  <ThomasWaldmann> dreimark: +        except:       looks dangerous :)
2007-07-21T17:51:47  <ThomasWaldmann> i thought about introducing some testwiki mtime check, so it is at least deleted and rebuilt daily
2007-07-21T17:52:11  <dreimark> if test_Page
2007-07-21T17:52:37  <dreimark> Editor is running before test_packages then it fails in Karols branch
2007-07-21T17:53:12  <dreimark> if test_PageEditor is excluded test_packages runs too
2007-07-21T17:54:59  <ThomasWaldmann> dreimark: tests finished: 13 failed  - this is when you try to run py.test in neagulms branch
2007-07-21T17:55:30  <ThomasWaldmann> he has to fix tests to not crash when there is no spambayes stuff installed
2007-07-21T17:55:47  <dreimark> I didn't checked today but sometimes he is testing too
2007-07-21T17:56:02  <dreimark> I have mailed him that already
2007-07-21T17:56:16  <ThomasWaldmann> if a test can't run without some libs, then skip the test if the lib is not there
2007-07-21T17:57:10  <ThomasWaldmann> in his branch, you can't even run the sourcecode test without having it crash due to spambayes stuff
2007-07-21T17:58:04  <dreimark> cloning 1.7 again
2007-07-21T18:00:26  <ThomasWaldmann> zenhase: the same thing applies to your stuff. it crashes when genshi.template is not there.
2007-07-21T18:00:34  <dreimark> ThomasWaldmann: no alibi for him
2007-07-21T18:01:43  <ThomasWaldmann> zenhase: your branch misses test_sourcecode. either you have deleted it or your last merge with main is ages ago.
2007-07-21T18:02:35  <dreimark> ThomasWaldmann: in a fresh clone test_packages gives in 1.7 no failure
2007-07-21T18:02:35  <xorAxAx> hah
2007-07-21T18:04:00  <ThomasWaldmann> zenhase: but it also doesnt work because request crashes when no genshi stuff is installed ....
2007-07-21T18:05:14  <dreimark> ThomasWaldmann: with spambayes 0 failure in neagulm branch
2007-07-21T18:05:48  <dreimark> and no source failures
2007-07-21T18:07:14  <dreimark> ThomasWaldmann: instant logging to moindev would be very fine now
2007-07-21T18:07:37  <ThomasWaldmann> dreimark: good to hear :) but nevertheless he should fix that asap. one day we'll merge his stuff into main and then we don't want to have to install sb just to be able to run tests. :)
2007-07-21T18:07:58  <xorAxAx> hi my student
2007-07-21T18:08:03  <dreimark> ThomasWaldmann: yeah I will tell him again
2007-07-21T18:08:05  <xorAxAx> how is the polish weathe?
2007-07-21T18:08:09  <xorAxAx> +r
2007-07-21T18:08:43  <ThomasWaldmann> dreimark: instant logging?
2007-07-21T18:10:04  <dreimark> xorAxAx: bot does every three minutes (I believe) save our chattings so it would be nice to see it not only once a day at MM
2007-07-21T18:12:06  <dreimark> arrgh we have a problem with our test wiki
2007-07-21T18:16:42  <dreimark> maketestwiki.py is broken (I am not sure if the word broken is the right one)
2007-07-21T18:17:00  <dreimark> but SHARE = os.path.abspath(os.path.join(moinpath, 'wiki'))
2007-07-21T18:17:35  <dreimark> will copy our standalone pages to the test wiki
2007-07-21T18:19:07  <dreimark> tests should be based on the same data
2007-07-21T18:24:45  <dreimark> that explains why I didn't see grzywacz test_packages.py failure in 1.7
2007-07-21T18:38:03  <ThomasWaldmann> maybe we could have some data.tar.bz2
2007-07-21T18:40:43  <xorAxAx> ThomasWaldmann: nah
2007-07-21T18:40:44  <dreimark> with a fresh clone I do see it in 1.7 too but as before running test_PageEditor.py before
2007-07-21T18:40:46  <xorAxAx> ThomasWaldmann: data.tar
2007-07-21T18:40:52  <dreimark> py.test test_packages.py test_PageEditor.py gives no failure
2007-07-21T18:40:58  <xorAxAx> ThomasWaldmann: bz2 is a large issue since we arent using tla anymore
2007-07-21T18:41:07  <xorAxAx> because a tar file doesnt add to the repo size
2007-07-21T18:41:20  <xorAxAx> a bz2 file is adding up its size 2 times to the repo
2007-07-21T18:41:30  <xorAxAx> s/doesnt add/& much/
2007-07-21T18:41:42  <ThomasWaldmann> so we move to underlay.tar also?
2007-07-21T18:42:16  <xorAxAx> if anybody finds the time, that would be an advantage, yes
2007-07-21T18:42:23  <ThomasWaldmann> doesn't hg treat tar as binary anyway?
2007-07-21T18:42:26  <xorAxAx> (indeed, its not much work)
2007-07-21T18:42:37  <xorAxAx> yes, but the delta of both tars is compressible very well
2007-07-21T18:42:44  <ThomasWaldmann> ah, ok
2007-07-21T18:42:45  <xorAxAx> compared to the delta of both bz2s
2007-07-21T18:42:54  <xorAxAx> (its not compressible at all)
2007-07-21T18:44:17  <dreimark> ThomasWaldmann: xorAxAx: I have a bet for you
2007-07-21T18:44:48  <xorAxAx> hehe
2007-07-21T18:45:00  <dreimark> What do you think is the result if on a fresh test wiki py.test test_PageEditor.py test_packages.py in test_packages.py fails
2007-07-21T18:45:33  <xorAxAx> it creates a new test page
2007-07-21T18:45:49  <dreimark> and then in a fresh test_wiki first py.test test_PageEditor.py and then py.test test_packages is executed
2007-07-21T18:46:01  <dreimark> should it fail or not
2007-07-21T18:46:34  <dreimark> hey you should not try
2007-07-21T18:51:33  <dreimark> I would suppose it fails too but it doesn't and I can't explain it (may be the test initializing staff is different if we ran many tests instead of single tests)
2007-07-21T18:52:38  <xorAxAx> dreimark: test_packages goes into superuser mode
2007-07-21T18:52:47  * ThomasWaldmann rewrites ParameterParser tests
2007-07-21T18:56:18  <dreimark> xorAxAx: but this does not explain why it runs without failures changing the order py.test test_packages.py test_PageEditor.py
2007-07-21T18:56:54  <xorAxAx> well, see when it prints the added message that you added
2007-07-21T18:57:01  <xorAxAx> and try to find out why it doesnt in every case
2007-07-21T19:01:01  <dreimark> if I skip testSave in test_PageEditor test_packages works well
2007-07-21T19:01:42  <xorAxAx> oh well
2007-07-21T19:01:52  <xorAxAx> pointless debugging attempt :)
2007-07-21T19:19:01  <dreimark> xorAxAx: I don't understand how testSave(request) should work
2007-07-21T19:19:21  <xorAxAx> dreimark: it simply executes commands
2007-07-21T19:19:27  <xorAxAx> and checks the returned message
2007-07-21T19:19:38  <xorAxAx> initially, it only contained Foo\nb
2007-07-21T19:19:41  <xorAxAx> s/b$//
2007-07-21T19:19:51  <dreimark> and from where did it get request
2007-07-21T19:21:42  <xorAxAx> see conftest
2007-07-21T19:23:17  <dreimark> self.request and not request
2007-07-21T19:23:24  <xorAxAx> ?
2007-07-21T19:23:45  <dreimark> http://hg.moinmo.in/moin/1.7-jabber-knowak/diff/a10ae31a6133/MoinMoin/_tests/test_PageEditor.py
2007-07-21T19:24:22  <xorAxAx> yes?
2007-07-21T19:24:28  <dreimark> request is not defined
2007-07-21T19:24:31  <xorAxAx> it is
2007-07-21T19:24:37  <xorAxAx> its the first parameter
2007-07-21T19:26:22  <xorAxAx> grzywacz: in http://hg.moinmo.in/moin/1.7-jabber-knowak/diff/a10ae31a6133/MoinMoin/_tests/test_PageEditor.py you dont restore the event handlers!
2007-07-21T19:27:18  <dreimark> so this test is broken ?
2007-07-21T19:27:38  <xorAxAx> i am not sure what the implications are
2007-07-21T19:27:56  <xorAxAx> but it looks like it stops all page edits
2007-07-21T19:28:03  <xorAxAx> so its broken
2007-07-21T19:28:52  <dreimark> btw. I learned from that that it would be a good idea to have the possibility to run the the tests in a random order too
2007-07-21T19:29:26  <dreimark> bbl, shopping
2007-07-21T19:30:04  <xorAxAx> yeah, i wonder why py.test cant do that yet
2007-07-21T19:52:53  <dreimark> people asked how to stop page edits for maintanance - could that be an easy solution?
2007-07-21T19:54:56  <xorAxAx> ACLs
2007-07-21T20:15:10  <ThomasWaldmann> if ParameterParser gets named arguments that it didn't want, what should it do?
2007-07-21T20:15:46  <ThomasWaldmann> e.g. x=1,y=2,unwanted=3 if the format string just was %(x)i%(y)i
2007-07-21T20:17:01  <xorAxAx> it should complain
2007-07-21T20:17:23  <ThomasWaldmann> (we could just silently put them into the result dict or raise an exception that caller has to handle)
2007-07-21T20:19:38  <dreimark> ThomasWaldmann: they should be saved in a dict and we should think about a special named var to get this dict returned
2007-07-21T20:19:54  <xorAxAx> ugh
2007-07-21T20:22:01  <dreimark> and if this var is used as input for a dict this is separated into named arguments
2007-07-21T20:24:28  <ThomasWaldmann> it currently just raises ValueError (and I have fixed the test to expect that)
2007-07-21T20:24:45  <dreimark> http://idlastro.gsfc.nasa.gov/idl_html_help/Keyword_Inheritance.html description for idl
2007-07-21T20:25:31  <dreimark> ThomasWaldmann: what does happen if all named vars are optional
2007-07-21T20:25:45  <dreimark> e.g. x=1,y=2 and only  x=1 is used
2007-07-21T20:25:53  <ThomasWaldmann> y will be None
2007-07-21T20:26:01  <ThomasWaldmann> (and this even works now :)
2007-07-21T20:26:04  <dreimark> ok
2007-07-21T20:27:41  <dreimark> :)
2007-07-21T20:28:34  <ThomasWaldmann> only Hits macro uses PP currently
2007-07-21T20:28:46  <xorAxAx> yes, it should continue to raise the error
2007-07-21T20:36:14  <dreimark> ThomasWaldmann: could order for positional and named vars mixed, e.g. test,x=1,example,c=2 // c=2,test,example,x=1
2007-07-21T20:36:41  <ThomasWaldmann> http://test17.wikiwikiweb.de/TestWiki17MainBranch see there
2007-07-21T20:39:59  <johill> what is the parameter parser?
2007-07-21T20:40:25  <johill> oh I see
2007-07-21T20:40:56  <johill> xorAxAx: that won't work, with the Action macro we'll want it to accept arbitrary things to be passed to the action invoked
2007-07-21T20:42:08  <xorAxAx> johill: thats a quoting issue
2007-07-21T20:42:16  <xorAxAx> johill: also the action macro doesnt use it
2007-07-21T20:42:17  <dreimark> ThomasWaldmann: the last one should fail or isn't destinguished between named and positional parameters
2007-07-21T20:42:28  <xorAxAx> johill: i am begging for fail fast behaviour
2007-07-21T20:44:32  <johill> xorAxAx: I don't think it has anything to do with quoting, we wouldn't want to write [[Action(show,"my string",rev=7&x=y) but rather Action(show,"my string",rev=7,x=y)
2007-07-21T20:44:50  <johill> I know the action macro doesn't use it but hey, it ought to
2007-07-21T20:46:06  <xorAxAx> johill: hmm
2007-07-21T20:46:10  <xorAxAx> then make it toggable
2007-07-21T20:46:22  <xorAxAx> like **kwargs vs. explicit list of args
2007-07-21T20:46:52  <johill> sounds good to me
2007-07-21T20:47:20  <xorAxAx> but still, that would be secondary compared to usable fail fast behaviour
2007-07-21T20:47:57  <johill> still, sometimes you really want this and having to copy the code to modify it for that seems pointless
2007-07-21T20:49:28  <johill> hm
2007-07-21T20:49:30  <johill> I wonder
2007-07-21T20:49:47  <johill> it might be possible to play tricks and have the actual macro function defined as required?
2007-07-21T20:50:02  <xorAxAx> not without parsing :)
2007-07-21T20:50:11  <johill> ?
2007-07-21T20:50:22  <johill> parsing what? :)
2007-07-21T20:50:26  <johill> I mean
2007-07-21T20:50:27  <xorAxAx> the arguments :)
2007-07-21T20:50:34  <johill> it'd be neat if I could write my macro as
2007-07-21T20:50:36  * xorAxAx is reading the students surveys :)
2007-07-21T20:50:45  <johill> Action(action, title, **params)
2007-07-21T20:50:53  <johill> or Hits(all)
2007-07-21T20:51:07  <xorAxAx> lanius: "So I joined different IRC channels to get a feeling about the project." -- and moin excelled here? :)
2007-07-21T20:51:20  <johill> and some glue automatically invokes it with the right arguments or refuses
2007-07-21T20:51:46  <xorAxAx> ah, you mean that
2007-07-21T20:52:27  <xorAxAx> yes, one would need some differentiation from the old style of defining macros, though
2007-07-21T20:52:41  <johill> oh sure, easy enough though
2007-07-21T20:53:16  <johill> and it'd still have your fail-fast property unless I stuck **kw in
2007-07-21T20:53:28  <xorAxAx> yes
2007-07-21T20:53:41  <xorAxAx> python would do the checkin at call time
2007-07-21T20:53:51  <johill> exactly
2007-07-21T20:54:00  * johill researches
2007-07-21T20:55:08  <dreimark> xorAxAx: where did you read ?
2007-07-21T20:56:45  <xorAxAx> only i can do so, i fear
2007-07-21T20:56:50  <xorAxAx> and thomas
2007-07-21T20:57:13  <xorAxAx> dreimark: or do you see a link to view it on http://code.google.com/soc/2007/moin/open.html or similar pages?
2007-07-21T20:58:25  <dreimark> I do see links but it seems I have no access
2007-07-21T20:59:52  <johill> ah
2007-07-21T20:59:53  <johill> dispatch
2007-07-21T21:00:03  <johill> looks easy
2007-07-21T21:00:29  <johill> hm, no, not that way, hm
2007-07-21T21:00:38  <xorAxAx> still i think that the parser of choice should offer some way of quoting = and , characters
2007-07-21T21:00:55  <xorAxAx> hmm
2007-07-21T21:01:48  <johill> xorAxAx: yeah but we can use " for that easily
2007-07-21T21:01:54  <johill> (and again double for quoting it)
2007-07-21T21:02:29  <johill> well, dinner
2007-07-21T21:04:51  <xorAxAx> ah,  Ma Yuan was accepted by OSCAR
2007-07-21T21:04:54  <xorAxAx> whatever that is
2007-07-21T21:05:14  <johill> the only OSCAR acronym I know is the aim protocol :)
2007-07-21T21:05:19  <xorAxAx> "OSCAR allows users, regardless of their experience level with a *nix environment, to install a Beowulf type high performance computing cluster. "
2007-07-21T21:05:22  <xorAxAx> OMG
2007-07-21T21:05:25  <xorAxAx> we ranked her -4
2007-07-21T21:05:47  <xorAxAx> "This project will Integrate IPVS(a Linux Virtual Server implementation) for web Load Balance and Linux-HA for High availability in OSCAR."
2007-07-21T21:05:58  <xorAxAx> hmm
2007-07-21T21:08:30  <johill> uh, I'm just too stupid :P
2007-07-21T21:08:42  <johill> of course it's as easy as function(*args, **kwargs)
2007-07-21T21:08:47  <xorAxAx> yes
2007-07-21T21:09:10  <johill> I was looking for some builtin :)
2007-07-21T21:12:31  <grzywacz> Uh oh, enough of birthday parties for me...
2007-07-21T21:12:40  <xorAxAx> grzywacz: yours? :)
2007-07-21T21:12:47  <grzywacz> My father's. :)
2007-07-21T21:13:05  <xorAxAx> ah
2007-07-21T21:13:09  <xorAxAx> congrats to him! :)
2007-07-21T21:13:15  <dreimark> the log on MM would be nice now
2007-07-21T21:13:15  <grzywacz> \o/ :)
2007-07-21T21:13:20  <dreimark> from me too
2007-07-21T21:13:52  <grzywacz> M'kay, I'll relay it to him. ;)
2007-07-21T21:14:17  <johill> make sure you print it out
2007-07-21T21:14:31  <grzywacz> Oh, surveys. I'm afraid I didn't write much. :P
2007-07-21T21:14:37  <johill> preferred way to deliver email in some institutions ;)
2007-07-21T21:15:19  <grzywacz> I think my home is not stuck in middle ages. :P
2007-07-21T21:15:20  <grzywacz> :D
2007-07-21T21:15:43  <johill> oh :>
2007-07-21T21:19:01  <dreimark> are there news from fpletz?
2007-07-21T21:23:31  <xorAxAx> nope
2007-07-21T21:25:44  <grzywacz> Done. ;)
2007-07-21T21:29:02  <dreimark> grzywacz: ?
2007-07-21T21:31:18  <CIA-27> moin: Thomas Waldmann <tw AT waldmann-edv DOT de> * 2453:adf5ec4874ed 1.7/MoinMoin/ (_tests/test_wikiutil.py macro/Hits.py wikiutil.py): fix ParameterParser, rewrite ParameterParser tests for py.test (and add more tests), refactor Hits macro
2007-07-21T21:40:44  <CIA-27> moin: Thomas Waldmann <tw AT waldmann-edv DOT de> * 2454:18c71299e2bb 1.7/MoinMoin/_tests/test_wikiutil.py: convert test_wikiutil to py.test
2007-07-21T21:41:03  <grzywacz> dreimark, relayed the congrats. :P
2007-07-21T21:41:27  <dreimark> :)
2007-07-21T21:47:19  <vpv> I was just reading kerneltrap and noticed this is on MoinMoin too: http://kvm.qumranet.com/kvmwiki
2007-07-21T21:48:11  <grzywacz> nice
2007-07-21T21:48:41  <grzywacz> http://kernelnewbies.org/RecentChanges
2007-07-21T21:48:43  <grzywacz> This one as well. :P
2007-07-21T21:53:29  <vpv> oh nice, my second patch made it to .22 kernel: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=28aedb8fd95b9a11cb9dc75d3be1f30227cb4385 :P
2007-07-21T21:54:40  <dreimark> :)
2007-07-21T21:55:12  <dreimark> have to leave, may be back later
2007-07-21T21:56:14  <grzywacz> vpv, nice :)
2007-07-21T21:57:20  <xorAxAx> vpv: which client do you use that uses the remote?
2007-07-21T21:59:17  <ThomasWaldmann> idea for simplyfing ParameterParser:
2007-07-21T21:59:33  <ThomasWaldmann> currently it returns arg_list and arg_dict
2007-07-21T22:00:01  <ThomasWaldmann> how about just putting arg_list[i] into arg_dict[i]?
2007-07-21T22:01:00  <vpv> xorAxAx: VDR
2007-07-21T22:01:20  <grzywacz> xorAxAx, weather is Poland... well... sweating. :E
2007-07-21T22:01:23  <xorAxAx> vpv: ah
2007-07-21T22:01:30  <xorAxAx> vpv: kaffeine doesnt seem to react on keypresses
2007-07-21T22:01:52  <vpv> xorAxAx: do you have the same card?
2007-07-21T22:02:05  <xorAxAx> i havea "WideView USB DVB-T"
2007-07-21T22:02:39  <xorAxAx> 'WideView WT-220U PenType Receiver (Typhoon/Freecom)'
2007-07-21T22:03:20  <ThomasWaldmann> (and additonally returning the positional argument count)
2007-07-21T22:03:54  <vpv> I only use Kaffeine with videos on other computer, so I have no idea how the remotes are supposed to work with it...
2007-07-21T22:04:00  <grzywacz> xorAxAx, regarding not restoring the event handlers... I thought that tests run independently?
2007-07-21T22:04:07  <xorAxAx> grzywacz: no
2007-07-21T22:04:20  <xorAxAx> you have to restore the state afterwards
2007-07-21T22:04:39  <grzywacz> Didn't know. I'll fix it right away, then.
2007-07-21T22:05:06  <xorAxAx> in a try/finally or a teardown_class
2007-07-21T22:05:14  <xorAxAx> the latter is cleaner i think
2007-07-21T22:10:23  <ThomasWaldmann> ok, i just implement it that way if noone objects :)
2007-07-21T22:19:13  <johill> vpv: second patch? :P
2007-07-21T22:20:27  <johill> where is that parser used then?
2007-07-21T22:23:50  <johill> heh
2007-07-21T22:23:54  <johill> taintfilename seems misnamed
2007-07-21T22:25:10  <vpv> johill: yeah, the first one implemented the support for that remote and the second just adds some keys, those are all my kernel patches so far :D
2007-07-21T22:25:39  <johill> vpv: doesn't seem to load anyway, maybe gitweb doesn't like me :)
2007-07-21T22:25:48  <johill> ah now it works
2007-07-21T22:26:01  <johill> oh dvb. neat
2007-07-21T22:30:21  <johill> ThomasWaldmann: why the arg parser this way at all?
2007-07-21T22:31:01  <ThomasWaldmann> i guess you need to ask more concrete :)
2007-07-21T22:31:06  <johill> :)
2007-07-21T22:31:22  <johill> as I said earlier, I think it'd be great to have the macro call specify the args
2007-07-21T22:31:42  <johill> i.e. in the macro you write do(x,y=True,z=False)
2007-07-21T22:31:59  <johill> if you require x to be an int follow with x=int(x)
2007-07-21T22:32:57  <johill> then the arg parser could simply unquote things, stick it into a list and a dict, and call do(*list, **dict)
2007-07-21T22:33:12  <johill> s/and call/and then the macro code could just call/
2007-07-21T22:33:42  <johill> but that doesn't require passing in what type you want :)
2007-07-21T22:33:51  <johill> in fact, it doesn't require passing in anything except the string you got
2007-07-21T22:34:05  <johill> which is good because the macro doesn't have to declare anything that can come out of date
2007-07-21T22:35:43  <ThomasWaldmann> if the list has not the correct parameter count, it will crash
2007-07-21T22:36:26  <ThomasWaldmann> same for unmatched dict entries
2007-07-21T22:36:28  <johill> no, it'll raise a TypeError
2007-07-21T22:37:15  <johill> the parameter parser raises a valueerror
2007-07-21T22:37:31  <johill> in fact, we'd want the generic code to catch both Type and ValueError
2007-07-21T22:37:39  <johill> (to allow for doing x = int(x) as I said)
2007-07-21T22:40:13  <johill> it'd be nicer if python actually allowed to specify a type, I guess
2007-07-21T22:40:20  <ThomasWaldmann> hmm, I'll just finish the current approach and then make some experiments with your idea (if you don't want to do it yourself :)
2007-07-21T22:40:28  <johill> I think I do :)
2007-07-21T22:40:46  <johill> then we can just compare :)
2007-07-21T23:00:30  <CIA-27> moin: Thomas Waldmann <tw AT waldmann-edv DOT de> * 2455:fe71235f1f7c 1.7/MoinMoin/ (_tests/test_wikiutil.py macro/Hits.py wikiutil.py): ParameterParser: changed to return fixed_count, arg_dict, putting positional args into arg_dict[pos], more tests
2007-07-21T23:00:57  <xorAxAx> lanius: "this is the cleanest and most flexible wiki impl that i've found
2007-07-21T23:01:03  <xorAxAx> lanius: on #moin :)
2007-07-21T23:01:45  <johill> ThomasWaldmann: ok, I'm almost done too ;)
2007-07-21T23:02:42  <ThomasWaldmann> heh
2007-07-21T23:06:28  * johill ponders implementing it all in a re
2007-07-21T23:30:00  <johill> nah, that wouldn't be nice
2007-07-21T23:33:55  <johill> works
2007-07-21T23:33:57  <johill> ThomasWaldmann: http://johannes.sipsolutions.net/patches/moin/macro-args.patch
2007-07-21T23:34:55  <johill> test macro was just
2007-07-21T23:34:56  <johill> def call(a, b, c, d): a = int(a) return 'call(%r, %r, %r, %r)' % (a,b.replace(' ','_'),c,d)
2007-07-21T23:35:10  <johill> well, that paste killed a few newline chars..
2007-07-21T23:36:42  <xorAxAx> should be cleaned up, that patch
2007-07-21T23:36:59  <johill> sure
2007-07-21T23:37:02  <xorAxAx> as your XXX states :)
2007-07-21T23:37:04  <johill> proof of concept
2007-07-21T23:37:16  <xorAxAx> now this results in some unbalance
2007-07-21T23:37:20  <johill> and I just re-uploaded with a bugfix for empty args :)
2007-07-21T23:37:26  <xorAxAx> parsers take arguments as well
2007-07-21T23:37:52  <johill> hm?
2007-07-21T23:38:44  <xorAxAx> and they might want to have the same feature
2007-07-21T23:38:55  <johill> oh
2007-07-21T23:38:59  <johill> easy enough, no?
2007-07-21T23:39:02  <xorAxAx> sure
2007-07-21T23:39:31  <johill> opinions on which approach is better? :)
2007-07-21T23:40:24  <xorAxAx> which of which?
2007-07-21T23:41:23  <johill> macro argument parsing
2007-07-21T23:41:56  <johill> this vs. using ParameterParser
2007-07-21T23:42:38  <xorAxAx> no idea what the syntax is , to lazy to figure out
2007-07-21T23:42:45  <johill> well
2007-07-21T23:43:13  <johill> http://johannes.sipsolutions.net/patches/moin/test.py.txt
2007-07-21T23:43:22  <johill> the other version would be something like
2007-07-21T23:43:25  <johill> def execute(args):
2007-07-21T23:43:35  <johill>   p = ParameterParser(args, something)
2007-07-21T23:43:39  <johill>    a = p.something
2007-07-21T23:43:40  <johill> etc
2007-07-21T23:43:43  <johill> afaict
2007-07-21T23:44:04  <xorAxAx> weee, testcases
2007-07-21T23:44:04  <johill> no, parser = ParameterParser(pattern)
2007-07-21T23:44:09  <xorAxAx> most important stuff
2007-07-21T23:44:10  <johill> parser.parse_parameters(...)
2007-07-21T23:44:21  <xorAxAx> umm
2007-07-21T23:44:25  <xorAxAx> i mean the syntax of the macro call
2007-07-21T23:44:31  <johill> oh
2007-07-21T23:44:33  <johill> same thing afaict
2007-07-21T23:44:46  <johill> [[macro(a="b,c,d",b=1)]] and such
2007-07-21T23:46:14  <xorAxAx> the old one is more complex, right?
2007-07-21T23:46:41  <xorAxAx> also note that there is a difference in semantics
2007-07-21T23:46:50  <xorAxAx> python disallows foo(bar=1,3)
2007-07-21T23:46:59  <johill> oh right
2007-07-21T23:47:07  <xorAxAx> yours would execute it as foo(3, **dict(bar=1))
2007-07-21T23:47:12  <johill> yeah
2007-07-21T23:47:22  <johill> I guess I could easily disallow it
2007-07-21T23:47:47  <xorAxAx> have you checked the includes macros syntax?
2007-07-21T23:47:56  <johill> heh no
2007-07-21T23:47:58  <johill> why?
2007-07-21T23:48:37  <xorAxAx> because its an example for the kind of syntax macros could develop
2007-07-21T23:49:02  <johill> the editlink/titlesonly is pretty bogus
2007-07-21T23:49:07  <CIA-27> moin: Thomas Waldmann <tw AT waldmann-edv DOT de> * 2456:15502589ece6 1.7/MoinMoin/ (_tests/test_wikiutil.py wikiutil.py): ParameterParser: check types, remove unused code, tests
2007-07-21T23:49:13  <johill> other than that I got it covered
2007-07-21T23:49:59  <xorAxAx> if its cleaner than the current parser, i would like to see it in the code base if it passes all tests :)
2007-07-21T23:50:34  <johill> oh I think the main advantage is that it allows you to write the plugin without bothering about arg parsing
2007-07-21T23:50:53  <xorAxAx> well, yes, thats 1 line of code :)
2007-07-21T23:51:24  <johill> not quite, but still, yes, it's not much
2007-07-21T23:51:38  <johill> I guess I'm the only lazy one then
2007-07-21T23:53:09  <johill> which is fine, it was just a suggestion to lift that into generic code
2007-07-21T23:53:40  <johill> anyway, I need to get sleep
2007-07-21T23:53:51  <xorAxAx> well, i like it :)
2007-07-21T23:54:24  <xorAxAx> it would be nice if the parser chaos would be reduced though, and as the syntax is matching, it could be factored out so that it replaces any other 1 usages of the PP

MoinMoin: MoinMoinChat/Logs/moin-dev/2007-07-21 (last edited 2007-10-29 19:20:38 by localhost)