« first day (534 days earlier)      last day (4406 days later) » 

4:00 PM
@unNaturhal a careful label and goto <ducks under the table>
 
Ell
hi guys
 
@unNaturhal A bool variable who's value you change when you break from the inner loop. Then test it in the outer loop to determine whether or not to break from there. Or a goto.
 
@rubenvb: Ehm, books and teachars teach me that goto for a programmer is like kriptonite for superman, I prefer to avoit xD
@BenjaminLindley: Yeah! This is a pretty idea, thanks :D
 
Ell
English pronunciation rules!
and English spelling is superior to USA spelling
 
@Ell: No offense, but who really cares ?
 
4:03 PM
LOL
 
Ell
@ereOn probably not many people but there is no need to comment on it :L
 
@Ell: Was just asking :)
 
Ell
@ereOn Was just answering ;)
 
@Ell That's like arguing that dog shit tastes better than cat shit.
 
@BenjaminLindley: Actually, it does.
 
Ell
4:04 PM
@BenjaminLindley It does :P
darn, so close :L
 
At first, it seems disgusting, but when you stop looking at it and swallow it for some time. It gets better and better.
 
Ell
how does one put multiple variable definitions in a for loop in c++?
shudder that is grim :L
 
for (int a, b, c; ;)
 
@Ell: I'm not sure one would want that, but if he did, why couldn't he define his variables before the loop ?
 
@Ell Of the same type? Or different types?
 
Ell
4:06 PM
@ereOn if they aren't needed outside the loop and you can declare them in the loop, why bother declaring them outside?
 
If you want multiple types, then probably something is wrong but { int a, b; float c, d; for (;;) { ... } }.
 
@ereOn You'd need an extra set of braces for proper scoping.
 
Is it a risky business to call the WndProc of another app's window directly without using SendMessage or some variant?
 
Why are you typing out loops, anyway?
 
@RMartinhoFernandes: Sure point. I don't have often several variables that just meet this requirement. But why not.
 
4:08 PM
0
Q: Error C2439: member could not be initialized

Matt I get compiler errors in : template<class _Other1, class _Other2> _Pair_base(_Other1&& _Val1, _Other2&& _Val2) : first(_STD forward<_Other1>(_Val1)), second(_STD forward<_Other2>(_Val2)) { } _Ty1 first;...

 
Ell
@CatPlusPlus tilemap rendering? But it's not going well :L
 
What's with people and reading comprehension?
I mean, seriously.
 
@unNaturhal Another thing to consider. If it makes sense for your code, then try to factor out the loops into their own function. Then just use return to break out. Much cleaner.
 
Ell
arghh what the heck is wrong with me? Why can't I do a simple tile-map drawing>.< Today is not a good day :(
 
@Ell So what do you need multiple variables for?
 
4:10 PM
@CatPlusPlus: I guess for non-native english speakers, reading verbose template error messages is twice as hard than a "regular" error message.
 
You're either programmer or you don't speak English.
 
Ell
@CatPlusPlus in retrospect I don't - I'm just having trouble with it :L
 
@BenjaminLindley: I already consider this, but it's a snippet of code not written by me, I was just correcting the code of another person
 
This language is so damn simple.
 
@CatPlusPlus: Sure. I tend to agree. But I guess Chinese native people would disagree.
The two have nothing in common.
One doesn't even have proper words.
 
4:13 PM
What's xulrunner and why is it on my system?
 
(Well they all seem to speak a better english than anyone in my country, so not really a point here :p)
 
It runs XUL applications.
 
@RMartinhoFernandes firefox
 
Like Firefox.
Or Thunderbird.
 
xulrunner is like the Qt of Firefox
 
4:13 PM
Oh so removing it is probably a bad idea, right?
 
in almost all aspects
 
Yes.
XULRunner is bit more than UI toolkit.
 
Why the fuck doesn't firefox have a dependency on it. Crap package tree.
> Starting with version 3.0, Mozilla Firefox uses a "private" XULRunner,[4] meaning the framework is installed locally in the application directory.
 
@RMartinhoFernandes AFAIK firefox ships with its own private xulrunner
 
Oh, that probably means it works...
Well, if I go silent for a while, don't worry. I'm probably reinstalling Firefox.
 
