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

10:00 AM
ah, so by not taking the invoice people avoid paying tax.
lol.
 
Well, some sellers do that with non-material stuff.
 
for us, the retailer pays the VAT
 
But when it's something material, the seller already paid some VAT when he bought it, or when he bought the goods to manufacture it.
 
guess, living in a tax-free country has its benefits...
so If the taxes are strictly enforced, the economy will improve
 
@DeadMG But the money comes from the final consumer anyway, no?
 
10:03 AM
yep
 
anyway, bye. I have to go now.
 
unless the retailer chooses to not charge it
in which case, the retailer pays it
 
Is that common there?
 
no
but they can do it for promotions and stuff
 
Oh yeah, that kind of promotions are common here. Government raises VAT, supermarkets don't raise prices as a promotional stunt.
Raising VAT is a common move nowadays.
 
sbi
10:06 AM
@RMartinhoFernandes I am not so convinced that it is evil if the function closing a file can throw. The thing is, the Win32 API function for closing a file (::CloseFile()?) does return an error code, of course, if it fails to close the file. Somewhere, deep inside a file stream dtor, the C++ std lib calls this, of course. What do you think happens if that fails?
The main difference between Java and C++ is here that in Java I have the choice whether (and how) I want to handle this, in C++ I don't. That's surprising, as it seems to be the opposite of what the philosophy of the two languages are.
 
@sbi Oh, the problem is not the throwing per se, the problem is the checked exceptions.
It blows the whole thing out of proportion.
 
the Windows API docs seem to suggest you can only get an invalid return from CloseHandle() if you passed in a value that isn't a valid HANDLE to begin with
otherwise, it always succeeds
 
Sounds like a case for a non-checked exceptions.
Because I think the underlying problem isn't even the existence of checked exceptions per se, but its misuse, starting with the standard library.
 
sbi
@RMartinhoFernandes Why, because it aborts the app? If I were implementing the C++ std lib, then I'd assert the Closehandle() call, which leads to the same.
 
I think that Anders was absolutely right when he discussed the problems with checked exceptions
 
10:09 AM
@sbi No, because you have two choices to make your program compile: add a try-catch-swallow around the close() call, or add throws IOException to the signature of that method and all methods that call it.
 
they can only work if you can generate them programmatically
 
void f() {
    FileInputStream f = new FileInputStream("blah");
    try {
         // do stuff
    } finally {
        f.close();
    }
}
This code doesn't compile.
To compile you need to: 1) add boilerplate or 2) make sweeping changes across your application's signatures.
If f() is implementing an interface method, you can't even pick 2 unless you change the interface, which can be a versioning nightmare.
Java checked exceptions are not like C++ exception specifications.
If you use a rogue compiler to compile code that throws checked exceptions that are not in the signature, the runtime doesn't give a fuck. It may terminate your app if you don't have a handler for the exception, but it won't do anything like terminate() or unexpected() or whatever that was.
 
a fuckarooney
 
sbi
@RMartinhoFernandes Ah, Ok, now I understand. That's indeed bad.
@thecosh is here!
 
@sbi I sure am :D
At one stage, I thought that openGL was a hard set of code to learn to use, but nothing too extreme. I then tried using openGL in Java... it hurts so badly
 
10:18 AM
OpenGL sucks pretty badly to begin with
 
@DeadMG it's a pain to use sure, but at least in C++ passing an array of unsigned shorts is as simple as declaring an array of unsigned shorts and passing it to a function ¬_¬
 
What, you can't do that with the Java OpenGL APIs?
 
@RMartinhoFernandes You can... but an unsigned short (along with many other things you take for granted in C/C++) are not native to Java
 
Oh right.
So, how do you call, say glColor3ubv in Java?
 
sometihng along the lines of...
GL gl = glDrawable.getGL(); // glDrawable being passed into your function
gl.glColour3ubv(); // passing the magic there
 
10:23 AM
Right, but how do you pass unsigned bytes?
Say, to make pure red.
You pass -128?
No wait, maybe -1. Whatever has all the bits set.
 
Probably something along those lines...
 
there is a byte class
 
But that's signed, no?
 
