« first day (536 days earlier)      last day (4424 days later) » 

7:03 PM
agreed making a library thats both flexible and reliable is a hard task
 
7:22 PM
quick question: another strict-aliasing one...
does this violate strict aliasing:
void *ptr = malloc(...);

int   *i_ptr = (int*)ptr;
float *f_ptr = (float*)ptr;

i_ptr[0] = 123456;
cout << f_ptr[0] << endl;
This strict-aliasing stuff has been really bothering me lately... lol
 
Pretty sure it does
 
and also with void *ptr = new char[...];
Because this very common when reusing memory buffers.
 
The allocation doesn't matter, it's that you have two different pointer types that point to the same thing
 
hmm, maybe it violates it when I read and write with different types, but if I do something like this is does it still violate it?
void *ptr = malloc(...);

int   *i_ptr = (int*)ptr;
float *f_ptr = (float*)ptr;

i_ptr[0] = 123456;
cout << i_ptr[0] << endl;

f_ptr[0] = 123456.;
cout << f_ptr[0] << endl;
Here I'm not writing and reading from a different type. But I am still reusing the same buffer.
 
That should also violate it
although I think this should work:
void *ptr = malloc(...);
{
  int   *i_ptr = (int*)ptr;
  i_ptr[0] = 123456;
  cout << i_ptr[0] << endl;
}
{
  float *f_ptr = (float*)ptr;
  f_ptr[0] = 123456.;
  cout << f_ptr[0] << endl;
}
 
7:28 PM
hmm... I think I can probably live with that as well.
 
Because i_ptr is destroyed before f_ptr is created, so you don't have multiple pointers of different types pointing to the same memory, right?
 
Yeah
 
(Ignoring ptr)
 
It might optimize better too, dunno though
 
Are null pointers an exception? I'm pretty new to this stuff.
 
7:30 PM
Well of course
 
There are few places where I write as 32-bit integers and read as 64-bit integers as a form of vectorization. That violates strict-aliasing. Also it's almost impossible to avoid violating strict-aliasing with SSE intrinsics. But I think compilers make an exception to that case.
hmm
 
Using union?
 
what about this?
void *ptr = malloc(...);

{
    int   *i_ptr = (int*)ptr;
    i_ptr[0] = 123456;
}

{
    float *f_ptr = (float*)ptr;
    cout << f_ptr[0] << endl;
}
@Pubby That's not possible if the buffer that I'm reusing is run-time determined and is potentially gigabytes large.
 
That's technically UB
 
@Pubby UB or just implementation defined?
 
7:33 PM
Almost certain it's UB. Although all compilers will likely do what you expect
 
sbi
> Man this code is sexy. Now, if I can just get it to work… — Tim Post
 
hey
 
hey
 
hey
 
sbi
hey
 
7:35 PM
hey
 
hey, can I star a collection of messages?
 
You can bookmark conversations some how
 
wtf?
how did you guys time that?
 
sbi

hey

1 min ago, 30 seconds total – 5 messages, 5 users, 0 stars

Bookmarked 15 secs ago by sbi

8
 
