« first day (1006 days earlier)      last day (3958 days later) » 

6:00 PM
would it be possible to write a language so generic it could be totally different in style and capabilities depending on the "library" defining the real rules?
as in, postfix, infix, parentheses, no parentheses, braces, operators...
 
huh do any of you guys work at the big G ?
 
@EiyrioüvonKauyf The what?
 
the acronym for Google it seems
 
Could also mean "government".
 
Xeo
Binding of Isaac for 1.24€
 
6:05 PM
first time I've heard google being referred to as the big g.
 
I have an open door and a window with wind blowing through.
It's movements baffle me.
 
@Xeo Too bad I already have it.
In fact, I have it twice. Except the second copy is called The Legend of Zelda.
 
@rubenvb Katahdin.
 
The Katahdin is a breed of domestic sheep developed in Maine, USA, mostly in the second half of the 20th century. This breed was originated by Michael Piel who after reading an article in the February 1956 National Geographic imported selected St. Croix sheep chosen by Dr. Richard Marshall Bond Director of the Virgin Islands branch of the U.S.D.A. and crossed them with various other breeds, selecting lambs based on hair coat, meat-type conformation, high fertility, and flocking instinct. The Katahdin sheds its winter coat, and so does not have to be sheared. Its popularity in the USA has ...
But I guess you mean chrisseaton.com/katahdin
 
@DeadMG What do you mean by iterator invalidation? How would that impact move-as-copy?
 
Xeo
6:13 PM
@EtiennedeMartel Is that supposed to be a jab at one of the games? And, in which direction?
 
@Xeo The most recent game, of course. I mean , you can't rip off in the future.
 
@rubenvb Lua, to some extent
 
Xeo
@EtiennedeMartel Yet.
 
The Kathadin thing is cool
 
@rubenvb There were quite a few of them right after table-driven parsing was invented. Most are long forgotten (for what I'd consider good reasons). You end up having to specify a meta-language that defines the syntax for the language you're doing to use. In theory you could do the same with that, but at some point you need a language the compiler can parse -- and that has fairly fixed syntax, and ends up as the "real" language, and the rest is just eDSLs.
 
6:17 PM
But it's funny how he talks about "different languages, different runtimes" when he allows katahdin to draw in other languages' code, which means their runtime as well.
@JerryCoffin yeah. It would allow a single mighty compiler thing to parse both C++ and QML (very bad example, but I think you already know what I meant).
 
I'm going to see if I can manually update HgSccSource to work with VS 2013 preview.
My engine already builds and runs in VS 2013 Preview.
 
I mean, C++ templates are ab/mis/re-used to do a variety of things, among which metaprogramming and some functional stuff. It would be nicer to have a domain of the same language that allows you to go easy on the syntax.
 
I'm not sure if Clang will survive the trip, though.
 
@rubenvb HsLua for Haskell allows syntax changes by adding libraries
 
@ThePhD So you stripped out all decent C++11 language usage?
 
6:19 PM
@rubenvb VS 2013 Preview has all the C++11 language uses.
And it fixes a bunch of variadic mess from the CTP.
 
@ThePhD I ICEd it in 15 minutes.
 
ICEd?
 
and the braced-init lists are quite broken
 
@rubenvb Based on what was done then, it turns out to be fairly easy to implement a compiler that supports arbitrary syntax (basically use something vaguely yacc-like as the input) but an absolute nightmare to use it (i.e., writing your own grammar for the language you want). It's also generally painful to specify semantics and how to associate them with a syntactical construct.
 
@ThePhD Internal Compiler Error
 
6:20 PM
Well, Id on't use braced-initialization, so I'm okay.
But, it lacks using, =delete (I think), =default (I think), and a few other things.
 
@rubenvb Yeah, but yeah.
 
But I wasn't using those features to begin with, so.
Really, this is just an improvement over the CTP.
 
:lol: "It has all C++11 features, except the ones I don't use obviously"
 
Which si why I want it.
@CatPlusPlus What I meant was it has all the C++11 language uses that were in the CTP. I should have been more specific.
 
@JerryCoffin yeah, that's what I'm afraid of... to spell out the grammar and have it work in a user-friendly way is quite difficult to do in another "language".
 
6:21 PM
Fuck activity lifetime in Android.
 
@rubenvb Yes, it is still a preview -- but it's definitely a substantial improvement over the November CTP.
 
It's magical as fuck.
 
@ThePhD Nope, it doesn't. Variadic templates are still borked and braced init lists are terrible.
 
@rubenvb Still? What variadic templates break for you?
Mine seem to be okay... at teh moment.
Also, yeah, initializer_list and braced-init-lists are mega-broken.
STL already fixed the initializer_list stuff, though.
Not sure fully about brace-initialization.
 
6:23 PM
Again, though, I'm still programming like I'm under the CTP, with a few extra goodies.
 
It's @Xeo's trick to not have to recurse over the variadic template args.
 
Ooh.
 
@CatPlusPlus haha, I am glad I am not the only one who thought that.
 
Xeo
That's aggregate init, FWIW
 
6:24 PM
Yeah, I don't do such Wizardry.
 
:)
Well that was me showing it to you.
 
