« first day (751 days earlier)      last day (4196 days later) » 

12:00 AM
Yes, because the conversion to function pointer is implicit.
 
user142019
But to functors it isn’t.
 
Btw, []{}.
@Zoidberg'-- ?
 
user142019
23
A: Why is 'X x; x();' allowed, when 'X' defines a conversion to function pointer, but not, when it defines a conversion to a functor?

Zoidberg'--x(5); // works ?! This implicitly casts x to an f_ptr and calls that. C++11 standard: § 13.3.1.1.2 Call to object of class type [over.call.object] 2) In addition, for each non-explicit conversion function declared in T of the form operator conversion-type-id ( ) attribute-specifier-se...

 
I fail to see the relevance.
 
Xeo
@Zoidberg'-- That's irrelevant.
 
user142019
12:02 AM
Oh. Of course.
 
user142019
I forgot for a moment that it always only converts to a function pointer.
 
user142019
I think it’s time to sleep.
 
@Zoidberg'-- Admit it, you were just trying to plug your answer.
@DeadMG btw, are you aware that your real name and address are rather easy to find currently? If you want more info, I can e-mail you privately.
 
yes, please do, I want to take steps to eliminate that.
y'know, my real name is kinda annoying, but I know that Google give it out far too readily
but my address?
I never give that shit out.
 
no need to worry. as a long time internet user i can report that only about 2 to 7 crazies will follow you over the years on the net, and only 1 will be so deranged as to put notes and physical objects in your mailbox
 
12:07 AM
I will e-mail you.
@Cheersandhth.-Alf lol
 
if you Google my full name, none of the results are me.
 
well there was that thing with the microsoft group whatever
 
Ell
how much power would a machine need to run vms of every popular platform? for a buildbot for example?
 
@DeadMG I can image, all those people that suddenly would want to visit you.
 
if you don't ask them to do anything, then not much.
 
Ell
12:12 AM
I don't recall giving my address out
its the embarrassing things I've talked about attached to my name I'm worried about
 
@DeadMG Same here!
 
well i think that for some things one simply wants privacy on the net. unfortunately many norwegian sites now use facebook for validation. this means if you surf by, and happen to be logged on to facebook, you are registered as you - not just for any comments but also what you look at, where you came from (!), so on
 
@Cheersandhth.-Alf I don't have a Facebook.
 
it can also happen after having been logged on to facebook
 
@DeadMG e-mail sent.
 
12:17 AM
you're sure that you have my email address and that it's correct? I got nothing here.
thanks, by the way, for letting me know
 
I used the one you listed on the proposal thing.
 
@DeadMG sorry i was commenting on @ell's comment
 
@Cheersandhth.-Alf np
@R.MartinhoFernandes Heh. Forgot about that already :P
oh, fuck, you're kidding me
 
You got it?
 
yep
 
Xeo
12:22 AM
aye
 
naw
 
Xeo
Btw @R.MartinhoFernandes, you really like stalking people over their web profiles, huh? You got @sbi's real name, now you got the puppies...
 
anyone finding them in the immediate future won't find anything of use there
@Xeo I already gave it to the other Kyrostat team members, I believe. Stupid Google gives it out like fucking candy.
 
@Xeo When you put it like that, it makes me look terrible.
 
Ell
I'm building llvm :D
 
Xeo
12:23 AM
Heh
 
@Xeo i did a thing with als, but that was because he was so coy about his identity, and his gender. and then earlier there was a thing about @deadmg in some discussion forum. but it never occurred to me to check his identity now, until he now told everybody how to do it... i'd delete that
 
@Xeo Well, if I was evil, I wouldn't have told them about it.
 
Probably wisest.
 
I'm just curious, I think.
 
Hi
 
12:25 AM
btw
here's what I've got as my string proposal so far:
 
That will probably be enough to make me sleep. Thanks. :P
 
@R.MartinhoFernandes lol.
@DeadMG looks nice. not gonna read it now though
 
