« first day (1776 days earlier)      last day (3172 days later) » 

@ScottW you are correct
@R.MartinhoFernandes That's very vague hint :D
 
A const thing in the first parameter of std::pair?
 
Hm..
@Morwenn Why would that even matter..?
:)
 
@StackedCrooked Er, that's exactly it.
 
@R.MartinhoFernandes I suck at C++.
 
7:01 PM
I know...
Just wanted to stretch it a bit.
 
@StackedCrooked I don't know, but it does change things.
 
@Morwenn Const. Const never changes.
 
I don't know why it changes things, I could only spot the difference.
 
too much spoilers already
 
it's really not obvious if you don't know it
 
I probably couldn't have figured it out myself.
mostly because I was not aware about the stuff std::pair can do.
 
So it constructs temporary pairs whose lifetime is extended thanks to the const?
 
Nah. It's simpler than that.
 
there's a copy there
 
The difference in times on the benchmark is much lower than I expected. Probably either due to refcount or small-string optimization.
 
7:07 PM
@StackedCrooked you ruined it with your gcc 5 upgrade
 
I think g++ 5.2 switched to small-string.
 
You do not have
Sufficient reputation
To drink from this mug
Almost a haiku, just need to fix the first line.
 
it's twice as big
5
 
Oh wait. I think I learned about this from one of Scott's talks, not STL.
 
7:10 PM
It makes me wonder if there should be compiler warnings diagnostics for making unnecessary copies.
 
@Mysticial If you are nervous about copies being made then you can use a (debug) wrapper type which disables copy. Or which asserts on copy.
 
@StackedCrooked But that takes work. :)
 
@Mysticial In C++ it's very easy to make copies. Intentionally or not :)
 
auto& binds to reference
 
Ell
Evenin' all
 
user1804599
7:14 PM
I love how D lowers the bar to unit tests.
 
user1804599
By making them a language feature.
 
@elyse cool
 
user1804599
 
user1804599
I am proud of Lounge<C++>. They finally learned how awesome COCKS are.
 
@ScottW That's an rvalue reference (&&), it cannot "steal" from map when it is not specified to do so.
 
7:15 PM
I've been thinking about making little unit tests along with the source code and have them executed in the constructor of a global static object in the cpp file. This way you have a mini-test suite every time the program launches.
 
@elyse Nope. Dildos.
 
user1804599
Dildos are like COCKS.
 
@StackedCrooked Yeah I know. :) And I don't usually run into that problem since I don't use high-level data structures for performance.
 
@elyse It depends x)
 
user1804599
@StackedCrooked I like unit tests near the production code.
 
user1804599
7:16 PM
I.e. right below it.
 
user1804599
@Morwenn do you like COCKS
 
@Mysticial Copy overhead is very easy to track down with a profiler though.
 
Though recently I did run into that problem in that NumberFactory app. I had to completely kill off the copy constructor/assignment to make sure it I wasn't doing anything stupid.
 
@elyse Me too.
 
@elyse It mostly depends one who's wearing one.
 
user1804599
7:17 PM
@Morwenn me
 
If she's cute, then I'm fine with it.
 
user1804599
yay
 
I've considered making the copy constructor explicit in order to avoid unintended copies.
Not sure if that is horrible or not.
 
@StackedCrooked That sounds like a good idea.
 
@Mysticial What type of objects were you copying?
 
user406009
7:19 PM
Darn, 27% of my schools freshman class are comp sci majors. That shit is scary.
 
@StackedCrooked The BigIntO and BigFloatO types.
 
Erm, what are those?
 
@StackedCrooked The RAII versions of the bignum objects.
 
Ah. They perform allocation?
 
@StackedCrooked Yeah.
 
7:20 PM
Oh, are you fucking kidding me, MSVC140 doesn't support std::to_string
 
@StackedCrooked One thing that's almost as bad as extra copying is that VS2015 by default zero-initializes all classes and structs for "security reasons".
 
user406009
@ScottW still going to whammer the job market when the current wave of people graduate.
 
That showed up in my profiler.
 
user406009
That's a ton of people.
 
7:21 PM
@Mysticial It really does that?
 
@EtiennedeMartel This.
 
@StackedCrooked Oh yeah. It caught me by surprise.
 
For heap and/or stack allocation?
 
Stack
 
@ElimGarak Let's not forget that many so-called climate skeptics simply confuse "weather" and "climate".
 
7:22 PM
@Mysticial That should be a major performance killer, not?
 
They confuse their relatives for appropriate intimate partners, as well.
 
@StackedCrooked It showed up in the profiler as like a 3-5% performance hit.
 
Ell
I have never looked into climate change
 
Here in Quebec, a libertarian pundit and radio host once seriously claimed that the week long -40 C cold wave we have had at that time was a clear sign that the Earth was not getting warmer.
 
