« first day (598 days earlier)      last day (4342 days later) » 

sbi
12:19 PM
@ScarletAmaranth How about 2 months? I ask because there's an extended edition that comes on 6 DVDs.
John @scalzi points his readers to a site explaining how to remove DRM from his books: http://whatever.scalzi.com/2012/06/05/a-quick-bit-of-customer-service-re-redshirts I'm tempted to buy my 1st ebook.
 
@sbi Tempting! :)
 
@sbi DVDs? Are you serious?
 
sbi
@rubenvb You may guess three times.
 
@sbi I feel like I'm walking into a trap... I say: yes!
There's blu ray extended editions you know.
 
sbi
@rubenvb I considered buying a BD drive several times, but so far I failed to see the necessity.
@ScarletAmaranth Redshirts?
 
12:25 PM
@sbi The extended cut edition :P Redshirts is a definite nono for me :)
 
sbi
@rubenvb I'd reveal the answer, if I knew what the question was. Really, my suggestion certainly was not serious, but that there is a 6 DVD edition I was serious about.
@ScarletAmaranth Because it's not a movie? Because you hate John Scalzi? Because you never buy ebooks?
 
@sbi I never read novels :)
 
sbi
@ScarletAmaranth LotR is a novel.
 
@sbi I've never read LotR :)
 
sbi
@ScarletAmaranth That's one thing I demand from those of my kids still young enough to ask me about watching a movie: If there's a book the movie is based on, they will have to read the book first.
 
12:30 PM
@sbi well, I can understand that. My brother has a PS3, so that solved that dilemma here :)
 
@sbi I don't think there's anything inherently wrong about not reading novels :)
 
sbi
@ScarletAmaranth I do.
 
@sbi Got any reasoning behind it or you just reckon novels should be read :) ?
 
Fuck it. I'm going to start over from scratch.
Writing bug trackers is difficult.
web.xml y u no present!
 
sbi
@ScarletAmaranth Books do so much more for your mind and imagination than movies. If you watch the movie first, you will always see the movie scenes when you later read book and you will limit yourself to the director's/scriptor's interpretation of the story. That's something I want to avoid for me and for my kids.
 
12:38 PM
@sbi Fair enough :)
 
sbi
@RadekdaknokSlupik Have you talked to your mother about that yet? Giving birth isn't the easiest task women face, and she might not be willing to do that again for you, now that she's so much older.
 
@sbi I was talking about my project, not my life. :)
 
sbi
@RadekdaknokSlupik Oh. Well, you jumped in here stating you're going to start all over. How was I to assume anything but "all over"?
 
For the first time in my life I'm actually happy that I got an XML configuration file to be present. Man that took long to find it.
 
Youtube, Facebook and Twitter will join together and form YouTwitFace.
 
12:46 PM
> INFO: Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@12cc6d9: defining beans []; root of factory hierarchy
 
"destroying singletons"
 
Ell
hmmm wstring -> string
 
std::stringstream ss; ss << somewstring;
 
user784668
@RadekdaknokSlupik "XML configuration file" lol
 
12:47 PM
boost::lexical_cast<std::string>(somewstring)
 
Ell
no wait... I need string -> wstring
 
sbi
@Ell struct {int string;} *wstring;
 
boost::lexical_cast<std::wstring>(somestring)? Not sure if that works though.
 
Ell
11
Q: c++ : How to convert wstring into string?

BЈовићThe question is how to convert wstring to string? I have next example : #include <string> #include <iostream> int main() { std::wstring ws = L"Hello"; std::string s( ws.begin(), ws.end() ); //std::cout <<"std::string = "<<s<<std::endl; std::wcou...

I have to setlocale and shiz
 
std::wstringstream wss; wss << somestring; std::wstring str = wss.str();
 
Ell
12:51 PM
wstringstream wss;
string filename;
node >> filename;
wss << filename;
wstring wfilename = wss.str();

cannot bind ‘std::basic_ostream<wchar_t>’ lvalue to ‘std::basic_ostream<wchar_t>&&’
 
sbi
@Ell Assuming you are referring to the conversion between std::string and std::wstring: You got it wrong. Really. Those are only containers for fancy integers (char is nothing but a fancy integer). The question is which encoding the strings kept in those containers are encoded with. What's in your std::string and what do you expect in std::wstring? ASCII to UTF-whatever? ==> std::wstring ws(str.begin(), str.end()). Anything else? It's more complicated.
 
^that
 
