« first day (692 days earlier)      last day (4239 days later) » 

4:00 PM
@FredOverflow Make it a ligature!
 
user784668
@R.MartinhoFernandes Searching for "nancial"?
 
if answer = 42 then foo; bar; else baz; fi
 
You can also use fifi to close nested ifs, but don't say it out loud while there's a dog in the room :)
 
Unicode all the things.
@FredOverflow ffi?
 
@R.MartinhoFernandes That's unpronounceable.
 
4:01 PM
Human Sacrifice, dogs and cats living together, mass hysteria.
 
user784668
@R.MartinhoFernandes No, that's the keyword for declaring functions written in another language.
 
I never understood the problem in cats and dogs living together.
 
@FredOverflow LATIN SMALL LIGATURE FFI seems quite pronounceable to me :P
 
@FredOverflow That's valid C?!?
 
@Mysticial C has tentative definitions, but C++ doesn't.
 
user784668
4:02 PM
@FredOverflow What makes you think [fːi] is unpronounceable?
 
@FredOverflow Basically, cats suck and dogs are awesome. It's not good to mix them.
 
@FredOverflow "tentative" definitions?
 
@Mysticial lol, you're supposed to know C! ;)
 
@Mysticial Yes, tentative definitions. Look it up in the C language specification.
 
@R.MartinhoFernandes No, that's animal racism.
 
user784668
4:03 PM
TIL Mysticial doesn't know C.
5
 
Mwhahaha, instant star.
 
0
Q: About Tentative definition

AcmeI read from a book about tentative defination that, "A tentative definition is any external data declaration that has no storage class specifier and no initializer. A tentative definition becomes a full definition if the end of the translation unit is reached and no definition has appeared with a...

 
@FredOverflow Oh... that's at a global scope... haha I fail
@Fanael shuddup :)
 
Will the compiler remove things like
 
4:05 PM
else
{

}
 
@Drise what do you mean "will it remove it"?
 
@Drise If it doesn't remove them, there's no code to generate anyway.
IOW, there's nothing to remove.
 
@MooingDuck It means nothing. What does it do with such statements?
 
4:06 PM
@Drise it generates no code
 
Nothing :)
 
user784668
@R.MartinhoFernandes Just Nothing.
 
@Drise If debug mode is set, maybe it'll put a noop, but probably not even that
 
@Drise "The compiler"? There is no such thing.
 
@Fanael Hehe.
 
4:06 PM
So it just ignores that fact that it's there?
 
@Drise it makes no difference if it's there or not, so yes.
 
@FredOverflow It's The Compiler, Ph. D, right?
 
Cool
 
Mann vs Machine is really entertainning
 
@Drise In assembly, how would you write code to do absolutely nothing?
 
4:07 PM
@Neil I dunno.
 
@Drise *piccardfacepalm.jpg*
 
@Neil Some intstuction sets have NOP
 
nop for the rescue :D
 
nop?
 
nop actually serves a purpose
 
4:08 PM
@R.MartinhoFernandes I can write a compiler that "removes it", and one that doesn't. The one that doesn't will generate a superfluous jump instruction at the end of the true-block to jump over the empty false-block.
 
@Neil instruction alignment
 
NOP - does nothing but takes some time... in some cases it's used for timing purposes.
 
there's also multi-byte nops...
 
user784668
@Chimera It takes 0 cycles. All time it takes it the time to decode it.
 
like mov eax, eax, etc
 
user784668
4:09 PM
@Abyx Like nop dword [eax + esi*4 + 12].
 
@Fanael wut?
 
@Fanael how is that a nop?
 
user784668
@Abyx That's a multibyte NOP. Yes, really, a NOP that takes a Mod R/M byte exists.
 
Oh you silly Assembly people talking about nothing I understand
 
@Fanael there is no such instruction
 
user784668
4:10 PM
@Mysticial Duh, because it's nop.
 
nop is 0x90.
 
wtf?
 
What, now @Mysticial doesn't know x86 assembly?
What is going on?
 
user784668
@R.MartinhoFernandes Apparently.
 
4:11 PM
@Fanael For example, in PIC assembly NOP takes one cycle.. so often used for timing.
 
user784668
@Chimera I'm talking about x86.
 
user784668
@Abyx So why do Intel and AMD manuals mention it?
 
@Fanael The discussion that led up to NOP had nothing to do about the architecture though.
The NOP instruction on the x86 CPU family is actually XCHG EAX, EAX (resulting the same opcode 0x90) - an instruction without any effect.
 
