« first day (473 days earlier)      last day (4458 days later) » 

12:00 AM
Actually... heuristically speaking, the answer to that is yes, but not guaranteed.
Because if you allocate anything large, it will be zero'ed by the OS. So in that sense, you already know it is zero.
 
> Yes. If you're prepared to make add O(1) complexity to your write operations.
I think Oli is really tired.
 
lol, it was O(n) before the edit...
lol, this question. Closed with prejudice on SO:
-5
Q: How does hacking work?

FarhadI am specifically talking about web servers, running Unix. I have always been curious of how hackers get the entry point. I mean I don't see how a hacker can hack into the webpage when the only entry method they have into the server is a URL. I must be missing something, because I see no way how...

 
Hi
 
Is now #1 on the StackExchange Hot List.
10
Q: How does hacking work?

FarhadI am specifically talking about web servers, running Unix. I have always been curious of how hackers get the entry point. I mean I don't see how a hacker can hack into the webpage when the only entry method they have into the server is a URL. I must be missing something, because I see no way how ...

 
Wait, what?
 
12:10 AM
reposted IE Security
 
Love how PHP is all over that page.
 
posted on February 01, 2012 by Scott Meyers

I just added coverage of enhanced enums (e.g., enum classes) and new alignment controls (alignof, alignas, std::aligned_storage and std::aligned_union) to my C++11 training course, and during the course of my research into and testing of those features, I made some minor updates to my summary table of C++11 support in gcc and MSVC. The new slides will be included in the published version of my

 
Xeo
> my summary table of C++11 support in gcc and MSVC
Y U NO MENTION CLANG? :(
Oh wait, it does.
 
Xeo
I like how no compiler has inheriting constructors yet
 
12:22 AM
Yeah, that is annoying.
 
Xeo
Woot
Is the puppy here?
 
Plink him.
 
Xeo
@DeadMG: plink
 
Whose idea was it to swap arguments of fputs and fprintf?
 
what?
 
Xeo
12:24 AM
Seems there's an llvm project for a linker going on - lld :)
 
the only thing I've seen that even vaguely resembles such is "Call the GCC linker"
 
Xeo
Like I said, it's a project not yet finished or even usable.
 
I am aware of such a thing
 
Xeo
Also, it was named "lold" at some point - LLVM Object Link eDitor
lol'd
 
It's silly that GCC has alignof but not alignas.
 
12:28 AM
merely questioning why it required interrupting me from what I wasdoing
 
Especially given that it already has __attribute__(__aligned__(n))
 
Xeo
@DeadMG Didn't know that you were aware of it. :P
 
well, if it's not usable, then I don't care
 
Why can't static member variables be constructed with private constructors? Seems like they should be able to
 
what?
 
12:39 AM
For instance, class A { public: static A blah; private: A(int a); int data; }; then A A::blah(4); doesn't compile
At least, on VC++ (that could be the problem)
 
Xeo
@SethCarnegie No, it seems that they shouldn't. Why treat static stuff differently? The constructor's private, off limits for you, period. :)
 
@Xeo Members, even static members, are members, and therefore have access to all private functions.
 
@Xeo But it's on the class.
 
Xeo
Hm. Okay, yeah.
 
Ah wow stupid, I put const on one and not on the other, sorry
 
12:41 AM
Ah well...
 
No, as usual, it's me :)
 
@SethCarnegie Ah, so PEBKAC then
 
PICNIC has a nicer sound.
 
@DeadMG Precisely
 
When I see that I wrote large amounts of complicated code with no comments, I sometimes add a comment saying "this is a comment". Does that make me a bad person?
 
12:48 AM
Yes.
// This is bridge is bad (abstrusegoose.com/432).
13
 
@MooingDuck no that's orthogonal
 
1:09 AM
Hey, I have a C question would anybody mind if I asked it here?
I can't find a C room...
Oooookay... I'll ask it
I have a really weird bug
and I can't track it down
here's my code...
while((Vmag(point)<12.1)*(distance>.0001))
{
distance=DE3(point);
Vscale(distance,dir,temp);
Vadd(point,temp,point);
n++;
}
so I'm raymarching some graphics
but when I do this...
while((Vmag(point)<12.1)*(distance>.0001))
{
distance=DE3(point);
Vscale(distance,dir,temp);
Vadd(point,temp,point);
n++;
}
distance=DE3(point);
 
it freezes... Huh?
Why would it suddenly freeze, I can show more code if you like...
 
while((Vmag(point)<12.1)*(distance>.0001))
@EthanSteinberg ha, bad timing
 
