« first day (621 days earlier)      last day (4553 days later) » 

19:00
@RMartinhoFernandes Isn't there any danger using ... a(std::move(a)) ?
What if I want to init several B's with the same a? Will they not all use the same a then?
@Potatoswatter The rules of implicit constructor generation went through lots of changes, so it's entirely possible that one is using old rules.
@ManofOneWay The argument is taken by value.
I had compiled with -std=c11 , gcc gave me

error: unrecognized command line option '-std=c11'

with:
gcc -std=c1x 1.c -o 1

it compiles, but in my code there is gets() function, which was cut from C11, so why does it compile?
@ManofOneWay Since the argument is take by value is already a copy (if an lvalue was passed, there's no copy if a temporary was passed).
@user1131997 Did you notice the mention of the Lounge<C> room above?
@user1131997 Oh, obviously that's what you meant. Ask in the other room plz.
19:01
@RMartinhoFernandes Yes, I do.
@Potatoswatter yeah, I shall try in javascript room , maybe there piplz daz now thiz stuF
You're breaking rule #1: don't be annoying.
I didn't know that was an official rule but I sure do agree.
@RMartinhoFernandes I know it, but my greediness and interest have much more power, than etiquette, so sorry :) and thank you for the possbile answer
@RMartinhoFernandes LOUNGE_C would have been a better name.
19:05
Ok, I read that in the past. Recalled it mentioning not to be annoying. But not as a rule in stone.
But I feel like we're being ripped off.
@RMartinhoFernandes Why did I have to remove the const inside the constructor argument?
@StackedCrooked It's a recurring theme throughout the whole post.
@StackedCrooked Well, it's a pretty important rule, even if it sounds so evident.
I'd dare say it's the main message.
19:07
Yep, I think perhaps it should be made Rule #1 and Rule #2.
@ManofOneWay Because a move is modifying operation.
I'm missing Mooing Duck, he loves pure C and answering
He usually hangs out in the C room as well.
Wow 1444 upvotes right now for @Mysticial. That's crazy.
@StackedCrooked Well, Joel linked to it.
19:09
It was already above 1k+ before Joel tweeted.
@RMartinhoFernandes Hmm.
@StackedCrooked Wikipedia: "In 1444… The first European slave market for the sale of African slaves, the Mercado de Escravos, opens in Lagos, Portugal."
But then, I assume most people who upvoted it never bothered to actually read the answer.
@Potatoswatter Woot, we were pioneers!
Well, it is a pretty frakkin good answer.
19:10
@StackedCrooked link?
@EtiennedeMartel Indeed. However, the upvotes are not undeserved since it's a very nice explanation.
Those damn Portuguese.
4 hours ago, by sbi
Joel has just tweeted an epic answer by @Mysticial. And it already is at >1.2k score. He's hit the repcap so hard, his head will probably hurt for weeks.
@FredOverflow Click the super-collider dropdown: it's the hottest question.
@StackedCrooked Agreed.
19:14
@EtiennedeMartel In fairness, we were also pioneers in abolishing slavery.
What if I use std::move on an non-temporary object that I will use later on? Will it crash when I try to access it?
@RMartinhoFernandes And you also invented port.
@ManofOneWay No. It has an unspecified by valid value.
@StackedCrooked It's probably the nice picture :)
27
Q: What can I do with a moved-from object?

FredOverflowDoes the standard define precisely what I can do with an object once it has been moved from? I used to think that all you can do with a moved-from object is do destruct it, but that would not be sufficient. For example, take the function template swap as defined in the standard library: templat...