@Fanael Is that just a dummy operand for nop? or...
 
ah... yep, there are some - ref.x86asm.net/coder32-abc.html#N
 
user784668
4:13 PM
@Mysticial Yes.
 
@FredOverflow How is int i; int i; valid C?
 
@Fanael ah... cause I've obviously never seen a compiler generate a nop with an operand.
 
That's a multiple definition error..
 
10 mins ago, by FredOverflow
@Mysticial Yes, tentative definitions. Look it up in the C language specification.
 
user784668
@Chimera The multibyte nop is 0F 1F.
 
user784668
4:14 PM
@Mysticial I see it all the time in AMD64 assembly. In IA-32 assembly, seldom. Because old 32-bit processors don't support it.
 
@Mysticial You're not looking hard enough!
 
@Fanael According to wikipedia that is correct. :-)
 
>>> import pyfasm
>>> pyfasm.assemble(b'nop dword [eax + esi*4 + 12]')
b'gf\x0f\x1fD\xb0\x0c'
^ yep... even fasm compiles it
 
@Fanael I swear I've never seen either ICC or MSVC generate a nop with an operand.
 
4:16 PM
Nop is increasingly important with higher hertz as the set of instructions you can accomplish in one cycle diminish, and you often have to use nop to offset it
Signal literally doesn't traverse the entire chip in under one cycle
 
nop sleds, I remember them from writing exploits :P
 
I forgot what hertz, but something around the range of 3Ghz
 
user784668
@Mysticial GCC
 
@Mysticial I don't really see the use of a multibyte nop. Why not use several nop instead ?
 
@kbok Then it takes multiple decode slots.
 
4:17 PM
But a compiler wouldn't insert a nop just because you added an empty else
 
@Neil So any processor clocked greater than 3GHZ or whatever is just blowing cycles?
 
Not one, at least, with optimization in mind
 
can someone take a look at this stackoverflow question please. thanks
0
Q: static lib with dependency on another static lib but getting linker errors

user245823I have a third party statically linked .lib including in my static.lib which exposes only 1 API. the client is using MFC and so i had to recompile both those static.lib's wth the MFC with shared dll option and /MD in vs2008. the client is still experiencing linker issues such as: already defin...

 
Because processors are optimized to execute a NOP as fast as possible... eh?
 
user784668
@Mysticial If they use lea or whatever, they suck badly.
 
4:18 PM
@Neil Only if you take the stupid route like NetBurst.
more modern processors can issue more instructions per clock
 
@Fanael I see lea nops very often.
 
@user245823 wanna get some downvotes?
 
in fact, the instructions/clock is irrelevant of the clock speed, and is purely determined by architecture, although some architectures did trade off instructions/clock for higher clock speeds.
 
@Drise not quite, no
 
@Drise No, but it makes it very impractical to go higher because you limit what you can do with a cycle. Anything more complicated than add and subtract have to be followed with a nop, which ironically can make such operations take longer, not less
 
user784668
4:19 PM
@Mysticial Then tell Microsoft and Intel to wake up. All AMD64 processors support 0F 1F, there's no reason not to use it.
 
@Drise one car can't go down the highway in under a minute, but that doesn't mean the highway is empty most of the time.
 
@Abyx downvotes? what is that?
 
@Fanael I dunno, I'd assume that Intel knows what they're doing...
 
@Mysticial on the other hand, they're known to produce poor opcodes for AMD processors.
 
@DeadMG Most did, because people were gauging processor speed by hertz
 
4:20 PM
@Mysticial Or they don't see a need to use it over 0x90
 
@Neil that doesn't sound right at all.
 
@MooingDuck In other words. They know what they're doing. :)
 
@Neil Actually, I'm pretty sure that only the NetBurst architecture made that mistake.
after that, everyone else figured out that simply adding more clocks didn't really work out
 
user784668
@Mysticial They recommend using 0F 1F for padding in their own optimization manuals. So their compiler team don't know what they're doing, then. Or you're not looking hard enough.
 
4:21 PM
I remember Agner mentioning that the current Intel chips can run 4 NOPs/cycle.
 
@MooingDuck Interesting analogy. That helps.
 
@Mysticial Woot.
 
@DeadMG Well if you've noticed, the hertz doesn't really succeed 3 Ghz
 
@Drise it's always been my favorite. Processors even have seperate "lanes" so things can execute in parallel to an extent.
 