What about it?
Is there something wrong with that line?
Vmag finds the magnitude of a vector
 
That will loop until the result of the multiplication between Vmag(point) < 12.1 and distance > .0001 is 0
 
1:15 AM
Right
which means AND
 
Ok just making sure
also why not do &&
 
because I'm a noob
 
user406009
@BigEndian Run your code in a debugger. Kill it when it freezes. Give us the line it was frozen at.
 
Tried that, failed to figure it out
 
user406009
Well, where was it stuck?
 
1:16 AM
if I don't add that line it works fine, let me show you what I made
It's a fractal...
But why would that line not work outside the while loop if it did inside?
 
user406009
Well, you have to tell us what DE3 is doing.
 
DE3 is a distance estimator
I can give you the code for it...
basically it takes a point and finds the distance to the nearest point in the fractal
 
user406009
Truly, this is more of a job for a debugger.
 
user406009
People are mainly only helpful with design.
 
But my debugger shows me assembly, is this normal in C?
 
user406009
1:19 AM
No. Get a better debugger.
 
user406009
GDB works perfectly on *nix.
 
Oh...
*nix being linux?
or... what
?
 
user406009
*nix representing unix style OS's such as linux.
 
user406009
A Unix-like (sometimes referred to as UN*X or *nix) operating system is one that behaves in a manner similar to a Unix system, while not necessarily conforming to or being certified to any version of the Single UNIX Specification. There is no standard for defining the term, and some difference of opinion is possible as to the degree to which a given OS is "Unix-like". The term can include free and open source operating systems inspired by Bell Labs’ Unix or designed to emulate its features, commercial and proprietary work-alikes, and even versions based on the licensed UNIX source code ...
 
Okay, call me a noob, but I'm not sure of my PC is UNIX based
I would assume it is
since linux and windows are similar in structure
 
user406009
1:21 AM
Well actually the problem might be instead that you are compiling in release mode.
 
user406009
Might not be a problem with your debugger.
 
Ah now I have no idea what that means
wait
I do
as opposed to debug mode?
I did get a warning saying that my project had no debug information
 
user406009
Yeah. You want to compile in debug mode for using a debugger.
 
Cool, stick around a bit if you will, I'm going to try figuring that out
Ah
What do I want
or fill
only line numbers
Ah
My chat is screwing up, hang on
Only line numbers or full?
 
user406009
No idea. Full sounds "better".
 
1:26 AM
Okay, it's still giving me the same error and giving me assembly
what is the difference between building and compiling?
I'm a self taught programmer... I learn by reading code. So some of the basics still elude me.
 
user406009
That's not really a "programming" question.
 
Yeah, kinda is... Could you answer it anyway if it isn't?
 
user406009
Building is whatever your IDE defines it to be. Usually it means compiling whatever has changed.
 
lol
Ah
I see...
 
user406009
Compiling is when a compiler takes source code and turns it into some sort of object code(or byte code).
 
1:31 AM
Okay that... yeah
Is byte code machine language?
No
it's higher level
Okay... So there is an intermediate step between code and machine code
 
user406009
Byte code would be the stuff Java gives you. Object code is the direct machine stuff.
 
user406009
The difference between the two is not very important at all.
 
Python also has byte code
And that is a very big important difference
 
user406009
Yeah python has byte code. C# as well.
 
CodeView format, COFF format, or both?
 
user406009
1:34 AM
No idea.
 
Tried both and I'm still getting assembly... :(
It says call which makes me think it's a stack issue, other than that still lost
I just froze my IDE...
What is a MAP file?
Stack Overflow...
YEAH! MY SECOND STACK OVERFLOW ERROR!
WOOOO HOOOO
Why am I glad about this? It sucks...
Oh
never mind
that's just a possible error I could get
...
My error must be really weird...
Is it possible to view local variable values in a debugger for C?
 
user457812
1:50 AM
Pretty sure that's doable in all popular C and C++ debuggers
 
WHat about unpopular ones? LOL
I'm using PellesC
 
user457812
Read the manual.
 
C? gtfo
 
oh it is totally possible :)
found it
Hey, sorry. I couldn't find a C room to chat in
 
well, I'm sorry about that, but it's not my problem
 
1:52 AM
Don't be rude, come on.
 
you are filling the room with spam
before nil spoke, about the last 11 messages in a row were yours
not OK
 
user457812
Yeah, let me do some spamming.
 
Nobody else is talking... It's not like that should bother anybody, but I will stop. And it's not exactly spam. Spam is pointless, usually trolling.
 
