« first day (1495 days earlier)      last day (3454 days later) » 

9:00 PM
Guys, I think it is time to kill all programmers and start over.
 
be sure to start with yourself if you want to do it
 
Someone just tried to convince me that templates are evil and macros are better alternative.
 
@sehe lol did you just gift him with a Qi implementation?
Poor sod.
 
I think it was a classy way to tell him
 
@xarn there are some truly stupid people out there
 
9:02 PM
@Xarn hey, someone tried to convince me (well, not really, he just said it and ended the discussion) that python scripts generating code are a better alternative to templates
I don't want to kill anyone though
 
ßssssssss
huh i never did start making that android so chat app
 
@LightnessRacesinOrbit To paraphrase one quite smart man, I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a stupidity.
 
@AlexM. He got a point. Look at Terra
 
what's Terra?
 
Earth
look down
 
9:03 PM
Im on my phone. Google it
 
(or, if you are in Australia, up)
 
Terralang
 
Terrablelang
 
> Terra is a new low-level system programming language that is designed to interoperate seamlessly with the Lua programming language:
this?
I had no idea this existed, let's see
 
sounds like an assembly version of Wide
 
9:04 PM
@AlexM. For specific cases I would even concur. Like, if you think so for std::vector alike, you are dumb. If you prefer python generator scripts to extreme cases of template metaprogramming heroics, I don't see that much of a problem.
 
there were no specific cases in mind there, just the general picture
 
> heroics
took me ages to find the > just then. hope you appreciate it
and then the backticks
 
@LightnessRacesinOrbit Hmmm?
 
RE: headline: did vector<bool> change?
 
@CaptainGiraffe I'd say I changed it into a toad, but it was already a toad.
 
9:17 PM
Oh, of course not, it is sarcasm. I'm an idiot. I apologize. It comes from upbringing. My father was an idiot; my mother was an idiot too.
 
As far as I know nope, and given how hard it is to get breaking changes into standard... yeah no.
 
@Alex yeah
I consider terra's metaprograming as low-level metaprogramming
You can essentially metawrite many metafeatures of other languages in it
Like reflection
 
@BartekBanachewicz Aren't metaprogramming and reflection more like opposites?
 
9:34 PM
no.
reflection is metaprogramming, just at runtime.
 
alright, so ##c++ at freenode officially went retarded...
 
@FilipRoséen-refp Took you that long to notice?
 
@Nooble it's always been a slightly special place, never expected it to go full retard
 
@FilipRoséen-refp haven't been there in awhile, has it gotten more retarded than before?
 
@Mgetz surely. I'm normally just lurking these days, there's no need to bother writing anything
##c++ is literally the blind leading the blind
 
9:43 PM
@FilipRoséen-refp What did they did this time?
Last time I was there, Ville told me that he considers Carruth to be mostly wrong, I called him an idiot and got banned. What did I miss due to not coming back there? :D
 
@Griwes that's basically how it goes. if you have the "wrong" opinion you get banned, or silenced with +q
otherwise the regular people just spam people with factoids through the nolyc (the bot)
 
@FilipRoséen-refp Nah, I got banned since I just basically went full assault strike on the morons saying that "functional programming and its features are not for a 'practical language' like C++".
Hey. I did spam people with nolyc. :P
 
@Griwes there's a difference between spamming people with nolyc, and only using it to provoke people (like through !news, etc, etc)
@Griwes I think you know what I'm saying
 
Yeah.
 
I see what you're saying
and what it seems like to me is, "We acted like total wankers and got banned; what a shit place."
 
9:47 PM
Still, I decided to consider ##C++ to go full retard the moment they said "Niebler's ranges are awesome; Carruth's ranges are shit".
 
@Mgetz The last time I was there, it was bad enough that I'm pretty sure it couldn't possibly have gotten any worse since.
 
Niebler's ranges are considerably better than Carruth's ranges.
 
Also lol, "with Carruth's ranges we'd need to write something akin to foo = sort(move(foo)); to sort in place, that's shit" when I pointed out that to get a sorted copy, you have to copy and then sort with Niebler's ranges.
@Puppy Somehow I have foreseen this messages.
 
although honestly I've read quite a bit about Niebler's ranges and I only skimmed the header on GitHub for Carruth's.
 
values >> references
 
9:50 PM
20 upvotes? FFS, it's just a freaking comma. — R. Martinho Fernandes yesterday
^^ Make that 100.
:)
 
user1804599
awesome
 
user1804599
huge copper mine
 
Have you guys ever wanted a bigger stack in deep recursive code?
 