hmm, getting a compiler error that's baffling me. It says "no matching function for call to 'sorted_copy(blahblahblah)` and it appears to match my function perfectly. Can someone point out why it doesn't match? ideone.com/s7IjE
 
sbi
7:37 PM
@MooingDuck What do you mean "getting a compiler"? Is MS giving theirs away?
 
I hate it when I need help on some code to answer a SO question :(
 
@MooingDuck Move the relevant overload (the one taking a predicate) before where it's used (i.e. line 19).
 
@sbi I can't words.
@LucDanton facepalm. Thanks!
 
@Mysticial it was on purpose.
 
@daknok_t that I can tell, but how did you all get it within the same second?
 
7:41 PM
@Mysticial probably your browser lagged.
 
Yeah, it was really within a millisecond
 
how?!?!?!?! lol
 
LATENCY
 
Is there a way to check the time a message went through? I can't figure it out
 
sbi
@MooingDuck Only down to a minute. Open the little dialog that appears when you click on the v arrow to the left of a message and hover your mouse over the relative time it states.
@Mysticial We didn't. It was one after the other. Within the same minute, though, AFAICS.
 
7:49 PM
so coincidence?
 
sbi
@Mysticial No. One wrote "hey", a second answered the same way, and then we just kept it rolling until @daknokt blew the thing.
 
I remember seeing 4 of them all appear at once in a single update.
So it looked synchronized. If they weren't that close, I would've added mine as well
but it seemed like a prank or something
0
Q: blodsheed devcpp increasing the stack size

Yilmaz Paçarizwe are using blodsheed devcpp to make a image processing project. we are implementing connected component labeling on a wideo frame. we have to use a recursive function which goes recursion so many times that we get a stackoverflow... how can we have a larger stack size with linker commands or an...

 
As I said, fucking network latency. :P
blodsheed
 
bookmark it
along with the C, D, E, F, G one from yesterday
 
7:56 PM
0
Q: blodsheed devcpp increasing the stack size

sehecommented: blödschaden devcpp how appropriate

 

Hi

Dec 1 '11 at 4:50, 28 minutes total – 7 messages, 6 users, 0 stars

Bookmarked 9 secs ago by StackedCrooked

James Gosling

Aug 23 '11 at 20:54, 4 minutes total – 21 messages, 4 users, 3 stars

Bookmarked 6 secs ago by StackedCrooked

 
OMG
We've lost sense
On the bright side, we did so collectively
 
(removed)
 
spammers
 
stfu
lol I said stfu and there was instant silence.
 
8:02 PM
1 message moved to bin
:D
We don't need no adders in here.
 
@daknok_t we just watched if you'll say another silly thing
 
:P
 
@daknok_t The earlier silence had been diligently (removed)
 
The silence of the removed.
 
8:11 PM
I think the mirai nikki OP is better...
 
Haven't seen that one yet.
 
@sehe what happened? it looks like Lounge<C++> got censored..
 
I think some of the lyrics are in German
 
@je4d Just look at all those echoic/group resonance conversation threads linked. It is insanity
 
8:16 PM
ah, i see
didn't know you could bookmark conversations like that
 
@je4d me neither. Can't think of a real use for it (except for drawing attention of a moderator)
 
@sehe I dunno, I might use it in the future.. e.g. if there's a particularly in-depth C++ discussion that I think i'd like to revisit in the future
 
hmm...
 
@je4d Oh well, search is my friend
@Mysticial hmm...
 
where was that conversation where we went from Jon Skeet to the density of Jupiter's atmosphere?
 
8:20 PM
@sehe don't start that again :P
 
hmm...
 
@MooingDuck - stackoverflow.com/a/10016203/8747 - I fixed the syntax error in your comment and put it in my answer. If you want to create your own answer, feel free to delete your code from mine.
 
Nov 18 '10 at 22:38, by FredOverflow
@sbi Well yeah but for example, struct and class are very different beasts in C# right? Somewhere I read that structs should be immutable. I want to know why. If this immutability of structs really is important and not some voodoo programming, I bet Jon Skeet will have written about it.
That's where it starts with the John Skeet, you'll have to page to the next 2 hour transcript to find Jupiter I think
 
It wasn't that one. Much more recent, I was part of it. And I wasn't around in 2010
 
Not to sure, I wasn't there. Jupiters atmosphere was ongoing since that start, thought
 
8:23 PM
Feb 29 at 20:22, by Mysticial
@StackedCrooked Actually, it's even harder to do that on Earth because the density of the atmosphere on the surface is very low. To float, you just need to be less dense than the atmosphere. On Jupiter, if you go far down enough, it'll be dense enough to stay afloat. But you'll have other problems to deal with.
 
Feb 29 at 20:22, by Mysticial
@StackedCrooked Actually, it's even harder to do that on Earth because the density of the atmosphere on the surface is very low. To float, you just need to be less dense than the atmosphere. On Jupiter, if you go far down enough, it'll be dense enough to stay afloat. But you'll have other problems to deal with.
^ This?
@je4d Hahaha. Don't start that again!!! Posted at the exact same second too
 
yeah, I think so :)
 
@sehe lol.. i got there first!
at least, that's how it appears here
I pressed enter and both moved into view in one animation
 
@je4d same second, your id is just one before mine (3177375 vs 3177376)
@je4d Same here
 
@sehe winrar ;-)
 
8:24 PM
Technically, it doesn't get more synched
 
yeah, my browser's definitely lagging...
only in chat though
 
@Robᵩ no, you had the answer, I merely had a "cute" workaround. I added both versions to show the easy usage though.
 
Oooh... Jon Skeet is getting pwned this week... badly...
 
@MooingDuck - would something like template<> auto get_endl(std::basic_blah) -> decltype(std::endl<e,t>) { return std::endl<e,t>; } worked?
 
@Robᵩ yeah, but I forgot the syntax :/ Do that.
 
8:32 PM
More precisely: `template<class e, class t, class a>
auto get_endl(const std::basic_string<e,t,a>&)
-> decltype(&std::endl<e,t>) { return ... }
 
