« first day (897 days earlier)      last day (4052 days later) » 

9:00 PM
@Xeo yeah, boost::variant has templated ctor, and it was chosen over conversion opeator of Proxy
so...
1 hour ago, by Bartek Banachewicz
typedef boost::variant<signed int, double, bool, const char*, nil> _Variant;

class Variant : public _Variant
{
public:
    Variant(signed int v) : _Variant(v) { }
    Variant(double v) : _Variant(v) { }
    Variant(bool v) : _Variant(v) { }
    Variant(const char* v) : _Variant(v) { }
    Variant(nil v) : _Variant(v) { }
};
(yes I fixed _Uppercase already)
and now you can
auto foo = vm["foo"];
foo(4,5,6);
Call to foo() is obviously variadic
 
ok, you fail
 
@DeadMG what again? :/
 
firstly, in Lua, all numbers are doubles, so skip the int constructor.
and secondly, C++ already has nil, it's called nullptr.
 
@DeadMG no. There are distinct lua_isinteger and lua_isnumber
@DeadMG and as if that, nullptr_t not nullptr
 
well, 5.2 did introduce bit ops, so I guess that probably did require integral types.
 
9:03 PM
it was before 5.2
 
but 5.2 sucked horrifically
 
I am still using 5.1.4
 
Can I store I/O manipulators as members?
 
@BartekBanachewicz Lua only has eight data types and integral is not one of them. The API offering that function is irrelevant.
 
in Lua, numbers are lua_number.
 
9:03 PM
After a bit of googling I found std::ios_base::fmtflags and it seems to work
 
@DeadMG "Don't limit the API when wrapping" again
 
@Abyx I believe it's lua_Number, to be precise.
 
it's lua_Number
 
yep, something like that
 
@Rapptz I guess so. fmtflags is just an enum, right?
 
9:04 PM
Anyway, it's more convenient for end-user, I guess
 
@Tuntuni No
it's a typedef
 
there's no lua_isinteger here.
 
@Rapptz for?
 
Xeo
@Rapptz It can be an enum
 
9:05 PM
@DeadMG hm you're right
 
but I don't know how to store it as a member and assign one of the manipulators to it :|
 
@Rapptz I/O manipulators are not format flags.
 
Ah.. implementation defined .. well that's what I get when I go and browse Microsoft's stdlib code. :3
@DeadMG This too.
 
but there is lua_pushinteger
 
@Rapptz You know, when you said 'manipulators' the first thing that came to mind was std::skipws and the like.
 
9:06 PM
Nah.. I meant std::internal, std::left and std::right
^ here's what I'm doing
 
Ya those are functions I think.
 
It's silly I know
 
and obviously lua_pushinteger will be used when you do for example Variant a(5);
 
It isn't. E.g. Boost.Format is designed so that you can store a particular format to reuse with different values. Makes sense, no?
 
damn. That implementation is pretty nice already.
I expect tables to flip everything up
pun intended
Keeping simple seems to "just work" when doing stuff like this.
Guys writing all other wrappers went full retard in providing complete marshalling of C++ classes
 
9:12 PM
@BartekBanachewicz Yo dawg I heard you like wrappers so we put a wrapper in yo wrapper so you can wrap while you wrap.
 
Ell
Complete marshalling of c++ classes is insane
 
indeed.
I am going to take a shower.
Nice progress today.
Returning values from C++ functions is still an issue.
also C++ functions taking values
 
@BartekBanachewicz Sweaty Plus Plus: D:
 
Oh I got it to work.
A bit ugly though.
 
@Rapptz How?
 
9:18 PM
It's like Luc said
 
Well the syntax is ugly but I think the approach itself is not. That's how the ostream is overloaded anyway, taking a function pointer.
 
Nothing on this Open.gl site seems to be working with my compiler
 
You know how we're not supposed to rely on STL headers pulling other headers in? What about relying on <iostream> pulling <ostream> and <istream> in? After all, it defines cout and cin which are ostream and istream objects and therefore need those two headers. Would this be ok or should I still include <ostream> and <istream> even though I included <iostream>?
 
I think that C++11 defines that <iostream> must define <ostream> and <istream>.
 
@DeadMG 100% sure or?
 
9:31 PM
you'll have to ask the Standard
 
Does it matter at all? When do you use <iostream> anyway?
 
@LucDanton cout for example
 
@LucDanton std::cerr is only defined in <iostream>
 
@Crowz what have we told you about learning C++ first?
 
@DeadMG If only that was possible. Digging is my only option. :3
 
9:33 PM
@BartekBanachewicz but I want to do cool things
 
> A reasonable amount of experience with C++
that's stated in reqs
you can do cool things in console too
Do you want to try out Lundi, for example?
 
What is Lundi? I want to learn C++ and OpenGL because I want to... well, do graphics in general
 