@DeadMG i saw that. i liked the function pointers thing. but the main thing for strings, it think, is a standardized platform-dependent default encoding unit for Unicode
 
@Cheersandhth.-Alf I have that. std::unicode::string::encoding().
 
and corresponding std::basic_string instantiation (with char_traits)
oh
 
12:28 AM
and no
 
how do you avoid using callback classes?
 
basic_string and Unicode can't mix- ever.
basic_string can't maintain invariants which make it well-formed Unicode, because you could go messing with code units and stuff.
the interface needs to be codepoints, and then the implementation can be whatever it wants, as long as it's Unicode.
 
that's why there has to be a new class to deal with it
 
12:31 AM
Why not normal_form as template argument? I don't think runtime dependent normal form is interesting.
 
@R.MartinhoFernandes I don't feel that normal_form template argument is really important, and I do think that runtime argument is simpler.
I'd only force people to provide a value at compile-time if it was for a necessary purpose, really.
 
Hei guys, Do I need to use threads in a c++ cgi project?
 
19 secs ago, by R. Martinho Fernandes
Do you?
 
@sehe Shut up!
 
12:33 AM
@R.MartinhoFernandes Wut!?
Oh well. I'll delete it if things are that sensitive
@R.MartinhoFernandes Or was that just because I broke the combo?
 
:6088712 'cause they suck donky cock :)
 
@sehe Yes, it was because you were discussing it again.
 
I'm not that expert about threads... Actually I'm not even so sure about what they are, so what is the problem not using them?
 
@R.MartinhoFernandes Sorry - I guess.
 
12:35 AM
@Jeffrey It's your design, you tell me.
 
@Jeffrey hell, you didn't even say whether cgi is for web interfaces or computer graphics...
 
@Jeffrey The question should be: what is the problem you're trying to solve?
 
I'm just developing a c++ library for the web, for myself and to learn some more c++. It's just the first month in the c++ world...
 
Answer: you don't need to use threads :)
Or: you need to /not use/ threads
 
@Jeffrey My first advice would be to do something else for now. Second, if you insist on doing some CGI stuff anyway, do it without threads, and probably do at least a little looking at some existing web-oriented libraries for C++, such POCO, Wt, and CppCMS.
 
12:38 AM
Sweet. I edited this message after I deleted it: chat.stackoverflow.com/messages/6088736/history
 
btw
I'm really happy with the new C++ compiler features in VS2012
was kinda bummed when they shipped without any new major C++11 conformance features.
 
@DeadMG Haha, now you can play with the cool kids, huh?
 
@DeadMG We noticed. And you weren't alone
 
@JerryCoffin I'm not really serious on this. I just want to deal with things that are common to me: the web (I have like 5 years of PHP experience).
 
@R.MartinhoFernandes Initializer lists/uniform init and variadic templates will help significantly.
 
12:40 AM
@DeadMG It's the Microsoft way: VS 7.0 had almost no improvements -- then 7.1 was massive. Now, 2012 had nearly nothing, and what's may well be a ".1" will have massive improvements again.
 
@Jeffrey PHP is the worst language ever. The best thing you can do is do your best to immediately put it as far outside of your head as possible.
 
@JerryCoffin There are so many features, I suspect they projected to meet release, but had to delay.
 
@Jeffrey check out google apps. use python
 
@Cheersandhth.-Alf How will that learn him C++?
@DeadMG Well, I don't have much to comment. Actually, you probably know anything I might comment on: whatever deviates from my library :P
 
12:43 AM
@DeadMG, I know. What are some serious alternatives? I've been looking for them and I came across C++ with CGI and I like the idea but it seems that everybody that worked on that, moved to PHP...
 
Btw, I will only like expression templates when we have operator auto.
Someone should put that proposal out there.
 
@R.MartinhoFernandes huh. operator auto would do... what? Oh I think I see. Yeah.
 
@R.MartinhoFernandes Well, I think personally that it's a bit of a different use case. You're looking to produce something relatively detailed, I want something with a simple interface that works.
 
