« first day (1022 days earlier)      last day (4152 days later) » 

06:00
Well I guess we have different definitions of what theoretical CS is.
I wouldn't have closed either.
I swear these new close reasons are still trigger-happy ._.
(I'm not talking about the question per say, just the comment)
@Borgleader Apparently. To me, this looks like simply working things out on paper before writing code. People dealing with theoretical CS rarely get their hands dirty with things like how to actually build a tree.
@Borgleader s/say/se/
Well that's where we differ. To me anything that is devoid of actual programming, that is doing it on paper with just the high level operations or ideas (not pseudo code) actual ideas like "switch this node with this node" is theory to me.
My definition could be wrong, but that's the one I go by
(and this is not an excuse, but it had 3 close votes last i checked so i guess im not the only one)
@Borgleader I'd completely disagree, and SO pretty clearly does too. I've never heard any suggestion of burninating or , for only a couple of examples. Going by your definition, everything that fit would clearly be off-topic, and the majority of would be too.
06:09
@JerryCoffin it's not cstheory.stackexchange.com level, but i think it's still theory
just imho
anyway, he probably can get a better answer there anyway
so what's the harm in directing him there?
as long as he's not discouraged
It's fun making H2CO3 mad.
@ice-nine First, that he may be discouraged, and second that it's really a better fit on SO.
@JerryCoffin There was one meta post about burning . But it got shot down.
@Rapptz s/fun/easy/
@JerryCoffin i disagree on the second part, but anyway, my hope is that he's not (on the first part)
06:10
@Mysticial Just like burning as a meta-tag.
@JerryCoffin i didn't vote to close and i asked those that did to do it kindly
dafuq am I atop the tag. That tag better stay!
it would be nice if there were more assembly people on SO, too, btw
it's a dying art
Oh ic. My top two answers are . Guess that explains it...
06:12
it's getting to the point that it's only passed down from master to apprentice
@ice-nine its getting less and less useful as compiler get noticeably better at optimization
unless your name is @Mysticial of course
sure sure
but not as much as you'd think if you really start looking at it
@Borgleader No. That guy has no authority and is tooting his horn.
@JerryCoffin Well I guess I'd have to look up the exact difference between SO and CS.Stackexchange.com because I apparently dont know what it is
anyway, i need to learn assembly for various reasons
not just x86 too
and it's rather non-trivial
i mean, to find resources
06:14
I think maybe I have miscommunicated. I want the index that corresponds to the pair where the first element is the smallest possible that is <= target — AgainstASicilian 12 mins ago
wouldn't that always be 1, meaning the element just before the target?
@Mysticial by the way, do you know much about penalties for addressing modes in x86-64?
if you use base + index + offset vs base + offset, etc.?
actualy base + index * [1,2,4,8] + offset
intel claims there is a theoretical penalty but i'm having trouble measuring it
@ice-nine They should all br the same. But on some processors, direct addressing is a cycle faster or so. (I think)
i think lots of other factors are affecting it
like loop alignment
it's hard to control for everything
06:16
@Borgleader As stated in OP, smallest element <= target
i don't think the instructions are the same size
don't really know
@ice-nine Unless you're going to program for a 286 or older, there is none. For any practical purpose, the penalty is much simpler: that it might end up reading from memory.
but anyway, there's lots of conflicting results when little things change
yes yes, but i'm working on a project where we really want to do the really really really optimal thing
and apparently it matters theoretically
according to intel
by like, a cycle of latency or so
@ice-nine Of course not -- if you use an offset (for example) it's encoded into the instruction, making the instruction larger.
@AgainstASicilian Either I'm incredibly dense or you're not clear. You have a sorted vector. The smallest element before the target is either always the first one or the one right before the target?
06:17
so i'm trying to measure
yeah, that makes sense, i don't really think about encodings much personally
i'm not really willing to go down that low in my thinking
sorry I am just frustrated and having a lot of trouble with this
i prefer some kind of abstraction to keep my sanity
@ice-nine AFAIK, rip-relative is more expensive on all Intel processors.
basically i have a bunch of pairs representing lower and upper bounds, L and U. I have some target T. I want to iterate through all pairs where L<=T<=U efficiently
to my guess that requires binary seach
@AgainstASicilian say i have [0, 1, 4, 6, 8, 9], your target is 6. What is the "smallest <= target"
06:19
@R.MartinhoFernandes I'm telling ya, the range on your explosion thing is ridiculous.
in the section "Effect of Addressing Modes on Load Latency"
@EtiennedeMartel hehe
there's apparently a penalty
it doesn't matter that much really but i'd like to figure out how to measure it cleanly
and that's the hard part
I mean, I thought the slag+rocket turret of Axton was overpowered.
But that. Woa.
@Mysticial did you see that belt cpu architecture that was posted here last night?
06:20
the problem is, sometimes it is much slower
@Borgleader link?
but sometimes it's not or even its a bit faster
@Borgleader does that make more sense?
so i don't know
@AgainstASicilian Do you want to iterate through all the pairs, or do you want to find T as quickly as possible? The whole point of a binary search is that it does not iterate through all the pairs, only a subset of them necessary to find the target.
06:21
@Mysticial is that because of instruction vs data cache issues?
@Borgleader Oh that one. It's on my to-do list.
Haven't gotten the time to watch it yet.
@EtiennedeMartel Normally it would only throw out three or four novas, but I have a bunch of skills that increase shield recharge delay to astronomic levels (like 20 seconds or somethings)
@JerryCoffin Maybe I am going at this whole thing wrong. But I have a lot of L,U pairs and I don't want to spend lots of time looping through irrelevant L,U. So I think maybe I sort the pairs and do something fancy
@R.MartinhoFernandes I see.
06:23
@Mysticial i didnt understand all of it but it seems like a really neat design. I'll be eager to see comparative benchmarks when theyll have test units
@AgainstASicilian Can I guess that what you have some pairs, each with an L and U that define non-overlapping ranges, and you're trying to find which of those ranges T falls into?
there may be some overlap
say (1,6) (2,7) (3,4)
@Mysticial ping? sorry, just curious about the rip-relative thing
@Mysticial still learning this stuff
@ice-nine rip-relative is relative to the rip register.
@ice-nine if you want to reply to people use the arrow at the right of the message box :) its easier to follow threads of conversation
06:24
rip is the instruction pointer.
so if target=5 it'd correspond to first and second pair but not the third
@AgainstASicilian Okay -- but you're still trying to find which range(s) your T falls into, correct?
@Borgleader sorry, i did originally... i mean, i replied and asked but pinged to follow up
@Mysticial yes but the penalty is just because it goes through a different cache or what?
@ice-nine I actually have no idea why rip-relative is slower than relative to any of the regular 16 registers.
06:26
@AgainstASicilian Okay -- and what do you know about your ranges? Do their bounds all fall into a fairly limited range? Are you searching for the range(s) that T falls into often enough to justify using extra memory to speed it up?
@Mysticial so does it go through the instruction cache or the data cache if it ends up cached?
@ice-nine I have no idea.
That's not the kind of optimization that I do.
@Mysticial hmm, yes, i had the same question for ARM at some point too...like constant pool stuff
@JerryCoffin The upper bound range maybe not much more than a million or so, nothing insane, but lots of pairs. some pairs may be small and tight, others very wide.
@Mysticial has optimized the process of making pies
06:27
@Mysticial maybe it varies from microarch to microarch
@Mysticial I believe it's because RIP essentially always implies a read after write (i.e., RIP has always just been updated) so that micro-op has to be retired before you can compute anything relative to it.
but I am basically trying to efficiently loop over all pairs (L,U) for which L<=T<=U
@JerryCoffin yeah, that makes sense, can't be pipelined as well then
right now my method is starting from the beginning and then ending if the target is smaller than the lowerbound (because no use iterating past there)
@AgainstASicilian The basic idea is still to avoid looping over all of them if you can avoid it.
06:29
@JerryCoffin wait, but actually, it's RIP-relative so wouldn't it know what address it's relative to ahead of time?
@ice-nine The only assembly that I know in depth are the SSE instructions and their latencies/throughputs as well as basic hazards like partial register writes and stuff.
(1,6) (2,7) (3,4) so if my target were 1 i wouldn't bother with second and third
yes
@JerryCoffin it doesn't actually have to wait until rip gets to that value to know what it will be
So you just need to find the first pair (x,y) where x <= target. lower_bound will do that, wont it?
@ice-nine You're basically asking for absolute addressing, but that's not what RIP-relative is.
06:31
@JerryCoffin wait, no, i mean, it's relative to the IP right? but the IP is the IP of the address when it get there
@JerryCoffin when it executes that instruction, the RIP is necessarily pointing at that particular address
actually i think it's always optimal to start from the beginning, but then when your target is greater than the upperbound you need some way to jump to the next lowerbound
@JerryCoffin am i missing something?
@JerryCoffin sure, it's encoded as an offset, but the processor doesn't have to wait until the IP is that value to know what memory to fetch
@JerryCoffin I suppose it's possible to "prefetch" an instruction ahead and "guess" what RIP will be when it reaches an RIP-relative instruction. But that's probably easier said than done.
so like (1,5) (1,4) (1,3) (2,8) (2,5) (2,2) (5,3) and my target is 4. I'd go first pair, second pair, break and go to next lowerobund of 2, so (2,8), then next pair is OK, next one isn't, so jump to next lowerbound (5,3) etc
@ice-nine Yes, RIP obviously contains what RIP contains. But what's that going to be? Until RIP contains it, you don't know (well, you can pre-compute it from the base address and how far this instruction is from the offset -- but that's absolute addressing, not RIP-relative).
06:33
requires sorting ascending first element descending second element somehow
and knowing the indexes of start of each lowerbound
right?
@AgainstASicilian That's why I asked about whether you were doing this often enough to justify extra memory usage: whether it's enough to justify having two copies, one sorted each way.
@JerryCoffin well, it's the address of the instruction that contains the that particular instruction...the instruction doesn't move
extra memory is OK
I suppose one way to make it free is for the instruction decoder to read sufficiently ahead so that it can replace the RIP-relative instruction with an absolute one.
@JerryCoffin maybe the pipeline is not set up to have that information in a convenient place though
06:35
I'd make a std::map<int, std::vector<int>>, where int is the range start and vector is range end. that will allow easy jumps
@Mysticial yeah, basically what i mean it know the instruction X bytes ahead has an RIP-relative offset, so it computes RIP+offset+X
anyway, it would be nice to understand microarch better
@ice-nine Yes, the instruction might move. A relocating loader does exactly that. That leads to a problem though: when you re-locate, you need to overwrite absolute addresses. When you overwrite, that means the page containing the overwritten code can't be shared between processes. RIP relative avoids that.
@JerryCoffin yes yes but i mean after its loaded and linked...being loaded only generally happens once
the use of binary search is nullified by the fact that you seem to need all valid ranges not just one
06:37
@JerryCoffin when you're in the process of executing the code X bytes prior it's not going to move before then unless you have self-modifying code
@JerryCoffin which is the exceptional case and you can just invalidate the pipeline then
@JerryCoffin i understand PIC fine
@Borgleader interesting idea... but maps are not sorted right?
so no way to iterate first value int from low to high, easy enough to iterate second element since it is reversed vector
afaik maps are, unordered_maps arent (Source: en.cppreference.com/w/cpp/container/map)
> std::map is a sorted associative container
@JerryCoffin anyway, it seems like it would be bad for processors to punish PIC if they can find a way to not to
Next time a mod who says were off topic ill link this stuff
@ice-nine So you're basically asking for a prescient processor that knows it should start computing an offset relative to some future value of RIP before it's even read the RIP-relative instruction?
06:40
@JerryCoffin it's pipelinining anyway
@JerryCoffin it's reading ahead to begin with
@ice-nine I'm pretty sure they do their best, but that's not always trivial.
@JerryCoffin i just mean there's not (to me) a theoretical reason that you can't pipeline the RIP-relative load just as well as the absolute load as long as you don't have self-modifying code
@ice-nine To an extent, yes -- that's why the penalty for RIP-relative is only a cycle or two instead of 20+ cycles for a full pipeline bubble.
@JerryCoffin well, so i just mean it's probably not the case that it literally has to wait until it gets to that actual instruction to know what to do
@JerryCoffin so that's not where the latency comes from
@JerryCoffin It could also be that it takes an unusual encoding to handle RIP-relative. The 16 normal registers already hog 4 bits. You need something weird to get that 17th one.
06:42
@JerryCoffin maybe it's a more minor version of that problem, but it can't be that severe
@Mysticial yeah i'm finding that encoding length and stuff like that matter a lot more than you would like
@Mysticial which is super-annoying
so no matter from what order i construct a map if i iterate through it, keys sorted?
@JerryCoffin i mean, i guess i read what you said originally as that it had to stall completely
and if i call sort directly on each element of the map does that sort the real thing or a copy
@JerryCoffin but i guess you didn't say that anyway so i misunderstood
@JerryCoffin still, it doesn't seem that hard of a problem to solve if they really spent a lot of resources at it...i guess maybe they do but they just also spend a lot of resources on absolute and it happens to be easier still to do the latter though
@AgainstASicilian Depends how you do it.
06:45
i just iterated through and did a bunch of P[L].push_back(U);
@ice-nine Well, there isn't any sort of serial "get to that instruction" -- it can (and normally does) have lots of instructions in-flight at once. It's decoding 3 instructions in most cycles. They then go to the ROB. From there they issue to execution units based on availability of resources (both execution unit and registers they read from that are being computed in previous instructions).
but now i wish to sort each vector
std::sort, just make sure you do it on the actual vector not a copy
yes but i mean correcting sorting each one in place?
typedef std::map<int, vector<int> >::iterator it_type;
for(it_type iterator = P.begin(); iterator != P.end(); iterator++) {
//sort it_type directly?

}
@JerryCoffin right but i mean, to start fetching an absolute load, it has to decode the instruction already too...and at that point you already have all the information you need to do the RIP-relative one too...so i just mean your first explanation probably wasn't right or at least wasn't the full story
@JerryCoffin theoretically you can start fetching the load at the same time both ways
@JerryCoffin as long as the code doesn't self-modify
@JerryCoffin anyway, i possibly could really be not understanding what you mean
@JerryCoffin but never mind, i'll just ask people at work anyway...some of them have quite some experience with this stuff
06:49
@ice-nine You can fetch the load the same either way. The point is that the instruction can't issue from the ROB to an execution unit until the registers it reads from will be ready, and in the case of RIP relative, that means reading from RIP, which is obviously changing every instruction.
@JerryCoffin well, you could be right, i don't really understand microarch that well...it seems like it could fast-path this and not wait for the RIP to actually get to what it will get to
@JerryCoffin but i could be missing something about how the setup works....anyway, i'll ask around at work...this isn't really a problem personally and pretty much i'm sure others already know about whether or not PIC code is really penalized like this anyway and have made a decision about it already
@JerryCoffin i just asked because @Mysticial mentioned it and i was curious
it wasn't my original question
@ice-nine Also, I'm not an expert on instruction decoders.
@Mysticial the thing is, i don't know if anyone is! outside of people at intel or something
@Mysticial seems like there's lots of hearsay because at this point its so hard to measure things without confounding variables
@ice-nine My guess is that register renaming gets in the way of that. As it's executing, it has a large pool of registers (40+, if memory serves) any of which might hold the value of any particular architected register at any given time. From this perspective, RIP is just another register (but one that's modified by every instruction executed).
@AgainstASicilian ideone.com/RGT6aK <-- Like this
06:56
@JerryCoffin maybe, i'll see if anyone knows for sure
@JerryCoffin we use PIC so i'd be surprised if no one's considered the issue
@Borgleader Despite the talk about not closing questions so quickly, I can't say I've seen much change in behavior -- especially on the part of the mods.
@Borgleader Is there a way to sort in reverse for the vectors?
@JerryCoffin I usually agree with his choices though. Because most of the time its a "do my homework" or "write code for me"
@AgainstASicilian Specify a comparison operator like std::greater<T> that compares in reverse to the usual.
^ this
default comparison is std::less<T>
06:59
@Borgleader I'm not arguing with his choice -- just noting that I haven't seen much change.
Oh, my bad, I misinterpreted
The question is not closed yet. It's on hold.
They renamed it!
When do on hold questions ever get reopened? Oh thats right... when we lounge it back open
does it make sense to do (iterator->second).size() ?
i want to iterator over the vector
@R.MartinhoFernandes Yes -- that's immensely different (yet still identical).
07:03
and i'm already using an iterator to go over the keys of the map<int , vector<int> >
@AgainstASicilian Why wouldn't it?
big wall of errors XD
nevermind missed a (
What was the on hold thing supposed to be again?
amazing how one small fix resolves such large walls
You still have to go through the 5 reopen vote process, so I don't get the point.
Useless aesthetic?
07:04
@Rapptz Less final sounding, therefore intended to seem less threatening to newcomers.
Useless aesthetic.
@Rapptz It gives them hope... evil laugh
They still do the same shit (ask the same question again)
sup <3
@Rapptz To a large extent, yes. The intent is that it's less "just go away" and more "please edit your question". Not much difference for "can haz codez plz" or "please send my homework to [email protected]" crap though.
@Borgleader Looks pretty accurate to me.
ah good, i second guessed my self there
I've just started reading the dragon book so I'm not that knowledgeable about commpilers
Well, I think I'm going to go sleep. TTYL.
@JerryCoffin 'night
I should probably go too, 3:16AM
JBL
JBL
07:26
Morning !
Rofl hey @LucDanton
we were worried, we thought you went into the mountains & got lost
yesterday, by Luc Danton
Taking the summer casually.
@Borgleader thats really exciting
Fun Fact: Both Assembly and C are Turing Complete. So anything you can do in one, you can do in the other. :) — Mysticial 8 secs ago
^^ How's that for confusing the OP. :P
JBL
JBL
@Mysticial Seeing what he's asking, I doubt he'll understand the meaning :)
Your downvote purse is full ?
07:49
Or you can give me your account. I seem to be very talented in getting myself banned from various places
Is there a market? Can I buy downvote-rights, maybe by supplying upvotes? What is the current rate?
08:03
@LucDanton We suspected you were on vacation. So we weren't far off :)
@ScottW What, just once?
@ScottW I thought you were "gaming"
Real gaming or did you stay up all night to get lucky?
:P :P :P
shameless daft punk plugging
lame? nah I would have done that too
@Borgleader it's a great song though
08:19
I have a terrible idea that I think I better not acting on ... maybe I will get perm banned for the experiment :x
@ScottW applies water to burned area
i luv u too <3
since wen does @sehe advertise for cereals?
Xeo
Xeo
@StackedCrooked: There's an effort for an iOS/Android/... engine / interpreter for visual novels, might be relevant to your interests :P twitter.com/IVNTP
09:06
@Borgleader meh it's shopped, obviously. Frosted flakes hurt my teeth
@Borgleader that tune is just ... so annoying
Wow, it's quiet this morning. Maybe I'll try the 'other place' :)
...
Also, ideologically, somehwere along the line some culture shallowed out
s/pursuit of happiness/try to get lucky/g
OK, the other place is talking SQL server installation. I'm going to get food/coffee.
@MartinJames other place?
0
Q: Hello World gone wrong?