user784668
Don't bother with std::wstring. UTF-8 in std::string is enough quite often.
 
Ell
I have no choice :/
 
if you're on Windows you can use multibytetowidechar
if not then you'll need to use the codecvt stuff
 
Ell
12:53 PM
I only expect ascii... or whatever the english uses, with no fancy characters, but the library I'm using uses wstring's
 
sbi
@Fanael I once was in a big project where that was the approach taken. The end result was that an incredible amount of UTF-8 strings leaked into the GUI. We fixed literally hundreds of such bugs, and there was no end to the constant stream of reports coming in. In the end we went to UTF-16 for Unicode, and the compiler found all those bugs where we forgot to convert.
 
well, actually, the conversion from ASCII to UTF-16/32 is really just an integer conversion IIANM.
 
sbi
@Ell What encoding does the library expect that std::wstring to hold??
 
Ell
erm I'm not sure :S
 
user784668
@sbi APIs that use UTF-16 are a great example why UTF-8 in std::string is enough quite often, not always.
 
sbi
12:56 PM
@Ell What system are you on? What library is that?
 
Ell
when passing filenames you can just go L"/filename.png" - thats ascii right?
erm its gosu(libgosu.org) and I'm on linux
 
sbi
@Ell No, it's a compiler-specific encoding. Usually UTF-16 (Windows) or UTF-32 (Unix).
 
Ell
oh, I'm using gcc 4.6.3
 
sbi
@Ell So it's probably UTF-32. (What's sizeof(wchar_t)?)
 
Ell
I'll check
 
sbi
12:58 PM
@Ell UTF-32 then, I think.
 
@sbi make that OS/platform specific. Windows OS APIs expect 16-bit wchar_t's
 
Ell
sizeof(wchar_t) is 4
 
sbi
Most encoding agree on the first 128 characters, so if you have only such values, you should be fine doing std::wstring ws(str.begin(), str.end()).
@Ell As I suspected, it's UTF-32.
 
14
A: Convert between string, u16string & u32string

bames53@RaphaelR mbstowcs and wcstombs don't necessarily convert to UTF-16 or UTF-32, they convert to wchar_t and whatever encoding the platform declares for wchar_t. Windows uses a two byte wchar_t and UTF-16 as the encoding, but the other major platforms and many obscure ones use a 4-byte wchar_t with...

^ seems Microsoft implements std::codecvt and wstring_convert
 
1:01 PM
@sehe since MSVC 2010.
and also note that UNIX locale naming is different from Microsoft's. Radically.
 
"Wish I was an English muffin"
 
sbi
@rubenvb Is there a requirement that you must be able to pass the result of L"blah" to some Windows API function? And aren't those defined as using unsigned short as UTF-16 char anyway?
@EtiennedeMartel You are a French baguette, though.
 
user784668
@sbi typedef wchar_t WCHAR;
 
@sbi no, but when using the wide versions of the APIs, they only work right if the string is UTF-16.
 
sbi
@Fanael Yeah, but that's likely within some #if.
 
1:06 PM
@sbi why is that likely?
 
user784668
@rubenvb Header guards :P
 
sbi
@rubenvb Shrug. What they want is contiguous chunks of memory where characters are supposed to occupy 16bit each. Pardon me nitpicking, but I consider this important. This could be served by unsigned int* or std::basic_string<unsigned int>.
 
huh...I got a "talkative" badge...16 hours ago. If only I had a clue what I was talking about 16 hours ago...
 
@sbi I'll take that as a compliment.
 
user784668
@sbi But they defined the ABI, and according to it, wchar_t is 16-bit.
 
sbi
1:08 PM
@rubenvb First and foremost for historical reasons. But also, because not all compilers might even provide wchar_t. (What about those for embedded Windows?)
@Fanael But did they? (That's an honest question, BTW.)
 
@sbi what does the C++ representation have to do with the encoding?
 
sbi
@rubenvb That's exactly my question!
 
I'm lost in this discussion.
 
sbi
@EtiennedeMartel I strongly prefer German rye rolls.
 
I gather it's something to do with strings :)
@sbi I just ate, and you're making me hungry again :(
 
1:10 PM
@sbi I had to Google that. Now I'm hungry.
Damn youuuuu.
 
user784668
@sbi I'm pretty sure they did, but I can't find the 32-bit one ATM.
 
sbi
@rubenvb I try to reiterate my point: I think that, what character size and encoding L"blah" has is determined by the compiler, not some platform's API. There could be a Windows compiler that makes this UTF-32. You would then have to convert it in order to pass it to a Windows API function. (Note that I am not saying that this is likely, but I suspect it to be legal.) ICBWT.
 
LPTSTR (sp?) are so much fun :)
 