yeah I think so :(
I've not even started to worry about colour
trying to sort out creating an index buffer using unsigned shorts
 
10:25 AM
It's annoying that they kept all the prefixes and suffixes though.
It actually makes you add one extra prefix.
 
the library I am using is basically all of the C openGL functions prefixed with gl.
 
In C you need the suffixes, because there's no overloading. But in Java you could take advantage of overloading. Lazy library writers.
 
in there defence, C++ openGL didn't bother with overloading... unless some needs slapping for not telling me otherwise a lot sooner :@
they used some tool call gluegen (I think that's it) that simply wraps up a C library into a class
it mirrors all the functions one to one
 
Never worked with a C++ OpenGL API.
 
@thecoshman who are "they"?
 
10:30 AM
there's a C++ OGL API?
 
But I'd expect at least RAII.
 
OpenGL is a C API. What bindings people make for other languages is their own business. So there's no official C++ API for OGL
 
For say, glPushMatrix (though that may be obsolete now)
 
it is
thank God
for all those poor people who use OGL, anyway
 
@DeadMG Well, I'm from the old school, so most of the OpenGL I know is obsolete now.
 
10:31 AM
@jalf the man! who I shall stick it too :{D
 
lol
 
@DeadMG half my point, it's just the C library
 
the whole glPushMatrix() should never, ever have existed
 
Is that a moustache?
 
@RMartinhoFernandes indeed good sir, tis the season don't you know :{)
 
10:33 AM
@DeadMG I have bigger gripes. Immediate mode being the biggest.
 
is having the biggest gripes like having the biggest penis?
cause I prefer to think of it like having the biggest manboobs
 
I'm merely trying to imply that you having the biggest gripes is a bad thing
 
@RMartinhoFernandes immediate mode is nice for teaching people
 
I usually subscribe to the belief that what you should teach people is what is actually a good idea to use
teaching people to do things the wrong way might be nice and easy for the teacher
it's just not very useful
 
10:35 AM
You should make things nice for the student.
Making it so they have to unlearn stuff is not nice.
 
I partially agree with you @jalf it is frustrating to learn something to only find out it is pointless, but at the same time, it is kind of hard to learn how to do everything wit hopenGL at once
so ignoring things like shaders at first makes sense
 
Well, vertex arrays beat immediate mode every day.
Since you will probably store them in arrays anyway even with immediate mode.
 
@thecoshman you don't need to learn to do everything at once. But you could start with a subset of the things that are useful
and then gradually add on other things that are useful
 
LEARN ALL THE THINGS!
 
I actually think vertex arrays are easier than immediate mode.
 
10:38 AM
rather than starting with pure garbage, and then telling the student later on "oh, btw, forget everything I taught yuo until now. Let's start over and this time, use the right APIs"
 
Though vertex arrays brings glClientAttrib which needs to be handwaved for beginners.
 
also, starting with shaders is much much simpler than teaching someone the fixed function stuff
 
I think the teaching of fixed function is nice as it sort of helps show why shaders are so nice as well as show how technology has evolved
 
shaders are simple: you write a small program which transforms your data the way you want it transformed. Any programmer can do that. Mucking around with the fixed function pipeline requires you to understand 30 years of bad APIs, a million hidden gotchas and arbitrary constraints
@thecoshman are you sure you're not trying to be a tour guide on a museum?
 
@jalf maybe I am...
 
10:41 AM
When people come to you and ask "how do I use OpenGL", is it because they want to write an OpenGL application (in which case they should be taught how to do it right), or because they want to know how the API has evolved over the last several decades?
 
fair point
 
with shaders, there's just less you need to understand. It's a simpler, cleaner, more consistent world
 
But then beginners don't appreciate them as I do! We used to live in an old water tank on a rubbish tip. We got woke up every morning by having a load of rotting fish dumped all over us! Shaders? Huh.
 
it requires programmers to understand programming, and nothing more. That's practically ideal
 
what's up with friday?
 
10:42 AM
@RMartinhoFernandes and every morning our dad would KILL us.
 
I guess there is no harm in giving new people a huge lump of boiler plate code, along with the promise of explaining it ... later
 
@user411102 Today isn't.
 
By any chance, does any one have much experience with using 'native' in Java?
 
@RMartinhoFernandes nah , room topic is related to friday these days 0_o
 
10:44 AM
2 hours ago, by R. Martinho Fernandes
Yeah, I guess it's a (so far) short-lived meme.
 
I know it's some way of using C++ code with in a Java function... which sounds fun :D
 
Sounds painful to me.
And I think it only works for C functions.
 
What... more painful then Java?
 
@thecoshman assembly?
 
@user411102 whilst not as portable, I am sure asm is a lot nicer to work with then Java
 
10:49 AM
@thecoshman Think Java, but with the ability to fuck up the runtime.
(Though in Java 7 you could do it with loops.)
:)
 
whilst ?
 
@RMartinhoFernandes you mean, Think Java, but with the ability to do what I want?
 
Fuck Java™
10
 
Well, why don't you just ditch Java then?
 
@RMartinhoFernandes use it at work... for some reason
 
10:53 AM
Ah.
 
for all the bitching, it's not too bad
I'm just still very much attached to C++
 
I think checked exceptions make it mostly unusable.
 
I think the verbosity and strict misguided OOP makes it unusable
 
That's one thing that confused me, in Java throwing and catching exceptions is a normal thing to do. I was happy with my way of dealing with them in C++, don't use them
 
What do you mean "don't use them"? Disable them?
 
10:56 AM
@RMartinhoFernandes no. I just never added them into my code, apart from a few cases where a library did. I was used to handling things going wrong and returning (or setting) and error status that could be checked
Java mentality seems to be along the lines of, you passed me a bad argument, throw an badArgument exception
 
sam
any one has experience in kerberos
 
Precondition checks. They help find bugs earlier.
Debugging NullPointerExceptions is a pain.
 
sam
?
 
In C++ I use assert for those checks.
 
@RMartinhoFernandes even for run time values?
 
11:00 AM
I don't understand. assert only works on runtime values.
 
sam
any one has information about KERBEROS ? to find last credential
 
@RMartinhoFernandes I mean, values that are from the user
 
If it's validating user input it's not really a precondition. For that I may use exceptions or return something. Depends on the situation.
 
@thecoshman If user input can trigger an assert you did something wrong when reading/validating the input, so yes, I'd check that also...
 
sam
any one has information about KERBEROS ? to find last credential
 
11:05 AM
@sam Asking your question 3 times in 5 mins will not help you, if no one answers they probably can't or don't like to help at the moment. Besides, if you really have a question you're probably better of on the Q&A site itself (in this case probably SuperUser)
2
 
sam
ok
 
Aaand I failed to get up on time. Good thing I won't be late for the most important class today, at least.
 
good day
 
11:26 AM
what's up?
 
Apparently, things with tentacles are taking over: e360.yale.edu/feature/…
 
"hahah
tentacles all the things!!
 
Hi. I don't understand the comment about property sheets below. Is there a Visual Studio expert around?
1
A: Visual Studio (C++)- what is the best practice regarding directories configurations?

Alf P. SteinbachLet's consider first only include paths. The Microsoft documentation states that the compiler searches for directories in the following order: Directories containing the source file. Directories specified with the /I option, in the order that CL encounters them. Directories specified in the ...

 
@TonyTheLion Hey don't scare me!
 
11:48 AM
Saves Earth, marries the girl, they both get blown to pieces. WTF kind of ending is that?
 
@RMartinhoFernandes explosive!
 
lol
 
12:10 PM
Layout here in chat is screwed up. Visual C++ overly confused by indirection in type definitions.
 
sbi
12:26 PM
room topic changed to Lounge<C++>: throw 22; anybody care to catch? [c++] [c++11] [c++-faq]
 
I'll just throw it on again
 
hhhhhi
 
wwwwwwhats up?
 
sbi
@thecoshman Here, it's usually the sky and the opposite of down.
 
12:43 PM
@sbi touche
 
Hi everyone!
anyone using Qt here ?
 
@OmeidHerat - I have used it in the past. I think it's reasonably popular around here
 
(simple:12914): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",
Why in the heck would it need anything from Gtk ?
 
what does ldd on the binary in question show?
 
@awoodland Oh cool then, I don't know it's asking me for a Gtk library, I go go and do an 'apt-get install ..."
@awoodland a simple hello world.
 
12:49 PM
ldd will show what it's actually linked against
 
so Simple that I can post it here
#include <QApplication>
#include <QLabel>


int main(int argc, char *argv[]) {
    QApplication app(argc, argv);
    QLabel *label = new QLabel("Hello Qt!");
    label->show();

    return app.exec();
}
 
(well what it's dynamically linked against)
my guess would be that it's actually something about window decorations from your window manager not your app
but I think you want to run ldd with it just to see if it is linked against something that links against gtk
 
build wiht qmake-qt4 simple.pro -r -spec linux-g++-64
 
but that still doesn't show what libraries it's actually linked against on your system. It's possible there's something weird going on there
 
ah, I am new to Qt build, I selected Custome Qt project and is plain and blank project.
where can I check the libraries it's linked ?
 
 
1 hour later…
sbi
2:19 PM
This has, in just 5 hours, become my fifth-most upvoted answer on programmers. I'm a bit surprised, I thought this was more or less common knowledge.
 
Well I can understand why : it is an interesting answer.
2
(And so is the question actually)
 
sbi
@ereOn Is it? Well, maybe you guys are all way too young to remember the fights we fought over SESE 15 years ago. :) I bet @Alf remembers, though.
It's interesting that the ugly SESE monster is still about, but I guess Java has done a lot to bring bad C styles into this millennium.
3
 
@sbi: I'm young indeed ;) 15 years ago I was barely learning how to change a pixel color in QBasic ^^
 
@sbi Tsssk, and not even mentioning RAII in the process :P
 
sbi
2:35 PM
@KillianDS Indeed, only in a comment later. In fact, I haven't really mentioned C++ at all. But then the question was tagged java, so...
 
Just joking ;), I was simply thinking: this is why I love C++ when I was reading your explanation (a quite clear one by the way)
 
I never understood why languages like Java (or .NET) chose not to have a deterministic way of releasing resources. Obviously the garbage collection thing helps avoiding memory leaks but I find it so unnatural.
Perhaps I have the wrong mindset to understand clearly the benefits.
 
@ereOn It has some other optimizations like avoiding circular references, fragmentation, ...
 
Can't we have both ?
 
well, yes, C++ is already moving nice that way
 
2:39 PM
As I understand things, when an object is no longer referenced in Java, you have no guarantee that it will be deleted any time soon.
 
@sbi yes
 
(Haven't practised Java a lot though, so I might be completely off)
 
I have (was core language at university, glad I graduated)
 
I did some Java at university too, but we never had technical lessons about it : it was almost only dumb "copy-paste"...
 
well, it's not that java is built for smart coders that want full control over a system :P
 
2:43 PM
I know some that would argue the opposite :p
(Obviously not me :D)
 
sbi
@KillianDS I did now add RAII to the answer. :)
 
@KillianDS now that is one plain fanboy statment, but it's not that I like java.
 
@KillianDS that's a red herring imo. I think I'm a reasonably smart coder, and I don't really want full control over my system
I basically want it to work, and leave room for me to do sensible things
 
You never have full control.
 
People who think C++ is oh so much more superior because it allows me to write garbage to random memory addresses are just silly
 
2:52 PM
I prefer C++ because it supports the paradigms that I find it easiest to express my problems in
 
sbi
@jalf Well, but then... attributing this "reasoning" to people preferring C++ is also a red herring. Nobody likes C++ because it can blow off your foot. Well, not sane people, anyway.
 
The nice things about C++ IMO aren't that it allows me to fuck up my application, but that things like RAII, the STL and generic programming allow a high degree of expressiveness and enable me to write robust code that's hard to misuse.
@sbi judging from what some people say about C++'s "strong sides", apparently quite a few people like that aspect of C++
The whole "I want full control" thing, or "it's more powerful"
is basically just another way of saying "it lets me blow off my foot"
 
@CatPlusPlus assembly that is most of control that you can get over your system, but how practical is writing programs with assembly in 2012 is another question.
 
or at least, that's usually the kind of thing they want to do with this control/power
 
@sbi aren't those the same people who ask things like "which is faster int a, b; or int a; int b;?"
4
 
sbi
2:57 PM
@jalf No, it's not. Being able to deterministically free resources gives you great control over the runtime behavior of your application without necessarily blowing off your foot.
Anyway, I gotta go and pick up some of my kids. See you later!
 
have fun
 
Does anyone know how to make my collegues love and embrace "good practises" ? I'm sick of having to cast every single const char* to char* to be able to use their legacy libraries...
 
@awoodland if you #define int return and overload operator , then the second one is probably faster.
 
@OmeidHerat Assembly doesn't give you any more power than C++, save for direct access to the instruction set (which C++ compilers allow you to do, anyway).
 
@CatPlusPlus true, but that same case as writing C in C++ because you can compile it :)
 
