« first day (914 days earlier)      last day (4036 days later) » 

8:00 AM
@BenjaminGruenbaum you would let someone else add a singleton? rather then point out the flaws in there code? That is just as bad
@BenjaminGruenbaum DI as in, dependency injection?
 
Yes
@thecoshman Not in my book, different people have different coding styles and while I wouldn't approve a singleton on a large project, I really wouldn't mind it on a really small one
 
You know it's been a long time since you've used VC++ when you're foolish enough to click 'go to definition'. Plenty of time for a coffee...
2
 
as in, passing the object to use into a class that needs and instance of the calss?
 
that's #sotrue
 
@BenjaminGruenbaum but adding a singleton to a small project isn't easier, it's additional code and additional complexity. It is hard-to-write bad code, so it can't be justified by "bad code is easy to write"
 
8:01 AM
@thecoshman Yes, in a line
 
@BenjaminGruenbaum you are against writing code that is maintainable?
 
@thecoshman Yes, that is exactly what I was saying -_-
@thecoshman Are you implying that DI makes less maintainable code?
 
When I first heard the term DI, I was confused as all hell. So much cruft for such a simple concept of 'pass a reference'
 
Also, as for singletons, like I said, I don't use them myself, but the smaller a project is the less rigorous I get with code review.
 
@BenjaminGruenbaum no, DI is a good ting... jsut got a bit confused as to what you meant
@BenjaminGruenbaum then you are doing it wrong
just because a section of code is currently only going to be sued for this small thing, does not mean you should get any less strict
 
8:04 AM
@thecoshman Have you read the argument about start ups using TDD with uncle bob a few months ago?
 
@BenjaminGruenbaum TDD is not related to allowing shit code for 'small projects'
all projects start small
 
but stuff gets added, and you have to start of ensuring it's not crap that is added
 
@thecoshman I didn't imply it was, but the anecdote is similar. Working software is the most important part, especially with deadlines, and especially when the software is going to be used once (like in the crawler scenario I was describing, or when writing a proof of concept for something that would get re-written anyway)
 
@BenjaminGruenbaum ... but again doesn't address the point. Sure, quick and dirty code is acceptable if you need quick and can live with dirty. But adding complexity you don't need is the opposite of quick. Adding an unnecessary singleton to your quick and dirty code makes it less quick.
"Hey, I'm on a tough deadline, I really need this done by tomorrow. I know, I'll add a hundred lines of unnecessary boilerplate code"
Doing anything you don't need is only going to slow you down
 
8:07 AM
@jalf As it may be, failing quick and dirty code in code review for not being best practice seems silly to me :)
 
Well, why are you wasting time on code reviews in the first place, if it has to be quick? ;)
 
That's not a bad question :) I guess just sanity checks
 
Also, a third option could be passing the code review, and just pointing out that "this singleton serves no purpose and wasted your time and mine. Next time, don't do it" ;) You know, educating your coworker
 
@BenjaminGruenbaum exactly as Jalf said, if you don't care about quality, why review it? simple test, "does it fucking work? ship it!"
 
anyway, back to my singleton bug :(
 
8:09 AM
ITT: LEWG polymorphic allocator presenter can't use his laptop
 
@jalf oh you can't be doing that, people might get better at there job
 
@jalf I Oh, I do that, I don't encourage bad code, and I do ask people improve :)
 
@DeadMG damn, we're computer scientists, not rocket scientists!
 
lol
 
I got to love how JavaScript doesn't have singletons (or classes for that matter)
(Alternatively, every object is a Singleton , if you want to be on the hating side :P )
 
8:11 AM
@BenjaminGruenbaum AFAIK, you can create singletons; at least, as close to a singleton as you can get with JS's idea of 'classes'
 
@BartekBanachewicz argh, I just did it again
 
Xeo
@DeadMG Well, atleast he has his own laptop :P
 
@jalf I was lately saying how much QTcreator wins here, because go to definitio really works there...
 
@thecoshman Oh yeah, there are completely retarded ways to emulate classes and then emulate a Java'ish singleton pattern in JavaScript. That I won't pass in code review in a million years :) That shows fundamental misunderstanding of the language (You can write all that boilerplate, OR, you can use an object literal and accept the fact JS has no notion of classes in its OOP)
 