As I said, these things are better learned separetely
 
Does the compiler automatically generate move assignment operator or move constructors for me?
 
@Rapptz yes
with exceptions
 
9:35 PM
@Rapptz Some of the time, yes.
 
haha I'm an expert
 
@BartekBanachewicz according to who? :)
 
The class and neither of members can have a dtor.
Each member must have move ctor.
Your compiler must not be VS.
 
Oh right, I remember VS was bugged.
 
it's not bugged, it's just unimplemented
 
9:36 PM
Ah.
 
Too bad you can't use Visual Studio with another compiler. :o
 
@Crowz Lundi is Lua C++ API which allows you to generally do cool things
@Tuntuni I am using Visual Studio with another compiler
 
user142019
@Tuntuni why would you want to?
 
user142019
Use Vim!
 
@BartekBanachewicz Wtf how?
@Zoidberg fuck dat.
 
user142019
9:37 PM
@Tuntuni fuck you.
 
@BartekBanachewicz Like what?
 
user142019
:>
 
Haha.
 
@Tuntuni Intel C++ Studio XE
@Crowz creating a moddable game in console in half an hour
moddable without recompilation, that is.
 
@BartekBanachewicz I'm talking about Visual Studio. Is Intel C++ Studio XE very similar to VS or what?
 
9:39 PM
That sounds pretty intense...
 
@Tuntuni it's an addon to VS
 
@BartekBanachewicz Ohhh. Cba to read, ya know. :D I'll check it out. Thanks.
 
@Crowz and is quite easy.
Also there's a cat on my bed.
Or, shall I rather say
I am on cat's bed
@Tuntuni it's expensive. Sorry :( Free on Linux
 
@BartekBanachewicz Like that's a problem. Pffft..
 
Aren't I going to have to know OpenGL and C++ at some point anyway?
 
9:40 PM
@Tuntuni what do you mean?
@ScottW no, it's a regular one
 
@BartekBanachewicz Oh nothing... :)
 
@Tuntuni If you can't find it, good luck.
@Crowz well, maybe
 
@BartekBanachewicz It's a visual studio addon but free on linux... somehow I see a problem with that
 
point is to do it reasonably.
 
Does it offer only the Intel compiler or can you choose for example, GCC?
 
9:41 PM
@BartekBanachewicz I want to be a tech artist hah, they kinda gotta know this stuff methinks
 
@Borgleader I mean on Windows it's VS addon. On Linux it's commandline
 
oh that makes more sense
 
38 secs ago, by Bartek Banachewicz
point is to do it reasonably.
@Tuntuni nope, only Intel one.
which is just a bit better than VS one, sadly.
nevertheless, you also get pretty nice libraries.
 
user142019
 
user142019
NOW
 
9:43 PM
@Zoidberg it crashes on my system :/
 
Mumble crashes on your system?
Get a new system
 
@BartekBanachewicz so Lua is... basically C++, or is it different completely?
 
@BartekBanachewicz How standard compliant is it? VC++ doesn't have initializer lists for example.
 
user142019
@Borgleader no he's referring to Chrome.
 
@Crowz Lua is a totally different language
 
9:44 PM
@Crowz C++ is basically C++ everything else is completely different
 
@Tuntuni As of November 2012 they do
Not the constructors though
 
@Zoidberg Now you lost me... mumble is a standalone
 
@Rapptz That's still not full support. :P
 
No compiler has full support
 
@Rapptz Really?
 
9:45 PM
really.
 
Yes
 
I thought GCC had it all.
 
no, it has not
<regex>
 
VS2012 is just lacking
 
VS is more thoroughly tested
 
9:46 PM
@BartekBanachewicz Is that all?
 
@Tuntuni no. Google your friend for full list.
 
@BartekBanachewicz I always thought VC++ was behind everyone. lol
 
@Tuntuni it is behind because it is tested duh
 
@BartekBanachewicz I see..
 
GCC releases experimental versions
VS is more stable
 
9:47 PM
Oh
Did not know that ..
 
though update 2 is CTP
 
user142019
@Borgleader I was being sarcastic, you fool.
 
VS isn't more stable lol
Come on dude. :|
 
In corporate terms, it is.
 
What makes you think just because it is free software it isn't tested?
 
9:48 PM
I know what you are going to say.
I am just pointing out the trends in companies
They don't use gcc 4.1 just for kicks
 
VS isn't bug free, it isn't really that stable and a lot of things aren't implemented. I don't see how that fits as stable.
 
@Zoidberg Like I said earlier... This is pretty accurate.
 
It's 4.2 IIRC and I think they use it due to licensing issues.
 
licensing?
wat?
isn't GCC, like, free?
 
Yeah but it's GPL with exception clauses, there has to be a reason why Clang uses 4.2
 
9:51 PM
uhh GPL
 