@MooingDuck Multicore?
 
4:22 PM
That's kind of a wall unless you want to start sacrificing speed for having a faster clock
 
@Neil If you've noticed, an overclocked Intel chip can reach 4Ghz or a lot more in the newer models.
 
Who cares about FLOPS. How about NPS (NOPs per cycle)!
 
what is 1 for drive by linking in chat
 
@Drise nope, multicore is multiple highways :D
 
@MooingDuck Ah, right. So multiple pipelines? or whatever "stream processors"?
 
4:22 PM
the reason they don't offer >3GHz chips by standard is because it's cheaper to add more cores/more efficient architectures, not because it's impossible to get speed gains by going faster- or even that their chips can't go faster.
 
@DeadMG I don't know what they've done recently, but high clock cycles has and always will be what laymen customers will look for
 
user784668
@Mysticial All processor reach infinity. Remember, NOP can be encoded on 0 bytes.
 
So they'll continue to break that barrier
 
@Drise some parts of the pipeline split, yes.
 
Doesn't make it particularly smart or practical
 
4:23 PM
@user245823 Drive by linking is coming into a chat room like you did, not chatting first, not getting to know anybody, and dropping a link to a question you need help with. It's frowned upon here.
 
@Fanael I see ALIGN 16 a lot in the ICC dissassembly. Are those translated to the other multi-byte nops? That's probably why I don't see them, because they're probably written differently.
 
@DeadMG if you cool CPU's in liquid nitrogen, you can them much faster without overheating, but liquid nitrogen is not an option for the average human being
 
That's like porn star getting boobs that prevent her from walking through doors, just because that's what men want to see.
2
 
oh had no clue about that.
 
@Neil I don't think so. As you've adequately pointed out, the clock speed of a user processor hasn't increased much for a decade.
consumers aren't thinking "GOSH MOAR CLOCK SPEED" anymore.
 
4:24 PM
@user245823 So the punishment for that is to downvote your question which causes you to lose reputation points.
 
and Intel put paid to that themselves with the failure of P4.
 
Aug 25 at 22:00, by sbi
If you are new here, please read the newbie hints right away, and only post here afterwards. Thank you.
 
There should be a new law pertaining to comparing something in an argument to something in porn. What shall we call it?
 
@DeadMG yes they are
 
@user245823 Now you do! :-)
 
4:24 PM
@DeadMG Oh but they are. You think they would have slowed down to 3 Ghz if they could have kept going?
 
@TonyTheLion Tony's Law?
 
@TonyTheLion Right. But that's not the point. The point is that if you get them to go a lot faster, they can't magically issue less instructions per clock. They simply issue a lot more instructions per second.
 
@Chimera s/frowned/hated/
 
There have just been difficulties getting higher clock speeds and maintaining same/better speeds
 
@DeadMG that's true
 
4:25 PM
yup. did not see anything about that in the Etiquette section.
 
@Neil Yes.
 
user784668
@Mysticial That's an assembler macro. Yes, it gets translated.
 
is that in the faq section?
 
@Drise Well, I frown upon it, I don't hate it.
 
the customer is much more impressed when they say "We doubled your speed by adding an extra core".
 
4:25 PM
@R.MartinhoFernandes Tony's law it is. It was just invoked earlier
 
@DeadMG Well I think we're doing arguing then, if you're going to claim that.
 
because 3GHz < 2x 2.4GHz
 
@DeadMG cough
 
@DeadMG tell that to Dwarf Fortress :D
 
@Chimera I already had him plonked because he isn't a first time offender.
 
4:26 PM
@R.MartinhoFernandes It's marketing, not reality.
 
@Fanael ah...
 
CPU speed don't matter much anymore, it's the cores number and then it comes down to the software being able to USE the cores efficiently
which is not very common yet
 
@DeadMG Not really. That's too broad of a generalization to make.
 
Most people think clock speed or even price determines processor ability. They still think so, even if fortunately people are beginning to know the difference
 
@TonyTheLion getting much better
 
4:26 PM
cause multi core programming is hard.
 
@Drise Shit, he should know better then
 
@MooingDuck still a lot of catching up to do though
 
@TonyTheLion yes
 
@Drise Ah. So it's too broad of a generalization for me to say "Customers are more impressed when you add more cores", but not too much for you to say "Customers are more impressed when you add more gigahertz"
 
user784668
@Mysticial So, basically, today we learned you don't know C nor x86 assembly.
6
 
