« first day (801 days earlier)      last day (4146 days later) » 

Xeo
12:00 AM
2 mins ago, by Xeo
&str[0] is the correct way to get char*.
Tell me I'm slow again.
 
I was writing it while you were chatting about it
 
Xeo
Pff.
 
so I was faster with the real answer
 
Xeo
Anyways, I didn't even consider actually answering that question.
He can use fucking SO search or google.
 
Wow.
So many apps don't honor a Locale change.
 
12:01 AM
People still upvoting that c_str one
 
char* != const char*. — DeadMG 37 secs ago
 
Doesn't &str[0] crash if .capacity() < 1 ?
 
Why did he say that to ruben's answer?
 
It's UB
Well, no wait, it's not
Probably
You can take an address of one-past-end, you can't dereference it though
@DeadMG Read the OP you scrub
 
The Cat liked "scrub"
 
Xeo
12:03 AM
I think it's officially UB.
 
he says "I need to convert std::string to char*".
 
Yeah, not const char*
 
MOTHER FUCKER
WHAT IS WRONG WITH WINDOWS
 
Plenty
 
It HATES UNICODE.
 
12:03 AM
tthat being my point
huh
 
WHHHYHYHYHYHYHYHY?!
 
on reflection, maybe I just commented on the wrong answer.
 
The answer is about char*
 
Evening muffins
 
Table-flip.
 
Xeo
12:03 AM
@DeadMG You suck.
 
You suck
 
ohh, I can insult puppy.
@DeadMG you suck.
 
Xeo
@TonyTheLion We didn't talk about that one topic that always gets you here, so you have no permission to stay. :P
 
lol
you better start then
 
gtfo
 
12:04 AM
I'm hungry for brownies.
 
@Xeo I can cover for him: Tits.
 
I don't suck
 
no, you don't, you just failed to answer correctly
 
I'm playing Starcraft on the other screen and it necessitates some of my attention
@TonyTheLion Comment, scrub. You suck.
 
@Rapptz I made funfetti a moment ago. ^-^
 
Xeo
12:05 AM
I call bullshit.
 
Why are we talking about clothing?
 
why are all "deluxe editions" digital these days?
 
12:06 AM
Scrubs are the shirts and trousers or gowns worn by nurses (perioperative nurse), surgeons, and other operating room personnel when "scrubbing in" for surgery. In the United Kingdom, they are sometimes known as Theatre Blues. They are designed to be simple with minimal places for dirt to hide, easy to launder, and cheap to replace if damaged or stained irreparably. The wearing of scrubs has been extended outside of surgery in many hospitals. Originally issued as replacement clothing if street clothing was contaminated, scrubs are now worn by any hospital personnel in any clean envir...
 
Ell
Whoop de dooo yet another christmas equally depressing as the last
 
I really enjoyed the GW expansions deluxe editions
 
notice game timer in bottom left corner
 
Xeo
@DeadMG Fake, if you were actually playing, you wouldn't have time for making screenshots and chatting.
 
what custom map am I playing?
don't know?
pro tip: quite a few of them do not have the same attention demands as ladder
 
Xeo
12:08 AM
-2
A: Converting from std::string to char * in C++

Ryan GuthrieThe string class provides a c_str() function which returns a const char* to the internal data structure. If you don't plan on modifying the data, it is the way to go: http://en.cppreference.com/w/cpp/string/basic_string/c_str However, if you need a char*, then: char *newString = new char[origSt...

This answer just got worse, ahahaha.
 
Xeo
@ThePhD L"..." != Unicode.
 
I convert it to Unicode.
 
That image will not load
 
The L"" is just because there's no 'u' literal.
 
user142019
12:09 AM
Hmm.
 
At least in MSVC.
 
MSVC might be smart enough to get it right.
 
I, too, convert things to Unicode
With my magical powers
 
You can force GCC to get it right.
 
user142019
Clang already has an API to parse documentation comments. That makes writing my documentation generator easier by a factor quintillion. xD
 
