« first day (759 days earlier)      last day (4198 days later) » 

3:00 AM
is it best to do general calculations every X frames or every X seconds?
 
Xeo
@LucDanton Wait, was that past_the_end member already saying how far past-the-end you were?
 
@Xeo It's a flag. (last, last, false) is an iterator to the last element, (last, last, true) is one-past-the-end.
 
Xeo
@Dave Depends, really, but normally it's much easier to think in seconds
Also, there are dynamic framerates.
 
well lets say a splash screen displays for a certain time at game launch
i have the choice of either using seconds or frames
 
Xeo
@LucDanton How does your slicing work for iterating back from past-the-end, then?
I'd generally go with seconds.
 
3:03 AM
@Xeo Decrementing (last, last, true) puts the state to (last, last, false).
 
Xeo
Okay, but.. shouldn't ((last-2, last, false) + 4) - 4) yield the same iterator?
 
Incrementing beyond one-past-the-end is kinda bad.
Is your arithmetic correct? I'm bad with numbers.
 
Xeo
Well, it happens with strides.
 
@Xeo I'm not as confident on my current implementation of advance as I am with increment and decrement.
 
I'm noting, "just a few minutes" turned into 30 minutes. Oh my. I'm getting ooooooooold… — Cheers and hth. - Alf 1 min ago
 
Xeo
3:08 AM
it == [0, 1, |2|, 3, N, X, ...] (|2| indicating where the iterator points) with stride == 3, ++it yields [0, 1, 2, 3, N, |X|, ...], which is bound to [0, 1, 2, 3, |N|, ...] since any further than one-past-the-end is bad. However, --it should now yield [0, 1, |2|, 3, N, ...] again, not [0, |1|, 2, 3, N, ...] (imho, anyways)
And it seems that doesn't happen with the way you described your implementation.
 
Are you making the distinction between one-past-the-end for the underlying range and one-past-the-end for the strided range?
Similarly last is not the last element of the underlying range -- the strided iterator doesn't care for that one. last is the last element of the strided range.
 
Xeo
@LucDanton No, I was just thinking that auto x = *it; assert(&x == &*--(++it)) should hold.
Even if ++it (temporarily) puts it past-the-end
 
(last, last, false) --increment--> (last, last, true) --decrement--> (last, last, false).
It's lossless and reversible, isn't it?
 
Xeo
Ah, I think I see where I misunderstood you. Just to make sure, what about (not_last, last, false) with a stride that makes incrementing it a past-the-end iterator?
 
(not_last + stride, last, false)
Wait what?
 
Someday I will be a drag quuen
 
^ I found this "analysis" to be of rather dubious value.
 
@Xeo Which past-the-end?
 
Xeo
@LucDanton Yes, but what if not_last + stride would be farther than last?
 
@Xeo Then it's not much of a last, wouldn't you think?
 
Xeo
3:16 AM
@LucDanton Wait, is last always reachable from first in n*stride increments?
 
(n - 1) or 0.
To reiterate, last is the last element of the strided range. Not of the underlying range.
 
Xeo
Okay, that's apparently another point where I mistunderstood.
 
Iiiiiii love you guys :)
 
Xeo
I shouldn't do this with my brain being as it is now. Sorry for the distraction.
 
Put another way it's the second inclusive bound.
It can't be not reached!
 
Xeo
3:19 AM
Yes, I see now.
Btw, what happens if I do slice<FromTo<0,5,2>>(range)?
 
@Xeo [range[0], range[2], range[4]] I suppose?
 
Okay what does this mean so i can figure out what mistake i am looking for : error LNK2019: unresolved external symbol "public: void __thiscall MainMenu::create
 
Xeo
@LucDanton So you calculate the second inclusive bound?
@Dave undefined function
 
function create right ?
 
Xeo
3:23 AM
yes
 
ok jeese they word the errors so over board
 
@Xeo Yes. I haven't changed the interface we settled on.
 
You only YOLO once.
 
Oh boy. I'm having a serious issue computing the distance between two iterators.
 
