« first day (986 days earlier)      last day (3964 days later) » 

8:00 PM
I went to Lunch
 
@StackedCrooked Oh, I see...
 
@ThePhD idk, I rewinded
 
I like how Scott Myers is just Scott Myers - do not question him
 
@thecoshman lol
 
scott... i like your hair
 
8:01 PM
Scott ? Myers : Myers;
 
Oh.
 
The conference just ended.
 
posted on June 28, 2013 by Eric Feiveson

In Visual Studio 2012 we introduced the ability to create visualizations for native types using natvis files.  Visual Studio 2013 contains several improvements that make it easier to author visualizations for classes that internally make use of collections to store items.   In this blog post I’ll show an example scenario that we wanted to improve, show you what you hav

 
Actually, I'm drinking scotch right now... in case someone failed to notice.
 
user142019
8:03 PM
Is anybody going to GoingNative 2013?
 
LoL
My friend just told me their two assignments
1. Write a Haskell interpreter in Prolog
2. Write a Prolog interpreter in Smalltalk
 
that was an interesting talk
 
@rightfold Is anybody sponsoring going to GoingNative? :D
 
@rightfold Tempting, but.... so far away
 
switch(someone) { case failed_to_notice: this->drink(scotch); };
 
8:05 PM
@BartekBanachewicz ewww
 
@BartekBanachewicz So, he's going to run his haskell on his prolog in smalltalk?
Sweet.
 
@Griwes I asked the same exactly.
 
can you write an LLVM backend that spits out c++ template programs for arbitrary LLVM code
 
@BartekBanachewicz You couldn't have not.
 
user142019
lol something about Bing
 
8:07 PM
Why would anyone even touch any of those languages? Aren't they all just various flavours of dead?
 
@Lundin Haskell is amazing, and Prolog is funky as an exercise(no real use). Smalltalk is dead.
 
@rightfold hopefully; I've registered at least
 
@BartekBanachewicz needs some erlang or perl or something extra thrown in
 
user142019
@je4d neat.
 
user142019
How much does it cost?
 
8:08 PM
@thecoshman I hate perl.
 
Does constructor inheritance also inherit the move constructor?
 
@thecoshman And brainfuck.
 
@rightfold $299 this time
 
user142019
csharp> int x = x;
csharp> x
0
 
user142019
Bah.
 
user142019
8:08 PM
@je4d That's not too much.
 
@je4d Plus you need to get there.
 
user142019
But it's in Redmond. :<
 
@BartekBanachewicz :'(
 
@rightfold yeah, it's a lot cheaper than C&B. Last year the conference was ~$100, which is basically free on the scale of conference costs
 
@thecoshman Perl is 3rd worst language, just after Java and PHP
 
8:09 PM
@je4d Sure it's cheaper.
 
I was just reading The Definitive C++ Book Guide and List post as I am interested into moving into C++, just wondering if anyone can recommend the best books from that list for my situation. I am only looking to buy one or two for the time being, but I have done no C++ before, but I have experience coding in other languages such as Java, C# and Obj-C, so I was wondering what would be best?
 
@je4d But it's in Goddamned Redmond.
 
The accelerated C++ looked pretty interesting, but idk
 
Where're you coming from?
 
@BartekBanachewicz hardly
 
8:10 PM
I'm based in london, the whole thing cost me ~£900 last year
 
Why isn't any of those things happening in Poland :F
 
Seattle is a lot easier than, say, Aspen
 
Herbert Schildt!
 
JBL
@ρσݥzση Define "moving into C++" ? Want to master the language, to do simple/funny things, etc. (your aim basically)
 
@je4d D'oh.
@je4d 4,5k PLN.
 
8:12 PM
@JBL I mean I want to expand my horizons so to speak, start learning it basically
 
That's much.
 
@ρσݥzση Don't. There other awesome languages such as Java and PHP out there. Learn those.
 
@Griwes as transatlantic trips go, it's pretty good... but still by no means cheap
 
JBL
@Jeffrey And there, a kitten died.
 
@ρσݥzση just choose one, all of them will teach you C++
 
8:14 PM
@JBL Actually 2, one for PHP and the other for Java
 
@je4d Well, if I wasn't a student, but had a job and stuff, I'd probably be able to afford it. :P
 
@JBL I want to be able to code well in the language, not complete mastery my final aim will be to produce a game, I am already developing games in Obj-C, but I would like to be able to "move on" to a more proffesional language for non-ios basically
 
Or, if I saved a semester-worth scholarship...
:D
 
@Griwes ah, didn't know you were a student
 
JBL
@ρσݥzση My personal choice (though there might be a better one) would be C++ Primer, and maybe Effective C++ (as the second book).
 
