« first day (651 days earlier)      last day (4309 days later) » 

4:00 PM
@Ell one that runs in a web browser.
 
Ell
and does what? :l
 
Web stuff.
 
HTML and crap.
 
Bug tracker.
 
Ell
4:03 PM
a class is only as big as the size of it's members, right?
if its a POD
 
With my avatar as the logo.
 
Ell
coolio
 
@Ell I can be bigger.
 
@Ell Alignment can still make it bigger.
 
Ell
I'm thinking of boost::multi_array<Tile, 3>
 
4:04 PM
Damn, not many questions today. Are there always fewer questions on the weekends?
 
Ell
instead of boost::multi_array<int, 3> * 2
 
@ManofOneWay Fever? Use an RSS reader.
 
@Ell I use static_assert if I need to ensure the size is what I expect it to be.
 
Ell
I was just making sure it wouldn't be too over-heady
Me its premature optimization right?
 
Definitely.
 
4:06 PM
@RadekSlupik Misspelled ;P
 
Oh I really read it as “fever”. :P
Oooh. nevermind
 
@DeadMG What are you up to? Other than correcting my answers
 
planning my sleep cycle
 
What have you come up with?
 
Melatonin is sometimes prescribed to fix jetlag.
It's helpful to fix your sleep cycle.
 
4:13 PM
@ManofOneWay That I need to wait another five to seven hours.
 
Is it Star Trek's fault?
 
4:35 PM
nah
 
5:20 PM
Qt dev's online?
 
A rather generalized question, I'm aware. Does anyone know of any well-formatted and easy to read(Preferably commented) Direct3D9 hook sources? I've been looking for one, for learning purposes.
 
6:11 PM
@basic6 I work with Qt. What's up?
@Alec This is the C++ room, not the place to ask.
 
But he wrote it so eloquently :(
 
6:30 PM
@StackedCrooked I know. But still. There isn't much help to give here.
 
As for why it says "performance warning", it's probably because there's no single instruction that can "collapse" a larger integer type to a single 1 or 0.
 
@Mysticial are you sure about that?
 
@rubenvb I'm not 100% sure, but I think it needs at least 2.
Either you compare/test and then move the correct flag-bit into a register.
I'm not sure if there's another instruction that does something close. But I (think) the minimum is still two.
That said, I wouldn't call 2 instructions a performance issue.
 
lol. This is the only relevant thing I can come up with:
49
Q: Which is faster : if (bool) or if(int)?

Nawaz Which value is better to use? Boolean true or Integer 1? The above topic made me do some experiments with bool and int in if condition. So just out of curiosity I wrote this program: int f(int i) { if ( i ) return 99; //if(int) else return -99; } int g(bool b) { if ( b ) ret...

 
@rubenvb In that case, the test or cmp instruction is unavoidable.
 
6:39 PM
true, but that's what bool's will be used for anyways. So I think in the optimized case, the difference will be even more negligible. I've always hated that warning, especially the fact that you can silence it by doing !!some_int.
 
MSVC is known for a number of annoying and useless warnings.
The constant expression warning is the worst of them.
Along with the structure padding warning...
 
I never use MSVC for day-to-day compilation. Lucky me :)
 
hey mystical i have a question for you, because i know you love performance questions ;)
 
Ninja question.
 
@ITNinja let's hear it
 
6:46 PM
read*
 
would using a file operation within a program to capture output into a file be faster, or would using '>>' on the command line be faster?
(windows)
 
I would say both are too slow to matter anyways ;-) (Windows Console I/O is dog-slow)
 
BENCHMAKKKKKKKKRRRRRRRR
 
I strongly suspect doing it programmatically (correctly) will be faster than piping.
But I've never actually benchmarked it to know for sure.
 
I would also like to know how to capture a called program's output.
 
6:48 PM
I/O really fucking sucks.
 
Google: c++ fast write file site:stackoverflow.com (Feel free to suggest better search terms.)
 
@rubenvb cat foo | ./meh then read from stdin.
Use a pipe.
 
@RadekSlupik Won't work on Windows, will it?
 
You can also set up pipes from within your program and then use them with functions that spawn processes.
Oh Windows. I don’t care about Windows.
 
I do.
 
6:49 PM
 
Some spawn or execv style thing ought to have facilities to do this.
Never found them.
 
First Google Images result!
@rubenvb use fork and exec.
 
i just asked because i was curious haha, not that i have a huge need to know :P
 
That said, you should be aware that C++ streams can (sometimes) suck.
 
@FredOverflow What, you're all artsy now?
:P
 
6:51 PM
@RadekSlupik Windows! and I want to multithread the calling of these things too.
 
@Mysticial No need to be so careful in your wording here.
 
@rubenvb Oh yeah I forgot that already. xD
 
lol
 
