« first day (11 days earlier)      last day (5159 days later) » 

00:00
lol.
"value" being a more restricted term (according to memory), but all objects denote values when used in expressions...
Just when I thought I understood what they meant too.
00:16
Rather obvious error, though.
Anyone happen to be familiar with luabind and VS2010?
Lua and VS, but not luabind
00:31
do you use any kind of binding library ?
my own
I'm messing around with several to determine what will be right for my project
ah, i see
not having much luck with luabind so far though. I'm really trying to not re-invent the wheel as this is a large project and the time will be better spent elsewhere
01:18
I do the dumbest crap sometimes.
I just stared at a light for a second, now I can't see. :|
01:45
how does C++ evaluate (mystring1 < mystring2)?
length of mystring1 & 2 is the same
@neversaint: str_a < str_b more or less does the same thing std::lexicographical_compare would, but it actually depends on the char_traits class
@neversaint Hey. mystring being a std::string?
In mathematics, the lexicographic or lexicographical order, (also known as dictionary order, alphabetical order or lexicographic(al) product), is a natural order structure of the Cartesian product of two ordered sets. Given two partially ordered sets A and B, the lexicographical order on the Cartesian product A × B is defined as :(a,b) ≤ (a′,b′) if and only if a 1a2 ... ak appears in a dictionary before a sequence :b1b2 ... bk if and only if the first ai which is different from bi comes before bi in the alphabet. That assumes both have the same length; what is us...
ok so if mystring1 == "AA" and mystring2 = "AC"
(mystring1 < mystring2) == TRUE
right?
01:48
the first character is the same, so it continues to the next; there 'A' < 'C', so you get true
whenever it moves to the next character, if the first string is at the end (i.e. it has no next character), then unless the second string is also at the end, the first will be less
don't you hate posting a comment only to see someone else did first but after you loaded the page? :P
yeah lol
I converted into an answer anyway; if I hadn't commented, I'd not have been beaten :( another possible enlightened down the drain
:(
02:02
using chat as a chrome webapp works fairly well
@IloveJRR: nice questions
@RogerPate Did you see the auto_cast thing?
Ah, was wondering if you'd consider it evil or not evil: blackninjagames.com/?p=111
I actually have you in my feed reader, but I'm way behind :(
Aw :(
I just realized my blog is fekkin tough on the eyes.
02:12
in Lounge++: The NB Memorial, 12 hours ago, by Roger Pate
I generally dislike extensive type-system manipulation, but I can't really see how this use of it falls apart (though Out's methods may need to be looked at more closely, such as op=)
at a glance, my dislike of type-system manipulation tells me this is a bad idea
Ah, lol.
This isn't the first time I considered such a utility (was recent, though), but I decided against it. Reconsidered now that it had a use, but seems pretty corner-case-ish
my answer would say, "**no**, write the extra line or use an exception"
which is just new T()
02:29
@GMan: re auto_cast, don't you need another overload with T&&?
@RogerPate Hm?
what happens when I pass a non-rvalue?
Into auto_cast? T will be deduced to be T&, and T& && collapses to T&.
what happens when I pass a T const non-rvalue?
Example? Having trouble following.
02:35
that gives mX a type of T const&, right?
which you can't move()
I'm still hazy on rvalue refs and std::forward
Oh, you know what. It was meant to be...this. (Edited.) Does that clarify? (It's what I intended, forgot. Same with SO post.) I think that's correct, I'm hazy too. Basically it just references whatever it was passed long enough to cast it to something else. (Temporaries would last long enough for it to work.)
I'm not sure if mX(pX) should be mX(std::forward<T>(pX)), I don't think it does since it's a reference type getting initialized.
temporaries are rvalues, so that part is fine
:46233 that too
you could also prevent storing a wrapper object by making the ctors private and auto_cast a friend
Ah, good idea.
well, slightly cleaner in some ways, dunno about good :)
preventing things which you have to go out of your way to abuse rarely helps
but I'm not sure you would have to go out of your way to abuse it that way
Yeah, had a tiny argument with that recently about macro's. If you needed a temporary in a macro, for example, is it reasonable to identify it with _macro_name_temporary_ and except that to be good enough?
He was arguing that's still possible to break if someone else happened to use that name. I said that's just dumb.
02:46
add ##__LINE__ and it should be enough
well, assuming your macro names have a project prefix which you include in the variable name
(Er, yea. This was within a new scope, assumed it here by accident.)
@WinstonEwert: (re profile) python ftw
Then said in a RL case, someone else was writing their own macro, saw that was a "good temporary name" so copy and pasted it. Then if you nested the macro's, it would fail. I said that's just a dumb programmer, not a bad macro. He should have used the convention in place, and like you you said the convention should have enough uniqueness to not conflict those names.
Also, updated the blog post. Like that?
yeah, I can shoot myself in the foot, but that's no reason to deny me a gun
a real, actual gun that really, actually shoots me in the foot, that is
lol
02:50
nice, and you did it correctly by defining in the class def :)
:]
@RogerPate
what we need is template<class T> auto f(int x) { return T::long::complicated::inner::type(x); }; i.e. without ->
you need three characters to notify; hi @ewa
24
Q: How do comment replies work?