4:27 PM
@Fanael yeah... pretty much...
 
@Fanael He's been a fraud all this time!
 
interesting read that faq. in any event, i apologize if i have offended anyone but could i request to get some help please
 
@DeadMG I'm just saying that most applications don't really take advantage or can't of multicore, so whatever a single core speed is what matters.
 
@user245823 nope, not in the lounge
 
@R.MartinhoFernandes And yet, amazingly, he gets such good performance :P
 
4:28 PM
@Mysticial how do you do optimization stuff without knowing either of those?
 
@Drise Right. And Average Joe XYZ knows that?
@user245823 "Hey guys, I noticed that you don't like people begging for help, but can I get some help?"
 
@DeadMG No.
 
geeenius
@Drise So he's gonna think the obvious: two cores = 2x single cores.
 
Always have to win :/
 
@TonyTheLion Sheer dumb luck.
 
4:29 PM
@user245823 Be patient, somebody on SO will help you..., somebody from here might as well. But in this lounge nobody feels obligated to answer questions.
 
I don't believe that, he's a smart guy
 
@Drise I was being sarcastic to the user guy, not to you.
 
sorry some of these things i am finding out now.
 
@DeadMG I'm just saying you win. Like always.
 
i am not being a jerk really. just dont know.
 
4:29 PM
@user245823 what's the problem?
 
@TonyTheLion the problem is he wants us to answer is SO question
 
@user245823 I understand. At this point, you should learn, be patient about wait for people to help you.
 
@TonyTheLion You don't need to know either. Just enough is enough.
 
@user245823 Please, leave us alone. I'm being civil. Don't push it. Also, replying to me is futile.
 
@Mysticial hmmm
 
4:31 PM
@TonyTheLion Like seriously, who else besides Intel advertises that they can execute 4 NOP/cycle?
 
@user245823 Tip for you: before you come in here and ask us to help you, you should come here to just chat, get to know people, become something of a regular here. After that, people here will generally be more willing to help you out when you ask.
 
@Mysticial true. I guess. But I always thought for fine tuned optimization you'd require C or asm.
 
@TonyTheLion But you don't need to know tentative definitions... :)
 
I love how I got all of you talking about crazy assembly and processor speeds and all just by asking "What happens to else{} statements".
 
it is helpful as someone pointed out the faq although i did not find anything about linking in chat etc. but each area has its own rules. i actually appreciate some answers here about the "Etiquette" which i did not know. for example, chimera has been less dismissive and more constructive in his criticism which I appreciate. thanks
 
4:34 PM
@Mysticial not sure what you mean by that?
 
This reddit post reminds me how bad Sex Ed was.
 
@TonyTheLion You don't know those either?
 
@user245823 You are welcome.
 
OMG, no one knows about tentative definitions! What have we come to?
 
@user245823 also anyone with userxxxxxx name is not very welcome here, because most of them have been a problem in the past. So get a decent nickname and a decent avatar too
 
4:35 PM
@TonyTheLion Meaning, I don't need to know every corner of C or assembly to write fast code. Being self-taught in both, I really only know what's relevant to performance.
 
if you want to hang out here
@Mysticial ah I see :)
@R.MartinhoFernandes wait... wut?
 
@TonyTheLion And anything else I know that is not relevant to the projects I've done are picked up from SO itself... lol
 
Tentative definitions are only an obscure stupid corner case of the language semantics. It has no bearing on performance.
 
Such as trigraphs.
 
ok will do thanks for that as well. it is pretty impersonal. i never really saw that either or rather did not pay attention more like it.
thanks!
 
4:37 PM
:)
 
@user245823 Even looking around before jumping in would have been good. The FAQ is linked in bold as the semi-permanent top item on the bar to the right.
 
user784668
@Mysticial You ought to know ALL the things.
 
@R.MartinhoFernandes TIL
 
I just starred the messages that made me look stupid.
 
That's the spirit! :)
 
4:39 PM
Well... I've been getting a bit too much luck with upvotes lately. So I guess it's time to look like an idiot.
 
hmm, while coding my value_ptr, I seem to have forgotten the copy constructors. Whoops. Fail rule-of-three :/
 
user784668
@MooingDuck Of five.
 
@Fanael I'm making this for C++03, so three.
 
@Fanael Of two! (inherit from unique_ptr) :P
 
4:42 PM
@R.MartinhoFernandes If I wasn't making this for MSVC9, I would have :(
 
