« first day (403 days earlier)      last day (4542 days later) » 

12:00 AM
Trust me, I had a few programs work on my machine but crash after homework submission in my day.
 
Warnings. Warnings everywhere. Warnings every time. TURN THE DAMN WARNINGS ON.
 
@CatPlusPlus I've ended up settling for SourceForge
 
@Potatoswatter Then what should I initialize it to?
 
The teacher on my C class wouldn't accept any assignment submission that failed to compile on GCC with -Wall -Werror.
 
SF sucks.
 
12:02 AM
What's wrong with SF?
 
@Moshe If there's no obvious initial value, probably the bug lies elsewhere. I'm just pointing out something that stood out to me at first glanceā€¦ haven't really read your program.
 
It stopped being relevant and started being annoying years ago.
 
@Potatoswatter It works perfectly.
 
This is C++. Who cares if it is working right now.
It may stop working at any time.
 
We could organise contests. "Count bugs in this line of code."
 
12:06 AM
Should typedef 'type' always return the type of the class?
 
@CatPlusPlus There, you big baby
 
typedef is a statement, it doesn't return anything.
 
@CatPlusPlus Maybe it's WideC!
 
@RMartinhoFernandes In which case it's what... a syntax error? :-)
 
@CatPlusPlus Should it always state the type of the class?
 
12:11 AM
@KerrekSB Oh, maybe you weren't around in the beginning, when throw throw throw throw throw throw throw throw x; was a valid statement.
 
@RMartinhoFernandes I might have faint memories of something similar...
 
@Pubby What?
 
@CatPlusPlus Which is considered "correct"?
template <typename T>
struct foo {
typedef foo<T> type_A;
typedef T type_B;
};
 
And typedef int type_C;, too.
 
12:16 AM
So type means any type? :S
 
@moshe: Here is what happens if the random uninitialized value happens to be the same as the first character of the string: ideone.com/32MZ3
 
Ok, what's this "type" thing you're talking about?
 
@RMartinhoFernandes I see it a lot in tmp, was wondering if it had "rules" to how it should work
 
@Pubby Oh!
That's a convention used for the "return type" of metafunctions.
Say, remove_const is a metafunction that removes any const qualifiers from a type.
 
Ah, so 'value' is of type 'type'?
 
12:18 AM
The resulting type is a nested typedef named type.
@Pubby No, value is the convention when the metafunction produces a value instead of a type.
is_const has a member named value (it produces a bool), while remove_const has a member named type (it produces a type).
 
Hmm, okay. Should type be defined in normal containers?
 
@Pubby If I understand the question correctly, typedef T type_B; is the preferred way to expose the parameterization of a template, although it doesn't rule out having type_A as well.
But you shouldn't call the parameter just T, use a descriptive name and reflect that in the typedef as well.
 
Like 'value_type'?
 
Yeah, for a container, value_type is a required member typedef.
 
12:22 AM
One more thing, what's the use of tmp identity?
 
One use could be to prevent type deduction (yes, that could be useful).
 
Could you give an example?
 
Many uses. It can serve as an alternative to another metafunction (giving a name to the null transformation), it can generate a unique type corresponding to but different from its argument (somewhat ironic usage), or what Martinho said.
 
Early versions of std::forward were defined with the parameter type wrapped in identity, because std::forward is only useful if you specify the type explicitly.
 
It doesn't use identity any more?
 
12:26 AM
Now there are two overloads which use remove_reference followed by the addition of a reference, so you can't pass by value no matter what.
 
Oh, that makes sense
 
7
A: Why use identity in forward definition for C++0x rvalue reference?

Howard HinnantThe purpose of identity was to make T non-deducible. That is, to force the client to explicitly supply T when calling forward. forward(a); // compile-time error forward<A>(a); // ok The reason this is necessary is because the template parameter is the switch with which the client t...

 
Also, identity was proposed to be the runtime identity function, simultaneously with the TMP usage. That didn't work out because the functor class needed a template argument which couldn't be deduced. The reason std::identity didn't make it was that they felt it would break code with using namespace std; that attempted to use it as a functor.
 
@RMartinhoFernandes Ahh, the old non-deducible context...
I think that's no longer necessary, non?
 
@KerrekSB It's still a non-deducible context.
The use of remove_reference makes it so.
 
12:31 AM
Thanks for the help
 
@RMartinhoFernandes Yes, much nicer.
 
@Potatoswatter so is eof a good initialization value?
 