3:05 PM
The only instructions worth using directly are SIMD, anyway. And there are intrinsics for that, in all modern compilers.
 
@CatPlusPlus but that is not how your C++ code should look like.
 
Er, there is nothing wrong with using SSE intrinsics where it makes sense. Compilers aren't all that good at vectorising code yet.
 
@sbi .Net lets you. Just pin stuff. Evil thoughts for .Net programmers, but if you want full control over lifespan, you can have that.
I say the pussies haven't the balls to code in a systems language.
@jalf RAII works until you realize that your control can't grab everything in its constructor.
At which point managed allocation is better.
 
@Xaade: Care to elaborate on the RAII/managed allocation point ?
 
3:20 PM
I think .Net could implement this better, if it had a generic exception handler at every object level. That way you could catch, Dispose, then rethrow.
 
3:35 PM
@ereOn not really.
It's a waste of my time to elaborate on that in here.
Might as well tell mice that cheese isn't the best thing.
 
I can't recall ever encountering such a case
 
@Xaade: Not all mices like cheese you know :)
 
How can I create an exe which contains everything not included in all windows versions in VS?
Dependency Walker tells me it depends on MSVCR100.DLL
 
@Nils umm?
does not compute
a lot of things are not included in all windows versions
the internet, for example. An exe containing that would be big
 
