*** tpb has joined #tp | 00:00 | |
*** ChanServ sets mode: +o tpb | 00:00 | |
Greywhind | tansell: time for our meeting? | 00:04 |
---|---|---|
Greywhind | oh wait. that's tomorrow. | 00:04 |
Greywhind | silly me | 00:04 |
tansell | Greywhind, yeah | 00:05 |
Greywhind | oh well. weekly summary is a day early. | 00:05 |
Greywhind | *shrug* | 00:05 |
*** jmtan1 has joined #tp | 00:06 | |
Greywhind | tansell: did you see my two requests for review earlier? | 00:08 |
tansell | oh | 00:09 |
tansell | I forgot about them | 00:09 |
Greywhind | no problem | 00:09 |
*** jmtan has quit IRC | 00:16 | |
cherez | tansell: This coverage testing is great! | 00:16 |
tansell | cherez, oh? | 00:17 |
cherez | Yeah, I'm finding everything I overlooked testing. | 00:18 |
tansell | cherez, there is also "branch coverage" - but that is less important | 00:19 |
cherez | That's sort of what I'm doing right now. | 00:20 |
cherez | Well, I guess not. | 00:21 |
tansell | so | 00:21 |
tansell | the following statement | 00:21 |
tansell | if A: | 00:21 |
tansell | print 'T' | 00:21 |
tansell | also has an empty else part | 00:21 |
cherez | That's why I guessed not. | 00:21 |
tansell | so to have proper coverage you need to make sure you test with A being true and A being false | 00:21 |
tansell | no coverage tools that i know of give you info on that :( | 00:22 |
tansell | cherez, so you should be able to scp to "scp myfile [email protected]:~/public_html/myfile" | 00:22 |
tansell | then access that at www.thousandparsec.net/~cherez/ | 00:22 |
cherez | Well, I think I found a minor bug in xstruct that I overlooked. | 00:23 |
cherez | I'll stick up the coverage report after I figure out how to deal with that. | 00:24 |
cherez | Aww man, this is one of those ugly bugs. | 00:27 |
tansell | ugly bugs? | 00:27 |
cherez | A bug that forces you to restructure your code because of an edge case. | 00:28 |
cherez | I didn't notice that xstruct supports padding. | 00:31 |
tansell | padding? as in x ? | 00:31 |
cherez | Right. | 00:32 |
tansell | cherez, btw did you end up checking the 4c and similar cases? | 00:32 |
tansell | x should be pretty easy to handle? | 00:32 |
cherez | Not if it's at the end. | 00:32 |
tansell | cherez, hrm? | 00:33 |
cherez | The outer loop is "while len(struct) > 0:" | 00:33 |
cherez | struct being the arguments passed. | 00:33 |
cherez | So it will terminate when you run out of the arguments. | 00:33 |
cherez | And not insert the padding. | 00:34 |
tansell | Umm 'x' is in the structure | 00:34 |
cherez | And throw an exception because it couldn't parse the full format string before running out of data. | 00:34 |
tansell | IE | 00:34 |
tansell | "4i 12x" | 00:35 |
tansell | would be 4 ints followed by 12 bytes which we ignore | 00:35 |
cherez | In 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 |
cherez | Wait, you're right. | 00:37 |
tansell | 12x should just insert 12 null bytes | 00:37 |
cherez | Well, it's throwing an exception. | 00:37 |
cherez | pack("12x") throws an error. | 00:38 |
cherez | if len(args) == 0: raise TypeError(...) | 00:39 |
cherez | If you just pass "12x" there are no args so it fails there before parsing the data. | 00:40 |
llnz | bbl | 00:41 |
*** llnz has quit IRC | 00:41 | |
tansell | cherez, ahh | 00:55 |
tansell | true | 00:55 |
cherez | My 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 |
cherez | Both are kind of hackish, but I'm leaning toward the latter being the lesser evil. | 00:57 |
tansell | I thing the second option is probably the best | 00:58 |
cherez | Alright, got it. | 01:00 |
cherez | I think my coverage tool might have trouble with exceptions. | 01:06 |
cherez | There is definitely something wrong with its treatment of exceptions. | 01:12 |
cherez | tansell: I'm getting permission denied from scp. | 01:25 |
tansell | hrm | 01:26 |
tansell | cherez, can you ssh to git.thousandparsec.net ? | 01:26 |
tansell | maybe you need | 01:27 |
tansell | scp myfile [email protected]:/home/users/cherez/public_html/myfile | 01:27 |
cherez | When I ssh I get "Permission denied (publickey,gssapi-keyex,gssapi-with-mic).". | 01:27 |
tansell | hrm | 01:32 |
tansell | cherez, you have been able to push previously right? | 01:32 |
cherez | Yeah. | 01:32 |
tansell | cherez, aah I see the problem | 01:33 |
tansell | try again now | 01:33 |
cherez | Great. | 01:35 |
cherez | The 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 |
cherez | http://www.thousandparsec.net/~cherez/xstruct.py,coverage | 01:35 |
tpb | <http://ln-s.net/3GHL> (at www.thousandparsec.net) | 01:36 |
tansell | what tool are you using? | 01:48 |
cherez | http://nedbatchelder.com/code/modules/coverage.html | 01:49 |
tpb | <http://ln-s.net/1xDa> (at nedbatchelder.com) | 01:49 |
cherez | It was on Wikipedia's Code Coverage page. :P | 01:49 |
*** alanp has quit IRC | 01:49 | |
cherez | It works well aside from exceptions. | 01:51 |
cherez | HTML output would be nice. | 01:52 |
*** llnz has joined #tp | 02:00 | |
tansell | cherez, 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 |
tansell | HTML reports and annotation of source files: use the new -b (browser) switch. Thanks to George Song for code, inspiration and guidance. | 02:01 |
cherez | I had some trouble easy_installing that, but I'll give it a try manually. | 02:01 |
cherez | The HTML reports are a bit ugly, but not bad. | 02:09 |
cherez | Still says no exceptions are ever raised or caught. | 02:09 |
tansell | cherez, hrm | 02:34 |
Greywhind | tansell: 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 |
tansell | Greywhind, oh - I assume you had gone to bed | 02:34 |
tansell | Greywhind, yeah - I plan to look at them later tonight | 02:34 |
Greywhind | tansell: ok, cool. thanks. | 02:34 |
tansell | Greywhind, I assumed you had gone - otherwise I would have done them earlier | 02:35 |
Greywhind | tansell: no worrise | 02:35 |
Greywhind | *worries | 02:35 |
tansell | Greywhind, sorry about that | 02:35 |
Greywhind | tansell: it's 11:35 here now, and i usually don't go to sleep until about midnight, for the future | 02:35 |
tansell | Greywhind, okay | 02:35 |
*** greenlion has joined #tp | 02:51 | |
*** DTRemenak|RDP has joined #tp | 03:05 | |
*** Noughmad has joined #tp | 03:13 | |
*** Noughmad_ has joined #tp | 03:13 | |
*** DTRemenak has quit IRC | 03:19 | |
*** Erroneous has joined #tp | 03:22 | |
*** Erroneous is now known as DTRemenak | 03:22 | |
*** DTRemenak|RDP has quit IRC | 03:24 | |
*** Noughmad_ has quit IRC | 03:36 | |
*** Noughmad has quit IRC | 03:56 | |
*** Greywhind has quit IRC | 04:09 | |
*** jmtan1 has quit IRC | 06:05 | |
* llnz wanders off | 08:03 | |
llnz | later all | 08:03 |
*** llnz has quit IRC | 08:03 | |
*** alanp has joined #tp | 08:12 | |
*** alanp has quit IRC | 08:23 | |
*** alanp has joined #tp | 09:05 | |
*** Demitar has quit IRC | 09:49 | |
*** Demitar has joined #tp | 09:49 | |
*** Demitar has quit IRC | 09:53 | |
*** Demitar has joined #tp | 09:55 | |
ezod | morning all | 10:07 |
tote | morning :) | 10:08 |
Landon | hi world | 10:09 |
ezod | how are your projects going? | 10:09 |
tote | slowly in the right direction :) | 10:10 |
tansell | hey tote | 10:11 |
tote | hi tansell | 10:11 |
tansell | tote, so - when will your next post be? | 10:11 |
ezod | tansell: speaking of posts, are you aware of alanp's weekly reports? | 10:12 |
ezod | http://alanp.ca/blog/tag/tp-weekly/ | 10:12 |
tpb | Title: tp-weekly « alanp.ca : blog (at alanp.ca) | 10:12 |
tote | tomorrow for the work im doing now, and then another on friday i think | 10:12 |
tansell | they should be in my blog reader when they occur | 10:13 |
tansell | alanp, are you about? | 10:30 |
alanp | yes, i am back and forth | 10:30 |
alanp | so it may take me a few minutes to replyu | 10:31 |
tansell | alanp, you should use a CDATA section for | 10:31 |
tansell | <tpclRequirementsFunction>"(lambda (design) " | 10:31 |
tansell | having those quotes is a little silly :) | 10:32 |
alanp | :) | 10:32 |
* alanp reading up on cdata | 10:32 | |
tansell | and why do you use different cases? | 10:32 |
tansell | <Components> | 10:33 |
tansell | verse | 10:33 |
tansell | <comp> | 10:33 |
alanp | I'll change that | 10:33 |
alanp | Does tinyxml understand cdata well? | 10:33 |
tansell | and shortname verse full name? | 10:33 |
tansell | alanp, I assume so | 10:33 |
tansell | it's pretty much a requirement for XML | 10:33 |
alanp | so I can just place it in the <tpclRequirementsFunction> tag then, correct? | 10:34 |
tansell | yess | 10:35 |
tansell | you probably don't actually need it | 10:35 |
alanp | <tag><![CDATA[blah<>]]</tag> | 10:35 |
tansell | as nothing in the lambda is a < or > | 10:35 |
alanp | Right | 10:36 |
alanp | So, use it anyways? | 10:36 |
tansell | yea | 10:37 |
tansell | I guess if they are using greater/less then signs it's needed | 10:37 |
alanp | ok, will do | 10:40 |
alanp | what about for the propertyList? | 10:40 |
alanp | I guess it isn't needed there? | 10:40 |
tansell | I'm not an XML expert | 10:41 |
tansell | llnz probably knows better | 10:41 |
alanp | ok | 10:41 |
tansell | the CDATA might only be needed if there are greater than/less then in the section | 10:41 |
alanp | right | 10:42 |
tansell | tote / alanp: any questions for me before I disappear? | 10:52 |
tansell | I'm not often around when you guys are so use this chance :P | 10:52 |
tansell | tote, I'm surprised you have not had more questions so far | 10:52 |
tansell | tote, I would also like to point out that if the code is not on git.thousandparsec.net it doesn't exist | 10:56 |
tansell | tote, so you should probably be pushing/commiting more so we can watch your process | 10:57 |
tote | tansell: 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 |
tote | tansell: 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 locally | 11:04 |
ezod | tote: submodules is probably the way to go - see tpclient-pywx repository for an example | 11:09 |
tansell | tote, look at what tpclient-pywx and daneel-ai do | 11:09 |
tote | ok will do | 11:11 |
tansell | tote, I didn't necessarily disagree with using something like werkzeug - just something which can't be installed from packages on a debian/ubuntu machine | 11:12 |
tansell | tote, I would encourage you to use django if you wanted templates and such | 11:13 |
tansell | anyway I need to head off | 11:18 |
tansell | see ya! | 11:18 |
ezod | tote: pylons looks cool too | 11:19 |
ezod | light and flexible | 11:19 |
tansell--laptop | when in doubt, use the most popular tool :P | 11:19 |
ezod | http://brianreily.com/project/juno | 11:21 |
tpb | Title: Juno: A Lightweight and Simple Web Framework (at brianreily.com) | 11:21 |
ezod | dunno if that one is popular though | 11:21 |
tote | well as im only going to serve json responses, writing a simple wsgi application using only python and its standard library is no problem | 11:29 |
ezod | http://www.makotemplates.org/ | 11:32 |
tpb | Title: welcome to Mako! (at www.makotemplates.org) | 11:32 |
*** mithro has quit IRC | 11:32 | |
*** alanp has quit IRC | 11:42 | |
*** tansell has quit IRC | 13:28 | |
*** tansell has joined #tp | 13:39 | |
*** tansell_laptop has joined #tp | 14:15 | |
*** tansell--laptop has quit IRC | 14:16 | |
*** Erroneous has joined #tp | 15:51 | |
*** llnz has joined #tp | 16:08 | |
*** Greywhind has joined #tp | 16:25 | |
*** gau_veldt has quit IRC | 16:57 | |
*** greenlion has quit IRC | 17:27 | |
*** greenlion has joined #tp | 17:37 | |
*** Greywhin1 has joined #tp | 18:17 | |
*** Greywhind has quit IRC | 18:29 | |
*** alanp has joined #tp | 19:38 | |
*** nash has joined #tp | 19:43 | |
tansell | morning people | 20:16 |
tansell | nash, ping? | 20:16 |
tansell | Greywhin1, did you see my comments? | 20:17 |
Greywhin1 | tansell: yep | 20:17 |
Greywhin1 | i've updated the uploads | 20:17 |
tansell | Greywhin1, you closed all your other issues too? | 20:17 |
nash | tansell: pong? | 20:18 |
tansell | Greywhin1, btw if you add [email protected] to the cc lists of your patches it will turn up in my list straight away | 20:19 |
Greywhin1 | tansell: ok. i'll config that in. | 20:19 |
Greywhin1 | tansell: i closed the old ones, yes | 20:20 |
tansell | great! | 20:22 |
tansell | Greywhin1, if I give you a LGTM | 20:22 |
tansell | Greywhin1, feel free to submit it after making any changes | 20:22 |
Greywhin1 | tansell: i wasn't sure what you meant by "a format that epydoc supports" | 20:22 |
Greywhin1 | otherwise i would have submitted it | 20:22 |
Greywhin1 | i looked into it and thought that maybe it didn't support colons, so i removed that | 20:22 |
tansell | Greywhin1, ah - you didn't reply in the comments | 20:23 |
Greywhin1 | for some reason i didn't think of that | 20:23 |
Greywhin1 | but at least i can talk to you about it here | 20:23 |
tansell | Greywhin1, http://epydoc.sourceforge.net/manual-epytext.html | 20:24 |
tpb | <http://ln-s.net/3Ga0> (at epydoc.sourceforge.net) | 20:24 |
tansell | Greywhin1, sure - but it makes me less confused :) | 20:24 |
Greywhin1 | tansell: yeah, i'll put a comment in next time. just forgot. | 20:24 |
tansell | Greywhin1, it's generally a good idea to leave a comment when you upload a new patchset too | 20:25 |
Greywhin1 | ok | 20:25 |
tansell | Greywhin1, go through each comment and click the "Done" button | 20:25 |
Greywhin1 | tansell: ok. will do. | 20:26 |
Greywhin1 | tansell: 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 |
Greywhin1 | should i use things like @return? | 20:27 |
*** nash has quit IRC | 20:27 | |
*** nash has joined #tp | 20:27 | |
*** mithro has joined #tp | 20:27 | |
tansell | Greywhin1, yeah - if your docstring is going to be more descriptive | 20:28 |
Greywhin1 | ok | 20:28 |
tansell | Greywhin1, the general rule is, if you need more then one line to describe the function you should use the full epydoc format | 20:29 |
tansell | cherez, all your doc strings should be in epydoc format | 20:29 |
Greywhin1 | tansell: ok | 20:30 |
Greywhin1 | so something like: | 20:31 |
Greywhin1 | Get 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 |
tansell | Greywhin1, yeah but you need another newline here | 20:45 |
Greywhin1 | before the @return? | 20:45 |
*** mithro has quit IRC | 20:51 | |
*** mithro has joined #tp | 20:52 | |
tansell | Greywhin1, yeah | 21:08 |
*** jnengland77 has joined #tp | 21:24 | |
CIA-46 | alanp tpserver-cpp-mtsec * rde7511e228a2 /modules/games/mtsec/components.xml: Added XML file that holds the component information. | 21:54 |
tansell | alanp, \o/ | 21:55 |
alanp | ?? | 21:56 |
tansell | \o/ == equals person throwing their hands up in joy | 21:57 |
alanp | ahhhh hahaha | 21:57 |
tansell | I learn't it from shenki | 21:57 |
Landon | \o\ /o/ party! | 21:58 |
tansell | Landon, so do we have progress? | 21:58 |
Landon | nothing yet, but since you reminded me I'll go get my desktop set up | 21:59 |
alanp | tansell, do you see anything wrong there? | 22:00 |
alanp | i used some regexfu | 22:00 |
alanp | so there could be some errors | 22:01 |
tansell | alanp, actually I think there is some logic problems with | 22: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) (* (floor | 22:02 |
tansell | this line doesn't look right | 22:02 |
tansell | + (cons #t \\) | 22:02 |
alanp | hmmm | 22:02 |
tansell | + <name>Cerium3Explosives</name> ? | 22:02 |
alanp | what's wrong with that? | 22:03 |
tansell | Why Cerium3Expolsives? | 22:03 |
alanp | It's from mtsec.cpp, I haven't changed them yet | 22:03 |
tansell | I don't know the original code | 22:03 |
alanp | ok, for the sake of argument, why not? | 22:04 |
tansell | the maximum number of (missile tubes+missile racks) the ship can have is the ship-size divided by the missile size | 22:05 |
tansell | alanp, I would make the name human readable personally | 22:06 |
alanp | Such as? | 22:07 |
JLafont | I thought we were all robots here | 22:07 |
Landon | JLafont: don't know about you, but I'm turing complete ;) | 22:07 |
tansell | <name>Cerium 3 Explosives</name> | 22:07 |
alanp | OK | 22:08 |
alanp | Are components in other rulesets like that? | 22:08 |
tansell | it's much easier to go human -> non-human then the other way around | 22:08 |
alanp | definitely | 22:08 |
tansell | alanp, you know that <!-- --> comment can be multiline? | 22:09 |
alanp | yes | 22:09 |
alanp | I was having problems with the multiline comment regular expression | 22:09 |
tansell | alanp, It would be a good idea to fix these manually now :) | 22:09 |
alanp | Will do | 22:10 |
*** Greywhin1 has quit IRC | 22:10 | |
*** Greywhind has joined #tp | 22:10 | |
tansell | alanp, the plan was also that missile bays can carry a single torpedo while missile racks can carry n missiles | 22:10 |
tansell | actually it might be a good idea to rename the bays to tubes too :) | 22:11 |
tansell | the 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 shots | 22:12 |
alanp | :-) | 22:13 |
alanp | i just came up with a quick fix for the comments I believe | 22:13 |
tansell | off to lunch | 22:18 |
tansell | bblr | 22:18 |
tansell | back | 23:11 |
tansell | cherez, ping? | 23:17 |
cherez | tansell: Pong. | 23:18 |
tansell | cherez, so coverage should work with self.assertRaises | 23:18 |
cherez | Well, according to coverage no exceptions are raised in the unit tests. | 23:21 |
cherez | But assertRaises passes. | 23:21 |
tansell | cherez, I think it must be the way you are using coverage | 23:28 |
cherez | Doh! | 23:39 |
llnz | alanp: you don't need _num-components, as that is added automatically to every component | 23:41 |
cherez | Why does the API differ in just one function. :( | 23:42 |
*** bddebian has quit IRC | 23:46 | |
*** jmtan has joined #tp | 23:54 | |
*** jmtan has quit IRC | 23:57 | |
*** jmtan has joined #tp | 23:57 |
Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!