@moshe: Sorry, my last example contained invalid input. This one is fixed, but the bug is illustrated just the same: ideone.com/Pt4xi
@Moshe No, a char cannot contain the value eof. eof needs to be kept in an int.
 
@Potatoswatter So what's an unmatchable char?
 
@Moshe There isn't any. That's how compression algorithms are.
 
12:38 AM
I think you're asking the wrong questions :)
 
So then it's going to break no matter what I do?
 
(int)runLength <- shouldn't this be runLength - '0'?
 
The solution is to enter the loop at a point where you only need what you already have.
 
As in...?
 
Yeah, I was also confused about lengths being text or binary. So I changed the input to be binaryā€¦ whatever.
 
12:40 AM
@RMartinhoFernandes why?
 
Dunno, I got the impression the lengths were text.
 
Wellā€¦ I supplied you with an example already. If you can reason that you already have data that's mathematically sufficient to solve the problem, then there is a path. That's the zen of programming.
 
But if they're binary the cast is fine.
 
12:55 AM
See ya later. I need to get more restā€¦ scheduled to fight a pimp at 7. FML
 
Uhh, good luck.
Thanks.
 
gonna need it
 
 
2 hours later…
2:54 AM
posted on August 16, 2011 by Potatoswatter

Hi, everybody! Welcome to my new blog. It's sure to be chock full of random ramblings, long gaps without updates, and of course, that most popular of esoteric languages, C++. Let's start by kicking off the Palatable Untyped Lambda Calculus project, or PULC, pronounced like "pulse." A while ago I was inspired by John Tromp's Binary Lambda Calculus encoding of the untyped lambda calculus. The in

posted on September 08, 2011 by Potatoswatter

Here's something differentā€¦ GCC has been gaining C++11 (formerly C++0x) features for some time, and support is now mostly complete. There are still several things missing, such as user-defined literals and raw strings. These depend on the preprocessor as well as the core of the compiler. So, I decided to take the new language for a spin and implement a C++11 compliant preprocessor with such fe

posted on November 19, 2011 by Potatoswatter

I've just checked-in a couple months' worth of progress on the preprocessor project. Here are some bullet points for you. Clean separation of the "framework" from the processing stages, including generalization of the tricky business of configuring compiler flagsPragmas for setting header search paths, trigraphs, whitespace preservation (including emitting #line directives), and including heade

 
cpx
3:35 AM
3
Q: Use of Unnamed namespace over static

cpx Possible Duplicate: Unnamed/anonymous namespaces vs. static functions Can I assume an object declared in unnamed namespace to be equivalent to as if were static? namespace { int x; };// #1 static int x; // #2 FWIK, In both cases, x will have static storage duration and internal li...

 
 
3 hours later…
6:17 AM
I hate to rag on people, but this is just bad advice: Returning a pointer would be a better solution. Maintaining a single pointer throughout the lifetime of the program would make it easier for the developer to properly destroy the same. For reference en.wikipedia.org/wiki/Singleton_pattern
 
Dude... I was dreaming Bjarne and me were working as a successful comedian duo. brb, gotta see a shrink...
 
That could be funny.
 
I remember pointing to the "ESC" key and saying "This is not a key, at least not in the musical sense". How on earth is that funny?
 
I also remember Bjarne standing with his back to the audience and snipping his fingers to some old Rock'n'Roll music. The crowd went wild.
 
6:30 AM
I vaguely remember how funny a joke seemed in a dream while it wasn't funny at all when awake.
 
I wonder if people can laugh while they sleep.
 
sbi
@FredOverflow I can answer that to some extend: Children can do that.
 
must be their innocence
 
sbi
@FredOverflow The idea that children are innocent must be something thought up by people who do not have children. Or whose children are grown up, and living far away, so that now they only have to deal with their grandchildren once in a while. IME children are rarely ever innocent.
I mean, if suddenly there's something wrong in my apartment, a stain of dirt, the bathroom flooded, a plate broken, the dinner table not properly cleaned... you name it, then it's been the kids in 99.999% of all cases. At least. How can you call "innocent" a group of regular offenders which are the culprits for just about anything that went wrong in 99.999+% of all cases?
 
You're right. I don't have kids :)
 
6:45 AM
Children are innocent until proven guilty
 
sbi
@Pubby Can't you read? It's the opposite!
Children are guilty until proven innocent.
6
 
@sbi You're forgetting that the jury is of their peers. Children are always acquitted!
 
sbi
@Pubby I don't know how you grew up, but I assure you that's not the case in my household.
In my household, I am the jury.
And tremble before my verdict!
 