Roger PateHow do I respond to a specific user when entering my comment? Will they be notified? Related: How do I view my recent replies? Return to the FAQ index

look at that, it's a buddy christ avatar!
02:54
@RogerPate As long as it's not say a howitzer your trying to shoot yourself in the foot with. And sorry, I was having trouble doing it all on the keyboard and the javascript being slooowwwwww.
yeah, this webchat is a nice idea, but completely in the wrong direction
hopefully that gets working soon
@Roger lol. And yea, that would be awesome. It was brought up a couple times on comp._.c++, can't really find anything official though.
I was *horribly disappointed* when the 'auto' revamp didn't include that :(
and markdown parsing has another bug
what I really want though, is auto f(auto a, auto b) { return a + b; }, where the auto parameters automatically make it a template<class A, class B>
Ah, that would be sweet.
That wouldn't be too hard, would it? auto in the parameter could just be sugar for template <typename __a__, typename __b__> auto f(__a__ a, __b__ b), as far as I can tell.
the next step is making auto assumed for parameters and #define def auto... which gives def f(a, b): return a + b
02:58
looooool
I don't know of any technical hurdles (besides compiler implementation, though the above should be rather easy in comparison), just social ones
:/
Maybe in C++2x
the auto return type without -> is a bit harder, since you're defining the return type based on the function body and the function could be called recursively, among other issues
So the compiler would need to recurse to solve it?
it could be undecidable
03:06
I know that's a result from computer science (the whatever-long-name problem?) but is there a simple concrete example?
the return type can't change and you could have overloads of the same function name plus what to do about user-defined conversions, ...
Ah :/
simple example for this issue? not off the top of my head
I see. I'll believe it's probably quite hard then.
though -> return types have to deal with recursion and overloading too, don't they?
03:12
Hm, I think there was a question on that somewhere...can't remember the conclusion though. Search time.
template<class A> auto f(A a) -> decltype(f(a+1));
let's assume, to make it easier, that A is a UDT with a very unconventional op+
so a+1 could be any type
and f could be overloaded
(I was wrong, I was thinking of this. Draft time.)
That should still be doable, though, shouldn't it?
I'm not sure, it's worth looking into
btw, you can leave out empty parens in lambdas: []{...}
Yeah, tiny habit I need to kick.
The compiler would obviously be able to make the call f(a+1) within the function, and know the type. I don't see how moving that just outside changes anything.
it can make the call within the function because the return types of overloads of f and f itself is known at that point
what happens on f(42)?
03:20
Ooooh, right.
I may have been chasing a red herring on the unknown types, since as long as they only depend on template parameters, they can be resolved (no matter how long it takes) once the function is instantiated, and instantiation doesn't require the return type of f at that point
that leaves only recursion
but that can be indirect recursion depending on the exact type of A
now I suspect that's simply disallowed; e.g. a required diagnostic if the decltype depends on a recursive call (i.e. the exact same instantiation) in any way
yea
03:48
I just discovered that the team rolled out chat on SO.
It's nice to see a reasonably large number of C++ coders here :)
Hey all.
What's the difference between this room and the C++ room?
the room owners are around, so we can pin messages and manage feeds
and change the room description
other than that, the biggest difference is we're here and not there :)
@RogerPate: I'm actually there, but my clone is here...
Lol.
Whatever works :P
he looks just like you!
Who does?
I'm getting frustrated with this CGI business... the php-cgi binary is really being picky when it comes to POST requests.
03:58
:46440 his clone
geez, it got late quick
retagging is mindless
Is there any raw/vanilla implementation of DeBruijn Graph I can use?
in C++
04:41
@Roger Maybe we should change the title to Lounge++ : N.B Memorial. The ++ isn't prominent enough, I think. (Maybe just while the beta C++ chat is still alive.)
@Roger: Alright. Just checking for immediate objections.
np, none from me
I took a shot at a less generic description too.
Wow, that's nice
maybe we should include the Andrei Alexandrescu's presentation about ranges?
is there a way to share links to an entire room?
05:03
@Dra Paste it, you mean?
05:13
My latest annoyance with php-cgi:
1
Q: How to pass POST data to the PHP-CGI?

