« first day (675 days earlier)      last day (4289 days later) » 

11:01 AM
@MohamedAhmedNabil You are trying to put char array (const char*) into the character of the string. Change ""s into ' '
 
@BartekBanachewicz thank you :)
worked like a charm :)
 
it's not a charm. it's fucking language you didn't learned
 
@MohamedAhmedNabil Please note that your code is generally pretty ugly and could be easily rewritten using standard functions such as string::replace
@Abyx ... and my positive attitude is gone. Right, this code is fucking terrible :P
 
@BartekBanachewicz I havent learned it yet :(
 
@MohamedAhmedNabil Ok, that would explain it. If it's only for your own testing, it's ok. Be sure to look at the standard library functions, tho.
 
sbi
11:06 AM
Oh yeah, and: Dumping your homework problem literally, plus an unspecified error message, with no indication even where the error occurs => downvote plus closevote from me. — sbi 49 secs ago
 
@BartekBanachewicz ok, still learning though
 
Wow, you linked him to Karnaugh maps.
That's the bestest thing I learned in Digital Systems class. Well, I already knew of them, so it's the bestest thing I was supposed to learn in Digital Systems class.
 
sbi
Oh, @Mehrdad is prone to mindless revenge-downvoting.
 
Xeo
@thecoshman oh, too bad. It's really good
 
sbi
@R.MartinhoFernandes Yeah, I liked them, too, when I learned about them 25 years ago. I thought they were a forgotten thing, until recently a few people admitted they still knew about them.
 
11:12 AM
@sbi They came back with Minecraft and redstone circuits
 
sbi
@BartekBanachewicz ??
 
@sbi That Digital Systems class I took is gone now :(
 
Hey, look, u16string
 
@sbi In Minecraft (which is quite popular actually), exists a block type called redstone. It works just like a wire, and with some other components you can create a pulser (clock) and a NAND gate. Then you're turing complete, of course.
 
@sbi It's a game where you can build stuff and has mechanics that allow building logic gates, and thus people went crazy building all kinds of stuff.
 
11:15 AM
@rubenvb u32string, even!
 
Xeo
@BartekBanachewicz It even has command blocks now :D
 
@rubenvb What about it?
It's just a basic_string<char16_t>.
 
sbi
@R.MartinhoFernandes Ah. I knew it was a game, but I had no idea you could build logical things with it, rather than (virtual) mechanical ones, and I didn't understand why it would revive Karnaugh maps.
 
@Xeo Well, my friend build something like this lately a5.sphotos.ak.fbcdn.net/hphotos-ak-snc7/…
 
Xeo
@BartekBanachewicz can you onebox it? I can't access it from here, filtered :(
 
11:17 AM
@sbi Well, people build CPUs, memory, graphic and sound cards... you need flops and circuits there. And as the people re-learned, they re-discovered old methods
@Xeo How does oneboxing actually work?
 
Xeo
just post the image link
 
@BartekBanachewicz try upload button.
 
Xeo
crap, doesn't onebox correctly :s
 
dupe votes
0
Q: Why is it required to escape the single quote in string literal?

AraKWhen I look at Escape Sequences in C++, it is clear to me they serve a purpose(well, except for one case). For example, the newline \n is used to represent a newline whatever encoding is used by the implementation. The question mark escape sequence is used to avoid interpreting it as a Trigraph. ...

 
11:18 AM
whoo, trigraphs.
 
Xeo
nice
 
@Xeo You know what's sick about it? It wasn't in creative mode. Every block of it was hand-dug, then put into fire to create bricks and nice stone and stuphz.
 
11:20 AM
@R.MartinhoFernandes Like the flying buttresses.
 
Xeo
@BartekBanachewicz You can get smooth stone with silk touch, though
 
@Xeo I know, but they spent all exp to enchant weapons. We found portal lately (just after we updated to 1.3) and the dragon fight is imminent :P
 
Xeo
Except that the dragon fight is lame :s
 
Woah, woah, WTF are you talking about. That's not the Minecraft I've played before.
 
Xeo
You can go in with a stack of arrows, a wooden sword and some food and still win
 
11:21 AM
Woah, we are going to 5-man him ^^. Missing WoW, I guess.
 
Xeo
@R.MartinhoFernandes Wat? The Ender Dragon is in since long long ago
 
@R.MartinhoFernandes but MSVC 2010 doesn't have a distinct char16_t type. So it's basically a wstring O_o
 
@Xeo Then I guess I've played since long long long long ago. And I haven't played since long long long ago.
 
Xeo
heh
He was added in 1.9 IIRC
 
11:23 AM
@rubenvb char16_t is wchar_t? I thought it was uint16_t.
@Xeo I haven't played 1.0.
 
@R.MartinhoFernandes huh, implementation defined I guess. If it's unsigned it might be just usable...
 
@R.MartinhoFernandes The versions fucked up at some point.
 
Xeo
@R.MartinhoFernandes 1.9 is beta, 1.0 was release
 
Whatever, I stopped played right before the Endermen.
 
Xeo
That would be 1.8 then
 
11:26 AM
We were waiting for you to design, test, implement, get field experience, propose, and then shepherd the proposal through the standardization process. We were busy doing other stuff. — Howard Hinnant Apr 11 '11 at 14:41
 
Xeo
Dammit, there was another one of those "how does auto actually work" questions :|
 
lol
 
@rubenvb Right, I was asking what it is in the VS implementation.
 
@R.MartinhoFernandes I have no idea.
 
11:39 AM
@RadekSlupik what accounts?
 
If my program gets char input from the usesr. Is there a way to avoid the user from entering the same letter twice?
 
@MohamedAhmedNabil LART?
 
@ecatmur ??
 
@MohamedAhmedNabil You stand behind the user with a LART. If they look like they're about to enter the same letter twice, you apply it.
 
@MohamedAhmedNabil this is kinda primitve, but you can loop the input of chars and check everytime
 
@Papergay The idea is how can i check
I only got away using ASCII codes for the chars starting a at 0 by subtracting 98
 
@MohamedAhmedNabil just store each char in a buffer and then see if the new char is the same as the last char in the buffer
 
Hey guys someone know where can I ask questions about MS Access on StackExchange or in other website. It's for a school work.
 
@Papergay If he ever entered "a" I dont want him to ever enter it again
 
you can discard it and remove it from the screen?
 
11:51 AM
@MohamedAhmedNabil and @Papergay can you guys help me?
 
Xeo
@R.MartinhoFernandes aye
 
@Zignd sry I dont know
 
@Zignd sure if i can
 
@Papergay ok thanks
@MohamedAhmedNabil need to add 10% to a specific cell in ms access
 
@MohamedAhmedNabil maybe there are signals for each inputted character, i think i remember something like that at least
 
11:53 AM
Seriously, JavaScript and ASP.NET? Is this a joke? — R. Martinho Fernandes 6 secs ago
 
I did this
for(int i=0; i<sizeletter; i++){
while(space[i]==letter){
cout<<"\nEnter a new letter: ";
cin>>letter;
i=0;
}
}
sizeletter is the size of the string
 
@MohamedAhmedNabil what is it supposed to do anyway?
 
@BartekBanachewicz Its for a hangman game
 
it's a counter
 
It is supoosed to make the user enter a new letter if he entered that one before
and check again
 
11:56 AM
@MohamedAhmedNabil So either use string::find() (good) or std::set<char> (better)
 
@BartekBanachewicz Thank you :D
 
i thought you did not want the user to input the same character again?
 
@Xeo might give it a watch through tonight, watched b00 (I think it was his) very short innings :P
 
but well its possible with std::set
 
if he does, The cmoputer doesnt accept it and prompts for a new one
 
11:58 AM
i thought you wanted to have a one liner?
like when you pressed 'a' and you press 'a' again then nothing happens
 
@MohamedAhmedNabil are you programming on windows?
 
@Papergay yes
 
@Papergay what's the difference
 
the wrong input is caught before it is read?
 
@MohamedAhmedNabil on windows there is this function kbhit()
maybe that will help you
 
@Papergay i need to include<windows.h>
??
 
@MohamedAhmedNabil im actually not sure ... im trying to find more on that function xDD
 
@Papergay It's deprecated and I don't know why the fuck would you ever post something like that to a beginner.
Not that I didn't do it, but after a disclaimer :P stackoverflow.com/questions/11987717/c-cin-keypress-event/…
 
@BartekBanachewicz i dont know anything about that function except that it returns true false when there was an input
 
12:07 PM
@Papergay It's a remnant from old Borland compilers. Not-standard.
 
@BartekBanachewicz yeah i knew that already. so i was looking for a more common function ...
 
@Papergay which should lead you to a conclusion, that there aren't any. Look at the link that I posted.
 
@BartekBanachewicz getch() does exactly not do what I want it to do
 
@Papergay so what do you want to do?
 
I know that what Im searching for is a system dependent function
as I said, catch the input before it is read(-> written to the screen)
 
12:11 PM
@Papergay So again, you need to use OS specific way. It's more complicated than just one function.
 
@BartekBanachewicz that is what I said and OS specific way is the only way anyway
 
@Papergay or you could use a library.
 
@BartekBanachewicz that seems to suck xD
well we are using libraries all the time anyway, but i want to avoid adding third party libraries
 
@Papergay So you'll end up writing non-portable code, reinventing the wheel and losing 3x the time you wanted to save. Seems nice.
 
@BartekBanachewicz yes I do
@BartekBanachewicz it is not like i would want to reinvent the wheel 2 times
 
12:16 PM
@Papergay So why do you want to write all this code by yourself?
 
@BartekBanachewicz to gather experience? besides low level programming sounds cool to me anyway
 
@Papergay It isn't low level at all, at least on Windows. I never actually understood people who like low-level coding. Instead of creating an application, you spend time on writing function waiting for a keypress.
 
@BartekBanachewicz its probably lower than using third party libraries where you do something like: wait_for_input_except(blabla);
@BartekBanachewicz its fun xD
 
@Papergay Now you tell me, I've written the windows message loop enough times already.
 
The trick is writing it in such a way that you can reuse your code in any circumstance
you may be writing low-level code, but only once
 
12:19 PM
@Neil e.g. putting it in your library
 
@BartekBanachewicz then you should have build your own library to do it with one function call without bothering with the rest
 
@BartekBanachewicz Yup precisely
 
@Papergay I usually wanted more than just one function, yet still too little to pack it up in somewhat complete library.
 
@BartekBanachewicz provide an easy configurable library without repeated runtimeloss (i would even use macros despite all the arguing in case that there is no other way) and call the function once
or something like that, there are many ways
seriously they should add a proper general man page for ncurses or the corresponding one should be easier to find for me >.>
 
you guys are weird
 
12:26 PM
?
 
the name 'Paper gay' grates on me... I am sure it is just the way I an reading it as two words, but seem needlessly offensive to me
 
@thecoshman yeah dont read it as two words and you should rather pronounciate it in a shallow way
then it makes sense
oh yeah, and dont use the english pronounciation
 
what kind of black magic is this?
for(std::set<build_element>::iterator it = std::begin(files); it != std::end(files); ++it)
    {
      build_element& current = *it;
error: binding of reference to type 'ambrosia::lib::build_element' to a value of type 'const ambrosia::lib::build_element' drops
      qualifiers
      build_element& current = *it;
                     ^         ~~~
I do no such thing.
it's not a const_iterator.
oh wait
nvm
files is const in this context.
 
^^
 
wait, no it's not.
 
12:30 PM
what is build_element?
 
@rubenvb Hulk smash.
 
@Papergay a struct.
 
Xeo
A std::set iterator is always const
As the elements in the std::set can never be modified
 
i see
 
Xeo
in other words
 
12:31 PM
crap.
 
lol
 
@rubenvb don't waste time typing std::set<myClass>::iterator just use auto
 
in other words - crap
 
Xeo
typedef *unspecified* const_iterator;
typedef const_iterator iterator;
 
@thecoshman I wanted to see if it was a bad type deduction.
this sucks.
 
12:32 PM
@rubenvb ah I see. Also, are you not suppose to use post increment with iterators?
 
Xeo
@rubenvb Why? Did you want to modify the element?
 
@thecoshman wut? no.
 
@thecoshman I've never used post increment with iterators and it has always worked fine.
 
@Xeo The build_element has two strings and two time_t. I wanted to use one string (the one used for its operator<) to build the other, and put that into the element. So the set ordering wouldn't be modified.
 
Xeo
@rubenvb Ah, use a std::map then, with a std::reference_wrapper<std::string const> as the key
 
12:34 PM
@thecoshman for the execution of the loop, it does not matter whether you use post or preincrement
 
Xeo
Or make the other thing mutable, but that would be a bit brute-force-y
 
@Xeo mutable means: ignore const?
 
Xeo
@rubenvb A mutable member means you can modify it in a constant context
 
@Xeo a std::map would change the interface, right?
 
Xeo
@rubenvb Dunno, I didn't pay attention before the iterator problem, no idea what you're trying to achieve :P
 
12:36 PM
What does this do? size_t found;
 
Xeo
@MohamedAhmedNabil ehm... declare a variable named "found" of type "size_t"?
Get a book
(I think I told you this already)
 
size_t is a type
 
@Xeo and what is type size_t
 
Xeo
@MohamedAhmedNabil google
 
Why is this closed?
1458
Q: The Definitive C++ Book Guide and List

grepsedawkThis question attempts to collect the few pearls among the dozens of bad C++ books that are released every year. Unlike many other programming languages, which are often picked up on the go from tutorials found on the Internet, few are able to quickly pick up C++ without studying a good C++ book...

 
12:37 PM
@Xeo i have one and it sucks. Still getting a new one
 
@MohamedAhmedNabil ¬_¬ you are going the right way for a plonking
 
Xeo
@rubenvb Wat? Again?
 
just vote for reopening it?
 
I can't it seems, cause I previously already did that.
 
Xeo
And I can't vote to reopen it...
 
12:38 PM
 
i was just checking if it waas a variable or what
 
w...t...f
 
@Xeo I just did
 
I can contact an admin flag for admin attention
 
Xeo
Please vote to reopen the books question, somebody closed it again.
 
12:38 PM
if that's a good idea...
 
Xeo
@sehe, either make yours clearer please that it regards the book question, or pin mine :)
@rubenvb What's bugging me is the fact that a mod protected it after it was closed
 
@Xeo I'm confused why mine didn't reference it "good enough" :)
 
Shameless self-promote - can I has reversal badge - stackoverflow.com/questions/12054221/…
 
@sehe Ask for a historic lock
 
@xeo it was protected before already
 
12:41 PM
@NikiC Does have those? Examples?
And hi!
 
hello
 
hi @sehe :)
 
