1 2011-04-03T00:18:02  *** grzywacz has quit IRC
   2 2011-04-03T00:36:05  *** RogerHaase has left #moin-dev
   3 2011-04-03T03:08:22  *** ThomasWaldman2 has joined #moin-dev
   4 2011-04-03T03:08:29  *** ThomasWaldmann has quit IRC
   5 2011-04-03T03:10:41  *** ThomasWaldman2 is now known as ThomasWaldmann
   6 2011-04-03T03:15:35  *** MattMaker_ has joined #moin-dev
   7 2011-04-03T03:15:52  *** MattMaker has quit IRC
   8 2011-04-03T03:15:52  *** MattMaker_ is now known as MattMaker
   9 2011-04-03T05:05:39  *** ronny has quit IRC
  10 2011-04-03T05:06:07  *** ronny has joined #moin-dev
  11 2011-04-03T07:00:42  *** sinha has joined #moin-dev
  12 2011-04-03T07:15:42  *** paulmueller has joined #moin-dev
  13 2011-04-03T07:16:08  *** paulmueller is now known as captainskybeard
  14 2011-04-03T07:17:26  *** captainskybeard has quit IRC
  15 2011-04-03T07:37:23  *** kursor has joined #moin-dev
  16 2011-04-03T07:42:39  *** MattMaker has quit IRC
  17 2011-04-03T08:04:12  *** MattMaker has joined #moin-dev
  18 2011-04-03T09:00:21  *** _buck has joined #moin-dev
  19 2011-04-03T09:12:21  *** _buck has quit IRC
  20 2011-04-03T09:30:21  <dreimark> moin
  21 2011-04-03T09:52:06  <sinha> moin
  22 2011-04-03T10:37:24  *** greg_f has joined #moin-dev
  23 2011-04-03T11:07:16  *** kursor has quit IRC
  24 2011-04-03T11:37:16  *** sinha has left #moin-dev
  25 2011-04-03T12:49:00  *** sinha has joined #moin-dev
  26 2011-04-03T12:52:10  *** sinha has quit IRC
  27 2011-04-03T13:50:17  *** franklin_ has quit IRC
  28 2011-04-03T14:28:57  <ThomasWaldmann> moin :)
  29 2011-04-03T15:47:44  <TheSheep> ThomasWaldmann: have you seen http://pypi.python.org/pypi/shove ?
  30 2011-04-03T15:52:07  <ThomasWaldmann> no, not yet
  31 2011-04-03T15:55:56  <ThomasWaldmann> could be interesting, did you look at the code?
  32 2011-04-03T15:56:33  <TheSheep> no, not yet
  33 2011-04-03T15:59:38  <TheSheep> ugh, the file store looks very basic
  34 2011-04-03T15:59:44  <TheSheep> it uses a file per key
  35 2011-04-03T16:00:09  <TheSheep> and no locking or anything
  36 2011-04-03T16:45:52  *** sl33k_ has quit IRC
  37 2011-04-03T16:46:45  *** sl33k_ has joined #moin-dev
  38 2011-04-03T16:48:33  *** sl33k_ has quit IRC
  39 2011-04-03T16:48:34  *** sl33k_ has joined #moin-dev
  40 2011-04-03T18:22:36  *** sinha has joined #moin-dev
  41 2011-04-03T18:32:10  *** kursor has joined #moin-dev
  42 2011-04-03T18:48:59  *** greg_f has quit IRC
  43 2011-04-03T19:07:28  *** grzywacz has joined #moin-dev
  44 2011-04-03T19:36:06  *** moinBot` has joined #moin-dev
  45 2011-04-03T19:37:06  *** xorAxAx has quit IRC
  46 2011-04-03T19:37:47  *** xorAxAx has joined #moin-dev
  47 2011-04-03T19:37:56  *** moinBot has quit IRC
  48 2011-04-03T21:18:25  *** kursor has quit IRC
  49 2011-04-03T21:37:34  *** sinha has left #moin-dev
  50 2011-04-03T21:48:23  *** MattMaker has quit IRC
  51 2011-04-03T21:57:17  *** MattMaker has joined #moin-dev
  52 2011-04-03T22:10:44  <sl33k_> dreimark: http://paste.pocoo.org/show/365001/ shows all items with user contributed items, what could be the workaround for this? In the template how do i display dictionary value?
  53 2011-04-03T22:12:30  <ThomasWaldmann> workaround for what?
  54 2011-04-03T22:13:54  <ThomasWaldmann> and you still need to explain line 50
  55 2011-04-03T22:15:13  <ThomasWaldmann> sl33k_:
  56 2011-04-03T22:16:26  <sl33k_> line 50 is the item's revision object
  57 2011-04-03T22:16:44  <ThomasWaldmann> explain what it does, step for step, case for case
  58 2011-04-03T22:22:55  <ThomasWaldmann> sl33k_: still there?
  59 2011-04-03T22:23:43  <sl33k_> if the userid of the revision matches the logged in users id, then it increments the count which is the value of the dictionary with key item. Till all the revisions are over. then it adds value to the dictionary.
  60 2011-04-03T22:24:17  <ThomasWaldmann> why do you use [] in line 50?
  61 2011-04-03T22:29:32  <ThomasWaldmann> could you increase the communication thread priority a bit?
  62 2011-04-03T22:32:06  <sl33k_> [] is for default value. i am not much sure. i took some look at the above code and it was there.
  63 2011-04-03T22:32:49  <sl33k_> sorry for the delay in amswering
  64 2011-04-03T22:33:31  <ThomasWaldmann> what above code exactly?
  65 2011-04-03T22:35:04  <sl33k_> the keys MIMETYPE, ITEMLINKS
  66 2011-04-03T22:36:09  <ThomasWaldmann> ah. ok, but you know there are different data types.
  67 2011-04-03T22:36:21  <ThomasWaldmann> like ITEMLINKS is obviously a list
  68 2011-04-03T22:36:40  <ThomasWaldmann> but USERID is not, it is a string, so [] as default makes no sense
  69 2011-04-03T22:37:37  <sl33k_> my bad, discarded
  70 2011-04-03T22:38:45  <ThomasWaldmann> also, if the key is not there and you do not provide a default value, None will be returned by get()
  71 2011-04-03T22:39:21  <ThomasWaldmann> so, you could just check if flask.user.id might be ever None. if it is not, None is perfectly fine there.
  72 2011-04-03T22:44:50  <sl33k_> if flaskg.user.id is not None:
  73 2011-04-03T22:48:05  <ThomasWaldmann> hm?
  74 2011-04-03T22:48:38  <sl33k_> the statement would be like that?
  75 2011-04-03T22:48:46  <ThomasWaldmann> no
  76 2011-04-03T22:48:59  <ThomasWaldmann> you know how .get() works?
  77 2011-04-03T22:49:31  <sl33k_> value of the dict key it fetches
  78 2011-04-03T22:50:12  <ThomasWaldmann> and if the dict does not have that key?
  79 2011-04-03T22:51:10  <sl33k_> does not raise exception, None returned
  80 2011-04-03T22:51:53  <ThomasWaldmann> yeah, and that's what I meant. if you have None on the left side, you just need to make sure that the right side is not None
  81 2011-04-03T22:52:10  <ThomasWaldmann> so find out what flaskg.user.id can have as value
  82 2011-04-03T22:52:19  <ThomasWaldmann> for a valid user, it is a string
  83 2011-04-03T22:52:35  <ThomasWaldmann> so you just need to find out what it is for a not-logged-in user
  84 2011-04-03T22:53:02  <ThomasWaldmann> if it is something else than None, you can just use .get(USERID) and it is correct in all cases
  85 2011-04-03T22:53:29  <ThomasWaldmann> btw, line 48, you should remove it
  86 2011-04-03T22:56:58  <dreimark> look for pep8 of 34 and following lines
  87 2011-04-03T22:57:13  <dreimark> there examples how to do it in that module
  88 2011-04-03T22:58:02  <dreimark> and "contributeds" i am not sure that this word exists
  89 2011-04-03T22:59:03  <dreimark> the docstring should be also done similiar to the others
  90 2011-04-03T22:59:28  <sl33k_> the return type parameter?
  91 2011-04-03T22:59:35  <sl33k_> in docstring
  92 2011-04-03T22:59:46  <dreimark> look at the formatting
  93 2011-04-03T23:00:01  <dreimark> it is not """ foobar
  94 2011-04-03T23:02:12  <sl33k_> a line break after """ ?
  95 2011-04-03T23:02:20  <ThomasWaldmann> might be as correct or wrong as "wanteds"
  96 2011-04-03T23:04:39  <dreimark> hmm, google translate knows "wanteds"
  97 2011-04-03T23:07:01  <MattMaker> is wanted a noun?
  98 2011-04-03T23:07:35  <dreimark> wanteds is
  99 2011-04-03T23:09:34  <dreimark> "Gesuche" in german
 100 2011-04-03T23:10:36  <ThomasWaldmann> ok, then that one is correct
 101 2011-04-03T23:11:43  <MattMaker> does it mean "wanted pages"? as in nodes not yet existing?
 102 2011-04-03T23:12:22  <ThomasWaldmann> that is what's intended
 103 2011-04-03T23:12:39  <ThomasWaldmann> we wanted something short for the url
 104 2011-04-03T23:12:54  <MattMaker> I think Google Translate is using it in the sense of "being searched for by the police in connection with a crime that has been committed"
 105 2011-04-03T23:12:57  <MattMaker> :)
 106 2011-04-03T23:13:07  <xorAxAx> http://www.merriam-webster.com/dictionary/wanteds?show=0&t=1301865144
 107 2011-04-03T23:13:15  <xorAxAx> wanteds is no word, dreimark
 108 2011-04-03T23:14:14  <MattMaker> however, as a native English speaker and grammar hobbyist, I will assert that it is acceptable to "noun" this word, if the user knows what it refers to in the MoinMoin context
 109 2011-04-03T23:15:37  <xorAxAx> why is wantedpages too long?
 110 2011-04-03T23:15:38  <ThomasWaldmann> MattMaker: is contributeds also acceptable? me would rather tend to use /+contributions there
 111 2011-04-03T23:15:57  <ThomasWaldmann> xorAxAx: ...items :)
 112 2011-04-03T23:16:07  <MattMaker> xorAxAx but are they still called pages? ah yes. items
 113 2011-04-03T23:16:07  <xorAxAx> doesnt make it longer :-P
 114 2011-04-03T23:16:16  <MattMaker> wanteditems is good...
 115 2011-04-03T23:16:30  <MattMaker> contributeds does not sound meaningful to my ear
 116 2011-04-03T23:16:48  <MattMaker> and again, wanteds sounds okay informally
 117 2011-04-03T23:17:39  <MattMaker> not "contributeds", because in English I am not sure it follows that something that doesn't exist could be a "contribution"
 118 2011-04-03T23:17:57  <MattMaker> I can't give you a thing that I don't have
 119 2011-04-03T23:18:16  <ThomasWaldmann> MattMaker: contributed(item)s refers to revisions current user has contributed
 120 2011-04-03T23:18:30  <MattMaker> ah, ok
 121 2011-04-03T23:18:45  <MattMaker> that would be "contributions"
 122 2011-04-03T23:18:54  <MattMaker> things which have been contributed
 123 2011-04-03T23:19:05  <ThomasWaldmann> sl33k_: ^^
 124 2011-04-03T23:19:39  <sl33k_> changing
 125 2011-04-03T23:20:28  <ThomasWaldmann> s/contribution_items/contributed_items/
 126 2011-04-03T23:21:10  <ThomasWaldmann> and remove 48
 127 2011-04-03T23:21:18  <MattMaker> in some contexts, you could just say "contributed", and it would be understood as an adjective that describes a set of items
 128 2011-04-03T23:21:25  <ThomasWaldmann> it's at wrong place and not needed anyway
 129 2011-04-03T23:21:44  <MattMaker> like if http://mysite/contributed/ returned a set
 130 2011-04-03T23:23:18  <MattMaker> the same is true for "wanted"
 131 2011-04-03T23:23:59  <MattMaker> in a context where the result is known to be a set of items, "wanted" by itself can imply "wanted [things,items,etc.]"
 132 2011-04-03T23:25:13  <ThomasWaldmann> sl33k_: btw, the template is missing in your diff
 133 2011-04-03T23:25:15  <MattMaker> however, if it is used that way, all the other words used in the same manner should also be adjectives that describe the returned set
 134 2011-04-03T23:27:11  <dreimark> can be a wording cs asap
 135 2011-04-03T23:28:28  <dreimark> xorAxAx: thy for the webster link
 136 2011-04-03T23:28:32  <MattMaker> xorAxAx just to mention, not all English dictionaries list plural forms as separate entries. Some of them force you to use grammar rules to deduce which pluralization is valid. And the rules have exceptions...
 137 2011-04-03T23:28:56  * MattMaker has lost at least one Scrabble game because dictionaries don't explicitly list plural forms
 138 2011-04-03T23:28:59  <xorAxAx> MattMaker: and it doesnt have wanted as noun either
 139 2011-04-03T23:29:16  <MattMaker> xorAxAx yes, agreed
 140 2011-04-03T23:29:52  <MattMaker> (if it did have it as a noun, then you could assume it could take the plural suffix "-s")
 141 2011-04-03T23:30:05  *** grzywacz has quit IRC
 142 2011-04-03T23:30:55  <xorAxAx> thanks mr. stand-in grammar :)
 143 2011-04-03T23:31:03  <MattMaker> :)
 144 2011-04-03T23:36:31  <MattMaker> interestingly, rather than "wanted items", you could correctly use "wants" (n. 2. anything that is needed, desired, or lacked:  "to supply someone's wants") ... but it sounds very quaint. uncommon.
 145 2011-04-03T23:36:50  <MattMaker> and usually refers to concepts rather than "things"
 146 2011-04-03T23:37:08  * MattMaker gets back to work
 147 2011-04-03T23:37:09  <sl33k_> ThomasWaldmann: still not showing contributed.html template http://paste.pocoo.org/show/365063/
 148 2011-04-03T23:38:39  <dreimark> sl33k_: look at http://hg.moinmo.in/moin/2.0/file/86642382d6c6/MoinMoin/apps/frontend/views.py#l183
 149 2011-04-03T23:42:00  <ThomasWaldmann> sl33k_: you didn't run that code, right?
 150 2011-04-03T23:43:14  <sl33k_> i ran it
 151 2011-04-03T23:43:35  <dreimark> after the renamings?
 152 2011-04-03T23:43:48  <dreimark> don't lie
 153 2011-04-03T23:44:01  <ThomasWaldmann> item_name in 52 is undefined
 154 2011-04-03T23:44:30  <dreimark> decorator name mismatch
 155 2011-04-03T23:45:18  <ThomasWaldmann> hm?
 156 2011-04-03T23:46:04  <dreimark> line 29, we have always used the same name
 157 2011-04-03T23:51:51  <sl33k_> for the not logged in user i couldnt find anything. for the logged in its a string http://paste.pocoo.org/show/365065/
 158 2011-04-03T23:57:12  <ThomasWaldmann> sl33k_: user.py class User, see what self.id gets assigned

MoinMoin: MoinMoinChat/Logs/moin-dev/2011-04-03 (last edited 2011-04-02 22:45:03 by IrcLogImporter)