how do you quote a chat message inline?
 
sbi
@keithlayne You read the newbie hints and follow their instructions.
 
6:56 AM
@sbi I told you you were the only one who ever mentioned it
 
sbi
@keithlayne How can you say this? What's wrong with your memory? Hadn't you seen someone else mentioning them only yesterday?
 
Sigh.
2 days ago, by sbi
Oh, and make sure you never leave your apartment without a condom. If you have small kids, 6hrs of sleep all in one piece would be fantastic, so you need to prevent becoming a father at all costs.
@Pubby ...or if you think kids aren't evil
@sbi aren't you on GMT in Germany?
 
sbi
@keithlayne GMT+1, actually. Why do you ask?
 
@sbi I couldn't remember what it was there. Wondered if you ever sleep.
 
sbi
@keithlayne I slept from 12:30 to 6:10. I had set my alarm to 6:45, but being used to it yanking me out of sleep at 5:55, I woke too early. :(
@keithlayne And you, isn't it 2am where you live? Or is NC on your profile only where you're from, but not where you are now?
 
7:10 AM
@sbi That's pretty reasonable. This your sleep in day or something?
 
sbi
@keithlayne Today and tomorrow morning I don't have those of my kids which need to be taken to kindergarten/school. It's only those who propel themselves to school. That's pretty convenient. :)
 
@sbi I fell asleep and woke at about 0030 to the sound of my wife watching TV too loud. I then in the dark almost tripped over my 3yr old sprawled across my bedroom floor for some unknown reason. I let the sleeping lion alone.
 
sbi
@keithlayne Oh, so it's warm now where you live! :)
 
@sbi so there is a big difference in the ages of your kids?
@sbi yes, I'm in Charlotte, and it's unseasonably warm here.
 
sbi
And worse than tripping over kids is stepping barefoot on a Lego brick in the dark. Them thingies are terribly sharp-edged!
 
7:13 AM
@sbi But I have been in one desert or another for so long...don't know if you've experienced that, but the hot/cold never allows your body to acclimate.
 
sbi
@keithlayne I think I have already said that I have a teenage daughter and a 4yo. And too many in between. :)
 
Legos are the best, but they are the bane of my bare feet.
Sorry, I forgot to consult my stalker notes.
Thursday is our Thanksgiving holiday, so I don't have to be up to get my oldest off to school today. They don't go back until Monday.
 
sbi
@keithlayne No, I don't think I've ever been in anything more desert-like than eastern Oregon. But I shun the heat. I'd rather live in Scandinavia than in Italy, Spain, or southern France. Everything above 24°C should be forbidden.
 
Eastern Oregon is definitely a desert (technically), but I'm guessing it's more temperate there than our southwest
 
sbi
@keithlayne Yeah, we love them, too, but I require my kids to leave a clean path to the window nowadays, so I can shut it while they sleep without being hurt too often.
 
7:17 AM
my kids just don't see the point of cleaning. It offends my OCD.
have you spent a lot of time in the states then?
 
sbi
@keithlayne No, this wasn't meant this way. I have been around in Usenet under my real name for almost two decades, and it's all still out there, and I don't like that. So now I try to avoid giving hints about who I really am, and revealing much about my true identity.
@keithlayne I once traveled from NY to Portland, OR, and from Seattle to LA in three months. And I once spend six months in Portland, doing an internship for my studies. In that time I also traveled a bit.
 
@sbi have you had bad experiences based on using your real name? Obviously I'm not that concerned about my identity being known. But then, there's not much to know about me.
The Pacific Northwest is beautiful IMO. I've been to Portland and Seattle on a vacation, but I was young and partied too much to really appreciate it enough.
 
sbi
@keithlayne Nothing particularly bad, but after I've been around for almost two decades, there's a lot of stuff out there said by me that I don't believe in anymore, changed my mind about, or never should have said in the first place. You will find my thoughts about C++, politics, books, and raising children when you google my real name.
When I found out that google suggested my full name after entering my first and three or so letters of my last, I thought I ought to quit feeding this monster with the the data of my life.
 
@sbi I'm just here to bask in your celebrity :)
You must be planning a run for public office :)
 
sbi
@keithlayne Of all the cities I visited in the US, Portland, Seattle, and SF I liked the most. From a US POV, Portland probably was the one which was closest to how living in Berlin feels. But that might all boil down to me just getting to know specific people, which I liked a lot. (Not in SF, though, I got to know nobody there.)
 