I thought about making a list of random useful tools, so maybe I'll use it.
 
user142019
6:27 PM
> Resume compiled from LaTeX
 
user142019
I like that one. :3
 
How would they know?
Do you LaTeX watermark your resume?
 
You know when you see one.
 
@ThePhD You can tell a Word from a LaTeX. Oh, and the PDF says so.
Somewhere in the metadata.
 
You really only need to look at it.
 
6:28 PM
someone competent only needs to look at it
that's a flaw in your reasoning
 
somehow componetent?
 
s/compenetent/competent
 
PENANCE.
 
sorry I was bitten by radioactive spider
 
6:29 PM
lol
 
… or C++11 variadic templates. Then we don’t need the horrible iostream chained operator hack any more. — Konrad Rudolph 2 mins ago
 
Do you guys imply that latex CVs look better or worse?
 
@KonradRudolph do you think that cout << idiom should be changed to cout(variadic call)?
 
user142019
@ThePhD If it's a PDF and it looks good, it's from LaTeX.
 
user142019
Otherwise it's from an inferior tool.
 
6:30 PM
@rightfold bullshit
 
I made a CV in LaTeX and never used it :/
 
but I didn't really expect a valid argument from you anyway
 
lol valid argument from rightfold
 
@BartekBanachewicz Yes, but more importantly I think that if the first version of C++ had had variadic templates then this would have been used.
 
@BartekBanachewicz I have a variadic call forwarding every arg to a cout << chain in my code currently :P
 
6:31 PM
Clearly, openoffice is best word document compiler.
 
@BartekBanachewicz And actually probably not this … more something a la print_formatted(cout, …).
 
Just write CV in notepad
 
@KonradRudolph but it still'll use operator<< inside, right?
 
@Abyx No why?
 
user142019
@TonyTheLion Vim.
 
6:32 PM
 
@TonyTheLion physical notepad. handwritten 100% baby!
 
@KonradRudolph we could use it in C++17
 
@KonradRudolph how do ostream know how to print my Foo type?
 
You know, I'm really not sure why the bitshift operator was chosen for overloading.
Why was that convention created in the first place?
 
@Aboutblank yea why not
 
6:33 PM
Note that format strings actually make translation better
 
Why not just chain functions?
 
@Abyx … the same it does now, via overloading. Just why would it overload an artificial operator if chaining is no longer required, instead of a function format_value?
 
@ThePhD because parens
 
Because the order of words and variable replacements might change per language
 
@rubenvb That's why .NET's String.Format takes a format string and uses {0} and such.
 
6:34 PM
@KonradRudolph uhm... but overload what? to_string?
 
You can shift those {0} around in the sentence and change words and it'll work out pretty well with a language processor or just in general, when a translator is working.
 
@Abyx For instance. But writing directly to the stream might be a better idea
 
@ThePhD yeah, but that inevitably makes type checking a runtime thing.
 
@rubenvb euh there needs to be macros and a shorthand language for that -.-
too much text reminds me of manually typing out html5 eww
 