user1804599
No.
 
no.
 
9:54 PM
Fear not (or perhaps be very very afraid), the solution: gist.github.com/orlp/4f2d89918abe73ce2559
 
lol
 
user1804599
You can just use std::stack and a for/while loop instead of recursion.
 
@Puppy I'm not banned
 
@orlp Instead of just setting the linker flag for a bigger stack?
 
9:54 PM
@orlp bigger stack? yes. In deep recursive code? no.
 
@Puppy yep
I wanted to build it :P
 
also
 
besides, I'm not certain if the linker flag allows for dynamically resizable stack
 
holy shit you're fucking around with the guard pages?
that's nasty, nasty, NASTY shit.
 
yes :D
it dynamically resizes the stack if you overflow
default size is 64 kB
 
9:55 PM
@orlp viagra
 
@orlp Doesn't seem to work well on either my Power machine or my SPARC.
 
@Puppy For the record, that wasn't the first time I got banned there, but I guess it was the last, since I don't really see a reason to go back there, even though I am not banned at this moment.
 
@orlp no, but I've wanted smaller stacks in threaded code (in AIX though)
 
@JerryCoffin you managed to run windows on either of those platforms?
 
@TravisJ Shooting yourself in the foot is a bad idea. If you see someone about to shoot themselves in the foot it's generally a good idea to tell them that they should probably not shoot themselves in the foot. That doesn't mean it's a good idea to make shooting yourself in the foot illegal. — Servy 6 mins ago
^^ Sounds like C++.
 
9:56 PM
@orlp Nope--maybe that's why it didn't work.
 
@JerryCoffin I guess :P
but I've wanted to make a dynamically resizable stack for a long time
since it uses a significant amount of virtual memory it's pretty much a 64-bit only solution
 
@FilipRoséen-refp So, it's precisely like the main site then?
 
@sehe pretty much, but worse (since one cannot downvote messages)
 
that's indeed worse
 
@Mysticial for what did you want a bigger stack?
 
9:59 PM
I always feel powerless on these sites, and I shun them
@orlp inb4 for temp storage pools of trivially destructible data?
(so even longjmp would be fine, no need to malloc/free)
 
@sehe you can easily solve that with your own stack
I mean, allocating a chunk of memory at the start of your program, releasing it at the end and distributing it
not as in what I did, actually replacing the stack
 
@orlp no, because that's not thread local and also not automatically scoped
 
@orlp But the Windows stack has been dynamically sized ever since the switch from 16- to 32-bit. All you really need to do is adjust the reserve and commit parameters with /stack when you link.
 
@orlp When I was emulating AVX512. Obviously I can't fit 32 x 512-bits of data in register, so the compiler puts it on the stack. Combine that with a large number of usual spills and the lack of coalescing and I blew up the stack.
 
besides I'm experimenting with custom stacks for things like microthreads
 
Xeo
10:12 PM
@TonyTheLion Oooh!
 
hmm
can they not pick up materials from belts travelling perpendicularly?
 
Xeo
inserters have one input, and one output side
if the belt isn't on the input side, it won't pick up from that
 
yeah, the input is the perpendicular belt, and the output is the furnace side.
and they also need that annoying 1 extra space it seems
 
Xeo
press alt, and you see the arrows for the input/output vOv
 
Pro-tip: don't fall asleep on the sofa on top of both your arms.
 
Xeo
10:16 PM
note: input/output are on opposite ends
 
yes.
 
@R.MartinhoFernandes could be worse
 
I had it working perfectly before when the belt travelled right up to the inserter
instead of travelling past it
now I have five in a line but they don't pick up
 
Xeo
pic
I had it happen where the items moved past them too fast
 
Also, WTF that was the office sofa.
 
Xeo
10:17 PM
for the normal inserters to pick them up
@R.MartinhoFernandes dude
 
@R.MartinhoFernandes What is that doing in your pub/at your place?
 
 
Xeo
@sehe He works at a pub!
 
Oh good
I was getting worried
 
Xeo
@Puppy get the belt closer
 
10:18 PM
Typing is so hard.
 
Are they still numb
 
Xeo
Try dynamic typing
 
ah yeah that's working
the other one wanted a space
so I added it
 
Xeo
@Puppy long inserter, I guess?
 
That's what she said.
 
10:19 PM
such a thing exists?
 
Xeo
No, I was guessing that was what you're using
 
nope just says regular burner
oh well
 
Xeo
hm
dunno
 
now how the fuq do I automatically get the plates back out :P
 