7:27 AM
I have never been to California at all somehow. My wife has spent a lot of time there doing various Army things, and likes northern Cali quite a bit. Portland I think is mostly a very easygoing town, and beautiful to boot.
 
sbi
@keithlayne I assure you, the closest I have come to a celebrity status is that I am thanked in the foreword of one C++ book among many other manuscript reviewers. On that occasion, I also once got the same email as a certain Nick Stroustrup. That's about as much celebrity as I ever got, and likely as much as I ever will.
 
Bjarne's son? Did he think of that name while shaving?
 
sbi
@keithlayne I've been to the west coast once in fall and once all winter. You have to have a certain kind of indifference for the rain to like that, but I didn't mind the rain too much.
Ouch!
 
I went in August, and it didn't rain at all.
 
sbi
Casually pepperspray all the ponies!
@keithlayne When we were hiking in the redwoods in spring, and it would rain for days on end, the locals told us that this is the time when the winter rain stops, and the spring rain begins. :-/
 
7:31 AM
classy
 
sbi
Anyway, I need to get going, get out the door, or I will have to stay too late at work tonight again.
Oh, the robot slept in!
 
@sbi Have an outstanding day, sir.
 
sbi
Nov 18 at 22:45, by sbi
@MrAnubis I'll "sir" you.
 
8:03 AM
Hello folks
 
mawnin
 
Im on phone
 
thank you for that detailed information
I shall cherish it for all eternity
 
@DeadMG lol
 
8:08 AM
Any news?
 
eh
I hate my life
 
what's new?
 
My c++ frontend can now handle namespaces
 
awesum
 
8:16 AM
Haha aprils joke
 
 
1 hour later…
9:55 AM
hya , i am trying to figure how c++ does the binary I/O , can anyone help?
@StackedCrooked lol
 
10:09 AM
@JohannesSchaublitb It's not even April. So it's two jokes in one?
@JohannesSchaublitb I just discovered that the QtCreator source code contains a library called "cplusplus". It has a lexer and AST and some other stuff. I think it's used for the intellisense.
 
cpx
hmmm
@user411102 you're looking for unformatted IO functions.
 
@cpx yes , how does buffer plays the role in between stream and i want to know
 
@user411102 in between stream and what?
 
i want to know
 
@jalf data source
suppose my binary file has 2 ints , and i do , myfile.read( (char*)&intvar, sizeof(int));
what will buffer contain? , since it's of type char
@sbi you're invited to answer my question please
 
sbi
10:24 AM
@user411102 I have no idea which question you are talking about, and I'll be off for a meeting in a moment.
When someone asks "Where's your Christmas spirit?" Is it really so wrong to point at your liquor cabinet?
 
@sbi just two lines above my invitation message to you?
 
sbi
@user411102 What is "buffer" referring to?
 
@user411102 the stream buffer contains the data that hasn't yet been passed between stream and your data source
 
@sbi streambuffer
 
it's a buffer, it buffers.
why do you need to know? Are you trying to implement your own stream buffer?
 
10:27 AM
@sbi Asthma inhaler? Oh no, that's "puffer".
 
it stores what's necessary in order to speed up the stream operation
 
sbi
@StackedCrooked :)
@user411102 Why do you care what the stream buffer contains? Unless you're implementing one, never you mind.
 
int -> 4 bytes -> 4 chars containing those 4 bytes of int in streambuffer?
 
The buffer contains data that has been read from the file
So if you read 4 bytes from the file, then the odds are very good that those 4 bytes will, at least temporarily, be read into the buffer
when you read from a file, you read bytes. The conversion to an int (in your case) happens at a much higher level. You read bytes from the file, store bytes in the buffer, and when data is read from the buffer and presented to your program, the conversion you requested is performed
such as, for example, converting to an int
 
Can anyone tell me where do I get Python players?
 
10:42 AM
@ThinkDifferent who are the Python players?
 
Who knows python.
 
I found this url for installation Python in Mac.
failed to find the ā€œBuild Appletā€ tool, which allows you to package Python scripts as standalone applications on your system.
 
@ThinkDifferent Hey, I know of this super cool site where you can get programming questions answered. You should see if anyone there knows how to solve the problem
 
10:46 AM
@ThinkDifferent did you try asking there?
 
Not yet,try to solve by my own and finding similar questions on super cool site,so that by mistake I would not ask duplicate question.
 
@ThinkDifferent this is C++ room :)
 