Use Cygwin. >:3
 
> The famous pipe. How people reproached me for it! And yet, could you stuff my pipe? No, it's just a representation, is it not? So if I had written on my picture "This is a pipe," I'd have been lying!
My god, what a pedant. He would have fitted perfectly here :)
 
6:52 PM
I don't think he's a she.
 
Oh, I just read "Magritte" and thought it was a woman.
 
René François Ghislain Magritte (21 November 1898 – 15 August 1967) was a Belgian surrealist artist. He became well known for a number of witty and thought-provoking images that fell under the umbrella of surrealism. His work challenges observers' preconditioned perceptions of reality. Early life and career Magritte was born in Lessines, in the province of Hainaut, in 1898, the eldest son of Léopold Magritte, who was a tailor and textile merchant, and Régina (née Bertinchamps), a milliner until her marriage. Little is known about Magritte's early life. He began lessons in drawing in 19...
He's Belgian, so I know :D
 
<facepalm>
@FredOverflow You're such a barbarian.
 
@StackedCrooked ":D"?
 
It's a smiley. Turn your head 90 degrees to the left and you'll see.
 
6:54 PM
I don't think it was common for women to smoke pipes then.
 
@StackedCrooked Vrouwenpijpen. :P
 
@RadekSlupik Is this your first day on the internet?
:D
 
@StackedCrooked no.
 
Oh no, the Belgians are taking over the Lounge. Wir müssen etwas unternehmen!
 
Invade?
 
6:55 PM
We moeten iets ondernemen, inderdaad, want dit slaat nergens op!
 
我々は何かをしなければならない。
 
There are too many Belgians here?
 
What does "want dit slaat nergens op" mean?
 
Problem solved. :P
@FredOverflow “since this is nonsense”
 
I think there are 3 Belgians here. And a few from the Netherlands as well.
 
6:58 PM
I have more # TODO: comments in my code than actual code…
 
@FredOverflow Literally: "because this hits on nothing"
 
@RadekSlupik You invented a nuclear bomb that only kills certain people?
 
@blueprint.route('/create/', methods=['POST'])
def create():
    # TODO: Check if user is authenticated.
    repo_name = request.form['name']
    username = 'daknok' # FIXME: Read username from session's user.
    repo_path = path_for_repo(username, repo_name)
    os.mkdir(repo_path)
    # TODO: Check if mkdir succeeds.
    repo = Repo.init_bare(repo_path)
    # TODO: Store repo details in database.
    return redirect(url_for('.show', username=username, repo_name=repo_name))
@FredOverflow No, we drop it on a place where only certain people are.
 
Und wenn ich Deutsch rede, könnt Ihr das meiste davon problemlos verstehen?
 
6:59 PM
ugh
 
Most of it.
 
not like we'd put up much of a fight. Last time we were conquered after a day.
 
I had three years of German education.
 
@RadekSlupik But that's not a nuclear bomb, that's just a picture of a nuclear bomb. Ceci n'est pas une bombe :)
 
We built a bunch of concrete forts to defend against the blitzkrieg
 
6:59 PM
@FredOverflow was machst du dieses schöne Abend?
 
Which failed mightily for obvious reasons.
 
@FredOverflow Ich weiß das.
or weiss, or weisse or whatever. :P
 
@ManofOneWay Ich esse den Rest von meinem Salat und chatte in der Lounge. Eigentlich wollte ich ja mein Zimmer aufräumen, aber dazu ich bin zu faul :)
 
@FredOverflow I think a troll should have followed Magritte during his life and pointed out to him every time he said "This is ..." while referring an image.
 
I don't think they had trolls back then :)
 
7:01 PM
@RadekSlupik what framework is that?
 
@ITNinja Flask. I use Dulwich for manipulating Git repositories.
 
I guess pipes do work.
/CC @ITNinja maybe useful.
if you can read past the MSDN-like nature of the code.
 
@RadekSlupik kk cool :) yeah i use Bottle :)
 
@RadekSlupik "Ich weiß" is correct. "Weisse" is a beer from Berlin :)
 
@FredOverflow Ah. :p
 
7:02 PM
@FredOverflow isn't the sz-thing "deprecated"?
 
@FredOverflow Lebst du in einem Zimmer?
 
@rubenvb Not everywhere. But wow, you know a lot about German grammar :)
Why do I find this image when I google for "Berliner Weisse", and what does it mean? :)
 
German grammar is difficult.
 
@FredOverflow They live next door (country-wise). I had a German High-school course: one hour a week in the fourth year secondary education. My German sucks.
 
@RadekSlupik but it's very strict with its rules, go figure
 
7:04 PM
Do you know that football keeper dude from belgium: Jean-Marie Pfaff?
I think his German is better than mine.
 
der die das des dem den
 