4:15 PM
Note that repo version might not do that.
 
private xulrunner is distro dependent afaik
 
I have no idea why eclipse conflicts with it.
 
Because it's a crappy Java IDE.
(And your package manager sucks.)
 
@CatPlusPlus Nope, package manager seems to be right. Eclipse 3.7 doesn't play nice with newer XUL runner.
It all makes sense after all. Firefox ships its own private xulrunner, and Eclipse is crap.
 
hey, anyone here familiar with CSS ?
 
4:25 PM
Nope.
 
> Not the room in which to ask random CSS questions.
 
@StackedCrooked, there?
@StackedCrooked could you try this slightly modified version of your example and let me know if it works? ideone.com/KE4xU
 
Ell
hi guys
I would work in notepad if I knew how the c++ build system worked XD
 
4:40 PM
@Ell cl.exe and link.exe
 
C++ doesn't have a build system
 
Ell
well I mean make and cmake and scons and the like?
 
@Ell that's linux, not C++
 
Ell
or should I skip that and just go with g++ ...?
 
@MooingDuck both of them are cross-platform
 
4:41 PM
@Ell just go with G++, it's magic
 
Ell
But I have no idea how to use it
 
@jalf I've never heard of anyone using them on Windows except to target linux.
 
Ell
and linking still mistifies me - when I use -L does it statically link te library?
 
@Ell g++ *.cpp <- that's it
 
@Ell depends on the complexity of your code. If you just need to compile a single file or two, you can just invoke the compiler directly
@Ell look at the docs. They describe what the program does ;)
 
Ell
4:42 PM
@MooingDuck if thats all it is why do we need IDE's? besides auto completion?
@jalf haha sorry, will do :L
 
@Ell auto completion, goto defintion, syntax highlighting, debugging....
 
@Ell Autocompletion and other Intellisense tools are pretty damn important
and the IDEs offer more, like debuggers and profilers
 
complex projects and dependancies are hard with the command line too.
 
Ell
ahh yes. Debuggers and me don't mix >.<
 
@Ell really? Visual Studio's is pretty intuitive...
 
4:43 PM
But -L looks like GCC to me. With GCC, -L specifies a library path, so it is one of the places in which the linker will look for libraries. -l (lower-case L) specifies the name of a library to link against. The compiler will try to find it within the library paths it knows of
 
Ell
@MooingDuck I use code::blocks, but its the fact that I don't know what to do with them
 
I haven't used GDB much, but apparently it's truly horrific compared to the Silvery Chariot of Visual C++'s debugger
 
Ell
I just don't understand how you can statically link something if the library was built with a different compiler, yet apparently it works?
 
@Ell there's four key pieces in order: "stop running here", "go to the next line", "go into the function", "I'm done, continue running"
 
Ell
I thought c++ didnt have ABI compatability?
 
4:45 PM
@Ell Depends on the compilers.
 
@Ell it doesn't, don't do that
 
there's nothing forcing it to not work
I know that there is... some compiler, ICC I think, which explicitly produces Visual C++ compatible files
but generally speaking, you're asking for horrific problems
 
@DeadMG yeah that
 
Ell
Its just whenever I download a .a or .so file and link with it using -l it seems to work fine, but honestly linking is a part I just don't understand
 
@Ell That's because they're all built with GCC.
and .so files are a Linux dynamic library format, IIRC, and nothing to do with C++
 
4:47 PM
What's so horrific about GDB?
 
but if you were to take those .a/.so files and try to use them with Visual Studio, you wouldn't get far
 
@RMartinhoFernandes there's no buttons to click on
 
Ell
@DeadMG so .a files are static library files built with gcc?
 
@RMartinhoFernandes I have no idea, but @sbi in particular often speaks horror stories about it
 
@MooingDuck 'Click'? What's that?
 
4:47 PM
@Ell yep
 
Ell
what does visual studio use?
 
@Ell .obj
 
.lib
 
oh, eh, yeah.
 
Ell
4:48 PM
Ahhh okay. Its starting to come together now :L But I swear I never see .lib files for download? or maybe its the fact I always build the libraries.
 
if you dl the Linux versions you won't
 
