« first day (1406 days earlier)      last day (3547 days later) » 

8:00 PM
Lol guessindenting
 
Only leading closing braces affect the indentation of the current line.
 
Now write the same program for Python source code. :P
 
Unnecessary, you can't have misleading indentation in Python code ;)
Now let's just hope that no student writes braces inside comments :D
 
lol
 
handling comments is le simple
 
8:03 PM
@AlexM. lol
 
@AlexM. epic fail
 
@AlexM. Is that his girlfriend maybe?
 
makes sense
 
Imaginary girlfriend.
Don't laugh at schizophrenia.
 
@PolymorphicPotato It's no laughing matter, but it's no matter if you laugh.
 
8:10 PM
hmm
I just discovered a very compelling argument.
namely, "Would you like to play all my Steam games for free?".
not sure who's gonna answer "no" to this question.
 
hmm
Is £ 37.99 expensive for a hoodie?
 
yes.
 
Ugh, motherfuckers.
They listed another one for £ 32.99 and it 404'd.
 
@FredOverflow Well it is his right hand... ;-)
 
@Xarn Lousy substitute for a girlfriend...
 
8:20 PM
@JerryCoffin Indubitably, but given the picture, it seems to be the logical explanation.
 
@Xarn Yes, I agree.
@Puppy Pretty sure my wife would.
 
true
 
@Puppy what makes your Steam library so special?
 
> the problem that I always cite for C++: I call it the “Nth order exception to the exception rule.” It sounds like this: “You can do x, except in case y, unless y does z, in which case you can if ...” Generics Considered Harmful
so true :D
 
Java considered harmful.
 
8:25 PM
@Xarn It doesn't have to be special for the answer to that question to be fairly obvious for any gamer.
 
@Puppy Unless you have severe OCD and lots of expendable income, I can point at people with better libraries. (IE with every single game on steam)
+ I clicked on my library out of curiosity and it says 218 games. :-D
Can't say I want more games to play.
@Puppy Or you are affiliated with Valve ofc.
 
@FredOverflow ...but while it's somewhat true of C++, it's much more so with Java. Reality is that he's just engaging in the usual ignorant Java advocate's mostly-meaningless C++ slamming for no particularly good reason.
 
@JerryCoffin It is? Where except Generics?
 
Also I probably have forgotten everything about Java, but what would be the problem with Holder<T> if T == Set<String> ?
 
user3010322
> But we have a demonstration proof that we can live without it, namely that we have for nearly a decade.
 
user3010322
8:31 PM
Talk about an idiot.
 
user3010322
He doesn't present any reasonable arguments.
 
user3010322
Just a quote and then rambling about how it wasn't necessary.
 
Do you think he knows that there were programming languages before Java?
 
user3010322
And about a supposed complexity that apparently infects his codebase somehow.
 
@FredOverflow Quite a few things only work with class types, so you get things like "you can do X with any type--oh, except for things like int that aren't classes. Except that if you do it under circumstances Y, the int (or whatever) can be auto-boxed, so you can do it, but the result will be an Integer instead of an int.
 
Ell
8:38 PM
Hi guys
 
@ThePhD He actually does present a fairly reasonable argument (in a rather backhand fashion). He proves he's pretty much an idiot with no grasp of simple logic, yet that's what passes for an expert on the Java community. Given that average Java programmers are apparently not even that smart, he's probably right that virtually none of them stands any chance of understanding anything higher level at all.
@Ell Hello.
 
hmm
why would Python not be able to exec a new process?
 
user3010322
Permissions?
 
sure, but what permissions can be set that prevent a program from execing?
 
Ell
it might need chmod +x
 
8:40 PM
Ad autoboxing, generics and them making a mess
My favourite example of that goes something like
Set<Short> s = new TreeSet<>();
for (int i = 0; i < 50; i++)
    s.add(i);
for (int i = 0; i < 50; i++)
   s.remove(i)
//s.size() == 50 :-D
 
Ell
@Puppy the executable flag
 
user3010322
Read is usually needed, plus the execute flag.
 