Ell
12:10 AM
Isn't it already done? :P
Like, entirely? :P
 
heh, I didn't know that &str[0] returned a char* in a std::string
what one can learn at 1 am in the morning
 
But yeah, despite converting to Unicode, verifying its correct, and then ensuring to use CreateWindowW still doesn't make it come out right.
 
str.c_str().. — Mysticial 16 mins ago
@Mysticial doesn't know either it seems
 
why not just use CreateWindowA and not give a fuck about unicode in window titles :D
 
@TonyTheLion :)
 
12:12 AM
@melak47 BLasphemy.
 
What is std::remove_const for?
 
on the other hand, having Poo, pile of in the window title would be pretty dandy.
 
ahahahah another answer with copy just turned up
 
what do you mean "converting to unicode"
L"" is already UTF-16 for MSVC
 
@DeadMG Lies and slander.
Throws shit out the window.
 
12:14 AM
Throwing shit out the window probably isn't as easy as it sounds.
 
I pass the L"" string directly into CreateWindowExW, and it still does this (False Japanese Symbol)8^ shit
 
I'd imagine that it would probably break up in mid-air.
 
Yeah, talk about dirty hands.
 
show code
 
@Rapptz It removes const!
 
12:15 AM
hwnd = CreateWindowExW( WS_EX_ACCEPTFILES | WS_EX_TRANSPARENT | WS_EX_WINDOWEDGE,
				idapi, L"日常",
				WS_CLIPSIBLINGS | WS_CLIPCHILDREN,
				fullscreen ? 0 : x, fullscreen ? 0 : y,
				width,
				height,
				null, null, hinstance, null);
 
@LucDanton Yeah I.. figured. I just don't see why you would do it.
 
I think it just doesn't like me.
I downloaded the J-Language pack and even changed my locale.
Maybe it expects EUC-encoded characters?
Not UTF16?
EUC-jp, that is.
 
My variant<T...> stores RemoveConst<T>... (amongst other transformations actually), for conformance.
 
Maybe Window titles just can't be Unicode in the first place.
 
did you compile your application as Unicode?
could be that some of the creation logic tells Windows your app expects ASCII
 
12:19 AM
I'm compiling with Unicode (Use Unicode Character Set in Project Options).
and wchar_t is a native type as well.
 
I know that#
what's idapi?
 
It's a StringApi, which is a typedef (on this platform) of StringBase<Text::Encoding::UTF16TextEncoding>.
 
cpx
Oh, before I go to bed or if I would fall asleep.
I would like to say Merry Christmas!
 
@cpx And Happy Holidays to you too.
 
cpx
Thank you and you too.
And everyone.
 
12:22 AM
Sigh. Maybe I need a different font? Perhaps the font being used for the Windows doesn't support Unicode all that well?
 
well, since you're using a bunch of random Japanese characters, it seems logic to me
 
It means "Everyday"
 
... How do I change the fonts used in the entire Windows UI...
... Is it like part of the Windows Theme?
 
Gonna need to do registry hacking.
 
How's the source file encoded?
 
12:26 AM
It's Unicode-encoded because the characters don't fit on the 1252 codepage.
I believe UTF8
 
1252 is ANSI isn't it
oh misread.
 
Well do your compiler supports that encoding for L literals
 
He's using VS2012 I'm pretty sure
 
And VS is known for being terrible at everything
So
 
^ That.
 
12:27 AM
yeah but it's made by Windows so I assume it can handle that shit pretty decently
 
But I've verified the byte data is correct. I've had to write and use UNicode literals in my program and I've used them to even identify files with Japanese Characters in them - even files with the exact same characters that I'm trying to use for hte title.
So it's not like the API is too dumb to get it: I'm just wondering why the window title is displaying like garbage.
 
Pretty sure Microsoft Sans Serif supports Japanese characters so that definitely isn't your problem
 
@Rapptz aahahahah
 
decently != great
 
Most fonts don't support Japanese in any capacity
 