Xeo
normal inserters need the belt next to them, is what I know
@Puppy other inserter
(they also are outserter)
with input to the furnace
and output to... whereever
prolly belt
you can also have a furnace output directly into a chest
or don't have it output anywhere for now and pick stuff up manually with ctrl-leftclick for quick-take
 
10:22 PM
I thought Bartek had created that room.
 
Xeo
did he now?
iunno, was busy with kittehs
 
I was busy killing my arms
 
An armed killer!
 
Xeo
Unarmed, now.
He disarmed himself
 
It's weird when you're like "WTF was that thing hitting my leg?" and it turns out it was your arm and then you reach for it with the other arm and you hit the other leg and you're like "WTF was that?" again.
 
10:27 PM
You should unmount this brain device before resting on the sofa, duh
At least until it is properly tested :)
 
@R.MartinhoFernandes you high bro?
 
No. Not even drunk.
 
@R.MartinhoFernandes A well known neurological disorder.
 
what's the >> operator called? Surely it has to have some name?
 
@rightføld thing is about std::stack it is not on the stack.
 
10:34 PM
so
if I have electric engines and stuff, I don't need to continually feed my shit with coal, right?
cause that really got old in the 2nd level when I had to keep manually restocking every inserter and furnace
 
Xeo
ye
you only need to feed the boiler
well, and furnaces actually
I don't think you get the electrical ones of those in the demo
 
@ZachSaucier Right shift. Also stream extraction.
 
also
 
Xeo
but you can just have belts carry coal and have inserters put them in the furnace
 
huh
 
10:36 PM
@JerryCoffin interesting. I'll have to look into the origins
 
electric poles have way more clearance on the sides than the top and bottom.
 
Xeo
@Puppy 5x5
it's a square.
 
yeah, but the pole itself is 2x2.
 
Xeo
anyways, sleep.
 
and it's offset to the bottom left.
 
10:38 PM
@FilipRoséen-refp It's awkward when you touch some part of your body but only feel tactile feedback from one end.
 
>> would have a different priority if it would originally had started as stream extraction.
 
@ZachSaucier There is on origin, only an abscissa.
 
@JerryCoffin In my case, it was just the combination of numb arms and a semi-awake state.
 
@CaptainGiraffe ...and if marriage were illegal, only outlaws would have inlaws.
 
@JerryCoffin neat =)
 
10:41 PM
@R.MartinhoFernandes Good (and fun) book anyway.
 
I don't remember ever getting that food, though.
 
@JerryCoffin Not sure how it relates to the shift operation but still.
 
@JerryCoffin Bought :/
 
@CaptainGiraffe Just another: "if it were different, it would be different, but it's the same so it's not."
 
I have sleep paralysis a few times a year, that makes for some decent hallucinations. The most common one is a green luminous spider flying at me.
@JerryCoffin I see, but the history is sort of illuminating.
 
10:59 PM
I'd like to change the width of a given integer by overloading the insertion operator. Can someone guide me as to what I'm doing wrong?
ostream &operator<<(ostream &out, int t) {
        out << t << std::setw(2);
        return out;
}
 
posted on November 19, 2014 by Scott Meyers

I've received some reports about how Effective Modern C++ doesn't render well on Kindle, with code comments not aligning correctly and a narrow single-character ellipses ("…") being visually indistinguishable from a wider three-character ellipses ("..."). In response to my queries about these kinds of problems, my production team at O'Reilly told me: One of the Kindle options available is "P

 
Factorio is really nice.
I'm kinda able to play, so I think I'll buy it in the end.
I'm a bit worried of that official system requirement that I don't meet though.
The author seems to be aiming to reduce it, so I guess that's a good thing.
@BartekBanachewicz, @R.MartinhoFernandes ^
 
@ZachSaucier setw affects the width of the item that comes after it, not before.
 
@ZachSaucier Beyond that, you can only add an overload for a user-defined type. You can't really change the overloads for int, char, etc.
 
11:05 PM
why's that?
 
@ZachSaucier Because those overloads already exist in the standard library, so if you try to add one yourself, you'll create an ambiguity (at least usually).
 
I see
 
@JerryCoffin What if you put it in your own namespace?
 