Xeo
How so?
 
3:28 AM
distance(iter, other.iter) / stride is correct in general, the problem arises when dealing with one-past-the-end.
 
@Mysticial: how long have you been contributing to WCG?
 
@Borgleader At least a few years now. I don't remember.
 
Ah cool, cool.
Oh and uh, to any of you Unix guys. Any reason why ./someExe would give me an "No such file or directory" error when the ls command cleary shows the file as being present and executable?
(I'm on a Ubuntu VM)
 
Xeo
@Borgleader dangling symbolic link or something?
 
Okay, fixed. I offset the distance by - (past_the_end && !other.past_the_end) + (!past_the_end && other.past_the_end). Isn't that cute?
 
3:32 AM
I doubt it, I unpacked a .zip file and it was one of the included files
 
Xeo
@LucDanton Err...
- (past_the_end != other.past_the_end)?
 
@Xeo The distance between (it, last, false) and (last, last, true) is distance(it, last) + offset. The offset is +1 or -1, depending on the way the two arguments are ordered.
@Xeo It can't work with just one boolean calculation, since that would have only two possible results. I need three!
The fourth result of having two booleans above is not present due to invariants. I think? Maybe I just map two things to 0.
 
Xeo
Maybe I should just go to sleep.
 
Anyway, all that appears to be left is that boost::distance(view) is 4 instead of 2.
...which could be due to a faulty distance computation come to think of it.
 
@Xeo Turns out I was trying to execute a 32-bit executable on a 64-bit version of Ubuntu.
installe ia32-libs atm
 
3:42 AM
@Xeo I've never mentioned it but the unit test TU for slices (both tuples and ranges) takes ~10s to compile :p It's at 325 LoC atm.
 
user1357851
Ok, is it me or whenever someone leaves the room it looks as if their avatar drops dead?
 
 
3:58 AM
You guys just don't know the secret!
 
4:14 AM
Why is this not allowed for a const std::string:
const std::string type = "LOGO";
if(type == "LOGO"){//do something
 
strcmp I think
Oops sorry thinking of something else
 
Xeo
@Dave Who says it isn't?
 
if(strcmp(type, "LOGO")==0) ?
 
Xeo
@Crowz Eeeet, you're out.
 
oh thats odd
on second build it didnt error
 
4:16 AM
@Xeo Is a std::str basically just a char []?
 
Xeo
No.
 
Damn. Too much C.
 
Xeo
Get a book if you're really interested in C++.
 
Me?
 
i bought C++ Primer 5th edition
 
Xeo
4:17 AM
@Crowz Who else?
 
i'd recommend the book to all those who are interested in c++
 
Haven't watched a single video from it yet, but whatevs
 
Xeo
@Crowz No, get a book.
Most online tutorials are crap.
 
hard to know if the youtube poster of such videos have the best methods to approach things
 
@Xeo Don't say that you'll anger the puppy
 
4:19 AM
@Xeo But most books are even more turrible, longer, and agonizingly boring
 
Xeo
@Borgleader most != all && was_referring_to(video_tutorials)
@Crowz Wrong, yes for a reason, depends on the author.
 
@Xeo Oh
Yeah video tutorials are crap.
 
@Xeo The material covered moves at such a slow pace, it seems more optimal to use video
 
Xeo
Not that most written online tutorials aren't crap either.
@Crowz Depends on the author, again.
 
Although, MIT does these introduction to programming with python videos. Theyre not too shabby
 
4:21 AM
@Xeo The process of reading takes longer than the process of visual recognition
Thus books will always be obsolete
 
Xeo
Whatever.
 
Really can only do visual... animations help more than anything
Like so!
http://upload.wikimedia.org/wikipedia/commons/6/6a/Sorting_quicksort_anim.gif
 
4:59 AM
@Cheersandhth.-Alf Can't help but read that as They changed it, now it sucks.
 
5:13 AM
I've a set of static array like panctuations, unicode_brakets etc .... I check each character against these array by looping. I want to optimize that as I am getting millions word comparisons. What I can do is a range check with < and > . Is there any templated way to generate this check instead of writting manually ?
 
What, exactly, is a void *
 
Xeo
@EtiennedeMartel I kinda felt like that too. I personally like the dark theme.
@Crowz A pointer-to-void.
 
I don't think I understand pointers
 
5:26 AM
@Crowz A void* points to some region of memory, but it doesn't let you use that memory without casting to some more specific type of pointer. about all you can do with the void* is to copy it and compare it. and cast it.
An important property of void* is that it's large enough to hold any data pointer.
 
Oh well that's no fun
 
Well it's used for low level stuff, like defining allocator functions.
And sometimes you need to cast to void*.
For example, if you have
char ch;
and you want to output the address of that variable, you can't just do
cout << &ch << endl;
because the output operation treats char* pointers specially, assuming that such a pointer points to the start of a nullterminated string of characters.
so you have to do e.g.
 
@EtiennedeMartel I think there's a little more to it than that. That doesn't mean all the criticism is justified, but (just for one obvious example) the default of all-uppercase for the menus really is harder to read. In this case, there's little enough that it's probably open to argument that it doesn't matter much, but at least when you're running it on a desktop, it seems clear that it's a change for the worse. The only real question is whether it's enough worse to care much about.
 
cout << static_cast<void*>( &ch ) << endl;
 
@JerryCoffin The casing problem can be easily fixed by setting a registry key.
 
5:31 AM
@JerryCoffin They say that it's possible to get used to the "blue" theme. I'm trying it now. It looks a bit like VS2010, but all very flat and weird microscopic icons
 
Personally, I quite like the Dark theme.
 
Hmm, I remember seeing somewhere that it's easier to read light text on a dark background than the opposite.
 
@EtiennedeMartel Sure -- but you're still doing extra work just to get back to parity with earlier versions.
 
Indeed.
 
5:36 AM
@EtiennedeMartel That seems to vary between people. Some people like it, others really don't. A lot also seems to depend on getting the contrast ratio just right (which also varies between people).
 
5:56 AM
@all hello
some one here can help me with a problem?
 
@Sikander Hi! If it's your first time here, please read the newbie hints. We are a... rather special chatroom.
 
@Etienne de thanks for the link
my question is related to cell phones programming....
 
Oh, might not be the right place, then.
While it's true that we talk about a variety of subjects, and that C++ is merely the most common one, well, it eventually bounds to "you can ask, but don't expect an answer".
 
It is c, c++ question....
 
I got a feeling it's going to be about iOS.
Just a hunch.
 
6:08 AM
yeah ! kind of...
 
Isn't there an iOS room somewhere?
 
Why so many .... after every statement?
 
He seems insecure.
 
Anyway I have seen as many as (more than) 6 dots and (more than) 8 question marks, so this is nothing.
 
Reminds me of this person I encountered many times on a forum. He (or she, can't remember) seemed unable to use commas or periods. It was always ellipses.
 
6:12 AM
My boss is having me re-write a memory allocator in assembler.....
Apparently "C++ is too slow for high-performance computing".
Any sense to that?
 
iOS means Apple... C++ means open source.. it's not just to do with iphones.. and you guys are here to help programmers not to make them feel that "you should be thankful to me because I'm helping you". If you help someone this way.. go off the rooms...
stackoverflow in not your property...
 
Is my handwritten assembler code really any faster than what a C++ compiler would generate?
 
"C++ means open source" How?
 
@VinayakGarg I think he means it's an open standard.
 
What, what, what?
 
6:17 AM
@Sikander: Its just best to ask question, and hope someone would answer it.
 
however my question was what should I do if I want to get the metadata of call received on a cell phone. There may be some memory blocks in the mobile where the data comes.. Is there a way that I can access it through assembly or c++, or some system calls??
 
6:28 AM
someone can give me a hint?
 
@IDWMaster How good are you at writing assembly language?
@Sikander You're probably going to have to use a system call, which will vary with the platform.
 
@JerryCoffin system call to OS?
 
@Sikander Yes.
 
I can't do it without calling OS? because I don't think OS will have any such type of system call that will give me access to this data? I want to write my own program independent of OS. Just want to know which components should I access and where can I find the data?
 
Xeo
@Sikander You know, it's this attitude that's been pissing a few members off already. Random guys joining the chat room, where they don't know the culture, expecting to get their evey question answered.
> and you guys are here to help programmers
No, we're here to relax.
 
6:40 AM
@Sikander At a guess, it's probably only available via the OS.
 
Xeo
If we want to help someone, we'll most likely do so via SO proper.
 
greetings
 
Xeo
Anyways, sleepy time. G'night.
 
anybody remember the issues I had with my CPU temps last weekend?
 
@Chimera Yeah, sort of (100+C, if memory serves).
@Xeo G'night.
 
6:44 AM
@JerryCoffin Yeah, well, I bought a new cooler and now all 4 cores are in the 60c range when fully maxed out. I think the thermal tape was the main problem though. Now using thermal grease... what a major difference.
I'm amazed really.
 
@Chimera Ah, very cool! (Well, okay, 60C isn't exactly "cool" by normal standards, but it's a lot cooler than 100 anyway).
 
@Xeo relax .. you are making me laugh.. stackoverflow is not to relax man.. go out there you will find too much contents for relaxation on net... stack overflow is to work and create something...
 
@Sikander The main site is for questions and answers. The lounge is for lounging.
 
@JerryCoffin I think with the Folding at Home running at the cores maxed out 60C is pretty good. When not running Folding at Home the temps drop to below 40C
 
@Chimera Oh yeah, not bad at all, I'd say.
 
6:46 AM
then why is the room named C++... name it Lounge room.
 
I bought this cooler.
Seems to work wonders.
 
@Sikander Read it again. It's named Lounge<C++>. Most of us write C++, and this is where we lounge.
 
ok, go on with your lounge thing. I think I'm at wrong place
 
@Chimera Certainly looks like it should.
Big cooler, couple of big fans. Heat shall not survive...
 
@JerryCoffin Surely not! :-)
 
6:57 AM
@Chimera Hmm...perhaps Cooler Master should change their motto to something about "Enforcing the Second Law of Thermodynamic since 2005" (or whatever year they started).
 
7:12 AM
Has anyone simulated VHDL code on Ubuntu?
 
user1357851
fedora or ubuntu?
 
user1357851
which is your favourite linux OS
 
I have used Ubuntu only, and I like it
VHDL is like a horror. First the language, and I also have to boot in windows for that. Ahhh
 
user1357851
7:40 AM
Ha, spent 3 half days, finally solved this problem. Don't know whether I should feel great or retarded.
 
moaning
@Telkitty What problem?
@JerryCoffin funny, though it would be an egregious claim to make :)
 
Xeo
So much for sleep...
 
user1357851
@sehe Well it is not exactly C++ related ...
 
user1357851
0
Q: Successive calls PresentViewController

TelkittyI am trying to add a registration page & a verification page to my app that has a 3 views that can be switched to and from using a UITabBarController. The registration page should only be shown once in this app's life time. Once a user is registered, this view will go away and be replaced by ...

 
@Telkitty wokay. those kind of problems. I hate those :( You should feel good. And do some careful analysis why it took you 3 days and how it could have been shorter: learn something for next time :)
 
user1357851
7:46 AM
I am one all rounding newblet :D
 
user1357851
I am more of a C++ person
 
user1357851
Have not been doing Objective C for long
 
I can't believe I'm still getting upvotes for this answer (to an, IMO, half-moronic question) : stackoverflow.com/questions/5728259/…
 
@sehe It involves vim and you think it's only half moronic? How quaint!
 
user1357851
@sehe In the land of no legs, an one legged cripple is the king :p
 
user1357851
7:49 AM
just joking
 
@JerryCoffin har har
@Telkitty clearly that's the factor at work with that particular answer, yes
 
Minesweeper in Windows 8 has Adventure Mode now, I gotta get Windows 8 :P
 
IMPAHTANT
 
8:00 AM
I still can't get on LWS, can anyone here?
 
@Pubby Nope - DNS failure.
 
Xeo
@Pubby It's dead. :(
I hope it revives, though.
 
What to use instead? Ideone?
 
Why not use the IDE installed on your computer?
 
@Xeo It's sad it was never possible (?) to find who was behind that site, for proper credit
@VinayakGarg Because it is installed on your computer?
 
8:04 AM
Standart x86 PC don't have any NVRAM, aren't it? I mean i either end up with mass fflush stuff or either tolerate the fact that when my programm crashes it will drop any logs?
 
Xeo
@Pubby Yeah, seems like it.
Until @StackedCrooked gets his online compiler properly up and running (including links)
 
@Ivan0x32 use SSD, use UPS and fflush aggresively only on powerfailure
 
@Ivan0x32 It has some NVRAM, but only a little, and not normally user-accessible.
 
@sehe Is that a question or answer? (puzzled)
 
@Ivan0x32 how hard do you expect your program to crash? If the process crashes, then anything written to a stream will eventually be flushed by the OS. If the entire machine crashes, of course, that data would be lost
 
8:06 AM
@jalf will streams really get flushed, if process crashes? on all OSs?
 
it does seem to work
 
Wow, it's realtime o_O
 
Well, I think it's time for me to get some sleep. Later, all.
 
@Ivan0x32 Yea, it's pretty cool
I have no idea how he did that
 
jalf, thaks for the info, didn't know that.
 
Xeo
8:09 AM
@TonyTheLion Compile on every editor change, and it's not cool. :s
@TonyTheLion Yeah, but it's still pretty vulnurable, and he doesn't have the linking feature in.
 
Well if he so generous.... )
 
