« first day (967 days earlier)      last day (3997 days later) » 

6:28 PM
@ScottW you didn't just advertise an adblocker.
@ScottW Let's take this outside.
Bazinga!
let's go with the former.
 
Ken
Anyone here has experience combining C++ code with C#?
 
Ell
no
I tried once but failed
 
@Ken you mean C++/CLI or whatever it's called?
 
Ell
6:32 PM
I know a teeny bit about pinning pointers
 
Ken
Native C++. I can wrap it in C++/CLI but that's quite hellish for my taste.
 
Why not C interface it?
Note: the answer to your question is "Nope, sorry".
 
Ken
@rubenvb C interface is causing sooo many problems.
Especially with strings.
It's like: I'm passing a string from C/C++ to C# and all I get in C# is gibberish.
Random too.
Okay, please bear with my ignorance: why the hell not? T_T
It kinda make sense that if the char-sets are the same it should work.
Oh I forgot about encoding (probably because I barely know what that is :S )
Okay so to marshal it I have to use C++/CLI, huh?
Oh sweet.
 
@Ken 1. C/C++ does not exist. 2. you're probably doing something wrong ;-)
 
marshal googling
wait wut
1. Use C++ 2. Do it wrong 3. ???? 4. UB
 
Ken
6:39 PM
1. I meant native. 2. Indeed
BTW I Googled Marshaling like 50 times but it was never clear enough for me :S but I'll try again.
 
user457812
Encoding issues are fun.
 
user457812
I like watching people deal with them without knowing what they are.
 
Just use C++/CLI.
 
Ken
@ScottW If it works I'm running you mayor.
 
@nil You have a strange definition of fun
 
user457812
6:40 PM
my string is coming out short wat do
 
get a longer piece of string?
 
user457812
I should say schadenfreude is fun, rather
 
Want to bet he's using an 8-bit string and reading it as a 16-bit string?
This is pure magic balling.
 
Ken
Oh I have a question but I'm pretty sure I know the answer: There's no way to expose native interface to C# right? (i.e. having a vector in my C++ class and calling push_back from C#).
 
Wrap it in C++/CLI. But it's simpler to just use a System.Collections.Generic.List.
2 days ago, by R. Martinho Fernandes
-5
Q: How to convert Unicode consortium to unicode use PHP

user33855beginner always have a question stupid (Sorry that ^^). Please help me!. How to convert Unicode consortium to unicode use PHP.

Bestest ever.
 
Ken
6:42 PM
@ScottW Marshalling will expose the entire interface? I want to avoid re-typing signatures. If it's a huge class it's just a long journey of copy-paste that weren't meant for humans.
 
user457812
a scanner darkly, a question stupidly, a string unicodely
 
Pick a language, stick with it.
 
Ken
So I guess that can't be done, right?
Just copy-paste?
@ScottW Okay, I figured so.
@ScottW What is?
 
The only way to avoid that is to live in a different universe.
@ScottW tI think so.
 
Ell
I want to contribute to a lounge project now
 
Ken
6:46 PM
A universe with unity between native & managed is Ken's kind of universe hehe.
I have one last question about this C++ to C# thing: What would be the fastest way? C++/CLI, C interface, other?
 
Thank everyone, whether or not answer my question. :) Thanks you again. — user33855 2 days ago
WTF?
 
Ken
@ScottW Runtime.
 
@StackedCrooked what C++ lib does Clang use on Coliru?
 
Ken
Do you think this would make an appropriate question? :S
 
I'd say using C++/CLI is probably the fastest to get working, so you can start profiling it sooner, and so you can know if it is fast enough fastest.
 
Ken
6:51 PM
Oh okay, wonderful.
Thanks a bunch for your help guys ^^.
I'll give it anohter go and hope for success.
@ScottW Yes, you're absolutely right..
Well, measuring it is.
 
how can a braced init list default construction work on one platform but not the other?
Clang doesn't want to compile some code on Windows, but the exact same code works fine anywhere else, with the same Clang and libstdc++ version :/
 
ah but what is the code
 
ah wait, it fails everywhere
I think litb gave me the OK on this usage.
GCC 4.7+ accept it.
MSVC is untestable.
Intel too, as long as screwy liveworkspace is out.
 
