« first day (749 days earlier)      last day (4203 days later) » 

11:03 AM
Just quiet
 
Bjork (shhhhh sshhhhhh)
 
¬_¬ spelling mistake?
 
0
Q: The #include<iostream> exists, but I get an error: identifier "cout" is undefined. Why?

BushI learn C++ and COM through the books. In the IDE MS Visual Studio 2012 I have created new empty C++ project, and added some existing files to it. My CPP file contains #include<iostream> row, but in editor I got such messages: Error: identifier "cout" is undefined end Error: iden...

 
Holy shit, two image posts in one day?
 
11:06 AM
@thecoshman laziness is no mistake
 
@Pubby reminds me of this
Oct 29 at 1:26, by Rapptz
> Nope, I don't know arrays. I don't even know what anything that starts with std:: means.
 
@TonyTheLion if you are still up for a little meet up, I am going to be available more or less all next week
 
@thecoshman oh yes, I'm working during the day, but evening is fine or whatever
 
@TonyTheLion sweet. I have a bitch of a travelling day ahead of me, so probably something like Wednesday. You think you could swing a early finish one day?
 
> Thank you for reviewing 20 Suggested Edits today; come back in 12 hours to continue reviewing.
I only need 1 more approved edit to get a badge :(
 
11:13 AM
huh, my cat just stole a cable tie...
 
You can only do 20 per day?
 
I wonder why
 
Do you just hang out in the close vote queue?
I always wondered why there are always 50k+ questions there.
 
Today was actually the first time I went into the close vote queue
I only like approving edits
 
I have 28 edits approved and 5 rejected.
All of my rejected ones are from "Community"
 
11:20 AM
@thecoshman I think on Wed I may have to finish earlier than usual anyways.
My VC++ CTP compiler won't recognize my variadics...
 
@TonyTheLion handy. well, I have no idea how online I can be in England, so we will need to plan out meeting well
 
@TonyTheLion you mean intellisense or real compiler error?
 
@bamboon compiler error
Error 1 error C2143: syntax error : missing ',' before '...'
 
@TonyTheLion maybe got something at the installation wrong?
 
Maybe my code is wrong?
@thecoshman right, so what do you need? Do you have a mobile phone?
 
11:24 AM
hello
 
@TonyTheLion probably :P
 
@TonyTheLion well, show only takes a single argument but you pass 2
 
@TonyTheLion liveworkspace.org/code/08866c5e7cf76c070a4416e7a12d1cce doesn't compile under gcc 4.7.1
 
right
I made it a single arg
yet it still complains
 
@TonyTheLion I have my Irish mobile, which I can email you the number for. Did we say meet in Bristol? so perhaps meet in the station some where. I do have a sim for my work phone (but the phone it self didn't come through yet) so I might be able to contact you. will have to see when I get to England how well it works
 
11:27 AM
@TonyTheLion with "foo(tbone, a);" it should compile
 
@thecoshman oh right. Yes, well email me your phone number then. Bristol yes. Train station sounds good. I may just call you and then we can arrange things on the phone?
 
@TonyTheLion can do. I assume you are on an English number yourself, so maybe I can give you my parents house number as well?
 
I made a very stupid but very simple code: chat.developpez.com/upload/5094fde3370e0/code.html Does somebody understand why it takes 79ms with numTH = 1 and more than 1s with numTH=10 ??? (I precise that my tests are performed onto a 48 proc server)
 
@thecoshman yes UK mobile. I don't want to have your parents on the phone though. :P
 
@TonyTheLion You didn't change the toolset.
wait, you're on GCC?
 
11:30 AM
@DeadMG where do I change that?
 
hang on, hang on
is that code shown in VS2012, or something else?
 
VS2012
 
right
project properties
 
@TonyTheLion true, they may get a bit confused why a lion is calling up asking for a pirate
 
nobody knows?
 
11:32 AM
@kbok I’m really sorry for the mental damage that must have caused. :/
 
general
 
@thecoshman I'll call you on your Irish phone
 
-> "Platform Toolset"
 
makes life easier
 
then change from v110 or something like that to CTP
 
11:32 AM
@DeadMG yes found it :)
 
Tony it's right here
> Download and launch the installer and follow the instructions on the screen. After installation, a new Platform Toolset will be available in the Property Pages / General / Platform Toolset dropdown called "Visual C++ Compiler November 2012 CTP". After switching to this new toolset in all your projects, do a full rebuild of the solution.
 
and secondly
your sample code makes little sense
 
Microsoft said it breaks some things but it doesn't say what
 
any hoops, I think I need get ready for my stupidly slow journey to my parents.
 
why would you non-recursively extract a parameter pack into a non-variadic function?
 
11:34 AM
@tony chat later
 
ok bye...
 
@thecoshman ok
 
@DeadMG so what's the purpose of that first show() ?
 
@TonyTheLion end recursion
 
11:37 AM
ah I see
so does a variadic function always need two parameters minimum?
you can't just have template<typename... F> foo(F... f) {}?
 
You can.
 
ah right
 
but not if you want to recursively iterate over the parameters in foo itself
then you need the head/tail/base arrangement
 
I suggest implementing a whole layer of reflection on C, something like in Obejctive-C, then enumerating all the fields of a structure and sending them a (polymorphic) deepCopy message. Or not. — H2CO3 8 mins ago
???
 
11:54 AM
what?
Meh VS2012 allows this... but GCC not?!
 
@TonyTheLion There's no declaration of output that allows for output() on line 8.
The compiler diagnostics are quite straightforward in that respect.
 
@LucDanton I have the same code in VS2012 and it doesn't complain
 
@TonyTheLion GCC doesn't care, and neither do I tbh.
 
I don't understand.
 
@TonyTheLion VS2012 is wrong.
 
12:01 PM
pfffff
so much for the CTP
 
@TonyTheLion you need to put the non-variadic versions before the variadic ones. liveworkspace.org/code/e63cda09665eba9fd32f7ee3de763b5f
 
After being for so long on the bleeding edge, I have only one thing to say: lol.
Speaking of, I can actually go back to writing code because I've got a former snapshot of GCC.
 
7
A: What encoding does c32rtomb convert to?

bames53For the assertion to be guaranteed to hold true it's necessary that the multibyte encoding used by c32rtomb() be the same as the encoding used for string literals, at least as far as the characters actually used in the string. C99 7.11.1.1/2 specifies that setlocale() with the category LC_CTYPE ...

Meh, this answer is going to get half of the bounty.
:(
 
@R.MartinhoFernandes Do I put common_type/CommonType in meta or type_traits?
> internal compiler error: tree check: accessed elt 2 of tree_vec with 1 elts in tsubst, at cp/pt.c:11067
lol
Well I guess it's going into type_traits because the compiler keeps complaining.
 
@LucDanton lol, what?
 
12:07 PM
Unsurprisingly it doesn't help.
New CommonType will break regardless of where I put it I suppose.
 
@TonyTheLion It's because VS implements two-phase lookup differently to GCC, and found output() whereas GCC did not.
 
@DeadMG ah I see.
 
a simple re-ordering of the functions should function on GCC
 
@DeadMG yes indeed that worked
 
12:11 PM
Now write a zip_with.
 
anyone else having trouble loading the BBC webby?
 
intellisense seems to be feeling very intelligent today
 
I wonder why you still insist on using it at all.
 
I like its syntax highlighting. when it works :p
 
12:20 PM
@R.MartinhoFernandes I made a monad for future results today! I think...
 
Ell
arghh why did you guys let me fall asleep!? Now I'm late I'm late I'm late for a very important date!
 
Why do you think that's a monad?
I don't see any join nor bind.
@Ell Why are you here, then?
 
Ell
@R.MartinhoFernandes because I missed the bus :3
so I still have 20 minutes before I can set off :L
 
oh
I don't have any dates :(
 
Ell
haha there is a chinese postman outside
 
12:25 PM
Why is that funny.
 
LOL!
 
Good question.
 
@R.MartinhoFernandes Because I only remember like half the laws, and only the trivial ones that don't require much. Bind would be combine, return would be future_value. Are those two enough?
 
Ell
because the whole chinese postman problem :3 I know its the Chinese "Postman Problem" not the "Chinese Postman" problem, I just still think it's funny :L
 
12:28 PM
hi, guys. is it easy to find a job in America for a Chinese programmer?
 
Ell
aww man and I forgot to put the dishwasher on
 
C program to find string length without strlen
Is this condition correct ??? while(*(pointer+length))
i think there must be while(*(pointer == length))
what do you think ?
 
Ell
int i=0;while(str[i] != null){i++};return i;
that is my guess :L
 
@LucDanton Oh. I guess waking up should be in order... Yeah, I guess so. Though combine(future_value, foo) is not exactly id, it might be close enough, I guess.
 
12:31 PM
@R.MartinhoFernandes Ya, no need to really investigate. It's more of an accident than anything else (if it is anything at all).
 
The thing is that since the monad is formed by the concept and the operations, and not a class template and the operations, it would have to be id for that concept, which I might not be awake enough to think about how it makes or makes not sense.
 
@R.MartinhoFernandes It's been here for some time but I can't say I'm convinced by it.
 
Yeah, but now it has more than +2, so it will get half of it unless I actually award it myself :(
 
Do you have a fallback plan? Ask on a compiler list how they plan to implement it, if they do?
 
Yeah, maybe.
 
12:46 PM
Honestly I like the other answer better. Does it matter that it mentions the TR specifically?
 
@LucDanton Of course it matters. The TR is the specification for this.
 
Well, for C++, no? Has C incorporated the text directly?
 
C11? I think so.
 
I'm still considering the question a C question so there you go.
 
Oh, someone posted an history lesson yesterday but deleted it. I missed that.
 
12:55 PM
I kinda missed this whole build conference..
What are the features now planned for 14 and 17?
 
If there is a recording then someone should pin it
 
1:36 PM
@Pubby you can watch the recording here channel9.msdn.com/Events/Build/2012/2-005
3
 
@bamboon Thanks
 
@Pubby can't find the Q&A though
 
1:50 PM
If I have a bunch of macros FOO1, FOO2, FOO3... can Boost PP iterate through them?
 
no
 
I suppose I can use templates then
 
@Pubby Something like BOOST_PP_CAT(FOO, i) comes to mind.
 
@LucDanton I don't think that will expand FOOi though
 
2:09 PM
@Pubby Does it matter what you think? It's trivial to write a test program to check what happens. Do your homework and check it for yourself.
 
@LucDanton I want to be a lazy vampire though! :(
Hey look, PP_CAT works
 
hello guys
Could someone tell me what happens when I do ReadProcessMemory on a structure that has been padded?
 
it reads the process's memory
 
2:27 PM
I mean
If i have 2 exes and one read the memory of the other
in one of them the struct that i want to read has been padded
in the other (that reads the struct) the same struct hasn't been padded by the compiler
and i cast the read bytes into that struct
what happens?
 
what do I look like, a clairvoyant?
what happens is that it doesn't work in some undefined fashion
 
2:59 PM
hmmm
 
const char& for const iterators, or just char?
@NeelBasu CellT is already a type.
typename only goes before template_param::nested_type
 
@DeadMG Ya If I remove the typename I get even m,ore wired errors. It says expected primary-expression before '*' token
 
> BOOST_FROEACH
 
you also didn't include the Boost header.
 
3:01 PM
@LucDanton Ya included that too now.
It was there in original code. But the error didn't disappear after I included
 
what header is it?
 
You're also attempting to copy an std::ostream.
 
oh yeah, and that.
where can I find docs on POSIX's memory mapped files?
 
3:04 PM
I've to make that reference. But what you did ?
Its still showing error in mine even after I added main() like you
@DeadMG liveworkspace.org/code/a70c5bd988ac9f738c05dea39896e160 looks same as yours and giving errors
 
7 mins ago, by Luc Danton
> BOOST_FROEACH
 
Oh! My God
Thanks
 
Dammit.
 
Things like extension methods don't exist for C++, right?
 
we have ADL
hmm
can I assume that char == byte?
 
3:18 PM
ptrace is kinda opaque. How am I supposed to know which 64-bit register the function arguments for open are stored in? (rdi, rsi, etc..?)
 
Don't they usually differ by at least a un/signed
 
good call
 
sizeof is usually the same though.
because usually byte is typedef'd as unsigned char
 
yeah
the question isn't "usually", but "always".
 
@DeadMG Yes. C++ specifies that a char uses exactly one byte of storage.
 
3:20 PM
Unless it's some embedded compiler that's on crack and sizeof(char) is like 2 or something
 
@ThePhD sizeof(char) is always 1.
that's the definition of sizeof.
@JerryCoffin win
 
Maybe that was int being a size of 2... hm.
 
@ThePhD That's entirely possible (and back in the MS-DOS days, was typical).
 
@ThePhD No, but we prefer free functions, anyway.
 
naw, I remembered to keep my platform independence in that respect.
 
3:21 PM
8
Q: How Non-Member Functions Improve Encapsulation

AppuI read Scott Meyers article on the subject and quite confused about what he is talking about. I have 3 questions here. Question 1 To explain in detail, assume I am writing a simple vector<T> class with methods like push_back, insert and operator []. If I follow mayers algorithm, I would ...

 
@JerryCoffin Then what was short's role?
 
@ThePhD short was the same as int (just as, on most current compilers, long is the same as int).
 
long is 64 bit on recent 64 bit ubuntus.
 
So it might be flawed in my current engine to go with assuming typedef int int32 ?
Maybe long int would do the trick...
 
If you want 32 bit, there's also int32_t or something.
 
3:24 PM
@ThePhD Yes -- flawed in two ways. First it might be wrong. Second, you shouldn't be doing your own int32 at all -- you should just use int32_t.
 
8
Q: What's the equivalent of int32_t in Visual C++?

kevinWhat's the equivalent of int32_t in Visual C++? Please help me . I'm new to C++.

 
Doesn't Microsoft not ship the int32_t and all those <stdint> definitions?
 
Just click on the question. It does.
 
Ah, newer implementations of Visual C++ pack stdint. THanks, @FredOverflow
int32_t is an extra underscore and t for me, and I'm supremely lazy, so I'll just define my own int32
 
typedef int32_t int32;
 
3:28 PM
Hm.... still. Most of my code as int littered all over it.
I guess I'll do a global find-replace to say int32
 
@ThePhD but does that code depend on int meaning "32 bits"? Most code doesn't need a specific size, and is best off just using int.
 
A lot of it deals with interacting with memory, and to suddenly have a maximum allocation or maximum index access of '16 bits` could be pretty damaging.
I did also have a typedef size_t lwordto get the native size implementation, and a typedef ptrdiff_t ulword for the native unsigned size implentation, so maybe I could use those instead.
 
@ThePhD If you're dealing with allocation sizes and indices, you should change them from int to size_t.
@ThePhD Hopefully you got those backwards -- size_t is unsigned and ptrdiff_t is signed. But yes, they sound like what you really want.
 
Whoops, you're right.
They're all unsigned I think.
 
The other side of it is though: is there any real chance of your code being used with an MS-DOS compiler (or something similar)? Are you restricting yourself to a subset of C++ that would work with those ancient compilers in the first place? If not, trying to make this particular part portable to them may be a waste of time.
 
3:36 PM
I don't imagine I'll be working on anything less than an Intel Core Duo anytime soon; the engine right now uses DIrectX level 11 by default (but will throw back to level 9_3 if it can't initialize at 11) and doesn't use any fancy DirectX 11-specific features. ... Yet.
 
@ThePhD No. "The type ptrdiff_t is an implementation-defined signed integer type..." (§18.2/5).
 
@JerryCoffin Swiiitching now.
 
is there anything wrong with this code ? gist.github.com/4007674
 
hmm
remind me why some functions are better as non-member like comparison operators?
 
@DeadMG implicit conversion of lhs?
 
3:38 PM
k
 
Also right v. left, if you have two different types
operator > (ADifferentStruct meow);

AStruct arf;
ADifferentStruct meow;

meow > arf // Compiler: WHAT THE FUCK OH MY GOD ARE YOU OUT OF YOUR MIND WHAT IS THIS SHIT ERROR NO WRONG NO NO NO NO NO *Tantrum.*
 
lol
 
@NeelBasu My immediate reaction is that its very existence is wrong. What are you trying to accomplish? To print things in C++, you normally just want to overload operator<<.
 
Alright
So I think I've
beefed out all my typedefs
typedef char sbyte;
typedef unsigned char byte;
typedef unsigned char uchar;
typedef unsigned short ushort;
typedef unsigned int uint;
typedef unsigned long ulong;
typedef long long llong;
typedef unsigned long long ullong;

typedef int lbool;
typedef ptrdiff_t lword;
typedef size_t ulword;
typedef void* pointer;
typedef HRESULT apiresult;

typedef int8_t int8;
typedef uint8_t uint8;
typedef int16_t int16;
typedef uint16_t uint16;
typedef int32_t int32;
typedef uint32_t uint32;
typedef int64_t int64;
 
@JerryCoffin NoI've a hierarchy of Parents. So I've different operator()(AncestorT*) But I am getting compilation errors on template
 
3:43 PM
These should last be a good long while.
last me*
 
This is clearly wrong: "typedef int64_t uint64; "
 
... Woops.
 
> 56 percent of exploits blocked in Q3 use Java vulnerabilities.
lol Java fail
 
Whew, fixed it before it was Immortalized
 
meh... we have boost for that xxxNN_t
 
3:44 PM
@NeelBasu Still not following what you're trying to do.
 
fuckshitballs
<pre> why do you hate me?
 
@JerryCoffin But why this is giving compiler error ?
near line 11
It says wrong number of template arguments (1 should be 2)
I've supplied 2 arguments
`struct BucketHeaderPrinter: public BucketHeaderPrinter<typename T::ancestor<DepthN-1>::Type, DepthN-1>{`
 
@ThePhD please post link to ideone or liveworkspace.org with long pastes of code instead of posting directly in the chat
 
@TonyTheLion Okay. Sorry. :c
 
@NeelBasu Haven't looked carefully, but perhaps it's the `T::ancestor<DepthN-1>::Type" part (where you are only supplying one argument)?
 
3:50 PM
@JerryCoffin Thats the first argument, and there is a second one which is Depth-1
So I am supplying 2 arguments. But compiler seeing 1 only
 
@NeelBasu Yes, what I'm pointing to is the fact that you're supplying only one argument to T::ancestor<whatever>.
 
@JerryCoffin yes because that takes one argument only
@JerryCoffin and why would it complain for this? I'vent instantiated the template yet. so
it doesn't know what is T so it shouldn't complain What I am suppling inside T::something
 
Yeah, looking more carefully, it looks like a compiler problem to me. Doing a quick check, VC++ compiles that much without any problems at all (though it does complain at line 28, saying BucketHeaderPrinter was previously defined).
 
@JerryCoffin So How can an workaround be modeled ? I am using gcc
But latter I'll compile with VC also
@JerryCoffin and also How can that redefination error be solved ?
 
@NeelBasu Not sure -- still haven't really sorted out exactly what you're trying to accomplish here.
 
4:03 PM
I've one node that have different ancestor at different level, ancestor<0> is of type A, ancestor<1> is of type B
X will have two ancestors A, B
Y will have 3 ancestors A, B, C

number of ancestors can be known by T::depth
and I want a class having operator() overload of all ancestors of given T
So BucketHeaderPrinter<X> will have operator()(A*), operator()(B*) overloads but BucketHeaderPrinter<Y> will have operator()(A*), operator()(B*), operator()(C*) overloads
Hope that clears
 
@NeelBasu Sort of anyway. Unfortunately, I can't spend any more time on it right now -- my kids are demanding attention. Sorry.
 
@JerryCoffin No problem. Thanks
 
Ell
Hi guysss
 
4:29 PM
hey
 
Hai
I just came back from my first drive in my own car.
Was fun. :)
 
@TonyTheLion Are you alive?
 
@R.MartinhoFernandes I'm still alive. :)
 
robot
can I steal your ogonek Unicode stuff
 
4:33 PM
What for?
 
@R.MartinhoFernandes hi, how was your first day at work?
 
Sure.
It's CC0.
@bamboon It wasn't.
 
one of the criteria for proposals for Standardisation is reference implementations
and unless I want to implement my own normalization and comparison
I figured I'd just steal yours instead, and just tweak the interface to my proposed one
 
@DeadMG I think you technically can’t steal it – given that it’s CC0’d ;)
 
15 hours ago, by R. Martinho Fernandes
My boss was sick, so he was not available to introduce me to the stuffs and to give me tasks. So he called and sent me home.
 
4:34 PM
@KonradRudolph lol
 
@R.MartinhoFernandes classic
 
@R.MartinhoFernandes oh gawd.
 
I don't exactly remember what CC0 is, but it's closer to WTFPL than GPL, IIRC?
 
It's public domain.
 
right
I'll credit you an infinitely small amount for the reference impl then
 
4:36 PM
I'm trying to finish NFC now.
 
design question, let's say my library offers a class X. I use that class X to implement another function "foo" in my library. Though, I need add an extra functionality (function) in foo from X, but I don't want to expose that functionality to somebody else. How would you guys solve that. friends, inheritance?
 
I'm confused.
 
@R.MartinhoFernandes Near-Field-Communication?
 
@bamboon Normalization Form C.
 
Unicode normalization
 
4:40 PM
@bamboon You mean foo uses stuff from X that is not public?
Then yeah, friends.
 
@R.MartinhoFernandes yeah, that is what I want to achieve.
 
template<typename... U>
void print(U... u)
{
	for (int x = 0; x <= sizeof...(u); ++x)
		std::cout << (u)... << std::endl;
}
how do I expand u... in cout?
 
gotta recurse
 
ah, so it doesn't work with a loop?
 
no
 
4:43 PM
hmmm, what's the technical reason for that?
 
pack expansion is gimped as fuck
and secondly, looping doesn't really make any sense- you're looping at runtime.
 
@TonyTheLion It's that they (can) have different types.
 
and parameter packs are expanded at compile time?
 
yep
 
right
 
4:44 PM
it would be nice to have something like std::cout << u... << std::endl;
 
static for FTW
 
but pack expansion is quite gimped
 
Yeah, D has that.
 
Hmm, still buggy. ṩd is getting transformed into Ậ.
 

« first day (749 days earlier)      last day (4203 days later) »