@VinayakGarg Why would you not use A on B? #1 because there is no A on B? #2 because you're not close to B, so A is useless, #3 Because A doesn't seem to work etc. etc.
 
I wonder what happens if you input there some simple project with heavy template stuff.
 
@Ivan0x32 I did yesterday. It coped pretty well. Taking long, but not longer than locally
 
It won't let me compile this:
#include "main.cpp"
#include "main.cpp"
#include "main.cpp"
#include "main.cpp"
#include "main.cpp"
#include "main.cpp"
#include "main.cpp"
#include "main.cpp"
#include "main.cpp"
#include "main.cpp"
#include "main.cpp"
#include "main.cpp"
#include "main.cpp"
#include "main.cpp"
#include "main.cpp"
#include "main.cpp"
#include "main.cpp"
#include "main.cpp"
#include "main.cpp"
#include "main.cpp"
:(
 
8:12 AM
@Pubby unbelievably
 
@bamboon if the data has reached the OS, then yes, it will. If it's still in the process' own buffers, it won't. Point is there are several layers of caching involved. Even if you flush your process' stream, the data just goes to the OS buffers, where it gets cached some more, until the OS feels like flushing it
 
I'm probably a bad person, it's compiles template factorial for me :)
 
Xeo
@Ivan0x32 No wonder it isn't responding! :P
 