user784668
@sbi Technically it's also legal to create a Windows compiler that has 42-bit ints.
 
@sbi oh in that respect. I wouldn't call such a compiler a Windows compiler though. I suspect Cygwin might so funny stuff here (or wanted to at one point for glibc compatibility)
 
Ell
1:13 PM
"unknown error". Useful.
 
sbi
@EtiennedeMartel I didn't think you would have to google that. I made up the term on the spot. I just strongly prefer sourdough to yeast dough.
@rubenvb I would admit to Cygwin being their own platform. :)
 
@sbi I know wchar_t is 2 bytes wide for MSVC and 4 bytes wide on GCC.
 
@Ell "Error: no error" is a nice one, too
 
sbi
@Fanael Yep. That's why I would say that sizeof(int) is determined by the compiler, not by the platform. I said the same about L"blah", and was corrected.
 
@EtiennedeMartel wrong. GCC targetting *-*-mingw* conforms to Windows specs.
 
user784668
1:15 PM
@EtiennedeMartel It's two bytes wide on GCC on Windows.
 
sbi
@EtiennedeMartel What about GCC targeting Windows?
 
Well.
That'll teach me assuming that GCC is the same everywhere.
 
GCC is a chameleon.
It ate so many bugs it's bloated these days.
 
It's got funny eyes.
 
sbi
@rubenvb You mean it can look into two completely different directions at the same time, and has an incredibly fast tongue to snatch bugs with?
 
user784668
1:17 PM
@sbi But since the compiler writers want their products to be actually usable, no such compiler will ever exist, because 42-bit ints are very unlikely to conform to any ABI.
 
Does this guy make any sense to you?
You haven't seem to understand my question. Here, if we instrument every load and store of thread 1 and 2, we would indeed see that T2 and T1 are writing to the same variable and thus detect a write/write violation. What is so difficult in this example? I'm OK with false positives too. I rather have a false positive than a race condition go undetected. I don't require a consecutive read write, I think having a read/write even separated by instructions is fine, to say its a race condition. We can ignore the parts of the code inside the locks. I think what I'm talking about is a viable approach. — user1018562 2 hours ago
 
@Pubby isn't that what helgrind does?
 
user784668
@sbi So in theory it's determined by the compiler, while in practice it's determined by the platform.
 
sbi
@Fanael Yes, of course it's unlikely. However, I was nitpickingly corrected, and it feels unfair to be accused of nitpicking when I'm defending against that now.
 
@awoodland I don't know for sure but I think so.
 
sbi
1:20 PM
@Pubby It's a userXXXXX account. I have learned to be wary of those.
 
Is there any reason to choose SHA-512 above SHA-256 for checking files for corruption? Maybe one of them is better for very small files?
 
user784668
@links77 I'd rather ask if there's any reason to choose SHA-256 over SHA-512.
 
sbi
@links77 Twice the length of the hash key means vastly decreasing the number of potential collisions, no?
(Not that this is a relevant number anyway.)
 
user784668
@sbi Half the number? If you increase the length by a single bit, then you get half the number of potential collisions.
 
sbi
@Fanael Um. Yeah. Blush.
 
1:24 PM
Ouuuh.
 
and today @sbi was out`b`itted
 
How do I change my username?
 
crappy markdown crap
 
into something that doesn't suck
 
On your user profile.
 
1:24 PM
Go to your profile, and click "Edit" on the top right corner.
 
sbi
@user1435323 Click "Edit" here.
 
Ah don't know how I missed that
 
And fill that profile with crazy goodness.
 
sbi
Sigh.
 
2
Q: Temporary objects - when are they created, how do you recognise them in code?

paleywienerIn Eckel, Vol 1, pg:367 //: C08:ConstReturnValues.cpp // Constant return by value // Result cannot be used as an lvalue class X { int i; public: X(int ii = 0); void modify(); }; X::X(int ii) { i = ii; } void X::modify() { i++; } X f5() { return X(); } const X f6() { return X()...

 
1:25 PM
Had been trying Network Profile
 
this question is not uninteresting
 
@sbi Come on, man, no need for that
 
Don't mind him, he's the Grumpy Old Ape.
 
