« first day (713 days earlier)      last day (4234 days later) » 

3:00 PM
@TonyTheLion trololol
 
There's only one place where you're allowed to use a stupid delete loop: in the destructor of ptr_vector (and even there, it's avoidable).
 
@R.MartinhoFernandes I don't need a shrink
@kbok lol
@LuchianGrigore that's disgusting
 
@TonyTheLion That you believe that may be part of the problem :P
 
@R.MartinhoFernandes Go back to being a robot :P
 
@TonyTheLion it's a cicada
 
3:03 PM
I don't like them things
 
bugs are weird alien things.
I tend to let spiders be, since they eat all the other things :)
 
I don't like spiders
 
me either
but the enemy of my enemy is my friend :)
 
@Cat doesn't like spiders either, some funny rants from him in the transcript somewhere
 
when they do that creepy dropping-down-right-ontop-of-you thing though, all bets are off
 
3:07 PM
gross
 
follow the spiders....
 
Anyone with anatidaephobia shouldn't be in the room when @Mooing is in the room. He may be that duck watching...
 
Spiders cool. When there was good weather a month or so ago, I watched hundreds of them fighting for web space, (no, real spider webs), in the hedge outside. I rooted for the little guys but the bigger, fatter spiders always won.
 
Anyone remember who wrote the stdint replacement templates you can see here:
0
A: detect 64-bit integer type without preprocessor or stdint.h

rubenvbIf the problem is MSVC and <cstdint>, upgrade to at least MSVS2010 or write it yourself for Windows. It's not hard. There is some template trickery you can use, but it still requires long long to get up (and over) 64-bits integers. I got it from a guy in the SO C++ Lounge: https://github...

 
3:12 PM
@MartinJames That's no coincidence
 
And congrats @MooingDuck.
 
@rubenvb I think more than one person has come up with such things here.
 
Probably. But I distinctly remember blatantly copying this from ideone when I asked for this. I think it may have been @StackedCrooked or the soon-to-be-husband.
 
aha
Credit goes where credit is due.
 
3:14 PM
@rubenvb Yes, it was @Stacked.
 
So Robot, you're going to have to learn German then?
 
I don't envy him
 
@TonyTheLion Yep.
 
don't think german is particularly fun to learn :p
 
I quite like German, just don't have much chance to use it these days
 
3:16 PM
@R.MartinhoFernandes Ich möchte diesen Teppich nicht kaufen.
 
@FredOverflow lol
 
lol
a lemming :)
I noted some starred comment about lemmings
 
So far I can read aloud most things, I know numbers up to millionen (well, not all the teens, most), days of the week, that kind of stuff.
 
@TonyTheLion where's the green hair?
 
@R.MartinhoFernandes Das ist gut, Ja!
@melak47 real lemmings don't do green hair.
 
3:18 PM
Kopi luwak (), or civet coffee, is one of the world's most expensive and low-production varieties of coffee. It is made from the beans of coffee berries which have been eaten by the Asian Palm Civet (Paradoxurus hermaphroditus) and other related civets, then passed through its digestive tract. Kopi luwak is produced mainly on the islands of Sumatra, Java, Bali, and Sulawesi in the Indonesian Archipelago. It is also produced in the Philippines (where the product is called motit coffee in the Cordillera, kape alamid in Tagalog areas) and in East Timor (where it is called kafé-laku). Weasel ...
Pooped coffee. Not special.
 
Oh right. How do I make Data* a new fancy C++11 pointer?
And how do I work with it?
 
user1174868
I just amde some coffe from my mocha pot
 
@Drise std::unique_ptr<Data> data_ptr
 
@Drise Depends on what you want to do with it.
 
if you need a deleter then you'll need to create one
 
user1174868
3:19 PM
Is this still the book to get? amazon.com/gp/product/0321714113/…
 
if your Data object requires some special clean up procedures
else just use the default
 
@Jordan yes
 
smart pointers, is the correct name
 
Only one Container can hold a Data* at a time.
 
At the hostel they gave me this list of common phrases, but it doesn't help squat, because they have written them in some weird phonetic transcription crap, instead of proper German. I can read proper German, but I can't read crazy phonetic transcription.
 
3:20 PM
Then unique_ptr it is.
 