Perhaps. I did find the analogy with train helpful.
19:17
@FredOverflow Yeah, but it also got screenshots, benchmarks, examples, enough words to trigger the TL;DR of most users (causing them to upvote the shit as fast as they can move their cursor)...
All that's missing is a Standard quote.
Gratuitous Standard Quotes!
Quote the Standard (Active Skill) - Instantly increase this answer's upvote count by 10. Can only be used on C++ questions.
@RMartinhoFernandes I remembering seeing it peak at about 443 yesterday. By comparison, John Carmack's answer peaked at 666.
@EtiennedeMartel and C!
@ecatmur Ah, yeah, forgot about that piece of shit.
19:25
@EtiennedeMartel A bit jealous, are we? :)
@FredOverflow Tremendously.
@Mysticial His answer was on programmers.se, so fewer users could vote.
@Mysticial What @Potatoswatter is saying is that John Carmack is so much better than you.
@EtiennedeMartel You're so jealous, you'll need a ton of bread to eat all that jam.
LOL. I need to be sleeping…
19:27
@RMartinhoFernandes Or, I could get drunk.
@Mysticial Carmack's answer? Where?
480
Q: Transatlantic ping faster than sending a pixel to the screen?

Konrad RudolphJohn Carmack tweeted, I can send an IP packet to Europe faster than I can send a pixel to the screen. How f’d up is that? And if this weren’t John Carmack, I’d file it under “the interwebs being silly”. But this is John Carmack. How can this be true? To avoid discussions about what exact...

Hehe, the effect of the rep-cap on that.
oh hi
893 upvotes, but less than 2k rep.
@DeadMG Hi.
19:30
Hey guys, as you may all know, in the US, the Supreme Court validated Obamacare. Well, look at the hilarious reactions from some rednecks.
I have no idea what that means.
But redneck reactions sounds fun. clicks
@RMartinhoFernandes You know, the healthcare act Obama passed?
Yeah, but I have no idea what that is.
what it means is
the US now has a partially socialised healthcare system
and those rednecks are so damn angry, they're gonna move to a totally socialised healthcare system country
You can't be an idiot without being completely irrational.
19:32
Oh, it's a commie-hatred thing?
Commie-hating *red*necks, lol
In the US, for the average conservative, "liberal", "socialist", "communist", "progressive" all mean "anything that's on my left".
@RMartinhoFernandes Well… #8 wants to go to Canada to jump off a cliff, which isn't a bad idea as they have some magnificent topography. And then he'll get healthcare to boot.
@Potatoswatter He won't if he's not a Canadian citizen, I guess.
@Potatoswatter No, he's telling Obama to jump off a cliff.
But I hope he doesn't do it in Quebec. Our hospitals are way too crowded already.
19:36
> We don't want those ass-hats here, you can keep them
@RMartinhoFernandes Oh. Or is it, "Jump off a cliff at Obama", as in, "Perhaps if we all jump off a cliff, someone will land on him"?
This Twitter, it's new and foreign
> Oh silly Americans...You'll leave once you see that our Netflix is next to shit.
I am so proud of my countrymen. We're all so well informed about stuff. Stuff like Canada.
19:45
Many of them don't actually know where Canada is.
Wonder how many are (pretend-) moving to Mexico. Don't know much about medicine there, but guessing you pay your own way.
@EtiennedeMartel Lucky for me, I live in Michigan. I know that Canada is my shortcut to the NE states. (Also, man, I can drive so fast there, amirite? 100 speed limit > 70, right? right?)
If both def and uses in ArithmeticInstruction(const Variable *def, const std::vector<Variable> *uses) could be nullptr, would it be better to store a uniqe_ptr?
If they are unique as well
If ownership is transferred to the ArithmeticInstruction, yes.
But you shouldn't have a pointer to vector.
0
Q: (Code Review) Java if statement involving logical and(&&) operator

