« first day (1285 days earlier)      last day (3645 days later) » 

4:01 PM
use a template
 
DeadMG thanks I will look into that
 
preferably somewhere else
 
Ah, puppy, you're always so amiable.
 
friendliness was not one of the things screened for in the interview
 
user1804599
template<typename T>
void foo(std::vector<T>& vector) {
    vector.push_back(T());
}
 
4:07 PM
its ok, newbies in chatrooms should expect to be berated at least to some degree.
9
 
user1804599
@recursive_acronym Something like this should work.
 
rightfold thanks
 
> The breakpoint cannot be set. This expression has side effects and will not be evaluated.
REALLY
name.length() > 0 is the expression :(
 
your mother has side effects
 
user1804599
Maybe it sets errno!
 
4:09 PM
It's almost like the C++ debugger can only debug C code.
 
Ahaha
const is so useless
I hate when random software loads DLLs from where they shouldn't
Managing PATH on Windows is such a pain
 
PATH is just a dumb idea
 
It's... not?
 
it's a super dumb idea.
 
4:24 PM
Because...?
 
well, it's the global Dictionary<Object, Object> approach to storing information.
 
instead of doing anything meaningful/intelligent, we'll just ram a string in a global variable!
problem solved.
and to make it even more efficient
 
So you have no idea how environment works, gotcha
Also uhh yeah I don't even know what to say, what would you do instead
 
user1804599
Environment variables work fine.
 
4:27 PM
well
firstly, you could just ask the user where the damn thing is if you need to find it
and secondly
 
user1804599
At least on Unix-like systems. Dunno about Windows.
 
:lol: yeah that works especially fine in non-interactive apps
 
user1804599
@DeadMG Great, asking the user in a fully automated tool.
 
Also this is what environment variables do
 
like they can't automate passing parameters?
 
4:28 PM
How's that different from changing environment? Hint it's not
 
functions with input/output too hard, must use global variables everywhere.
 
user1804599
You can set environment per process.
 
:psyduck:
 
user1804599
And you want defaults.
 
Environment is not global, it's just inherited by default
Which is what you want most of the time, coincidentally
It's like someone actually thought about it!
 
user1804599
4:29 PM
Which reminds me …
 
user3010322
My renderer
 
user3010322
is so goddamn bad.
 
user3010322
I've given up.
 
user1804599
Good.
 
user3010322
I'm just going to turn off refractions.
 
user3010322
4:31 PM
Who needs transparent shit anyways.
 
user3010322
The coolest stuff is nice and opaque.
 
except tits, tits should be a little shiny
 
user1804599
@Jefffrey But he just said refractions turn him off.
 
they turn me on though
 
user1804599
dicks > tits
 
4:33 PM
like... imagine bouncing tits without refractions
eww
 
user1804599
@Jefffrey grandmother tits.
 
bouncing tits with refractions
yeah!
 
user1804599
Bouncing on sunshine.
 
I see we are on the same page
literally
 
user1804599
4:35 PM
 
user1804599
Best song ever.
 
Hey quick question, does anyone know if there the QNX and Microsoft C++ compilers have any special different preprocessor definitions? Trying to merge some extremely similar code.
 
New here? Read The Law.
16
 
user3010322
 
user3010322
@ScarletAmaranth No matter how hard I try, this is the best I can do. ^
 
4:38 PM
@ThePhD "my balls are prettier" :)
 
