1 2010-04-25T01:09:26 *** _buck
2 2010-04-25T06:05:06 *** ValentinJaniaut_
3 2010-04-25T06:05:06 *** ValentinJaniaut
4 2010-04-25T06:05:07 *** ValentinJaniaut_
5 2010-04-25T06:12:44 *** kursor
6 2010-04-25T08:00:27 *** _buck
7 2010-04-25T09:52:19 *** grzywacz
8 2010-04-25T10:37:18 *** _buck
9 2010-04-25T10:49:10 *** grzywacz
10 2010-04-25T10:54:09 *** grzywacz
11 2010-04-25T10:58:43 *** _buck
12 2010-04-25T11:13:37 *** _buck
13 2010-04-25T11:36:14 *** kursor
14 2010-04-25T11:51:58 <ThomasWaldmann> moin
15 2010-04-25T11:55:21 *** eSyr
16 2010-04-25T12:21:55 *** DmitryAndreev
17 2010-04-25T12:34:08 *** DmitryAndreev
18 2010-04-25T12:48:07 * ThomasWaldmann fights with sqla
19 2010-04-25T13:15:44 <eSyr> hehe
20 2010-04-25T13:17:33 <ThomasWaldmann> http://paste.pocoo.org/show/205917/
21 2010-04-25T13:17:46 <ThomasWaldmann> that's what I am currently experimenting with
22 2010-04-25T13:18:02 <ThomasWaldmann> but somehow that last select returns []
23 2010-04-25T13:50:23 <ThomasWaldmann> ah, found it
24 2010-04-25T13:51:14 * dreimark had looked at Faxes patch for the text/plain formatter
25 2010-04-25T13:51:19 <dreimark> http://moinmo.in/FeatureRequests/TextPlainFormatterRewrite?action=AttachFile&do=view&target=HelpOnMoinWikiSyntax.txt
26 2010-04-25T13:53:03 <dreimark> some tables are too complex for it
27 2010-04-25T13:53:19 <dreimark> also I found a bug in TOC
28 2010-04-25T14:00:05 <ThomasWaldmann> well, it has to be checked whether it improves what we have
29 2010-04-25T14:04:28 <dreimark> it improves it compared to http://moinmo.in/HelpOnMoinWikiSyntax?action=format&mimetype=text/plain
30 2010-04-25T14:14:00 <dreimark> bbl
31 2010-04-25T14:22:28 *** grzywacz
32 2010-04-25T14:25:05 *** grzywacz
33 2010-04-25T15:01:25 <ThomasWaldmann> anyone here has a clue about sql(alchemy)?
34 2010-04-25T15:02:51 *** kursor
35 2010-04-25T15:04:05 *** kursor_
36 2010-04-25T15:04:06 *** kursor_
37 2010-04-25T15:10:30 *** _buck
38 2010-04-25T15:55:03 *** bkdonion
39 2010-04-25T15:55:13 *** bkdonion
40 2010-04-25T16:24:27 <TheSheep> ThomasWaldmann: don't ask to ask, just ask ;)
41 2010-04-25T16:25:02 <eSyr> ThomasWaldmann, btw. thanks for merging patch to WikiConfigHelp macro.
42 2010-04-25T16:27:58 *** _buck
43 2010-04-25T16:33:52 <ThomasWaldmann> TheSheep: see my pastebin
44 2010-04-25T16:33:57 <ThomasWaldmann> or rather the next one :)
45 2010-04-25T16:34:10 <ThomasWaldmann> http://paste.pocoo.org/show/205981/
46 2010-04-25T16:34:28 <ThomasWaldmann> eSyr: you're welcome :)
47 2010-04-25T16:36:44 *** _buck
48 2010-04-25T16:38:02 <TheSheep> ThomasWaldmann: tl;dr
49 2010-04-25T16:44:03 <ThomasWaldmann> wut?
50 2010-04-25T16:44:36 <ThomasWaldmann> ah
51 2010-04-25T16:45:04 <eSyr> chans' slang owning.
52 2010-04-25T16:59:10 *** _buck
53 2010-04-25T17:36:03 <dreimark> hmm, saving a page on MM is slow
54 2010-04-25T17:59:17 <ThomasWaldmann> http://paste.pocoo.org/show/205993/ < more comments/docstrings now
55 2010-04-25T18:19:44 *** eSyr
56 2010-04-25T18:25:49 <TheSheep> ThomasWaldmann: what is the fact_table for? why not just index by (id, rev)
57 2010-04-25T18:26:12 <TheSheep> ThomasWaldmann: then you would only need two tables
58 2010-04-25T18:28:10 <TheSheep> well, three if you want to save space on the uuids
59 2010-04-25T18:29:15 <TheSheep> so you'd have one table for uuid->item_id, one for key_name->key_id and one (item_id, rev)->(key_id, value)
60 2010-04-25T18:35:04 <ThomasWaldmann> yeah, guess that would work better
61 2010-04-25T18:37:15 *** eSyr
62 2010-04-25T18:38:04 <ThomasWaldmann> TheSheep: hmm, there might be multiple metadata items related to a revision
63 2010-04-25T18:38:24 <ThomasWaldmann> so item_id, rev would not be the primary key
64 2010-04-25T18:42:34 <ThomasWaldmann> btw, the values are also re-used
65 2010-04-25T18:42:41 <ThomasWaldmann> metadata values i mean
66 2010-04-25T18:43:26 <ThomasWaldmann> so e.g. mimetype: text/wiki will be represented only once and just referenced from whereever needed
67 2010-04-25T18:44:36 <ThomasWaldmann> that could save quite some space for often-repeated stuff like page names, mimetypes, common page acls, author ids, etc.
68 2010-04-25T18:46:16 <TheSheep> I see
69 2010-04-25T18:46:39 <TheSheep> well, the key is (item_id, rev, key_id)
70 2010-04-25T18:47:01 <TheSheep> just like it's (revisioned_item_id, key_id) now
71 2010-04-25T18:47:25 <TheSheep> btw, is there an 8-character limit on the table name?
72 2010-04-25T18:47:41 <ThomasWaldmann> no idea :)
73 2010-04-25T18:47:55 <ThomasWaldmann> but the current code works for sqlite backend
74 2010-04-25T18:51:30 <ThomasWaldmann> hmm, i would like to keep that rev_table (if a timestamp is added there [maybe even without, when assuming id is equivalent], it could be also used for RC-like stuff)
75 2010-04-25T18:54:51 <TheSheep> I see
76 2010-04-25T18:59:08 <ThomasWaldmann> what's a bit annoying with the current method is that querying metadata k/v pairs is complicated
77 2010-04-25T18:59:35 <ThomasWaldmann> and I don't know how to query for multiple k/v pairs at same time
78 2010-04-25T18:59:52 <ThomasWaldmann> i guess one needs to do multiple queries and then intersect
79 2010-04-25T19:01:44 *** grzywacz
80 2010-04-25T19:05:07 <TheSheep> you mean like get all k/v of certain item?
81 2010-04-25T19:06:04 <ThomasWaldmann> no, like "list all stuff mimetype==text/wiki and tag==foobar
82 2010-04-25T19:06:08 <ThomasWaldmann> "
83 2010-04-25T19:07:10 *** _buck
84 2010-04-25T19:07:57 <TheSheep> tag?
85 2010-04-25T19:08:03 <TheSheep> where does that come from?
86 2010-04-25T19:08:06 <ThomasWaldmann> there's intersect(), but docs tell it is not supported for all DBs (and it looks like it is not for mysql)
87 2010-04-25T19:08:16 <ThomasWaldmann> just another metadata k/v pair
88 2010-04-25T19:08:20 <eSyr> do not use mysql
89 2010-04-25T19:08:25 <ThomasWaldmann> users could define them, too
90 2010-04-25T19:08:28 <ThomasWaldmann> eSyr: :)
91 2010-04-25T19:08:32 <TheSheep> doesn't join do an intersection, kind of?
92 2010-04-25T19:09:06 <ThomasWaldmann> i think that just joins tables by a common element
93 2010-04-25T19:09:23 <ThomasWaldmann> but the kv stuff is in different rows in kv_table
94 2010-04-25T19:09:31 *** AshishG
95 2010-04-25T19:17:06 <TheSheep> so you'd need subqueries :/
96 2010-04-25T19:17:23 <TheSheep> no
97 2010-04-25T19:18:49 *** grzywacz
98 2010-04-25T19:19:06 <TheSheep> I guess you would need exists()
99 2010-04-25T19:21:40 <ThomasWaldmann> like how?
100 2010-04-25T19:26:39 <ThomasWaldmann> ah, found some docs
101 2010-04-25T19:26:50 <ThomasWaldmann> it's for subqueries
102 2010-04-25T19:26:55 <TheSheep> select ... from ... where exists(select key, value from kv where key='tag' and value='foobar') and exists(select key, value from kv where key='mimetype' and value='text/wiki');
103 2010-04-25T19:26:58 <TheSheep> yeah
104 2010-04-25T19:28:09 <TheSheep> it's not nice, but better than doing it in the app
105 2010-04-25T19:29:04 *** kursor
106 2010-04-25T19:48:43 <ThomasWaldmann> TheSheep: yeah, works
107 2010-04-25T19:48:59 <ThomasWaldmann> http://paste.pocoo.org/show/206026/
108 2010-04-25T20:19:17 <ThomasWaldmann> TheSheep: how about adding current revision's name to item_table?
109 2010-04-25T20:19:47 <ThomasWaldmann> + a unique constraint
110 2010-04-25T20:19:50 <TheSheep> revision name?
111 2010-04-25T20:20:26 <ThomasWaldmann> names can be easily tracked by revision :)
112 2010-04-25T20:20:39 <ThomasWaldmann> usually the name is metadata as all other stuff
113 2010-04-25T20:20:43 <TheSheep> like tags in repository?
114 2010-04-25T20:20:51 <TheSheep> you mean, named revision of a page?
115 2010-04-25T20:21:05 <ThomasWaldmann> but when renaming or creating, we want to avoid multiple revisions having same name
116 2010-04-25T20:21:18 <TheSheep> why would you name revisions?
117 2010-04-25T20:21:19 <ThomasWaldmann> no, it's the item name as observed by the wiki user
118 2010-04-25T20:21:41 <ThomasWaldmann> but item identity is a uuid, not its name
119 2010-04-25T20:22:13 <TheSheep> normally, you would put all the 'core' meta infor in item_table
120 2010-04-25T20:22:15 <ThomasWaldmann> nevertheless, we want to have name<->item uuid 1:1 for current revision
121 2010-04-25T20:22:28 <TheSheep> and only store the additional keys in that keystore
122 2010-04-25T20:22:59 <TheSheep> sorry, in rev_table
123 2010-04-25T20:23:29 <TheSheep> especially if those keys are obligatory
124 2010-04-25T20:23:50 <ThomasWaldmann> there is some weird idea about doing that automatically :)
125 2010-04-25T20:24:00 <ThomasWaldmann> i didn't try that yet, though
126 2010-04-25T20:24:39 <ThomasWaldmann> hmm, revisions table doesn't help much
127 2010-04-25T20:24:45 <TheSheep> if it's weird, then maybe it's better avoided
128 2010-04-25T20:25:02 <ThomasWaldmann> what we want is that all current rev's names are different
129 2010-04-25T20:25:39 <ThomasWaldmann> thus, it is rather item.current_name, not rev.name
130 2010-04-25T20:25:54 <TheSheep> yeah, use item_table to store the current values
131 2010-04-25T20:26:33 *** AshishG
132 2010-04-25T20:26:39 <TheSheep> since we only access the database through our library, we can keep the data consistent on the level of code, so we can allow some data duplication for the sake of efficiency
133 2010-04-25T20:26:47 *** AshishG
134 2010-04-25T20:27:10 <TheSheep> otoh, you could just store the last revision id
135 2010-04-25T20:41:00 <ThomasWaldmann> i first though about a foreign key
136 2010-04-25T20:41:10 <ThomasWaldmann> but then I lose that unique constraint again
137 2010-04-25T20:41:51 <TheSheep> you can check the constraint yourself
138 2010-04-25T20:42:02 <TheSheep> with additional query
139 2010-04-25T20:49:36 <ThomasWaldmann> http://paste.pocoo.org/show/206059/
140 2010-04-25T20:49:41 <ThomasWaldmann> current state
141 2010-04-25T20:56:18 <ThomasWaldmann> hmm, pointer to latest rev would make other stuff easier also
142 2010-04-25T20:57:36 <ThomasWaldmann> TheSheep: how would you check uniqueness then?
143 2010-04-25T21:19:59 *** _buck
144 2010-04-25T21:27:09 <AshishG> something unrelated to moin: what C compiler would you suggest for Windows?
145 2010-04-25T21:27:56 <eSyr> AshishG, minigw
146 2010-04-25T21:30:33 <AshishG> mingw u mean? gcc for windows?
147 2010-04-25T21:31:13 <eSyr> yes.
148 2010-04-25T21:32:16 <AshishG> was thinking of the same but some FreeBSD developers were complaining about GCC to be slow, big and buggy in general
149 2010-04-25T21:32:19 * ThomasWaldmann suggests not using C :P
150 2010-04-25T21:32:36 <AshishG> ThomasWaldmann: hehe. opencv uses c
151 2010-04-25T21:32:37 * dreimark suggest not using windows
152 2010-04-25T21:32:45 <ThomasWaldmann> hehe
153 2010-04-25T21:32:52 <ThomasWaldmann> yeah, both sucks
154 2010-04-25T21:32:54 <AshishG> :D
155 2010-04-25T21:34:49 <ThomasWaldmann> TheSheep: btw, fact_table was split into rev_fact_table and item_fact_table
156 2010-04-25T21:36:01 *** _buck
157 2010-04-25T21:36:42 <eSyr> ThomasWaldmann, CPython uses C
158 2010-04-25T21:38:11 <ThomasWaldmann> yeah, that must be painful for Python devs. Hopefully PyPy will help with that. :)
159 2010-04-25T22:10:06 *** grzywacz
160 2010-04-25T22:10:26 *** grzywacz
161 2010-04-25T23:26:46 <ThomasWaldmann> http://paste.pocoo.org/show/206105/ < current state, with strange sqla problems
162 2010-04-25T23:38:25 *** diofeher
163 2010-04-25T23:38:40 *** _buck
164 2010-04-25T23:38:43 <diofeher> hey, good night :-)
165 2010-04-25T23:40:25 <dreimark> gn diofeher
166 2010-04-25T23:41:38 <diofeher> dreimark: i was looking your talk at barcamp... looks nice.. but how do moin moin will implement real editor?
167 2010-04-25T23:47:23 *** eSyr
168 2010-04-25T23:48:32 <diofeher> anyone here can recommend me any book about tests?
169 2010-04-25T23:49:33 *** AshishG
170 2010-04-25T23:59:35 <dreimark> diofeher: see Edit (gui)
171 2010-04-25T23:59:49 <dreimark> or in moin-2.0 see safe or unsafe html