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

00:01
lol
cpx
cpx
00:37
hmm
If ever you’re feeling alone just remember, there’s probably a good reason why.
lol
00:53
I hate people without RAII. Open a door, turn on the light, enter a room, then exit and leave the door open and the light on. WTF is wrong with you?
5
01:11
Mob likes people with RAII, because they clean up after themselves after you kill them.
Sorry, my brain on Oz.
The only interesting assignment on those two lists was an expression evaluator.
But it was so easy I wrote it before I finished reading the assignment, sigh.
And now I have to get up in 4 hours. This is going to be a disaster.
01:33
Hi everyone !
do you guys use g++ or gcc ?
and why ?
g++ is part of GCC (GNU Compiler Collection). gcc (GNU C Compiler) is also part of GCC. I believe invoking gcc on .cpp files compiles as C++, but I use g++ anyway to avoid surprises.
will I get that, but heard about different flags that are invoked when using gcc then g++ or the other way around.
is there anything in your code that has to specific for any of them ?
They use the same underlying compiler.
You may have to pass a flag to gcc to force it to compile as C++, but you don't need that for g++.
And maybe some flag to link to the C++ standard library.
g++ takes care of that.
wait, so gcc -O program main.cpp will compile it as C ?
I think that by default it uses the file extension to detect the language.
01:46
hemmm... Yet I am not sure what is the actual difference
Just tested it. It compiles as C++, but fails during linking because it doesn't link to the C++ standard library.
gcc -c main.cpp correctly produces main.o. However, gcc main.cpp fails to link. You need to do gcc main.cpp -lstdc++ to get a full program.
 
2 hours later…
03:48
morning
04:04
Thanks a lot Visual Studio.
04:38
lol
05:19
@RMartinhoFernandes huh, what's wrong?
For some unknown reason Visual Studio freaked out when saving a solution.
Restarting it solved it.
 
1 hour later…
06:35
9 hours ago, by FredOverflow
Beatiful! I'm gonna go mathturbate!
Great, I cannot even spell "beautiful" correctly :(
lol
excellent work
@FredOverflow that is one tricky word, I always misspell baeutiful ;)
I am not sure how to ask this question, but is there any use-cases where C is the only option and you can't do it with C++ ?
I don't want to start another 'X vs Y language war. and I am kind of well aware of they are differences, So I am not expecting an answer like, OOP vs Procedural and yes I know they are different languages, but is there any situation where you can't do it with C++ or you have to do it the wrong way ?
@OmeidHerat platforms without a (or with a lousy) C++ compiler
or if you have to provide a C API
thanks!
and for the API, it works the other way around right ?
like access C API from C++ ?
C++ can consume C of course
you know this extern "C" { ... } stuff
06:47
yup heard of but haven't actually ever used.
which has a cheaper unlearning cost, learn C first then C++ or the other way around ?
definitely learn C++ first
Don't learn C if your goal is C++
the simple fact is that once you know both C and C++, the parts where you'd want to use your C knowledge are a vast, vast, vast minority
My goal is to learn both, not that I need one for another one.
I know a bit of both, and I am going to go in depth now.
Then learn C++ first. Otherwise, the probability is too high that you will learn an outdated version of C++, sometimes referred to as "C with classes".
06:50
Nice!
that is what I wanted to make sure, which way is the best to learn to treat them as different languages.
You will meet people that tell you "But you need to know how stuff works down below first!". Tell them to build their own transistors and then you'll talk.
Hahaha, good one, I have also heard of write your own compiler :)
or learn machine code.
Also, if you pick a C++ book at random, chances are it will container utter garbage.
720
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 to big and complex for doing this. In fact, it is so big and complex, that there are many bad C++ book...

06:53
1
Q: Building a Linux Kernel with Visual Studio 2010

Eric SeiglerDoes anyone have step-by-step instructions on how to build a Linux kernel using Visual Studio 2010? I've tried to search for the solution to this question directly, but no joy. A few things I have been able to find out: The Linux kernel is built using the GNU C compiler, so a prerequisite woul...