Xeo
@sehe That it's about the book question, you need to hover it (yeye, minor nitpicking etc)
 
@sehe I don't know whether has any, but usually popular questions that are not on-topic anymore are locked for "historical significance"
 
@Xeo I assume that anyone with an interest will automatically click on pinned links in the lounge
@NikiC We should find out if it has ever been asked/suggested /cc @sbi
 
Xeo
12:44 PM
@NikiC Locking would be bad, since you can't edit it anymore to keep it up-to-date, IIRC
 
sbi
@sehe Huh?
 
Hm, you're right @Xeo. That's the kind of question that needs continuous updates
 
sbi
@Xeo "You have already (or previously) voted to reopen this question."
 
@sbi locking questions for historic reasons...
 
Xeo
Oh, I just noted that it was protected in april and closed in august .. I somehow read both as in august
 
12:47 PM
@Xeo Protected doesn't mean much anyways ^^
 
Xeo
Btw, the question has the "historic significance" notice at the bottom
@NikiC Yeah, but I was confused that a mod protected it after it was closed for no good reason
 
@Xeo Ah okay ^^ That wouldn't make sense indeed
 
what happens if it gets voted for deletion? I know you can undelete it... but is that only allowed once?
 
Xeo
And I just checked and all of the close voters have basically no fucking idea about C++
 