Spam is "anything that shouldn't be here"
 
Okay, maybe you can help me...
 
1:55 AM
I probably could
but I most certainly won't
 
only the last line here fails
 
if I wanted to help people with their problems at this precise moment, I would view the questions list
as that is what it is for
1 message moved to bin
 
This is all inside a for loop. It only fails the seventh time...
ah wait, where did my code go?
 
I killed it
 
Why?
 
1:56 AM
because, as I previously stated, it does not belong here
 
Why
 
if you have a generic problem, ask a question
that is what the "Ask Question" button is for
 
I have
 
how can I write _something differently? Can I make it using some notifications?
 
I don't know enough about my question for it to be considered a question apparently
 
1:57 AM
like std::string _something;
 
It was marked as not a question
 
link?
 
Here, I'll show you something, I'll link in a sec
I'm rendering fractals
 
I care about that why?
 
but I can't seem to get my surface normal code to work
 
1:58 AM
what is another solution of writing declarations like this " int _name " ? How to substitute _ ?
 
so I need help
 
so ask a question
if you don't know why your question sucks, then ask on Meta
that is what it is for
or link me to the question and I might throw you a tip
 
0
Q: C printf makes previously broken code work

Big EndianI am rendering a 3D fractal in C, and with the addition of code to calculate surface normals, the code stops working (no error, no weird result, just freezes). If a printf statement is added in, as below, the code continues to run, but it is too slow to get a result in a reasonable time period be...

 
ok
 
Check out your update constant. i.e. time variable that handles process manipulation of your app.
 
2:00 AM
so you posted two walls of code with very little explanation of what they do or where the error might be
 
What do you mean by process manipulation
 
@DeadMG note the linked duplicate
 
do you have update method?
 
Yes yes, I know I posted my question twice
 
from what I can see render() is just fine.
 
2:01 AM
Yes I do, but it freezes during the first time...
 
it renders three sicle cubes and makes iterations of it.
show us update.
 
Not a cube
 
square or whatever it is called in english
 
@BigEndian You need to use a debugger and narrow down the problem.
 
look
you need something more specific than "Look at my poorly-explained wall of code"
 
2:02 AM
I have tried using a debugger, but it gives me assembly
well
I'm wondering what some possible reasons are
tthat the same function
 
then get a new compiler
 
A debugger is the way to find bugs.
 
with the same arguments passed to it
may succeed in a while loop
 
You really need to get one working.
 
but fail outside of it
 
2:03 AM
Without that, you're left with guessing.
 
you need a debugger
 
And that's not productive.
 
obtw, hai robot
 
well, I'm guessing that a debugger means a new IDE
 
2:03 AM
if your current one is broken
then yes, of course it means a new IDE
 
which means a new compiler... and everything
 
because your current one is obviously not fit for duty
your tools are broken
it doesn't matter how much it's going to cost you to move to a new compiler
because you have no choice
 
What's your OS? Windows? OSX? Linux?
 
Windows
 
You have a lot of choices: you could get Visual Studio Express, QtCreator, Code::Blocks...
 
2:06 AM
Okay... But Visual Studio is C++ right? I want to work with C for now
 
Try Code::Blocks.
 
Code::Blocks is just an IDE and it comes with no compiler. I could not get a compiler to work with Code::Blocks
 
Visual Studio can work in C as well
 
Hmm, how?
 
there's a setting for how to compile which file
 
user457812
2:07 AM
Is there a particular reason you have to use strictly C?
 
I'll try that
 
> NOTE: The codeblocks-10.05mingw-setup.exe file includes the GCC compiler and GDB debugger from MinGW.
 
but more importantly, why on earth would you use C if you could use C++?
 
Um yeah... I've become slightly disenchanted with classes...
 
yeah
 
user457812
2:08 AM
You could just use C++ and pretend classes don't exist..
 
they only possess the power to make your code readable, and correct, and fast
 
user457812
I don't know why you would, but it's an option
 
I mean, who would want that?
 
@nil You mean, like C?
 
I'm a hobbyist programmer, not a practical programmer
 
user457812
2:08 AM
@RMartinhoFernandes Like C, but with the benefits that C++ provides.
 
Whatever floats your boat. But you do need a debugger.
 
I used Python for a while... A long while... And just got kinda burned out with classes
 
mostly that
 
Yeah... Working on getting this into Visual Studio first
 
user457812
I don't know how you'd get burnt out on classes though
 
2:09 AM
class Fire {};
 
user457812
Like, it's a construct that you choose to use, if anything the issue is just with your code
 