to be fair, getting a screen on a projector seems to be akin to plugging in a usb cable
@BenjaminGruenbaum well, it's done via a sort of factory for your 'objects' right, objects being nothing much more then a series of key:value pairs, right?
 
8:14 AM
heh
 
@thecoshman Oh, JS objects aren't really key:value pairs for a long time when it comes to what they actually are (in implementations) :) Modern interperters extract actual C++ classes out of JS code in run-time and compile them, if your code has {x:5,y:3} enough times the compiler will extract a "class Point" out of it for you (On that subject the V8 source code is a beautiful C++ code read)
 
> Microsoft researcher Sean McDirmid has been experimenting with the potential for replacing classical debugging tools with 'live programming'
i.e. print locals to other window constantly.
 
@BenjaminGruenbaum yeah, but that's all behind the scenes, I'm talking about what the programmer sees
 
@thecoshman Yes, you could say it's done with a sort of object constructor pattern, but objects are often created using other objects (prototypical inheritance). It's really nice imho :)
 
you know... I really don't understand how phone networks have not migrated to simple swarm logic. A base station has parameters so it's knows how much load it currently handles and how much it can. Base stations can talk to nearby base stations, and they handle them selves how much load to each take.
 
8:20 AM
@thecoshman I always assumed that was kind of how phone stations work. It's pretty similar with the internet except that aside from load, price is also a big factor
(BGP that is)
 
@BenjaminGruenbaum not the systems I work on, it seems very much static. A central server controls how much load each node/cell takes on
yes, it really is shit
 
@BenjaminGruenbaum now that's dangerously close to writing code optimized for such optimizations :/
 
@BenjaminGruenbaum We inherited some code like that, and it kinda hurts
 
@BartekBanachewicz Nope, the compilers are really clever (and again, V8 is really well written, and is a good read if you like reading C++ source code). There are some stuff you're supposed to not do (like using delete which deletes properties makes zero sense anyway)
 
@BenjaminGruenbaum too bad I don't really like js, then.
 
8:26 AM
wait. why are we talking about real things in the lounge
what's wrong with you people
 
@LightnessRacesinOrbit That sucks, in general developers who use language A like it is language B because they don't want to understand language A should not be employed
 
I seem to have stumbled into a presentation about allocators. More actual updates coming later today when I'm awake. #cxx #wg21
poor guy
 
lol
 
@BartekBanachewicz I think that after C (and C++) it's the second most useful language to know, it's the first managed language that I feel really takes care of stuff for me and lets me write code like I'd like.
 
@BenjaminGruenbaum to be fair, they're not now
 
8:28 AM
@jalf why poor?
 
at least not here
 
oh hey, it's Du Toit
 
@BartekBanachewicz because allocators
@BartekBanachewicz yes
 
gah whyyyy the fuck aren't I at the meeting
 
@LightnessRacesinOrbit That kind of makes me feel better :)
 
8:29 AM
@jalf are these that bad? I've just skimmed through Allocators subchapter in C++ Primer
 
@LightnessRacesinOrbit I don't recall you gave me answer, what company you work for?
 
@thecoshman You're right; I didn't
 
Xeo
@jalf haha
 
TIL std::align
 
@LightnessRacesinOrbit going to abstain?
and btw, I was indeed re-asking the question
 
8:31 AM
@BartekBanachewicz well, that's subjective, of course. To me (and SDT, apparently), they fit kind of on the same shelf as locales and facets: sure, we have to have them, but they're a pain to work with, surprisingly complicated, boring to read about, and often the current implementation/spec isn't really as good as it should be.
 
@jalf Until I am in a need to write one myself, I won't have much to add.
> There are maybe fifty world class computer language designers on the planet (Coding Horror)
WRT @DeadMG @Zoidberg ^
 