8:15 PM
@ρσݥzση Seriously, if you want things done, C/C++ is not for you. If you want to try to learn one of the most dangerous languages, complain about it all day and never get anything done, then go with C++.
 
@Jeffrey I already code in both Java and PHP, but as my aim is to produce a game PHP is not much use, and I am really interested in creating something with few to no dependencies, not requiring a java framework to be installed for example
 
JBL
@ρσݥzση Prepare yourself to forget a lot of things you thought you knew about programming. Oh, and a few aspirins
 
try { learn(C++); } catch(...) { x = 1/0; };
 
@JBL Ok, have any of you tried the accelerated one? It seemed interesting, but idk if I would be ready for it
 
@ρσݥzση A basic game will at least require 3 libraries: OpenGL, GLFW,SDL,SWF, OpenAL.
 
JBL
8:17 PM
@ρσݥzση Didn't read this one.
 
With some library configurations you may need way more libraries.
 
JBL
@Jeffrey Or you could go with SFML...
 
@Jeffrey Yeah, I plan on using OpenGL, it is what I am using in my Obj-C engine atm
 
@ρσݥzση Honestly, I'd go with Java. Who cares about one dependency. Most C++ applications have to depend on far more dependencies almost out of the box, just to add stuff that Java comes with in the JVM
And it will save you a lot of headaches compared to trying to switch to C++
 
@JBL Seriously, I would never do any 3D game development only with SMFL, but that's just me.
 
8:18 PM
@jalf To be honest its more about the personal challenge of learning it, I don't want to give up before I've begun
 
JBL
@Jeffrey He didn't say 3D.
 
@ρσݥzση that's the best time to give up though. ;)
 
SUTTER YOU LIAR
INITIALIZER LISTS ARE BROKEN AS SHIT D:<
 
Better than doing it after you've wasted a bunch of time on it
 
@JBL ... yup. He didn't even said otherwise.
 
8:19 PM
@ρσݥzση if you want to make a game, Unity. You already know C# right?
 
JBL
@Jeffrey So better not assume anything and scare him with 3D game development requirements :D
 
@ρσݥzση Seriously, C++ is a pain in the ass. No one will ever blame you for giving up.
 
oh hey, a gold badge!
 
@Aboutblank No, not unity, I actually want to make a game, including engine and all, using a pre-written game engine feels like I am soiling my work a little
 
JBL
Actually, I start thinking more and more that you should learn C++ only if you're interested in C++. If you want things getting done, just learn something else.
 
8:21 PM
@ρσݥzση I know dat feel.
@JBL There we agree :)
 
@ρσݥzση on the other hand, it means you'll actually have something to show in less than 18 months ;)
 
JBL
@Jeffrey Heh. I'm exactly in this case so... I'm actually having a hard time coding things that work well, but I just like learning about it.
 
@Jeffrey Honestly don't care if anyone blames me or forgives me for giving up, but I will not be happy with my self for not even trying, anyway giving up is really not an option, I will be taking a computer science course in about a years time, on which at some point I will be learning C++, and some things beyond that
I want a headstart now because I am interested
 
@ρσݥzση fun fact: at my university, the people who knew C++ when they took their first year CS classes fared significantly worse than those who had never programmed before. :)
 
@ρσݥzση Then any book will make it. Take a look at this awesome guide and pick one.
 
8:23 PM
Guys, is this a GCC bug? (Clang accepts it)
 
JBL
@Jeffrey He just came from the question... ~~
 
@JBL Yeh exactly I want to learn C++ because it is C++, I want to be able to say "I can code in C++"
 
@JBL lol, didn't read :P
 
JBL
14 mins ago, by ρσݥzση
I was just reading The Definitive C++ Book Guide and List post as I am interested into moving into C++, just wondering if anyone can recommend the best books from that list for my situation. I am only looking to buy one or two for the time being, but I have done no C++ before, but I have experience coding in other languages such as Java, C# and Obj-C, so I was wondering what would be best?
 
5
A: How do I create a 'reference' to a lambda?

PraetorianSince the lambda is not stateless, it cannot be converted to a function pointer. Use std::function instead. std::function<int(int)> factorial = [&](int x){ return (x < 2) ? 1 : x * factorial(x - 1); };

 
8:24 PM
@JBL the answer is still the same -> "just get one, they are all worth reading"
 
I -1ed that
very bad code
 
JBL
@Aboutblank That's true
 
@ρσݥzση that's not something to be proud of.
Just kidding.
 
@JohannesSchaub-litb It's recursive. How would you do that?
 