(I hope I didn't mess it up, it has been almost two years since I had to work with Java)
 
user3010322
Some people just chmod 777 but chmod +x is probably better.
 
hello
 
Ell
8:43 PM
is anybody gonna mumble?
I'm connecting headset
 
user3010322
Much as I'd love to hear your deep, chocolatey voice,
 
user3010322
I'm at work.
 
Ell
Aww :(
 
hmm
for some reason the Clang binary appears to be... a text file with nothing in it.
 
Ell
@ThePhD I like "chocolatey", well done
 
8:45 PM
pretty sure that's le fucked.
 
Ell
@Puppy are you sure you have read permissions on it?
 
yes.
 
Ell
hmm
 
ugh.
 
Ell
what does file clang return?
 
8:46 PM
now I Don't have permission to access a bunch of intermediate files.
 
Ell
In the directory
 
gonna have to rebuild llvm.
 
how do you know it's a text file if there is nothing in it? ;0
 
it probably has something to do with the fact that it kept being randomly terminated and the system also crashed whilst it was building.
 
Ell
yeah probably
are you on x64 ubuntu?
I can send you my build if you want
 
8:48 PM
yep
 
Ell
and you can just make install
 
Xeo
I think I should sleep. It's been a while since I've been awake for over 30h
 
Ell
You should sleep
I'm going to make another grasshopper
 
having a build isn't the issue
I'm gonna be submitting some patches for Clang.
 
how to make myself do the work I need to do instead of watching Robocop on TV at 00:05? :0
 
8:52 PM
Awesomium docs are not very good
 
@JerryCoffin You're only saying that because us Loungers are way smarter than everyone else and not suffering from the Freddy Kruger effect or whatever it's called at all ;)
 
user3010322
Of cooourse not
 
user3010322
Why would XMLSerializer or DataContractSerializer share any kind of interface
 
user3010322
THAT'S JUST SIRRI.
 
Their applications are so different that it doesn't make sense? ;0
 
user3010322
8:56 PM
.Serialize
 
user3010322
ALL THE INTERFACE I WOULD HAVE LIKED.
 
return type?
 
user3010322
You can put Generics in the interface, can't you?
 
@FredOverflow Hmm...maybe sometime I should watch one of the movies with Freddy Kruger in them, so I'd have some clue of what you're talking about. :-)
 
Whyyy is WebView.Surface null
 
@ThePhD Hey, as long as you don't return generic arrays...
 
Has anyone here tried the new Thinkpads and liked them?
 
user3010322
Whoever decided I could not use static things as defaults for C# function parameters deserves to die a painstakingly slow, gruesomely methodical death.
 
Gotta call Update() but it's deprecated apparently?
Oh, I need to take care of spawning a thread
 
9:05 PM
@Xarn No.
 
@FredOverflow here's the whole thing: youtube.com/watch?v=_yK3m8FgAJU
 
Ell
well this is delicious
 
fuck
 
Ell
I'm getting drunk in a delicious way and it makes me so happy
 
9:06 PM
why is ld randomly killed?
 
@PolymorphicPotato nice1!
 
@Puppy OOM killer!
@Ell s/de/ma/
 
@FredOverflow Seriously though: to an extent I'd even agree with his basic premise that Java's generics probably have more weaknesses than strengths. When you have a large, mature class library that's already built around a single Object at the root, the gain from generics isn't all that huge compared to the existing collections of Objects. At the same time, its inheritance-based model for constraining generics adds even more complexity, while removing even more strengths.
 
Ell
@PolymorphicPotato I'm not malicious! :P I'm delicious ;)
 
That's what she expected.
 
Ell
9:08 PM
I'm going to watch a film now
 
The result is that his basic premise isn't all that far out of line: Java generics really don't provide even close to the kind of improvement that templates were for C++.
 
Which film?
 
Ell
@PolymorphicPotato The expendables
 
Watch The Incredibles.
 
> llvm[4]: Compiling BodyFarm.cpp for Debug+Asserts build
wat.
 
user3010322
9:09 PM
Prepare to be harvested.
 
@Puppy LLVM, aka The Matrix, v 0.0.1.
 