12:29 AM
I could do CreateFile and GetFileAttributes and all those other functions using L""-based literals and my own Unicode strings and it was able to identify all kinds of Chinese and Japanese filenames correctly.
 
My UI was fine :|
 
Maybe the Windows 8 default font is a piece of shit?
Man, I don't know.
Is there anything else I should tell Control Panel to do to prep for Japanese Characters?
 
You did Display Language and System Locale right
 
Yeah
 
that's all I know, the rest involve keyboard
0
Q: C++ Object Retaining?

MatoeI'm an Objective-C programmer, and am recently starting C++, and I've stumbled into this question on my code's organization: std::list<char *> stuff = std::list<char *>; thing *object = new thing(stuff); Where stuff would be an object that I'd need for the lifetime of my class (tha...

What
 
12:35 AM
I'm
not sure what that question
is all about...
 
In object-C i think you can tie lifetimes together
 
..... SO, in conclusion, CreateWindowExW sucks dick, and I'll just have to deal with shitty text names.
ASCII all the way, bitches.
 
CreateWindowExA is for Win1252
 
On the bright side, changing my locale has made a lot of things appear Japanese.
So now I'm learning new Japanese words
Like Today and Yesterday.
 
They're all in Katakana
lol
 
12:37 AM
And Kanji
 
I don't see Kanji on mine :(
 
Hey does anyone here have experience teaching programming to a class of total beginners?
 
FredOverflow, our resident super awesome metal freak, does.
 
Xeo
@ThePhD Really? The only program for me that actually changed its language was iTunes.
@ThePhD The ape does aswell, IIRC.
 
Why do you guys have Japanese Locale.
 
Xeo
12:38 AM
@Rapptz Most VNs don't work without it.
 
@Xeo Skype was very obedient. VS, not at all. Foobar, not at all either.... Chrome and Firefox didn't change either.
@Xeo Really?
I can play Visual Novels now?
 
@Xeo Ah right.
I switch between Korean to Japanese for games
They require you to be in their system locale
 
Well, since I have the Locale on, I might as well go try Katawa Shauji or whatever its called.
 
Xeo
You either use Japanese locale, or AppLocale to change the app for that "session" to Japanese locale, although AppLocale doesn't work for quite a good part of VNs.
@ThePhD Shoujo.
 
@cpx u2
 
12:40 AM
@sehe OH MY GOD IT'S SEHE Merry Christmas sehe!
I want to put a Christmas Hat on him, because Polar Bear.
2
 
xD I'm in hibernation
 
If he upvotes something in the next 20 minutes he gets a christmas hat
 
Doitdoitdoitdoitdoitodit
 
Oh wait, it already passed 40 minutes ago.
Never mind.
 
... Aww. :c
 
Xeo
12:41 AM
Yo polar bear, didn't get to catch Santa again this year on the way from his base out of the north pole? :P
 
Eh downloading Katawa is too much work. :c
Back to sulking about Unicode /wrist /wrist
 
@Xeo I'm no friggin' reindeer. And I ain't no drunkard. He can guide his own sleigh, tyvm
 
Xeo
"catch" as in "catch and rip to shreds, proceeding to dine on his innards afterwards"
 
My first gold badge :D
 
Oh. That. Not nutritious enough.
Did I mention I'm lazy?
 
12:43 AM
"You know what I want for Christmas, Santa?"
"Oho, what is it, dear child?"
"Your ENTRAILS."
Skype really has full-on Japanese support.
I'm impressed.
I now know how to say somebody went offline in Japanese. This is pretty awesome.
 
Xeo
lol
Easy Japanese support: Remap your latin alphabet to katakana.
 
Depends on how Skype implements their Japanese.
 
@sehe well if you're not going to catch him, I guess the bastard'll get away with it again this year
 
Xeo
And voila, English in Japanese!
 
@je4d Sorry about that. Damn candy poles distracting me again
 
12:46 AM
@sehe repeated breaking & entering, burglary, on a worldwide scale... I hope your conscience can handle that
 
user image
6
 
haha
 
"Hohoho motherfuckers"
 
Why is this not oneboxing
 
Xeo
12:48 AM
@sehe Doesn't exist.
 
@sehe "Sorry, that page doesn’t exist!"
 
Mkay. Apparently God had second thoughts :)
> And now if you'll excuse Me, I'd like to enjoy a silent night for once -- God
 