That's terrible anyway.
Might as well call the class dangling_reference_holder instead.
 
explicit unordered_set(size_type n = implementation-defined,
const hasher& hf = hasher(),
const key_equal& eql = key_equal(),
const allocator_type& a = allocator_type());
 
6:59 PM
@R.MartinhoFernandes uh, no?
You can pass temporaries to const refs
Their lifetime is extended to the lifetime of the const ref
 
Well yeah.
@rubenvb lol
 
@rubenvb The lifetime of the const ref is the ctor.
const refs are not magically-garbage-collecting-refs.
 
Quick collection question.
 
Too slow. Next.
 
I have some types - enumerated values, basically, a player can be.
haha
Anyway, before, I had searched for their name in a list of names for each types.
Every time. Very inefficient.
So, I made this enum.
But I am wondering how to... add it.
 
7:05 PM
6
A: Uniform initializer used in default argument to const reference

Johannes Schaub - litbIt is valid in C++0x, but it was a very late addition to the working paper that Bjarne put through. So it's not surprising that GCC doesn't support brace default arguments yet.

 
Would hashmaps be faster than going through my list for this kind of thing?
 
Granted, that is not an "it's ok" or at all relevant.
but I remembered litb saying something about this to me.
Guess there was no class in question there.
 
aghhh.... enums can't be just integers can they
 
they cannot?
 
ie, 'keys::3'
 
7:07 PM
Oh.
Anyway, I was trying to come up with a way.
Where I could get the value of a player.
Without searching for them in a list somehow.
 
@thecoshman lolwut
 
@Pawnguy7 What value?
 
@R.MartinhoFernandes can you have enum class Keys { 1, 2, 3} I thought not...
 
There.
Now to fix my code.
 
@thecoshman Well .. yeah, you have to give each one of the values a name, right?
 
7:10 PM
Well.
It is sort of like this.
 
@Tuntuni those are the names...
 
I would basically want the player to have a property.
 
@thecoshman Names cannot start with a number.
 
A type. That they are. An enum value.
 
I also think the reason this worked in my code is because I wasn't storing a reference but a value, so in the constructor, the temporary was copied and all is OK.
 
7:11 PM
@rubenvb Yeah that's not even the beginning of the lifetime issue.
 
Clang is still wrong.
 
@Pawnguy7 Like TYPE_MAGE or TYPE_WARRIOR for example?
 
Close enough.
 
So, why do you have to search for it?
 
Now, in this example, I cannot extend or add to the player class.
 
7:12 PM
Oh.
 
Thats my issue :\
 
@StackedCrooked Never mind the previous question. But libc++ does not work on Coliru: coliru.stacked-crooked.com/…
 
@Pawnguy7 Does the Player class have a unique identifier of some sort?
 
Um...
 
Damn compilers suck.
 
7:14 PM
@rubenvb Can't get it working for some reason.
 
Ell
@tuntuni memory address :3
 
Maybe you could make a map with the key being the Player's ID and then value being the Player's type.
@Ell lol :C
 
Ell
Non owning pointer
 
@StackedCrooked It seems like it's not linking in libld.
 
@Tuntuni my initial id was using their name as a key. Would integers be significantly faster? Any better approach?
 
7:17 PM
@Pawnguy7 Right now this is the only thing I can think of - instead of searching through a list of possible types just use their ID as an index to a map which has their type as a value. I guess integers would be slightly faster, but as always, you'll have to profile.
 
Ok. I will try that.
 
How come you can't edit the Player class?
 
Well.
I can extend it.
But that sounds messy.
 
What language?
C++?
 