sbi
@user1435323 What?
I was sighing because again everybody else was so much faster than I was.
 
Sloooow @sbi.
 
1:26 PM
My mistake, then, sorry
 
@sbi get a monkey keyboard. Maybe that'll help.
 
slow ape :P
 
user784668
Primates are overrated, replace them with robots.
 
@Fanael We'd have so many more TVTropes.
 
sbi
@Fanael Robots are overrated. I want to see you having fun in bed with a female robot.
 
1:28 PM
Oh man. TV Tropes.
Anyone else a regular?
 
user784668
@sbi lol, good point.
 
sbi
@user1435323 The robot is.
 
@user1435323 @RMartinhoFernandes lives there.
 
sbi
You are so slow! :b
 
user784668
@sbi But this is SO. Robots would do, no need for all these slow primates.
 
1:29 PM
Hehe
 
@Fanael there's only one slow primate.
 
I'm a fan of the Thirty Xanatos Pileup myself
 
user784668
@rubenvb All primates are slow, but some are slower than others.
2
 
Old primates are even slower.
 
Is there a way to manually sync or do I just wait for the site to do it (updating username)
I changed it on SO but nothing on the chat end
 
1:31 PM
I think you just wait for the site.
 
And then we have explicitely slow old primates which are even slower than their old, and thus already slow, friends.
 
I'm a regular
 
sbi
@EtiennedeMartel Which totally does not apply to robots, of course...
 
@user1435323 try refreshing the chat
 
1:31 PM
You could try rejoining.
 
Nothing yet. It's a cool name, too. :P
 
sbi
@TonyTheLion Are you talking about porntube?
 
@sbi We can repair them ad infinitum. You can't do that with primates.
 
@sbi no, that's my other tab :P
 
sbi
@user1435323 I disagree.
 
1:32 PM
What are some ways to model a container whose elements are dependent on each other? I don't want to allow elements to depend on elements from different containers, and I don't want elements to rely on their dependencies being at given indices.
 
sbi
@EtiennedeMartel Yeah, of course this is going to help. You have been repairing your computer for a decade now, and it does not feel slow, after all, right?
 
@sbi You haven't even seen it yet ;P
Then again "user1453..." is pretty hot.
 
sbi
@user1435323 Why shouldn't I? Do you think I'm blind?
 
@user1435323 It's not that hard to click through to your profile.
 
@Maxpm you mean there are intra-container relationships but not inter-container ones?
 
1:34 PM
@awoodland Yes.
 
sbi
@Maxpm When I had to do that, I put them into maps, with some ID as key, and had them refer to each other by their ID.
 
Clearly nobody here is a Princess Bride fan D:
I thought we had TVTropes fans here XD
 
user784668
But robots can be slow, too:
 
user784668
Aug 1 '11 at 11:24, by Martinho Fernandes
Ah, sorry I'm a bit slow.
 
@sbi No, because I'm lazy. But it's slow because apps are getting more demanding.
 
1:35 PM
@Maxpm can you store the elements and a reference count for each of them in the container then? e.g. myvector<foo> stores N foos and N ints?
 
sbi
@EtiennedeMartel And, of course, this totally wouldn't happen to robots, right?
Man, are you being obtuse today, or are you really that thick?
 
@user1435323 I liked Princess Bride, but the main thing I remember is the ambigram on the DVD box!
 
Damn it, you're impossible to troll.
 
that's just amazing design work
 
user784668
Trollproof ape is trollproof.
 
user784668
1:38 PM
Oh, the robot.
 