@ThinkDifferent and your definition of "solve it on my own" is to ask in a C++ chat?
 
6 mins ago, by ThinkDifferent
Can anyone tell me where do I get Python players?
I didn't not ask for the solution in C++ chat,IIRC.
Thank you all./
 
@jalf I was right? , which seems matching from your theory
 
10:49 AM
@ThinkDifferent so, instead of asking your Python question on the site designed for programming questions, you found a C++ chat and asked in there where you should ask your Python question?
while at the same time claiming that you're trying to solve it on your own?
Wouldn't it be a lot easier for everyone (including you) to just ask the question directly on SO?
@ThinkDifferent Is that a childish way of saying "stop talking, I don't like criticism"?
 
lol
 
Please, grow the fuck up
 
I told you thank you,why are you making issue?
 
@ThinkDifferent Most people don't **quote their "thank you" message 4 times in a row
 
I didn't ask because of duplication.
 
10:52 AM
so I think it'd be more fair to say that you are "making issue"
 
I deleted if you can see.
 
and those deleted posts were start of issue I think
 
@ThinkDifferent what does that have to do with anything? It wasn't deleted when I commented on it
so asking why I commented on it is kind of absurd
Please, just ask your question, here or on SO or on python.org or anywhere else you like
 
wth?What do you want now?
 
just stop whining like a baby
 
10:53 AM
Am I whining?
 
Is that a trick question?
 
Am I here?
 
yes you're
 
Leave,better muted
You all are playing politics.
 
:D
 
10:55 AM
:D
 
@jalf Thanks for explanation
 
@ThinkDifferent project much? I'm just pointing out that the simplest way to get a question answered is to ask it. You're the one turning it into the Dramatic Mudflinging Match of the Day(tm)
 
this student's code has a method called getBalls()!
3
 
cmake, I hate you
 
**Lounge<C++>**
*Leave your seriousness at the door.*
 
10:57 AM
@ThinkDifferent How about you stop being annoying?
 
I am leaving
 
That went better than expected.
 
@MrAnubis honestly, no clue. I didn't really pay much attention ;)
 
@jalf when OS doesn't returns input to streambuffer , how does streamsbuffer knows it's end of input? i mean it wait for some time , and if that time expires , that's the signal which sets the stream in bad state?
 
@user411102 Why wouldn't the OS return input?
The stream is designed to work with the OS
the buffer contains whatever the implementers want it to contain, and it uses the OS apis to do its job
 
11:03 AM
@jalf suppose data source went empty
 
@user411102 Why shouldn't the stream implementation be able to handle that?
 
@jalf That has point , Thanks a lot for helping
 
A file stream knows how to read from files. That's why it's a file stream
 
Samsung Galaxy Note is released , awesome phone
 
 
1 hour later…
12:26 PM
Sooo anybody got the Doom3 source running?
 
12:37 PM
Haven't looked at it yet.
 
can't find the path to the game data
but it builds in vs 2010
 
1:12 PM
@user411102 I am thinking to buy this phone but it's bit on expensive side :(
 
sbi
@Nils You are on the wrong track here. You will never get this source to run. You will have to compile it first! Smug look.
 
it compiles
I wonder if there is a thread about it on stackexchange, but could not find it.
 
1:30 PM
@sbi Hi
 
I think I'll give ack a try.
 
Fuck
Sorry guys
How the f**k am I supposed to manage strings in c++?
 
@JeffPigarelli What exactly do u mean by manage strings ?
 
In c++ there's no type string
we have to deal with character
how do I easily get the length of a string? thanks
 
uh
what the fuck are you talking about?
std::string
std::string s;
// do something with s
s.size(); // gets length of s
 
1:40 PM
@JeffPigarelli Are u dealing with char[] or std::string
and I am back with music :)
 
@JeffPigarelli In C, there is no string class. In C++, there is std::string
 
if your book/teacher/course didn't tell you about std::string the instant you needed to use it, then find a new book/teacher/course
4
 
742
Q: The Definitive C++ Book Guide and List

grepsedawkUnlike many other programming languages, which are often picked up on the go from tutorials found on the Internet, few are able to quickly pick up C++ without studying a good C++ book. It is way too big and complex for doing this. In fact, it is so big and complex, that there are many bad C++ boo...

Plug.
 
@jalf @StackedCrooked it looks like I missed all the fun.
I thought a "Python Player" was maybe somebody who wrote programs in Python to pick up chicks or something
 
