« first day (1392 days earlier)      last day (3572 days later) » 

7:00 PM
savages
 
walking is nice. Right?
just walk for thirty minutes and enjoy the day.
 
maybe if you're a caveman
 
@Puppy :(
 
I really prefer mountain biking
but I don't have the time to do it as often as I would like
running can be more easily done from home
 
I wish I have a swimming pool. I love to swim but I will never do that in the ocean.
 
hm, blergh. suppose you wanted to have an couple apply(func)members on a container like thing, one that modifies, another which applies to a copy and returns that. what would you call them? apply(func) and apply_copy(func)? simply distinguishing by constness is blergh
 
I asked this question before
 
:D
 
I called the modifying one transform
 
At work I heard the full Imperial March on the radio. Probably the first time I've heard it mixed in with regular airplay.
 
7:08 PM
and the non-modifying one map
 
@Rapptz hm... don't want any misconceptions because of std::transform :S
 
std::transform is an apply that modifies
so.. it's literally std::transform
 
but std::transform can also output to a different thing, so not modify at all
 
I guess.
 
begin returns iterator while cbegin returns const_iterator btw.
 
7:10 PM
You can call it apply and map.
begin returns a const_iterator if it's cv-qualified.
 
@LucDanton capply(func) ? nah :p
 
map/cmap?
 
meh
there's no point in offering those two versions.
 
maaaybe qapla(func) :p
 
in_place_map
 
7:12 PM
just offer map and if people want to mutate in place, they can just do cont = map(cont);.
 
An interesting meaning of ‘in place’.
 
depends on how cont defines operator=(Range).
 
meh, I guess I'll do apply and map
 
clipboard failure
apologies.
 
user3010322
RIP Clipboard.
 
7:16 PM
ikr
 
gah, why is intellisense pulling in all these fucking macros from math.h, I didn't even include it :(
 
a stdlib header probably did.
 
what's a .tcc file?
 
just a fancy .inl?
 
Xeo
7:20 PM
I'd say so
 
modules for C++ are gonna suck
 
@Rapptz but, but I need them not to suck ._.
 
me too man
I'm just being realistic here
 
@StackedCrooked What about it?
 
maybe it's just me
"post-constructor" requires "deconstruct" object.
Never heard of deconstruction in the context of C++ :P
 
7:26 PM
I heard, from the mouth of unexperienced SO wannabe-C++-programmers :P
e.g. "how do i call the deconstructor"
 
deconstruct_deleter
Actually, it's kinda cool.
deconstruct<T> is like make_shared<T>, but it also calls a post-constructor which is found via ADL.
This post constructor accepts a boost::shared_ptr<T> as argument.
 
user3010322
@AlexM. Thanks for the advance notice, I'll try to keep it in mind. :D
 
:D
I'll remind you 2 weeks before the jam too if you want
 
huh
I might be forced to boot into Ubuntu.
 
// adl_postconstruct will be called during
// implicit conversion of return value to shared_ptr
boost::shared_ptr<mynamespace::X> x = bs2::deconstruct<mynamespace::X>();
Using implicit conversion as a post-constructor hook is quite clever.
 
user3010322
7:35 PM
@AlexM. Ye please!
 
It looks like a glorified factory method.
 
after doing a whole bunch of these constexpr things I found a comfortable way to style my ternary operators
 
I think I figured out the name. They "decompose" the constructor by adding a pre-constructor and post-constructor. deconstruct
 
forgot that noobuntu won't have drivers for my wireless adapter
 
7:38 PM
@StackedCrooked auto-fail
 
Today I realized "broken_promise" is nice name. Since it both refers to the promise being destructed ("broken") and failing to deliver the promised value.
 
Oh hey Crawl is available
 
what's it?
 
meh
not in 2014
 
7:43 PM
blah blah blah i'm a graphics whore blah blah
 
nerd
 
AND HOW
My Steam wishlist is growing incredibly fat
 
interesting
this crawl game looks cool.
 
I need to buy more controllers too
 
@Puppy that'll grow hair on your chest
 
7:47 PM
I just plugged the unreliable wire back in.
 
putting reboot in a system startup script is an excellent way to fuck with a person
 
what's better for a small server - apache/nginx/???
 
lol
 
@Abyx What are you serving?
 
@Collin static content, mostly.
 
7:51 PM
Whatever's easier to install
I found nginx to be pretty easy to set up
 
damn exception.
 
nginx is always better
For everything
 
recently I was writing a small nginx module and now I hate its crappy C code.
but it seems it's quite easy to setup
 
fstream exception Access violation. But I closed the file when I already loaded the tiles into std::array.
 
@CatPlusPlus CDN
 
7:53 PM
CDN what
 
access violation is not an exception fstream can throw.
it's an exception your operating system throws when you dun fucked up badly.
 
Apache is vulnerable to stupidest things like Slowloris, it's just past its viability as a frontend server
 
@Abyx python -m http.server is probably good enough for your purposes, lol.
 
No it isn't
 
Of course it is. It handles 0 users at average perfectly fine.
 
user3010322
7:56 PM
1 ^ 1 = 0...
 
@Puppy I'm trying to see where I goofed up. The exception pops up when the function is finished and returns true.
 
user3010322
1 ^ 1 ^ 1 = 1
 
user3010322
That's a property.
 
pearls of wisdom from thephd
 
Xeo
hm
I just noticed
I have nothing to do this weekend \o/
 
user3010322
7:57 PM
@Rapptz I was just commenting! D:
 
Xeo
yay gaming all day
 
user3010322
@Xeo Go skydiving!
 
@ThePhD :p
I'm really tired
 
user3010322
7:58 PM
> Tard
 
"Better a poutine late than never"
 
looks awful
 
user3010322
One letter from a disaster.
 
@ThePhD Yes. Means "late".
 
s/late/cold/
@Rapptz noo it looks yummy
 
7:58 PM
@ThePhD Re*
 
so why is rightfold a potato now?
 
user3010322
He deleted his old account.
 
because moron
 
user3010322
His anime tendencies led him to trouble.
 
@ThePhD How so?
@Xeo Same here
 
8:01 PM
@TonyTheLion because anime has bad influence on people
 
I'm very well versed with anime and its effects on people
 
@ThePhD Again?
 
I heard a girl killed another because of it
 
Xeo
@Abyx 2 girls almost killed another because of Slenderman vOv
and people kill each other every day for no reason at all, so yeah
 
People kill themselves for various reasons, doesn't necessarily make the thing they blame for their suicide bad
 
8:03 PM
> Slenderman
._<
 
ANIME
 
@Xeo Because of Slender man? WAT
 
Xeo
> The two girls are accused of luring their friend into the woods and stabbing her 19 times, to prove their loyalty to a fictional character made popular by an online urban legends forum
 
horrifying
 
8:04 PM
@Xeo I should try that too.
 
ban kids
2
 
^
 
@Xeo Wow. And they said Grand Theft Auto will cause people to start a killing spree due to the violence of the game.
 
Xeo
spoilers: humanity's fucked up
 
@CatPlusPlus are you going to ban yourself?
 
8:07 PM
No, I'm too good to be banned
 
Do you think making classes final is sometimes a good design decision?
 
its a final decision
 
@StackedCrooked Yes, but not in C++.
It should be the default IMO.
Like non-virtual should be the default.
 
The only potential benefit is devirtualization, which is entirely unrelated to its intended purpose. (I think.)
 
I mean semantics-wise.
Screw micro-optimiformance.
 
8:11 PM
Private inheritance is considered a composition. Does final allow private inheritance?
 
But in C++ it prevents stuff like (ab)using inheritance for EBO.
@StackedCrooked No.
 
@StackedCrooked can there some sort of compiler optimizations based on the fact that a class is final exist?
 
@AlexM. void f(final_class& x) { x.foo(); } can inline call to virtual function foo.
 
@AlexM. Yes, the compiler can sometimes use this information to bypass vtable lookup.
 
Or at least omit vtable lookup.
 
Ell
@StackedCrooked Yeah. Design for inheritance n all
 
from a design-wise perspective I was never sure if final was necessary or not
 
If it's your own code then it's not a big problem because you can always modify it.
 
supposing a final class as in Java, if it makes sense to not be appropriate to subclass it, the marker final should not be needed
 
@AlexM. It is better to document in the code that a class shouldn't be inherited from, and have the compiler enforce that, than documenting it separately.
However, in C++ you already document that by just not having virtual functions, and final takes away flexibility as well.
 
8:16 PM
yes but that supposes there might be some incentive to subclass it
 
All Java classes have virtual methods.
Because Object has equals.
 
> It is better to document in the code that a class shouldn't be inherited from
 
> Ubisoft has since stated that they will continue putting Tom Clancy's name on future Tom Clancy titles out of respect for the late author.
Right, respect. Not, you know, money.
 
@AlexM. as in self-documenting code.
 
shouldn't the class itself kinda tell the programmer it's not meant to be inherited?
this is what I mean
 
8:17 PM
Formalise it and have the compiler enforce it. No reason to not do that.
 
need to take a nap to solve this problem.
 
if a programmer tries to inherit a final class then he must have found a reason to do it, which must mean the class isn't exactly uninheritable to him (?)
 
@EtiennedeMartel Well, obviously all such titles would be free, since charging for them would be fraudulent..
 
now I'm confused
 
@MartinJames That's not what I meant.
 
8:19 PM
@EtiennedeMartel technically, if they stopped doing it, fans would go crazy
 
They claim they'll keep putting his name on future titles out of respect, while the true reason is probably that the name itself is a very well known brand.
@AlexM. They could just rebrand the games with their own IPs, but it wouldn't sell as much because brand recognition is a real thing.
 
yeah but the fans would still notice it
like how they noticed when ubisoft stopped doing prince of persia and did AC instead
 
@AlexM. for the same reason you have private instead of relying on separate documentation or guesswork.
 
@EtiennedeMartel If not actually illegal, it's grossly immoral. Maybe it's time for some new Charles Dickens books.
 
granted, AC is pretty different from PoP
 
8:21 PM
@MartinJames The name belongs to them. They bought it a while ago.
 
but it's still the closest relative to it
 
@EtiennedeMartel Fucking lawyers...
 
They actually bought it before his death, even.
 
I prefer features that enable stuff rather than disable. The few good disablers are privacy because it "enables" the programmer to ensure that the object will not be brought in an inconsistent state by an outsider. Constness enables thread-safety and it prevents you from accidentally writing to the input param instead of the output param. However, final is a pure disabler and doesn't give anything in return. (Apart from speeeeeed.)
 
8:24 PM
@EtiennedeMartel Well, isn't then nice for his estate and surviving family, Tom being such an impoverished author and all before his demise.
 
I dunno
I wouldn't declare classes final just for self-documenting code
 
user784668
Fuck you, boost preprocessor.
 
@AlexM. it should be default :'(
 
Who gives a fuck about the intentions of the author of a crappy API.
 
And then have base class A { … } or something to make it non-final.
 
user784668
8:26 PM
Why the fuck the maximum of repetitions you support is 256.
 
@Fanael repetitions of what? push-ups?
 
user784668
Of BOOST_PP_REPEAT.
 
I used to think boost PP was cool. Until I decided to give X-macros a try.
 
this reminded me
 
They are fucking incredible.
 
8:27 PM
it's so long since I last inherited a class
 
@StackedCrooked Try Clojure macros.
 
user784668
@StackedCrooked Can't.
 
You will cry when going back to C++ macros.
 
@AlexM. My telepathic powers tell me you are not a Java developer.
@PolymorphicPotato now you made me feel bad :(
 
user784668
8:28 PM
@PolymorphicPotato They're terrible, you can't create invalid AST with them.
 
@StackedCrooked Incompetence is inherited from Java teachers!
@Fanael lol ASTs.
 
The pillars of mediocrity.
 
@StackedCrooked well that's true
 
The talk by Liskov reminded me of original ideas of modularity. You divide the system into components. Components can communicate via interfaces. Implementation details are private and unknown to the outside. This allows you to build a modular system and easy customization by swapping out components.
Meanwhile most company code looks like: Manager.getInstance().getSomething().getSomethingDeeper().reachIntoPrivates().s‌​etX();
 
Everyone is bad at programming
 
Ell
8:35 PM
That's why I'm going to write an xml parser
 
@StackedCrooked needs moar demeter's law
 
Ell
k I'm gonna do it
 
damn
 
Make everything SOA
 
@AlexM. Yeah.
 
8:35 PM
I really wish I could search my code by code properties.
like "Calls X function in Y fashion".
 
@CatPlusPlus SAO <3
 
@StackedCrooked screenspace ambient occlusion?
 
@Puppy that's SSAO, silly
 
ANIME
 
@Puppy Sword Art Online, silly.
 
8:36 PM
I'm trying out Archer
 
@StackedCrooked lol setters
epic fail
 
Cool, imgur supports upload via clipboard.
 
@StackedCrooked message queue-based interfaces are best interfaces.
 
cause I gotta admit, it's pretty fucking tedious grepping my code for every instance of a common function.
@StackedCrooked The main thing I've seen about that is that it makes it very difficult to do things the system was never designed to do.
the design is more flexible but the walls of the design are more solid.
 
@Puppy Still, it was kinda eye-opening to me. Despite being so obvious.
I suppose callbacks are the first enhancement.
 
8:41 PM
personally
since my entire project is built around the Clang guys not properly protecting their internals
 
I've found that I'm less and less willing to make things private.
I'd be more inclined to the Python way of doing things, "You really shouldn't fuck with this" rather than "You just can't fuck with this".
surprising there's no access_cast kinda thing.
 
Clang is kinda special case.
 
user784668
@Puppy There kinda is.
 
Ell
I don't think you should use something for something it's not designed for
 
8:43 PM
@Fanael ISTR some hackery based on pointers-to-members, but that's not a real feature.
 
But I haven't seen Clang code, so I don't know how horrible it really is.
 
user784668
Explicit template instantiation ignores access specifiers.
 
@Ell The Universe wasn't designed for us to live in it. Silicon was not designed to be made into a transistor. We use things for stuff they weren't designed for all the time. The astronauts on Apollo 13 survived because the lunar lander, which was never designed to support three crewmen for so long, could be retrofitted to do that.
 
How do you know?
Maybe they were.
 
Ell
@Puppy That is a terrible example
 
8:44 PM
The most spectacular violation of modularity principles I've ever seen is TBB scheduler. And that's what makes it great.
 
user784668
@Puppy The universe wasn't designed? There's an entire country of people who think it was, right between Canada and Mexico!
 
I know, they're quite moronic, but there's no news there.
 
@Fanael Prove that it isn't.
 
They require the user to update the refcounts manually!
 
Ell
I mean, don't use something for purpose A when it was designed for purpose B
 
8:45 PM
@Fanael Some don't :( There are dozens of us!
 
Ell
use something that was designed for purpose A
 
user784668
@Collin Yeah, dozens.
 
you assume that there is such a thing.
 
user784668
Out of what, eleventy million?
 
there is no C++ compiler designed to support Wide.
 
8:45 PM
"I don't know whether it is so" doesn't even get near to "it isn't so."
 
They tell you to change to member variables of an existing object (to change it's identity!) instead of destroying it and creating an new one.
 
@Fanael That was an arrested development reference, but yes, 300 million or something
 
user784668
Arrested development?
 
it's a sitcom.
 
user784668
Never heard of it.
 
Ell
8:46 PM
@Puppy clang is designed to support tools isn't it?
 
IMO not being sure whether something should be private or not smells like SRP violation.
You put so much into one module that you're not sure what to export and what not.
 
@Ell Not like Wide. If you want to do more than inspect the AST, Clang wasn't really designed to support it.
 
I thought it was quite funny, not sure how well the humor translates overseas
 
Ell
@Puppy Surely clang does more than inspect the AST when compiling code?
Or do you mean that isn't in it's public interface?
 
it certainly does the whole shebang, but it's not public.
and most of the analysis functions are, let's just say, not exactly designed for user-friendliness.
the code-generation APIs are just totally private.
that's why building Wide is such a bitch.
but it would be flat-out impossible if I couldn't access Clang's supposedly private internals.
 
Ell
8:51 PM
Hmm
I see your point
 
@Puppy how are you doing that :p
 
@melak47 Well, they simply put the headers in /lib instead of /include, so I just changed my include dirs to include /lib.
 
@Puppy those bastards
 
but some of the stuff I could really use is hidden in inline namespaces in implementation files.
 
@Puppy lol, okay
 
8:55 PM
extern "Wide"
 
protected pisses me off too.
I wish I had something that allowed a derived class to access the member on any base class instance, even one of a different more derived type.
might factor that out into protected public and protected private in Wide, I guess.
at some point.
 
Ell
but on the other hand
 
In PHP a base class can access a protected member of a derived class. :P
 
Ell
hm
 

« first day (1392 days earlier)      last day (3572 days later) »