Build everything first!
You have to create your own Universe first, everything else is cheating.
@RMartinhoFernandes wait... build Linux with Microsoft tools ?
Of course, most people don't have the patience to wait several billion years before the IT related stuff in the Universe kicks in.
@FredOverflow If you're building your own Universe, be smart and don't tie yourself down with these crappy physics of ours.
What would you improve, specifically?
Higher speed of light?
06:56
@FredOverflow Lower, make it easy to travel in time :)
Speed of light can be whatever. Just don't make it a freaking limit.
lol
so screw relativity? :)
Hahaha, but they have just found stuff that goes faster then light !
in what medium?
06:58
For example, in caesium, light travels "faster than light", that is, faster then c.
@OmeidHerat No they didn't.
@RMartinhoFernandes they have, but hasn't been confirmed, it can be a random or systematic error.
but at the same time, it can't be!
@FredOverflow I haven't actually ever heard of that, sound interesting to me. I think C is independent of everything, even speed of it's source and observer.
> In other words, there’s no breaking news just yet - just a confirmation that, in the coming months, the OPERA result will continue to be under the scrutiny of the world's scientific community.
@RMartinhoFernandes Yep true, it hasn't been confirmed. so it can be wrong, but it has the same chance to be true!
The same chance?
07:06
Not necessarily, but as we don't have any other information, it's just a flip of coin, so yeah same chance.
Well, I don't really think it's a flip of a coin. Not unless you're ignoring all the previous experimental measurements that imply otherwise.
unless the last research is somehow more questionable then what was used to define the C. which is not, we have more precious and accurate apparatus now then back then.
@RMartinhoFernandes Yes, agree on that.
And many of those accurate apparatus have shown other results.
true, but other result is not necessarily the wrong one.
07:10
It's the less likely one.
There's much more evidence on the contrary.
how so ?
0
Q: multiple exit points

FredOverflowI often talk to Java programmers who say "Don't put multiple return statements in the same method." When I ask them to tell me the reasons why, all I get is "The coding standard says so." or "It's confusing." When they show me solutions with a single return statement, the code looks uglier to me...

We'll see in the coming months if attempts to replicate it produce the same results.
Yup, the only answer is there, in the next experiment.
but for me valuing the current evidence then previous one is a bit subjective as I am not totally sure about any of them.
I'm valuing the results that have more backing data.
More is objective.
07:16
and also, the neutrinos are subatomic and you got the quantum world there !
That doesn't mean "at this level the world stops working".
@RMartinhoFernandes those data is not in the same scale as of the new experiment, we know for sure that particles behave different when they are subatomic.
Quantum theory doesn't help explain those results.
say the weave behavior.
No current theory does.
Not without invalidating previous results.
07:18
it's not invalidating the previous.
Wave–particle duality postulates that all particles exhibit both wave and particle properties. A central concept of quantum mechanics, this duality addresses the inability of classical concepts like "particle" and "wave" to fully describe the behavior of quantum-scale objects. Standard interpretations of quantum mechanics explain this paradox as a fundamental property of the Universe, while alternative interpretations explain the duality as an emergent, second-order consequence of various limitations of the observer. This treatment focuses on explaining the behavior from the perspective...
@OmeidHerat That doesn't explain the OPERA anomaly.
> “After several discussions and a rich exchange of views, the participants in the workshop concluded that - currently - there is no consistent theoretical model that can accommodate the measurement.”
@RMartinhoFernandes not directly, but it supports the fact that things are different when you go to subatomic scale. and thus they can exceed the limit of C.
and also it doesn't mean that the world would stop all of a sudden, we actually never be able to get the exact C, but for sure as time goes along we get more accurate value.
But not "different somehow". It's "different in a way that we have been getting to know very well."
And that way does not explain that anomaly. If it did, there would be no doubt around this.
@OmeidHerat c is not getting more accurate every day.
there is doubt. it's not clear yet.
@RMartinhoFernandes as long as you don't consider time to be the 4th dimension.
What does that mean?
c is fixed. (the metre does change though)
07:25
c will not change for use because our units are actually based on that.
And also, c is based on a theory, the special theory. But the speed of neutrino was found using CERN, based on an experiment.
I don't have the enough of understanding to back any of them, and for me it's like a flip of coin.
both of them can be wrong or right.
Well the special relativity theory was confirmed by zillions of experiments.
It's not just theory.
It's not like this was the first experiment ever.
on that scale, it was actually.
What do you mean "that scale"?
we have actually never did a similar experiment, using a single neutrino and speeding it that fast, slimier to OPERA by CERN.
You mean we never obtained similar results?
(Because there are several labs doing similar experiments around the world, and getting lightspeed neutrinos)
07:35
are trying to do none has done yet that I am aware of.
None has obtained faster than light neutrinos, but many have obtained lightspeed neutrinos.
MINOS has been running for years.
(They had a similar fluke though, but was explained away by statistics)
damn, I have to read more about this.
@RMartinhoFernandes and MINOS sounds interesting.
I am the guy in that comic, except I don't bet money.
@FredOverflow Why do people adhere to anything blindly? Because they're fools.
Also, I like how the [holy-war] tag is fair game on Programmers.
07:53
@RMartinhoFernandes huh ?
Fred's question ends with "Where did this notion of "one return only" come from, and why do people adhere to it blindly?"
People adhere to it blindly because they're fools.
Ah, i see.
Damn you chat, onebox my HTTPS links! Needs a meta feature request.
I should really write some code
and do work
08:02
@Potatoswatter - hi
0
Q: Make chat onebox HTTPS links