Hi all, I'm looking to buy a book on templates and i was going to buy Modern C++ Design (rads.stackoverflow.com/amzn/click/0201704315), however, it's quite dated (2001) and I'm fully on the C++11/14 train. Is it still a good buy or should I wait for example for the revised version of C++ Templates: The Complete Guide (amazon.com/dp/0201734842/?tag=stackoverfl08-20)? Any input welcome :)
 
better to wait for EMC++ I feel
 
@Ela782 MC++D was ground-breaking in its day, but in my opinion it hasn't aged particularly well. I don't think I'd buy a copy today.
 
well that's annoying, my VM somehow decided to restart itself and install a load of updates
 
9:15 PM
@Puppy you mean Scott Meyers, Effective Modern C++, right? I am buying that anyway! So basically I'm looking for a second book, more on TMP :)
 
@Ela782 The long and short is that nobody has a clue because those features have only just become available, relatively speaking. It's too early for any definitive idioms to arise.
the only one I can name is indices, and that's Standard in C++14.
 
don't buy books, buy alcohol
 
Hmm so if I'm at a quite intermediate level in C++, but have no idea about TMP, policy-based design, etc... what would be a good buy?
 
hmm, those techniques are pretty specific.
 
@Ela782 C++11 rendered nearly ever book on C++ TMP rather out of date nearly overnight, but AFAIK none of them has been updated since the new standard came out either. Offhand, I don't know of a book on TMP that I'd buy right now.
 
9:19 PM
> The great thing about Java is that whenever you feel down in the dumps, and whenever you get stuck dealing with Windows.h's crappy macros, and that kind of C++ crap, you can always think "Well, it could be worse. I could be programming in Java."
 
or PROLOG.
 
Hmmm
 
My twitter feed is basically all "LUDUM DARE 48 OMG LOOK AT ME IM GETTIN READY"
 
Difficult choices ahead. I got some vouchers I need to spend until Nov 2014... :)
 
wtf is ludum dare
 
9:20 PM
I actually know what ludum dare is
 
@Puppy A game jam.
 
ah.
 
Okay @Puppy and @JerryCoffin, thank you very much for the input! I think I'm gonna hold off on that MC++D-buy then, especially since it's double the amazon price in my local bookstore. Seems not worth it then.
 
I prefer paper jam.
 
I miss haskell
 
9:27 PM
Send him an email.
 
welp
looks like my system simply cannot build a Debug LLVM 3.5 on Linux.
 
Are those just some random Qt facts unrelated to the question? — BartoszKP 8 secs ago
:V
 
user3010322
@Jefffrey When is Ludum Dare anyhow?
 
in 5 hours I think
 
user3010322
Wait what
 
user3010322
9:30 PM
What the fuck
 
user3010322
Ludum dare is a fucking Christmas themed thing
 
user3010322
Why the fuck si it happening right fucknig now
 
user3010322
what hte fuck I'm still at work I'm not even ready
 
user3010322
What the bloody shit who plans this shit who do I need to shoot
 
3 hours actually
5 hours... 5 HOURS! WHAT! Then we be Ludum and Darin'? Oh my! http://www.ludumdare.com/compo/ #LD48 http://t.co/jUaJV9Qho3
 
user3010322
9:31 PM
CHRISTMAS COMPETITION IN AUGUST WHY NOT
 
what are you talking about?
the theme is yet to be decided
 
omg, Ctrl-F4 what a shitty shortcut
 
@ThePhD It's been April/August/December rotation for the past few years :v
 
user3010322
@CatPlusPlus Blasphemy, lies, and slander.
 
in PHP, 11 hours ago, by HamZa
I'm reading a C++ book. They say C++ > PHP, but after each paragraph/sentence I have to memorise a lot of "exceptions" while PHP just works.
 
9:39 PM
Ludum Dare (from Latin "to give a game", also known as LD48) is an accelerated video game development competition. It was founded by Geoff Howland and was first held in April 2002. Participants are required to create a video game that fits within a given theme in two days. A unique feature of this competition is that participants often release a time-lapse video of the development of their game. == History == Ludum Dare was originally only an Internet forum. The first competition—often referred to as "Ludum Dare Zero"—was held in April 2002, with 18 participants. Its popularity turned the focus...
 