user1174868
@FredOverflow Thanks, I think I will be using primarily c++ for school
 
@R.MartinhoFernandes oh :(
 
How easy is it to move one Containers data to another?
 
depends
 
std::unique_ptr<Data> x = std::move(y);
 
3:21 PM
@FredOverflow lol exactly.
 
Say, it shows "two - SZwvvjj"
 
And last but not least, is this supported by MSVS 2010?
 
@Drise yes
 
WTF kinda of phonetic transcription is that? It has no freaking vowels.
 
You may want to read this, if you have a couple of minutes to spend:
34
A: Can someone please explain move semantics to me?

FredOverflowMy first answer was an extremely simplified introduction to move semantics, and many details were left out on purpose to keep it simple. However, there is a lot more to move semantics, and I thought it was time for a second answer to fill the gaps. The first answer is already quite old, and it di...

 
3:21 PM
Oh yippie
@FredOverflow I think I've read that like 4 times now lol
 
@R.MartinhoFernandes it's how you'd say "Zwei" you don't really pronounce the e
 
user1174868
Actually none of my courses specify a language except the first one specifies java, the rest dont mention one, does that mean pick a language?
 
@TonyTheLion 3?
 
no two
 
@TonyTheLion "Zwei" is "dsvaai" in my book.
 
3:22 PM
@Jordan Pick assembly
 
@TonyTheLion I know there are vowel sounds in it (like "a" and "i").
 
@TonyTheLion Oh, right.
 
user1174868
@drise I was thinking scheme
 
That thing is all consonants.
 
I guess it's also dependent on where in Germany that thing was written
cause dialects and shit
and perhaps these people don't pronounce it like you do
fuck knows, I'm no language expert
ask a German person @FredOverflow
 
user1174868
3:24 PM
As an american is it hard to go to a european university? I mean it is still cheap right?
 
Ask Daknok, but he's no longer here and he's not German.
so pointless
 
user1174868
lol
 
@Jordan 288€ per semester
 
user1174868
I think it might be easier and quicker for Americans to go to european schools and not go $60,000 in debt
 
user1174868
wtf
 
user1174868
3:26 PM
I paid $2500 for a semester at my community college
 
@Jordan Maybe.
 
€288 FTFY
 
user1174868
America sucks
 
ugh
how can I read YES from a stream as a boolean?
 
@FredOverflow Woah. I paid €1000 a year.
 
3:27 PM
you fucks
 
@Drise Read a string and test if it matches "YES".
 
I had to pay £3350 a year.
 
bleh
 
I paid 0 a year
 
and the students this year are £9,000 a year
 
3:27 PM
cause I didn't go to uni
 
user1174868
My brother paid $8000 for a single semester, I think that is average
 
@DeadMG holy fucking tossing tart
 
@DeadMG FFS that's the triple.
 
@R.MartinhoFernandes Yep.
 
In Belgium it's around €560 tuition for a year.
And that's if you (or your parents) make a lot of money.
There's €260 and €0 too.
 
3:28 PM
@sehe: "HKAT"? I thought I knew most of the usual acronyms, but that one has me baffled.
 
For us it's free for about 3/4 of the students, depending on grades
Otherwise, it's around 1000 euros per year
 
@Jordan Mine's $3.5k a semester
 
user1174868
I think average tuition in the US is around $24000 a yer
 
user1174868
@drise Us?
 
@Jordan I paid that much at my university
Then I was under a partial scholarship
 
3:29 PM
@Jordan Wouldn't be in $ if it wasn't
 
user1174868
I can't get any grants or scholarships for wahtever reason
 
@Jordan I don't think you'd want to go to an average college/university in the US.
 
user1174868
@Drise I thought you were being nice and doing the conversions for me :P Anyways that is cheap
 
user1174868
@rubenvb Why?
 
3:30 PM
@Jordan The difference between a good university and a bad university is huge in the US.
 
I mistakenly brought my car keys in my coat. Now my brother cannot use the car back in Portugal.
Ooops.
 
Which makes average bad.
 
@R.MartinhoFernandes: LOL
 
user1174868
@rubenvb Sure, but that depends what you mean. If by average you mean a top state school like U of M then that isn't fair
 
@Jordan Michigan?
 
user1174868
3:31 PM
@Drise I meant Minnesota but I think both are about the same right?
 
@Jordan I mean compared to Belgium/Netherlands/Germany/Scandinavia average level.
 
user1174868
@rubenvb Oh, well then yeah I suppose
 
God dammit. Why does my boss have to provide the dumbest format that makes all the easy C++ parsing really a pain?
 
I'm not sure about the UK. Last I heard it was abysmal cause the government decided to invest most in the two top universities and leave the rest to fend for themselves.
 
Well, I fixed my answer.
Because after -2 I had to. =[
 
3:32 PM
@R.MartinhoFernandes Things balance out then. Last time we were in Portugal, Anne had to come home early but could not use my car at the UK airport 'cos I still had the keys in Portugal:(
 
Still has a 'new', though.
 
@ThePhD new isn't evil. As long as it's in the constructor of a std::unique_ptr.
 
@R.MartinhoFernandes fail
 
@MartinJames Oh, you've been to Portugal? Algarve?
 
@rubenvb Haha, true enough. Or in the constructor of my own personal Pointer class! :D
 
3:34 PM
@ThePhD nope, don't count. Either std or boost. All other things have a large chance of bugginess.
 
@rubenvb But... but but.... Okay, fine. :c
 
@JerryCoffin Not replying to the actual message made me search for it. I'm glad I had a good keyword to go by
 
> Sorry, but if multiplying something by two somehow makes you understand things that didn't make sense before, you're an idiot.
 
@rubenvb There is no new in the constructor of std::unique_ptr, you have to allocate at call site :(
 
where does that come from @R.MartinhoFernandes?
 
3:35 PM
@JerryCoffin HKAT = Hwo Knew About That.
Obviously <grin style="sheepish"/>
 
@TonyTheLion Where does what come from?
Babies come from Paris.
@sehe Ow.
 
@TonyTheLion The whole pi and the pi*2 constant
 
48 secs ago, by Tony The Lion
> Sorry, but if multiplying something by two somehow makes you understand things that didn't make sense before, you're an idiot.
from your chat profile page
 
Ah.
It's about that tau crap.
Fred said it.
 
oh blame Fred
always easy
:P
 
3:36 PM
No, I thoroughly agree with it.
I'm just crediting him.
 
ah right
 
Sep 13 at 4:45, by FredOverflow
Who the fuck cares about a factor of two? Sorry, but if multiplying something by two somehow makes you understand things that didn't make sense before, you're an idiot.
 
ah right
 
@R.MartinhoFernandes Yes, vacations. Albufiera. Very ill 'cos Coyote bar, many times:)
 
so robot, did you have a job then? You just wanted something different?
 
3:39 PM
@FredOverflow that's what I meant. Using new when calling the constructor.
 
user1174868
So is anyone knowledgeable about what kind of rounding is done in multiplaction of small numbers in scheme?
 
user1174868
Actually forget that, I really need to get back into c++ I just ordered the primer
 
Ouch. I never knew I could lose so much rep just by answering a question. =[
I'm going to go be depressed about it and cook myself a fat slab of bacon.
 
user1174868
Anyone watch louie? I think that scene sums up guilt eating the best I have ever seen, the beach episode specifically
 
3:47 PM
@ThePhD Never answer a question with std::vector<T*> with more than one line.
 
@ThePhD You only lost four rep.
 
@sehe I'd been seeing ads for it for a few weeks (or so), but maybe they only showed them to people whose IP addresses indicated that they were on, say, the same continent.
 
0
Q: Ability to search for C--

Josh VoigtsI'm finding it impossible to search for C-- on Stackoverflow. It doesn't seem to have a tag either. Is this a limitation of the search system Stackoverflow uses?

 
@Mysticial It's real.
It's an intermediate language that is used in GHC, for example.
C-- (pronounced "see minus minus") is a C-like programming language. Its creators, functional programming researchers Simon Peyton Jones and Norman Ramsey, designed it to be generated mainly by compilers for very high-level languages rather than written by human programmers. Unlike many other intermediate languages, its representation is plain ASCII text, not bytecode or another binary format. Design C-- is a "portable assembly language", designed to ease the task of implementing a compiler which produces high-quality machine code by having the compiler generate C-- code, delegating t...
 
3:51 PM
Funny... why doesn't googling for C-- give me anything?
 
uh maybe google interprets -- as "dont give me pages with - in them" ?
 
5
Q: Why does gcc allow arguments to be passed to a function defined to be with no arguments?

reddragonI don't get why does this code compile? #include <stdio.h> void foo() { printf("Hello\n"); } int main() { const char *str = "bar"; foo(str); return 0; } gcc doesn't even throw a warning that I am passing too many arguments to foo(). Is this expected behavior?

funny that this is allowed in C
 
@Mysticial It's hard to google it too, it's not just SO.
 
@rubenvb Can you spell that out for me? Wots wrong with a pointer container?
 
3:53 PM
"c minus minus" works fine, though.
 
@MartinJames Nothing's wrong with a pointer container. I'm just saying: never write something std has already. You'll only shoot yourself in the foot.
 
So...
Why is haskell so cool?
 
@rubenvb Oh, right, OK, yes.
 
@Drise Because the coolness is intrinsic.
 
@Drise ..because it shatters easily if touched?
 
3:57 PM
Because smart people talk about it.
 
Like why would I choose it over C++?
 
And that intrigues dumber people.
 
@rubenvb You consider Cat smart? Shit, they are just giving smart away nowadays
 
@Drise For what?
 
@Drise I consider most regulars here smart when it comes to programming. I suppose you do the same.
 
3:58 PM
@rubenvb (joke)
 
@rubenvb don't sound like it
 
lol
Poor kitty.
 
I never said the @Cat was among them.
He mostly meta-discusses or fights with the puppy over food.
 
Man, back when I wa your age, you practically had to give your left testicle to be called "smart".
 
@Drise Aren't you 19 or something?
 
3:59 PM
@Drise You should've hung around more pleasant company then.
 
20, but that's arbitrary.
 
"Back when I was your age", when you're the youngest in the room is a bit... weird.
 
@R.MartinhoFernandes Ironic?
 
lollll
 
(How did I know one of you would jump right at that?)
 
4:00 PM
Anyway, if you give your left testicle to be called "smart", you're not very smart.
4
 
@R.MartinhoFernandes assert(false);
 
Such ultra starbait
Wow, it's noon, and there's been silence for 7 whole minutes?
 
@R.MartinhoFernandes Hmm..."It was smart to get your left testicle amputated before the cancer spread."
 
@JerryCoffin Giving your left testicle to stop cancer is smart.
 
user1174868
I am 25, I feel like billy madison in school
 
4:10 PM
@Drise It's 17:10 here, and I have to eat sometime:)
 
fuck vector. I need a dynamic non-resizeable array of non-moveable elements, but vector can't keep such elements. unique_ptr<T[]> is not an option, because it doesn't have size() and begin/end
 
@R.MartinhoFernandes I thought so -- back when I was your age! (I know it doesn't make a lot of sense there, but I just had to slip it in somewhere).
 
7 hours ago, by Luchian Grigore
@BartekBanachewicz & @Drise like PHP. Go!
What was this all about?
 
@Abyx Can't you use reserve and emplace?
I think as long as you stay away from stuff like push_back it should be fine.
 
@Abyx "dynamic non-resizable"? In a case like this, "dynamic" mostly means "resizable", so which did you want?
 
4:12 PM
@Abyx It cannot?
 
lemme check...
 
Also I nominate @MooingDuck's "Im getting married" post to be pinned.
 
@JerryCoffin That's what I thought. I assumed 'dynamic' meant that he was going to new the vector, (or whatever).
 
@JerryCoffin I suppose he means with size known at runtime.
 
Mcdonals monopoly, why must I purchase your food so I can play your silly game?
 
4:14 PM
@JerryCoffin new int[x] is a dynamic non-resizeable array.
 
@R.MartinhoFernandes Well, I don't see a big problem? If they're non-moveable, store pointers to them in the vector, (some sort of pointer, any sort of pointer..).
 
@MartinJames "store pointers" - it kills performance.
 
@Drise I'm pretty sure you don't have to (at least in the US, they normally can't require that). They can, however, place pretty stringent conditions on entering without buying -- such as sending a hand-written request to some address that's impossible to find and only gets mail delivered once every six weeks.
@Abyx The array is dynamically allocated, but the array itself is not dynamic.
 
@JerryCoffin ok, "an array with size known only at run-time"
 
4:18 PM
Haha I found a question that is so obviously posted by one of my classmates...
 
@Abyx How? One extra indirection?
 
@JerryCoffin Oh I know. It's just in my head "must play monopoly; go buy mcdonalds" but I suppose that's what they want
 
@MartinJames cache locality.
 
@Abyx Instead of std::vector<foo> v(100); can't you use std::vector<foo> v; v.reserve(100); and then emplace or insert into it? What the robot said earlier.
 
@Prætorian Nope :(
 
4:20 PM
@Drise Be honest: you're just making excuses to eat junk food. You don't need to though -- one of the benefits of being single is that you can eat what you want without making excuses.
 
@JerryCoffin Oh I know.
 
@Abyx Maybe, kinda depends on how you use them.
 
I guess you're stuck with writing a wrapper around unique_ptr<T[]>.
 
@R.MartinhoFernandes Why not?
 
@Prætorian ideone.com/9ozBd
 
@Prætorian No -- even though you're never going to resize it, the code to do so will be there, which (in turn) requires that T be copyable or (in C++11) movable.
 
@JerryCoffin Yeah, I assumed he can make foo movable
 
You could derive from foo and add a fake copy or move ctor (possibly with an assert in it) just to shut up vector, and then use reserve+emplace_back to avoid it being needed.
 
probably unique_ptr<T[]> + boost.range could help here
 
But that's nasty.
 
4:24 PM
I belch in your general direction
 
user784668
Close votes?
 
user784668
0
Q: is that a good habit to have more than 20 thousand lines of code in one .c file?

thinke365i think most of you won't agree with that. but why vim have one file eval.c who has more than 20,000 lines of code? i think vim is quite classical software, but why its code sytle is so horrible? i don't think a human being can understand a file with 20,000+ lines of code, anyhow. 1 /* vi:set...

 
user784668
@MooingDuck Whoa, fuck you, then :P
 
@DeadMG I'd mention that my general direction has changed since yesterday.
 
@Prætorian Unless memory fails me, the original spec was exactly that foo was not movable.
 
4:31 PM
@JerryCoffin Must've missed that. Anyway, why the heck does emplace fail on a movable type?
 
@R.MartinhoFernandes Just read that like 20 minutes ago, yea
 
user1174868
So I know this isn't really c++ related but can anyone give me some advice on my college application essay? I need to explain why I want go to a specific university for computer science. I can't think of any thing that doesn't sound like bullshit
 
@Prætorian It's emplace_back.
 
std::begin Y U NO ACCEPT std::pair ?!
 
@R.MartinhoFernandes There's also an emplace that let's you insert whereever
 
4:32 PM
@Jordan Well, aren't you the one that is supposed to know why he wants to go to a specific university?
 
@Fanael Lol, so much fail.
 
@JerryCoffin Meh.. I'd have done it straightaway with a vector of pointers and moved on, only revisited it if there actually turned out to be a performance issue with caches invalidation/flushing.
 
Oh, I see. You'd have to use emplace_back to grow the vector
 
@Fanael I've had auto-generated source files that are over 20k lines. It obviously wasn't meant to be read by a human.
 
No, looks like you don't. emplace inserts, doesn't overwrite
 
user1174868
4:34 PM
@R.MartinhoFernandes Yes, and I don't think "Because I know I have a good chance at being accepted here" is not a good answer
 
@Mysticial At least IMO, that no longer qualifies as a "source file", even if it does happen to be encoded in a higher level language. The output from lex or yacc (for example) can easily exceed 20000 lines, but the actual source is the lex or yacc input file, which will typically be only a few hundred lines (or so) for a reasonable language.
 
@JerryCoffin It wasn't even code. It was one hell of a pre-computed look-up table.
 
@Mysticial That doesn't count! I have language headers with thousands of lines, but it's all const data.
 
@Mysticial Right -- I've also seen (for example) an entire bitmap encoded as a giant array in C. It's big, but it's not really source code either (even if it is given as input to the compiler).
 
@JerryCoffin State-engine drive tables, also, can get big, but not really code.
 
4:38 PM
Hey does anyone know what the Visual C++ Error: Debug Assertion Failed! _BLOCK_TYPE_IS_VALID?
means?
 
I think the biggest file I've ever compiled was over 60k (lines) large. It had a precomputed 8-bit GF(256) multiplication table for a reed-solomon code implementation.
 
You probably wrote beyond the bounds of an array.
 
I have a file with 17316 lines in ogonek.
 
crap, that would make sense because I am writing a 4x4 Matrix wrapper
 
It's over 2MB.
It's part of the Unicode Character Database, encoded in C++.
 
4:39 PM
@BenjaminDangerJohnson You have so many errors in your code that the compiler decided it was easier to output only correct lines <g>
 
6
A: Debug Assertion Failed! Expression: _BLOCK_TYPE_IS_VALID

ChristopherThe _BLOCK_TYPE_IS_VALID assertion gets fired, when you overwrite the header of an block allocated by new. This happens when you slice objects, use dead objects, etc. You should have a look at your complete code, and try to work from the data you have in your debugger. This short code snippet co...

 
user784668
I have empty files in most of my Python projects.
 
@Fanael ?
you don't get anything done? :p
 
I don't think that is it. Actually I am pretty cofused. The error is thrown after I execute a return statement.
*confused
 
Do you return a user-defined type? Does that type follow the rule of three?
 
4:41 PM
Hmm... the largest hand-written source file that I have is 3k lines. 65k in size.
 
Otherwise, it's probably a double delete.
 
@BenjaminDangerJohnson Found another SO answer saying double deletion was causing that assertion
 
230
Q: What is The Rule of Three?

FredOverflowWhat does copying an object mean? What are the copy constructor and the copy assignment operator? When do I need to declare them myself? How can I prevent my objects from being copied?

 
I'm not sure if that applies. The only thing I am really doing different is using a static method
I am assigning the value as "Matrix m = Matrix::Identity()"
 
Show us the data members of Matrix.
Show us the definition of Identity.
 
4:46 PM
class Matrix {
public:
float values[16];
}
Matrix Matrix::Identity() {
Matrix matrix;
matrix.values[0] = 1;
matrix.values[5] = 1;
matrix.values[10] = 1;
matrix.values[15] = 1;
return matrix;
}
 
Ah okay, so the values are "inline". No chance of RO3 violations then.
 
That wouldn't cause double deletes.
 
in the constructor, all values are set to 0
 
If that code triggers the error, then some code that ran before messed something up. The problem is really somewhere else.
 
dam, but I used break points to pinpoint it on the return
 
4:51 PM
If you mess with the memory, the errors usually take some time to surface.
What exactly are you doing before the call to Identity? Can you show us the the function that calls it?
 
@BenjaminDangerJohnson the Matrix has you Neo.
 
@MartinJames Yeah -- the lex and yacc output I mentioned previously are (mostly) exactly that -- bit state machine tables that get put in the output. There is also some pre-written code that uses those tables that's just copied to the output, but it's not terribly large.
 
 
@Drise ...but it insists your identity is "Mr. Anderson."
 
@JerryCoffin If I'm not mistaken, he does call him Neo near the end.
He being Smith.
Or Lord Elrond.
 
4:55 PM
Elrond.
 
@R.MartinhoFernandes My apologies.
 
lol, I watch one CS video by an Indian guy, and now all recommended videos are by Indian guys!
 
@FredOverflow Bananas and sprite are entertaining youtube videos.
 
@FredOverflow Don't worry, soon you'll be in that weird part of YouTube.
 
which one :p
 
4:57 PM
@Drise Once in each film.
 
2
A: Adding extra compiler option in Qt

kmdentArmen and smallB, The way QT deals with compiler options is through the .pro file. It is a double edged sword if I may. It creates a nice abstraction, especially when compiling large projects. The problem is that you have to either look up or memorize how to add the flag. In the case of C++0X, y...

> This answer contains a lot of opinion and bloat, and if it were edited, it would state the exact same as the answer above it. I feel it should be removed.
 
yay again! Your resume looks very interesting and I would like to discuss more with you.
 
Flagged as such
 
@BartekBanachewicz gee gee
hopefully neither of us will be unemployed for long
 

« first day (713 days earlier)      last day (4234 days later) »