So this is what it takes to beat Jon Skeet:
 
@Mysticial whoa...
Apperently you can't make recursive chat oneboxes
 
That is some crazy high daily rep
 
@Robᵩ were you going to do that or should I?
 
I'm on it.
 
8:38 PM
 
sbi
4 mins ago, by Mooing Duck
Apperently you can't make recursive chat oneboxes
5 secs ago, by sbi
4 mins ago, by Mooing Duck
Apperently you can't make recursive chat oneboxes
 
k, off to lunch
 
sbi
12 secs ago, by sbi
5 secs ago, by sbi
4 mins ago, by Mooing Duck
Apperently you can't make recursive chat oneboxes
 
@sbi see?
 
sbi
32 secs ago, by sbi
12 secs ago, by sbi
5 secs ago, by sbi
4 mins ago, by Mooing Duck
Apperently you can't make recursive chat oneboxes
 
8:40 PM
it just makes copies, no infinite/crash/other
 
@sbi ah, I was unclear. again
 
sbi
@MooingDuck Ah, you mean a onebox that refers to itself?
 
10 secs ago, by Johannes Schaub - litb
8 secs ago, by Johannes Schaub - litb
recursive boxes
 
sbi
9 secs ago, by sbi
I suppose this won't work.
 
8:40 PM
8 secs ago, by Johannes Schaub - litb
recursive boxes
 
@sbi that was my intent :/
 
@sbi makes a copy of whatever was there before
anyway, that's better suited to the sandbox
 
look, my quote is more recent than my message xD
 
sbi
@MooingDuck The thing is, those oneboxes are rendered once, on creation. They are not rendered on view. Incidentally, this avoids all trouble WRT recursion.
 
8:42 PM
why is it called "onebox" ?
 
sbi
@Mysticial How can you answer bounty questions, sometimes more than one per day, 14 days out of 15?
 
what's the "one" in there
 
sbi
@JohannesSchaublitb Because Marc and balpha called it that way, when they wrote this chat.
 
oh
@Mysticial good work!
i wish i could answer that many bounties
 
sbi
@JohannesSchaublitb Why?
 
8:45 PM
wow, Gaddafi raped the girls in lybien
@sbi because then i would have more rep
 
sbi
@JohannesSchaublitb And what would that good be good for?
 
for whoring purposes
and for increasing the nerd factor
 
@sbi It's a measure of your worth as a human being, dont'cha know?
 
sbi
@je4d No, in fact I don't.
 
yes, REP is a measure of how helpful you are
obviously I'm the most helpful in here
 
8:49 PM
@JohannesSchaublitb and by far the most modest
 
sbi
@JohannesSchaublitb Right. Every time you appear all questions here get magically answered. No needless diversions are posted anymore, and no geeky stupid trick questions.
 
@JohannesSchaublitb Um... no it wasn't me... I'm a nobody. :)
 
@sbi exactly!
i'm soo clever. oh my god i should work for microsoft
 
lol
that's not what i was going for
I asked litb who who he worked for, before remembering that he's still a student
 