Yes but if you wrote something and you want to give it to somebody, how to deploy?
 
3:39 PM
right, so just your program's dependencies
and not actually everything
one option is to simply link to the static runtime
then you won't need that dll
 
@Nils: If you can distribute your exe, why can't you also distribute the VC redistributable package that ships MSVCR100.DLL ?
 
alternatively, you need to bundle the redist package
with your installer
 
Nah I just want one file, no installer no complications.
just like the demos
 
I mean, you can always link to the static runtime but just imagine : if every program on earth compiled used VC10 did that, we would need even bigger hard-drives
 
0
Q: if GetFields() doesn't guarantee order, how does LayoutKind.Sequential work

XaadeI need to get fieldinfo in a guaranteed order. Right now I'm using attributes to specify order. Is there a more automatic way of doing this? Does anyone have knowledge of how LayoutKind.Sequential works, and if I can apply it's technique. I don't see how LayoutKind.Sequential works, unless the...

 
3:42 PM
sure
 
in that case, link to the static runtime
nice and simple
 
it is 34k right now.
 
those tiny 64k demos and the like generally link (statically) to their own custom runtime instead
 
Ah and why do I need the VS runtime anyway?
 
It implements all the runtime functionality that you may or may not rely on. iostreams, calling the main function at startup, initializing statics, exception handling and so on
 