@sehe Ah okay. But it is surprising.
 
@VinayakGarg To whom?
 
8:18 AM
@sehe To me
 
Oh ok. Thanks for clarifying. That's surprising, by the way :)
 
@jalf ah yeah, right. thanks for the info.
 
Strange, i dropped connection and it still doesn't respond a thing. I'm gonna burn in hell for this :(
 
@TonyTheLion Only for the default "Hello GCC" code. After adding a space it is just "(compiling...)"
What a crooked IDE
 
have fun!
@VinayakGarg The odds are stacked against the crooked
 
8:32 AM
@sehe likes pun :)
 
like, spun words
 
user1357851
1 is the rep?
 
user1357851
no wonder (s)he had to write a post
 
user1357851
8:39 AM
imagine how annoying it would be if that user could come here and spam the chatrooms :x
 
cough
 
user1357851
:x
 
@Telkitty It is not on stackoverflow man
 
user1357851
Oo
 
user1357851
I still only have 20 rep
 
user1357851
8:40 AM
it has been 20 for ... a week
 
on what SE site would anyone have 1 rep, and 2 silver/3 bronze badges :)
 
haha
 
@Telkitty because you only answered 1 question. Ever
 
user1357851
and that question was my own :x
 
@sehe that site has questions inside answer, answer inside questions, answer & questions inside comment, comment inside answer etc. etc. ;)
 