@DeadMG Could well be. They still seem to have a fairly consistent pattern of major updates that are pretty minor, and minor updates that are really quite major. Before the 7.0/7.1 update, another major update was in VC++ 4.2b (no, in this case b isn't "beta", it's just the version after 4.2a).
 
@sehe auto x = a + b + temp(); makes me an expression that refers to a temporary.
 
12:45 AM
@R.MartinhoFernandes can't do operator typename some_trait<T>::type() { ... }
 
Ahahaha no C++ CGI is not a serious alternative to PHP or anything for that matter
 
@Jeffrey C++ is not commonly used for web apps. If you want to do web apps in something that's not PHP, consider Python, Ruby, or ASP.NET MVC.
 
With this hypothetical operator auto, it would give me a string directly.
 
@R.MartinhoFernandes Oh. Well, that's another issue enitrely
@R.MartinhoFernandes Assuming your Unicode thingies?
 
@sehe No, that's exactly the issue operator auto would solve.
 
12:46 AM
@R.MartinhoFernandes Duh. That's obviously my point. You must have missed my prior message
 
@sehe No, just assuming a + for strings that uses expression templates.
@sehe Ah, yeah.
@sehe For my library I will just make a variadic concat function.
 
@R.MartinhoFernandes which makes me wonder, can one write operator typename some_trait<T>::type() { ... }?
 
of course
 
will it compile?
 
12:47 AM
@DeadMG, I know, I read a lot of articles about it. Ruby is very similar to PHP, ASP.NET is proprietary of Microsoft (I don't like proprietary things) and Python uses CGI anyway so... why not use the fastest language?
 
Ah. So many times C++ surprises me
 
@sehe Yes. Assuming an appropriate body, of course.
 
...which technically is C... but C++ is fast enough
 
@Jeffrey Because, well, it's not really designed for that and doesn't have many support libraries.
@Jeffrey Not for any modern C++ compilers, really.
 
cough. scroll up for rants on that particular subject. Let's say "C++ is fast enough".
 
12:48 AM
There's no such thing as "fastest language" and no, nobody uses CGI because CGI is horrible piece of shit
 
@DeadMG, That's why I'm trying to create one... dealing with some Content-type: text/html and some getenv() calls is not that big deal...
 
fair nuff
 
:psyduck:
 
but
 
mikhailberis.github.com/cpp-netlib <- includes implementation of HTTP.
 
12:49 AM
coding in C++ is quite completely different to coding in PHP
 
@CatPlusPlus it's basically... nothing. It's basically: "just write your own damn response, I'm not a webserver, I just collect a fee for each incoming request and make it slower" :)
 
you'll want to spend quite some time in the language before you want to think about concurrency
 
@sehe It's not the "write your own response" that's the problem
 
@CatPlusPlus you mean the process model? Didn't fastcgi fix that?
 
Yeah, memory leaks danger, pointers, segmentation and stuff...
 
12:50 AM
It's not CGI any more
 
I thought that CGI was just a standard for passing arguments over HTTP.
 
What. No.
 
@Jeffrey Bwahahaha. C++ doesn't have those things.
 
What.
I mean what.
Passing arguments over HTTP, what does that even mean
 
@CatPlusPlus query string, form data, headers, content data :)
 
12:51 AM
Also FastCGI is horrible, too
 
a means for encoding the data, which is then passed over HTTP, suitable to be interpreted by any web server.
 
@DeadMG ?
 
@DeadMG Nah, it's a standard for a webserver to interact with executables.
 
Right now the best 'standard' options are AJP or SCGI
 
@R.MartinhoFernandes O, ok.
 
12:52 AM
Or platform-specific ones
Like mod_wsgi, or Passenger.
 
@Jeffrey Memory leaks, segmentation faults, and pointer fun is for C code. We don't really have that in C++.
 