@EtiennedeMartel The funny thing is that climate sceptics were sceptics about the way the temperature evolution curved were computed. So they developed algorithms to compute their own and got almost exactly the same curves.
 
7:23 PM
@StackedCrooked If you create a new project in VS2015, it turns on that zeroing by default. But if you upgraded an older project, it stays off.
 
It doesn't seem make sense to zero objects on the stack for security purposes. It's always local memory.
 
@StackedCrooked Well, it can call into other functions which reference it.
 
I recall that disabling the debug iterators greatly improved the performance of my Tetris AI thingy. But that's a long time ago.
 
user406009
Aren't some parts of the world supposed to get colder? ( due to currents and whatnot)
 
@Morwenn In my view, skeptics are either A) people who know climate is changing but don't care because they have financial and economic interests in environmentally damaging enterprises or B) people who lack the necessary education to realize that people in group A are lying.
 
7:24 PM
@elyse No, but I sure love DICSS
and DILDOSS
 
Do It Like Dad OS.
 
Whole-program optimization helped a lot too.
 
@StackedCrooked I suppose it also does it to heap allocated objects with new.
 
And replacing mutex with Jalf's STM library also made it faster.
 
Ell
I am sceptic of the cause of excess climate change because I have never looked into it so I have no opinion really vOv intuitively it makes sense that greenhouse gasses cause extra warming so I err to that side but I've never looked at data
 
user406009
7:26 PM
@EtiennedeMartel what do you think of the argument that pollution laws only move industry to other countries instead of actually reducing pollution?
 
@Lalaland The thing is that climate is one of the hardest things to compute because there are too many parameters.
 
@StackedCrooked Basically, they insert a memset(*this, 0, sizeof(*this)) to the start of every constructor/implicit constructor.
 
@Lalaland It's the same argument that stricter tax laws will push rich people to other countries.
 
Ell
That is true isn't it?
Brain drain etc.
 
And I'll answer the same thing: that argument never seems to be brought up by those rich people.
It's always by right-wing politicians who all seem to think that the only thing that ties a person to a region is the amount of taxes he or she pays there.
 
7:27 PM
@Mysticial I see.
 
Kinda insulting when you think about it.
 
Ell
I think it does push people out. Not just automatically
But why wouldn't it be a factor in deciding where to live?
 
@Ell Because people are not just standing in a vacuum and then picking a place to live.
 
@Mysticial I suppose it's ok to have safe defaults as long as it can be disabled by the developers.
I think the debug iterators saved many people more time than they cost time due to checking overhead.
 
@StackedCrooked It will get even worse in the future. Intel added MPX instructions to Skylake. And they're encouraging all compilers to pick it up and turn it on by default. (Intel actually is doing something that hurts performance.)
MPX basically does bounds checking at the hardware level, but it's manual and it has overhread.
 
7:29 PM
@Ell Most of them could probaby eat a tax hike without any real effect on their standard of living. So why would they move?
 
Ell
I think the likelier event is students moving to a different country when they are young
 
user406009
@Mysticial that would be a good thing for most programs. I would argue that memory safety is more important for most applications.
 
why use C++ then
 
user406009
It seems like a good default.
 
Ell
@Mysticial what is Intel's incentive for this?
Nobody blames the processor for a software bug, do they?
 
7:32 PM
@Ell oooh, shiny!
 
@Ell To prevent buffer overflow attacks.
 
@Mysticial Currently memory accesses are also checked by the kernel. Is it faster than that?
 
user406009
@Mysticial have they published estimated overhead for the new feature?
 
So there was a pétanque tournament in Old Montreal recently. Ludia decided to participate, so we sent two teams.
 
@Lalaland I agree, but the problem is that the compilers don't make it clear that they turn this stuff on. So you're losing performance without knowing it. In my case, I noticed the slowdown and actually went to investigate the assembly.
 
7:33 PM
Since we like winning, both of our teams are entirely French.
Gotta use our best people.
 
@Lalaland It depends on how it's used. If you use it for every memory access, there would probably be at least a 2x slowdown.
My guess is that they'll try use it the way that managed languages do bound checking.
I'm actually not sure how they'll do it in C++.
If I pass a char* into a function, the function has no fucking clue how big it is. So it can't possibly "check" that it will go out of bounds.
 
Ell
Hmm the you could remove kernel bounds checking if the processor does it, right?
 
So it would have to trace it all the way back to where it gets new'ed/malloc'ed - which is a halting problem.
 
Ell
I think I misunderstand anyway, i thought the processor already did it :L
 
I read that for applications that use a lot of concurrency it turns out that Java programs are just as fast as C++ programs. The of inter-thread communication (CAS etc) is the determining factor.
 
user406009
7:36 PM
@Ell Yep. You can even remove most of the os given a safe enough language.
 