@Jeffrey Why isn't it, I just heard you lot complaining that it is incredibly hard
oh lol
 
8:25 PM
@JohannesSchaub-litb Why?
 
JBL
@ρσݥzση If you're genuinely interested, then go on.
 
@Griwes you basically cannot copy "factorial", but it allows you to
 
JBL
But bragging about knowing C++, hem...
 
if you copy it, and think "ah, now i can forget abut 'factorial'", UB happens
 
Ok I am thinking of getting this
 
8:26 PM
since it has captured it by-ref
 
Hmm, ok, right.
 
and probably...
 
holy shit so sick
 
JBL
Plus : "I want to say I can code in C++". You won't be able to say that without lying before a looooooooooooooooooooooooong time.
 
this one?
 
8:26 PM
@ρσݥzση It is incredibly low level. It's not like it's hard. It's more like you have a lot of boring stuff to take care of.
 
So, @JohannesSchaub-litb, how would you do that?
@ρσݥzση Stop it.
 
@Griwes i wouldn't do it
 
Hah.
 
Just read the list on Stack Overflow.
 
@Jeffrey well on the course I intend to join you spend a considerable amount of time coding in Assembly without an OS, which is about as low level as you can get lol
 
8:27 PM
@JBL And even then, you'll most likely just know 30% of it. They say there are only 4 people in the entire world that are able to code in C++...
 
@ρσݥzση Verilog and FPGAs are lower level.
 
wait, The result of a typeid(const int) is an lvalue? Not a lvalue reference, but an lvalue?
 
JBL
@Jeffrey Exactly
 
@MooingDuck the result of any typeid is an lvalue
 
I'm not sure what to do with that...
 
8:28 PM
@Jeffrey This circlejerk again?
 
usually, the compiler will make it refer to some class object derived from std::type_info
 
@Griwes sure the point is the fact that c++ low level isnt a problem to me
 
@Rapptz ssssh, we're just getting to the Ceremony of Talking About How Dangerous Pointers Are
 
@Rapptz It's a legend I've heard. The point is C++ is really hard to know properly.
 
@JohannesSchaub-litb doesn't that mean std::type_info t = typeid(int); would fail to compile because it's not copiable?
 
8:29 PM
C++ isn't low-level
C++ can be almost any level you need
 
@MooingDuck i don't know about the exact spec of type_info
if it is not copyable, it would obviously fail to compile
 
sigh this really was a simple question guys, I am just asking in YOUR personal opinion which is the best book for a beginner to C++ but not to basic programming principles?
 
@ρσݥzση "Lower level" isn't really all the fun.
 
@MooingDuck I'm pretty sure that type_info should be copyable.
 
C++ is just a language. It's a pain in the neck, but it's not some kind of mythological world-devouring monster. It can be learned, and many people have learned it
 
8:30 PM
I really don't care if its low-level or not, or if you think I shouldn't bother with it
 
The OSDev fun, for example, starts when you have all prototypes there.
 
@Jeffrey Bullshit.
 
c++ basically is like latex. it's a "high"-level framework around a lowlevel language
(around C)
 
And when you start doing actual higher level stuff.
 
facepalm
 
8:30 PM
@JohannesSchaub-litb But you can do low level in C++, and cannot in LaTeX, AFAIK... :P
 
@DeadMG nop. Noncopiable. Just checked the spec
 
@EtiennedeMartel What exactly?
 
@MooingDuck that makes entirely sense
copying it would slice off things
 
@Jeffrey About that 30% thing. And the whole "only 4 people in the world know it".
 
user142019
You know.
 
8:31 PM
If there's one thing sillier than people who think that the need to learn/use C++ in order to be "real" coders (or make real games), it's people who insist that C++ is some brain-imploding language that only the chosen few can master
 
Come to think of it, the whole sentence.
 
@Griwes level + even -> leven?
 
@JohannesSchaub-litb wtf it is polymorphic! Why is it polymorphic?
 
user142019
 
user142019
Something like this in Vim would be very nice.
 
8:31 PM
@Borgleader Crap.
 
@ρσݥzση any book in the introductory part. it will teach you C++ basics. GL (happy?)
 
it... is... just... a programming language. Anyone can learn it if they bother to spend a bit of time on it, and don't try to take too many lazy shortcuts
 
@EtiennedeMartel both are a fable, a myth, a leged to scare people. They are both supposed to be bullshits.
 
@jalf That's usually said by those who don't know how to use it.
 
@MooingDuck impls tend to use pointer comparison on two instances of std::type_info to see whether some runtime object have the same types
 
8:32 PM
@Jeffrey so maybe don't go spreading them around?
 
(used in exception handling)
 
