Help Logs Database

Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Ircnet  |  Dalnet
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27

<james-_> binrapt: I don't always use them, but storing to a member variable is a bigger deal than writing to a local -- it persists after the function ends, obviously. It can just make things easier to read.
<binrapt> Notice the...void!
<binrapt> Hmm
<khaladan> well, that's what i'm calling my accessor functions, so i need some other character
<james-_> That's one more reason for a prefix... avoids wasting nice names that should be part of the interface.
<JeffK> get n set is common
<JeffK> getBle() and setBle()
<JeffK> bummer ordinary c++ doesnt have properties
<JeffK> which encapsulates the getters n setters
<khaladan> you can emulate properties in c++
<james-_> JeffK: and they drive people away from decent designs... making people think of objects as blobs of data...
<JeffK> oh really? tell me please
<khaladan> google for c++ properties
<JeffK> oki
<dehoy> i dont like properties
<khaladan> i love them. it makes accessing information uniform
<khaladan> you don't have to update client code if you decide something should be a calculated value
<_nx> james-_, but objects ARE blobs of data, plus ***ociated functionality.
<james-_> khaladan: it's uniform for me; object.function(args);
<khaladan> james, so you write accessors for everything?
<james-_> nx: objects are functionality, implemented using blobs of data. The emphasis matters.
<kawfee> hello
<james-_> khaladan: anything I want to expose, almost always.
<khaladan> james, then yes, i agree, in that case it is uniform
<khaladan> another benefit of accessors
<JeffK> accessors can check tehvalues before returning
<james-_> And they can check invariants, if you're paranoid.
<james-_> Say, if a programmer in your team tends to scribble over memory and you don't have decent tools to detect it.
<JeffK> yes, mike does that all the time
<ZorbaTHut> we had a glitch like that in the game I worked on.
<ZorbaTHut> took forever to track it down.
<ZorbaTHut> stupid PS2 architecture.
<_nx> only one glitch?
<ZorbaTHut> nx, only one of that sort.
<JeffK> bufer overrun?
<ZorbaTHut> jeffk, I wish
<james-_> It also catches dangling pointers.
<ZorbaTHut> turned out to be a hardware bug
<james-_> Sometimes.
<ZorbaTHut> the PS2 occasionally loses a byte or two when you switch memory banks
<ZorbaTHut> PS2 memory banks are 32mb large, and the PS2 only *has* 32mb, so usually it's not a problem
<_nx> Last game I worked on had at least 30-40 of those bugs, although honestly most of them had no symptoms and were only detected through code analysis tools.
<ZorbaTHut> but the dev system has 128mb, but the same bug
<JeffK> hmm, what tools do you use to write ps2 games?
<JeffK> gcc?
<_nx> codewarrior?
<ZorbaTHut> jeff, Sony provides a development kit, which is basically a GCC cross-compiler and linker and some libraries.
<ZorbaTHut> the dev PS2s have the ability to be logged into remotely and have data streamed to them over the network, so you just plug them into the LAN and run games across that
<ZorbaTHut> no disc burning until you're trying the test stations, which are just real PS2s with the copy protection disabled.
<ZorbaTHut> those are a ***** to debug.
<JeffK> bummer i dont own a ps2, i at least would do a tetris or breakout clone, if it wastn too hard on that machine
<ZorbaTHut> if you want to do console development, homebrew GBA development is mature and easy
<ZorbaTHut> DS development, not quite so much, but getting closer
<ZorbaTHut> the consoles are a bit nastier, but I imagine they're doable also by now. just that emulators don't generally work as well for the full-scale consoles yet.
<_nx> the OSS media center for XBox looks better than the Microsoft version =(
<GenNMX> There's also the Gamepark32 Handheld, which has a lot more power, possibilities, and support then the GBA.
<JeffK> hmm, if i wanto create a 3d model in 3ds studio max, are there tools to convert them to a ps2 compatible format?
<GenNMX> But you'd have to import the handheld from either Europe or Korea (the firmware and community is still primarily in English)
<khaladan> mmm yay for boost.signals
<JeffK> dirct3d got this 3d model format, uhm, dont nknow the file extension anymore, does a pendant for ps2 exist, or am i thinking the totally wrong way?
<_nx> d3d's "3d model format" is just there as a sample.
<_nx> and that's .x
<_nx> every real game just makes their own format
<_nx> (or the format of the engine they're using)
<JeffK> oh, so i have to use raw custom mesh data then ?
<_nx> you can start with .x
<JeffK> my own jeffk-crap-format
<_nx> but you'll outgrow it
<khaladan> hrm i wish there was something that'd figure out the minimal set of include files needed given a source file and its current includes
<james-_> khladan: it's far from trivial; you could easily make a set that would work, but would fail to work if you made an edit to a header.
<JeffK> i once made a tool that checked the source file and produced a string to be inserted in it to include all the headers
<james-_> Also changing which headers you include can (unfortunately) change the meaning of code from one valid program to another.
<JeffK> hmm, rite, dll1 can have function Ble() and dll2 can have it too with different code behind it
<JeffK> thats why i like strong typed ***emblys
<JeffK> .net is ****n slow butt enough for most desktop applications, and even dumb***es can write working professional looking programs
<james-_> Dumb***es just can't write reliable code.
<james-_> C++ version 2?!
<_nx> sure, someday
<james-_> What would you call "C++ version 2"?
<JeffK> at least ther eis c++ with managed extensions
<james-_> I mean, what do you mean by the term.
<khaladan> do you mean c++0x?
<JeffK> mixed native an .net code
<james-_> JeffK: Managed C++, that's being replaced by C++/CLI?
<_nx> When someone writes a new language which is good and useful while preserving the ideals of C++, I'll call that version 2.
<khaladan> (or c++1x huhu)
<james-_> nx: look into Felix for fun.
<_nx> Felix hmm
<james-_> khaladan: C++0x is likely to be C++09. Feature frozen in 2007 is the plan.
<JeffK> managed c++ means c++ that can use either native code or c++ under supervision of the clr
<_nx> james-_, wow
<james-_> nx: Not the same as C++, but links smoothly with C++ code.
<james-_> JeffK: Managed C++ is a specific language, and I know what it is, and that it's being replaced...
<_nx> james-_, yeah, I want something as tight and efficient as C++, but, y'know, minus the warts and maybe plus some nice features if they can be had cheaply.
<binrapt> for(auto i = string.begin(), end = string.end(); i != end; ++i); // \o/
<JeffK> james- i never heard of the fact managed c++ would be replaced, replaced with waht?
<_nx> And it had better keep the ideals of, "pay only for what you use", and, "principal of least suprise"
<_nx> hmm now, Felix...
<james-_> JeffK: As I said, a language called C++/CLI.
<_nx> http://felix.sourceforge.net/ ?
<james-_> nx: but note: Felix does have mandatory garbage collection still.
<james-_> nx: that's the one. John Skaller's creation.
<JeffK> well imho it sounds like the same, but maybe i am wrong, managed c++ and c++/cli are often used to mean the same thing i think
<_nx> james-_, out of curiosity, what do you think of D?
<binrapt> I think he said something positive about it
<james-_> JeffK: Managed C++ has lots of __ugly keywords with underscores, C++/CLI is quite different.
<binrapt> Was it...'neat'?
<JeffK> james- i better read some stuff about it before i talk more **** ;), maybe i didnt get some important things about it
<noam_> D is a nice language. it built into itself many C++ idioms, such as mixins
<james-_> nx: D is OK, not so very different from Java or C# though, and it's odd that Walter's reasons for the differences between C++ and C often indicate that either he doesn't understand the rationale for C++'s choices, or he chooses to ignore it for marketing reasons.
<noam_> and it has unnamed functions, which pwnz
<james-_> C++/CLI integrates generics with templates, and has STL.NET. Clever stuff.
<_nx> james-_, hmm, yeah. When I first heard about it and read through their docs I got a bad taste in my mouth.
<JeffK> oh, grabbed the wrong book, its about naked chicks, well, im out for now, got important things to read ;)
<kawfee> explain char *val[32];
<kawfee> !explain char *val[32];
<_nx> * JeffK has quit IRC (fap, fap, fap)
<kawfee> where is that silly bot
<james-_> kawfee: download and build cdecl, why not...
<binrapt> An array of 32 char *?
<kawfee> that's what I thought
<_nx> yes
<james-_> Correct.
<noam_> what is C++/CLI?
<kawfee> so it's 32 pointers?
<khaladan> explain 32[val]
<james-_> noam: Microsoft's second attempt to marry C++ with the .NET world.
<binrapt> Apparently
<noam_> ah.
<binrapt> Did C++ say 'yes' at the wedding?
<_nx> C++ is promiscuous
<noam_> how can you integrate c# generics with c++ templates? c++ templates are compile-time thingies, while .net generics work in runtime, as i've read in one of herb sutter's articles
<james-_> noam: their vector is a template, but has a .NET generic as a base cl*** or something.
<james-_> And so on for other things.
<noam_> i won't pretend i understood that
<jakl> hi, im using a c++ library in my code for some stuff. i call that library by doing tnc(parameters...function..etc). My problem is that i tried to use that function in my cl*** and i get this error :
<jakl> planning.cpp:170: error: argument of type `int (PoolMaster::)(double*, double*, double*, void*)' does not match `int (*)(double*, double*, double*, void*)'
<[eloi]> apropos callback
<CalcMe> found: "callback" "member callback" "member_callback" "member_callback use"
<[eloi]> calc member callback
<CalcMe> member callback = You must always call a nonstatic cl*** method using obj.func() or ptr->func(), but a C-style callback mechanism just calls func() -- there is no way to get C to call a method of a C++ object. See "calc callback" for information on alternatives. See also http://www.function-pointer.org/CCPP/callback/callback.html#member
<[eloi]> calc callback
<CalcMe> callback = Callbacks in C++ - The OO Way - http://www.elitecoders.de/mags/cscene/topics/misc/cs7-04.xml.html - For an alternative aproach (templates), see http://www.tutok.sk/fastgl/callback.html . see also other callback links from http://www.newty.de/links.html .
<jakl> hmm k
<[eloi]> as i recall, those URLs are horribly out of date
<[eloi]> calc member_callback


Return to c++
or
Go to some related logs:

wireless
politics
suse SSH Brute-Force Attacken
beginner

Copyright © 2005 www.irclogs.ws. All rights reserved. » disclaimer » contact