sbi
@DeadMG I had the "pleasure" to use GDB for debugging in XCode and on several Linux distributions. Compared to VS' debugger it was abysmally. We often spent our time trying to reproduce a problem on Windows, in order to debug it using VS, because in the end that strategy was more effective overall.
 
but if you dl the Windows versions you will
 
@Ell people in Windows usually distribute .dll instead. Very similar in programmer usage
 
@MooingDuck VS still ships import libraries for use with most .dll files
 
Ell
4:50 PM
but .dlls have to be loaded using WinAPI don't they?
 
@Ell nope, they can be linked beforehand. They can be linked using the WinAPI
 
@Ell You can automatically load them by requesting it in your PE file. In addition, the VS linker will automatically load them if you load a static import library
you only have to use LoadLibrary and pals if you need to load one dynamically
 
Just like with dlopen.
 
Ell
But you cant dynamically load a static library can you? hence static?
 
no
 
4:51 PM
@Ell right
 
but .dlls are not static libraries
 
Ell
Right :)
 
they are dynamic libraries- .so equivalent
 
@DeadMG that answer was ambiguous
 
@MooingDuck There was only one stated question between my previous statement and that one
@sbi I knew you were the right guy to plink about the horrors of GDB :D
 
4:52 PM
Han Solo and Lando were the only things the prequels didn't ruin. Now LucasArts is fixing that. http://youtu.be/4OnDizZ7UT0
Sanity warning: Wear goggles.
 
"But you cant..." "no." <-- Ambiguous. No you can't do that? Or No the statement is wrong?
 
Ell
Another issue that confuses me is, are .sos, .as, .objs, and .dlls handled by the operating system? As in are they treated specially? If I wrote my own programming language that didn't link with C, could I just use my own library format? I heard that operating systems tend to load libraries in memory but are clever enough to not hold multiple copies
 
@MooingDuck It's a question, not a statement.
 
@Ell For windows, dll are an OS thing. .lib and .obj are a Visual Studio thing.
 
@RMartinhoFernandes I was going to go to sleep but now I'm afraid of having nightmares.
 
4:54 PM
"Can you dynamically load a static library? No."
 
sbi
@DeadMG I was the one who wrote TMP code, and GDB usually failed to debug this. It either couldn't debug into templates, or jumped into the wrong instance, or failed otherwise. Maybe it's gotten better since then, but the last time I had to use it (2008?, on some Linux platform) there was little improvement.
 
@LucDanton I'm still hoping I'll wake up at any moment.
 
to write UI in Lua or C++?
 
Ell
@MooingDuck right, .dlls are OS, other stuff is not
 
> kill it before it lays eggs!!!!!!!!!!!!!!!
 
4:55 PM
@Ell And .so on Linux
 
@sbi XCode doesn't have its own debugger?
 
sbi
@robjb It does. It's a GUI over GDB.
 
Ah, alright.
 
Ell
Right, now I will google exactly why .dll and .so are special :D
 
@Ell They're special because they're the operating system format.
 
Ell
4:58 PM
@DeadMG what do you mean the "operating system format" exactly?
 
@Ell When windows loads an exe, it looks up which dlls it requires and loads them into the exe's memory as well, so the exe can use those functions as if they were it's own.
 
@Ell The file format is specified, and the loaders/etc provided by, the operating system
 
Ell
and only loads one copy of it?
 
and they are inherently language/toolchain agnostic
@Ell Not necessarily. It can avoid loading multiple copies sometimes... but that's not very likely these days.
 
Ell
right
 
5:00 PM
@DeadMG really? I've never heard that
 
@MooingDuck Rebasing destroys it.
sharing the DLL between processes can only work if it's mapped to the same address in both processes
but if some other DLL took that address, or it's already mapped to the heap, or it's been rebased for any reason, then bye-bye sharing
 
@DeadMG I wonder how often that happens
 
it's common to employ starting address randomization to protect against attacks
 
also, the linux trick of putting all code below 0x00ffffff is clever
 
5:05 PM
what's special about below 0x00FFFFFF?
 
@RMartinhoFernandes en.wikipedia.org/wiki/Rebasing "Some security extensions to Linux/x86 use rebasing to force the use of code addresses below 0x00ffffff in order to introduce a 0x00 byte into all code pointers; this eliminates a certain class of buffer overflow security problems related to improper checking of zero terminated strings, common in the C programming language."
 