sbi
8:58 PM
@JohannesSchaublitb What do you of all users want to increase you nerd factor for?
You're just behind the leading two dozen rep whores on SO, you're the second who has c++ as their most prominent tag (and I haven't seen Greg in the c++ tag for years), plus you're the only one on the first page whose most prominent three tags do not include either c#, java, or some scripting language. (With the next one, @James, being only on the second page.)
Additionally, you are well-known on comp.lang.c++.moderated and comp.std.c++ as "the guy who knows the standard by heart", and are thus, as a student, and at an age where others struggle to make their professor remember their names, a respected member of Stroustrup and his gang of followers gurus.
If that isn't nerdy enough for a whole bunch of nerds, I might need an update on what "nerd" means.
 
sbi
Wow. Silence. Presumably I've now sent everybody out trying to figure out what comp.std.c++ even means.
 
The longest chat messages are always from @sbi. d:
 
sbi
@daknok_t Sorry. I have a hard time expressing myself in thos crptcly shrt cht style msgs.
And I am an old fart and of that generations whose members were still taught to write a statement down in its full entirety.
 
It doesn't matter, but I just noticed it.
 
sbi
9:10 PM
I put my energy into writing in full sentences and paragraphs, and you reply with "it doesn't matter"?! I truly fear for this world.
24 hours ago, by sbi
The metabolism's final products have truly met with the rotating part of the air conditioning.
 
@sbi don't be sorry, I for one appreciate things being written out using full words and sentences
 
sbi
@je4d You're just trying to get karma points with me.
 
With "it doesn't matter" I meant "there is nothing wrong with it," obviously.
 
@sbi why would I want karma points with you?
 
better than "kthxbai"
 
9:11 PM
LOLCODE!
 
why does lolcode use "kthxbye"?
like, "kthxbai" is much more proper
 
Because the language designers said so.
 
you can try building a preprocessor to make C/C++ like that
#define ohhai {
#define kthxbai }
 
kthxbye would be exit(0);.
 
sbi
9:14 PM
> I suppose that when giraffes are discussing doing the easy parts of a task, they don't talk about "low-hanging fruit". — Thomas Thurman
 
@daknok_t You epic fail! it's kthxbai.
 
Not in LOLCODE.
 
then the authors have never seen a real lolcat
 
@DeadMG you're a loldog
 
lolwoof?
 
9:19 PM
lulz
I got stuck reading tropes again earlier
also last night, damn
 
yea, I've read that one
so I"m not clicking it
 
awww
 
I'm carrying on three arguments trying to convince people that there's no type that aligns to a 16 byte boundary.
am I wrong?
 
9:33 PM
that's 128 bits
well, SIMD has some I think
that require to be 128bit aligned
 
Morning.
 
Night.
 
answer: yes I was, alignas is not alignof. :/
 
you were wrong?
lol
 
sbi
"difficult domain to penetrate — hard numbers are few and far between" I see what you did there. http://bit.ly/Hi9uwJ
 
9:46 PM
@TonyTheLion I thought alignas/alignof had to align to an existing type. Apparently that's not the case. And yes, the debate was about SIMD I think
 
10:01 PM
@MooingDuck GPU data transfers fastest from a 16byte boundary. The Direct3D math lib comes with a D3DXMATRIXA16 which aligns to 16byte. SSE has similar alignment.
 
SSE requires 16-byte alignment, unless you explicitly use unaligned access instructions.
 
Xeo
10:21 PM
I'm seriously having the feeling that I have a serial upvoter on me
 
@Xeo I'm sure your just that good
 
Anyone who knows C here?
 
Xeo
about 15 diff answers upvoted in 3 days? I provided one in that timeframe :P
 
why people declare functions with parentheses around name?
 
Xeo
room topic changed to Lounge<C++>: Come in here, and witness the wrath if you mention C++! [c++] [c++11] [c++-faq]
 
10:23 PM
like R (func)(T arg);
 
Xeo
@Abyx prevents macro expansion
like the unfortunate min/max macros
and real min/max functions
 
@Xeo like you can put #define func() before?
 
@Xeo That's a problem how? :P
 
Xeo
Just look at all the +10s
and the occasional +5
@CatPlusPlus Serial upvoting is as discouraged as serial downvoting :P
 
10:26 PM
Pffft.
 
sbi
I just had 195 rep in four days without answering a single question.
You have more than half my number of old answers. You should have more than half of that rep, @Xeo. :)
I again shut up the whole room. Dang. What did I do wrong? Is there a bad mark on my forehead, that you guys shut up the moment I say something?
 
hmm, is a answer that has a link, and no text related to answering the question, am I justified in downvoting that? I got a lot of people telling me otherwise
I want code samples!
 
coding...
 
@Xeo In the last two days, I had 10 upvotes on 10 different answers months old
 
Xeo
@MooingDuck Only a link?
 
10:36 PM
@Xeo There's text, but nothing helpful to answering the questions
2
Q: Windows C++ nanosecond timing?

user997112Is there a way in C++ on windows to measure time in nanoseconds? All i can find are linux solutions.

 
Xeo
Only links, or mostly only links should be flagged as "low quality"
because that's what it is
 