@Aboutblank That really doesn't answer my question, but w\e u guys are just arguing now
 
that's why it is important when you link two .so files that throw exceptions through each other, that the exception class has default visibility. making the type_info of the classes have the same runtime addresses (on linux)
 
@ρσݥzση Yep, it's what we do.
 
@jalf I'm effing sorry. They seemed to fit into the whole "Let's make him change idea" thingy.
 
8:33 PM
If you want arguing, this is a great place. For advice, you're often better off asking a concussed duckling :)
 
@jalf hmmm, Ill remember that I guesss..
 
@ρσݥzση That's how we roll.
 
@Jeffrey well, let's make him change his mind by being honest :p
Or rather, just make him aware of the realities that (1) games can be made in other languages, (2) picking another language will likely lead to faster results, and (3) C++ is an intimidating language, and if you choose to learn it, you'll likely end up dedicating a fair amount of time just to that, before you can begin to make anything with it
 
@jalf Actually I truly believe C++ is one of the (if not the) hardest languages out there. And as far as I'm concerned it's pretty hard to master properly compared to most other general purpose languages. That was an exaggeration to prove my point.
 
Exaggerations don't prove anything :)
 
8:36 PM
@jalf I knew you were going there, the moment I wrote that phrase... :P
 
hmmm... well this is a annoying. Try to size my borderless window to the same size as the screen, but it even though I have removed the bordered, it still seems to size the window as if they where still there...
so whilst I request my window be the height of the screen, it is not :(
 
@jalf And few things are more depressing than not being able to put what you're learning to the test.
 
Well, my point is really that I hate when people raise C++ to some kind of special mythical status, in either direction. Both when people go "I have to learn C++ in order to do real coding", and "You can't learn C++ because only The Chosen One can do that"
 
wait, I'm the Chosen One?
no, wait, I knew that already
 
It's not special. Anyone can learn it, and few people need to learn it, or would benefit from learning it
@DeadMG No, you are The Other One
 
8:39 PM
@DeadMG You're That Guy.
 
@jalf Well, it was just a joke. I don't believe there's only a small elite that can code in C++.
@jalf On this regard, is it always true that a compiled program is faster than the same program interpreted?
 
sure, but it's contributing to the mythology that already exists about the language, which is making so many newbies decide that "I have to learn C++ because it is the One True Language and without it, my games will not be real games"
 
@jalf I see your point now.
 
@Jeffrey trivially false. Write a compiler which inserts a sleep(SomeBigNumber) after every line
 
@jalf I mean is there a compiled language that is equally powerful and potentially fast as C++?
 
8:42 PM
@Jeffrey that is clearly false
if the language is sufficiently dynamic, compiling may have even negative effect
 
@Jeffrey Well, pretty much every language is turing-complete. And potentially, there's nothing stopping Python from being as fast as C++
given a sufficiently smart interpreter
 
right. having a smart interpreter will be better than a dumb compiler. and is much easier to do
 
@jalf D'you know any other compiled language that you would suggest learning?
 
for such languages, most of the time you are going to emit calls to runtime-library routines, and not doing much on the machine-code level
 
With games the main attraction that C++ offers is manual memory management so people tend to use it for that.
 
8:45 PM
except if you are compiling at runtime. but that's advanced
 
@JohannesSchaub-litb I'll probably don't miss low level anyway
 
beyond me :)
 
it's naive to think of languages as having an intrinsic speed. C++ has typically been able to produce fast code because a straightforward compilation yields fairly efficient assembly code (and historically, compilers have been dumb, so they only did fairly straightforward compilation)
 
in fact, I think that it's quite possible to get faster than C++
 
> Programs compiled into native code at compile time tend to be quicker than those translated at run time, due to the overhead of the translation process.
 
8:46 PM
"Hello"_s //<--- not a fan of the syntax.
 
the TU compilation model means that not as many optimizations as could be are done between TUs
 
But C++ is really hard to reason about, which impacts many optimizations, so a smart compiler might actually get more traction with, say, a strict functional language, which naively would produce terrible code, but lends itself much better to advanced optimizations
 
@jalf Kind of. You're right in the current practice, but I think a language that allows you to express more gives the compiler more guarantees about what it can do.
 
not to mention the overhead of things like PIMPL
 
@jalf Er, yup. :) (I'm too slow I guess.)
 
8:47 PM
@GManNickG :)
 
... WHOA
VISUAL C++ Never had ASTs?!
 
Fuck I'm late. Gotta go.
@jalf, I really enjoyed this talk. May we continue later or another day?
 
@ScottW <3
 
@ThePhD What.
 