... Wat. Now my regular ASCII words won't make it to my WIndow title either, it's getting truncated.
Windows, I hate you. I hate you so much, Windows. =[
 
Oh I forgot to show you.
=D
 
Or: only one oneboxing on Boxing Day?
 
Xeo
12:51 AM
@Rapptz lol, Nyanners
 
@Rapptz The world is a terrible place to be. :c
 
Ell
Isn't there a windows API c++ wrapper somewhere?
 
@Xeo とてもかわいい。
3
@ThePhD Nah yo.
 
@sehe getting a bit ahead of yourself? that's 23h away
 
Xeo
@Rapptz lol
 
12:52 AM
@je4d I'm Dutch. I'm gleefully ignorant of UK holiday idiosyncrasies
 
@sehe at least here, boxing day == 26th
 
Ell
Christmas sucks so far
 
@Rapptz Hite ....
 
Ell
just like every other day
 
.... Hi te ... .... Fuck it, I still can't read Japanese.
Fuck my life, I need to study more.
 
Ell
12:53 AM
Every.other.day.
 
Xeo
@ThePhD Err... Totemokawaii.
 
Troll the ancient Christmas carol, heedless of the wind and weather
 
@ThePhD totemokawaii
 
@ThePhD Study my life
 
Xeo
I'm really glad I atleast know my Hiragana and Katakana.
 
12:54 AM
@Xeo Lucky you. :c
 
Xeo
With the Katakana, I can find my way through untranslated Japanese games' menus, atleast. :D
 
@sehe If you kill Santa, I will.
 
it's easier to type than Kanji
 
Xeo
Kanji... ;_;
 
Honestly Windows IME for Japanese is terrible lol
 
12:54 AM
Then I'll be the first person with an indepth Biography of Sehe: The Santa Slayer
 
If you meet Santa in the middle of the road, kill him.
That's Zen buddhism for you!
 
@Ell Christmas might suck less if you hadn't spent the only hour of it we've had so far in Lounge<C++>
 
....
... A... Ahahaha... Ahahahahahaha
It's all working now
:3c
Everything. Is. Working. Now. :3c
The titles, the everything.
 
@je4d He wasn't complaining. Nor does he anticipate it staying this way. He's just reporting the expected measurements across the first 60 minutes of it
 
what is :3c? it looks like a mouth with balls hanging over them
 
12:56 AM
It's scrotal-nose face, clearly.
 
@ThePhD You mean, "ThePhD" is actually working, as a title, now?
 
@sehe I wish. But no, CreateWindowExW and friends are... well. Actually behaving and working with Unicode.
The problem was my #define UNICODE was being obscured by an Apple define I had.
So... Even CreateWindowExW ... wasn't really doing Unicode.
 
@sehe "57 minutes gone. Still no santa."
 
@ThePhD Oh. Shame. I thought you donned your gay apparel (and that was your antler)
 
.... CLEARLY THIS IS ALL APPLE'S FAULT.
But, oh well. Unicode support, complete. Finally.
 
12:58 AM
@ThePhD #define Apple overpriced_bunk ?
 
@ThePhD in what app?
 
0
Q: CreateWindowEx failing

mrnoob1I'm following the NeHe gamedev tutorials (while altering them to be OO) and I've run into a problem with the CreateWindowEx demo (http://nehe.gamedev.net/tutorial/creating_an_opengl_window_(win32)/13001/). I'm trying to pass the WndProc a pointer to my Window object via the lpParam (as detailed ...

The coincidence!
 

« first day (801 days earlier)      last day (4146 days later) »