user3010322
They are. =[
 
fair enough, no C++ questions in the C++ chat room
 
Jagged edges.
 
user3010322
I didn't turn on anti-aliasing.
 
user3010322
Speeds up the rendering.
 
user3010322
4:39 PM
Also NO REFRACTIONS WHYYYY THIS DIRTY THING HATES ME.
 
You said it was the best.
 
user3010322
Oh, that's true.
 
user3010322
let me re-render.
 
user3010322
Mmmm. Dat 4x4 rendering Slooooooooooooowdown.
 
user3010322
I need to implement click-through raytracing.
 
user3010322
4:42 PM
That is, I need to be able to shoot out a ray on demand and get back its pixel colors and a whole stack of everything that's happened.
 
honestly; if I had to wait for CPU rendering on my raytracer, I'd just give up
good thing there is stuff that can make compute shaders for me
 
user3010322
There are people who get like 15-20 FPS using CPU-based raytracing on conventional machines.
 
I will not spend my youth optimizing random crap
:D
 
user3010322
I personally know someone who built a raytracer out of two GPUs and a bunch of CUDA cores.
 
user3010322
He could render Masterchief with HUNDREDS of lightsources -- of all kinds -- in realtime.
 
user3010322
4:43 PM
Like, 30 FPS, you can watch it animate.
 
user3010322
Was pretty shiny.
 
user3010322
(Masterchef?)
 
user3010322
This guy:
 
user3010322
John-117 "Master Chief" is a fictional character and the main protagonist of the Halo fictional universe, created by Bungie. Master Chief is a player character in the series of science fiction first-person shooter video games: ', Halo 2, Halo 3, and Halo 4. Outside of video games, the character appears in novels – ', ', ', and ' – and has cameos in other Halo media, including ', ', The Halo Graphic Novel, Halo Legends and Halo 4: Forward Unto Dawn. He is voiced by Chicago disc jockey Steve Downes in the video games in which he appears. Master Chief is essentially the face of the Halo s...
 
> Outside of video games, the character appears in novels – ', ', ', and ' –
That's some original naming.
 
user3010322
4:45 PM
Hahaha.
 
user3010322
Nice one, wikipedia. :D
 
user3010322
Also,
 
Chat is very well coded
 
user3010322
 
user3010322
@R.MartinhoFernandes ^ THAT'S the best I can do. :D
 
user3010322
4:45 PM
Which is still woefully inadequate. ;~;
 
Woah they're updating Borderlands 1 with Steamworks multiplayer
 
user3010322
Commitment.
 
I wonder why on Earth did they pick GameSpy in the first place
 
user3010322
Everybody picked gamespy in the beginning.
 
user3010322
And boy, was it terrible. :D
 
4:49 PM
It was shit for years and everyone knew it
Last time it worked sorta-decently was around Soldier of Fortune 1
That's 14 years ago btw
 
user3010322
Mmm.
 
user3010322
There's no way to
 
user3010322
iterate over member functions of a class, is there?
 
In C++? No
 
user3010322
At compile-time.
 
user3010322
4:50 PM
Not even at run-time.
 
@ThePhD False. There are ways to finish sentences.
 
user3010322
@R.MartinhoFernandes I have a bad habit of typing things out halfway as they form in my brain.
 
user3010322
:c
 
user3010322
@CatPlusPlus Well, that sucks.
 
4:51 PM
@sbi ¬_¬ did you tweet some random video to watch... or is your account all dirty?
 
user3010322
Binding things to scripting languages is going to be an asshole of pain, then.
 
@ThePhD Not without writing an external tool based on Clang or something.
 
You need external tools one way or another
 
user3010322
lua.make_class<MyClass>( "MyClass" ).add_function<MyClass::Titties>( "Titties" );
 
Making bindings will be a pain anyway, because C++ FFI is p shit
 
user3010322
4:53 PM
Mmm.
 
user3010322
I can't... wait... <_>
 
There's some C++ binding libs for Lua
Or use SWIG
Expose a C-compatible API and generate bindings off that
 
user3010322
The C++ <-> Lua interface is actually already fully complete.
 
user3010322
It's just trying to figure out the best way to say "Make this class and all its shit available in lua."
 
user3010322
It's basically a shortcut for doing lua.add_table( ... ); lua.add_function( ... ); 20 times.
 
4:55 PM
Just do it manually, it's one-time write thing
 
@ThePhD Either wait for reflection or do something akin Boost.Fusion's ADAPT_STRUCT.
 
user3010322
Mmm. Well, alrighty. :D
 
user3010322
Oh
 
user3010322
I know what I need to implement
 
user3010322
I need to implement that multisampling detection algorithm I was talking about before
 
user3010322
5:00 PM
Which, in order to do that, I need to enable patch saving / rendering, so I can preserve information about a patch of rendered work and its neighbors
 
you're doing it wrong
 
user3010322
:(
 
user3010322
Am I really doing ti wrong already? I haven't even started. :c
 
yes; what the high definition fuck is multisampling detection algorithm
and why would you need to track the entire hit stack
 
user3010322
Uh. It's detecting whether or not you need to run the 4x4 Antialias raytracing algorithm, OR
 
user3010322
5:10 PM
just shooting a single ray and calling it a day.
 
sbi
@thecoshman You might want to follow back the conversation we had. Understanding is lurking somewhere there, and if you struggle hard, you might just gain it. :)
 
: - /
feel free to waste your time any way you see fit
 
user3010322
@ScarletAmaranth We don't keep the entire hit stack. You just keep track of the last primitive you hit for that ray.
 
user3010322
If it's not the same as the next primitive you hit, then you should multi-sample.
 
user3010322
If you do it like this, however, it's subject to how you raytrace (left-to-right lines or vertical lines)
 
user3010322
5:11 PM
So, you keep track of the 4 adjacent pixels
 
user3010322
If any of them are different from the other, trigger multisampling
 
sbi
@R.MartinhoFernandes Now look, this is rather unpleasant. You gave a talk and "forgot" to invite me. Now I am a "bastard" because I scoff you for that? That's a strange view on a social issue even for a robot. :)
 
alright; I'll just finish this argument with: "my balls are prettier than your balls"
then I post this:
and now I take my leave! :)
laters
 