user1489599im started programming a few weeks ago in java/android. I want to write a small tic tac toe game as an android app but im having troble with my method that will check for the winner. It is as follows: public void checkForWinner() { if( taken[0] && taken[3] && taken[6] ...

19:54
why not?
Ohhh Java questions.
@Potatoswatter If it's a nullable alias, I don't see why not.
OP tries to && chain ints. Half the answers try to == chain ints >.>
@DeadMG If it's an alias, then it's not unique.
@Potatoswatter Very true.
19:55
What's the difference between a null vector and an empty one?
@Potatoswatter That question would make sense in Java.
@Mysticial It would have semantic meaning, "make sense" is a matter of opinion.
an empty vector is still a vector right? Wouldn't it be easier to just have nullptr, also for checking if uses exist or not?
@ManofOneWay Then you have two cases, null and empty, which you have to handle every time.
Also, as this looks like it's going into a compiler, pointer indirections are not your friend.
It's the beginning of a register allocator simulator
19:57
Nor heap allocations.
@Potatoswatter Why would you have to check for empty?
@DeadMG Avoiding the check for empty requires consistently generating nullptrs instead of empty containers, which is just as much work.
@Potatoswatter Right.. but it's not as much work as having both null and empty.
0
A: (Code Review) Java if statement involving logical and(&&) operator

FredOverflow Here I have an array called taken that holds 9 integers, each of those integers being either a one, meaning player one owns that block, or a two, meaning player two owns that block. In that case, you can replace the logical operators with bitwise operators: int winner = taken[0] & taken...

make_unique<A>() isn't part of the language, is unique_ptr<A> a part of it?
20:04
@DeadMG Depends. Anyway, it's more complicated than not having nullptr at all, and the extra malloc calls just to create a std::vector object on the heap will slow things down seriously.
22
Q: make_unique and perfect forwarding

FredOverflowWhy is there no std::make_unique function template in the standard C++11 library? I find std::unique_ptr<SomeUserDefinedType> p(new SomeUserDefinedType(1, 2, 3)); a bit verbose. Wouldn't the following be much nicer? auto p = std::make_unique<SomeUserDefinedType>(1, 2, 3); This h...

@ManofOneWay Yes, std::unique_ptr is part of C++11.
@FredOverflow Thanks =) Are these links a sign of kindness, that I should ask less here and look more at SO, or both? =)
@ManofOneWay They are mostly a pathetic attempt at rep-whoring on my behalf.
3
@Potatoswatter If you have the right allocator, it could be fairly trivial. I agree, though, that it's better to just not have null.
user1174868
20:08
Hey guys, can anyone offer some help for a really basic scheme program? I am trying to relearn the basics but I messed up something simple I think.
@Jordan Basic/Scheme? :) Just ask the question, maybe we can help. Impossible to tell in advance.
@DeadMG Indeed. Ideally you have a garbage collector and free everything in one massive block at termination.
@Jordan You're asking Scheme questions in a C++ room?
user1174868
Sorry, there is no scheme or lisp channel
user1174868
or at least an active one
20:10
Is that the Scheme dialect where all the lines are numbered and the only flow control is GOTO?
@EtiennedeMartel Scheme, C++. They're practically the same.
user1174868
:(
@Jordan It would really be helpful if you actually asked the question.
@Potatoswatter I was thinking "Spawn compiler process, never free anything" :P
user1174868
20:11
(define (tax i)
(cond
((< i 10000) (= i (* i .02)))
((> i 10000) (= i (+ (* i .05) 200)))
(print i)))
What does = mean in Scheme?
user1174868
It prints f#, not sure what that is but what am I doing wrong? I want to print the result not the character
@FredOverflow Equals
@Jordan f# is false I believe
@EtiennedeMartel So it's comparison, not assignment?
@FredOverflow Yep.
user1174868
20:12
The only scheme guide I can find is a little over my head, it is hard to learn this way
That's the issue.
@Jordan = compares two values.
I'm pretty sure i will never be equal to i * .02, unless i is 0 of course.
user1174868
oh, how do I assign?
@Jordan You don't. It's a functional language, remember?
Just return the value.
@Jordan You don't need assignment. Just return the result.
user1174868
20:13
oh
(Technically, you can assign, but it's not exactly "clean" style)
Just keep repeating: I do not need to assign.
user1174868
I am completely new to programming, I took a 3 credit c++ class and that is all I know
Also, what happens if i is 10000? It is neither < nor >.
Why isn't this working? ideone.com/2QeH6
user1174868
20:15
Thanks, I think I got it to work. I know my code is really bad but I think it at least works sort of correctly now
user1174868
It is weird going from c++ to scheme
@ManofOneWay You cannot copy a std::unique_ptr.
Which you're trying to do here a(a).
Technically correct, but irrelevant to the question.
@FredOverflow Returns #undefined or something.
How do I pass it so that the compiler knows it will be unique later on then?
20:16
@ManofOneWay Move it.
Should I make it a shared ptr and then assign it to an unique?
@ManofOneWay What do you mean "knows it will be unique"?
You should make the parameter non-const and then move from it.
@ManofOneWay Wait, you want to take something that's shared and make it unique?
Doesn't sound safe to me.
B(std::unique_ptr<A> a) : a(std::move(a)) {}
36 secs ago, by FredOverflow
B(std::unique_ptr<A> a) : a(std::move(a)) {}
@EtiennedeMartel there is std::shared_ptr::unique()
@EtiennedeMartel No, I want something to be unique, but create it first and then pass it to the struct that will use it
@Potatoswatter Yeah but no way to release a shared_ptr : (
@GManNickG Indeed, that is logically impossible.
20:18
@Potatoswatter I don't think so.
std::unique_ptr<T, D> release() { return unique() ? /* make unique from pointer and deleter */ : nullptr; }
@GManNickG shared_ptr is a container and can adjust the type of the allocated object.
@Potatoswatter Oh. Righto.
Although, I guess the use count can be placed after the payload, instead of before, so you could still free then…
Yeah.
Dunno. It's 4:20 and I got a 10 am meeting… gnite all
20:22
It's 4:20... PM. That's like 18 hours of sleep, ridiculous.
I only had 3 hours of sleep last night and I feel mostly fine. A little dizzy.
So you guys think I should go with const std::vector<Variable> &uses, and pass in an empy vector when there are no uses, instead of using const std::unique_ptr<std::vector<Variable>> uses and use nullptr when there are no uses?
yeah
it's easier because the loop over the empty vector just does nothing
so if that's OK for your use, then you never have to special case having no uses
@ManofOneWay How about boost::optional<std::vector<T>>? ;) Just kidding, empty vectors are fine.
Yes I think it will be OK. What about performance, creating the empty vector?
20:26
Usually no heap activity. At least not in the implementations that I looked at.
By the way, seeing your obsession with null, are you a recovering Java programmer?
NULL is the only thing that I know of from C. Everything else is scary
There are so many things you can do in C++ it's amazing and scary
You should be more afraid of NULL than of things not NULL.
@ManofOneWay Scott Meyers makes a living on the complexity of C++, so it has its benefits, too :)
So, the oktoberfest this year, why not actually have a Lounge gathering then?
no Lounge gathering would be complete without me, and I can't afford to go
@ManofOneWay Because usually the 0oberfest is swarmed with idiots.
20:31
Ryanair to Germany, we could start a donation
@FredOverflow Hmm, that's too bad
Germany still has a chance!
2 minutes left
Lucky for me, I don't care at all about soccer.
I thought that Germany was gonna win this game
But no :(
Without Beckenbauer? Not a chance ;)
@FredOverflow Same here.
@DeadMG I liked playing it on the C64, though.
20:39
Damn, I broke the build
if "A bunch of men kicking a ball around" had any entertainment value whatsoever, it was surely lost the moment they refused to introduce new technologies to improve the accuracy of enforcing the game's rules
@DeadMG You don't care about a lot of things though.
@EtiennedeMartel It is true, I have a very finite capacity for "care" and worthless things like sports are very low down on the waiting list
@DeadMG What DO you care about ? =)
finding employment
20:41
if(instance.get() == 0 || instance == (NULL && 0) || !instance) {
OMG I'm dying! What the hell is (NULL && 0) supposed to mean?
@DeadMG Seriously, could it really be that hard for you? You are far more skilled than the average programmer
@FredOverflow That guy probably meant instance == NULL && instance == 0.
@FredOverflow 0. Duh.
@ManofOneWay I also went to a university who defined knowledge as "Did you memorize the codepoint for e with accent".
@ManofOneWay He's got no degrees. That means most employers will insta-thrash the resume.
20:44
You can always employ yourself.
very true
I could, like, make a game or something :P
@DeadMG Hey, have you heard of Kyrostat?
I'm planning to buy a new PC but 32 GB RAM just sounds overkill. How much memory do you guys use up? (peak)
kek
One-man game developers are not unheard of.
user1174868
20:45
braid was one guy I think
@Cicada I bought 8 GB and never looked at my RAM consumption. Also, our RAM consumption doesn't matter for you. What is it you do with your computer? Notepad? Visual Studio? Photoshop?
I hesitated on using "studio" and the sentence came out weird.
@CatPlusPlus The guys who make Dwarf Fortress still live with their parents.
I really don't want to live with my parents
@DeadMG Well, are you willing to work in Sweden? If so, I can ask right away for a job
Cave Story = one person
Terraria too
20:45
@ManofOneWay I seem to recall already having this conversation :P
user1174868
Cave story would be kind of easy to do though
@DeadMG How old are you?
user1174868
Well maybe i shouldnt say that, but braid had some pretty unique features
@FredOverflow 21.
@FredOverflow Mostly VS and some games
20:46
@DeadMG I don't think that's because of not having enough money, though.
I basically spend my time either compiling or playing
You can do some interesting things by force closing explorer.exe and then launching it as a different user.
@DeadMG I moved out of my mom's house when I was... 24 or something :)
lol
16GB RAM is sane minimum.
user1174868
20:46
I moved back into my parents house when I was 24
Although I already cooked my own meals and did my own laundry at my mom's house, so...
well, strictly, I do still have the two game ideas that preceeded Kyrostat
@CatPlusPlus What's your typical consumption and usage, if I may ask?
About 6GB out of 4.
@DeadMG I don't remember how it turned out the last time. Something about you didn't know where Sweden is located? =)
20:47
@Cicada pretty sure 8 GB will be enough for you. See to it that you get an SSD, that's probably far more important peformance-wise than 8 or 16 or 32 GB RAM.
@ManofOneWay Heh. I would be fine to work in Sweden if the language barrier wouldn't be a problem.
8 is not enough if you use Chrome.
I'm not sure I really need an SSD.
8 is for Chrome.
RAM is so damn cheap these days, there's no reason not to buy 32GB.
20:48
SSDs kick ass
@DeadMG I have to agree with that in almost every way possible.
I've got mine just running Readyboost
@Cicada SSDs are le awesome.
@DeadMG 8 GB is 40€ in Germany. I don't think I would want to spend 160€ if I didn't need the 32 GB.
user1174868
32gb is still pretty expensive
20:48
haven't even moved windows onto it yet
@FredOverflow Oh.. that's quite a bit more expensive than here.
user1174868
you can just get two 4 gig sticks for $60
@DeadMG What would you be willing to work with? Anything but Java and PHP?
Well SSDs are expensive and I don't see how I could benefit from them
user1174868
SSDs are really important, in Battlefield 3 you get to load faster and get the vehicles first
20:49
lol
@Cicada Compilation and linker speed.
user1174868
totally worth $120
@ManofOneWay I could live with Java, I guess.
8
You're playing BF3, so you already lost at life.
@Cicada Every time you load any program, or compile any program.
rather not though
user1174868
20:50
you dont even know, I spent like 300 hours on that game in acouple months
@Cat stfu noob
BF3 is epic
I will have no social life from august 25th on.
BF3 is average.
So I really want a killer hardware
Like most AAA games nowadays.
20:50
@FredOverflow 135 euros here.
user1174868
Cat do you play Tribes Ascend?
@Cicada What about us, eh.
@Jordan Sometimes. I suck at it, and don't feel like putting effort into a shooter.
@CatPlusPlus Come play GW2 with me!
user1174868
@CatPlusPlus I understand, I put a lot of time into it and got pretty good. It is rewarding but a timsink
Game's awesome
20:52
I'll buy it, I just need some more monies first.
@DeadMG My motherboard cost €40, my memory cost €40, and my graphics card cost €40. I think I have found a new sweet spot :)
@Cicada well... speed is nice. A lot of it
And since it's got release date set.
Also if you prefetch a lot of files into RAM, it can more or less act like an SSD, right?
@FredOverflow lol
20:52
Oh wait, my hard drive cost about €80. And my DVD burner only €30.
inb4 "prefetch all the files" image macro
1k€ is enough for a solid configuration ?
Should be.
more than enough
I'm pretty bad at building configurations
@FredOverflow a 40 euro graphics card?
20:54
@Cicada True. I use RAM over SSD too. In fact I practically have my $HOME on tmpfs and use SSD to host git repositories of things I'd like to keep across reboots
not exactly a gamin' rig
@DeadMG Radeon 5670 or something on eBay
I quoted my planned build at about 2000PLN.
@DeadMG How much exactly of your education do you have left?
@ManofOneWay None.
20:54
Lol.
@FredOverflow Oh, that's not as bad as I expected.
@DeadMG So you have an education/degree then?
@Cicada Me too. Yet, I built my current PC (about 5 years back) and I'm sooooo happy - it is still a powerhouse by manyt standards and it is completely silent
@ManofOneWay No, I just finished failing my third year.
Do custom build PCs tend to be noisy?
20:55
I'll sell an education, cheap.
@StackedCrooked It really doesn't depend on it being custom built or not.
I guess :D
The parts are exactly the same.
@sehe What system do you run?
Logic fail.
@DeadMG Sapphire HD5670 512 MB
20:55
@StackedCrooked Well, if you only shop for price, yes they tend to. But stock pc's tend to trade price over noise just the same
@Cicada p5b deluxe + intel Q9550 + 8Gb, 2x60Gb SSD
I meant OS
@StackedCrooked no particular trend. I've got an i7 on a Corsair liquid cooler inside a Fractal R3 - needless to say it's pretty quiet
Eww, stock PCs.
@DeadMG Does that mean you have passed the first two? Or failed three years in a row?
@Cicada Linux (statistically over the last 10-15 years: 20% gentoo, 75% ubuntu and 5% mint)
20:56
I bought my previous PC at ikbenstil.nl. It was way overpriced actually, but really quiet.
@ManofOneWay Passed the first two. Not with le flying colours, but I did pass them.
You can use water cooling for quietness.
@StackedCrooked Depends on how much money you invest on the silence aspect. Me, I find silence a lot more important than a couple 100 MHz more.
@FredOverflow So do I.
20:57
Because really, the fans and HDD are the only sources of noise in a PC.
@sehe Oh. Fuck gentoo!
technically, I could choose to resit my modules for this year, but there's no way in hell that I'mma memorize the instruction set of an embedded CPU from 1980, so it's pretty unlikely that I would pass the year if attempted again.
@CatPlusPlus But when you are a starting DIY that might not be the best/easiest choice
CPU-wise I'm heading for a 2600K, I guess. I'm having a lot of trouble picking a GPU, though.
@Cicada it was also in order of appearance/vanishing
20:57
I did have overclocking in mind, but I've never gotten round to it, and nothing I want to do taxes this box, so I'll prolong the life of the hardware by running it stock and only clock it when it struggles
@StackedCrooked I intentionally bought the slowest Core2Duo there was back then so I could keep it cool even with a fan on slow setting.
Screw OC.
@Cicada Since you'd like to do CUDA, it's gonna be nvidia card, no?
@FredOverflow As I said, I bought my previous PC at a small web company that specialized in silent PCs, but they were expense. Then I bought a iMac, which is also silent, but expensive.
@sehe Well, I wouldn't do it.
20:58
@TomW Same here
@sehe I do CUDA for work but yeah that could be interesting
But I don't really care about the fan noise.
@StackedCrooked Which one? Tranquilpc by any chance?
I want a decent GPU that can has GW2 in max settings on a 27" screen
@FredOverflow I think HD was worst source of noise in my PC before my prev PC.
20:59
@CatPlusPlus I absolutely hat every kind of noise coming from a computer.
@sehe ikbenstil.nl
It's probably any GPU manufactured after 2009.
@Cicada A new generation has just hit, so you're quite in luck.
@CatPlusPlus I care only about fan noise, really. I won't use a computer if it makes tiring/boring noises
20:59
> I can has GW2 in max settings on a 27" screen?
I want that
if you have cash, you could buy a new card, or if not, the ones from the previous generation have just gone down in price.
@StackedCrooked Nog duurder inderdaad.
@DeadMG Well, what's more important than getting your degree? You should just do it =)
@sehe It's a soothing sound.
20:59
@DeadMG The kepler? They're expensive
@JimNorton quantum?
@FredOverflow yas pls

« first day (621 days earlier)      last day (4553 days later) »