Clang doesn't use GCC.
 
so I think it's licensing
errr
libstdc++
 
So then, which one of the compilers is the most C++11 compliant?
 
@Tuntuni GCC 4.8 now
 
@Rapptz Clang can use any libstdc++ up to 4.6.3, and only later than that because of an abi problem which rubenvb may have fixed
 
9:52 PM
Oh I got it mixed up. I meant why Mac's Xcode only ships with 4.2 now
What's the reasoning for that?
 
it's Xcode.
 
Hmm.. I guess.
 
user142019
Because Apple doesn't care about GCC anymore.
 
@Rapptz GPL, as you said.
 
user142019
They are also constantly changing Objective-C, and maintaining two different compilers for that is too much hassle.
 
I still refuse to believe people use Objective-C outside of iOS@@
 
user142019
OS X?
 
I don't believe there is any significant userspace outside iOS
 
there are people who use Smalltalk y'know
 
user142019
There are also people who use C++.
 
9:55 PM
so Zoidberg
what projects did you dump recently?
 
and then there is Zoidberg
 
user142019
@DeadMG Allah.
 
user142019
Textbin.
 
We should challenge Zoidberg to write "99 bottles of beer"
 
user142019
99 bottles of beer
 
user142019
9:56 PM
That was easy!
 
duh, you know what I meant
 
user142019
9
 
user142019
Here, solution in HQ9+.
 
Zoidberg's motto: "I got 99 projects, but a completed ain't one."
10
 
@Zoidberg gz, you just completed a project
 
user142019
9:57 PM
It wasn't a project.
 
user142019
It was a silly "challenge".
 
uh oh
isn't dirtblock dumped too?
 
user142019
Everything is dumped.
 
user142019
I have no current projects.
 
user142019
9:58 PM
I'm busy with Google Code Jam.
 
Expert: Hi, how can I be of assistance?
You: I need food.
Expert: Do you even know how to use food?
 
have you noticed that "chat with an expert" popup?
it just popped up and asked me whether I want to chat with a random expert on something
what's that thing?
 
@JohannesSchaub-litb look at the date
 
"C++ lesson one" 3 hours long on YouTube. wat
 
10:05 PM
@Crowz We told you the video tutorials were shit...
listen at your own waste of time
 
@Crowz youtube? Dude.
@Borgleader well not every one but most, yeah
 
every one of them.
 
ahaha
> Expert: Let's go back to talking about having food.
 
@Borgleader My books are at school :\ What's so bad about videos? Is it inherently videos or just that you don't like 'em? Haha
 
I haven't seen a single one that didn't blow ass from /r/learnprogramming.
 
10:07 PM
@BartekBanachewicz Yeah, there are some pretty good tutorials, actually. But once you do them all you realise how simple they actually are and how much work you actually need to put in to be a good C++ programmer.
 
@Crowz they. are. bad.
 
26 secs ago, by Rapptz
I haven't seen a single one that didn't blow ass from /r/learnprogramming.
 
@Borgleader How do you quote like that?
 
paste the permalink
 
this is getting better and better
You: Sure. I was thinking about ham sandwich.
Expert: 42.
You: How is that related to ham sandwich?
Expert: That's a secret.
 
10:08 PM
@BartekBanachewicz The ham sandwich is a lie.
“Well, it, like, about, hoes and, uh, drugs, asshole, and niggaz, innit, bitch.”
~ 50 Cent on The message of Hip Hop
Aahaha
 
his class name in this video: "poopface"
oh god you guys are right about videos
 
how do you get a copy of this ieeexplore.ieee.org/xpl/… ?
 
why the fuck would i pay for reading a technical standard
 
because standards aren't free
simple as that.
 
10:13 PM
@SalmanPK use the latest draft like everybody else
 
n3337 is the latest one, I think.
Minor differences between it and the actual standard.
 
typos were fixed
 
So == standard?
 
oh. thanks guys :)
 
Has anyone ever been to GoingNative or C++ and Beyond?
 
10:17 PM
uh
I finally understood the difference between VS CTP and VC++ CTP
initializer lists up and running, finally
 
@BartekBanachewicz In VC++ CTP?
 
It begins
12
 
@JonSkeet What does?
 
@JonSkeet Hahaha
@Tuntuni refresh
 
@Borgleader Oh. My avatar changed and Cicada is JonSkeet all of sudden. Wut happened?
 
10:21 PM
lmao
 
What lol
 
SO is having a case of JonSkitis
 
@Tuntuni yes
 
oooohhh thaaaattt
 
oh god
@JonSkeet tags : c++, php, imagemagick
you could have done better
 
10:25 PM
lol
 
@JonSkeet nice try but pretty sure Jon Skeet has more than 1 gloden badges
 
lets make program
 