Java :\
I am so sorry for my crimes against humanity :(
 
7:20 PM
Ahaha
Well sucks.
 
Why is it that to use anything in java, the idea is to extend it? Sigh. I hate the feeling.
Anywho.
 
@R.MartinhoFernandes I think I am about to get into a world of fun looking at keyboard input... hopefully not as painful as unicode
 
brb
 
Ell
@pawn guy was was wrong with a regular vector?
 
Well, I searched through the list every type I needed to know.
I was hoping to make it so I just set it, and know what I set it too, rather than checking back
 
7:22 PM
Anyone happen to know why my close vote isn't seemingly registering? At the time I closed it, it was basically an exact dupe of a question asked a little while prior. i.imgur.com/6dtkqSJ.png
 
Not at the moment. I still need to finish that project, but like normal, I just really have a hard time doing it.
 
ok... so you have numpad keys... then you have the numbers above the letters... what would you call that group of numbers?
 
"number row"? Not sure, to be honest.
typeonline.com seems to call it the same.
If you like the sound of it, anyway.
 
yeah, but I don't want KeyCode::numberrow1 etc...
I guess I could spell out the numbers, KeyCode::One, KeyCode::Two etc.
 
Ell
Why not 1?
 
7:31 PM
you can't have an enum value named '1'
just like you can't have a variable '1'
 
Ah.
 
How about Num0 through Num9 and Numpad0 through Numpad9?
 
Haha.
I was about to say that.
I checked SFML, and that is how it is done there.
 
o_0 why not indeed
 
It's a lot easier when you have a prefix and can use something like VK_0 I guess.
 
7:34 PM
What scott?
 
XNA is obsolete
 
I know.
But finishing projects is finishing projects.
 
fishing projects are fishing projects
 
nah, port to something else
 
It's too bad XNA is obsolete. What exactly are you supposed to use now?
 
7:36 PM
Hm?
 
@chris probably unity
@ScottW too low level compared to XNA
 
I feel like giving up on it - I have no desire for either XNA or the game itself - but I feel like that is contradictory to the initial goal of the project: to finish a project.
 
Fair enough, I'm still stuck on D3D9 and that's with C++. I plan on going through it in more detail and following up with 11 and maybe 10 this Summer.
 
you know what really strange, X11 does not give a continuous run of numbers for the number keys... it did for the letter keys, they actually matched up with ascii
 
@chris go with 11
 
7:39 PM
@melak47 Yeah, I plan to. I'd like to at least finish some more 9 first, though, since I really only have any experience with it. I know I've tried learning a bit of 11 and I think I ran into problems with getting the HLSL to work.
Not to mention I can use GCC with 9.
 
move to OpenGL :P
embrace the cross platform
 
you can target dx9 hardware with 11, but you won't have to learn an obsolete api :p
 
But Windows XP!
 
what do you think scott?
 
can someone tell me what -fexec-charset preprocessor option is useful for ? if I change it to anything other than UTF-8 it doesn't work
 
7:47 PM
Hi ya Friends, Do u think extensive use of wchar_t(widestring vs string) in Windows will effect on performance
 
...
Ask a different question.
 
gtfo is the only answer to that. hth.
 
is there some odd behaviour with inheriting operator() in a struct? I don't seem to be able to get the derived struct to compile unless it explicitly has an operator() for each type in the variant
god damn variants, so nice yet such a pain in the arse
 
May 29 at 13:26, by thecoshman
New here? Why not spare some heartache and read the newbie hints.
 
@thecoshman They will hide each other.
14
A: using declaration in variadic template

lurscherOk i found out a pretty decent solution: basically i need to unpack one extra lambda case and apply the using clause to the unpacked lambda and the rest, but in this case, since i apparently i cannot make a variadic list of using declarations (at least i don't know the syntax, if its possible), ...

 
7:55 PM
hey guys i created dll but i can compile it :(( using vs12 geting error: error C1083: Cannot open source file: '=0x0401': No such file or directory
do no what to do any suggestion?
 
Ha, no.
About giving up on asteroids.
 
May 29 at 13:26, by thecoshman
New here? Why not spare some heartache and read the newbie hints.
 
@R.MartinhoFernandes who will hide what? the base struct has a virtual void operator()(const foo& T)const{} the derived wished to make use of this, but the compiler is saying that there is no conversion in the derived.
 
OK, I got a way to get Clang to work with GCC 4.8 libstdc++. At least in a very basic way.
 
Yes.
I think my problem is twofold.
First is that.
The second is, lack of planning and actually thinking about what I am doing.
I seem to inheriently... have a very hard time thinking thinngs through,rather than just doing it.
How can I stop myselv? :\
 

« first day (967 days earlier)      last day (3997 days later) »