8:42 AM
@Telkitty your badges indicate your simply a talkative, commentative, student. Sounds about right
@Telkitty Makes no difference
@VinayakGarg In other words, it is a regular forum?
 
user1357851
I am no student
 
@Telkitty You are here. (And a supporter/editor, whatever the heck that means)
 
Xeo
@Ivan0x32 Well done, you killed the only other up-to-date online compiler now.
 
user1357851
I have 8 apps and thousands of users.
 
@Telkitty How does that not make you a student lol
 
user1357851
8:43 AM
<--- all rounding newblet
 
user1357851
f00d $
 
@sehe Well the name has "discuss" in it. But it has improved (as Q&A site)
 
I hate you @R.MartinhoFernandes
morning all
 
room topic changed to Lounge<C++>: Please don't plink thecoshman any more. [c++] [c++11] [c++-faq]
 
Xeo
@thecoshman How many did you get?
 
8:46 AM
;)
 
@Xeo I had only 12 this morning, no idea how many where just the spam ones though
@R.MartinhoFernandes thank you
 
@thecoshman Flagged
 
whilst we are at it...
11
Q: Why is the 'plink' noise in chat not an account setting?

thecoshmanFirst, let's explain what I am on about. That little 'plink' noise you get by default when some one posts a message at you on chat. I HATE it with a passion! At first I was ok with the noise, as I could simply disable it and problem solved. Except it's not solved, it is merely put aside for a wh...

 
Xeo
room topic changed to Lounge<C++>: Please don't plink thecoshman any more. Plonk him instead. [c++] [c++11] [c++-faq]
 