R. Martinho FernandesWhen I paste a link like http://www.xkcd.com/975 on chat, it promptly oneboxes the comic. However if I post the HTTPS version of that https://www.xkcd.com/975 it doesn't. This is true for all other oneboxable links from sites that let you access through HTTPS like YouTube. Can we get HTTPS links...

> After realizing his mistake, Alex panicked and tried a wide variety of tasks to fix a remote computer with no internet, which Susan was told probably involved praying to some deity.
lol
Is that a daily WTF?
Yes.
Yesterday's.
thedailywtf.com/Articles/Remotely-Incompetent.aspx I'm not sure who did worse: the "fix remote computer without internet" Alex, or the hosting company that reset the root password of some other company's server.
Gah, why can't I download N3242?
sbi
sbi
08:18
Some companies block https? How dumb is that? I suppose it's done for security reasons", no doubt. Oh my, sometimes this world makes me question my urge to live.
I think it might be to allow them to see the traffic.
Not exactly for security, more like the opposite.
@Potatoswatter Doesn't work here as well. Hmm.
So they can see that Jerry was looking at wikipedia's "vagina" article or whatever.
Okay, thanks.
Has anyone here been nominated for the moderator elections?
You nominate yourself.
@awoodland did.
I did last time around
08:24
ok then, @awoodland has got my vote.
Yeah, but not seriously.
@IntermediateHacker thanks!
that's really quite hilarious, that daily WTF
@awoodland ur welcome. I want a C++ person to be a mod. rather than all those C# guys...
If I were Susan, I'd start by making arrangements to convince management to switch hosting company.
Also, if I were Susan, I'd have boobs.
08:26
@RMartinhoFernandes Interesting deduction.
oh, you've got to be kidding me
him?
Do you think I should find his passage through here and post a link as a comment?
Oh, there's actually more than that.
yep
> Sorry, I don't agree with your candidacy at all. You've been caught gaming the system as a means to farm rep. That's not exemplary behavior (which is something I'd expect from a moderator). – Matt McDonald 15 hours ago
wow , the first guy I've seen here who's even younger than me.
He's also a dick, which I don't think you are.
4
08:31
@RMartinhoFernandes thanks. :)
My university decided today is Friday.
Another friday caption...
lol
Yeah, I guess it's a (so far) short-lived meme.
Oh, they removed the Yearling badge requirement.
they had pundit on the list originally too
I've been awake for 16 hours
and I've absolutely no idea what happened in that time
Sixteen hours passed.
And possibly other things.
yeah
08:44
Alien abduction!
I should have been doing like, 1billion other things
maybe I should actually get myself some help
Help on what?
Getting to sleep?
yeah, and everything else :P
sbi
sbi
09:02
@RMartinhoFernandes Oh yeah, I do. Incidentally you linking to my answer on meta in your comment just got me a bunch of upvotes there. :)
1
A: multiple exit points