@Crowz oh, that might be interesting
Also, according to Wikipedia, lua is functional too :)
 
I just want to write to a socket, C++. Why don't you like that?
 
@JohannesSchaub-litb chat.stackoverflow.com/transcript/message/8583223#8583223 Johannes, could you tell me your opinion on this? Does the standard say anything? (I suppose you know because 80% of your answers have a quote from the standard :D!)
 
10:30 PM
@Crowz I have't said I don't like it
> Lua is commonly described as a “multi-paradigm” language, providing a small set of general features that can be extended to fit different problem types, rather than providing a more complex and rigid specification to match a single paradigm.
That's a great definition btw ^
I have to bookmark it
 
hey
 
hmmm in visual studio, if you wanted to run the program with input arguments, is there a way to do that without going to the command line?
 
Yes
Solution properties
You'll find it
 
@Crowz in the project settings, debug section
 
user142019
@JonSkeet WINRAR
 
10:31 PM
@Tuntuni i am sorry i am a complete noob on lib
 
I tried to check a bitwise int directly with var & 50339985
But it matched even something not containing all of them?
 
@Tuntuni C++11 guarantees that IIRC
 
@JohannesSchaub-litb ah
 
user142019
@JonSkeet answer a question by Jon Skeet. :v
 
@Colandus wat.
 
10:33 PM
@BartekBanachewicz Puppy told me that too but I didn't find anything.
 
I'm sorry, I mean, when I check something with bit I have to do "var & 50339985 == 50339985" right?
 
@Colandus I don't know if you're talking about bit flags or what, but if you are then if 5033.. was your bitmask you'd just say var & 5033.. That'll return if that specified bit is set.
 
:8583871 C++03 says: "The header <iostream> declares objects that associate objects with the standard C streams provided for
by the functions declared in <cstdio> (27.8.2)." C++11 says: "The header <iostream> declares objects that associate objects with the standard C streams provided for by the functions declared in <cstdio> (27.9.2), and includes all the headers necessary to use these objects." The "...and includes all the headers necessary to use these objects." is the crucial difference.
 
@Tuntuni I suppose I'm talking about bit flags, if that's what's it's called yeah...
 
@JerryCoffin Oh thanks! So since ostream and istream are necessary to use these objects, then it does. awesome, thanks. :)
@Colandus Checking if some specified bit is set, right?
 
10:42 PM
@Tuntuni yes... like:
uint16_t lookFor = 128 | 8192 | 16777216 | 1 | 16 | 33554432; //(not sure if 16 is right etc)
uint16_t lookIn = 128 | 8192 | 1 | 16 | 33554432;
if(lookIn & lookFor == lookFor){
//contained all neccessary flags
}

is this right?
 
user142019
 
user142019
lololol
 
user142019
@ScottW who are you switching to?
 
@Zoidberg classic Zoidberg
 
@Zoidberg lmfao "o.. kay.."
 
10:44 PM
@Colandus Yes -- if (test_value & flags_value == flags_value) is the usual way to test whether all the bits in flags_value are set in test_value (while ignoring any other bits that might be set).
 
@Jerry Coffin Okay thanks, just had to be positive.
 
@JerryCoffin Isn't the == flags_value part unnecessary?
 
this guy has the weirdest writing style... I've never seen a sentence with a comma for two independent clauses, a colon not preceding a list, and a double hyphen all in the same sentence
 
@Zoidberg They're a lot better than those porn spam messenger things.
 
@Tuntuni If you only want to check for at least one flag being set, it's unnecessary. If you want to check that all the specified flags were set, it's absolutely necessary. For example, let's assume test_value is 1 and flags_value is 3. 1 & 3 will yield 1, which will be true.
 
10:47 PM
@JerryCoffin Oh right. Didn't consider the case where you want to check multiple flags. I've actually never done it. :) Nice.
 
Hi
I need opinions on pursuing a degree
 
@JamesPoulson Do it -- but only on foot. If you pursue it in a truck, it may run too much and the meat will be tough.
 
@ScottW Not refreshing the chat. Muahaha. :D
 
user142019
@ScottW about ten minutes.
 
10:52 PM
@JerryCoffin That is actually funny :) . I'm undecided between an associates in IT and software. I'm nearing the end of bachelor's in info systems and want to boost credit. Undecided because associates in it offers comptia and network certs. What do you think ?
 
user142019
inb4 question on Meta Stack Overflow titled "What happened to Jon Skeet?"
 
user142019
@ScottW Very simple and retarded C#-related questions. :v
 
user142019
Oh on meta.
 
user142019
lol
 
Don't forget to send us a link.
 
10:57 PM
goddamn pointers... so difficult
 
Lol, once you get to understand how complex C++ really is, pointers will be easy as hell.
 
Hear, hear!
 

« first day (897 days earlier)      last day (4052 days later) »