George EdisonI am trying to create a small webserver that interfaces with the php-cgi binary. However, things aren't going so well. The php-cgi binary correctly handles GET requests. When it comes to POST requests, the $_POST array is empty, even when things are getting POSTed. I've checked the HTTP headers ...

I have had nothing but trouble with this in the past :P
Why do some stars on the right show up filled in and others do not?
Because the ones not filled in are posted by the owner.
(Just discovered that by looking at the page source!)
@George: I think that's coincidence. @JamesMcNellis To the best of my knowledge, because they are pinned.
For example, I'm going to star your message.
So there we see it not filled in.
05:20
Weird... :P
So I'll pin it, and it'll be hollow.
Yes; I just pinned the message of you admitting you do dumb crap and it changed.
Haha.
Whoa, can owners forcefully remove all stars?
It appears so.
Coolio
wb btw
So what's going to be our criteria for a pin? Really useful resource?
05:25
Yeah
I've never read this Cliff Clock article. Is it any good?
Dunno, was going to read it tonight.
he's a Dr! Sure to be boring
jk ;)
Dr. Seuss wasn't boring!
One pointer, Two pointer, Void Pointer, Null Pointer
Haha
05:27
Thought you were The Count for a second
Oh the Places You'll Go(to)
I can't C++ize any of his other book titles; </poetry-fail>
haha.
Green bools and std::ios_base::Init
lol
We make up our own poems
FOUR seconds Pate? I hate.
:46717 The octosyllabic std::ios_base::Init doesn't have quite the same ring to it as ham... :-P
05:32
I can see jAmEs counting out the syllables.
:46727 :(
:46726 and my answer is more detailed!
Lies!
truth! I have 142 lines of example code in mine!
No, you have a link!
05:34
@GMan: You need a shorter Ethernet cable.
same thing
5
A: Maximum/ ideal length of ethernet cable?

Joel CoehoornThe ideal length is exactly as long as you need (up to 100 meters) and no longer. Every extra 11.9 inches adds another nanosecond of extra latency.

that won't help, I'm currently on a 50ft ethernet cable
:46685 It's not an article -- it's a video with accompanying slides. I didn't see anything really revelatory.
@James: lol. @Roger: Fine. :) I'm leaving mine for the use-rationale.
05:36
@JerryCoffin: I've found it very enlightening for new programmers, but once you know asm, not so much
:46750 Ah, it's a video... well, that pretty much ensures I won't see it.
@James What's wrong with videos?
the idea was to unpin it in a few days, but I had just mentioned it before creating the room, and wanted to set a tone
:46759 They take way too long to watch. I can read an article much, much, much faster.
@James: Ah, I know what you mean. But articles have so many of those word things on them.
05:38
agreed; I do like talks though
:46752 I should probably add that I'm rather biased against videos of technical content -- they usually take a lot of time to say very little in a highly forgettable fashion (and this seemed to fit that pattern).
:46764 Some of those words use capital letters too.
ah, well, it's not so much technical content and I can't imagine anyone referring back to it
:46765 If they are good talks, yes. Herb Sutter's "Effective Concurrency" seminar was spectacular and I learned a lot more from it than from his article series.
Well dammit I'll still watch it :3 Because I'm a newb.
05:39
but it's useful to get a better mental model of the underpinnings that is usually lacking in c++ programmers
@James How much of that series have you read? I've been trying to get through them, but if the talk is that much better and covers the same stuff, I'd rather do that.
:46774 All of it. The talk wasn't videos; it was a weeklong seminar.
:|
meatspace sucks, all that travel
Yea.
05:43
It worked out well for me; I ended up getting a new job and moving because of it :-P
congrats
to the best damn state no less
even the same city i go to school, you creep
:46792 It's still raining outside.
:)
Hell yeah, I love the rain. Sad it didn't storm more though :(
If my main program and the DLL has the same global variable name and type (exported), at run time when the DLL is loaded using LoadLibrary, will they be resolved to the same variable?
user366076
05:55
Hi , I have a small question ... If my main program and the DLL has the same global variable name and type (exported), at run time when the DLL is loaded using LoadLibrary, will they be resolved to the same variable?
:46821 No -- if you use LoadLibrary (instead of implicit loading), all references to the DLL need to be explicit.
user366076
Thank you
:46838 Sure, no problem.
user366076
I have this question because , I succeeded to do variable sharing under Linux, between shared library and main by declaring extern var in the shared library and the concrete variable definition of var in main , but this tricks seems not working under Windows
Are there a lot of Linux/Unix C++ programmers here?
06:01
Has anyone in here read Stepanov's Elements of Programming?
I give up trying to italicize that.
@GeorgeEdison, @JamesMcNellis: just ask your real question and see if anyone can answer :)
Testimonials look impressive.
It's denser than a black hole.
@Roger: I don't have one... just curious.
@JamesMcNellis: known issue
@GeorgeEdison: I'm on ubuntu, but most of what I do isn't platform specific
06:03
@AndreyT: Did you delete your response? I edited the question in OP and was not sure if I deleted it accidentally...
I'm on Ubuntu too, of course.
I make liberal use of Wine for cross-platform testing.
For the really important stuff, I dual-boot Windows Vista.
^---- really really really slow :)
I still have my winxp license (the last version I used), so I'd use that in a VM
:46851 Thanks.
user366076
I am working on some cross-platform programming
06:05
[ *Elements of Programming* ](http:/⁠/www.amazon.com/Elements-Programming-Alexander-Stepanov/dp/032163537X)
Oh asterisks. I always use underscores.
Chubsdad
@AndreyT: Did you delete your response? I edited the question in OP and was not sure if I deleted it accidentally...
:46844 I've read a fair amount, but definitely not all. It's tough going, and after a first try (from which I learned nearly nothing) I realized that you have to work the problems to get much from it, and they get to be tough going.
:46865 asterisks vs underscores should be the same, it's the spaces
:46866 I don't think AndreyT has joined the party here yet.
06:10
Argh! This is driving me nuts:
1
Q: How to pass POST data to the PHP-CGI?

