Wednesday, 2009-06-03

*** tpb has joined #tp00:00
*** ChanServ sets mode: +o tpb00:00
Greywhindtansell: time for our meeting?00:04
Greywhindoh wait. that's tomorrow.00:04
Greywhindsilly me00:04
tansellGreywhind, yeah00:05
Greywhindoh well. weekly summary is a day early.00:05
Greywhind*shrug*00:05
*** jmtan1 has joined #tp00:06
Greywhindtansell: did you see my two requests for review earlier?00:08
tanselloh00:09
tansellI forgot about them00:09
Greywhindno problem00:09
*** jmtan has quit IRC00:16
chereztansell: This coverage testing is great!00:16
tansellcherez, oh?00:17
cherezYeah, I'm finding everything I overlooked testing.00:18
tansellcherez, there is also "branch coverage" - but that is less important00:19
cherezThat's sort of what I'm doing right now.00:20
cherezWell, I guess not.00:21
tansellso00:21
tansellthe following statement00:21
tansellif A:00:21
tansell  print 'T'00:21
tansellalso has an empty else part00:21
cherezThat's why I guessed not.00:21
tansellso to have proper coverage you need to make sure you test with A being true and A being false00:21
tansellno coverage tools that i know of give you info on that :(00:22
tansellcherez, so you should be able to scp to "scp myfile [email protected]:~/public_html/myfile"00:22
tansellthen access that at www.thousandparsec.net/~cherez/00:22
cherezWell, I think I found a minor bug in xstruct that I overlooked.00:23
cherezI'll stick up the coverage report after I figure out how to deal with that.00:24
cherezAww man, this is one of those ugly bugs.00:27
tansellugly bugs?00:27
cherezA bug that forces you to restructure your code because of an edge case.00:28
cherezI didn't notice that xstruct supports padding.00:31
tansellpadding? as in x ?00:31
cherezRight.00:32
tansellcherez, btw did you end up checking the 4c and similar cases?00:32
tansellx should be pretty easy to handle?00:32
cherezNot if it's at the end.00:32
tansellcherez, hrm?00:33
cherezThe outer loop is "while len(struct) > 0:"00:33
cherezstruct being the arguments passed.00:33
cherezSo it will terminate when you run out of the arguments.00:33
cherezAnd not insert the padding.00:34
tansellUmm 'x' is in the structure00:34
cherezAnd throw an exception because it couldn't parse the full format string before running out of data.00:34
tansellIE00:34
tansell"4i 12x"00:35
tansellwould be 4 ints followed by 12 bytes which we ignore00:35
cherezIn the function that's "sstruct"00:36
cherez"struct" is the arguments that are passed to it to be encoded into the string.00:36
tansell?00:36
cherezWait, you're right.00:37
tansell12x should just insert 12 null bytes00:37
cherezWell, it's throwing an exception.00:37
cherezpack("12x") throws an error.00:38
cherezif len(args) == 0: raise TypeError(...)00:39
cherezIf you just pass "12x" there are no args so it fails there before parsing the data.00:40
llnzbbl00:41
*** llnz has quit IRC00:41
tansellcherez, ahh00:55
tanselltrue00:55
cherezMy ideas to fix it are either ugly restructuring, or taking that out and catching when they read past the end of the argument list.00:56
cherezBoth are kind of hackish, but I'm leaning toward the latter being the lesser evil.00:57
tansellI thing the second option is probably the best00:58
cherezAlright, got it.01:00
cherezI think my coverage tool might have trouble with exceptions.01:06
cherezThere is definitely something wrong with its treatment of exceptions.01:12
chereztansell: I'm getting permission denied from scp.01:25
tansellhrm01:26
tansellcherez, can you ssh to git.thousandparsec.net ?01:26
tansellmaybe you need01:27
tansellscp myfile [email protected]:/home/users/cherez/public_html/myfile01:27
cherezWhen I ssh I get "Permission denied (publickey,gssapi-keyex,gssapi-with-mic).".01:27
tansellhrm01:32
tansellcherez, you have been able to push previously right?01:32
cherezYeah.01:32
tansellcherez, aah I see the problem01:33
tanselltry again now01:33
cherezGreat.01:35
cherezThe coverage tool is saying 78% coverage in xstruct, but I am pretty sure it's not counting any of the exception handling code as covered.01:35
cherezhttp://www.thousandparsec.net/~cherez/xstruct.py,coverage01:35
tpb<http://ln-s.net/3GHL> (at www.thousandparsec.net)01:36
tansellwhat tool are you using?01:48
cherezhttp://nedbatchelder.com/code/modules/coverage.html01:49
tpb<http://ln-s.net/1xDa> (at nedbatchelder.com)01:49
cherezIt was on Wikipedia's Code Coverage page. :P01:49
*** alanp has quit IRC01:49
cherezIt works well aside from exceptions.01:51
cherezHTML output would be nice.01:52
*** llnz has joined #tp02:00
tansellcherez, maybe try - http://nedbatchelder.com/blog/200905/coverage_v30_beta_3.html ?02:00
tpb<http://ln-s.net/3GHT> (at nedbatchelder.com)02:00
tansellHTML reports and annotation of source files: use the new -b (browser) switch. Thanks to George Song for code, inspiration and guidance.02:01
cherezI had some trouble easy_installing that, but I'll give it a try manually.02:01
cherezThe HTML reports are a bit ugly, but not bad.02:09
cherezStill says no exceptions are ever raised or caught.02:09
tansellcherez, hrm02:34
Greywhindtansell: don't mean to bother you again, but would you be able to look at my patches sometime before i wake up tomorrow?02:34
tansellGreywhind, oh - I assume you had gone to bed02:34
tansellGreywhind, yeah - I plan to look at them later tonight02:34
Greywhindtansell: ok, cool. thanks.02:34
tansellGreywhind, I assumed you had gone - otherwise I would have done them earlier02:35
Greywhindtansell: no worrise02:35
Greywhind*worries02:35
tansellGreywhind, sorry about that02:35
Greywhindtansell: it's 11:35 here now, and i usually don't go to sleep until about midnight, for the future02:35
tansellGreywhind, okay02:35
*** greenlion has joined #tp02:51
*** DTRemenak|RDP has joined #tp03:05
*** Noughmad has joined #tp03:13
*** Noughmad_ has joined #tp03:13
*** DTRemenak has quit IRC03:19
*** Erroneous has joined #tp03:22
*** Erroneous is now known as DTRemenak03:22
*** DTRemenak|RDP has quit IRC03:24
*** Noughmad_ has quit IRC03:36
*** Noughmad has quit IRC03:56
*** Greywhind has quit IRC04:09
*** jmtan1 has quit IRC06:05
* llnz wanders off08:03
llnzlater all08:03
*** llnz has quit IRC08:03
*** alanp has joined #tp08:12
*** alanp has quit IRC08:23
*** alanp has joined #tp09:05
*** Demitar has quit IRC09:49
*** Demitar has joined #tp09:49
*** Demitar has quit IRC09:53
*** Demitar has joined #tp09:55
ezodmorning all10:07
totemorning :)10:08
Landonhi world10:09
ezodhow are your projects going?10:09
toteslowly in the right direction :)10:10
tansellhey tote10:11
totehi tansell10:11
tanselltote, so - when will your next post be?10:11
ezodtansell: speaking of posts, are you aware of alanp's weekly reports?10:12
ezodhttp://alanp.ca/blog/tag/tp-weekly/10:12
tpbTitle: tp-weekly « alanp.ca : blog (at alanp.ca)10:12
totetomorrow for the work im doing now, and then another on friday i think10:12
tansellthey should be in my blog reader when they occur10:13
tansellalanp, are you about?10:30
alanpyes, i am back and forth10:30
alanpso it may take me a few minutes to replyu10:31
tansellalanp, you should use a CDATA section for10:31
tansell        <tpclRequirementsFunction>"(lambda (design) "10:31
tansellhaving those quotes is a little silly :)10:32
alanp:)10:32
* alanp reading up on cdata10:32
tanselland why do you use different cases?10:32
tansell<Components>10:33
tansellverse10:33
tansell    <comp>10:33
alanpI'll change that10:33
alanpDoes tinyxml understand cdata well?10:33
tanselland shortname verse full name?10:33
tansellalanp, I assume so10:33
tansellit's pretty much a requirement for XML10:33
alanpso I can just place it in the <tpclRequirementsFunction> tag then, correct?10:34
tansellyess10:35
tansellyou probably don't actually need it10:35
alanp<tag><![CDATA[blah<>]]</tag>10:35
tansellas nothing in the lambda is a < or >10:35
alanpRight10:36
alanpSo, use it anyways?10:36
tansellyea10:37
tansellI guess if they are using greater/less then signs it's needed10:37
alanpok, will do10:40
alanpwhat about for the propertyList?10:40
alanpI guess it isn't needed there?10:40
tansellI'm not an XML expert10:41
tansellllnz probably knows better10:41
alanpok10:41
tansellthe CDATA might only be needed if there are greater than/less then in the section10:41
alanpright10:42
tanselltote / alanp: any questions for me before I disappear?10:52
tansellI'm not often around when you guys are so use this chance :P10:52
tanselltote, I'm surprised you have not had more questions so far10:52
tanselltote, I would also like to point out that if the code is not on git.thousandparsec.net it doesn't exist10:56
tanselltote, so you should probably be pushing/commiting more so we can watch your process10:57
totetansell: im building the base right now, as you didnt want dependancies (like werkzeug) im building a simple wsgi application instead, so more questions will come in the next few days as im gonna connect my app with tp :)11:02
totetansell: but i do have a git question, if im using libtpclient and libtpproto should i add them as subprojects or something in my own project? atm im just using a simple ln -s to get it working locally11:04
ezodtote: submodules is probably the way to go - see tpclient-pywx repository for an example11:09
tanselltote,  look at what tpclient-pywx and daneel-ai do11:09
toteok will do11:11
tanselltote, I didn't necessarily disagree with using something like werkzeug - just something which can't be installed from packages on a debian/ubuntu machine11:12
tanselltote, I would encourage you to use django if you wanted templates and such11:13
tansellanyway I need to head off11:18
tansellsee ya!11:18
ezodtote: pylons looks cool too11:19
ezodlight and flexible11:19
tansell--laptopwhen in doubt, use the most popular tool :P11:19
ezodhttp://brianreily.com/project/juno11:21
tpbTitle: Juno: A Lightweight and Simple Web Framework (at brianreily.com)11:21
ezoddunno if that one is popular though11:21
totewell as im only going to serve json responses, writing a simple wsgi application using only python and its standard library is no problem11:29
ezodhttp://www.makotemplates.org/11:32
tpbTitle: welcome to Mako! (at www.makotemplates.org)11:32
*** mithro has quit IRC11:32
*** alanp has quit IRC11:42
*** tansell has quit IRC13:28
*** tansell has joined #tp13:39
*** tansell_laptop has joined #tp14:15
*** tansell--laptop has quit IRC14:16
*** Erroneous has joined #tp15:51
*** llnz has joined #tp16:08
*** Greywhind has joined #tp16:25
*** gau_veldt has quit IRC16:57
*** greenlion has quit IRC17:27
*** greenlion has joined #tp17:37
*** Greywhin1 has joined #tp18:17
*** Greywhind has quit IRC18:29
*** alanp has joined #tp19:38
*** nash has joined #tp19:43
tansellmorning people20:16
tansellnash, ping?20:16
tansellGreywhin1, did you see my comments?20:17
Greywhin1tansell: yep20:17
Greywhin1i've updated the uploads20:17
tansellGreywhin1, you closed all your other issues too?20:17
nashtansell: pong?20:18
tansellGreywhin1, btw if you add [email protected] to the cc lists of your patches it will turn up in my list straight away20:19
Greywhin1tansell: ok. i'll config that in.20:19
Greywhin1tansell: i closed the old ones, yes20:20
tansellgreat!20:22
tansellGreywhin1, if I give you a LGTM20:22
tansellGreywhin1, feel free to submit it after making any changes20:22
Greywhin1tansell: i wasn't sure what you meant by "a format that epydoc supports"20:22
Greywhin1otherwise i would have submitted it20:22
Greywhin1i looked into it and thought that maybe it didn't support colons, so i removed that20:22
tansellGreywhin1, ah - you didn't reply in the comments20:23
Greywhin1for some reason i didn't think of that20:23
Greywhin1but at least i can talk to you about it here20:23
tansellGreywhin1, http://epydoc.sourceforge.net/manual-epytext.html20:24
tpb<http://ln-s.net/3Ga0> (at epydoc.sourceforge.net)20:24
tansellGreywhin1, sure - but it makes me less confused :)20:24
Greywhin1tansell: yeah, i'll put a comment in next time. just forgot.20:24
tansellGreywhin1, it's generally a good idea to leave a comment when you upload a new patchset too20:25
Greywhin1ok20:25
tansellGreywhin1, go through each comment and click the "Done" button20:25
Greywhin1tansell: ok. will do.20:26
Greywhin1tansell: i looked at the page you linked earlier, but it seems like most TP doc comments are just a line of plain text. so i wasn't sure what applied.20:26
Greywhin1should i use things like @return?20:27
*** nash has quit IRC20:27
*** nash has joined #tp20:27
*** mithro has joined #tp20:27
tansellGreywhin1, yeah - if your docstring is going to be more descriptive20:28
Greywhin1ok20:28
tansellGreywhin1, the general rule is, if you need more then one line to describe the function you should use the full epydoc format20:29
tansellcherez, all your doc strings should be in epydoc format20:29
Greywhin1tansell: ok20:30
Greywhin1so something like:20:31
Greywhin1Get a list of tuples of resources in an object.20:31
Greywhin1@return a list of tuples in the form (id, amount stored, amount available to be mined, amount unavailable)20:31
Greywhin1"""20:31
tansellGreywhin1, yeah but you need another newline here20:45
Greywhin1before the @return?20:45
*** mithro has quit IRC20:51
*** mithro has joined #tp20:52
tansellGreywhin1, yeah21:08
*** jnengland77 has joined #tp21:24
CIA-46alanp tpserver-cpp-mtsec * rde7511e228a2 /modules/games/mtsec/components.xml: Added XML file that holds the component information.21:54
tansellalanp, \o/21:55
alanp??21:56
tansell\o/ == equals person throwing their hands up in joy21:57
alanpahhhh hahaha21:57
tansellI learn't it from shenki21:57
Landon\o\ /o/ party!21:58
tansellLandon, so do we have progress?21:58
Landonnothing yet, but since you reminded me I'll go get my desktop set up21:59
alanptansell,  do  you see anything wrong there?22:00
alanpi used some regexfu22:00
alanpso there could be some errors22:01
tansellalanp, actually I think there is some logic problems with22:02
tansell+    <!--  To determine the total firepower of the ship, we multiply the -->22:02
tansell+    <!--  firepower of an individual missile bay by how many missile bays -->22:02
tansell+    <!--  the ship has. -->22:02
tansell+    <!--  To determine how many missile bays the ship can have, we divide -->22:02
tansell+    <!--  the ship size by the missile size. -->22:02
tansell+    <Firepower><![CDATA[(lambda (design) (* (floor22:02
tansellthis line doesn't look right22:02
tansell+            (cons #t \\)22:02
alanphmmm22:02
tansell+    <name>Cerium3Explosives</name> ?22:02
alanpwhat's wrong with that?22:03
tansellWhy Cerium3Expolsives?22:03
alanpIt's from mtsec.cpp, I haven't changed them yet22:03
tansellI don't know the original code22:03
alanpok, for the sake of argument, why not?22:04
tansellthe maximum number of (missile tubes+missile racks) the ship can have is the ship-size divided by the missile size22:05
tansellalanp, I would make the name human readable personally22:06
alanpSuch as?22:07
JLafontI thought we were all robots here22:07
LandonJLafont: don't know about you, but I'm turing complete ;)22:07
tansell<name>Cerium 3 Explosives</name>22:07
alanpOK22:08
alanpAre components in other rulesets like that?22:08
tansellit's much easier to go human -> non-human then the other way around22:08
alanpdefinitely22:08
tansellalanp, you know that <!-- --> comment can be multiline?22:09
alanpyes22:09
alanpI was having problems with the multiline comment regular expression22:09
tansellalanp, It would be a good idea to fix these manually now :)22:09
alanpWill do22:10
*** Greywhin1 has quit IRC22:10
*** Greywhind has joined #tp22:10
tansellalanp, the plan was also that missile bays can carry a single torpedo while missile racks can carry n missiles22:10
tansellactually it might be a good idea to rename the bays to tubes too :)22:11
tansellthe idea being that you could load a ship up with only missile tubes - you only get one shot - but if you have a combination of racks/bays you can get multiple shots22:12
alanp:-)22:13
alanpi just came up with a quick fix for the comments I believe22:13
tanselloff to lunch22:18
tansellbblr22:18
tansellback23:11
tansellcherez, ping?23:17
chereztansell: Pong.23:18
tansellcherez, so coverage should work with self.assertRaises23:18
cherezWell, according to coverage no exceptions are raised in the unit tests.23:21
cherezBut assertRaises passes.23:21
tansellcherez, I think it must be the way you are using coverage23:28
cherezDoh!23:39
llnzalanp: you don't need _num-components, as that is added automatically to every component23:41
cherezWhy does the API differ in just one function. :(23:42
*** bddebian has quit IRC23:46
*** jmtan has joined #tp23:54
*** jmtan has quit IRC23:57
*** jmtan has joined #tp23:57

Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!