Wednesday, 2009-07-01

*** tpb has joined #melange00:00
*** madrazr has joined #melange00:51
*** ChanServ sets mode: +v madrazr00:51
*** madrazr has left #melange01:23
*** madrazr has joined #melange01:25
*** ChanServ sets mode: +v madrazr01:25
*** dukeleto has joined #melange01:26
*** madrazr has quit IRC01:49
*** dhans has joined #melange02:24
*** madrazr has joined #melange02:35
*** ChanServ sets mode: +v madrazr02:35
*** dhans has quit IRC03:20
*** dhans has joined #melange03:21
*** madrazr has left #melange03:23
*** kblin has quit IRC03:30
*** florinciu has joined #melange03:40
*** solydzajs has joined #melange03:49
*** ChanServ sets mode: +o solydzajs03:50
*** kblin has joined #melange03:56
*** solydzajs has quit IRC04:53
*** solydzajs has joined #melange05:05
*** ChanServ sets mode: +o solydzajs05:05
*** Merio has joined #melange05:07
*** ChanServ sets mode: +v Merio05:07
Meriodhans: ping05:09
*** dhans has quit IRC05:15
*** MatthewWilkes has joined #melange05:20
*** MatthewWilkes has quit IRC05:31
*** MatthewWilkes has joined #melange05:31
*** erich has joined #melange05:37
*** dhans has joined #melange05:37
dhansMerio: pong :)05:38
Meriodhans: sorry for yesterday I was really "out" :)05:41
dhansMerio: no problems :)05:41
Meriodhans: I've seen you made commits, going to read them :)05:42
dhansMerio: nothing interesting05:42
*** florinciu_ has joined #melange05:42
Meriodhans: it's the former task queue stuff I've missed to read to be fair :)05:43
dhansMerio: :P05:43
Meriodhans: do you have any other question about JS? So today we can begin working on the save/load stuff05:44
dhansactually yes, I have one, but it is a little bit longer, but ok, I can write it here (because I was thinking about sending an email)05:45
Merioif you prefer a mail go for it05:46
dhansbecause as I said, I wanted to make 'Task' button working in ajaxy way, so I added a class attribute for this tag, let's class="set_task"05:46
dhansand wrote a very simple script at the beginning: $("input[@class=set_task]").css("color","red");05:47
dhansand of course it was all opaques05:47
dhansI mean it was inside your 'skeleton'05:48
Meriowhat do you mean for "all opaques"05:48
dhansI wanted to use another word, but I spelled it incorrectly and wanted to pick one from suggestions, but I choose a wrong one :)05:49
Merioehhe try again :P05:49
dhansI just meant that this line was packed in your skeleton template05:51
Merioah ok05:51
dhansanyway, I wanted to 'call' (maybe it's a wrong word) that script inside row_manage.html05:51
dhansso I did like <script type="text/javascript" src="/soc/content/js/templates/soc/statistic/list.js" melangeContext="{% autoescape off %}{ item: '{{ list.item }}' }{% endautoescape %}"></script>05:52
dhansand it worked, except that the button in the last row was not red05:52
dhansand I didn't know why ...05:53
MerioHmm don't know because I can't see the code, but perhaps you're doing this without waiting for the DOM to be ready05:53
dhansso added another line to that script   $("input.set_task").click(function() {05:53
dhans  });05:54
MerioYou need to wrap your code that plays with the DOM inside jQuery(function() {$("input[@class=set_task]").css("color","red");});05:54
dhansand then (I had 7 rows), when clicked on the first I got 6 alerts, on the second: 5 alerts, ... on the last: no alerts at all05:54
dhansoh ok, and then, the script waits for DOM to be ready?05:55
*** florinciu has quit IRC05:57
Merioyes, jQuery() is a shortcut for jQuery.ready(), that I guess is basically pushing your function reference in the onLoad attribute of <body> tag (but it's only a guessing)05:57
dhanshmm with this jQuery() it did not worked, but worked with  $(document).ready(function() { ... })06:09
MerioSeems weird to me =>
tpbTitle: Core/jQuery - jQuery JavaScript Library (at
dhansMerio: ok, it didn't worked with JQuery ;-/ I am sorry06:13
Meriodhans: no problems Daniel, I would need to see the code to help better... but just let me know when you commit it and I'll have a look :)06:14
dhansMerio: ok, but I am starting to think that your skeleton (which is great :)) is not appropriate for lists in melange ;-/06:21
dhansMerio: because when we want to add melangeContext to the script, we have to include <script type= ... melangeContext="something">06:22
Meriodhans: it could be, we need to evolve it if it so :)06:22
dhansMerio: so we need to include that in row.html06:22
dhansMerio: so the script is executed 'numer of rows' times ;)06:23
dhanswell, I think this button is not so important :P06:24
MerioThis is just a proof of concept, and made without touching too much of the application. But this can be easily workarounded06:25
MerioIf we have something in base.html that takes the path of the js (based on the template path) and then append it to a script tag, and the same for the melange context06:25
MerioWe will have the script called only once, and every time the correct script called06:25
MerioThis is where it should go that skeleton, not everytime in the single template06:26
*** schultmc1 has joined #melange06:26
*** solydzajs has quit IRC06:29
dhansMerio: so you mean: we have to put <script ... src="something.js"> in base.html and then extend it in actual row.html file to <script ... src="something.js" melangeContext="something_else"> ?06:30
MerioNo perhaps I don't get really how the tables behave in Melange, but, no you'll have only the something.js in base.html06:31
MerioAs soon as the table is completed (=>DOM is ready) you'll start playing with jQuery injecting the JS code06:32
*** mithro has quit IRC06:34
*** schultmc has quit IRC06:37
dhansMerio: yeah, it works this way :) but I thought one aspect of your skeleton was to keep melangeContext att in the same place where the context really is (I mean in the same file)06:37
dhansMerio: but it's great it works :)06:38
MeriomelangeContext attribute will be always present, but in your logic you'll give the proper context every time, as you do for Django06:38
dhansMerio: be back in 30 minutes06:47
Meriodhans: ok06:48
*** dhans has quit IRC06:57
*** erich has quit IRC07:03
*** Merio has quit IRC07:29
*** Merio has joined #melange07:31
*** ChanServ sets mode: +v Merio07:31
*** mithro has joined #melange07:48
*** ChanServ sets mode: +v mithro07:48
*** Merio has quit IRC08:09
*** Merio has joined #melange08:09
*** ChanServ sets mode: +v Merio08:09
*** madrazr has joined #melange08:54
*** ChanServ sets mode: +v madrazr08:54
*** schultmc1 is now known as schultmc09:06
*** schultmc has joined #melange09:06
*** mithro has quit IRC09:21
*** dr__house has joined #melange10:00
*** dhans has joined #melange10:00
*** madrazr has quit IRC10:45
Meriodhans: ping11:00
dhansMerio: pong11:01
Meriodhans: if I click on task, would it give me some feedback on its work? I mean if I reload the page should it give me the number of records completed or when the collection started as for the cache?11:02
Meriodhans: just to know if it's working for me or not11:02
dhanswhen all the stats are collected and the page is reloaded, you should see a new date11:03
MerioSo I need to wait?11:04
dhansactually it depends on how many entities are in the model11:05
MerioI've run seed_many so there are 200 students11:06
dhanshmm ok, so you run it locally?11:06
Merio4 batches as far as I've seen in your code :) Yep, locally11:06
dhansbecause, to be fair - I don't know if tasks can be tested locally11:06
MerioIt's just that I need to test something for the dashboard and I need data from your jsonresponse :P11:07
Merioargh :)11:07
dhansyou can still collect data manually ;P11:07
MerioOk trying to :)11:08
dhansMerio: ping?11:31
Meriodhans: pong :) Just a minute, phone call :)11:32
Meriodhans: (I don't receive the JSON for students per degree, going to see why)11:32
dhansone question: van we perform string operations in jquery. because i want to do something like this: s = window.location; s.replace("a", "b") ?11:35
Meriothere's a replace function IIRC11:38
Meriodhans: It depends on what you want to do11:38
Meriobecause there's a replace function built-in in javascript, it works with regexps11:38
dhansbecause in the .html file I have like link = link.replace("collect_stats", mode) + "/" + stat;11:39
dhansbtw. don't you get json response for students_per_degree even when you call it directly?11:41
dhansI mean: http://localhost:8080/statistic/get_json_response/google/gsoc2009/students_per_degree ?11:41
MerioIt seems it gives me back a void response11:42
dhanshmm for me it works11:43
Meriodhans: ok so probably it's my fault, going to see :)11:43
Meriowhat's going on with your .html file so?11:43
Meriodhans: yep it's working sorry, now going to see what's happening .D11:45
dhansMerio :)11:45
*** scorche has quit IRC11:47
*** scorche has joined #melange11:48
*** madrazr has joined #melange11:57
*** ChanServ sets mode: +v madrazr11:57
*** florinciu_ has quit IRC12:07
dhansMerio: ping12:31
dhansMerio: are you using some kind of ide / eclipse plugin for js?12:32
Meriodhans: I'm working on widget generalization, it's a pain everytime to restart the page, too many time ... sic12:32
Meriodhans: no, using quanta12:32
Meriodhans: just editor with syntax highlighting12:33
dhansMerio: yes indeed, it's a pain12:33
Meriodhans: it takes me about 3-4 minutes every time12:34
madrazrdhans: Eclipse ftw!12:34
madrazrdhans: please try once, Lennie actually once told me to give a try12:34
madrazrinitially struggled getting used to it, but now I cannot write even a single line of Melange code without Eclipse, cool it is12:35
dhansmadrazr: I am using it! :) it rocks12:35
madrazrdhans: cool!12:35
dhansmadrazr: I was just wondering if there is a good plugin for working with js12:36
madrazrdhans: aren't there?12:36
Meriodhans: if you like IDEs I think you can try aptana12:36
madrazrdhans: Eclipse is like a banyan tree I always think :P12:36
MerioIt's eclipse on steroids for ajax development.. but never used it so ... just give it a try :)12:37
dhansmadrazr: I just don't know if there are, but probably yes12:37
dhansmadrazr: :P12:37
madrazrdhans: heh Ok :D12:37
madrazrMerio: what are steroids?12:39
madrazrMerio: hope they are not drugs ;-) is it an Eclipse plugin or something? :P12:40
Meriomadrazr: it's said "on steroids" when there is something really enhanced. I don't know if it's an eclipse plugin, it's built over Eclipse and it's downloadable as a different application12:41
MerioBut is Eclipse basically12:41
madrazrMerio: Oh Ok12:42
madrazrMerio: cool! that is, did not know about it12:42
MerioBut I don't know which facilities it gives, call me old fashioned but I don't like IDEs too much :)12:42
madrazrMerio: heh :D12:45
dhansMerio: they are helpful sometimes. I used to code in vim, but now I see it wasn't the best option :P12:45
Merio:) Well I'm not too integralist to use vim all the time, but a nice GUI with a file explorer, with code highlighting and code completion is enough. :)12:47
dhansMerio: in most cases: true12:48
madrazrMerio: very true12:50
*** madrazr has left #melange13:02
*** madrazr has joined #melange13:03
*** ChanServ sets mode: +v madrazr13:03
*** madrazr has left #melange13:11
*** madrazr has joined #melange13:17
*** ChanServ sets mode: +v madrazr13:17
Meriodhans: just FTR I'm working on generalizing the creation of a new widget to download data from backend and/or to create new widgets from scratch13:20
Meriodhans: and yuppee sounds like it's starting to work finally :P13:25
dhansMerio: cool! :)13:36
*** dhans has quit IRC13:39
*** MatthewWilkes has quit IRC13:44
*** dhans has joined #melange14:02
Meriodhans: ping14:16
dhansMerio: pong14:16
Meriodhans: I've deployed my work on our live instance, but it retrieves only "Application per Program" statistic and, when asked for it it gives a void JSON back14:17
dhansMerio: ok - I have also seen that it shows only "Applications per program"14:18
Meriodhans: you mean you've seen in the dashboard or you already know about the behavior?14:18
dhansthe behavior :)14:18
dhansMerio: I suspect that the reason for this is that you placed Statistic dashboard in User submenu14:19
Meriodhans: so something about the scope path?14:19
dhansbut wait for a moment14:20
Meriook :)14:20
dhansit's also about access_for_other program field14:21
MerioI think so, it doesn't find the scope path of the program from the dashboard and then it fails14:22
MerioBut still I can't understand why I receive a void JSON back14:22
dhansnow you should see more stats14:23
Meriogoing to see :)14:23
dhansI changed some to collectable14:23
MerioGreat, I can see them, but JSON is void :14:24
MerioI mean.. great! :)... but JSON is void :(14:24
dhansthis is probably because scope_path14:24
*** dhaun has joined #melange14:26
Meriohmm what can we do for it? We should not have different dashboard for different programs I think14:26
dhansI thought we would have different dashboard, because some statistics may be inaccessible for other programs14:28
dhansbut about the thing why json is void... from js you call getJSON from "/statistic/get_json_response/google/gsoc2009/students_per_dergree" ?14:29
tpb<> (at
MerioIf you go to that link, it shows a void JSON14:30
MerioAnd I guess this is independent from my scope path14:30
dhansit's strange since it displays non void json on my localhost ;-/14:33
dhansat least for students_per_age14:33
dhansI mean for students_per_degree14:33
*** Lennie has joined #melange14:34
*** ChanServ sets mode: +o Lennie14:34
Meriodhans: dunno14:34
MerioLennie: hi|14:34
dhansLennie: Hi14:34
*** Lennie sets mode: +v dhans14:34
Lennieget an account daniel :)14:34
Meriodhans: Could it be something related to the cache?14:34
dhansLennie: thanks :) but how come some of us (for example you or Mario) are granted voice/operator by ChanServ ?14:35
Meriodhans: because _getStatisticEntity returns None if this not happens => if entities is not None and len(entities) != 0:14:36
dhansMerio: I don't think so, but I am also not sure :)14:36
Lenniedhans:  as said get an account :)14:36
Meriodhans: so perhaps entities is void14:36
Lenniedhans: /msg nickserv hello14:36
LennieI'll leave you two to your meeting now14:36
LennieI'm going to enjoy some more hacking :)14:36
MerioLennie: enjoy ^__^14:37
Meriodhans: so or the statistic is not in cache or there's something wrong with the filter14:38
dhansMerio: ok, but entities should not be None14:38
dhansbut this function fun(...) works like this: if it is in cache: return it, otherwise get from data model14:38
Meriodhans: they're none if we don't have a hit in cache14:38
Meriodhans: aaah I was overlooking that14:39
Meriodhans: so something in the filter?14:40
dhanshmm I think I know14:41
Meriowhat? :)14:41
tpb<> (at
dhanswhen I created this instance I put gsoc link id, not fsoc200914:42
Merioeheh great ^__^14:42
MerioI was finding the same thing because =>
tpb<> (at
MerioError 404: There is no "Statistic" where "scope_path" is "google/gsoc2009" and "link_id" is "students_per_degree"14:42
dhansgonna change that to gsoc200914:43
Meriook :)14:43
MerioWe need to have it parametric in some way, as for duplicate students14:43
dhanshmm I didn't changed because all links were created dynamically14:44
dhansuntil now :P14:44
dhansand I was also afraid that this change would cause some crash, but we will see :P14:45
Merioyep I think for the list of all statistics we should check which programs the user have access to, and have a JSON with the scope path of the program, the name of the program and the list of all statistics available14:45
MerioIn that way we can have it parametric14:45
Merio(keeps me giving 500s)14:49
Merio => 500 server error14:49
dhansnow it should be ok14:51
dhansyou can't change 'workflow' field for program to gsoc2009 ;)14:52
dhansabout what you wrote above: for me, the question is how to determine if a user has access to a program14:53
Merio(so what? Can I change your code to give the scope_path as well?)14:54
Meriothink we should ask dev list14:55
dhansbut generally we should try to avoid such situations, because of the fact that we will have to send code sample to Google :P14:56
Meriodhans: what do you mean?14:58
Meriodhans: in the meantime I'm redeploying app with modified dashboard.js file for gsoc scope (not committing it though)14:58
dhansMerio: what 'what do you mean'? :P14:58
Meriowith this :) => but generally we should try to avoid such situations, because of the fact that we will have to send code sample to Google :P14:59
dhansat the end of GSoC we will have to send our code to Google15:00
Meriodhans: yes, I know, did last year :)15:00
Meriodhans: so you're worried about mixing our code?15:00
dhansI a very little bit worried15:01
Merio(dhans: only students_per_degree working?)15:01
Meriodhans: you shouldn't. We can also send diffs, I think we can easily extract them from the hg repository15:02
dhansyeah, I know... it's even easier because it's melange - related to google. I think even if we split it randomly - they would understand :P15:03
Meriodhans: so don't be worried, if something like this could speed up our project I think that's not a problem at all15:04
Meriodhans: relating to the project, what's stopping us for other statistics? So I can help on it15:05
Merio(dhans: live instance working... yuppeee ;))15:05
dhansMerio: :)15:06
dhansMerio: nothing's stopping us, but let me do it - it'll be done by tomorrow morning. Just my learning jQuery today hasn't resulted in many commits :)15:07
dhansMerio: I'm going to a store, they're going to close it soon - be back in 20 minuts15:08
Meriodhans: no problems, is just that I wanted to join the effort if there was something lengthy to do15:08
Meriodhans: no problems, I'm off from commits for today, need to study a bit for the exam :)15:08
Meriodhans: going to update melangedemos wiki and send to the list :)15:08
dhansMerio: ok15:09
Meriodhans: can't remind if you15:09
Meriodhans: sent the list infos about your Task API integration15:09
Meriodhans: or in the melangedemos wiki... however I'll update it for you15:10
dhansyes, I've almost finished (it's quite long)15:10
Merioah ok so you'll be updating and sending to the list when you're finished... going to update only with my work then for the moment15:10
dhansMerio: thank you ;-)15:10
dhansto be fair, I was not aware that there is something like melangedemos wiki :P15:11
Meriodhans: ok :)15:11
tpb<> (at
MerioI've sent sometimes updates to the list about that15:11
dhansI'll take a look at it once I am back, but really have to go15:11
Meriook see you later!15:11
*** dhans has quit IRC15:14
*** dhans has joined #melange15:15
*** dhans has quit IRC15:26
*** MatthewWilkes has joined #melange15:37
*** Merio has quit IRC15:39
*** Merio has joined #melange15:41
*** ChanServ sets mode: +v Merio15:41
*** dhans has joined #melange16:15
*** dr__house has quit IRC16:30
*** madrazr1 has joined #melange16:34
*** dr__house has joined #melange16:35
*** madrazr has quit IRC16:37
*** madrazr1 is now known as madrazr16:40
*** ChanServ sets mode: +v madrazr16:40
*** dhaun has quit IRC17:28
*** Lennie has quit IRC17:32
*** dr__house has quit IRC18:29
*** madrazr has quit IRC18:48
*** dhans has left #melange19:19
*** MatthewWilkes has quit IRC20:10
*** mithro has joined #melange20:23
*** ChanServ sets mode: +v mithro20:23
*** penyaskito has joined #melange20:59
*** Merio has quit IRC21:13
*** Mek_ has joined #melange22:04
*** Mek has quit IRC22:07
*** jamtoday has joined #melange23:54

Generated by 2.13.1 by Marius Gedminas - find it at!