@Jefffrey Isn't that like half the problem with PHP? :-D
The other half being stupid maintainers.
 
The other other half is community
There's no good part of PHP
 
there's
 
user3010322
There is, yes.
 
it's preinstalled almost everywhere and can get you a quick hello world up and running fairly decently
 
9:41 PM
@Jefffrey Yes, that is the exhaustive list
 
that's all I've got
 
Unless you're literally 12, shitty webhosts are literally irrelevant
Literally
Also it's not preinstalled on any workstation
 
does that means that if I'm 11 I'm safe?
 
And you don't need a remote host to learn a thing
So it's doubly stupid argument
It was stupid in 2004, it's still stupid today
Also VPSes are cheap as dirt now
So it's triply irrelevant
 
why do you get so worked up? envy about PHP?
Sorry, I'm just bored as fuck
 
9:45 PM
in PHP, 1 min ago, by HamZa
@Jefffrey grumpy cat again...
 
Try hearing the same stupid shit for 10 years straight and see how you like it
 
@Jefffrey oooooh
 
my friends are "nerding" (playing borderlands 2)
and I don't know what to do
 
already won that game
 
9:50 PM
I see, I stopped at the last one...
@CatPlusPlus what's the alternative (better) solution to php?
 
inb4 anything
 
Literally everything else except Ruby
god it's the same shit over and over again
 
Well for real, what would you use? Certainly not C?
 
@Jefffrey uhh, play borderlands 2
 
:cripes:
 
9:51 PM
yes, it's even more boring than doing nothing
@SamDeHaan dunno how to play
don't have a computer to play on
etc...
 
Okay I wrote bitmap support
 
@Jefffrey That is disappointing
 
Maybe I'll finally manage to display something
 
display something related to what?
 
@CatPlusPlus if it's the "same shit again" you could write an article/blog post. That way you might relieve yourself from this "shit"
 
9:53 PM
Render some HTML from Awesomium onto Allegro-managed display
 
yay! I'm back.
 
welcome back
 
Back from holiday. And installed a fresh system
 
        SynchronizationContext webContext;
        var webStarted = new ManualResetEvent(false);
        WebCore.Initialize(coreConfig, true);
        WebCore.Started += (sender, eventArgs) => {
            webContext = SynchronizationContext.Current;
            webStarted.Set();
        };
        var webThread = new Thread(WebCore.Run);
        webThread.Start();
        webStarted.WaitOne();
FUN
 
9:54 PM
seems too low level
 
@Jefffrey I know, I've already read that. Probably 2 or 3 times. People stating that "x is shit" should come up with something better IMO. It's like complaining the whole time about something but not coming with any solutions
 
Ugh
No
God
There is nothing to solve except not use goddamn PHP
 
@CatPlusPlus ahahahaha
I get it
 
But I guess it's too difficult to comprehend
Robot said something about that "you have to have solutions, otherwise you can't point out problems" shit, too
This retarded nonsense reminds me that I really want to get rid of MediaWiki because fuck MediaWiki
 
@sehe ooooooh, and with a brand new avatar! nice!
 
9:59 PM
WOW. I didn't think anyone would notice this time!
 
yeah, I know, right
 
1
A: C++ - overloaded assignment operator memory leaks

