*** tpb has joined #tp | 00:00 | |
*** ChanServ sets mode: +o tpb | 00:00 | |
*** jnengland77 has quit IRC | 00:11 | |
*** epyon-sakura has joined #tp | 00:16 | |
*** epyon-sakura has quit IRC | 00:35 | |
tansell | StupidIncarnate, ping? | 00:53 |
---|---|---|
StupidIncarnate | ya? | 00:54 |
StupidIncarnate | tansell: pong | 00:54 |
tansell | student survey | 00:54 |
StupidIncarnate | what about it? | 00:54 |
StupidIncarnate | tansell: is that a reminder, or did my submission not go through? | 01:01 |
tansell | oh wait, it's because you don't have a mid-term survey | 01:02 |
StupidIncarnate | tansell: So all good then? | 01:05 |
tansell | yes | 01:06 |
StupidIncarnate | what's left, just submitting the code? | 01:06 |
tansell | I believe so | 01:13 |
*** mithro has joined #tp | 01:35 | |
ezod | mithro: ping | 02:09 |
*** epyon-sakura has joined #tp | 02:09 | |
ezod | glew: ok everything looks good | 02:22 |
ezod | i think i will go over your client-side code more intensely sometime in the near future, it would be great if you could help :) | 02:23 |
glew | ezod: ok, great, I'll stick and you can always contact me by email too, but I'll try to be on irc too | 02:23 |
ezod | cool | 02:23 |
ezod | there's a few things that need doing still on the client side, and a few things i personally think should be changed/improved | 02:24 |
ezod | once we get past that, it would be awesome if you could stick around and work on scenarios and campaigns :) | 02:24 |
glew | ezod: i'd like to try to work some more on scenarios and campaigns, I tried editing a savefile again, but i think with recent changes to things, they didn't work out so well | 02:33 |
glew | so i'd like to work on them with more time | 02:33 |
*** StupidIncarnate has quit IRC | 02:40 | |
tansell | ezod, pong? | 03:08 |
*** StupidIncarnate has joined #tp | 03:14 | |
*** epyon-sakura has quit IRC | 03:42 | |
*** glew has quit IRC | 03:53 | |
*** epyon-sakura has joined #tp | 04:13 | |
*** epyon-sakura has quit IRC | 04:19 | |
*** epyon-sakura has joined #tp | 04:24 | |
llnz | bbl | 04:32 |
*** llnz has quit IRC | 04:32 | |
*** epyon-sakura has quit IRC | 05:25 | |
*** Linkadmin has quit IRC | 05:54 | |
*** alanp has quit IRC | 05:54 | |
*** Linkadmin has joined #tp | 05:54 | |
*** alanp has joined #tp | 05:55 | |
*** cahirwpz has joined #tp | 06:31 | |
*** bisc has joined #tp | 06:43 | |
bisc | tansell: ping | 06:45 |
tansell | bisc, pong | 07:21 |
tansell | bisc, don't forget to submit your student eval | 07:21 |
bisc | tansell: submitted it yesterday. Wanted to remind you about your eval :) | 07:23 |
tansell | yeah, all done | 07:23 |
tansell | cahirwpz, ping? | 07:23 |
cahirwpz | tansell, pong | 07:23 |
*** llnz has joined #tp | 07:24 | |
cahirwpz | tansell, I'm just writing the evaluation | 07:24 |
tansell | okay great | 07:24 |
bisc | tansell: about information panel -- my version looks like this http://ruchkin.files.wordpress.com/2010/08/info-panel-new.png | 07:26 |
tpb | <http://ln-s.net/7V3v> (at ruchkin.files.wordpress.com) | 07:26 |
tansell | bisc, looks good | 07:27 |
bisc | I've closed orders frame so that whole information panel is seen | 07:27 |
tansell | yeah, I see | 07:28 |
bisc | tansell: in this version, wrapping is applied when labels are changed. I tried implementing wrapping labels on resize of panel, but there's one problem. When I catch EVT_SIZE and do nothing, the panel doesn't resize and becomes broken | 07:28 |
tansell | bisc, oh? | 07:29 |
bisc | tansell: do you know how to make a wxwindow handle EVT_SIZE even after I catch it? evt.ResumePropagation doesn't help | 07:29 |
tansell | it should already work in theory | 07:29 |
bisc | tansell: strange, but it isn't resized and repainted. Like I deleted EVT_SIZE standard handler. | 07:30 |
tansell | bisc, your not getting an exception or something? | 07:31 |
bisc | tansell: no. Maybe I'm affected with imperfect FoldPanelBar implementation... | 07:32 |
bisc | tansell: anyway, this is about doing something with EVT_SIZE. We postpone it and stay with what I have now. Please see code of last patch here http://codereview.mithis.com/59001 | 07:33 |
tpb | Title: Issue 59001: Information panel: improving buttons. - Code Review (at codereview.mithis.com) | 07:33 |
bisc | We can postpone it * | 07:33 |
bisc | tansell: I had to delete SetVirtualSize call in panelnformation constructor because FoldPanelBar.GetPanelsLength gives unreasonable results the -- something like (1,0) | 07:37 |
bisc | there * | 07:37 |
tansell | cahirwpz, so where are we at? | 07:39 |
bisc | tansell: I dunno where this number 350 comes from :) I've never done any changes to velocity. Possibly, I messed up git. Will correct it now. | 07:41 |
tansell | okay | 07:47 |
cahirwpz | tansell, I removed logctx stuff yesterday | 07:48 |
cahirwpz | and finally fixed tests | 07:48 |
tansell | let me have a look | 07:48 |
tansell | cahirwpz, the tests still don't look much like tests | 07:53 |
cahirwpz | umm... what do you mean ? | 07:54 |
bisc | tansell: have a look at the latest patch http://codereview.mithis.com/59001 | 08:00 |
tpb | Title: Issue 59001: Information panel: improving buttons. - Code Review (at codereview.mithis.com) | 08:00 |
tansell | does this look like a test to you? http://pastebin.com/iJpv9sP6 | 08:01 |
tpb | Title: Python | class GetExistingCategory( Get - Anonymous - iJpv9sP6 - Pastebin.com (at pastebin.com) | 08:01 |
cahirwpz | tansell, yes... a test without boiler plate code, the common code was extracted and moved to the set of classes from which the test is derived | 08:03 |
cahirwpz | tansell, isn't that a common practice to put boiler plate code into a class, parametrize it, and inherit from that class? | 08:03 |
tansell | cahirwpz, yes - but you have totally hidden it | 08:04 |
cahirwpz | I hid the code that repeats | 08:07 |
cahirwpz | tansell, so how in your opinion this code should look like ? | 08:07 |
tansell | see the examples in http://docs.python.org/library/unittest.html | 08:08 |
tpb | Title: 25.3. unittest — Unit testing framework Python v2.7 documentation (at docs.python.org) | 08:08 |
*** bisc has quit IRC | 08:10 | |
tansell | class TestSequenceFunctions(unittest.TestCase): | 08:11 |
tansell | def test_shuffle(self): | 08:11 |
tansell | self.assertEqual(self.seq, range(10)) | 08:11 |
cahirwpz | if it was so easy I'd put many test into a single class ;-) | 08:11 |
tansell | something like that | 08:11 |
cahirwpz | the problem is that in most cases tests are not a code that executes sequentially | 08:12 |
cahirwpz | generators give an illusion of sequential execution | 08:12 |
tansell | cahirwpz, sure they are - you do X then you check Y | 08:13 |
cahirwpz | did you read TestSession class ? | 08:13 |
cahirwpz | http://github.com/cahirwpz/tpserver-py/blob/gsoc2010/tests/common.py | 08:15 |
tpb | <http://ln-s.net/7V4e> (at github.com) | 08:15 |
cahirwpz | TestSession class enables you to write test cases in form of a generator | 08:16 |
tansell | why do you want to do that? | 08:16 |
cahirwpz | instance of this class should not be used to establish connection more than once | 08:18 |
cahirwpz | every test case is derived from this class | 08:18 |
cahirwpz | (excluding those in tests.testcases.action) | 08:19 |
tansell | cahirwpz, I don't understand this sentence "instance of this class should not be used to establish connection more than once" | 08:20 |
cahirwpz | ok, every test case does a few steps inside runTest method | 08:21 |
cahirwpz | it's not explicit because things are done behind curtains - in twisted.reactor | 08:21 |
tansell | For the test you want to do the following things | 08:22 |
tansell | a) connect to the server | 08:22 |
tansell | b) possible log in | 08:22 |
tansell | c) send a request | 08:22 |
tansell | d) check the response | 08:22 |
cahirwpz | reactor is asked to establish a connection and is given a class (exactly the test case class) to handle the connection | 08:23 |
cahirwpz | tansell, I agree, these are steps that are performed, but asynchrony make it harder to see it in the code | 08:24 |
cahirwpz | you can not just receive a packet | 08:24 |
cahirwpz | TestSession is called, when a packed is received by a reactor | 08:24 |
tansell | cahirwpz, it's really simple | 08:25 |
tansell | sendPacket(a) | 08:25 |
tansell | while not a = recvPacket(): pass | 08:25 |
tansell | check(a) | 08:25 |
cahirwpz | ... | 08:25 |
cahirwpz | you cannot do recvPacket | 08:25 |
cahirwpz | if you don't understand it you should carefully read Twisted introduction | 08:26 |
tansell | sure you can | 08:26 |
cahirwpz | you can, but not in Twisted | 08:27 |
tansell | http://pastebin.com/yGNwxw3U | 08:28 |
tpb | Title: Python | class MyReactor(twisted.reac - Anonymous - yGNwxw3U - Pastebin.com (at pastebin.com) | 08:28 |
tansell | simple | 08:29 |
cahirwpz | I don't believe it has any chance to work | 08:30 |
cahirwpz | http://twistedmatrix.com/documents/current/core/howto/clients.html | 08:30 |
tpb | <http://ln-s.net/76E4> (at twistedmatrix.com) | 08:30 |
tansell | cahirwpz, did you look at my pastebin? | 08:32 |
cahirwpz | yes | 08:32 |
tansell | nothing in that documentation seems to indicate what I just suggested won't work | 08:33 |
cahirwpz | twisted.reactor does not call recvPacket method | 08:33 |
tansell | why not - it's just a method | 08:34 |
cahirwpz | well... it's not written to call it | 08:35 |
cahirwpz | it can only call methods of IProtocol interface | 08:35 |
tansell | so replace recvPacket with recvData | 08:36 |
cahirwpz | provided that ITransport was created as a call to reactor.connectTCP | 08:36 |
cahirwpz | you have to feed reactor with a class of interface IProtocol | 08:36 |
tansell | take a look at 'Simple, single-use clients' | 08:37 |
cahirwpz | to cooperate with twisted.reactor properly you need to create at least two classes one derived from ClientFactory, the second from Protocol | 08:38 |
cahirwpz | the chapter you gave is the worst twisted usage I've ever seen ;-) | 08:39 |
cahirwpz | http://github.com/cahirwpz/tpserver-py/blob/gsoc2010/tp/server/protocol.py | 08:40 |
tpb | <http://ln-s.net/7V4w> (at github.com) | 08:40 |
cahirwpz | note that sendPacket is not a method of IProtocol interface | 08:40 |
cahirwpz | it's just a helper function to wrap access to self.transport | 08:40 |
tansell | http://pastebin.com/frLYncjn | 08:41 |
tpb | Title: Python | from twisted.internet import r - Anonymous - frLYncjn - Pastebin.com (at pastebin.com) | 08:41 |
tansell | I have to go now | 08:43 |
cahirwpz | reactor.runOnce does not exists | 08:43 |
cahirwpz | and there's no similar method | 08:43 |
tansell | I don't know what it's called - but it must exist otherwise twisted can't intergrate with other systems which have a mainLoop | 08:44 |
cahirwpz | you just run it forever | 08:44 |
cahirwpz | tansell, you're correct | 08:44 |
cahirwpz | twisted implements it's own mainLoop | 08:44 |
tansell | worse comes to worse just dump it into a thread | 08:45 |
cahirwpz | however it can reuse mainLoop mechanisms from qt, wx, etc... | 08:45 |
cahirwpz | tansell, look... following patterns from logging module is the standard way you use to implement logging in python application, the same with unittest for testing | 08:47 |
cahirwpz | why you want to make Twisted use other way it was meant to use ? | 08:47 |
tansell | because your current way makes the tests unreadable | 08:49 |
tansell | it appears that there is a | 08:50 |
tansell | reactor.doIteration() | 08:50 |
tansell | and a reactor.runUntilCurrent | 08:51 |
cahirwpz | that's not the way you use reactor | 08:51 |
cahirwpz | the methods you mentioned are low-level mechanism that shouldn't be used by application code | 08:51 |
cahirwpz | I cannot do anything about asynchronous code being less comprehensive | 08:52 |
tansell | cahirwpz, tests need to be comprehensible otherwise they are useless | 08:54 |
cahirwpz | tansell, that's why I implemented test scenarios using generators that offer simplified illusion of a synchronous code | 08:55 |
cahirwpz | http://github.com/cahirwpz/tpserver-py/blob/gsoc2010/tests/testcases/basic.py | 08:56 |
tpb | <http://ln-s.net/7V5C> (at github.com) | 08:56 |
cahirwpz | that'd be a better example: | 08:57 |
cahirwpz | http://github.com/cahirwpz/tpserver-py/blob/gsoc2010/tests/testcases/protocol.py | 08:57 |
tpb | <http://ln-s.net/7V5D> (at github.com) | 08:57 |
cahirwpz | if not the TestSession class you would have to deal with asynchronous code | 08:58 |
cahirwpz | but TestSession class has its own limitations - its instance cannot be used with more than one connection | 08:59 |
* llnz wanders off | 08:59 | |
llnz | later all | 08:59 |
*** llnz has quit IRC | 08:59 | |
cahirwpz | each time you make a connection you need to create its instance | 08:59 |
tansell | how about http://pastebin.com/tRLcSPJK | 09:02 |
tpb | Title: Python | class SameSequenceInHeader( Te - Anonymous - tRLcSPJK - Pastebin.com (at pastebin.com) | 09:02 |
cahirwpz | as long as there's only one "test.*" method in a class it would work | 09:04 |
tansell | cahirwpz, thats getting closer - I'm still not happy but it's a step in the right direction | 09:05 |
tansell | anyway I have to go now | 09:07 |
tansell | (well I had to go 30 minutes ago) | 09:07 |
cahirwpz | tansell, did you complete the evaluation ? | 09:08 |
tansell | yes | 09:08 |
cahirwpz | great :) | 09:08 |
tansell | gone. | 09:09 |
*** mithro has quit IRC | 09:12 | |
cahirwpz | bye | 09:12 |
*** StrangerDanger has quit IRC | 10:05 | |
*** StrangerDanger has joined #tp | 10:06 | |
*** epyon-sakura has joined #tp | 11:55 | |
*** epyon-sakura has quit IRC | 12:25 | |
*** Greywhind has quit IRC | 12:26 | |
*** Greywhind has joined #tp | 13:08 | |
*** StupidIncarnate has quit IRC | 13:19 | |
CIA-27 | Krystian Bacławski gsoc2010 * rc5ab3c6 / (17 files in 2 dirs): Major tests refactoring. - http://bit.ly/9mVlpT | 13:53 |
tpb | Title: Commit c5ab3c6534a895a40ddf95503ff003c664eebead to cahirwpz's tpserver-py - GitHub (at bit.ly) | 13:53 |
CIA-27 | Krystian Bacławski gsoc2010 * r723d55d / (8 files in 2 dirs): Introduced GetItemWithIDSlot test template. - http://bit.ly/bjcF6a | 15:14 |
tpb | Title: Commit 723d55df3eaf6aa4a7d61776bb6ab20746079a45 to cahirwpz's tpserver-py - GitHub (at bit.ly) | 15:14 |
*** StupidIncarnate has joined #tp | 16:10 | |
*** StupidIncarnate has quit IRC | 16:11 | |
*** glew has joined #tp | 16:49 | |
*** StrangerDanger has quit IRC | 16:56 | |
*** StrangerDanger has joined #tp | 16:56 | |
*** glew has quit IRC | 17:11 | |
*** glew has joined #tp | 17:15 | |
*** cahirwpz has quit IRC | 18:06 | |
*** Greywhind has quit IRC | 21:01 | |
*** Greywhind has joined #tp | 21:39 | |
*** jnengland77 has joined #tp | 23:31 | |
*** konr has joined #tp | 23:39 | |
konr | Out of curiosity: do you think that it's interesting to create an Emacs client of TP? Would that be a likely candidate for GSoC 2011? | 23:40 |
konr | I've been wanting to participate on the project for quite a while, but never had an idea as sexy as this :D | 23:41 |
*** epyon-sakura has joined #tp | 23:59 |
Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!