sbiThis notion of Single Entry, Single Exit (SESE) comes from languages with explicit resource management, like C and assembler. In C, code like this will leak resources: void f() { resource res = acquire_resource(); // think malloc() if( f1(res) ) return; // leaks res f2(res); releas...

Now really, what languages do you know that don't require explicit resource management?
C++?
WideC! ahahahahahaha
Well, I don't know that :P
as if I would throw the best language feature
This last revision is interesting: meta.stackoverflow.com/posts/24087/revisions
I like how Jeff butchered the post to a manner that some sentences make absolutely no sense.
09:08
lol, i know
use the word "f_ck" when other, less cowardly people would use the word "f_ck",
At first, I thought that was what Welbog wrote (Welbog's sentences making no sense does make sense), but then I saw that Jeff was the last editor.
sbi
sbi
@RMartinhoFernandes Java? :)
they free() their files
@sbi Try opening a file.
sbi
sbi
@RMartinhoFernandes Oh yeah, that was so dumb... "I enforce my piety, no matter what cost."
sbi
sbi
@RMartinhoFernandes "Managing resources" usually refers to cleaning up after yourself, rather than making the mess.
You have to close it manually.
Usually with a try-finally block.
sbi
sbi
Then that's bad, but finally is still less bad than the three "solutions" C offers.
(Java 7 has a (still explicit) cleaner version of try for this though. I don't know if they fixed the loops).
admittedly, finally will run even when you return
09:15
But Java does make it a shitstorm.
so what happens in that good old try { return true; } finally { return false; } joke?
close() can throw IOException.
So you need another try-catch.
try {
    FileInputStream f = new FileInputStream("blah");
    try {
        // do stuff
    } finally {
        try {
            f.close();
        } catch(IOException e) {
            // what now?
        }
    }
} catch(FileNotFoundException e) {
    // oops
}
What do you think of this?
I think it's fat
when it walks out, to get it's mail, it measures on, the Richter scale
Of course, you can just tack throws IOException onto that method and every other method that calls it. That gets you rid of all the extraneous tryes.
ever
09:20
So, pick your poison.
i prefer non-poison
Yeah, me too.
Oh, apparently, Java 7 has the loops fixed since 18th October.
lol
gg op no re
Funny, they didn't put it into the release notes of Java 7u1.
And this is the bug in their bug tracker: bugs.sun.com/bugdatabase/view_bug.do?bug_id=7070134
probably don't want to acknowledge that they were broken
09:23
> This bug is not available.
Unfortunately, they can't erase it from the Internet. encrypted.google.com/#q=java+7+loops
wtf, it took them two and a half months to fix some loops?
Maybe not all that time. It took them that time to ship an update.
It fixed other bugs too.
(And officially, it didn't fix that one, because it never existed.)
"The JVM crashes if you use a loop" sounds like something for which you'd ship a fuckin' hotfix
It's an unbug.
you know, the world would be much smoother if I ran it
09:30
Err, right.
sure
48 mins ago, by DeadMG
and I've absolutely no idea what happened in that time
lol
Looks like the perfect person to run the world.
I would mandate DNA and fingerprints from all citizens for the police
and I'd also mandate organ harvesting from the dead
09:31
China does that!
and I'd also stop wasting taxpayer money on the monarchy and other similar bullshittery
At least from the executed.
@DeadMG Ha! We don't :P
true true
Instead we waste it on... I don't really know on what.
well, I expect that there's probably plenty of "bullshittery"
09:32
I do know that it goes away wasted.
like ancient castles, and churches, and that kind of waste of space and money
That's not at all similar to monarchy.
Those are buildings.
they cost the taxpayer money for no valid reason because some fuck deemed it cultural or historical
sounds exactly like the monarchy to me
also, I'd ban faith schools from receiving state money
We bought a pair of submarines!
also, I'd ban churches from getting away with violating labour laws and discrimination, etc, laws just because they're religious institutions
09:34
That's the last big waste I remember.
Oh, the Euro 2004 too.
also I'd hire people just so that I could fire them whenever I became angry
Built a bunch of new football stadiums, and now they're mostly empty.
Greece did the same with the Olympics, but on a bigger scale
Luckily we didn't get the World Cup.
lol
interesting fact- the London Olympics are actually under budget
09:39
We're still paying the stadiums.
We never do anything under budget.
There's always some budget correction somewhere down the line.
lol
how much rep. do u need to vote for someone in the mod. elections?
150, I think.
Now people are complaining that they'll no longer be getting 14 months salary for working 11 months.
yay! that means I can make a vote.
by the way, are u discussing the global economy?
I'm talking about the local economy.
09:44
of which country?
Which is going downhill much faster than the global economy.
@IntermediateHacker Portugal.
well, Portugal is still doing way better than Oman, it doesn't depend on oil for more than 65% of its GDP.
if the oil finished , Oman will be doomed.
Yeah, right.
If we get thrown out of the Euro, we're doomed.
I hope my dad finds a job in UAE soon...
well, I guess everyone is doomed then.
by the way, why exactly is portugal going downhill, it has a lot of industries doesn't it?
Well, I think we still have a shot. It's just that we'll have to stop being a bunch of stupid fools that waste money everywhere, and avoid taxes, and then complain loudly about the "big fish" or something.
09:50
good luck, then. personally I think the EU will make it through, in about 5 years time the economy will be back on its feet
Starting next year, if you don't require an invoice on everything (like say, buying a drink on a bar), you're liable to pay up to 2500€.
Because people complain about other people avoiding taxes, but don't use the means they have at their disposal to prevent that.
In fact, some people even actively request "no invoice" because they don't want to pay VAT or something.
And then "the big fish evade taxes".
When everyone is freaking doing it.
wow, paying tax is difficult.
you have to pay tax based on ur expenditure?
Every sale has a "Value Added Tax".
The final buyer pays it all, and each seller in the chain has to return a portion to the state.
If there's no invoice, there's nothing to return :)

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