aah
 
@DeadMG compensates for some small cases of stupid
 
so basically, "We hacked around the fact that C sucks and we're too stupid to notice by implementing the hack in the operating system"?
 
@DeadMG Windows does things too, starting with Vista. If it notices a buffer overflow, it will add extra padding before and after heap allocations for that process from then on
 
5:08 PM
@MooingDuck Exactly what class of buffer overflow problems?
 
@MooingDuck Why not just crash the offending process?
 
@RMartinhoFernandes Wikipedia didn't say
@sehe people don't like when the OS won't run their programs, remember Vista? This helps it hobble along a little
 
Because, unless you're using function pointers all over the place, it seems unlikely that your buffers will be sitting next to a code pointer.
 
Ell
why does c++ use .dlls?
 
@RMartinhoFernandes I dunno
 
5:09 PM
@Ell It doesn't. Windows uses .dlls
 
The spice must flow.
 
@Ell .dll is a windows thing, not C++.
 
Ell
sorry :s
 
technically technically speaking, you could write your own dynamic library format
 
@MooingDuck No it doesn't. It hurts. Because it encourages sloppy programming
 
5:10 PM
and use that instead
@sehe See for example: HTML :(
 
@DeadMG Wut?
 
@sehe And sloppy programming leads to security vulnerabilities, and that leads to something and that something leads to the dark side.
 
Ell
when you are writing a c++ dynamic link library, dont you have to do extern "C" to prevent name mangling etc?
 
@sehe HTML is the canonical example of why the whole defensive programming thing doesn't work.
 
sbi
@DeadMG But that's what all those "attack protections" are about: protecting against stupid programmer errors. Lot's of code are still either written in C or written in C+-, and keeps shelling out those errors leading to exploits. All the security measures in all the operating systems are just working around buggy code.
 
5:11 PM
@RMartinhoFernandes Capice
 
@Ell yes, if you need to prevent name mangling
 
because original browsers were liberal about what HTML they accepted, now we can't make HTML strict a'la XHTML, because it would break too many existing sites
 
@DeadMG Ah, that way. That isn't even remotely as serious as the security implications
 
@sehe <b><i> TEXT </b></i>
 
5:12 PM
@sehe Of course not. But it's still the same basic principle- if the programmer makes an error, and you have the capacity to detect it, you can't ignore it or try to protect them from it.
 
@DeadMG I was going to say "or issue a warning", but then I remembered how well that works :/
 
"Hey this program is trying to hack your Facebook photos. Press Retry to debug. Abort, Retry, Ignore?"
 
sbi
@sehe Technically, Acrobat should reject a considerable amount of all PDFs it's fed, because they are Wrongâ„¢. Would you want it to do that to you? Or would you rather it keeps silently ignoring bugs in PDF files and fixes them behind your back?
 
@sbi Eh, I'm not sure it's the same thing. Security in general is a seriously complicated issue. Not overflowing your buffers isn't.
 
@sbi if it didn't do that, there wouldn't be so many that are Wrong
 
sbi
5:14 PM
@MooingDuck Also, PDF wouldn't be such an insanely successful file format.
 
@MooingDuck The point is, if it had never done that, there wouldn't be any that are wrong to begin with, because all those guys making them would have fixed them. Or given up. But now it's too late.
 
@sbi that's your argument then.
 
@MooingDuck The PDFs must flow.
 
sbi
@DeadMG It's not to you, and not to me, but apparently it is for thousands of programmers. It's not that MS or Apple or Adobe or whoever employs too many stupid programmers, after all.
 
@sbi I'd argue more relevantly that it's simply down to bad tools. It's relatively hard to overflow your buffers from C#, for example.
 
sbi
5:17 PM
@MooingDuck No. I am just stating the facts. If Acrobat hadn't been so forgiving, the PDF format would never have been so successful. Writing PDFs is insanely hard as it is, compared to writing HTML, XML or other popular formats. Acrobat ignoring the glitches of applications trying to do so anyway is the reason we are now even talking about it here.
 
@DeadMG Because there are protections in place.
 
it's also pretty hard, although admittedly far from impossible, to overflow your buffers with std::string
but that risk is much, much higher if you're still strlen ing about the place
 
sbi
@DeadMG Of course it's down to bad tools. (In that regard, the C++ std lib is a good tool, while the C std lib is a bad one.) I never said otherwise. But those bad tools are used (and moderately good tools are used badly), despite us knowing about it.
 
@DeadMG std::string s; s[1000] = 'x';
 
why . is . this guy so rude?
 
5:19 PM
@RMartinhoFernandes that's using the "C interface to std::string" if you can say such a thing.
 
I generally hate grumbling about people, but this person just loves pissing me off.
 
@RMartinhoFernandes Unlike in C, if you run that with a debug STL implementation, you will get an error. But more importantly, you actively had to go out and go beyond the bounds deliberately. In C it's vastly more likely when doing regular processing.
 
You linked to three Java questions?
 
@RMartinhoFernandes yes.
to comments.
 
I flagged that guy
he's as bad as those pricks over at Programmers
 
5:21 PM
Well, he kind of has a point
If you can't program Java, shut up about it.
 
@rubenvb what?
 
sbi
@IntermediateHacker Why haven't you simply flagged him for that?
 
I'm thirsty.
 
@IntermediateHacker Yeah, he's rude. Has a point on the second one though
 
Ell
@RMartinhoFernandes me too
 
sbi
5:23 PM
@rubenvb You might not have noticed that not all those links go to answers. Surely, SO is a place to come to and ask, if you don't know about programming? Or has that changed while I was out in my garden over the weekend?
 
@rubenvb that's... not a valid point
 
@rubenvb yeah. If you can't program Java, shouldn't you ask about it?
 
Ell
If you don't ask you wont get answers so how are you supposed to learn?
 
@sbi no of course, not, but you can't expect everyone to love your java bashing, or ignorance... Hey the comments are gone
they changed something
 
5:26 PM
the comments are gone!
 
teen paranormal romance
how are people going to get girlfriends in the future? Vampires aren't real, stupidz!
 
@rubenvb Fiction isn't real, stupidz.
 
@RMartinhoFernandes romance equates to expectations , which equates to... more emo's!
 
sbi
@rubenvb That's likely because the puppy and I (and maybe someone else) flagged them.
 
I like how there's The Gathering Storm on the top shelf.
Surely a classic example of teen paranormal romance.
 
5:28 PM
@RMartinhoFernandes NOM!
 
sbi
@RMartinhoFernandes I suppose my teenage daughter would like that shelf.
@RMartinhoFernandes What book is that?
 
@sbi Book 12 of the Wheel of Time series.
 
@RMartinhoFernandes the cover is different though, is that WoT or not?
 
Or something.
 
@RMartinhoFernandes I don't think so.
the gathering storm
 
sbi
5:30 PM
@RMartinhoFernandes Ah, I heard of that. Never read it, though. Is it any good?
 
@sbi is the pope white?
 
@DeadMG Erm.
@sbi Dunno. I'm weary of picking up a 10+-book series.
 
sbi
@rubenvb Are you talking of his skin color? His vest? His conscious? If it's the former, he's a German, of German ancestry.
 
Especially after people whose opinion on books I value tell me that the middle is boring as heck.
 
@sbi you're awfully <s>pedantic</s>humourless today. WoT is an awesome series. I haven't finished it yet, currently at book 8
 
5:32 PM
@RMartinhoFernandes still better than LotR
 
the striking is brokened!
 
@DeadMG I get it.
 
5:33 PM
@rubenvb A large amount of the WoT series is "Rand dicks around in Cairhein".
 
by the way, not Wheel of Time. I found it.
 
@MooingDuck You're late.
 
sbi
@RMartinhoFernandes There's that, yeah. OTOH, I sometimes love it when I find a new, good author, and have a dozen new books in front of me to read.
 
@RMartinhoFernandes No, the second one is a parody. It's funny, not in the "this makes me sick" kind of way.
 
@DeadMG at that point, it's the other characters who are interesting, yes. There's a lot of "main" characters. Makes the story interesting/unique.
 
5:34 PM
not really
 
@RMartinhoFernandes I'm laggy is what I am
 
between about book 5 and book 9, practically nothing at all happens
and then in book 9, something interesting finally happens, like, one thing
 
@DeadMG Right, that's what I've been told.
 
and then Robert Jordan kicked the bucket and now things are actually happening again
 
@DeadMG besides four wars, several assassinations, and Rand changing major aspects of magic itself?
 
5:36 PM
aaargh
spoilerz
I'm outta here.
cya
 
@rubenvb only kinda and he announces he's going to do it like 5 books ahead of time
 
sbi
4 messages moved to bin
 
@MooingDuck Woah, that makes it sound even better.
 
sbi
You're not being fair, @Dead.
 
you're right, I hadn't really noticed that he said he was only on book 8
 
sbi
5:38 PM
@DeadMG That's not all. Several here have expressed interest, but haven't read the books yet.
 
@sbi yeah, I'm bad at avoiding spoilers :(
Luckily my GF loves spoilers, works well.
 
sbi
@MooingDuck So you spoil her?
 
@sbi yes
 
sbi
@MooingDuck You know that, going that route, you'll end up with a very spoiled woman, don't you?
 
> "Fire!" isn't the worst thing you can yell in a crowded theater. It's "Bruce Willis is dead".
 
5:42 PM
@sbi yeah
 
@sbi Sure, but they're hardly detailed revelations. It's about equivalent to stating "In Star Wars, Luke and Darth Vader fight!" and "Stuff gets blown up with lasors!". You could probably have realized that by reading the appropriate blurbs.
 
Vader is Luke's father.
There, I ruined the best movie for someone.
I feel bad now.
Jar Jar doesn't die.
 
more importantly, if you want to know what happens, then ... read the books. They're like, nearly 20 years old. There's a point where you generally expect people to have read them by now if they really care about the plot.
 
@DeadMG There's also a point where you can't read everything.
I might be busy reading other stuff.
 
@RMartinhoFernandes nooooooooooooooo
 
5:45 PM
@RMartinhoFernandes I didn't think those movies were that bad the first time I saw them, but then I tried to watch them again like 3 years later and could not sit through episode 2
 
true
but then, arguably, you've chosen to prioritize other plots over this one in the last twelve years, so it probably shouldn't be that important to you
 
@DeadMG What if I'm only 16?
 
didn't stop me :P
 
@MooingDuck See, I just ruined the worst movie for you!
 
Spoiler: Jesus dies at the end of "Passion of the Christ"
 
sbi
5:48 PM
1
Q: Is it safe to return a pointer to a string to the caller?

sbicommented: Note that, actually, you are writing C code, never mind std::cout. This has disadvantages. One of those is that string handling is rather complicated and dangerous. (For starters b should be a const char*; callers trying to modify it will blow up the earth. Returning a would be a disaster, too, and returning a dynamically allocated array of chars a maintenance nightmare.) Have you considered using std::string? Do so, and those problems simply vanish.

 
A monster bursts out of Kane's chest.
 
sbi
^I always feel bad pointing this out to newbies. Their teacher might require them to write such code. But it's bad code nevertheless.
 
@sbi Woo, comments onebox now!
 
sbi
@RMartinhoFernandes Wow, and you didn't know?! @jalf was looking down his nose at me this morning, because I didn't.
 
Guess it's my turn now.
 
sbi
5:51 PM
@RMartinhoFernandes To look down at me? Why?? What have I done?!
 
To be look down upon.
Or some other combination of those works that makes sense.
 
sbi
@RMartinhoFernandes I failed to parse that.
(But, as I learned from you, I waited for two minutes to point this out).
 
@sbi As I tried to make clear in the following message (chat.stackoverflow.com/transcript/message/3149009#3149009), I failed to parse it too.
And now I noticed that failed at that too.
> Or some other combination of those words that makes sense.
Damn.
 
sbi
@RMartinhoFernandes Yeah, I was just getting to that.
I couldn't make sense of that either.
 
sbi
5:57 PM
Am I misunderstanding something, or is the UK now really turning into a police state? Do they really want to monitor all Internet communications?
@RMartinhoFernandes Reading the same tweets as I do, are you. :)
 
Ell
I hope it isnt? I was under the impression the US was the one being watched - what with sopa/pipa and hwatever
 
@Ell The whole world is getting a serious case of the stupids.
We need Manfred Macx to set things straight.
 

« first day (534 days earlier)      last day (4406 days later) »