@CatPlusPlus what makes them > FastCGI? (I haven't done C++ web programming in ~10 years)
@CatPlusPlus Passenger rings python bells with me
 
They're more reliable
Passenger is Ruby on Crap
Mostly.
 
@CatPlusPlus Oh. That
@CatPlusPlus That's the association
 
Who cares about reliability. Just restart Apache every 10 minutes.
2
 
12:53 AM
@DeadMG, C++ doesn't have memory leaks caused by dynamic memory bad handled? What? Doesn't people use the heap anymore?
 
@R.MartinhoFernandes hehe. Did you watch the PHP Keynote I linked to earlier :)
 
Aaaaaa
 
@Jeffrey We have automated systems which guarantee, for the most part, the correctness of such operations, unlike C.
 
Ow. That's bad. You came up with such vile ideas on your own.
That's bad and you should feel bad.
 
12:55 AM
@sehe No. Rasmus said that a long time ago.
 
He's also a moron
 
@R.MartinhoFernandes It was also, much more famously, stated very recently.
 
Coincidentally
 
lol
 
@R.MartinhoFernandes Really. Did he actually... say... that?
 
12:56 AM
@DeadMG, oh ok. Thanks. Didn't know that. Another big problem with C++ is the string manipulation which is basically the core of any web app. For the rest you can easily create some GET POST COOKIE and session handler and there is Mysql drivers for C++ so...
 
@DeadMG By whom? Not Linus, that's for sure
 
@R.MartinhoFernandes just helps with the task at hand. c++ isn't really suited. cgi is very old and ungood.
 
@DeadMG Yeah, those seems to be the only deviations. The general idea is still there, which is the important bit.
 
Please stop please stop please stop
Okay, better idea, I'll just go do something else
 
@CatPlusPlus Close eyes. Problem solved. Or: imbibe more
 
12:57 AM
@Jeffrey Nothing wrong with string manipulation in C++ (for the most part, anyway).
 
(Mood still shitty, Dishonored still cool)
Imwhat
 
@CatPlusPlus It means to get drunk.
 
I tried it doesn't work
 
Imbibe, quaff, drink.
 
12:58 AM
@DeadMG, well I was used to trim(), md5(), sha1(), explode(), implode() and some other PHP functions that were useful sometime.
 
@Jeffrey lol
 
Also that's totally a hoax and not a word
 
rofl
@CatPlusPlus "Imbibe" is completely a word.
 
@CatPlusPlus lol
 
@CatPlusPlus latin much?
 
12:58 AM
Lorem ipsum nobody speaks Latin anymore christ
 
What's so funny?
 
@Jeffrey There are C++ libraries for cryptography (and they're way more secure than the PHP versions).
 
@DeadMG I don't believe you, you're in the conspiracy
 
@Jeffrey Most things have libraries.
 
MD5 is also not useful
 
12:59 AM
@Jeffrey What's so funny is that you're listing fairly trivial string handling algorithms I could replace in 20 minutes, and there are dozens of C++ libraries to deal with.
 
> imbibement (countable and uncountable; plural imbibements)
What.
 
the elephant in the room is that you have to replace them in 20 minutes :)
 
Meh, boost it.
 
There's no elephant, stop imbibing.
 
1:01 AM
@DeadMG, I know, it's not that hard to make them. Actually it's fun for me, that's why I've already created them somehow...
 
> imbibition
rofl
 
@DeadMG WTF.
 
room topic changed to Lounge<C++>: Imbibition every day [c++] [c++11] [c++-faq]
 
ah well
time for me to rest
night all'ya'suckaz
 
1:02 AM
That's a good idea.
I have things to do but screw them.
 
@R.MartinhoFernandes I frequently find using boost taking longer than to write it yourself. Sadly. This goes especially for tokenize type algo's I've seen. I'll only look at boost string algorithms et al. if I (a) need very advanced stuff (replacing by regex streamwise, e.g.) or (b) performance is of the utmost importance
@CatPlusPlus Imbibition inhibition exhibition
@CatPlusPlus Lightbulbs?
 
Bye and thanks for the talk...
 