R SahuYou need the code from the destructor to delete all the memory before allocating new memory. Grid& Grid::operator=(const Grid& source) { /* saw somewhere that one should put this check but how exactly does the default assignment operator work with pointers? */ if (this == &...

burn it with fire.
 
> saw somewhere that one should put this check
ahaha cargoculting.txt
 
also "should put shit check". I now where I should put my cheque
 
@Puppy just so you know Im not your downvoter - I agree with you, but still I feel like you did not explain the OP WHY he has a leak.
 
10:04 PM
@quantdev He has a leak because he failed to use automatic memory management.
 
You can say that, but still he clearly misunderstand the assignment semantics, and he has the right to know. No ?
 
My bindings code is the best
 
waste of time.
there's no point explaining to him how to perform an operation he doesn't need to perform or understand.
might as well start telling him how transistors work on the quantum level for all the good it'll do him.
 
AweInvalidOperationException
I love multithreaded rendering stuff
 
I so disagree. Is this worthy of a downvote because of your personal opinion? Is it wrong? My personal opinion: std::vector is extreme overkill. I do use std::vector, quite often, but never for what I would call vectors and matrices. C++ and scientific programming don't exactly see eye-to-eye on what constitutes good practice. Good practice in scientific programming oftentimes says std::vector is an anti-pattern. — David Hammen 4 mins ago
ಠ_ಠ
 
10:08 PM
If you do matrices then use Eigen or whatever
 
@Puppy That's true. But still, he doesn't know either why it works now with a std::vector<> , but I get your point.
 
it works now because somebody else put the time and effort into solving the problem, and instead of wasting his own time, he can just re-use their solution.
that's the real key here.
 
yes, well said.
 
so much fail in those answers
 
Oh god is "it's scientific" a new excuse to write badly broken code, you should join forces with the gamedev people. Use Eigen if you have matrices/vectors, there's absolutely no reason to reinvent this and manage memory manually. — Cat Plus Plus 3 mins ago
2
great comment
 
10:16 PM
Puppy.
 
yeah
 
I always considered 'self-assignment' to be more of a performance thing/early condition.
 
self-assignment doesn't occur often enough in real code to justify the price of the branch, from a performance perspective.
and from a correctness perspective, any exception-safe assignment op should handle self-assignment totally correctly.
the only thing you might want to do w.r.t. self-assignment is assert on it and then fix your code, since it's really just not a useful thing to do to assign to yourself.
otherwise, the best handling of self-assignment is to totally ignore it.
 
Ell
when does self assignment ever occur
 
pretty much never.
which is why it's not justifiable from a performance context to include a check for it.
 
10:24 PM
Unrelated. Does anyone know if networking libraries are coming in for the next standards or what ? I know a group was working on it a while back
 
@Puppy from a performance perspective, I doubt you could write a test program where having the branch made a measurable difference
the cost is effectively nil (precisely because it virtually never occurs), so you could well argue that from a performance perspective there'd be no justification for not including it
 
@jalf You make two arrays, populate them randomly such that corresponding elements have a 50% chance of being the same object. Then iterate through the array.
 
@jalf Twasn't me. IIRC the research was done by Microsoft.
 
@Mysticial I said, I doubt @Puppy could write it... Not you ;)
 
@jalf :)
 
10:26 PM
@Mysticial also, remember that the premise is that the branch is virtually never taken
 
@jalf I'd also argue that if it is, it's pretty questionable about whether your code is correct, in the general case.
 
(I know a branch has a cost when it's unpredictable)
anywy, imma sleep. Night all
 
but I believe they did the research a while back, maybe a decade or more, so branch predictors probably weren't as powerful then
 
@jalf I did some testing where I added a self-assignment test to code that did copy and swap. It was slightly (seems like 3-4%) faster just doing the self assignment, without the test.
 
and the archs like P4 had a really nasty misprediction cost which I think is a lot higher than current-gen CPUs.
 
10:28 PM
@jalf night
 
@Puppy true, but again, misprediction is pretty irrelevant if, as you said, it is "pretty much never" taken :)
 
@jalf Depends, I feel, on whether the processor's predictor accurately notices that fact.
 
That was a few years ago though. Could possibly have been a P4, but based on my (admittedly poor) memory, more likely on an AMD Athlon 64x2.
 
I've never measured how long it takes for a modern processor to "warm up" enough to start properly predicting branches.
But if you're running through a lot of code only once or twice, you can expect a lot of them to be mispredicted.
 
@Mysticial I'd also wonder how long it takes to cool down and forget the previous prediction information.
if the calls are frequent but not frequent enough to keep the previous prediction data
 
10:32 PM
Which also fucks up benchmarks. You benchmark a function by calling it a gazillion times - which is basically benchmarking it with perfect branch prediction if either the input data is the same or the algorithm is data-independent.
 