2:05 PM
@sbi Well with running I mean the game is running, eg it finds all the resources it needs. Got it working btw :)
event is not a c++ keyword, right?
vs is paining it blue nevertheless
 
@Nils That's because VS thinks C++/CLI is more important than C++
It's not a bug, it's a feature
array, where and a handful others get the same treatment
 
2:22 PM
how does gcc do what vc does with __cdecl and __stdcall?
 
what does the standard say about (compilers) implementing variadic functions?
presumably this is not a problem when you avoid variadic functions. but i wonder.
so you're supposed to ifdef your way around between __attribute__ and __cdecl?
 
@wilhelmtell for the most part, you're not supposed to specify the calling convention explicitly
but if you do, then yes, you'll have to ifdef your way around different compilers having different syntax :)
can always just define a single macro MY_CDECL or whatever, which just expands to something different depending on compiler
no need to ifdef the function declaration itself
 
it feels odd. completely unlike standard c++. it usually is very explicit about this sort of things.
 
@wilhelmtell well, the calling convention isn't standard :)
 
2:30 PM
no no but for example variadic functions and non-variadic functions are incompatible in terms of implementation. there is no one way to do that. if you can prove that's the case then the standard should resolve this issue.
<rant />
 
Not sure what you mean
 
i mean compilers have to expose two ways to call a function. the standard should say "in the case of variadic function, the compiler must generate an implicit extra parameter that takes the count of arguments. or something. just so users don't need to ifdef things, because different compilers resolev this issue in different ways.
 
according to the standard, calling conventions aren't an issue. The compiler is supposed to figure out how to represent the functions you define. If you use compiler-specific extensions to override the default calling convention, then you're on your own
You've lost me completely. Why do you need to specify the calling convention at all?
 
ok ok. you already answered. i just saw an ifdef for __cdecl and then i was wondering.
in the case of defining a variadic function in vc you say __cdecl
in gcc you use __attribute__ or somethin
and that caught my attention, as something unlikely to a lanuagewith a strict standard.
i'm probably still very vague :-S
'sokay, there's no way around those ifdefs
:)
 
if you just want to define a variadic function, why can't you do that without specifying any kind of calling convention?
we're just talking about one using the .../varargs stuff, right?
 
2:39 PM
because then the stack cleanup isn't deterministic?
yes
 
@wilhelmtell It isn't? why not?
 
suppose you compile a variadic function.
how do you compile the stack cleanup/
?
you do that by relying on the user saying how many elements were passed, or a string. something at rutnime.
 
@wilhelmtell the way it's supposed to be done according to the calling convention used by the function. That's no different than for regular functinos
 
that's undeterministic.
no
void f(int x, int y)
to clean, clean x and then clean y. or in reverse, wtv. very deterministic.
void f(...)
cleanup is undeterministic
it may or may not clean up properly.
but in
 
@wilhelmtell I don't see the difference. In both cases, you have a calling convention which specifies how the stack should be cleaned up
 
2:42 PM
It must clean up properly.
 
ok.
so, tell me: how do you clean up void f(...) ?
 
the non-variadic case is only well-defined because the compiler has decided on a calling convention. There's nothing in the C++ language that says it has to store parameters on the stack at all, and so there's nothing in the C++ language specifying how cleanup must be done
 
AH.
ok.
 
@wilhelmtell You look up what the calling convention says you should do, and then you do that
 
so i don't understand why vc even allows me to make this decision. so low level.
 
2:43 PM
the calling convention specifies "if the function is variadic, put this on the stack when calling it, and do that when the call terminates"
@wilhelmtell because sometimes you might want to specify a non-default calling convention. Say you want to call a function defined by a compiler which used a different conventino
or suppose you want to use __fastcall because it's a tiny bit faster in certain cases
it's just another compiler extension
like VC and GCC both have dozens of :)
 
usually, you shouldn't need to worry about it, but the option is there because otherwise you'd be screwed if you did need to fiddle with it
 
looking forward to the day i'll find these useful. :-S so many optimization paths to go through before this. :p
 
in terms of optimization you can basically forget about it. Like I said, `fastcall´ is marginally faster in some cases because it passes a few parameters in registers instead of on the stack, but it's not really worth the hassle. And in 64-bit mode, parameters are passed in registers by default anyway, so the issue goes away
but the Windows API specifies a calling convention for every function because they can't assume that the compiler will default to the same convention as the API was compiled with. So they specify __cdecl on every function, just so foreign compilers can know which convention to use
 

« first day (403 days earlier)      last day (4542 days later) »