@thecoshman Yep. Sorry :) Don't fancy a [blatant] link between RL and Lightness in public chat transcripts
 
@BartekBanachewicz I guess that's another side of the coin. It's not something you often really need to deal with. They live a kind of shadow existence, just supporting other code, but hardly ever being seen. Which also makes them less exciting than, say proposals to make std::string better
 
Ah, I see your point WRT SDT now
 
But mostly I just liked his tweet :D
 
8:37 AM
@LightnessRacesinOrbit fair enough
is it the nodes themselves you work on?
 
@thecoshman Not really, no. Though our kit sits on top of them in certain cases
 
I think I should contribute to well-known opensource projects more
 
@thecoshman we monitor analogue and digital timing signals for wander and jitter that breaks accepted standards. also capture PTP metrics
 
@jalf The polymorphic allocators proposal is good and right.
 
@BartekBanachewicz Like some of Zoidberg's work, for example
 
8:39 AM
@LightnessRacesinOrbit totally
 
@DeadMG but it doesn't make allocators fun
 
true
but it does make them one fuck of a lot simpler to use
 
@thecoshman There's also a couple of research projects centred around GPS interference detection/mitigation, in which I'm more heavily involved
 
@LightnessRacesinOrbit hmm... interesting (though I am sure it is boring really)
 
Sounds good :)
 
8:39 AM
"I should write an allocator ... said no one ever"
3
 
@thecoshman it's not too bad actually. I enjoy dipping into that project every once in a while to lend my architect's eye, or fix some display bug :)
 
@BartekBanachewicz Then who wrote Boost.Pool?
 
@LightnessRacesinOrbit you did say telecoms right?
 
@thecoshman yes
 
@DeadMG Boost isn't written. It's produced in complicated process of transcribing mutated DNA into binary representation of C++ source.
 
8:40 AM
@thecoshman telecoms relies on timing sync to a critical degree
@thecoshman so we're your alarm when that's starting to fail and your nodes are about to fall over w.r.t. to each other
but yes the research stuff is only tangentially related to our telecom activity - the hardware platform is similar though as telecoms makes use of GPS too
I guess that's kinda how we ended up with it
 
@LightnessRacesinOrbit ah, I don't deal with alarm stuff. I take it you know of OSS...
I deal with the syncing between nodes and OSS, as well config im/ex-port
 
user1357851
This chat is so peculiar these a few days around this time of the day ... you get this certain group of people talking amongst themselves and that group talking amongst themselves and sometimes they interact, but mostly they don't ...
 
Reading a technical dock; highlighters to the ready!
 
user1357851
It is almost like a log displaying a few concurrent threads with different contents
 
It is no different from any IRC channel in this respect.
 
8:48 AM
@thecoshman Yeah we'll have mutual "friends" in the industry but no direct links I'd imagine
@Telkitty And there's you, about whom nobody gives a fuck.
@Telkitty (Except me.)
@thecoshman "dock"!
 
hi guys
 
user1357851
@LightnessRacesinOrbit lol, do you expect me to send you '<3' or troll the heck out of how inaccurate your last few statements have been?
 
0
Q: Is there anything better than "friend" in C++

summerenoSuppose I have three C++ classes FooA, FooB and FooC. FooA has an member function named Hello, I want to call this function in class FooB, but I don't want class FooC be able to call it. The best way I can figure out to realize this is to declare FooB as a friend class of FooA. But as long as ...

Friends are the best
2
 
@Telkitty Go for it - I'm ready!
 
private bff class
 
Xeo
8:55 AM
@kbok Yay, passkey pattern time~
 
Hey all. I realize this isn't the best place for this, but I've been searching all day and am at wits end. Anyone here willing and able to help with what should be a simple DirectX 10/C++ problem involving minimizing the window?
 
@Xeo I thought about that also
 
Apr 5 at 13:12, by Lightness Races in Orbit
This is the Lounge. It's where logic goes to die. Have fun, after reading our handy survival guide!
 
@user1217557 Explain your problem, there's no activity anyway
 
1
A: Is there anything better than "friend" in C++

