« first day (1731 days earlier)      last day (3443 days later) » 

00:00
@rightfold to prevent having to use a std::map and do O(n log n) compacting sweep, what I do now is that after copying an object to the new heap I store its new location in the old location, then do another walk updating all pointers before releasing the old memory
00:14
Nintendo president Satoru Iwata has passed away: http://bit.ly/1M0wiU3 http://t.co/ePkeQOTwgd
/cc @Rapptz
Yeah I saw.
What the fuck.
He was 55
like... wtf
Ell
Ell
So young :o
00:40
-1
Q: I NEED IDEAS GUYS

Josh HeapsSo, I have been searching and searching for c++ programming Ideas. I get everything from cout to structures. I've already made tic-tac-toe against an A.I. that wins or at least ties every time it goes first and wins, loses, or ties when you do depending on how good you are. I've made a near impos...

That's such a common question there should be a canonical link for that
"Here you go, but we're closing this question anyway"
> P.S. If you want any source codes/.exe files of these games, let me know
00:59
> One day, a programmer's wife asks a programmer to go to the store and by 2 dozen eggs, and if there's any cookies, by 10. The programmer came home with 10 dozen eggs.
that hurts
01:11
tagged pointers <3
what's the output?
or what's the purpose anyways. And what are the lifetime guarantees for the tag. Especially when using unique_ptr? And why is it not extensible?
Hmm, several errors come up when compiling in a different environment. Gonna check those headers
For now pasting this into coliru
it's mostly for fun, I would be scared if it got into production somewhere
because non-portable
The tag is limited to the size you can extract from the unused alignment bits
@milleniumbug What's the point of it?
so maximum 2 bits in 32-bit compilers and 3 bits in 64-bit compilers
@Jefffrey It could decrease the size of nodes in RB-tree or AVL tree for example
also
3 mins ago, by milleniumbug
it's mostly for fun, I would be scared if it got into production somewhere
01:26
@milleniumbug Oh, I thought it was a tagged ptr, in that you could add a string tag to an allocation to be retrieved later for debugging or analyzing memory usage, like "oh this 2MB buffer is a XYZ, and this one is ..."
the arnold schwarzenegger programming language
@Borgleader You seriously thought I was doing something useful?
:D
@milleniumbug Yes, it seems so silly now
Oh, it was actually mentioned in the chat before
@StackedCrooked Like this?
02:04
The U.S. wants Greece to stay in the Euro & the pope said that 'Poor are sacrificed on the altar of money' but neither the U.S. or Vatican intent to fork out bail out money to rescue Greece.
Hypocrisy
@chmod711telkitty not really. I have an opinion on something, doesn't mean I want to act on it.
want or should.
e.g. I want modules in C++. Doesn't mean it's hypocrit because I don't go to the C++ committee and implement it myself.
02:30
I have the following in my constructor, object(std::move(Object)), is there a cleaner way? With that && thing?
Xeo
Xeo
03:00
Context or bust. But the answer is likely "yes, there's a cleaner way: don't write move-constructors".
03:13
Definitely. I'm working on image acquisition system (phd, in physics/optics) and where I pass around pointers. But then the camera sometimes dies or silently fails so I need to count my pointers. For failure detection I need to understand where all the pointers are, on the other hand for multiprocessing I need to make sure that pointers are only held by one queue. The thing is a nightmare, I wish somebody wrote some articles about how to manage task-parralel queues with some error tolerance.
03:32
it's a bit annoying this doesn't work: coliru.stacked-crooked.com/a/a11df308be9bc794
#define NULLPOOTER 0
I just learned about Iwata. Fucking hell.
04:00
Iwata?
Satoru Iwata, Nintendo's CEO, passed away earlier today.
04:40
Gumtrees mobile app is seriously shitty
There is no way you can refine a search by sub category
 