Nobody is trollproof, except for maybe the trolololol guy... who just died recently. :(
 
@sbi Shut up, robots are awesome.
2
 
Yet another failed exam. I'ma play HoN :<
 
@Cicada What kind of exam (what course)?
 
Computer architecture.
Basically, connect electrical components together
 
1:41 PM
Ooh, fun.
 
Buses, processors, ram modules and stuff
Fuck.
 
The architecture class at my college was one of the hardest courses.
 
That's one of the easiest
 
What's HoN?
@sbi See, told ya following @scalzi was worth it.
 
@RMartinhoFernandes Heroes of Newerth
Basically, a DotA clone, which means it's got an incredibly immature and annoying user base.
 
1:43 PM
Ah.
 
woah, the ape is trollproof?!!
 
@sbi Well, in my case, it's not so much "depend" as "point to." Some background: Compiled Java .class files contain a section called the "constant pool." It contains things like class names and string literals. Each constant is prefixed with a tag byte, which identifies its type, plus type-specific data. Within this data, some types of constants reference each other. For example, a class name constant contains an index to a string constant.
 
I never could understand why people play DotA
 
interesting way to keep your system cool :P
 
@TonyTheLion Cool and stylish
 
1:44 PM
lol
 
My hope is to make a system that doesn't break down when the ordering of constants changes, or a constant is removed. Or maybe base it on an unordered container, where indices don't make sense.
 
I always had fun playing DotA at LAN parties. Small group of friends, someone's basement, lots of yelling. It's good for that. I've tried DotA2, LoL, got bored super fast.
 
Not to mention modular and easily extended.
 
@SamDeHaan The yelling is the best part.
 
@RMartinhoFernandes Definitely.
 
1:46 PM
the trouble is teamspeak makes yelling across the world so easy
 
Every DotA LAN party that DeadMG attends contains way too much donkey cock.
 
man, I had the strangest dream last night, about integer factorization.
6
 
But it's not the same if you can't see their faces
 
I tried playing LoL. Got in a "noob game", got yelled at by my own teammates for being a noob, stopped playing. Fuck 'em.
 
why the actual fuck?
 
1:47 PM
@DomagojPandža Erm.
 
Never team up with people you can't slap across the face.
 
@TonyTheLion You're lucky, mine was disgusting.
 
@DomagojPandža He can do what he wants with said cocks.
I'm not going to judge him.
 
@DomagojPandža well yea, but what the actual fuck, dreaming about math??? I mean, it doesn't get much nerdier than that? LOL
 
Would it be weird for the container to work like Gentoo's emerge, where explicitly-added items are "favorites" and are not ever removed automatically, and other items are automatically removed when their dependents are?
 
1:49 PM
Maths are cool.
 
until it comes into your dreams
 
JSP y u no master pages.
 
I had a bad dream a few months back, it was way too real. I was aboard a space station of sorts and had to avert a reactor breach. But the damn problem was freefalling. I just couldn't navigate where I wanted to. It's funny that you only wake up in such dreams when you die.
Makes you wonder was it an another life. Ahahah
 
@sehe I'm not saying you should copy the code, just the algorithm. — Joni Salonen 2 hours ago
mmmm dunno what to think about that ^
He's probably right. But it feels wrong stating it like that
 
@DomagojPandža Wait, you're saying that physics worked in your dream?
Why am I the only one stuck with impossible crazy dreamscapes?
 
1:52 PM
Because you take waaaayyy too much LSD.
 
@RMartinhoFernandes You assume too much
 
I rarely remember my dreams.
sad_life.jpg
 
Yeah, you lose them in a few minutes if they're not really intense.
 
@EtiennedeMartel cheerup.jpg
 
1:53 PM
In my dreams things always have the wrong size.
 
@RMartinhoFernandes That must make your fembot sad.
 
And gravity increases tenfold if I'm not actually on "solid" ground.
 
Imagine taking control of dreams with a computer interface which actually can feed data into it. Proper data, not the usual nonsense. And linking up with other people in a fantasy world.
 
@RMartinhoFernandes So you're well endowed in your dreams?
 
@EtiennedeMartel actually mostly, I don't remember mine either, but this one was just too weird to not remember
 
1:56 PM
hehe
 
@DomagojPandža no, that would be scary
 
lol
image not found
but you can click it and you see it
 
You have a chicken on your crotch?
 
a chicken crotch
dafuq?
 
1:58 PM
One of the most terrifying dreams I've had to date was being stuck in a dream. I remember thinking how awful it would be to get stuck in a dream, with no chance of waking up. And my scumbag brain thought that would be awesome.
Being aware that you're in a dream, but unable to wake up. Holy crap, I hate my brain.
 
@DomagojPandža inception
 
how to get a unsigned char * buffer using malloc ?
to get char * we do (char *) malloc ( 100 );
 
I once dreamt I got a million dollars, I didn't want to wake up from that, but unfortunately I did :(
 
@TonyTheLion "We do hope that the censors won't be offended by this image of a massive cock."
 
@Abhishek You don't. Use vector<unsigned char>.
 
1:59 PM
@EtiennedeMartel i am a C++ newbie.. kinda explanation would help.
 
@Abhishek unsigned char* ch = (unsigned char*) malloc(100);
 
Finaaaaaaaaaaaaaaaaally done with English exams.
 

« first day (598 days earlier)      last day (4342 days later) »