Lightness Races in OrbitNo, and this is not really a limitation. To my mind, the limitation is that friend — a blunt weapon for hacking around design flaws — exists in the first place. Your class FooA has no business knowing about FooB and FooC and "which one should be able to use it". It should have a public interface...

yeaaahh
@kbok what there's loads
@user1217557 you can ask
 
user1357851
9:00 AM
@user1217557 Were you the one who came here a few days ago with the same problem? Still on the same thing?
 
When I alt tab in my application, the window just goes straight in to windowed mode (instead of minimizing how I want it to). I attempted to force it to minimize via ShowWindow(hwnd, SW_SHOWMINNOACTIVE), but when i restore the window and attempt to toggle from fullscreen to windowed afterwards, it goes black for a second and stays in fullscreen.
The second time I attempt to toggle from fullscreen it minimizes again (receives WM_ACTIVATEAPP, the message I'm listening for to toggle from full/minimize).
and no, that was not me a few days ago! :(
 
@user1217557: Have you tried asking this on SO proper?
Also, get a name!
 
LEWG has concerns about lifetime with polymorphic allocator
 
Yeah get a name it's so much more fun
 
Not yet, I figured I might as well see if anyone knew in here, since it is a bit easier in real time.
I will get a name first thing after this! I promise :D
 
9:02 AM
@user1217557: Then ask there. Really.
 
What about "Henry IV" or "Vanessa"
 
Thanks, I will. I take it nobody has had this problem before. :/ Thanks anyways guys :D
 
More seriously, I don't know the answer to your question but since it is a well-formulated specific problem I think you'll have an answer very quickly on SO proper.
 
@user1217557: This audience is much smaller than that of SO.
 
user1357851
Try the user name Crystal Harris & don't forget the avatar
 
9:06 AM
lol
 
@user1217557 Easier for who?
 
user1357851
@LightnessRacesinOrbit I think I have a better idea for newb initialization: we troll the newb to find out whether the person has the entertain value & intelligence for us to help him/her
 
It is not easier for the people you ask for help. Unless your time is more important than ours, asking here is not "easier" than asking on the website which exists with the sole purpose of "getting answers to programming questions"
 
When I've helped people, I find it easier when I can ask questions about information they may have forgotten to provide or they may not have thought relevant. That's why real time is nice.
 
@Telkitty You realise I already do that automatically with everyone, right?
 
9:18 AM
@user1217557 but when it is posted on the Q/A site, it is easier because I can decide whether to deal with the question. I can look at the title at my convenience and decide "that sounds interesting", or "I won't be able to help with that".
When it is posted here, it is thrown in my face here and now
if you're working from the assumption that "these people will want to help me right now", then yes, doing it in realtime is easier for everyone. But that's a false assumption. People aren't in this room to answer questions or help strangers out. Sometimes, some of us may do that anyway, but it's not what this room is for. And we get a lot of people who think it is "easier" to throw a question in our face than just ask on SO
 
I'm not forcing you to answer. If you don't feel like now is convenient and you can't answer because of that, that's alright :). But there's also a chance someone in here DOES find now convenient (as was said earlier "nothing happening in chat right now anyways" or something along those lines).
 
Because it is easier for them
 
I've asked on both chat and SO. It's not a matter of easier or not.
 
you're right- it's a matter of that the chat is not a helpdesk, and SO is.
 
@user1217557 Sure, and there is no rule against asking questions here. I'm merely pointing out that the "it is easier" excuse is bullshit
@user1217557 You just said it was. ;)
19 mins ago, by user1217557
Not yet, I figured I might as well see if anyone knew in here, since it is a bit easier in real time.
 
9:21 AM
I said it was a matter of easier for EVERYONE not easier for me
0
Q: Minimizing DirectX 10 Window on Alt Tab

user1217557I've been trying to get my DirectX 10 application to properly handle alt tabbing from full screen. When I alt tab from full screen, the application automatically goes into windowed mode. I tried listening for WM_ACTIVATEAPP to manually minimize and maximize the program. It works, but it breaks o...

 
@user1217557 but it isn't. It is easier for you, but it is not easier for us.
 
