« first day (398 days earlier)      last day (4565 days later) » 

12:01 PM
wow, microsoft fixed a reported bug
 
Wow, I managed to cut myself only once while shaving.
 
@AlfPSteinbach yeah, they fixed mine too
Of course, their definition of "fixed" is a bit weird, because it doesn't mean "we fixed the problem in the product where you reported the bug"
but rather "one day we will release a separate product, and if you buy that, it won't have the bug"
 
Sometimes they release Service Packs. But VS10SP1 is in the past already.
I submitted a Connect bug a while back, and they fixed it before SP1 was released. But it didn't ship in SP1.
Now that they have that uservoice thing, there should be a suggestion to "provide regular updates to VS to give customers access to bug fixes"
@AlfPSteinbach Btw, what kind of username is "Alf P. Steinbach, except MS doesn't accept it"
 
@RMartinhoFernandes It's my name, plus some extra text in order to make MS accept it
 
lol
Wait, that bug was reported two weeks ago!
I thought it was in April (silly American dates).
That's unbelievable! No way they fixed a bug two weeks after it was reported.
 
12:18 PM
took about the same amount of time for mine
I don't have a problem with the speed at which bugs get fixed, just that 95% of them don't get fixed at all
but the ones that do get fixed are often handled pretty fast
 
But the fixes ship really late :(
Sometimes I wonder why people even bother filing the bugs. To get the fixes you have to wait years and pay for them.
7
 
@RMartinhoFernandes yep
 
@RMartinhoFernandes at least with open source software if a bug really bugged me enough I can bugger off and fix it myself
 
Some months back I found that the mono C# compiler was not handling checked arithmetic correctly. It took me a few hours to fix it and get a patch in the trunk. If it was Microsoft's compiler, I'd have to suck it up, and wait for C#5.
 
0
A: How to convert hex value to symbol in c++ windows?

Alf P. SteinbachWikipedia: http://en.wikipedia.org/wiki/C0_and_C1_control_codes You can use a simple lookup table, an array, to quickly find the ASCII name of a character code. Or you can use a big switch (not recommended). Anyway you will have specify the names in your source code that defines that array. Why...

 
12:32 PM
> sorry guys, it was very urgent, i am trying my best to convert HEX to SYMBOL, Thanks
Sure, this really helps.
 
I always want to write a glib/sarcastic "if it's urgent then I'd use the support contract you have with your compiler vendor rather than SO" comment, but I don't think that would be terribly constructive
 
I think person is very young in mind, either because young in years, or brain damage
 
If it's urgent, pay me and I'll do it for you
And that is not even being sarcastic :)
 
cpx
lol
 
btw., re the closing, "cannot be reasonably answered in its current form" is patently false. i'm amazed at how people try to get rid of questions that they themselves cannot answer. yes, @awoodland, that means you too.
 
12:41 PM
It was closed?
 
Even after my edit?
 
@RMartinhoFernandes Oh, I missed that edit
 
@awoodland but you voted to close a question that was easy to answer in the form it had then
 
12:45 PM
I found a select-based solution for waiting for "Enter" irrespective of previous content of the input buffer. I couldn't see any pure-C++ way of doing it.
I guess the concept of "this call will block" is not part of the language.
 
@AlfPSteinbach - I didn't vote NARQ, I voted off-topic because it looked like book work and wasn't written in such a way as to be usefully searchable for others with the same question
 
@KerrekSB u have to go down to the buffer level
@awoodland bah. u could just put the question to google. that's "usefully searchable".
 
(I also voted to re-open with the edit though)
 
@KerrekSB Well, I think the damn IDEs could get decent and not close the freaking console windows.
 
@RMartinhoFernandes What's a window? :-S
@AlfPSteinbach Oh, really?
You mean inspect the .rdbuf()?
 
12:52 PM
@KerrekSB Isn't that "wait until presses enter" thing because of "the program just opens and closes and I can't see the output"?
Oh, I see that question is a bit more generic and not specific to that "issue".
 
0
Q: Having Trouble in SImple C Program

shr3jnI'm having problem with a simple C program. Even if I enter a year between 1000 and 1999 it still displays invalid year. Please tell me what's happening?? #include <stdio.h> main() { int year; c: printf("\n\nEnter a Year: "); scanf("%d", year); if ((year < 1000) || (year > ...

 
@RMartinhoFernandes I can imagine its utility for some real-time action. Maybe a reaction test?
It's a fine question.
 