s/the talk/all the fish/
Night all!
 
Xeo
@sehe And for everything else, you just write spirit parser. :P
 
@Xeo Precisely! (not really, but I'd be tempted to)
 
1:10 AM
hmm, my terrible vector swizzling implementation doesn't want to link
unresolved external symbol "public: struct vec2<int> __thiscall vec2<int>::yy(void)"
but it is defined, and compiled
 
@melak47 I have a deja vu, with you asking this question right?
27
Q: What is an undefined reference/unresolved external symbol error and how do I fix it?

Luchian GrigoreWhat are undefined reference/unresolved external symbol errors? What are common causes and how to fix them? Feel free to edit/add your own.

@melak47 also: note the
75
Q: Why can templates only be implemented in the header file?

MainIDQuote from The C++ standard library: a tutorial and handbook: The only portable way of using templates at the moment is to implement them in header files by using inline functions. Why is this?

 
@sehe last time the file contianing the function in question wasn't actually compiled
 
@melak47 I posted my Vector2 swizzling back in this chat a moment before.
 
@ThePhD yeah. this isn't a good swizzling :p
 
This confuses me:
T x,y;
union {
T u,v;
};
Doesn't that still declare UV after XY, making it 4 T's long in size?
 
1:25 AM
yeah that's err, not exactly right
 
^ I wonder if i'm silly here, or is it perhaps better than a project configuration? to have it all in source code, like?
 
@R.MartinhoFernandes Hey, I looked at teh declaration of your using DisableIf, but I don't understand how to actually to use it as a using statement. From that article you linked before (rmartinho.github.com/2012/06/01/almost-static-if.html)
So far trying to use it by itself seems to be okay, but trying to declare it in your style as a using statement seems to go awry.
with errors like 'error C2988: unrecognizable template declaration/definition'
 
@Cheersandhth.-Alf I like it. mainly because I don't dig MSVC solution/project files. Using make I'd just specify it in the CPPFLAGS
 
@ThePhD I think I want this instead..
union thing {
struct { int u,v; };
struct { int x,y; };
};
blergh. how do you multiline code quote
 
@ThePhD MSVC doesn't have template aliases yet, IIRC. So no way it can work
 
1:30 AM
@melak47 Right, but problematic, because you'd have to do vec2.thing.u
 
@ThePhD nope, because the structs are nameless
 
@melak47 Hit the 'fixed width' button
 
@sehe Ah, thanks. I was going to try and bruteforce fix it, but that saves me some time.
... There's a 'fixed width' button in this chat?
 
@sehe the what? what's it look like?
 
Where?
 
1:31 AM
@ThePhD only on multiline edits
 
press shift+enter to get the button on a new message :)
 
May 7 at 14:03, by sehe
@stdOrgnlDave Depending on what you're quoting. Single line, text, use >, multiline code use 'Fixed Width Font' (or manually indent 4 spaces)
 
@sehe it stripped my spaces :(
 
@melak47 the hit it harder. It doesn't. Strip the spaces.
Note it's a toggle, so hitting twice removes fixed-width style
 
Or just press Ctrl + A, Ctrl + K
 
Ell
1:33 AM
I wonder how much 2gb of ram Would cost for a smart phone
 
@Rapptz Never knew that worked in chat
 
Ell
Then all applications could be in memory at once as well as other stuff
 
viruses. I wouldn't be surprised if mobile processors can't really handle/address >1Gb efficiently. Yet?
 
@sehe It does.
 
https://play.google.com/store/devices/details?id=nexus_4_8gb&feature=device-featured#?t=W251bGwsMSwyLDIwMiwibnVsbC13ZWJfaG9tZV81MDAwMDA1X25leHVzQ0FfZGV2aWNlc19DQV9fNTAwMDAwNV9uZXh1c0NBXzFfcHJvbW9fMTM1MTg3NzIzNzM2NCJd
The nexus 4 has 2Gb of RAM
 
1:35 AM
int main(int argc, char* argv[])
{
    return 0;
}
woo, finally
>_>
 
@melak47 int main() {} // FTFY
 
@sehe not very good for testing multi-line code quotes :p
 
:)
 
