« first day (885 days earlier)      last day (4289 days later) » 

18:00
Woo I now have two functional screens
..grats?
WHAT
You cheated. D:
That reminds me, I need to figure out if I have one or two functional screens
Xeo
Xeo
Man... Y'know what's the best part of any burger? The sauce.
@CatPlusPlus What about two imperative screens?
18:03
@EtiennedeMartel Procedural might be better.
@jalf Maybe.
UGH
The hand further away from the camera always gets so much biggggeerrr
How do I make each unit of distance not matter so damn much >_<
Xeo
Xeo
@ThePhD Uhm... That sounds inverted.
@Xeo Yes, yes it does.
@ThePhD Did you forget to transpose your projection matrix?
If I didn't transpose my matrices, nothing would show up on the screen and rotating the camera would make all the vertices go crazy.
The vertices are in the right place. Things just seem.... messed up.
@EtiennedeMartel So what I'm saying in a long way is, Nope, I got that covered.
Xeo
Xeo
Holy fuck. Here I am, not paying attention to the posted proposals on isocpp.org for two hours, and suddenly ALL THE PROPOSALS
18:11
@Xeo Better pull out some beer.
@Xeo have you read the parallel library proposal?
Xeo
Xeo
Not yet
what does it mean for a language to be Turing Complete ?
Xeo
Xeo
Hmmm.... Unix-style pipes in C++.
Wait a second...
Inverted...
... The whole goddamn thing is inverted !
Xeo
Xeo
18:14
9 mins ago, by Xeo
@ThePhD Uhm... That sounds inverted.
Yeah, what you said tipped me off.
Critical Thinker ThePhD
But, uh.
@Rapptz Hey I'm trying ym best. :c
... I'm not sure where - or why - shit is being... inverted.
Xeo
Xeo
Just invert it again!
@AmberRoxanna roughly speaking it means "the language is expressive enough to do any kind of computation"
Xeo
Xeo
18:17
Mmm... some of those proposals look delicious.
@Xeo implemented in: C++31.
@jalf thanks
18:27
OK, so it's inverted.
I'm.... pretty sure, I think...
... That the view is the problem.
Projection seems fine enough.
@AmberRoxanna Turing designed a theoretical computer model that he proved could calculate anything that could be calculated. If a language can do everything Turing's computer could, then that language can calculate anything that can be calculated. Such a language is called "Turing Complete". (from memory. for detail, look it up on wikipedia)
@Xeo lol
Or just Googleâ„¢ it.
@Xeo I don't know what I'm supposed to be seeing.
18:30
Or not because notion of being Turing-complete isn't very useful
@ThePhD Submitter: Johannes Schaub
OH GOD
user142019
@Xeo lolcool
@Xeo take a deep breath in, take a deep breath out and call cat and deadmg to flame him down.
LITB is a MONSTER. o.0
18:31
@Xeo Yeah, he probably wallpapers with Standard pages.
(His house, I mean)
@Rapptz @MooingDuck thanks for explaining
@Rapptz i did google it, the definition was just not clear, i got it now
If you Ctrl + F "Johannes Schaub" you get 31 results.
user142019
Somebody should design a language and call it "C++ Without Ambiguities".
@Zoidberg they called it "D"
user142019
No, they didn't.
user142019
18:32
Because D isn't called "C++ Without Ambiguities".
Is D nice?
@Rapptz Not nice enough for Zoidberg, since he did not bother to not complete a project in that language.
Naming a language D seems prone to dick jokes.
That's just you being weird.
user142019
@Rapptz That's what she said.
@EtiennedeMartel You've never heard "She wants the D"?
:(
Wow.
16 pages of dick.
user142019
Nov 5 '12 at 23:59, by Etienne de Martel
@Zoidberg'-- Dicks. We're talking about dicks.
user142019
lol
If we include "cock" in that search it'll probably go back farther.
18:35
1 hour ago, by Etienne de Martel
I mean, there's already plenty of dick jokes in there.
@Zoidberg Also equivalent: "Wide but suckier".
user142019
C++ Without Classes.
@Zoidberg thats C
Feb 25 at 5:03, by zneak
my dick is younger than this computer
user142019
@AmberRoxanna C with references!
18:36
this sounds weird out of context lol
@AmberRoxanna Not exactly.
user142019
And constexpr.
@Rapptz It's not rape if the dick says Yes.
user142019
And templates.
The way I was taught C++, at first, did not feature any classes. No pointers either.
18:37
C with Templates actually wouldn't be so bad.
user142019
And static_cast and reinterpret_cast and const_cast.
user142019
@EtiennedeMartel std::cout?
and containers
:(
does C++ have a builtin comparitor that takes a std::pair and only compares first?
C with Templates and Containers.
That sounds like a good language.
18:38
@MooingDuck Don't believe so.
@Zoidberg Well, by "no classes" I meant "no classes except standard stuff".
user142019
Oh and it would have SFINAE. :3
Xeo
Xeo
  struct S {
    typedef int T;
    enum E : T {};
    enum E : T {};    // #1
  };
ahahahaa, oh wow
^ is ambiguous in the current standard
user142019
lol
Xeo
Xeo
> The declaration at #1 is ambiguous: it could either be an invalid redefinition of enum E or a zero-length bit-field of type enum E (since T{} is zero-valued constant expression). The current Standard does not appear to have a rule to disambiguate the two.
18:39
Isn't that... an error?
... Wow.
Xeo
Xeo
@ThePhD enum E x : 0 would be the "saner" looking and unambiguous version
C++ is full of traps.
For, honestly, no good reason. =/
Xeo
Xeo
int{} is a constant expression that evaluates to 0, and a 0-sized bitfield can be unnamed.
@ThePhD it's easy to see how they missed closing that one though :(
user142019
@ThePhD C++
18:40
@Xeo At least it has a proposed solution
Xeo
Xeo
@Rapptz Yeah
C++ for the next 5 months
5 months of what?
user142019
Five months of nightmares.
... O... kay.
18:41
@Zoidberg Weakling.
Submitter: Bjarne Stroustrup
When I reverse the direction of my view matrix,
my drawings disappear
q-q
Except that I work during the night
I hate 3D
2
@zalenix Daymares.
user142019
@zalenix as I said: nightmares.
18:43
Mares I like :)
sbi
sbi
> I just hope tango will now be properly recognized as a sacrament. — @Nein
Good evening.
user142019
Hoi.
sbi
sbi
Nice to see you all so active here tonight. I have a question for you.
user142019

<!Real> C++ Room

ISO<14882:2011> I have nothing to say.
Xeo
Xeo
lawl
Thumbs up, that one was well timed.
sbi
sbi
18:45
@Zoidberg Oh, it's not about C++. It's about teaching C++. Smug look.
user142019
@ScottW It's about litb. Oh wait that's the same thing.
sbi
sbi
@Xeo Thanks.
@ScottW I never ask about the standard. I leave that to others.
Xeo
Xeo
@sbi So, how did the presentation go anyways? Or have you not held it yet?
user142019
@thecoshman it's terrible and weird indeed.
sbi
sbi
18:46
@Xeo What presentation? I am giving a full-blown five-days C++ seminar. I just passed 40% this evening.
@thecoshman Depends. Belgians don't say "soixante-dix" or "quatre-vingt".
Xeo
Xeo
@sbi Oh, I see
CRAP
I just noticed that it's 19:50. And I don't have anything to drink at home
@EtiennedeMartel clearly Belgians are smarter then French :P
@Xeo Do shops close at 20:00 there?
sbi
sbi
What would be a good example program for students to code in order to practice what they learned about inheritance and polymorphism? If MI, ABCs, and virtual inheritance could be thrown into the mix, then that would be extra points. There's been no exposure to smart pointers yet. It should be doable with nothing but plain C++, require no special knowledge of any domain, and should be way easier than you guys would think exercises are allowed to be.
Xeo
Xeo
18:49
@EtiennedeMartel Yes
sbi
sbi
@EtiennedeMartel Where he lives, the shops probably close at 6pm, and at 8pm they fold up the sidewalks.
user142019
@thecoshman French is PHP.
@sbi Isn't the dumb classical example the car, cabrio, bus thing?
sbi
sbi
@bamboon But what would be a good program to write that employs all this, so that they end up with a main() they can invoke and look at the results?
@Xeo Better start running right now, then.
18:52
@sbi ¬_¬ some sort of trick question where inheritance should not actually have been used
sbi
sbi
@EtiennedeMartel Ah, he's just too lazy to go to the next gas station. (In Germany, you can buy just about anything at gas stations 24hrs/day.)
@thecoshman Yeah, right, sounds like a good idea: Give them the task to implement X using language feature Y where X should actually be done using language feature Z. Please do never attempt to teach anyone anything.
@thecoshman That would be "get yourself off reddit", BTW.
Damn, now I shut the room down again. Why, oh why? 'twas a just simple question!
@sbi by good program you mean something other than just creating pointers to different types? Hmm, maybe something like a carpark or wash-salon. Another example which comes to my mind is from Accelerated C++ which is about a student data base which can store different kind of students, like grads, under-grads, guest-students ...
@sbi Is the Human, Employee, [Job name here] thing too cliche?
sbi
sbi
@bamboon Yeah, I have handed out such tasks before. A student database is all about classes and containers, but nothing about inheritance, though.
@sbi The best uses I've seen are some of the real uses you can find.
for example, the implementations of type-erased containers like shared_ptr and std::function are polymorphism-based (at the highest level, anyway, some implementations do more funky stuff for others).
sbi
sbi
18:58
@Rapptz I'd go for it anyway, if I had an idea for a real task to make of it.
This is not about finding examples to explain it to them. This is about getting an actual exercise that can be done and results seen.
Ah so something akin to "real world application"
Hm..
apart from such internal-use type erasure, the main thing I've used inheritance for is abstracting over operating system dependencies, and some external type erasure in my ASTs.
sbi
sbi
@DeadMG Yeah, and, of course, type "type-erased containers like shared_ptr and std::function" would be a good thing to throw at C programmers that have just heard about inheritance for the very first time. (What about "there's been no exposure to smart pointers yet" should I make more clear?)
every derived-to-base conversion is type erasure.
the entire purpose of inheritance is erasing the derived type
sbi
sbi
@Rapptz That would be too high a bar. Just something one can write, and create output from, look at it, and go "Ah! Now I got it!"
19:00
the last thing you can try is some function that can't be a template.
for example, binary linked in, or a virtual function for some other reason.
those often use inheritance where best practices might otherwise indicate a template.
if they're C programmers, then you might want to show how many C object systems, like those of Win32, can be modelled with inheritance.
My company is simultaniously attempting to do translations/recordings before beta so we can betatest all our languages, and do the translations/recordings after beta, so we can finalize what audio we need >.<
@sbi I really think the cliche example would have that reaction but then again what do I know.
also, dynamic linking to dynamic libraries themselves is fundamentally the same as inheritance.
sbi
sbi
@Rapptz Maybe it would. But how would I turn the cliché example into an actual task? "Write a class hierarchy that will keep being theoretical to you"?
user142019
What do you call a gay dinosaur? Extinct.
user142019
19:04
lol
Xeo
Xeo
@EtiennedeMartel Phew, barely made it in time. From now on, I hereby dub this kind of shopping "Gump-Shopping" - "Run, Forest, run!"
sbi
sbi
@DeadMG "...require no special knowledge of any domain..."
Xeo
Xeo
@sbi Yeah... let's completely disregard the price-differences.
sbi
sbi
@Xeo What are you complaining about? You live alone? They surely pay you enough that you do not have to worry about what a beer costs at the Tanke, huh?
Xeo
Xeo
@sbi Doesn't that imply overgeneralization? What about the good ol' animals or shape hierarchy? :>
19:05
Just so I make sure I'm not crazy: the direction from Vector v1 to Vector v2, in mathematical terms, is

direction = v2 - v1

right?
sbi
sbi
1 min ago, by sbi
@Rapptz Maybe it would. But how would I turn the cliché example into an actual task? "Write a class hierarchy that will keep being theoretical to you"?
Xeo
Xeo
@sbi Erm, I'd still prefer to pay less if I have the chance. Also, I don't worry about the price of a bottle beer - I don't drink beer.
And if paying less means running more, well, meh.
@sbi Inheritance is a niche tool, useful in only very rare situations. If they don't have the necessary plumbing to understand the rest of the necessary context for those situations, then there are no real use cases of inheritance at the current level, unless you want to use it where templates would normally be preferred because they don't know templates.
Xeo
Xeo
@ThePhD yes.
@sbi Thing I'm thinking of right now is "Make a class that represents a human being, with a greeting that is overriden once the human becomes an employee"?
19:07
So when someone says "get the eye direction of the camera", it would be

eyeDirection = eyeTarget - eyePosition

right?
something really dumb but it works?
Xeo
Xeo
@Rapptz And you could even include double-dispatch against the target of the greeting, so you greet your boss differently than you colleagues! :D
though I guess since the base is constructed first that'd be weird
Xeo
Xeo
@ThePhD Yes. You can just reduce your thought to the 1D number line. How many steps do you need from 5 to 7? 7 - 5 == 2.
What would be the most helpful second book (after C++ Primer) to learn C++? My primary purpose for learning C++ is to implement Algorithms and Data Structures.
sbi
sbi
19:09
@DeadMG Why don't you tell that to the nice folks over here? Really, boy, I am teaching C++, and inheritance in one of the main features of C++, and I do need for them to do one exercise about it, so why are you annoying me with these useless rants spewing forward overstated opinions that, when not so inflated, we all more or less share anyway?!
Xeo
Xeo
@ChosenTorture Effective C++, soon in the shiny C++11 edition.
@Xeo Is it coming for the C++11? I didn't know that. There hasn't been any news yet is there?
@Rapptz continuing from this you can make an aside pointing to the output about how base is constructed first
sbi
sbi
@ChosenTorture Look here. I think he mentioned it in the last few months.
the one time replying to myself is useful
Xeo
Xeo
19:11
@sbi "mentioned" might be considered an understatement.
sbi
sbi
@Rapptz Oohhkkeeee. That's a start. I'd settle for a class hierarchy of employees, rather than of the whole of humanity. But how should they create and store employee objects, given that they have no smart pointers, and I don't want to teach bad practices they'd have to unlearn later.
@Xeo Okay. Sorry for the silyl questions, just trying to make sure I'm not losing it on basic math stuff...
Xeo
Xeo
@ThePhD It's not entirely silly - guess why I mentioned the 1D reduction. :)
@sbi That's good news but I think I'll have to wait for quite a few months before I get my hands on that book. What should I read until then?
sbi
sbi
@ChosenTorture The third edition?
19:14
Hey guys quick question - I am implementing a hashtable with linked chaining - my question is when retrieving values what should I do when traversing the list in a bucket to determine which item in the bucket is the correct one?
@sbi They're embedded C programmers, right?
sbi
sbi
@MartinJames Yep.
@JustinMeiners compare the key of each element to the key you're searching for
1 message moved from PHP
wut
19:15
@sbi Firstly, you might wish to consider that "It would fulfill your requirements better to simply change the order of features taught" is neither a rant nor useless. Secondly, streams- those use inheritance in C++ and are pseudo-inheritance in C. It should be simple enough to show a simple stream abstraction and give various implementations to file, console, etc.
@MooingDuck so for say strings its doing a full string compare?
@JustinMeiners yes, but on average, it should have to check about 0.75 strings, right?
Xeo
Xeo
@Lusitanian How dare you.
19:16
@MooingDuck hmm I cant help but think there is a better way - but ok
Xeo
Xeo
Wait
@sbi OK, how about an IOstream class + UARTstream, TCPstream, USBstream, all derived from it.
Xeo
Xeo
There.
sbi
sbi
@ChosenTorture I only have the first edition, and it is a great book. Very little tutorial, a lot of reference. Go for it!
@JustinMeiners hash is approximation. If you want a guarantee that you get the same element you put in, you have to do a full comparison at the last second to guarantee it's the same key.
19:17
@sbi Ok thanks!
2256
Q: The Definitive C++ Book Guide and List

grepsedawkThis question attempts to collect the few pearls among the dozens of bad C++ books that are released every year. Unlike many other programming languages, which are often picked up on the go from tutorials found on the Internet, few are able to quickly pick up C++ without studying a good C++ book...

:(
@MooingDuck ok sounds good - I was thinking maybe about using different hash functions but I guess there is still the possibilty of collision I guess I will have to do the compare
sbi
sbi
@MartinJames Um, I dunno if they even deal with that domain, but let's entertain that idea of creating such streams. Are you talking about <iostream> streams (then it would have to be stream buffers) or of your own kind of streams?
@JustinMeiners yup
@MooingDuck thank you!
19:19
@JustinMeiners There is a simple trick to avoid comparing the full key most of the time. When you hash, generate a fairly large hash, then (for example) and with a bitmask to get a smaller number for the bucket number -- but store the rest of the original hash with the rest of the data. When you look for something, use the original hash to find the right bucket, then compare the rest of the hash. Only if both those match do you bother comparing the entire key.
Because the system is getting fed up of you deleting things with a single unilateral vote all the time. — BoltClock's a Unicorn 49 secs ago
^^ brilliant
@JerryCoffin Isn't modulus the usual operation to reduce a hash to a bucket number?
sbi
sbi
@DeadMG I have pondered "the right order" for years until I gave up and admitted that there is no best way to teach features — ten years ago. If I had the time and energy to spend on your useless rants, I would challenge you to come up with such a thing only about five major features, just to tear it limb to limb in front of your eyes. Unfortunately, I don't have the time to waste on this, so you either will have to believe me or stop bothering me anyway.
@DeadMG It's certainly a common one (and bitmasking is just a special case that only does a modulus by a power of 2).
Xeo
Xeo
@Mysticial Oh gawd. Casper invoked the Pony's Law.
19:22
@sbi ...and pretty much everybody who's bothered to read stuff from authors like Stroustrup, Koenig, Moo, etc., finds that every one of them has tried to find an order that avoids forward reference, and decided there is none.
@JerryCoffin I think I barely came to the same conclusion - store the 32 bit
@JerryCoffin even though it stores in a much smaller bucket size
so collision possibilty is much smaller
@sbi Either, maybe. Don't know enough about <iostream> to say. Maybe not, depending on when you get into generics/templates. Maybe simpler class, with open(string config), read(char* buf, int bufLen), read(char* buf, int bufLen), close(). They're C programmers - they love pointers :) Open() may well, of course, fail and so would maybe raise an exception, (intro to exceptions?).
sbi
sbi
@JerryCoffin Yeah, my experience exactly: chat.stackoverflow.com/transcript/10?m=8311235#8311235
does g++/clang have something like __super in VC++? (type of base class)
Hi lads
19:27
when we close as off topic, how to we vote to move to programmers (or any other arbitrary SE site)? That used to be at the top of the list, but now I can't figure out how to do it at all.
@sbi So, you teach like someone would play a Metroid game.
Xeo
Xeo
@Mysticial: I hope nobody brings up the C++ book question in that comment thread...
@Jueecy LO - check starboard, it's another 'fuckwad, neuter him', day. Be careful:)
@Jueecy Hello friend
Hello pubby my buddy.
19:28
@Xeo I wouldn't worry about it too much. There's already multiple meta posts that establish that the C++ book question is the lone exception.
sbi
sbi
@MartinJames I wouldn't need to use char* (we have std::string and std::vector<char> for that, but this really doesn't sound like an inheritance scenario.
@Rapptz too many bbppbbpp %)
@Pubby, hello to you bro
@Rapptz hi pal
sbi
sbi
So when you're all done hugging and kissing each other, can you please come up with a good idea for an exercise?
19:30
@JerryCoffin I always have a moment of confusion when people mention Moo :(
sbi
sbi
@MooingDuck Are you related to Barbara?
How is it called when an application is based on multiple windows without a main one? Like a document application that opens .txt files. It's not MDI, is it?
@Jueecy Was once called CDI, if memory serves. Now I think they just call it something like "multiple-level windows".
.. Hm.
19:32
@JerryCoffin, that stands for?
I'm doing something horribly wrong... as per usual.
3
@Jueecy Can't remember.
Funnily enough, my matrices are coming out exactly - and I mean exactly, like, to-the-bits exactly - like DirectX::XMMatrix*'s are.
> i am in stack for learn of the c#
And yet, I'm still getting this reversal problem.
19:33
MFW
@JerryCoffin wikipedia says single document interface
@JerryCoffin, kay thanks
Maybe my system was meant to be LH instead of RH...
@MooingDuck SDI is slightly different. It limits you to one document per instance of the program. CDI (or whatever you call it) allows multiple documents per instance, but each in its own top-level window.
near and far are keywords in C++ ...?
near and far pointers.
Brilliant.
19:41
@ThePhD Yes and no. The C++ language has never defined them as key words. Most MS-DOS and 16-bit Windows compilers used to treat them as key words though.
sbi
sbi
@ThePhD I was wondering why I couldn't upvote that first comment, until I saw that it was my own. :)
@sbi Handed you an upvote, just to make up for it. :D
@sbi I was about to say I sort of missed them, but even as a joke I couldn't quite manage it. :-)
Okay, left-handed matrix math matches exactly too.
...
OKAY
The problem doesn't exist when I used left-handed matrices
What the FUCK.
D3D can kiss my ass. ._.
Whatever article told me D3D worked in RH mode natively needs to get shoved under a bus.
> Microsoft Direct3D uses a left-handed coordinate system. If you are porting an application that is based on a right-handed coordinate system, you must make two changes to the data passed to Direct3D.
Oh, I had misled myself.
Silly me, how could I ever believe that Microsoft could be consistent across its product groups built on the same fucking technology:
6
> The XNA Framework uses a right-handed coordinate system, with the positive z-axis pointing toward the observer when the positive x-axis is pointing to the right, and the positive y-axis is pointing up.
sbi
sbi
19:48
@JerryCoffin Yeah. Do you remember overlay modules? Ugh.
@BartekBanachewicz What do you mean?
@sbi If I looked around really carefully, I could probably still find a copy of .RTLink Plus... Come to think of it, I should have a little bonfire some time.
sbi
sbi
@JerryCoffin Good idea, actually.
:8359043 Yeah, of course. What else could I have referred to? (I can change history, too!)
@sbi I certainly don't think you'd expect me to look for it so I could subject myself to actually using it!
sbi
sbi
Why the hell is @isocpp spamming my twitter timeline with a three-digit number of papers these days? Are they finding all those while dusting out the attic, or has there been a deadline for submitting papers to the standard committee?
@sbi Not yet!
sbi
sbi
19:56
@BartekBanachewicz Ah, don't worry, that's easier than you think.
@ThePhD cough OpenGL cough
@sbi I am barely able to fund my living right now :/
@BartekBanachewicz Personally, I like the RH because I'd like to have increasing Z mean that the character is getting farther away from me.
I suppose this means openGL is right-handed natively?
uh.
I neither know nor care.
Also why should you care about XNA?
It's dead.

« first day (885 days earlier)      last day (4289 days later) »