@Xeo hey - how do you tell?
 
12:52 PM
ugh. SO chat has been added to the office blocklist. reason number N that its time for a new job.
 
Xeo
Well, atleast they don't participate at all (or not enough for it to show up in their most common tags) in the tag
Except one guy with 120something votes
 
sbi
@Xeo It was protected so that no newbies would add their puny book recommendation answers to it.
 
Xeo
@sbi I know, I just mixed the months up ("Apr" & "Aug", don't ask..)
 
sbi
Please upvote this comment everybody, so that it is visible by default:
To the misguided individuals who keep closing this question randomly: Please leave this question open. It has been discussed on meta multiple times and the verdict was that, despite this question not fully adhering to current moderation guidelines, it does more good than harm. Also keep in mind that there are — literally!thousands of links to this question all across the Internet. — sbi 1 min ago
 
0
Q: MySQL eating up too much CPU

John KimI'm getting up to 350% CPU usage for mysqld command. I had a look at SHOW PROCESSLIST; but I cannot seem to find what is wrong with this. Is there a specific column I need to look at under SHOW PROCESSLIST or something else instead?

nice overclocking.
 
sbi
12:58 PM
We might have to flag for a moderator, though. Most of us will already have voted to reopen this question in one of the earlier fights over it.
 
@sbi I can flag and redirect him/her to the lounge for discussion?
oh, you linked to meta already
 
sbi
@rubenvb Why don't you link them to the discussions on meta I linked in my comment?
@rubenvb :-/
 

« first day (675 days earlier)      last day (4289 days later) »