@Xeo plong
 
8:48 AM
Ow.
 
What is plonk?
 
@VinayakGarg the sound you make as you hit the bottom of some ones ignore list
 
So if I ignore someone, that someone will hear the sound?
 
Xeo
@VinayakGarg They should actually add that! , here I come!
 
Guess i've should've changed career to QA / Testing, probably done more good that way -_-
 
8:52 AM
Hi all
 
Xeo
Hi.
 
@VinayakGarg if I actually face palmed as hard as I should, I would kill some one else with my head flying through the air
 
I just want to know how to split the code into multiple files (for better readability)
 
Xeo
@ToughGuy Highlight relevant code, ctrl-x, switch file, ctrl-v
 
@thecoshman lol, I deliberately worded my question like that :p
 
8:53 AM
@Xeo :D Thanks. and then save the file and import into where it is required.
 
A simple rule is: declarations and inline definitions go in header files, other definitions go in implementation files.
 
but how to call it in specific place
My implementation file has outgrown. I need to split it into smaller files so I could navigate better
 
@ToughGuy the correct solution is to get a better text editor
2
 
If it's not a header, you can break it down into more files without much trouble.
You need to be careful about dependencies between the definitions, and then tell your build system to build all the smaller files.
 
I want pure versions of iterator functions like advance, nothing is already out there?
 
8:57 AM
Maybe I need to rephrase my question.

My implementation file has piece of code which has objects dependent on that file. If I create a new file and paste the code in that, it asks where the code came from. I need simple PHP like import solution. Maybe make a function in a file and then import the file and call the function
 
@ToughGuy forbidden word detected: "***"
5
 
@Pubby std::next/std::prev
 
@R.MartinhoFernandes Thanks
 
My computer has volume control buttons. Also, pulseaudio (linux) and Win7 let you change volume level per application? — sehe 19 secs ago
 

« first day (759 days earlier)      last day (4198 days later) »