George EdisonI am trying to create a small webserver that interfaces with the php-cgi binary. However, things aren't going so well. The php-cgi binary correctly handles GET requests. When it comes to POST requests, the $_POST array is empty, even when things are getting POSTed. I've checked the HTTP headers ...

(It doesn't have too much to do with C++, I'm afraid... but the application I need it for does.)
@GeorgeEdison: can you read stdin and pass it through to the parser, as a workaround?
:46867 Ok, thanks. I'm just trying to decide whether to commit the time to reading it; I figure it will be a major undertaking. I'm not much into heavy theory stuff, but the book looked really, really interesting.
@Roger: Pass it through what?
(doesn't php have a parser for www-form-encoded in its stdlib?)
I've been mucking around in the source to find out :P
06:12
I just mean pass it as a regular variable
What variable?
with CGI, you read from stdin for that
and if php is doing something wrong (I haven't touched php in 7 years), you might be able to do it yourself
Chubsdad
@James: Isn't there a +1 for chat comments? Would have given one to you for 'party'...
@Chub: there's a star.
@Roger: The problem is that I'm writing a webserver that interfaces with the PHP binary via CGI.
...and PHP doesn't see the POST data somehow.
don't know what to say, reading stdin was my only avenue
06:15
Mine too :)
It's gotta be an environment variable of some kind...
you can test the cgi as a normal process, e.g. redirect stdin from a static file, for testing, so you don't conflate the issue with your program that's still in development
(that's about the only advantage of cgi)
I know... but I don't even know what the problem is... so I wouldn't know what to do differently.
Priceless answers :)
Elements of Programming sounds right up dijkstra's alley
@Roger: I found something interesting: there's a php.ini directive always_populate_raw_post_data... hmmm...
php is so screwed up; just in general
I have absolutely no idea how to write a programming language, I just kept adding the next logical step on the way. -- Rasmus Lerdorf
LL(1) is for grammars, not design
Chubsdad
@George Edison: Oh vow!. Thanks for pointing it out.
@Roger: That's why I like C++ :)
But PHP's popularity is why my webserver needs to support it.
(Don't worry, my webserver is written in C++ and uses Qt.)
06:52
this guy is just fucked, through no fault of his own
0
Q: ADT - Iterators - operator ++

icelatedThis isnt a homework question. I took data structures at a Community College and now that i am at the university i talked to the teacher about there data structures class. Now, since its really different and the class i took transferred, He gave me one of there assignments and said play with it. ...

being given a confusing java-like model to learn c++ data structures...
Last time I do the notification in the old C++ room...
@Roger: Haha, oh dear.
just invite people here and don't spam that room
But ascii text is far superior
also, he was replying to someone that hasn't yet been in this room and so wouldn't get the @notification
in Lounge++: The NB Memorial, 5 hours ago, by James McNellis
@Chubsdad I don't think AndreyT has joined the party here yet.
07:12
ya
:46964 You have a good memory; I think those were my exact words!
lol
yeah, but the markdown to format it like that is a bitch
07:45
is the result of type_info::name guaranteed to be the same for all type_info instances that compare equal?
is it a char pointer?
(I can't recall because I never use it)
:47042 No.
@Roger: I think so. Let's see.
@James: Oh. :(
I never use it either, I just happen to need a type map, and the default RTTI name will do
when creating pointers to objects in function scope, best to use shared_ptr or unique_ptr?
what do you mean by in function scope?
07:55
Depends if you intend on sharing it or not. Do you mean they're local to the function? Then a unique_ptr, since that function holds unique ownership.
well its a bit tricky, not sure if it is shared
:47052 Yes. And @James is right, it's totally implementation-defined.
100% (Edit: I mean it's 100% implementation-defined, not I'm 100% right)
it is a pointer I create within the function, yes, but it is an iterator which will iterate over items in the collection, and return a string version of the item to the caller....
Not even that tiny wittle guarantee.
07:58
I just had to find out if it was a char pointer (the pointers wouldn't have to be equal) or a std::sting (might not be the same object, but would be equal) :)
@Roger: Oh, then you revealed me asking the wrong question. I was really asking will the strings compare equal. Even so, I still think that's implementation-defined.
@Tony: Can you show us any code?
the strings should be equal...

« first day (11 days earlier)      last day (5159 days later) »