class Time
{
     public:
         void pfshow()
         {
             cout << this;
         }
@JerryCoffin sorry to bother, but how can I do the above?
I would like to pass the Time object to the overloaded << operator
 
@ZachSaucier *this
 
11:12 PM
oh
that's simple, haha
does the order of setw and setfill matter?
 
@ZachSaucier No (at least IIRC).
 
alright, thanks a lot!
 
alright
the Factorio demo did kinda pique my interest
reminded me of playing KSP
 
buy it
nao
 
nah
I'm already way overbudget for the week
and by week I mean month.
 
11:22 PM
how did you overbudget this "week"?
 
Ell
sigh when is your birthday puppy?
 
So, I've heard that, having template<class Type> void func(Type& x), then in func("abc"), Type ~ char[4]. Is that true?
Notice abyx's link on the starboard? cs623822.vk.me/v623822344/9e7f/sOnnOIPFcdg.jpg, let's focun on sOnnOIPFcdg.jpg for a second: sOnnO == sonno =(italian)= sleepy.
 
@Ell It was less than one month ago.
 
> What is std::decay and when it should be used? It's obviously used to decay radioactive std::atomic types into non-radioactive ones.
 
@Jefffrey Depends on compiler. In C++03, yes. In C++11 illegal.
 
11:31 PM
Illegal?
 
my birthday was about two days after I moved to Bristol.
 
How so?
 
const.
 
oh right
Still, if template<class Type> void func(const Type&), then that happens right?
 
should do
 
11:32 PM
That's where you should need std::decay for.
If you want to forward the C-string, for example to some other function.
 
Asked my first question on SO
 
nope.
forward can forward it just fine on it's own.
decay is mostly useful for metaprogramming.
 
Mmm. Let me check they don't actually exist :) I might just not remember — sehe 9 mins ago
 
hmm
 
I wonder how long it will take this time for me to remember those pesky operator== overloads for std::string
 
11:33 PM
Only 5 rep per upvote, as I notice
 
it is a type metaprogramming trait a'la remove_reference and the like.
 
Well, hit my rep cap anyway :o)
 
@Puppy It would forward the const char&[4], no?
Not the const char*, which is what you want.
 
why the fuck would you want to forward as a const char*?
const char&[4] preserves the source type exactly, which is what it should do.
 
because there might be functions taking const char*
 
11:34 PM
so what? the result of std::forward can decay on it's own.
 
ITT @Jefffrey fails at perfect forwarding
 
there's no general desire for const char[4] to decay to const char*.
 
then I don't understand this answer
39
A: What is std::decay and when it should be used?

T.C.<joke>It's obviously used to decay radioactive std::atomic types into non-radioactive ones.</joke> N2609 is the paper that proposed std::decay. The motivating example is C++03 std::make_pair: template <class T1, class T2> inline pair<T1,T2> make_pair(T1 x, T2 y) { return pair<T1,T2>(x, y)...

the motivating example specifically
 
because that's a very specific desire for const char[4] to decay to const char*.
 
why
 
11:36 PM
> If it accepted its parameters by reference, then T1 will be deduced as an array type, and then constructing a pair<T1, T2> will be ill-formed.
explains it pretty well.
IOW, arrays are shitty special cases that don't play well with std::pair, specifically.
 
yes, but you just said that the array type would decay on its own
 
yes, but only if your function takes a const char*.
std::pair<Type, ...> does not.
 
the constructor of std::string takes a const char*
 
yes, but that's utterly irrelevant.
because the std::pair is not a std::pair<std::string, ...>.
it is a std::pair<Type, ...>.
 
> std::pair<std::string, int> p = make_pair("foo", 0);
 
11:38 PM
too late.
the motivating example discusses what happens inside make_pair.
namely, that call make_pair("foo", 0) being illegal if std::decay is not invoked here because of the array type.
ugh
I want to crawl into bed and never get out
stupid sickness.
ah well
gonna go to bed now, gotta go to work
 
@Puppy again?
weren't there drugs for that
 
different sickness.
just a cold I think
 
@Puppy G'night.
 
11:51 PM
> calling it the Standard Template Library... stay away.
It's not called Standard Template Library? Wat.
I've been lied all my life.
 
@JerryCoffin seems you were right:
15
Q: What does P::************ mean in Boost assert.hpp file?

stoneyanIn boost/mpl/assert.hpp, I saw something like this: template<class Pred> struct eval_assert { typedef typename extract_assert_pred<Pred>::type P; typedef typename P::type p_type; typedef typename ::boost::mpl::if_c<p_type::value, AUX778076_ASSERT_ARG(assert<false>), f...

 
@Jefffrey There is a library called Standard Template Library, which was used as the basis of the collections, iterators, and algorithms in the standard library--but the two are separate things. There are also parts of the standard library (e.g., string) that didn't originate from the STL, but still act like containers, support iterators, etc.
 

« first day (1495 days earlier)      last day (3454 days later) »