1 hour later…
06:19
Why doesn't templated<> automatically become templated?
06:45
@Mikhail Huh?
Is it because it has a template parameter list?
And you need to </\*ARGUMENTS...*/>?
how many ways are there to initialize global variables.
@ShaoboZi You're asking because...?
Confused whether to use = or () ...?
For POD
@ShaoboZi Use type var{/*ctor arguments*/} always
@nabijaczleweli Yeah, even in the case of default arguments you need them <>. More refactoring
I want to use templates like adjectives, but the compiler wants them to be verbs
06:58
whaaaaaaat.
user1804599
07:12
@orlp ok
user1804599
@Prismatic lol lisp
sbi
sbi
07:44
Good morning.
user1804599
Hello monkey.
user1804599
huehuehue
sbi
sbi
@StackedCrooked Mhmm. "Eastern Coast." Do they have a Western Coast as well?
@uselesschien I was surprised to learn that I can star a message in the transcript of a room I have never been in. Sometimes this chat is just strange.
user1804599
@sehe the bars represent threads.
user1804599
Concurrency is an important aspect and concurrency without threads is an awful model.
07:48
@sbi well... I guess you could could argue it has a 'east' 'north east' and 'south east' coast... it's all the one coast... but subtly different facings
sbi
sbi
@rightfold Wouldn't that be New Amsterdam? Oh wait, that would have to be New New Amsterdam, right?
user1804599
@sbi what-if.xkcd.com/54 last picture
user1804599
you prolly have to read both parts to get it
sbi
sbi
> Olympus Mons still rises well over 10 kilometers above the new sea level. Mars has some huge mountains.
Indeed.
Dan
Dan
hi
g'nite
07:54
@xeo wake up, you have someone's vomit to clean up
user1804599
@Dan good bye.
Dan
Dan
@rightfold was assembly, figured it out - disregard
user1804599
which assembly language?
user1804599
there are hundreds of them
sbi
sbi
@sehe This is just creepy. I don't want my machine to look at my eyes so that it knows when I'm distracted enough to not to notice the GC.
@Xeo That just shows how young you are. Of course we called it "Zauberwürfel" in the 80s.
@R.MartinhoFernandes Have you always been that sexist or is this just since you have a girlfriend?
@thecoshman Use Jenkins. You'll be up and running within an hour after clicking on "download".
Xeo
Xeo
08:01
@sbi yeye, old fart.
@sbi And after a few moments the amount of XMLs will be too damn high.
Xeo
Xeo
@Griwes Whut
@Xeo Jenkins... keeps all information in XMLs.
Xeo
Xeo
so?
Like... every piece of information has its own XML.
And it gets really slow after a while, especially when you want to restart it for whatever reason.
user1804599
08:04
@thecoshman TeamCity.
I mean, probably won't hurt too much in a personal project.
But it definitely is not a piece of scalable software. :D
Xeo
Xeo
@Griwes We've been using Jenkins at work since forever.
sbi
sbi
@Griwes Shrug. I just looked at our Jenkins. There's probably 50 tasks on its front page. From what I understand from our infrastructure engineer, she isn't even making them in the UI anymore, but they are made up on the go from some scripts in some language or other. Still, I don't think I have ever looked at Jenkin's under-the-hood XML.
@sbi you really are living in the past o_0
@Xeo Yeah, same here - and thankfully we've migrated one of the projects to Teamcity already, because sometimes loading the main Jenkins site took ~30 seconds.
Xeo
Xeo
08:07
Your servers suck, or something.
sbi
sbi
@thecoshman I have lived in the past for decades.
@Xeo Nay. Jenkins sucks.
Btw. the official recommendation of the maker of that thing is to not keep more than 5-10 builds in history.
Because each build in history is its own XML that must be parsed during startup.
(5-10 per job, that is.)
o_0 I think for some reason the two test suites were run in parallel... against the same server... this is going to make for some very interesting to read logs
sbi
sbi
@Griwes I believe our Jenkins server has been restarted this year. Maybe even twice. I'm not sure, though.
@Griwes I'm not in the habit of constantly restarting Jenkins, if you are, you have another problem.
Services are allowed to have slow startup, they should aim to be long running, not quick starting. User applications are the opposite.
08:10
Wait until you have an instance the size of ours.
Restarting it regularly will be the only thing that'll keep it responsive in any way.
Xeo
Xeo
We got 200 jobs on Jenkins
then you have other problems
:24412479
¬_¬
Xeo
Xeo
And it's responsive enough, to me at least
I have like a one in a hundred seg fault when exiting my application
should I just give up on this project forever
user1804599
Jenkins is almost like it was made by Atlassian.
08:13
besides... what exactly are you doing interacting with your CI server all day?
user1804599
UI is cluttered as fuck.
The one we migrated to teamcity had probably like ~500. The one that is still responsive-but-not-when-loading-long-logs one has probably 150.
user1804599
@thecoshman not at all.
user1804599
it notifies me when a moron pushed code that doesn't pass the tests
@thecoshman Making sure developers didn't fuck up, or trying to figure out what they fucked up without having to manually run all tests (...which does take a while. These aren't only unit tests, mind you).
08:19
Sure, but I don't interact with Jenkins for that, it's just running away doing its thing
user1804599
Yes.
user1804599
Hence "not at all".
Well you're not the one complaining much
user1804599
I should look into GitLab.
user1804599
I want pull requests but I don't know how they work in Bitbucket.
08:30
yeah, tried atom, it's a no go. It leaks memory sitting with a few files open
user1804599
What does ن mean and why do people have it in their names on Twitter?
Moaning guise
user1804599
Nun is the fourteenth letter of the Semitic abjads, including Phoenician Nūn , Hebrew Nun נ, Aramaic Nun , Syriac Nūn ܢܢ, and Arabic Nūn ن (in abjadi order). It is the third letter in Thaana (ނ), pronounced as "noonu". Its sound value is [n]. The Phoenician letter gave rise to the Greek nu (Ν), Etruscan , Latin N, and Cyrillic Н. == Origins == Nun is believed to be derived from an Egyptian hieroglyph of a snake (the Hebrew word for snake, nachash begins with a Nun and snake in Aramaic is nun) or eel. Some have hypothesized a hieroglyph of fish in water as its origin (in Arabic, nūn means large...
user1804599
OIC
Why does std::bind forwards its "captured" arguments (those passed when calling bind()) as lvalues regardless of how their original category?
user1804599
08:34
@AndyProwl taking them by value is safer.
@rightfold taking what by value?
user1804599
ok
user1804599
std::bind returns an object
user1804599
storing the bound values directly is safer
user1804599
std::bind(f, 42)
08:35
a_command_that_outputs_one_file_per_line | xargs rm <- that make sense?
Yeah but why std::bind(f, std::move(uptr)) forwards uptr as an lvalue instead of moving it into f()?
user1804599
if this would store a reference to the integer you would run into trouble
it doesn't need to store a reference
user1804599
@AndyProwl oh, I don't know
user1804599
std::bind is horribly broken anyway.
user1804599
08:36
Don't use it.
user1804599
you cannot reliably bind values returned by std::bind because of a special case, breaking lots of generic code that uses std::bind
I was asked by a colleague how to capture a unique pointer into a lambda in VS2013 so I suggested the std::bind workaround. I was surprised I had to take the unique pointer by lvalue reference in the lambda
another option is using a shared pointer to a unique pointer but meh
user1804599
Shared pointer is the easiest workaround.
or just a shared pointer to the object but meh as well
user1804599
08:38
There's no reason to not use it.
it's meh-some
but better than bind(), I realized
I was just curious why bind() would not forward its captured arguments with the original category
user1804599
Shared pointer to the object.
user1804599
Why not?
Didn't want to lose unique ownership
And didn't want a shared pointer to a unique pointer either
Xeo
Xeo
@AndyProwl Because there's no guarantee it won't be called multiple times, I believe.
user1804599
08:40
If the lambda is the only one holding on to the shared pointer then it has unique ownership.
@Xeo That makes some sense but I don't think it's a valid reason to design it that way
After all, it's always the user's responsibility not to access a moved-from object. Why would it be different in the context of bind()?
Xeo
Xeo
Or maybe VS'13's bind is just broken. Who knows. :P
No, it's like that by design
user1804599
Can't you use Boost's lambda hacks instead?
user1804599
Just go with shared pointer, really.
08:42
@rightfold zing
@rightfold Yeah, de facto, but I'd like to express the constraint explicitly using the type system
user1804599
auto_ptr :p
@rightfold I did (or rather, I suggested my colleague to use that)
not sure what he did
user1804599
you'll soon find out during the code review!
if I'm invited :D
well I guess I can spy on his code anyway
user1804599
08:43
> not reviewing code on all merges
user1804599
user1804599
I solved this problem using shared_ptr too a while back in my JIT compiler.
user1804599
But now I'd use C++14.
Me too, but VS...
user1804599
08:46
Which reminds me that I should investigate JIT-compiling to ECMAScript.
user1804599
I hate JavaScript with a passion.
Xeo
Xeo
@AndyProwl Sure?
Fun thing is that it seems to accept both
user1804599
@AndyProwl use shared_ptr with #if __cplusplus < ... and unique_ptr after the #else!
Satoru Iwata is dead
user1804599
Automatic refactoring!
Xeo
Xeo
08:52
I'd have written it off as an extension in libc++, but libstdc++ does it too
@Xeo Hm. I was trusting this:
10
A: Does std::bind work with move-only types in general, and std::unique_ptr in particular?

Howard Hinnantstd::bind works fine with move-only types. However it creates a move-only functor in the process. std::function requires a copy constructible functor. It sounds like boost::asio does too. When you call the move-only bind functor, it will pass its bound arguments as lvalues to the target opera...

> When you call the move-only bind functor, it will pass its bound arguments as lvalues to the target operator()
Xeo
Xeo
Interesting.
user1804599
@BartekBanachewicz How can you tell?
user1804599
The only thing you can know is that you are alive.
@Xeo I was hoping not to have to open the Standard, but well...
08:55
> Apple’s Mac is now the only major PC brand that’s growing
user1804599
In C++, committee is comedy.
@FlorianMargaine uh "Some examples of statically typed languages would be C, Java, Haskell."
C and statically typed is really
user1804599
C is statically typed whether you like it or not.
user1804599
It defines what types are and every expression has a static type according to that definition.
ok, as always I don't understand the Standard either but it should be in [func.bind.bind]/10
08:59
Aaand. Even if you are in "god mode", full cheats enabled, the wind is right and no files are magically in use, then still your loop has the obvious race-condition (when files are created/modified after/during iteratoion) — sehe 6 secs ago
user1804599
@AndyProwl What if you make the function to bind to take a reference to a unique pointer?

« first day (1731 days earlier)      last day (3443 days later) »