Yeah, I hadn't checked :)
 
that is why C is so dangerous and not noob friendly, the program compiles but is completely wrong
 
@KerrekSB yes. i think you can check in_avail()
 
12:55 PM
@hexa For a while I was baffled as to why there was a stray c: label in the program.
I completely forgot you can use those things for goto :)
 
@AlfPSteinbach Oh, that'd be neat. I have a strong fear of streambuffers, so I never explored that.
@AlfPSteinbach If you like to post an answer, you have my upvote
 
@KerrekSB I don't know that it works. It seems like it should work. For this task.
 
@RMartinhoFernandes I use goto when programming threads in C :( so I recognized
I cannot escape C and Linux
 
What are the macros for fileno(stdin) etc?
 
Those are POSIX macros?
 
1:04 PM
Yes
 
<unistd.h>.
 
Ah, I think I found it: STDIN_FILENO
 
@KerrekSB sorry, the in_avail doesn't seem to work (with g++ at least). it reports 0 whether there is a newline or completely empty
 
@AlfPSteinbach Yep, just tested it, too :-)
There must be an extra level of buffering, so that the raw input is already processed (hence 0).
 
Xeo
I'm having a small scale crisis here right now... anyone in for some help?
 
1:19 PM
Yes, I want help.
:
Oops, I forgot the mouth on that smiley.
 
Xeo
It's not much, just that I can't download any .exe through firefox anymore. :s
 
Weird.
What happens?
Nothing? Error message?
 
@Xeo over enthusiastic AV/firewall?
 
Xeo
I see the download window for half a second, then I get a new window "this link needs to be opened with an application..." and a list of applications, though none helps
 
@Xeo download wget
then download the exe using wget
simple
 
1:21 PM
lol
 
@Xeo Did you install some addon or something?
Try disabling them all.
 
Xeo
@RMartinhoFernandes Not that I'm aware of.
Oh yeah, my little brother updated to ff 7.0.1...
All suspicious addons and plugins disabled
 
@Xeo Current version is 8.0.
 
Xeo
1:23 PM
@AlfPSteinbach If it was just my PC, then maybe I'd do that, but this is actually my mother's PC...
 
Xeo
I don't think she'll understand that wget stuff
 
she won't see it
 
Xeo
And she won't be able to download anything, no?
 
install chrome or safari or opera
 
1:24 PM
@Xeo Does it work on IE?
 
Xeo
@RMartinhoFernandes Arghsdfdg! I can't even download FF 8.0 because it's an .exe...
 
@Xeo for my mother not being able to download executables is a good thing
 
i think the solution is
go to preferences
go to application tab
 
no, best to not let mother dl exes
 
@Xeo Help > About > Check for Updates?
 
1:25 PM
DOS/executable ->always ask
 
Xeo
@RMartinhoFernandes Works. :/
 
Check what @bamboon suggested.
 
i think it is a good idea to not mess with the settings of someone else's computer
at least not without permission
 
@AlfPSteinbach I assume he's fixing it.
 
Xeo
Oh, I have permissions. I'm the pc expert in this house...
 
1:27 PM
hence, workarounds, such as wget or ie.
 
@Xeo Family sysadmin, heh?
;)
 
Xeo
:/
Not as fun as it may sound
 
Xeo
Especially considering how often my little brother breaks stuff
@bamboon German firefox, can't see any equivalent to "DOS/executable". And what FF tries to open when downloading something is an mf://url:... url, and I can just find that mf in the applications tab, and it is set to "always ask"
 
May "Applications" tab does not have an entry for exes either.
@Xeo Ugh, that sounds suspicious.
 
1:29 PM
mm
hmm
wait i am gonna check german
 
Either an addon, or a bug (the nasty kind of bug: virus).
 
Xeo
I looked all over on google for mf links, but I can't find anything.. .only something about a firefox protocol :/
brb, installing 8.0
 
windows or linux?
 
Being .exes, I assume Windows.
 
deinstall 7 first
 
indeed my windows ff looks quite different
 
Xeo
Well, upgrading to 8 solved the problem somehow
 
@AlfPSteinbach WTF is that.
 
good, thats always the first thing i would do, reinstall the application
 
Xeo
1:35 PM
Didn't bother checking for a newer version, as my little brother made it sound like 7 was the latest
 