6:34 PM
@ThePhD printf can do that too
 
@rubenvb std::cout << doesn't help either.
 
@BartekBanachewicz POSIX extension.
 
@ThePhD it does, it's just that the current std overloads suck (see char vs int8_t)
 
ow snap.
 
user142019
Hhahaaaaa.
 
user142019
6:35 PM
Dutch television.
 
auto&& wc = std::wcout;
wc << crap;
wc.flush();
 
user142019
"The Friesian association for housewives, consisting of one MILF and one non-MILF."
 
@melak47 auto&& wc = ...
 
@KonradRudolph operator<<(ostream&) is same as print(ostream&) but it doesn't reserve the name "print"
 
@rubenvb Does one resolve differently that another? =[
 
6:37 PM
Fix it if you want stars.
 
@ThePhD no, both print the ASCII character, which IMHO sucks.
 
@R.MartinhoFernandes fine :p
 
probably for same reason people what an operator for swap
 
@Abyx It has a retarded, unintuitive syntax. Do you routinely overload operators for new things instead of using descriptive identifiers?
 
@rubenvb int8_t is just a typedef, isn't it?
 
6:37 PM
^ yes
 
@ThePhD what isn't? ^_^
 
@ThePhD that's one of the problems.
 
@KonradRudolph no I don't. but I don't write the standard library
 
There's so much wrong with iostream it's not even funny. Thing is, there is almost no way around it without resorting to printf.
 
@Abyx I think it’s telling that no modern language emulates C++ in this regard, instead all implement some (type safe) version of printf.
 
6:38 PM
@rubenvb Yeah, you'd need a stronger typedef or just another internal type.
 
@ThePhD strong typedef's ftw!
alias vs type
 
i'm pretty sure printf isn't in the actual spec no?
 
Dammit. The FreeForm thing is written in Java. Insta-hate.
@EiyrioüvonKauyf printf is C, C++ includes the C std lib.
 
And I doubt C++ Committee is going to standardize strong typedef as an actual mechanic, but they also will probably refuse to make int8_t it's own type too, so.
 
6:39 PM
i mean it's not in the C spec either
 
You're fucked all around.
 
> This is by design.
As seen on Connect.
 
Xeo
@ThePhD Strong typedefs have been in the talk
 
@rubenvb nvm it is
 
Xeo
The problem is, that everyone wants them to do something different it seems
 
6:40 PM
@ThePhD It doesn't have to be char.
I blame the implementations for taking the lazy way out.
 
Xeo
It's unclear what functionality they should exactly provide.
 
@R.MartinhoFernandes What do you make it? short?
 
@Xeo type names on which functions can overload and templates can be specialized. What else?
 
or do you actually struct int8_t ?
 
6:41 PM
@ThePhD that's not legal IIANM
 
@rubenvb So, what about op+?
What about swap?
What about... a zillion other things.
 
Xeo
What about conversions?
 
@R.MartinhoFernandes every function needs new overloads.
If you need inheritance-like things, you need inheritable types.
 
@rubenvb So it's boilerplate all the way down?
Awesome.
 
That's a different beast entirely.
 
6:42 PM
Truly impressive.
 
Xeo
Cool. Go ahead and propose that. Or weigh in on the std-proposals thread
 
Still, how do you deal with making int8_t ?
 
@rubenvb So what can you do with a strong typedef of int?
Nothing?
 
It's not like you can do struct int8_t : char to typedef it?
 
You need to keep the type's behaviour around.
 
Xeo
6:43 PM
@ThePhD It could just be another special type, like wchar_t
 
Can you even subclass primitives?
 
Otherwise just make your own and call it a day.
 
How does a communication with a debugger running on a goddamn emulator time out.
 
@CatPlusPlus ~~Simulation of real behavior~~
 
:android:
 
6:43 PM
OK. New idea. strong typedef inherits all, but overloads are possible.
delete functions if you don't want 'm
 
But how does it get all like that?
Consider operator<<(ostream&, whatever)
 
Xeo
Now get a paper discussing the pros & cons between the different version, etc etc.
 
@Xeo I'm all for that, but like I said, I doubt the Committee is going to do it. whcar_t's introduction was already incredibly flimsy and sucks.
 
If I type blah = ostream, do I... get nothing?
 
hmm anyway to alias blah->member ... like a typedef?
 
Xeo
6:45 PM
@EiyrioüvonKauyf auto& memref = blah->member;?
 
Also why does the emulator has a random resolution every time.
 
There's a bunch of op<< overloads and they are part of the type's interface.
 
*forgot about references
:3 thanks
 
@R.MartinhoFernandes those keep working (in my new idea)
(Chat timetravel btw)
 
@rubenvb Erm, no?
 
6:46 PM
also what's auto&& why the && ? why not just auto&
 
Those are overloaded functions like a zillion others.
 
@R.MartinhoFernandes sure, just like if you inherit from std::ostream those also keep working.
 
@rubenvb So what would stop working?
 
Xeo
@EiyrioüvonKauyf universal reference. auto& would have sufficed, for lvalues.
 
@R.MartinhoFernandes I'm not following what you are rambling about.
 
6:47 PM
0
A: Is a moved-from vector always empty?

DeadMGI left comments to this effect on other answers, but had to rush off before fully explaining. The result of a moved-from vector must always be empty, or in the case of move assignment, must be either empty or the previous object's state (i.e. a swap), because otherwise the iterator invalidation r...

 
@Xeo explain universal references pls
 
@rubenvb I don't understand your idea.
 
my answer clearly shows that move-as-copy violates iterator invalidation rules- namely, that moves can't invalidate iterators.
 
Xeo
@EiyrioüvonKauyf search pls
 
@DeadMG You got downvote? Wut o.O
 
6:49 PM
@Borgleader Dunno. I didn't downvote Jerry's answer or the other very similar answer, even though I knew they were wrong.
 
@R.MartinhoFernandes I'm afraid I'm too tired to be able to explain it clearly. I'll think some more and get back to you.
 
You think it's simple, and it isn't.
 
Xeo
@David: Consider a vector v1, and auto v2 = std::move(v1); - all iterators into v1 have to be iterators into v2 now. — Xeo 7 secs ago
@DeadMG: Y'know, you could've explained it in simple terms :P
 
@R.MartinhoFernandes Probably. I tend to oversimplify things.
 
I actually might think about downvoting Jerry and David's answers, since I know that they are incorrect.
 
Xeo
6:54 PM
@DeadMG: Could've used { scope } and move assignment to get optional out of the picture.
@DeadMG: You named the iterator x
 
shush
I'm surprised that both Jerry and David got this one wrong
 
Xeo
0
Q: Citation for c++11 variadic templates

steffenI am writing an article about a piece of software making extensive use of C++' variadic templates. Is there a standard publication to cite? Which one? So far I found these: Douglas Gregor and Jaakko Järvi. Variadic Templates for C++0x. Journal of Object Technology, 7(2):31--51, February 2008. ...

Uhmwhat
 
7:09 PM
@Xeo lazy pls
 
Is it even possible to get answers with +100 votes these days on SO?
 
in theory
 
write a good answer and spam it on social media sites?
 
Xeo
@EiyrioüvonKauyf fuck off pls
@Borgleader Sure
 
however getting all 100 upvotes quickly would most likely result in a trigger of the vote spam detection system
 
7:13 PM
It just seems to me like whenever I see an answer with a lot of upvotes it's always 2+ yrs old
 
aye... and it probably took two years to get there too
 
Xeo
@Mgetz Why would it?
It just needs to be an interesting question that gets on the hot question list - after that, the upvotes just come in.
 
@Xeo Y'know, David is right. I'm actually having a little trouble finding the Standard quote to back up my argument.
you made the same argument in the comments, any chance you know where it is?
 
Xeo
Fuck, I hate time-bound missions in BL2
 
165
Q: (-2147483648> 0) returns true in C++?

benyl-2147483648 is the smallest integer for integer type with 32 bits, but it seems that it will overflow in the if(...) sentence: if (-2147483648 > 0) std::cout << "true"; else std::cout << "false"; This will print true in my testing. However, if we cast -2147483648 to integer, the result...

@Xeo are you doing the delivering mail mission?
 
Xeo
7:16 PM
nah
But I also busted that one
 
@Xeo dunno, I've only ever asked one question I figure when I can't find an answer I'll ask another
 
Xeo
@DeadMG Note that he talks about move-assignment.
 
ok
well, I think I've got a quote anyway.
> post: u shall be equal to the value that rv had before this construction
 
Xeo
That doesn't imply that rv has changed, tbh
@Xeo: not true in the case of assignment. The standard allows the move constructor to do element-wise move/copy if allocator_traits<allocator_type>::propagate_on_container_assignment::value is true. 23.2.1/14, Table 99, the entry on a = rv;David Rodríguez - dribeas 15 mins ago
I noticed he edited the comment to say "in the case of assignment"
And complexity for a = rv is even linear
 
@Xeo No, but what I'm saying is that iterator validity is part of the container's value.
the Standard isn't very clear on this particular subject, I did find another supporting quote.
 
7:28 PM
OMG i want one
 
goddamit now i want to go to comiccon so i can see that
-____-
 
Xeo
@DeadMG I actually think he's right on move-assignment. It's specified as linear, and if the allocators don't propagate on move-assign, the elements need to be moved individually.
 
@Xeo Arguably, the Standard is defective either way, since it's not really clear what is meant by the whole "value of the container" thing. If that does include iterators, then it would be a contradiction.
 
Xeo
If allocator_traits<allocator_type>::propagate_on_container_move_assignment::value is false, T is MoveInsertable into X and MoveAssignable.
@DeadMG On to the Asylum's little brother!
 
yeah, I just posted a topic there, let the pedants sort it out
 
7:39 PM
@Borgleader Impressive.
 
user142019
@Borgleader Depressive.
 
I got nerd chills watching that :P
 
It walks so smooth.
 
Xeo
It's a suit, I think.
 
:(
that's not nearly as cool
 
7:46 PM
Are you sure? I couldn't see the guy inside
 
well we'll find out when they release the miniseries on how it was built :)
 
@Borgleader <3
room topic changed to Lounge<C++>: Tony doesn't know what ITR means. [c++] [c++11] [c++-faq] [no-helpdesk]
 
In This Room?
 
yo
 
@Borgleader That doesn't mean he isn't there
@Borgleader OMG. How stupid can I be?
 
7:51 PM
Took me a while to get it too
 
@AlexM. yo
 
it actually stands for Indignant Tony Rage.
 
hey guys.
 
no, I will not give you a blowjob
 
7:54 PM
that was unexpected
 
108
Q: Hidden Features and Dark Corners of STL?

vehomzzzC++ developers, all know the basics of C++: Declarations, conditionals, loops, operators, etc. Some of us even mastered the stuff like templates, object model, complex I/O, etc. But what are the most hidden features or tricks or dark corners of C++/STL that even C++ fans, addicts, and experts b...

Wow, 9 delete votes and it's still up? I had no idea it could go so high.
 
@TonyTheLion @DeadMG Going through the approval process to get to the UK.
 
@GManNickG So many upvotes.
 
@GManNickG Why would that be deleted?
 
7:56 PM
They plan to have us in meetings for the whole day, but at night I could sneak away from the group, if you're close enough and if there's adequate public transportation
 
where is the meeting?
 
I'm trying to use ncurses. I'm having trouble with basic stuff though, such as displaying boxes. Anyone care to look at the (short) code? pastebin.com/VYGZcHha
 
user142019
That's C, not C++. Try again.
 
Meh. Just a couple of +'s away.
 
@Rapptz I dunno. For being a poll instead of a single question, I suppose.
 
7:59 PM
Also to answer your question, the more votes and answers something has, the more delete votes it needs
 
user142019
Stack Overflow, which has a thousand ncurses experts, is also a couple of clicks away.
 

« first day (1006 days earlier)      last day (3958 days later) »