3:46 PM
ah so basically the C++ STL
 
@Nils no, the other way around. The STL is basically header-only, so it's not in the runtim
but other parts of the standard library rely on a runtime library, and the STL relies on functionality such as exceptions, which might be implemented by the runtime
 
ok ic
thx
>MSVCRT.lib(MSVCR100.dll) : error LNK2005: _free already defined in LIBCMT.lib(free.obj)
if I set code generation to MT
 
4:19 PM
Well I'm trying to link everything statically to a program depending on glfw. The glfw readme says that I have to link to the following libs: glfw.lib opengl32.lib user32.lib . This works fine as long as I don't use -MT if I do I get the error above, using nodefaultlib doesn't work either, because then it doesn't find glfw anymore.
I have done C++ dev mostly on Linux / Mac, that's why I ask such dumb questions.
 
4:32 PM
A declaration is what the compiler needs to accept references to that identifier -> I need simple explanation on this grammer
 
cpx
66
A: What is the difference between a definition and a declaration?

sbiA declaration introduces an identifier and describes its type, be it a type, object, or function. A declaration is what the compiler needs to accept references to that identifier. These are declarations: extern int bar; extern int g(int, int); double f(int, double); // extern can be omitted for...

 
user784668
Is code like this: class Foo { class Bar; static Bar something; }; legal?
 