trust is good control is better
you know what I mean in german^^
 
Xeo
heh, true enough
 
at home, my pc started taking 10minutes to load, no joke. After some debugging I found that it is taking the 10minutes loading classpnp.sys windows driver...
 
@bamboon That sounds a bit like an IngSoc slogan.
 
1:36 PM
I can only probably fix it reinstalling windows
 
@RMartinhoFernandes search result for "mf link"
 
@hexa WTF do you guys do to your computers?
 
Man, I don't know
I have a linux box running slackware 8 still and it is FINE!
 
@RMartinhoFernandes haha no,^^ it is quite an old german figure of speech
 
microsoft official help to my problem is: restore your system to a previous saved state or reinstall or remove the latest updates
they are so clueless on their own system
 
1:39 PM
go format c:
solves so many problems
 
they actually removed format from the command prompt lol
 
Xeo
brb, checking if my little brother can get through our bios password somehow with a master pw..
 
there is no such thing as master bios pw
 
Xeo
This one claims something else, I'll just try and see.
 
clear cmos always helps i think
 
Xeo
1:42 PM
@bam: Sure, but we would notice if he did that :P
 
nobody should mess with the admin
 
I've never seen if (!argc=2) before. Cute.
 
why does it hurt when I think? :D
 
is that a real BG quote?
 
1:47 PM
That's why i got such a good grade in my History exam...
 
@KerrekSB Cute?
 
@KerrekSB that's a mistake right, not some clever trick I'm missing?
 
@hexa Probably as "real" as the 640K one.
 
Xeo
@RMartinhoFernandes Oooh, I'd love to.
 
@RMartinhoFernandes Well, that ought to be enough for me then :P
 
1:49 PM
@awoodland If so, it's way over my head..
 
woah, I almost accidently pasted my facebook profile pic here... that was close.
 
Now we want to see it.
No we don't.
 
Xeo
What is facebook? :P
 
facecrack
 
@Xeo the world's biggest waste of time
 
Xeo
1:51 PM
@hexa Addiction rate seems to be the same, atleast
 
