Sunday, 2007-12-16

*** tpb has joined #tp00:00
*** ChanServ sets mode: +o tpb00:00
mithrollnz: any luck?01:22
*** zzorn has joined #tp01:49
mithrohey zzorn01:50
*** llnz2 has joined #tp01:59
mithroweb llnz01:59
mithroany luck with your computer?01:59
*** JLP has joined #tp02:10
*** llnz has quit IRC02:11
*** llnz2 is now known as llnz02:11
llnzseems to be much better02:12
mithroany idea what was causing the problem?02:19
*** nash_ has quit IRC02:25
*** xdotx has joined #tp03:20
* xdotx lives!03:21
llnzhi xdotx03:22
xdotxhey llnz03:23
llnzhow is it going?03:40
mithrohey xdotx03:42
mithrolong time no see03:42
xdotxhey mithro. say, you wouldn't happen to have any beginning python tutorial recommendations, would ya?03:44
mithroxdotx: sure!03:44
xdotxpreferably one for an experience programmer03:44
mithroif you hang around long enough you can also ask greywhind03:44
xdotxllnz: school was moderately brutal this semester03:45
xdotxjust got done, glad to be on break. hope i passed math :P03:45
xdotxmithro: i love and hate the indent-matters concept03:46
mithrohttp://www.diveintopython.org/03:46
tpbTitle: Dive Into Python (at www.diveintopython.org)03:46
mithrothat is generally well recieved03:46
xdotxi was toying with learning more perl, but then look a comparative look at python and perl and opted just to focus on python03:48
xdotxi don't generally like the TIMTOWTDI03:49
mithroTIMTOWTDI?03:49
xdotxthere is more than one way to do it03:50
llnzmithro: turn 126, all ai still running03:57
mithrollnz: how is the universe03:58
mithro?03:58
llnz500 system03:58
llnzone player is just about out03:58
mithrollnz: I don't think you see most of the remaining bugs untill you have over 1500 systems04:10
llnzwhat bugs?04:10
mithrothe once which reset you back to zero :P04:12
llnzi have no idea what caused that one04:12
*** peres has joined #tp04:36
mithrowould be good to track down06:11
mithroxdotx: did you have a look at dive into python?06:12
llnzmithro: it might be there is nothing to track down06:12
mithrollnz: you mean that it could have been your computers?06:17
*** peres has left #tp06:17
llnzcould have been06:17
llnzbut i could also had been guile's GC getting into the wrong things, or there could actually be an error06:18
mithrohence why we need to run with bigger tests?06:19
llnzmaybe06:25
llnzdebugging becomes a little hairy, especially with the ai's sitting at 100% cpu06:25
llnzand being unable to track back where the problem happened06:26
mithrojust nice the ai's back to lower level?06:34
llnzthe issue is more overheating my cpus06:34
mithroand why are the AI sitting at 100%?06:35
llnzdon't know, if i notice again i'll check06:35
mithrookay06:43
CIA-11mithro tpclient-pywx-development * r591b03017662 /windows/main/panelOrder.py: Fixed an exception in the cache update.07:28
CIA-11noegnud tpclient-pywx-development * rfcfe29c0a8ee /windows/main/overlays/ (Proportional.py Resource.py):07:28
CIA-11Implemented Resources overlay to the point of drawing white circles whose07:28
CIA-11sizes correspond to the total amount of resources in a system. These will07:28
CIA-11be converted to pie charts later.07:28
CIA-11noegnud tpclient-pywx-development * r292e47410c15 / (5 files in 3 dirs):07:28
CIA-11Changes merged from wxFloatCanvas for PieChart, modified Resource overlay07:28
CIA-11to use PieChart and display correctly. Still needs some tweaking.07:28
CIA-11noegnud tpclient-pywx-development * rd5b58a5fd8af /extra/wxFloatCanvas/Utilities/Colors.py: Added Colors.py as a tracked file.07:28
CIA-11noegnud tpclient-pywx-development * r3b22a2c1ef86 /windows/main/overlays/ (Proportional.py Resource.py):07:28
CIA-11Improved look of resources overlay, added ability to select single resource07:28
CIA-11types from a list to view rather than all at once.07:28
CIA-11noegnud tpclient-pywx-development * rc04998ec3653 / (5 files in 3 dirs):07:28
CIA-11Popups now working for Resource overlay. They display information on the07:28
CIA-11resources in the system, either in total or for a specific resource.07:28
mithrodunno what I did, but somehow with git-rebase it turned http://mithro.dyndns.org/~tim/Screenshot.png into http://mithro.dyndns.org/~tim/Screenshot-1.png07:34
*** remaxim has joined #tp07:41
remaximhi07:41
*** llnz2 has joined #tp08:09
CIA-11noegnud tpclient-pywx-development * r01226c0d42ff /windows/main/overlays/ (Proportional.py Resource.py):08:12
CIA-11Implemented Resources overlay to the point of drawing white circles whose08:12
CIA-11sizes correspond to the total amount of resources in a system. These will08:12
CIA-11be converted to pie charts later.08:12
CIA-11noegnud tpclient-pywx-development * rd1c3d8ce8fb6 / (12 files in 4 dirs): Merge with development branch.08:12
CIA-11mithro tpclient-pywx-development * rbba530e16d60 /tpclient-pywx: Merge with git://git.thousandparsec.net/git/tpclient-pywx.git#development08:12
CIA-11noegnud tpclient-pywx-development * ra280ec9a112c / (4 files in 3 dirs): Merge with development branch.08:12
CIA-11noegnud tpclient-pywx-development * rc0edbb773ca4 / (5 files in 3 dirs):08:12
CIA-11Changes merged from wxFloatCanvas for PieChart, modified Resource overlay08:12
CIA-11to use PieChart and display correctly. Still needs some tweaking.08:12
CIA-11noegnud tpclient-pywx-development * rdd0c329e6b33 /extra/wxFloatCanvas/Utilities/Colors.py: Added Colors.py as a tracked file.08:12
CIA-11noegnud tpclient-pywx-development * re054ab920a15 /windows/main/overlays/ (Proportional.py Resource.py):08:12
CIA-11Improved look of resources overlay, added ability to select single resource08:12
CIA-11types from a list to view rather than all at once.08:12
CIA-11noegnud tpclient-pywx-development * rcd1c54cdbab3 / (5 files in 3 dirs):08:12
CIA-11Popups now working for Resource overlay. They display information on the08:12
CIA-11resources in the system, either in total or for a specific resource.08:12
CIA-11mithro tpclient-pywx-development * r69673b3f3c12 / (9 files in 4 dirs): Merge with git://git.thousandparsec.net/git/tpclient-pywx.git#incoming08:12
*** llnz has quit IRC08:26
*** mithro has quit IRC08:43
remaximis anyone here?09:35
remaximok... bye09:36
*** remaxim has left #tp09:36
zzornhi10:13
*** Epyon has quit IRC10:44
*** peres has joined #tp10:49
*** JLP has quit IRC10:54
*** peres has quit IRC11:09
*** zzorn has quit IRC11:10
*** Epyon has joined #tp11:37
*** remaxim has joined #tp12:48
remaximhi12:48
remaximis any coder in here?12:58
remaximjust wondering if TP has sound support12:59
*** zzorn has joined #tp13:48
*** remaxim has left #tp15:38
*** nash has joined #tp16:23
*** mithro has joined #tp16:52
*** nash has quit IRC17:19
*** mithro has quit IRC17:23
*** mithro has joined #tp17:36
mithromorning people17:37
mithrohrm, no nash17:38
*** nash has joined #tp18:32
*** Demitar has quit IRC18:39
*** Demitar has joined #tp18:45
mithromorning nash19:19
mithroyou are in late today?19:19
nashmithro: No, just had to reboot.19:31
nashMy first login was about 8:3019:31
mithronash: how goes everything?19:37
nashBusy busy busy crazy19:38
xdotxmithro: btw, python is cool as hell19:39
mithroxdotx: so, you are doing to port RFTS to tpserver-py!?19:40
xdotxmithro: and thanks for the site. was up reading it all night19:40
xdotxhahah19:40
mithroprobably only take you a week really :)19:40
xdotxmithro: don't have -that- kind of free time + python knowledge19:40
mithrogood python learning python experiance19:40
xdotxmithro: i've got some ideas for python practice19:41
mithrotpserver-py is a pretty nice piece of python - uses a large amount of it's power19:41
mithroxdotx: if you are thinking of writing games, I would recommend checking out pyglet19:41
mithrokind of a spiritual successor to pygame19:42
mithronash: now we just need to poke Fro again19:42
xdotxi'm thinking about implementing python in my (school) game for more flexible collision response19:43
mithroxdotx: embedding python?19:44
mithroif you are pressed for time, Lua is probably a little easier to embed19:44
xdotxyeah, but "everybody's doing lua" i've never been one for taking the popular route19:45
xdotxboost has a very cool looking python binder19:45
mithroxdotx: yeah, I've been looking at that recently19:45
mithroit looks about as cool as C++ can be ;)19:45
xdotxlol19:46
xdotxboost has some drool-worthy stuff19:46
mithroxdotx: it does? most of it seems to be stuff which makes C++ a tiny bit more bearable19:46
xdotxboost factory, signal / function / bind. they're all very cool for C++19:46
mithroxdotx: I guess if you prepend the "for C++" bit it sounds about right ;)19:47
xdotxmithro: i see it as a way of showing that C++ can do all the "facy" stuff that "new" languages can do. which imho, just shows that C++ is better ;p19:47
mithroxdotx: in painful ways ;)19:48
mithrobtw, I believe there where some bugs found in RFTS19:48
xdotxmithro: but boost implements the painful part19:48
xdotxprobably!19:48
nash...because the one thing C++ needs is more features19:49
xdotxit does!19:50
xdotxi want templatized namespaces and a huge standard library... and template concepts, but we're getting those last two19:50
mithroI think we need a strongly ducked-typed language19:50
xdotxtemplates!19:51
xdotxmithro: template programming is essentially strongly duck typed19:51
mithroxdotx: I think you need to re-read what duck typing means19:51
xdotxwalks like a duck, must be a duck19:52
mithroxdotx: yes, not "is a vector"19:52
xdotxmithro: compilers can figure out the appropriate type (in limited cases) with templates19:52
mithroa python compiler could do some really cool static duck typing, it would be a bitch to write however19:53
nashxdotx: Personally I think we need another turing complete language buried in there.19:53
xdotxheheh19:53
* xdotx nods19:53
nashWe have the C preprocessor - #include __FILE__, we have templates which are turing complete in themselves19:54
nashMaybe a turing complete operator overloading19:54
xdotxexcellent idea! ;)19:54
nashSo you can get overloads to complete19:54
mithrooh, we also need double dispatch19:54
xdotxshh :(19:54
* nash ponders overloading exceptions a bit more19:54
xdotxmultiple dispatch in C++ is kinda lame19:55
mithrooh wait, why not just use lisp!?19:56
xdotxmithro: wait, python is strongly duck typed, right?19:56
mithroxdotx: yes, python is strongly typed (IE Python always knows the type of an object)19:57
xdotxk, phew.19:57
mithrounlike C++ where you need things like virtual for it to work properly19:58
mithroor C where you can cast something to a void*19:58
xdotxC++ is strongly typed19:58
mithroxdotx: nope, C++ appears to be strongly typed19:59
xdotx'eh? you must be implying strong typing requires run-time knowledge19:59
mithroxdotx: take a look at this example20:08
mithrohttp://cpp.pastebin.com/m31fd2d7b20:09
tpbTitle: cpp private pastebin - collaborative debugging tool (at cpp.pastebin.com)20:09
mithrotim@vaio:~$ g++ temp3.cpp20:09
mithrotim@vaio:~$ ./a.out20:09
mithroclass B20:09
mithroclass A20:09
mithroanyway, going to an early lunch20:09
mithrobblr20:09
nashHave fun20:10
mithro-Wall doesn't even give any errors in the above20:10
xdotxeh, that's still bad practice20:10
nashmoral is... Use C20:11
xdotxnash: gross :P20:11
xdotxC commonly requires even more potentially confusing things.20:13
nashxdotx: Oh yeah?20:14
nashC++ being (essentially) a superset of C, I'm not sure how you can make that argument with a straight face20:14
nashxdotx: And it doesn't have the most confusing things such as virtual, templates and general overloading20:15
xdotxnash: eh, just because you can use C syntax and methods doesn't mean there isn't "the C++ way" that makes it nicer20:15
nashOkay... so what conufing things are there in C, that you don't do in C++?20:16
xdotxnash: while potentially confusing, those things all take some of the work (and thus error prone and confusion) off of you20:16
xdotxvoid*s, no sense of public/private data20:17
nashxdotx: So I've heard.. generally I've seen that all non-trivial C++ programs add more load to the program20:17
nashxdotx: I'll ignore voids... real public/private data20:17
nashNon-exposure of interface, no inline functions in the header (normally) to infect application code with library implementation details20:18
xdotxhmm. you can and should define inlined functions in the source, and what do you mean by "add more load" and non-exposure of interface?20:20
nashs/program/programmer/20:20
nashMy mistake20:20
xdotxah20:21
nashAnd I should say maintainer ;-)20:21
nashWhich is my real argument20:21
nashC++ is easier to write then C...20:21
xdotxwhenever i'd have to work in C, i just find myself trying to implement C++ features at great cost20:21
nashThat is like saying when I write haskell I find myself trying to write prolog features at great cost...20:21
nashThat argument is "I can't do C well, thus C is bad"20:22
xdotxi've been one-upped by age on that one :P20:22
nashxdotx: Knowing hte syntax of a language != knowing how to program it20:22
nashxdotx: Which one?20:22
xdotxmm, no that's not my point.20:22
nashhaskell and prolog?20:22
* xdotx nods20:22
nashHaskell is as alive as ever20:23
nashProlog is still... well prolog...20:23
xdotxhaskell i didn't even recognize, prolog.. yeah.20:23
nashTo be fair haskell == functional.  Prolog == declarative20:23
xdotxk20:23
nashhaskell is _the_ major functional language20:24
nashxdotx: If you don't know haskell... go learn it20:24
nashSeriously20:24
nashTake you a week to get the basics and it _will_ improve you C, C++ and other language programming20:24
xdotxbut still, my point was, C has limited features that make some things dangerous and these features cannot be well implemented within the language20:25
xdotxnash: can do on the haskell20:25
nashxdotx: ;-)20:25
xdotxah, purely functional. fun20:26
nashxdotx: As I said... programming in haskell will improve your code.20:26
nashGood haskell programmers can write really neat C ;-)20:26
xdotxyeah, i could see that20:27
nashOne of the strengths of C is that it does not force a programming methodology down your throat.  OO is good, but how you do it is up to you.20:27
xdotxnash: <flamebait> yeah, but C++ does that part even better </flamebait>20:28
xdotx;P20:28
nashNo, C++ does force you to use OO.  It does force you to deal with overloads, it does force you to use it's string classes...20:29
nashThe directive of C++ is "thou shall use OO"20:29
nashThe directive of C is "try not to make too much of mess"20:30
xdotxoh, no way. the strings are convertable from char*s, no need to use them. and overloads are just good clean fun20:30
nashxdotx: See mithros example...20:31
xdotxbesides, you -can- use the C library if you want to avoid C++'s20:31
nashBut you missed my first one20:31
nashxdotx: Only if you want to get to parts of C++ the designer says you should not be able to use:20:32
nashmalloc() ;-)20:32
nashAny function taking or returning void* is not blessed in C++20:32
xdotxi use, by choice a pretty minimal amount of OO in my game architecture this year20:32
nashbut you have to use some20:32
xdotxeh, i don't have to, it's just the best tool for the job20:33
nashmithro: The definitive IO system uses overloads... sorry - can't avoid it20:33
* xdotx nods20:33
xdotxbut you -can- use cstdio20:33
nashxdotx: Print a pointer in cstdio in C++ portably...20:34
xdotxnash: uh oh, is %p not portable?20:34
nashOr more generically... use varargs in C++ portable using pointers20:34
nashIn C++... last I checked... no20:35
xdotxnash: it should just include the C header :/20:35
nashIt works (and will probably always will)20:35
nashxdotx: is this allowed in C++ :20:35
nashClassX *x;  x = (ClassX*)(void*)x?20:36
xdotxallowed? yes. discouraged? of course20:36
nashxdotx: And if you think you know the answer... you may want to check standards carefully20:36
xdotxoh nuts20:37
xdotxC style casting is discouraged anyways. which is also a confusing point of C20:37
nashWorks fine in C ;-)20:37
xdotxnash: but C++ lets you be explicit about your cast, and there have been many times the compiler has nicely noted to me that I made a mistake in my casting, that would be been -hell- to debug with runtime errors20:38
nashxdotx: Okay: printf("%p",x) -> va_arg(ap, (void*)) -> ???20:39
nashxdotx: Probably.. But then again C doesn't require so many casts as C++20:40
mithrowoot, I started and argument and then left for lunch :P20:40
nashIn C a cast generally means an unportable conversion20:40
mithronash: you know what I miss most in C? function overloads20:41
nashxdotx: The program we are working on at this moemnt has 8 casts in it.  4 can be removed... 12 man-months of development in C...20:41
nashmithro: You know what I hate most about most other languages?  Function overloads20:42
xdotxheheh20:42
* xdotx saw that coming20:42
nashmithro: As I said before... nice to write code using overloads.20:42
nashPITA to debug...20:42
nashWhich overloaded function is being called...?20:42
xdotxthe one that makes sense!20:42
xdotxlearn the rules before you play hard ball?20:43
nashxdotx: Most of my arguments about C++ boil down to that.20:43
nashC++ is a nice language to write in.20:43
nashIt's a bad language to maintain.20:43
xdotxhmm. i could easily agree and disagree with that20:43
nashAs a developer I spend more time maintain then writing.. so the best language is the language which is easiet to read20:44
mithronash: so python then? ;)20:44
xdotxnash: the one thing i definitely love about C is that it is very easy to see the asm behind it, and know exactly what's going on20:44
nashxdotx: Indeed20:45
mithromy biggest problem with Python is that writing reliable code is hard20:45
nashmithro: Could be worse... could be perl20:45
xdotxbut by the same token, you're very limited in the way you -can- express yourself. you're say, "this makes sense to me, and thus should be understood by the compiler"20:45
xdotxyou can end up having to write a lot more, and thus understand a lot more in order to maintain C, where a well developed C++ program is more flexible, making it easier to maintain20:46
nashxdotx: But what about.. this makes sense to me... does it make sense to the guy down the hall who needs to debug it on a different architecture using a different compiler to the one I'm using?20:46
xdotxnash: obey portability rules and good coding standards, and it should20:47
nashxdotx: Great theory ;-)20:47
nashxdotx: but you dtill haven't told me if %p is safe in C++20:47
xdotxnash: C++ allows you to be more explicit, which should make maintaining and understanding it's purpose easier20:47
xdotxheh20:48
xdotxnash: can i not brush that off to "you shouldn't need to know anyways" ? :P20:48
mithronash: in C, how do you do OO - say the stupid shape example where you have a triangle and square and just want to calculate the area without caring about which type of shape you are given?20:49
nashxdotx: It depends... if you want to brush it off as "you shouldn't need to know" you need to then argue that C++ can't be understood by mere-mortals.20:50
xdotxheheh20:50
nashAnd you need to drop your argument you can use <cstdio>20:50
nashxdotx: Two other questions.. can you pass a pointer to a) a function b) a method in C++ portably...20:51
mithronash: I guess you could use function pointers?20:51
xdotxi'll just drop the whole thing entirely :) i gotta eat, shower, and learn more python20:51
nashxdotx: :-)20:51
nashmithro: Yes20:51
nashmithro: Exactly the same as C++ ;-)  Just you need to do:20:51
*** shenki has joined #tp20:51
nashstrut shape { int (*area)(struct shape *) }20:52
xdotxnash: i gotta ask though, what do you mean "pass a pointer" ? what use is "a pointer"?20:53
nashxdotx: struct ecore_timer_add(double delay, int (*callback)(void *data), void *data);20:54
nashprintf("Printf is at %p\n",printf);20:54
nashxdotx: For real fun... is that printf legal C... if not... why not?20:55
mithroI hate the function pointer syntax in C20:55
mithro(well infact I hate the whole pointer syntax :P)20:55
xdotxmithro: it does take a little work, but it's not -that- bad20:55
nashmithro: You just can't read it... callback is a pointer to () a function taking (void *data) returning int20:56
mithroI could be evil and use a cpp macro :P20:56
xdotxright then left, starting at the identifier, obey the parens20:56
nashmithro: No, use a typedef20:56
* xdotx nods @ nash20:56
nashtypedef int (*TimerCallback)(void*);20:56
nashint ecore_timer_add(double delay, TimeCallback callback);20:57
nashSee - easy ;-)20:57
nashAnywya - lunch time20:57
nashtalk to you in a while20:57
mithro#define funcdef(name, rettype, ..) typedef rettype (*name)(..)20:57
mithroor something along those lines20:59
mithronash: I just don't find the pointer syntax intuitive21:03
*** mithro has quit IRC21:56
*** CIA-11 has quit IRC21:56
*** TBBle has quit IRC21:56
*** CIA-11 has joined #tp21:57
*** mithro has joined #tp21:57
*** TBBle has joined #tp22:03
*** Epyon has quit IRC22:06
*** Epyon has joined #tp22:06
mithroyay for non-well formed file formats which can't possible work22:06
*** Epyon has quit IRC22:25
*** Epyon has joined #tp22:27
nashBiggest feature I miss from C++ in C...23:46
nashIn C++ you can return an expression returning void....23:46
nashhence:23:46
nashvoid foo(int *x){23:46
nash...23:46
nashreturn free(something);23:46
nashwhich means you can do23:46
nashif (someerror) return free(somethingIalloced)l;23:47

Generated by irclog2html.py 2.5 by Marius Gedminas - find it at mg.pov.lt!