@melak47 Pssst. You should use my vector implementation. :3c
 
maybe :p
 
1:37 AM
You know you waaant toooooooo
 
@sehe I started with everything in vector.h
 
@melak47 you can simplify that, to int main(){} (which means the same)
 
but then I ran into trouble, because vec2 needs vec3, and not just a pointer to one but it needs the constructor, so forward declaration doesn't suffice, does it?
 
How come I can Tab everything, but I can't "untab" everything.
 
@Rapptz ?
shift+tab?
 
1:39 AM
(master of losing context)
 
I love you.
Thanks, I've been wondering how to do that forever.
 
guys.,what would be the binary representation of "short a = -1;"
 
@AnujKaithwas Typically (i.e., in two's complement) 1111111111111111b. In one's complement it would be 1111111111111110b, and in sign/magnitude, it would normally be 1000000000000001b.
 
can you explain why that? because as far as i know, it is to be stored with a signed bit turned on in memory
and short a= 1 would be 00000001
 
Ell
The smallest addressable unit is a byte
 
1:46 AM
@AnujKaithwas Yes -- well, 15 zero bites, then a 1 bit.
 
so shouldn't it be a 1's complement and added one to the unit's place?
 
@AnujKaithwas Yes -- and if you look at my previous message, that's exactly what it is.
 
and which one is the currently used notation?
1s or 2s?
 
       1 = 0000000000000001
1's comp = 1111111111111110
2's comp = 1111111111111111
 
@melak47 You can forward-declare all headers and only pass vec3 by reference
 
1:49 AM
@ThePhD but I still need the constructor
 
yeah i know that. but i am asking which one is used nowadays, because i read that 1's complement screws up addition?
 
@AnujKaithwas For integer types, 2's complement.
 
@melak47 Nope. references and pointers need no definition of constructors.
 
@ThePhD yes, but if I want to create a vec3, I need the constructor?
 
@AnujKaithwas Doesn't really screw up anything. It just has 2 different bit patterns for 0, so when you compare to 0, you need to account for different bit patterns being mathematically equal.
 
1:51 AM
@JerryCoffin Thank you. and also, are you aware of the float reperesnetation that is:
(-1)^s.XXXXX^2(exp-127)
 
@JerryCoffin Which is why 2s complement is used in computers. afaik
right?
 
@melak47 Yes. You forward declare vec2, vec3, vec4 in a base header file. Include it in all the headers of vec2.h, vec3.h, vec4.h. Then you only use vec*& in your definition. Finally, in your vec2.cpp, vec3.cpp, vec4.cpp, you use the constructors and include the relevant .h files.
 
@AnujKaithwas Yes.
 
vec*&, where * is 2, 3, 4
 
@Borgleader Yes, on most current machines it is. I've used machines where it wasn't. Also note that floating point doesn't usually use 2's complement for the significand though.
 
1:52 AM
I don't get it, how does it explain float.
you see, float is 4 bytes, and the first byte is a signed bit, hence (-1)^s
right?
and i don't get the latter part
 
@JerryCoffin Yeah I was only speaking for integer types. Floats/Doubles I know the general pattern but not the specifics and so far it's not something I feel has hindered me.
 
@AnujKaithwas A floating point number is stored in base-2 scientific notation -- e.g., similar to 1.234x10^56, except that the significand and exponent are both in binary. It's normally arranged as sign bit, then exponent in bias format, then significand.
This arrangement means if you compare two floating point numbers as if they were integers, the ordering still comes out correctly.
 
say i have a float f= 7.0, then how would i write that in base 2 notation?
1.25x2^2
and if so, what would be the binary representation as per float? @JerryCoffin
 
@melak47 Is it working out for you?
 
@ThePhD I'll need to poke around some more
 

« first day (751 days earlier)      last day (4196 days later) »