prefer a language that has a lot of rules that are actually followed, as opposed to languages with a few rules which they then ignore
 
Dutch has a lot of rules too, but too many people ignore don’t know them.
 
I prefer English and Dutch Flemish.
Cause I kind of know them.
 
99% of people misuses the word “hun” constantly.
 
7:06 PM
@RadekSlupik got an example?
 
@rubenvb Hun hebben veel geld.
 
"Jabba the Hun"
 
when I was learning German, I had to be reminded constantly to follow the structure
 
@RadekSlupik Who says that?
 
@rubenvb The sz is only used after long vowels or diphtongs, like in "weiß". It's deprecated for all the short ones, like in "haßen" -> "hassen" now.
 
7:06 PM
@RadekSlupik That's very ... Dutch. Never heard that in Belgium.
 
@StackedCrooked All Dutch people. :P
 
I used to attempt - poorly - to translate what I wanted to say and end up speaking gibberish
 
I never hear that around here.
 
@FredOverflow OK. I'll try to remember that :)
 
Now this is a good grammar question: How do I properly clear a QVBoxLayout ?
 
7:07 PM
Or they say “van hun” instead of “van hen”.
 
8
Q: Qt - remove all widgets from layout?

Frank LoVecchioThis doesn't seem easy. Basically, I add QPushButtons through a function to a layout, and when the function executes, I want to clear the layout first (removing all QPushButtons and whatever else is in there), because more buttons just get appended to the scrollview. header QVBoxLayout* _layou...

Doesn't look easy
@RadekSlupik I sometimes hear that, but the difference is nearly inaudible.
 
And removing only the widgets is easy (there's even example code in the docs) but I want to clear sublayouts I've added with addLayout()
 
@rubenvb It kinda sucks though, because "In Maßen trinken" (drink moderately) can no longer be interpreted as "In Massen trinken" (drink heavily) now :-(
 
@rubenvb what about the use of “als” instead of “dan”? Is that common in Belgium?
 
@FredOverflow maybe that was why they changed it
public health initiative
 
7:08 PM
@TomW lol I doubt it :) Also, it can still be interpreted as "Drink from glasses that hold 1 liter" thanks to the Bavarians :)
 
“Ik ben beter in Nederlands als jou.” instead of “Ik ben beter in Nederlands dan jij.”
Most common error ever after “hun”.
 
@rubenvb Maybe you can create a new layout object, add all your widgets to it, and call setLayout on the parent widget with the new layout?
 
@RadekSlupik had a discusssion last week with a friend. I got to this conclusion: taaladvies.net/taal/advies/vraag/182
@StackedCrooked huge memory leak and double ownership (I would guess, not sure though, never got past Qt 101)
@RadekSlupik the first has two formal mistakes.
 
@StackedCrooked No that won't work because setLayout doesn't do anything if there's already a layout set
 
The Dutch also write too many words with spaces in them while they should not contain spaces at all.
 
7:10 PM
One bad, the other acceptable.
@RadekSlupik "relativistische elektronvortexbundels" ftw!
 
@FredOverflow god bless the Bavarians
 
And the docs tell me to get the old layout with layout() and delete it - it would be awesome if that worked
 
Rindfleischetikettierungsüberwachungsaufgabenübertragungsgesetz
Longest German word.
 
Here you see a Bavarian woman carrying 8 "Maß".
 
7:11 PM
Hottentottententententoonstelling is een kunstmatig tienlettergrepig woord. Het bevat tien t's en viermaal achtereen de lettergreep 'ten' – eigenschappen die het geschikt maken voor woordraadsels. Het is een voorbeeld van een lettergreepstapeling. Het woord is vanzelfsprekend ook opgenomen in het Opperlands. Het woord verwijst niet naar werkelijke tentoonstellingen van tenten van Hottentotten, maar is verzonnen als woordgrap. Het wordt soms ook gebruikt in de betekenis van 'reutemeteut' of 'santenkraam', zoals in de zin "De VRT zal voorrondes organiseren, een kandidaat aanduiden, een promo...
 
@RadekSlupik You can make words as long as you want in German, since we concatenate without spaces.
 
Shows that some time, somewhere in Bavaria, a Bavarian looked at his glass and thought "Even though I can just go and get another one, this beer is too small"
 
Also funny.
 
@RadekSlupik hottentottententententoonstellingsposterprinterpatroon
 
7:12 PM
@FredOverflow In Dutch we concatenate without spaces too.
 
The last couple of days were very hot in Germany, and all I could think about was drinking a cold one.
 
I hope you did.
 