user406009
This the talk of "JavaScript" machines.
 
@Mysticial The A+ gaming business will prevent them from making it slow :)
 
@Ell The kernel only does at page granularity via virtual memory. That's not good enough to stop a stack-smashing buffer overflow attack.
 
Ell
Oh yeah of course
@stacked they'll more likely just stick with old compilers, no? :P
 
user406009
@Mysticial C++ should be able to elide the checks in certain places. I know Rust does.
 
7:39 PM
@Lalaland That's basically what managed languages do to not completely suck in performance.
 
Ell
so the advantage for managed languages would be moving the check from the VM to the processor?
 
@Ell Maybe.
 
Ell
Because having VM as well as processor check is surely pointless? :S I thought managard languages can't suffer from Buffer overflow
 
The MPX instruction set is a bit weird. I haven't studied it yet. But you specify a bounds by loading it into a register. And you can check arbitrary pointers against that bounds. If it's outside it segfaults.
 
hmmm nothing weird to me yet
 
7:41 PM
So a VM would need to catch the segfault and turn it into an exception.
 
user406009
@Ell no, but they do have out of bounds errors.
 
it's just what I would expect from a hardware bounds checking
 
@unordered_meow The checking is manual. It's not like you can say, "for the next 100 instructions, make sure all memory accesses are between A and B".
 
I recently used that rank/channel-interleaving can be used to speed up memory accesses. It requires padding the start addresses of your objects. Not sure if significant though.
 
It's weird in that, I don't actually see what it gains over manually checking and branching on out-of-bounds.
 
7:43 PM
oh
 
I guess it saves a couple of pointer compares and a branch (which would be predicable anyway under normal operations).
But that fact that Intel added an entire set of registers for it which requires even OS support suggests that either they're out of their mind, or I'm missing some more important use-case.
 
user406009
Perhaps we should add an unsafe keyword to C++
 
That latter seems more likely.
 
@Lalaland Everything is already unsafe.
 
@Lalaland That's redundant.
 
7:47 PM
I like that lambda's are immutable by default.
I think that's a step in the right direction.
 
your mother's an earthquake in the right direction
 
user406009
The idea would be to define normal code as segfaulting on ub.
 
I think rvalues are also an important concept for optimizing compiler-writers.
 
@Lalaland That's going the reverse direction
 
user406009
And then the current efficient behavior in unsafe blocks.
 
7:48 PM
But muh perfeomrance
 
it would rather be a safe keyword instead
 
fuzzy int a;
 
user406009
@CatPlusPlus then you add unsafe. Done.
 
That's how D does it
 
Looks like MPX is meant as a way to make this feature more efficient: software.intel.com/sites/products/parallelmag/singlearticles/…
 
7:49 PM
Hahaha as if C++ fanboys would want safe 0.001% slower behaviour by default
 
The default way is safe, you have to go out of your way to make things unsafe
which is how todays' high-performance language should do
 
user406009
@unordered_meow You mean there are people out there relying on UB!?!?!? /sarcasm of course
 
A way to require state/variables to be not global (i.e not observable by non-inline function calls).
Or switch to rust :P
 
Holy shit, Intel actually expects bounds checking to be done on all memory writes. You've gotta be kidding me.
 
aol memory writes?
sounds like useful feature for a VM maybe
 
7:54 PM
@Mysticial I suppose there's a market for CPUs that offer better security at the cost of performance.
But there's also a market for speed.
 
@StackedCrooked Yeah. If they intend to check every memory access, then yeah, they're gonna want hardware support.
 
Is it gonna be on all their next CPUs?
 
Skylake has it.
Obviously, using it is a compiler thing. And right now it defaults to off - for obvious reasons of performance and that nobody in North America has Skylake yet. lol
 
Intel is pretty smart. It's getting hard to make CPUs faster, so they invent ways to make them slower :P
 
~~bloat~~
they copy from the software developers :D
 
7:57 PM
Performance is optional, security is not
Maybe we'll be able to stop patching OpenSSL every fucking week
 
If they're gonna do this, they might as well do it right by having a 3-operand load/store which takes:
- A register to load/store to/from.
- The memory location.
- The bound register.
@CatPlusPlus OpenSSL can't be patched no matter how much hardware you throw at it.
It's what they call, "terminally broken". :)
 
user406009
I'm with Cat on this one. Correctness is more important in the majority of cases.
 
user406009
Now we need to start getting exceptions on integer overflow.
 
> The high-level design philosophy for Pointer Checker is "bounds follow the pointer.”
The compiler creates bounds when a pointer is created via the "&” operator or array reference, copies bounds when a pointer is copied, stores bounds when a pointer is stored in memory, loads bounds when a
pointer is loaded from memory, and passes bounds with pointer arguments and function returns. In addition, the compiler generates checks when a pointer is used for indirect memory references.
Does that mean that pointers will be more than 8 bytes?
 