user3010322
;~;
 
user3010322
You're cheating with the GPU!
 
user3010322
5:13 PM
Hmph. Later. :c
 
@sbi Did you get my e-mail?
 
sbi
@R.MartinhoFernandes Yes. Thank you. Unfortunately, I will have to watch over the sleeping wee ones on that evening. :(
 
@sbi Is it that hard to believe that I truly forgot?
 
sbi
@R.MartinhoFernandes Oh, no, not hard at all. But why would that make me a bastard?
 
That was the popping in only for scoffing.
 
sbi
@R.MartinhoFernandes I thought you'd be glad to hear I'm still interested in your doings. :-/
 
@R.MartinhoFernandes oh ahaha - classy
 
> Trent Mays (L) and Ma’lik Richmond ®
fail
 
@R.MartinhoFernandes I needed the explanation (never played nethack) but I appreciate the style :)
@EtiennedeMartel You know. I think I understand what rape culture is. However, it seems like naming it "rape culture" is somewhat akin to invoking Godwin's law. "Rape" is such a loaded term, that just naming a culture "rape culture" doesn't seem to have constructive potential - unless used to refer to actual rape culture (e.g. in criminal gangs or cult sects?). I'll read this one again since you recommend it :)
 
@sehe Good point. If you want to attract attention to an issue, though, calling it "<something bad> culture" is a good way.
 
5:30 PM
@EtiennedeMartel I am glad I am not living over there in the USA.
 
Xeo
whoo, new No Game No Life episode /cc @Mysticial @StackedCrooked
 
Well, "<something bad>" is perhaps okay ("neglect culture", w.r.t. kids, "power culture" w.r.t. power abuse) but "<something extreme>" doesn't sit well. There's not much room for depth anymore if one measurement axis is maxed out a priori.
 
user1804599
Everything is OK.
 
5:34 PM
@VáclavZeman Are there comparative stats? Because, I too think this problem is much more widespread than is usually given thought. That's the thing that "rape culture" tries to bring to the light: people seem to be structurally ignoring the scale of the issue. This, rightfully, could be called "culture". And it's interesting to know why this happens. Whatever the conclusion is, that's interesting
 
what does this mean? :| mydir=$(dirname $(readlink -f $0))
 
@presiuslitelsnoflek Ba-dum-t... oh well :)
 
@sehe It fails at statistics though.
 
Haven't read it yet
@Crow It means set mydir to the real (expanded) path to the directory containing the currently executed script
 