@Xeo oh, flag instead of downvote? I guess that makes sense...
that seems harsher though :(
 
It's perfectly fine. There are tons of examples on MSDN.
 
@MooingDuck I used to just comment, and downvote after a while if the answer wasn't updated
 
I don't know what more would you expect from an answer to question like this one.
 
10:39 PM
TBH I'm not as vigilant (anymore). If the 'answer' isn't really an answer, I'll comment that it is more of a comment though. I still do that
 
@sehe: SO really needs a "remind me to come back in X hours" thing
@CatPlusPlus sample code would be a start
 
@MooingDuck My activity/comments list is enough to me
 
Sample code is call to this function.
I mean come on. It's not that hard to find once you know the name.
At least you force OP to think a little.
 
@CatPlusPlus in one of those, you have to follow his link, and two more links to find the name of the function
 
So? Two answers point to QPC and the other one to new performance API, which looks like more than one function anyway.
 
 
@CatPlusPlus and I still can't figure out how to use the HCP function. :(
 
Which one? QueryPerformanceCounter?
 
@CatPlusPlus no, the "Use Windows7 and the Hardware Counter Profiling API" one
dunno what to pass to the HardwareCounters parameter
 
I don't think that's meant for general use.
 
@CatPlusPlus that's what the answer links to if you follow all the links.
ah, I found the flags.
no wait, wrong flags
Yeah, this documentation is terrible. Apperently it's a bitmask of which counters you wish to read. Heck if I can figure out what the counters are though.
 
user1182183
10:51 PM
Hey everyone, in the mysql section nobody is online, could somebody here help me with a (maybe simple?) SQL question?
 
ah, you use the KeSetHardwareCounterConfiguration function, which none of these pages link to
@RafalGrasman I'm an SQL novice
 
user1182183
hm well I have a table called companies
 
user1182183
and each company owns one map
 
user1182183
maps are in the table maps
 
user1182183
and each has a unique id
 
user1182183
10:53 PM
and I would like to do something like:
 
user1182183
SELECT TOP 10 Callsign, Deposit, MapOwner
FROM Companies
ORDER BY Deposit DESC
<something here>
SELECT MapName
FROM Maps
WHERE ID = Companies.MapOwner;
 
user1182183
(TOP 10) stuff is from MSA
 
Ok, don't tell us what you dream is the (wrong) syntax, tell us what you want it to mean/do
 
SELECT TOP 10 Callsign, Deposit, MapOwner FROM Companies INNER JOIN Maps ON (Maps.ID = Companies.MapOwner) ORDER BY Deposit DESC;
 
@sehe I think he wants to join the tables
 
user1182183
10:54 PM
I want to select the mapname from the Maps table, where the id is the same as companies.mapowner (number)
 
@MooingDuck Hah. That was clear (not)
 
Learn some relational theory eh.
 
@sehe Cat and I both got it
 
@MooingDuck So?
@CatPlusPlus +1
I can guess too. Even so, I think it is a good idea to teach people how to ask a question that will yield the desired answer :)
 
user1182183
Works like a charm! Thank you very much, or well, my friends should thank :D
 
11:02 PM
Nice:
 
@StackedCrooked well, I'd better fix it then. :) At least I've got a test case for it now. Only problem is, I got distracted playing around with node.js. But I'll get back to it soon :)
 
@CheersandhthAlf I think I recall you posting this guy before. You must be quite the fan
 
He is plenty good, of course
 
11:09 PM
I just liked his duet with fiddle player
This one's plenty good also:
 
@MooingDuck That is superb!
In the interest of General Internet Improvement:
[Perolex] whispers: can u run me thought a dungeon
To [Perolex]; You didn't ask properly.
[Perolex] whispers: can u plz run me thought a dungeon
To [Perolex]; Six errors still.
[Perolex] whispers: what
[Perolex] whispers: a lvl like 70 dungeon so I can lvl up
[Perolex] whispers: anyone
To [Perolex]: Here. I'll get you started. "U" and "plz" are not words.
[Perolex] whispers: can you please run me tought a dungeon
[Perolex] whispers: thought
[Perolex] whispers: throught
To [Perolex]; There‘s an extra letter on the end.
4
 
@sehe that OCR site again?
 
@MooingDuck Damn, too late to fix punctuation mishap. Oh well
 
@sehe copy/paste/delete origional?
or just edit the origional?
 
Huh. 2 minutes gracetime only. Cannot delete chat messages after 2 minutes either?
 
11:22 PM
@sehe brilliant :-)
 
@je4d Thanks to the Moo for posting :)
 
you OCR'd it?
 
@je4d According to Vim's undo list I gave it 45 edits after OCR. That includes formatting for chat
 
@sehe well, many thanks - I was around when it was posted, but just ignored it due to the format
 
@je4d That's what I usually do (ignore blurry pics). This way, google and chat search can have an indexing fest on it too
 

« first day (536 days earlier)      last day (4424 days later) »