@Fanael No!
 
user784668
Why?
 
@Fanael you see the definition of class Bar at the point of initializing something?
 
user784668
4:40 PM
@user411102 you see the point of initializing something here?
 
@Fanael you're right , pardon me
@Fanael it's legal , i overlooked that static
 
user784668
Are you sure?
 
@Fanael why don't you run that thing in some c++ compiler , and you'll know
 
user784668
I mean, I see that the compilers I'm using don't complain, but I'd like know what the standard says.
 
@Fanael then i am wrong guy to tell you anything :D , i'm off now :)
 
cpx
4:52 PM
@user411102 It means compiler needs to see the declaration before the use of that identifier.
 
@cpx I know that already but can you decode this part * accept references to that identifier * thing is pestering , does that means use only?
 
cpx
@user411102 Please my examples, in this example compiler knows nothing about the declaration.
@user411102 In this example compiler knows that the definition exists somewhere so it lets the linker to resolve it.
 
@cpx Thanks for examples , i'm completely off now
 
@Nils the library you link to has to use /MT as well
 
5:20 PM
@CatPlusPlus - some atomics and memory barrier instructions might be useful to access directly besides just SIMD
 
user784668
Woohoo, I just asked my first question on SO!
 
@awoodland Well, for low-level code, maybe.
 
5:35 PM
@CatPlusPlus isn't that where you'd use SIMD anyway?
 
Hm, somebody removed a whole paragraph from my question... what do you think about that?
> The funny thing is, I see the same people throwing exceptions or calling methods that might throw exceptions everywhere. Some methods have dozens of exit points, even with only one return :)
 
user784668
Revert it.
 
Also, what is "sensasional language"?
sounds french
 
sensational, presumably
 
Lol sensational language.
 
user784668
5:37 PM
@jalf: no way.
 
guessing they mean trying to upset people to get a reaction
even if that's not exactly what "sensational language" usually means
 
@awoodland Well, int a, b; certainly parses faster than int a; int b; ;)
 
@FredOverflow - damn it now I want to benchmark that claim - it's not inconceivable that it could be the opposite way around
 
As long as you're on that train, you might want to remove the space and write int a,b;
Also, not indentation whatsoever, of course.
 
Also, single-letter identifiers, because characters are expensive.
 
user784668
5:43 PM
@awoodland funnily, same here.
 
Right. You cannot have more than 52 variables in scope at once!
Oh wait, there's also underscore. 53!
 
user784668
Yeah! int _;!
 
int main(int _, char** __);
Or does the standard mandate the names argc and argv?
 
Implementations don't care.
 
user784668
http://stackoverflow.com/questions/8068886/static-field-of-an-incomplete-type-is-it-legal
Is this a good (or good enough) question? You know, it's my first, I'd like to know whether I've done some glaring mistakes or not.
 
5:54 PM
It's not a wall of code, that's something.
 
user784668
Hehe, yeah.
 
9
Q: Static field of an incomplete type - is it legal?

FanaelIs declaring a static field of a type that is incomplete at the moment of the class definition legal in C++? For example: Foo.h: class Foo { public: // ... private: class Bar; static Bar something; }; Foo.cpp: class Foo::Bar { // ... }; Foo::Bar Foo::something; // some more code ...

@Fanael This looks more attractive in the chat ;)
 