There is no formal record, therefore believe my assertion that it doesn't happen often.
 
5:35 PM
@R.MartinhoFernandes Hm?
 
@Crow should be mydir=$(dirname "$(readlink -f "$0")") though - to account for directories (or symlink expansions) containing specials - such as spaces
Also, readlink is not usually present on fresh boxes.
 
@Xeo You had to tell right when I got to work. Thanks and fuck you. :)
 
Xeo
Nonono, it came out right when you got to work. :)
 
sure..........
:)
 
@R.MartinhoFernandes "it"? Assuming you mean actual rape, I'm not so sure. Yeah, I don't think it's daily happenstance for anybody, but I do think it's a lot more common than people think. I can totally see domestic abuse in this picture, and I can just tell from looking around that there is a lot of room for "deviant norms" in the privacy of families and homes
 
5:38 PM
@sehe It doesn't matter what "it" is. The logic is flawed.
 
Oh. I'm sure. Not having many facts doesn't mean you can't think about issues though
 
@sehe so... it's kind of like mydir = os.path.dirname(__file__) in python, if you're familiar with python?
 
@sbi vOv I just wasn't sure if it was worth my time, or if your account was slutty
 
I do think that a large part of science is actually driven by imagination. And then the checking of the ideas that were often created without (any) basis (in facts). Yet, the very fact that people ponder things is valuable. Just don't pass it off as science, maybe. Label it philosophy if you will.
 
@sehe In the article it is not used to spur thought, but to quench it.
 
5:41 PM
@Crow Even if i'm not, yeah. Still needs the readlink in there to canonicalize. I think it will at the very least straighten out things like /home/userid/Documents/scripts/../../.config/ into /home/userid/.config/
@R.MartinhoFernandes Still haven't read it. Will do later.
@sehe - sir really thanks for reference link and i have already started reading "Effective C++" and it will take sometime to complete the book reading and understanding.. — manu 3 hours ago
Woot ^ that's not the worst response
 
You're not knighted!
 
@rightfold o_0 only just seeing this edit
well... the notification for it
 
Xeo
> 'Lines we wanted to say someday', #4
bwahahaha
 
@R.MartinhoFernandes Yeah, talk to the queen. I can't help it they're slow
 
C++ Modules. Come phastar, plz.
 
5:51 PM
That's what she s... wait.
 
user3010322
@EtiennedeMartel I read the whole thing. It all makes sense and seems mostly no-brainer ish, really.
 
It pains me that 32-bit is still a thing. It is inescapable in Windows.
 
I've written this code so many times.
 
user3010322
You really like network communication stuff, huh?
 
user3010322
5:54 PM
Even I can remember you writing code exactly like that not once, not twice, but three times before. o.0
 
I've grown to like it.
When I joined the company 4 years ago I knew nothing about networking.
The only thing I knew during the interview was that UDP may drop frames and TCP doesn't.
I had never heard of ARP.
 
user3010322
That covers just about my knowledge too!
 
user3010322
There's a third kind of transfer protocol?
 
I thought packets started with HTTP then TCP then IP etc...
One interviewer looked shocked at one moment.
The only thing that saved me was the software-development part of the interview.
I still don't really understand why and how vlans are used. Only recently I got the basic gist of subnetting.
I get away with a lot :)
 
@StackedCrooked You should be boned instead.
 
5:58 PM
@EtiennedeMartel As long as it's not by me.
 
@DeadMG I'm not judging.
 
user3010322
I wouldn't mind, so long as he spends the whole time talking about networking stuff in detail.
 
For once I agree with @DeadMG.
 
@CatPlusPlus I'm starting to think that we should put Judge Dredd's portrait at the top of the newbie hints.
 
ITT: ThePhD is flexible.
 
6:00 PM
libc++'s implementation of system_clock::now looks like this:
system_clock::time_point system_clock::now() _NOEXCEPT    {
    timeval tv;
    gettimeofday(&tv, 0);
    return time_point(seconds(tv.tv_sec) + microseconds(tv.tv_usec));
}
chrono is cool :P
seconds(tv.tv_sec) + microseconds(tv.tv_usec)
 