Yeah I know :(
 
Xeo
I know people who'll get uncomfortable when they can't check facebook for 5 minutes..
 
@Xeo my mom can't survive without it for 2 minutes..
 
Xeo
I registered there during school, but I didn't look at it in way over half a year
 
1:52 PM
@IntermediateHacker ALL THOSE CROPS NEED HARVESTING!
at least thats what my mom does lol
 
@hexa ???
 
Xeo
Oh, yeah, the worst thing about facebook.. the games.
 
@IntermediateHacker FarmVille
 
nope, i can't check my facebook without vpn.. , so bad in china
 
@hexa Oh I see. lol.
My mom just randomly pics a friend and starts looking at all his/her pics and albums and commenting on them.
 
1:54 PM
@Thomas FB is banned in china?
 
For some reason Megavideo and Dailymotion are banned here in Oman.
 
yeah, FB is illegal in china
 
Xeo
Kind of like peanut, butter, jelly time. Just more addicting.
 
and Skype is banned here too. I have no idea why though.
 
1:56 PM
Where is Oman?
 
in the south of saudiarabia
hmm south
i mean
 
It's on the right side of UAE.
I live in Buraimi, just on the border of Oman and UAE
 
that's pretty cool
 
The "right side", lol.
 
lol, we are divided into two different words, i use Weibo
 
1:59 PM
@hexa I know, I only have to buy a 6 OMR pass to go to all the cool cities like Dubai.
 
"The password is too long. Please enter a shorter password." - maybe I don't want to apply for a job with you after all...
 
wtf: "Passwords must be at least 8 characters long."
 
That's acceptable.
 
Xeo
lol. Usually, it's the other way around: "Your password is too short, doesn't have enough letters and/or digits and must contain at least one uppercase letter"
 
2:00 PM
Who the fuck uses passwords shorter than 8 characters?
 
I always get so pissed with those PW requirements
5
 
Xeo
@RMartinhoFernandes Me :3
 
like, fuck that shit. it is my pw.
 
@RMartinhoFernandes I just tried a short one because they objected to my long one!
 
Just write "battery staple correct horse".
 
2:01 PM
write: PASSWORD
 
@RMartinhoFernandes that's roughly what I did with a site-specific hash thrown in
 
I use poems for the rare few I want to memorize and random autogenerated garbage for the rest. I expect the poems to require an infinite number of typist monkeys to crack.
 
what is tvtropes.org?
 
@RMartinhoFernandes like Camões poems?
 
You don't know TVTropes?
 
Xeo
2:02 PM
@Thomas Addiction in the form of a web-site.
Especially for first-timers
 
@Xeo thanks
 
@hexa I know the first "estrofe" (I don't know the English for that, but you know Portuguese) of the Lusíadas by heart, but I don't use it as a password :)
 
lol they have "His Highness" on the drop down list of titles
 
I just use Japanese words for my password.
 
i'm a chinese guy, lol, i know youtube
 
2:04 PM
@RMartinhoFernandes I can't understand Camões, I need a literature teacher telling me that he is saying, really
 
seems a tad optimistic - I'm pretty sure "His Highness" won't be applying for jobs with them
 
the others , know less
 
@awoodland lol
OMG, TVTropes is banned in China? That's a crime against humanity!
 
Xeo
Well, actually, it helps productivity
 
@RMartinhoFernandes no, it doesnt
i can get it
 
2:05 PM
Ah, cool.
 
I need the square root of an integer
 
What is the way to deal with that in C++?
 
Xeo
std::sqrt?
 
what is tvtropes?
 
2:06 PM
OMG another one.
 
lol
 
Xeo
I swear, @Alf does that on purpose!
 
@AlfPSteinbach TVTropes is a wiki of literature/television/film creative devices.
 
Thats for complex numbers, right?
 
It's overloaded for float, double, long double, and complex numbers.
 
2:07 PM
Is tvtropes a website?
 
Xeo
^this
 
@IntermediateHacker Yes.
 
ah..
I used sqrt from cmath so far
 
@RMartinhoFernandes can use big number?
 
Xeo
C++ doesn't have a standard big number class
 
2:08 PM
@Nils That's the one for floats and doubles. If you cast the result to int, it works fine.
 
but it has libraries for big number
 
I wanna go to Singapore. :(
 
@RMartinhoFernandes Yes that's what I did so far, but I guess this is not the optimal way of doing it.
 
@Thomas If by big number you mean arbitrary size or arbitrary precision, then no, it doesn't have standard libraries for that.
@Nils Unless you use a third-party library or write your own algorithm, that's the best you have.
 
@Nils the optimal way is to use floating point throughout
 
2:10 PM
@Thomas if you write sqrt instead of std::sqrt you'll get argument dependent look up so myns::BigNum will work if it provides sqrt in the myns namespace
 
how in the world does printf() handle multiple arguments?
can u do that in c?
 
@IntermediateHacker va_args
 
@IntermediateHacker <stdarg.h>
 
Xeo
@IntermediateHacker Can, but shouldn't
 
Warning: it's nasty.
 
2:12 PM
@RMartinhoFernandes but still, I'll learn it out of curiosity
 
@Potatoswatter It's silly, because it turns try { ... } finally { something.close(); } into try { ... } finally { try { something.close(); } catch (IOException) { /* what the fuck am I supposed to do here, anyway? */ } }.
 
in which header is std::sort?
 
@awoodland thanks, my poor english ,made an mistake
 
algorithm
 
@Xeo in C it's reasonable. In C++ it looks like C
 
2:12 PM
Don't use varargs in C++, they're not type-safe.
 
Xeo
@Nils Before asking more questions of that category, search your function at cplusplus.com and when you found it, look in the upper right corner. There, between angle brackets, is the header you need to include
 
cppreference.com is better.
2
 
Nov 9 at 9:17, by R. Martinho Fernandes
try {
    FileInputStream f = new FileInputStream("blah");
    try {
        // do stuff
    } finally {
        try {
            f.close();
        } catch(IOException e) {
            // what now?
        }
    }
} catch(FileNotFoundException e) {
    // oops
}
 
Xeo
@CatPlusPlus I didn't know that site, thanks!
 
@RMartinhoFernandes Right, forgot about that.
 
 
Xeo
@RMartinhoFernandes Holy.. what kind of construct is that?!
 
Java construct.
A standard one.
 
Anyways that's what I do now:

int i = 4;
printf("%i\n", static_cast<int>(sqrt(static_cast<float>(i))));
 
@Xeo Opening one file to do something in Java.
 
I miss Python.
 
Xeo
2:16 PM
@Nils The first link is actually in <cmath>
@RMartinhoFernandes Oh my gosh...
 
with open('blah') as fp:
    # woo, open file
# woo, closed file
 
@Nils is %i really the right format specifier for that?
 
print fp.read()
 
Xeo
@Nils No need for the casts, implicit conversion between int <-> float
 
@awoodland yes it is equal to %d IIRC
 
Xeo
2:17 PM
Also, the format specifier is %d for "decimal"
 
And for more files
 
Xeo
> d, i int as a signed decimal number. '%d' and '%i' are synonymous for output, but are different when used with scanf() for input.
 
@CatPlusPlus Well, you have that in Java 7!
 
with contextlib.nested(open('a'), open('b'), open('c')) as fp_a, fp_b, fp_c:
    # woo
 
@RMartinhoFernandes it is python
 
2:18 PM
try {
    try(FileInputStream f = new FileInputStream("blah")) {
        // do stuff
    }
} catch(FileNotFoundException e) {
    // oops
}
Gets a tad better in Java 7.
 
sounds nice
 
I have no idea what it does with the close in the finally though.
And the damn checked exceptions are still there.
 
Also, failed hard today. Housemate decided to throw a party yesterday. Couldn't fall sleep till 5AM, overslept morning classes, didn't manage to finish that crappy Java assignment (bam, -2 points for being late).
I want to flip tables.
I'm starting to think living alone might be the best option in the world.
 
Xeo
@CatPlusPlus (╯°□°)╯︵ ┻━┻
oh well, afk
 
@CatPlusPlus Cat, when you begin to learn python, in high school?
 
2:24 PM
I don't remember. About 4 years ago. Maybe 5.
 
nice
 
@CatPlusPlus I quite like living alone (although it is quite a bit more expensive), but some of the neighbours still have parties until crazy hours in the morning
 
I remember 2.5 coming out and being excited about with, in any case.
 
@CatPlusPlus Is that when you still had to import it from the future?
 
Yeah.
 
2:31 PM
That's such a cool feature.
 
That's the standard operating procedure of CPython, write a feature for one version, but leave it disabled by default, and enable by default in the next one.
 
@RMartinhoFernandes You mean time travel?
 
> Python 2.5 was released on September 19th 2006.
So I guess about 5 years.
 
@keithlayne from __future__ import X. Don't know what they call it.
 
from __future__ import x
 
2:33 PM
That's what I said.
 
Yeah, I know. Just thought my first chat post ever would be a joke.
 
when i learned python, it had released python 3.2
 
@keithlayne Oh, didn't notice that. Welcome, then.
 
I wanted to see what all the cool kids were up to.
 
Hello everybodyyyy
 
2:41 PM
20 to 23:00 in Beijing time, lol
 
hi,Etienne de
 
@Thomas It's "Etienne de Martel"
 
Etienne de <picture>.
 
2:43 PM
lol
 
But, yeah, that particle trips many people up.
 
When you type @ and start typing letters, you get autocompletion.
 
thanks, cat
 
That's on the newbie hints. If you're new, you should read them.
:)
 
(He's not really a cat)
(Or maybe she, it's a bit vague)
 
2:45 PM
I'm going to work, will try to salvage this horrible day at least a little.
 
Oh, it's can't be that horrible, I mean, you got us.
 
Yes, you're a shining beacon of insanity on this deserted island of boredom they call life.
 
lol, the Singleton I discovered today had a public constructor :)
 
Woah, cat's poetic.
@FredOverflow It's not bad then! It's not a singleton!
(What is it then? A mingleton?)
 
It's a failgleton.
 
2:48 PM
No, that's an ordinary singleton.
This one is a... class.
 
Classy.
 
But it did lazy initialize a field that could be accessed via a singleton() method, so I assume the author actually intended to write a Singleton. Anyway, I got rid of it.
 
Ba-dum-tish
 
Damn
They have two singletons!
Chandy and Lamport's snapshot algorithm
Man, this class is sooo exciting.
 
2:55 PM
Meh I get the impression that Xcode sucks for coding C++, at least it feels like I'm coding much slower (compared to using VS).
 
Doesn't Xcode suck like, in general?
More seriously, what does it do to slow you down?
 
@EtiennedeMartel is that the "checkpointing MPI" algorithm?
 
@awoodland I don't know, maybe that's the one they use, but as of now this class I'm in focuses on theory.
 

« first day (398 days earlier)      last day (4565 days later) »