Don't forget the name & pic, you promised
 
I didn't promise Crystal Harris]
 
If you have the choice between running up to a stranger on the street and asking them for directions, versus stopping for a minute to look at your map, which is easier? It might be easier for you to ask someone (because it's realtime), but it's certainly not easier for everyone. (It's not easier for the guy you accosted)
 
Bad analogy considering I did both.
 
9:24 AM
@user1217557 Ok, which is easier then? Accosting someone while looking at a map, or just looking at the map?
the same answer applies: for the other guy, the easiest one is the one where he's left alone
 
So your argument is that you're so offended that I sent 2 messages in a chat room that you just couldn't ignore - it was so inconvenient to you that you felt the need to point it out?
this is a chat room, im not walking up to you specifically, it's an open forum
its just a bad analogy from the ground up
 
two hours spent on polymorphic allocators this morning
 
Xeo
@user1217557 The regulars are pretty much in consent wrt newbies asking questions in here - there have simply been way too fucking many that think it's cool to ask here whatever question they have because we're the most active room.
 
user1357851
@LightnessRacesinOrbit maybe there should be a set of brainteaser/C++ questions - newbs don't have to get them all right, but surely being witty and humours with answers would assist the newb in getting some help
 
that's fine, i'm not asking anyone who doesn't want to answer to respond.
nor do i expect a response/etc.
 
9:33 AM
@user1217557 I said nothing about being offended
 
Seriously guys, he had a C++ question, asked if it was cool to ask here and we were 3 to say to him that it was
In most case I agree with the noob problem but in this case he did nothing wrong
 
@kbok I disagree
 
What he did wrong was the "It's easier to throw a question at you than just post it where it belongs" part. I have no problem with the question itself
 
Again, that's contingent on me not posting it where it belongs, which I did
 
9:35 AM
but it is not "easier for everyone" to pollute this chat room because you're too lazy to wait for an answer on SO
 
In my experience, it is easier for everyone
 
@user1217557 it is contingent on you not waiting for an answer from SO
 
It's easier for him, and since he knows that could be a nuisance he asked it if was OK to ask here and now. And we said yes.
 
@user1217557 and I am pointing out that it is not. Once again, this room gets a lot of people who come in to ask a question "because it is easier (for them)"
For us, it is easier to not have this happen
For us, it is easier to go to SO when we want to answer questions
 
that's your own personal opinion
i even asked if it was okay
i dont know how you're arguing right now?
 
9:36 AM
@user1217557 Which is a completely separate discussion
I'm not saying is is not "okay" to ask questions here. I'm saying it is wrong to assume that it is "easier for everyone"
 
so basically, all this is you parsing words and debating a word i used?
 
@user1217557 just take it back and you'll be fine :)
 
then i'm sorry, it's not easier for some people. it may inconvenience some people by polluting chat.
to those people, sorry for polluting chat
I don't think you can make the assumption though that it's easier or harder for EVERYONE.
anyways, i'm over it
 
@user1217557 it is not
Apr 13 at 18:26, by Etienne de Martel
In sense, it's like you have to earn your "right to ask" here by becoming part of this little community. If you don't have time for that, or don't care for that, then go on SO instead.
 
clearly not everyone sees that as an ironclad rule
 
9:39 AM
That message was starred 25 times. In other words, it is the opinion of 26 people
 
or else people wouldn't have offered to help in the first place
 
@user1217557 I never said anything about it being a "rule", nor that it was ironclad
I said that it is more than my opinion
 
then what would you suggest someone does besides asking if it's okay to ask a question and then proceeding when people offer to help?
 
@user1217557 Well, you could just post it on SO, and wait half an hour and read the answers you got.
It's worked out fairly well for a lot of people. :)
@user1217557 but if you want to ask here, and risk getting into arguments with people, or risk getting no answer because this place has fewer active people answering questions than SO does, then I would suggest just asking if it's ok and then ask the question. There's no rule against that
 
I knew the risk and I did it anyways. I'm a daredevil, one might say.
No regrets.
 
Besides, I figure if anyone knew the answer, it's a specific enough thing that someone would know if they've dealt with it. At this point I'm only here for the entertainment (you)
 
But if you do that, I would suggest you consider that you are inconveniencing people with your question. That might be okay (for example, if it's quiet here), but it's still polite to remember that yes, you're barging into a room which pretty much exists with the purpose of not answering questions, and asking questions, and that is not "easier for everyone"
Just like if you approach a stranger on the street to ask a question, it might be perfectly okay, but you're still inconveniencing him/her, and it seems kind of impolite to tell him "it's easier for everyone if I just stop you to ask my question"
 
Like I said, that's a terrible analogy and you should be ashamed for using it :/
The relationship between me and you in a public chatroom is fundamentally different than the relationship between me and a stranger on the street.
 
@jalf Some questions lend themselves more to conversation due to poor upfront details or vague requirements. These are the ones I close on SO as "not constructive" because it's just some newb rattling off error after error in the comments. I think that's what he meant.
I certainly don't think a three-page argument on the topic is warranted.
 
@user1217557 Well, you can make it "a group of strangers standing around chatting on the street", if that makes you any happier
 
9:45 AM
@LightnessRacesinOrbit this
 
That doesn't change anything
 
This conversation has been far more disruptive to the lounge than the user's perfectly reasonable and polite request to ask a question
I mean, you "threw it in my face, here and now"
 
ok jalf, thanks for the advise.
advice
***
 
The wiki needs a new rule that says "the lounge is NOT a room for saying how the room is not a helpdesk"
 
oh, another piece of advice. Asking questions here yields random results at the best of times. ;)
Sometimes people yell at you, sometimes you get silence, and sometimes you get an answer. And sometimes, you get a mix. :)
 
9:47 AM
And sometimes you get jalf! :D
 
I didn't expect an answer, but I'd rather try as many places as possible to get the best possibility of an answer.
I am in a bit of a time crunch.
 
You totally got jalfed this time
3
 
Also, username ideas please.
Crystal Harris is out
 
Henry IV is cool
 
@user1217557 Feel free, but again, remember that when you do that, it's to make it easier for you, not for everyone else (it's easiest for everyone else if you ask one person, not if you ask everyone)
 