love that _NOEXCEPT
 
no magic numbers :P
@DeadMG now is now!
 
user3010322
Chrono saves the day.
 
user3010322
Arrrgh
 
user3010322
Why does reflection do this to me. ;~;
 
user3010322
6:01 PM
Does it not like me? Does it hate me?
 
lol
no, it's just unimplemented,essentially.
 
The only thing that sucks about chrono is std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::high_resolut‌​ion_clock::now().time_since_epoch())
(verbosity)
 
Xeo
NGNL episodes are about 20hours too short
 
Does anybody here have the godly powers of moving questions between boards?
 
I wish I could keep rewatching the same anime and keep enjoying it.
 
6:03 PM
@StackedCrooked :)
Give it few years and watch it again.
 
Stroustrup has really strange ideas about namespaces.
@VáclavZeman I try :)
 
Xeo
@StackedCrooked using namespace std::chrono :P
 
@Xeo I do :P
 
Xeo
and using namespace std::chrono::operators; or something, where the UDL operators live
 
I did that in one of my namespaces in a header file. I thought it would be ok since I was not polluting the global namespace. But then I read Sutter's 14 year old post which told me to not do that.
 
6:06 PM
using chr = std::chrono;
chr::duration_cast<chr::milliseconds>(chr::high_resolut‌ion_clock::now().time_since_epoch());
 
I wonder if using A::B; is any different than typedef A::B B;
 
so much better
 
@Jefffrey but also needs typedef high_resolution_clock Clock;
 
@StackedCrooked the first only works if A::B is a namespace IIRC
 
I know, but I wonder if the latter is as "dangerous".
 
6:07 PM
chr...this reminds me about Chtorr. Has Gerrold finished the series yet?
 
typedefs are "good" right? :)
 
using are sexier
 
using slut;
 
also templated usings are useful
 
Hmm, he has not, according to Wikipedia.
 
6:08 PM
and there's no counterpart with typedef
 
And he is 70. He is going to die and leave us hanging :(
 
oh, I never thought about the relation between type aliases and namepace declarations.
 
Xeo
@StackedCrooked Yes - using A::B; is not restricted to types. B can also be a function or variable
 
Oh right. It can import a whole slew of function overloads.
Wait, it can import both functions and classes?
 
yeah, I was wrong
 
6:09 PM
@Xeo ..or variable. never thought about that one
 
using std::string; works just fine
or using std::cout;
 
I don't mind typing std::string and std::cout. I'm used to that.
However, std::chrono and std::placeholders are pushing it.
 
Oh, right.
Very good! :)
Stroustrup tells us to use a separate namespace for declaration and implementation.
I've never seen anyone do that.
 
Stroustrup is batshit insane.
 
6:12 PM
namespace Parser {};
namespace Parser_impl {};
How does that even work?
 
don't listen to him
 
you're talking about camel_Case guy here.
or Camel_case.
fuckin' eww.
 
that doesn't even make any sense tbh
 
I kinda like it.
But don't tell anyone.
> not every program needs to be exception-safe
hehe
 
I'm serious though. Wtf that does it means to use a different namespace for the implementation? If you are defining namespace::class::function you are defining class::function inside the namespace namespace. If you define it in another namespace you are defining something else.
 
6:16 PM
Inside the cpp file the Parser namespace functions will call Parser_impl corresponding functions.
I assume.
He didn't even provide an example.
 
@StackedCrooked Could you make an example of that?
 
// I posted about namespace composition before (which I read about in the previous edition of his book. The new book still promotes it:
namespace My_lib {
    using namespace His_lib;
    using namespace Her_lib;
    using His_lib::String;
    using His_lib::Vector;
}
 
Erm
 
@StackedCrooked I'm very happy with putting the usings at the function level. And -very rary- do I "using" a namespace at a TU level. But I much prefer namespace blf = boost::lockfree; etc.
 