I just want a break from them after Python
it's a different kind of programming without classes
and I seem to enjoy the challengw
 
user457812
Not really.
 
*challenge
yes... really
 
user457812
You'll just invent stuff to do what classes do
 
2:10 AM
Exactly
and that's kinda fun
 
user457812
It is, but from someone who's done that, it's also kind of stupid
 
stupid yes, but I'm not exactly trying to be smart about it
I'm doing this for my own entertainment, and I happen to find classes very NOT entertaining right now
 
user457812
But you're replicating them >_>
 
What classes? Not often really.
What is stdafx.h?
 
Precompiled header.
 
2:14 AM
Hmm... weird...
 
If you don't know what that means you probably don't need it. It's safe to delete.
 
So can I just stick my C code into a C++ compiler?
 
Visual C++ has a C setting
 
You probably need to set some project settings to tell it to treat the code as C.
 
I can't find that setting though...
 
2:16 AM
> Yes, you can. Go to Project and Properties, then somewhere in the myriad of options you'll see "Compile as C++" where you can change it to "Compile as C". And while you're at it, change the source file extension to .c instead of .cpp.
 
user457812
Or just use gcc (from mingw) via the command line.
 
can I use a debugger with that
Because I have compiled using gcc on linux before
Ah, sorry, gtg
 
Did I mention I like <chrono>?
 
Xeo
I find it interesting that they're using namespaces inside the std namespace, namely for placeholders and chrono
 
For chrono it gets annoying pretty quick.
 
Xeo
2:29 AM
> I can do it using gettimeofday() but it will be to easy, so I try to achieve it using std::chrono.
Masochist?
 
No, gettimeofday() is not the "too easy" version.
chrono is.
 
Xeo
Well, he made it sound the other way around. :P
 
Well, it seems people complain chrono is hard to understand. I disagree, but I'm just one.
 
Xeo
It's also interesting that chrono has all those abbreviations inside it.. rep, den, ...
 
Maybe I should write something about that. Get my blog some activity.
 
Xeo
2:32 AM
I actually don't quite understand chrono too, so that'd certainly be appreciated. :)
 
Oh, awesome, Howard wrote a library for I/O of chrono types! home.roadrunner.com/~hinnant/bloomington/chrono_io.html
Why didn't I find this before I wrote mine?
 
2:46 AM
@RMartinhoFernandes Reinventing the wheel is FUN!
 
I didn't reinvent it.
I parallel-invented it.
Or something.
 
Xeo
No, you just didn't know you reinvented it. Until now.
 
Tatatam.
 
Well, mine is just much less powerful, giving it have the advantage of fitting in one screen.
 
Xeo
I wonder if it's okay to ask a question on SO, that is mainly fishing for an answer from Howard...
 
2:50 AM
His is much smaller, it's just #include <chrono_io>.
 
Hello everyone. I'm new to stackoverflow.
 
Hello there.
 
Am I allowed to ask C questions here?
 
@EtiennedeMartel And mine #include "wheels/time.h" Not that longg.
 
@RMartinhoFernandes Tututu.
 
2:50 AM
Fuck. I can't fix that.
 
Life is sad without cassonade.
(I know "cassonade" is a French word, but hey, it sounds better that way)
 
Don't worry, I can handle French.
@LearningC It's best to ask on the main site first, unless it's something really minor. Some of the denizens here are not very fond of C.
 
I'm not very fond of C.
 
There you go.
 
Oh ok.
Back to cassonade, what is it?
Sugar?
 
2:53 AM
Brown sugar.
 
Oh I've had that before, but just called it brown sugar.
 
Yeah, I figured as much.
 
Probably because you don't speak French ;)
 
That.
We're quite the international bunch.
 
So sugar makes you happy.
 
2:55 AM
Of course it does.
 
The girls at my school makes me happy
 
Yes, but that's different.
(I mean a different kind of happiness)
 
@LearningC Perhaps you're in the wrong chatroom. Were you looking for "I like to C++"?
 
Tony talks about sex all the time.
 
wait wait wait. How did you get sex out of what I said?
 
2:57 AM
You mentioned girls and happiness in the same sentence.
 
Well, I assumed you were an heterosexual male.
 
lol
 
If you're not, I apologize.
 
@LearningC Better ask your question before this derails and people start posting xkcd/tvtropes/cat links.
 
lol
 
2:59 AM
@KerrekSB At 22:00 EST? I doubt it.
And wasn't TVTropes banned?
 
didn't have a question. I just preparing myself for the semester.
 

« first day (473 days earlier)      last day (4458 days later) »