user784668
@MooingDuck lol
 
user784668
@MooingDuck Anyway, what do you mean by value_ptr?
 
@Fanael effectively, a unique_ptr that does a deep copy on assignment instead of compiler error. Few other minor differences.
 
It's interesting to note that that "userxxxxx" that was just here has had an account for 2 years, asked 29 questions and didn't answer a single question. Nothing really wrong with that, but it seems like it violates the spirit of what SO is all about.
 
user784668
@MooingDuck Uh, okay. I'd use T instead, but that's just me.
 
4:45 PM
@Chimera There are many "takers" (I hope that doesn't sound pejorative) like that around.
 
@Fanael optional large members, or pointers-to-base-class, or a few other situations.
 
@Chimera I was like that in the beginnings
 
there's nothing wrong with just asking questions
 
@Fanael But that slices!
 
as long as they're good questions
 
4:46 PM
@Chimera I've answered 28 questions and asked 0 questions.
 
then I learned that answering questions is actually a good way to learn too
 
@DeadMG Exactly. Someone has to ask them.
 
they encourage helpful answers and they definitely contribute
it's asking bad questions that's too bad
 
I have asked 417 questions in my time
I have answered 675
 
238 to 2746
 
4:48 PM
@Rapptz Well ask some questions! :-)
 
Woah, that's quite a large volume.
 
1 to 907
 
There's nothing I can ask that hasn't already been asked.
 
@DeadMG I only have 63 to 934.
 
72 / 22
72 answered / 22 asked
 
user784668
4:48 PM
6 to 54.
 
I somehow have a question at 525 votes.
 
25 to 67.
 
560 answers, 23 questiosn
 
@R.MartinhoFernandes early bird on the common git questions will do that.
 
Mysticial, lol. (Did you by chance work for Epic Games?)
 
4:49 PM
@robjb nope
 
Ah, jw ... they used to have a developer on their forums years ago by the name Mystical
 
30/25
 
A common English word? No way!
 
@robjb Mystical != Mysticial.
 
Yea, I just noticed the extra 'i' a minute ago. I've been misreading it for ages.
 
4:50 PM
I pronounce it mystical anyway :(
 
Wait.
Were you always called Mysticial?
 
@daknøk Yes
 
It's supposed to be pronounced Mysti-shull or Mysti-shall. Not that I care. It's the internet, you don't hear anything other than chat pings.
 
@sehe Damn…
 
@R.MartinhoFernandes probably because of 56,142 views ... o_O I wonder how that happened
 
4:52 PM
I always read it as Mystical.
 
@robjb It's an extremely common question that's extremely googable.
There's are some very notorious examples of that on SO.
 
Heh, I've run across them before
 
0
A: rvalue definition is objects that cannot be assigned values, but why are literals lvalues?

Tony The Lionrvalues are defined as things that have no name or which you cannot take the address of or temporaries. A literal you cannot take the address of: char* foo = &"Literal"; That is invalid. The original definition is no longer valid these days. You can take the address of lvalues, but not o...

please tell me if I'm telling lies?
 
@TonyTheLion if I'm telling lies?
 
This one is the biggest examples of a common and highly google question:
1677
Q: The *right* JSON content type?

OliRight I've been messing around with JSON for some time, just pushing it out as text and it hasn't hurt anybody (I know of), but I'd like to start doing things properly. I have seen so many purported "standards" for the JSON content type: application/json application/x-javascript text/javascript...

300k views
 
4:53 PM
18
A: The *right* JSON content type?

AlexanderI always use application/json type for JSON content type, and it always works for me.

^ assumption is the mother of all fuck-ups.
 
@Mysticial I normally think "Mystical", but when I remember it's wierd, I start thinking "myst-ee-see-al", which is even more wrong :/
 
TIL Mystical is actually called Mysticial.
 
@MooingDuck That also works too. It'd be the "long form" for Mysti-shull.
 
@daknøk yea I had to learn that too the other week
what constants are lvalues?
 
@robjb It's quite googleable, because my title is a really good match to the likely queries. It's also a common problem that for no decent reason doesn't have a simple solution...
 
4:58 PM
@TonyTheLion const int i = 42;
 
Have you seen today's doodle?
 
@R.MartinhoFernandes Yeah, I kinda wish my top answers were more googleable. That's the problem with debugging questions, the keywords are never in the title.
 
awesome doodle
 

« first day (692 days earlier)      last day (4239 days later) »