Nope, I don't drink during the week.
Well, almost never.
Wait, is the weekend part of the week? If so, I can never drink again :(
 
is Germany as expensive for beer as most other european countries?
 
@FredOverflow Only when it comes to some morons who think the week starts on Sunday.
 
7:14 PM
If you go to the supermarket, a bottle of beer is about 50 cent. In a pub, it's about 3 euro.
 
0
Q: Is the "weekend" part of the "week"?

rubenvbIs the "week" only the five days in-between weekends or not?

lol
 
How big's a bottle?
 
I need edit rep on that site :)
 
0,33l but we also have 0,5l which are a bit more expensive of course.
And we also have a 1l can, but that's import (FAXE, I think from denmark).
@rubenvb lol idea thief
 
i love doing python/sql so much more then xhtml >.>
 
7:16 PM
We have "vaten" of about 5-10 liters (not sure really)
I'm going to have fun on the English SE site over time :)
 
In the Netherlands, beer is only 0,25l right?
 
In Belgium we have 33cl, 75cl, and 25cl
 
typical britain, we have the oddest system
 
cans, big(premium) bottles and little bottles
 
lagers usually 330ml but sometimes 275ml to cheat people out of extra money for less product
ales come in 500ml in shops but 568ml (AKA a pint) in pubs
 
7:18 PM
@rubenvb Answered. :P
 
@RadekSlupik I'll upvote if you upvote.
 
I already upvoted.
 
6
Q: Verb for blowing up zombies

BrutaliskA zombie is approaching you, but all is well since you happen to have a live grenade in your hands. Is there at all a one-word term for the act of throwing that grenade at the zombie and successfully blowing it up? More generally, is there an explicit one-word term for actively blowing somethin...

That site is funny.
 
I got a downvote for my first question :(
 
I always upvote any and all questions I answer.
(Except if I answer my own questions.)
@rubenvb Probably because definition questions are off-topic.
 
7:22 PM
heh
English is rich with words for doing cruel things with firearms and explosives
 
I randomly got 3 upvotes for pretty much a dupe on my first english question
It was a bit hard to find dupes of before you knew they existed.
 
probably because we did so much of it in the 19th century (thanks victorians) and the 20th (thanks americans)
 
I have less rep on ELU than Evan Carroll :(
 
Germans might like to look bashfully at their feet at that last comment
 
Is this UB?
0
Q: Arrays pointers on 32bit and 64bit systems

EyalArThe following code prints different results on 32bit and 64bit systems: #include <stdio.h> void swapArray(int **a, int **b) { int *temp = *a; *a = *b; *b = temp; } int main() { int a[2] = {1, 3}; int b[2] = {2, 4}; swapArray(&a, &b); printf...

The OP seems to be using a hack to swap two local arrays.
 
7:26 PM
You cannot swap arrays like that.
 
@RadekSlupik Yeah, that's what I was thinking...
 
It should only swap the first element.
 
@RadekSlupik More like, the first sizeof(int*) bytes starting from the first element.
 
Oh no wait
Yeah,
 
it's a pointer to pointer
 
7:28 PM
It should work if you have an array of pointers.
 
he has a pointer to an array
 
@rubenvb Not really, taking the address of an array just gives you the address of the first element.
 
Use C++ and std::swap. Problem solved.
 
OK. Agreement.
 
But apparently the typing broke down to allow that be compiled.
Apparently a is decaying to a pointer before applying &. I don't know if the standard dictates that or if it's a bug in the implementation.
Looks like ouah's answer says the compiler can do whatever the hell it wants.
 
7:32 PM
It is UB for sure if there is only one element and int is smaller than pointer to int.
I should post this as an answer:
user image
8
 
@RadekSlupik Take the blue pill! Take the blue pill!
 
@RadekSlupik HA! I like that one....
 
I didn't even bother with it. I was just like "Here we go again..."
 
Xeo
Crap. One of my teeth just lost it's dental inlay to chewing gum -.-
 
7:38 PM
@Xeo visit a dentist.
 
Xeo
Aye, too bad tomorrow is sunday
 
Does it hurt?
If it does, drink water with paracetamol.
 
Xeo
Nah
was just chewing, suddenly something hard in there :(
 
probably best to give your mouth a really good rinse out and don't eat anything
you do not want an abscess
 
Don’t eat anything?
How can somebody not eat bacon?
 
7:40 PM
to get stuck in the gap
ah.
 
Alcohol. Fixes everything. Short term.
 
Seriously I went through a huge bacon phase a couple years ago and now everyone else seems to be going through the same phase.
 
I was starting to write a project hosting site a few hours ago.
For Git.
 
you'd be forgiven for thinking that baconism was an actual religion
 
Right now I’m thinking: fuck it, and I want to stop with it. xD
Radek y u never complete a project!
@FredOverflow do you like Rammstein?
German band.
 
7:52 PM
Hmm, goat cheese.
 
I prefer sheep or bison cheese.
 

« first day (651 days earlier)      last day (4309 days later) »