user784668
Yeah, I know, I know, the chat engine just didn't realize that it was a link to a question.
 
cpx
@FredOverflow Nice question +10
 
user784668
And it didn't realize because I've put something else in the same message, so I can't blame it.
 
6:02 PM
@cpx not mine
 
user784668
Mine, actually.
 
cpx
oh i got reference wrong
 
And now you can't reseat it, because references are always const ;)
 
user784668
So, have I done something wrong?
 
Rule of thumb: someone would point it out and/or downvote to oblivion if there were something wrong with the question.
 
user784668
6:19 PM
Oh my.
 
user784668
4
Q: Can the type difference between constants 32768 and 0x8000 make a difference?

Johan BezemThe Standard specifies that hexadecimal constants like 0x8000 (larger than fits in a signed integer) are unsigned (just like octal constants), whereas decimal constants like 32768 are signed long. (The exact types assume a 16-bit integer and a 32-bit long.) However, in regular C environments both...

 
user784668
See the Johan Bezem's answer.
 
user784668
void main
 
sbi
@Fanael You can link to answers, too:
3
A: Can the type difference between constants 32768 and 0x8000 make a difference?

Johan BezemYes, it can matter. If your processor has a 16-bit integer and a 32-bit long type, 32768 has the type long (since 32767 is the largest positive value fitting in a signed 16-bit integer), whereas 0x8000 (since it is also considered for unsigned int) still fits in a 16-bit unsigned integer. Now con...

 
user784668
Oh, good to know, thanks.
 
user784668
6:23 PM
But really, void main?
 
user784668
Edited his answer so it says int main now.
 
I'd really expect a self answer to something tagged "language lawyer" to be aware of that
 
user784668
oh
 
user784668
Darn, I can't dismiss my upvote on the question now.
 
sbi
Mhmm. I fail to see how this answers the question. Is it just me?
 
user784668
6:30 PM
I gotta go.
 
user784668
Goodbye.
 
@Sbi - I tend to agree, but I wouldn't say it's NAA flag worthy. It doesn't add anything over the other "GOTO consider harmful" reference which was posted 6 hours before it
 
All those people banning goto must have a real fun writing C code.
 
sbi
@awoodland Actually, this was the guy who, I think, brought up Dijkstra in the first place.
 
@sbi yeah, it was
reading comprehension isn't his strongest suit, is it?
If there's one thing worse than a Java programmer, it's a Java programmer who read, but didn't understand, Dijkstra
3
 
sbi
6:38 PM
@jalf No, obviously not.
 
I love the idea of describing something that's useful enough to want to write it again as parasitic infestation
 
sbi
@awoodland This furriner here failed to parse that.
 
I presume it goes like this: "Oh, who's that Dijkstra guy? Oh, he's important. Oh, he said GOTO is bad. GOTO IS EVIL DON'T USE GOTO."
 
"Sir, I think my karma may have just run over your dogma"
 
sbi
Wow, Programmers.SE is a strange place. My answer today stormed my personal answer hit list on PSE within a few hours, thereby overtaking the one which did the very same only last week. It's now almost twice as high as the most-upvoted answer I managed to get in >2 years on SO.
I don't get this.
 
6:41 PM
"Sir, I think my car-ma may have just run over your dog-ma"
 
Yay! The SO stylesheets aren't blocked on my school's network anymore!
I missed you all.
 
@sbi - I'm still slightly shocked that my slightly flippant "it's neither" answer to that "is this code C or C++?" question got > 200 upvotes on SO proper
 
sbi
@Maxpm Might have something to do with what balpha just did.
@awoodland 200 upvotes on SO? Holy cow!
 
@sbi Maybe, indeed.
@awoodland I'm pretty sure I upvoted that.
It's the same kind of thing as the Don't Parse HTML With Regex™ answer.
 
@Maxpm - The email regex question and top answer is one of my all time favourite "Parse" X with regex questions: stackoverflow.com/questions/703060/…
 
6:54 PM
I accidentally deleted my local repository after resetting my online repository... Wonderful.
 
@awoodland It's more surprising that the question itself has net score of 70.
 

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