8:48 PM
@Jeffrey All of them, to be honest. Depends on the purpose. Just for learning, and growing as a programmer, I'd suggest sometihng completely different from what you're used to: Haskell, Prolog, Scheme or perhaps Smalltalk
 
@ThePhD You can do that for a simple language like C.
 
@Jeffrey for productivity purposes, I'd say "stick with Java", since you already know that
 
@EtiennedeMartel Herb said it. "Visual C++ never had an AST."
 
@jalf ( I don't know Java )
 
I considered an AST-less design for Wide at one point.
 
8:49 PM
@Jeffrey well, I'm usually here (or at least, I check in a couple of times per day), so just ping me here :) (or better still, jsut start talking. If I'm not here, someone else will chime in)
 
He says that's why constexpr and other things could never be implemented in C++.
 
@Jeffrey ah, I thought you said you used PHP and Java
 
Hahaha C++98 two-phase lookup is finally put into VC++, targed for 2014+.
How nice.
 
I'm a compiler noob, how does one even get by without an AST?
 
ok, for productivity purposes, I'd suggest learning C#, Python or maybe Java. :)
 
8:50 PM
@jalf PHP yes. I know Ruby and have seen some Java (never really did anything with it).
 
I thought that was the natural output for a parser.
 
@jalf that was the guy who came in asking for book recommendations...over 30mins ago lol
 
@GManNickG You effectively evaluate it inline.
it's kinda similar to how you can get by without putting every token in a std::vector, and then evaluating the vector.
 
@jalf I've always loved to learn Lisp. It's such an elegant language * _ *
 
@DeadMG Gotcha. I imagine that makes extensibility and transformations a bit hard.
 
8:51 PM
@Jeffrey not as bad as you'd think.
 
@EtiennedeMartel To articulate, their compiler never generated an AST for the code it compiled, this is apparently the reason why they never (were able to) fixed the two phase lookup problem with templates. But now new, if I understood correctly, new features of C++11/14 require an AST in order to be implemented so they're re-engineering their compiler to use them which means on top of implementing new features theyll fix things like two phase lookup.
 
@DeadMG which, incidentally, is basically what C++'s compilation model was designed for. AST's take up extra memory, and back in the 70's or wherever, compilers only had the memory budget for a linear traversal of each TU. So #includes, forward declarations and all that jazz, rather than just reading the whole thing and building an AST from it as a modern language would
 
Hello every one
 
@Aboutblank They told me it's pretty simple as a language. But potentially really expressive.
 
@jalf Yup. I figured out that it was basically only useful for a language with declarations and TU model.
 
8:52 PM
is there a way to define a function based on a function pointer typedef?
 
so I twigged that it was intended that that was how you compiled C.
 
:)
 
@jalf Yeah, The Design and Evolution of C++ listed many of C++'s shortcomings as side effects of crappy compiler technologies back in the 70s.
 
AFAIK, clang can compile c++ even without keeping the entire AST in memory?
 
Later everyone
 
8:53 PM
bye
 
it's called "dematerialization" or something in their world
 
@MooingDuck What mean?
 
@ThePhD Better than std::string("Hello").
 
@Rapptz You know what would be better?
"Hello"; //std::string
 
no.
 
8:54 PM
@ThePhD wat.
 
Yes!
 
Oh, I thought you meant the comment should have semantic meaning
That would require a better string class though. A heap allocation per string literal would kind of suck
 
`hello` // std::string
 
Xeo
@Xeo Your swallow trick did not work, when I tested it. I think you need an initializer list constructor to make it work. — user1095108 10 mins ago
I wonder if "No, your compiler sucks." is a valid answer to that.
 
8:55 PM
typedef void (*myfunc)(int a);
myfunc function; //this is valid
myfunc function { //is there any syntax for this?
    std::cout << a;
}
 
@JohannesSchaub-litb Ooh, that syntax is nice too.
 
@GManNickG ^^
 
Xeo
@MooingDuck Can only declare a function through a function type.
And not define it through that, evar
 
@MooingDuck Nope.
 
Xeo
Like
using fty = void(int);
fty foo;
void foo(int){}
 
8:56 PM
@MooingDuck What do you want it for?
 
@GManNickG just to be certain the signatures match. If I screw up I get a compiler error when I try to use it, but I thought it'd be nice to have it right there somehow.
 
struct A { virtual fty lulz = 0; };
 
@Xeo oh, that works for what I want
 
@JohannesSchaub-litb Is that a std proposal? :D
 
@ThePhD working C++03 code
 
8:59 PM
@JohannesSchaub-litb o.0
You're... you're trolling me!
 

« first day (986 days earlier)      last day (3964 days later) »