WannabetheverybestSo I have this exercise, to write a program that outputs "Hello World" I came up with this code: #include <iostream> int main() { std::cout >> "Hello World" >> std::endl; return 0; } I just can't see where I'm wrong.

09:19
0
Q: Hello World gone wrong?

WannabetheverybestSo I have this exercise, to write a program that outputs "Hello World" I came up with this code: #include <iostream> int main() { std::cout >> "Hello World" >> std::endl; return 0; } I just can't see where I'm wrong.

lol
LOL!
We gotta stop doing this:)
@A.H. The 'Nice C++ room'.
its dead in there
@A.H. Posting about SQL server installs will do that. It's more lethal than Godwin's law.
Xeo
Xeo
@Rapptz You'd think the "hello world" of a language was pretty hard to get wrong - and then C++ came along.
09:28
@Xeo Having looked briefly through my usual tags this morning - Delphi, Multithreading, Winsock, pthreads, C++, C#, C etc, there was 0 questions that I felt even remotely like answering. It's all dross/stupid/nodebugging.
must be looking at a different one because nothing there about SQL
@A.H. OMG! It's my problem - I opened the C# room by mistake :)
made me go through a lot of transcript :P
@A.H. So sorry.... OTOH, you wanted the SQL server stuff???
nope
I am having my own SQL panic
09:32
@A.H. Please keep it to yourself :)
hehe
Is the best way to get the Nth type of a parameter pack just to turn it into a tuple and get it? (i.e. tuple_element)
@Rapptz Yes.
Cool.
Why are there no cool questions for me to answer on SO today? I need something to take my mind of my Unicode shit and 'Eng need 328 to avoid follow-on' :(
Xeo
Xeo
09:44
@LucDanton LUUUUUUC
bawling time
Xeo
Xeo
sup?
@LucDanton Everyone missed you!
The Lounge without Luc is merely The ounge.
Xeo
Xeo
09:51
I just noticed that I missed you yesterday by a few minutes. Damn, I should start reading the transcript when I get online.
I'm coding in the morning this week. Well, the morning is shifting to the middle of the day by now.
You'll end up stabilizing at night.
Xeo
Xeo
I haven't been coding outside of work for a while now (apart from the occasional SO / Haskell snippet) - too many games to be played, too many novels to be read. :(
Good morning
It's a bad morning, but hello anyway:)
10:00
but its sunny
Outside, yes. In my office, there is a huge black cloud of unicode and Australians.
@Xeo I find it quite hard to spend the whole day coding to then come home and do more of the same. I prefer to relax when I get home, and do something different.
@MartinJames Wait... Telkitty is visiting you?
@TonyTheLion ..checks under desk and behind cabinet.. nope, no Telkitty?
Ww.. Telkitty is an Aussie?
10:04
Margin James in au? I am in sydney :D
@billz Me? In Oz? NO! I am in England, monitoring the miserable, disappointing cricket :((
Cricket, nice. I never understood the game rule.
It's much harder than C++
><
@billz There is only one main rule - grind all Australians into dust.
10:07
I don't mind :D
..something that we are currently failing at.
What's not? :)
@billz where abouts?
I've closed my unicode shit. I can't face any more misery today. need more coffee.
Why are you working on a Saturday?
10:09
@Telkitty猫咪咪 in Sydney, I work in CBD
I meant where do you live, tart
@Telkitty猫咪咪 Well, in anywhere that matters, it's Saturday. I'm working at the weekend 'cos Monday morning deadlines:((
@Telkitty猫咪咪 Epping, you want to buy me coffee? LOL
10:11
nice execute.
@Telkitty猫咪咪 Did you update your website? I remember it was ugly!!
why don't you have a look?
Good question, the contact page is girly :)
Thank you! It will be re-done slowly by the web designer.
I like the product page - wonder lady
Do I know you in real life?
Are you in finance IT? It seems 80% of the C++ developers in Syndey are employed in finance IT ...
10:17
I don't think so.
where do you live?
I guess currying is widely confused with partial application.
Because I keep seeing it on SO.
@Telkitty猫咪咪 ATM yes, I just started my contract recently
Not many jobs for C++ at all
OMG what have I done now? The Lounge has an Oz infestation :(
@billz Where abouts in the CBD, near Wynyard, Town Hall or maybe Martin Place?
@Telkitty猫咪咪 Do you want to stalk me? :D
10:32
I don't know who you are ... a screen name and a station is not enough for stalking purposes :p
If you two get together, I wish you both a good time. Please do not make any more Australians.
Eng 62-2 (trail by 465) I want to die.
@MartinJames Are you living in a house or low level unit?
@MartinJames rofl ... good work, now the stalker is on to you :p
Nah, I just try to help call an ambulance for him if he needs one
I'm like half a world away. Stalking me is not cost-effective for Oz:)
10:39
@billz how thoughtful >_<
I am just a nice person
@billz So good to know that you are concerned about my health :)
Aaarrgghhh... WICKET - Trott c Clarke b Harris 5 (Eng 64-3)
No problem, I don't know your emergency call number anyway
Maybe we can meetup for coffee in the CBD sometimes after I fix my tooth in a months time. LOL. No it is not a date
@billz I guess +44 911 should work? If you call any UK emergency services, please send them to Old Trafford - the English batsmen need urgent treatment.
10:46
sure, OZ coffee are great.
TBH, Trott needs to be euthanized.
@Telkitty猫咪咪 Wot? You are in hiding?
@MartinJames Are you interested in seeing a whole bunch of ex-colleagues?
@Telkitty猫咪咪 hehe - stupid dog cannot read.
@Telkitty猫咪咪 OK, no. Point taken.
@Telkitty猫咪咪 cool, looks like are are close in city
10:52
I don't work close to Wynyard any more

« first day (1022 days earlier)      last day (4152 days later) »