They made raw pointers into array observers
 
8:04 PM
so my gf brought home some 'corn flour' from spain... just translated what it says on packet... it's chickpea flour :O
 
@thecoshman Good luck with that. There are so many flours and so many ways to use them...
 
user406009
@Mr.kbok Getting closer and closer to Java every day.
 
Ell
does anyone.know if you can buy wholegrain double zero flour at supermarkets?
 
wtf is double zero
 
@Puppy 00
 
8:11 PM
2 * 0 == 0
 
@Puppy pasta flour.
> The grading system is 2, 1, 0 or 00 and indicates to how finely ground the flour is and how much of the bran and germ has been removed.
 
octal 0
 
@Ell Almost certainly not, but you can here
 
user406009
50 Lbs of flour is quite a bit.
 
Ell
8:15 PM
Yeah that's quite a lot :P
 
user406009
@StackedCrooked What is that? An efficient semaphore?
 
Yeah.
 
user406009
Regardless of what you think of Facebook's products, they do good engineering work.
 
@Lalaland It also has post(n) and tryWait(n) methods.
 
8:19 PM
There are some gems in folly and they occasionally write interesting articles about it.
 
I've incorporated their scope guard code at work.
It's pretty sweet.
 
Ell
I always forget what a scope guard does :/
 
SCOPE_EXIT { stuff(); };
 
Didn't they optimize their shared_ptr for small refcounts too?
 
Ell
So its like a destructor?
 
8:21 PM
@Ell Yeah, it does stuff at scope exit.
 
@Ell It generates a RAII object that runs the given code at scope exit.
 
Ell
template<class f> guard { ~guard(){f()}}; like this kinda?
Plus a macro with lambda
 
Kinda.
 
Ell
Idk if thatd work
 
Sometimes shared_ptr/unique_ptr is used as a poor-man's scope guard:
std::shared_ptr<void> scoped_guard(nullptr, [&](void*) { cleanup(); });
That's probably not very efficient though.
 
8:24 PM
scope guard emulation with std::unique_ptr would be more efficient, but more painful to use
 
user406009
Not that much more painful.
 
Ell
Actually mayhe f would need external linkage
 
By the way, scope guards were, like, the reason to introduce std::uncaught_exceptions instead of std::uncaught_exception. That means than whoever's the most motivated can now propose an std::scope_guard for standardization.
 
Ugh.
I'll stay away.
 
user1804599
Yay I played Terraria with someone else.
 
8:40 PM
yay
I'm listening to music, looking for some inspiration for my game
I suck at music so I don't put my expectation too high
 
user1804599
Hamachi is nice.
 
user1804599
@StackedCrooked I like scope-guards over finally, since you can put the scope-exit action above the code.
 
user1804599
Also Boost.ScopeExit is very nice.
 
sometimes it looks stupid though
 
user1804599
I love how Fry got 4.3 billion dollars interest on his bank account of originally $0.23.
 
8:46 PM
I think that I still have old musics around that I composed for a one-night game making competition once.
 
yeah that's not how interest works
 
user406009
Perhaps he got direct deposit payouts from social security or something?
 
user406009
Or inheritance money?
 
@Morwenn dat MIDI
 
8:49 PM
@Mr.kbok Nope, it was a VST to make chiptune music.
 
what's a VST?
 
The first one is closer to MIDI.
A VST is a sound-making plugin that you can find in Cubase, FL Studio and other music software.
 
Ell
I'm trying to rekwkebr what it stands for
Virtual Steinway timbre
No idea :L
 
I was willing to learn how to use that a few years back but I bought skyrim instead
 
8:52 PM
@elyse Their last music video is a remake from Lady Gaga's Telephone.
 
Ell
I have tried fl studio
 
user1804599
Why would you remake the telephone of Lady Gaga as a music video.
 
Ell
I'm bad at making music
 
user1804599
Most people are.
 
@elyse Because they already did a mashup with one of their songs anyway.
 
user1804599
8:55 PM
xD.
 
user1804599
I once spoke to some band member of Korpiklaani.
 
user1804599
I forgot which one. He was drunk and high on drugs.
 
Eh, Korpiklaani are fun but unfortunately they lack originality after a few albums :/
 
user1804599
And he got removed from the building because he put up a cigarette and it wasn't allowed to smoke inside.
 
Being in a folk metal band myself, I'm not really surprised.
 
user1804599
8:57 PM
@Morwenn That reminds me:
 
user1804599
> "What do you do for a living?"
"I play in a metal band."
"Oh cool, what instrument do you play?"
"The bagpipes."
 
Haha, I play the recorder x)
The motherfucking recorder.
 
Ell
at least it's not descant
 

« first day (1776 days earlier)      last day (3172 days later) »