9:48 AM
Or, VisualStudioSucks ?
 
Okay.
I will never find a job with a name like VisualStudioSucks!
 
If you want a job better go for something like "DynamicYoungProgrammer"
 
haha
 
or just pick an animal of your choosing
 
@user1217557 "Cicada"
 
9:50 AM
Cicada?
 
Yeah Cicada
It's a great username, and it's free
 
Seems random, no? I already set a username btw, chat just hasn't updated.
 
@user1217557 What's "random" about it?
 
Ok, did I just get Cicada'ed? :)
 
"daves225" is lame
 
9:52 AM
boo
 
@jalf I don't believe so.
 
t.t okay Cicada it is
 
too late
 
@user1217557 Great! It's a good name. I think you'll enjoy it
 
9:52 AM
@kbok He can do it on meta then apply network-wide
 
You guys are evil.
 
user1357851
@R.MartinhoFernandes yes?
 
@user1217557 you need to go to meta stackoverflow to change again I think
 
@R.MartinhoFernandes Can I help you? :)
@kbok I thought you got two
 
user1357851
your gawd is now answering :p
 
user1357851
9:53 AM
gawd not god
 
Displays as Cicada on meta
 
don't forget the pic
 
Of? A cicada?
 
this or something else, but autogenerated avatars are less than funny
 
@user1217557 yay, works on SO
congratulations!
shame chat is so slow
 
9:55 AM
Why did you do this?
 
do what
 
So what did Cicada do? Didn't bother going through logs but just saw that he's a user in chat
 
he gave up his username, so now it's available :p
 
termios.h Y U define B0?
 
@R.MartinhoFernandes I'm not
@user1217557 wayyyyy to eloquent!
 

« first day (914 days earlier)      last day (4036 days later) »