@Mysticial They use a branch history table, so for a branch like this that's pretty consistently the same direction, they'd probably be correct on the second iteration. They can predict longer cycles (e.g., taken twice followed by not taken once, then re-start the pattern), but you basically need two iterations of the pattern before they start to predict it correctly. As of the Pentium Pro, they could correctly predict patterns up to six long. Longer now, but not sure how much.
 
But it's difficult to measure anyways. So I can't ever say how much it fucks up the microbenchmarks.
 
After a "cool down" I'd say that the cache misses are going to be far more expensive than branch prediction failures..
@Mysticial VTune does it
 
if(__builtin_expect(this == &other, false))!
you know what'd be cool
standard compiler intrinsics
 
@Puppy you have a question here
 
10:39 PM
@Puppy Hard to predict (pun noted, but not intended). The BHT is basically treated like a cache, so basically the least recently used entries will be replaced by new ones over time. Therefore, it depends on how many branches there are in the other code you're running.
 
@quantdev Ha! I just came in here to post a link to that
 
@Praetorian ahah I knew it
 
And he failed
Your assignment operator has a bug. You don't clear the vector before adding new elements. Is that a good enough answer to your question? Manual memory management is not easy to get right. — Praetorian 2 mins ago
 
Of course, it almost never follows a true LRU algorithm, but some approximation that's quicker/easier to track.
 
0
Q: Differences between C and C++

40twoSearching the web I couldn't find a complete reference that gives all of the differences between C and C++. However, in my quest I found from disparate sources that some of the differences between C and C++ are: - Implicit Assignment from void* In C++ you cannot implicitly assign from a void...

 
10:43 PM
> "External libraries" are one of the reasons many turn to java. So they don't have to deal with so much crap & bloat.
 
close as too broad please
 
OH GOD
IT WORKS
IT FINALLY WORKS
Okay almost, colours are bad
 
@Mysticial Why'd you close it as a dupe?
 
Ell
Is that chrome?
 
@Rapptz Someone else already cast that vote. And I agreed with it.
Looks like Alf reopened it.
 
10:47 PM
Yeah
 
No it wasn't. Manual memory management is part of the language. It's there for a reason. What are you talking about. The linux kernel is written entirely in C. I don't hear anyone saying it is unsafe. There is nothing inherently unsafe about it. Exceptions don't exist in C. All it required was a brain and the skill to do it right. If you got a buffer overflow or memory leak, it's your own fault. It has nothing to do with the language. OP OBVIOUSLY needs to learn memory management and you guys downvote answers pushing in that direction. Goodluck running forever.. — Brandon 4 mins ago
omg make it stop
 
@Jefffrey ... C programmers.
 
> Post Reopened by Cheers and hth. - Alf
I edited the post just to see it
What a shady thing to do
 
You can just jump to the link directly.
 
I guess
I'm lazy
and the double ---- thing was bugging me anyway
-1. Did you really just re-open this question just to answer it? — Rapptz 28 secs ago
I await the shitpost arguing.
 
10:49 PM
I await the screenie opportunity.
aww deleted
 
inb4 counter-downvote upvotes
 
Well, I did have that in the comments already
 
lol
isn't that abuse of the binding reopen vote?
 
> It wasn't unsafe before all the automatic management stuff.. It's just that it was more work to "do it right" manually.
:cripes:
 
Welp
Seeing black spots in my vision
Think its time to take a nap.
 
10:56 PM
Methanol is bad for you
 
Ell
I'm drunk in bed
 
I had no alcohol today.
 
I'm trying to figure out how to do async rendering
 
Ell
Now why would you want to do that?
But idk, one thread for rendering another for other stuff?
 
hmm
can't make sed work with include directives.
fuckin hell, even VS can make find/replace include directives work easily.
 
Ell
10:59 PM
Idk sed options off by heart
What are you trying to do?
 
Every time I use sed, I get tons of leftover files that aren't deleted properly
 
Ell
You might have to escape stuff
 

« first day (1406 days earlier)      last day (3547 days later) »