When I asked on SO one person noted that this messes up forward declarations. You can't forward declare String and Vector in My_lib.
@sehe I do it a lot at the function level as well.
Sometimes at the TU level, but always wrapped in another namespace.
 
6:20 PM
@StackedCrooked And you can't specialize My_lib::String because it's actually His_lib::string
 
Which is kinda superstitious.
@sehe yep, that too
namespaces can be headache
 
OMG, this is awesome:
 
@StackedCrooked me too. It's not superstitious. It's mental note that I'm /limiting/ the scope. Implicit limiting is not self-documenting enough
 
288
A: How do I make my document look like it was written by a Cthulhu-worshipping madman?

doncherry(Improved answer thanks to Bruno's help on his code) I've implemented some of the things I mentioned in my earlier answer, but I felt this was different enough to get a separate answer. Once again, tex.sx provided me with a couple of things I needed for this. Bruno Le Floch wrote some code that...

 
I prefer to one common outer namespace for general libraries, and one inner namespace for special libraries
 
6:21 PM
Anyways, what's with horrendous My_lib naming convention? I mean, my_lib, okay; MyLib, okay; But "My_lib" :S
 
@sehe in the end this outer namespace "becomes" the new global namespace.
:)
@sehe that's Stroustrup's way of trolling us
 
Ah, it was quoting
 
@VáclavZeman That's even better than the xkcd graphs.
 
I prefer boost's approach of using a detail namespace for implementation privates stuff.
after i had fallen in a pond
 
@StackedCrooked Unable to complete secure transaction
 
6:30 PM
sec
fixed
 
> he has weak bowels
Prins Filip?
 
lol
perhaps in his own way :P
the first Japanese part means "iPhone is very expensive hear"
 
here*?
 
@sehe he spend long times on the toilet multiple times a day (we never knew why)
@sehe actually, it's a bad translation of the Dutch "iPhone is duur hoor"
 
wtf :)
 
6:33 PM
ending a sentence with "yo" is like ending with "hoor" in dutch
both positive and negative ("ii yo" = "goed hoor", "abunai yo" = "gevaarlijk hoor")
 
because they are the bad guys
 
@LightnessRacesinOrbit CC/Attribution?
 
@sehe They never post any.
These guys used to scrape SO content but SE stopped them a while back. Still, various "other" forums are still being scraped.
 
230
Q: Why is Stack Overflow so negative of late?

GeotargetI've been using SO for a few years, and initially most questions you asked got a positive reception: happy comments and answers, people that tried to help you out regardless of the way you worded it. Of late the tendency is to simply close or put on hold most questions, or downvote them, or make ...

^^ lol, it got closed
 
6:52 PM
Q.E.D.
NO FREAKING WAY
 
Changing two tires... while driving?!?!
 
Welcome back @H2CO3?!? I've missed your blog posts :-). — Ben 3 hours ago
 
Actually, two complete wheels
 
7:00 PM
And with no shoes on :)
 
@sehe I didn't actually see them change the wheels, though.
they took the wheels off, and then put them back on, I never saw them exchange them for other wheels.
 
You could argue that this falls within the set of possible interpretations of "changing"
But, yeah, perhaps. I haven't paid close attention 100% of the time
 
well, changing the wheel would imply that they actually altered the wheel on the car in some meaningful way, whereas the wheel at the beginning and the end was the same
not that I don't find it nearly as impressive since you'd figure that physically swapping the wheels wouldn't be too hard once they're off
 
Xeo
@sehe ... wait, wha?
 
7:18 PM
hmm
if I implement this refactoring, I can implement many semantic optimizations and stuff.
and also save myself a shitload of time.
and effort.
and improved C++ interoperation.
 
tough call that
 
inorite
the problem is that I keep trying and failing :(
 
@DeadMG They must have tricked out the car to allow braking on one side only.
 
7:42 PM
> Coming this Fall, "The Sheiks of Hazzard." 
 
@EtiennedeMartel Where the Hazzard is dropping the soap after imprisonment for violating every traffic law ever?
 

« first day (1285 days earlier)      last day (3645 days later) »